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