@chili-publish/studio-sdk 1.28.0 → 1.29.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 +86 -86
- package/_bundles/main.es.js.map +1 -1
- package/_bundles/main.js +2 -2
- package/_bundles/main.js.map +1 -1
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +1 -1
- package/lib/src/controllers/VariableController.d.ts +11 -0
- package/lib/src/controllers/VariableController.js +15 -0
- package/lib/src/controllers/VariableController.js.map +1 -1
- package/lib/src/next/controllers/VariableController.d.ts +17 -9
- package/lib/src/next/controllers/VariableController.js +26 -14
- package/lib/src/next/controllers/VariableController.js.map +1 -1
- package/lib/src/next/tests/controllers/VariableController.test.js +41 -32
- package/lib/src/next/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/tests/controllers/VariableController.test.js +11 -0
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/types/VariableTypes.d.ts +5 -0
- package/lib/src/types/VariableTypes.js.map +1 -1
- package/package.json +1 -1
package/_bundles/main.es.js
CHANGED
|
@@ -3,19 +3,19 @@ var Ie = (s) => {
|
|
|
3
3
|
};
|
|
4
4
|
var ve = (s, i, t) => i.has(s) || Ie("Cannot " + t);
|
|
5
5
|
var a = (s, i, t) => (ve(s, i, "read from private field"), t ? t.call(s) : i.get(s)), u = (s, i, t) => i.has(s) ? Ie("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), g = (s, i, t, e) => (ve(s, i, "write to private field"), e ? e.call(s, t) : i.set(s, t), t);
|
|
6
|
-
const bs = "2.
|
|
6
|
+
const bs = "2.12.latest", cs = {
|
|
7
7
|
current: bs
|
|
8
|
-
}, Is = "1.
|
|
8
|
+
}, Is = "1.29.0", hs = {
|
|
9
9
|
version: Is
|
|
10
10
|
};
|
|
11
11
|
var _;
|
|
12
12
|
(function(s) {
|
|
13
13
|
s.Call = "call", s.Reply = "reply", s.Syn = "syn", s.SynAck = "synAck", s.Ack = "ack";
|
|
14
14
|
})(_ || (_ = {}));
|
|
15
|
-
var
|
|
15
|
+
var ht;
|
|
16
16
|
(function(s) {
|
|
17
17
|
s.Fulfilled = "fulfilled", s.Rejected = "rejected";
|
|
18
|
-
})(
|
|
18
|
+
})(ht || (ht = {}));
|
|
19
19
|
var xt;
|
|
20
20
|
(function(s) {
|
|
21
21
|
s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
|
|
@@ -24,10 +24,10 @@ var Yt;
|
|
|
24
24
|
(function(s) {
|
|
25
25
|
s.DataCloneError = "DataCloneError";
|
|
26
26
|
})(Yt || (Yt = {}));
|
|
27
|
-
var
|
|
27
|
+
var ct;
|
|
28
28
|
(function(s) {
|
|
29
29
|
s.Message = "message";
|
|
30
|
-
})(
|
|
30
|
+
})(ct || (ct = {}));
|
|
31
31
|
const vs = (s, i) => {
|
|
32
32
|
const t = [];
|
|
33
33
|
let e = !1;
|
|
@@ -84,7 +84,7 @@ const vs = (s, i) => {
|
|
|
84
84
|
resolution: P,
|
|
85
85
|
returnValue: N
|
|
86
86
|
};
|
|
87
|
-
P ===
|
|
87
|
+
P === ht.Rejected && N instanceof Error && (M.returnValue = Pe(N), M.returnValueIsError = !0);
|
|
88
88
|
try {
|
|
89
89
|
n.postMessage(M, c);
|
|
90
90
|
} catch (v) {
|
|
@@ -92,7 +92,7 @@ const vs = (s, i) => {
|
|
|
92
92
|
const $ = {
|
|
93
93
|
penpal: _.Reply,
|
|
94
94
|
id: b,
|
|
95
|
-
resolution:
|
|
95
|
+
resolution: ht.Rejected,
|
|
96
96
|
returnValue: Pe(v),
|
|
97
97
|
returnValueIsError: !0
|
|
98
98
|
};
|
|
@@ -101,10 +101,10 @@ const vs = (s, i) => {
|
|
|
101
101
|
throw v;
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
new Promise((P) => P(i[I].apply(i, S))).then(L(
|
|
104
|
+
new Promise((P) => P(i[I].apply(i, S))).then(L(ht.Fulfilled), L(ht.Rejected));
|
|
105
105
|
};
|
|
106
|
-
return r.addEventListener(
|
|
107
|
-
l = !0, r.removeEventListener(
|
|
106
|
+
return r.addEventListener(ct.Message, y), () => {
|
|
107
|
+
l = !0, r.removeEventListener(ct.Message, y);
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
let Ns = 0;
|
|
@@ -150,11 +150,11 @@ const Ms = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], xs = (s) => s
|
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
152
|
const mt = K.data;
|
|
153
|
-
r(`${n}: Received ${S}() reply`), c.removeEventListener(
|
|
153
|
+
r(`${n}: Received ${S}() reply`), c.removeEventListener(ct.Message, v);
|
|
154
154
|
let wt = mt.returnValue;
|
|
155
|
-
mt.returnValueIsError && (wt = Ls(wt)), (mt.resolution ===
|
|
155
|
+
mt.returnValueIsError && (wt = Ls(wt)), (mt.resolution === ht.Fulfilled ? P : N)(wt);
|
|
156
156
|
};
|
|
157
|
-
c.addEventListener(
|
|
157
|
+
c.addEventListener(ct.Message, v);
|
|
158
158
|
const $ = {
|
|
159
159
|
penpal: _.Call,
|
|
160
160
|
id: M,
|
|
@@ -241,8 +241,8 @@ const Ms = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], xs = (s) => s
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
window.addEventListener(
|
|
245
|
-
window.removeEventListener(
|
|
244
|
+
window.addEventListener(ct.Message, M), c("Parent: Awaiting handshake"), Gs(i, h), l((v) => {
|
|
245
|
+
window.removeEventListener(ct.Message, M), v && P(v);
|
|
246
246
|
});
|
|
247
247
|
}),
|
|
248
248
|
destroy() {
|
|
@@ -856,7 +856,7 @@ class ne {
|
|
|
856
856
|
}, this.isSourceMigrated = (i) => "id" in i;
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
|
-
var B, St,
|
|
859
|
+
var B, St, lt, as;
|
|
860
860
|
let Je = (as = class {
|
|
861
861
|
/**
|
|
862
862
|
* @ignore
|
|
@@ -867,21 +867,21 @@ let Je = (as = class {
|
|
|
867
867
|
*/
|
|
868
868
|
u(this, B);
|
|
869
869
|
u(this, St);
|
|
870
|
-
u(this,
|
|
870
|
+
u(this, lt);
|
|
871
871
|
this.getById = async (e) => (await a(this, B)).getConnectorById(e).then((n) => o(n)).then((n) => {
|
|
872
872
|
const c = { ...n, parsedData: null };
|
|
873
|
-
return n.parsedData && (c.parsedData = a(this,
|
|
873
|
+
return n.parsedData && (c.parsedData = a(this, lt).makeSingleConnectorBackwardsCompatible(
|
|
874
874
|
n.parsedData,
|
|
875
875
|
a(this, St).get(Z.GraFxStudioEnvironmentApiUrl)
|
|
876
876
|
)), c;
|
|
877
877
|
}), this.getAllByType = async (e) => (await a(this, B)).getConnectors(e).then((n) => o(n)).then((n) => {
|
|
878
878
|
const c = { ...n, parsedData: null };
|
|
879
|
-
return n.parsedData && (c.parsedData = a(this,
|
|
879
|
+
return n.parsedData && (c.parsedData = a(this, lt).makeMultipleConnectorsBackwardsCompatible(
|
|
880
880
|
n.parsedData,
|
|
881
881
|
a(this, St).get(Z.GraFxStudioEnvironmentApiUrl)
|
|
882
882
|
)), c;
|
|
883
883
|
}), this.register = async (e) => {
|
|
884
|
-
const r = await a(this, B), n = a(this,
|
|
884
|
+
const r = await a(this, B), n = a(this, lt).makeConnectorSourceForwardsCompatible(e);
|
|
885
885
|
return r.registerConnector(JSON.stringify(n)).then((c) => o(c));
|
|
886
886
|
}, this.unregister = async (e) => (await a(this, B)).unregisterConnector(e).then((n) => o(n)), this.configure = async (e, r) => {
|
|
887
887
|
const n = await a(this, B);
|
|
@@ -930,7 +930,7 @@ let Je = (as = class {
|
|
|
930
930
|
)
|
|
931
931
|
)) ?? [], l = r.filter((p) => p.name !== "" && p.value !== ""), y = [...h, ...l];
|
|
932
932
|
await n.setMappings(y);
|
|
933
|
-
}), g(this, B, i), g(this, St, t), g(this,
|
|
933
|
+
}), g(this, B, i), g(this, St, t), g(this, lt, new ne());
|
|
934
934
|
}
|
|
935
935
|
async getMappings(i, t) {
|
|
936
936
|
return (await a(this, B)).getConnectorMappings(i).then((r) => o(r)).then(
|
|
@@ -943,8 +943,8 @@ let Je = (as = class {
|
|
|
943
943
|
}
|
|
944
944
|
);
|
|
945
945
|
}
|
|
946
|
-
}, B = new WeakMap(), St = new WeakMap(),
|
|
947
|
-
var
|
|
946
|
+
}, B = new WeakMap(), St = new WeakMap(), lt = new WeakMap(), as);
|
|
947
|
+
var dt, ut;
|
|
948
948
|
class wr {
|
|
949
949
|
/**
|
|
950
950
|
* @ignore
|
|
@@ -953,20 +953,20 @@ class wr {
|
|
|
953
953
|
/**
|
|
954
954
|
* @ignore
|
|
955
955
|
*/
|
|
956
|
-
u(this, lt);
|
|
957
956
|
u(this, dt);
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
957
|
+
u(this, ut);
|
|
958
|
+
this.setOptions = async (e) => a(this, ut).setConnectorOptions(a(this, dt), JSON.stringify(e)).then((r) => o(r)), this.setMappings = async (e) => {
|
|
959
|
+
const r = await a(this, ut).setConnectorMappings(
|
|
960
|
+
a(this, dt),
|
|
961
961
|
e.map(function(n) {
|
|
962
962
|
return JSON.stringify(n);
|
|
963
963
|
})
|
|
964
964
|
);
|
|
965
965
|
return o(r);
|
|
966
|
-
}, this.setHttpHeader = async (e, r) => a(this,
|
|
966
|
+
}, this.setHttpHeader = async (e, r) => a(this, ut).connectorAuthenticationSetHttpHeader(a(this, dt), e, r).then((n) => o(n)), g(this, dt, i), g(this, ut, t);
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
|
|
969
|
+
dt = new WeakMap(), ut = new WeakMap();
|
|
970
970
|
var et, Ut;
|
|
971
971
|
class Ue {
|
|
972
972
|
/**
|
|
@@ -1022,7 +1022,7 @@ class Te {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
1024
|
rt = new WeakMap();
|
|
1025
|
-
var
|
|
1025
|
+
var gt;
|
|
1026
1026
|
class Ge {
|
|
1027
1027
|
/**
|
|
1028
1028
|
* @ignore
|
|
@@ -1031,17 +1031,17 @@ class Ge {
|
|
|
1031
1031
|
/**
|
|
1032
1032
|
* @ignore
|
|
1033
1033
|
*/
|
|
1034
|
-
u(this,
|
|
1035
|
-
this.getCurrentState = async () => (await a(this,
|
|
1036
|
-
const r = await a(this,
|
|
1034
|
+
u(this, gt);
|
|
1035
|
+
this.getCurrentState = async () => (await a(this, gt)).getCurrentDocumentState().then((e) => o(e)), this.load = async (t, e = { keepConnectors: !1 }) => {
|
|
1036
|
+
const r = await a(this, gt), n = typeof t != "string" ? JSON.stringify(t) : t;
|
|
1037
1037
|
return r.loadDocument(n, JSON.stringify(e)).then((c) => o(c));
|
|
1038
1038
|
}, this.createAndLoad = async (t) => {
|
|
1039
|
-
const e = await a(this,
|
|
1039
|
+
const e = await a(this, gt), r = JSON.stringify(t);
|
|
1040
1040
|
return e.createAndLoadDocument(r).then((n) => o(n));
|
|
1041
|
-
}, g(this,
|
|
1041
|
+
}, g(this, gt, i);
|
|
1042
1042
|
}
|
|
1043
1043
|
}
|
|
1044
|
-
|
|
1044
|
+
gt = new WeakMap();
|
|
1045
1045
|
var fr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(fr || {}), zt = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(zt || {}), Sr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s))(Sr || {}), br = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(br || {}), Ir = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Ir || {}), vr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(vr || {}), Pr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Pr || {}), Ar = /* @__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))(Ar || {}), Fr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(Fr || {}), Er = /* @__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))(Er || {}), Dr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Dr || {}), Lr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(Lr || {}), Or = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Or || {}), Nr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Nr || {});
|
|
1046
1046
|
class Fn {
|
|
1047
1047
|
constructor() {
|
|
@@ -1252,7 +1252,7 @@ class ze {
|
|
|
1252
1252
|
this.currentEngineVersion = cs.current, this.currentSDKVersion = hs.version;
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
|
-
var
|
|
1255
|
+
var w, Tt;
|
|
1256
1256
|
class We {
|
|
1257
1257
|
/**
|
|
1258
1258
|
* @ignore
|
|
@@ -1261,26 +1261,26 @@ class We {
|
|
|
1261
1261
|
/**
|
|
1262
1262
|
* @ignore
|
|
1263
1263
|
*/
|
|
1264
|
-
u(this,
|
|
1264
|
+
u(this, w);
|
|
1265
1265
|
u(this, Tt);
|
|
1266
|
-
this.getAll = async () => (await a(this,
|
|
1267
|
-
const r = await a(this,
|
|
1266
|
+
this.getAll = async () => (await a(this, w)).getLayouts().then((e) => o(e)), this.getById = async (t) => (await a(this, w)).getLayoutById(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, w)).getLayoutByName(t).then((r) => o(r)), this.getSelected = async () => (await a(this, w)).getSelectedLayout().then((e) => o(e)), this.remove = async (t) => (await a(this, w)).removeLayout(t).then((r) => o(r)), this.create = async (t, e) => {
|
|
1267
|
+
const r = await a(this, w);
|
|
1268
1268
|
return e != null && e.length ? r.addLayouts(t, JSON.stringify(e)).then((n) => o(n)) : r.addLayout(t).then((n) => o(n));
|
|
1269
|
-
}, this.rename = async (t, e) => (await a(this,
|
|
1269
|
+
}, this.rename = async (t, e) => (await a(this, w)).renameLayout(t, e).then((n) => o(n)), this.select = async (t) => (await a(this, w)).selectLayout(t).then((r) => o(r)), this.duplicate = async (t) => (await a(this, w)).duplicateLayout(t).then((r) => o(r)), this.reset = async (t) => (await a(this, w)).resetLayout(t).then((r) => o(r)), this.setHeight = async (t, e) => (await a(this, w)).setLayoutHeight(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await a(this, w)).setLayoutWidth(t, e).then((n) => o(n)), this.setUnit = async (t, e) => (await a(this, w)).setLayoutUnit(t, e).then((n) => o(n)), this.resetHeight = async (t) => (await a(this, w)).resetLayoutHeight(t).then((r) => o(r)), this.resetWidth = async (t) => (await a(this, w)).resetLayoutWidth(t).then((r) => o(r)), this.resetUnit = async (t) => (await a(this, w)).resetLayoutUnit(t).then((r) => o(r)), this.getSelectedSnapshot = async () => (await a(this, Tt)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await a(this, w)).setLayoutIntent(t, e).then((n) => o(n)), this.resetIntent = async (t) => (await a(this, w)).resetLayoutIntent(t).then((r) => o(r)), this.setFillColor = async (t, e) => (await a(this, w)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => o(n)), this.setFillColorEnabled = async (t, e) => (await a(this, w)).setLayoutFillColorEnabled(t, e).then((n) => o(n)), this.resetFillColor = async (t) => (await a(this, w)).resetLayoutFillColor(t).then((r) => o(r)), this.setBleedValue = async (t, e, r) => {
|
|
1270
1270
|
const n = r ? {
|
|
1271
1271
|
left: r === Y.left ? e : void 0,
|
|
1272
1272
|
top: r === Y.top ? e : void 0,
|
|
1273
1273
|
right: r === Y.right ? e : void 0,
|
|
1274
1274
|
bottom: r === Y.bottom ? e : void 0
|
|
1275
1275
|
} : { left: e, top: e, right: e, bottom: e };
|
|
1276
|
-
return (await a(this,
|
|
1276
|
+
return (await a(this, w)).updateLayoutBleed(t, JSON.stringify(n)).then((h) => o(h));
|
|
1277
1277
|
}, this.setAreBleedValuesCombined = async (t, e) => {
|
|
1278
1278
|
const r = { areBleedValuesCombined: e };
|
|
1279
|
-
return (await a(this,
|
|
1280
|
-
}, this.resetBleedValues = async (t) => (await a(this,
|
|
1279
|
+
return (await a(this, w)).updateLayoutBleed(t, JSON.stringify(r)).then((c) => o(c));
|
|
1280
|
+
}, this.resetBleedValues = async (t) => (await a(this, w)).updateLayoutBleed(t, null).then((r) => o(r)), this.setPrivateData = async (t, e) => (await a(this, w)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await a(this, w)).getLayoutPrivateData(t).then((r) => o(r)), this.setDisplayName = async (t, e) => (await a(this, w)).setLayoutDisplayName(t, e).then((n) => o(n)), this.getDisplayName = async (t) => (await a(this, w)).getLayoutDisplayName(t).then((r) => o(r)), this.resetDisplayName = async (t) => (await a(this, w)).setLayoutDisplayName(t, null).then((r) => o(r)), this.setAvailableForUser = async (t, e) => (await a(this, w)).setLayoutAvailableForUser(t, e).then((n) => o(n)), this.setSelectedByUser = async (t, e) => (await a(this, w)).setLayoutSelectedByUser(t, e).then((n) => o(n)), this.setResizableByUser = async (t, e) => (await a(this, w)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => o(n)), g(this, w, i), g(this, Tt, i);
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
|
-
|
|
1283
|
+
w = new WeakMap(), Tt = new WeakMap();
|
|
1284
1284
|
var se = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(se || {}), ms = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(ms || {}), W, Gt;
|
|
1285
1285
|
class qe {
|
|
1286
1286
|
/**
|
|
@@ -1501,7 +1501,7 @@ let Ur = class {
|
|
|
1501
1501
|
}, this.config = i, this.localConfig = t;
|
|
1502
1502
|
}
|
|
1503
1503
|
};
|
|
1504
|
-
var
|
|
1504
|
+
var yt;
|
|
1505
1505
|
class Ze {
|
|
1506
1506
|
/**
|
|
1507
1507
|
* @ignore
|
|
@@ -1510,11 +1510,11 @@ class Ze {
|
|
|
1510
1510
|
/**
|
|
1511
1511
|
* @ignore
|
|
1512
1512
|
*/
|
|
1513
|
-
u(this,
|
|
1514
|
-
this.set = async (t) => (await a(this,
|
|
1513
|
+
u(this, yt);
|
|
1514
|
+
this.set = async (t) => (await a(this, yt)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => o(r)), this.removeSelected = async () => (await a(this, yt)).selectedTextStyleClean().then((e) => o(e)), this.getSelected = async () => (await a(this, yt)).getSelectedTextStyle().then((e) => o(e)), g(this, yt, i);
|
|
1515
1515
|
}
|
|
1516
1516
|
}
|
|
1517
|
-
|
|
1517
|
+
yt = new WeakMap();
|
|
1518
1518
|
var kr = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(kr || {}), Tr = /* @__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))(Tr || {}), H = /* @__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))(H || {}), Gr = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s))(Gr || {}), re = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(re || {}), vt;
|
|
1519
1519
|
class Qe {
|
|
1520
1520
|
/**
|
|
@@ -1529,7 +1529,7 @@ class Qe {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
1531
|
vt = new WeakMap();
|
|
1532
|
-
var q,
|
|
1532
|
+
var q, pt, _t;
|
|
1533
1533
|
class Xe {
|
|
1534
1534
|
/**
|
|
1535
1535
|
* @ignore
|
|
@@ -1539,18 +1539,18 @@ class Xe {
|
|
|
1539
1539
|
* @ignore
|
|
1540
1540
|
*/
|
|
1541
1541
|
u(this, q);
|
|
1542
|
-
u(this,
|
|
1542
|
+
u(this, pt);
|
|
1543
1543
|
u(this, _t);
|
|
1544
1544
|
this.undo = async () => (await a(this, q)).undo().then((r) => o(r)), this.redo = async () => (await a(this, q)).redo().then((r) => o(r)), this.addCustomData = async (e, r) => (await a(this, q)).setCustomUndoData(e, r, !1).then((c) => o(c)), this.record = async (e, r) => {
|
|
1545
1545
|
try {
|
|
1546
|
-
await a(this,
|
|
1546
|
+
await a(this, pt).beginIfNoneActive(e), await r(a(this, _t)), await a(this, pt).end();
|
|
1547
1547
|
} catch (n) {
|
|
1548
|
-
throw await a(this,
|
|
1548
|
+
throw await a(this, pt).abort(), n;
|
|
1549
1549
|
}
|
|
1550
|
-
}, this.pause = async () => (await a(this, q)).pause().then((r) => o(r)), this.resume = async () => (await a(this, q)).resume().then((r) => o(r)), g(this, q, i), g(this, _t, t), g(this,
|
|
1550
|
+
}, this.pause = async () => (await a(this, q)).pause().then((r) => o(r)), this.resume = async () => (await a(this, q)).resume().then((r) => o(r)), g(this, q, i), g(this, _t, t), g(this, pt, new Hr(i));
|
|
1551
1551
|
}
|
|
1552
1552
|
}
|
|
1553
|
-
q = new WeakMap(),
|
|
1553
|
+
q = new WeakMap(), pt = new WeakMap(), _t = new WeakMap();
|
|
1554
1554
|
var at;
|
|
1555
1555
|
class Hr {
|
|
1556
1556
|
/**
|
|
@@ -1683,7 +1683,7 @@ class Kr {
|
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
1685
|
Kt = new WeakMap();
|
|
1686
|
-
var
|
|
1686
|
+
var m, At, Ft, os;
|
|
1687
1687
|
let es = (os = class {
|
|
1688
1688
|
/**
|
|
1689
1689
|
* @ignore
|
|
@@ -1692,31 +1692,31 @@ let es = (os = class {
|
|
|
1692
1692
|
/**
|
|
1693
1693
|
* @ignore
|
|
1694
1694
|
*/
|
|
1695
|
-
u(this,
|
|
1695
|
+
u(this, m);
|
|
1696
1696
|
u(this, At);
|
|
1697
1697
|
u(this, Ft);
|
|
1698
|
-
this.getAll = async () => (await a(this,
|
|
1698
|
+
this.getAll = async () => (await a(this, m)).getVariables().then((e) => o(e)).then((e) => {
|
|
1699
1699
|
const r = e;
|
|
1700
1700
|
return r.parsedData && (r.parsedData = this.makeVariablesBackwardsCompatible(r.parsedData)), r;
|
|
1701
|
-
}), this.getById = async (t) => (await a(this,
|
|
1701
|
+
}), this.getById = async (t) => (await a(this, m)).getVariableById(t).then((r) => o(r)).then((r) => {
|
|
1702
1702
|
const n = r;
|
|
1703
1703
|
return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
|
|
1704
|
-
}), this.getByName = async (t) => (await a(this,
|
|
1704
|
+
}), this.getByName = async (t) => (await a(this, m)).getVariableByName(t).then((r) => o(r)).then((r) => {
|
|
1705
1705
|
const n = r;
|
|
1706
1706
|
return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
|
|
1707
|
-
}), this.create = async (t, e) => (await a(this,
|
|
1707
|
+
}), this.create = async (t, e) => (await a(this, m)).addVariable(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, m)).removeVariables(t).then((r) => o(r)), this.rename = async (t, e) => (await a(this, m)).setVariableName(t, e).then((n) => o(n)), this.setLabel = async (t, e) => (await a(this, m)).setVariableLabel(t, e).then((n) => o(n)), g(this, At, async (t, e) => (await a(this, m)).setVariablePlaceholder(t, e).then((n) => o(n))), this.setPlaceholder = async (t, e) => a(this, At).call(this, t, e), this.resetPlaceholder = async (t) => a(this, At).call(this, t, null), g(this, Ft, async (t, e) => (await a(this, m)).setVariableHelpText(t, e).then((n) => o(n))), this.setHelpText = async (t, e) => a(this, Ft).call(this, t, e), this.resetHelpText = async (t) => a(this, Ft).call(this, t, null), this.setType = async (t, e) => (await a(this, m)).setVariableType(t, e).then((n) => o(n)), this.setListVariable = async (t, e) => (await a(this, m)).setListVariableItems(
|
|
1708
1708
|
t,
|
|
1709
1709
|
e.map((n) => JSON.stringify({ value: n }))
|
|
1710
|
-
).then((n) => o(n)), this.setValue = async (t, e) => (await a(this,
|
|
1710
|
+
).then((n) => o(n)), this.setValue = async (t, e) => (await a(this, m)).setVariableValue(t, e).then((n) => o(n)), this.duplicate = async (t) => (await a(this, m)).duplicateVariable(t).then((r) => o(r)), this.groupVariables = async (t, e) => (await a(this, m)).groupVariables(t, e).then((n) => o(n)), this.ungroupVariables = async (t) => (await a(this, m)).ungroupVariable(t).then((r) => o(r)), this.move = async (t, e, r) => (await a(this, m)).moveVariable(e, r, t).then((c) => o(c)), this.moveVariables = async (t, e, r) => (await a(this, m)).moveVariables(e, r, t).then((c) => o(c)), this.setIsVisible = async (t, e) => {
|
|
1711
1711
|
const r = e ? { type: Mt.visible } : { type: Mt.invisible };
|
|
1712
1712
|
return this.setVariableVisibility(t, r);
|
|
1713
1713
|
}, this.setIsHidden = async (t, e) => {
|
|
1714
1714
|
const r = e ? { type: Mt.invisible } : { type: Mt.visible };
|
|
1715
1715
|
return this.setVariableVisibility(t, r);
|
|
1716
|
-
}, this.setVariableVisibility = async (t, e) => (await a(this,
|
|
1717
|
-
const r = await a(this,
|
|
1716
|
+
}, this.setVariableVisibility = async (t, e) => (await a(this, m)).setVariableVisibility(t, JSON.stringify(e)).then((n) => o(n)), this.setLayoutsForVariableVisibility = async (t) => (await a(this, m)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((r) => o(r)), this.setIsRequired = async (t, e) => (await a(this, m)).setVariableIsRequired(t, e).then((n) => o(n)), this.setRemoveParagraphIfEmpty = async (t, e) => (await a(this, m)).setVariableRemoveParagraphIfEmpty(t, e).then((n) => o(n)), this.setIsReadonly = async (t, e) => (await a(this, m)).setVariableIsReadonly(t, e).then((n) => o(n)), this.getImageVariableConnectorId = async (t) => (await a(this, m)).getImageVariableConnectorId(t).then((r) => o(r)), this.setImageVariableConnector = async (t, e) => {
|
|
1717
|
+
const r = await a(this, m), c = new ne().makeConnectorSourceForwardsCompatible(e);
|
|
1718
1718
|
return r.setImageVariableConnector(t, JSON.stringify(c)).then((h) => o(h));
|
|
1719
|
-
}, this.removeSource = async (t) => this.setValue(t, null), this.setPrefix = async (t, e) => {
|
|
1719
|
+
}, this.setImageVariableConnectorContext = async (t, e) => (await a(this, m)).setImageVariableConnectorContext(t, JSON.stringify(e)).then((n) => o(n)), this.removeSource = async (t) => this.setValue(t, null), this.setPrefix = async (t, e) => {
|
|
1720
1720
|
const r = { prefix: { value: e } };
|
|
1721
1721
|
return this.applyPrefixSuffixDeltaUpdate(t, r);
|
|
1722
1722
|
}, this.setSuffix = async (t, e) => {
|
|
@@ -1728,7 +1728,7 @@ let es = (os = class {
|
|
|
1728
1728
|
}, this.setSuffixCharacterStyle = async (t, e) => {
|
|
1729
1729
|
const r = { suffixCharacterStyleId: { value: e } };
|
|
1730
1730
|
return this.applyPrefixSuffixDeltaUpdate(t, r);
|
|
1731
|
-
}, this.setPrivateData = async (t, e) => (await a(this,
|
|
1731
|
+
}, this.setPrivateData = async (t, e) => (await a(this, m)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await a(this, m)).getVariablePrivateData(t).then((r) => o(r)), this.setAllowImageQuery = async (t, e) => (await a(this, m)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowImageUpload = async (t, e) => (await a(this, m)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinImageUploadSize = async (t, e, r) => (await a(this, m)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, m, i), this.number = new $r(a(this, m)), this.date = new Kr(a(this, m));
|
|
1732
1732
|
}
|
|
1733
1733
|
makeVariablesBackwardsCompatible(i) {
|
|
1734
1734
|
return i.map((t) => this.makeVariableBackwardsCompatible(t));
|
|
@@ -1741,10 +1741,10 @@ let es = (os = class {
|
|
|
1741
1741
|
return t.items = n, t.selected = r == null ? void 0 : r.value, t;
|
|
1742
1742
|
}
|
|
1743
1743
|
async applyPrefixSuffixDeltaUpdate(i, t) {
|
|
1744
|
-
const r = await (await a(this,
|
|
1744
|
+
const r = await (await a(this, m)).updateVariablePrefixSuffixProperties(i, JSON.stringify(t));
|
|
1745
1745
|
return o(r);
|
|
1746
1746
|
}
|
|
1747
|
-
},
|
|
1747
|
+
}, m = new WeakMap(), At = new WeakMap(), Ft = new WeakMap(), os);
|
|
1748
1748
|
class zr {
|
|
1749
1749
|
/**
|
|
1750
1750
|
* @ignore
|
|
@@ -1761,7 +1761,7 @@ class zr {
|
|
|
1761
1761
|
}, this.config = i;
|
|
1762
1762
|
}
|
|
1763
1763
|
}
|
|
1764
|
-
var
|
|
1764
|
+
var it;
|
|
1765
1765
|
class Wr {
|
|
1766
1766
|
/**
|
|
1767
1767
|
* @ignore
|
|
@@ -1770,22 +1770,22 @@ class Wr {
|
|
|
1770
1770
|
/**
|
|
1771
1771
|
* @ignore
|
|
1772
1772
|
*/
|
|
1773
|
-
u(this,
|
|
1774
|
-
this.getAll = async () => (await a(this,
|
|
1773
|
+
u(this, it);
|
|
1774
|
+
this.getAll = async () => (await a(this, it)).getVariables().then((e) => o(e)), this.getById = async (t) => (await a(this, it)).getVariableById(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, it)).getVariableByName(t).then((r) => o(r)), this.setListVariable = async (t, e) => (await a(this, it)).setListVariableItems(
|
|
1775
1775
|
t,
|
|
1776
1776
|
e.map((n) => JSON.stringify(n))
|
|
1777
|
-
).then((n) => o(n)),
|
|
1777
|
+
).then((n) => o(n)), g(this, it, i), this.image = new qr(i);
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
|
-
|
|
1781
|
-
var
|
|
1780
|
+
it = new WeakMap();
|
|
1781
|
+
var j;
|
|
1782
1782
|
class qr {
|
|
1783
1783
|
constructor(i) {
|
|
1784
|
-
u(this,
|
|
1785
|
-
this.setAllowQuery = async (t, e) => (await a(this,
|
|
1784
|
+
u(this, j);
|
|
1785
|
+
this.setAllowQuery = async (t, e) => (await a(this, j)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowUpload = async (t, e) => (await a(this, j)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinUploadSize = async (t, e, r) => (await a(this, j)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), this.setConnector = async (t, e) => (await a(this, j)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => o(n)), this.setConnectorContext = async (t, e) => (await a(this, j)).setImageVariableConnectorContext(t, JSON.stringify(e)).then((n) => o(n)), g(this, j, i);
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
|
-
|
|
1788
|
+
j = new WeakMap();
|
|
1789
1789
|
var Ct;
|
|
1790
1790
|
class jr {
|
|
1791
1791
|
/**
|
|
@@ -2141,7 +2141,7 @@ class Zr {
|
|
|
2141
2141
|
}), t;
|
|
2142
2142
|
}
|
|
2143
2143
|
}
|
|
2144
|
-
var
|
|
2144
|
+
var ot;
|
|
2145
2145
|
class Qr {
|
|
2146
2146
|
/**
|
|
2147
2147
|
* @ignore
|
|
@@ -2150,8 +2150,8 @@ class Qr {
|
|
|
2150
2150
|
/**
|
|
2151
2151
|
* @ignore
|
|
2152
2152
|
*/
|
|
2153
|
-
u(this,
|
|
2154
|
-
g(this,
|
|
2153
|
+
u(this, ot);
|
|
2154
|
+
g(this, ot, i);
|
|
2155
2155
|
}
|
|
2156
2156
|
/**
|
|
2157
2157
|
* This method returns the value for a given configuration key. If a value was not found in the configuration store
|
|
@@ -2159,7 +2159,7 @@ class Qr {
|
|
|
2159
2159
|
* @returns value for a given configuration key
|
|
2160
2160
|
*/
|
|
2161
2161
|
async getValue(i) {
|
|
2162
|
-
return (await a(this,
|
|
2162
|
+
return (await a(this, ot)).getConfigValue(i).then((e) => o(e));
|
|
2163
2163
|
}
|
|
2164
2164
|
/**
|
|
2165
2165
|
* This method sets, or overrides the value for a given key. Null values are not allowed for both key and value,
|
|
@@ -2167,24 +2167,24 @@ class Qr {
|
|
|
2167
2167
|
* @returns
|
|
2168
2168
|
*/
|
|
2169
2169
|
async setValue(i, t) {
|
|
2170
|
-
return (await a(this,
|
|
2170
|
+
return (await a(this, ot)).setConfigValue(i, t).then((r) => o(r));
|
|
2171
2171
|
}
|
|
2172
2172
|
/**
|
|
2173
2173
|
* This method updates the studio options. Only defined options are updated, null values are ignored.
|
|
2174
2174
|
* @returns
|
|
2175
2175
|
*/
|
|
2176
2176
|
async updateStudioOptions(i) {
|
|
2177
|
-
return (await a(this,
|
|
2177
|
+
return (await a(this, ot)).updateStudioOptions(JSON.stringify(i)).then((e) => o(e));
|
|
2178
2178
|
}
|
|
2179
2179
|
/**
|
|
2180
2180
|
* This method returns the engine session id. This id is unique for this engine session
|
|
2181
2181
|
* @returns the engine session id
|
|
2182
2182
|
*/
|
|
2183
2183
|
async getEngineSessionId() {
|
|
2184
|
-
return (await a(this,
|
|
2184
|
+
return (await a(this, ot)).getEngineSessionId().then((t) => o(t));
|
|
2185
2185
|
}
|
|
2186
2186
|
}
|
|
2187
|
-
|
|
2187
|
+
ot = new WeakMap();
|
|
2188
2188
|
var Dt;
|
|
2189
2189
|
class ns extends Qr {
|
|
2190
2190
|
/**
|