@chili-publish/studio-sdk 1.40.0 → 1.41.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 +1303 -1251
- package/_bundles/main.es.js.map +1 -1
- package/_bundles/main.js +6 -6
- package/_bundles/main.js.map +1 -1
- package/connector-types/src/DataConnector.d.ts +1 -1
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +1 -1
- package/lib/src/controllers/ConnectorController.d.ts +8 -0
- package/lib/src/controllers/ConnectorController.js +13 -0
- package/lib/src/controllers/ConnectorController.js.map +1 -1
- package/lib/src/controllers/DataConnectorController.d.ts +2 -2
- package/lib/src/controllers/DataConnectorController.js +14 -12
- package/lib/src/controllers/DataConnectorController.js.map +1 -1
- package/lib/src/controllers/FrameController.d.ts +8 -1
- package/lib/src/controllers/FrameController.js +10 -0
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/controllers/VariableController.d.ts +73 -3
- package/lib/src/controllers/VariableController.js +116 -2
- package/lib/src/controllers/VariableController.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.js +1 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/next/controllers/VariableController.d.ts +6 -0
- package/lib/src/next/controllers/VariableController.js +15 -1
- package/lib/src/next/controllers/VariableController.js.map +1 -1
- package/lib/src/next/tests/controllers/VariableController.test.js +22 -1
- package/lib/src/next/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/sdk.js +2 -2
- package/lib/src/sdk.js.map +1 -1
- package/lib/src/tests/controllers/DataConnectorController.test.js +5 -0
- package/lib/src/tests/controllers/DataConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/FrameController.test.js +12 -0
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.js +9 -3
- package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
- package/lib/src/tests/controllers/VariableController.test.js +60 -2
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/types/ConnectorTypes.d.ts +3 -3
- package/lib/src/types/ConnectorTypes.js +9 -9
- package/lib/src/types/ConnectorTypes.js.map +1 -1
- package/lib/src/types/DataConnectorTypes.d.ts +1 -1
- package/lib/src/types/ShapeTypes.d.ts +14 -0
- package/lib/src/types/VariableTypes.d.ts +35 -2
- package/lib/src/types/VariableTypes.js +11 -0
- package/lib/src/types/VariableTypes.js.map +1 -1
- package/package.json +1 -1
package/_bundles/main.es.js
CHANGED
|
@@ -1,175 +1,175 @@
|
|
|
1
|
-
var
|
|
1
|
+
var xe = (s) => {
|
|
2
2
|
throw TypeError(s);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var a = (s, o,
|
|
6
|
-
const
|
|
7
|
-
current:
|
|
8
|
-
},
|
|
9
|
-
version:
|
|
4
|
+
var Me = (s, o, e) => o.has(s) || xe("Cannot " + e);
|
|
5
|
+
var a = (s, o, e) => (Me(s, o, "read from private field"), e ? e.call(s) : o.get(s)), u = (s, o, e) => o.has(s) ? xe("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(s) : o.set(s, e), g = (s, o, e, t) => (Me(s, o, "write to private field"), t ? t.call(s, e) : o.set(s, e), e);
|
|
6
|
+
const Ls = "2.24.latest", ms = {
|
|
7
|
+
current: Ls
|
|
8
|
+
}, Ns = "1.41.0", fs = {
|
|
9
|
+
version: Ns
|
|
10
10
|
};
|
|
11
|
-
var
|
|
11
|
+
var j;
|
|
12
12
|
(function(s) {
|
|
13
13
|
s.Call = "call", s.Reply = "reply", s.Syn = "syn", s.SynAck = "synAck", s.Ack = "ack";
|
|
14
|
-
})(
|
|
15
|
-
var
|
|
14
|
+
})(j || (j = {}));
|
|
15
|
+
var lt;
|
|
16
16
|
(function(s) {
|
|
17
17
|
s.Fulfilled = "fulfilled", s.Rejected = "rejected";
|
|
18
|
-
})(
|
|
19
|
-
var
|
|
18
|
+
})(lt || (lt = {}));
|
|
19
|
+
var kt;
|
|
20
20
|
(function(s) {
|
|
21
21
|
s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
|
|
22
|
-
})(
|
|
23
|
-
var
|
|
22
|
+
})(kt || (kt = {}));
|
|
23
|
+
var oe;
|
|
24
24
|
(function(s) {
|
|
25
25
|
s.DataCloneError = "DataCloneError";
|
|
26
|
-
})(
|
|
27
|
-
var
|
|
26
|
+
})(oe || (oe = {}));
|
|
27
|
+
var dt;
|
|
28
28
|
(function(s) {
|
|
29
29
|
s.Message = "message";
|
|
30
|
-
})(
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
let
|
|
30
|
+
})(dt || (dt = {}));
|
|
31
|
+
const xs = (s, o) => {
|
|
32
|
+
const e = [];
|
|
33
|
+
let t = !1;
|
|
34
34
|
return {
|
|
35
35
|
destroy(r) {
|
|
36
|
-
|
|
36
|
+
t || (t = !0, o(`${s}: Destroying connection`), e.forEach((n) => {
|
|
37
37
|
n(r);
|
|
38
38
|
}));
|
|
39
39
|
},
|
|
40
40
|
onDestroy(r) {
|
|
41
|
-
|
|
41
|
+
t ? r() : e.push(r);
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
},
|
|
44
|
+
}, Ms = (s) => (...o) => {
|
|
45
45
|
s && console.log("[Penpal]", ...o);
|
|
46
|
-
},
|
|
46
|
+
}, Rs = {
|
|
47
47
|
"http:": "80",
|
|
48
48
|
"https:": "443"
|
|
49
|
-
},
|
|
50
|
-
if (s &&
|
|
49
|
+
}, Vs = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Js = ["file:", "data:"], Bs = (s) => {
|
|
50
|
+
if (s && Js.find((h) => s.startsWith(h)))
|
|
51
51
|
return "null";
|
|
52
|
-
const o = document.location,
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
return `${
|
|
57
|
-
},
|
|
52
|
+
const o = document.location, e = Vs.exec(s);
|
|
53
|
+
let t, r, n;
|
|
54
|
+
e ? (t = e[1] ? e[1] : o.protocol, r = e[2], n = e[4]) : (t = o.protocol, r = o.hostname, n = o.port);
|
|
55
|
+
const c = n && n !== Rs[t] ? `:${n}` : "";
|
|
56
|
+
return `${t}//${r}${c}`;
|
|
57
|
+
}, Re = ({ name: s, message: o, stack: e }) => ({
|
|
58
58
|
name: s,
|
|
59
59
|
message: o,
|
|
60
|
-
stack:
|
|
61
|
-
}),
|
|
60
|
+
stack: e
|
|
61
|
+
}), Us = (s) => {
|
|
62
62
|
const o = new Error();
|
|
63
|
-
return Object.keys(s).forEach((
|
|
64
|
-
},
|
|
65
|
-
const { localName:
|
|
63
|
+
return Object.keys(s).forEach((e) => o[e] = s[e]), o;
|
|
64
|
+
}, ks = (s, o, e) => {
|
|
65
|
+
const { localName: t, local: r, remote: n, originForSending: c, originForReceiving: h } = s;
|
|
66
66
|
let l = !1;
|
|
67
67
|
const p = (y) => {
|
|
68
|
-
if (y.source !== n || y.data.penpal !==
|
|
68
|
+
if (y.source !== n || y.data.penpal !== j.Call)
|
|
69
69
|
return;
|
|
70
|
-
if (y.origin !==
|
|
71
|
-
|
|
70
|
+
if (y.origin !== h) {
|
|
71
|
+
e(`${t} received message from origin ${y.origin} which did not match expected origin ${h}`);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
74
|
const b = y.data, { methodName: S, args: v, id: E } = b;
|
|
75
|
-
|
|
76
|
-
const O = (f) => (
|
|
77
|
-
if (
|
|
78
|
-
|
|
75
|
+
e(`${t}: Received ${S}() call`);
|
|
76
|
+
const O = (f) => (H) => {
|
|
77
|
+
if (e(`${t}: Sending ${S}() reply`), l) {
|
|
78
|
+
e(`${t}: Unable to send ${S}() reply due to destroyed connection`);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
const
|
|
82
|
-
penpal:
|
|
81
|
+
const M = {
|
|
82
|
+
penpal: j.Reply,
|
|
83
83
|
id: E,
|
|
84
84
|
resolution: f,
|
|
85
|
-
returnValue:
|
|
85
|
+
returnValue: H
|
|
86
86
|
};
|
|
87
|
-
f ===
|
|
87
|
+
f === lt.Rejected && H instanceof Error && (M.returnValue = Re(H), M.returnValueIsError = !0);
|
|
88
88
|
try {
|
|
89
|
-
n.postMessage(
|
|
90
|
-
} catch (
|
|
91
|
-
if (
|
|
89
|
+
n.postMessage(M, c);
|
|
90
|
+
} catch (I) {
|
|
91
|
+
if (I.name === oe.DataCloneError) {
|
|
92
92
|
const W = {
|
|
93
|
-
penpal:
|
|
93
|
+
penpal: j.Reply,
|
|
94
94
|
id: E,
|
|
95
|
-
resolution:
|
|
96
|
-
returnValue:
|
|
95
|
+
resolution: lt.Rejected,
|
|
96
|
+
returnValue: Re(I),
|
|
97
97
|
returnValueIsError: !0
|
|
98
98
|
};
|
|
99
|
-
n.postMessage(W,
|
|
99
|
+
n.postMessage(W, c);
|
|
100
100
|
}
|
|
101
|
-
throw
|
|
101
|
+
throw I;
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
new Promise((f) => f(o[S].apply(o, v))).then(O(
|
|
104
|
+
new Promise((f) => f(o[S].apply(o, v))).then(O(lt.Fulfilled), O(lt.Rejected));
|
|
105
105
|
};
|
|
106
|
-
return r.addEventListener(
|
|
107
|
-
l = !0, r.removeEventListener(
|
|
106
|
+
return r.addEventListener(dt.Message, p), () => {
|
|
107
|
+
l = !0, r.removeEventListener(dt.Message, p);
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
|
-
let
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
return
|
|
114
|
-
},
|
|
115
|
-
const
|
|
116
|
-
return
|
|
117
|
-
},
|
|
118
|
-
const
|
|
119
|
-
return Object.keys(s).forEach((
|
|
120
|
-
const r = s[
|
|
121
|
-
typeof r == "object" && Object.assign(
|
|
122
|
-
}),
|
|
123
|
-
},
|
|
110
|
+
let Gs = 0;
|
|
111
|
+
const Ts = () => ++Gs, Ss = ".", bs = (s) => s ? s.split(Ss) : [], _s = (s) => s.join(Ss), Hs = (s, o) => {
|
|
112
|
+
const e = bs(o || "");
|
|
113
|
+
return e.push(s), _s(e);
|
|
114
|
+
}, $s = (s, o, e) => {
|
|
115
|
+
const t = bs(o);
|
|
116
|
+
return t.reduce((r, n, c) => (typeof r[n] > "u" && (r[n] = {}), c === t.length - 1 && (r[n] = e), r[n]), s), s;
|
|
117
|
+
}, vs = (s, o) => {
|
|
118
|
+
const e = {};
|
|
119
|
+
return Object.keys(s).forEach((t) => {
|
|
120
|
+
const r = s[t], n = Hs(t, o);
|
|
121
|
+
typeof r == "object" && Object.assign(e, vs(r, n)), typeof r == "function" && (e[n] = r);
|
|
122
|
+
}), e;
|
|
123
|
+
}, zs = (s) => {
|
|
124
124
|
const o = {};
|
|
125
|
-
for (const
|
|
126
|
-
|
|
125
|
+
for (const e in s)
|
|
126
|
+
$s(o, e, s[e]);
|
|
127
127
|
return o;
|
|
128
|
-
},
|
|
129
|
-
const { localName: n, local:
|
|
128
|
+
}, Ks = (s, o, e, t, r) => {
|
|
129
|
+
const { localName: n, local: c, remote: h, originForSending: l, originForReceiving: p } = o;
|
|
130
130
|
let y = !1;
|
|
131
131
|
r(`${n}: Connecting call sender`);
|
|
132
132
|
const b = (v) => (...E) => {
|
|
133
133
|
r(`${n}: Sending ${v}() call`);
|
|
134
134
|
let O;
|
|
135
135
|
try {
|
|
136
|
-
|
|
136
|
+
h.closed && (O = !0);
|
|
137
137
|
} catch {
|
|
138
138
|
O = !0;
|
|
139
139
|
}
|
|
140
|
-
if (O &&
|
|
140
|
+
if (O && t(), y) {
|
|
141
141
|
const f = new Error(`Unable to send ${v}() call due to destroyed connection`);
|
|
142
|
-
throw f.code =
|
|
142
|
+
throw f.code = kt.ConnectionDestroyed, f;
|
|
143
143
|
}
|
|
144
|
-
return new Promise((f,
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
144
|
+
return new Promise((f, H) => {
|
|
145
|
+
const M = Ts(), I = (q) => {
|
|
146
|
+
if (q.source !== h || q.data.penpal !== j.Reply || q.data.id !== M)
|
|
147
147
|
return;
|
|
148
|
-
if (
|
|
149
|
-
r(`${n} received message from origin ${
|
|
148
|
+
if (q.origin !== p) {
|
|
149
|
+
r(`${n} received message from origin ${q.origin} which did not match expected origin ${p}`);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
const
|
|
153
|
-
r(`${n}: Received ${v}() reply`),
|
|
154
|
-
let
|
|
155
|
-
|
|
152
|
+
const St = q.data;
|
|
153
|
+
r(`${n}: Received ${v}() reply`), c.removeEventListener(dt.Message, I);
|
|
154
|
+
let bt = St.returnValue;
|
|
155
|
+
St.returnValueIsError && (bt = Us(bt)), (St.resolution === lt.Fulfilled ? f : H)(bt);
|
|
156
156
|
};
|
|
157
|
-
|
|
157
|
+
c.addEventListener(dt.Message, I);
|
|
158
158
|
const W = {
|
|
159
|
-
penpal:
|
|
160
|
-
id:
|
|
159
|
+
penpal: j.Call,
|
|
160
|
+
id: M,
|
|
161
161
|
methodName: v,
|
|
162
162
|
args: E
|
|
163
163
|
};
|
|
164
|
-
|
|
164
|
+
h.postMessage(W, l);
|
|
165
165
|
});
|
|
166
|
-
}, S =
|
|
167
|
-
return Object.assign(s,
|
|
166
|
+
}, S = e.reduce((v, E) => (v[E] = b(E), v), {});
|
|
167
|
+
return Object.assign(s, zs(S)), () => {
|
|
168
168
|
y = !0;
|
|
169
169
|
};
|
|
170
|
-
},
|
|
171
|
-
const { destroy: n, onDestroy:
|
|
172
|
-
let
|
|
170
|
+
}, js = (s, o, e, t, r) => {
|
|
171
|
+
const { destroy: n, onDestroy: c } = t;
|
|
172
|
+
let h, l;
|
|
173
173
|
const p = {};
|
|
174
174
|
return (y) => {
|
|
175
175
|
if (y.origin !== o) {
|
|
@@ -181,85 +181,85 @@ const Us = () => ++Js, Cs = ".", ms = (s) => s ? s.split(Cs) : [], ks = (s) => s
|
|
|
181
181
|
localName: "Parent",
|
|
182
182
|
local: window,
|
|
183
183
|
remote: y.source,
|
|
184
|
-
originForSending:
|
|
184
|
+
originForSending: e,
|
|
185
185
|
originForReceiving: o
|
|
186
186
|
};
|
|
187
|
-
|
|
187
|
+
h && h(), h = ks(b, s, r), c(h), l && l.forEach((v) => {
|
|
188
188
|
delete p[v];
|
|
189
189
|
}), l = y.data.methodNames;
|
|
190
|
-
const S =
|
|
191
|
-
return
|
|
190
|
+
const S = Ks(p, b, l, n, r);
|
|
191
|
+
return c(S), p;
|
|
192
192
|
};
|
|
193
|
-
},
|
|
194
|
-
if (r.origin !==
|
|
195
|
-
s(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${
|
|
193
|
+
}, Ws = (s, o, e, t) => (r) => {
|
|
194
|
+
if (r.origin !== e) {
|
|
195
|
+
s(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${e}`);
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
198
|
s("Parent: Handshake - Received SYN, responding with SYN-ACK");
|
|
199
199
|
const n = {
|
|
200
|
-
penpal:
|
|
200
|
+
penpal: j.SynAck,
|
|
201
201
|
methodNames: Object.keys(o)
|
|
202
202
|
};
|
|
203
|
-
r.source.postMessage(n,
|
|
204
|
-
},
|
|
205
|
-
const { destroy:
|
|
206
|
-
s.isConnected || (clearInterval(r),
|
|
207
|
-
},
|
|
208
|
-
|
|
203
|
+
r.source.postMessage(n, t);
|
|
204
|
+
}, qs = 6e4, Ys = (s, o) => {
|
|
205
|
+
const { destroy: e, onDestroy: t } = o, r = setInterval(() => {
|
|
206
|
+
s.isConnected || (clearInterval(r), e());
|
|
207
|
+
}, qs);
|
|
208
|
+
t(() => {
|
|
209
209
|
clearInterval(r);
|
|
210
210
|
});
|
|
211
|
-
},
|
|
212
|
-
let
|
|
213
|
-
return s !== void 0 && (
|
|
214
|
-
const
|
|
215
|
-
|
|
211
|
+
}, Zs = (s, o) => {
|
|
212
|
+
let e;
|
|
213
|
+
return s !== void 0 && (e = window.setTimeout(() => {
|
|
214
|
+
const t = new Error(`Connection timed out after ${s}ms`);
|
|
215
|
+
t.code = kt.ConnectionTimeout, o(t);
|
|
216
216
|
}, s)), () => {
|
|
217
|
-
clearTimeout(
|
|
217
|
+
clearTimeout(e);
|
|
218
218
|
};
|
|
219
|
-
},
|
|
219
|
+
}, Qs = (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 = kt.NoIframeSrc, o;
|
|
223
223
|
}
|
|
224
|
-
},
|
|
225
|
-
let { iframe: o, methods:
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
const y =
|
|
224
|
+
}, Xs = (s) => {
|
|
225
|
+
let { iframe: o, methods: e = {}, childOrigin: t, timeout: r, debug: n = !1 } = s;
|
|
226
|
+
const c = Ms(n), h = xs("Parent", c), { onDestroy: l, destroy: p } = h;
|
|
227
|
+
t || (Qs(o), t = Bs(o.src));
|
|
228
|
+
const y = t === "null" ? "*" : t, b = vs(e), S = Ws(c, b, t, y), v = js(b, t, y, h, c);
|
|
229
229
|
return {
|
|
230
230
|
promise: new Promise((O, f) => {
|
|
231
|
-
const
|
|
232
|
-
if (!(
|
|
233
|
-
if (
|
|
234
|
-
S(
|
|
231
|
+
const H = Zs(r, p), M = (I) => {
|
|
232
|
+
if (!(I.source !== o.contentWindow || !I.data)) {
|
|
233
|
+
if (I.data.penpal === j.Syn) {
|
|
234
|
+
S(I);
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
|
-
if (
|
|
238
|
-
const W = v(
|
|
239
|
-
W && (
|
|
237
|
+
if (I.data.penpal === j.Ack) {
|
|
238
|
+
const W = v(I);
|
|
239
|
+
W && (H(), O(W));
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
window.addEventListener(
|
|
245
|
-
window.removeEventListener(
|
|
244
|
+
window.addEventListener(dt.Message, M), c("Parent: Awaiting handshake"), Ys(o, h), l((I) => {
|
|
245
|
+
window.removeEventListener(dt.Message, M), I && f(I);
|
|
246
246
|
});
|
|
247
247
|
}),
|
|
248
248
|
destroy() {
|
|
249
249
|
p();
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
},
|
|
252
|
+
}, tr = (s) => {
|
|
253
253
|
const o = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);
|
|
254
|
-
let
|
|
255
|
-
return o.test(s) ?
|
|
256
|
-
},
|
|
257
|
-
const
|
|
254
|
+
let e = "";
|
|
255
|
+
return o.test(s) ? e = s : s.indexOf("/index.html") > -1 ? e = s.replace("/index.html", "/") : s.charAt(-1) !== "/" && (e = `${s}/`), e;
|
|
256
|
+
}, er = (s, o, e) => {
|
|
257
|
+
const t = tr(o), n = `<html>
|
|
258
258
|
<head>
|
|
259
259
|
<base href="/" />
|
|
260
260
|
<meta charset="UTF-8"/>
|
|
261
261
|
<!-- use this property to pass the StudioStyling to the engine -->
|
|
262
|
-
<meta name="studio-styling" content='${JSON.stringify(
|
|
262
|
+
<meta name="studio-styling" content='${JSON.stringify(e || {})}'>
|
|
263
263
|
</head>
|
|
264
264
|
<body>
|
|
265
265
|
<script>
|
|
@@ -294,15 +294,15 @@ const Us = () => ++Js, Cs = ".", ms = (s) => s ? s.split(Cs) : [], ks = (s) => s
|
|
|
294
294
|
window.addEventListener('error', handleIframeError);
|
|
295
295
|
window.addEventListener('unhandledrejection', handleUnhandledRejection);
|
|
296
296
|
<\/script>
|
|
297
|
-
<script src="${
|
|
298
|
-
<script src="${
|
|
297
|
+
<script src="${t}init.js" async><\/script>
|
|
298
|
+
<script src="${t}flutter_bootstrap.js"><\/script>
|
|
299
299
|
<script>
|
|
300
300
|
try {
|
|
301
301
|
if(!window?.initializeStudioEngine){
|
|
302
302
|
throw new Error('Failed to initialize studio engine: initializeStudioEngine not found');
|
|
303
303
|
}
|
|
304
304
|
initializeStudioEngine({
|
|
305
|
-
assetBase: '${
|
|
305
|
+
assetBase: '${t}',
|
|
306
306
|
});
|
|
307
307
|
} catch(error) {
|
|
308
308
|
if (window.parent && window.parent !== window) {
|
|
@@ -324,15 +324,15 @@ const Us = () => ++Js, Cs = ".", ms = (s) => s ? s.split(Cs) : [], ks = (s) => s
|
|
|
324
324
|
</html>`;
|
|
325
325
|
s.srcdoc = n;
|
|
326
326
|
};
|
|
327
|
-
let
|
|
328
|
-
const
|
|
329
|
-
|
|
330
|
-
const
|
|
331
|
-
|
|
327
|
+
let ee = null;
|
|
328
|
+
const sr = (s, o, e, t = "chili-editor", r, n) => {
|
|
329
|
+
ee && window.removeEventListener("message", ee);
|
|
330
|
+
const c = `#${t}`, h = document.createElement("iframe");
|
|
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
332
|
const l = () => {
|
|
333
|
-
const p = document.querySelector(
|
|
333
|
+
const p = document.querySelector(c);
|
|
334
334
|
if (p) {
|
|
335
|
-
p == null || p.appendChild(
|
|
335
|
+
p == null || p.appendChild(h), h.addEventListener(
|
|
336
336
|
"error",
|
|
337
337
|
() => {
|
|
338
338
|
const y = new Error("Failed to setup frame: iframe failed to load");
|
|
@@ -341,7 +341,7 @@ const Xs = (s, o, t, e = "chili-editor", r, n) => {
|
|
|
341
341
|
{ capture: !0, once: !0 }
|
|
342
342
|
);
|
|
343
343
|
try {
|
|
344
|
-
|
|
344
|
+
er(h, s, r);
|
|
345
345
|
} catch (y) {
|
|
346
346
|
y instanceof Error ? n == null || n(y) : n == null || n(new Error(`Failed to setup frame: ${y}`));
|
|
347
347
|
}
|
|
@@ -349,16 +349,16 @@ const Xs = (s, o, t, e = "chili-editor", r, n) => {
|
|
|
349
349
|
};
|
|
350
350
|
document.readyState === "complete" || document.readyState === "interactive" ? l() : document.addEventListener("DOMContentLoaded", () => {
|
|
351
351
|
l();
|
|
352
|
-
}),
|
|
352
|
+
}), ee = (p) => {
|
|
353
353
|
var y;
|
|
354
|
-
if (p.source ===
|
|
354
|
+
if (p.source === h.contentWindow && ((y = p.data) == null ? void 0 : y.type) === "iframe-error") {
|
|
355
355
|
const b = p.data.error, S = new Error(b.message || "Failed to setup frame: error in iframe");
|
|
356
356
|
n == null || n(S);
|
|
357
357
|
}
|
|
358
|
-
}, window.addEventListener("message",
|
|
359
|
-
|
|
358
|
+
}, window.addEventListener("message", ee), e(
|
|
359
|
+
Xs({
|
|
360
360
|
// The iframe to which a connection should be made
|
|
361
|
-
iframe:
|
|
361
|
+
iframe: h,
|
|
362
362
|
// All the methods that we want to expose to the child should be inside the methods object
|
|
363
363
|
// f.e. stateChange(documentJson)
|
|
364
364
|
methods: {
|
|
@@ -407,8 +407,8 @@ const Xs = (s, o, t, e = "chili-editor", r, n) => {
|
|
|
407
407
|
})
|
|
408
408
|
);
|
|
409
409
|
};
|
|
410
|
-
var
|
|
411
|
-
const
|
|
410
|
+
var tt = /* @__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))(tt || {}), rr = /* @__PURE__ */ ((s) => (s.full = "full", s.followConstraints = "followConstraints", s))(rr || {});
|
|
411
|
+
const nr = {
|
|
412
412
|
shortcutOptions: {
|
|
413
413
|
debugPanel: { enabled: !1 },
|
|
414
414
|
ellipse: { enabled: !1 },
|
|
@@ -426,42 +426,42 @@ const er = {
|
|
|
426
426
|
frameEditingMode: "full"
|
|
427
427
|
/* full */
|
|
428
428
|
};
|
|
429
|
-
var
|
|
430
|
-
class
|
|
431
|
-
constructor(o,
|
|
432
|
-
this.type = "action", this.message = o, this.id =
|
|
429
|
+
var ar = /* @__PURE__ */ ((s) => (s.overflow = "overflow", s.fontLoading = "fontLoading", s.actionRegister = "actionRegister", s.actionExecution = "actionExecution", s.actionCircular = "actionCircular", s))(ar || {}), Is = /* @__PURE__ */ ((s) => (s.project = "project", s.template = "template", s.component = "component", s))(Is || {});
|
|
430
|
+
class ir {
|
|
431
|
+
constructor(o, e, t, r) {
|
|
432
|
+
this.type = "action", this.message = o, this.id = e, this.event = t, this.eventChain = r;
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
class
|
|
436
|
-
constructor(o,
|
|
437
|
-
this.type = "dataRow", this.count = o, this.message =
|
|
435
|
+
class or {
|
|
436
|
+
constructor(o, e, t) {
|
|
437
|
+
this.type = "dataRow", this.count = o, this.message = e, this.exceptions = t;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
class
|
|
441
|
-
constructor(o,
|
|
442
|
-
super(
|
|
440
|
+
class cr extends Error {
|
|
441
|
+
constructor(o, e, t) {
|
|
442
|
+
super(e, t), this.statusCode = o;
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
-
class
|
|
446
|
-
constructor(o,
|
|
447
|
-
super(
|
|
445
|
+
class hr extends Error {
|
|
446
|
+
constructor(o, e, t) {
|
|
447
|
+
super(e, t), this.context = o;
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
const
|
|
451
|
-
function
|
|
452
|
-
const o = s.error ?? "Yikes, something went wrong",
|
|
450
|
+
const dr = 404075, lr = 403032;
|
|
451
|
+
function te(s) {
|
|
452
|
+
const o = s.error ?? "Yikes, something went wrong", e = {
|
|
453
453
|
cause: {
|
|
454
454
|
name: String(s.status),
|
|
455
455
|
message: s.error ?? "Yikes, something went wrong"
|
|
456
456
|
}
|
|
457
457
|
};
|
|
458
|
-
if (s.status ===
|
|
458
|
+
if (s.status === dr) {
|
|
459
459
|
const r = JSON.parse(s.data).statusCode;
|
|
460
|
-
throw new
|
|
460
|
+
throw new cr(r, o, e);
|
|
461
461
|
} else
|
|
462
|
-
throw new Error(o,
|
|
462
|
+
throw new Error(o, e);
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function ur(s) {
|
|
465
465
|
const o = [
|
|
466
466
|
/DateVariable '([^']+)' should not be part of excludedDays, ".*" was given/,
|
|
467
467
|
/DateVariable '([^']+)' expects \$date to be > startDate:.*$/,
|
|
@@ -469,29 +469,29 @@ function cr(s) {
|
|
|
469
469
|
/NumberVariable '([^']+)' expects \$extractedValue to be >= .+$/,
|
|
470
470
|
/NumberVariable '([^']+)' expects \$extractedValue to be <= .+$/
|
|
471
471
|
];
|
|
472
|
-
for (const
|
|
473
|
-
if (s.match(
|
|
472
|
+
for (const e of o)
|
|
473
|
+
if (s.match(e))
|
|
474
474
|
return { valid: !0 };
|
|
475
475
|
return { valid: !1 };
|
|
476
476
|
}
|
|
477
|
-
function
|
|
478
|
-
if (s.status ===
|
|
479
|
-
const
|
|
480
|
-
if (
|
|
481
|
-
throw new
|
|
482
|
-
cause: { name: String(s.status), message:
|
|
477
|
+
function gr(s, o) {
|
|
478
|
+
if (s.status === lr && s.error) {
|
|
479
|
+
const e = s.error;
|
|
480
|
+
if (ur(e).valid)
|
|
481
|
+
throw new hr(o, e, {
|
|
482
|
+
cause: { name: String(s.status), message: e }
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
|
|
486
|
+
function yr(s) {
|
|
487
|
+
te(s);
|
|
488
488
|
}
|
|
489
489
|
function i(s, o) {
|
|
490
|
-
let
|
|
491
|
-
typeof o == "function" ? (
|
|
490
|
+
let e = !0, t = !1, r = yr;
|
|
491
|
+
typeof o == "function" ? (t = !0, r = o) : typeof o == "boolean" && (e = o);
|
|
492
492
|
try {
|
|
493
|
-
s.success || (r(s),
|
|
494
|
-
const n = s.data &&
|
|
493
|
+
s.success || (r(s), t && te(s));
|
|
494
|
+
const n = s.data && e;
|
|
495
495
|
return {
|
|
496
496
|
...s,
|
|
497
497
|
parsedData: n ? JSON.parse(s.data) : s.data
|
|
@@ -501,7 +501,7 @@ function i(s, o) {
|
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
var N;
|
|
504
|
-
class
|
|
504
|
+
class Ve {
|
|
505
505
|
/**
|
|
506
506
|
* @ignore
|
|
507
507
|
*/
|
|
@@ -510,12 +510,12 @@ class xe {
|
|
|
510
510
|
* @ignore
|
|
511
511
|
*/
|
|
512
512
|
u(this, N);
|
|
513
|
-
this.getAll = async () => (await a(this, N)).getActions().then((
|
|
513
|
+
this.getAll = async () => (await a(this, N)).getActions().then((t) => i(t)), this.getById = async (e) => (await a(this, N)).getActionById(e).then((r) => i(r)), this.create = async () => (await a(this, N)).createAction().then((t) => i(t)), this.duplicate = async (e) => (await a(this, N)).duplicateAction(e).then((r) => i(r)), this.remove = async (e) => (await a(this, N)).removeAction(e).then((r) => i(r)), this.update = async (e, t) => (await a(this, N)).updateAction(e, JSON.stringify(t)).then((n) => i(n)), this.rename = async (e, t) => this.update(e, { name: t }), this.updateScript = async (e, t) => this.update(e, { script: t }), this.updateTriggers = async (e, t) => this.update(e, { triggers: t }), this.move = async (e, t) => (await a(this, N)).moveActions(e, t).then((n) => i(n)), this.setTypeError = async (e, t) => this.update(e, { hasTypeError: t }), this.disable = async () => (await a(this, N)).disableActions().then((t) => i(t)), this.enable = async () => (await a(this, N)).enableActions().then((t) => i(t)), g(this, N, o);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
N = new WeakMap();
|
|
517
|
-
var
|
|
518
|
-
class
|
|
517
|
+
var L;
|
|
518
|
+
class Je {
|
|
519
519
|
/**
|
|
520
520
|
* @ignore
|
|
521
521
|
*/
|
|
@@ -523,15 +523,15 @@ class Re {
|
|
|
523
523
|
/**
|
|
524
524
|
* @ignore
|
|
525
525
|
*/
|
|
526
|
-
u(this,
|
|
527
|
-
this.getAllOnSelectedLayout = async () => (await a(this,
|
|
528
|
-
(r) => i({ ...r, data: JSON.stringify(
|
|
529
|
-
), this.play = async () => (await a(this,
|
|
526
|
+
u(this, L);
|
|
527
|
+
this.getAllOnSelectedLayout = async () => (await a(this, L)).getAnimationsOnSelectedLayout().then((t) => i(t)), this.getByFrameId = async (e, t) => (await a(this, L)).getAnimationByFrameId(e, t).then((n) => i(n)), this.getByLayoutId = async (e) => (await a(this, L)).getAnimationsByLayoutId(e).then((r) => i(r)), this.setFrameAnimation = async (e) => (await a(this, L)).setFrameAnimation(JSON.stringify(e)).then(
|
|
528
|
+
(r) => i({ ...r, data: JSON.stringify(e) })
|
|
529
|
+
), this.play = async () => (await a(this, L)).playAnimation().then((t) => i(t)), this.pause = async () => (await a(this, L)).pauseAnimation().then((t) => i(t)), this.setScrubberPosition = async (e) => (await a(this, L)).setScrubberPosition(e).then((r) => i(r)), this.setDuration = async (e) => (await a(this, L)).setAnimationDuration(e).then((r) => i(r)), this.resetFrameAnimation = async (e) => (await a(this, L)).resetFrameAnimation(e).then((r) => i(r)), this.reset = async () => (await a(this, L)).resetAnimation().then((t) => i(t)), g(this, L, o);
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
|
|
533
|
-
var
|
|
534
|
-
class
|
|
532
|
+
L = new WeakMap();
|
|
533
|
+
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))($ || {}), Jt = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Jt || {}), vt = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(vt || {}), pr = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(pr || {}), wr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(wr || {}), X = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(X || {}), Cr = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(Cr || {}), mr = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(mr || {}), fr = /* @__PURE__ */ ((s) => (s.locked = "locked", s.range = "range", s.none = "none", s))(fr || {}), G;
|
|
534
|
+
class Be {
|
|
535
535
|
/**
|
|
536
536
|
* @ignore
|
|
537
537
|
*/
|
|
@@ -540,75 +540,75 @@ class Me {
|
|
|
540
540
|
* @ignore
|
|
541
541
|
*/
|
|
542
542
|
u(this, G);
|
|
543
|
-
this.setBarcodeProperties = async (
|
|
544
|
-
const r = { enableBackground:
|
|
545
|
-
return this.setBarcodeProperties(
|
|
546
|
-
}, this.setBackgroundColor = async (
|
|
547
|
-
const r = { backgroundColor:
|
|
548
|
-
return this.setBarcodeProperties(
|
|
549
|
-
}, this.setEnableBars = async (
|
|
550
|
-
const r = { enableBars:
|
|
551
|
-
return this.setBarcodeProperties(
|
|
552
|
-
}, this.setBarColor = async (
|
|
553
|
-
const r = { barColor:
|
|
554
|
-
return this.setBarcodeProperties(
|
|
555
|
-
}, this.setBarcodeSource = async (
|
|
556
|
-
const r = { enableText:
|
|
557
|
-
return this.setBarcodeProperties(
|
|
558
|
-
}, this.setBarHeight = async (
|
|
559
|
-
const r = { barHeight:
|
|
560
|
-
return this.setBarcodeProperties(
|
|
561
|
-
}, this.setMagnification = async (
|
|
562
|
-
const r = { magnification:
|
|
563
|
-
return this.setBarcodeProperties(
|
|
564
|
-
}, this.setQuietZoneValue = async (
|
|
543
|
+
this.setBarcodeProperties = async (e, t) => (await a(this, G)).setBarcodeProperties(e, JSON.stringify(t)).then((n) => i(n)), this.setEnableBackground = async (e, t) => {
|
|
544
|
+
const r = { enableBackground: t };
|
|
545
|
+
return this.setBarcodeProperties(e, r);
|
|
546
|
+
}, this.setBackgroundColor = async (e, t) => {
|
|
547
|
+
const r = { backgroundColor: t };
|
|
548
|
+
return this.setBarcodeProperties(e, r);
|
|
549
|
+
}, this.setEnableBars = async (e, t) => {
|
|
550
|
+
const r = { enableBars: t };
|
|
551
|
+
return this.setBarcodeProperties(e, r);
|
|
552
|
+
}, this.setBarColor = async (e, t) => {
|
|
553
|
+
const r = { barColor: t };
|
|
554
|
+
return this.setBarcodeProperties(e, r);
|
|
555
|
+
}, this.setBarcodeSource = async (e, t) => (await a(this, G)).setBarcodeSource(e, JSON.stringify(t)).then((n) => i(n)), this.removeBarcodeSource = async (e) => (await a(this, G)).setBarcodeSource(e, null).then((r) => i(r)), this.setEnableText = async (e, t) => {
|
|
556
|
+
const r = { enableText: t };
|
|
557
|
+
return this.setBarcodeProperties(e, r);
|
|
558
|
+
}, this.setBarHeight = async (e, t) => {
|
|
559
|
+
const r = { barHeight: t };
|
|
560
|
+
return this.setBarcodeProperties(e, r);
|
|
561
|
+
}, this.setMagnification = async (e, t) => {
|
|
562
|
+
const r = { magnification: t };
|
|
563
|
+
return this.setBarcodeProperties(e, r);
|
|
564
|
+
}, this.setQuietZoneValue = async (e, t, r) => {
|
|
565
565
|
const n = r ? {
|
|
566
|
-
left: r ===
|
|
567
|
-
top: r ===
|
|
568
|
-
right: r ===
|
|
569
|
-
bottom: r ===
|
|
570
|
-
} : { left:
|
|
571
|
-
return (await a(this, G)).setBarcodeProperties(
|
|
572
|
-
}, this.setAreQuietZoneValuesCombined = async (
|
|
573
|
-
const r = { areQuietZoneValuesCombined:
|
|
574
|
-
return (await a(this, G)).setBarcodeProperties(
|
|
575
|
-
}, this.setErrorCorrectionLevel = async (
|
|
576
|
-
const r = { drawStartStopChars:
|
|
577
|
-
return this.setBarcodeProperties(
|
|
578
|
-
}, this.setDrawStartStopChars = async (
|
|
579
|
-
const r = { drawStartStopChars:
|
|
580
|
-
return this.setBarcodeProperties(
|
|
581
|
-
}, this.getBarcodeConfigationOptions = (
|
|
582
|
-
let
|
|
583
|
-
switch (
|
|
584
|
-
case
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
566
|
+
left: r === X.left ? t : void 0,
|
|
567
|
+
top: r === X.top ? t : void 0,
|
|
568
|
+
right: r === X.right ? t : void 0,
|
|
569
|
+
bottom: r === X.bottom ? t : void 0
|
|
570
|
+
} : { left: t, top: t, right: t, bottom: t };
|
|
571
|
+
return (await a(this, G)).setBarcodeProperties(e, JSON.stringify({ quietZone: n })).then((h) => i(h));
|
|
572
|
+
}, this.setAreQuietZoneValuesCombined = async (e, t) => {
|
|
573
|
+
const r = { areQuietZoneValuesCombined: t };
|
|
574
|
+
return (await a(this, G)).setBarcodeProperties(e, JSON.stringify({ quietZone: r })).then((c) => i(c));
|
|
575
|
+
}, this.setErrorCorrectionLevel = async (e, t) => (await a(this, G)).setBarcodeProperties(e, JSON.stringify({ errorCorrectionLevel: t })).then((n) => i(n)), this.setCharacterSet = async (e, t) => (await a(this, G)).setBarcodeProperties(e, JSON.stringify({ characterSet: t })).then((n) => i(n)), this.setDrawLightMarginIndicator = async (e, t) => {
|
|
576
|
+
const r = { drawStartStopChars: t };
|
|
577
|
+
return this.setBarcodeProperties(e, r);
|
|
578
|
+
}, this.setDrawStartStopChars = async (e, t) => {
|
|
579
|
+
const r = { drawStartStopChars: t };
|
|
580
|
+
return this.setBarcodeProperties(e, r);
|
|
581
|
+
}, this.getBarcodeConfigationOptions = (e) => {
|
|
582
|
+
let t = !0, r = !0, n = !0, c, h, l = !1, p = !1, y = !1;
|
|
583
|
+
switch (e) {
|
|
584
|
+
case $.qr:
|
|
585
|
+
c = [vt.iso8859_1, vt.utf8], h = [
|
|
586
|
+
Jt.low,
|
|
587
|
+
Jt.medium,
|
|
588
|
+
Jt.quartile,
|
|
589
|
+
Jt.high
|
|
590
590
|
];
|
|
591
|
-
case
|
|
592
|
-
|
|
591
|
+
case $.dataMatrix:
|
|
592
|
+
t = !1, r = !1, n = !1, l = !0;
|
|
593
593
|
break;
|
|
594
|
-
case
|
|
595
|
-
|
|
594
|
+
case $.ean13:
|
|
595
|
+
t = !1, p = !0;
|
|
596
596
|
break;
|
|
597
|
-
case
|
|
597
|
+
case $.ean8:
|
|
598
598
|
p = !0;
|
|
599
|
-
case
|
|
600
|
-
case
|
|
601
|
-
|
|
599
|
+
case $.upca:
|
|
600
|
+
case $.upce:
|
|
601
|
+
t = !1;
|
|
602
602
|
break;
|
|
603
|
-
case
|
|
604
|
-
case
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
603
|
+
case $.code128:
|
|
604
|
+
case $.gs1128:
|
|
605
|
+
c = [
|
|
606
|
+
vt.code128a,
|
|
607
|
+
vt.code128b,
|
|
608
|
+
vt.code128c
|
|
609
609
|
];
|
|
610
610
|
break;
|
|
611
|
-
case
|
|
611
|
+
case $.code39:
|
|
612
612
|
y = !0;
|
|
613
613
|
break;
|
|
614
614
|
}
|
|
@@ -616,9 +616,9 @@ class Me {
|
|
|
616
616
|
allowEnableMagnification: n,
|
|
617
617
|
allowBarHeight: r,
|
|
618
618
|
allowQuietZone: !0,
|
|
619
|
-
allowedCharacterSets:
|
|
620
|
-
allowedErrorCorrectionLevels:
|
|
621
|
-
allowToggleText:
|
|
619
|
+
allowedCharacterSets: c,
|
|
620
|
+
allowedErrorCorrectionLevels: h,
|
|
621
|
+
allowToggleText: t,
|
|
622
622
|
quietZoneAlwaysCombined: l,
|
|
623
623
|
allowToggleLightMarginIndicator: p,
|
|
624
624
|
allowToggleDrawStartAndEndChar: y
|
|
@@ -627,8 +627,8 @@ class Me {
|
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
G = new WeakMap();
|
|
630
|
-
function
|
|
631
|
-
const o = s.fontFamilies.length > 0 ? String(s.fontFamilies[0].connectorId) : "",
|
|
630
|
+
function Sr(s) {
|
|
631
|
+
const o = s.fontFamilies.length > 0 ? String(s.fontFamilies[0].connectorId) : "", e = {
|
|
632
632
|
id: s.id ?? "",
|
|
633
633
|
name: s.name ?? "",
|
|
634
634
|
dateCreated: "",
|
|
@@ -646,10 +646,10 @@ function Cr(s) {
|
|
|
646
646
|
id: s.id ?? "",
|
|
647
647
|
name: s.name ?? "",
|
|
648
648
|
fontConnectorId: o,
|
|
649
|
-
brandKit:
|
|
649
|
+
brandKit: e
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function br(s) {
|
|
653
653
|
return {
|
|
654
654
|
id: s.id ?? "",
|
|
655
655
|
version: s.version ?? "",
|
|
@@ -663,30 +663,30 @@ function mr(s) {
|
|
|
663
663
|
themes: s.themes
|
|
664
664
|
};
|
|
665
665
|
}
|
|
666
|
-
var
|
|
667
|
-
let
|
|
666
|
+
var A, ys;
|
|
667
|
+
let Ue = (ys = class {
|
|
668
668
|
/**
|
|
669
669
|
* @ignore
|
|
670
670
|
*/
|
|
671
|
-
constructor(o,
|
|
671
|
+
constructor(o, e) {
|
|
672
672
|
/**
|
|
673
673
|
* @ignore
|
|
674
674
|
*/
|
|
675
|
-
u(this,
|
|
676
|
-
this.getId = async () => (await a(this,
|
|
677
|
-
const r = await (await a(this,
|
|
678
|
-
if (
|
|
675
|
+
u(this, A);
|
|
676
|
+
this.getId = async () => (await a(this, A)).getBrandKitId().then((r) => i(r)), this.getVersion = async () => (await a(this, A)).getBrandKitVersion().then((r) => i(r)), this.getName = async () => (await a(this, A)).getBrandKitName().then((r) => i(r)), this.rename = async (t) => (await a(this, A)).renameBrandKit(t).then((n) => i(n)), this.updateIdAndVersion = async (t, r) => (await a(this, A)).updateBrandKitIdAndVersion(t, r).then((c) => i(c)), this.get = async () => {
|
|
677
|
+
const r = await (await a(this, A)).getBrandKit(), n = i(r), c = n.parsedData;
|
|
678
|
+
if (c == null)
|
|
679
679
|
throw new Error("Brand kit response has no data");
|
|
680
680
|
return {
|
|
681
681
|
...n,
|
|
682
|
-
parsedData:
|
|
682
|
+
parsedData: Sr(c)
|
|
683
683
|
};
|
|
684
|
-
}, this.getAllMedia = async () => (await a(this,
|
|
685
|
-
const r = (await this.colorStyleController.getAll()).parsedData || [],
|
|
684
|
+
}, this.getAllMedia = async () => (await a(this, A)).getAllBrandKitMedia().then((r) => i(r)), this.addMedia = async (t, r, n) => (await a(this, A)).addBrandKitMedia(t, r, n).then((h) => i(h)), this.updateMedia = async (t, r, n) => (await a(this, A)).updateBrandKitMedia(t, r, n).then((h) => i(h)), this.renameMedia = async (t, r) => (await a(this, A)).renameBrandKitMedia(t, r).then((c) => i(c)), this.removeMedia = async (t) => (await a(this, A)).removeBrandKitMedia(t).then((n) => i(n)), this.remove = async () => {
|
|
685
|
+
const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.gradientStyleController.getAll()).parsedData || [], l = (await this.paragraphStyleController.getAll()).parsedData || [], y = (await this.characterStyleController.getAll()).parsedData || [], S = (await this.fontController.getFontFamilies()).parsedData || [], E = (await this.getAllMedia()).parsedData || [];
|
|
686
686
|
await this.undoManagerController.record("brandKit.remove", async (O) => {
|
|
687
687
|
for (const f of r)
|
|
688
688
|
await O.colorStyle.remove(f.id);
|
|
689
|
-
for (const f of
|
|
689
|
+
for (const f of c)
|
|
690
690
|
await O.gradientStyle.remove(f.id);
|
|
691
691
|
for (const f of l)
|
|
692
692
|
await O.paragraphStyle.remove(f.id);
|
|
@@ -697,19 +697,19 @@ let Ve = (ls = class {
|
|
|
697
697
|
for (const f of E)
|
|
698
698
|
await this.removeMedia(f.name);
|
|
699
699
|
});
|
|
700
|
-
}, this.set = async (
|
|
701
|
-
const n = await (await a(this,
|
|
702
|
-
if (
|
|
700
|
+
}, this.set = async (t) => {
|
|
701
|
+
const n = await (await a(this, A)).setBrandKit(JSON.stringify(t.brandKit)), c = i(n), h = c.parsedData;
|
|
702
|
+
if (h == null)
|
|
703
703
|
throw new Error("Brand kit set response has no data");
|
|
704
704
|
return {
|
|
705
|
-
...
|
|
706
|
-
parsedData:
|
|
705
|
+
...c,
|
|
706
|
+
parsedData: br(h)
|
|
707
707
|
};
|
|
708
|
-
}, this.isAutoSync = async () => (await a(this,
|
|
708
|
+
}, this.isAutoSync = async () => (await a(this, A)).isBrandKitAutoSync().then((r) => i(r)), this.enableAutoSync = async (t) => (await a(this, A)).enableBrandKitAutoSync(t).then((n) => i(n)), g(this, A, o), this.colorStyleController = e.colorStyle, this.gradientStyleController = e.gradientStyle, this.fontController = e.font, this.mediaController = e.mediaConnector, this.paragraphStyleController = e.paragraphStyle, this.characterStyleController = e.characterStyle, this.undoManagerController = e.undoManager;
|
|
709
709
|
}
|
|
710
|
-
},
|
|
711
|
-
var
|
|
712
|
-
class
|
|
710
|
+
}, A = new WeakMap(), ys);
|
|
711
|
+
var st;
|
|
712
|
+
class ce {
|
|
713
713
|
/**
|
|
714
714
|
* @ignore
|
|
715
715
|
*/
|
|
@@ -717,13 +717,13 @@ class ne {
|
|
|
717
717
|
/**
|
|
718
718
|
* @ignore
|
|
719
719
|
*/
|
|
720
|
-
u(this,
|
|
721
|
-
this.zoomToPage = async (
|
|
720
|
+
u(this, st);
|
|
721
|
+
this.zoomToPage = async (e, t, r, n, c) => (e !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await a(this, st)).zoomToPage(t, r, n, c).then((l) => i(l))), this.getZoomPercentage = async () => (await a(this, st)).getZoomPercentage().then((t) => i(t)), this.setZoomPercentage = async (e) => (await a(this, st)).setZoomPercentage(e).then((r) => i(r)), this.setViewMode = async (e) => (await a(this, st)).setViewMode(e).then((r) => i(r)), g(this, st, o);
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
|
-
|
|
724
|
+
st = new WeakMap();
|
|
725
725
|
var V;
|
|
726
|
-
class
|
|
726
|
+
class ke {
|
|
727
727
|
/**
|
|
728
728
|
* @ignore
|
|
729
729
|
*/
|
|
@@ -732,12 +732,12 @@ class Be {
|
|
|
732
732
|
* @ignore
|
|
733
733
|
*/
|
|
734
734
|
u(this, V);
|
|
735
|
-
this.getAll = async () => (await a(this, V)).getCharacterStyles().then((
|
|
735
|
+
this.getAll = async () => (await a(this, V)).getCharacterStyles().then((t) => i(t)), this.getById = async (e) => (await a(this, V)).getCharacterStyleById(e).then((r) => i(r)), this.create = async () => (await a(this, V)).createCharacterStyle().then((t) => i(t)), this.update = async (e, t) => (await a(this, V)).updateCharacterStyle(e, JSON.stringify(t)).then((n) => i(n)), this.remove = async (e) => (await a(this, V)).removeCharacterStyle(e).then((r) => i(r)), this.duplicate = async (e) => (await a(this, V)).duplicateCharacterStyle(e).then((r) => i(r)), this.rename = async (e, t) => (await a(this, V)).renameCharacterStyle(e, t).then((n) => i(n)), this.move = async (e, t) => (await a(this, V)).moveCharacterStyles(e, t).then((n) => i(n)), g(this, V, o);
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
738
|
V = new WeakMap();
|
|
739
|
-
var
|
|
740
|
-
class
|
|
739
|
+
var rt;
|
|
740
|
+
class Ge {
|
|
741
741
|
/**
|
|
742
742
|
* @ignore
|
|
743
743
|
*/
|
|
@@ -745,25 +745,25 @@ class Je {
|
|
|
745
745
|
/**
|
|
746
746
|
* @ignore
|
|
747
747
|
*/
|
|
748
|
-
u(this,
|
|
749
|
-
this.copyFrames = async (
|
|
750
|
-
const r = await (await a(this,
|
|
748
|
+
u(this, rt);
|
|
749
|
+
this.copyFrames = async (e) => {
|
|
750
|
+
const r = await (await a(this, rt)).copyFrames(e);
|
|
751
751
|
return r.data && await navigator.clipboard.writeText(r.data), i(r);
|
|
752
|
-
}, this.cutFrames = async (
|
|
753
|
-
const r = await (await a(this,
|
|
752
|
+
}, this.cutFrames = async (e) => {
|
|
753
|
+
const r = await (await a(this, rt)).cutFrames(e);
|
|
754
754
|
return r.data && await navigator.clipboard.writeText(r.data), i(r);
|
|
755
755
|
}, this.pasteFrames = async () => {
|
|
756
|
-
const
|
|
756
|
+
const e = await a(this, rt), t = await navigator.clipboard.readText(), r = await e.pasteFrames(t);
|
|
757
757
|
return i(r);
|
|
758
758
|
}, this.getContentType = async () => {
|
|
759
|
-
const
|
|
759
|
+
const e = await a(this, rt), t = await navigator.clipboard.readText(), r = await e.getClipboardContentType(t);
|
|
760
760
|
return i(r);
|
|
761
|
-
}, g(this,
|
|
761
|
+
}, g(this, rt, o);
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
|
-
|
|
765
|
-
var
|
|
766
|
-
class
|
|
764
|
+
rt = new WeakMap();
|
|
765
|
+
var Ht;
|
|
766
|
+
class Te {
|
|
767
767
|
/**
|
|
768
768
|
* @ignore
|
|
769
769
|
*/
|
|
@@ -771,13 +771,13 @@ class Ue {
|
|
|
771
771
|
/**
|
|
772
772
|
* @ignore
|
|
773
773
|
*/
|
|
774
|
-
u(this,
|
|
775
|
-
this.convertToRgb = async (
|
|
774
|
+
u(this, Ht);
|
|
775
|
+
this.convertToRgb = async (e) => (await a(this, Ht)).colorToRgb(JSON.stringify(e)).then((r) => i(r)), g(this, Ht, o);
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
|
|
779
|
-
var
|
|
780
|
-
class
|
|
778
|
+
Ht = new WeakMap();
|
|
779
|
+
var he = /* @__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))(he || {}), vr = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(vr || {}), J;
|
|
780
|
+
class _e {
|
|
781
781
|
/**
|
|
782
782
|
* @ignore
|
|
783
783
|
*/
|
|
@@ -785,113 +785,113 @@ class ke {
|
|
|
785
785
|
/**
|
|
786
786
|
* @ignore
|
|
787
787
|
*/
|
|
788
|
-
u(this,
|
|
789
|
-
this.getAll = async () => (await a(this,
|
|
790
|
-
const r = await a(this,
|
|
791
|
-
return n.type ===
|
|
792
|
-
}, this.remove = async (
|
|
788
|
+
u(this, J);
|
|
789
|
+
this.getAll = async () => (await a(this, J)).getColors().then((t) => i(t)), this.getById = async (e) => (await a(this, J)).getColorById(e).then((r) => i(r)), this.create = async () => (await a(this, J)).createColor().then((t) => i(t)), this.duplicate = async (e) => (await a(this, J)).duplicateColor(e).then((r) => i(r)), this.move = async (e, t) => (await a(this, J)).moveColors(e, t).then((n) => i(n)), this.rename = async (e, t) => (await a(this, J)).renameColor(e, t).then((n) => i(n)), this.update = async (e, t) => {
|
|
790
|
+
const r = await a(this, J), n = t;
|
|
791
|
+
return n.type === he.spot && (n.type = he.spotCMYK), r.updateColor(e, JSON.stringify(n)).then((c) => i(c));
|
|
792
|
+
}, this.remove = async (e) => (await a(this, J)).removeColor(e).then((r) => i(r)), g(this, J, o);
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
-
|
|
796
|
-
var
|
|
797
|
-
class
|
|
798
|
-
constructor(o,
|
|
799
|
-
this.direction = "engineToConnector", this.name = o, this.direction = r,
|
|
795
|
+
J = new WeakMap();
|
|
796
|
+
var Gt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Gt || {}), de = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(de || {}), Tt = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(Tt || {}), Ir = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s.components = "components", s))(Ir || {}), Ar = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(Ar || {}), Pr = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(Pr || {}), Or = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(Or || {}), Fr = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(Fr || {}), Bt = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Bt || {});
|
|
797
|
+
class Zn {
|
|
798
|
+
constructor(o, e, t, r = "engineToConnector") {
|
|
799
|
+
this.direction = "engineToConnector", this.name = o, this.direction = r, e === "var" ? this.value = `${e}.${t}` : this.value = t;
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
|
-
var
|
|
803
|
-
const
|
|
802
|
+
var Er = /* @__PURE__ */ ((s) => (s.variable = "var", s.value = "value", s))(Er || {}), Dr = /* @__PURE__ */ ((s) => (s.engineToConnector = "engineToConnector", s.connectorToEngine = "connectorToEngine", s))(Dr || {}), le = /* @__PURE__ */ ((s) => (s.loading = "loading", s.loaded = "loaded", s.running = "running", s.ready = "ready", s.error = "error", s))(le || {}), Lr = /* @__PURE__ */ ((s) => (s.stateChanged = "stateChanged", s.authChanged = "authChanged", s.reloadRequired = "reloadRequired", s.unloaded = "unloaded", s))(Lr || {});
|
|
803
|
+
const Qn = {
|
|
804
804
|
url: "grafx-media.json",
|
|
805
805
|
source: "local"
|
|
806
806
|
/* local */
|
|
807
807
|
};
|
|
808
|
-
class
|
|
809
|
-
constructor(o,
|
|
810
|
-
this.type = "grafxToken", this.token = o, this.headers =
|
|
808
|
+
class Xn {
|
|
809
|
+
constructor(o, e) {
|
|
810
|
+
this.type = "grafxToken", this.token = o, this.headers = e;
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
|
-
class
|
|
813
|
+
class ta {
|
|
814
814
|
constructor(o) {
|
|
815
815
|
this.type = "refreshed", this.headers = o;
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
|
-
var
|
|
819
|
-
class
|
|
820
|
-
constructor(o,
|
|
821
|
-
super(o), this.type =
|
|
818
|
+
var Nr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.refreshed = "refreshed", s))(Nr || {}), xr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.any = "any", s))(xr || {}), As = /* @__PURE__ */ ((s) => (s.minDimension = "minDimension", s))(As || {});
|
|
819
|
+
class Mr extends Error {
|
|
820
|
+
constructor(o, e) {
|
|
821
|
+
super(o), this.type = e;
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
var
|
|
825
|
-
class
|
|
824
|
+
var Rr = /* @__PURE__ */ ((s) => (s.StaticKey = "staticKey", s.OAuth2ClientCredentials = "oAuth2ClientCredentials", s.OAuth2AuthorizationCode = "oAuth2AuthorizationCode", s.OAuth2ResourceOwnerPassword = "oAuth2ResourceOwnerPassword", s.OAuth2JwtBearer = "oAuth2JwtBearer", s.None = "none", s))(Rr || {});
|
|
825
|
+
class ne {
|
|
826
826
|
constructor() {
|
|
827
827
|
this.makeConnectorSourceForwardsCompatible = (o) => {
|
|
828
|
-
if (o.source !=
|
|
828
|
+
if (o.source != Bt.grafx || this.isSourceMigrated(o))
|
|
829
829
|
return o;
|
|
830
|
-
let
|
|
831
|
-
for (;
|
|
832
|
-
|
|
833
|
-
const
|
|
834
|
-
return { id:
|
|
835
|
-
}, this.makeMultipleConnectorsBackwardsCompatible = (o,
|
|
830
|
+
let e = o.url;
|
|
831
|
+
for (; e.endsWith("/"); )
|
|
832
|
+
e = e.substring(0, e.length - 1);
|
|
833
|
+
const t = e.split("/");
|
|
834
|
+
return { id: t[t.length - 1], source: Bt.grafx };
|
|
835
|
+
}, this.makeMultipleConnectorsBackwardsCompatible = (o, e) => o.map((t) => this.makeSingleConnectorBackwardsCompatible(t, e)), this.makeSingleConnectorBackwardsCompatible = (o, e) => o.source.source != Bt.grafx ? o : {
|
|
836
836
|
id: o.id,
|
|
837
837
|
name: o.name,
|
|
838
838
|
iconUrl: o.iconUrl,
|
|
839
|
-
source: this.makeConnectorSourceBackwardsCompatible(o.source,
|
|
840
|
-
}, this.makeConnectorSourceBackwardsCompatible = (o,
|
|
841
|
-
let
|
|
842
|
-
for (;
|
|
843
|
-
|
|
839
|
+
source: this.makeConnectorSourceBackwardsCompatible(o.source, e)
|
|
840
|
+
}, this.makeConnectorSourceBackwardsCompatible = (o, e) => {
|
|
841
|
+
let t = e;
|
|
842
|
+
for (; t != null && t.endsWith("/"); )
|
|
843
|
+
t = t.substring(0, t.length - 1);
|
|
844
844
|
return {
|
|
845
|
-
url: `${
|
|
846
|
-
source:
|
|
845
|
+
url: `${t}/connectors/${o.id}`,
|
|
846
|
+
source: Bt.grafx
|
|
847
847
|
};
|
|
848
848
|
}, this.isSourceMigrated = (o) => "id" in o;
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
var x,
|
|
852
|
-
let
|
|
851
|
+
var x, It, ut, ps;
|
|
852
|
+
let He = (ps = class {
|
|
853
853
|
/**
|
|
854
854
|
* @ignore
|
|
855
855
|
*/
|
|
856
|
-
constructor(o,
|
|
856
|
+
constructor(o, e) {
|
|
857
857
|
/**
|
|
858
858
|
* @ignore
|
|
859
859
|
*/
|
|
860
860
|
u(this, x);
|
|
861
|
-
u(this,
|
|
862
|
-
u(this,
|
|
863
|
-
this.getById = async (
|
|
864
|
-
const
|
|
865
|
-
return n.parsedData && (
|
|
861
|
+
u(this, It);
|
|
862
|
+
u(this, ut);
|
|
863
|
+
this.getById = async (t) => (await a(this, x)).getConnectorById(t).then((n) => i(n)).then((n) => {
|
|
864
|
+
const c = { ...n, parsedData: null };
|
|
865
|
+
return n.parsedData && (c.parsedData = a(this, ut).makeSingleConnectorBackwardsCompatible(
|
|
866
866
|
n.parsedData,
|
|
867
|
-
a(this,
|
|
868
|
-
)),
|
|
869
|
-
}), this.getAllByType = async (
|
|
870
|
-
const
|
|
871
|
-
return n.parsedData && (
|
|
867
|
+
a(this, It).get(tt.GraFxStudioEnvironmentApiUrl)
|
|
868
|
+
)), c;
|
|
869
|
+
}), this.getAllByType = async (t) => (await a(this, x)).getConnectors(t).then((n) => i(n)).then((n) => {
|
|
870
|
+
const c = { ...n, parsedData: null };
|
|
871
|
+
return n.parsedData && (c.parsedData = a(this, ut).makeMultipleConnectorsBackwardsCompatible(
|
|
872
872
|
n.parsedData,
|
|
873
|
-
a(this,
|
|
874
|
-
)),
|
|
875
|
-
}), this.register = async (
|
|
876
|
-
const r = await a(this, x), n = a(this,
|
|
877
|
-
return r.registerConnector(JSON.stringify(n)).then((
|
|
878
|
-
}, this.unregister = async (
|
|
873
|
+
a(this, It).get(tt.GraFxStudioEnvironmentApiUrl)
|
|
874
|
+
)), c;
|
|
875
|
+
}), this.register = async (t) => {
|
|
876
|
+
const r = await a(this, x), n = a(this, ut).makeConnectorSourceForwardsCompatible(t);
|
|
877
|
+
return r.registerConnector(JSON.stringify(n)).then((c) => i(c));
|
|
878
|
+
}, this.unregister = async (t) => (await a(this, x)).unregisterConnector(t).then((n) => i(n)), this.configure = async (t, r) => {
|
|
879
879
|
const n = await a(this, x);
|
|
880
|
-
return await this.waitToBeReady(
|
|
881
|
-
}, this.getState = async (
|
|
880
|
+
return await this.waitToBeReady(t), await r(new Vr(t, n)), n.updateConnectorConfiguration(t).then((c) => i(c));
|
|
881
|
+
}, this.getState = async (t) => (await a(this, x)).getConnectorState(t).then((n) => i(n)), this.getOptions = async (t) => (await a(this, x)).getConnectorOptions(t).then((n) => i(n)), this.waitToBeReady = async (t, r = 2e3) => {
|
|
882
882
|
let n = Math.max(r, 500);
|
|
883
883
|
n = Math.min(n, 5e3);
|
|
884
|
-
const
|
|
885
|
-
let
|
|
884
|
+
const c = 100;
|
|
885
|
+
let h = 0;
|
|
886
886
|
try {
|
|
887
|
-
for (;
|
|
888
|
-
const l = await this.getState(
|
|
889
|
-
if (l.success && l.parsedData && (l.parsedData.type ===
|
|
887
|
+
for (; h * c < n; ) {
|
|
888
|
+
const l = await this.getState(t);
|
|
889
|
+
if (l.success && l.parsedData && (l.parsedData.type === le.running || l.parsedData.type === le.ready))
|
|
890
890
|
return i(
|
|
891
891
|
{ data: null, success: !0, error: void 0, status: 0, parsedData: void 0 },
|
|
892
892
|
!1
|
|
893
893
|
);
|
|
894
|
-
await new Promise((p) => setTimeout(p,
|
|
894
|
+
await new Promise((p) => setTimeout(p, c)), h++;
|
|
895
895
|
}
|
|
896
896
|
} catch (l) {
|
|
897
897
|
return i(
|
|
@@ -915,82 +915,85 @@ let Ge = (us = class {
|
|
|
915
915
|
},
|
|
916
916
|
!1
|
|
917
917
|
);
|
|
918
|
-
}, this.updateMappings = async (
|
|
919
|
-
const { parsedData:
|
|
918
|
+
}, this.updateMappings = async (t, r) => await this.configure(t, async (n) => {
|
|
919
|
+
const { parsedData: c } = await this.getMappings(t), h = (c == null ? void 0 : c.filter(
|
|
920
920
|
(y) => !r.some(
|
|
921
921
|
(b) => b.name === y.name && b.direction === y.direction
|
|
922
922
|
)
|
|
923
|
-
)) ?? [], l = r.filter((y) => y.name !== "" && y.value !== ""), p = [...
|
|
923
|
+
)) ?? [], l = r.filter((y) => y.name !== "" && y.value !== ""), p = [...h, ...l];
|
|
924
924
|
await n.setMappings(p);
|
|
925
|
-
}), this.
|
|
925
|
+
}), this.applyMappings = async (t, r) => await this.configure(t, async (n) => {
|
|
926
|
+
const c = r.filter((h) => h.name !== "" && h.value !== "");
|
|
927
|
+
await n.setMappings(c);
|
|
928
|
+
}), this.setHttpHeaders = async (t, r) => (await a(this, x)).remoteConnectorAuthenticationSetHttpHeaders(t, JSON.stringify(r)).then((c) => i(c)), g(this, x, o), g(this, It, e), g(this, ut, new ne());
|
|
926
929
|
}
|
|
927
|
-
async getMappings(o,
|
|
930
|
+
async getMappings(o, e) {
|
|
928
931
|
return (await a(this, x)).getConnectorMappings(o).then((r) => i(r)).then(
|
|
929
932
|
(r) => {
|
|
930
933
|
var n;
|
|
931
|
-
return
|
|
934
|
+
return e ? {
|
|
932
935
|
...r,
|
|
933
|
-
parsedData: (n = r.parsedData) == null ? void 0 : n.filter((
|
|
936
|
+
parsedData: (n = r.parsedData) == null ? void 0 : n.filter((c) => c.direction === e)
|
|
934
937
|
} : r;
|
|
935
938
|
}
|
|
936
939
|
);
|
|
937
940
|
}
|
|
938
|
-
}, x = new WeakMap(),
|
|
939
|
-
var
|
|
940
|
-
class
|
|
941
|
+
}, x = new WeakMap(), It = new WeakMap(), ut = new WeakMap(), ps);
|
|
942
|
+
var gt, yt;
|
|
943
|
+
class Vr {
|
|
941
944
|
/**
|
|
942
945
|
* @ignore
|
|
943
946
|
*/
|
|
944
|
-
constructor(o,
|
|
947
|
+
constructor(o, e) {
|
|
945
948
|
/**
|
|
946
949
|
* @ignore
|
|
947
950
|
*/
|
|
948
|
-
u(this, ut);
|
|
949
951
|
u(this, gt);
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
952
|
+
u(this, yt);
|
|
953
|
+
this.setOptions = async (t) => a(this, yt).setConnectorOptions(a(this, gt), JSON.stringify(t)).then((r) => i(r)), this.setMappings = async (t) => {
|
|
954
|
+
const r = await a(this, yt).setConnectorMappings(
|
|
955
|
+
a(this, gt),
|
|
956
|
+
t.map(function(n) {
|
|
954
957
|
return JSON.stringify(n);
|
|
955
958
|
})
|
|
956
959
|
);
|
|
957
960
|
return i(r);
|
|
958
|
-
}, this.setHttpHeader = async (
|
|
961
|
+
}, this.setHttpHeader = async (t, r) => a(this, yt).connectorAuthenticationSetHttpHeader(a(this, gt), t, r).then((n) => i(n)), g(this, gt, o), g(this, yt, e);
|
|
959
962
|
}
|
|
960
963
|
}
|
|
961
|
-
|
|
962
|
-
var
|
|
963
|
-
class
|
|
964
|
+
gt = new WeakMap(), yt = new WeakMap();
|
|
965
|
+
var Y, At;
|
|
966
|
+
class $e {
|
|
964
967
|
/**
|
|
965
968
|
* @ignore
|
|
966
969
|
*/
|
|
967
|
-
constructor(o,
|
|
970
|
+
constructor(o, e) {
|
|
968
971
|
/**
|
|
969
972
|
* @ignore
|
|
970
973
|
*/
|
|
971
|
-
u(this,
|
|
974
|
+
u(this, Y);
|
|
972
975
|
u(this, At);
|
|
973
|
-
this.getPageItemById = async (
|
|
974
|
-
const l = await (await a(this,
|
|
975
|
-
|
|
976
|
+
this.getPageItemById = async (t, r, n, c = {}) => {
|
|
977
|
+
const l = await (await a(this, Y)).dataConnectorGetPageItemById(
|
|
978
|
+
t,
|
|
976
979
|
r,
|
|
977
980
|
JSON.stringify(n),
|
|
978
|
-
JSON.stringify(
|
|
981
|
+
JSON.stringify(c)
|
|
979
982
|
), p = i(l), y = { ...p, parsedData: null };
|
|
980
983
|
return p.parsedData && (y.parsedData = {
|
|
981
984
|
...p.parsedData,
|
|
982
985
|
data: a(this, At).mapEngineToDataItem(p.parsedData.data)
|
|
983
986
|
}), y;
|
|
984
|
-
}, this.
|
|
987
|
+
}, this.getConfigurationOptions = async (t) => (await a(this, Y)).dataConnectorGetConfigurationOptions(t).then((n) => i(n)), this.getCapabilities = async (t) => (await a(this, Y)).dataConnectorGetCapabilities(t).then((n) => i(n)), g(this, Y, o), g(this, At, e);
|
|
985
988
|
}
|
|
986
|
-
async getPage(o,
|
|
987
|
-
const { previousPageToken: r, continuationToken: n } =
|
|
989
|
+
async getPage(o, e, t = {}) {
|
|
990
|
+
const { previousPageToken: r, continuationToken: n } = e;
|
|
988
991
|
if (r != null && n != null)
|
|
989
992
|
throw new Error(
|
|
990
993
|
'Invalid page config: "previousPageToken" and "continuationToken" are mutually exclusive. Provide only one to indicate navigation direction.'
|
|
991
994
|
);
|
|
992
|
-
const
|
|
993
|
-
|
|
995
|
+
const h = await (await a(this, Y)).dataConnectorGetPage(o, JSON.stringify(e), JSON.stringify(t)), l = i(
|
|
996
|
+
h
|
|
994
997
|
), p = { ...l, parsedData: null };
|
|
995
998
|
return l.parsedData && (p.parsedData = {
|
|
996
999
|
...l.parsedData,
|
|
@@ -999,28 +1002,37 @@ class _e {
|
|
|
999
1002
|
)
|
|
1000
1003
|
}), p;
|
|
1001
1004
|
}
|
|
1005
|
+
/**
|
|
1006
|
+
* Query a specific DataConnector for a data model using the dynamic context as parameter.
|
|
1007
|
+
* @param connectorId unique id of the data connector
|
|
1008
|
+
* @param context context that will be available in the connector script.
|
|
1009
|
+
* @returns DataModel or DataSourceVariableDataModel
|
|
1010
|
+
*/
|
|
1011
|
+
async getModel(o, e = {}) {
|
|
1012
|
+
return (await a(this, Y)).dataConnectorGetModel(o, JSON.stringify(e)).then((r) => i(r));
|
|
1013
|
+
}
|
|
1002
1014
|
}
|
|
1003
|
-
|
|
1004
|
-
var
|
|
1005
|
-
class
|
|
1015
|
+
Y = new WeakMap(), At = new WeakMap();
|
|
1016
|
+
var nt, $t;
|
|
1017
|
+
class ze {
|
|
1006
1018
|
/**
|
|
1007
1019
|
* @ignore
|
|
1008
1020
|
*/
|
|
1009
|
-
constructor(o,
|
|
1021
|
+
constructor(o, e) {
|
|
1010
1022
|
/**
|
|
1011
1023
|
* @ignore
|
|
1012
1024
|
*/
|
|
1013
|
-
u(this,
|
|
1014
|
-
u(this,
|
|
1015
|
-
this.setDataSource = async (
|
|
1016
|
-
const r = await a(this,
|
|
1017
|
-
return r.setDataRow(JSON.stringify(n)).then((
|
|
1018
|
-
}, g(this,
|
|
1025
|
+
u(this, nt);
|
|
1026
|
+
u(this, $t);
|
|
1027
|
+
this.setDataSource = async (t) => (await a(this, nt)).setDataSource(t).then((n) => i(n)), this.getDataSource = async () => (await a(this, nt)).getDataSource().then((r) => i(r)), this.removeDataSource = async () => (await a(this, nt)).removeDataSource().then((r) => i(r)), this.setDataRow = async (t) => {
|
|
1028
|
+
const r = await a(this, nt), n = a(this, $t).mapDataItemToEngine(t);
|
|
1029
|
+
return r.setDataRow(JSON.stringify(n)).then((c) => i(c));
|
|
1030
|
+
}, g(this, nt, o), g(this, $t, e);
|
|
1019
1031
|
}
|
|
1020
1032
|
}
|
|
1021
|
-
|
|
1022
|
-
var
|
|
1023
|
-
class
|
|
1033
|
+
nt = new WeakMap(), $t = new WeakMap();
|
|
1034
|
+
var at;
|
|
1035
|
+
class Ke {
|
|
1024
1036
|
/**
|
|
1025
1037
|
* @ignore
|
|
1026
1038
|
*/
|
|
@@ -1028,13 +1040,13 @@ class He {
|
|
|
1028
1040
|
/**
|
|
1029
1041
|
* @ignore
|
|
1030
1042
|
*/
|
|
1031
|
-
u(this,
|
|
1032
|
-
this.getAllLogs = async () => (await a(this,
|
|
1043
|
+
u(this, at);
|
|
1044
|
+
this.getAllLogs = async () => (await a(this, at)).getLogs().then((t) => i(t)), this.toggleDebugPanel = async () => (await a(this, at)).toggleDebugPanel().then((t) => i(t)), this.enableDebug = async () => (await a(this, at)).enableDebug().then((t) => i(t)), this.disableDebug = async () => (await a(this, at)).disableDebug().then((t) => i(t)), g(this, at, o);
|
|
1033
1045
|
}
|
|
1034
1046
|
}
|
|
1035
|
-
|
|
1036
|
-
var
|
|
1037
|
-
class
|
|
1047
|
+
at = new WeakMap();
|
|
1048
|
+
var pt;
|
|
1049
|
+
class je {
|
|
1038
1050
|
/**
|
|
1039
1051
|
* @ignore
|
|
1040
1052
|
*/
|
|
@@ -1042,30 +1054,30 @@ class $e {
|
|
|
1042
1054
|
/**
|
|
1043
1055
|
* @ignore
|
|
1044
1056
|
*/
|
|
1045
|
-
u(this,
|
|
1046
|
-
this.getCurrentState = async () => (await a(this,
|
|
1047
|
-
const r = await a(this,
|
|
1048
|
-
return r.loadDocument(n, JSON.stringify(
|
|
1049
|
-
}, this.createAndLoad = async (
|
|
1050
|
-
const
|
|
1051
|
-
return
|
|
1052
|
-
}, g(this,
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
var
|
|
1057
|
-
class
|
|
1057
|
+
u(this, pt);
|
|
1058
|
+
this.getCurrentState = async () => (await a(this, pt)).getCurrentDocumentState().then((t) => i(t)), this.load = async (e, t = { keepConnectors: !1 }) => {
|
|
1059
|
+
const r = await a(this, pt), n = typeof e != "string" ? JSON.stringify(e) : e;
|
|
1060
|
+
return r.loadDocument(n, JSON.stringify(t)).then((c) => i(c));
|
|
1061
|
+
}, this.createAndLoad = async (e) => {
|
|
1062
|
+
const t = await a(this, pt), r = JSON.stringify(e);
|
|
1063
|
+
return t.createAndLoadDocument(r).then((n) => i(n));
|
|
1064
|
+
}, g(this, pt, o);
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
pt = new WeakMap();
|
|
1068
|
+
var Jr = /* @__PURE__ */ ((s) => (s.resize = "resize", s.scale = "scale", s.scaleAndResize = "scaleAndResize", s))(Jr || {}), Br = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(Br || {}), se = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(se || {}), Ur = /* @__PURE__ */ ((s) => (s.connector = "connector", s))(Ur || {}), kr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s.component = "component", s))(kr || {}), Gr = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(Gr || {}), Tr = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Tr || {}), _r = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(_r || {}), Hr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Hr || {}), $r = /* @__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))($r || {}), zr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(zr || {}), Kr = /* @__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))(Kr || {}), jr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(jr || {}), Wr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(Wr || {}), qr = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(qr || {}), Yr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Yr || {});
|
|
1069
|
+
class sa {
|
|
1058
1070
|
constructor() {
|
|
1059
1071
|
this.type = "page";
|
|
1060
1072
|
}
|
|
1061
1073
|
}
|
|
1062
|
-
class
|
|
1063
|
-
constructor(o,
|
|
1064
|
-
this.type = "frame", this.frameId = o, this.edge =
|
|
1074
|
+
class ra {
|
|
1075
|
+
constructor(o, e) {
|
|
1076
|
+
this.type = "frame", this.frameId = o, this.edge = e;
|
|
1065
1077
|
}
|
|
1066
1078
|
}
|
|
1067
|
-
var
|
|
1068
|
-
class
|
|
1079
|
+
var Ps = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Ps || {}), B;
|
|
1080
|
+
class We {
|
|
1069
1081
|
/**
|
|
1070
1082
|
* @ignore
|
|
1071
1083
|
*/
|
|
@@ -1073,16 +1085,16 @@ class ze {
|
|
|
1073
1085
|
/**
|
|
1074
1086
|
* @ignore
|
|
1075
1087
|
*/
|
|
1076
|
-
u(this,
|
|
1077
|
-
this.insertImageVariableToFrame = async (
|
|
1078
|
-
const r = await a(this,
|
|
1079
|
-
return r.setImageSource(
|
|
1080
|
-
}, this.insertTextVariable = async (
|
|
1088
|
+
u(this, B);
|
|
1089
|
+
this.insertImageVariableToFrame = async (e, t) => {
|
|
1090
|
+
const r = await a(this, B), n = { id: t, type: se.variable };
|
|
1091
|
+
return r.setImageSource(e, JSON.stringify(n)).then((c) => i(c));
|
|
1092
|
+
}, this.insertTextVariable = async (e) => (await a(this, B)).insertTextVariable(e).then((r) => i(r)), this.enterTextEditMode = async (e) => (await a(this, B)).enterTextEditMode(e).then((r) => i(r)), this.exitTextEditMode = async () => (await a(this, B)).exitTextEditMode().then((t) => i(t)), this.getText = async (e, t) => (await a(this, B)).getTextByFrameId(e, t).then((n) => i(n)), this.setText = async (e, t) => (await a(this, B)).setTextByFrameId(e, t).then((n) => i(n)), this.selectText = async (e, t, r) => (await a(this, B)).selectTextById(e, t, r).then((c) => i(c)), this.addCustomUndoData = async (e, t, r) => (await a(this, B)).setCustomUndoData(e, t, r ?? !1).then((c) => i(c)), g(this, B, o);
|
|
1081
1093
|
}
|
|
1082
1094
|
}
|
|
1083
|
-
|
|
1084
|
-
var
|
|
1085
|
-
class
|
|
1095
|
+
B = new WeakMap();
|
|
1096
|
+
var it, Pt;
|
|
1097
|
+
class qe {
|
|
1086
1098
|
/**
|
|
1087
1099
|
* @ignore
|
|
1088
1100
|
*/
|
|
@@ -1090,17 +1102,17 @@ class Ke {
|
|
|
1090
1102
|
/**
|
|
1091
1103
|
* @ignore
|
|
1092
1104
|
*/
|
|
1093
|
-
u(this,
|
|
1094
|
-
u(this,
|
|
1095
|
-
this.query = async (
|
|
1096
|
-
if (
|
|
1097
|
-
if (
|
|
1098
|
-
}, g(this,
|
|
1105
|
+
u(this, it);
|
|
1106
|
+
u(this, Pt);
|
|
1107
|
+
this.query = async (e, t, r = {}) => (await a(this, it)).fontConnectorQuery(e, JSON.stringify(t), JSON.stringify(r)).then((c) => i(c)), this.detail = async (e, t, r = {}) => (await a(this, it)).fontConnectorDetail(e, t, JSON.stringify(r)).then((c) => i(c)), this.download = async (e, t, r = {}) => (await a(this, Pt)).fontConnectorDownload(e, t, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (e, t, r, n = {}) => (await a(this, Pt)).fontConnectorPreview(e, t, r, JSON.stringify(n)).then((h) => h ?? h), this.getConfigurationOptions = async (e) => (await a(this, it)).fontConnectorGetConfigurationOptions(e).then((r) => i(r)), this.getCapabilities = async (e) => (await a(this, it)).fontConnectorGetCapabilities(e).then((r) => i(r)), this.parseDeprecatedFontType = (e) => {
|
|
1108
|
+
if (e === Gt.file) return Tt.file;
|
|
1109
|
+
if (e === Gt.collection) return Tt.collection;
|
|
1110
|
+
}, g(this, it, o), g(this, Pt, o);
|
|
1099
1111
|
}
|
|
1100
1112
|
}
|
|
1101
|
-
|
|
1113
|
+
it = new WeakMap(), Pt = new WeakMap();
|
|
1102
1114
|
var P;
|
|
1103
|
-
class
|
|
1115
|
+
class Ye {
|
|
1104
1116
|
/**
|
|
1105
1117
|
* @ignore
|
|
1106
1118
|
*/
|
|
@@ -1109,12 +1121,12 @@ class We {
|
|
|
1109
1121
|
* @ignore
|
|
1110
1122
|
*/
|
|
1111
1123
|
u(this, P);
|
|
1112
|
-
this.addFontFamily = async (
|
|
1124
|
+
this.addFontFamily = async (e, t) => (await a(this, P)).addFontFamily(e, JSON.stringify(t)).then((n) => i(n)), this.removeFontFamily = async (e) => (await a(this, P)).removeFontFamily(e).then((r) => i(r)), this.addFontStyle = async (e, t) => (await a(this, P)).addFontStyle(e, JSON.stringify(t)).then((n) => i(n)), this.removeFontStyle = async (e) => (await a(this, P)).removeFontStyle(e).then((r) => i(r)), this.getFontFamilies = async () => (await a(this, P)).getFontFamilies().then((t) => i(t)), this.getFontStyles = async (e) => (await a(this, P)).getFontStyles(e).then((r) => i(r)), this.getFontFamilyById = async (e) => (await a(this, P)).getFontFamilyById(e).then((r) => i(r)), this.getFontStyleById = async (e) => (await a(this, P)).getFontStyleById(e).then((r) => i(r)), this.getDefaultFontStyle = async () => (await a(this, P)).getDefaultFontStyle().then((t) => i(t)), this.getDefaultFontFamily = async () => (await a(this, P)).getDefaultFontFamily().then((t) => i(t)), this.isFontFamilyUsed = async (e) => (await a(this, P)).isFontFamilyUsed(e).then((r) => i(r)), this.isFontStyleUsed = async (e) => (await a(this, P)).isFontStyleUsed(e).then((r) => i(r)), this.moveFontFamilies = async (e, t) => (await a(this, P)).moveFontFamilies(e, t).then((n) => i(n)), this.getPreviewsOfCharacterStrings = async (e, t) => (await a(this, P)).getPreviewsOfCharacterStrings(e, JSON.stringify(t)).then((n) => i(n)), g(this, P, o);
|
|
1113
1125
|
}
|
|
1114
1126
|
}
|
|
1115
1127
|
P = new WeakMap();
|
|
1116
|
-
var
|
|
1117
|
-
class
|
|
1128
|
+
var Ot;
|
|
1129
|
+
class ue {
|
|
1118
1130
|
/**
|
|
1119
1131
|
* @ignore
|
|
1120
1132
|
*/
|
|
@@ -1122,46 +1134,46 @@ class he {
|
|
|
1122
1134
|
/**
|
|
1123
1135
|
* @ignore
|
|
1124
1136
|
*/
|
|
1125
|
-
u(this,
|
|
1126
|
-
this.setShapeProperties = async (
|
|
1127
|
-
const r = { enableFill:
|
|
1128
|
-
return this.setShapeProperties(
|
|
1129
|
-
}, this.setFillColor = async (
|
|
1130
|
-
const r = { fillColor:
|
|
1131
|
-
return this.setShapeProperties(
|
|
1132
|
-
}, this.setEnableStroke = async (
|
|
1133
|
-
const r = { enableStroke:
|
|
1134
|
-
return this.setShapeProperties(
|
|
1135
|
-
}, this.setStrokeColor = async (
|
|
1136
|
-
const r = { strokeColor:
|
|
1137
|
-
return this.setShapeProperties(
|
|
1138
|
-
}, this.setStrokeWeight = async (
|
|
1139
|
-
const r = { strokeWeight:
|
|
1140
|
-
return this.setShapeProperties(
|
|
1141
|
-
}, this.setFlagAllCornersSame = async (
|
|
1142
|
-
const r = { allCornersSame:
|
|
1143
|
-
return this.setShapeProperties(
|
|
1144
|
-
}, this.setShapeCorners = async (
|
|
1145
|
-
const r = { radiusAll:
|
|
1146
|
-
return this.setShapeCorners(
|
|
1147
|
-
}, this.setRadiusTopLeft = async (
|
|
1148
|
-
const r = { topLeft:
|
|
1149
|
-
return this.setShapeCorners(
|
|
1150
|
-
}, this.setRadiusBottomLeft = async (
|
|
1151
|
-
const r = { bottomLeft:
|
|
1152
|
-
return this.setShapeCorners(
|
|
1153
|
-
}, this.setRadiusTopRight = async (
|
|
1154
|
-
const r = { topRight:
|
|
1155
|
-
return this.setShapeCorners(
|
|
1156
|
-
}, this.setRadiusBottomRight = async (
|
|
1157
|
-
const r = { bottomRight:
|
|
1158
|
-
return this.setShapeCorners(
|
|
1159
|
-
}, g(this,
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
var
|
|
1164
|
-
class
|
|
1137
|
+
u(this, Ot);
|
|
1138
|
+
this.setShapeProperties = async (e, t) => (await a(this, Ot)).setShapeProperties(e, JSON.stringify(t)).then((n) => i(n)), this.setEnableFill = async (e, t) => {
|
|
1139
|
+
const r = { enableFill: t };
|
|
1140
|
+
return this.setShapeProperties(e, r);
|
|
1141
|
+
}, this.setFillColor = async (e, t) => {
|
|
1142
|
+
const r = { fillColor: t };
|
|
1143
|
+
return this.setShapeProperties(e, r);
|
|
1144
|
+
}, this.setEnableStroke = async (e, t) => {
|
|
1145
|
+
const r = { enableStroke: t };
|
|
1146
|
+
return this.setShapeProperties(e, r);
|
|
1147
|
+
}, this.setStrokeColor = async (e, t) => {
|
|
1148
|
+
const r = { strokeColor: t };
|
|
1149
|
+
return this.setShapeProperties(e, r);
|
|
1150
|
+
}, this.setStrokeWeight = async (e, t) => {
|
|
1151
|
+
const r = { strokeWeight: t };
|
|
1152
|
+
return this.setShapeProperties(e, r);
|
|
1153
|
+
}, this.setFlagAllCornersSame = async (e, t) => {
|
|
1154
|
+
const r = { allCornersSame: t };
|
|
1155
|
+
return this.setShapeProperties(e, r);
|
|
1156
|
+
}, this.setShapeCorners = async (e, t) => (await a(this, Ot)).setShapeCorners(e, JSON.stringify(t)).then((n) => i(n)), this.setRadiusAll = async (e, t) => {
|
|
1157
|
+
const r = { radiusAll: t };
|
|
1158
|
+
return this.setShapeCorners(e, r);
|
|
1159
|
+
}, this.setRadiusTopLeft = async (e, t) => {
|
|
1160
|
+
const r = { topLeft: t };
|
|
1161
|
+
return this.setShapeCorners(e, r);
|
|
1162
|
+
}, this.setRadiusBottomLeft = async (e, t) => {
|
|
1163
|
+
const r = { bottomLeft: t };
|
|
1164
|
+
return this.setShapeCorners(e, r);
|
|
1165
|
+
}, this.setRadiusTopRight = async (e, t) => {
|
|
1166
|
+
const r = { topRight: t };
|
|
1167
|
+
return this.setShapeCorners(e, r);
|
|
1168
|
+
}, this.setRadiusBottomRight = async (e, t) => {
|
|
1169
|
+
const r = { bottomRight: t };
|
|
1170
|
+
return this.setShapeCorners(e, r);
|
|
1171
|
+
}, g(this, Ot, o);
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
Ot = new WeakMap();
|
|
1175
|
+
var d;
|
|
1176
|
+
class Ze {
|
|
1165
1177
|
/**
|
|
1166
1178
|
* @ignore
|
|
1167
1179
|
*/
|
|
@@ -1169,121 +1181,121 @@ class je {
|
|
|
1169
1181
|
/**
|
|
1170
1182
|
* @ignore
|
|
1171
1183
|
*/
|
|
1172
|
-
u(this,
|
|
1173
|
-
this.getAll = async () => (await a(this,
|
|
1174
|
-
const r = await a(this,
|
|
1175
|
-
return r.setImageSource(
|
|
1176
|
-
}, this.removeImageSource = async (
|
|
1184
|
+
u(this, d);
|
|
1185
|
+
this.getAll = async () => (await a(this, d)).getFrames().then((t) => i(t)), this.getSelected = async () => (await a(this, d)).getSelectedFrames().then((t) => i(t)), this.getAllByPageId = async (e) => (await a(this, d)).getFramesByPageId(e).then((r) => i(r)), this.getByName = async (e) => (await a(this, d)).getFrameByName(e).then((r) => i(r)), this.getById = async (e) => (await a(this, d)).getFrameById(e).then((r) => i(r)), this.getPropertiesOnSelectedLayout = async () => (await a(this, d)).getFramePropertiesOnSelectedLayout().then((t) => i(t)), this.getLayoutProperties = async (e, t) => (await a(this, d)).getFramePropertiesByFrameId(e, t).then((n) => i(n)), this.getAllLayoutProperties = async (e) => (await a(this, d)).getFramesProperties(e).then((r) => i(r)), this.resetTransformation = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetSize = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.select = async (e) => (await a(this, d)).selectFrames([e]).then((r) => i(r)), this.selectMultiple = async (e) => (await a(this, d)).selectFrames(e).then((r) => i(r)), this.deselectAll = async () => (await a(this, d)).deselectFrames().then((t) => i(t)), this.reorderFrames = async (e, t) => (await a(this, d)).reorderFrames(e, t).then((n) => i(n)), this.setZIndex = async (e, t) => (await a(this, d)).setFrameZIndex(e, t).then((n) => i(n)), this.setHeight = async (e, t) => (await a(this, d)).setFrameHeight(e, t).then((n) => i(n)), this.setRotation = async (e, t) => (await a(this, d)).setFrameRotation(e, t).then((n) => i(n)), this.setWidth = async (e, t) => (await a(this, d)).setFrameWidth(e, t).then((n) => i(n)), this.setX = async (e, t) => (await a(this, d)).setFrameX(e, t).then((n) => i(n)), this.setY = async (e, t) => (await a(this, d)).setFrameY(e, t).then((n) => i(n)), this.setOpacity = async (e, t) => (await a(this, d)).setFrameOpacity(e, t).then((n) => i(n)), this.rename = async (e, t) => (await a(this, d)).renameFrame(e, t).then((n) => i(n)), this.reset = async (e) => (await a(this, d)).resetFrame(e).then((r) => i(r)), this.resetX = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetY = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetRotation = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetWidth = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetHeight = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetImageFrameFitMode = async (e) => (await a(this, d)).resetImageFrameFitMode(e).then((r) => i(r)), this.setVisibility = async (e, t) => (await a(this, d)).setFrameIsVisible(e, t).then((n) => i(n)), this.setIsVisible = async (e, t) => (await a(this, d)).setFrameIsVisible(e, t).then((n) => i(n)), this.remove = async (e) => (await a(this, d)).removeFrames([e]).then((r) => i(r)), this.removeFrames = async (e) => (await a(this, d)).removeFrames(e).then((r) => i(r)), this.create = async (e, t, r, n, c) => (await a(this, d)).addFrame(e, t, r, n, c).then((l) => i(l)), this.createShapeFrame = async (e, t, r, n, c) => (await a(this, d)).addFrame(e, t, r, n, c).then((l) => i(l)), this.createBarcodeFrame = async (e, t) => (await a(this, d)).addBarcodeFrame(e, t == null ? void 0 : t.x, t == null ? void 0 : t.y).then((n) => i(n)), this.createComponentFrame = async (e, t, r, n, c) => (await a(this, d)).addComponentFrame(t, r, n, c, JSON.stringify(e)).then((l) => i(l)), this.duplicateFrames = async (e) => (await a(this, d)).duplicateFrames(e).then((r) => i(r)), this.updateImageSource = async (e, t) => {
|
|
1186
|
+
const r = await a(this, d), n = t !== null ? JSON.stringify(t) : null;
|
|
1187
|
+
return r.setImageSource(e, n).then((c) => i(c));
|
|
1188
|
+
}, this.removeImageSource = async (e) => this.updateImageSource(e, null), this.setImageFromConnector = async (e, t, r) => {
|
|
1177
1189
|
const n = {
|
|
1178
|
-
id:
|
|
1190
|
+
id: t,
|
|
1179
1191
|
assetId: r,
|
|
1180
|
-
type:
|
|
1192
|
+
type: se.connector
|
|
1181
1193
|
};
|
|
1182
|
-
return this.updateImageSource(
|
|
1183
|
-
}, this.setImageFromUrl = async (
|
|
1184
|
-
const r = { url:
|
|
1185
|
-
return this.updateImageSource(
|
|
1186
|
-
}, this.setImageFrameFitMode = async (
|
|
1194
|
+
return this.updateImageSource(e, n);
|
|
1195
|
+
}, this.setImageFromUrl = async (e, t) => {
|
|
1196
|
+
const r = { url: t, type: se.url };
|
|
1197
|
+
return this.updateImageSource(e, r);
|
|
1198
|
+
}, this.setImageFrameFitMode = async (e, t) => (await a(this, d)).setImageFrameFitMode(e, t).then((n) => i(n)), this.setImageFrameFitModePosition = async (e, t) => (await a(this, d)).setImageFrameFitModePosition(e, t).then((n) => i(n)), this.setFrameConstrainProportions = async (e, t) => (console.error("setFrameConstrainProportions is not supported anymore"), i({
|
|
1187
1199
|
success: !1,
|
|
1188
1200
|
status: 0,
|
|
1189
1201
|
error: "setFrameConstrainProportions is not supported anymore",
|
|
1190
1202
|
parsedData: null
|
|
1191
|
-
})), this.setVerticalAlign = async (
|
|
1203
|
+
})), this.setVerticalAlign = async (e, t) => (await a(this, d)).setVerticalAlignment(e, t).then((n) => i(n)), this.setNumberOfColumns = async (e, t) => (await a(this, d)).setNumberOfColumns(e, t).then((n) => i(n)), this.setColumnGap = async (e, t) => (await a(this, d)).setColumnGap(e, t).then((n) => i(n)), this.setMinCopyfitting = async (e, t) => (await a(this, d)).setMinCopyfitting(e, t).then((n) => i(n)), this.setMaxCopyfitting = async (e, t) => (await a(this, d)).setMaxCopyfitting(e, t).then((n) => i(n)), this.setEnableCopyfitting = async (e, t) => (await a(this, d)).setEnableCopyfitting(e, t).then((n) => i(n)), this.resetMinCopyfitting = async (e) => (await a(this, d)).resetMinCopyfitting(e).then((r) => i(r)), this.resetMaxCopyfitting = async (e) => (await a(this, d)).resetMaxCopyfitting(e).then((r) => i(r)), this.resetEnableCopyfitting = async (e) => (await a(this, d)).resetEnableCopyfitting(e).then((r) => i(r)), this.setShapeFrameEnableFill = async (e, t) => this.shapeController.setEnableFill(e, t), this.setShapeFrameFillColor = async (e, t) => this.shapeController.setFillColor(e, t), this.setShapeFrameEnableStroke = async (e, t) => this.shapeController.setEnableStroke(e, t), this.setShapeFrameStrokeColor = async (e, t) => this.shapeController.setStrokeColor(e, t), this.setShapeFrameStrokeWeight = async (e, t) => this.shapeController.setStrokeWeight(e, t), this.setBlendMode = async (e, t) => (await a(this, d)).setFrameBlendMode(e, t).then((n) => i(n)), this.setFrameContainerShape = async (e, t) => (await a(this, d)).setFrameContainerShape(e, JSON.stringify(t)).then((n) => i(n)), this.enterCropMode = async (e, t = Ps.frameCrop) => (await a(this, d)).enterCropMode(e, t).then((n) => i(n)), this.applyCropMode = async () => (await a(this, d)).applyCropMode().then((t) => i(t)), this.exitCropMode = async () => (await a(this, d)).cancelCropMode().then((t) => i(t)), this.enterSubjectMode = async (e) => (await a(this, d)).enterSubjectMode(e).then((r) => i(r)), this.applySubjectMode = async () => (await a(this, d)).applySubjectMode().then((t) => i(t)), this.exitSubjectMode = async () => (await a(this, d)).cancelSubjectMode().then((t) => i(t)), this.enterGradientMode = async (e) => (await a(this, d)).enterGradientMode(e).then((r) => i(r)), this.applyGradientMode = async () => (await a(this, d)).applyGradientMode().then((t) => i(t)), this.cancelGradientMode = async () => (await a(this, d)).cancelGradientMode().then((t) => i(t)), this.resetCropMode = async (e) => (console.error("resetCropMode is not supported anymore"), i({
|
|
1192
1204
|
success: !1,
|
|
1193
1205
|
status: 0,
|
|
1194
1206
|
error: "resetCropMode is not supported anymore",
|
|
1195
1207
|
parsedData: null
|
|
1196
|
-
})), this.setEnableAutoGrow = async (
|
|
1197
|
-
const r = { enabled: { value:
|
|
1198
|
-
return (await a(this,
|
|
1199
|
-
}, this.setAutoGrowMinWidth = async (
|
|
1200
|
-
const r = { minWidth: { value:
|
|
1201
|
-
return (await a(this,
|
|
1202
|
-
}, this.setAutoGrowMaxWidth = async (
|
|
1203
|
-
const r = { maxWidth: { value:
|
|
1204
|
-
return (await a(this,
|
|
1205
|
-
}, this.setAutoGrowMinHeight = async (
|
|
1206
|
-
const r = { minHeight: { value:
|
|
1207
|
-
return (await a(this,
|
|
1208
|
-
}, this.setAutoGrowMaxHeight = async (
|
|
1209
|
-
const r = { maxHeight: { value:
|
|
1210
|
-
return (await a(this,
|
|
1211
|
-
}, this.setAutoGrowDirections = async (
|
|
1212
|
-
const r = { directions: { value:
|
|
1213
|
-
return (await a(this,
|
|
1214
|
-
}, this.resetAutoGrowSettingsEnabled = async (
|
|
1208
|
+
})), this.setEnableAutoGrow = async (e, t) => {
|
|
1209
|
+
const r = { enabled: { value: t } };
|
|
1210
|
+
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1211
|
+
}, this.setAutoGrowMinWidth = async (e, t) => {
|
|
1212
|
+
const r = { minWidth: { value: t } };
|
|
1213
|
+
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1214
|
+
}, this.setAutoGrowMaxWidth = async (e, t) => {
|
|
1215
|
+
const r = { maxWidth: { value: t } };
|
|
1216
|
+
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1217
|
+
}, this.setAutoGrowMinHeight = async (e, t) => {
|
|
1218
|
+
const r = { minHeight: { value: t } };
|
|
1219
|
+
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1220
|
+
}, this.setAutoGrowMaxHeight = async (e, t) => {
|
|
1221
|
+
const r = { maxHeight: { value: t } };
|
|
1222
|
+
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1223
|
+
}, this.setAutoGrowDirections = async (e, t) => {
|
|
1224
|
+
const r = { directions: { value: t } };
|
|
1225
|
+
return (await a(this, d)).updateAutoGrowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1226
|
+
}, this.resetAutoGrowSettingsEnabled = async (e) => (console.error("resetAutoGrowSettingsEnabled is not supported anymore"), i({
|
|
1215
1227
|
success: !1,
|
|
1216
1228
|
status: 0,
|
|
1217
1229
|
error: "resetAutoGrowSettingsEnabled is not supported anymore",
|
|
1218
1230
|
parsedData: null
|
|
1219
|
-
})), this.resetAutoGrowMinWidth = async (
|
|
1231
|
+
})), this.resetAutoGrowMinWidth = async (e) => (console.error("resetAutoGrowMinWidth is not supported anymore"), i({
|
|
1220
1232
|
success: !1,
|
|
1221
1233
|
status: 0,
|
|
1222
1234
|
error: "resetAutoGrowMinWidth is not supported anymore",
|
|
1223
1235
|
parsedData: null
|
|
1224
|
-
})), this.resetAutoGrowMaxWidth = async (
|
|
1236
|
+
})), this.resetAutoGrowMaxWidth = async (e) => (console.error("resetAutoGrowMaxWidth is not supported anymore"), i({
|
|
1225
1237
|
success: !1,
|
|
1226
1238
|
status: 0,
|
|
1227
1239
|
error: "resetAutoGrowMaxWidth is not supported anymore",
|
|
1228
1240
|
parsedData: null
|
|
1229
|
-
})), this.resetAutoGrowMinHeight = async (
|
|
1241
|
+
})), this.resetAutoGrowMinHeight = async (e) => (console.error("resetAutoGrowMinHeight is not supported anymore"), i({
|
|
1230
1242
|
success: !1,
|
|
1231
1243
|
status: 0,
|
|
1232
1244
|
error: "resetAutoGrowMinHeight is not supported anymore",
|
|
1233
1245
|
parsedData: null
|
|
1234
|
-
})), this.resetAutoGrowMaxHeight = async (
|
|
1246
|
+
})), this.resetAutoGrowMaxHeight = async (e) => (console.error("resetAutoGrowMaxHeight is not supported anymore"), i({
|
|
1235
1247
|
success: !1,
|
|
1236
1248
|
status: 0,
|
|
1237
1249
|
error: "resetAutoGrowMaxHeight is not supported anymore",
|
|
1238
1250
|
parsedData: null
|
|
1239
|
-
})), this.resetAutoGrowDirections = async (
|
|
1251
|
+
})), this.resetAutoGrowDirections = async (e) => (console.error("resetAutoGrowDirections is not supported anymore"), i({
|
|
1240
1252
|
success: !1,
|
|
1241
1253
|
status: 0,
|
|
1242
1254
|
error: "resetAutoGrowDirections is not supported anymore",
|
|
1243
1255
|
parsedData: null
|
|
1244
|
-
})), this.resetAutoGrow = async (
|
|
1256
|
+
})), this.resetAutoGrow = async (e) => (console.error("resetAutoGrow is not supported anymore"), i({
|
|
1245
1257
|
success: !1,
|
|
1246
1258
|
status: 0,
|
|
1247
1259
|
error: "resetAutoGrow is not supported anymore",
|
|
1248
1260
|
parsedData: null
|
|
1249
|
-
})), this.setShadowEnabled = async (
|
|
1250
|
-
const r = { enabled: { value:
|
|
1251
|
-
return (await a(this,
|
|
1252
|
-
}, this.setShadowDistance = async (
|
|
1253
|
-
const r = { distance: { value:
|
|
1254
|
-
return (await a(this,
|
|
1255
|
-
}, this.setShadowAngleDegrees = async (
|
|
1256
|
-
const r = { angleDegrees: { value:
|
|
1257
|
-
return (await a(this,
|
|
1258
|
-
}, this.setShadowBlurRadius = async (
|
|
1259
|
-
const r = { blurRadius: { value:
|
|
1260
|
-
return (await a(this,
|
|
1261
|
-
}, this.setShadowColor = async (
|
|
1262
|
-
const r = { color: { value:
|
|
1263
|
-
return (await a(this,
|
|
1264
|
-
}, this.setAnchor = async (
|
|
1265
|
-
const
|
|
1266
|
-
horizontal:
|
|
1261
|
+
})), this.setShadowEnabled = async (e, t) => {
|
|
1262
|
+
const r = { enabled: { value: t } };
|
|
1263
|
+
return (await a(this, d)).updateFrameShadowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1264
|
+
}, this.setShadowDistance = async (e, t) => {
|
|
1265
|
+
const r = { distance: { value: t } };
|
|
1266
|
+
return (await a(this, d)).updateFrameShadowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1267
|
+
}, this.setShadowAngleDegrees = async (e, t) => {
|
|
1268
|
+
const r = { angleDegrees: { value: t } };
|
|
1269
|
+
return (await a(this, d)).updateFrameShadowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1270
|
+
}, this.setShadowBlurRadius = async (e, t) => {
|
|
1271
|
+
const r = { blurRadius: { value: t } };
|
|
1272
|
+
return (await a(this, d)).updateFrameShadowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1273
|
+
}, this.setShadowColor = async (e, t) => {
|
|
1274
|
+
const r = { color: { value: t } };
|
|
1275
|
+
return (await a(this, d)).updateFrameShadowSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1276
|
+
}, this.setAnchor = async (e, t, r, n, c) => {
|
|
1277
|
+
const h = {
|
|
1278
|
+
horizontal: t,
|
|
1267
1279
|
type: r,
|
|
1268
1280
|
target: n,
|
|
1269
|
-
endTarget:
|
|
1281
|
+
endTarget: c
|
|
1270
1282
|
};
|
|
1271
|
-
return (await a(this,
|
|
1272
|
-
}, this.setVerticalAnchor = async (
|
|
1273
|
-
const r = { isApplied:
|
|
1274
|
-
return (await a(this,
|
|
1275
|
-
}, this.setLocalGradient = async (
|
|
1276
|
-
const r = { gradient:
|
|
1277
|
-
return (await a(this,
|
|
1278
|
-
}, this.setBrandKitGradient = async (
|
|
1279
|
-
const r = { id:
|
|
1280
|
-
return (await a(this,
|
|
1281
|
-
}, this.setSmartCropSubjectId = async (
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1283
|
+
return (await a(this, d)).setAnchorProperties(e, JSON.stringify(h)).then((p) => i(p));
|
|
1284
|
+
}, this.setVerticalAnchor = async (e, t, r, n) => this.setAnchor(e, !1, t, r, n), this.setHorizontalAnchor = async (e, t, r, n) => this.setAnchor(e, !0, t, r, n), this.resetAnchoring = async (e) => (await a(this, d)).resetFrameTransformation(e).then((r) => i(r)), this.resetVisibility = async (e) => (await a(this, d)).setFrameIsVisible(e, null).then((r) => i(r)), this.getConfiguration = async (e) => (await a(this, d)).getFrameConfiguration(e).then((r) => i(r)), this.resetAssetCropOverride = async (e) => (await a(this, d)).resetAssetCropOverride(e).then((r) => i(r)), this.resetAllAssetCropOverrides = async (e) => (await a(this, d)).resetAllAssetCropOverrides(e).then((r) => i(r)), this.setGradientApplied = async (e, t) => {
|
|
1285
|
+
const r = { isApplied: t };
|
|
1286
|
+
return (await a(this, d)).updateFrameGradientSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1287
|
+
}, this.setLocalGradient = async (e, t) => {
|
|
1288
|
+
const r = { gradient: t };
|
|
1289
|
+
return (await a(this, d)).updateFrameGradientSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1290
|
+
}, this.setBrandKitGradient = async (e, t) => {
|
|
1291
|
+
const r = { id: t };
|
|
1292
|
+
return (await a(this, d)).updateFrameGradientSettings(e, JSON.stringify(r)).then((c) => i(c));
|
|
1293
|
+
}, this.setSmartCropSubjectId = async (e, t) => (await a(this, d)).setSmartCropSubjectId(e, t).then((n) => i(n)), g(this, d, o), this.shapeController = new ue(a(this, d)), this.constraints = new Zr(a(this, d));
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
d = new WeakMap();
|
|
1285
1297
|
var F;
|
|
1286
|
-
class
|
|
1298
|
+
class Zr {
|
|
1287
1299
|
/**
|
|
1288
1300
|
* @ignore
|
|
1289
1301
|
*/
|
|
@@ -1292,53 +1304,53 @@ class jr {
|
|
|
1292
1304
|
* @ignore
|
|
1293
1305
|
*/
|
|
1294
1306
|
u(this, F);
|
|
1295
|
-
this.get = async (
|
|
1296
|
-
const r = { selectionAllowed: { value:
|
|
1297
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1298
|
-
}, this.setHorizontalMovement = async (
|
|
1299
|
-
const r = { horizontalMovementAllowed: { value:
|
|
1300
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1301
|
-
}, this.setVerticalMovement = async (
|
|
1302
|
-
const r = { verticalMovementAllowed: { value:
|
|
1303
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1304
|
-
}, this.setRotation = async (
|
|
1305
|
-
const r = { rotationAllowed: { value:
|
|
1306
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1307
|
-
}, this.setResize = async (
|
|
1307
|
+
this.get = async (e) => (await a(this, F)).getFrameConstraints(e).then((r) => i(r)), this.setSelectable = async (e, t) => {
|
|
1308
|
+
const r = { selectionAllowed: { value: t } };
|
|
1309
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1310
|
+
}, this.setHorizontalMovement = async (e, t) => {
|
|
1311
|
+
const r = { horizontalMovementAllowed: { value: t } };
|
|
1312
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1313
|
+
}, this.setVerticalMovement = async (e, t) => {
|
|
1314
|
+
const r = { verticalMovementAllowed: { value: t } };
|
|
1315
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1316
|
+
}, this.setRotation = async (e, t) => {
|
|
1317
|
+
const r = { rotationAllowed: { value: t } };
|
|
1318
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1319
|
+
}, this.setResize = async (e, t, r) => {
|
|
1308
1320
|
const n = {
|
|
1309
|
-
resizeAllowed: { value:
|
|
1321
|
+
resizeAllowed: { value: t },
|
|
1310
1322
|
...r !== void 0 && { proportionLocked: { value: r } }
|
|
1311
1323
|
};
|
|
1312
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1313
|
-
}, this.setCrop = async (
|
|
1314
|
-
const r = { image: { cropAllowed: { value:
|
|
1315
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1316
|
-
}, this.setTextEditingAllowed = async (
|
|
1317
|
-
const r = { text: { editingAllowed: { value:
|
|
1318
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1319
|
-
}, this.setAllowedParagraphStyles = async (
|
|
1320
|
-
const r = { text: { paragraphStyles: { value:
|
|
1321
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1322
|
-
}, this.setAllowedCharacterStyles = async (
|
|
1323
|
-
const r = { text: { characterStyles: { value:
|
|
1324
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1325
|
-
}, this.setAllowedColors = async (
|
|
1326
|
-
const r = { text: { colors: { value:
|
|
1327
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1328
|
-
}, this.setAllowedFontSizes = async (
|
|
1329
|
-
const r = { text: { fontSizes: { value:
|
|
1330
|
-
return (await a(this, F)).updateFrameConstraints(
|
|
1324
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(n)).then((h) => i(h));
|
|
1325
|
+
}, this.setCrop = async (e, t) => {
|
|
1326
|
+
const r = { image: { cropAllowed: { value: t } } };
|
|
1327
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1328
|
+
}, this.setTextEditingAllowed = async (e, t) => {
|
|
1329
|
+
const r = { text: { editingAllowed: { value: t } } };
|
|
1330
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1331
|
+
}, this.setAllowedParagraphStyles = async (e, t) => {
|
|
1332
|
+
const r = { text: { paragraphStyles: { value: t } } };
|
|
1333
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1334
|
+
}, this.setAllowedCharacterStyles = async (e, t) => {
|
|
1335
|
+
const r = { text: { characterStyles: { value: t } } };
|
|
1336
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1337
|
+
}, this.setAllowedColors = async (e, t) => {
|
|
1338
|
+
const r = { text: { colors: { value: t } } };
|
|
1339
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1340
|
+
}, this.setAllowedFontSizes = async (e, t) => {
|
|
1341
|
+
const r = { text: { fontSizes: { value: t } } };
|
|
1342
|
+
return (await a(this, F)).updateFrameConstraints(e, JSON.stringify(r)).then((c) => i(c));
|
|
1331
1343
|
}, g(this, F, o);
|
|
1332
1344
|
}
|
|
1333
1345
|
}
|
|
1334
1346
|
F = new WeakMap();
|
|
1335
|
-
class
|
|
1347
|
+
class Qe {
|
|
1336
1348
|
constructor() {
|
|
1337
|
-
this.currentEngineVersion =
|
|
1349
|
+
this.currentEngineVersion = ms.current, this.currentSDKVersion = fs.version;
|
|
1338
1350
|
}
|
|
1339
1351
|
}
|
|
1340
|
-
var m,
|
|
1341
|
-
class
|
|
1352
|
+
var m, zt;
|
|
1353
|
+
class Xe {
|
|
1342
1354
|
/**
|
|
1343
1355
|
* @ignore
|
|
1344
1356
|
*/
|
|
@@ -1347,32 +1359,32 @@ class Ye {
|
|
|
1347
1359
|
* @ignore
|
|
1348
1360
|
*/
|
|
1349
1361
|
u(this, m);
|
|
1350
|
-
u(this,
|
|
1351
|
-
this.getAll = async () => (await a(this, m)).getLayouts().then((
|
|
1362
|
+
u(this, zt);
|
|
1363
|
+
this.getAll = async () => (await a(this, m)).getLayouts().then((t) => i(t)), this.getById = async (e) => (await a(this, m)).getLayoutById(e).then((r) => i(r)), this.getByName = async (e) => (await a(this, m)).getLayoutByName(e).then((r) => i(r)), this.getSelected = async () => (await a(this, m)).getSelectedLayout().then((t) => i(t)), this.remove = async (e) => (await a(this, m)).removeLayout(e).then((r) => i(r)), this.create = async (e, t) => {
|
|
1352
1364
|
const r = await a(this, m);
|
|
1353
|
-
return
|
|
1354
|
-
}, this.rename = async (
|
|
1365
|
+
return t != null && t.length ? r.addLayouts(e, JSON.stringify(t)).then((n) => i(n)) : r.addLayout(e).then((n) => i(n));
|
|
1366
|
+
}, this.rename = async (e, t) => (await a(this, m)).renameLayout(e, t).then((n) => i(n)), this.select = async (e) => (await a(this, m)).selectLayoutWithOptions(e, null).then((r) => i(r)), this.selectWithPageSize = async (e, t) => {
|
|
1355
1367
|
const r = await a(this, m), n = {
|
|
1356
|
-
pageSize:
|
|
1368
|
+
pageSize: t
|
|
1357
1369
|
};
|
|
1358
|
-
return r.selectLayoutWithOptions(
|
|
1359
|
-
}, this.duplicate = async (
|
|
1370
|
+
return r.selectLayoutWithOptions(e, JSON.stringify(n)).then((c) => i(c));
|
|
1371
|
+
}, this.duplicate = async (e) => (await a(this, m)).duplicateLayout(e).then((r) => i(r)), this.reset = async (e) => (await a(this, m)).resetLayout(e).then((r) => i(r)), this.setHeight = async (e, t) => (await a(this, m)).setLayoutHeight(e, t).then((n) => i(n)), this.setWidth = async (e, t) => (await a(this, m)).setLayoutWidth(e, t).then((n) => i(n)), this.setUnit = async (e, t) => (await a(this, m)).setLayoutUnit(e, t).then((n) => i(n)), this.resetHeight = async (e) => (await a(this, m)).resetLayoutHeight(e).then((r) => i(r)), this.resetWidth = async (e) => (await a(this, m)).resetLayoutWidth(e).then((r) => i(r)), this.resetUnit = async (e) => (await a(this, m)).resetLayoutUnit(e).then((r) => i(r)), this.getSelectedSnapshot = async () => (await a(this, zt)).getPageSnapshot().then((t) => t ?? t), this.setIntent = async (e, t) => (await a(this, m)).setLayoutIntent(e, t).then((n) => i(n)), this.resetIntent = async (e) => (await a(this, m)).resetLayoutIntent(e).then((r) => i(r)), this.setFillColor = async (e, t) => (await a(this, m)).setLayoutFillColor(e, JSON.stringify(t)).then((n) => i(n)), this.setFillColorEnabled = async (e, t) => (await a(this, m)).setLayoutFillColorEnabled(e, t).then((n) => i(n)), this.resetFillColor = async (e) => (await a(this, m)).resetLayoutFillColor(e).then((r) => i(r)), this.setBleedValue = async (e, t, r) => {
|
|
1360
1372
|
const n = r ? {
|
|
1361
|
-
left: r ===
|
|
1362
|
-
top: r ===
|
|
1363
|
-
right: r ===
|
|
1364
|
-
bottom: r ===
|
|
1365
|
-
} : { left:
|
|
1366
|
-
return (await a(this, m)).updateLayoutBleed(
|
|
1367
|
-
}, this.setAreBleedValuesCombined = async (
|
|
1368
|
-
const r = { areBleedValuesCombined:
|
|
1369
|
-
return (await a(this, m)).updateLayoutBleed(
|
|
1370
|
-
}, this.resetBleedValues = async (
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
m = new WeakMap(),
|
|
1374
|
-
var
|
|
1375
|
-
class
|
|
1373
|
+
left: r === X.left ? t : void 0,
|
|
1374
|
+
top: r === X.top ? t : void 0,
|
|
1375
|
+
right: r === X.right ? t : void 0,
|
|
1376
|
+
bottom: r === X.bottom ? t : void 0
|
|
1377
|
+
} : { left: t, top: t, right: t, bottom: t };
|
|
1378
|
+
return (await a(this, m)).updateLayoutBleed(e, JSON.stringify(n)).then((h) => i(h));
|
|
1379
|
+
}, this.setAreBleedValuesCombined = async (e, t) => {
|
|
1380
|
+
const r = { areBleedValuesCombined: t };
|
|
1381
|
+
return (await a(this, m)).updateLayoutBleed(e, JSON.stringify(r)).then((c) => i(c));
|
|
1382
|
+
}, this.resetBleedValues = async (e) => (await a(this, m)).updateLayoutBleed(e, null).then((r) => i(r)), this.setPrivateData = async (e, t) => (await a(this, m)).setLayoutPrivateData(e, JSON.stringify(t)).then((n) => i(n)), this.getPrivateData = async (e) => (await a(this, m)).getLayoutPrivateData(e).then((r) => i(r)), this.setDisplayName = async (e, t) => (await a(this, m)).setLayoutDisplayName(e, t).then((n) => i(n)), this.getDisplayName = async (e) => (await a(this, m)).getLayoutDisplayName(e).then((r) => i(r)), this.resetDisplayName = async (e) => (await a(this, m)).setLayoutDisplayName(e, null).then((r) => i(r)), this.setAvailableForUser = async (e, t) => (await a(this, m)).setLayoutAvailableForUser(e, t).then((n) => i(n)), this.setSelectedByUser = async (e, t) => (await a(this, m)).setLayoutSelectedByUser(e, t).then((n) => i(n)), this.setResizableByUser = async (e, t) => (await a(this, m)).setLayoutResizableByUser(e, JSON.stringify(t)).then((n) => i(n)), g(this, m, o), g(this, zt, o);
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
m = new WeakMap(), zt = new WeakMap();
|
|
1386
|
+
var ge = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(ge || {}), Os = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(Os || {}), Z, Kt;
|
|
1387
|
+
class ts {
|
|
1376
1388
|
/**
|
|
1377
1389
|
* @ignore
|
|
1378
1390
|
*/
|
|
@@ -1380,27 +1392,27 @@ class Ze {
|
|
|
1380
1392
|
/**
|
|
1381
1393
|
* @ignore
|
|
1382
1394
|
*/
|
|
1383
|
-
u(this,
|
|
1384
|
-
u(this,
|
|
1385
|
-
this.query = async (
|
|
1386
|
-
const
|
|
1395
|
+
u(this, Z);
|
|
1396
|
+
u(this, Kt);
|
|
1397
|
+
this.query = async (e, t, r = {}) => (await a(this, Z)).mediaConnectorQuery(e, JSON.stringify(t), JSON.stringify(r)).then((c) => i(c)), this.detail = async (e, t, r = {}) => (await a(this, Z)).mediaConnectorDetail(e, t, JSON.stringify(r)).then((c) => i(c)), this.download = async (e, t, r, n = {}) => {
|
|
1398
|
+
const c = this.parseDeprecatedMediaDownloadType(
|
|
1387
1399
|
r
|
|
1388
1400
|
);
|
|
1389
|
-
return (await a(this,
|
|
1390
|
-
t,
|
|
1401
|
+
return (await a(this, Kt)).mediaConnectorDownload(
|
|
1391
1402
|
e,
|
|
1392
|
-
|
|
1393
|
-
|
|
1403
|
+
t,
|
|
1404
|
+
c,
|
|
1405
|
+
Os.web,
|
|
1394
1406
|
JSON.stringify(n)
|
|
1395
1407
|
).then((l) => {
|
|
1396
1408
|
if (l instanceof Uint8Array)
|
|
1397
1409
|
return l;
|
|
1398
|
-
throw typeof l == "object" && l !== null && "success" in l && !l.success &&
|
|
1410
|
+
throw typeof l == "object" && l !== null && "success" in l && !l.success && te(l), new Error(`Unexpected response type: ${typeof l}.`);
|
|
1399
1411
|
});
|
|
1400
|
-
}, this.getConfigurationOptions = async (
|
|
1401
|
-
if (
|
|
1402
|
-
if (
|
|
1403
|
-
}, this.upload = async (
|
|
1412
|
+
}, this.getConfigurationOptions = async (e) => (await a(this, Z)).mediaConnectorGetConfigurationOptions(e).then((r) => i(r)), this.getCapabilities = async (e) => (await a(this, Z)).mediaConnectorGetCapabilities(e).then((r) => i(r)), this.parseDeprecatedMediaType = (e) => {
|
|
1413
|
+
if (e === Gt.file) return Tt.file;
|
|
1414
|
+
if (e === Gt.collection) return Tt.collection;
|
|
1415
|
+
}, this.upload = async (e, t, r = {}) => (await a(this, Z)).mediaConnectorUpload(e, JSON.stringify(t), JSON.stringify(r)).then((c) => i(c)), g(this, Z, o), g(this, Kt, o);
|
|
1404
1416
|
}
|
|
1405
1417
|
/**
|
|
1406
1418
|
* This method will parse the deprecatedMediaDownloadType to the new media download type.
|
|
@@ -1410,18 +1422,18 @@ class Ze {
|
|
|
1410
1422
|
*/
|
|
1411
1423
|
parseDeprecatedMediaDownloadType(o) {
|
|
1412
1424
|
switch (o) {
|
|
1413
|
-
case
|
|
1414
|
-
return
|
|
1415
|
-
case
|
|
1416
|
-
return
|
|
1425
|
+
case de.HighResolutionWeb:
|
|
1426
|
+
return ge.highres;
|
|
1427
|
+
case de.LowResolutionWeb:
|
|
1428
|
+
return ge.thumbnail;
|
|
1417
1429
|
default:
|
|
1418
1430
|
return o;
|
|
1419
1431
|
}
|
|
1420
1432
|
}
|
|
1421
1433
|
}
|
|
1422
|
-
|
|
1423
|
-
var
|
|
1424
|
-
let
|
|
1434
|
+
Z = new WeakMap(), Kt = new WeakMap();
|
|
1435
|
+
var D, jt, ws;
|
|
1436
|
+
let es = (ws = class {
|
|
1425
1437
|
/**
|
|
1426
1438
|
* @ignore
|
|
1427
1439
|
*/
|
|
@@ -1429,20 +1441,20 @@ let Qe = (gs = class {
|
|
|
1429
1441
|
/**
|
|
1430
1442
|
* @ignore
|
|
1431
1443
|
*/
|
|
1432
|
-
u(this,
|
|
1444
|
+
u(this, D);
|
|
1433
1445
|
/**
|
|
1434
1446
|
* @ignore
|
|
1435
1447
|
*/
|
|
1436
|
-
u(this,
|
|
1437
|
-
this.add = async () => (await a(this,
|
|
1448
|
+
u(this, jt);
|
|
1449
|
+
this.add = async () => (await a(this, D)).addPage().then((t) => i(t)), this.remove = async (e) => (await a(this, D)).removePage(e).then((r) => i(r)), this.select = async (e) => (await a(this, D)).selectPage(e).then((r) => i(r)), this.setVisibility = async (e, t) => (await a(this, D)).setPageIsVisible(e, t).then((n) => i(n)), this.duplicate = async (e) => (await a(this, D)).duplicatePage(e).then((r) => i(r)), this.getAll = async () => (await a(this, D)).getPages().then((t) => i(t)), this.getById = async (e) => (await a(this, D)).getPageById(e).then((r) => i(r)), this.getSnapshot = async (e, t) => (await a(this, jt)).getPageSnapshotWithSettings(e, t == null ? null : JSON.stringify(t)).then((n) => {
|
|
1438
1450
|
if (n instanceof Uint8Array)
|
|
1439
1451
|
return n;
|
|
1440
|
-
throw typeof n == "object" && n !== null && "success" in n && !n.success &&
|
|
1441
|
-
}), this.setWidth = async (
|
|
1452
|
+
throw typeof n == "object" && n !== null && "success" in n && !n.success && te(n), new Error(`Unexpected response type: ${typeof n}.`);
|
|
1453
|
+
}), this.setWidth = async (e, t) => (e !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, D)).setPageWidth(t).then((n) => i(n))), this.setHeight = async (e, t) => (e !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, D)).setPageHeight(t).then((n) => i(n))), this.setSize = async (e, t) => (await a(this, D)).setPageSize(e, t).then((n) => i(n)), this.move = async (e, t) => (await a(this, D)).reorderPages(e, t).then((n) => i(n)), g(this, D, o), g(this, jt, o);
|
|
1442
1454
|
}
|
|
1443
|
-
},
|
|
1455
|
+
}, D = new WeakMap(), jt = new WeakMap(), ws);
|
|
1444
1456
|
var U;
|
|
1445
|
-
class
|
|
1457
|
+
class ss {
|
|
1446
1458
|
/**
|
|
1447
1459
|
* @ignore
|
|
1448
1460
|
*/
|
|
@@ -1451,120 +1463,120 @@ class Xe {
|
|
|
1451
1463
|
* @ignore
|
|
1452
1464
|
*/
|
|
1453
1465
|
u(this, U);
|
|
1454
|
-
this.getAll = async () => (await a(this, U)).getParagraphStyles().then((
|
|
1466
|
+
this.getAll = async () => (await a(this, U)).getParagraphStyles().then((t) => i(t)), this.getById = async (e) => (await a(this, U)).getParagraphStyleById(e).then((r) => i(r)), this.create = async () => (await a(this, U)).createParagraphStyle().then((t) => i(t)), this.duplicate = async (e) => (await a(this, U)).duplicateParagraphStyle(e).then((r) => i(r)), this.update = async (e, t) => (await a(this, U)).updateParagraphStyle(e, JSON.stringify(t)).then((n) => i(n)), this.rename = async (e, t) => (await a(this, U)).renameParagraphStyle(e, t).then((n) => i(n)), this.remove = async (e) => (await a(this, U)).removeParagraphStyle(e).then((r) => i(r)), this.move = async (e, t) => (await a(this, U)).moveParagraphStyles(e, t).then((n) => i(n)), g(this, U, o);
|
|
1455
1467
|
}
|
|
1456
1468
|
}
|
|
1457
1469
|
U = new WeakMap();
|
|
1458
|
-
var
|
|
1459
|
-
let
|
|
1470
|
+
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.dataSource = "dataSource", s))(pe || {}), Qr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Qr || {}), Xr = /* @__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))(Xr || {}), Ut = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(Ut || {}), tn = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(tn || {}), en = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(en || {}), sn = /* @__PURE__ */ ((s) => (s.injected = "injected", s.connector = "connector", s))(sn || {}), rn = /* @__PURE__ */ ((s) => (s.table = "table", s.list = "list", s))(rn || {});
|
|
1471
|
+
let nn = class {
|
|
1460
1472
|
/**
|
|
1461
1473
|
* @ignore
|
|
1462
1474
|
*/
|
|
1463
|
-
constructor(o,
|
|
1464
|
-
this.onActionsChanged = (
|
|
1465
|
-
this.config.events.onActionsChanged.trigger(JSON.parse(
|
|
1466
|
-
}, this.onAnimationChanged = (
|
|
1467
|
-
this.config.events.onFrameAnimationsChanged.trigger(JSON.parse(
|
|
1468
|
-
}, this.onAnimationPlaybackChanged = (
|
|
1469
|
-
this.config.events.onScrubberPositionChanged.trigger(JSON.parse(
|
|
1470
|
-
}, this.onSelectedLayoutPropertiesChanged = (
|
|
1471
|
-
this.config.events.onSelectedLayoutPropertiesChanged.trigger(JSON.parse(
|
|
1472
|
-
}, this.onSelectedLayoutUnitChanged = (
|
|
1473
|
-
this.config.events.onSelectedLayoutUnitChanged.trigger(
|
|
1474
|
-
}, this.onFramesLayoutChanged = (
|
|
1475
|
-
const r = JSON.parse(
|
|
1475
|
+
constructor(o, e) {
|
|
1476
|
+
this.onActionsChanged = (t) => {
|
|
1477
|
+
this.config.events.onActionsChanged.trigger(JSON.parse(t));
|
|
1478
|
+
}, this.onAnimationChanged = (t) => {
|
|
1479
|
+
this.config.events.onFrameAnimationsChanged.trigger(JSON.parse(t));
|
|
1480
|
+
}, this.onAnimationPlaybackChanged = (t) => {
|
|
1481
|
+
this.config.events.onScrubberPositionChanged.trigger(JSON.parse(t));
|
|
1482
|
+
}, this.onSelectedLayoutPropertiesChanged = (t) => {
|
|
1483
|
+
this.config.events.onSelectedLayoutPropertiesChanged.trigger(JSON.parse(t));
|
|
1484
|
+
}, this.onSelectedLayoutUnitChanged = (t) => {
|
|
1485
|
+
this.config.events.onSelectedLayoutUnitChanged.trigger(t);
|
|
1486
|
+
}, this.onFramesLayoutChanged = (t) => {
|
|
1487
|
+
const r = JSON.parse(t);
|
|
1476
1488
|
this.config.events.onFramesLayoutChanged.trigger(r);
|
|
1477
|
-
}, this.onSelectedFramesLayoutChanged = (
|
|
1478
|
-
const r = JSON.parse(
|
|
1489
|
+
}, this.onSelectedFramesLayoutChanged = (t) => {
|
|
1490
|
+
const r = JSON.parse(t);
|
|
1479
1491
|
this.config.events.onSelectedFramesLayoutChanged.trigger(r);
|
|
1480
1492
|
const n = this.config.onSelectedFrameLayoutChanged;
|
|
1481
1493
|
n && n(r.length > 1 ? void 0 : r[0]);
|
|
1482
|
-
}, this.onSelectedFramesContentChanged = (
|
|
1483
|
-
const r = JSON.parse(
|
|
1494
|
+
}, this.onSelectedFramesContentChanged = (t) => {
|
|
1495
|
+
const r = JSON.parse(t);
|
|
1484
1496
|
this.config.events.onSelectedFramesContentChanged.trigger(r);
|
|
1485
1497
|
const n = this.config.onSelectedFrameContentChanged;
|
|
1486
1498
|
n && n(r.length > 1 ? null : r[0]);
|
|
1487
1499
|
}, this.onStateChanged = () => {
|
|
1488
1500
|
this.config.events.onStateChanged.trigger();
|
|
1489
|
-
}, this.onAuthExpired = async (
|
|
1490
|
-
const r = await this.config.handlers.onAuthExpired.trigger(JSON.parse(
|
|
1501
|
+
}, this.onAuthExpired = async (t) => {
|
|
1502
|
+
const r = await this.config.handlers.onAuthExpired.trigger(JSON.parse(t));
|
|
1491
1503
|
return r != null ? JSON.stringify(r) : null;
|
|
1492
1504
|
}, this.onViewportRequested = () => {
|
|
1493
|
-
const
|
|
1494
|
-
return
|
|
1505
|
+
const t = this.config.handlers.onViewportRequested.trigger();
|
|
1506
|
+
return t != null ? JSON.stringify(t) : null;
|
|
1495
1507
|
}, this.onDocumentLoaded = () => {
|
|
1496
1508
|
this.config.events.onDocumentLoaded.trigger();
|
|
1497
|
-
}, this.onPageSelectionChanged = (
|
|
1498
|
-
this.config.events.onPageSelectionChanged.trigger(
|
|
1499
|
-
}, this.onVariableListChanged = (
|
|
1500
|
-
const n = JSON.parse(
|
|
1501
|
-
(
|
|
1502
|
-
var
|
|
1503
|
-
return
|
|
1504
|
-
...
|
|
1505
|
-
items:
|
|
1509
|
+
}, this.onPageSelectionChanged = (t) => {
|
|
1510
|
+
this.config.events.onPageSelectionChanged.trigger(t);
|
|
1511
|
+
}, this.onVariableListChanged = (t) => {
|
|
1512
|
+
const n = JSON.parse(t).map(
|
|
1513
|
+
(c) => {
|
|
1514
|
+
var h;
|
|
1515
|
+
return c.type === pe.list ? {
|
|
1516
|
+
...c,
|
|
1517
|
+
items: c.items.map(
|
|
1506
1518
|
(l) => l.value
|
|
1507
1519
|
),
|
|
1508
|
-
selected: (
|
|
1509
|
-
} :
|
|
1520
|
+
selected: (h = c.selected) == null ? void 0 : h.value
|
|
1521
|
+
} : c;
|
|
1510
1522
|
}
|
|
1511
1523
|
);
|
|
1512
1524
|
this.config.events.onVariableListChanged.trigger(n);
|
|
1513
|
-
}, this.onSelectedToolChanged = (
|
|
1514
|
-
this.config.events.onSelectedToolChanged.trigger(
|
|
1515
|
-
}, this.onUndoStateChanged = (
|
|
1516
|
-
this.config.events.onUndoStackStateChanged.trigger(JSON.parse(
|
|
1517
|
-
}, this.onCustomUndoDataChanged = (
|
|
1518
|
-
this.config.events.onCustomUndoDataChanged.trigger(JSON.parse(
|
|
1519
|
-
}, this.onSelectedLayoutFramesChanged = (
|
|
1520
|
-
this.config.events.onSelectedLayoutFramesChanged.trigger(JSON.parse(
|
|
1521
|
-
}, this.onSelectedTextStyleChanged = (
|
|
1522
|
-
this.config.events.onSelectedTextStyleChanged.trigger(JSON.parse(
|
|
1523
|
-
}, this.onColorsChanged = (
|
|
1524
|
-
this.config.events.onColorsChanged.trigger(JSON.parse(
|
|
1525
|
-
}, this.onParagraphStylesChanged = (
|
|
1526
|
-
this.config.events.onParagraphStylesChanged.trigger(JSON.parse(
|
|
1527
|
-
}, this.onCharacterStylesChanged = (
|
|
1528
|
-
this.config.events.onCharacterStylesChanged.trigger(JSON.parse(
|
|
1529
|
-
}, this.onFontFamiliesChanged = (
|
|
1530
|
-
this.config.events.onFontFamiliesChanged.trigger(JSON.parse(
|
|
1531
|
-
}, this.onSelectedLayoutIdChanged = (
|
|
1532
|
-
this.config.events.onSelectedLayoutIdChanged.trigger(
|
|
1533
|
-
}, this.onLayoutsChanged = (
|
|
1534
|
-
this.config.events.onLayoutsChanged.trigger(JSON.parse(
|
|
1535
|
-
}, this.onZoomChanged = (
|
|
1536
|
-
this.config.events.onZoomChanged.trigger(JSON.parse(
|
|
1537
|
-
}, this.onConnectorEvent = (
|
|
1538
|
-
this.config.events.onConnectorEvent.trigger(JSON.parse(
|
|
1539
|
-
}, this.onConnectorsChanged = (
|
|
1540
|
-
const n = new
|
|
1541
|
-
JSON.parse(
|
|
1542
|
-
this.localConfig.get(
|
|
1525
|
+
}, this.onSelectedToolChanged = (t) => {
|
|
1526
|
+
this.config.events.onSelectedToolChanged.trigger(t);
|
|
1527
|
+
}, this.onUndoStateChanged = (t) => {
|
|
1528
|
+
this.config.events.onUndoStackStateChanged.trigger(JSON.parse(t));
|
|
1529
|
+
}, this.onCustomUndoDataChanged = (t) => {
|
|
1530
|
+
this.config.events.onCustomUndoDataChanged.trigger(JSON.parse(t));
|
|
1531
|
+
}, this.onSelectedLayoutFramesChanged = (t) => {
|
|
1532
|
+
this.config.events.onSelectedLayoutFramesChanged.trigger(JSON.parse(t));
|
|
1533
|
+
}, this.onSelectedTextStyleChanged = (t) => {
|
|
1534
|
+
this.config.events.onSelectedTextStyleChanged.trigger(JSON.parse(t));
|
|
1535
|
+
}, this.onColorsChanged = (t) => {
|
|
1536
|
+
this.config.events.onColorsChanged.trigger(JSON.parse(t));
|
|
1537
|
+
}, this.onParagraphStylesChanged = (t) => {
|
|
1538
|
+
this.config.events.onParagraphStylesChanged.trigger(JSON.parse(t));
|
|
1539
|
+
}, this.onCharacterStylesChanged = (t) => {
|
|
1540
|
+
this.config.events.onCharacterStylesChanged.trigger(JSON.parse(t));
|
|
1541
|
+
}, this.onFontFamiliesChanged = (t) => {
|
|
1542
|
+
this.config.events.onFontFamiliesChanged.trigger(JSON.parse(t));
|
|
1543
|
+
}, this.onSelectedLayoutIdChanged = (t) => {
|
|
1544
|
+
this.config.events.onSelectedLayoutIdChanged.trigger(t);
|
|
1545
|
+
}, this.onLayoutsChanged = (t) => {
|
|
1546
|
+
this.config.events.onLayoutsChanged.trigger(JSON.parse(t));
|
|
1547
|
+
}, this.onZoomChanged = (t) => {
|
|
1548
|
+
this.config.events.onZoomChanged.trigger(JSON.parse(t));
|
|
1549
|
+
}, this.onConnectorEvent = (t) => {
|
|
1550
|
+
this.config.events.onConnectorEvent.trigger(JSON.parse(t));
|
|
1551
|
+
}, this.onConnectorsChanged = (t) => {
|
|
1552
|
+
const n = new ne().makeMultipleConnectorsBackwardsCompatible(
|
|
1553
|
+
JSON.parse(t),
|
|
1554
|
+
this.localConfig.get(tt.GraFxStudioEnvironmentApiUrl)
|
|
1543
1555
|
);
|
|
1544
1556
|
this.config.events.onConnectorsChanged.trigger(n);
|
|
1545
|
-
}, this.onSelectedPageIdChanged = (
|
|
1546
|
-
this.config.events.onSelectedPageIdChanged.trigger(
|
|
1547
|
-
}, this.onPagesChanged = (
|
|
1548
|
-
this.config.events.onPagesChanged.trigger(JSON.parse(
|
|
1549
|
-
}, this.onPageSnapshotInvalidated = (
|
|
1550
|
-
this.config.events.onPageSnapshotInvalidated.trigger(
|
|
1551
|
-
}, this.onPageSizeChanged = (
|
|
1552
|
-
this.config.events.onPageSizeChanged.trigger(JSON.parse(
|
|
1553
|
-
}, this.onShapeCornerRadiusChanged = (
|
|
1554
|
-
this.config.events.onShapeCornerRadiusChanged.trigger(JSON.parse(
|
|
1555
|
-
}, this.onCropActiveFrameIdChanged = (
|
|
1556
|
-
this.config.events.onCropActiveFrameIdChanged.trigger(
|
|
1557
|
-
}, this.onAsyncError = (
|
|
1558
|
-
const r = JSON.parse(
|
|
1557
|
+
}, this.onSelectedPageIdChanged = (t) => {
|
|
1558
|
+
this.config.events.onSelectedPageIdChanged.trigger(t);
|
|
1559
|
+
}, this.onPagesChanged = (t) => {
|
|
1560
|
+
this.config.events.onPagesChanged.trigger(JSON.parse(t));
|
|
1561
|
+
}, this.onPageSnapshotInvalidated = (t) => {
|
|
1562
|
+
this.config.events.onPageSnapshotInvalidated.trigger(t);
|
|
1563
|
+
}, this.onPageSizeChanged = (t) => {
|
|
1564
|
+
this.config.events.onPageSizeChanged.trigger(JSON.parse(t));
|
|
1565
|
+
}, this.onShapeCornerRadiusChanged = (t) => {
|
|
1566
|
+
this.config.events.onShapeCornerRadiusChanged.trigger(JSON.parse(t));
|
|
1567
|
+
}, this.onCropActiveFrameIdChanged = (t) => {
|
|
1568
|
+
this.config.events.onCropActiveFrameIdChanged.trigger(t);
|
|
1569
|
+
}, this.onAsyncError = (t) => {
|
|
1570
|
+
const r = JSON.parse(t);
|
|
1559
1571
|
if ((r == null ? void 0 : r.type) === "dataRow") {
|
|
1560
|
-
const n = new
|
|
1572
|
+
const n = new or(
|
|
1561
1573
|
r.count,
|
|
1562
1574
|
r.message,
|
|
1563
1575
|
r.exceptions
|
|
1564
1576
|
);
|
|
1565
1577
|
this.config.events.onAsyncError.trigger(n);
|
|
1566
1578
|
} else if ((r == null ? void 0 : r.type) === "action") {
|
|
1567
|
-
const n = new
|
|
1579
|
+
const n = new ir(
|
|
1568
1580
|
r.message,
|
|
1569
1581
|
r.id,
|
|
1570
1582
|
r.event,
|
|
@@ -1573,23 +1585,23 @@ let Xr = class {
|
|
|
1573
1585
|
this.config.events.onAsyncError.trigger(n);
|
|
1574
1586
|
} else
|
|
1575
1587
|
this.config.events.onAsyncError.trigger(r);
|
|
1576
|
-
}, this.onViewModeChanged = (
|
|
1577
|
-
this.config.events.onViewModeChanged.trigger(
|
|
1578
|
-
}, this.onBarcodeValidationChanged = (
|
|
1579
|
-
this.config.events.onBarcodeValidationChanged.trigger(JSON.parse(
|
|
1580
|
-
}, this.onDataSourceIdChanged = (
|
|
1581
|
-
this.config.events.onDataSourceIdChanged.trigger(
|
|
1582
|
-
}, this.onDocumentIssueListChanged = (
|
|
1583
|
-
this.config.events.onDocumentIssueListChanged.trigger(JSON.parse(
|
|
1584
|
-
}, this.onEngineEditModeChanged = (
|
|
1585
|
-
this.config.events.onEngineEditModeChanged.trigger(JSON.parse(
|
|
1586
|
-
}, this.onBrandKitMediaChanged = (
|
|
1587
|
-
this.config.events.onBrandKitMediaChanged.trigger(JSON.parse(
|
|
1588
|
-
}, this.config = o, this.localConfig =
|
|
1588
|
+
}, this.onViewModeChanged = (t) => {
|
|
1589
|
+
this.config.events.onViewModeChanged.trigger(t);
|
|
1590
|
+
}, this.onBarcodeValidationChanged = (t) => {
|
|
1591
|
+
this.config.events.onBarcodeValidationChanged.trigger(JSON.parse(t));
|
|
1592
|
+
}, this.onDataSourceIdChanged = (t) => {
|
|
1593
|
+
this.config.events.onDataSourceIdChanged.trigger(t);
|
|
1594
|
+
}, this.onDocumentIssueListChanged = (t) => {
|
|
1595
|
+
this.config.events.onDocumentIssueListChanged.trigger(JSON.parse(t));
|
|
1596
|
+
}, this.onEngineEditModeChanged = (t) => {
|
|
1597
|
+
this.config.events.onEngineEditModeChanged.trigger(JSON.parse(t));
|
|
1598
|
+
}, this.onBrandKitMediaChanged = (t) => {
|
|
1599
|
+
this.config.events.onBrandKitMediaChanged.trigger(JSON.parse(t));
|
|
1600
|
+
}, this.config = o, this.localConfig = e;
|
|
1589
1601
|
}
|
|
1590
1602
|
};
|
|
1591
|
-
var
|
|
1592
|
-
class
|
|
1603
|
+
var wt;
|
|
1604
|
+
class rs {
|
|
1593
1605
|
/**
|
|
1594
1606
|
* @ignore
|
|
1595
1607
|
*/
|
|
@@ -1597,13 +1609,13 @@ class ts {
|
|
|
1597
1609
|
/**
|
|
1598
1610
|
* @ignore
|
|
1599
1611
|
*/
|
|
1600
|
-
u(this,
|
|
1601
|
-
this.set = async (
|
|
1612
|
+
u(this, wt);
|
|
1613
|
+
this.set = async (e) => (await a(this, wt)).selectedTextStyleDeltaUpdate(JSON.stringify(e)).then((r) => i(r)), this.removeSelected = async () => (await a(this, wt)).selectedTextStyleClean().then((t) => i(t)), this.getSelected = async () => (await a(this, wt)).getSelectedTextStyle().then((t) => i(t)), g(this, wt, o);
|
|
1602
1614
|
}
|
|
1603
1615
|
}
|
|
1604
|
-
|
|
1605
|
-
var
|
|
1606
|
-
class
|
|
1616
|
+
wt = new WeakMap();
|
|
1617
|
+
var an = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(an || {}), on = /* @__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))(on || {}), z = /* @__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))(z || {}), cn = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s.HTML = "html", s))(cn || {}), ye = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(ye || {}), Ft;
|
|
1618
|
+
class ns {
|
|
1607
1619
|
/**
|
|
1608
1620
|
* @ignore
|
|
1609
1621
|
*/
|
|
@@ -1611,64 +1623,64 @@ class es {
|
|
|
1611
1623
|
/**
|
|
1612
1624
|
* @ignore
|
|
1613
1625
|
*/
|
|
1614
|
-
u(this,
|
|
1615
|
-
this.setTool = async (
|
|
1626
|
+
u(this, Ft);
|
|
1627
|
+
this.setTool = async (e) => (await a(this, Ft)).setTool(e).then((r) => i(r)), this.getSelected = async () => (await a(this, Ft)).getSelectedTool().then((t) => i(t)), this.setPointer = async () => this.setTool(z.SELECT), this.setSelect = async () => this.setTool(z.SELECT), this.setHand = async () => this.setTool(z.HAND), this.setZoom = async () => this.setTool(z.ZOOM), this.setTextFrame = async () => this.setTool(z.TEXT_FRAME), this.setImageFrame = async () => this.setTool(z.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(z.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(z.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(z.SHAPE_POLYGON), g(this, Ft, o);
|
|
1616
1628
|
}
|
|
1617
1629
|
}
|
|
1618
|
-
|
|
1619
|
-
var
|
|
1620
|
-
class
|
|
1630
|
+
Ft = new WeakMap();
|
|
1631
|
+
var K, T, Wt;
|
|
1632
|
+
class as {
|
|
1621
1633
|
/**
|
|
1622
1634
|
* @ignore
|
|
1623
1635
|
*/
|
|
1624
|
-
constructor(o,
|
|
1636
|
+
constructor(o, e) {
|
|
1625
1637
|
/**
|
|
1626
1638
|
* @ignore
|
|
1627
1639
|
*/
|
|
1628
|
-
u(this,
|
|
1629
|
-
u(this,
|
|
1630
|
-
u(this,
|
|
1631
|
-
this.undo = async () => (await a(this,
|
|
1640
|
+
u(this, K);
|
|
1641
|
+
u(this, T);
|
|
1642
|
+
u(this, Wt);
|
|
1643
|
+
this.undo = async () => (await a(this, K)).undo().then((r) => i(r)), this.redo = async () => (await a(this, K)).redo().then((r) => i(r)), this.addCustomData = async (t, r) => (await a(this, K)).setCustomUndoData(t, r, !1).then((c) => i(c)), this.record = async (t, r) => {
|
|
1632
1644
|
try {
|
|
1633
|
-
await a(this,
|
|
1645
|
+
await a(this, T).beginIfNoneActive(t), await r(a(this, Wt)), await a(this, T).end();
|
|
1634
1646
|
} catch (n) {
|
|
1635
|
-
throw await a(this,
|
|
1647
|
+
throw await a(this, T).abort(), n;
|
|
1636
1648
|
}
|
|
1637
|
-
}, this.pause = async () => (await a(this,
|
|
1649
|
+
}, this.pause = async () => (await a(this, K)).pause().then((r) => i(r)), this.resume = async () => (await a(this, K)).resume().then((r) => i(r)), this.clear = async () => (await a(this, K)).clear().then((r) => i(r)), this.advanced = {
|
|
1638
1650
|
/**
|
|
1639
1651
|
* This will start a new undo operation.
|
|
1640
1652
|
* This will throw an exception when there is already an undo operation recording.
|
|
1641
1653
|
* @experimental This method is experimental and may change in future versions.
|
|
1642
1654
|
* @returns
|
|
1643
1655
|
*/
|
|
1644
|
-
begin: async (
|
|
1656
|
+
begin: async (t) => a(this, T).begin(t),
|
|
1645
1657
|
/**
|
|
1646
1658
|
* This will start a new undo operation if there is no other undo operation recording.
|
|
1647
1659
|
* This does not throw.
|
|
1648
1660
|
* @experimental This method is experimental and may change in future versions.
|
|
1649
1661
|
* @returns
|
|
1650
1662
|
*/
|
|
1651
|
-
beginIfNoneActive: async (
|
|
1663
|
+
beginIfNoneActive: async (t) => a(this, T).beginIfNoneActive(t),
|
|
1652
1664
|
/**
|
|
1653
1665
|
* Ends the currently active recording operation.
|
|
1654
1666
|
* If there is no recording operation currently running this will throw an exception.
|
|
1655
1667
|
* @experimental This method is experimental and may change in future versions.
|
|
1656
1668
|
* @returns
|
|
1657
1669
|
*/
|
|
1658
|
-
end: async () => a(this,
|
|
1670
|
+
end: async () => a(this, T).end(),
|
|
1659
1671
|
/**
|
|
1660
1672
|
* Aborts the currently active recording operation.
|
|
1661
1673
|
* If there is no recording operation currently running this will throw an exception.
|
|
1662
1674
|
* @experimental This method is experimental and may change in future versions.
|
|
1663
1675
|
* @returns
|
|
1664
1676
|
*/
|
|
1665
|
-
abort: async () => a(this,
|
|
1666
|
-
}, g(this,
|
|
1677
|
+
abort: async () => a(this, T).abort()
|
|
1678
|
+
}, g(this, K, o), g(this, Wt, e), g(this, T, new hn(o));
|
|
1667
1679
|
}
|
|
1668
1680
|
}
|
|
1669
|
-
|
|
1670
|
-
var
|
|
1671
|
-
class
|
|
1681
|
+
K = new WeakMap(), T = new WeakMap(), Wt = new WeakMap();
|
|
1682
|
+
var ot;
|
|
1683
|
+
class hn {
|
|
1672
1684
|
/**
|
|
1673
1685
|
* @ignore
|
|
1674
1686
|
*/
|
|
@@ -1676,43 +1688,43 @@ class rn {
|
|
|
1676
1688
|
/**
|
|
1677
1689
|
* @ignore
|
|
1678
1690
|
*/
|
|
1679
|
-
u(this,
|
|
1680
|
-
this.begin = async (
|
|
1691
|
+
u(this, ot);
|
|
1692
|
+
this.begin = async (e) => (await a(this, ot)).begin(e).then((r) => i(r)), this.beginIfNoneActive = async (e) => (await a(this, ot)).beginIfNoneActive(e).then((r) => i(r)), this.end = async () => (await a(this, ot)).end().then((t) => i(t)), this.abort = async () => (await a(this, ot)).abort().then((t) => i(t)), g(this, ot, o);
|
|
1681
1693
|
}
|
|
1682
1694
|
}
|
|
1683
|
-
|
|
1684
|
-
const
|
|
1685
|
-
const
|
|
1686
|
-
return Math.round(s *
|
|
1695
|
+
ot = new WeakMap();
|
|
1696
|
+
const dn = (s, o = 2) => {
|
|
1697
|
+
const e = Math.pow(10, o);
|
|
1698
|
+
return Math.round(s * e) / e;
|
|
1687
1699
|
};
|
|
1688
|
-
var
|
|
1689
|
-
class
|
|
1700
|
+
var qt, Et;
|
|
1701
|
+
class is {
|
|
1690
1702
|
/**
|
|
1691
1703
|
* @ignore
|
|
1692
1704
|
*/
|
|
1693
|
-
constructor(o,
|
|
1705
|
+
constructor(o, e) {
|
|
1694
1706
|
/**
|
|
1695
1707
|
* @ignore
|
|
1696
1708
|
*/
|
|
1697
|
-
u(this,
|
|
1698
|
-
u(this,
|
|
1699
|
-
this.round = (
|
|
1700
|
-
data: String(
|
|
1709
|
+
u(this, qt);
|
|
1710
|
+
u(this, Et);
|
|
1711
|
+
this.round = (t, r) => i({
|
|
1712
|
+
data: String(dn(t, r)),
|
|
1701
1713
|
success: !0,
|
|
1702
1714
|
status: 200,
|
|
1703
1715
|
parsedData: null
|
|
1704
|
-
}), this.createEnvironmentBaseURL = (
|
|
1705
|
-
const { type: r =
|
|
1706
|
-
return `https://${n}.${
|
|
1707
|
-
}, this.stageFiles = async (
|
|
1708
|
-
const
|
|
1709
|
-
if (!
|
|
1716
|
+
}), this.createEnvironmentBaseURL = (t) => {
|
|
1717
|
+
const { type: r = ye.SANDBOX, environment: n = "ft-nostress", version: c = "1" } = t, h = r == ye.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
|
|
1718
|
+
return `https://${n}.${h}.online/grafx/api/v${c}/environment/${n}`;
|
|
1719
|
+
}, this.stageFiles = async (t, r, n) => {
|
|
1720
|
+
const c = a(this, Et).get(tt.GraFxStudioEnvironmentApiUrl);
|
|
1721
|
+
if (!c)
|
|
1710
1722
|
throw new Error("GraFx Studio Environment API URL is not set");
|
|
1711
|
-
const
|
|
1723
|
+
const h = `${c}connectors/${r}/stage`, l = a(this, Et).get(tt.GraFxStudioAuthToken);
|
|
1712
1724
|
if (!l)
|
|
1713
1725
|
throw new Error("GraFx Studio Auth Token is not set");
|
|
1714
1726
|
const p = new FormData();
|
|
1715
|
-
|
|
1727
|
+
t.forEach((S, v) => {
|
|
1716
1728
|
const E = S instanceof File ? S.name : `blob-${v}`;
|
|
1717
1729
|
p.append("files", S, E);
|
|
1718
1730
|
}), n && p.append(
|
|
@@ -1725,7 +1737,7 @@ class rs {
|
|
|
1725
1737
|
}
|
|
1726
1738
|
})
|
|
1727
1739
|
);
|
|
1728
|
-
const y = await fetch(
|
|
1740
|
+
const y = await fetch(h, {
|
|
1729
1741
|
method: "POST",
|
|
1730
1742
|
body: p,
|
|
1731
1743
|
headers: {
|
|
@@ -1734,144 +1746,174 @@ class rs {
|
|
|
1734
1746
|
});
|
|
1735
1747
|
if (y.status === 422) {
|
|
1736
1748
|
const S = await y.json();
|
|
1737
|
-
throw new
|
|
1749
|
+
throw new Mr(S.message, As.minDimension);
|
|
1738
1750
|
}
|
|
1739
1751
|
if (!y.ok)
|
|
1740
1752
|
throw new Error("Failed to stage files");
|
|
1741
1753
|
return await y.json();
|
|
1742
|
-
}, this.unitEvaluate = async (
|
|
1754
|
+
}, this.unitEvaluate = async (t, r) => (await a(this, qt)).unitEvaluate(t, r).then((c) => i(c)), g(this, qt, o), g(this, Et, e);
|
|
1743
1755
|
}
|
|
1744
1756
|
}
|
|
1745
|
-
|
|
1746
|
-
var
|
|
1747
|
-
class
|
|
1757
|
+
qt = new WeakMap(), Et = new WeakMap();
|
|
1758
|
+
var Yt;
|
|
1759
|
+
class ln {
|
|
1748
1760
|
constructor(o) {
|
|
1749
|
-
u(this,
|
|
1750
|
-
this.setMinimum = async (
|
|
1751
|
-
const r = { minValue: { value:
|
|
1752
|
-
return this.applyPropertiesUpdate(
|
|
1753
|
-
}, this.setMaximum = async (
|
|
1754
|
-
const r = { maxValue: { value:
|
|
1755
|
-
return this.applyPropertiesUpdate(
|
|
1756
|
-
}, this.setShowStepper = async (
|
|
1757
|
-
const r = { showStepper: { value:
|
|
1758
|
-
return this.applyPropertiesUpdate(
|
|
1759
|
-
}, this.setStepSize = async (
|
|
1760
|
-
const r = { stepSize: { value:
|
|
1761
|
-
return this.applyPropertiesUpdate(
|
|
1762
|
-
}, this.setThousandsSeparator = async (
|
|
1763
|
-
const r = { thousandsSeparator: { value:
|
|
1764
|
-
return this.applyPropertiesUpdate(
|
|
1765
|
-
}, this.setDecimalSeparator = async (
|
|
1766
|
-
const r = { decimalSeparator: { value:
|
|
1767
|
-
return this.applyPropertiesUpdate(
|
|
1768
|
-
}, this.setDecimalCharacterStyle = async (
|
|
1769
|
-
const r = { decimalCharacterStyleId: { value:
|
|
1770
|
-
return this.applyPropertiesUpdate(
|
|
1771
|
-
}, this.setNumberOfDecimals = async (
|
|
1772
|
-
const r = { numberOfDecimals: { value:
|
|
1773
|
-
return this.applyPropertiesUpdate(
|
|
1774
|
-
}, g(this,
|
|
1775
|
-
}
|
|
1776
|
-
async applyPropertiesUpdate(o,
|
|
1777
|
-
const r = await (await a(this,
|
|
1761
|
+
u(this, Yt);
|
|
1762
|
+
this.setMinimum = async (e, t) => {
|
|
1763
|
+
const r = { minValue: { value: t } };
|
|
1764
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1765
|
+
}, this.setMaximum = async (e, t) => {
|
|
1766
|
+
const r = { maxValue: { value: t } };
|
|
1767
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1768
|
+
}, this.setShowStepper = async (e, t) => {
|
|
1769
|
+
const r = { showStepper: { value: t } };
|
|
1770
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1771
|
+
}, this.setStepSize = async (e, t) => {
|
|
1772
|
+
const r = { stepSize: { value: t } };
|
|
1773
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1774
|
+
}, this.setThousandsSeparator = async (e, t) => {
|
|
1775
|
+
const r = { thousandsSeparator: { value: t } };
|
|
1776
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1777
|
+
}, this.setDecimalSeparator = async (e, t) => {
|
|
1778
|
+
const r = { decimalSeparator: { value: t } };
|
|
1779
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1780
|
+
}, this.setDecimalCharacterStyle = async (e, t) => {
|
|
1781
|
+
const r = { decimalCharacterStyleId: { value: t } };
|
|
1782
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1783
|
+
}, this.setNumberOfDecimals = async (e, t) => {
|
|
1784
|
+
const r = { numberOfDecimals: { value: t } };
|
|
1785
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1786
|
+
}, g(this, Yt, o);
|
|
1787
|
+
}
|
|
1788
|
+
async applyPropertiesUpdate(o, e) {
|
|
1789
|
+
const r = await (await a(this, Yt)).updateNumberVariableProperties(o, JSON.stringify(e));
|
|
1778
1790
|
return i(r);
|
|
1779
1791
|
}
|
|
1780
1792
|
}
|
|
1781
|
-
|
|
1782
|
-
var
|
|
1783
|
-
class
|
|
1793
|
+
Yt = new WeakMap();
|
|
1794
|
+
var Zt;
|
|
1795
|
+
class un {
|
|
1784
1796
|
constructor(o) {
|
|
1785
|
-
u(this,
|
|
1786
|
-
this.setDisplayFormat = async (
|
|
1787
|
-
const r = { displayFormat: { value:
|
|
1788
|
-
return this.applyPropertiesUpdate(
|
|
1789
|
-
}, this.setLocale = async (
|
|
1790
|
-
const r = { locale: { value:
|
|
1791
|
-
return this.applyPropertiesUpdate(
|
|
1792
|
-
}, this.setStartDate = async (
|
|
1793
|
-
const r = { startDate: { value:
|
|
1794
|
-
return this.applyPropertiesUpdate(
|
|
1795
|
-
}, this.setEndDate = async (
|
|
1796
|
-
const r = { endDate: { value:
|
|
1797
|
-
return this.applyPropertiesUpdate(
|
|
1798
|
-
}, this.setExcludedDays = async (
|
|
1799
|
-
const r = { excludedDays: { value:
|
|
1800
|
-
return this.applyPropertiesUpdate(
|
|
1801
|
-
}, g(this,
|
|
1802
|
-
}
|
|
1803
|
-
async applyPropertiesUpdate(o,
|
|
1804
|
-
const r = await (await a(this,
|
|
1797
|
+
u(this, Zt);
|
|
1798
|
+
this.setDisplayFormat = async (e, t) => {
|
|
1799
|
+
const r = { displayFormat: { value: t } };
|
|
1800
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1801
|
+
}, this.setLocale = async (e, t) => {
|
|
1802
|
+
const r = { locale: { value: t } };
|
|
1803
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1804
|
+
}, this.setStartDate = async (e, t) => {
|
|
1805
|
+
const r = { startDate: { value: t } };
|
|
1806
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1807
|
+
}, this.setEndDate = async (e, t) => {
|
|
1808
|
+
const r = { endDate: { value: t } };
|
|
1809
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1810
|
+
}, this.setExcludedDays = async (e, t) => {
|
|
1811
|
+
const r = { excludedDays: { value: t } };
|
|
1812
|
+
return this.applyPropertiesUpdate(e, r);
|
|
1813
|
+
}, g(this, Zt, o);
|
|
1814
|
+
}
|
|
1815
|
+
async applyPropertiesUpdate(o, e) {
|
|
1816
|
+
const r = await (await a(this, Zt)).updateDateVariableProperties(o, JSON.stringify(e));
|
|
1805
1817
|
return i(r);
|
|
1806
1818
|
}
|
|
1807
1819
|
}
|
|
1808
|
-
|
|
1809
|
-
var
|
|
1810
|
-
|
|
1820
|
+
Zt = new WeakMap();
|
|
1821
|
+
var _, Dt;
|
|
1822
|
+
class gn {
|
|
1823
|
+
constructor(o, e) {
|
|
1824
|
+
u(this, _);
|
|
1825
|
+
u(this, Dt);
|
|
1826
|
+
this.setValue = async (t, r) => {
|
|
1827
|
+
const n = await a(this, _);
|
|
1828
|
+
let c;
|
|
1829
|
+
return Array.isArray(r) ? c = r.map((h) => a(this, Dt).mapDataItemToEngine(h)) : c = r, n.setVariableValue(t, c).then((h) => i(h));
|
|
1830
|
+
}, this.getInjectedData = async (t) => (await a(this, _)).getInjectedDataSourceVariableData(t).then((n) => i(n)).then((n) => {
|
|
1831
|
+
const c = { ...n, parsedData: null };
|
|
1832
|
+
return n.parsedData && (c.parsedData = {
|
|
1833
|
+
...n.parsedData,
|
|
1834
|
+
data: n.parsedData.data.map(
|
|
1835
|
+
(h) => a(this, Dt).mapEngineToDataItem(h)
|
|
1836
|
+
)
|
|
1837
|
+
}), c;
|
|
1838
|
+
}), this.setInjectedModel = async (t, r) => {
|
|
1839
|
+
const n = r.properties, c = r.itemIdPropertyName;
|
|
1840
|
+
return (await a(this, _)).setInjectedDataSourceVariableModel(t, JSON.stringify(n), c).then((l) => i(l));
|
|
1841
|
+
}, this.setSourceType = async (t, r) => (await a(this, _)).setDataSourceVariableSourceType(t, r).then((c) => i(c)), this.setConnector = async (t, r) => {
|
|
1842
|
+
const n = await a(this, _), h = new ne().makeConnectorSourceForwardsCompatible(r);
|
|
1843
|
+
return n.setDataSourceVariableConnector(t, JSON.stringify(h)).then((l) => i(l));
|
|
1844
|
+
}, this.removeConnector = async (t) => (await a(this, _)).setDataSourceVariableConnector(t, null).then((n) => i(n)), g(this, _, o), g(this, Dt, e);
|
|
1845
|
+
}
|
|
1846
|
+
async setDisplayOptions(o, e, t) {
|
|
1847
|
+
return (await a(this, _)).setDataSourceVariableDisplayOptions(o, e, t ?? void 0).then((n) => i(n));
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
_ = new WeakMap(), Dt = new WeakMap();
|
|
1851
|
+
var w, Lt, Nt, Cs;
|
|
1852
|
+
let os = (Cs = class {
|
|
1811
1853
|
/**
|
|
1812
1854
|
* @ignore
|
|
1813
1855
|
*/
|
|
1814
|
-
constructor(o) {
|
|
1856
|
+
constructor(o, e) {
|
|
1815
1857
|
/**
|
|
1816
1858
|
* @ignore
|
|
1817
1859
|
*/
|
|
1818
1860
|
u(this, w);
|
|
1819
|
-
u(this, Et);
|
|
1820
1861
|
u(this, Lt);
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
return r.parsedData && (r.parsedData = this.makeVariablesBackwardsCompatible(r.parsedData)), r;
|
|
1824
|
-
}), this.getById = async (t) => (await a(this, w)).getVariableById(t).then((r) => i(r)).then((r) => {
|
|
1825
|
-
const n = r;
|
|
1826
|
-
return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
|
|
1827
|
-
}), this.getByName = async (t) => (await a(this, w)).getVariableByName(t).then((r) => i(r)).then((r) => {
|
|
1862
|
+
u(this, Nt);
|
|
1863
|
+
this.getAll = async () => (await a(this, w)).getVariables().then((r) => i(r)).then((r) => {
|
|
1828
1864
|
const n = r;
|
|
1829
|
-
return n.parsedData && (n.parsedData = this.
|
|
1830
|
-
}), this.
|
|
1865
|
+
return n.parsedData && (n.parsedData = this.makeVariablesBackwardsCompatible(n.parsedData)), n;
|
|
1866
|
+
}), this.getById = async (t) => (await a(this, w)).getVariableById(t).then((n) => i(n)).then((n) => {
|
|
1867
|
+
const c = n;
|
|
1868
|
+
return c.parsedData && (c.parsedData = this.makeVariableBackwardsCompatible(c.parsedData)), c;
|
|
1869
|
+
}), this.getByName = async (t) => (await a(this, w)).getVariableByName(t).then((n) => i(n)).then((n) => {
|
|
1870
|
+
const c = n;
|
|
1871
|
+
return c.parsedData && (c.parsedData = this.makeVariableBackwardsCompatible(c.parsedData)), c;
|
|
1872
|
+
}), this.create = async (t, r) => (await a(this, w)).addVariable(t, r).then((c) => i(c)), this.remove = async (t) => (await a(this, w)).removeVariables(t).then((n) => i(n)), this.rename = async (t, r) => (await a(this, w)).setVariableName(t, r).then((c) => i(c)), this.setLabel = async (t, r) => (await a(this, w)).setVariableLabel(t, r).then((c) => i(c)), g(this, Lt, async (t, r) => (await a(this, w)).setVariablePlaceholder(t, r).then((c) => i(c))), this.setPlaceholder = async (t, r) => a(this, Lt).call(this, t, r), this.resetPlaceholder = async (t) => a(this, Lt).call(this, t, null), g(this, Nt, async (t, r) => (await a(this, w)).setVariableHelpText(t, r).then((c) => i(c))), this.setHelpText = async (t, r) => a(this, Nt).call(this, t, r), this.resetHelpText = async (t) => a(this, Nt).call(this, t, null), this.setType = async (t, r) => (await a(this, w)).setVariableType(t, r).then((c) => i(c)), this.setListVariable = async (t, r) => (await a(this, w)).setListVariableItems(
|
|
1831
1873
|
t,
|
|
1832
|
-
|
|
1833
|
-
).then((
|
|
1834
|
-
(
|
|
1835
|
-
), this.duplicate = async (t) => (await a(this, w)).duplicateVariable(t).then((
|
|
1836
|
-
const
|
|
1837
|
-
return this.setVariableVisibility(t,
|
|
1838
|
-
}, this.setIsHidden = async (t,
|
|
1839
|
-
const
|
|
1840
|
-
return this.setVariableVisibility(t,
|
|
1841
|
-
}, this.setVariableVisibility = async (t,
|
|
1842
|
-
const
|
|
1843
|
-
return
|
|
1844
|
-
}, this.setImageVariableValueWithContext = async (t,
|
|
1845
|
-
const
|
|
1846
|
-
return this.applyPrefixSuffixDeltaUpdate(t,
|
|
1847
|
-
}, this.setSuffix = async (t,
|
|
1848
|
-
const
|
|
1849
|
-
return this.applyPrefixSuffixDeltaUpdate(t,
|
|
1850
|
-
}, this.setPrefixCharacterStyle = async (t,
|
|
1851
|
-
const
|
|
1852
|
-
return this.applyPrefixSuffixDeltaUpdate(t,
|
|
1853
|
-
}, this.setSuffixCharacterStyle = async (t,
|
|
1854
|
-
const
|
|
1855
|
-
return this.applyPrefixSuffixDeltaUpdate(t,
|
|
1856
|
-
}, this.setPrivateData = async (t,
|
|
1874
|
+
r.map((c) => JSON.stringify({ value: c }))
|
|
1875
|
+
).then((c) => i(c)), this.setValue = async (t, r) => (await a(this, w)).setVariableValue(t, r).then(
|
|
1876
|
+
(c) => i(c, (h) => gr(h, { id: t }))
|
|
1877
|
+
), this.duplicate = async (t) => (await a(this, w)).duplicateVariable(t).then((n) => i(n)), this.groupVariables = async (t, r) => (await a(this, w)).groupVariables(t, r).then((c) => i(c)), this.ungroupVariables = async (t) => (await a(this, w)).ungroupVariable(t).then((n) => i(n)), this.move = async (t, r, n) => (await a(this, w)).moveVariable(r, n, t).then((h) => i(h)), this.moveVariables = async (t, r, n) => (await a(this, w)).moveVariables(r, n, t).then((h) => i(h)), this.setIsVisible = async (t, r) => {
|
|
1878
|
+
const n = r ? { type: Ut.visible } : { type: Ut.invisible };
|
|
1879
|
+
return this.setVariableVisibility(t, n);
|
|
1880
|
+
}, this.setIsHidden = async (t, r) => {
|
|
1881
|
+
const n = r ? { type: Ut.invisible } : { type: Ut.visible };
|
|
1882
|
+
return this.setVariableVisibility(t, n);
|
|
1883
|
+
}, this.setVariableVisibility = async (t, r) => (await a(this, w)).setVariableVisibility(t, JSON.stringify(r)).then((c) => i(c)), this.setLayoutsForVariableVisibility = async (t) => (await a(this, w)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((n) => i(n)), this.setIsRequired = async (t, r) => (await a(this, w)).setVariableIsRequired(t, r).then((c) => i(c)), this.setRemoveParagraphIfEmpty = async (t, r) => (await a(this, w)).setVariableRemoveParagraphIfEmpty(t, r).then((c) => i(c)), this.setVariableCharacterLimit = async (t, r) => (await a(this, w)).setVariableCharacterLimit(t, r).then((c) => i(c)), this.setIsReadonly = async (t, r) => (await a(this, w)).setVariableIsReadonly(t, r).then((c) => i(c)), this.getImageVariableConnectorId = async (t) => (await a(this, w)).getImageVariableConnectorId(t).then((n) => i(n)), this.setImageVariableConnector = async (t, r) => {
|
|
1884
|
+
const n = await a(this, w), h = new ne().makeConnectorSourceForwardsCompatible(r);
|
|
1885
|
+
return n.setImageVariableConnector(t, JSON.stringify(h)).then((l) => i(l));
|
|
1886
|
+
}, this.setImageVariableValueWithContext = async (t, r, n) => (await a(this, w)).setImageVariableValueWithContext(t, r, JSON.stringify(n)).then((h) => i(h)), this.removeSource = async (t) => this.setValue(t, null), this.setPrefix = async (t, r) => {
|
|
1887
|
+
const n = { prefix: { value: r } };
|
|
1888
|
+
return this.applyPrefixSuffixDeltaUpdate(t, n);
|
|
1889
|
+
}, this.setSuffix = async (t, r) => {
|
|
1890
|
+
const n = { suffix: { value: r } };
|
|
1891
|
+
return this.applyPrefixSuffixDeltaUpdate(t, n);
|
|
1892
|
+
}, this.setPrefixCharacterStyle = async (t, r) => {
|
|
1893
|
+
const n = { prefixCharacterStyleId: { value: r } };
|
|
1894
|
+
return this.applyPrefixSuffixDeltaUpdate(t, n);
|
|
1895
|
+
}, this.setSuffixCharacterStyle = async (t, r) => {
|
|
1896
|
+
const n = { suffixCharacterStyleId: { value: r } };
|
|
1897
|
+
return this.applyPrefixSuffixDeltaUpdate(t, n);
|
|
1898
|
+
}, this.setPrivateData = async (t, r) => (await a(this, w)).setVariablePrivateData(t, JSON.stringify(r)).then((c) => i(c)), this.getPrivateData = async (t) => (await a(this, w)).getVariablePrivateData(t).then((n) => i(n)), this.setAllowImageQuery = async (t, r) => (await a(this, w)).setImageVariableAllowQuery(t, r).then((c) => i(c)), this.setAllowImageUpload = async (t, r) => (await a(this, w)).setImageVariableAllowUpload(t, r).then((c) => i(c)), this.setMinImageUploadSize = async (t, r, n) => (await a(this, w)).setImageVariableUploadMinSize(t, r, n).then((h) => i(h)), this.setIsDontBreak = async (t, r) => (await a(this, w)).setVariableIsDontBreak(t, r).then((c) => i(c)), this.highlightUsages = async (t) => (await a(this, w)).highlightVariableUsages(t).then((n) => i(n)), g(this, w, o), this.number = new ln(a(this, w)), this.date = new un(a(this, w)), this.dataSource = new gn(a(this, w), e);
|
|
1857
1899
|
}
|
|
1858
1900
|
makeVariablesBackwardsCompatible(o) {
|
|
1859
|
-
return o.map((
|
|
1901
|
+
return o.map((e) => this.makeVariableBackwardsCompatible(e));
|
|
1860
1902
|
}
|
|
1861
1903
|
makeVariableBackwardsCompatible(o) {
|
|
1862
|
-
return o.type !==
|
|
1904
|
+
return o.type !== pe.list ? o : this.makeListVariableBackwardsCompatible(o);
|
|
1863
1905
|
}
|
|
1864
1906
|
makeListVariableBackwardsCompatible(o) {
|
|
1865
|
-
const
|
|
1866
|
-
return
|
|
1907
|
+
const e = o, t = o.items, r = o.selected, n = t.map((c) => c.value);
|
|
1908
|
+
return e.items = n, e.selected = r == null ? void 0 : r.value, e;
|
|
1867
1909
|
}
|
|
1868
|
-
async applyPrefixSuffixDeltaUpdate(o,
|
|
1869
|
-
const r = await (await a(this, w)).updateVariablePrefixSuffixProperties(o, JSON.stringify(
|
|
1910
|
+
async applyPrefixSuffixDeltaUpdate(o, e) {
|
|
1911
|
+
const r = await (await a(this, w)).updateVariablePrefixSuffixProperties(o, JSON.stringify(e));
|
|
1870
1912
|
return i(r);
|
|
1871
1913
|
}
|
|
1872
|
-
}, w = new WeakMap(),
|
|
1873
|
-
var
|
|
1874
|
-
class
|
|
1914
|
+
}, w = new WeakMap(), Lt = new WeakMap(), Nt = new WeakMap(), Cs);
|
|
1915
|
+
var xt;
|
|
1916
|
+
class yn {
|
|
1875
1917
|
/**
|
|
1876
1918
|
* @ignore
|
|
1877
1919
|
*/
|
|
@@ -1879,29 +1921,29 @@ class hn {
|
|
|
1879
1921
|
/**
|
|
1880
1922
|
* @ignore
|
|
1881
1923
|
*/
|
|
1882
|
-
u(this,
|
|
1883
|
-
this.get = async () => (await a(this,
|
|
1924
|
+
u(this, xt);
|
|
1925
|
+
this.get = async () => (await a(this, xt)).getBrandKit().then((t) => i(t)), this.set = async (e) => (await a(this, xt)).setBrandKit(JSON.stringify(e)).then((r) => i(r)), g(this, xt, o);
|
|
1884
1926
|
}
|
|
1885
1927
|
}
|
|
1886
|
-
|
|
1887
|
-
class
|
|
1928
|
+
xt = new WeakMap();
|
|
1929
|
+
class pn {
|
|
1888
1930
|
/**
|
|
1889
1931
|
* @ignore
|
|
1890
1932
|
*/
|
|
1891
1933
|
constructor(o) {
|
|
1892
|
-
this.onVariableListChanged = (
|
|
1893
|
-
this.config.events.onVariableListChanged.trigger(JSON.parse(
|
|
1894
|
-
}, this.onConnectorsChanged = (
|
|
1895
|
-
this.config.events.onConnectorsChanged.trigger(JSON.parse(
|
|
1896
|
-
}, this.onPageSizeChanged = (
|
|
1897
|
-
this.config.events.onPageSizeChanged.trigger(JSON.parse(
|
|
1898
|
-
}, this.onEngineEditModeChanged = (
|
|
1899
|
-
this.config.events.onEngineEditModeChanged.trigger(JSON.parse(
|
|
1934
|
+
this.onVariableListChanged = (e) => {
|
|
1935
|
+
this.config.events.onVariableListChanged.trigger(JSON.parse(e));
|
|
1936
|
+
}, this.onConnectorsChanged = (e) => {
|
|
1937
|
+
this.config.events.onConnectorsChanged.trigger(JSON.parse(e));
|
|
1938
|
+
}, this.onPageSizeChanged = (e) => {
|
|
1939
|
+
this.config.events.onPageSizeChanged.trigger(JSON.parse(e));
|
|
1940
|
+
}, this.onEngineEditModeChanged = (e) => {
|
|
1941
|
+
this.config.events.onEngineEditModeChanged.trigger(JSON.parse(e));
|
|
1900
1942
|
}, this.config = o;
|
|
1901
1943
|
}
|
|
1902
1944
|
}
|
|
1903
|
-
var
|
|
1904
|
-
class
|
|
1945
|
+
var ct;
|
|
1946
|
+
class wn {
|
|
1905
1947
|
/**
|
|
1906
1948
|
* @ignore
|
|
1907
1949
|
*/
|
|
@@ -1909,24 +1951,32 @@ class dn {
|
|
|
1909
1951
|
/**
|
|
1910
1952
|
* @ignore
|
|
1911
1953
|
*/
|
|
1912
|
-
u(this,
|
|
1913
|
-
this.getAll = async () => (await a(this,
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
).then((n) => i(n)), g(this,
|
|
1954
|
+
u(this, ct);
|
|
1955
|
+
this.getAll = async () => (await a(this, ct)).getVariables().then((t) => i(t)), this.getById = async (e) => (await a(this, ct)).getVariableById(e).then((r) => i(r)), this.getByName = async (e) => (await a(this, ct)).getVariableByName(e).then((r) => i(r)), this.setListVariable = async (e, t) => (await a(this, ct)).setListVariableItems(
|
|
1956
|
+
e,
|
|
1957
|
+
t.map((n) => JSON.stringify(n))
|
|
1958
|
+
).then((n) => i(n)), g(this, ct, o), this.image = new Cn(o), this.dataSource = new mn(o);
|
|
1917
1959
|
}
|
|
1918
1960
|
}
|
|
1919
|
-
|
|
1920
|
-
var
|
|
1921
|
-
class
|
|
1961
|
+
ct = new WeakMap();
|
|
1962
|
+
var Q;
|
|
1963
|
+
class Cn {
|
|
1922
1964
|
constructor(o) {
|
|
1923
|
-
u(this,
|
|
1924
|
-
this.setAllowQuery = async (
|
|
1965
|
+
u(this, Q);
|
|
1966
|
+
this.setAllowQuery = async (e, t) => (await a(this, Q)).setImageVariableAllowQuery(e, t).then((n) => i(n)), this.setAllowUpload = async (e, t) => (await a(this, Q)).setImageVariableAllowUpload(e, t).then((n) => i(n)), this.setMinUploadSize = async (e, t, r) => (await a(this, Q)).setImageVariableUploadMinSize(e, t, r).then((c) => i(c)), this.setConnector = async (e, t) => (await a(this, Q)).setImageVariableConnector(e, JSON.stringify(t)).then((n) => i(n)), this.setConnectorContext = async (e, t) => (await a(this, Q)).setImageVariableConnectorContext(e, JSON.stringify(t)).then((n) => i(n)), g(this, Q, o);
|
|
1925
1967
|
}
|
|
1926
1968
|
}
|
|
1927
|
-
|
|
1928
|
-
var
|
|
1929
|
-
class
|
|
1969
|
+
Q = new WeakMap();
|
|
1970
|
+
var Qt;
|
|
1971
|
+
class mn {
|
|
1972
|
+
constructor(o) {
|
|
1973
|
+
u(this, Qt);
|
|
1974
|
+
this.setConnector = async (e, t) => (await a(this, Qt)).setDataSourceVariableConnector(e, JSON.stringify(t)).then((n) => i(n)), g(this, Qt, o);
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
Qt = new WeakMap();
|
|
1978
|
+
var Ct;
|
|
1979
|
+
class fn {
|
|
1930
1980
|
/**
|
|
1931
1981
|
* @ignore
|
|
1932
1982
|
*/
|
|
@@ -1934,13 +1984,13 @@ class un {
|
|
|
1934
1984
|
/**
|
|
1935
1985
|
* @ignore
|
|
1936
1986
|
*/
|
|
1937
|
-
u(this,
|
|
1938
|
-
this.register = async (
|
|
1987
|
+
u(this, Ct);
|
|
1988
|
+
this.register = async (e) => (await a(this, Ct)).registerConnector(JSON.stringify(e)).then((r) => i(r)), this.getById = async (e) => (await a(this, Ct)).getConnectorById(e).then((r) => i(r)), this.getAllByType = async (e) => (await a(this, Ct)).getConnectors(e).then((r) => i(r)), g(this, Ct, o);
|
|
1939
1989
|
}
|
|
1940
1990
|
}
|
|
1941
|
-
|
|
1942
|
-
var
|
|
1943
|
-
class
|
|
1991
|
+
Ct = new WeakMap();
|
|
1992
|
+
var Mt, re;
|
|
1993
|
+
class Sn {
|
|
1944
1994
|
/**
|
|
1945
1995
|
* @ignore
|
|
1946
1996
|
*/
|
|
@@ -1948,51 +1998,51 @@ class gn {
|
|
|
1948
1998
|
/**
|
|
1949
1999
|
* @ignore
|
|
1950
2000
|
*/
|
|
1951
|
-
u(this,
|
|
2001
|
+
u(this, Mt);
|
|
1952
2002
|
/**
|
|
1953
2003
|
* @ignore
|
|
1954
2004
|
*/
|
|
1955
|
-
u(this,
|
|
1956
|
-
this.setWidth = async (
|
|
2005
|
+
u(this, re);
|
|
2006
|
+
this.setWidth = async (e) => (await a(this, Mt)).setPageWidth(e).then((r) => i(r)), this.setHeight = async (e) => (await a(this, Mt)).setPageHeight(e).then((r) => i(r)), g(this, Mt, o), g(this, re, o);
|
|
1957
2007
|
}
|
|
1958
2008
|
}
|
|
1959
|
-
|
|
1960
|
-
class
|
|
2009
|
+
Mt = new WeakMap(), re = new WeakMap();
|
|
2010
|
+
class cs {
|
|
1961
2011
|
/**
|
|
1962
2012
|
* The next initiator is a split off on SDK level to tag next features
|
|
1963
2013
|
* The SDK should be configured clientside and it exposes all controllers to work with in other applications
|
|
1964
2014
|
* @param config The configuration object where the SDK and editor can get configured
|
|
1965
2015
|
*/
|
|
1966
|
-
constructor(o,
|
|
1967
|
-
this.config = o, this.connection =
|
|
2016
|
+
constructor(o, e, t) {
|
|
2017
|
+
this.config = o, this.connection = e, this.editorAPI = t, this.subscriber = new pn(o), this.variable = new wn(this.editorAPI), this.connector = new fn(this.editorAPI), this.page = new Sn(this.editorAPI), this.canvas = new ce(this.editorAPI), this.brandKit = new yn(this.editorAPI);
|
|
1968
2018
|
}
|
|
1969
2019
|
}
|
|
1970
|
-
var
|
|
1971
|
-
class
|
|
2020
|
+
var R = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(R || {}), Fs = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(Fs || {}), _t = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(_t || {});
|
|
2021
|
+
class Es {
|
|
1972
2022
|
constructor(o) {
|
|
1973
2023
|
this.logger = o;
|
|
1974
2024
|
}
|
|
1975
|
-
createEventHandlerFn(o,
|
|
2025
|
+
createEventHandlerFn(o, e) {
|
|
1976
2026
|
return (...r) => {
|
|
1977
2027
|
try {
|
|
1978
2028
|
const n = o(...r);
|
|
1979
|
-
return n instanceof Promise ? n.catch((
|
|
2029
|
+
return n instanceof Promise ? n.catch((c) => this.handleError(c, e, o.name)) : n;
|
|
1980
2030
|
} catch (n) {
|
|
1981
|
-
this.handleError(n,
|
|
2031
|
+
this.handleError(n, e, o.name);
|
|
1982
2032
|
}
|
|
1983
2033
|
};
|
|
1984
2034
|
}
|
|
1985
|
-
handleError(o,
|
|
2035
|
+
handleError(o, e, t) {
|
|
1986
2036
|
var r;
|
|
1987
|
-
if (
|
|
1988
|
-
(r = this.logger) == null || r.call(this,
|
|
2037
|
+
if (e === _t.log)
|
|
2038
|
+
(r = this.logger) == null || r.call(this, R.error, Fs.event, `Error in callback ${t}: ${o}`);
|
|
1989
2039
|
else
|
|
1990
2040
|
throw o;
|
|
1991
2041
|
}
|
|
1992
2042
|
}
|
|
1993
|
-
class
|
|
1994
|
-
constructor(o,
|
|
1995
|
-
super(
|
|
2043
|
+
class hs extends Es {
|
|
2044
|
+
constructor(o, e) {
|
|
2045
|
+
super(e), this.handler = o;
|
|
1996
2046
|
}
|
|
1997
2047
|
/**
|
|
1998
2048
|
* Executes the defined handler with the provided arguments.
|
|
@@ -2001,14 +2051,14 @@ class is extends Ps {
|
|
|
2001
2051
|
* @returns The result of executing the callbacks.
|
|
2002
2052
|
*/
|
|
2003
2053
|
trigger(...o) {
|
|
2004
|
-
const
|
|
2005
|
-
if (
|
|
2006
|
-
return this.createEventHandlerFn(
|
|
2054
|
+
const e = this.handler();
|
|
2055
|
+
if (e)
|
|
2056
|
+
return this.createEventHandlerFn(e, _t.throw)(...o);
|
|
2007
2057
|
}
|
|
2008
2058
|
}
|
|
2009
|
-
class C extends
|
|
2010
|
-
constructor(o,
|
|
2011
|
-
super(
|
|
2059
|
+
class C extends Es {
|
|
2060
|
+
constructor(o, e) {
|
|
2061
|
+
super(e), this.legacyHandler = o, this.subscriptions = /* @__PURE__ */ new Set();
|
|
2012
2062
|
}
|
|
2013
2063
|
/**
|
|
2014
2064
|
* Executes the registered callbacks with provided arguments
|
|
@@ -2017,10 +2067,10 @@ class C extends Ps {
|
|
|
2017
2067
|
* @returns The result of executing the callbacks.
|
|
2018
2068
|
*/
|
|
2019
2069
|
trigger(...o) {
|
|
2020
|
-
const
|
|
2021
|
-
|
|
2022
|
-
for (const
|
|
2023
|
-
|
|
2070
|
+
const e = this.legacyHandler();
|
|
2071
|
+
e && this.createEventHandlerFn(e, _t.log)(...o);
|
|
2072
|
+
for (const t of this.subscriptions)
|
|
2073
|
+
t(...o);
|
|
2024
2074
|
}
|
|
2025
2075
|
/**
|
|
2026
2076
|
* Registers a callback function.
|
|
@@ -2032,14 +2082,14 @@ class C extends Ps {
|
|
|
2032
2082
|
* - "throw": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others
|
|
2033
2083
|
* @returns A function to unsubscribe the callback, preventing it from being invoked in the future.
|
|
2034
2084
|
*/
|
|
2035
|
-
registerCallback(o,
|
|
2036
|
-
const
|
|
2037
|
-
return this.subscriptions.add(
|
|
2038
|
-
this.subscriptions.delete(
|
|
2085
|
+
registerCallback(o, e = _t.log) {
|
|
2086
|
+
const t = this.createEventHandlerFn(o, e);
|
|
2087
|
+
return this.subscriptions.add(t), () => {
|
|
2088
|
+
this.subscriptions.delete(t);
|
|
2039
2089
|
};
|
|
2040
2090
|
}
|
|
2041
2091
|
}
|
|
2042
|
-
class
|
|
2092
|
+
class we {
|
|
2043
2093
|
/**
|
|
2044
2094
|
* Creates a runtime configuration object from the provided configuration object.
|
|
2045
2095
|
*
|
|
@@ -2047,191 +2097,191 @@ class ge {
|
|
|
2047
2097
|
* @returns The runtime configuration object.
|
|
2048
2098
|
*/
|
|
2049
2099
|
static createRuntimeConfig(o) {
|
|
2050
|
-
var
|
|
2051
|
-
const
|
|
2052
|
-
return
|
|
2053
|
-
logLevel: ((
|
|
2054
|
-
logger: ((r = o.logging) == null ? void 0 : r.logger) || ((
|
|
2055
|
-
var
|
|
2056
|
-
if (
|
|
2057
|
-
switch (
|
|
2058
|
-
case
|
|
2059
|
-
console.error(`[${
|
|
2100
|
+
var t, r, n, c, h, l, p, y, b, S, v, E, O, f, H, M, I, W, q, St, bt, Ce, me, fe, Se, be, ve, Ie, Ae, Pe, Oe, Fe, Ee, De, Le;
|
|
2101
|
+
const e = { ...o };
|
|
2102
|
+
return e.logging = {
|
|
2103
|
+
logLevel: ((t = o.logging) == null ? void 0 : t.logLevel) || R.error,
|
|
2104
|
+
logger: ((r = o.logging) == null ? void 0 : r.logger) || ((Vt, ae, ie) => {
|
|
2105
|
+
var Ne;
|
|
2106
|
+
if (we.isLoggingEnabled(Vt, ((Ne = e.logging) == null ? void 0 : Ne.logLevel) ?? R.error))
|
|
2107
|
+
switch (Vt) {
|
|
2108
|
+
case R.error:
|
|
2109
|
+
console.error(`[${ae}] [${Vt}] ${ie}`);
|
|
2060
2110
|
break;
|
|
2061
|
-
case
|
|
2062
|
-
console.warn(`[${
|
|
2111
|
+
case R.warn:
|
|
2112
|
+
console.warn(`[${ae}] [${Vt}] ${ie}`);
|
|
2063
2113
|
break;
|
|
2064
2114
|
default:
|
|
2065
|
-
console.log(`[${
|
|
2115
|
+
console.log(`[${ae}] [${Vt}] ${ie}`);
|
|
2066
2116
|
}
|
|
2067
2117
|
})
|
|
2068
|
-
},
|
|
2069
|
-
onAuthExpired: new
|
|
2070
|
-
onViewportRequested: new
|
|
2071
|
-
() =>
|
|
2072
|
-
(
|
|
2118
|
+
}, e.handlers = {
|
|
2119
|
+
onAuthExpired: new hs(() => e.onAuthExpired, (n = e.logging) == null ? void 0 : n.logger),
|
|
2120
|
+
onViewportRequested: new hs(
|
|
2121
|
+
() => e.onViewportRequested,
|
|
2122
|
+
(c = e.logging) == null ? void 0 : c.logger
|
|
2073
2123
|
)
|
|
2074
|
-
},
|
|
2124
|
+
}, e.events = {
|
|
2075
2125
|
onActionsChanged: new C(
|
|
2076
|
-
() =>
|
|
2077
|
-
(
|
|
2126
|
+
() => e.onActionsChanged,
|
|
2127
|
+
(h = e.logging) == null ? void 0 : h.logger
|
|
2078
2128
|
),
|
|
2079
2129
|
onStateChanged: new C(
|
|
2080
|
-
() =>
|
|
2081
|
-
(l =
|
|
2130
|
+
() => e.onStateChanged,
|
|
2131
|
+
(l = e.logging) == null ? void 0 : l.logger
|
|
2082
2132
|
),
|
|
2083
2133
|
onDocumentLoaded: new C(
|
|
2084
|
-
() =>
|
|
2085
|
-
(p =
|
|
2134
|
+
() => e.onDocumentLoaded,
|
|
2135
|
+
(p = e.logging) == null ? void 0 : p.logger
|
|
2086
2136
|
),
|
|
2087
2137
|
onSelectedFramesLayoutChanged: new C(
|
|
2088
|
-
() =>
|
|
2089
|
-
(y =
|
|
2138
|
+
() => e.onSelectedFramesLayoutChanged,
|
|
2139
|
+
(y = e.logging) == null ? void 0 : y.logger
|
|
2090
2140
|
),
|
|
2091
2141
|
onFramesLayoutChanged: new C(
|
|
2092
|
-
() =>
|
|
2093
|
-
(b =
|
|
2142
|
+
() => e.onFramesLayoutChanged,
|
|
2143
|
+
(b = e.logging) == null ? void 0 : b.logger
|
|
2094
2144
|
),
|
|
2095
2145
|
onSelectedFramesContentChanged: new C(
|
|
2096
|
-
() =>
|
|
2097
|
-
(S =
|
|
2146
|
+
() => e.onSelectedFramesContentChanged,
|
|
2147
|
+
(S = e.logging) == null ? void 0 : S.logger
|
|
2098
2148
|
),
|
|
2099
2149
|
onPageSelectionChanged: new C(
|
|
2100
|
-
() =>
|
|
2101
|
-
(v =
|
|
2150
|
+
() => e.onPageSelectionChanged,
|
|
2151
|
+
(v = e.logging) == null ? void 0 : v.logger
|
|
2102
2152
|
),
|
|
2103
2153
|
onSelectedLayoutPropertiesChanged: new C(
|
|
2104
|
-
() =>
|
|
2105
|
-
(E =
|
|
2154
|
+
() => e.onSelectedLayoutPropertiesChanged,
|
|
2155
|
+
(E = e.logging) == null ? void 0 : E.logger
|
|
2106
2156
|
),
|
|
2107
2157
|
onSelectedLayoutUnitChanged: new C(
|
|
2108
|
-
() =>
|
|
2109
|
-
(O =
|
|
2158
|
+
() => e.onSelectedLayoutUnitChanged,
|
|
2159
|
+
(O = e.logging) == null ? void 0 : O.logger
|
|
2110
2160
|
),
|
|
2111
2161
|
onScrubberPositionChanged: new C(
|
|
2112
|
-
() =>
|
|
2113
|
-
(f =
|
|
2162
|
+
() => e.onScrubberPositionChanged,
|
|
2163
|
+
(f = e.logging) == null ? void 0 : f.logger
|
|
2114
2164
|
),
|
|
2115
2165
|
onFrameAnimationsChanged: new C(
|
|
2116
|
-
() =>
|
|
2117
|
-
(
|
|
2166
|
+
() => e.onFrameAnimationsChanged,
|
|
2167
|
+
(H = e.logging) == null ? void 0 : H.logger
|
|
2118
2168
|
),
|
|
2119
2169
|
onVariableListChanged: new C(
|
|
2120
|
-
() =>
|
|
2121
|
-
(
|
|
2170
|
+
() => e.onVariableListChanged,
|
|
2171
|
+
(M = e.logging) == null ? void 0 : M.logger
|
|
2122
2172
|
),
|
|
2123
2173
|
onSelectedToolChanged: new C(
|
|
2124
|
-
() =>
|
|
2125
|
-
(
|
|
2174
|
+
() => e.onSelectedToolChanged,
|
|
2175
|
+
(I = e.logging) == null ? void 0 : I.logger
|
|
2126
2176
|
),
|
|
2127
2177
|
onUndoStackStateChanged: new C(
|
|
2128
|
-
() =>
|
|
2129
|
-
(W =
|
|
2178
|
+
() => e.onUndoStackStateChanged,
|
|
2179
|
+
(W = e.logging) == null ? void 0 : W.logger
|
|
2130
2180
|
),
|
|
2131
2181
|
onSelectedLayoutFramesChanged: new C(
|
|
2132
|
-
() =>
|
|
2133
|
-
(
|
|
2182
|
+
() => e.onSelectedLayoutFramesChanged,
|
|
2183
|
+
(q = e.logging) == null ? void 0 : q.logger
|
|
2134
2184
|
),
|
|
2135
2185
|
onSelectedTextStyleChanged: new C(
|
|
2136
|
-
() =>
|
|
2137
|
-
(
|
|
2186
|
+
() => e.onSelectedTextStyleChanged,
|
|
2187
|
+
(St = e.logging) == null ? void 0 : St.logger
|
|
2138
2188
|
),
|
|
2139
2189
|
onColorsChanged: new C(
|
|
2140
|
-
() =>
|
|
2141
|
-
(
|
|
2190
|
+
() => e.onColorsChanged,
|
|
2191
|
+
(bt = e.logging) == null ? void 0 : bt.logger
|
|
2142
2192
|
),
|
|
2143
2193
|
onParagraphStylesChanged: new C(
|
|
2144
|
-
() =>
|
|
2145
|
-
(
|
|
2194
|
+
() => e.onParagraphStylesChanged,
|
|
2195
|
+
(Ce = e.logging) == null ? void 0 : Ce.logger
|
|
2146
2196
|
),
|
|
2147
2197
|
onCharacterStylesChanged: new C(
|
|
2148
|
-
() =>
|
|
2149
|
-
(
|
|
2198
|
+
() => e.onCharacterStylesChanged,
|
|
2199
|
+
(me = e.logging) == null ? void 0 : me.logger
|
|
2150
2200
|
),
|
|
2151
2201
|
onFontFamiliesChanged: new C(
|
|
2152
|
-
() =>
|
|
2153
|
-
(
|
|
2202
|
+
() => e.onFontFamiliesChanged,
|
|
2203
|
+
(fe = e.logging) == null ? void 0 : fe.logger
|
|
2154
2204
|
),
|
|
2155
2205
|
onSelectedLayoutIdChanged: new C(
|
|
2156
|
-
() =>
|
|
2157
|
-
(
|
|
2206
|
+
() => e.onSelectedLayoutIdChanged,
|
|
2207
|
+
(Se = e.logging) == null ? void 0 : Se.logger
|
|
2158
2208
|
),
|
|
2159
2209
|
onLayoutsChanged: new C(
|
|
2160
|
-
() =>
|
|
2161
|
-
(
|
|
2210
|
+
() => e.onLayoutsChanged,
|
|
2211
|
+
(be = e.logging) == null ? void 0 : be.logger
|
|
2162
2212
|
),
|
|
2163
2213
|
onConnectorEvent: new C(
|
|
2164
|
-
() =>
|
|
2165
|
-
(
|
|
2214
|
+
() => e.onConnectorEvent,
|
|
2215
|
+
(ve = e.logging) == null ? void 0 : ve.logger
|
|
2166
2216
|
),
|
|
2167
2217
|
onConnectorsChanged: new C(
|
|
2168
|
-
() =>
|
|
2169
|
-
(
|
|
2218
|
+
() => e.onConnectorsChanged,
|
|
2219
|
+
(Ie = e.logging) == null ? void 0 : Ie.logger
|
|
2170
2220
|
),
|
|
2171
2221
|
onZoomChanged: new C(
|
|
2172
|
-
() =>
|
|
2173
|
-
(
|
|
2222
|
+
() => e.onZoomChanged,
|
|
2223
|
+
(Ae = e.logging) == null ? void 0 : Ae.logger
|
|
2174
2224
|
),
|
|
2175
2225
|
onSelectedPageIdChanged: new C(
|
|
2176
|
-
() =>
|
|
2177
|
-
|
|
2226
|
+
() => e.onSelectedPageIdChanged,
|
|
2227
|
+
e.logging.logger
|
|
2178
2228
|
),
|
|
2179
2229
|
onPagesChanged: new C(
|
|
2180
|
-
() =>
|
|
2181
|
-
|
|
2230
|
+
() => e.onPagesChanged,
|
|
2231
|
+
e.logging.logger
|
|
2182
2232
|
),
|
|
2183
2233
|
onPageSnapshotInvalidated: new C(
|
|
2184
|
-
() =>
|
|
2185
|
-
|
|
2234
|
+
() => e.onPageSnapshotInvalidated,
|
|
2235
|
+
e.logging.logger
|
|
2186
2236
|
),
|
|
2187
2237
|
onPageSizeChanged: new C(
|
|
2188
|
-
() =>
|
|
2189
|
-
(
|
|
2238
|
+
() => e.onPageSizeChanged,
|
|
2239
|
+
(Pe = e.logging) == null ? void 0 : Pe.logger
|
|
2190
2240
|
),
|
|
2191
2241
|
onShapeCornerRadiusChanged: new C(
|
|
2192
|
-
() =>
|
|
2193
|
-
(
|
|
2242
|
+
() => e.onShapeCornerRadiusChanged,
|
|
2243
|
+
(Oe = e.logging) == null ? void 0 : Oe.logger
|
|
2194
2244
|
),
|
|
2195
2245
|
onCropActiveFrameIdChanged: new C(
|
|
2196
|
-
() =>
|
|
2197
|
-
(
|
|
2246
|
+
() => e.onCropActiveFrameIdChanged,
|
|
2247
|
+
(Fe = e.logging) == null ? void 0 : Fe.logger
|
|
2198
2248
|
),
|
|
2199
2249
|
onAsyncError: new C(
|
|
2200
|
-
() =>
|
|
2201
|
-
(
|
|
2250
|
+
() => e.onAsyncError,
|
|
2251
|
+
(Ee = e.logging) == null ? void 0 : Ee.logger
|
|
2202
2252
|
),
|
|
2203
2253
|
onViewModeChanged: new C(
|
|
2204
|
-
() =>
|
|
2205
|
-
(
|
|
2254
|
+
() => e.onViewModeChanged,
|
|
2255
|
+
(De = e.logging) == null ? void 0 : De.logger
|
|
2206
2256
|
),
|
|
2207
|
-
onBarcodeValidationChanged: new C(() =>
|
|
2257
|
+
onBarcodeValidationChanged: new C(() => e.onBarcodeValidationChanged, (Le = e.logging) == null ? void 0 : Le.logger),
|
|
2208
2258
|
onDataSourceIdChanged: new C(
|
|
2209
|
-
() =>
|
|
2210
|
-
|
|
2259
|
+
() => e.onDataSourceIdChanged,
|
|
2260
|
+
e.logging.logger
|
|
2211
2261
|
),
|
|
2212
2262
|
onDocumentIssueListChanged: new C(
|
|
2213
|
-
() =>
|
|
2214
|
-
|
|
2263
|
+
() => e.onDocumentIssueListChanged,
|
|
2264
|
+
e.logging.logger
|
|
2215
2265
|
),
|
|
2216
2266
|
onCustomUndoDataChanged: new C(
|
|
2217
|
-
() =>
|
|
2218
|
-
|
|
2267
|
+
() => e.onCustomUndoDataChanged,
|
|
2268
|
+
e.logging.logger
|
|
2219
2269
|
),
|
|
2220
2270
|
onEngineEditModeChanged: new C(
|
|
2221
|
-
() =>
|
|
2222
|
-
|
|
2271
|
+
() => e.onEngineEditModeChanged,
|
|
2272
|
+
e.logging.logger
|
|
2223
2273
|
),
|
|
2224
2274
|
onBrandKitMediaChanged: new C(
|
|
2225
|
-
() =>
|
|
2226
|
-
|
|
2275
|
+
() => e.onBrandKitMediaChanged,
|
|
2276
|
+
e.logging.logger
|
|
2227
2277
|
)
|
|
2228
|
-
},
|
|
2278
|
+
}, e;
|
|
2229
2279
|
}
|
|
2230
|
-
static isLoggingEnabled(o,
|
|
2231
|
-
return
|
|
2280
|
+
static isLoggingEnabled(o, e) {
|
|
2281
|
+
return e == R.info || e == R.warn && (o == R.warn || o == R.error) ? !0 : e == R.error && o == R.error;
|
|
2232
2282
|
}
|
|
2233
2283
|
}
|
|
2234
|
-
class
|
|
2284
|
+
class bn {
|
|
2235
2285
|
/**
|
|
2236
2286
|
* Checks if the given value is a `DatePropertyWrapper`.
|
|
2237
2287
|
*
|
|
@@ -2260,10 +2310,10 @@ class yn {
|
|
|
2260
2310
|
* @returns the resulting `DataItem` with parsed date properties.
|
|
2261
2311
|
*/
|
|
2262
2312
|
mapEngineToDataItem(o) {
|
|
2263
|
-
const
|
|
2264
|
-
return Object.entries(o).forEach(([
|
|
2265
|
-
t
|
|
2266
|
-
}),
|
|
2313
|
+
const e = {};
|
|
2314
|
+
return Object.entries(o).forEach(([t, r]) => {
|
|
2315
|
+
e[t] = this.isDatePropertyWrapper(r) ? new Date(r.value) : r;
|
|
2316
|
+
}), e;
|
|
2267
2317
|
}
|
|
2268
2318
|
/**
|
|
2269
2319
|
* Transforms a `DataItem` into an `EngineDataItem`.
|
|
@@ -2275,14 +2325,14 @@ class yn {
|
|
|
2275
2325
|
* @returns the resulting `EngineDataItem` with parsed date properties.
|
|
2276
2326
|
*/
|
|
2277
2327
|
mapDataItemToEngine(o) {
|
|
2278
|
-
const
|
|
2279
|
-
return Object.entries(o).forEach(([
|
|
2280
|
-
t
|
|
2281
|
-
}),
|
|
2328
|
+
const e = {};
|
|
2329
|
+
return Object.entries(o).forEach(([t, r]) => {
|
|
2330
|
+
e[t] = this.isDateObject(r) ? { value: r.getTime(), type: "date" } : r;
|
|
2331
|
+
}), e;
|
|
2282
2332
|
}
|
|
2283
2333
|
}
|
|
2284
2334
|
var ht;
|
|
2285
|
-
class
|
|
2335
|
+
class vn {
|
|
2286
2336
|
/**
|
|
2287
2337
|
* @ignore
|
|
2288
2338
|
*/
|
|
@@ -2299,61 +2349,61 @@ class pn {
|
|
|
2299
2349
|
* @returns value for a given configuration key
|
|
2300
2350
|
*/
|
|
2301
2351
|
async getValue(o) {
|
|
2302
|
-
return (await a(this, ht)).getConfigValue(o).then((
|
|
2352
|
+
return (await a(this, ht)).getConfigValue(o).then((t) => i(t));
|
|
2303
2353
|
}
|
|
2304
2354
|
/**
|
|
2305
2355
|
* This method sets, or overrides the value for a given key. Null values are not allowed for both key and value,
|
|
2306
2356
|
* using them will result in an error.
|
|
2307
2357
|
* @returns
|
|
2308
2358
|
*/
|
|
2309
|
-
async setValue(o,
|
|
2310
|
-
return (await a(this, ht)).setConfigValue(o,
|
|
2359
|
+
async setValue(o, e) {
|
|
2360
|
+
return (await a(this, ht)).setConfigValue(o, e).then((r) => i(r));
|
|
2311
2361
|
}
|
|
2312
2362
|
/**
|
|
2313
2363
|
* This method updates the studio options. Only defined options are updated, null values are ignored.
|
|
2314
2364
|
* @returns
|
|
2315
2365
|
*/
|
|
2316
2366
|
async updateStudioOptions(o) {
|
|
2317
|
-
return (await a(this, ht)).updateStudioOptions(JSON.stringify(o)).then((
|
|
2367
|
+
return (await a(this, ht)).updateStudioOptions(JSON.stringify(o)).then((t) => i(t));
|
|
2318
2368
|
}
|
|
2319
2369
|
/**
|
|
2320
2370
|
* This method returns the engine session id. This id is unique for this engine session
|
|
2321
2371
|
* @returns the engine session id
|
|
2322
2372
|
*/
|
|
2323
2373
|
async getEngineSessionId() {
|
|
2324
|
-
return (await a(this, ht)).getEngineSessionId().then((
|
|
2374
|
+
return (await a(this, ht)).getEngineSessionId().then((e) => i(e));
|
|
2325
2375
|
}
|
|
2326
2376
|
}
|
|
2327
2377
|
ht = new WeakMap();
|
|
2328
|
-
var
|
|
2329
|
-
class
|
|
2378
|
+
var Rt;
|
|
2379
|
+
class ds extends vn {
|
|
2330
2380
|
/**
|
|
2331
2381
|
* @ignore
|
|
2332
2382
|
*/
|
|
2333
|
-
constructor(
|
|
2334
|
-
super(
|
|
2383
|
+
constructor(e, t) {
|
|
2384
|
+
super(e);
|
|
2335
2385
|
/**
|
|
2336
2386
|
* @ignore
|
|
2337
2387
|
*/
|
|
2338
|
-
u(this,
|
|
2339
|
-
g(this,
|
|
2388
|
+
u(this, Rt);
|
|
2389
|
+
g(this, Rt, t);
|
|
2340
2390
|
}
|
|
2341
2391
|
/**
|
|
2342
2392
|
* This method returns the value for a given configuration key. If a value was not found in the configuration store,
|
|
2343
2393
|
* this method returns an error. The key cannot be null.
|
|
2344
2394
|
* @returns value for a given configuration key
|
|
2345
2395
|
*/
|
|
2346
|
-
async getValue(
|
|
2347
|
-
const
|
|
2348
|
-
return
|
|
2396
|
+
async getValue(e) {
|
|
2397
|
+
const t = a(this, Rt).get(e);
|
|
2398
|
+
return t != null ? i(
|
|
2349
2399
|
{
|
|
2350
2400
|
status: 200,
|
|
2351
2401
|
success: !0,
|
|
2352
|
-
parsedData:
|
|
2353
|
-
data:
|
|
2402
|
+
parsedData: t,
|
|
2403
|
+
data: t
|
|
2354
2404
|
},
|
|
2355
2405
|
!1
|
|
2356
|
-
) : super.getValue(
|
|
2406
|
+
) : super.getValue(e);
|
|
2357
2407
|
}
|
|
2358
2408
|
/**
|
|
2359
2409
|
* This method sets or overrides the value for a given key.
|
|
@@ -2361,14 +2411,14 @@ class os extends pn {
|
|
|
2361
2411
|
* using them will result in an error.
|
|
2362
2412
|
* @returns
|
|
2363
2413
|
*/
|
|
2364
|
-
async setValue(
|
|
2365
|
-
const r = super.setValue(
|
|
2366
|
-
return a(this,
|
|
2414
|
+
async setValue(e, t) {
|
|
2415
|
+
const r = super.setValue(e, t);
|
|
2416
|
+
return a(this, Rt).set(e, t), r;
|
|
2367
2417
|
}
|
|
2368
2418
|
}
|
|
2369
|
-
|
|
2419
|
+
Rt = new WeakMap();
|
|
2370
2420
|
var k;
|
|
2371
|
-
class
|
|
2421
|
+
class ls {
|
|
2372
2422
|
/**
|
|
2373
2423
|
* @ignore
|
|
2374
2424
|
*/
|
|
@@ -2377,15 +2427,15 @@ class hs {
|
|
|
2377
2427
|
* @ignore
|
|
2378
2428
|
*/
|
|
2379
2429
|
u(this, k);
|
|
2380
|
-
this.getAll = async () => (await a(this, k)).getGradients().then((
|
|
2381
|
-
const r = await a(this, k), n =
|
|
2382
|
-
return r.updateGradient(
|
|
2383
|
-
}, this.remove = async (
|
|
2430
|
+
this.getAll = async () => (await a(this, k)).getGradients().then((t) => i(t)), this.getById = async (e) => (await a(this, k)).getGradientById(e).then((r) => i(r)), this.create = async () => (await a(this, k)).createGradient().then((t) => i(t)), this.duplicate = async (e) => (await a(this, k)).duplicateGradient(e).then((r) => i(r)), this.move = async (e, t) => (await a(this, k)).moveGradients(e, t).then((n) => i(n)), this.rename = async (e, t) => (await a(this, k)).renameGradient(e, t).then((n) => i(n)), this.update = async (e, t) => {
|
|
2431
|
+
const r = await a(this, k), n = t;
|
|
2432
|
+
return r.updateGradient(e, JSON.stringify(n)).then((c) => i(c));
|
|
2433
|
+
}, this.remove = async (e) => (await a(this, k)).removeGradient(e).then((r) => i(r)), g(this, k, o);
|
|
2384
2434
|
}
|
|
2385
2435
|
}
|
|
2386
2436
|
k = new WeakMap();
|
|
2387
|
-
var
|
|
2388
|
-
class
|
|
2437
|
+
var mt, Xt;
|
|
2438
|
+
class us {
|
|
2389
2439
|
/**
|
|
2390
2440
|
* @ignore
|
|
2391
2441
|
*/
|
|
@@ -2393,18 +2443,18 @@ class cs {
|
|
|
2393
2443
|
/**
|
|
2394
2444
|
* @ignore
|
|
2395
2445
|
*/
|
|
2396
|
-
u(this,
|
|
2397
|
-
u(this,
|
|
2398
|
-
this.query = async (
|
|
2399
|
-
if (
|
|
2400
|
-
return
|
|
2401
|
-
throw typeof
|
|
2402
|
-
}), this.getConfigurationOptions = async (
|
|
2446
|
+
u(this, mt);
|
|
2447
|
+
u(this, Xt);
|
|
2448
|
+
this.query = async (e, t, r = {}) => (await a(this, mt)).componentConnectorQuery(e, JSON.stringify(t), JSON.stringify(r)).then((c) => i(c)), this.preview = async (e, t, r, n = {}) => (await a(this, Xt)).componentConnectorPreview(e, t, r, JSON.stringify(n)).then((h) => {
|
|
2449
|
+
if (h instanceof Uint8Array)
|
|
2450
|
+
return h;
|
|
2451
|
+
throw typeof h == "object" && h !== null && "success" in h && !h.success && te(h), new Error(`Unexpected response type: ${typeof h}.`);
|
|
2452
|
+
}), this.getConfigurationOptions = async (e) => (await a(this, mt)).componentConnectorGetConfigurationOptions(e).then((r) => i(r)), this.getCapabilities = async (e) => (await a(this, mt)).componentConnectorGetCapabilities(e).then((r) => i(r)), g(this, mt, o), g(this, Xt, o);
|
|
2403
2453
|
}
|
|
2404
2454
|
}
|
|
2405
|
-
|
|
2406
|
-
var
|
|
2407
|
-
class
|
|
2455
|
+
mt = new WeakMap(), Xt = new WeakMap();
|
|
2456
|
+
var ft;
|
|
2457
|
+
class gs {
|
|
2408
2458
|
/**
|
|
2409
2459
|
* @ignore
|
|
2410
2460
|
*/
|
|
@@ -2412,23 +2462,23 @@ class ds {
|
|
|
2412
2462
|
/**
|
|
2413
2463
|
* @ignore
|
|
2414
2464
|
*/
|
|
2415
|
-
u(this,
|
|
2416
|
-
this.linkVariable = async (
|
|
2465
|
+
u(this, ft);
|
|
2466
|
+
this.linkVariable = async (e, t, r) => (await a(this, ft)).linkComponentVariable(e, t, r, null).then((c) => i(c)), this.getComponentVariables = async (e) => (await a(this, ft)).getComponentVariables(e).then((r) => i(r)), this.setFitMode = async (e, t) => (await a(this, ft)).setComponentLayoutFit(e, t).then((n) => i(n)), g(this, ft, o);
|
|
2417
2467
|
}
|
|
2418
2468
|
}
|
|
2419
|
-
|
|
2420
|
-
const
|
|
2421
|
-
let
|
|
2422
|
-
class
|
|
2469
|
+
ft = new WeakMap();
|
|
2470
|
+
const In = "studio-cdn.chiligrafx.com", An = `https://${In}/editor/${ms.current}/web`;
|
|
2471
|
+
let et;
|
|
2472
|
+
class oa {
|
|
2423
2473
|
/**
|
|
2424
2474
|
* The SDK should be configured clientside and it exposes all controllers to work with in other applications
|
|
2425
2475
|
* @param config The configuration object where the SDK and editor can get configured
|
|
2426
2476
|
*/
|
|
2427
2477
|
constructor(o) {
|
|
2428
|
-
this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new
|
|
2429
|
-
var
|
|
2430
|
-
|
|
2431
|
-
this.config.editorLink ||
|
|
2478
|
+
this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new bn(), this.loadEditor = () => {
|
|
2479
|
+
var e;
|
|
2480
|
+
sr(
|
|
2481
|
+
this.config.editorLink || An,
|
|
2432
2482
|
{
|
|
2433
2483
|
onActionsChanged: this.subscriber.onActionsChanged,
|
|
2434
2484
|
onStateChanged: this.subscriber.onStateChanged,
|
|
@@ -2443,9 +2493,9 @@ class ta {
|
|
|
2443
2493
|
onPageSelectionChanged: this.subscriber.onPageSelectionChanged,
|
|
2444
2494
|
onScrubberPositionChanged: this.subscriber.onAnimationPlaybackChanged,
|
|
2445
2495
|
onFrameAnimationsChanged: this.subscriber.onAnimationChanged,
|
|
2446
|
-
onVariableListChanged: (
|
|
2496
|
+
onVariableListChanged: (t) => {
|
|
2447
2497
|
var r;
|
|
2448
|
-
(r = this.enabledNextSubscribers) != null && r.onVariableListChanged ? this.next.subscriber.onVariableListChanged(
|
|
2498
|
+
(r = this.enabledNextSubscribers) != null && r.onVariableListChanged ? this.next.subscriber.onVariableListChanged(t) : this.subscriber.onVariableListChanged(t);
|
|
2449
2499
|
},
|
|
2450
2500
|
onSelectedToolChanged: this.subscriber.onSelectedToolChanged,
|
|
2451
2501
|
onUndoStateChanged: this.subscriber.onUndoStateChanged,
|
|
@@ -2458,17 +2508,17 @@ class ta {
|
|
|
2458
2508
|
onSelectedLayoutIdChanged: this.subscriber.onSelectedLayoutIdChanged,
|
|
2459
2509
|
onLayoutsChanged: this.subscriber.onLayoutsChanged,
|
|
2460
2510
|
onConnectorEvent: this.subscriber.onConnectorEvent,
|
|
2461
|
-
onConnectorsChanged: (
|
|
2511
|
+
onConnectorsChanged: (t) => {
|
|
2462
2512
|
var r;
|
|
2463
|
-
(r = this.enabledNextSubscribers) != null && r.onConnectorsChanged ? this.next.subscriber.onConnectorsChanged(
|
|
2513
|
+
(r = this.enabledNextSubscribers) != null && r.onConnectorsChanged ? this.next.subscriber.onConnectorsChanged(t) : this.subscriber.onConnectorsChanged(t);
|
|
2464
2514
|
},
|
|
2465
2515
|
onZoomChanged: this.subscriber.onZoomChanged,
|
|
2466
2516
|
onSelectedPageIdChanged: this.subscriber.onSelectedPageIdChanged,
|
|
2467
2517
|
onPagesChanged: this.subscriber.onPagesChanged,
|
|
2468
2518
|
onPageSnapshotInvalidated: this.subscriber.onPageSnapshotInvalidated,
|
|
2469
|
-
onPageSizeChanged: (
|
|
2519
|
+
onPageSizeChanged: (t) => {
|
|
2470
2520
|
var r;
|
|
2471
|
-
(r = this.enabledNextSubscribers) != null && r.onPageSizeChanged ? this.next.subscriber.onPageSizeChanged(
|
|
2521
|
+
(r = this.enabledNextSubscribers) != null && r.onPageSizeChanged ? this.next.subscriber.onPageSizeChanged(t) : this.subscriber.onPageSizeChanged(t);
|
|
2472
2522
|
},
|
|
2473
2523
|
onShapeCornerRadiusChanged: this.subscriber.onShapeCornerRadiusChanged,
|
|
2474
2524
|
onCropActiveFrameIdChanged: this.subscriber.onCropActiveFrameIdChanged,
|
|
@@ -2484,126 +2534,128 @@ class ta {
|
|
|
2484
2534
|
this.setConnection,
|
|
2485
2535
|
this.config.editorId,
|
|
2486
2536
|
this.config.studioStyling,
|
|
2487
|
-
(
|
|
2537
|
+
(t) => {
|
|
2488
2538
|
var r, n;
|
|
2489
|
-
(n = (r = this.config).onConnectionError) == null || n.call(r,
|
|
2539
|
+
(n = (r = this.config).onConnectionError) == null || n.call(r, t);
|
|
2490
2540
|
}
|
|
2491
|
-
), this.editorAPI =
|
|
2492
|
-
|
|
2493
|
-
this.config.documentType ||
|
|
2494
|
-
), this.configuration.updateStudioOptions(this.config.studioOptions ||
|
|
2495
|
-
|
|
2496
|
-
((
|
|
2541
|
+
), this.editorAPI = et == null ? void 0 : et.promise.then((t) => t), this.action = new Ve(this.editorAPI), this.layout = new Xe(this.editorAPI), this.frame = new Ze(this.editorAPI), this.barcode = new Be(this.editorAPI), this.component = new gs(this.editorAPI), this.animation = new Je(this.editorAPI), this.document = new je(this.editorAPI), this.configuration = new ds(this.editorAPI, this.localConfig), this.utils = new is(this.editorAPI, this.localConfig), this.tool = new ns(this.editorAPI), this.page = new es(this.editorAPI), this.debug = new Ke(this.editorAPI), this.undoManager = new as(this.editorAPI, this), this.textSelection = new rs(this.editorAPI), this.colorStyle = new _e(this.editorAPI), this.gradientStyle = new ls(this.editorAPI), this.paragraphStyle = new ss(this.editorAPI), this.characterStyle = new ke(this.editorAPI), this.mediaConnector = new ts(this.editorAPI), this.fontConnector = new qe(this.editorAPI), this.componentConnector = new us(this.editorAPI), this.dataConnector = new $e(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ze(this.editorAPI, this.dataItemMappingTools), this.connector = new He(this.editorAPI, this.localConfig), this.variable = new os(this.editorAPI, this.dataItemMappingTools), this.font = new Ye(this.editorAPI), this.experiment = new We(this.editorAPI), this.canvas = new ce(this.editorAPI), this.shape = new ue(this.editorAPI), this.colorConversion = new Te(this.editorAPI), this.info = new Qe(), this.clipboard = new Ge(this.editorAPI), this.brandKit = new Ue(this.editorAPI, this), this.next = new cs(this.config, this.connection, this.editorAPI), this.configuration.setValue(tt.GraFxStudioSdkVersion, fs.version), this.configuration.setValue(
|
|
2542
|
+
tt.GraFxStudioDocumentType,
|
|
2543
|
+
this.config.documentType || Is.template
|
|
2544
|
+
), this.configuration.updateStudioOptions(this.config.studioOptions || nr), this.configuration.setValue(
|
|
2545
|
+
tt.QueryCallCacheEnabled,
|
|
2546
|
+
((e = this.config.enableQueryCallCache) == null ? void 0 : e.toString()) || "false"
|
|
2497
2547
|
);
|
|
2498
|
-
}, this.setConnection = (
|
|
2499
|
-
|
|
2500
|
-
}, this.config =
|
|
2548
|
+
}, this.setConnection = (e) => {
|
|
2549
|
+
et = e;
|
|
2550
|
+
}, this.config = we.createRuntimeConfig(o), this.connection = et, this.editorAPI = et == null ? void 0 : et.promise.then((e) => e), this.action = new Ve(this.editorAPI), this.layout = new Xe(this.editorAPI), this.frame = new Ze(this.editorAPI), this.shape = new ue(this.editorAPI), this.barcode = new Be(this.editorAPI), this.component = new gs(this.editorAPI), this.undoManager = new as(this.editorAPI, this), this.connector = new He(this.editorAPI, this.localConfig), this.mediaConnector = new ts(this.editorAPI), this.fontConnector = new qe(this.editorAPI), this.componentConnector = new us(this.editorAPI), this.dataConnector = new $e(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ze(this.editorAPI, this.dataItemMappingTools), this.animation = new Je(this.editorAPI), this.document = new je(this.editorAPI), this.configuration = new ds(this.editorAPI, this.localConfig), this.variable = new os(this.editorAPI, this.dataItemMappingTools), this.utils = new is(this.editorAPI, this.localConfig), this.subscriber = new nn(this.config, this.localConfig), this.tool = new ns(this.editorAPI), this.page = new es(this.editorAPI), this.debug = new Ke(this.editorAPI), this.textSelection = new rs(this.editorAPI), this.colorStyle = new _e(this.editorAPI), this.gradientStyle = new ls(this.editorAPI), this.paragraphStyle = new ss(this.editorAPI), this.characterStyle = new ke(this.editorAPI), this.font = new Ye(this.editorAPI), this.experiment = new We(this.editorAPI), this.canvas = new ce(this.editorAPI), this.colorConversion = new Te(this.editorAPI), this.info = new Qe(), this.clipboard = new Ge(this.editorAPI), this.next = new cs(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new Ue(this.editorAPI, this);
|
|
2501
2551
|
}
|
|
2502
2552
|
}
|
|
2503
|
-
var
|
|
2504
|
-
const
|
|
2553
|
+
var Pn = /* @__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))(Pn || {}), On = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(On || {}), Fn = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(Fn || {}), En = /* @__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))(En || {}), Dn = /* @__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))(Dn || {}), Ln = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(Ln || {}), Nn = /* @__PURE__ */ ((s) => (s.linear = "linear", s))(Nn || {}), xn = /* @__PURE__ */ ((s) => (s.local = "linearLocal", s.linearBrandKit = "linearBrandKit", s))(xn || {}), Mn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(Mn || {}), Rn = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.highest = "highest", s.medium = "medium", s))(Rn || {}), Vn = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(Vn || {}), Jn = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(Jn || {}), Bn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(Bn || {}), Un = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(Un || {}), kn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(kn || {}), Gn = /* @__PURE__ */ ((s) => (s.none = "none", s.bullet = "bullet", s.number = "number", s))(Gn || {}), Tn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(Tn || {}), _n = /* @__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))(_n || {}), Hn = /* @__PURE__ */ ((s) => (s.arabic = "arabic", s.romanUpperCase = "romanUpperCase", s.romanLowerCase = "romanLowerCase", s.latinUpperCase = "latinUpperCase", s.latinLowerCase = "latinLowerCase", s))(Hn || {}), $n = /* @__PURE__ */ ((s) => (s.none = "none", s.dash = "dash", s.dot = "dot", s.colon = "colon", s.roundBracket = "roundBracket", s))($n || {}), zn = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(zn || {}), Kn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(Kn || {}), jn = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(jn || {}), Wn = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s.gradient = "gradient", s))(Wn || {}), Ds = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Ds || {});
|
|
2554
|
+
const ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2505
2555
|
__proto__: null,
|
|
2506
|
-
ConnectorRegistrationSource:
|
|
2556
|
+
ConnectorRegistrationSource: Ds
|
|
2507
2557
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2508
2558
|
export {
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2559
|
+
ir as ActionAsyncError,
|
|
2560
|
+
zn as ActionEditorEvent,
|
|
2561
|
+
Jn as Alignment,
|
|
2562
|
+
Yr as AnchorTargetEdgeType,
|
|
2563
|
+
qr as AnchorTargetType,
|
|
2564
|
+
Nr as AuthCredentialsTypeEnum,
|
|
2565
|
+
xr as AuthRefreshTypeEnum,
|
|
2566
|
+
Br as AutoGrowDirection,
|
|
2567
|
+
vt as BarcodeCharacterSet,
|
|
2568
|
+
Jt as BarcodeErrorCorrectionLevel,
|
|
2569
|
+
Gr as BarcodeSourceTypeEnum,
|
|
2570
|
+
$ as BarcodeType,
|
|
2571
|
+
pr as BarcodeValidationResult,
|
|
2572
|
+
Dn as BasicAnimationsEmphasisStyles,
|
|
2573
|
+
$r as BlendMode,
|
|
2574
|
+
Un as Case,
|
|
2575
|
+
he as ColorType,
|
|
2576
|
+
vr as ColorUsageType,
|
|
2577
|
+
Jr as ComponentFitEnum,
|
|
2578
|
+
Rn as ComponentPreviewType,
|
|
2579
|
+
Ur as ComponentSourceTypeEnum,
|
|
2580
|
+
Fr as ConnectorConfigContextType,
|
|
2581
|
+
Or as ConnectorConfigValueType,
|
|
2582
|
+
Lr as ConnectorEventType,
|
|
2583
|
+
cr as ConnectorHttpError,
|
|
2584
|
+
Zn as ConnectorMapping,
|
|
2585
|
+
Dr as ConnectorMappingDirection,
|
|
2586
|
+
Er as ConnectorMappingSource,
|
|
2587
|
+
Bt as ConnectorRegistrationSource,
|
|
2588
|
+
le as ConnectorStateType,
|
|
2589
|
+
Rr as ConnectorSupportedAuth,
|
|
2590
|
+
Ir as ConnectorType,
|
|
2591
|
+
fr as ConstraintMode,
|
|
2592
|
+
jn as CornerRadiusType,
|
|
2593
|
+
Ps as CropType,
|
|
2594
|
+
or as DataRowAsyncError,
|
|
2595
|
+
rn as DataSourceVariableDisplayOptionsType,
|
|
2596
|
+
sn as DataSourceVariableSourceType,
|
|
2597
|
+
Qr as Day,
|
|
2598
|
+
de as DeprecatedMediaConnectorDownloadType,
|
|
2599
|
+
Gt as DeprecatedMediaType,
|
|
2600
|
+
ar as DocumentIssueTypeEnum,
|
|
2601
|
+
Is as DocumentType,
|
|
2602
|
+
cn as DownloadFormats,
|
|
2603
|
+
Fn as EaseTypes,
|
|
2604
|
+
Wn as EngineEditModeType,
|
|
2605
|
+
ye as EnvironmentType,
|
|
2606
|
+
zr as FitMode,
|
|
2607
|
+
Kr as FitModePosition,
|
|
2608
|
+
_r as FlowDirection,
|
|
2609
|
+
Mn as FontPreviewFormat,
|
|
2610
|
+
Vn as FontWeights,
|
|
2611
|
+
ra as FrameAnchorTarget,
|
|
2612
|
+
Wr as FrameAnchorType,
|
|
2613
|
+
rr as FrameEditingMode,
|
|
2614
|
+
an as FramePropertyNames,
|
|
2615
|
+
kr as FrameTypeEnum,
|
|
2616
|
+
Nn as GradientType,
|
|
2617
|
+
xn as GradientUsageType,
|
|
2618
|
+
Xn as GrafxTokenAuthCredentials,
|
|
2619
|
+
se as ImageSourceTypeEnum,
|
|
2620
|
+
mr as LayoutIntent,
|
|
2621
|
+
on as LayoutPropertyNames,
|
|
2622
|
+
Cr as LayoutType,
|
|
2623
|
+
Xr as Locale,
|
|
2624
|
+
Gn as MarkedListType,
|
|
2625
|
+
wr as MeasurementUnit,
|
|
2626
|
+
Os as MediaDownloadIntent,
|
|
2627
|
+
ge as MediaDownloadType,
|
|
2628
|
+
Tt as MediaType,
|
|
2629
|
+
ca as Next,
|
|
2630
|
+
Hn as NumberListFormat,
|
|
2631
|
+
$n as NumberListSeparatorSymbol,
|
|
2632
|
+
sa as PageAnchorTarget,
|
|
2633
|
+
X as PositionEnum,
|
|
2634
|
+
ta as RefreshedAuthCredendentials,
|
|
2635
|
+
kn as Scripting,
|
|
2636
|
+
Tn as SelectedTextStyleSections,
|
|
2637
|
+
_n as SelectedTextStyles,
|
|
2638
|
+
On as ShakeDirections,
|
|
2639
|
+
Kn as ShapeType,
|
|
2640
|
+
Pn as SlideDirections,
|
|
2641
|
+
Ar as SortBy,
|
|
2642
|
+
Pr as SortOrder,
|
|
2643
|
+
Tr as TextDirection,
|
|
2644
|
+
Bn as TextPosition,
|
|
2645
|
+
z as ToolType,
|
|
2646
|
+
En as TweenTypes,
|
|
2647
|
+
jr as UpdateZIndexMethod,
|
|
2648
|
+
Mr as UploadAssetValidationError,
|
|
2649
|
+
As as UploadAssetValidationErrorType,
|
|
2650
|
+
pe as VariableType,
|
|
2651
|
+
hr as VariableValueConstrainsViolationError,
|
|
2652
|
+
en as VariableVisibilityOperator,
|
|
2653
|
+
tn as VariableVisibilityTargetType,
|
|
2654
|
+
Ut as VariableVisibilityType,
|
|
2655
|
+
Hr as VerticalAlign,
|
|
2656
|
+
Ln as ViewMode,
|
|
2657
|
+
tt as WellKnownConfigurationKeys,
|
|
2658
|
+
oa as default,
|
|
2659
|
+
Qn as grafxMediaConnectorRegistration
|
|
2608
2660
|
};
|
|
2609
2661
|
//# sourceMappingURL=main.es.js.map
|