@univerjs/drawing-ui 0.5.3 → 0.5.4
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/lib/cjs/index.js +2 -2
- package/lib/es/index.js +397 -396
- package/lib/umd/index.js +2 -2
- package/package.json +10 -9
package/lib/es/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Q = (i, t, n) =>
|
|
4
|
-
import { UniverInstanceType as
|
|
5
|
-
import { getDrawingShapeKeyByDrawingSearch as G, ImageSourceType as
|
|
6
|
-
import { Group as
|
|
7
|
-
import { IDialogService as
|
|
8
|
-
import
|
|
9
|
-
import { Select as
|
|
10
|
-
import { filter as
|
|
11
|
-
function
|
|
1
|
+
var Tn = Object.defineProperty;
|
|
2
|
+
var Bn = (i, t, n) => t in i ? Tn(i, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[t] = n;
|
|
3
|
+
var Q = (i, t, n) => Bn(i, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { UniverInstanceType as Me, DrawingTypeEnum as ee, CommandType as ve, useDependency as L, ICommandService as me, LocaleService as ne, ArrangeTypeEnum as Ie, Tools as Un, debounce as Pe, Inject as He, Disposable as Le, checkIfMove as ln, toDisposable as we, IUniverInstanceService as Ye, Injector as An, Plugin as Hn, merge as Ln, IConfigService as Vn } from "@univerjs/core";
|
|
5
|
+
import { getDrawingShapeKeyByDrawingSearch as G, ImageSourceType as Gn, IDrawingManagerService as te, IImageIoService as mn, SetDrawingSelectedOperation as Oe } from "@univerjs/drawing";
|
|
6
|
+
import { Group as _e, DRAWING_OBJECT_LAYER_INDEX as Ze, Image as Fe, IRenderManagerService as ue, getGroupState as Wn, transformObjectOutOfGroup as $n, RENDER_CLASS_TYPE as Je, Shape as kn, Rect as zn, Canvas as Fn, precisionTo as ye, CURSOR_TYPE as Ne, Vector2 as We, degToRad as Qe } from "@univerjs/engine-render";
|
|
7
|
+
import { IDialogService as gn, ComponentManager as Kn, IMessageService as Yn } from "@univerjs/ui";
|
|
8
|
+
import Zn, { useState as H, forwardRef as Y, useRef as un, createElement as Z, useEffect as Se } from "react";
|
|
9
|
+
import { Select as dn, Button as ce, InputNumber as fe, Checkbox as Xn, DropdownLegacy as qn, MessageType as en } from "@univerjs/design";
|
|
10
|
+
import { filter as Jn, switchMap as Qn } from "rxjs";
|
|
11
|
+
function et(i, t, n, e) {
|
|
12
12
|
const r = e.getDrawingByParam(i);
|
|
13
13
|
if (r == null)
|
|
14
14
|
return;
|
|
15
15
|
const s = G(i), a = n.getObject(s);
|
|
16
|
-
if (a && !(a instanceof
|
|
16
|
+
if (a && !(a instanceof _e))
|
|
17
17
|
return;
|
|
18
18
|
if (a != null) {
|
|
19
19
|
a.addObject(t);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
const o = new
|
|
23
|
-
n.addObject(o,
|
|
22
|
+
const o = new _e(s);
|
|
23
|
+
n.addObject(o, Ze).attachTransformerTo(o), o.addObject(t);
|
|
24
24
|
const { transform: c } = r;
|
|
25
25
|
c && o.transformByState(
|
|
26
26
|
{
|
|
@@ -30,23 +30,23 @@ function Qn(i, t, n, e) {
|
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function hn(i, t) {
|
|
34
34
|
var s;
|
|
35
35
|
const n = t ? i.getUnit(t) : i.getFocusedUnit();
|
|
36
36
|
if (n == null)
|
|
37
37
|
return;
|
|
38
38
|
const e = n.getUnitId();
|
|
39
39
|
let r;
|
|
40
|
-
return n.type ===
|
|
40
|
+
return n.type === Me.UNIVER_SHEET ? r = (s = n.getActiveSheet()) == null ? void 0 : s.getSheetId() : (n.type === Me.UNIVER_DOC || n.type === Me.UNIVER_SLIDE) && (r = e), { unitId: e, subUnitId: r, current: n };
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
var
|
|
44
|
-
for (var r = e > 1 ? void 0 : e ?
|
|
42
|
+
const fn = "COMPONENT_IMAGE_VIEWER";
|
|
43
|
+
var nt = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, rt = (i, t, n, e) => {
|
|
44
|
+
for (var r = e > 1 ? void 0 : e ? tt(t, n) : t, s = i.length - 1, a; s >= 0; s--)
|
|
45
45
|
(a = i[s]) && (r = (e ? a(t, n, r) : a(r)) || r);
|
|
46
|
-
return e && r &&
|
|
47
|
-
},
|
|
48
|
-
const
|
|
49
|
-
let
|
|
46
|
+
return e && r && nt(t, n, r), r;
|
|
47
|
+
}, $e = (i, t) => (n, e) => t(n, e, i);
|
|
48
|
+
const nn = 50;
|
|
49
|
+
let De = class {
|
|
50
50
|
constructor(i, t, n) {
|
|
51
51
|
this._drawingManagerService = i, this._imageIoService = t, this._dialogService = n;
|
|
52
52
|
}
|
|
@@ -68,11 +68,11 @@ let Ne = class {
|
|
|
68
68
|
} = i;
|
|
69
69
|
if (e !== ee.DRAWING_IMAGE || !this._drawingManagerService.getDrawingVisible() || n == null)
|
|
70
70
|
return;
|
|
71
|
-
const
|
|
72
|
-
for (const p of
|
|
73
|
-
const { left: S, top:
|
|
71
|
+
const _ = h && f ? f : [n], w = [];
|
|
72
|
+
for (const p of _) {
|
|
73
|
+
const { left: S, top: v, width: j, height: b, angle: N, flipX: P, flipY: I, skewX: y, skewY: x } = p, D = _.indexOf(p), B = G({ unitId: g, subUnitId: m, drawingId: d }, h ? D : void 0), E = t.getObject(B);
|
|
74
74
|
if (E != null) {
|
|
75
|
-
E.transformByState({ left: S, top:
|
|
75
|
+
E.transformByState({ left: S, top: v, width: j, height: b, angle: N, flipX: P, flipY: I, skewX: y, skewY: x });
|
|
76
76
|
continue;
|
|
77
77
|
}
|
|
78
78
|
const re = this._drawingManagerService.getDrawingOrder(g, m), W = re.indexOf(d), q = { ...p, zIndex: W === -1 ? re.length - 1 : W }, be = this._imageIoService.getImageSourceCache(r, s);
|
|
@@ -80,11 +80,11 @@ let Ne = class {
|
|
|
80
80
|
if (be != null)
|
|
81
81
|
q.image = be;
|
|
82
82
|
else {
|
|
83
|
-
if (s ===
|
|
83
|
+
if (s === Gn.UUID)
|
|
84
84
|
try {
|
|
85
85
|
q.url = await this._imageIoService.getImage(r);
|
|
86
|
-
} catch (
|
|
87
|
-
console.error(
|
|
86
|
+
} catch (Ge) {
|
|
87
|
+
console.error(Ge);
|
|
88
88
|
continue;
|
|
89
89
|
}
|
|
90
90
|
else
|
|
@@ -94,8 +94,8 @@ let Ne = class {
|
|
|
94
94
|
if (t.getObject(B))
|
|
95
95
|
continue;
|
|
96
96
|
q.printable = !0;
|
|
97
|
-
const k = new
|
|
98
|
-
ie && this._imageIoService.addImageSourceCache(r, s, k.getNative()), this._drawingManagerService.getDrawingVisible() && (t.addObject(k,
|
|
97
|
+
const k = new Fe(B, q);
|
|
98
|
+
ie && this._imageIoService.addImageSourceCache(r, s, k.getNative()), this._drawingManagerService.getDrawingVisible() && (t.addObject(k, Ze), this._drawingManagerService.getDrawingEditable() && t.attachTransformerTo(k), c && et({ drawingId: c, unitId: g, subUnitId: m }, k, t, this._drawingManagerService), o != null && k.setPrstGeom(o), a != null && k.setSrcRect(a), w.push(k));
|
|
99
99
|
}
|
|
100
100
|
return w;
|
|
101
101
|
}
|
|
@@ -108,13 +108,13 @@ let Ne = class {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
previewImage(i, t, n, e) {
|
|
111
|
-
const r = `${i}-viewer-dialog`, s = window.innerWidth -
|
|
111
|
+
const r = `${i}-viewer-dialog`, s = window.innerWidth - nn, a = window.innerHeight - nn, o = this._adjustImageSize(n, e, s, a), c = this._dialogService.open({
|
|
112
112
|
width: Math.max(o.width, 200),
|
|
113
113
|
id: r,
|
|
114
114
|
style: { margin: "0", top: "50%", left: "50%", transform: "translate(-50%, -50%)" },
|
|
115
115
|
children: {
|
|
116
116
|
label: {
|
|
117
|
-
name:
|
|
117
|
+
name: fn,
|
|
118
118
|
props: {
|
|
119
119
|
src: t,
|
|
120
120
|
width: o.width,
|
|
@@ -142,22 +142,22 @@ let Ne = class {
|
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
],
|
|
150
|
-
function
|
|
145
|
+
De = rt([
|
|
146
|
+
$e(0, te),
|
|
147
|
+
$e(1, mn),
|
|
148
|
+
$e(2, gn)
|
|
149
|
+
], De);
|
|
150
|
+
function Ve(i, t) {
|
|
151
151
|
const n = [];
|
|
152
152
|
return i.forEach((e) => {
|
|
153
153
|
const { oKey: r, left: s, top: a, height: o, width: c, angle: g } = e, m = t.getDrawingOKey(r);
|
|
154
154
|
if (m == null)
|
|
155
155
|
return n.push(null), !0;
|
|
156
|
-
const { unitId: d, subUnitId: h, drawingId: f, drawingType:
|
|
156
|
+
const { unitId: d, subUnitId: h, drawingId: f, drawingType: _ } = m, w = {
|
|
157
157
|
unitId: d,
|
|
158
158
|
subUnitId: h,
|
|
159
159
|
drawingId: f,
|
|
160
|
-
drawingType:
|
|
160
|
+
drawingType: _,
|
|
161
161
|
transform: {
|
|
162
162
|
left: s,
|
|
163
163
|
top: a,
|
|
@@ -166,10 +166,10 @@ function Le(i, t) {
|
|
|
166
166
|
angle: g
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
|
-
|
|
169
|
+
_ === ee.DRAWING_IMAGE && (w.srcRect = e.srcRect), n.push(w);
|
|
170
170
|
}), n;
|
|
171
171
|
}
|
|
172
|
-
var
|
|
172
|
+
var ke = { exports: {} }, pe = {};
|
|
173
173
|
/**
|
|
174
174
|
* @license React
|
|
175
175
|
* react-jsx-runtime.production.min.js
|
|
@@ -179,11 +179,11 @@ var $e = { exports: {} }, pe = {};
|
|
|
179
179
|
* This source code is licensed under the MIT license found in the
|
|
180
180
|
* LICENSE file in the root directory of this source tree.
|
|
181
181
|
*/
|
|
182
|
-
var
|
|
183
|
-
function
|
|
184
|
-
if (
|
|
185
|
-
|
|
186
|
-
var i =
|
|
182
|
+
var tn;
|
|
183
|
+
function it() {
|
|
184
|
+
if (tn) return pe;
|
|
185
|
+
tn = 1;
|
|
186
|
+
var i = Zn, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, r = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
187
187
|
function a(o, c, g) {
|
|
188
188
|
var m, d = {}, h = null, f = null;
|
|
189
189
|
g !== void 0 && (h = "" + g), c.key !== void 0 && (h = "" + c.key), c.ref !== void 0 && (f = c.ref);
|
|
@@ -193,44 +193,44 @@ function rt() {
|
|
|
193
193
|
}
|
|
194
194
|
return pe.Fragment = n, pe.jsx = a, pe.jsxs = a, pe;
|
|
195
195
|
}
|
|
196
|
-
var
|
|
197
|
-
function
|
|
198
|
-
return
|
|
196
|
+
var rn;
|
|
197
|
+
function at() {
|
|
198
|
+
return rn || (rn = 1, ke.exports = it()), ke.exports;
|
|
199
199
|
}
|
|
200
|
-
var l =
|
|
201
|
-
function
|
|
200
|
+
var l = at();
|
|
201
|
+
function pn(i) {
|
|
202
202
|
var t, n, e = "";
|
|
203
203
|
if (typeof i == "string" || typeof i == "number") e += i;
|
|
204
204
|
else if (typeof i == "object") if (Array.isArray(i)) {
|
|
205
205
|
var r = i.length;
|
|
206
|
-
for (t = 0; t < r; t++) i[t] && (n =
|
|
206
|
+
for (t = 0; t < r; t++) i[t] && (n = pn(i[t])) && (e && (e += " "), e += n);
|
|
207
207
|
} else for (n in i) i[n] && (e && (e += " "), e += n);
|
|
208
208
|
return e;
|
|
209
209
|
}
|
|
210
210
|
function O() {
|
|
211
|
-
for (var i, t, n = 0, e = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (t =
|
|
211
|
+
for (var i, t, n = 0, e = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (t = pn(i)) && (e && (e += " "), e += t);
|
|
212
212
|
return e;
|
|
213
213
|
}
|
|
214
214
|
var R = /* @__PURE__ */ ((i) => (i.default = "0", i.left = "1", i.center = "2", i.right = "3", i.top = "4", i.middle = "5", i.bottom = "6", i.horizon = "7", i.vertical = "8", i))(R || {});
|
|
215
|
-
const
|
|
215
|
+
const Xe = {
|
|
216
216
|
id: "sheet.operation.set-image-align",
|
|
217
|
-
type:
|
|
217
|
+
type: ve.OPERATION,
|
|
218
218
|
handler: (i, t) => !0
|
|
219
|
-
},
|
|
220
|
-
imageCommonPanel:
|
|
221
|
-
imageCommonPanelGrid:
|
|
222
|
-
imageCommonPanelBorder:
|
|
223
|
-
imageCommonPanelTitle:
|
|
224
|
-
imageCommonPanelSubtitle:
|
|
225
|
-
imageCommonPanelRow:
|
|
226
|
-
imageCommonPanelRowVertical:
|
|
227
|
-
imageCommonPanelColumn:
|
|
228
|
-
imageCommonPanelColumnCenter:
|
|
229
|
-
imageCommonPanelInline:
|
|
230
|
-
imageCommonPanelSpan2:
|
|
231
|
-
imageCommonPanelSpan3:
|
|
232
|
-
imageCommonPanelInput:
|
|
233
|
-
},
|
|
219
|
+
}, st = "univer-image-common-panel", ot = "univer-image-common-panel-grid", ct = "univer-image-common-panel-border", lt = "univer-image-common-panel-title", mt = "univer-image-common-panel-subtitle", gt = "univer-image-common-panel-row", ut = "univer-image-common-panel-row-vertical", dt = "univer-image-common-panel-column", ht = "univer-image-common-panel-column-center", ft = "univer-image-common-panel-inline", pt = "univer-image-common-panel-span2", Ct = "univer-image-common-panel-span3", wt = "univer-image-common-panel-input", u = {
|
|
220
|
+
imageCommonPanel: st,
|
|
221
|
+
imageCommonPanelGrid: ot,
|
|
222
|
+
imageCommonPanelBorder: ct,
|
|
223
|
+
imageCommonPanelTitle: lt,
|
|
224
|
+
imageCommonPanelSubtitle: mt,
|
|
225
|
+
imageCommonPanelRow: gt,
|
|
226
|
+
imageCommonPanelRowVertical: ut,
|
|
227
|
+
imageCommonPanelColumn: dt,
|
|
228
|
+
imageCommonPanelColumnCenter: ht,
|
|
229
|
+
imageCommonPanelInline: ft,
|
|
230
|
+
imageCommonPanelSpan2: pt,
|
|
231
|
+
imageCommonPanelSpan3: Ct,
|
|
232
|
+
imageCommonPanelInput: wt
|
|
233
|
+
}, _t = (i) => {
|
|
234
234
|
const t = L(me), n = L(ne), { alignShow: e } = i, [r, s] = H(R.default), a = [
|
|
235
235
|
{
|
|
236
236
|
label: n.t("image-panel.align.default"),
|
|
@@ -282,14 +282,14 @@ const Ze = {
|
|
|
282
282
|
}
|
|
283
283
|
];
|
|
284
284
|
function o(g) {
|
|
285
|
-
s(g), t.executeCommand(
|
|
285
|
+
s(g), t.executeCommand(Xe.id, {
|
|
286
286
|
alignType: g
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
const c = (g) => g ? "block" : "none";
|
|
290
290
|
return /* @__PURE__ */ l.jsxs("div", { className: O(u.imageCommonPanelGrid, u.imageCommonPanelBorder), style: { display: c(e) }, children: [
|
|
291
291
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelTitle), children: /* @__PURE__ */ l.jsx("div", { children: n.t("image-panel.align.title") }) }) }),
|
|
292
|
-
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn), children: /* @__PURE__ */ l.jsx(
|
|
292
|
+
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn), children: /* @__PURE__ */ l.jsx(dn, { value: r, options: a, onChange: o }) }) })
|
|
293
293
|
] });
|
|
294
294
|
};
|
|
295
295
|
var $ = function() {
|
|
@@ -308,15 +308,15 @@ var $ = function() {
|
|
|
308
308
|
t.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, e[r]) && (n[e[r]] = i[e[r]]);
|
|
309
309
|
return n;
|
|
310
310
|
}, X = Y(function(i, t) {
|
|
311
|
-
var n = i.icon, e = i.id, r = i.className, s = i.extend, a = vt(i, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(e, " ").concat(r || "").trim(), c =
|
|
312
|
-
return
|
|
311
|
+
var n = i.icon, e = i.id, r = i.className, s = i.extend, a = vt(i, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(e, " ").concat(r || "").trim(), c = un("_".concat(It()));
|
|
312
|
+
return Cn(n, "".concat(e), { defIds: n.defIds, idSuffix: c.current }, $({ ref: t, className: o }, a), s);
|
|
313
313
|
});
|
|
314
|
-
function
|
|
315
|
-
return Z(i.tag, $($({ key: t },
|
|
316
|
-
return
|
|
314
|
+
function Cn(i, t, n, e, r) {
|
|
315
|
+
return Z(i.tag, $($({ key: t }, St(i, n, r)), e), (bt(i, n).children || []).map(function(s, a) {
|
|
316
|
+
return Cn(s, "".concat(t, "-").concat(i.tag, "-").concat(a), n, void 0, r);
|
|
317
317
|
}));
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function St(i, t, n) {
|
|
320
320
|
var e = $({}, i.attrs);
|
|
321
321
|
n != null && n.colorChannel1 && e.fill === "colorChannel1" && (e.fill = n.colorChannel1);
|
|
322
322
|
var r = t.defIds;
|
|
@@ -325,89 +325,89 @@ function _t(i, t, n) {
|
|
|
325
325
|
typeof o == "string" && (e[a] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
|
|
326
326
|
})), e;
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function bt(i, t) {
|
|
329
329
|
var n, e = t.defIds;
|
|
330
330
|
return !e || e.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? $($({}, i), { children: i.children.map(function(r) {
|
|
331
331
|
return typeof r.attrs.id == "string" && e && e.indexOf(r.attrs.id) > -1 ? $($({}, r), { attrs: $($({}, r.attrs), { id: r.attrs.id + t.idSuffix }) }) : r;
|
|
332
332
|
}) }) : i;
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function It() {
|
|
335
335
|
return Math.random().toString(36).substring(2, 8);
|
|
336
336
|
}
|
|
337
337
|
X.displayName = "UniverIcon";
|
|
338
|
-
var
|
|
338
|
+
var Pt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M11.0363 12.2367V14.0367C11.0363 14.3681 11.3049 14.6367 11.6363 14.6367C11.9676 14.6367 12.2363 14.3681 12.2363 14.0367V12.2367H14.0364C14.3677 12.2367 14.6364 11.9681 14.6364 11.6367C14.6364 11.3054 14.3677 11.0367 14.0364 11.0367H12.2363V9.23672C12.2363 8.90535 11.9676 8.63672 11.6363 8.63672C11.3049 8.63672 11.0363 8.90535 11.0363 9.23672V11.0367H9.23635C8.90498 11.0367 8.63635 11.3054 8.63635 11.6367C8.63635 11.9681 8.90498 12.2367 9.23635 12.2367H11.0363Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365zM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377zM2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365zM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647zM9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635zM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635z", fillRule: "evenodd", clipRule: "evenodd" } }] }, wn = Y(function(i, t) {
|
|
339
339
|
return Z(X, Object.assign({}, i, {
|
|
340
340
|
id: "autofill",
|
|
341
341
|
ref: t,
|
|
342
|
-
icon:
|
|
342
|
+
icon: Pt
|
|
343
343
|
}));
|
|
344
344
|
});
|
|
345
|
-
|
|
346
|
-
var
|
|
345
|
+
wn.displayName = "Autofill";
|
|
346
|
+
var yt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334 15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334 2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045zM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334 3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334zM14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999 15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999 2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544zM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999 3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421 6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641 9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421 11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946 8.64077 14.6502 8.70566 14.6923 8.77482 14.7209 8.84557 14.7502 8.92314 14.7664 9.00449 14.7664 9.08585 14.7664 9.16342 14.7502 9.23416 14.7209 9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, _n = Y(function(i, t) {
|
|
347
347
|
return Z(X, Object.assign({}, i, {
|
|
348
348
|
id: "bottom-single",
|
|
349
349
|
ref: t,
|
|
350
|
-
icon:
|
|
350
|
+
icon: yt
|
|
351
351
|
}));
|
|
352
352
|
});
|
|
353
|
-
|
|
354
|
-
var
|
|
353
|
+
_n.displayName = "BottomSingle";
|
|
354
|
+
var Rt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.97705 7.51296C5.97705 7.18159 6.24568 6.91296 6.57705 6.91296H8.48632C8.81769 6.91296 9.08632 7.18159 9.08632 7.51296 9.08632 7.84433 8.81769 8.11296 8.48632 8.11296H6.57705C6.24568 8.11296 5.97705 7.84433 5.97705 7.51296zM6.57705 9.41028C6.24568 9.41028 5.97705 9.67891 5.97705 10.0103 5.97705 10.3416 6.24568 10.6103 6.57705 10.6103H10.8199C11.1512 10.6103 11.4199 10.3416 11.4199 10.0103 11.4199 9.67891 11.1512 9.41028 10.8199 9.41028H6.57705z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.51074 2.37063C3.51074 1.48697 4.22709 0.77063 5.11074 0.77063H9.80318L9.81294 0.770708C9.97168 0.768161 10.1311 0.82824 10.2511 0.95055L14.4317 5.21408C14.5165 5.30049 14.5697 5.406 14.5917 5.51645C14.6041 5.5644 14.6106 5.61467 14.6106 5.66648V11.6406C14.6106 12.5243 13.8943 13.2406 13.0106 13.2406H5.11074C4.22709 13.2406 3.51074 12.5243 3.51074 11.6406V2.37063ZM10.4032 4.66648V2.81964L12.6063 5.06648H10.8032C10.5823 5.06648 10.4032 4.88739 10.4032 4.66648ZM5.11074 1.97063C4.88983 1.97063 4.71074 2.14972 4.71074 2.37063V11.6406C4.71074 11.8615 4.88983 12.0406 5.11074 12.0406H13.0106C13.2316 12.0406 13.4106 11.8615 13.4106 11.6406V6.26648H10.8032C9.91953 6.26648 9.20318 5.55013 9.20318 4.66648V1.97063H5.11074Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.58916 6.6741C2.58916 6.34273 2.32053 6.0741 1.98916 6.0741C1.65779 6.0741 1.38916 6.34273 1.38916 6.6741V12.6294C1.38916 14.0653 2.55322 15.2294 3.98916 15.2294H9.41408C9.74545 15.2294 10.0141 14.9607 10.0141 14.6294C10.0141 14.298 9.74545 14.0294 9.41408 14.0294H3.98916C3.21596 14.0294 2.58916 13.4026 2.58916 12.6294V6.6741Z" } }] }, vn = Y(function(i, t) {
|
|
355
355
|
return Z(X, Object.assign({}, i, {
|
|
356
356
|
id: "create-copy-single",
|
|
357
357
|
ref: t,
|
|
358
|
-
icon:
|
|
358
|
+
icon: Rt
|
|
359
359
|
}));
|
|
360
360
|
});
|
|
361
361
|
vn.displayName = "CreateCopySingle";
|
|
362
|
-
var
|
|
362
|
+
var jt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.38125 1.16211C6.49759 1.16211 5.78125 1.87845 5.78125 2.76211V5.6377H2.87783C1.99418 5.6377 1.27783 6.35404 1.27783 7.2377V13.2377C1.27783 14.1214 1.99418 14.8377 2.87783 14.8377H8.87783C9.76149 14.8377 10.4778 14.1214 10.4778 13.2377V10.3621H13.3813C14.2649 10.3621 14.9813 9.64577 14.9813 8.76211V2.76211C14.9813 1.87845 14.2649 1.16211 13.3813 1.16211H7.38125ZM10.4778 9.16211H13.3813C13.6022 9.16211 13.7812 8.98302 13.7812 8.76211V2.76211C13.7812 2.5412 13.6022 2.36211 13.3813 2.36211H7.38125C7.16034 2.36211 6.98125 2.5412 6.98125 2.76211V5.6377H8.87783C9.76149 5.6377 10.4778 6.35404 10.4778 7.2377V9.16211ZM6.98125 6.8377H8.87783C9.09875 6.8377 9.27783 7.01678 9.27783 7.2377V9.16211H7.38125C7.16034 9.16211 6.98125 8.98302 6.98125 8.76211V6.8377ZM5.78125 6.8377V8.76211C5.78125 9.64577 6.49759 10.3621 7.38125 10.3621H9.27783V13.2377C9.27783 13.4586 9.09875 13.6377 8.87783 13.6377H2.87783C2.65692 13.6377 2.47783 13.4586 2.47783 13.2377V7.2377C2.47783 7.01678 2.65692 6.8377 2.87783 6.8377H5.78125Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Sn = Y(function(i, t) {
|
|
363
363
|
return Z(X, Object.assign({}, i, {
|
|
364
364
|
id: "group-single",
|
|
365
365
|
ref: t,
|
|
366
|
-
icon:
|
|
366
|
+
icon: jt
|
|
367
367
|
}));
|
|
368
368
|
});
|
|
369
|
-
|
|
370
|
-
var
|
|
369
|
+
Sn.displayName = "GroupSingle";
|
|
370
|
+
var xt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, bn = Y(function(i, t) {
|
|
371
371
|
return Z(X, Object.assign({}, i, {
|
|
372
372
|
id: "more-down-single",
|
|
373
373
|
ref: t,
|
|
374
|
-
icon:
|
|
374
|
+
icon: xt
|
|
375
375
|
}));
|
|
376
376
|
});
|
|
377
|
-
|
|
378
|
-
var Mt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] },
|
|
377
|
+
bn.displayName = "MoreDownSingle";
|
|
378
|
+
var Mt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] }, In = Y(function(i, t) {
|
|
379
379
|
return Z(X, Object.assign({}, i, {
|
|
380
380
|
id: "move-down-single",
|
|
381
381
|
ref: t,
|
|
382
382
|
icon: Mt
|
|
383
383
|
}));
|
|
384
384
|
});
|
|
385
|
-
|
|
386
|
-
var
|
|
385
|
+
In.displayName = "MoveDownSingle";
|
|
386
|
+
var Ot = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 13.036C1.25 12.1523 1.96634 11.436 2.85 11.436H13.15C14.0337 11.436 14.75 12.1523 14.75 13.036C14.75 13.9196 14.0337 14.636 13.15 14.636H2.85C1.96635 14.636 1.25 13.9196 1.25 13.036ZM2.85 12.636C2.62909 12.636 2.45 12.8151 2.45 13.036C2.45 13.2569 2.62909 13.436 2.85 13.436H13.15C13.3709 13.436 13.55 13.2569 13.55 13.036C13.55 12.8151 13.3709 12.636 13.15 12.636H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 4.38825C5.80995 4.62256 6.18985 4.62256 6.42417 4.38825L7.3999 3.41251V9.63049C7.3999 9.96186 7.66853 10.2305 7.9999 10.2305C8.33127 10.2305 8.5999 9.96186 8.5999 9.63049V3.41251L9.57564 4.38825C9.80995 4.62256 10.1899 4.62256 10.4242 4.38825C10.6585 4.15393 10.6585 3.77403 10.4242 3.53972L8.4324 1.54796C8.32324 1.43445 8.16982 1.36382 7.9999 1.36382C7.82998 1.36382 7.67655 1.43446 7.56739 1.54797L5.57564 3.53972C5.34132 3.77403 5.34132 4.15393 5.57564 4.38825Z" } }] }, Pn = Y(function(i, t) {
|
|
387
387
|
return Z(X, Object.assign({}, i, {
|
|
388
388
|
id: "move-up-single",
|
|
389
389
|
ref: t,
|
|
390
|
-
icon:
|
|
390
|
+
icon: Ot
|
|
391
391
|
}));
|
|
392
392
|
});
|
|
393
|
-
|
|
394
|
-
var
|
|
393
|
+
Pn.displayName = "MoveUpSingle";
|
|
394
|
+
var Nt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.82994 1.40913C7.88746 1.35161 7.95376 1.30821 8.02453 1.27893C8.09527 1.24959 8.17285 1.2334 8.2542 1.2334C8.33555 1.2334 8.41313 1.24959 8.48387 1.27893C8.55464 1.30821 8.62094 1.35161 8.67846 1.40913L10.6785 3.40913C10.9128 3.64345 10.9128 4.02335 10.6785 4.25766C10.4441 4.49198 10.0642 4.49198 9.82994 4.25766L8.8542 3.28193V5.8334C8.8542 6.16477 8.58557 6.4334 8.2542 6.4334C7.92283 6.4334 7.6542 6.16477 7.6542 5.8334V3.28193L6.67846 4.25766C6.44415 4.49198 6.06425 4.49198 5.82994 4.25766C5.59562 4.02335 5.59562 3.64345 5.82994 3.40913L7.82994 1.40913Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9 15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9zM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9 2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9 13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439zM1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665 15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665zM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665 2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665 13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543z", fillRule: "evenodd", clipRule: "evenodd" } }] }, yn = Y(function(i, t) {
|
|
395
395
|
return Z(X, Object.assign({}, i, {
|
|
396
396
|
id: "topmost-single",
|
|
397
397
|
ref: t,
|
|
398
|
-
icon:
|
|
398
|
+
icon: Nt
|
|
399
399
|
}));
|
|
400
400
|
});
|
|
401
|
-
|
|
402
|
-
var
|
|
401
|
+
yn.displayName = "TopmostSingle";
|
|
402
|
+
var Dt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.46855 2.83731C7.46855 2.61639 7.64764 2.4373 7.86855 2.4373H13.8603C14.0812 2.4373 14.2603 2.61639 14.2603 2.8373V9.5049C14.2603 9.72581 14.0812 9.90489 13.8603 9.90489H12.866C12.5346 9.90489 12.266 10.1735 12.266 10.5049C12.266 10.8363 12.5346 11.1049 12.866 11.1049H13.8603C14.7439 11.1049 15.4603 10.3886 15.4603 9.5049V2.8373C15.4603 1.95365 14.7439 1.2373 13.8603 1.2373H7.86855C6.9849 1.2373 6.26855 1.95365 6.26855 2.83731V3.48688C6.26855 3.81825 6.53718 4.08688 6.86855 4.08688C7.19993 4.08688 7.46855 3.81825 7.46855 3.48688V2.83731Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.19888 5.56299C2.31522 5.56299 1.59888 6.27933 1.59888 7.16299V13.163C1.59888 14.0466 2.31522 14.763 3.19888 14.763H9.19888C10.0825 14.763 10.7989 14.0466 10.7989 13.163V7.16299C10.7989 6.27933 10.0825 5.56299 9.19888 5.56299H3.19888ZM2.79888 7.16299C2.79888 6.94207 2.97796 6.76299 3.19888 6.76299H9.19888C9.41979 6.76299 9.59888 6.94207 9.59888 7.16299V13.163C9.59888 13.3839 9.41979 13.563 9.19888 13.563H3.19888C2.97796 13.563 2.79888 13.3839 2.79888 13.163V7.16299Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Rn = Y(function(i, t) {
|
|
403
403
|
return Z(X, Object.assign({}, i, {
|
|
404
404
|
id: "ungroup-single",
|
|
405
405
|
ref: t,
|
|
406
|
-
icon:
|
|
406
|
+
icon: Dt
|
|
407
407
|
}));
|
|
408
408
|
});
|
|
409
|
-
|
|
410
|
-
const
|
|
409
|
+
Rn.displayName = "UngroupSingle";
|
|
410
|
+
const Et = (i) => {
|
|
411
411
|
const { arrangeShow: t, drawings: n } = i, e = L(ne), r = L(te), s = (g) => g ? "block" : "none", [a, o] = H(n);
|
|
412
412
|
Se(() => {
|
|
413
413
|
const g = r.focus$.subscribe((m) => {
|
|
@@ -427,13 +427,13 @@ const Dt = (i) => {
|
|
|
427
427
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ l.jsx(ce, { size: "small", onClick: () => {
|
|
428
428
|
c(Ie.forward);
|
|
429
429
|
}, children: /* @__PURE__ */ l.jsxs("span", { className: u.imageCommonPanelInline, children: [
|
|
430
|
-
/* @__PURE__ */ l.jsx(
|
|
430
|
+
/* @__PURE__ */ l.jsx(Pn, {}),
|
|
431
431
|
e.t("image-panel.arrange.forward")
|
|
432
432
|
] }) }) }),
|
|
433
433
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ l.jsx(ce, { size: "small", onClick: () => {
|
|
434
434
|
c(Ie.backward);
|
|
435
435
|
}, children: /* @__PURE__ */ l.jsxs("span", { className: u.imageCommonPanelInline, children: [
|
|
436
|
-
/* @__PURE__ */ l.jsx(
|
|
436
|
+
/* @__PURE__ */ l.jsx(In, {}),
|
|
437
437
|
e.t("image-panel.arrange.backward")
|
|
438
438
|
] }) }) })
|
|
439
439
|
] }),
|
|
@@ -441,60 +441,60 @@ const Dt = (i) => {
|
|
|
441
441
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ l.jsx(ce, { size: "small", onClick: () => {
|
|
442
442
|
c(Ie.front);
|
|
443
443
|
}, children: /* @__PURE__ */ l.jsxs("span", { className: u.imageCommonPanelInline, children: [
|
|
444
|
-
/* @__PURE__ */ l.jsx(
|
|
444
|
+
/* @__PURE__ */ l.jsx(yn, {}),
|
|
445
445
|
e.t("image-panel.arrange.front")
|
|
446
446
|
] }) }) }),
|
|
447
447
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ l.jsx(ce, { size: "small", onClick: () => {
|
|
448
448
|
c(Ie.back);
|
|
449
449
|
}, children: /* @__PURE__ */ l.jsxs("span", { className: u.imageCommonPanelInline, children: [
|
|
450
|
-
/* @__PURE__ */ l.jsx(
|
|
450
|
+
/* @__PURE__ */ l.jsx(_n, {}),
|
|
451
451
|
e.t("image-panel.arrange.back")
|
|
452
452
|
] }) }) })
|
|
453
453
|
] })
|
|
454
454
|
] });
|
|
455
|
-
},
|
|
455
|
+
}, Tt = (i) => {
|
|
456
456
|
const t = L(ne), n = L(ue), e = L(te), { hasGroup: r, drawings: s } = i, [a, o] = H(!1), [c, g] = H(!0), [m, d] = H(!0), h = (p) => p ? "block" : "none", f = () => {
|
|
457
|
-
const p = e.getFocusDrawings(), { unitId: S, subUnitId:
|
|
457
|
+
const p = e.getFocusDrawings(), { unitId: S, subUnitId: v } = p[0], j = Un.generateRandomId(10), b = Wn(0, 0, p.map((I) => I.transform || {})), N = {
|
|
458
458
|
unitId: S,
|
|
459
|
-
subUnitId:
|
|
459
|
+
subUnitId: v,
|
|
460
460
|
drawingId: j,
|
|
461
461
|
drawingType: ee.DRAWING_GROUP,
|
|
462
462
|
transform: b
|
|
463
|
-
},
|
|
464
|
-
const
|
|
463
|
+
}, P = p.map((I) => {
|
|
464
|
+
const y = I.transform || { left: 0, top: 0 }, { unitId: x, subUnitId: D, drawingId: B } = I;
|
|
465
465
|
return {
|
|
466
|
-
unitId:
|
|
466
|
+
unitId: x,
|
|
467
467
|
subUnitId: D,
|
|
468
468
|
drawingId: B,
|
|
469
469
|
transform: {
|
|
470
|
-
...
|
|
471
|
-
left:
|
|
472
|
-
top:
|
|
470
|
+
...y,
|
|
471
|
+
left: y.left - b.left,
|
|
472
|
+
top: y.top - b.top
|
|
473
473
|
},
|
|
474
474
|
groupId: j
|
|
475
475
|
};
|
|
476
476
|
});
|
|
477
477
|
e.featurePluginGroupUpdateNotification([{
|
|
478
478
|
parent: N,
|
|
479
|
-
children:
|
|
479
|
+
children: P
|
|
480
480
|
}]);
|
|
481
|
-
},
|
|
481
|
+
}, _ = (p) => {
|
|
482
482
|
if (p.drawingType !== ee.DRAWING_GROUP)
|
|
483
483
|
return;
|
|
484
|
-
const { unitId: S, subUnitId:
|
|
484
|
+
const { unitId: S, subUnitId: v, drawingId: j, transform: b = { width: 0, height: 0 } } = p;
|
|
485
485
|
if (b == null)
|
|
486
486
|
return;
|
|
487
|
-
const N = e.getDrawingsByGroup({ unitId: S, subUnitId:
|
|
487
|
+
const N = e.getDrawingsByGroup({ unitId: S, subUnitId: v, drawingId: j });
|
|
488
488
|
if (N.length === 0)
|
|
489
489
|
return;
|
|
490
|
-
const
|
|
491
|
-
const { transform:
|
|
490
|
+
const P = N.map((I) => {
|
|
491
|
+
const { transform: y } = I, { unitId: x, subUnitId: D, drawingId: B } = I, E = $n(y || {}, b, b.width || 0, b.height || 0);
|
|
492
492
|
return {
|
|
493
|
-
unitId:
|
|
493
|
+
unitId: x,
|
|
494
494
|
subUnitId: D,
|
|
495
495
|
drawingId: B,
|
|
496
496
|
transform: {
|
|
497
|
-
...
|
|
497
|
+
...y,
|
|
498
498
|
...E
|
|
499
499
|
},
|
|
500
500
|
groupId: void 0
|
|
@@ -502,30 +502,30 @@ const Dt = (i) => {
|
|
|
502
502
|
});
|
|
503
503
|
return {
|
|
504
504
|
parent: p,
|
|
505
|
-
children:
|
|
505
|
+
children: P
|
|
506
506
|
};
|
|
507
507
|
}, w = () => {
|
|
508
508
|
const S = e.getFocusDrawings().map(
|
|
509
|
-
(
|
|
510
|
-
).filter((
|
|
509
|
+
(v) => _(v)
|
|
510
|
+
).filter((v) => v != null);
|
|
511
511
|
S.length !== 0 && e.featurePluginUngroupUpdateNotification(S);
|
|
512
512
|
};
|
|
513
513
|
return Se(() => {
|
|
514
514
|
const p = s[0];
|
|
515
515
|
if (p == null)
|
|
516
516
|
return;
|
|
517
|
-
const { unitId: S } = p,
|
|
517
|
+
const { unitId: S } = p, v = n.getRenderById(S), j = v == null ? void 0 : v.scene;
|
|
518
518
|
if (j == null)
|
|
519
519
|
return;
|
|
520
|
-
const b = j.getTransformerByCreate(), N = b.clearControl$.subscribe((
|
|
521
|
-
|
|
522
|
-
}),
|
|
523
|
-
const { objects:
|
|
520
|
+
const b = j.getTransformerByCreate(), N = b.clearControl$.subscribe((I) => {
|
|
521
|
+
I === !0 && o(!1);
|
|
522
|
+
}), P = b.changeStart$.subscribe((I) => {
|
|
523
|
+
const { objects: y } = I, x = Ve(y, e), D = x.filter((W) => (W == null ? void 0 : W.drawingType) === ee.DRAWING_GROUP);
|
|
524
524
|
let B = !1, E = !1;
|
|
525
|
-
|
|
525
|
+
x.length > 1 && (B = !0), D.length > 0 && (E = !0), o(B || E), g(B), d(E);
|
|
526
526
|
});
|
|
527
527
|
return () => {
|
|
528
|
-
|
|
528
|
+
P.unsubscribe(), N.unsubscribe();
|
|
529
529
|
};
|
|
530
530
|
}, []), /* @__PURE__ */ l.jsxs("div", { className: O(u.imageCommonPanelGrid, u.imageCommonPanelBorder), style: { display: h(r === !0 ? a : !1) }, children: [
|
|
531
531
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelTitle), children: /* @__PURE__ */ l.jsx("div", { children: t.t("image-panel.group.title") }) }) }),
|
|
@@ -533,19 +533,19 @@ const Dt = (i) => {
|
|
|
533
533
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan2, u.imageCommonPanelColumnCenter), children: /* @__PURE__ */ l.jsx(ce, { size: "small", onClick: () => {
|
|
534
534
|
f();
|
|
535
535
|
}, style: { display: h(c) }, children: /* @__PURE__ */ l.jsxs("span", { className: u.imageCommonPanelInline, children: [
|
|
536
|
-
/* @__PURE__ */ l.jsx(
|
|
536
|
+
/* @__PURE__ */ l.jsx(Sn, {}),
|
|
537
537
|
t.t("image-panel.group.group")
|
|
538
538
|
] }) }) }),
|
|
539
539
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan2, u.imageCommonPanelColumnCenter), children: /* @__PURE__ */ l.jsx(ce, { size: "small", onClick: () => {
|
|
540
540
|
w();
|
|
541
541
|
}, style: { display: h(m) }, children: /* @__PURE__ */ l.jsxs("span", { className: u.imageCommonPanelInline, children: [
|
|
542
|
-
/* @__PURE__ */ l.jsx(
|
|
542
|
+
/* @__PURE__ */ l.jsx(Rn, {}),
|
|
543
543
|
t.t("image-panel.group.unGroup")
|
|
544
544
|
] }) }) })
|
|
545
545
|
] })
|
|
546
546
|
] });
|
|
547
|
-
}, se = 20,
|
|
548
|
-
var
|
|
547
|
+
}, se = 20, Bt = 20, Ut = [-3600, 3600], Re = 300, At = (i) => {
|
|
548
|
+
var qe;
|
|
549
549
|
const t = L(ne), n = L(te), e = L(ue), { drawings: r, transformShow: s } = i, a = r[0];
|
|
550
550
|
if (a == null)
|
|
551
551
|
return;
|
|
@@ -555,26 +555,26 @@ const Dt = (i) => {
|
|
|
555
555
|
const { unitId: c, subUnitId: g, drawingId: m, drawingType: d } = a, h = e.getRenderById(c), f = h == null ? void 0 : h.scene;
|
|
556
556
|
if (f == null)
|
|
557
557
|
return;
|
|
558
|
-
const
|
|
559
|
-
if (
|
|
558
|
+
const _ = (qe = f.getEngine()) == null ? void 0 : qe.activeScene;
|
|
559
|
+
if (_ == null)
|
|
560
560
|
return;
|
|
561
561
|
const w = f.getTransformerByCreate(), {
|
|
562
562
|
width: p = 0,
|
|
563
563
|
height: S = 0,
|
|
564
|
-
left:
|
|
564
|
+
left: v = 0,
|
|
565
565
|
top: j = 0,
|
|
566
566
|
angle: b = 0
|
|
567
|
-
} = o, [N,
|
|
568
|
-
const { width: U, height: J } =
|
|
569
|
-
let K = C, ae =
|
|
570
|
-
return C + z < 0 && (K = -z),
|
|
567
|
+
} = o, [N, P] = H(p), [I, y] = H(S), [x, D] = H(v), [B, E] = H(j), [re, W] = H(b), [q, be] = H(w.keepRatio), ie = (C, M, A, V) => {
|
|
568
|
+
const { width: U, height: J } = _, { ancestorLeft: z, ancestorTop: F } = f;
|
|
569
|
+
let K = C, ae = M, de = A, he = V;
|
|
570
|
+
return C + z < 0 && (K = -z), M + F < 0 && (ae = -F), de = U - K - z, de < se && (de = se), he = J - ae - F, he < se && (he = se), C + de + z > U && (K = U - A - z), M + he + F > J && (ae = J - V - F), {
|
|
571
571
|
limitLeft: K,
|
|
572
572
|
limitTop: ae,
|
|
573
573
|
limitWidth: de,
|
|
574
574
|
limitHeight: he
|
|
575
575
|
};
|
|
576
576
|
}, k = (C) => {
|
|
577
|
-
const { objects:
|
|
577
|
+
const { objects: M } = C, A = Ve(M, n);
|
|
578
578
|
if (A.length !== 1)
|
|
579
579
|
return;
|
|
580
580
|
const V = A[0];
|
|
@@ -590,23 +590,23 @@ const Dt = (i) => {
|
|
|
590
590
|
top: K,
|
|
591
591
|
angle: ae
|
|
592
592
|
} = U;
|
|
593
|
-
J != null &&
|
|
593
|
+
J != null && P(J), z != null && y(z), F != null && D(F), K != null && E(K), ae != null && W(ae);
|
|
594
594
|
};
|
|
595
595
|
Se(() => {
|
|
596
596
|
const C = [
|
|
597
|
-
w.changeStart$.subscribe((
|
|
598
|
-
k(
|
|
597
|
+
w.changeStart$.subscribe((M) => {
|
|
598
|
+
k(M);
|
|
599
599
|
}),
|
|
600
|
-
w.changing$.subscribe((
|
|
601
|
-
k(
|
|
600
|
+
w.changing$.subscribe((M) => {
|
|
601
|
+
k(M);
|
|
602
602
|
}),
|
|
603
|
-
w.changeEnd$.subscribe((
|
|
604
|
-
k(
|
|
603
|
+
w.changeEnd$.subscribe((M) => {
|
|
604
|
+
k(M);
|
|
605
605
|
}),
|
|
606
|
-
n.focus$.subscribe((
|
|
607
|
-
if (
|
|
606
|
+
n.focus$.subscribe((M) => {
|
|
607
|
+
if (M.length !== 1)
|
|
608
608
|
return;
|
|
609
|
-
const A = n.getDrawingByParam(
|
|
609
|
+
const A = n.getDrawingByParam(M[0]);
|
|
610
610
|
if (A == null)
|
|
611
611
|
return;
|
|
612
612
|
const V = A.transform;
|
|
@@ -619,123 +619,123 @@ const Dt = (i) => {
|
|
|
619
619
|
top: F,
|
|
620
620
|
angle: K
|
|
621
621
|
} = V;
|
|
622
|
-
U != null &&
|
|
622
|
+
U != null && P(U), J != null && y(J), z != null && D(z), F != null && E(F), K != null && W(K);
|
|
623
623
|
})
|
|
624
624
|
];
|
|
625
625
|
return () => {
|
|
626
|
-
C.forEach((
|
|
626
|
+
C.forEach((M) => M.unsubscribe());
|
|
627
627
|
};
|
|
628
628
|
}, []);
|
|
629
|
-
const
|
|
629
|
+
const Ge = Pe((C) => {
|
|
630
630
|
if (C == null)
|
|
631
631
|
return;
|
|
632
632
|
C = Math.max(C, se);
|
|
633
|
-
const { limitWidth:
|
|
634
|
-
C = Math.min(C,
|
|
633
|
+
const { limitWidth: M, limitHeight: A } = ie(x, B, C, I);
|
|
634
|
+
C = Math.min(C, M);
|
|
635
635
|
const V = { unitId: c, subUnitId: g, drawingId: m, drawingType: d, transform: { width: C } };
|
|
636
636
|
if (q) {
|
|
637
|
-
let U = C / N *
|
|
638
|
-
if (U = Math.max(U,
|
|
637
|
+
let U = C / N * I;
|
|
638
|
+
if (U = Math.max(U, Bt), U > A)
|
|
639
639
|
return;
|
|
640
|
-
|
|
640
|
+
y(U), V.transform.height = U;
|
|
641
641
|
}
|
|
642
|
-
|
|
643
|
-
}, Re),
|
|
642
|
+
P(C), n.featurePluginUpdateNotification([V]), w.refreshControls().changeNotification();
|
|
643
|
+
}, Re), xn = Pe((C) => {
|
|
644
644
|
if (C == null)
|
|
645
645
|
return;
|
|
646
646
|
C = Math.max(C, se);
|
|
647
|
-
const { limitHeight:
|
|
648
|
-
C = Math.min(C,
|
|
647
|
+
const { limitHeight: M, limitWidth: A } = ie(x, B, N, C);
|
|
648
|
+
C = Math.min(C, M);
|
|
649
649
|
const V = { unitId: c, subUnitId: g, drawingId: m, drawingType: d, transform: { height: C } };
|
|
650
650
|
if (q) {
|
|
651
|
-
let U = C /
|
|
651
|
+
let U = C / I * N;
|
|
652
652
|
if (U = Math.max(U, se), U > A)
|
|
653
653
|
return;
|
|
654
|
-
|
|
654
|
+
P(U), V.transform.width = U;
|
|
655
655
|
}
|
|
656
|
-
|
|
656
|
+
y(C), n.featurePluginUpdateNotification([V]), w.refreshControls().changeNotification();
|
|
657
657
|
}, Re), Mn = Pe((C) => {
|
|
658
658
|
if (C == null)
|
|
659
659
|
return;
|
|
660
|
-
const { limitLeft:
|
|
661
|
-
C =
|
|
660
|
+
const { limitLeft: M } = ie(C, B, N, I);
|
|
661
|
+
C = M;
|
|
662
662
|
const A = { unitId: c, subUnitId: g, drawingId: m, drawingType: d, transform: { left: C } };
|
|
663
663
|
D(C), n.featurePluginUpdateNotification([A]), w.refreshControls().changeNotification();
|
|
664
|
-
}, Re),
|
|
664
|
+
}, Re), On = Pe((C) => {
|
|
665
665
|
if (C == null)
|
|
666
666
|
return;
|
|
667
|
-
const { limitTop:
|
|
668
|
-
C =
|
|
667
|
+
const { limitTop: M } = ie(x, C, N, I);
|
|
668
|
+
C = M;
|
|
669
669
|
const A = { unitId: c, subUnitId: g, drawingId: m, drawingType: d, transform: { top: C } };
|
|
670
670
|
E(C), n.featurePluginUpdateNotification([A]), w.refreshControls().changeNotification();
|
|
671
|
-
}, Re),
|
|
671
|
+
}, Re), Nn = (C) => {
|
|
672
672
|
if (C == null)
|
|
673
673
|
return;
|
|
674
|
-
const [
|
|
675
|
-
C <
|
|
674
|
+
const [M, A] = Ut;
|
|
675
|
+
C < M && (C = M), C > A && (C = A);
|
|
676
676
|
const V = { unitId: c, subUnitId: g, drawingId: m, drawingType: d, transform: { angle: C } };
|
|
677
677
|
W(C), n.featurePluginUpdateNotification([V]), w.refreshControls().changeNotification();
|
|
678
|
-
},
|
|
678
|
+
}, Dn = (C) => {
|
|
679
679
|
be(C), w.keepRatio = C;
|
|
680
|
-
},
|
|
681
|
-
return /* @__PURE__ */ l.jsxs("div", { className: O(u.imageCommonPanelGrid, u.imageCommonPanelBorder), style: { display:
|
|
680
|
+
}, En = (C) => C ? "block" : "none";
|
|
681
|
+
return /* @__PURE__ */ l.jsxs("div", { className: O(u.imageCommonPanelGrid, u.imageCommonPanelBorder), style: { display: En(s) }, children: [
|
|
682
682
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelTitle), children: /* @__PURE__ */ l.jsx("div", { children: t.t("image-panel.transform.title") }) }) }),
|
|
683
683
|
/* @__PURE__ */ l.jsxs("div", { className: u.imageCommonPanelRow, children: [
|
|
684
684
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ l.jsxs("label", { children: [
|
|
685
685
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: t.t("image-panel.transform.width") }) }),
|
|
686
686
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ l.jsx(fe, { precision: 1, value: N, onChange: (C) => {
|
|
687
|
-
|
|
687
|
+
Ge(C);
|
|
688
688
|
}, className: u.imageCommonPanelInput }) }) })
|
|
689
689
|
] }) }),
|
|
690
690
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ l.jsxs("label", { children: [
|
|
691
691
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: t.t("image-panel.transform.height") }) }),
|
|
692
|
-
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ l.jsx(fe, { precision: 1, value:
|
|
693
|
-
|
|
692
|
+
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ l.jsx(fe, { precision: 1, value: I, onChange: (C) => {
|
|
693
|
+
xn(C);
|
|
694
694
|
}, className: u.imageCommonPanelInput }) }) })
|
|
695
695
|
] }) }),
|
|
696
696
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ l.jsxs("label", { children: [
|
|
697
697
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: t.t("image-panel.transform.lock") }) }),
|
|
698
|
-
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelRow, u.imageCommonPanelRowVertical), children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ l.jsx(
|
|
698
|
+
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelRow, u.imageCommonPanelRowVertical), children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ l.jsx(Xn, { checked: q, onChange: Dn }) }) })
|
|
699
699
|
] }) })
|
|
700
700
|
] }),
|
|
701
701
|
/* @__PURE__ */ l.jsxs("div", { className: u.imageCommonPanelRow, children: [
|
|
702
702
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ l.jsxs("label", { children: [
|
|
703
703
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: t.t("image-panel.transform.x") }) }),
|
|
704
|
-
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ l.jsx(fe, { precision: 1, value:
|
|
704
|
+
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ l.jsx(fe, { precision: 1, value: x, onChange: (C) => {
|
|
705
705
|
Mn(C);
|
|
706
706
|
}, className: u.imageCommonPanelInput }) }) })
|
|
707
707
|
] }) }),
|
|
708
708
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ l.jsxs("label", { children: [
|
|
709
709
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: t.t("image-panel.transform.y") }) }),
|
|
710
710
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ l.jsx(fe, { precision: 1, value: B, onChange: (C) => {
|
|
711
|
-
|
|
711
|
+
On(C);
|
|
712
712
|
}, className: u.imageCommonPanelInput }) }) })
|
|
713
713
|
] }) }),
|
|
714
714
|
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ l.jsxs("label", { children: [
|
|
715
715
|
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: t.t("image-panel.transform.rotate") }) }),
|
|
716
|
-
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ l.jsx(fe, { precision: 1, value: re, onChange:
|
|
716
|
+
/* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ l.jsx("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ l.jsx(fe, { precision: 1, value: re, onChange: Nn, className: u.imageCommonPanelInput }) }) })
|
|
717
717
|
] }) })
|
|
718
718
|
] })
|
|
719
719
|
] });
|
|
720
|
-
},
|
|
720
|
+
}, Ke = {
|
|
721
721
|
id: "sheet.operation.open-image-crop",
|
|
722
|
-
type:
|
|
722
|
+
type: ve.OPERATION,
|
|
723
723
|
handler: (i, t) => !0
|
|
724
724
|
}, le = {
|
|
725
725
|
id: "sheet.operation.close-image-crop",
|
|
726
|
-
type:
|
|
726
|
+
type: ve.OPERATION,
|
|
727
727
|
handler: (i, t) => !0
|
|
728
728
|
};
|
|
729
729
|
var T = /* @__PURE__ */ ((i) => (i.FREE = "0", i.R1_1 = "1", i.R16_9 = "2", i.R9_16 = "3", i.R5_4 = "4", i.R4_5 = "5", i.R4_3 = "6", i.R3_4 = "7", i.R3_2 = "8", i.R2_3 = "9", i))(T || {});
|
|
730
|
-
const
|
|
730
|
+
const Ee = {
|
|
731
731
|
id: "sheet.operation.Auto-image-crop",
|
|
732
|
-
type:
|
|
732
|
+
type: ve.OPERATION,
|
|
733
733
|
handler: (i, t) => !0
|
|
734
|
-
},
|
|
734
|
+
}, Ht = (i) => {
|
|
735
735
|
const t = L(me), n = L(ne), { drawings: e, cropperShow: r } = i;
|
|
736
736
|
if (e[0] == null)
|
|
737
737
|
return;
|
|
738
|
-
const [a, o] = H(T.FREE), c =
|
|
738
|
+
const [a, o] = H(T.FREE), c = un(!1), g = [
|
|
739
739
|
{
|
|
740
740
|
label: n.t("image-panel.crop.mode"),
|
|
741
741
|
value: T.FREE
|
|
@@ -778,9 +778,9 @@ const De = {
|
|
|
778
778
|
}
|
|
779
779
|
];
|
|
780
780
|
Se(() => {
|
|
781
|
-
const f = t.onCommandExecuted((
|
|
782
|
-
if (
|
|
783
|
-
const w =
|
|
781
|
+
const f = t.onCommandExecuted((_) => {
|
|
782
|
+
if (_.id === le.id) {
|
|
783
|
+
const w = _.params;
|
|
784
784
|
w != null && w.isAuto || (c.current = !1);
|
|
785
785
|
}
|
|
786
786
|
});
|
|
@@ -789,12 +789,12 @@ const De = {
|
|
|
789
789
|
};
|
|
790
790
|
}, []);
|
|
791
791
|
function m(f) {
|
|
792
|
-
o(f), c.current && t.executeCommand(
|
|
792
|
+
o(f), c.current && t.executeCommand(Ee.id, {
|
|
793
793
|
cropType: f
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
796
|
const d = (f) => f ? "block" : "none", h = (f) => {
|
|
797
|
-
t.executeCommand(
|
|
797
|
+
t.executeCommand(Ee.id, {
|
|
798
798
|
cropType: f
|
|
799
799
|
}), c.current = !0;
|
|
800
800
|
};
|
|
@@ -807,7 +807,7 @@ const De = {
|
|
|
807
807
|
/* @__PURE__ */ l.jsx(vn, {}),
|
|
808
808
|
n.t("image-panel.crop.start")
|
|
809
809
|
] }) }) }),
|
|
810
|
-
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ l.jsx(
|
|
810
|
+
/* @__PURE__ */ l.jsx("div", { className: O(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ l.jsx(dn, { value: a, options: g, onChange: m }) })
|
|
811
811
|
] })
|
|
812
812
|
] });
|
|
813
813
|
}, vr = (i) => {
|
|
@@ -817,38 +817,38 @@ const De = {
|
|
|
817
817
|
const { unitId: d } = m, h = n.getRenderById(d), f = h == null ? void 0 : h.scene;
|
|
818
818
|
if (f == null)
|
|
819
819
|
return;
|
|
820
|
-
const
|
|
820
|
+
const _ = f.getTransformerByCreate(), [w, p] = H(!0), [S, v] = H(!0), [j, b] = H(!1), [N, P] = H(!0), [I, y] = H(!1);
|
|
821
821
|
return Se(() => {
|
|
822
|
-
const
|
|
823
|
-
E === !0 && (p(!1),
|
|
824
|
-
}), D =
|
|
825
|
-
const { objects: re } = E, W =
|
|
826
|
-
W.length === 0 ? (p(!1),
|
|
822
|
+
const x = _.clearControl$.subscribe((E) => {
|
|
823
|
+
E === !0 && (p(!1), v(!1), b(!1), P(!1), y(!0));
|
|
824
|
+
}), D = _.changeStart$.subscribe((E) => {
|
|
825
|
+
const { objects: re } = E, W = Ve(re, t);
|
|
826
|
+
W.length === 0 ? (p(!1), v(!1), b(!1), P(!1), y(!0)) : W.length === 1 ? (p(!0), v(!0), b(!1), P(!0), y(!1)) : (p(!0), v(!1), b(!0), P(!1), y(!1));
|
|
827
827
|
}), B = t.focus$.subscribe((E) => {
|
|
828
|
-
E.length === 0 ? (p(!1),
|
|
828
|
+
E.length === 0 ? (p(!1), v(!1), b(!1), P(!1), y(!0)) : E.length === 1 ? (p(!0), v(!0), b(!1), P(!0), y(!1)) : (p(!0), v(!1), b(!0), P(!1), y(!1));
|
|
829
829
|
});
|
|
830
830
|
return () => {
|
|
831
|
-
D.unsubscribe(),
|
|
831
|
+
D.unsubscribe(), x.unsubscribe(), B.unsubscribe();
|
|
832
832
|
};
|
|
833
833
|
}, []), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
834
|
-
/* @__PURE__ */ l.jsx("div", { style: { display:
|
|
835
|
-
/* @__PURE__ */ l.jsx(
|
|
836
|
-
/* @__PURE__ */ l.jsx(
|
|
837
|
-
/* @__PURE__ */ l.jsx(
|
|
838
|
-
/* @__PURE__ */ l.jsx(
|
|
839
|
-
/* @__PURE__ */ l.jsx(
|
|
834
|
+
/* @__PURE__ */ l.jsx("div", { style: { display: I === !0 ? "block" : "none", height: "100%" }, children: /* @__PURE__ */ l.jsx("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", top: "50%", marginTop: "-100px" }, children: /* @__PURE__ */ l.jsx("span", { children: e.t("image-panel.null") }) }) }),
|
|
835
|
+
/* @__PURE__ */ l.jsx(Et, { arrangeShow: s === !0 ? w : !1, drawings: r }),
|
|
836
|
+
/* @__PURE__ */ l.jsx(At, { transformShow: a === !0 ? S : !1, drawings: r }),
|
|
837
|
+
/* @__PURE__ */ l.jsx(_t, { alignShow: o === !0 ? j : !1, drawings: r }),
|
|
838
|
+
/* @__PURE__ */ l.jsx(Ht, { cropperShow: c === !0 ? N : !1, drawings: r }),
|
|
839
|
+
/* @__PURE__ */ l.jsx(Tt, { hasGroup: g, drawings: r })
|
|
840
840
|
] });
|
|
841
|
-
},
|
|
842
|
-
imagePopupMenu:
|
|
843
|
-
imagePopupMenuItem:
|
|
844
|
-
imagePopupMenuItemIcon:
|
|
845
|
-
imagePopupMenuItemTitle:
|
|
846
|
-
imagePopupMenuItemHide:
|
|
847
|
-
btnContainer:
|
|
848
|
-
btnContainerExpand:
|
|
849
|
-
},
|
|
850
|
-
var
|
|
851
|
-
const t = (w = (
|
|
841
|
+
}, Lt = "univer-image-popup-menu", Vt = "univer-image-popup-menu-item", Gt = "univer-image-popup-menu-item-icon", Wt = "univer-image-popup-menu-item-title", $t = "univer-image-popup-menu-item-hide", kt = "univer-btn-container", zt = "univer-btn-container-expand", Ce = {
|
|
842
|
+
imagePopupMenu: Lt,
|
|
843
|
+
imagePopupMenuItem: Vt,
|
|
844
|
+
imagePopupMenuItemIcon: Gt,
|
|
845
|
+
imagePopupMenuItemTitle: Wt,
|
|
846
|
+
imagePopupMenuItemHide: $t,
|
|
847
|
+
btnContainer: kt,
|
|
848
|
+
btnContainerExpand: zt
|
|
849
|
+
}, Ft = (i) => {
|
|
850
|
+
var _, w;
|
|
851
|
+
const t = (w = (_ = i.popup) == null ? void 0 : _.extraProps) == null ? void 0 : w.menuItems;
|
|
852
852
|
if (!t)
|
|
853
853
|
return null;
|
|
854
854
|
const n = L(me), e = L(ne), [r, s] = H(!1), [a, o] = H(!1), c = () => {
|
|
@@ -866,7 +866,7 @@ const De = {
|
|
|
866
866
|
onMouseEnter: c,
|
|
867
867
|
onMouseLeave: g,
|
|
868
868
|
children: /* @__PURE__ */ l.jsx(
|
|
869
|
-
|
|
869
|
+
qn,
|
|
870
870
|
{
|
|
871
871
|
placement: "bottomLeft",
|
|
872
872
|
trigger: ["click"],
|
|
@@ -889,13 +889,13 @@ const De = {
|
|
|
889
889
|
}),
|
|
890
890
|
children: [
|
|
891
891
|
/* @__PURE__ */ l.jsx(
|
|
892
|
-
|
|
892
|
+
wn,
|
|
893
893
|
{
|
|
894
894
|
style: { color: "#35322B" },
|
|
895
895
|
extend: { colorChannel1: "rgb(var(--green-700, #409f11))" }
|
|
896
896
|
}
|
|
897
897
|
),
|
|
898
|
-
h && /* @__PURE__ */ l.jsx(
|
|
898
|
+
h && /* @__PURE__ */ l.jsx(bn, { style: { color: "#CCCCCC", fontSize: "8px", marginLeft: "8px" } })
|
|
899
899
|
]
|
|
900
900
|
}
|
|
901
901
|
)
|
|
@@ -903,50 +903,50 @@ const De = {
|
|
|
903
903
|
)
|
|
904
904
|
}
|
|
905
905
|
);
|
|
906
|
-
},
|
|
906
|
+
}, Kt = "COMPONENT_IMAGE_POPUP_MENU", Yt = "drawing-ui.config", an = {}, jn = {
|
|
907
907
|
id: "sheet.operation.image-reset-size",
|
|
908
|
-
type:
|
|
908
|
+
type: ve.OPERATION,
|
|
909
909
|
handler: (i, t) => !0
|
|
910
|
-
},
|
|
910
|
+
}, Zt = (i) => {
|
|
911
911
|
const { src: t } = i;
|
|
912
912
|
return t ? /* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsx("img", { src: t, alt: "Univer Image Viewer", style: { width: "100%", height: "100%", position: "relative" } }) }) : null;
|
|
913
913
|
};
|
|
914
|
-
var
|
|
915
|
-
for (var r = e > 1 ? void 0 : e ?
|
|
914
|
+
var Xt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Jt = (i, t, n, e) => {
|
|
915
|
+
for (var r = e > 1 ? void 0 : e ? qt(t, n) : t, s = i.length - 1, a; s >= 0; s--)
|
|
916
916
|
(a = i[s]) && (r = (e ? a(t, n, r) : a(r)) || r);
|
|
917
|
-
return e && r &&
|
|
918
|
-
},
|
|
919
|
-
let
|
|
917
|
+
return e && r && Xt(t, n, r), r;
|
|
918
|
+
}, sn = (i, t) => (n, e) => t(n, e, i);
|
|
919
|
+
let Te = class extends Le {
|
|
920
920
|
constructor(i, t) {
|
|
921
921
|
super(), this._componentManager = i, this._commandService = t, this._init();
|
|
922
922
|
}
|
|
923
923
|
_initCustomComponents() {
|
|
924
924
|
const i = this._componentManager;
|
|
925
|
-
this.disposeWithMe(i.register(
|
|
925
|
+
this.disposeWithMe(i.register(Kt, Ft)), this.disposeWithMe(i.register(fn, Zt));
|
|
926
926
|
}
|
|
927
927
|
_initCommands() {
|
|
928
928
|
[
|
|
929
|
-
|
|
929
|
+
Ke,
|
|
930
930
|
le,
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
931
|
+
jn,
|
|
932
|
+
Xe,
|
|
933
|
+
Ee
|
|
934
934
|
].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
|
|
935
935
|
}
|
|
936
936
|
_init() {
|
|
937
937
|
this._initCommands(), this._initCustomComponents();
|
|
938
938
|
}
|
|
939
939
|
};
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
],
|
|
944
|
-
var
|
|
945
|
-
for (var r = e > 1 ? void 0 : e ?
|
|
940
|
+
Te = Jt([
|
|
941
|
+
sn(0, He(Kn)),
|
|
942
|
+
sn(1, me)
|
|
943
|
+
], Te);
|
|
944
|
+
var Qt = Object.defineProperty, er = Object.getOwnPropertyDescriptor, nr = (i, t, n, e) => {
|
|
945
|
+
for (var r = e > 1 ? void 0 : e ? er(t, n) : t, s = i.length - 1, a; s >= 0; s--)
|
|
946
946
|
(a = i[s]) && (r = (e ? a(t, n, r) : a(r)) || r);
|
|
947
|
-
return e && r &&
|
|
947
|
+
return e && r && Qt(t, n, r), r;
|
|
948
948
|
}, je = (i, t) => (n, e) => t(n, e, i);
|
|
949
|
-
let
|
|
949
|
+
let Be = class extends Le {
|
|
950
950
|
constructor(t, n, e, r) {
|
|
951
951
|
super();
|
|
952
952
|
Q(this, "_sceneListenerOnDrawingMap", /* @__PURE__ */ new WeakSet());
|
|
@@ -959,7 +959,7 @@ let Te = class extends He {
|
|
|
959
959
|
this._recoveryImages(), this._drawingAddListener(), this._drawingRemoveListener(), this._drawingUpdateListener(), this._commandExecutedListener(), this._drawingArrangeListener(), this._drawingGroupListener(), this._drawingRefreshListener(), this._drawingVisibleListener();
|
|
960
960
|
}
|
|
961
961
|
_recoveryImages() {
|
|
962
|
-
const t = this._drawingManagerService.drawingManagerData, n =
|
|
962
|
+
const t = this._drawingManagerService.drawingManagerData, n = hn(this._currentUniverService);
|
|
963
963
|
if (n == null)
|
|
964
964
|
return;
|
|
965
965
|
const { unitId: e, subUnitId: r } = n;
|
|
@@ -975,7 +975,7 @@ let Te = class extends He {
|
|
|
975
975
|
_commandExecutedListener() {
|
|
976
976
|
this.disposeWithMe(
|
|
977
977
|
this._commandService.onCommandExecuted((t) => {
|
|
978
|
-
if (t.id ===
|
|
978
|
+
if (t.id === Xe.id) {
|
|
979
979
|
const n = t.params;
|
|
980
980
|
if (n == null)
|
|
981
981
|
return;
|
|
@@ -1037,16 +1037,16 @@ let Te = class extends He {
|
|
|
1037
1037
|
this._commandService.syncExecuteCommand(le.id);
|
|
1038
1038
|
const m = [];
|
|
1039
1039
|
if (e.forEach((f) => {
|
|
1040
|
-
const
|
|
1040
|
+
const _ = G(f), w = c.getObjectIncludeInGroup(_);
|
|
1041
1041
|
if (w == null || m.includes(w))
|
|
1042
1042
|
return;
|
|
1043
1043
|
m.push(w);
|
|
1044
1044
|
const { transform: p } = f;
|
|
1045
|
-
p != null && (w.classType ===
|
|
1045
|
+
p != null && (w.classType === Je.GROUP ? w.transformByState({ left: p.left, top: p.top }) : w.transformByState(p));
|
|
1046
1046
|
}), m.length === 0)
|
|
1047
1047
|
return;
|
|
1048
|
-
const d = G({ unitId: r, subUnitId: s, drawingId: a }), h = new
|
|
1049
|
-
c.addObject(h,
|
|
1048
|
+
const d = G({ unitId: r, subUnitId: s, drawingId: a }), h = new _e(d);
|
|
1049
|
+
c.addObject(h, Ze).attachTransformerTo(h), h.addObjects(...m), n.transform && h.transformByState({ left: n.transform.left, top: n.transform.top }), g.clearSelectedObjects(), g.setSelectedControl(h);
|
|
1050
1050
|
}
|
|
1051
1051
|
// private _regroupDrawings(drawings: IDrawingSearch[]) {
|
|
1052
1052
|
// const renderObject = this._getSceneAndTransformerByDrawingSearch(drawings[0].unitId);
|
|
@@ -1098,8 +1098,8 @@ let Te = class extends He {
|
|
|
1098
1098
|
return !0;
|
|
1099
1099
|
if (f == null)
|
|
1100
1100
|
return;
|
|
1101
|
-
const { transform:
|
|
1102
|
-
|
|
1101
|
+
const { transform: _ } = d;
|
|
1102
|
+
_ != null && (f.classType === Je.GROUP ? f.transformByState({ left: _.left, top: _.top }) : f.transformByState(_));
|
|
1103
1103
|
});
|
|
1104
1104
|
const o = G(n), c = s.getObject(o), { width: g, height: m } = c;
|
|
1105
1105
|
c.getObjects().forEach((d) => {
|
|
@@ -1113,18 +1113,18 @@ let Te = class extends He {
|
|
|
1113
1113
|
const r = [];
|
|
1114
1114
|
let s = Number.POSITIVE_INFINITY, a = Number.POSITIVE_INFINITY, o = Number.NEGATIVE_INFINITY, c = Number.NEGATIVE_INFINITY, g = 0;
|
|
1115
1115
|
e.forEach((m) => {
|
|
1116
|
-
const { unitId: d, subUnitId: h, drawingId: f, drawingType:
|
|
1116
|
+
const { unitId: d, subUnitId: h, drawingId: f, drawingType: _ } = m, w = this._drawingManagerService.getDrawingByParam({ unitId: d, subUnitId: h, drawingId: f });
|
|
1117
1117
|
if (w == null || w.transform == null)
|
|
1118
1118
|
return;
|
|
1119
1119
|
r.push({
|
|
1120
1120
|
unitId: d,
|
|
1121
1121
|
subUnitId: h,
|
|
1122
1122
|
drawingId: f,
|
|
1123
|
-
drawingType:
|
|
1123
|
+
drawingType: _,
|
|
1124
1124
|
transform: w.transform
|
|
1125
1125
|
});
|
|
1126
|
-
const { left: p = 0, top: S = 0, width:
|
|
1127
|
-
s = Math.min(s, p), a = Math.min(a, S), o = Math.max(o, p +
|
|
1126
|
+
const { left: p = 0, top: S = 0, width: v = 0, height: j = 0 } = w.transform;
|
|
1127
|
+
s = Math.min(s, p), a = Math.min(a, S), o = Math.max(o, p + v), c = Math.max(c, S + j), g++;
|
|
1128
1128
|
}), g !== 0 && (this._sortDrawingTransform(r, n), this._applyAlignType(r, n, s, a, o, c, g));
|
|
1129
1129
|
}
|
|
1130
1130
|
_applyAlignType(t, n, e, r, s, a, o) {
|
|
@@ -1132,42 +1132,42 @@ let Te = class extends He {
|
|
|
1132
1132
|
if (d == null)
|
|
1133
1133
|
return;
|
|
1134
1134
|
const { scene: h, transformer: f } = d;
|
|
1135
|
-
t.forEach((
|
|
1136
|
-
const { unitId: p, subUnitId: S, drawingId:
|
|
1137
|
-
let
|
|
1135
|
+
t.forEach((_, w) => {
|
|
1136
|
+
const { unitId: p, subUnitId: S, drawingId: v, transform: j, drawingType: b } = _, { left: N = 0, top: P = 0, width: I = 0, height: y = 0 } = j;
|
|
1137
|
+
let x = N, D = P;
|
|
1138
1138
|
switch (n) {
|
|
1139
1139
|
case R.left:
|
|
1140
|
-
|
|
1140
|
+
x = e;
|
|
1141
1141
|
break;
|
|
1142
1142
|
case R.center:
|
|
1143
|
-
|
|
1143
|
+
x = e + (s - e) / 2 - I / 2;
|
|
1144
1144
|
break;
|
|
1145
1145
|
case R.right:
|
|
1146
|
-
|
|
1146
|
+
x = s - I;
|
|
1147
1147
|
break;
|
|
1148
1148
|
case R.top:
|
|
1149
1149
|
D = r;
|
|
1150
1150
|
break;
|
|
1151
1151
|
case R.middle:
|
|
1152
|
-
D = r + (a - r) / 2 -
|
|
1152
|
+
D = r + (a - r) / 2 - y / 2;
|
|
1153
1153
|
break;
|
|
1154
1154
|
case R.bottom:
|
|
1155
|
-
D = a -
|
|
1155
|
+
D = a - y;
|
|
1156
1156
|
break;
|
|
1157
1157
|
case R.horizon:
|
|
1158
|
-
|
|
1158
|
+
x = e + c * w;
|
|
1159
1159
|
break;
|
|
1160
1160
|
case R.vertical:
|
|
1161
1161
|
D = r + g * w;
|
|
1162
1162
|
break;
|
|
1163
1163
|
}
|
|
1164
|
-
(
|
|
1164
|
+
(x !== N || D !== P) && m.push({
|
|
1165
1165
|
unitId: p,
|
|
1166
1166
|
subUnitId: S,
|
|
1167
|
-
drawingId:
|
|
1167
|
+
drawingId: v,
|
|
1168
1168
|
drawingType: b,
|
|
1169
1169
|
transform: {
|
|
1170
|
-
left:
|
|
1170
|
+
left: x,
|
|
1171
1171
|
top: D
|
|
1172
1172
|
}
|
|
1173
1173
|
});
|
|
@@ -1184,7 +1184,7 @@ let Te = class extends He {
|
|
|
1184
1184
|
left: d = 0,
|
|
1185
1185
|
top: h = 0,
|
|
1186
1186
|
width: f = 0,
|
|
1187
|
-
height:
|
|
1187
|
+
height: _ = 0
|
|
1188
1188
|
} = a;
|
|
1189
1189
|
switch (n) {
|
|
1190
1190
|
case R.left:
|
|
@@ -1196,13 +1196,13 @@ let Te = class extends He {
|
|
|
1196
1196
|
case R.top:
|
|
1197
1197
|
return c - h;
|
|
1198
1198
|
case R.middle:
|
|
1199
|
-
return c + m / 2 - (h +
|
|
1199
|
+
return c + m / 2 - (h + _ / 2);
|
|
1200
1200
|
case R.bottom:
|
|
1201
|
-
return c + m - (h +
|
|
1201
|
+
return c + m - (h + _);
|
|
1202
1202
|
case R.horizon:
|
|
1203
1203
|
return o + g / 2 - (d + f / 2);
|
|
1204
1204
|
case R.vertical:
|
|
1205
|
-
return c + m / 2 - (h +
|
|
1205
|
+
return c + m / 2 - (h + _ / 2);
|
|
1206
1206
|
default:
|
|
1207
1207
|
return 0;
|
|
1208
1208
|
}
|
|
@@ -1273,6 +1273,7 @@ let Te = class extends He {
|
|
|
1273
1273
|
this.disposeWithMe(
|
|
1274
1274
|
this._drawingManagerService.update$.subscribe((t) => {
|
|
1275
1275
|
t.forEach((n) => {
|
|
1276
|
+
var I;
|
|
1276
1277
|
const { unitId: e, subUnitId: r, drawingId: s } = n, a = this._drawingManagerService.getDrawingByParam(n);
|
|
1277
1278
|
if (a == null)
|
|
1278
1279
|
return;
|
|
@@ -1282,10 +1283,10 @@ let Te = class extends He {
|
|
|
1282
1283
|
const { scene: m, transformer: d } = g;
|
|
1283
1284
|
if (o == null)
|
|
1284
1285
|
return !0;
|
|
1285
|
-
const { left: h = 0, top: f = 0, width:
|
|
1286
|
-
if (
|
|
1286
|
+
const { left: h = 0, top: f = 0, width: _ = 0, height: w = 0, angle: p = 0, flipX: S = !1, flipY: v = !1, skewX: j = 0, skewY: b = 0 } = o, N = G({ unitId: e, subUnitId: r, drawingId: s }), P = m.getObject(N);
|
|
1287
|
+
if (P == null)
|
|
1287
1288
|
return !0;
|
|
1288
|
-
|
|
1289
|
+
P.transformByState({ left: h, top: f, width: _, height: w, angle: p, flipX: S, flipY: v, skewX: j, skewY: b }), (I = m.getTransformer()) == null || I.debounceRefreshControls();
|
|
1289
1290
|
});
|
|
1290
1291
|
})
|
|
1291
1292
|
);
|
|
@@ -1306,15 +1307,15 @@ let Te = class extends He {
|
|
|
1306
1307
|
const {
|
|
1307
1308
|
left: h = 0,
|
|
1308
1309
|
top: f = 0,
|
|
1309
|
-
width:
|
|
1310
|
+
width: _ = 0,
|
|
1310
1311
|
height: w = 0,
|
|
1311
1312
|
angle: p = 0,
|
|
1312
1313
|
flipX: S = !1,
|
|
1313
|
-
flipY:
|
|
1314
|
+
flipY: v = !1,
|
|
1314
1315
|
skewX: j = 0,
|
|
1315
1316
|
skewY: b = 0
|
|
1316
1317
|
} = c;
|
|
1317
|
-
d.transformByState({ left: h, top: f, width:
|
|
1318
|
+
d.transformByState({ left: h, top: f, width: _, height: w, angle: p, flipX: S, flipY: v, skewX: j, skewY: b });
|
|
1318
1319
|
});
|
|
1319
1320
|
})
|
|
1320
1321
|
);
|
|
@@ -1339,7 +1340,7 @@ let Te = class extends He {
|
|
|
1339
1340
|
if (e == null)
|
|
1340
1341
|
return !1;
|
|
1341
1342
|
const { transform: s } = e;
|
|
1342
|
-
return
|
|
1343
|
+
return ln(s, n == null ? void 0 : n[r]);
|
|
1343
1344
|
});
|
|
1344
1345
|
}
|
|
1345
1346
|
// group?.getObjects().forEach((o) => {
|
|
@@ -1357,43 +1358,43 @@ let Te = class extends He {
|
|
|
1357
1358
|
n.changeStart$.subscribe((r) => {
|
|
1358
1359
|
const { objects: s } = r, a = Array.from(s.values()), o = [];
|
|
1359
1360
|
e = a.map((c) => {
|
|
1360
|
-
const { left: g, top: m, height: d, width: h, angle: f, oKey:
|
|
1361
|
-
if (w || c instanceof
|
|
1361
|
+
const { left: g, top: m, height: d, width: h, angle: f, oKey: _, isInGroup: w } = c, p = this._drawingManagerService.getDrawingOKey(_);
|
|
1362
|
+
if (w || c instanceof _e) {
|
|
1362
1363
|
let S = c.ancestorGroup;
|
|
1363
|
-
if (S == null && c instanceof
|
|
1364
|
+
if (S == null && c instanceof _e && (S = c), S == null)
|
|
1364
1365
|
return null;
|
|
1365
|
-
const
|
|
1366
|
-
if (
|
|
1367
|
-
const { unitId: j, subUnitId: b, drawingId: N } =
|
|
1366
|
+
const v = this._drawingManagerService.getDrawingOKey(S.oKey);
|
|
1367
|
+
if (v) {
|
|
1368
|
+
const { unitId: j, subUnitId: b, drawingId: N } = v;
|
|
1368
1369
|
o.push({ unitId: j, subUnitId: b, drawingId: N });
|
|
1369
|
-
const { left:
|
|
1370
|
-
return { left:
|
|
1370
|
+
const { left: P, top: I, height: y, width: x, angle: D } = S;
|
|
1371
|
+
return { left: P, top: I, height: y, width: x, angle: D };
|
|
1371
1372
|
}
|
|
1372
1373
|
} else if (p != null) {
|
|
1373
|
-
const { unitId: S, subUnitId:
|
|
1374
|
-
return o.push({ unitId: S, subUnitId:
|
|
1374
|
+
const { unitId: S, subUnitId: v, drawingId: j } = p;
|
|
1375
|
+
return o.push({ unitId: S, subUnitId: v, drawingId: j }), { left: g, top: m, height: d, width: h, angle: f };
|
|
1375
1376
|
}
|
|
1376
1377
|
return null;
|
|
1377
|
-
}).filter((c) => c != null), o.length > 0 ? this.
|
|
1378
|
+
}).filter((c) => c != null), o.length > 0 ? this._commandService.syncExecuteCommand(Oe.id, o) : this._commandService.syncExecuteCommand(Oe.id, []);
|
|
1378
1379
|
})
|
|
1379
1380
|
)
|
|
1380
1381
|
), this.disposeWithMe(
|
|
1381
1382
|
we(
|
|
1382
1383
|
n.changeEnd$.subscribe((r) => {
|
|
1383
|
-
const { objects: s } = r, a = this._filterUpdateParams(
|
|
1384
|
+
const { objects: s } = r, a = this._filterUpdateParams(Ve(s, this._drawingManagerService), e);
|
|
1384
1385
|
a.length > 0 && this._drawingManagerService.featurePluginUpdateNotification(a);
|
|
1385
1386
|
})
|
|
1386
1387
|
)
|
|
1387
1388
|
);
|
|
1388
1389
|
}
|
|
1389
1390
|
};
|
|
1390
|
-
|
|
1391
|
-
je(0,
|
|
1391
|
+
Be = nr([
|
|
1392
|
+
je(0, Ye),
|
|
1392
1393
|
je(1, me),
|
|
1393
1394
|
je(2, ue),
|
|
1394
1395
|
je(3, te)
|
|
1395
|
-
],
|
|
1396
|
-
class
|
|
1396
|
+
], Be);
|
|
1397
|
+
class xe extends kn {
|
|
1397
1398
|
constructor(n, e) {
|
|
1398
1399
|
e == null && (e = {}), e.transformerConfig = {
|
|
1399
1400
|
keepRatio: !1,
|
|
@@ -1436,7 +1437,7 @@ class Me extends $n {
|
|
|
1436
1437
|
const r = this.getScene().getEngine(), { width: s, height: a } = r;
|
|
1437
1438
|
this._initialCacheCanvas(), (c = this._cacheCanvas) == null || c.clear();
|
|
1438
1439
|
const o = (g = this._cacheCanvas) == null ? void 0 : g.getContext();
|
|
1439
|
-
o != null && (o.save(),
|
|
1440
|
+
o != null && (o.save(), zn.drawWith(o, {
|
|
1440
1441
|
left: 0,
|
|
1441
1442
|
top: 0,
|
|
1442
1443
|
width: s,
|
|
@@ -1457,8 +1458,8 @@ class Me extends $n {
|
|
|
1457
1458
|
let n = 0, e = 0, r = 0, s = 0;
|
|
1458
1459
|
const { left: a = 0, top: o = 0, width: c = 0, height: g = 0, angle: m } = this._applyTransform;
|
|
1459
1460
|
if (this._srcRect != null) {
|
|
1460
|
-
const { left: f = 0, top:
|
|
1461
|
-
n = f, e =
|
|
1461
|
+
const { left: f = 0, top: _ = 0, right: w = 0, bottom: p = 0 } = this._srcRect;
|
|
1462
|
+
n = f, e = _, r = w, s = p;
|
|
1462
1463
|
}
|
|
1463
1464
|
const d = a + n, h = o + e;
|
|
1464
1465
|
this.transformByState({
|
|
@@ -1480,7 +1481,7 @@ class Me extends $n {
|
|
|
1480
1481
|
return;
|
|
1481
1482
|
const n = this.getScene();
|
|
1482
1483
|
if (n == null) return;
|
|
1483
|
-
this._cacheCanvas = new
|
|
1484
|
+
this._cacheCanvas = new Fn();
|
|
1484
1485
|
const e = n.getEngine();
|
|
1485
1486
|
this._cacheCanvas.setSize(e.width, e.height), e.onTransformChange$.subscribeEvent(() => {
|
|
1486
1487
|
var r;
|
|
@@ -1488,12 +1489,12 @@ class Me extends $n {
|
|
|
1488
1489
|
});
|
|
1489
1490
|
}
|
|
1490
1491
|
}
|
|
1491
|
-
var
|
|
1492
|
-
for (var r = e > 1 ? void 0 : e ?
|
|
1492
|
+
var tr = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, ir = (i, t, n, e) => {
|
|
1493
|
+
for (var r = e > 1 ? void 0 : e ? rr(t, n) : t, s = i.length - 1, a; s >= 0; s--)
|
|
1493
1494
|
(a = i[s]) && (r = (e ? a(t, n, r) : a(r)) || r);
|
|
1494
|
-
return e && r &&
|
|
1495
|
+
return e && r && tr(t, n, r), r;
|
|
1495
1496
|
}, ge = (i, t) => (n, e) => t(n, e, i);
|
|
1496
|
-
let
|
|
1497
|
+
let Ue = class extends Le {
|
|
1497
1498
|
constructor(t, n, e, r, s, a) {
|
|
1498
1499
|
super();
|
|
1499
1500
|
Q(this, "_sceneListenerOnImageMap", /* @__PURE__ */ new WeakSet());
|
|
@@ -1505,7 +1506,7 @@ let Be = class extends He {
|
|
|
1505
1506
|
_initAutoCrop() {
|
|
1506
1507
|
this.disposeWithMe(
|
|
1507
1508
|
this._commandService.onCommandExecuted((t) => {
|
|
1508
|
-
if (t.id !==
|
|
1509
|
+
if (t.id !== Ee.id)
|
|
1509
1510
|
return;
|
|
1510
1511
|
const n = t.params;
|
|
1511
1512
|
if (n == null)
|
|
@@ -1518,14 +1519,14 @@ let Be = class extends He {
|
|
|
1518
1519
|
return !0;
|
|
1519
1520
|
this._searchCropObject(m) != null && this._commandService.syncExecuteCommand(le.id, { isAuto: !0 });
|
|
1520
1521
|
const h = G({ unitId: a, subUnitId: o, drawingId: c }), f = m.getObject(h);
|
|
1521
|
-
if (!(f instanceof
|
|
1522
|
+
if (!(f instanceof Fe)) {
|
|
1522
1523
|
this._messageService.show({
|
|
1523
|
-
type:
|
|
1524
|
+
type: en.Error,
|
|
1524
1525
|
content: this._localeService.t("image-cropper.error")
|
|
1525
1526
|
});
|
|
1526
1527
|
return;
|
|
1527
1528
|
}
|
|
1528
|
-
f != null && (this._updateCropperObject(e, f), this._commandService.executeCommand(
|
|
1529
|
+
f != null && (this._updateCropperObject(e, f), this._commandService.executeCommand(Ke.id, { unitId: a, subUnitId: o, drawingId: c }));
|
|
1529
1530
|
})
|
|
1530
1531
|
);
|
|
1531
1532
|
}
|
|
@@ -1588,7 +1589,7 @@ let Be = class extends He {
|
|
|
1588
1589
|
_initOpenCrop() {
|
|
1589
1590
|
this.disposeWithMe(
|
|
1590
1591
|
this._commandService.onCommandExecuted((t) => {
|
|
1591
|
-
if (t.id !==
|
|
1592
|
+
if (t.id !== Ke.id)
|
|
1592
1593
|
return;
|
|
1593
1594
|
const n = t.params;
|
|
1594
1595
|
if (n == null)
|
|
@@ -1601,28 +1602,28 @@ let Be = class extends He {
|
|
|
1601
1602
|
const g = G({ unitId: e, subUnitId: r, drawingId: s }), m = o.getObject(g);
|
|
1602
1603
|
if (m == null)
|
|
1603
1604
|
return;
|
|
1604
|
-
if (!(m instanceof
|
|
1605
|
+
if (!(m instanceof Fe)) {
|
|
1605
1606
|
this._messageService.show({
|
|
1606
|
-
type:
|
|
1607
|
+
type: en.Error,
|
|
1607
1608
|
content: this._localeService.t("image-cropper.error")
|
|
1608
1609
|
});
|
|
1609
1610
|
return;
|
|
1610
1611
|
}
|
|
1611
1612
|
const d = o.getTransformer();
|
|
1612
1613
|
d == null || d.clearControls();
|
|
1613
|
-
const h = new
|
|
1614
|
+
const h = new xe(`${g}-crop`, {
|
|
1614
1615
|
srcRect: m.srcRect,
|
|
1615
1616
|
prstGeom: m.prstGeom,
|
|
1616
1617
|
applyTransform: m.calculateTransformWithSrcRect()
|
|
1617
1618
|
});
|
|
1618
|
-
o.addObject(h, m.getLayerIndex() + 1).attachTransformerTo(h), d == null || d.createControlForCopper(h), this._addHoverForImageCopper(h), m.openRenderByCropper(), d == null || d.refreshControls(), h.makeDirty(!0), this.
|
|
1619
|
+
o.addObject(h, m.getLayerIndex() + 1).attachTransformerTo(h), d == null || d.createControlForCopper(h), this._addHoverForImageCopper(h), m.openRenderByCropper(), d == null || d.refreshControls(), h.makeDirty(!0), this._commandService.syncExecuteCommand(Oe.id, [{ unitId: e, subUnitId: r, drawingId: s }]);
|
|
1619
1620
|
})
|
|
1620
1621
|
);
|
|
1621
1622
|
}
|
|
1622
1623
|
_searchCropObject(t) {
|
|
1623
1624
|
const n = t.getAllObjectsByOrder();
|
|
1624
1625
|
for (const e of n)
|
|
1625
|
-
if (e instanceof
|
|
1626
|
+
if (e instanceof xe)
|
|
1626
1627
|
return e;
|
|
1627
1628
|
}
|
|
1628
1629
|
_initCloseCrop() {
|
|
@@ -1646,14 +1647,14 @@ let Be = class extends He {
|
|
|
1646
1647
|
g.detachFrom(o), g.clearCopperControl();
|
|
1647
1648
|
const m = this._getSrcRectByTransformState(c, o), d = this._drawingManagerService.getDrawingOKey(c.oKey);
|
|
1648
1649
|
if (d != null) {
|
|
1649
|
-
const { left: h, top: f, height:
|
|
1650
|
+
const { left: h, top: f, height: _, width: w } = o;
|
|
1650
1651
|
this._drawingManagerService.featurePluginUpdateNotification([{
|
|
1651
1652
|
...d,
|
|
1652
1653
|
transform: {
|
|
1653
1654
|
...d.transform,
|
|
1654
1655
|
left: h,
|
|
1655
1656
|
top: f,
|
|
1656
|
-
height:
|
|
1657
|
+
height: _,
|
|
1657
1658
|
width: w
|
|
1658
1659
|
},
|
|
1659
1660
|
srcRect: m.srcRectAngle
|
|
@@ -1662,9 +1663,9 @@ let Be = class extends He {
|
|
|
1662
1663
|
c.setSrcRect({ ...m.srcRectAngle }), c.closeRenderByCropper(), c.makeDirty(!0), o == null || o.dispose();
|
|
1663
1664
|
})
|
|
1664
1665
|
);
|
|
1665
|
-
const t = this._univerInstanceService.getCurrentTypeOfUnit$(
|
|
1666
|
-
|
|
1667
|
-
|
|
1666
|
+
const t = this._univerInstanceService.getCurrentTypeOfUnit$(Me.UNIVER_SHEET).pipe(
|
|
1667
|
+
Jn((n) => !!n),
|
|
1668
|
+
Qn((n) => n.activeSheet$)
|
|
1668
1669
|
);
|
|
1669
1670
|
this.disposeWithMe(t.subscribe(() => {
|
|
1670
1671
|
this._commandService.syncExecuteCommand(le.id);
|
|
@@ -1682,7 +1683,7 @@ let Be = class extends He {
|
|
|
1682
1683
|
this.disposeWithMe(
|
|
1683
1684
|
n.changeStart$.subscribe((r) => {
|
|
1684
1685
|
const { objects: s } = r, a = s.values().next().value;
|
|
1685
|
-
if (a == null || !(a instanceof
|
|
1686
|
+
if (a == null || !(a instanceof xe))
|
|
1686
1687
|
return;
|
|
1687
1688
|
const { left: o, top: c, height: g, width: m, angle: d } = a;
|
|
1688
1689
|
e = { left: o, top: c, height: g, width: m, angle: d }, n.clearCopperControl();
|
|
@@ -1690,10 +1691,10 @@ let Be = class extends He {
|
|
|
1690
1691
|
), this.disposeWithMe(
|
|
1691
1692
|
n.changeEnd$.subscribe((r) => {
|
|
1692
1693
|
const { objects: s } = r, a = s.values().next().value;
|
|
1693
|
-
if (a == null || !(a instanceof
|
|
1694
|
+
if (a == null || !(a instanceof xe))
|
|
1694
1695
|
return;
|
|
1695
1696
|
const { left: o, top: c, height: g, width: m, angle: d } = a;
|
|
1696
|
-
if (!
|
|
1697
|
+
if (!ln({ left: o, top: c, height: g, width: m, angle: d }, e))
|
|
1697
1698
|
return;
|
|
1698
1699
|
const h = this._getApplyObjectByCropObject(a);
|
|
1699
1700
|
if (h == null)
|
|
@@ -1706,11 +1707,11 @@ let Be = class extends He {
|
|
|
1706
1707
|
_addHoverForImageCopper(t) {
|
|
1707
1708
|
this.disposeWithMe(
|
|
1708
1709
|
t.onPointerEnter$.subscribeEvent(() => {
|
|
1709
|
-
t.cursor =
|
|
1710
|
+
t.cursor = Ne.MOVE;
|
|
1710
1711
|
})
|
|
1711
1712
|
), this.disposeWithMe(
|
|
1712
1713
|
t.onPointerLeave$.subscribeEvent(() => {
|
|
1713
|
-
t.cursor =
|
|
1714
|
+
t.cursor = Ne.DEFAULT;
|
|
1714
1715
|
})
|
|
1715
1716
|
);
|
|
1716
1717
|
}
|
|
@@ -1723,40 +1724,40 @@ let Be = class extends He {
|
|
|
1723
1724
|
);
|
|
1724
1725
|
}
|
|
1725
1726
|
_getSrcRectByTransformState(t, n) {
|
|
1726
|
-
const { left: e, top: r, height: s, width: a, strokeWidth: o, angle: c } = n, { left: g, top: m, width: d, height: h, angle: f, strokeWidth:
|
|
1727
|
+
const { left: e, top: r, height: s, width: a, strokeWidth: o, angle: c } = n, { left: g, top: m, width: d, height: h, angle: f, strokeWidth: _ } = t, w = e - g, p = r - m, S = {
|
|
1727
1728
|
left: w,
|
|
1728
1729
|
top: p,
|
|
1729
1730
|
right: d - w - a,
|
|
1730
1731
|
bottom: h - p - s
|
|
1731
|
-
},
|
|
1732
|
+
}, v = { ...S };
|
|
1732
1733
|
if (f !== 0) {
|
|
1733
|
-
const j = e + a / 2, b = r + s / 2, N = new
|
|
1734
|
-
|
|
1735
|
-
const D =
|
|
1736
|
-
D.rotateByPoint(
|
|
1734
|
+
const j = e + a / 2, b = r + s / 2, N = new We(j, b), P = d / 2 + g, I = h / 2 + m, y = new We(P, I), x = new We(g, m);
|
|
1735
|
+
x.rotateByPoint(Qe(f), y);
|
|
1736
|
+
const D = x.clone();
|
|
1737
|
+
D.rotateByPoint(Qe(-f), N);
|
|
1737
1738
|
const B = e - D.x, E = r - D.y;
|
|
1738
|
-
|
|
1739
|
+
v.left = B, v.top = E, v.right = d - B - a, v.bottom = h - E - s;
|
|
1739
1740
|
}
|
|
1740
1741
|
return {
|
|
1741
1742
|
srcRect: S,
|
|
1742
|
-
srcRectAngle:
|
|
1743
|
+
srcRectAngle: v
|
|
1743
1744
|
};
|
|
1744
1745
|
}
|
|
1745
1746
|
};
|
|
1746
|
-
|
|
1747
|
+
Ue = ir([
|
|
1747
1748
|
ge(0, me),
|
|
1748
1749
|
ge(1, te),
|
|
1749
1750
|
ge(2, ue),
|
|
1750
|
-
ge(3,
|
|
1751
|
-
ge(4,
|
|
1752
|
-
ge(5,
|
|
1753
|
-
],
|
|
1754
|
-
var
|
|
1755
|
-
for (var r = e > 1 ? void 0 : e ?
|
|
1751
|
+
ge(3, Ye),
|
|
1752
|
+
ge(4, Yn),
|
|
1753
|
+
ge(5, He(ne))
|
|
1754
|
+
], Ue);
|
|
1755
|
+
var ar = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, or = (i, t, n, e) => {
|
|
1756
|
+
for (var r = e > 1 ? void 0 : e ? sr(t, n) : t, s = i.length - 1, a; s >= 0; s--)
|
|
1756
1757
|
(a = i[s]) && (r = (e ? a(t, n, r) : a(r)) || r);
|
|
1757
|
-
return e && r &&
|
|
1758
|
+
return e && r && ar(t, n, r), r;
|
|
1758
1759
|
}, oe = (i, t) => (n, e) => t(n, e, i);
|
|
1759
|
-
let
|
|
1760
|
+
let Ae = class extends Le {
|
|
1760
1761
|
constructor(i, t, n, e, r, s, a) {
|
|
1761
1762
|
super(), this._commandService = i, this._renderManagerService = t, this._drawingManagerService = n, this._dialogService = e, this._imageIoService = r, this._currentUniverService = s, this._drawingRenderService = a, this._initialize();
|
|
1762
1763
|
}
|
|
@@ -1769,7 +1770,7 @@ let Ue = class extends He {
|
|
|
1769
1770
|
_commandExecutedListener() {
|
|
1770
1771
|
this.disposeWithMe(
|
|
1771
1772
|
this._commandService.onCommandExecuted((i) => {
|
|
1772
|
-
if (i.id ===
|
|
1773
|
+
if (i.id === jn.id) {
|
|
1773
1774
|
const t = i.params;
|
|
1774
1775
|
if (t == null)
|
|
1775
1776
|
return;
|
|
@@ -1816,7 +1817,7 @@ let Ue = class extends He {
|
|
|
1816
1817
|
});
|
|
1817
1818
|
}), this._drawingManagerService.featurePluginUpdateNotification(t), n.forEach((e) => {
|
|
1818
1819
|
e.getTransformerByCreate().refreshControls().changeNotification();
|
|
1819
|
-
}), this.
|
|
1820
|
+
}), this._commandService.syncExecuteCommand(Oe.id, i);
|
|
1820
1821
|
}
|
|
1821
1822
|
_drawingAddListener() {
|
|
1822
1823
|
this.disposeWithMe(
|
|
@@ -1828,7 +1829,7 @@ let Ue = class extends He {
|
|
|
1828
1829
|
_insertImages(i) {
|
|
1829
1830
|
i.forEach(async (t) => {
|
|
1830
1831
|
var g;
|
|
1831
|
-
const { unitId: n, subUnitId: e, drawingId: r } = t, s = this._getSceneAndTransformerByDrawingSearch(n), a = (g =
|
|
1832
|
+
const { unitId: n, subUnitId: e, drawingId: r } = t, s = this._getSceneAndTransformerByDrawingSearch(n), a = (g = hn(this._currentUniverService, n)) == null ? void 0 : g.subUnitId;
|
|
1832
1833
|
if (s == null || a !== e)
|
|
1833
1834
|
return;
|
|
1834
1835
|
const o = this._drawingManagerService.getDrawingByParam(t);
|
|
@@ -1853,7 +1854,7 @@ let Ue = class extends He {
|
|
|
1853
1854
|
const h = this._getSceneAndTransformerByDrawingSearch(n);
|
|
1854
1855
|
if (h == null)
|
|
1855
1856
|
return;
|
|
1856
|
-
const { scene: f, transformer:
|
|
1857
|
+
const { scene: f, transformer: _ } = h;
|
|
1857
1858
|
if (a == null)
|
|
1858
1859
|
return !0;
|
|
1859
1860
|
const w = G({ unitId: n, subUnitId: e, drawingId: r }), p = f.getObject(w);
|
|
@@ -1868,13 +1869,13 @@ let Ue = class extends He {
|
|
|
1868
1869
|
this.disposeWithMe(
|
|
1869
1870
|
we(
|
|
1870
1871
|
i.onPointerEnter$.subscribeEvent(() => {
|
|
1871
|
-
i.cursor =
|
|
1872
|
+
i.cursor = Ne.GRAB;
|
|
1872
1873
|
})
|
|
1873
1874
|
)
|
|
1874
1875
|
), this.disposeWithMe(
|
|
1875
1876
|
we(
|
|
1876
1877
|
i.onPointerLeave$.subscribeEvent(() => {
|
|
1877
|
-
i.cursor =
|
|
1878
|
+
i.cursor = Ne.DEFAULT;
|
|
1878
1879
|
})
|
|
1879
1880
|
)
|
|
1880
1881
|
);
|
|
@@ -1890,63 +1891,63 @@ let Ue = class extends He {
|
|
|
1890
1891
|
);
|
|
1891
1892
|
}
|
|
1892
1893
|
};
|
|
1893
|
-
|
|
1894
|
+
Ae = or([
|
|
1894
1895
|
oe(0, me),
|
|
1895
1896
|
oe(1, ue),
|
|
1896
1897
|
oe(2, te),
|
|
1897
|
-
oe(3,
|
|
1898
|
-
oe(4,
|
|
1899
|
-
oe(5,
|
|
1900
|
-
oe(6,
|
|
1901
|
-
],
|
|
1902
|
-
var
|
|
1903
|
-
for (var r = e > 1 ? void 0 : e ?
|
|
1898
|
+
oe(3, gn),
|
|
1899
|
+
oe(4, mn),
|
|
1900
|
+
oe(5, Ye),
|
|
1901
|
+
oe(6, He(De))
|
|
1902
|
+
], Ae);
|
|
1903
|
+
var cr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, mr = (i, t, n, e) => {
|
|
1904
|
+
for (var r = e > 1 ? void 0 : e ? lr(t, n) : t, s = i.length - 1, a; s >= 0; s--)
|
|
1904
1905
|
(a = i[s]) && (r = (e ? a(t, n, r) : a(r)) || r);
|
|
1905
|
-
return e && r &&
|
|
1906
|
-
},
|
|
1907
|
-
const
|
|
1908
|
-
var
|
|
1909
|
-
let
|
|
1910
|
-
constructor(i =
|
|
1906
|
+
return e && r && cr(t, n, r), r;
|
|
1907
|
+
}, on = (i, t) => (n, e) => t(n, e, i);
|
|
1908
|
+
const gr = "UNIVER_DRAWING_UI_PLUGIN";
|
|
1909
|
+
var ze;
|
|
1910
|
+
let cn = (ze = class extends Hn {
|
|
1911
|
+
constructor(i = an, t, n) {
|
|
1911
1912
|
super(), this._config = i, this._injector = t, this._configService = n;
|
|
1912
|
-
const { menu: e, ...r } =
|
|
1913
|
+
const { menu: e, ...r } = Ln(
|
|
1913
1914
|
{},
|
|
1914
|
-
|
|
1915
|
+
an,
|
|
1915
1916
|
this._config
|
|
1916
1917
|
);
|
|
1917
|
-
e && this._configService.setConfig("menu", e, { merge: !0 }), this._configService.setConfig(
|
|
1918
|
+
e && this._configService.setConfig("menu", e, { merge: !0 }), this._configService.setConfig(Yt, r);
|
|
1918
1919
|
}
|
|
1919
1920
|
onStarting() {
|
|
1920
1921
|
this._initDependencies();
|
|
1921
1922
|
}
|
|
1922
1923
|
onRendered() {
|
|
1923
|
-
this._injector.get(
|
|
1924
|
+
this._injector.get(Be), this._injector.get(Te), this._injector.get(Ue), this._injector.get(Ae);
|
|
1924
1925
|
}
|
|
1925
1926
|
_initDependencies() {
|
|
1926
1927
|
[
|
|
1927
|
-
[
|
|
1928
|
-
[Te],
|
|
1929
|
-
[Ee],
|
|
1928
|
+
[De],
|
|
1930
1929
|
[Be],
|
|
1931
|
-
[
|
|
1930
|
+
[Te],
|
|
1931
|
+
[Ue],
|
|
1932
|
+
[Ae]
|
|
1932
1933
|
].forEach((t) => this._injector.add(t));
|
|
1933
1934
|
}
|
|
1934
|
-
}, Q(
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
],
|
|
1935
|
+
}, Q(ze, "pluginName", gr), ze);
|
|
1936
|
+
cn = mr([
|
|
1937
|
+
on(1, He(An)),
|
|
1938
|
+
on(2, Vn)
|
|
1939
|
+
], cn);
|
|
1939
1940
|
export {
|
|
1940
|
-
|
|
1941
|
-
|
|
1941
|
+
Ee as AutoImageCropOperation,
|
|
1942
|
+
Kt as COMPONENT_IMAGE_POPUP_MENU,
|
|
1942
1943
|
le as CloseImageCropOperation,
|
|
1943
1944
|
vr as DrawingCommonPanel,
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1945
|
+
De as DrawingRenderService,
|
|
1946
|
+
xe as ImageCropperObject,
|
|
1947
|
+
Ft as ImagePopupMenu,
|
|
1948
|
+
jn as ImageResetSizeOperation,
|
|
1949
|
+
Ke as OpenImageCropOperation,
|
|
1950
|
+
Xe as SetDrawingAlignOperation,
|
|
1951
|
+
cn as UniverDrawingUIPlugin,
|
|
1952
|
+
Ve as getUpdateParams
|
|
1952
1953
|
};
|