@univerjs/slides 0.1.7 → 0.1.8
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 +1 -1
- package/lib/es/index.js +261 -264
- package/lib/types/slides-plugin.d.ts +5 -5
- package/lib/types/views/render/canvas-view.d.ts +2 -2
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
package/lib/es/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Registry as
|
|
5
|
-
import { Liquid as Ye, DocumentViewModel as Fe, DocumentSkeleton as Be, Documents as Ke, SceneViewer as me, Scene as
|
|
6
|
-
import { Inject as
|
|
7
|
-
import { takeUntil as
|
|
1
|
+
var Ee = Object.defineProperty;
|
|
2
|
+
var xe = (a, e, r) => e in a ? Ee(a, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[e] = r;
|
|
3
|
+
var p = (a, e, r) => (xe(a, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
+
import { Registry as Ce, LocaleService as ne, PageElementType as F, DocumentDataModel as je, getColorStyle as te, ShapeType as fe, SlideDataModel as Me, IContextService as Le, ObjectMatrix as Ne, Styles as ze, Worksheet as Ve, sortRules as Xe, OnLifecycle as Ae, LifecycleStages as Ue, RxDisposable as We, UniverInstanceType as M, debounce as $e, IUniverInstanceService as be, Plugin as He } from "@univerjs/core";
|
|
5
|
+
import { Liquid as Ye, DocumentViewModel as Fe, DocumentSkeleton as Be, Documents as Ke, SceneViewer as me, Scene as ie, Viewport as X, EVENT_TYPE as pe, ScrollBar as ue, Rect as Y, Picture as Te, PageLayoutType as ve, RichText as ke, Slide as Oe, SpreadsheetSkeleton as qe, Spreadsheet as Ge, SpreadsheetRowHeader as Ze, SpreadsheetColumnHeader as Je, getColor as we, IRenderManagerService as Qe, IRenderingEngine as et } from "@univerjs/engine-render";
|
|
6
|
+
import { Inject as A, Injector as se } from "@wendellhu/redi";
|
|
7
|
+
import { takeUntil as Se } from "rxjs";
|
|
8
8
|
const Yt = {}, tt = {};
|
|
9
|
-
class
|
|
9
|
+
class B {
|
|
10
10
|
constructor() {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
p(this, "zIndex", 0);
|
|
12
|
+
p(this, "viewKey", null);
|
|
13
13
|
}
|
|
14
14
|
check(e) {
|
|
15
15
|
if (e === this.viewKey)
|
|
@@ -20,18 +20,18 @@ class F {
|
|
|
20
20
|
create(e) {
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const $ = Ce.create();
|
|
24
24
|
var rt = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, it = (a, e, r, n) => {
|
|
25
25
|
for (var t = n > 1 ? void 0 : n ? nt(e, r) : e, s = a.length - 1, i; s >= 0; s--)
|
|
26
26
|
(i = a[s]) && (t = (n ? i(e, r, t) : i(t)) || t);
|
|
27
27
|
return n && t && rt(e, r, t), t;
|
|
28
28
|
}, st = (a, e) => (r, n) => e(r, n, a);
|
|
29
|
-
let
|
|
29
|
+
let le = class extends B {
|
|
30
30
|
constructor(e) {
|
|
31
31
|
super();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
p(this, "zIndex", 5);
|
|
33
|
+
p(this, "viewKey", F.DOCUMENT);
|
|
34
|
+
p(this, "_liquid", new Ye());
|
|
35
35
|
this._localeService = e;
|
|
36
36
|
}
|
|
37
37
|
check(e) {
|
|
@@ -39,7 +39,7 @@ let oe = class extends F {
|
|
|
39
39
|
return this;
|
|
40
40
|
}
|
|
41
41
|
convert(e, r) {
|
|
42
|
-
var
|
|
42
|
+
var k, _e;
|
|
43
43
|
const {
|
|
44
44
|
id: n,
|
|
45
45
|
zIndex: t,
|
|
@@ -48,87 +48,87 @@ let oe = class extends F {
|
|
|
48
48
|
width: c,
|
|
49
49
|
height: o,
|
|
50
50
|
angle: l,
|
|
51
|
-
scaleX:
|
|
51
|
+
scaleX: u,
|
|
52
52
|
scaleY: _,
|
|
53
53
|
skewX: d,
|
|
54
54
|
skewY: g,
|
|
55
55
|
flipX: h,
|
|
56
56
|
flipY: f,
|
|
57
|
-
title:
|
|
58
|
-
description:
|
|
57
|
+
title: R,
|
|
58
|
+
description: y,
|
|
59
59
|
document: T
|
|
60
60
|
} = e;
|
|
61
61
|
if (T == null)
|
|
62
62
|
return;
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
const
|
|
63
|
+
const b = new je(T), w = new Fe(b), I = Be.create(w, this._localeService), S = new Ke("__DocsRender__", I);
|
|
64
|
+
I.calculate();
|
|
65
|
+
const D = new me("__DocsViewer__" + n, {
|
|
66
66
|
top: i,
|
|
67
67
|
left: s,
|
|
68
68
|
width: c,
|
|
69
69
|
height: o,
|
|
70
70
|
zIndex: t,
|
|
71
71
|
angle: l,
|
|
72
|
-
scaleX:
|
|
72
|
+
scaleX: u,
|
|
73
73
|
scaleY: _,
|
|
74
74
|
skewX: d,
|
|
75
75
|
skewY: g,
|
|
76
76
|
flipX: h,
|
|
77
77
|
flipY: f,
|
|
78
78
|
isTransformer: !0
|
|
79
|
-
}), v = new
|
|
79
|
+
}), v = new ie("__DocsScene__" + n, D), P = new X("__DocsViewPort_" + n, v, {
|
|
80
80
|
left: 0,
|
|
81
81
|
top: 0,
|
|
82
82
|
bottom: 0,
|
|
83
83
|
right: 0,
|
|
84
84
|
isWheelPreventDefaultX: !0
|
|
85
85
|
});
|
|
86
|
-
v.attachControl(), v.on(
|
|
87
|
-
const O =
|
|
86
|
+
v.attachControl(), v.on(pe.wheel, (N, W) => {
|
|
87
|
+
const O = N;
|
|
88
88
|
if (O.ctrlKey) {
|
|
89
|
-
const
|
|
90
|
-
let
|
|
91
|
-
|
|
89
|
+
const z = Math.abs(O.deltaX);
|
|
90
|
+
let x = z < 40 ? 0.2 : z < 80 ? 0.4 : 0.2;
|
|
91
|
+
x *= O.deltaY > 0 ? -1 : 1, v.scaleX < 1 && (x /= 2), v.scaleX + x > 4 ? v.scale(4, 4) : v.scaleX + x < 0.1 ? v.scale(0.1, 0.1) : (O.deltaY > 0, O.preventDefault());
|
|
92
92
|
} else
|
|
93
|
-
|
|
94
|
-
}), new ue(
|
|
93
|
+
P.onMouseWheel(O, W);
|
|
94
|
+
}), new ue(P, {
|
|
95
95
|
mainScene: r
|
|
96
96
|
}), v.addObject(S);
|
|
97
|
-
const
|
|
98
|
-
S.resize(
|
|
99
|
-
const
|
|
100
|
-
S.onPageRenderObservable.add((
|
|
101
|
-
const { page:
|
|
102
|
-
|
|
103
|
-
width: (
|
|
104
|
-
height: (
|
|
97
|
+
const m = I.getActualSize();
|
|
98
|
+
S.resize(m.actualWidth, m.actualHeight), v.resize(m.actualWidth, m.actualHeight + 200);
|
|
99
|
+
const E = (k = S.getSkeleton()) == null ? void 0 : k.getPageSize();
|
|
100
|
+
S.onPageRenderObservable.add((N) => {
|
|
101
|
+
const { page: W, pageLeft: O, pageTop: z, ctx: x } = N, { width: q, height: G, marginBottom: ae, marginLeft: j, marginRight: Z, marginTop: J } = W;
|
|
102
|
+
x.save(), x.translate(O - 0.5, z - 0.5), Y.drawWith(x, {
|
|
103
|
+
width: (E == null ? void 0 : E.width) || q,
|
|
104
|
+
height: (E == null ? void 0 : E.height) || G,
|
|
105
105
|
strokeWidth: 1,
|
|
106
106
|
stroke: "rgba(198,198,198, 1)",
|
|
107
107
|
fill: "rgba(255,255,255, 1)",
|
|
108
108
|
zIndex: 3
|
|
109
|
-
}),
|
|
109
|
+
}), x.restore();
|
|
110
110
|
});
|
|
111
|
-
const { left:
|
|
112
|
-
if (
|
|
111
|
+
const { left: H, top: U } = S, L = I.getSkeletonData();
|
|
112
|
+
if (L == null)
|
|
113
113
|
return;
|
|
114
|
-
const { pages:
|
|
115
|
-
this._recalculateSizeBySkeleton(S, v,
|
|
116
|
-
for (let
|
|
117
|
-
const O =
|
|
118
|
-
this._liquid.translatePagePadding(O),
|
|
119
|
-
const { aLeft:
|
|
114
|
+
const { pages: C } = L, V = [], K = /* @__PURE__ */ new Map();
|
|
115
|
+
this._recalculateSizeBySkeleton(S, v, I);
|
|
116
|
+
for (let N = 0, W = C.length; N < W; N++) {
|
|
117
|
+
const O = C[N], { skeDrawings: z, marginLeft: x, marginTop: q, pageWidth: G, pageHeight: ae } = O;
|
|
118
|
+
this._liquid.translatePagePadding(O), z.forEach((j) => {
|
|
119
|
+
const { aLeft: Z, aTop: J, height: De, width: Re, drawingOrigin: Xt } = j, ye = new Te(j.objectId, {
|
|
120
120
|
// url: objectTransform.imageProperties?.contentUrl || '',
|
|
121
|
-
left:
|
|
122
|
-
top:
|
|
123
|
-
width:
|
|
124
|
-
height:
|
|
121
|
+
left: Z + H + this._liquid.x,
|
|
122
|
+
top: J + U + this._liquid.y,
|
|
123
|
+
width: Re,
|
|
124
|
+
height: De,
|
|
125
125
|
zIndex: 11,
|
|
126
126
|
isTransformer: !0
|
|
127
127
|
});
|
|
128
|
-
|
|
128
|
+
K.set(j.objectId, {
|
|
129
129
|
marginLeft: this._liquid.x,
|
|
130
130
|
marginTop: this._liquid.y
|
|
131
|
-
}),
|
|
131
|
+
}), V.push(ye);
|
|
132
132
|
}), this._liquid.translatePage(
|
|
133
133
|
O,
|
|
134
134
|
S.pageLayoutType,
|
|
@@ -136,18 +136,18 @@ let oe = class extends F {
|
|
|
136
136
|
S.pageMarginTop
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
return v.openTransformer(), v.addObjects(
|
|
140
|
-
const { objects:
|
|
141
|
-
|
|
142
|
-
const { oKey:
|
|
143
|
-
|
|
144
|
-
left:
|
|
145
|
-
top:
|
|
146
|
-
height:
|
|
147
|
-
width:
|
|
139
|
+
return v.openTransformer(), v.addObjects(V), (_e = v.getTransformer()) == null || _e.onChangingObservable.add((N) => {
|
|
140
|
+
const { objects: W } = N;
|
|
141
|
+
W.forEach((O) => {
|
|
142
|
+
const { oKey: z, left: x, top: q, height: G, width: ae } = O, j = K.get(z), Z = (j == null ? void 0 : j.marginLeft) || 0, J = (j == null ? void 0 : j.marginTop) || 0;
|
|
143
|
+
I == null || I.getViewModel().getDataModel().updateDrawing(z, {
|
|
144
|
+
left: x - H - Z,
|
|
145
|
+
top: q - U - J,
|
|
146
|
+
height: G,
|
|
147
|
+
width: ae
|
|
148
148
|
});
|
|
149
|
-
}),
|
|
150
|
-
}), v.closeTransformer(), this._calculatePagePosition(S, v,
|
|
149
|
+
}), I == null || I.calculate();
|
|
150
|
+
}), v.closeTransformer(), this._calculatePagePosition(S, v, P), D;
|
|
151
151
|
}
|
|
152
152
|
_recalculateSizeBySkeleton(e, r, n) {
|
|
153
153
|
var c;
|
|
@@ -156,8 +156,8 @@ let oe = class extends F {
|
|
|
156
156
|
return;
|
|
157
157
|
let s = 0, i = 0;
|
|
158
158
|
for (let o = 0, l = t.length; o < l; o++) {
|
|
159
|
-
const
|
|
160
|
-
e.pageLayoutType ===
|
|
159
|
+
const u = t[o], { pageWidth: _, pageHeight: d } = u;
|
|
160
|
+
e.pageLayoutType === ve.VERTICAL ? (i += d, i += e.pageMarginTop, o === l - 1 && (i += e.pageMarginTop), s = Math.max(s, _)) : e.pageLayoutType === ve.HORIZONTAL && (s += _, o !== l - 1 && (s += e.pageMarginLeft), i = Math.max(i, d));
|
|
161
161
|
}
|
|
162
162
|
e.resize(s, i), r.resize(s, i);
|
|
163
163
|
}
|
|
@@ -165,34 +165,34 @@ let oe = class extends F {
|
|
|
165
165
|
const s = r == null ? void 0 : r.getParent(), { width: i, height: c, pageMarginLeft: o, pageMarginTop: l } = e;
|
|
166
166
|
if (s == null || i === Number.POSITIVE_INFINITY || c === Number.POSITIVE_INFINITY)
|
|
167
167
|
return;
|
|
168
|
-
const { width:
|
|
169
|
-
let d = 0, g = 0, h = 0, f = 0,
|
|
170
|
-
if (
|
|
171
|
-
const
|
|
168
|
+
const { width: u, height: _ } = s;
|
|
169
|
+
let d = 0, g = 0, h = 0, f = 0, R = Number.POSITIVE_INFINITY;
|
|
170
|
+
if (u > (i + o * 2) * t ? (d = u / 2 - i * t / 2, d /= t, h = (u - o * 2) / t, R = 0) : (d = o, h = i + o * 2, R = (h - u / t) / 2), _ > c ? (g = _ / 2 - c / 2, f = (_ - l * 2) / t) : (g = l, f = c + l * 2), r.resize(h, f + 200), e.translate(d, g), R !== Number.POSITIVE_INFINITY && n != null) {
|
|
171
|
+
const y = n.getBarScroll(R, 0).x;
|
|
172
172
|
n.scrollTo({
|
|
173
|
-
x:
|
|
173
|
+
x: y
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
return this;
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
|
-
|
|
180
|
-
st(0,
|
|
181
|
-
],
|
|
179
|
+
le = it([
|
|
180
|
+
st(0, A(ne))
|
|
181
|
+
], le);
|
|
182
182
|
class at {
|
|
183
183
|
constructor() {
|
|
184
|
-
|
|
184
|
+
p(this, "zIndex", 5);
|
|
185
185
|
}
|
|
186
186
|
create(e) {
|
|
187
|
-
return e.createInstance(
|
|
187
|
+
return e.createInstance(le);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
class ct extends
|
|
190
|
+
$.add(new at());
|
|
191
|
+
class ct extends B {
|
|
192
192
|
constructor() {
|
|
193
193
|
super(...arguments);
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
p(this, "zIndex", 1);
|
|
195
|
+
p(this, "viewKey", F.IMAGE);
|
|
196
196
|
}
|
|
197
197
|
check(r) {
|
|
198
198
|
if (r === this.viewKey)
|
|
@@ -207,17 +207,17 @@ class ct extends F {
|
|
|
207
207
|
width: c,
|
|
208
208
|
height: o,
|
|
209
209
|
angle: l,
|
|
210
|
-
scaleX:
|
|
210
|
+
scaleX: u,
|
|
211
211
|
scaleY: _,
|
|
212
212
|
skewX: d,
|
|
213
213
|
skewY: g,
|
|
214
214
|
flipX: h,
|
|
215
215
|
flipY: f,
|
|
216
|
-
title:
|
|
217
|
-
description:
|
|
216
|
+
title: R,
|
|
217
|
+
description: y,
|
|
218
218
|
image: T = {}
|
|
219
|
-
} = r, { imageProperties:
|
|
220
|
-
return new
|
|
219
|
+
} = r, { imageProperties: b, placeholder: w, link: I } = T, S = (b == null ? void 0 : b.contentUrl) || "";
|
|
220
|
+
return new Te(n, {
|
|
221
221
|
url: S,
|
|
222
222
|
top: i,
|
|
223
223
|
left: s,
|
|
@@ -225,7 +225,7 @@ class ct extends F {
|
|
|
225
225
|
height: o,
|
|
226
226
|
zIndex: t,
|
|
227
227
|
angle: l,
|
|
228
|
-
scaleX:
|
|
228
|
+
scaleX: u,
|
|
229
229
|
scaleY: _,
|
|
230
230
|
skewX: d,
|
|
231
231
|
skewY: g,
|
|
@@ -238,23 +238,23 @@ class ct extends F {
|
|
|
238
238
|
}
|
|
239
239
|
class ot {
|
|
240
240
|
constructor() {
|
|
241
|
-
|
|
241
|
+
p(this, "zIndex", 4);
|
|
242
242
|
}
|
|
243
243
|
create(e) {
|
|
244
244
|
return e.createInstance(ct);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
|
|
247
|
+
$.add(new ot());
|
|
248
248
|
var lt = Object.defineProperty, dt = Object.getOwnPropertyDescriptor, ht = (a, e, r, n) => {
|
|
249
249
|
for (var t = n > 1 ? void 0 : n ? dt(e, r) : e, s = a.length - 1, i; s >= 0; s--)
|
|
250
250
|
(i = a[s]) && (t = (n ? i(e, r, t) : i(t)) || t);
|
|
251
251
|
return n && t && lt(e, r, t), t;
|
|
252
252
|
}, gt = (a, e) => (r, n) => e(r, n, a);
|
|
253
|
-
let
|
|
253
|
+
let de = class extends B {
|
|
254
254
|
constructor(e) {
|
|
255
255
|
super();
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
p(this, "zIndex", 2);
|
|
257
|
+
p(this, "viewKey", F.TEXT);
|
|
258
258
|
this._localeService = e;
|
|
259
259
|
}
|
|
260
260
|
check(e) {
|
|
@@ -270,24 +270,24 @@ let le = class extends F {
|
|
|
270
270
|
width: c,
|
|
271
271
|
height: o,
|
|
272
272
|
angle: l,
|
|
273
|
-
scaleX:
|
|
273
|
+
scaleX: u,
|
|
274
274
|
scaleY: _,
|
|
275
275
|
skewX: d,
|
|
276
276
|
skewY: g,
|
|
277
277
|
flipX: h,
|
|
278
278
|
flipY: f,
|
|
279
|
-
title:
|
|
280
|
-
description:
|
|
279
|
+
title: R,
|
|
280
|
+
description: y,
|
|
281
281
|
richText: T = {}
|
|
282
|
-
} = e, { text:
|
|
283
|
-
let
|
|
282
|
+
} = e, { text: b, ff: w, fs: I, it: S, bl: D, ul: v, st: P, ol: m, bg: E, bd: H, cl: U, rich: L } = T;
|
|
283
|
+
let C = {
|
|
284
284
|
top: i,
|
|
285
285
|
left: s,
|
|
286
286
|
width: c,
|
|
287
287
|
height: o,
|
|
288
288
|
zIndex: t,
|
|
289
289
|
angle: l,
|
|
290
|
-
scaleX:
|
|
290
|
+
scaleX: u,
|
|
291
291
|
scaleY: _,
|
|
292
292
|
skewX: d,
|
|
293
293
|
skewY: g,
|
|
@@ -295,28 +295,28 @@ let le = class extends F {
|
|
|
295
295
|
flipY: f,
|
|
296
296
|
isTransformer: !0,
|
|
297
297
|
forceRender: !0
|
|
298
|
-
},
|
|
299
|
-
if (
|
|
300
|
-
return new ke(this._localeService, n,
|
|
298
|
+
}, V = !1;
|
|
299
|
+
if (b != null ? (C = { ...C, text: b, ff: w, fs: I, it: S, bl: D, ul: v, st: P, ol: m, bg: E, bd: H, cl: U }, V = !0) : L != null && (C = { ...C, richText: L }, V = !0), V !== !1)
|
|
300
|
+
return new ke(this._localeService, n, C);
|
|
301
301
|
}
|
|
302
302
|
};
|
|
303
|
-
|
|
304
|
-
gt(0,
|
|
305
|
-
],
|
|
306
|
-
class
|
|
303
|
+
de = ht([
|
|
304
|
+
gt(0, A(ne))
|
|
305
|
+
], de);
|
|
306
|
+
class pt {
|
|
307
307
|
constructor() {
|
|
308
|
-
|
|
308
|
+
p(this, "zIndex", 0);
|
|
309
309
|
}
|
|
310
310
|
create(e) {
|
|
311
|
-
return e.createInstance(
|
|
311
|
+
return e.createInstance(de);
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
|
|
315
|
-
class
|
|
314
|
+
$.add(new pt());
|
|
315
|
+
class ut extends B {
|
|
316
316
|
constructor() {
|
|
317
317
|
super(...arguments);
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
p(this, "zIndex", 2);
|
|
319
|
+
p(this, "viewKey", F.SHAPE);
|
|
320
320
|
}
|
|
321
321
|
check(r) {
|
|
322
322
|
if (r === this.viewKey)
|
|
@@ -331,29 +331,29 @@ class pt extends F {
|
|
|
331
331
|
width: c,
|
|
332
332
|
height: o,
|
|
333
333
|
angle: l,
|
|
334
|
-
scaleX:
|
|
334
|
+
scaleX: u,
|
|
335
335
|
scaleY: _,
|
|
336
336
|
skewX: d,
|
|
337
337
|
skewY: g,
|
|
338
338
|
flipX: h,
|
|
339
339
|
flipY: f,
|
|
340
|
-
title:
|
|
341
|
-
description:
|
|
342
|
-
} = r, { shapeType: T, text:
|
|
340
|
+
title: R,
|
|
341
|
+
description: y
|
|
342
|
+
} = r, { shapeType: T, text: b, shapeProperties: w, placeholder: I, link: S } = r.shape || {}, D = w == null ? "" : te(w.shapeBackgroundFill) || "rgba(255,255,255,1)", v = w == null ? void 0 : w.outline, P = {};
|
|
343
343
|
if (v) {
|
|
344
|
-
const { outlineFill:
|
|
345
|
-
|
|
344
|
+
const { outlineFill: m, weight: E } = v;
|
|
345
|
+
P.strokeWidth = E, P.stroke = te(m) || "rgba(0,0,0,1)";
|
|
346
346
|
}
|
|
347
|
-
if (T ===
|
|
348
|
-
return new
|
|
349
|
-
fill:
|
|
347
|
+
if (T === fe.RECTANGLE)
|
|
348
|
+
return new Y(n, {
|
|
349
|
+
fill: D,
|
|
350
350
|
top: i,
|
|
351
351
|
left: s,
|
|
352
352
|
width: c,
|
|
353
353
|
height: o,
|
|
354
354
|
zIndex: t,
|
|
355
355
|
angle: l,
|
|
356
|
-
scaleX:
|
|
356
|
+
scaleX: u,
|
|
357
357
|
scaleY: _,
|
|
358
358
|
skewX: d,
|
|
359
359
|
skewY: g,
|
|
@@ -361,19 +361,19 @@ class pt extends F {
|
|
|
361
361
|
flipY: f,
|
|
362
362
|
isTransformer: !0,
|
|
363
363
|
forceRender: !0,
|
|
364
|
-
...
|
|
364
|
+
...P
|
|
365
365
|
});
|
|
366
|
-
if (T ===
|
|
367
|
-
const
|
|
368
|
-
return new
|
|
369
|
-
fill:
|
|
366
|
+
if (T === fe.ROUND_RECTANGLE) {
|
|
367
|
+
const m = (w == null ? void 0 : w.radius) || 0;
|
|
368
|
+
return new Y(n, {
|
|
369
|
+
fill: D,
|
|
370
370
|
top: i,
|
|
371
371
|
left: s,
|
|
372
372
|
width: c,
|
|
373
373
|
height: o,
|
|
374
374
|
zIndex: t,
|
|
375
375
|
angle: l,
|
|
376
|
-
scaleX:
|
|
376
|
+
scaleX: u,
|
|
377
377
|
scaleY: _,
|
|
378
378
|
skewX: d,
|
|
379
379
|
skewY: g,
|
|
@@ -381,32 +381,32 @@ class pt extends F {
|
|
|
381
381
|
flipY: f,
|
|
382
382
|
isTransformer: !0,
|
|
383
383
|
forceRender: !0,
|
|
384
|
-
radius:
|
|
385
|
-
...
|
|
384
|
+
radius: m,
|
|
385
|
+
...P
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
class _t {
|
|
391
391
|
constructor() {
|
|
392
|
-
|
|
392
|
+
p(this, "zIndex", 2);
|
|
393
393
|
}
|
|
394
394
|
create(e) {
|
|
395
|
-
return e.createInstance(
|
|
395
|
+
return e.createInstance(ut);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
$.add(new _t());
|
|
399
399
|
var ft = Object.defineProperty, vt = Object.getOwnPropertyDescriptor, wt = (a, e, r, n) => {
|
|
400
400
|
for (var t = n > 1 ? void 0 : n ? vt(e, r) : e, s = a.length - 1, i; s >= 0; s--)
|
|
401
401
|
(i = a[s]) && (t = (n ? i(e, r, t) : i(t)) || t);
|
|
402
402
|
return n && t && ft(e, r, t), t;
|
|
403
403
|
}, St = (a, e) => (r, n) => e(r, n, a);
|
|
404
|
-
let
|
|
404
|
+
let he = class extends B {
|
|
405
405
|
constructor(e) {
|
|
406
406
|
super();
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
407
|
+
p(this, "zIndex", 6);
|
|
408
|
+
p(this, "viewKey", F.SLIDE);
|
|
409
|
+
p(this, "_ObjectProvider", null);
|
|
410
410
|
this._injector = e;
|
|
411
411
|
}
|
|
412
412
|
check(e) {
|
|
@@ -422,26 +422,26 @@ let de = class extends F {
|
|
|
422
422
|
width: c,
|
|
423
423
|
height: o,
|
|
424
424
|
angle: l,
|
|
425
|
-
scaleX:
|
|
425
|
+
scaleX: u,
|
|
426
426
|
scaleY: _,
|
|
427
427
|
skewX: d,
|
|
428
428
|
skewY: g,
|
|
429
429
|
flipX: h,
|
|
430
430
|
flipY: f,
|
|
431
|
-
title:
|
|
432
|
-
description:
|
|
431
|
+
title: R,
|
|
432
|
+
description: y,
|
|
433
433
|
slide: T
|
|
434
434
|
} = e;
|
|
435
435
|
if (T == null)
|
|
436
436
|
return;
|
|
437
|
-
const
|
|
437
|
+
const b = new Me(T), w = new Oe("__SLIDERender__" + n, {
|
|
438
438
|
top: i,
|
|
439
439
|
left: s,
|
|
440
440
|
width: c,
|
|
441
441
|
height: o,
|
|
442
442
|
zIndex: t,
|
|
443
443
|
angle: l,
|
|
444
|
-
scaleX:
|
|
444
|
+
scaleX: u,
|
|
445
445
|
scaleY: _,
|
|
446
446
|
skewX: d,
|
|
447
447
|
skewY: g,
|
|
@@ -451,68 +451,68 @@ let de = class extends F {
|
|
|
451
451
|
forceRender: !0
|
|
452
452
|
});
|
|
453
453
|
w.enableNav(), w.enableSelectedClipElement();
|
|
454
|
-
const
|
|
455
|
-
if (!
|
|
454
|
+
const I = b.getPageOrder(), S = b.getPages();
|
|
455
|
+
if (!I || !S)
|
|
456
456
|
return w;
|
|
457
|
-
this._ObjectProvider = new
|
|
458
|
-
for (let
|
|
459
|
-
const
|
|
460
|
-
w.addPage(this._createScene(
|
|
457
|
+
this._ObjectProvider = new re(this._injector);
|
|
458
|
+
for (let D = 0, v = I.length; D < v; D++) {
|
|
459
|
+
const P = S[I[D]], { id: m } = P;
|
|
460
|
+
w.addPage(this._createScene(m, w, P, r, b));
|
|
461
461
|
}
|
|
462
462
|
return w.activeFirstPage(), w;
|
|
463
463
|
}
|
|
464
464
|
_createScene(e, r, n, t, s) {
|
|
465
465
|
var g;
|
|
466
|
-
const { width: i, height: c } = r, o = new
|
|
466
|
+
const { width: i, height: c } = r, o = new ie(e, r, {
|
|
467
467
|
width: i,
|
|
468
468
|
height: c
|
|
469
469
|
});
|
|
470
|
-
new
|
|
470
|
+
new X(`PageViewer_${e}`, o, {
|
|
471
471
|
left: 0,
|
|
472
472
|
top: 0,
|
|
473
473
|
bottom: 0,
|
|
474
474
|
right: 0
|
|
475
475
|
}).closeClip();
|
|
476
|
-
const { pageElements:
|
|
476
|
+
const { pageElements: u, pageBackgroundFill: _ } = n, d = (g = this._ObjectProvider) == null ? void 0 : g.convertToRenderObjects(u, t);
|
|
477
477
|
return o.openTransformer(), this._addBackgroundRect(o, _, s), o.addObjects(d), o;
|
|
478
478
|
}
|
|
479
479
|
_addBackgroundRect(e, r, n) {
|
|
480
|
-
const t = n.getPageSize(), { width: s = 0, height: i = 0 } = t, c = new
|
|
480
|
+
const t = n.getPageSize(), { width: s = 0, height: i = 0 } = t, c = new Y("canvas", {
|
|
481
481
|
left: 0,
|
|
482
482
|
top: 0,
|
|
483
483
|
width: s,
|
|
484
484
|
height: i,
|
|
485
485
|
strokeWidth: 1,
|
|
486
486
|
stroke: "rgba(198,198,198, 1)",
|
|
487
|
-
fill:
|
|
487
|
+
fill: te(r) || "rgba(255,255,255, 1)",
|
|
488
488
|
zIndex: 0,
|
|
489
489
|
evented: !1
|
|
490
490
|
});
|
|
491
491
|
e.addObject(c, 0);
|
|
492
492
|
}
|
|
493
493
|
};
|
|
494
|
-
|
|
495
|
-
St(0,
|
|
496
|
-
],
|
|
497
|
-
class
|
|
494
|
+
he = wt([
|
|
495
|
+
St(0, A(se))
|
|
496
|
+
], he);
|
|
497
|
+
class It {
|
|
498
498
|
constructor() {
|
|
499
|
-
|
|
499
|
+
p(this, "zIndex", 6);
|
|
500
500
|
}
|
|
501
501
|
create(e) {
|
|
502
|
-
return e.createInstance(
|
|
502
|
+
return e.createInstance(he);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
|
|
506
|
-
var
|
|
507
|
-
for (var t = n > 1 ? void 0 : n ?
|
|
505
|
+
$.add(new It());
|
|
506
|
+
var Pt = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, mt = (a, e, r, n) => {
|
|
507
|
+
for (var t = n > 1 ? void 0 : n ? bt(e, r) : e, s = a.length - 1, i; s >= 0; s--)
|
|
508
508
|
(i = a[s]) && (t = (n ? i(e, r, t) : i(t)) || t);
|
|
509
|
-
return n && t &&
|
|
510
|
-
},
|
|
511
|
-
let
|
|
509
|
+
return n && t && Pt(e, r, t), t;
|
|
510
|
+
}, Ie = (a, e) => (r, n) => e(r, n, a);
|
|
511
|
+
let ge = class extends B {
|
|
512
512
|
constructor(e, r) {
|
|
513
513
|
super();
|
|
514
|
-
|
|
515
|
-
|
|
514
|
+
p(this, "zIndex", 4);
|
|
515
|
+
p(this, "viewKey", F.SPREADSHEET);
|
|
516
516
|
this._localeService = e, this._contextService = r;
|
|
517
517
|
}
|
|
518
518
|
check(e) {
|
|
@@ -528,32 +528,32 @@ let he = class extends F {
|
|
|
528
528
|
width: c,
|
|
529
529
|
height: o,
|
|
530
530
|
angle: l,
|
|
531
|
-
scaleX:
|
|
531
|
+
scaleX: u,
|
|
532
532
|
scaleY: _,
|
|
533
533
|
skewX: d,
|
|
534
534
|
skewY: g,
|
|
535
535
|
flipX: h,
|
|
536
536
|
flipY: f,
|
|
537
|
-
spreadsheet:
|
|
537
|
+
spreadsheet: R
|
|
538
538
|
} = e;
|
|
539
|
-
if (
|
|
539
|
+
if (R == null)
|
|
540
540
|
return;
|
|
541
|
-
const { worksheet:
|
|
542
|
-
new
|
|
541
|
+
const { worksheet: y, styles: T } = R, { cellData: b } = y, w = new Ne(b), I = new ze(T), S = new qe(
|
|
542
|
+
new Ve(n, y, I),
|
|
543
543
|
// FIXME: worksheet in slide doesn't has a Worksheet object
|
|
544
|
-
|
|
544
|
+
y,
|
|
545
545
|
w,
|
|
546
|
-
|
|
546
|
+
I,
|
|
547
547
|
this._localeService,
|
|
548
548
|
this._contextService
|
|
549
|
-
), { rowTotalHeight:
|
|
549
|
+
), { rowTotalHeight: D, columnTotalWidth: v, rowHeaderWidth: P, columnHeaderHeight: m } = S, E = v + y.rowHeader.width || 0, H = D + y.columnHeader.height || 0, U = new me("spreadInSlideSceneViewer" + n, {
|
|
550
550
|
top: i,
|
|
551
551
|
left: s,
|
|
552
552
|
width: c,
|
|
553
553
|
height: o,
|
|
554
554
|
zIndex: t,
|
|
555
555
|
angle: l,
|
|
556
|
-
scaleX:
|
|
556
|
+
scaleX: u,
|
|
557
557
|
scaleY: _,
|
|
558
558
|
skewX: d,
|
|
559
559
|
skewY: g,
|
|
@@ -561,46 +561,46 @@ let he = class extends F {
|
|
|
561
561
|
flipY: f,
|
|
562
562
|
isTransformer: !0,
|
|
563
563
|
forceRender: !0
|
|
564
|
-
}),
|
|
565
|
-
width:
|
|
566
|
-
height:
|
|
564
|
+
}), L = new ie("spreadInSlideScene" + n, U, {
|
|
565
|
+
width: E,
|
|
566
|
+
height: H
|
|
567
567
|
});
|
|
568
|
-
this._updateViewport(n,
|
|
569
|
-
const
|
|
568
|
+
this._updateViewport(n, P, m, L, r);
|
|
569
|
+
const C = new Ge("testSheetViewer", S, !1), V = new Ze("spreadInSlideRow", S), K = new Je("spreadInSlideColumn", S), k = new Y("spreadInSlideLeftTop", {
|
|
570
570
|
zIndex: 2,
|
|
571
571
|
left: -1,
|
|
572
572
|
top: -1,
|
|
573
|
-
width:
|
|
574
|
-
height:
|
|
575
|
-
fill:
|
|
576
|
-
stroke:
|
|
573
|
+
width: P,
|
|
574
|
+
height: m,
|
|
575
|
+
fill: we([248, 249, 250]),
|
|
576
|
+
stroke: we([217, 217, 217]),
|
|
577
577
|
strokeWidth: 1
|
|
578
578
|
});
|
|
579
|
-
return
|
|
579
|
+
return C.zIndex = 10, L.addObjects([C], 1), L.addObjects([V, K, k], 2), U;
|
|
580
580
|
}
|
|
581
581
|
_updateViewport(e, r, n, t, s) {
|
|
582
582
|
if (s == null)
|
|
583
583
|
return;
|
|
584
|
-
const i = r * t.scaleX, c = n * t.scaleY, o = new
|
|
584
|
+
const i = r * t.scaleX, c = n * t.scaleY, o = new X("spreadInSlideViewMain" + e, t, {
|
|
585
585
|
left: i,
|
|
586
586
|
top: c,
|
|
587
587
|
bottom: 0,
|
|
588
588
|
right: 0,
|
|
589
589
|
isWheelPreventDefaultX: !0
|
|
590
|
-
}), l = new
|
|
590
|
+
}), l = new X("spreadInSlideViewTop" + e, t, {
|
|
591
591
|
left: i,
|
|
592
592
|
height: c,
|
|
593
593
|
top: 0,
|
|
594
594
|
right: 0,
|
|
595
595
|
isWheelPreventDefaultX: !0
|
|
596
|
-
}),
|
|
596
|
+
}), u = new X("spreadInSlideViewLeft" + e, t, {
|
|
597
597
|
left: 0,
|
|
598
598
|
bottom: 0,
|
|
599
599
|
top: c,
|
|
600
600
|
width: i,
|
|
601
601
|
isWheelPreventDefaultX: !0
|
|
602
602
|
});
|
|
603
|
-
new
|
|
603
|
+
new X("spreadInSlideViewLeftTop" + e, t, {
|
|
604
604
|
left: 0,
|
|
605
605
|
top: 0,
|
|
606
606
|
width: i,
|
|
@@ -611,13 +611,13 @@ let he = class extends F {
|
|
|
611
611
|
l.updateScroll({
|
|
612
612
|
scrollX: d,
|
|
613
613
|
actualScrollX: h
|
|
614
|
-
}),
|
|
614
|
+
}), u.updateScroll({
|
|
615
615
|
scrollY: g,
|
|
616
616
|
actualScrollY: f
|
|
617
617
|
});
|
|
618
618
|
}), t.attachControl(), new ue(o, {
|
|
619
619
|
mainScene: s
|
|
620
|
-
}), t.on(
|
|
620
|
+
}), t.on(pe.wheel, (_, d) => {
|
|
621
621
|
const g = _;
|
|
622
622
|
if (g.ctrlKey) {
|
|
623
623
|
const h = Math.abs(g.deltaX);
|
|
@@ -628,27 +628,27 @@ let he = class extends F {
|
|
|
628
628
|
});
|
|
629
629
|
}
|
|
630
630
|
};
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
],
|
|
631
|
+
ge = mt([
|
|
632
|
+
Ie(0, A(ne)),
|
|
633
|
+
Ie(1, Le)
|
|
634
|
+
], ge);
|
|
635
635
|
class Tt {
|
|
636
636
|
constructor() {
|
|
637
|
-
|
|
637
|
+
p(this, "zIndex", 4);
|
|
638
638
|
}
|
|
639
639
|
create(e) {
|
|
640
|
-
return e.createInstance(
|
|
640
|
+
return e.createInstance(ge);
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
|
|
644
|
-
var Ot = Object.defineProperty,
|
|
645
|
-
for (var t = n > 1 ? void 0 : n ?
|
|
643
|
+
$.add(new Tt());
|
|
644
|
+
var Ot = Object.defineProperty, Dt = Object.getOwnPropertyDescriptor, Rt = (a, e, r, n) => {
|
|
645
|
+
for (var t = n > 1 ? void 0 : n ? Dt(e, r) : e, s = a.length - 1, i; s >= 0; s--)
|
|
646
646
|
(i = a[s]) && (t = (n ? i(e, r, t) : i(t)) || t);
|
|
647
647
|
return n && t && Ot(e, r, t), t;
|
|
648
|
-
},
|
|
649
|
-
let
|
|
648
|
+
}, yt = (a, e) => (r, n) => e(r, n, a);
|
|
649
|
+
let re = class {
|
|
650
650
|
constructor(a) {
|
|
651
|
-
|
|
651
|
+
p(this, "_adaptors", []);
|
|
652
652
|
this._injector = a, this._adaptorLoader();
|
|
653
653
|
}
|
|
654
654
|
convertToRenderObjects(a, e) {
|
|
@@ -668,40 +668,40 @@ let ee = class {
|
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
_adaptorLoader() {
|
|
671
|
-
|
|
671
|
+
$.getData().sort(Xe).forEach((a) => {
|
|
672
672
|
this._adaptors.push(a.create(this._injector));
|
|
673
673
|
});
|
|
674
674
|
}
|
|
675
675
|
};
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
],
|
|
679
|
-
var
|
|
680
|
-
for (var t = n > 1 ? void 0 : n ?
|
|
676
|
+
re = Rt([
|
|
677
|
+
yt(0, A(se))
|
|
678
|
+
], re);
|
|
679
|
+
var Et = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, Ct = (a, e, r, n) => {
|
|
680
|
+
for (var t = n > 1 ? void 0 : n ? xt(e, r) : e, s = a.length - 1, i; s >= 0; s--)
|
|
681
681
|
(i = a[s]) && (t = (n ? i(e, r, t) : i(t)) || t);
|
|
682
|
-
return n && t &&
|
|
683
|
-
},
|
|
684
|
-
let
|
|
682
|
+
return n && t && Et(e, r, t), t;
|
|
683
|
+
}, ce = (a, e) => (r, n) => e(r, n, a), jt = /* @__PURE__ */ ((a) => (a.COMPONENT = "__slideRender__", a.SCENE = "__mainScene__", a.VIEW = "__mainView__", a))(jt || {});
|
|
684
|
+
let ee = class extends We {
|
|
685
685
|
constructor(e, r, n) {
|
|
686
686
|
super();
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
687
|
+
p(this, "_objectProvider", null);
|
|
688
|
+
p(this, "_activePageId", "");
|
|
689
|
+
p(this, "_refreshThumb", $e(() => {
|
|
690
690
|
this.createThumbs();
|
|
691
691
|
}, 300));
|
|
692
|
-
this.
|
|
692
|
+
this._univerInstanceService = e, this._injector = r, this._renderManagerService = n, this._initializeDependencies(this._injector), this._initialize();
|
|
693
693
|
}
|
|
694
694
|
_initialize() {
|
|
695
|
-
this._renderManagerService.createRender$.pipe(
|
|
695
|
+
this._renderManagerService.createRender$.pipe(Se(this.dispose$)).subscribe((e) => {
|
|
696
696
|
this._create(e);
|
|
697
|
-
}), this.
|
|
697
|
+
}), this._univerInstanceService.getCurrentTypeOfUnit$(M.UNIVER_SLIDE).pipe(Se(this.dispose$)).subscribe((e) => {
|
|
698
698
|
this._create(e == null ? void 0 : e.getUnitId());
|
|
699
|
-
}), this.
|
|
699
|
+
}), this._univerInstanceService.getAllUnitsForType(M.UNIVER_SLIDE).forEach((e) => {
|
|
700
700
|
this._create(e.getUnitId());
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
703
|
activePage(e) {
|
|
704
|
-
const r = this.
|
|
704
|
+
const r = this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SLIDE);
|
|
705
705
|
let n;
|
|
706
706
|
if (e)
|
|
707
707
|
n = r.getPage(e);
|
|
@@ -733,14 +733,14 @@ let J = class extends Ve {
|
|
|
733
733
|
});
|
|
734
734
|
}
|
|
735
735
|
_create(e) {
|
|
736
|
-
e == null || this.
|
|
736
|
+
e == null || this._univerInstanceService.getUnit(e, M.UNIVER_SLIDE) == null || this._renderManagerService.has(e) || this._addNewRender(e);
|
|
737
737
|
}
|
|
738
738
|
_currentRender() {
|
|
739
|
-
const e = this.
|
|
739
|
+
const e = this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SLIDE);
|
|
740
740
|
return this._renderManagerService.getRenderById(e.getUnitId());
|
|
741
741
|
}
|
|
742
742
|
_addNewRender(e) {
|
|
743
|
-
const r = this.
|
|
743
|
+
const r = this._univerInstanceService.getUnit(e, M.UNIVER_SLIDE);
|
|
744
744
|
if (r == null)
|
|
745
745
|
return;
|
|
746
746
|
const n = r.getContainer(), t = r.getParentRenderUnitId();
|
|
@@ -758,15 +758,15 @@ let J = class extends Ve {
|
|
|
758
758
|
this.createThumbs();
|
|
759
759
|
}, 300);
|
|
760
760
|
}), i.resize(2400, 1800);
|
|
761
|
-
const o = new
|
|
761
|
+
const o = new X("__mainView__", i, {
|
|
762
762
|
left: 0,
|
|
763
763
|
top: 0,
|
|
764
764
|
bottom: 0,
|
|
765
765
|
right: 0,
|
|
766
766
|
isWheelPreventDefaultX: !0
|
|
767
767
|
});
|
|
768
|
-
i.attachControl(), i.on(
|
|
769
|
-
const d =
|
|
768
|
+
i.attachControl(), i.on(pe.wheel, (u, _) => {
|
|
769
|
+
const d = u;
|
|
770
770
|
if (d.ctrlKey) {
|
|
771
771
|
const g = Math.abs(d.deltaX);
|
|
772
772
|
let h = g < 40 ? 0.2 : g < 80 ? 0.4 : 0.2;
|
|
@@ -779,12 +779,12 @@ let J = class extends Ve {
|
|
|
779
779
|
const l = this._createSlide(i);
|
|
780
780
|
s.mainComponent = l, s.components.set("__slideRender__", l), this._createSlidePages(r, l), c.runRenderLoop(() => {
|
|
781
781
|
i.render();
|
|
782
|
-
const
|
|
783
|
-
|
|
782
|
+
const u = document.getElementById("app");
|
|
783
|
+
u && (u.innerText = `fps:${Math.round(c.getFps()).toString()}`);
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
786
|
_createSlide(e) {
|
|
787
|
-
const r = this.
|
|
787
|
+
const r = this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SLIDE), { width: n, height: t } = e, s = r.getPageSize(), { width: i = 100, height: c = 100 } = s, o = new Oe("__slideRender__", {
|
|
788
788
|
left: (n - i) / 2,
|
|
789
789
|
top: (t - c) / 2,
|
|
790
790
|
width: i,
|
|
@@ -794,14 +794,14 @@ let J = class extends Ve {
|
|
|
794
794
|
return o.enableNav(), o.enableSelectedClipElement(), e.addObject(o), o;
|
|
795
795
|
}
|
|
796
796
|
_addBackgroundRect(e, r) {
|
|
797
|
-
const t = this.
|
|
797
|
+
const t = this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SLIDE).getPageSize(), { width: s = 0, height: i = 0 } = t, c = new Y("canvas", {
|
|
798
798
|
left: 0,
|
|
799
799
|
top: 0,
|
|
800
800
|
width: s,
|
|
801
801
|
height: i,
|
|
802
802
|
strokeWidth: 1,
|
|
803
803
|
stroke: "rgba(198,198,198, 1)",
|
|
804
|
-
fill:
|
|
804
|
+
fill: te(r) || "rgba(255,255,255, 1)",
|
|
805
805
|
zIndex: 0,
|
|
806
806
|
evented: !1
|
|
807
807
|
});
|
|
@@ -837,7 +837,7 @@ let J = class extends Ve {
|
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
createThumbs() {
|
|
840
|
-
const r = this.
|
|
840
|
+
const r = this._univerInstanceService.getCurrentUnitForType(M.UNIVER_SLIDE).getPageOrder(), n = this._currentRender();
|
|
841
841
|
if (!(!r || !n) && r.length !== 0)
|
|
842
842
|
for (let t = 0, s = r.length; t < s; t++) {
|
|
843
843
|
const i = r[t];
|
|
@@ -851,11 +851,11 @@ let J = class extends Ve {
|
|
|
851
851
|
const n = this._currentRender();
|
|
852
852
|
if (!n || !this._objectProvider)
|
|
853
853
|
return;
|
|
854
|
-
const { scene: t, mainComponent: s } = n, i = s, { width: c, height: o } = i, l = new
|
|
854
|
+
const { scene: t, mainComponent: s } = n, i = s, { width: c, height: o } = i, l = new ie(e, i, {
|
|
855
855
|
width: c,
|
|
856
856
|
height: o
|
|
857
857
|
});
|
|
858
|
-
new
|
|
858
|
+
new X(`PageViewer_${e}`, l, {
|
|
859
859
|
left: 0,
|
|
860
860
|
top: 0,
|
|
861
861
|
bottom: 0,
|
|
@@ -873,29 +873,29 @@ let J = class extends Ve {
|
|
|
873
873
|
}), i.addPage(l), l;
|
|
874
874
|
}
|
|
875
875
|
_initializeDependencies(e) {
|
|
876
|
-
this._objectProvider = e.createInstance(
|
|
876
|
+
this._objectProvider = e.createInstance(re);
|
|
877
877
|
}
|
|
878
878
|
};
|
|
879
|
-
|
|
880
|
-
Ue
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
],
|
|
885
|
-
var
|
|
886
|
-
for (var t = n > 1 ? void 0 : n ?
|
|
879
|
+
ee = Ct([
|
|
880
|
+
Ae(Ue.Ready, ee),
|
|
881
|
+
ce(0, be),
|
|
882
|
+
ce(1, A(se)),
|
|
883
|
+
ce(2, Qe)
|
|
884
|
+
], ee);
|
|
885
|
+
var Mt = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, Nt = (a, e, r, n) => {
|
|
886
|
+
for (var t = n > 1 ? void 0 : n ? Lt(e, r) : e, s = a.length - 1, i; s >= 0; s--)
|
|
887
887
|
(i = a[s]) && (t = (n ? i(e, r, t) : i(t)) || t);
|
|
888
|
-
return n && t &&
|
|
889
|
-
},
|
|
890
|
-
const
|
|
891
|
-
var
|
|
892
|
-
let Pe = (
|
|
888
|
+
return n && t && Mt(e, r, t), t;
|
|
889
|
+
}, oe = (a, e) => (r, n) => e(r, n, a);
|
|
890
|
+
const zt = {}, Vt = "slides";
|
|
891
|
+
var Q;
|
|
892
|
+
let Pe = (Q = class extends He {
|
|
893
893
|
constructor(e = {}, r, n, t) {
|
|
894
|
-
super(
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
this.
|
|
894
|
+
super();
|
|
895
|
+
p(this, "_config");
|
|
896
|
+
p(this, "_canvasEngine", null);
|
|
897
|
+
p(this, "_canvasView", null);
|
|
898
|
+
this._univerInstanceService = r, this._localeService = n, this._injector = t, this._config = Object.assign(zt, e), this._initializeDependencies(this._injector);
|
|
899
899
|
}
|
|
900
900
|
initialize() {
|
|
901
901
|
this._localeService.load({
|
|
@@ -911,9 +911,6 @@ let Pe = (ce = class extends $e {
|
|
|
911
911
|
onRendered() {
|
|
912
912
|
this.initialize();
|
|
913
913
|
}
|
|
914
|
-
onDestroy() {
|
|
915
|
-
super.onDestroy();
|
|
916
|
-
}
|
|
917
914
|
getCanvasEngine() {
|
|
918
915
|
return this._canvasEngine;
|
|
919
916
|
}
|
|
@@ -921,19 +918,19 @@ let Pe = (ce = class extends $e {
|
|
|
921
918
|
return this._canvasView;
|
|
922
919
|
}
|
|
923
920
|
_initializeDependencies(e) {
|
|
924
|
-
[[
|
|
921
|
+
[[ee]].forEach((n) => {
|
|
925
922
|
e.add(n);
|
|
926
923
|
});
|
|
927
924
|
}
|
|
928
|
-
},
|
|
929
|
-
Pe =
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
925
|
+
}, p(Q, "pluginName", Vt), p(Q, "type", M.UNIVER_SLIDE), Q);
|
|
926
|
+
Pe = Nt([
|
|
927
|
+
oe(1, be),
|
|
928
|
+
oe(2, A(ne)),
|
|
929
|
+
oe(3, A(se))
|
|
933
930
|
], Pe);
|
|
934
931
|
export {
|
|
935
|
-
|
|
936
|
-
|
|
932
|
+
ee as CanvasView,
|
|
933
|
+
jt as SLIDE_KEY,
|
|
937
934
|
Pe as UniverSlidesPlugin,
|
|
938
935
|
Yt as enUS,
|
|
939
936
|
tt as zhCN
|