@chili-publish/studio-sdk 1.38.0 → 1.39.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 +495 -461
- package/_bundles/main.es.js.map +1 -1
- package/_bundles/main.js +2 -2
- package/_bundles/main.js.map +1 -1
- package/connector-types/src/DataConnector.d.ts +24 -4
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +1 -1
- package/lib/src/controllers/DataConnectorController.d.ts +27 -4
- package/lib/src/controllers/DataConnectorController.js +33 -18
- package/lib/src/controllers/DataConnectorController.js.map +1 -1
- package/lib/src/controllers/FrameController.d.ts +37 -2
- package/lib/src/controllers/FrameController.js +67 -2
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/controllers/UndoManagerController.d.ts +5 -0
- package/lib/src/controllers/UndoManagerController.js +8 -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/DataConnectorController.test.js +36 -0
- package/lib/src/tests/controllers/DataConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/FrameConstraintController.test.js +138 -10
- package/lib/src/tests/controllers/FrameConstraintController.test.js.map +1 -1
- package/lib/src/tests/controllers/UndoManagerController.test.js +6 -0
- package/lib/src/tests/controllers/UndoManagerController.test.js.map +1 -1
- package/lib/src/types/DataConnectorTypes.d.ts +9 -3
- package/lib/src/types/FrameTypes.d.ts +91 -10
- package/lib/src/types/FrameTypes.js.map +1 -1
- package/package.json +1 -1
package/_bundles/main.es.js
CHANGED
|
@@ -2,24 +2,24 @@ var Me = (s) => {
|
|
|
2
2
|
throw TypeError(s);
|
|
3
3
|
};
|
|
4
4
|
var xe = (s, o, t) => o.has(s) || Me("Cannot " + t);
|
|
5
|
-
var a = (s, o, t) => (xe(s, o, "read from private field"), t ? t.call(s) : o.get(s)),
|
|
6
|
-
const Ms = "2.
|
|
5
|
+
var a = (s, o, t) => (xe(s, o, "read from private field"), t ? t.call(s) : o.get(s)), y = (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), p = (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.22.latest", Ss = {
|
|
7
7
|
current: Ms
|
|
8
|
-
}, xs = "1.
|
|
8
|
+
}, xs = "1.39.0", bs = {
|
|
9
9
|
version: xs
|
|
10
10
|
};
|
|
11
|
-
var
|
|
11
|
+
var W;
|
|
12
12
|
(function(s) {
|
|
13
13
|
s.Call = "call", s.Reply = "reply", s.Syn = "syn", s.SynAck = "synAck", s.Ack = "ack";
|
|
14
|
-
})(
|
|
14
|
+
})(W || (W = {}));
|
|
15
15
|
var ut;
|
|
16
16
|
(function(s) {
|
|
17
17
|
s.Fulfilled = "fulfilled", s.Rejected = "rejected";
|
|
18
18
|
})(ut || (ut = {}));
|
|
19
|
-
var
|
|
19
|
+
var Ut;
|
|
20
20
|
(function(s) {
|
|
21
21
|
s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
|
|
22
|
-
})(
|
|
22
|
+
})(Ut || (Ut = {}));
|
|
23
23
|
var ne;
|
|
24
24
|
(function(s) {
|
|
25
25
|
s.DataCloneError = "DataCloneError";
|
|
@@ -46,8 +46,8 @@ const Rs = (s, o) => {
|
|
|
46
46
|
}, Js = {
|
|
47
47
|
"http:": "80",
|
|
48
48
|
"https:": "443"
|
|
49
|
-
}, Gs = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/,
|
|
50
|
-
if (s &&
|
|
49
|
+
}, Gs = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Us = ["file:", "data:"], Bs = (s) => {
|
|
50
|
+
if (s && Us.find((h) => s.startsWith(h)))
|
|
51
51
|
return "null";
|
|
52
52
|
const o = document.location, t = Gs.exec(s);
|
|
53
53
|
let e, r, n;
|
|
@@ -63,48 +63,48 @@ 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
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
66
|
+
let l = !1;
|
|
67
|
+
const g = (u) => {
|
|
68
|
+
if (u.source !== n || u.data.penpal !== W.Call)
|
|
69
69
|
return;
|
|
70
|
-
if (
|
|
71
|
-
t(`${e} received message from origin ${
|
|
70
|
+
if (u.origin !== h) {
|
|
71
|
+
t(`${e} received message from origin ${u.origin} which did not match expected origin ${h}`);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
const v =
|
|
74
|
+
const v = u.data, { methodName: f, args: b, id: A } = v;
|
|
75
75
|
t(`${e}: Received ${f}() call`);
|
|
76
|
-
const I = (S) => (
|
|
77
|
-
if (t(`${e}: Sending ${f}() reply`),
|
|
76
|
+
const I = (S) => (x) => {
|
|
77
|
+
if (t(`${e}: Sending ${f}() reply`), l) {
|
|
78
78
|
t(`${e}: Unable to send ${f}() reply due to destroyed connection`);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
const
|
|
82
|
-
penpal:
|
|
81
|
+
const E = {
|
|
82
|
+
penpal: W.Reply,
|
|
83
83
|
id: A,
|
|
84
84
|
resolution: S,
|
|
85
|
-
returnValue:
|
|
85
|
+
returnValue: x
|
|
86
86
|
};
|
|
87
|
-
S === ut.Rejected &&
|
|
87
|
+
S === ut.Rejected && x instanceof Error && (E.returnValue = Re(x), E.returnValueIsError = !0);
|
|
88
88
|
try {
|
|
89
|
-
n.postMessage(
|
|
89
|
+
n.postMessage(E, c);
|
|
90
90
|
} catch (P) {
|
|
91
91
|
if (P.name === ne.DataCloneError) {
|
|
92
|
-
const
|
|
93
|
-
penpal:
|
|
92
|
+
const j = {
|
|
93
|
+
penpal: W.Reply,
|
|
94
94
|
id: A,
|
|
95
95
|
resolution: ut.Rejected,
|
|
96
96
|
returnValue: Re(P),
|
|
97
97
|
returnValueIsError: !0
|
|
98
98
|
};
|
|
99
|
-
n.postMessage(
|
|
99
|
+
n.postMessage(j, c);
|
|
100
100
|
}
|
|
101
101
|
throw P;
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
new Promise((S) => S(o[f].apply(o, b))).then(I(ut.Fulfilled), I(ut.Rejected));
|
|
105
105
|
};
|
|
106
|
-
return r.addEventListener(dt.Message,
|
|
107
|
-
|
|
106
|
+
return r.addEventListener(dt.Message, g), () => {
|
|
107
|
+
l = !0, r.removeEventListener(dt.Message, g);
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
let Hs = 0;
|
|
@@ -126,8 +126,8 @@ 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:
|
|
130
|
-
let
|
|
129
|
+
const { localName: n, local: c, remote: h, originForSending: l, originForReceiving: g } = o;
|
|
130
|
+
let u = !1;
|
|
131
131
|
r(`${n}: Connecting call sender`);
|
|
132
132
|
const v = (b) => (...A) => {
|
|
133
133
|
r(`${n}: Sending ${b}() call`);
|
|
@@ -137,58 +137,58 @@ const Ts = () => ++Hs, vs = ".", Is = (s) => s ? s.split(vs) : [], $s = (s) => s
|
|
|
137
137
|
} catch {
|
|
138
138
|
I = !0;
|
|
139
139
|
}
|
|
140
|
-
if (I && e(),
|
|
140
|
+
if (I && e(), u) {
|
|
141
141
|
const S = new Error(`Unable to send ${b}() call due to destroyed connection`);
|
|
142
|
-
throw S.code =
|
|
142
|
+
throw S.code = Ut.ConnectionDestroyed, S;
|
|
143
143
|
}
|
|
144
|
-
return new Promise((S,
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
144
|
+
return new Promise((S, x) => {
|
|
145
|
+
const E = Ts(), P = (q) => {
|
|
146
|
+
if (q.source !== h || q.data.penpal !== W.Reply || q.data.id !== E)
|
|
147
147
|
return;
|
|
148
|
-
if (
|
|
149
|
-
r(`${n} received message from origin ${
|
|
148
|
+
if (q.origin !== g) {
|
|
149
|
+
r(`${n} received message from origin ${q.origin} which did not match expected origin ${g}`);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
const bt =
|
|
152
|
+
const bt = q.data;
|
|
153
153
|
r(`${n}: Received ${b}() reply`), c.removeEventListener(dt.Message, P);
|
|
154
154
|
let vt = bt.returnValue;
|
|
155
|
-
bt.returnValueIsError && (vt = ks(vt)), (bt.resolution === ut.Fulfilled ? S :
|
|
155
|
+
bt.returnValueIsError && (vt = ks(vt)), (bt.resolution === ut.Fulfilled ? S : x)(vt);
|
|
156
156
|
};
|
|
157
157
|
c.addEventListener(dt.Message, P);
|
|
158
|
-
const
|
|
159
|
-
penpal:
|
|
160
|
-
id:
|
|
158
|
+
const j = {
|
|
159
|
+
penpal: W.Call,
|
|
160
|
+
id: E,
|
|
161
161
|
methodName: b,
|
|
162
162
|
args: A
|
|
163
163
|
};
|
|
164
|
-
h.postMessage(
|
|
164
|
+
h.postMessage(j, l);
|
|
165
165
|
});
|
|
166
166
|
}, f = t.reduce((b, A) => (b[A] = v(A), b), {});
|
|
167
167
|
return Object.assign(s, Ws(f)), () => {
|
|
168
|
-
|
|
168
|
+
u = !0;
|
|
169
169
|
};
|
|
170
170
|
}, qs = (s, o, t, e, r) => {
|
|
171
171
|
const { destroy: n, onDestroy: c } = e;
|
|
172
|
-
let h,
|
|
173
|
-
const
|
|
174
|
-
return (
|
|
175
|
-
if (
|
|
176
|
-
r(`Parent: Handshake - Received ACK message from origin ${
|
|
172
|
+
let h, l;
|
|
173
|
+
const g = {};
|
|
174
|
+
return (u) => {
|
|
175
|
+
if (u.origin !== o) {
|
|
176
|
+
r(`Parent: Handshake - Received ACK message from origin ${u.origin} which did not match expected origin ${o}`);
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
r("Parent: Handshake - Received ACK");
|
|
180
180
|
const v = {
|
|
181
181
|
localName: "Parent",
|
|
182
182
|
local: window,
|
|
183
|
-
remote:
|
|
183
|
+
remote: u.source,
|
|
184
184
|
originForSending: t,
|
|
185
185
|
originForReceiving: o
|
|
186
186
|
};
|
|
187
|
-
h && h(), h = _s(v, s, r), c(h),
|
|
188
|
-
delete
|
|
189
|
-
}),
|
|
190
|
-
const f = js(
|
|
191
|
-
return c(f),
|
|
187
|
+
h && h(), h = _s(v, s, r), c(h), l && l.forEach((b) => {
|
|
188
|
+
delete g[b];
|
|
189
|
+
}), l = u.data.methodNames;
|
|
190
|
+
const f = js(g, v, l, n, r);
|
|
191
|
+
return c(f), g;
|
|
192
192
|
};
|
|
193
193
|
}, Ys = (s, o, t, e) => (r) => {
|
|
194
194
|
if (r.origin !== t) {
|
|
@@ -197,7 +197,7 @@ const Ts = () => ++Hs, vs = ".", Is = (s) => s ? s.split(vs) : [], $s = (s) => s
|
|
|
197
197
|
}
|
|
198
198
|
s("Parent: Handshake - Received SYN, responding with SYN-ACK");
|
|
199
199
|
const n = {
|
|
200
|
-
penpal:
|
|
200
|
+
penpal: W.SynAck,
|
|
201
201
|
methodNames: Object.keys(o)
|
|
202
202
|
};
|
|
203
203
|
r.source.postMessage(n, e);
|
|
@@ -212,41 +212,41 @@ const Ts = () => ++Hs, vs = ".", Is = (s) => s ? s.split(vs) : [], $s = (s) => s
|
|
|
212
212
|
let t;
|
|
213
213
|
return s !== void 0 && (t = window.setTimeout(() => {
|
|
214
214
|
const e = new Error(`Connection timed out after ${s}ms`);
|
|
215
|
-
e.code =
|
|
215
|
+
e.code = Ut.ConnectionTimeout, o(e);
|
|
216
216
|
}, s)), () => {
|
|
217
217
|
clearTimeout(t);
|
|
218
218
|
};
|
|
219
219
|
}, tr = (s) => {
|
|
220
220
|
if (!s.src && !s.srcdoc) {
|
|
221
221
|
const o = new Error("Iframe must have src or srcdoc property defined.");
|
|
222
|
-
throw o.code =
|
|
222
|
+
throw o.code = Ut.NoIframeSrc, o;
|
|
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:
|
|
227
|
-
e || (tr(o), e =
|
|
228
|
-
const
|
|
226
|
+
const c = Vs(n), h = Rs("Parent", c), { onDestroy: l, destroy: g } = h;
|
|
227
|
+
e || (tr(o), e = Bs(o.src));
|
|
228
|
+
const u = e === "null" ? "*" : e, v = As(t), f = Ys(c, v, e, u), b = qs(v, e, u, h, c);
|
|
229
229
|
return {
|
|
230
230
|
promise: new Promise((I, S) => {
|
|
231
|
-
const
|
|
231
|
+
const x = Xs(r, g), E = (P) => {
|
|
232
232
|
if (!(P.source !== o.contentWindow || !P.data)) {
|
|
233
|
-
if (P.data.penpal ===
|
|
233
|
+
if (P.data.penpal === W.Syn) {
|
|
234
234
|
f(P);
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
|
-
if (P.data.penpal ===
|
|
238
|
-
const
|
|
239
|
-
|
|
237
|
+
if (P.data.penpal === W.Ack) {
|
|
238
|
+
const j = b(P);
|
|
239
|
+
j && (x(), I(j));
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
window.addEventListener(dt.Message,
|
|
245
|
-
window.removeEventListener(dt.Message,
|
|
244
|
+
window.addEventListener(dt.Message, E), c("Parent: Awaiting handshake"), Qs(o, h), l((P) => {
|
|
245
|
+
window.removeEventListener(dt.Message, E), P && S(P);
|
|
246
246
|
});
|
|
247
247
|
}),
|
|
248
248
|
destroy() {
|
|
249
|
-
|
|
249
|
+
g();
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
252
|
}, sr = (s) => {
|
|
@@ -329,30 +329,30 @@ 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
|
|
333
|
-
const
|
|
334
|
-
if (
|
|
335
|
-
|
|
332
|
+
const l = () => {
|
|
333
|
+
const g = document.querySelector(c);
|
|
334
|
+
if (g) {
|
|
335
|
+
g == null || g.appendChild(h), h.addEventListener(
|
|
336
336
|
"error",
|
|
337
337
|
() => {
|
|
338
|
-
const
|
|
339
|
-
n == null || n(
|
|
338
|
+
const u = new Error("Failed to setup frame: iframe failed to load");
|
|
339
|
+
n == null || n(u);
|
|
340
340
|
},
|
|
341
341
|
{ capture: !0, once: !0 }
|
|
342
342
|
);
|
|
343
343
|
try {
|
|
344
344
|
rr(h, s, r);
|
|
345
|
-
} catch (
|
|
346
|
-
|
|
345
|
+
} catch (u) {
|
|
346
|
+
u instanceof Error ? n == null || n(u) : n == null || n(new Error(`Failed to setup frame: ${u}`));
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
|
-
document.readyState === "complete" || document.readyState === "interactive" ?
|
|
351
|
-
|
|
352
|
-
}), Qt = (
|
|
353
|
-
var
|
|
354
|
-
if (
|
|
355
|
-
const v =
|
|
350
|
+
document.readyState === "complete" || document.readyState === "interactive" ? l() : document.addEventListener("DOMContentLoaded", () => {
|
|
351
|
+
l();
|
|
352
|
+
}), Qt = (g) => {
|
|
353
|
+
var u;
|
|
354
|
+
if (g.source === h.contentWindow && ((u = g.data) == null ? void 0 : u.type) === "iframe-error") {
|
|
355
|
+
const v = g.data.error, f = new Error(v.message || "Failed to setup frame: error in iframe");
|
|
356
356
|
n == null || n(f);
|
|
357
357
|
}
|
|
358
358
|
}, window.addEventListener("message", Qt), t(
|
|
@@ -407,7 +407,7 @@ const nr = (s, o, t, e = "chili-editor", r, n) => {
|
|
|
407
407
|
})
|
|
408
408
|
);
|
|
409
409
|
};
|
|
410
|
-
var
|
|
410
|
+
var et = /* @__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))(et || {}), ar = /* @__PURE__ */ ((s) => (s.full = "full", s.followConstraints = "followConstraints", s))(ar || {});
|
|
411
411
|
const ir = {
|
|
412
412
|
shortcutOptions: {
|
|
413
413
|
debugPanel: { enabled: !1 },
|
|
@@ -458,7 +458,7 @@ class hr extends Error {
|
|
|
458
458
|
super(t, e), this.statusCode = o;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
461
|
+
var M;
|
|
462
462
|
class Ve {
|
|
463
463
|
/**
|
|
464
464
|
* @ignore
|
|
@@ -467,12 +467,12 @@ class Ve {
|
|
|
467
467
|
/**
|
|
468
468
|
* @ignore
|
|
469
469
|
*/
|
|
470
|
-
|
|
471
|
-
this.getAll = async () => (await a(this,
|
|
470
|
+
y(this, M);
|
|
471
|
+
this.getAll = async () => (await a(this, M)).getActions().then((e) => i(e)), this.getById = async (t) => (await a(this, M)).getActionById(t).then((r) => i(r)), this.create = async () => (await a(this, M)).createAction().then((e) => i(e)), this.duplicate = async (t) => (await a(this, M)).duplicateAction(t).then((r) => i(r)), this.remove = async (t) => (await a(this, M)).removeAction(t).then((r) => i(r)), this.update = async (t, e) => (await a(this, M)).updateAction(t, JSON.stringify(e)).then((n) => i(n)), this.rename = async (t, e) => this.update(t, { name: e }), this.updateScript = async (t, e) => this.update(t, { script: e }), this.updateTriggers = async (t, e) => this.update(t, { triggers: e }), this.move = async (t, e) => (await a(this, M)).moveActions(t, e).then((n) => i(n)), this.setTypeError = async (t, e) => this.update(t, { hasTypeError: e }), this.disable = async () => (await a(this, M)).disableActions().then((e) => i(e)), this.enable = async () => (await a(this, M)).enableActions().then((e) => i(e)), p(this, M, o);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
|
|
475
|
-
var
|
|
474
|
+
M = new WeakMap();
|
|
475
|
+
var D;
|
|
476
476
|
class Je {
|
|
477
477
|
/**
|
|
478
478
|
* @ignore
|
|
@@ -481,14 +481,14 @@ class Je {
|
|
|
481
481
|
/**
|
|
482
482
|
* @ignore
|
|
483
483
|
*/
|
|
484
|
-
|
|
485
|
-
this.getAllOnSelectedLayout = async () => (await a(this,
|
|
484
|
+
y(this, D);
|
|
485
|
+
this.getAllOnSelectedLayout = async () => (await a(this, D)).getAnimationsOnSelectedLayout().then((e) => i(e)), this.getByFrameId = async (t, e) => (await a(this, D)).getAnimationByFrameId(t, e).then((n) => i(n)), this.getByLayoutId = async (t) => (await a(this, D)).getAnimationsByLayoutId(t).then((r) => i(r)), this.setFrameAnimation = async (t) => (await a(this, D)).setFrameAnimation(JSON.stringify(t)).then(
|
|
486
486
|
(r) => i({ ...r, data: JSON.stringify(t) })
|
|
487
|
-
), this.play = async () => (await a(this,
|
|
487
|
+
), this.play = async () => (await a(this, D)).playAnimation().then((e) => i(e)), this.pause = async () => (await a(this, D)).pauseAnimation().then((e) => i(e)), this.setScrubberPosition = async (t) => (await a(this, D)).setScrubberPosition(t).then((r) => i(r)), this.setDuration = async (t) => (await a(this, D)).setAnimationDuration(t).then((r) => i(r)), this.resetFrameAnimation = async (t) => (await a(this, D)).resetFrameAnimation(t).then((r) => i(r)), this.reset = async () => (await a(this, D)).resetAnimation().then((e) => i(e)), p(this, D, o);
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
|
|
491
|
-
var $ = /* @__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))($ || {}),
|
|
490
|
+
D = new WeakMap();
|
|
491
|
+
var $ = /* @__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))($ || {}), Vt = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Vt || {}), It = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(It || {}), lr = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(lr || {}), dr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(dr || {}), tt = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(tt || {}), ur = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(ur || {}), gr = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(gr || {}), yr = /* @__PURE__ */ ((s) => (s.locked = "locked", s.range = "range", s.none = "none", s))(yr || {}), _;
|
|
492
492
|
class Ge {
|
|
493
493
|
/**
|
|
494
494
|
* @ignore
|
|
@@ -497,8 +497,8 @@ class Ge {
|
|
|
497
497
|
/**
|
|
498
498
|
* @ignore
|
|
499
499
|
*/
|
|
500
|
-
|
|
501
|
-
this.setBarcodeProperties = async (t, e) => (await a(this,
|
|
500
|
+
y(this, _);
|
|
501
|
+
this.setBarcodeProperties = async (t, e) => (await a(this, _)).setBarcodeProperties(t, JSON.stringify(e)).then((n) => i(n)), this.setEnableBackground = async (t, e) => {
|
|
502
502
|
const r = { enableBackground: e };
|
|
503
503
|
return this.setBarcodeProperties(t, r);
|
|
504
504
|
}, this.setBackgroundColor = async (t, e) => {
|
|
@@ -510,7 +510,7 @@ class Ge {
|
|
|
510
510
|
}, this.setBarColor = async (t, e) => {
|
|
511
511
|
const r = { barColor: e };
|
|
512
512
|
return this.setBarcodeProperties(t, r);
|
|
513
|
-
}, this.setBarcodeSource = async (t, e) => (await a(this,
|
|
513
|
+
}, this.setBarcodeSource = async (t, e) => (await a(this, _)).setBarcodeSource(t, JSON.stringify(e)).then((n) => i(n)), this.removeBarcodeSource = async (t) => (await a(this, _)).setBarcodeSource(t, null).then((r) => i(r)), this.setEnableText = async (t, e) => {
|
|
514
514
|
const r = { enableText: e };
|
|
515
515
|
return this.setBarcodeProperties(t, r);
|
|
516
516
|
}, this.setBarHeight = async (t, e) => {
|
|
@@ -521,39 +521,39 @@ class Ge {
|
|
|
521
521
|
return this.setBarcodeProperties(t, r);
|
|
522
522
|
}, this.setQuietZoneValue = async (t, e, r) => {
|
|
523
523
|
const n = r ? {
|
|
524
|
-
left: r ===
|
|
525
|
-
top: r ===
|
|
526
|
-
right: r ===
|
|
527
|
-
bottom: r ===
|
|
524
|
+
left: r === tt.left ? e : void 0,
|
|
525
|
+
top: r === tt.top ? e : void 0,
|
|
526
|
+
right: r === tt.right ? e : void 0,
|
|
527
|
+
bottom: r === tt.bottom ? e : void 0
|
|
528
528
|
} : { left: e, top: e, right: e, bottom: e };
|
|
529
|
-
return (await a(this,
|
|
529
|
+
return (await a(this, _)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((h) => i(h));
|
|
530
530
|
}, this.setAreQuietZoneValuesCombined = async (t, e) => {
|
|
531
531
|
const r = { areQuietZoneValuesCombined: e };
|
|
532
|
-
return (await a(this,
|
|
533
|
-
}, this.setErrorCorrectionLevel = async (t, e) => (await a(this,
|
|
532
|
+
return (await a(this, _)).setBarcodeProperties(t, JSON.stringify({ quietZone: r })).then((c) => i(c));
|
|
533
|
+
}, this.setErrorCorrectionLevel = async (t, e) => (await a(this, _)).setBarcodeProperties(t, JSON.stringify({ errorCorrectionLevel: e })).then((n) => i(n)), this.setCharacterSet = async (t, e) => (await a(this, _)).setBarcodeProperties(t, JSON.stringify({ characterSet: e })).then((n) => i(n)), this.setDrawLightMarginIndicator = async (t, e) => {
|
|
534
534
|
const r = { drawStartStopChars: e };
|
|
535
535
|
return this.setBarcodeProperties(t, r);
|
|
536
536
|
}, this.setDrawStartStopChars = async (t, e) => {
|
|
537
537
|
const r = { drawStartStopChars: e };
|
|
538
538
|
return this.setBarcodeProperties(t, r);
|
|
539
539
|
}, this.getBarcodeConfigationOptions = (t) => {
|
|
540
|
-
let e = !0, r = !0, n = !0, c, h,
|
|
540
|
+
let e = !0, r = !0, n = !0, c, h, l = !1, g = !1, u = !1;
|
|
541
541
|
switch (t) {
|
|
542
542
|
case $.qr:
|
|
543
543
|
c = [It.iso8859_1, It.utf8], h = [
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
544
|
+
Vt.low,
|
|
545
|
+
Vt.medium,
|
|
546
|
+
Vt.quartile,
|
|
547
|
+
Vt.high
|
|
548
548
|
];
|
|
549
549
|
case $.dataMatrix:
|
|
550
|
-
e = !1, r = !1, n = !1,
|
|
550
|
+
e = !1, r = !1, n = !1, l = !0;
|
|
551
551
|
break;
|
|
552
552
|
case $.ean13:
|
|
553
|
-
e = !1,
|
|
553
|
+
e = !1, g = !0;
|
|
554
554
|
break;
|
|
555
555
|
case $.ean8:
|
|
556
|
-
|
|
556
|
+
g = !0;
|
|
557
557
|
case $.upca:
|
|
558
558
|
case $.upce:
|
|
559
559
|
e = !1;
|
|
@@ -567,7 +567,7 @@ class Ge {
|
|
|
567
567
|
];
|
|
568
568
|
break;
|
|
569
569
|
case $.code39:
|
|
570
|
-
|
|
570
|
+
u = !0;
|
|
571
571
|
break;
|
|
572
572
|
}
|
|
573
573
|
return {
|
|
@@ -577,16 +577,16 @@ class Ge {
|
|
|
577
577
|
allowedCharacterSets: c,
|
|
578
578
|
allowedErrorCorrectionLevels: h,
|
|
579
579
|
allowToggleText: e,
|
|
580
|
-
quietZoneAlwaysCombined:
|
|
581
|
-
allowToggleLightMarginIndicator:
|
|
582
|
-
allowToggleDrawStartAndEndChar:
|
|
580
|
+
quietZoneAlwaysCombined: l,
|
|
581
|
+
allowToggleLightMarginIndicator: g,
|
|
582
|
+
allowToggleDrawStartAndEndChar: u
|
|
583
583
|
};
|
|
584
|
-
},
|
|
584
|
+
}, p(this, _, o);
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
|
|
588
|
-
var T = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(T || {}),
|
|
589
|
-
const
|
|
587
|
+
_ = new WeakMap();
|
|
588
|
+
var T = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(T || {}), Y = /* @__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))(Y || {}), ae = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(ae || {});
|
|
589
|
+
const Ue = (s) => s.type === T.hex, ie = (s) => s.type === T.spotHex, pr = (s) => s.type === T.spotRgb, wr = (s) => s.type === T.spotCmyk, Cr = (s) => pr(s) || wr(s) || ie(s), mr = (s) => {
|
|
590
590
|
const o = fr(s.type);
|
|
591
591
|
return Cr(s) ? {
|
|
592
592
|
...ie(s) && { value: s.displayValue },
|
|
@@ -594,29 +594,29 @@ const Be = (s) => s.type === T.hex, ie = (s) => s.type === T.spotHex, pr = (s) =
|
|
|
594
594
|
spotName: s.value,
|
|
595
595
|
type: o
|
|
596
596
|
} : {
|
|
597
|
-
...
|
|
598
|
-
...!
|
|
597
|
+
...Ue(s) && { value: s.value },
|
|
598
|
+
...!Ue(s) && { ...s.value },
|
|
599
599
|
type: o
|
|
600
600
|
};
|
|
601
|
-
},
|
|
601
|
+
}, Be = (s, o, t, e) => {
|
|
602
602
|
const {
|
|
603
603
|
brandKitColorGuid: r,
|
|
604
604
|
brandKitFontFamilyGuid: n,
|
|
605
605
|
fontStyleId: c,
|
|
606
606
|
textStrokeColorGuid: h,
|
|
607
|
-
textStrokeColorApplied:
|
|
608
|
-
textStrokeWidth:
|
|
609
|
-
...
|
|
607
|
+
textStrokeColorApplied: l,
|
|
608
|
+
textStrokeWidth: g,
|
|
609
|
+
...u
|
|
610
610
|
} = s;
|
|
611
611
|
return {
|
|
612
|
-
...Object.keys(
|
|
612
|
+
...Object.keys(u).reduce((f, b) => ({ ...f, [b]: { value: s[b] } }), {}),
|
|
613
613
|
...o && {
|
|
614
614
|
color: {
|
|
615
615
|
value: {
|
|
616
616
|
id: o.id,
|
|
617
617
|
color: o.color,
|
|
618
618
|
type: ae.brandKit,
|
|
619
|
-
isApplied:
|
|
619
|
+
isApplied: u.fillColorApplied
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
},
|
|
@@ -626,14 +626,14 @@ const Be = (s) => s.type === T.hex, ie = (s) => s.type === T.spotHex, pr = (s) =
|
|
|
626
626
|
id: t.id,
|
|
627
627
|
color: t.color,
|
|
628
628
|
type: ae.brandKit,
|
|
629
|
-
isApplied:
|
|
629
|
+
isApplied: l || !1
|
|
630
630
|
}
|
|
631
631
|
},
|
|
632
632
|
strokeColorApplied: {
|
|
633
|
-
value:
|
|
633
|
+
value: l || !1
|
|
634
634
|
},
|
|
635
635
|
strokeWidth: {
|
|
636
|
-
value:
|
|
636
|
+
value: g != null ? g.toString() : g
|
|
637
637
|
}
|
|
638
638
|
},
|
|
639
639
|
fontKey: {
|
|
@@ -643,17 +643,17 @@ const Be = (s) => s.type === T.hex, ie = (s) => s.type === T.spotHex, pr = (s) =
|
|
|
643
643
|
}, fr = (s) => {
|
|
644
644
|
switch (s) {
|
|
645
645
|
case T.rgb:
|
|
646
|
-
return
|
|
646
|
+
return Y.rgb;
|
|
647
647
|
case T.cmyk:
|
|
648
|
-
return
|
|
648
|
+
return Y.cmyk;
|
|
649
649
|
case T.hex:
|
|
650
|
-
return
|
|
650
|
+
return Y.hex;
|
|
651
651
|
case T.spotRgb:
|
|
652
|
-
return
|
|
652
|
+
return Y.spotRGB;
|
|
653
653
|
case T.spotCmyk:
|
|
654
|
-
return
|
|
654
|
+
return Y.spotCMYK;
|
|
655
655
|
case T.spotHex:
|
|
656
|
-
return
|
|
656
|
+
return Y.spotHEX;
|
|
657
657
|
}
|
|
658
658
|
}, Xt = (s, o) => {
|
|
659
659
|
if (!(s === null || o === void 0))
|
|
@@ -663,7 +663,7 @@ const Be = (s) => s.type === T.hex, ie = (s) => s.type === T.spotHex, pr = (s) =
|
|
|
663
663
|
if (!(s === null || o === void 0 || t === void 0))
|
|
664
664
|
return (r = (e = (s || []).find((n) => n.id === o)) == null ? void 0 : e.fontStyles.find((n) => n.fontStyleId === t)) == null ? void 0 : r.id;
|
|
665
665
|
};
|
|
666
|
-
var
|
|
666
|
+
var N;
|
|
667
667
|
class _e {
|
|
668
668
|
/**
|
|
669
669
|
* @ignore
|
|
@@ -672,16 +672,16 @@ class _e {
|
|
|
672
672
|
/**
|
|
673
673
|
* @ignore
|
|
674
674
|
*/
|
|
675
|
-
|
|
676
|
-
this.getId = async () => (await a(this,
|
|
677
|
-
const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(), h = this.gradientStyleController.getAll(),
|
|
675
|
+
y(this, N);
|
|
676
|
+
this.getId = async () => (await a(this, N)).getBrandKitId().then((r) => i(r)), this.getVersion = async () => (await a(this, N)).getBrandKitVersion().then((r) => i(r)), this.getName = async () => (await a(this, N)).getBrandKitName().then((r) => i(r)), this.rename = async (e) => (await a(this, N)).renameBrandKit(e).then((n) => i(n)), this.updateIdAndVersion = async (e, r) => (await a(this, N)).updateBrandKitIdAndVersion(e, r).then((c) => i(c)), this.get = async () => {
|
|
677
|
+
const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(), h = this.gradientStyleController.getAll(), l = this.fontController.getFontFamilies(), g = this.characterStyleController.getAll(), u = this.paragraphStyleController.getAll(), v = this.getAllMedia(), [f, b, A, I, S, x] = await Promise.all([
|
|
678
678
|
c,
|
|
679
679
|
h,
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
680
|
+
l,
|
|
681
|
+
u,
|
|
682
|
+
g,
|
|
683
683
|
v
|
|
684
|
-
]),
|
|
684
|
+
]), E = {
|
|
685
685
|
id: e.parsedData,
|
|
686
686
|
brandKit: {
|
|
687
687
|
id: e.parsedData,
|
|
@@ -692,25 +692,25 @@ class _e {
|
|
|
692
692
|
fonts: A.parsedData,
|
|
693
693
|
paragraphStyles: I.parsedData,
|
|
694
694
|
characterStyles: S.parsedData,
|
|
695
|
-
media:
|
|
695
|
+
media: x.parsedData
|
|
696
696
|
}
|
|
697
697
|
}, P = {
|
|
698
698
|
success: !0,
|
|
699
|
-
data: JSON.stringify(
|
|
700
|
-
parsedData:
|
|
699
|
+
data: JSON.stringify(E),
|
|
700
|
+
parsedData: E,
|
|
701
701
|
status: 200
|
|
702
702
|
};
|
|
703
703
|
return i(P);
|
|
704
|
-
}, this.getAllMedia = async () => (await a(this,
|
|
705
|
-
const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.gradientStyleController.getAll()).parsedData || [],
|
|
704
|
+
}, this.getAllMedia = async () => (await a(this, N)).getAllBrandKitMedia().then((r) => i(r)), this.addMedia = async (e, r, n) => (await a(this, N)).addBrandKitMedia(e, r, n).then((h) => i(h)), this.updateMedia = async (e, r, n) => (await a(this, N)).updateBrandKitMedia(e, r, n).then((h) => i(h)), this.renameMedia = async (e, r) => (await a(this, N)).renameBrandKitMedia(e, r).then((c) => i(c)), this.removeMedia = async (e) => (await a(this, N)).removeBrandKitMedia(e).then((n) => i(n)), this.remove = async () => {
|
|
705
|
+
const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.gradientStyleController.getAll()).parsedData || [], l = (await this.paragraphStyleController.getAll()).parsedData || [], u = (await this.characterStyleController.getAll()).parsedData || [], f = (await this.fontController.getFontFamilies()).parsedData || [], A = (await this.getAllMedia()).parsedData || [];
|
|
706
706
|
await this.undoManagerController.record("brandKit.remove", async (I) => {
|
|
707
707
|
for (const S of r)
|
|
708
708
|
await I.colorStyle.remove(S.id);
|
|
709
709
|
for (const S of c)
|
|
710
710
|
await I.gradientStyle.remove(S.id);
|
|
711
|
-
for (const S of
|
|
711
|
+
for (const S of l)
|
|
712
712
|
await I.paragraphStyle.remove(S.id);
|
|
713
|
-
for (const S of
|
|
713
|
+
for (const S of u)
|
|
714
714
|
await I.characterStyle.remove(S.id);
|
|
715
715
|
for (const S of f)
|
|
716
716
|
await I.font.removeFontFamily(S.id);
|
|
@@ -736,15 +736,15 @@ class _e {
|
|
|
736
736
|
return await this.undoManagerController.record("brandKit.set", async (n) => {
|
|
737
737
|
const c = await this.setColors(e, n);
|
|
738
738
|
await this.setGradients(e, n);
|
|
739
|
-
const h = await this.setFonts(e, n), { parsedData:
|
|
739
|
+
const h = await this.setFonts(e, n), { parsedData: l = [] } = await n.colorStyle.getAll(), { parsedData: g = [] } = await n.gradientStyle.getAll(), { parsedData: u } = await n.font.getFontFamilies();
|
|
740
740
|
await this.setParagraphStyles(e, n, {
|
|
741
|
-
localColors:
|
|
742
|
-
localFonts:
|
|
741
|
+
localColors: l,
|
|
742
|
+
localFonts: u,
|
|
743
743
|
localColorGuidMap: c,
|
|
744
744
|
localFontGuidMap: h
|
|
745
745
|
}), await this.setCharacterStyles(e, n, {
|
|
746
|
-
localColors:
|
|
747
|
-
localFonts:
|
|
746
|
+
localColors: l,
|
|
747
|
+
localFonts: u,
|
|
748
748
|
localColorGuidMap: c,
|
|
749
749
|
localFontGuidMap: h
|
|
750
750
|
}), await this.setMedia(e);
|
|
@@ -756,16 +756,16 @@ class _e {
|
|
|
756
756
|
id: e.id,
|
|
757
757
|
version: e.brandKit.lastModifiedDate,
|
|
758
758
|
name: e.brandKit.name,
|
|
759
|
-
colors:
|
|
760
|
-
gradients:
|
|
761
|
-
fonts:
|
|
759
|
+
colors: l || [],
|
|
760
|
+
gradients: g || [],
|
|
761
|
+
fonts: u || [],
|
|
762
762
|
paragraphStyles: v || [],
|
|
763
763
|
characterStyles: f || [],
|
|
764
764
|
media: b || []
|
|
765
765
|
}
|
|
766
766
|
};
|
|
767
767
|
}), r;
|
|
768
|
-
},
|
|
768
|
+
}, p(this, N, o), this.colorStyleController = t.colorStyle, this.gradientStyleController = t.gradientStyle, this.fontController = t.font, this.mediaController = t.mediaConnector, this.paragraphStyleController = t.paragraphStyle, this.characterStyleController = t.characterStyle, this.undoManagerController = t.undoManager;
|
|
769
769
|
}
|
|
770
770
|
async setColors(o, t) {
|
|
771
771
|
const e = /* @__PURE__ */ new Map();
|
|
@@ -797,31 +797,31 @@ class _e {
|
|
|
797
797
|
}
|
|
798
798
|
async setParagraphStyles(o, t, e) {
|
|
799
799
|
const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
|
|
800
|
-
for (const
|
|
801
|
-
const
|
|
800
|
+
for (const l of o.brandKit.paragraphStyles || []) {
|
|
801
|
+
const g = c.get(l.brandKitColorGuid), u = c.get(l.textStrokeColorGuid), v = h.get(l.brandKitFontFamilyGuid), f = ke(n, v, l.fontStyleId);
|
|
802
802
|
if (!v || !f)
|
|
803
|
-
throw new Error(`Paragraph style could not be created with an empty font family: ${
|
|
804
|
-
const b = Xt(r,
|
|
805
|
-
if (!b) throw new Error(`Paragraph style could not be created with an empty color: ${
|
|
806
|
-
const { parsedData: I } = await t.paragraphStyle.create(), S =
|
|
807
|
-
|
|
803
|
+
throw new Error(`Paragraph style could not be created with an empty font family: ${l.name}`);
|
|
804
|
+
const b = Xt(r, g), A = Xt(r, u);
|
|
805
|
+
if (!b) throw new Error(`Paragraph style could not be created with an empty color: ${l.name}`);
|
|
806
|
+
const { parsedData: I } = await t.paragraphStyle.create(), S = Be(
|
|
807
|
+
l,
|
|
808
808
|
b,
|
|
809
809
|
A,
|
|
810
810
|
`${f}`
|
|
811
811
|
);
|
|
812
|
-
await t.paragraphStyle.rename(I,
|
|
812
|
+
await t.paragraphStyle.rename(I, l.name), await t.paragraphStyle.update(I, S);
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
815
|
async setCharacterStyles(o, t, e) {
|
|
816
816
|
const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
|
|
817
|
-
for (const
|
|
818
|
-
const
|
|
819
|
-
|
|
817
|
+
for (const l of o.brandKit.characterStyles || []) {
|
|
818
|
+
const g = l.brandKitColorGuid ? c.get(l.brandKitColorGuid) : void 0, u = l.textStrokeColorGuid ? c.get(l.textStrokeColorGuid) : void 0, v = l.brandKitFontFamilyGuid ? h.get(l.brandKitFontFamilyGuid) : void 0, f = Xt(r, g), b = Xt(r, u), A = ke(n, v, l.fontStyleId), { parsedData: I } = await t.characterStyle.create(), S = Be(
|
|
819
|
+
l,
|
|
820
820
|
f,
|
|
821
821
|
b,
|
|
822
822
|
A
|
|
823
823
|
);
|
|
824
|
-
await t.characterStyle.rename(I,
|
|
824
|
+
await t.characterStyle.rename(I, l.name), await t.characterStyle.update(I, S);
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
827
|
async setMedia(o) {
|
|
@@ -829,8 +829,8 @@ class _e {
|
|
|
829
829
|
await this.addMedia(t.name, t.mediaConnectorId, t.mediaId);
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
|
-
|
|
833
|
-
var
|
|
832
|
+
N = new WeakMap();
|
|
833
|
+
var rt;
|
|
834
834
|
class oe {
|
|
835
835
|
/**
|
|
836
836
|
* @ignore
|
|
@@ -839,12 +839,12 @@ class oe {
|
|
|
839
839
|
/**
|
|
840
840
|
* @ignore
|
|
841
841
|
*/
|
|
842
|
-
|
|
843
|
-
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,
|
|
842
|
+
y(this, rt);
|
|
843
|
+
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, rt)).zoomToPage(e, r, n, c).then((l) => i(l))), this.getZoomPercentage = async () => (await a(this, rt)).getZoomPercentage().then((e) => i(e)), this.setZoomPercentage = async (t) => (await a(this, rt)).setZoomPercentage(t).then((r) => i(r)), this.setViewMode = async (t) => (await a(this, rt)).setViewMode(t).then((r) => i(r)), p(this, rt, o);
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
|
-
|
|
847
|
-
var
|
|
846
|
+
rt = new WeakMap();
|
|
847
|
+
var V;
|
|
848
848
|
class He {
|
|
849
849
|
/**
|
|
850
850
|
* @ignore
|
|
@@ -853,12 +853,12 @@ class He {
|
|
|
853
853
|
/**
|
|
854
854
|
* @ignore
|
|
855
855
|
*/
|
|
856
|
-
|
|
857
|
-
this.getAll = async () => (await a(this,
|
|
856
|
+
y(this, V);
|
|
857
|
+
this.getAll = async () => (await a(this, V)).getCharacterStyles().then((e) => i(e)), this.getById = async (t) => (await a(this, V)).getCharacterStyleById(t).then((r) => i(r)), this.create = async () => (await a(this, V)).createCharacterStyle().then((e) => i(e)), this.update = async (t, e) => (await a(this, V)).updateCharacterStyle(t, JSON.stringify(e)).then((n) => i(n)), this.remove = async (t) => (await a(this, V)).removeCharacterStyle(t).then((r) => i(r)), this.duplicate = async (t) => (await a(this, V)).duplicateCharacterStyle(t).then((r) => i(r)), this.rename = async (t, e) => (await a(this, V)).renameCharacterStyle(t, e).then((n) => i(n)), this.move = async (t, e) => (await a(this, V)).moveCharacterStyles(t, e).then((n) => i(n)), p(this, V, o);
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
|
-
|
|
861
|
-
var
|
|
860
|
+
V = new WeakMap();
|
|
861
|
+
var nt;
|
|
862
862
|
class Te {
|
|
863
863
|
/**
|
|
864
864
|
* @ignore
|
|
@@ -867,24 +867,24 @@ class Te {
|
|
|
867
867
|
/**
|
|
868
868
|
* @ignore
|
|
869
869
|
*/
|
|
870
|
-
|
|
870
|
+
y(this, nt);
|
|
871
871
|
this.copyFrames = async (t) => {
|
|
872
|
-
const r = await (await a(this,
|
|
872
|
+
const r = await (await a(this, nt)).copyFrames(t);
|
|
873
873
|
return r.data && await navigator.clipboard.writeText(r.data), i(r);
|
|
874
874
|
}, this.cutFrames = async (t) => {
|
|
875
|
-
const r = await (await a(this,
|
|
875
|
+
const r = await (await a(this, nt)).cutFrames(t);
|
|
876
876
|
return r.data && await navigator.clipboard.writeText(r.data), i(r);
|
|
877
877
|
}, this.pasteFrames = async () => {
|
|
878
|
-
const t = await a(this,
|
|
878
|
+
const t = await a(this, nt), e = await navigator.clipboard.readText(), r = await t.pasteFrames(e);
|
|
879
879
|
return i(r);
|
|
880
880
|
}, this.getContentType = async () => {
|
|
881
|
-
const t = await a(this,
|
|
881
|
+
const t = await a(this, nt), e = await navigator.clipboard.readText(), r = await t.getClipboardContentType(e);
|
|
882
882
|
return i(r);
|
|
883
|
-
},
|
|
883
|
+
}, p(this, nt, o);
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
-
|
|
887
|
-
var
|
|
886
|
+
nt = new WeakMap();
|
|
887
|
+
var Ht;
|
|
888
888
|
class $e {
|
|
889
889
|
/**
|
|
890
890
|
* @ignore
|
|
@@ -893,12 +893,12 @@ class $e {
|
|
|
893
893
|
/**
|
|
894
894
|
* @ignore
|
|
895
895
|
*/
|
|
896
|
-
|
|
897
|
-
this.convertToRgb = async (t) => (await a(this,
|
|
896
|
+
y(this, Ht);
|
|
897
|
+
this.convertToRgb = async (t) => (await a(this, Ht)).colorToRgb(JSON.stringify(t)).then((r) => i(r)), p(this, Ht, o);
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
|
-
|
|
901
|
-
var
|
|
900
|
+
Ht = new WeakMap();
|
|
901
|
+
var J;
|
|
902
902
|
class Ke {
|
|
903
903
|
/**
|
|
904
904
|
* @ignore
|
|
@@ -907,15 +907,15 @@ class Ke {
|
|
|
907
907
|
/**
|
|
908
908
|
* @ignore
|
|
909
909
|
*/
|
|
910
|
-
|
|
911
|
-
this.getAll = async () => (await a(this,
|
|
912
|
-
const r = await a(this,
|
|
913
|
-
return n.type ===
|
|
914
|
-
}, this.remove = async (t) => (await a(this,
|
|
910
|
+
y(this, J);
|
|
911
|
+
this.getAll = async () => (await a(this, J)).getColors().then((e) => i(e)), this.getById = async (t) => (await a(this, J)).getColorById(t).then((r) => i(r)), this.create = async () => (await a(this, J)).createColor().then((e) => i(e)), this.duplicate = async (t) => (await a(this, J)).duplicateColor(t).then((r) => i(r)), this.move = async (t, e) => (await a(this, J)).moveColors(t, e).then((n) => i(n)), this.rename = async (t, e) => (await a(this, J)).renameColor(t, e).then((n) => i(n)), this.update = async (t, e) => {
|
|
912
|
+
const r = await a(this, J), n = e;
|
|
913
|
+
return n.type === Y.spot && (n.type = Y.spotCMYK), r.updateColor(t, JSON.stringify(n)).then((c) => i(c));
|
|
914
|
+
}, this.remove = async (t) => (await a(this, J)).removeColor(t).then((r) => i(r)), p(this, J, o);
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
|
-
|
|
918
|
-
var Bt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Bt || {}), ce = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(ce || {}),
|
|
917
|
+
J = new WeakMap();
|
|
918
|
+
var Bt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Bt || {}), ce = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(ce || {}), kt = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(kt || {}), Sr = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s.components = "components", s))(Sr || {}), br = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(br || {}), vr = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(vr || {}), Ir = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(Ir || {}), Ar = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(Ar || {}), Jt = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Jt || {});
|
|
919
919
|
class Tn {
|
|
920
920
|
constructor(o, t, e, r = "engineToConnector") {
|
|
921
921
|
this.direction = "engineToConnector", this.name = o, this.direction = r, t === "var" ? this.value = `${t}.${e}` : this.value = e;
|
|
@@ -946,14 +946,14 @@ class Dr extends Error {
|
|
|
946
946
|
class ye {
|
|
947
947
|
constructor() {
|
|
948
948
|
this.makeConnectorSourceForwardsCompatible = (o) => {
|
|
949
|
-
if (o.source !=
|
|
949
|
+
if (o.source != Jt.grafx || this.isSourceMigrated(o))
|
|
950
950
|
return o;
|
|
951
951
|
let t = o.url;
|
|
952
952
|
for (; t.endsWith("/"); )
|
|
953
953
|
t = t.substring(0, t.length - 1);
|
|
954
954
|
const e = t.split("/");
|
|
955
|
-
return { id: e[e.length - 1], source:
|
|
956
|
-
}, this.makeMultipleConnectorsBackwardsCompatible = (o, t) => o.map((e) => this.makeSingleConnectorBackwardsCompatible(e, t)), this.makeSingleConnectorBackwardsCompatible = (o, t) => o.source.source !=
|
|
955
|
+
return { id: e[e.length - 1], source: Jt.grafx };
|
|
956
|
+
}, this.makeMultipleConnectorsBackwardsCompatible = (o, t) => o.map((e) => this.makeSingleConnectorBackwardsCompatible(e, t)), this.makeSingleConnectorBackwardsCompatible = (o, t) => o.source.source != Jt.grafx ? o : {
|
|
957
957
|
id: o.id,
|
|
958
958
|
name: o.name,
|
|
959
959
|
iconUrl: o.iconUrl,
|
|
@@ -964,12 +964,12 @@ class ye {
|
|
|
964
964
|
e = e.substring(0, e.length - 1);
|
|
965
965
|
return {
|
|
966
966
|
url: `${e}/connectors/${o.id}`,
|
|
967
|
-
source:
|
|
967
|
+
source: Jt.grafx
|
|
968
968
|
};
|
|
969
969
|
}, this.isSourceMigrated = (o) => "id" in o;
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
var
|
|
972
|
+
var G, At, gt, Cs;
|
|
973
973
|
let ze = (Cs = class {
|
|
974
974
|
/**
|
|
975
975
|
* @ignore
|
|
@@ -978,48 +978,48 @@ let ze = (Cs = class {
|
|
|
978
978
|
/**
|
|
979
979
|
* @ignore
|
|
980
980
|
*/
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
this.getById = async (e) => (await a(this,
|
|
981
|
+
y(this, G);
|
|
982
|
+
y(this, At);
|
|
983
|
+
y(this, gt);
|
|
984
|
+
this.getById = async (e) => (await a(this, G)).getConnectorById(e).then((n) => i(n)).then((n) => {
|
|
985
985
|
const c = { ...n, parsedData: null };
|
|
986
986
|
return n.parsedData && (c.parsedData = a(this, gt).makeSingleConnectorBackwardsCompatible(
|
|
987
987
|
n.parsedData,
|
|
988
|
-
a(this, At).get(
|
|
988
|
+
a(this, At).get(et.GraFxStudioEnvironmentApiUrl)
|
|
989
989
|
)), c;
|
|
990
|
-
}), this.getAllByType = async (e) => (await a(this,
|
|
990
|
+
}), this.getAllByType = async (e) => (await a(this, G)).getConnectors(e).then((n) => i(n)).then((n) => {
|
|
991
991
|
const c = { ...n, parsedData: null };
|
|
992
992
|
return n.parsedData && (c.parsedData = a(this, gt).makeMultipleConnectorsBackwardsCompatible(
|
|
993
993
|
n.parsedData,
|
|
994
|
-
a(this, At).get(
|
|
994
|
+
a(this, At).get(et.GraFxStudioEnvironmentApiUrl)
|
|
995
995
|
)), c;
|
|
996
996
|
}), this.register = async (e) => {
|
|
997
|
-
const r = await a(this,
|
|
997
|
+
const r = await a(this, G), n = a(this, gt).makeConnectorSourceForwardsCompatible(e);
|
|
998
998
|
return r.registerConnector(JSON.stringify(n)).then((c) => i(c));
|
|
999
|
-
}, this.unregister = async (e) => (await a(this,
|
|
1000
|
-
const n = await a(this,
|
|
999
|
+
}, this.unregister = async (e) => (await a(this, G)).unregisterConnector(e).then((n) => i(n)), this.configure = async (e, r) => {
|
|
1000
|
+
const n = await a(this, G);
|
|
1001
1001
|
return await this.waitToBeReady(e), await r(new Nr(e, n)), n.updateConnectorConfiguration(e).then((c) => i(c));
|
|
1002
|
-
}, this.getState = async (e) => (await a(this,
|
|
1002
|
+
}, this.getState = async (e) => (await a(this, G)).getConnectorState(e).then((n) => i(n)), this.getOptions = async (e) => (await a(this, G)).getConnectorOptions(e).then((n) => i(n)), this.waitToBeReady = async (e, r = 2e3) => {
|
|
1003
1003
|
let n = Math.max(r, 500);
|
|
1004
1004
|
n = Math.min(n, 5e3);
|
|
1005
1005
|
const c = 100;
|
|
1006
1006
|
let h = 0;
|
|
1007
1007
|
try {
|
|
1008
1008
|
for (; h * c < n; ) {
|
|
1009
|
-
const
|
|
1010
|
-
if (
|
|
1009
|
+
const l = await this.getState(e);
|
|
1010
|
+
if (l.success && l.parsedData && (l.parsedData.type === he.running || l.parsedData.type === he.ready))
|
|
1011
1011
|
return i(
|
|
1012
1012
|
{ data: null, success: !0, error: void 0, status: 0, parsedData: void 0 },
|
|
1013
1013
|
!1
|
|
1014
1014
|
);
|
|
1015
|
-
await new Promise((
|
|
1015
|
+
await new Promise((g) => setTimeout(g, c)), h++;
|
|
1016
1016
|
}
|
|
1017
|
-
} catch (
|
|
1017
|
+
} catch (l) {
|
|
1018
1018
|
return i(
|
|
1019
1019
|
{
|
|
1020
1020
|
data: null,
|
|
1021
1021
|
success: !1,
|
|
1022
|
-
error: `Error while getting connector state ${
|
|
1022
|
+
error: `Error while getting connector state ${l}`,
|
|
1023
1023
|
status: 5e4,
|
|
1024
1024
|
parsedData: void 0
|
|
1025
1025
|
},
|
|
@@ -1038,15 +1038,15 @@ let ze = (Cs = class {
|
|
|
1038
1038
|
);
|
|
1039
1039
|
}, this.updateMappings = async (e, r) => await this.configure(e, async (n) => {
|
|
1040
1040
|
const { parsedData: c } = await this.getMappings(e), h = (c == null ? void 0 : c.filter(
|
|
1041
|
-
(
|
|
1042
|
-
(v) => v.name ===
|
|
1041
|
+
(u) => !r.some(
|
|
1042
|
+
(v) => v.name === u.name && v.direction === u.direction
|
|
1043
1043
|
)
|
|
1044
|
-
)) ?? [],
|
|
1045
|
-
await n.setMappings(
|
|
1046
|
-
}),
|
|
1044
|
+
)) ?? [], l = r.filter((u) => u.name !== "" && u.value !== ""), g = [...h, ...l];
|
|
1045
|
+
await n.setMappings(g);
|
|
1046
|
+
}), p(this, G, o), p(this, At, t), p(this, gt, new ye());
|
|
1047
1047
|
}
|
|
1048
1048
|
async getMappings(o, t) {
|
|
1049
|
-
return (await a(this,
|
|
1049
|
+
return (await a(this, G)).getConnectorMappings(o).then((r) => i(r)).then(
|
|
1050
1050
|
(r) => {
|
|
1051
1051
|
var n;
|
|
1052
1052
|
return t ? {
|
|
@@ -1056,7 +1056,7 @@ let ze = (Cs = class {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
);
|
|
1058
1058
|
}
|
|
1059
|
-
},
|
|
1059
|
+
}, G = new WeakMap(), At = new WeakMap(), gt = new WeakMap(), Cs);
|
|
1060
1060
|
var yt, pt;
|
|
1061
1061
|
class Nr {
|
|
1062
1062
|
/**
|
|
@@ -1066,8 +1066,8 @@ class Nr {
|
|
|
1066
1066
|
/**
|
|
1067
1067
|
* @ignore
|
|
1068
1068
|
*/
|
|
1069
|
-
|
|
1070
|
-
|
|
1069
|
+
y(this, yt);
|
|
1070
|
+
y(this, pt);
|
|
1071
1071
|
this.setOptions = async (e) => a(this, pt).setConnectorOptions(a(this, yt), JSON.stringify(e)).then((r) => i(r)), this.setMappings = async (e) => {
|
|
1072
1072
|
const r = await a(this, pt).setConnectorMappings(
|
|
1073
1073
|
a(this, yt),
|
|
@@ -1076,11 +1076,11 @@ class Nr {
|
|
|
1076
1076
|
})
|
|
1077
1077
|
);
|
|
1078
1078
|
return i(r);
|
|
1079
|
-
}, this.setHttpHeader = async (e, r) => a(this, pt).connectorAuthenticationSetHttpHeader(a(this, yt), e, r).then((n) => i(n)),
|
|
1079
|
+
}, this.setHttpHeader = async (e, r) => a(this, pt).connectorAuthenticationSetHttpHeader(a(this, yt), e, r).then((n) => i(n)), p(this, yt, o), p(this, pt, t);
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
yt = new WeakMap(), pt = new WeakMap();
|
|
1083
|
-
var
|
|
1083
|
+
var Z, Pt;
|
|
1084
1084
|
class We {
|
|
1085
1085
|
/**
|
|
1086
1086
|
* @ignore
|
|
@@ -1089,20 +1089,39 @@ class We {
|
|
|
1089
1089
|
/**
|
|
1090
1090
|
* @ignore
|
|
1091
1091
|
*/
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
this.
|
|
1095
|
-
const
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
)
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1092
|
+
y(this, Z);
|
|
1093
|
+
y(this, Pt);
|
|
1094
|
+
this.getPageItemById = async (e, r, n, c = {}) => {
|
|
1095
|
+
const l = await (await a(this, Z)).dataConnectorGetPageItemById(
|
|
1096
|
+
e,
|
|
1097
|
+
r,
|
|
1098
|
+
JSON.stringify(n),
|
|
1099
|
+
JSON.stringify(c)
|
|
1100
|
+
), g = i(l), u = { ...g, parsedData: null };
|
|
1101
|
+
return g.parsedData && (u.parsedData = {
|
|
1102
|
+
...g.parsedData,
|
|
1103
|
+
data: a(this, Pt).mapEngineToDataItem(g.parsedData.data)
|
|
1104
|
+
}), u;
|
|
1105
|
+
}, this.getModel = async (e, r = {}) => (await a(this, Z)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => i(c)), this.getConfigurationOptions = async (e) => (await a(this, Z)).dataConnectorGetConfigurationOptions(e).then((n) => i(n)), this.getCapabilities = async (e) => (await a(this, Z)).dataConnectorGetCapabilities(e).then((n) => i(n)), p(this, Z, o), p(this, Pt, t);
|
|
1106
|
+
}
|
|
1107
|
+
async getPage(o, t, e = {}) {
|
|
1108
|
+
const { previousPageToken: r, continuationToken: n } = t;
|
|
1109
|
+
if (r != null && n != null)
|
|
1110
|
+
throw new Error(
|
|
1111
|
+
'Invalid page config: "previousPageToken" and "continuationToken" are mutually exclusive. Provide only one to indicate navigation direction.'
|
|
1112
|
+
);
|
|
1113
|
+
const h = await (await a(this, Z)).dataConnectorGetPage(o, JSON.stringify(t), JSON.stringify(e)), l = i(
|
|
1114
|
+
h
|
|
1115
|
+
), g = { ...l, parsedData: null };
|
|
1116
|
+
return l.parsedData && (g.parsedData = {
|
|
1117
|
+
...l.parsedData,
|
|
1118
|
+
data: l.parsedData.data.map(
|
|
1119
|
+
(u) => a(this, Pt).mapEngineToDataItem(u)
|
|
1120
|
+
)
|
|
1121
|
+
}), g;
|
|
1103
1122
|
}
|
|
1104
1123
|
}
|
|
1105
|
-
|
|
1124
|
+
Z = new WeakMap(), Pt = new WeakMap();
|
|
1106
1125
|
var at, Tt;
|
|
1107
1126
|
class je {
|
|
1108
1127
|
/**
|
|
@@ -1112,12 +1131,12 @@ class je {
|
|
|
1112
1131
|
/**
|
|
1113
1132
|
* @ignore
|
|
1114
1133
|
*/
|
|
1115
|
-
|
|
1116
|
-
|
|
1134
|
+
y(this, at);
|
|
1135
|
+
y(this, Tt);
|
|
1117
1136
|
this.setDataSource = async (e) => (await a(this, at)).setDataSource(e).then((n) => i(n)), this.getDataSource = async () => (await a(this, at)).getDataSource().then((r) => i(r)), this.removeDataSource = async () => (await a(this, at)).removeDataSource().then((r) => i(r)), this.setDataRow = async (e) => {
|
|
1118
1137
|
const r = await a(this, at), n = a(this, Tt).mapDataItemToEngine(e);
|
|
1119
1138
|
return r.setDataRow(JSON.stringify(n)).then((c) => i(c));
|
|
1120
|
-
},
|
|
1139
|
+
}, p(this, at, o), p(this, Tt, t);
|
|
1121
1140
|
}
|
|
1122
1141
|
}
|
|
1123
1142
|
at = new WeakMap(), Tt = new WeakMap();
|
|
@@ -1130,8 +1149,8 @@ class qe {
|
|
|
1130
1149
|
/**
|
|
1131
1150
|
* @ignore
|
|
1132
1151
|
*/
|
|
1133
|
-
|
|
1134
|
-
this.getAllLogs = async () => (await a(this, it)).getLogs().then((e) => i(e)), this.toggleDebugPanel = async () => (await a(this, it)).toggleDebugPanel().then((e) => i(e)), this.enableDebug = async () => (await a(this, it)).enableDebug().then((e) => i(e)), this.disableDebug = async () => (await a(this, it)).disableDebug().then((e) => i(e)),
|
|
1152
|
+
y(this, it);
|
|
1153
|
+
this.getAllLogs = async () => (await a(this, it)).getLogs().then((e) => i(e)), this.toggleDebugPanel = async () => (await a(this, it)).toggleDebugPanel().then((e) => i(e)), this.enableDebug = async () => (await a(this, it)).enableDebug().then((e) => i(e)), this.disableDebug = async () => (await a(this, it)).disableDebug().then((e) => i(e)), p(this, it, o);
|
|
1135
1154
|
}
|
|
1136
1155
|
}
|
|
1137
1156
|
it = new WeakMap();
|
|
@@ -1144,18 +1163,18 @@ class Ye {
|
|
|
1144
1163
|
/**
|
|
1145
1164
|
* @ignore
|
|
1146
1165
|
*/
|
|
1147
|
-
|
|
1166
|
+
y(this, wt);
|
|
1148
1167
|
this.getCurrentState = async () => (await a(this, wt)).getCurrentDocumentState().then((e) => i(e)), this.load = async (t, e = { keepConnectors: !1 }) => {
|
|
1149
1168
|
const r = await a(this, wt), n = typeof t != "string" ? JSON.stringify(t) : t;
|
|
1150
1169
|
return r.loadDocument(n, JSON.stringify(e)).then((c) => i(c));
|
|
1151
1170
|
}, this.createAndLoad = async (t) => {
|
|
1152
1171
|
const e = await a(this, wt), r = JSON.stringify(t);
|
|
1153
1172
|
return e.createAndLoadDocument(r).then((n) => i(n));
|
|
1154
|
-
},
|
|
1173
|
+
}, p(this, wt, o);
|
|
1155
1174
|
}
|
|
1156
1175
|
}
|
|
1157
1176
|
wt = new WeakMap();
|
|
1158
|
-
var Mr = /* @__PURE__ */ ((s) => (s.resize = "resize", s.scale = "scale", s.scaleAndResize = "scaleAndResize", s))(Mr || {}), xr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(xr || {}), te = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(te || {}), Rr = /* @__PURE__ */ ((s) => (s.connector = "connector", s))(Rr || {}), Vr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s.component = "component", s))(Vr || {}), Jr = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(Jr || {}), Gr = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Gr || {}),
|
|
1177
|
+
var Mr = /* @__PURE__ */ ((s) => (s.resize = "resize", s.scale = "scale", s.scaleAndResize = "scaleAndResize", s))(Mr || {}), xr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(xr || {}), te = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(te || {}), Rr = /* @__PURE__ */ ((s) => (s.connector = "connector", s))(Rr || {}), Vr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s.component = "component", s))(Vr || {}), Jr = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(Jr || {}), Gr = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Gr || {}), Ur = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(Ur || {}), Br = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Br || {}), kr = /* @__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))(kr || {}), _r = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(_r || {}), Hr = /* @__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))(Hr || {}), Tr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Tr || {}), $r = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))($r || {}), Kr = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Kr || {}), zr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(zr || {});
|
|
1159
1178
|
class jn {
|
|
1160
1179
|
constructor() {
|
|
1161
1180
|
this.type = "page";
|
|
@@ -1166,7 +1185,7 @@ class qn {
|
|
|
1166
1185
|
this.type = "frame", this.frameId = o, this.edge = t;
|
|
1167
1186
|
}
|
|
1168
1187
|
}
|
|
1169
|
-
var Os = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Os || {}),
|
|
1188
|
+
var Os = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Os || {}), U;
|
|
1170
1189
|
class Ze {
|
|
1171
1190
|
/**
|
|
1172
1191
|
* @ignore
|
|
@@ -1175,15 +1194,15 @@ class Ze {
|
|
|
1175
1194
|
/**
|
|
1176
1195
|
* @ignore
|
|
1177
1196
|
*/
|
|
1178
|
-
|
|
1197
|
+
y(this, U);
|
|
1179
1198
|
this.insertImageVariableToFrame = async (t, e) => {
|
|
1180
|
-
const r = await a(this,
|
|
1199
|
+
const r = await a(this, U), n = { id: e, type: te.variable };
|
|
1181
1200
|
return r.setImageSource(t, JSON.stringify(n)).then((c) => i(c));
|
|
1182
|
-
}, this.insertTextVariable = async (t) => (await a(this,
|
|
1201
|
+
}, this.insertTextVariable = async (t) => (await a(this, U)).insertTextVariable(t).then((r) => i(r)), this.enterTextEditMode = async (t) => (await a(this, U)).enterTextEditMode(t).then((r) => i(r)), this.exitTextEditMode = async () => (await a(this, U)).exitTextEditMode().then((e) => i(e)), this.getText = async (t, e) => (await a(this, U)).getTextByFrameId(t, e).then((n) => i(n)), this.setText = async (t, e) => (await a(this, U)).setTextByFrameId(t, e).then((n) => i(n)), this.selectText = async (t, e, r) => (await a(this, U)).selectTextById(t, e, r).then((c) => i(c)), this.addCustomUndoData = async (t, e, r) => (await a(this, U)).setCustomUndoData(t, e, r ?? !1).then((c) => i(c)), p(this, U, o);
|
|
1183
1202
|
}
|
|
1184
1203
|
}
|
|
1185
|
-
|
|
1186
|
-
var ot,
|
|
1204
|
+
U = new WeakMap();
|
|
1205
|
+
var ot, Ft;
|
|
1187
1206
|
class Qe {
|
|
1188
1207
|
/**
|
|
1189
1208
|
* @ignore
|
|
@@ -1192,15 +1211,15 @@ class Qe {
|
|
|
1192
1211
|
/**
|
|
1193
1212
|
* @ignore
|
|
1194
1213
|
*/
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
this.query = async (t, e, r = {}) => (await a(this, ot)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), this.detail = async (t, e, r = {}) => (await a(this, ot)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => i(c)), this.download = async (t, e, r = {}) => (await a(this,
|
|
1198
|
-
if (t === Bt.file) return
|
|
1199
|
-
if (t === Bt.collection) return
|
|
1200
|
-
},
|
|
1214
|
+
y(this, ot);
|
|
1215
|
+
y(this, Ft);
|
|
1216
|
+
this.query = async (t, e, r = {}) => (await a(this, ot)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), this.detail = async (t, e, r = {}) => (await a(this, ot)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => i(c)), this.download = async (t, e, r = {}) => (await a(this, Ft)).fontConnectorDownload(t, e, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (t, e, r, n = {}) => (await a(this, Ft)).fontConnectorPreview(t, e, r, JSON.stringify(n)).then((h) => h ?? h), this.getConfigurationOptions = async (t) => (await a(this, ot)).fontConnectorGetConfigurationOptions(t).then((r) => i(r)), this.getCapabilities = async (t) => (await a(this, ot)).fontConnectorGetCapabilities(t).then((r) => i(r)), this.parseDeprecatedFontType = (t) => {
|
|
1217
|
+
if (t === Bt.file) return kt.file;
|
|
1218
|
+
if (t === Bt.collection) return kt.collection;
|
|
1219
|
+
}, p(this, ot, o), p(this, Ft, o);
|
|
1201
1220
|
}
|
|
1202
1221
|
}
|
|
1203
|
-
ot = new WeakMap(),
|
|
1222
|
+
ot = new WeakMap(), Ft = new WeakMap();
|
|
1204
1223
|
var F;
|
|
1205
1224
|
class Xe {
|
|
1206
1225
|
/**
|
|
@@ -1210,12 +1229,12 @@ class Xe {
|
|
|
1210
1229
|
/**
|
|
1211
1230
|
* @ignore
|
|
1212
1231
|
*/
|
|
1213
|
-
|
|
1214
|
-
this.addFontFamily = async (t, e) => (await a(this, F)).addFontFamily(t, JSON.stringify(e)).then((n) => i(n)), this.removeFontFamily = async (t) => (await a(this, F)).removeFontFamily(t).then((r) => i(r)), this.addFontStyle = async (t, e) => (await a(this, F)).addFontStyle(t, JSON.stringify(e)).then((n) => i(n)), this.removeFontStyle = async (t) => (await a(this, F)).removeFontStyle(t).then((r) => i(r)), this.getFontFamilies = async () => (await a(this, F)).getFontFamilies().then((e) => i(e)), this.getFontStyles = async (t) => (await a(this, F)).getFontStyles(t).then((r) => i(r)), this.getFontFamilyById = async (t) => (await a(this, F)).getFontFamilyById(t).then((r) => i(r)), this.getFontStyleById = async (t) => (await a(this, F)).getFontStyleById(t).then((r) => i(r)), this.getDefaultFontStyle = async () => (await a(this, F)).getDefaultFontStyle().then((e) => i(e)), this.getDefaultFontFamily = async () => (await a(this, F)).getDefaultFontFamily().then((e) => i(e)), this.isFontFamilyUsed = async (t) => (await a(this, F)).isFontFamilyUsed(t).then((r) => i(r)), this.isFontStyleUsed = async (t) => (await a(this, F)).isFontStyleUsed(t).then((r) => i(r)), this.moveFontFamilies = async (t, e) => (await a(this, F)).moveFontFamilies(t, e).then((n) => i(n)), this.getPreviewsOfCharacterStrings = async (t, e) => (await a(this, F)).getPreviewsOfCharacterStrings(t, JSON.stringify(e)).then((n) => i(n)),
|
|
1232
|
+
y(this, F);
|
|
1233
|
+
this.addFontFamily = async (t, e) => (await a(this, F)).addFontFamily(t, JSON.stringify(e)).then((n) => i(n)), this.removeFontFamily = async (t) => (await a(this, F)).removeFontFamily(t).then((r) => i(r)), this.addFontStyle = async (t, e) => (await a(this, F)).addFontStyle(t, JSON.stringify(e)).then((n) => i(n)), this.removeFontStyle = async (t) => (await a(this, F)).removeFontStyle(t).then((r) => i(r)), this.getFontFamilies = async () => (await a(this, F)).getFontFamilies().then((e) => i(e)), this.getFontStyles = async (t) => (await a(this, F)).getFontStyles(t).then((r) => i(r)), this.getFontFamilyById = async (t) => (await a(this, F)).getFontFamilyById(t).then((r) => i(r)), this.getFontStyleById = async (t) => (await a(this, F)).getFontStyleById(t).then((r) => i(r)), this.getDefaultFontStyle = async () => (await a(this, F)).getDefaultFontStyle().then((e) => i(e)), this.getDefaultFontFamily = async () => (await a(this, F)).getDefaultFontFamily().then((e) => i(e)), this.isFontFamilyUsed = async (t) => (await a(this, F)).isFontFamilyUsed(t).then((r) => i(r)), this.isFontStyleUsed = async (t) => (await a(this, F)).isFontStyleUsed(t).then((r) => i(r)), this.moveFontFamilies = async (t, e) => (await a(this, F)).moveFontFamilies(t, e).then((n) => i(n)), this.getPreviewsOfCharacterStrings = async (t, e) => (await a(this, F)).getPreviewsOfCharacterStrings(t, JSON.stringify(e)).then((n) => i(n)), p(this, F, o);
|
|
1215
1234
|
}
|
|
1216
1235
|
}
|
|
1217
1236
|
F = new WeakMap();
|
|
1218
|
-
var
|
|
1237
|
+
var Ot;
|
|
1219
1238
|
class le {
|
|
1220
1239
|
/**
|
|
1221
1240
|
* @ignore
|
|
@@ -1224,8 +1243,8 @@ class le {
|
|
|
1224
1243
|
/**
|
|
1225
1244
|
* @ignore
|
|
1226
1245
|
*/
|
|
1227
|
-
|
|
1228
|
-
this.setShapeProperties = async (t, e) => (await a(this,
|
|
1246
|
+
y(this, Ot);
|
|
1247
|
+
this.setShapeProperties = async (t, e) => (await a(this, Ot)).setShapeProperties(t, JSON.stringify(e)).then((n) => i(n)), this.setEnableFill = async (t, e) => {
|
|
1229
1248
|
const r = { enableFill: e };
|
|
1230
1249
|
return this.setShapeProperties(t, r);
|
|
1231
1250
|
}, this.setFillColor = async (t, e) => {
|
|
@@ -1243,7 +1262,7 @@ class le {
|
|
|
1243
1262
|
}, this.setFlagAllCornersSame = async (t, e) => {
|
|
1244
1263
|
const r = { allCornersSame: e };
|
|
1245
1264
|
return this.setShapeProperties(t, r);
|
|
1246
|
-
}, this.setShapeCorners = async (t, e) => (await a(this,
|
|
1265
|
+
}, this.setShapeCorners = async (t, e) => (await a(this, Ot)).setShapeCorners(t, JSON.stringify(e)).then((n) => i(n)), this.setRadiusAll = async (t, e) => {
|
|
1247
1266
|
const r = { radiusAll: e };
|
|
1248
1267
|
return this.setShapeCorners(t, r);
|
|
1249
1268
|
}, this.setRadiusTopLeft = async (t, e) => {
|
|
@@ -1258,11 +1277,11 @@ class le {
|
|
|
1258
1277
|
}, this.setRadiusBottomRight = async (t, e) => {
|
|
1259
1278
|
const r = { bottomRight: e };
|
|
1260
1279
|
return this.setShapeCorners(t, r);
|
|
1261
|
-
},
|
|
1280
|
+
}, p(this, Ot, o);
|
|
1262
1281
|
}
|
|
1263
1282
|
}
|
|
1264
|
-
|
|
1265
|
-
var
|
|
1283
|
+
Ot = new WeakMap();
|
|
1284
|
+
var d;
|
|
1266
1285
|
class ts {
|
|
1267
1286
|
/**
|
|
1268
1287
|
* @ignore
|
|
@@ -1271,9 +1290,9 @@ class ts {
|
|
|
1271
1290
|
/**
|
|
1272
1291
|
* @ignore
|
|
1273
1292
|
*/
|
|
1274
|
-
|
|
1275
|
-
this.getAll = async () => (await a(this,
|
|
1276
|
-
const r = await a(this,
|
|
1293
|
+
y(this, d);
|
|
1294
|
+
this.getAll = async () => (await a(this, d)).getFrames().then((e) => i(e)), this.getSelected = async () => (await a(this, d)).getSelectedFrames().then((e) => i(e)), this.getAllByPageId = async (t) => (await a(this, d)).getFramesByPageId(t).then((r) => i(r)), this.getByName = async (t) => (await a(this, d)).getFrameByName(t).then((r) => i(r)), this.getById = async (t) => (await a(this, d)).getFrameById(t).then((r) => i(r)), this.getPropertiesOnSelectedLayout = async () => (await a(this, d)).getFramePropertiesOnSelectedLayout().then((e) => i(e)), this.getLayoutProperties = async (t, e) => (await a(this, d)).getFramePropertiesByFrameId(t, e).then((n) => i(n)), this.getAllLayoutProperties = async (t) => (await a(this, d)).getFramesProperties(t).then((r) => i(r)), this.resetTransformation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetSize = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.select = async (t) => (await a(this, d)).selectFrames([t]).then((r) => i(r)), this.selectMultiple = async (t) => (await a(this, d)).selectFrames(t).then((r) => i(r)), this.deselectAll = async () => (await a(this, d)).deselectFrames().then((e) => i(e)), this.reorderFrames = async (t, e) => (await a(this, d)).reorderFrames(t, e).then((n) => i(n)), this.setZIndex = async (t, e) => (await a(this, d)).setFrameZIndex(t, e).then((n) => i(n)), this.setHeight = async (t, e) => (await a(this, d)).setFrameHeight(t, e).then((n) => i(n)), this.setRotation = async (t, e) => (await a(this, d)).setFrameRotation(t, e).then((n) => i(n)), this.setWidth = async (t, e) => (await a(this, d)).setFrameWidth(t, e).then((n) => i(n)), this.setX = async (t, e) => (await a(this, d)).setFrameX(t, e).then((n) => i(n)), this.setY = async (t, e) => (await a(this, d)).setFrameY(t, e).then((n) => i(n)), this.setOpacity = async (t, e) => (await a(this, d)).setFrameOpacity(t, e).then((n) => i(n)), this.rename = async (t, e) => (await a(this, d)).renameFrame(t, e).then((n) => i(n)), this.reset = async (t) => (await a(this, d)).resetFrame(t).then((r) => i(r)), this.resetX = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetY = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetRotation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetWidth = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetHeight = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetImageFrameFitMode = async (t) => (await a(this, d)).resetImageFrameFitMode(t).then((r) => i(r)), this.setVisibility = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => i(n)), this.setIsVisible = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, d)).removeFrames([t]).then((r) => i(r)), this.removeFrames = async (t) => (await a(this, d)).removeFrames(t).then((r) => i(r)), this.create = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((l) => i(l)), this.createShapeFrame = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((l) => i(l)), this.createBarcodeFrame = async (t, e) => (await a(this, d)).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, d)).addComponentFrame(e, r, n, c, JSON.stringify(t)).then((l) => i(l)), this.duplicateFrames = async (t) => (await a(this, d)).duplicateFrames(t).then((r) => i(r)), this.updateImageSource = async (t, e) => {
|
|
1295
|
+
const r = await a(this, d), n = e !== null ? JSON.stringify(e) : null;
|
|
1277
1296
|
return r.setImageSource(t, n).then((c) => i(c));
|
|
1278
1297
|
}, this.removeImageSource = async (t) => this.updateImageSource(t, null), this.setImageFromConnector = async (t, e, r) => {
|
|
1279
1298
|
const n = {
|
|
@@ -1285,34 +1304,34 @@ class ts {
|
|
|
1285
1304
|
}, this.setImageFromUrl = async (t, e) => {
|
|
1286
1305
|
const r = { url: e, type: te.url };
|
|
1287
1306
|
return this.updateImageSource(t, r);
|
|
1288
|
-
}, this.setImageFrameFitMode = async (t, e) => (await a(this,
|
|
1307
|
+
}, this.setImageFrameFitMode = async (t, e) => (await a(this, d)).setImageFrameFitMode(t, e).then((n) => i(n)), this.setImageFrameFitModePosition = async (t, e) => (await a(this, d)).setImageFrameFitModePosition(t, e).then((n) => i(n)), this.setFrameConstrainProportions = async (t, e) => (console.error("setFrameConstrainProportions is not supported anymore"), i({
|
|
1289
1308
|
success: !1,
|
|
1290
1309
|
status: 0,
|
|
1291
1310
|
error: "setFrameConstrainProportions is not supported anymore",
|
|
1292
1311
|
parsedData: null
|
|
1293
|
-
})), this.setVerticalAlign = async (t, e) => (await a(this,
|
|
1312
|
+
})), this.setVerticalAlign = async (t, e) => (await a(this, d)).setVerticalAlignment(t, e).then((n) => i(n)), this.setNumberOfColumns = async (t, e) => (await a(this, d)).setNumberOfColumns(t, e).then((n) => i(n)), this.setColumnGap = async (t, e) => (await a(this, d)).setColumnGap(t, e).then((n) => i(n)), this.setMinCopyfitting = async (t, e) => (await a(this, d)).setMinCopyfitting(t, e).then((n) => i(n)), this.setMaxCopyfitting = async (t, e) => (await a(this, d)).setMaxCopyfitting(t, e).then((n) => i(n)), this.setEnableCopyfitting = async (t, e) => (await a(this, d)).setEnableCopyfitting(t, e).then((n) => i(n)), this.resetMinCopyfitting = async (t) => (await a(this, d)).resetMinCopyfitting(t).then((r) => i(r)), this.resetMaxCopyfitting = async (t) => (await a(this, d)).resetMaxCopyfitting(t).then((r) => i(r)), this.resetEnableCopyfitting = async (t) => (await a(this, d)).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, d)).setFrameBlendMode(t, e).then((n) => i(n)), this.enterCropMode = async (t, e = Os.frameCrop) => (await a(this, d)).enterCropMode(t, e).then((n) => i(n)), this.applyCropMode = async () => (await a(this, d)).applyCropMode().then((e) => i(e)), this.exitCropMode = async () => (await a(this, d)).cancelCropMode().then((e) => i(e)), this.enterSubjectMode = async (t) => (await a(this, d)).enterSubjectMode(t).then((r) => i(r)), this.applySubjectMode = async () => (await a(this, d)).applySubjectMode().then((e) => i(e)), this.exitSubjectMode = async () => (await a(this, d)).cancelSubjectMode().then((e) => i(e)), this.enterGradientMode = async (t) => (await a(this, d)).enterGradientMode(t).then((r) => i(r)), this.applyGradientMode = async () => (await a(this, d)).applyGradientMode().then((e) => i(e)), this.cancelGradientMode = async () => (await a(this, d)).cancelGradientMode().then((e) => i(e)), this.resetCropMode = async (t) => (console.error("resetCropMode is not supported anymore"), i({
|
|
1294
1313
|
success: !1,
|
|
1295
1314
|
status: 0,
|
|
1296
1315
|
error: "resetCropMode is not supported anymore",
|
|
1297
1316
|
parsedData: null
|
|
1298
1317
|
})), this.setEnableAutoGrow = async (t, e) => {
|
|
1299
1318
|
const r = { enabled: { value: e } };
|
|
1300
|
-
return (await a(this,
|
|
1319
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1301
1320
|
}, this.setAutoGrowMinWidth = async (t, e) => {
|
|
1302
1321
|
const r = { minWidth: { value: e } };
|
|
1303
|
-
return (await a(this,
|
|
1322
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1304
1323
|
}, this.setAutoGrowMaxWidth = async (t, e) => {
|
|
1305
1324
|
const r = { maxWidth: { value: e } };
|
|
1306
|
-
return (await a(this,
|
|
1325
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1307
1326
|
}, this.setAutoGrowMinHeight = async (t, e) => {
|
|
1308
1327
|
const r = { minHeight: { value: e } };
|
|
1309
|
-
return (await a(this,
|
|
1328
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1310
1329
|
}, this.setAutoGrowMaxHeight = async (t, e) => {
|
|
1311
1330
|
const r = { maxHeight: { value: e } };
|
|
1312
|
-
return (await a(this,
|
|
1331
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1313
1332
|
}, this.setAutoGrowDirections = async (t, e) => {
|
|
1314
1333
|
const r = { directions: { value: e } };
|
|
1315
|
-
return (await a(this,
|
|
1334
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1316
1335
|
}, this.resetAutoGrowSettingsEnabled = async (t) => (console.error("resetAutoGrowSettingsEnabled is not supported anymore"), i({
|
|
1317
1336
|
success: !1,
|
|
1318
1337
|
status: 0,
|
|
@@ -1350,19 +1369,19 @@ class ts {
|
|
|
1350
1369
|
parsedData: null
|
|
1351
1370
|
})), this.setShadowEnabled = async (t, e) => {
|
|
1352
1371
|
const r = { enabled: { value: e } };
|
|
1353
|
-
return (await a(this,
|
|
1372
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1354
1373
|
}, this.setShadowDistance = async (t, e) => {
|
|
1355
1374
|
const r = { distance: { value: e } };
|
|
1356
|
-
return (await a(this,
|
|
1375
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1357
1376
|
}, this.setShadowAngleDegrees = async (t, e) => {
|
|
1358
1377
|
const r = { angleDegrees: { value: e } };
|
|
1359
|
-
return (await a(this,
|
|
1378
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1360
1379
|
}, this.setShadowBlurRadius = async (t, e) => {
|
|
1361
1380
|
const r = { blurRadius: { value: e } };
|
|
1362
|
-
return (await a(this,
|
|
1381
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1363
1382
|
}, this.setShadowColor = async (t, e) => {
|
|
1364
1383
|
const r = { color: { value: e } };
|
|
1365
|
-
return (await a(this,
|
|
1384
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1366
1385
|
}, this.setAnchor = async (t, e, r, n, c) => {
|
|
1367
1386
|
const h = {
|
|
1368
1387
|
horizontal: e,
|
|
@@ -1370,21 +1389,21 @@ class ts {
|
|
|
1370
1389
|
target: n,
|
|
1371
1390
|
endTarget: c
|
|
1372
1391
|
};
|
|
1373
|
-
return (await a(this,
|
|
1374
|
-
}, 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,
|
|
1392
|
+
return (await a(this, d)).setAnchorProperties(t, JSON.stringify(h)).then((g) => i(g));
|
|
1393
|
+
}, 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, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetVisibility = async (t) => (await a(this, d)).setFrameIsVisible(t, null).then((r) => i(r)), this.getConfiguration = async (t) => (await a(this, d)).getFrameConfiguration(t).then((r) => i(r)), this.resetAssetCropOverride = async (t) => (await a(this, d)).resetAssetCropOverride(t).then((r) => i(r)), this.resetAllAssetCropOverrides = async (t) => (await a(this, d)).resetAllAssetCropOverrides(t).then((r) => i(r)), this.setGradientApplied = async (t, e) => {
|
|
1375
1394
|
const r = { isApplied: e };
|
|
1376
|
-
return (await a(this,
|
|
1395
|
+
return (await a(this, d)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1377
1396
|
}, this.setLocalGradient = async (t, e) => {
|
|
1378
1397
|
const r = { gradient: e };
|
|
1379
|
-
return (await a(this,
|
|
1398
|
+
return (await a(this, d)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1380
1399
|
}, this.setBrandKitGradient = async (t, e) => {
|
|
1381
1400
|
const r = { id: e };
|
|
1382
|
-
return (await a(this,
|
|
1383
|
-
},
|
|
1401
|
+
return (await a(this, d)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1402
|
+
}, p(this, d, o), this.shapeController = new le(a(this, d)), this.constraints = new Wr(a(this, d));
|
|
1384
1403
|
}
|
|
1385
1404
|
}
|
|
1386
|
-
|
|
1387
|
-
var
|
|
1405
|
+
d = new WeakMap();
|
|
1406
|
+
var O;
|
|
1388
1407
|
class Wr {
|
|
1389
1408
|
/**
|
|
1390
1409
|
* @ignore
|
|
@@ -1393,32 +1412,47 @@ class Wr {
|
|
|
1393
1412
|
/**
|
|
1394
1413
|
* @ignore
|
|
1395
1414
|
*/
|
|
1396
|
-
|
|
1397
|
-
this.get = async (t) => (await a(this,
|
|
1415
|
+
y(this, O);
|
|
1416
|
+
this.get = async (t) => (await a(this, O)).getFrameConstraints(t).then((r) => i(r)), this.setSelectable = async (t, e) => {
|
|
1398
1417
|
const r = { selectionAllowed: { value: e } };
|
|
1399
|
-
return (await a(this,
|
|
1418
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1400
1419
|
}, this.setHorizontalMovement = async (t, e) => {
|
|
1401
1420
|
const r = { horizontalMovementAllowed: { value: e } };
|
|
1402
|
-
return (await a(this,
|
|
1421
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1403
1422
|
}, this.setVerticalMovement = async (t, e) => {
|
|
1404
1423
|
const r = { verticalMovementAllowed: { value: e } };
|
|
1405
|
-
return (await a(this,
|
|
1424
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1406
1425
|
}, this.setRotation = async (t, e) => {
|
|
1407
1426
|
const r = { rotationAllowed: { value: e } };
|
|
1408
|
-
return (await a(this,
|
|
1427
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1409
1428
|
}, this.setResize = async (t, e, r) => {
|
|
1410
1429
|
const n = {
|
|
1411
1430
|
resizeAllowed: { value: e },
|
|
1412
1431
|
...r !== void 0 && { proportionLocked: { value: r } }
|
|
1413
1432
|
};
|
|
1414
|
-
return (await a(this,
|
|
1433
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(n)).then((h) => i(h));
|
|
1415
1434
|
}, this.setCrop = async (t, e) => {
|
|
1416
|
-
const r = { cropAllowed: { value: e } };
|
|
1417
|
-
return (await a(this,
|
|
1418
|
-
},
|
|
1435
|
+
const r = { image: { cropAllowed: { value: e } } };
|
|
1436
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1437
|
+
}, this.setTextEditingAllowed = async (t, e) => {
|
|
1438
|
+
const r = { text: { editingAllowed: { value: e } } };
|
|
1439
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1440
|
+
}, this.setAllowedParagraphStyles = async (t, e) => {
|
|
1441
|
+
const r = { text: { paragraphStyles: { value: e } } };
|
|
1442
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1443
|
+
}, this.setAllowedCharacterStyles = async (t, e) => {
|
|
1444
|
+
const r = { text: { characterStyles: { value: e } } };
|
|
1445
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1446
|
+
}, this.setAllowedColors = async (t, e) => {
|
|
1447
|
+
const r = { text: { colors: { value: e } } };
|
|
1448
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1449
|
+
}, this.setAllowedFontSizes = async (t, e) => {
|
|
1450
|
+
const r = { text: { fontSizes: { value: e } } };
|
|
1451
|
+
return (await a(this, O)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1452
|
+
}, p(this, O, o);
|
|
1419
1453
|
}
|
|
1420
1454
|
}
|
|
1421
|
-
|
|
1455
|
+
O = new WeakMap();
|
|
1422
1456
|
class es {
|
|
1423
1457
|
constructor() {
|
|
1424
1458
|
this.currentEngineVersion = Ss.current, this.currentSDKVersion = bs.version;
|
|
@@ -1433,8 +1467,8 @@ class ss {
|
|
|
1433
1467
|
/**
|
|
1434
1468
|
* @ignore
|
|
1435
1469
|
*/
|
|
1436
|
-
|
|
1437
|
-
|
|
1470
|
+
y(this, m);
|
|
1471
|
+
y(this, $t);
|
|
1438
1472
|
this.getAll = async () => (await a(this, m)).getLayouts().then((e) => i(e)), this.getById = async (t) => (await a(this, m)).getLayoutById(t).then((r) => i(r)), this.getByName = async (t) => (await a(this, m)).getLayoutByName(t).then((r) => i(r)), this.getSelected = async () => (await a(this, m)).getSelectedLayout().then((e) => i(e)), this.remove = async (t) => (await a(this, m)).removeLayout(t).then((r) => i(r)), this.create = async (t, e) => {
|
|
1439
1473
|
const r = await a(this, m);
|
|
1440
1474
|
return e != null && e.length ? r.addLayouts(t, JSON.stringify(e)).then((n) => i(n)) : r.addLayout(t).then((n) => i(n));
|
|
@@ -1445,20 +1479,20 @@ class ss {
|
|
|
1445
1479
|
return r.selectLayoutWithOptions(t, JSON.stringify(n)).then((c) => i(c));
|
|
1446
1480
|
}, this.duplicate = async (t) => (await a(this, m)).duplicateLayout(t).then((r) => i(r)), this.reset = async (t) => (await a(this, m)).resetLayout(t).then((r) => i(r)), this.setHeight = async (t, e) => (await a(this, m)).setLayoutHeight(t, e).then((n) => i(n)), this.setWidth = async (t, e) => (await a(this, m)).setLayoutWidth(t, e).then((n) => i(n)), this.setUnit = async (t, e) => (await a(this, m)).setLayoutUnit(t, e).then((n) => i(n)), this.resetHeight = async (t) => (await a(this, m)).resetLayoutHeight(t).then((r) => i(r)), this.resetWidth = async (t) => (await a(this, m)).resetLayoutWidth(t).then((r) => i(r)), this.resetUnit = async (t) => (await a(this, m)).resetLayoutUnit(t).then((r) => i(r)), this.getSelectedSnapshot = async () => (await a(this, $t)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await a(this, m)).setLayoutIntent(t, e).then((n) => i(n)), this.resetIntent = async (t) => (await a(this, m)).resetLayoutIntent(t).then((r) => i(r)), this.setFillColor = async (t, e) => (await a(this, m)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => i(n)), this.setFillColorEnabled = async (t, e) => (await a(this, m)).setLayoutFillColorEnabled(t, e).then((n) => i(n)), this.resetFillColor = async (t) => (await a(this, m)).resetLayoutFillColor(t).then((r) => i(r)), this.setBleedValue = async (t, e, r) => {
|
|
1447
1481
|
const n = r ? {
|
|
1448
|
-
left: r ===
|
|
1449
|
-
top: r ===
|
|
1450
|
-
right: r ===
|
|
1451
|
-
bottom: r ===
|
|
1482
|
+
left: r === tt.left ? e : void 0,
|
|
1483
|
+
top: r === tt.top ? e : void 0,
|
|
1484
|
+
right: r === tt.right ? e : void 0,
|
|
1485
|
+
bottom: r === tt.bottom ? e : void 0
|
|
1452
1486
|
} : { left: e, top: e, right: e, bottom: e };
|
|
1453
1487
|
return (await a(this, m)).updateLayoutBleed(t, JSON.stringify(n)).then((h) => i(h));
|
|
1454
1488
|
}, this.setAreBleedValuesCombined = async (t, e) => {
|
|
1455
1489
|
const r = { areBleedValuesCombined: e };
|
|
1456
1490
|
return (await a(this, m)).updateLayoutBleed(t, JSON.stringify(r)).then((c) => i(c));
|
|
1457
|
-
}, this.resetBleedValues = async (t) => (await a(this, m)).updateLayoutBleed(t, null).then((r) => i(r)), this.setPrivateData = async (t, e) => (await a(this, m)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => i(n)), this.getPrivateData = async (t) => (await a(this, m)).getLayoutPrivateData(t).then((r) => i(r)), this.setDisplayName = async (t, e) => (await a(this, m)).setLayoutDisplayName(t, e).then((n) => i(n)), this.getDisplayName = async (t) => (await a(this, m)).getLayoutDisplayName(t).then((r) => i(r)), this.resetDisplayName = async (t) => (await a(this, m)).setLayoutDisplayName(t, null).then((r) => i(r)), this.setAvailableForUser = async (t, e) => (await a(this, m)).setLayoutAvailableForUser(t, e).then((n) => i(n)), this.setSelectedByUser = async (t, e) => (await a(this, m)).setLayoutSelectedByUser(t, e).then((n) => i(n)), this.setResizableByUser = async (t, e) => (await a(this, m)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => i(n)),
|
|
1491
|
+
}, this.resetBleedValues = async (t) => (await a(this, m)).updateLayoutBleed(t, null).then((r) => i(r)), this.setPrivateData = async (t, e) => (await a(this, m)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => i(n)), this.getPrivateData = async (t) => (await a(this, m)).getLayoutPrivateData(t).then((r) => i(r)), this.setDisplayName = async (t, e) => (await a(this, m)).setLayoutDisplayName(t, e).then((n) => i(n)), this.getDisplayName = async (t) => (await a(this, m)).getLayoutDisplayName(t).then((r) => i(r)), this.resetDisplayName = async (t) => (await a(this, m)).setLayoutDisplayName(t, null).then((r) => i(r)), this.setAvailableForUser = async (t, e) => (await a(this, m)).setLayoutAvailableForUser(t, e).then((n) => i(n)), this.setSelectedByUser = async (t, e) => (await a(this, m)).setLayoutSelectedByUser(t, e).then((n) => i(n)), this.setResizableByUser = async (t, e) => (await a(this, m)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => i(n)), p(this, m, o), p(this, $t, o);
|
|
1458
1492
|
}
|
|
1459
1493
|
}
|
|
1460
1494
|
m = new WeakMap(), $t = new WeakMap();
|
|
1461
|
-
var de = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(de || {}), Es = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(Es || {}),
|
|
1495
|
+
var de = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(de || {}), Es = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(Es || {}), Q, Kt;
|
|
1462
1496
|
class rs {
|
|
1463
1497
|
/**
|
|
1464
1498
|
* @ignore
|
|
@@ -1467,9 +1501,9 @@ class rs {
|
|
|
1467
1501
|
/**
|
|
1468
1502
|
* @ignore
|
|
1469
1503
|
*/
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
this.query = async (t, e, r = {}) => (await a(this,
|
|
1504
|
+
y(this, Q);
|
|
1505
|
+
y(this, Kt);
|
|
1506
|
+
this.query = async (t, e, r = {}) => (await a(this, Q)).mediaConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), this.detail = async (t, e, r = {}) => (await a(this, Q)).mediaConnectorDetail(t, e, JSON.stringify(r)).then((c) => i(c)), this.download = async (t, e, r, n = {}) => {
|
|
1473
1507
|
const c = this.parseDeprecatedMediaDownloadType(
|
|
1474
1508
|
r
|
|
1475
1509
|
);
|
|
@@ -1479,15 +1513,15 @@ class rs {
|
|
|
1479
1513
|
c,
|
|
1480
1514
|
Es.web,
|
|
1481
1515
|
JSON.stringify(n)
|
|
1482
|
-
).then((
|
|
1483
|
-
if (
|
|
1484
|
-
return
|
|
1485
|
-
throw typeof
|
|
1516
|
+
).then((l) => {
|
|
1517
|
+
if (l instanceof Uint8Array)
|
|
1518
|
+
return l;
|
|
1519
|
+
throw typeof l == "object" && l !== null && "success" in l && !l.success && ge(l), new Error(`Unexpected response type: ${typeof l}.`);
|
|
1486
1520
|
});
|
|
1487
|
-
}, this.getConfigurationOptions = async (t) => (await a(this,
|
|
1488
|
-
if (t === Bt.file) return
|
|
1489
|
-
if (t === Bt.collection) return
|
|
1490
|
-
}, this.upload = async (t, e, r = {}) => (await a(this,
|
|
1521
|
+
}, this.getConfigurationOptions = async (t) => (await a(this, Q)).mediaConnectorGetConfigurationOptions(t).then((r) => i(r)), this.getCapabilities = async (t) => (await a(this, Q)).mediaConnectorGetCapabilities(t).then((r) => i(r)), this.parseDeprecatedMediaType = (t) => {
|
|
1522
|
+
if (t === Bt.file) return kt.file;
|
|
1523
|
+
if (t === Bt.collection) return kt.collection;
|
|
1524
|
+
}, this.upload = async (t, e, r = {}) => (await a(this, Q)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), p(this, Q, o), p(this, Kt, o);
|
|
1491
1525
|
}
|
|
1492
1526
|
/**
|
|
1493
1527
|
* This method will parse the deprecatedMediaDownloadType to the new media download type.
|
|
@@ -1506,8 +1540,8 @@ class rs {
|
|
|
1506
1540
|
}
|
|
1507
1541
|
}
|
|
1508
1542
|
}
|
|
1509
|
-
|
|
1510
|
-
var
|
|
1543
|
+
Q = new WeakMap(), Kt = new WeakMap();
|
|
1544
|
+
var L, zt, ms;
|
|
1511
1545
|
let ns = (ms = class {
|
|
1512
1546
|
/**
|
|
1513
1547
|
* @ignore
|
|
@@ -1516,14 +1550,14 @@ let ns = (ms = class {
|
|
|
1516
1550
|
/**
|
|
1517
1551
|
* @ignore
|
|
1518
1552
|
*/
|
|
1519
|
-
|
|
1553
|
+
y(this, L);
|
|
1520
1554
|
/**
|
|
1521
1555
|
* @ignore
|
|
1522
1556
|
*/
|
|
1523
|
-
|
|
1524
|
-
this.add = async () => (await a(this,
|
|
1557
|
+
y(this, zt);
|
|
1558
|
+
this.add = async () => (await a(this, L)).addPage().then((e) => i(e)), this.remove = async (t) => (await a(this, L)).removePage(t).then((r) => i(r)), this.select = async (t) => (await a(this, L)).selectPage(t).then((r) => i(r)), this.setVisibility = async (t, e) => (await a(this, L)).setPageIsVisible(t, e).then((n) => i(n)), this.duplicate = async (t) => (await a(this, L)).duplicatePage(t).then((r) => i(r)), this.getAll = async () => (await a(this, L)).getPages().then((e) => i(e)), this.getById = async (t) => (await a(this, L)).getPageById(t).then((r) => i(r)), this.getSnapshot = async (t, e) => (await a(this, zt)).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, L)).setPageWidth(e).then((n) => i(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, L)).setPageHeight(e).then((n) => i(n))), this.setSize = async (t, e) => (await a(this, L)).setPageSize(t, e).then((n) => i(n)), this.move = async (t, e) => (await a(this, L)).reorderPages(t, e).then((n) => i(n)), p(this, L, o), p(this, zt, o);
|
|
1525
1559
|
}
|
|
1526
|
-
},
|
|
1560
|
+
}, L = new WeakMap(), zt = new WeakMap(), ms);
|
|
1527
1561
|
var B;
|
|
1528
1562
|
class as {
|
|
1529
1563
|
/**
|
|
@@ -1533,12 +1567,12 @@ class as {
|
|
|
1533
1567
|
/**
|
|
1534
1568
|
* @ignore
|
|
1535
1569
|
*/
|
|
1536
|
-
|
|
1537
|
-
this.getAll = async () => (await a(this, B)).getParagraphStyles().then((e) => i(e)), this.getById = async (t) => (await a(this, B)).getParagraphStyleById(t).then((r) => i(r)), this.create = async () => (await a(this, B)).createParagraphStyle().then((e) => i(e)), this.duplicate = async (t) => (await a(this, B)).duplicateParagraphStyle(t).then((r) => i(r)), this.update = async (t, e) => (await a(this, B)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => i(n)), this.rename = async (t, e) => (await a(this, B)).renameParagraphStyle(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, B)).removeParagraphStyle(t).then((r) => i(r)), this.move = async (t, e) => (await a(this, B)).moveParagraphStyles(t, e).then((n) => i(n)),
|
|
1570
|
+
y(this, B);
|
|
1571
|
+
this.getAll = async () => (await a(this, B)).getParagraphStyles().then((e) => i(e)), this.getById = async (t) => (await a(this, B)).getParagraphStyleById(t).then((r) => i(r)), this.create = async () => (await a(this, B)).createParagraphStyle().then((e) => i(e)), this.duplicate = async (t) => (await a(this, B)).duplicateParagraphStyle(t).then((r) => i(r)), this.update = async (t, e) => (await a(this, B)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => i(n)), this.rename = async (t, e) => (await a(this, B)).renameParagraphStyle(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, B)).removeParagraphStyle(t).then((r) => i(r)), this.move = async (t, e) => (await a(this, B)).moveParagraphStyles(t, e).then((n) => i(n)), p(this, B, o);
|
|
1538
1572
|
}
|
|
1539
1573
|
}
|
|
1540
1574
|
B = new WeakMap();
|
|
1541
|
-
var
|
|
1575
|
+
var R = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(R || {}), Ls = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(Ls || {}), _t = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(_t || {});
|
|
1542
1576
|
class jr {
|
|
1543
1577
|
constructor(o, t, e, r) {
|
|
1544
1578
|
this.type = "action", this.message = o, this.id = t, this.event = e, this.eventChain = r;
|
|
@@ -1549,7 +1583,7 @@ class qr {
|
|
|
1549
1583
|
this.type = "dataRow", this.count = o, this.message = t, this.exceptions = e;
|
|
1550
1584
|
}
|
|
1551
1585
|
}
|
|
1552
|
-
var pe = /* @__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))(pe || {}), Yr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Yr || {}), Zr = /* @__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))(Zr || {}),
|
|
1586
|
+
var pe = /* @__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))(pe || {}), Yr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Yr || {}), Zr = /* @__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))(Zr || {}), Gt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(Gt || {}), Qr = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(Qr || {}), Xr = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(Xr || {});
|
|
1553
1587
|
let tn = class {
|
|
1554
1588
|
/**
|
|
1555
1589
|
* @ignore
|
|
@@ -1597,7 +1631,7 @@ let tn = class {
|
|
|
1597
1631
|
return c.type === pe.list ? {
|
|
1598
1632
|
...c,
|
|
1599
1633
|
items: c.items.map(
|
|
1600
|
-
(
|
|
1634
|
+
(l) => l.value
|
|
1601
1635
|
),
|
|
1602
1636
|
selected: (h = c.selected) == null ? void 0 : h.value
|
|
1603
1637
|
} : c;
|
|
@@ -1633,7 +1667,7 @@ let tn = class {
|
|
|
1633
1667
|
}, this.onConnectorsChanged = (e) => {
|
|
1634
1668
|
const n = new ye().makeMultipleConnectorsBackwardsCompatible(
|
|
1635
1669
|
JSON.parse(e),
|
|
1636
|
-
this.localConfig.get(
|
|
1670
|
+
this.localConfig.get(et.GraFxStudioEnvironmentApiUrl)
|
|
1637
1671
|
);
|
|
1638
1672
|
this.config.events.onConnectorsChanged.trigger(n);
|
|
1639
1673
|
}, this.onSelectedPageIdChanged = (e) => {
|
|
@@ -1691,12 +1725,12 @@ class is {
|
|
|
1691
1725
|
/**
|
|
1692
1726
|
* @ignore
|
|
1693
1727
|
*/
|
|
1694
|
-
|
|
1695
|
-
this.set = async (t) => (await a(this, Ct)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => i(r)), this.removeSelected = async () => (await a(this, Ct)).selectedTextStyleClean().then((e) => i(e)), this.getSelected = async () => (await a(this, Ct)).getSelectedTextStyle().then((e) => i(e)),
|
|
1728
|
+
y(this, Ct);
|
|
1729
|
+
this.set = async (t) => (await a(this, Ct)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => i(r)), this.removeSelected = async () => (await a(this, Ct)).selectedTextStyleClean().then((e) => i(e)), this.getSelected = async () => (await a(this, Ct)).getSelectedTextStyle().then((e) => i(e)), p(this, Ct, o);
|
|
1696
1730
|
}
|
|
1697
1731
|
}
|
|
1698
1732
|
Ct = new WeakMap();
|
|
1699
|
-
var en = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(en || {}), sn = /* @__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))(sn || {}), K = /* @__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))(K || {}), rn = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s.HTML = "html", s))(rn || {}), ue = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(ue || {}),
|
|
1733
|
+
var en = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(en || {}), sn = /* @__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))(sn || {}), K = /* @__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))(K || {}), rn = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s.HTML = "html", s))(rn || {}), ue = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(ue || {}), Et;
|
|
1700
1734
|
class os {
|
|
1701
1735
|
/**
|
|
1702
1736
|
* @ignore
|
|
@@ -1705,12 +1739,12 @@ class os {
|
|
|
1705
1739
|
/**
|
|
1706
1740
|
* @ignore
|
|
1707
1741
|
*/
|
|
1708
|
-
|
|
1709
|
-
this.setTool = async (t) => (await a(this,
|
|
1742
|
+
y(this, Et);
|
|
1743
|
+
this.setTool = async (t) => (await a(this, Et)).setTool(t).then((r) => i(r)), this.getSelected = async () => (await a(this, Et)).getSelectedTool().then((e) => i(e)), this.setPointer = async () => this.setTool(K.SELECT), this.setSelect = async () => this.setTool(K.SELECT), this.setHand = async () => this.setTool(K.HAND), this.setZoom = async () => this.setTool(K.ZOOM), this.setTextFrame = async () => this.setTool(K.TEXT_FRAME), this.setImageFrame = async () => this.setTool(K.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(K.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(K.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(K.SHAPE_POLYGON), p(this, Et, o);
|
|
1710
1744
|
}
|
|
1711
1745
|
}
|
|
1712
|
-
|
|
1713
|
-
var
|
|
1746
|
+
Et = new WeakMap();
|
|
1747
|
+
var z, H, Wt;
|
|
1714
1748
|
class cs {
|
|
1715
1749
|
/**
|
|
1716
1750
|
* @ignore
|
|
@@ -1719,16 +1753,16 @@ class cs {
|
|
|
1719
1753
|
/**
|
|
1720
1754
|
* @ignore
|
|
1721
1755
|
*/
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
this.undo = async () => (await a(this,
|
|
1756
|
+
y(this, z);
|
|
1757
|
+
y(this, H);
|
|
1758
|
+
y(this, Wt);
|
|
1759
|
+
this.undo = async () => (await a(this, z)).undo().then((r) => i(r)), this.redo = async () => (await a(this, z)).redo().then((r) => i(r)), this.addCustomData = async (e, r) => (await a(this, z)).setCustomUndoData(e, r, !1).then((c) => i(c)), this.record = async (e, r) => {
|
|
1726
1760
|
try {
|
|
1727
1761
|
await a(this, H).beginIfNoneActive(e), await r(a(this, Wt)), await a(this, H).end();
|
|
1728
1762
|
} catch (n) {
|
|
1729
1763
|
throw await a(this, H).abort(), n;
|
|
1730
1764
|
}
|
|
1731
|
-
}, this.pause = async () => (await a(this,
|
|
1765
|
+
}, this.pause = async () => (await a(this, z)).pause().then((r) => i(r)), this.resume = async () => (await a(this, z)).resume().then((r) => i(r)), this.clear = async () => (await a(this, z)).clear().then((r) => i(r)), this.advanced = {
|
|
1732
1766
|
/**
|
|
1733
1767
|
* This will start a new undo operation.
|
|
1734
1768
|
* This will throw an exception when there is already an undo operation recording.
|
|
@@ -1757,10 +1791,10 @@ class cs {
|
|
|
1757
1791
|
* @returns
|
|
1758
1792
|
*/
|
|
1759
1793
|
abort: async () => a(this, H).abort()
|
|
1760
|
-
},
|
|
1794
|
+
}, p(this, z, o), p(this, Wt, t), p(this, H, new nn(o));
|
|
1761
1795
|
}
|
|
1762
1796
|
}
|
|
1763
|
-
|
|
1797
|
+
z = new WeakMap(), H = new WeakMap(), Wt = new WeakMap();
|
|
1764
1798
|
var ct;
|
|
1765
1799
|
class nn {
|
|
1766
1800
|
/**
|
|
@@ -1770,8 +1804,8 @@ class nn {
|
|
|
1770
1804
|
/**
|
|
1771
1805
|
* @ignore
|
|
1772
1806
|
*/
|
|
1773
|
-
|
|
1774
|
-
this.begin = async (t) => (await a(this, ct)).begin(t).then((r) => i(r)), this.beginIfNoneActive = async (t) => (await a(this, ct)).beginIfNoneActive(t).then((r) => i(r)), this.end = async () => (await a(this, ct)).end().then((e) => i(e)), this.abort = async () => (await a(this, ct)).abort().then((e) => i(e)),
|
|
1807
|
+
y(this, ct);
|
|
1808
|
+
this.begin = async (t) => (await a(this, ct)).begin(t).then((r) => i(r)), this.beginIfNoneActive = async (t) => (await a(this, ct)).beginIfNoneActive(t).then((r) => i(r)), this.end = async () => (await a(this, ct)).end().then((e) => i(e)), this.abort = async () => (await a(this, ct)).abort().then((e) => i(e)), p(this, ct, o);
|
|
1775
1809
|
}
|
|
1776
1810
|
}
|
|
1777
1811
|
ct = new WeakMap();
|
|
@@ -1779,7 +1813,7 @@ const an = (s, o = 2) => {
|
|
|
1779
1813
|
const t = Math.pow(10, o);
|
|
1780
1814
|
return Math.round(s * t) / t;
|
|
1781
1815
|
};
|
|
1782
|
-
var jt,
|
|
1816
|
+
var jt, Lt;
|
|
1783
1817
|
class hs {
|
|
1784
1818
|
/**
|
|
1785
1819
|
* @ignore
|
|
@@ -1788,8 +1822,8 @@ class hs {
|
|
|
1788
1822
|
/**
|
|
1789
1823
|
* @ignore
|
|
1790
1824
|
*/
|
|
1791
|
-
|
|
1792
|
-
|
|
1825
|
+
y(this, jt);
|
|
1826
|
+
y(this, Lt);
|
|
1793
1827
|
this.round = (e, r) => i({
|
|
1794
1828
|
data: String(an(e, r)),
|
|
1795
1829
|
success: !0,
|
|
@@ -1799,17 +1833,17 @@ class hs {
|
|
|
1799
1833
|
const { type: r = ue.SANDBOX, environment: n = "ft-nostress", version: c = "1" } = e, h = r == ue.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
|
|
1800
1834
|
return `https://${n}.${h}.online/grafx/api/v${c}/environment/${n}`;
|
|
1801
1835
|
}, this.stageFiles = async (e, r, n) => {
|
|
1802
|
-
const c = a(this,
|
|
1836
|
+
const c = a(this, Lt).get(et.GraFxStudioEnvironmentApiUrl);
|
|
1803
1837
|
if (!c)
|
|
1804
1838
|
throw new Error("GraFx Studio Environment API URL is not set");
|
|
1805
|
-
const h = `${c}connectors/${r}/stage`,
|
|
1806
|
-
if (!
|
|
1839
|
+
const h = `${c}connectors/${r}/stage`, l = a(this, Lt).get(et.GraFxStudioAuthToken);
|
|
1840
|
+
if (!l)
|
|
1807
1841
|
throw new Error("GraFx Studio Auth Token is not set");
|
|
1808
|
-
const
|
|
1842
|
+
const g = new FormData();
|
|
1809
1843
|
e.forEach((f, b) => {
|
|
1810
1844
|
const A = f instanceof File ? f.name : `blob-${b}`;
|
|
1811
|
-
|
|
1812
|
-
}), n &&
|
|
1845
|
+
g.append("files", f, A);
|
|
1846
|
+
}), n && g.append(
|
|
1813
1847
|
"validationJson",
|
|
1814
1848
|
JSON.stringify({
|
|
1815
1849
|
allowedMimeTypes: n.mimeTypes,
|
|
@@ -1819,28 +1853,28 @@ class hs {
|
|
|
1819
1853
|
}
|
|
1820
1854
|
})
|
|
1821
1855
|
);
|
|
1822
|
-
const
|
|
1856
|
+
const u = await fetch(h, {
|
|
1823
1857
|
method: "POST",
|
|
1824
|
-
body:
|
|
1858
|
+
body: g,
|
|
1825
1859
|
headers: {
|
|
1826
|
-
Authorization: `Bearer ${
|
|
1860
|
+
Authorization: `Bearer ${l}`
|
|
1827
1861
|
}
|
|
1828
1862
|
});
|
|
1829
|
-
if (
|
|
1830
|
-
const f = await
|
|
1863
|
+
if (u.status === 422) {
|
|
1864
|
+
const f = await u.json();
|
|
1831
1865
|
throw new Dr(f.message, Fs.minDimension);
|
|
1832
1866
|
}
|
|
1833
|
-
if (!
|
|
1867
|
+
if (!u.ok)
|
|
1834
1868
|
throw new Error("Failed to stage files");
|
|
1835
|
-
return await
|
|
1836
|
-
}, this.unitEvaluate = async (e, r) => (await a(this, jt)).unitEvaluate(e, r).then((c) => i(c)),
|
|
1869
|
+
return await u.json();
|
|
1870
|
+
}, this.unitEvaluate = async (e, r) => (await a(this, jt)).unitEvaluate(e, r).then((c) => i(c)), p(this, jt, o), p(this, Lt, t);
|
|
1837
1871
|
}
|
|
1838
1872
|
}
|
|
1839
|
-
jt = new WeakMap(),
|
|
1873
|
+
jt = new WeakMap(), Lt = new WeakMap();
|
|
1840
1874
|
var qt;
|
|
1841
1875
|
class on {
|
|
1842
1876
|
constructor(o) {
|
|
1843
|
-
|
|
1877
|
+
y(this, qt);
|
|
1844
1878
|
this.setMinimum = async (t, e) => {
|
|
1845
1879
|
const r = { minValue: { value: e } };
|
|
1846
1880
|
return this.applyPropertiesUpdate(t, r);
|
|
@@ -1865,7 +1899,7 @@ class on {
|
|
|
1865
1899
|
}, this.setNumberOfDecimals = async (t, e) => {
|
|
1866
1900
|
const r = { numberOfDecimals: { value: e } };
|
|
1867
1901
|
return this.applyPropertiesUpdate(t, r);
|
|
1868
|
-
},
|
|
1902
|
+
}, p(this, qt, o);
|
|
1869
1903
|
}
|
|
1870
1904
|
async applyPropertiesUpdate(o, t) {
|
|
1871
1905
|
const r = await (await a(this, qt)).updateNumberVariableProperties(o, JSON.stringify(t));
|
|
@@ -1876,7 +1910,7 @@ qt = new WeakMap();
|
|
|
1876
1910
|
var Yt;
|
|
1877
1911
|
class cn {
|
|
1878
1912
|
constructor(o) {
|
|
1879
|
-
|
|
1913
|
+
y(this, Yt);
|
|
1880
1914
|
this.setDisplayFormat = async (t, e) => {
|
|
1881
1915
|
const r = { displayFormat: { value: e } };
|
|
1882
1916
|
return this.applyPropertiesUpdate(t, r);
|
|
@@ -1892,7 +1926,7 @@ class cn {
|
|
|
1892
1926
|
}, this.setExcludedDays = async (t, e) => {
|
|
1893
1927
|
const r = { excludedDays: { value: e } };
|
|
1894
1928
|
return this.applyPropertiesUpdate(t, r);
|
|
1895
|
-
},
|
|
1929
|
+
}, p(this, Yt, o);
|
|
1896
1930
|
}
|
|
1897
1931
|
async applyPropertiesUpdate(o, t) {
|
|
1898
1932
|
const r = await (await a(this, Yt)).updateDateVariableProperties(o, JSON.stringify(t));
|
|
@@ -1900,7 +1934,7 @@ class cn {
|
|
|
1900
1934
|
}
|
|
1901
1935
|
}
|
|
1902
1936
|
Yt = new WeakMap();
|
|
1903
|
-
var w,
|
|
1937
|
+
var w, Dt, Nt, fs;
|
|
1904
1938
|
let ls = (fs = class {
|
|
1905
1939
|
/**
|
|
1906
1940
|
* @ignore
|
|
@@ -1909,9 +1943,9 @@ let ls = (fs = class {
|
|
|
1909
1943
|
/**
|
|
1910
1944
|
* @ignore
|
|
1911
1945
|
*/
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1946
|
+
y(this, w);
|
|
1947
|
+
y(this, Dt);
|
|
1948
|
+
y(this, Nt);
|
|
1915
1949
|
this.getAll = async () => (await a(this, w)).getVariables().then((e) => i(e)).then((e) => {
|
|
1916
1950
|
const r = e;
|
|
1917
1951
|
return r.parsedData && (r.parsedData = this.makeVariablesBackwardsCompatible(r.parsedData)), r;
|
|
@@ -1921,14 +1955,14 @@ let ls = (fs = class {
|
|
|
1921
1955
|
}), this.getByName = async (t) => (await a(this, w)).getVariableByName(t).then((r) => i(r)).then((r) => {
|
|
1922
1956
|
const n = r;
|
|
1923
1957
|
return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
|
|
1924
|
-
}), this.create = async (t, e) => (await a(this, w)).addVariable(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, w)).removeVariables(t).then((r) => i(r)), this.rename = async (t, e) => (await a(this, w)).setVariableName(t, e).then((n) => i(n)), this.setLabel = async (t, e) => (await a(this, w)).setVariableLabel(t, e).then((n) => i(n)),
|
|
1958
|
+
}), this.create = async (t, e) => (await a(this, w)).addVariable(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, w)).removeVariables(t).then((r) => i(r)), this.rename = async (t, e) => (await a(this, w)).setVariableName(t, e).then((n) => i(n)), this.setLabel = async (t, e) => (await a(this, w)).setVariableLabel(t, e).then((n) => i(n)), p(this, Dt, async (t, e) => (await a(this, w)).setVariablePlaceholder(t, e).then((n) => i(n))), this.setPlaceholder = async (t, e) => a(this, Dt).call(this, t, e), this.resetPlaceholder = async (t) => a(this, Dt).call(this, t, null), p(this, Nt, async (t, e) => (await a(this, w)).setVariableHelpText(t, e).then((n) => i(n))), this.setHelpText = async (t, e) => a(this, Nt).call(this, t, e), this.resetHelpText = async (t) => a(this, Nt).call(this, t, null), this.setType = async (t, e) => (await a(this, w)).setVariableType(t, e).then((n) => i(n)), this.setListVariable = async (t, e) => (await a(this, w)).setListVariableItems(
|
|
1925
1959
|
t,
|
|
1926
1960
|
e.map((n) => JSON.stringify({ value: n }))
|
|
1927
1961
|
).then((n) => i(n)), this.setValue = async (t, e) => (await a(this, w)).setVariableValue(t, e).then((n) => i(n)), this.duplicate = async (t) => (await a(this, w)).duplicateVariable(t).then((r) => i(r)), this.groupVariables = async (t, e) => (await a(this, w)).groupVariables(t, e).then((n) => i(n)), this.ungroupVariables = async (t) => (await a(this, w)).ungroupVariable(t).then((r) => i(r)), this.move = async (t, e, r) => (await a(this, w)).moveVariable(e, r, t).then((c) => i(c)), this.moveVariables = async (t, e, r) => (await a(this, w)).moveVariables(e, r, t).then((c) => i(c)), this.setIsVisible = async (t, e) => {
|
|
1928
|
-
const r = e ? { type:
|
|
1962
|
+
const r = e ? { type: Gt.visible } : { type: Gt.invisible };
|
|
1929
1963
|
return this.setVariableVisibility(t, r);
|
|
1930
1964
|
}, this.setIsHidden = async (t, e) => {
|
|
1931
|
-
const r = e ? { type:
|
|
1965
|
+
const r = e ? { type: Gt.invisible } : { type: Gt.visible };
|
|
1932
1966
|
return this.setVariableVisibility(t, r);
|
|
1933
1967
|
}, this.setVariableVisibility = async (t, e) => (await a(this, w)).setVariableVisibility(t, JSON.stringify(e)).then((n) => i(n)), this.setLayoutsForVariableVisibility = async (t) => (await a(this, w)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((r) => i(r)), this.setIsRequired = async (t, e) => (await a(this, w)).setVariableIsRequired(t, e).then((n) => i(n)), this.setRemoveParagraphIfEmpty = async (t, e) => (await a(this, w)).setVariableRemoveParagraphIfEmpty(t, e).then((n) => i(n)), this.setVariableCharacterLimit = async (t, e) => (await a(this, w)).setVariableCharacterLimit(t, e).then((n) => i(n)), this.setIsReadonly = async (t, e) => (await a(this, w)).setVariableIsReadonly(t, e).then((n) => i(n)), this.getImageVariableConnectorId = async (t) => (await a(this, w)).getImageVariableConnectorId(t).then((r) => i(r)), this.setImageVariableConnector = async (t, e) => {
|
|
1934
1968
|
const r = await a(this, w), c = new ye().makeConnectorSourceForwardsCompatible(e);
|
|
@@ -1945,7 +1979,7 @@ let ls = (fs = class {
|
|
|
1945
1979
|
}, this.setSuffixCharacterStyle = async (t, e) => {
|
|
1946
1980
|
const r = { suffixCharacterStyleId: { value: e } };
|
|
1947
1981
|
return this.applyPrefixSuffixDeltaUpdate(t, r);
|
|
1948
|
-
}, this.setPrivateData = async (t, e) => (await a(this, w)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => i(n)), this.getPrivateData = async (t) => (await a(this, w)).getVariablePrivateData(t).then((r) => i(r)), this.setAllowImageQuery = async (t, e) => (await a(this, w)).setImageVariableAllowQuery(t, e).then((n) => i(n)), this.setAllowImageUpload = async (t, e) => (await a(this, w)).setImageVariableAllowUpload(t, e).then((n) => i(n)), this.setMinImageUploadSize = async (t, e, r) => (await a(this, w)).setImageVariableUploadMinSize(t, e, r).then((c) => i(c)), this.setIsDontBreak = async (t, e) => (await a(this, w)).setVariableIsDontBreak(t, e).then((n) => i(n)), this.highlightUsages = async (t) => (await a(this, w)).highlightVariableUsages(t).then((r) => i(r)),
|
|
1982
|
+
}, this.setPrivateData = async (t, e) => (await a(this, w)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => i(n)), this.getPrivateData = async (t) => (await a(this, w)).getVariablePrivateData(t).then((r) => i(r)), this.setAllowImageQuery = async (t, e) => (await a(this, w)).setImageVariableAllowQuery(t, e).then((n) => i(n)), this.setAllowImageUpload = async (t, e) => (await a(this, w)).setImageVariableAllowUpload(t, e).then((n) => i(n)), this.setMinImageUploadSize = async (t, e, r) => (await a(this, w)).setImageVariableUploadMinSize(t, e, r).then((c) => i(c)), this.setIsDontBreak = async (t, e) => (await a(this, w)).setVariableIsDontBreak(t, e).then((n) => i(n)), this.highlightUsages = async (t) => (await a(this, w)).highlightVariableUsages(t).then((r) => i(r)), p(this, w, o), this.number = new on(a(this, w)), this.date = new cn(a(this, w));
|
|
1949
1983
|
}
|
|
1950
1984
|
makeVariablesBackwardsCompatible(o) {
|
|
1951
1985
|
return o.map((t) => this.makeVariableBackwardsCompatible(t));
|
|
@@ -1961,7 +1995,7 @@ let ls = (fs = class {
|
|
|
1961
1995
|
const r = await (await a(this, w)).updateVariablePrefixSuffixProperties(o, JSON.stringify(t));
|
|
1962
1996
|
return i(r);
|
|
1963
1997
|
}
|
|
1964
|
-
}, w = new WeakMap(),
|
|
1998
|
+
}, w = new WeakMap(), Dt = new WeakMap(), Nt = new WeakMap(), fs);
|
|
1965
1999
|
class hn {
|
|
1966
2000
|
/**
|
|
1967
2001
|
* @ignore
|
|
@@ -1987,22 +2021,22 @@ class ln {
|
|
|
1987
2021
|
/**
|
|
1988
2022
|
* @ignore
|
|
1989
2023
|
*/
|
|
1990
|
-
|
|
2024
|
+
y(this, ht);
|
|
1991
2025
|
this.getAll = async () => (await a(this, ht)).getVariables().then((e) => i(e)), this.getById = async (t) => (await a(this, ht)).getVariableById(t).then((r) => i(r)), this.getByName = async (t) => (await a(this, ht)).getVariableByName(t).then((r) => i(r)), this.setListVariable = async (t, e) => (await a(this, ht)).setListVariableItems(
|
|
1992
2026
|
t,
|
|
1993
2027
|
e.map((n) => JSON.stringify(n))
|
|
1994
|
-
).then((n) => i(n)),
|
|
2028
|
+
).then((n) => i(n)), p(this, ht, o), this.image = new dn(o);
|
|
1995
2029
|
}
|
|
1996
2030
|
}
|
|
1997
2031
|
ht = new WeakMap();
|
|
1998
|
-
var
|
|
2032
|
+
var X;
|
|
1999
2033
|
class dn {
|
|
2000
2034
|
constructor(o) {
|
|
2001
|
-
|
|
2002
|
-
this.setAllowQuery = async (t, e) => (await a(this,
|
|
2035
|
+
y(this, X);
|
|
2036
|
+
this.setAllowQuery = async (t, e) => (await a(this, X)).setImageVariableAllowQuery(t, e).then((n) => i(n)), this.setAllowUpload = async (t, e) => (await a(this, X)).setImageVariableAllowUpload(t, e).then((n) => i(n)), this.setMinUploadSize = async (t, e, r) => (await a(this, X)).setImageVariableUploadMinSize(t, e, r).then((c) => i(c)), this.setConnector = async (t, e) => (await a(this, X)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => i(n)), this.setConnectorContext = async (t, e) => (await a(this, X)).setImageVariableConnectorContext(t, JSON.stringify(e)).then((n) => i(n)), p(this, X, o);
|
|
2003
2037
|
}
|
|
2004
2038
|
}
|
|
2005
|
-
|
|
2039
|
+
X = new WeakMap();
|
|
2006
2040
|
var mt;
|
|
2007
2041
|
class un {
|
|
2008
2042
|
/**
|
|
@@ -2012,12 +2046,12 @@ class un {
|
|
|
2012
2046
|
/**
|
|
2013
2047
|
* @ignore
|
|
2014
2048
|
*/
|
|
2015
|
-
|
|
2016
|
-
this.register = async (t) => (await a(this, mt)).registerConnector(JSON.stringify(t)).then((r) => i(r)), this.getById = async (t) => (await a(this, mt)).getConnectorById(t).then((r) => i(r)), this.getAllByType = async (t) => (await a(this, mt)).getConnectors(t).then((r) => i(r)),
|
|
2049
|
+
y(this, mt);
|
|
2050
|
+
this.register = async (t) => (await a(this, mt)).registerConnector(JSON.stringify(t)).then((r) => i(r)), this.getById = async (t) => (await a(this, mt)).getConnectorById(t).then((r) => i(r)), this.getAllByType = async (t) => (await a(this, mt)).getConnectors(t).then((r) => i(r)), p(this, mt, o);
|
|
2017
2051
|
}
|
|
2018
2052
|
}
|
|
2019
2053
|
mt = new WeakMap();
|
|
2020
|
-
var
|
|
2054
|
+
var Mt, ee;
|
|
2021
2055
|
class gn {
|
|
2022
2056
|
/**
|
|
2023
2057
|
* @ignore
|
|
@@ -2026,15 +2060,15 @@ class gn {
|
|
|
2026
2060
|
/**
|
|
2027
2061
|
* @ignore
|
|
2028
2062
|
*/
|
|
2029
|
-
|
|
2063
|
+
y(this, Mt);
|
|
2030
2064
|
/**
|
|
2031
2065
|
* @ignore
|
|
2032
2066
|
*/
|
|
2033
|
-
|
|
2034
|
-
this.setWidth = async (t) => (await a(this,
|
|
2067
|
+
y(this, ee);
|
|
2068
|
+
this.setWidth = async (t) => (await a(this, Mt)).setPageWidth(t).then((r) => i(r)), this.setHeight = async (t) => (await a(this, Mt)).setPageHeight(t).then((r) => i(r)), p(this, Mt, o), p(this, ee, o);
|
|
2035
2069
|
}
|
|
2036
2070
|
}
|
|
2037
|
-
|
|
2071
|
+
Mt = new WeakMap(), ee = new WeakMap();
|
|
2038
2072
|
class ds {
|
|
2039
2073
|
/**
|
|
2040
2074
|
* The next initiator is a split off on SDK level to tag next features
|
|
@@ -2061,8 +2095,8 @@ class Ds {
|
|
|
2061
2095
|
}
|
|
2062
2096
|
handleError(o, t, e) {
|
|
2063
2097
|
var r;
|
|
2064
|
-
if (t ===
|
|
2065
|
-
(r = this.logger) == null || r.call(this,
|
|
2098
|
+
if (t === _t.log)
|
|
2099
|
+
(r = this.logger) == null || r.call(this, R.error, Ls.event, `Error in callback ${e}: ${o}`);
|
|
2066
2100
|
else
|
|
2067
2101
|
throw o;
|
|
2068
2102
|
}
|
|
@@ -2080,7 +2114,7 @@ class us extends Ds {
|
|
|
2080
2114
|
trigger(...o) {
|
|
2081
2115
|
const t = this.handler();
|
|
2082
2116
|
if (t)
|
|
2083
|
-
return this.createEventHandlerFn(t,
|
|
2117
|
+
return this.createEventHandlerFn(t, _t.throw)(...o);
|
|
2084
2118
|
}
|
|
2085
2119
|
}
|
|
2086
2120
|
class C extends Ds {
|
|
@@ -2095,7 +2129,7 @@ class C extends Ds {
|
|
|
2095
2129
|
*/
|
|
2096
2130
|
trigger(...o) {
|
|
2097
2131
|
const t = this.legacyHandler();
|
|
2098
|
-
t && this.createEventHandlerFn(t,
|
|
2132
|
+
t && this.createEventHandlerFn(t, _t.log)(...o);
|
|
2099
2133
|
for (const e of this.subscriptions)
|
|
2100
2134
|
e(...o);
|
|
2101
2135
|
}
|
|
@@ -2109,7 +2143,7 @@ class C extends Ds {
|
|
|
2109
2143
|
* - "throw": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others
|
|
2110
2144
|
* @returns A function to unsubscribe the callback, preventing it from being invoked in the future.
|
|
2111
2145
|
*/
|
|
2112
|
-
registerCallback(o, t =
|
|
2146
|
+
registerCallback(o, t = _t.log) {
|
|
2113
2147
|
const e = this.createEventHandlerFn(o, t);
|
|
2114
2148
|
return this.subscriptions.add(e), () => {
|
|
2115
2149
|
this.subscriptions.delete(e);
|
|
@@ -2124,22 +2158,22 @@ class we {
|
|
|
2124
2158
|
* @returns The runtime configuration object.
|
|
2125
2159
|
*/
|
|
2126
2160
|
static createRuntimeConfig(o) {
|
|
2127
|
-
var e, r, n, c, h,
|
|
2161
|
+
var e, r, n, c, h, l, g, u, v, f, b, A, I, S, x, E, P, j, q, bt, vt, Ce, me, fe, Se, be, ve, Ie, Ae, Pe, Fe, Oe, Ee, Le, De;
|
|
2128
2162
|
const t = { ...o };
|
|
2129
2163
|
return t.logging = {
|
|
2130
|
-
logLevel: ((e = o.logging) == null ? void 0 : e.logLevel) ||
|
|
2131
|
-
logger: ((r = o.logging) == null ? void 0 : r.logger) || ((
|
|
2164
|
+
logLevel: ((e = o.logging) == null ? void 0 : e.logLevel) || R.error,
|
|
2165
|
+
logger: ((r = o.logging) == null ? void 0 : r.logger) || ((Rt, se, re) => {
|
|
2132
2166
|
var Ne;
|
|
2133
|
-
if (we.isLoggingEnabled(
|
|
2134
|
-
switch (
|
|
2135
|
-
case
|
|
2136
|
-
console.error(`[${se}] [${
|
|
2167
|
+
if (we.isLoggingEnabled(Rt, ((Ne = t.logging) == null ? void 0 : Ne.logLevel) ?? R.error))
|
|
2168
|
+
switch (Rt) {
|
|
2169
|
+
case R.error:
|
|
2170
|
+
console.error(`[${se}] [${Rt}] ${re}`);
|
|
2137
2171
|
break;
|
|
2138
|
-
case
|
|
2139
|
-
console.warn(`[${se}] [${
|
|
2172
|
+
case R.warn:
|
|
2173
|
+
console.warn(`[${se}] [${Rt}] ${re}`);
|
|
2140
2174
|
break;
|
|
2141
2175
|
default:
|
|
2142
|
-
console.log(`[${se}] [${
|
|
2176
|
+
console.log(`[${se}] [${Rt}] ${re}`);
|
|
2143
2177
|
}
|
|
2144
2178
|
})
|
|
2145
2179
|
}, t.handlers = {
|
|
@@ -2155,15 +2189,15 @@ class we {
|
|
|
2155
2189
|
),
|
|
2156
2190
|
onStateChanged: new C(
|
|
2157
2191
|
() => t.onStateChanged,
|
|
2158
|
-
(
|
|
2192
|
+
(l = t.logging) == null ? void 0 : l.logger
|
|
2159
2193
|
),
|
|
2160
2194
|
onDocumentLoaded: new C(
|
|
2161
2195
|
() => t.onDocumentLoaded,
|
|
2162
|
-
(
|
|
2196
|
+
(g = t.logging) == null ? void 0 : g.logger
|
|
2163
2197
|
),
|
|
2164
2198
|
onSelectedFramesLayoutChanged: new C(
|
|
2165
2199
|
() => t.onSelectedFramesLayoutChanged,
|
|
2166
|
-
(
|
|
2200
|
+
(u = t.logging) == null ? void 0 : u.logger
|
|
2167
2201
|
),
|
|
2168
2202
|
onFramesLayoutChanged: new C(
|
|
2169
2203
|
() => t.onFramesLayoutChanged,
|
|
@@ -2191,11 +2225,11 @@ class we {
|
|
|
2191
2225
|
),
|
|
2192
2226
|
onFrameAnimationsChanged: new C(
|
|
2193
2227
|
() => t.onFrameAnimationsChanged,
|
|
2194
|
-
(
|
|
2228
|
+
(x = t.logging) == null ? void 0 : x.logger
|
|
2195
2229
|
),
|
|
2196
2230
|
onVariableListChanged: new C(
|
|
2197
2231
|
() => t.onVariableListChanged,
|
|
2198
|
-
(
|
|
2232
|
+
(E = t.logging) == null ? void 0 : E.logger
|
|
2199
2233
|
),
|
|
2200
2234
|
onSelectedToolChanged: new C(
|
|
2201
2235
|
() => t.onSelectedToolChanged,
|
|
@@ -2203,11 +2237,11 @@ class we {
|
|
|
2203
2237
|
),
|
|
2204
2238
|
onUndoStackStateChanged: new C(
|
|
2205
2239
|
() => t.onUndoStackStateChanged,
|
|
2206
|
-
(
|
|
2240
|
+
(j = t.logging) == null ? void 0 : j.logger
|
|
2207
2241
|
),
|
|
2208
2242
|
onSelectedLayoutFramesChanged: new C(
|
|
2209
2243
|
() => t.onSelectedLayoutFramesChanged,
|
|
2210
|
-
(
|
|
2244
|
+
(q = t.logging) == null ? void 0 : q.logger
|
|
2211
2245
|
),
|
|
2212
2246
|
onSelectedTextStyleChanged: new C(
|
|
2213
2247
|
() => t.onSelectedTextStyleChanged,
|
|
@@ -2305,7 +2339,7 @@ class we {
|
|
|
2305
2339
|
}, t;
|
|
2306
2340
|
}
|
|
2307
2341
|
static isLoggingEnabled(o, t) {
|
|
2308
|
-
return t ==
|
|
2342
|
+
return t == R.info || t == R.warn && (o == R.warn || o == R.error) ? !0 : t == R.error && o == R.error;
|
|
2309
2343
|
}
|
|
2310
2344
|
}
|
|
2311
2345
|
class yn {
|
|
@@ -2367,8 +2401,8 @@ class pn {
|
|
|
2367
2401
|
/**
|
|
2368
2402
|
* @ignore
|
|
2369
2403
|
*/
|
|
2370
|
-
|
|
2371
|
-
|
|
2404
|
+
y(this, lt);
|
|
2405
|
+
p(this, lt, o);
|
|
2372
2406
|
}
|
|
2373
2407
|
/**
|
|
2374
2408
|
* This method returns the value for a given configuration key. If a value was not found in the configuration store
|
|
@@ -2402,7 +2436,7 @@ class pn {
|
|
|
2402
2436
|
}
|
|
2403
2437
|
}
|
|
2404
2438
|
lt = new WeakMap();
|
|
2405
|
-
var
|
|
2439
|
+
var xt;
|
|
2406
2440
|
class gs extends pn {
|
|
2407
2441
|
/**
|
|
2408
2442
|
* @ignore
|
|
@@ -2412,8 +2446,8 @@ class gs extends pn {
|
|
|
2412
2446
|
/**
|
|
2413
2447
|
* @ignore
|
|
2414
2448
|
*/
|
|
2415
|
-
|
|
2416
|
-
|
|
2449
|
+
y(this, xt);
|
|
2450
|
+
p(this, xt, e);
|
|
2417
2451
|
}
|
|
2418
2452
|
/**
|
|
2419
2453
|
* This method returns the value for a given configuration key. If a value was not found in the configuration store,
|
|
@@ -2421,7 +2455,7 @@ class gs extends pn {
|
|
|
2421
2455
|
* @returns value for a given configuration key
|
|
2422
2456
|
*/
|
|
2423
2457
|
async getValue(t) {
|
|
2424
|
-
const e = a(this,
|
|
2458
|
+
const e = a(this, xt).get(t);
|
|
2425
2459
|
return e != null ? i(
|
|
2426
2460
|
{
|
|
2427
2461
|
status: 200,
|
|
@@ -2440,11 +2474,11 @@ class gs extends pn {
|
|
|
2440
2474
|
*/
|
|
2441
2475
|
async setValue(t, e) {
|
|
2442
2476
|
const r = super.setValue(t, e);
|
|
2443
|
-
return a(this,
|
|
2477
|
+
return a(this, xt).set(t, e), r;
|
|
2444
2478
|
}
|
|
2445
2479
|
}
|
|
2446
|
-
|
|
2447
|
-
var
|
|
2480
|
+
xt = new WeakMap();
|
|
2481
|
+
var k;
|
|
2448
2482
|
class ys {
|
|
2449
2483
|
/**
|
|
2450
2484
|
* @ignore
|
|
@@ -2453,14 +2487,14 @@ class ys {
|
|
|
2453
2487
|
/**
|
|
2454
2488
|
* @ignore
|
|
2455
2489
|
*/
|
|
2456
|
-
|
|
2457
|
-
this.getAll = async () => (await a(this,
|
|
2458
|
-
const r = await a(this,
|
|
2490
|
+
y(this, k);
|
|
2491
|
+
this.getAll = async () => (await a(this, k)).getGradients().then((e) => i(e)), this.getById = async (t) => (await a(this, k)).getGradientById(t).then((r) => i(r)), this.create = async () => (await a(this, k)).createGradient().then((e) => i(e)), this.duplicate = async (t) => (await a(this, k)).duplicateGradient(t).then((r) => i(r)), this.move = async (t, e) => (await a(this, k)).moveGradients(t, e).then((n) => i(n)), this.rename = async (t, e) => (await a(this, k)).renameGradient(t, e).then((n) => i(n)), this.update = async (t, e) => {
|
|
2492
|
+
const r = await a(this, k), n = e;
|
|
2459
2493
|
return r.updateGradient(t, JSON.stringify(n)).then((c) => i(c));
|
|
2460
|
-
}, this.remove = async (t) => (await a(this,
|
|
2494
|
+
}, this.remove = async (t) => (await a(this, k)).removeGradient(t).then((r) => i(r)), p(this, k, o);
|
|
2461
2495
|
}
|
|
2462
2496
|
}
|
|
2463
|
-
|
|
2497
|
+
k = new WeakMap();
|
|
2464
2498
|
var ft, Zt;
|
|
2465
2499
|
class ps {
|
|
2466
2500
|
/**
|
|
@@ -2470,13 +2504,13 @@ class ps {
|
|
|
2470
2504
|
/**
|
|
2471
2505
|
* @ignore
|
|
2472
2506
|
*/
|
|
2473
|
-
|
|
2474
|
-
|
|
2507
|
+
y(this, ft);
|
|
2508
|
+
y(this, Zt);
|
|
2475
2509
|
this.query = async (t, e, r = {}) => (await a(this, ft)).componentConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), this.preview = async (t, e, r, n = {}) => (await a(this, Zt)).componentConnectorPreview(t, e, r, JSON.stringify(n)).then((h) => {
|
|
2476
2510
|
if (h instanceof Uint8Array)
|
|
2477
2511
|
return h;
|
|
2478
2512
|
throw typeof h == "object" && h !== null && "success" in h && !h.success && ge(h), new Error(`Unexpected response type: ${typeof h}.`);
|
|
2479
|
-
}), this.getConfigurationOptions = async (t) => (await a(this, ft)).componentConnectorGetConfigurationOptions(t).then((r) => i(r)), this.getCapabilities = async (t) => (await a(this, ft)).componentConnectorGetCapabilities(t).then((r) => i(r)),
|
|
2513
|
+
}), this.getConfigurationOptions = async (t) => (await a(this, ft)).componentConnectorGetConfigurationOptions(t).then((r) => i(r)), this.getCapabilities = async (t) => (await a(this, ft)).componentConnectorGetCapabilities(t).then((r) => i(r)), p(this, ft, o), p(this, Zt, o);
|
|
2480
2514
|
}
|
|
2481
2515
|
}
|
|
2482
2516
|
ft = new WeakMap(), Zt = new WeakMap();
|
|
@@ -2489,13 +2523,13 @@ class ws {
|
|
|
2489
2523
|
/**
|
|
2490
2524
|
* @ignore
|
|
2491
2525
|
*/
|
|
2492
|
-
|
|
2493
|
-
this.linkVariable = async (t, e, r) => (await a(this, St)).linkComponentVariable(t, e, r, null).then((c) => i(c)), this.getComponentVariables = async (t) => (await a(this, St)).getComponentVariables(t).then((r) => i(r)), this.setFitMode = async (t, e) => (await a(this, St)).setComponentLayoutFit(t, e).then((n) => i(n)),
|
|
2526
|
+
y(this, St);
|
|
2527
|
+
this.linkVariable = async (t, e, r) => (await a(this, St)).linkComponentVariable(t, e, r, null).then((c) => i(c)), this.getComponentVariables = async (t) => (await a(this, St)).getComponentVariables(t).then((r) => i(r)), this.setFitMode = async (t, e) => (await a(this, St)).setComponentLayoutFit(t, e).then((n) => i(n)), p(this, St, o);
|
|
2494
2528
|
}
|
|
2495
2529
|
}
|
|
2496
2530
|
St = new WeakMap();
|
|
2497
2531
|
const wn = "studio-cdn.chiligrafx.com", Cn = `https://${wn}/editor/${Ss.current}/web`;
|
|
2498
|
-
let
|
|
2532
|
+
let st;
|
|
2499
2533
|
class Xn {
|
|
2500
2534
|
/**
|
|
2501
2535
|
* The SDK should be configured clientside and it exposes all controllers to work with in other applications
|
|
@@ -2565,26 +2599,26 @@ class Xn {
|
|
|
2565
2599
|
var r, n;
|
|
2566
2600
|
(n = (r = this.config).onConnectionError) == null || n.call(r, e);
|
|
2567
2601
|
}
|
|
2568
|
-
), this.editorAPI =
|
|
2569
|
-
|
|
2602
|
+
), this.editorAPI = st == null ? void 0 : st.promise.then((e) => e), this.action = new Ve(this.editorAPI), this.layout = new ss(this.editorAPI), this.frame = new ts(this.editorAPI), this.barcode = new Ge(this.editorAPI), this.component = new ws(this.editorAPI), this.animation = new Je(this.editorAPI), this.document = new Ye(this.editorAPI), this.configuration = new gs(this.editorAPI, this.localConfig), this.utils = new hs(this.editorAPI, this.localConfig), this.tool = new os(this.editorAPI), this.page = new ns(this.editorAPI), this.debug = new qe(this.editorAPI), this.undoManager = new cs(this.editorAPI, this), this.textSelection = new is(this.editorAPI), this.colorStyle = new Ke(this.editorAPI), this.gradientStyle = new ys(this.editorAPI), this.paragraphStyle = new as(this.editorAPI), this.characterStyle = new He(this.editorAPI), this.mediaConnector = new rs(this.editorAPI), this.fontConnector = new Qe(this.editorAPI), this.componentConnector = new ps(this.editorAPI), this.dataConnector = new We(this.editorAPI, this.dataItemMappingTools), this.dataSource = new je(this.editorAPI, this.dataItemMappingTools), this.connector = new ze(this.editorAPI, this.localConfig), this.variable = new ls(this.editorAPI), this.font = new Xe(this.editorAPI), this.experiment = new Ze(this.editorAPI), this.canvas = new oe(this.editorAPI), this.shape = new le(this.editorAPI), this.colorConversion = new $e(this.editorAPI), this.info = new es(), this.clipboard = new Te(this.editorAPI), this.brandKit = new _e(this.editorAPI, this), this.next = new ds(this.config, this.connection, this.editorAPI), this.configuration.setValue(et.GraFxStudioSdkVersion, bs.version), this.configuration.setValue(
|
|
2603
|
+
et.GraFxStudioDocumentType,
|
|
2570
2604
|
this.config.documentType || Ps.template
|
|
2571
2605
|
), this.configuration.updateStudioOptions(this.config.studioOptions || ir), this.configuration.setValue(
|
|
2572
|
-
|
|
2606
|
+
et.QueryCallCacheEnabled,
|
|
2573
2607
|
((t = this.config.enableQueryCallCache) == null ? void 0 : t.toString()) || "false"
|
|
2574
2608
|
);
|
|
2575
2609
|
}, this.setConnection = (t) => {
|
|
2576
|
-
|
|
2577
|
-
}, this.config = we.createRuntimeConfig(o), this.connection =
|
|
2610
|
+
st = t;
|
|
2611
|
+
}, this.config = we.createRuntimeConfig(o), this.connection = st, this.editorAPI = st == null ? void 0 : st.promise.then((t) => t), this.action = new Ve(this.editorAPI), this.layout = new ss(this.editorAPI), this.frame = new ts(this.editorAPI), this.shape = new le(this.editorAPI), this.barcode = new Ge(this.editorAPI), this.component = new ws(this.editorAPI), this.undoManager = new cs(this.editorAPI, this), this.connector = new ze(this.editorAPI, this.localConfig), this.mediaConnector = new rs(this.editorAPI), this.fontConnector = new Qe(this.editorAPI), this.componentConnector = new ps(this.editorAPI), this.dataConnector = new We(this.editorAPI, this.dataItemMappingTools), this.dataSource = new je(this.editorAPI, this.dataItemMappingTools), this.animation = new Je(this.editorAPI), this.document = new Ye(this.editorAPI), this.configuration = new gs(this.editorAPI, this.localConfig), this.variable = new ls(this.editorAPI), this.utils = new hs(this.editorAPI, this.localConfig), this.subscriber = new tn(this.config, this.localConfig), this.tool = new os(this.editorAPI), this.page = new ns(this.editorAPI), this.debug = new qe(this.editorAPI), this.textSelection = new is(this.editorAPI), this.colorStyle = new Ke(this.editorAPI), this.gradientStyle = new ys(this.editorAPI), this.paragraphStyle = new as(this.editorAPI), this.characterStyle = new He(this.editorAPI), this.font = new Xe(this.editorAPI), this.experiment = new Ze(this.editorAPI), this.canvas = new oe(this.editorAPI), this.colorConversion = new $e(this.editorAPI), this.info = new es(), this.clipboard = new Te(this.editorAPI), this.next = new ds(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new _e(this.editorAPI, this);
|
|
2578
2612
|
}
|
|
2579
2613
|
}
|
|
2580
|
-
var mn = /* @__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))(mn || {}), fn = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(fn || {}), Sn = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(Sn || {}), bn = /* @__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))(bn || {}), vn = /* @__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))(vn || {}), In = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(In || {}), An = /* @__PURE__ */ ((s) => (s.linear = "linear", s))(An || {}), Pn = /* @__PURE__ */ ((s) => (s.local = "linearLocal", s.linearBrandKit = "linearBrandKit", s))(Pn || {}), Fn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(Fn || {}), On = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.highest = "highest", s.medium = "medium", s))(On || {}), En = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(En || {}), Ln = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(Ln || {}), Dn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(Dn || {}), Nn = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(Nn || {}), Mn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(Mn || {}), xn = /* @__PURE__ */ ((s) => (s.none = "none", s.bullet = "bullet", s.number = "number", s))(xn || {}), Rn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(Rn || {}), Vn = /* @__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.MARKED_LIST_TYPE = "markedListType", s.MARKED_LIST_GROUP = "markedListGroup", s.MARKED_LIST_LEVEL = "markedListLevel", s))(Vn || {}), Jn = /* @__PURE__ */ ((s) => (s.arabic = "arabic", s.romanUpperCase = "romanUpperCase", s.romanLowerCase = "romanLowerCase", s.latinUpperCase = "latinUpperCase", s.latinLowerCase = "latinLowerCase", s))(Jn || {}), Gn = /* @__PURE__ */ ((s) => (s.none = "none", s.dash = "dash", s.dot = "dot", s.colon = "colon", s.roundBracket = "roundBracket", s))(Gn || {}),
|
|
2614
|
+
var mn = /* @__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))(mn || {}), fn = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(fn || {}), Sn = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(Sn || {}), bn = /* @__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))(bn || {}), vn = /* @__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))(vn || {}), In = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(In || {}), An = /* @__PURE__ */ ((s) => (s.linear = "linear", s))(An || {}), Pn = /* @__PURE__ */ ((s) => (s.local = "linearLocal", s.linearBrandKit = "linearBrandKit", s))(Pn || {}), Fn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(Fn || {}), On = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.highest = "highest", s.medium = "medium", s))(On || {}), En = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(En || {}), Ln = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(Ln || {}), Dn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(Dn || {}), Nn = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(Nn || {}), Mn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(Mn || {}), xn = /* @__PURE__ */ ((s) => (s.none = "none", s.bullet = "bullet", s.number = "number", s))(xn || {}), Rn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(Rn || {}), Vn = /* @__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.MARKED_LIST_TYPE = "markedListType", s.MARKED_LIST_GROUP = "markedListGroup", s.MARKED_LIST_LEVEL = "markedListLevel", s))(Vn || {}), Jn = /* @__PURE__ */ ((s) => (s.arabic = "arabic", s.romanUpperCase = "romanUpperCase", s.romanLowerCase = "romanLowerCase", s.latinUpperCase = "latinUpperCase", s.latinLowerCase = "latinLowerCase", s))(Jn || {}), Gn = /* @__PURE__ */ ((s) => (s.none = "none", s.dash = "dash", s.dot = "dot", s.colon = "colon", s.roundBracket = "roundBracket", s))(Gn || {}), Un = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(Un || {}), Bn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(Bn || {}), kn = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(kn || {}), _n = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s.gradient = "gradient", s))(_n || {}), Ns = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Ns || {});
|
|
2581
2615
|
const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2582
2616
|
__proto__: null,
|
|
2583
2617
|
ConnectorRegistrationSource: Ns
|
|
2584
2618
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2585
2619
|
export {
|
|
2586
2620
|
jr as ActionAsyncError,
|
|
2587
|
-
|
|
2621
|
+
Un as ActionEditorEvent,
|
|
2588
2622
|
Ln as Alignment,
|
|
2589
2623
|
zr as AnchorTargetEdgeType,
|
|
2590
2624
|
Kr as AnchorTargetType,
|
|
@@ -2592,14 +2626,14 @@ export {
|
|
|
2592
2626
|
Lr as AuthRefreshTypeEnum,
|
|
2593
2627
|
xr as AutoGrowDirection,
|
|
2594
2628
|
It as BarcodeCharacterSet,
|
|
2595
|
-
|
|
2629
|
+
Vt as BarcodeErrorCorrectionLevel,
|
|
2596
2630
|
Jr as BarcodeSourceTypeEnum,
|
|
2597
2631
|
$ as BarcodeType,
|
|
2598
2632
|
lr as BarcodeValidationResult,
|
|
2599
2633
|
vn as BasicAnimationsEmphasisStyles,
|
|
2600
2634
|
kr as BlendMode,
|
|
2601
2635
|
Nn as Case,
|
|
2602
|
-
|
|
2636
|
+
Y as ColorType,
|
|
2603
2637
|
ae as ColorUsageType,
|
|
2604
2638
|
Mr as ComponentFitEnum,
|
|
2605
2639
|
On as ComponentPreviewType,
|
|
@@ -2611,7 +2645,7 @@ export {
|
|
|
2611
2645
|
Tn as ConnectorMapping,
|
|
2612
2646
|
Fr as ConnectorMappingDirection,
|
|
2613
2647
|
Pr as ConnectorMappingSource,
|
|
2614
|
-
|
|
2648
|
+
Jt as ConnectorRegistrationSource,
|
|
2615
2649
|
he as ConnectorStateType,
|
|
2616
2650
|
Sr as ConnectorType,
|
|
2617
2651
|
yr as ConstraintMode,
|
|
@@ -2629,7 +2663,7 @@ export {
|
|
|
2629
2663
|
ue as EnvironmentType,
|
|
2630
2664
|
_r as FitMode,
|
|
2631
2665
|
Hr as FitModePosition,
|
|
2632
|
-
|
|
2666
|
+
Ur as FlowDirection,
|
|
2633
2667
|
Fn as FontPreviewFormat,
|
|
2634
2668
|
En as FontWeights,
|
|
2635
2669
|
qn as FrameAnchorTarget,
|
|
@@ -2649,18 +2683,18 @@ export {
|
|
|
2649
2683
|
dr as MeasurementUnit,
|
|
2650
2684
|
Es as MediaDownloadIntent,
|
|
2651
2685
|
de as MediaDownloadType,
|
|
2652
|
-
|
|
2686
|
+
kt as MediaType,
|
|
2653
2687
|
ta as Next,
|
|
2654
2688
|
Jn as NumberListFormat,
|
|
2655
2689
|
Gn as NumberListSeparatorSymbol,
|
|
2656
2690
|
jn as PageAnchorTarget,
|
|
2657
|
-
|
|
2691
|
+
tt as PositionEnum,
|
|
2658
2692
|
zn as RefreshedAuthCredendentials,
|
|
2659
2693
|
Mn as Scripting,
|
|
2660
2694
|
Rn as SelectedTextStyleSections,
|
|
2661
2695
|
Vn as SelectedTextStyles,
|
|
2662
2696
|
fn as ShakeDirections,
|
|
2663
|
-
|
|
2697
|
+
Bn as ShapeType,
|
|
2664
2698
|
mn as SlideDirections,
|
|
2665
2699
|
br as SortBy,
|
|
2666
2700
|
vr as SortOrder,
|
|
@@ -2674,10 +2708,10 @@ export {
|
|
|
2674
2708
|
pe as VariableType,
|
|
2675
2709
|
Xr as VariableVisibilityOperator,
|
|
2676
2710
|
Qr as VariableVisibilityTargetType,
|
|
2677
|
-
|
|
2678
|
-
|
|
2711
|
+
Gt as VariableVisibilityType,
|
|
2712
|
+
Br as VerticalAlign,
|
|
2679
2713
|
In as ViewMode,
|
|
2680
|
-
|
|
2714
|
+
et as WellKnownConfigurationKeys,
|
|
2681
2715
|
Xn as default,
|
|
2682
2716
|
$n as grafxMediaConnectorRegistration
|
|
2683
2717
|
};
|