@stll/folio-vue 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ListButtons-CDkmhg3v.js → ListButtons-BaILr4AO.js} +79 -79
- package/dist/{ListButtons-3UeVXRAK.cjs → ListButtons-CC7_7-e3.cjs} +2 -2
- package/dist/{PageSetupDialog-Djs8aW5A.js → WatermarkDialog-D-uTab0-.js} +2092 -818
- package/dist/WatermarkDialog-SzyoSZmL.cjs +15 -0
- package/dist/components/DocxEditor/types.d.ts +2 -0
- package/dist/components/dialogs/index.d.ts +13 -9
- package/dist/composables/useDocxEditor.d.ts +2 -0
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +1 -1
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +5 -3
- package/dist/folio-vue.css +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1118 -1114
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +6 -2
- package/dist/ui.js +58 -59
- package/dist/useZoom-8M2AQIMJ.cjs +1 -0
- package/dist/{useZoom-CIIRid8U.js → useZoom-BR--m9w3.js} +140 -140
- package/package.json +1 -1
- package/dist/PageSetupDialog-GGWMpoe-.cjs +0 -15
- package/dist/TablePropertiesDialog-B399kZgL.js +0 -901
- package/dist/TablePropertiesDialog-DYbjwevC.cjs +0 -1
- package/dist/useZoom-BryUw3Cu.cjs +0 -1
|
@@ -11,18 +11,18 @@ import { browserClock as re, createLayoutScheduler as ie } from "@stll/folio-cor
|
|
|
11
11
|
import { createLayoutSession as ae } from "@stll/folio-core/controller/layoutSession";
|
|
12
12
|
import { parseDocx as oe } from "@stll/folio-core/docx/parser";
|
|
13
13
|
import { getFootnoteText as _ } from "@stll/folio-core/docx/footnoteParser";
|
|
14
|
-
import { convertHeaderFooterPmDocToContent as
|
|
15
|
-
import { LayoutPainter as
|
|
16
|
-
import { LayoutSelectionGate as
|
|
17
|
-
import { getTransactionDirtyRange as
|
|
18
|
-
import { fromProseDoc as
|
|
19
|
-
import { ExtensionManager as
|
|
20
|
-
import { getChangedParagraphIds as
|
|
21
|
-
import { createStarterKit as
|
|
22
|
-
import { createTemplatePreviewValuesPlugin as
|
|
23
|
-
import { templateSlashMenuPlugin as
|
|
24
|
-
import { findVerticalScrollParent as
|
|
25
|
-
import { MIN_CELL_WIDTH_TWIPS as
|
|
14
|
+
import { convertHeaderFooterPmDocToContent as se, convertHeaderFooterToContent as ce } from "@stll/folio-core/layout-bridge/convert/headerFooterLayout";
|
|
15
|
+
import { LayoutPainter as le } from "@stll/folio-core/layout-painter";
|
|
16
|
+
import { LayoutSelectionGate as ue } from "@stll/folio-core/paged-layout/LayoutSelectionGate";
|
|
17
|
+
import { getTransactionDirtyRange as de } from "@stll/folio-core/paged-layout/transactionDirtyRange";
|
|
18
|
+
import { fromProseDoc as v } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
|
|
19
|
+
import { ExtensionManager as fe } from "@stll/folio-core/prosemirror/extensions/ExtensionManager";
|
|
20
|
+
import { getChangedParagraphIds as pe, hasStructuralChanges as me, hasUntrackedChanges as he } from "@stll/folio-core/prosemirror/extensions/features/ParagraphChangeTrackerExtension";
|
|
21
|
+
import { createStarterKit as ge } from "@stll/folio-core/prosemirror/extensions/StarterKit";
|
|
22
|
+
import { createTemplatePreviewValuesPlugin as _e } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
|
|
23
|
+
import { templateSlashMenuPlugin as ve } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
|
|
24
|
+
import { findVerticalScrollParent as y } from "@stll/folio-core/utils/findVerticalScrollParent";
|
|
25
|
+
import { MIN_CELL_WIDTH_TWIPS as b, MIN_ROW_HEIGHT_TWIPS as ye, TWIPS_PER_PIXEL as x, commitColumnResize as be, commitRightEdgeResize as S, commitRowResize as C, readColumnWidthAt as w, readColumnWidths as T, readRowHeight as xe } from "@stll/folio-core/prosemirror/tableResize";
|
|
26
26
|
import { extractTrackedChanges as E } from "@stll/folio-core/prosemirror/utils/extractTrackedChanges";
|
|
27
27
|
//#region src/composables/useDocxEditor.ts
|
|
28
28
|
var Se = 24, Ce = 32, we = 96, Te = 250, Ee = [];
|
|
@@ -92,7 +92,7 @@ function k(e, t, n, r, i, a) {
|
|
|
92
92
|
...a,
|
|
93
93
|
rId: t
|
|
94
94
|
} : a, s = t ? n?.getView(t) : null;
|
|
95
|
-
return s ?
|
|
95
|
+
return s ? se(s.state.doc, r, i, o) : ce(e, r, i, o);
|
|
96
96
|
}
|
|
97
97
|
function Ae(e, t, n, r, i) {
|
|
98
98
|
if (!e || e.size === 0) return;
|
|
@@ -160,38 +160,38 @@ function Ne() {
|
|
|
160
160
|
return typeof document > "u" || !("fonts" in document) ? !0 : document.fonts.status === "loaded";
|
|
161
161
|
}
|
|
162
162
|
function j(e) {
|
|
163
|
-
let { hiddenContainer: t, pagesContainer: n, readOnly: u = !1, pageGap: _ = Se, documentKey:
|
|
164
|
-
|
|
165
|
-
let
|
|
166
|
-
onChange: (e) =>
|
|
167
|
-
onKeyAction: (e) =>
|
|
168
|
-
}),
|
|
169
|
-
function
|
|
163
|
+
let { hiddenContainer: t, pagesContainer: n, readOnly: u = !1, pageGap: _ = Se, documentKey: se, password: ce, editorMode: y, author: b, externalPlugins: ye = [], onAnonymizationMatchesChange: x, showTemplateDirectives: be, onSlashMenuChange: S, onSlashMenuKeyAction: C, onChange: w, onError: T, onSelectionUpdate: xe, onEditorViewReady: E, onReadOnlyEditAttempt: D, featureFlags: O, onSelectiveSaveTripwire: A } = e, j = a(null), M = a(null), N = a(null), P = a(null), F = a([]), I = a([]), L = i(!1), R = i(null), z = i(!1), B = new fe(ge());
|
|
164
|
+
B.buildSchema(), B.initializeRuntime();
|
|
165
|
+
let V = p(!1), H = d({ onMatchesChange: (e) => x?.(e) }), U = f(), W = ve({
|
|
166
|
+
onChange: (e) => S?.(e),
|
|
167
|
+
onKeyAction: (e) => C?.(e) ?? !1
|
|
168
|
+
}), G = _e(), K = () => o(be) === !0;
|
|
169
|
+
function q() {
|
|
170
170
|
return [
|
|
171
|
-
B,
|
|
172
|
-
...S,
|
|
173
171
|
V,
|
|
174
|
-
...
|
|
175
|
-
|
|
172
|
+
...ye,
|
|
173
|
+
H,
|
|
174
|
+
...K() ? [U, W] : [],
|
|
175
|
+
G
|
|
176
176
|
];
|
|
177
177
|
}
|
|
178
|
-
let
|
|
178
|
+
let J = ee(), Y = new ue(), Pe = ae(), Fe = new le({
|
|
179
179
|
pageGap: _,
|
|
180
180
|
showShadow: !0
|
|
181
181
|
});
|
|
182
|
-
function
|
|
183
|
-
e.layout && (
|
|
182
|
+
function Ie(e) {
|
|
183
|
+
e.layout && (P.value = e.layout), e.blocks && (F.value = e.blocks), e.measures && (I.value = e.measures), e.blockLookup && Fe.setBlockLookup(e.blockLookup), e.layout && J.emit("layoutComplete", e.layout);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
let r = n.value, i = r instanceof HTMLDivElement ? r : null, a =
|
|
185
|
+
function X(e, t = {}) {
|
|
186
|
+
let r = n.value, i = r instanceof HTMLDivElement ? r : null, a = j.value, o = a?.package.document, s = o?.sections?.[0]?.properties ?? o?.finalSectionProperties ?? null, u = l(s), d = c(s), f = De(s), p = u.w - d.left - d.right, m = a?.package.styles ?? null, h = a?.package.theme ?? null, ee = a?.package.settings?.defaultTabStop, g = ke(a, s);
|
|
187
187
|
try {
|
|
188
|
-
|
|
188
|
+
Ie(ne({
|
|
189
189
|
contentWidth: p,
|
|
190
190
|
columns: f,
|
|
191
191
|
pageSize: u,
|
|
192
192
|
margins: d,
|
|
193
193
|
pageGap: _,
|
|
194
|
-
syncCoordinator:
|
|
194
|
+
syncCoordinator: Y,
|
|
195
195
|
headerContent: g.header.hf,
|
|
196
196
|
footerContent: g.footer.hf,
|
|
197
197
|
firstPageHeaderContent: g.firstHeader.hf,
|
|
@@ -206,11 +206,11 @@ function j(e) {
|
|
|
206
206
|
document: a,
|
|
207
207
|
defaultTabStop: ee,
|
|
208
208
|
styles: m,
|
|
209
|
-
layout:
|
|
209
|
+
layout: P.value,
|
|
210
210
|
hfPMs: null,
|
|
211
|
-
painter:
|
|
211
|
+
painter: Fe,
|
|
212
212
|
pagesContainer: i,
|
|
213
|
-
session:
|
|
213
|
+
session: Pe,
|
|
214
214
|
renderHfFromContentOrPm: k,
|
|
215
215
|
renderHeaderFooterContentByRId: Ae,
|
|
216
216
|
documentFontsAreLoaded: Ne,
|
|
@@ -220,139 +220,139 @@ function j(e) {
|
|
|
220
220
|
}, e, t));
|
|
221
221
|
} catch (e) {
|
|
222
222
|
let t = e instanceof Error ? e : Error(String(e));
|
|
223
|
-
|
|
223
|
+
T?.(t);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
let
|
|
227
|
-
runLayout: (e, t) =>
|
|
226
|
+
let Z = ie({
|
|
227
|
+
runLayout: (e, t) => X(e, t),
|
|
228
228
|
debounceMs: Ce,
|
|
229
229
|
maxDelayMs: we,
|
|
230
230
|
clock: re
|
|
231
|
-
}),
|
|
232
|
-
function
|
|
233
|
-
|
|
234
|
-
let e =
|
|
231
|
+
}), Q = null;
|
|
232
|
+
function Le() {
|
|
233
|
+
Q !== null && (window.clearTimeout(Q), Q = null);
|
|
234
|
+
let e = M.value, t = j.value;
|
|
235
235
|
if (!(!e || !t)) try {
|
|
236
|
-
let n =
|
|
237
|
-
|
|
236
|
+
let n = v(e.state.doc, t);
|
|
237
|
+
j.value = n, w?.(n), J.emit("docChange", n);
|
|
238
238
|
} catch (e) {
|
|
239
|
-
|
|
239
|
+
T?.(e instanceof Error ? e : Error(String(e)));
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
function Re() {
|
|
243
|
+
Q !== null && window.clearTimeout(Q), Q = window.setTimeout(() => {
|
|
244
|
+
Q = null, Le();
|
|
245
245
|
}, Te);
|
|
246
246
|
}
|
|
247
|
-
let
|
|
247
|
+
let $ = g({
|
|
248
248
|
getHost: () => t.value,
|
|
249
|
-
getDocument: () =>
|
|
250
|
-
getStyles: () =>
|
|
251
|
-
getExtensionManager: () =>
|
|
252
|
-
getExternalPlugins:
|
|
249
|
+
getDocument: () => j.value,
|
|
250
|
+
getStyles: () => j.value?.package.styles ?? null,
|
|
251
|
+
getExtensionManager: () => B,
|
|
252
|
+
getExternalPlugins: q,
|
|
253
253
|
getCollaboration: () => void 0,
|
|
254
254
|
getCollaborationModules: () => null,
|
|
255
255
|
getPrecomputedInitialState: () => null,
|
|
256
256
|
getReadOnly: () => o(u),
|
|
257
|
-
getDocumentKey: () => o(
|
|
258
|
-
getDocumentContext: () =>
|
|
259
|
-
onTransaction:
|
|
257
|
+
getDocumentKey: () => o(se),
|
|
258
|
+
getDocumentContext: () => j.value,
|
|
259
|
+
onTransaction: ze,
|
|
260
260
|
onSelectionChange: (e) => {
|
|
261
|
-
|
|
261
|
+
N.value = e, xe?.(e), J.emit("selectionChange", {
|
|
262
262
|
from: e.selection.from,
|
|
263
263
|
to: e.selection.to
|
|
264
264
|
});
|
|
265
265
|
},
|
|
266
266
|
onKeyDown: () => !1,
|
|
267
|
-
onReadOnlyEditAttempt: () =>
|
|
268
|
-
onEditorViewReady:
|
|
267
|
+
onReadOnlyEditAttempt: () => D?.(),
|
|
268
|
+
onEditorViewReady: Be,
|
|
269
269
|
onEditorViewDestroy: () => {
|
|
270
|
-
|
|
270
|
+
M.value = null, L.value = !1, E?.(null);
|
|
271
271
|
},
|
|
272
272
|
onRemoteSelectionsChange: () => {}
|
|
273
273
|
});
|
|
274
|
-
function
|
|
275
|
-
|
|
274
|
+
function ze(e, t) {
|
|
275
|
+
N.value = t, e.docChanged && (z.value = !0, Y.incrementStateSeq(), Z.schedule(t, de(e)), Re()), Y.requestRender();
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
function Be(e) {
|
|
278
|
+
M.value = e, N.value = e.state, L.value = !0, X(e.state, { reason: "initial" }), Y.requestRender(), He(e), E?.(e), o(u) || requestAnimationFrame(() => {
|
|
279
|
+
M.value === e && e.focus();
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
|
-
let
|
|
283
|
-
getEditorApi: () =>
|
|
284
|
-
getLayout: () =>
|
|
285
|
-
runLayout: (e, t) =>
|
|
286
|
-
emitter:
|
|
282
|
+
let Ve = h({
|
|
283
|
+
getEditorApi: () => $.api,
|
|
284
|
+
getLayout: () => P.value,
|
|
285
|
+
runLayout: (e, t) => X(e, t),
|
|
286
|
+
emitter: J
|
|
287
287
|
});
|
|
288
|
-
function
|
|
289
|
-
m(o(y) === "suggesting", e.state, e.dispatch, o(
|
|
288
|
+
function He(e) {
|
|
289
|
+
m(o(y) === "suggesting", e.state, e.dispatch, o(b));
|
|
290
290
|
}
|
|
291
|
-
s([() => o(y), () => o(
|
|
292
|
-
let e =
|
|
293
|
-
e &&
|
|
294
|
-
}), s(() => o(u), () =>
|
|
295
|
-
function
|
|
296
|
-
let t =
|
|
297
|
-
if (t === e.state.plugins.includes(
|
|
298
|
-
let n = e.state.plugins.filter((e) => e !==
|
|
291
|
+
s([() => o(y), () => o(b)], () => {
|
|
292
|
+
let e = M.value;
|
|
293
|
+
e && He(e);
|
|
294
|
+
}), s(() => o(u), () => $.syncEditable());
|
|
295
|
+
function Ue(e) {
|
|
296
|
+
let t = K();
|
|
297
|
+
if (t === e.state.plugins.includes(U)) return;
|
|
298
|
+
let n = e.state.plugins.filter((e) => e !== U && e !== W);
|
|
299
299
|
if (t) {
|
|
300
|
-
let e = n.indexOf(
|
|
301
|
-
n.splice(t, 0,
|
|
300
|
+
let e = n.indexOf(G), t = e === -1 ? n.length : e;
|
|
301
|
+
n.splice(t, 0, U, W);
|
|
302
302
|
}
|
|
303
303
|
e.updateState(e.state.reconfigure({ plugins: n }));
|
|
304
304
|
}
|
|
305
|
-
s(() =>
|
|
306
|
-
let e =
|
|
307
|
-
e &&
|
|
305
|
+
s(() => K(), () => {
|
|
306
|
+
let e = M.value;
|
|
307
|
+
e && Ue(e);
|
|
308
308
|
});
|
|
309
|
-
function
|
|
310
|
-
|
|
309
|
+
function We() {
|
|
310
|
+
$.ensureView();
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
|
|
312
|
+
function Ge() {
|
|
313
|
+
z.value = !1, Z.dispose(), $.destroyView(), $.ensureView(), $.getView() || Ke();
|
|
314
314
|
}
|
|
315
315
|
function Ke() {
|
|
316
|
-
let e =
|
|
316
|
+
let e = j.value;
|
|
317
317
|
if (e) try {
|
|
318
318
|
let t = te({
|
|
319
319
|
document: e,
|
|
320
320
|
styles: e.package.styles ?? null,
|
|
321
|
-
manager:
|
|
322
|
-
externalPlugins:
|
|
321
|
+
manager: B,
|
|
322
|
+
externalPlugins: q(),
|
|
323
323
|
collaborationModules: null,
|
|
324
324
|
reason: "mount"
|
|
325
325
|
});
|
|
326
|
-
|
|
326
|
+
N.value = t, X(t, { reason: "initial" });
|
|
327
327
|
} catch (e) {
|
|
328
|
-
|
|
328
|
+
T?.(e instanceof Error ? e : Error(String(e)));
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
s([t, n], () => {
|
|
332
|
-
t.value &&
|
|
332
|
+
t.value && j.value && !$.getView() && We();
|
|
333
333
|
}, { flush: "post" });
|
|
334
334
|
async function qe(e) {
|
|
335
|
-
|
|
335
|
+
R.value = null, L.value = !1;
|
|
336
336
|
try {
|
|
337
|
-
|
|
337
|
+
j.value = await oe(e, { password: o(ce) }), Ge();
|
|
338
338
|
} catch (e) {
|
|
339
339
|
let t = e instanceof Error ? e : Error(String(e));
|
|
340
|
-
|
|
340
|
+
R.value = t.message, T?.(t);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
function Je(e) {
|
|
344
|
-
|
|
344
|
+
R.value = null, j.value = e, Ge();
|
|
345
345
|
}
|
|
346
346
|
async function Ye(e) {
|
|
347
|
-
let t =
|
|
347
|
+
let t = M.value, n = j.value;
|
|
348
348
|
if (!t || !n) return null;
|
|
349
|
-
let r = t.state, { resolveSelectiveSaveFlags: i } = await import("@stll/folio-core/docx/selectiveSaveFlags"), a = i(o(
|
|
349
|
+
let r = t.state, { resolveSelectiveSaveFlags: i } = await import("@stll/folio-core/docx/selectiveSaveFlags"), a = i(o(O)), s = v(r.doc, n), c = s.originalBuffer ?? null, l = a.selectiveSave && e?.selective !== !1, u = l || a.selectiveSaveTripwire, { repackDocx: d, createDocx: f } = await import("@stll/folio-core/docx/rezip"), p = null;
|
|
350
350
|
if (u && c) {
|
|
351
351
|
let { attemptSelectiveSave: e } = await import("@stll/folio-core/docx/selectiveSave");
|
|
352
352
|
p = await e(s, c, {
|
|
353
|
-
changedParaIds:
|
|
354
|
-
structuralChange:
|
|
355
|
-
hasUntrackedChanges:
|
|
353
|
+
changedParaIds: pe(r),
|
|
354
|
+
structuralChange: me(r),
|
|
355
|
+
hasUntrackedChanges: he(r),
|
|
356
356
|
maxBytes: a.selectiveSaveMaxBytes
|
|
357
357
|
});
|
|
358
358
|
}
|
|
@@ -361,41 +361,41 @@ function j(e) {
|
|
|
361
361
|
else if (a.selectiveSaveTripwire) try {
|
|
362
362
|
h = await d(s);
|
|
363
363
|
} catch {}
|
|
364
|
-
if (a.selectiveSaveTripwire && h &&
|
|
364
|
+
if (a.selectiveSaveTripwire && h && A) try {
|
|
365
365
|
let { compareSelectiveVsFull: e } = await import("@stll/folio-core/docx/selectiveSaveTripwire");
|
|
366
|
-
|
|
366
|
+
A(await e(p, h));
|
|
367
367
|
} catch {}
|
|
368
|
-
return
|
|
368
|
+
return z.value = !1, new Blob([m], { type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" });
|
|
369
369
|
}
|
|
370
370
|
function Xe() {
|
|
371
|
-
return
|
|
371
|
+
return j.value;
|
|
372
372
|
}
|
|
373
373
|
function Ze(e) {
|
|
374
|
-
|
|
374
|
+
j.value = e;
|
|
375
375
|
}
|
|
376
376
|
function Qe() {
|
|
377
|
-
return
|
|
377
|
+
return B.getCommands();
|
|
378
378
|
}
|
|
379
379
|
function $e() {
|
|
380
|
-
|
|
380
|
+
M.value?.focus();
|
|
381
381
|
}
|
|
382
382
|
function et() {
|
|
383
|
-
let e =
|
|
384
|
-
e &&
|
|
385
|
-
}
|
|
386
|
-
function
|
|
387
|
-
|
|
388
|
-
}
|
|
389
|
-
return r(
|
|
390
|
-
editor:
|
|
391
|
-
editorView:
|
|
392
|
-
editorState:
|
|
393
|
-
isReady:
|
|
394
|
-
isDirty:
|
|
395
|
-
parseError:
|
|
396
|
-
layout:
|
|
397
|
-
blocks:
|
|
398
|
-
measures:
|
|
383
|
+
let e = M.value;
|
|
384
|
+
e && X(e.state, { reason: "manual" });
|
|
385
|
+
}
|
|
386
|
+
function tt() {
|
|
387
|
+
Z.dispose(), Q !== null && (window.clearTimeout(Q), Q = null), $.destroyView(), B.destroy(), N.value = null, P.value = null, j.value = null, L.value = !1;
|
|
388
|
+
}
|
|
389
|
+
return r(tt), {
|
|
390
|
+
editor: Ve,
|
|
391
|
+
editorView: M,
|
|
392
|
+
editorState: N,
|
|
393
|
+
isReady: L,
|
|
394
|
+
isDirty: z,
|
|
395
|
+
parseError: R,
|
|
396
|
+
layout: P,
|
|
397
|
+
blocks: F,
|
|
398
|
+
measures: I,
|
|
399
399
|
loadBuffer: qe,
|
|
400
400
|
loadDocument: Je,
|
|
401
401
|
save: Ye,
|
|
@@ -404,7 +404,7 @@ function j(e) {
|
|
|
404
404
|
getCommands: Qe,
|
|
405
405
|
focus: $e,
|
|
406
406
|
reLayout: et,
|
|
407
|
-
destroy:
|
|
407
|
+
destroy: tt
|
|
408
408
|
};
|
|
409
409
|
}
|
|
410
410
|
function M(e, t) {
|
|
@@ -425,7 +425,7 @@ function N({ pagesContainer: e, onScrollExtendSelection: t }) {
|
|
|
425
425
|
function c() {
|
|
426
426
|
if (s) return s;
|
|
427
427
|
let t = e.value;
|
|
428
|
-
return t ? (s =
|
|
428
|
+
return t ? (s = y(t), s) : null;
|
|
429
429
|
}
|
|
430
430
|
function l() {
|
|
431
431
|
o = !1, n !== null && (cancelAnimationFrame(n), n = null);
|
|
@@ -494,8 +494,8 @@ function P() {
|
|
|
494
494
|
r.preventDefault();
|
|
495
495
|
let t = r.clientX - e.startX, n = parseFloat(e.handle.style.left);
|
|
496
496
|
e.handle.style.left = `${n + t}px`, e.startX = r.clientX;
|
|
497
|
-
let i = Math.round(t *
|
|
498
|
-
a >=
|
|
497
|
+
let i = Math.round(t * x), a = e.origWidths.left + i, o = e.origWidths.right - i;
|
|
498
|
+
a >= b && o >= b && (e.origWidths = {
|
|
499
499
|
left: a,
|
|
500
500
|
right: o
|
|
501
501
|
});
|
|
@@ -505,21 +505,21 @@ function P() {
|
|
|
505
505
|
r.preventDefault();
|
|
506
506
|
let e = r.clientY - t.startY, n = parseFloat(t.handle.style.top);
|
|
507
507
|
t.handle.style.top = `${n + e}px`, t.startY = r.clientY;
|
|
508
|
-
let i = Math.round(e *
|
|
509
|
-
a >=
|
|
508
|
+
let i = Math.round(e * x), a = t.origHeight + i;
|
|
509
|
+
a >= ye && (t.origHeight = a);
|
|
510
510
|
return;
|
|
511
511
|
}
|
|
512
512
|
if (n.active && n.handle) {
|
|
513
513
|
r.preventDefault();
|
|
514
514
|
let e = r.clientX - n.startX, t = parseFloat(n.handle.style.left);
|
|
515
515
|
n.handle.style.left = `${t + e}px`, n.startX = r.clientX;
|
|
516
|
-
let i = Math.round(e *
|
|
517
|
-
a >=
|
|
516
|
+
let i = Math.round(e * x), a = n.origWidth + i;
|
|
517
|
+
a >= b && (n.origWidth = a);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
function s(i) {
|
|
521
521
|
if (e.active) {
|
|
522
|
-
e.active = !1, e.handle?.classList.remove("dragging"), r &&
|
|
522
|
+
e.active = !1, e.handle?.classList.remove("dragging"), r && be(r, {
|
|
523
523
|
pmStart: e.tablePmStart,
|
|
524
524
|
colIdx: e.columnIndex,
|
|
525
525
|
newLeft: e.origWidths.left,
|
|
@@ -528,14 +528,14 @@ function P() {
|
|
|
528
528
|
return;
|
|
529
529
|
}
|
|
530
530
|
if (t.active) {
|
|
531
|
-
t.active = !1, t.handle?.classList.remove("dragging"), r &&
|
|
531
|
+
t.active = !1, t.handle?.classList.remove("dragging"), r && C(r, {
|
|
532
532
|
pmStart: t.tablePmStart,
|
|
533
533
|
rowIdx: t.rowIndex,
|
|
534
534
|
newHeight: t.origHeight
|
|
535
535
|
}), t.handle = null;
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
538
|
-
n.active && (n.active = !1, n.handle?.classList.remove("dragging"), r &&
|
|
538
|
+
n.active && (n.active = !1, n.handle?.classList.remove("dragging"), r && S(r, {
|
|
539
539
|
pmStart: n.tablePmStart,
|
|
540
540
|
colIdx: n.columnIndex,
|
|
541
541
|
newWidth: n.origWidth
|
|
@@ -553,17 +553,17 @@ function P() {
|
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
555
|
function F(e, t) {
|
|
556
|
-
let n =
|
|
556
|
+
let n = T(e, t.tablePmStart, t.columnIndex);
|
|
557
557
|
n && (t.origWidths = n);
|
|
558
558
|
}
|
|
559
559
|
function I(e, t, n) {
|
|
560
|
-
let r =
|
|
560
|
+
let r = xe(e, t.tablePmStart, t.rowIndex);
|
|
561
561
|
if (r != null) {
|
|
562
562
|
t.origHeight = r;
|
|
563
563
|
return;
|
|
564
564
|
}
|
|
565
565
|
let i = n.closest(".layout-table")?.querySelector(`[data-row-index="${t.rowIndex}"]`), a = i ? i.getBoundingClientRect().height : 30;
|
|
566
|
-
t.origHeight = Math.round(a *
|
|
566
|
+
t.origHeight = Math.round(a * x);
|
|
567
567
|
}
|
|
568
568
|
function L(e, t) {
|
|
569
569
|
let n = w(e, t.tablePmStart, t.columnIndex);
|
package/package.json
CHANGED