@pixerate/editor-svelte 0.8.1 → 0.9.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/index.d.ts +67 -7
- package/dist/index.js +323 -203
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/createNavigationGuard.svelte.ts +97 -0
- package/src/index.d.ts +67 -7
- package/src/index.ts +22 -4
- package/src/navigationGuard.ts +82 -0
package/dist/index.js
CHANGED
|
@@ -229,29 +229,144 @@ function TemplateRenderer($$anchor, $$props) {
|
|
|
229
229
|
}
|
|
230
230
|
$4.delegate(["click"]);
|
|
231
231
|
|
|
232
|
+
// src/navigationGuard.ts
|
|
233
|
+
function navigationGuard(node, options) {
|
|
234
|
+
let isDirty = options.isDirty;
|
|
235
|
+
let enabled = options.enabled ?? true;
|
|
236
|
+
let onBlocked = options.onBlocked;
|
|
237
|
+
function handleBeforeUnload(e) {
|
|
238
|
+
if (!enabled || !isDirty) return;
|
|
239
|
+
e.preventDefault();
|
|
240
|
+
e.returnValue = "";
|
|
241
|
+
}
|
|
242
|
+
function handleClick(e) {
|
|
243
|
+
if (!enabled || !isDirty) return;
|
|
244
|
+
const target = e.target;
|
|
245
|
+
const anchor = target?.closest?.("a");
|
|
246
|
+
if (!anchor) return;
|
|
247
|
+
if (anchor.target === "_blank") return;
|
|
248
|
+
if (typeof window !== "undefined") {
|
|
249
|
+
const isInternal = anchor.host === window.location.host;
|
|
250
|
+
if (!isInternal) return;
|
|
251
|
+
if (anchor.pathname === window.location.pathname && anchor.search === window.location.search) {
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
e.preventDefault();
|
|
256
|
+
e.stopPropagation();
|
|
257
|
+
const href = anchor.href;
|
|
258
|
+
onBlocked?.(href);
|
|
259
|
+
}
|
|
260
|
+
if (typeof window !== "undefined") {
|
|
261
|
+
window.addEventListener("beforeunload", handleBeforeUnload);
|
|
262
|
+
}
|
|
263
|
+
node.addEventListener("click", handleClick, { capture: true });
|
|
264
|
+
return {
|
|
265
|
+
update(newOptions) {
|
|
266
|
+
isDirty = newOptions.isDirty;
|
|
267
|
+
enabled = newOptions.enabled ?? true;
|
|
268
|
+
onBlocked = newOptions.onBlocked;
|
|
269
|
+
},
|
|
270
|
+
destroy() {
|
|
271
|
+
if (typeof window !== "undefined") {
|
|
272
|
+
window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
273
|
+
}
|
|
274
|
+
node.removeEventListener("click", handleClick, { capture: true });
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// src/createNavigationGuard.svelte.ts
|
|
280
|
+
import * as $5 from "svelte/internal/client";
|
|
281
|
+
function createNavigationGuard(options) {
|
|
282
|
+
let showConfirm = $5.state(false);
|
|
283
|
+
let pendingUrl = $5.state(null);
|
|
284
|
+
const getIsDirty = () => typeof options.isDirty === "function" ? options.isDirty() : options.isDirty;
|
|
285
|
+
const getEnabled = () => typeof options.enabled === "function" ? options.enabled() : options.enabled ?? true;
|
|
286
|
+
function handleBeforeUnload(e) {
|
|
287
|
+
if (!getEnabled() || !getIsDirty()) return;
|
|
288
|
+
e.preventDefault();
|
|
289
|
+
e.returnValue = "";
|
|
290
|
+
}
|
|
291
|
+
if (typeof window !== "undefined") {
|
|
292
|
+
window.addEventListener("beforeunload", handleBeforeUnload);
|
|
293
|
+
}
|
|
294
|
+
function intercept(url) {
|
|
295
|
+
if (getEnabled() && getIsDirty()) {
|
|
296
|
+
$5.set(pendingUrl, url, true);
|
|
297
|
+
$5.set(showConfirm, true);
|
|
298
|
+
options.onBlocked?.(url);
|
|
299
|
+
return true;
|
|
300
|
+
}
|
|
301
|
+
return false;
|
|
302
|
+
}
|
|
303
|
+
function confirmLeave() {
|
|
304
|
+
$5.set(showConfirm, false);
|
|
305
|
+
const target = $5.get(pendingUrl);
|
|
306
|
+
if (target) {
|
|
307
|
+
if (options.onNavigate) {
|
|
308
|
+
options.onNavigate(target);
|
|
309
|
+
} else if (typeof window !== "undefined") {
|
|
310
|
+
window.location.href = target;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
function cancelLeave() {
|
|
315
|
+
$5.set(showConfirm, false);
|
|
316
|
+
$5.set(pendingUrl, null);
|
|
317
|
+
}
|
|
318
|
+
function destroy() {
|
|
319
|
+
if (typeof window !== "undefined") {
|
|
320
|
+
window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return {
|
|
324
|
+
get showConfirm() {
|
|
325
|
+
return $5.get(showConfirm);
|
|
326
|
+
},
|
|
327
|
+
setShowConfirm(val) {
|
|
328
|
+
$5.set(showConfirm, val, true);
|
|
329
|
+
},
|
|
330
|
+
get pendingUrl() {
|
|
331
|
+
return $5.get(pendingUrl);
|
|
332
|
+
},
|
|
333
|
+
intercept,
|
|
334
|
+
confirmLeave,
|
|
335
|
+
cancelLeave,
|
|
336
|
+
destroy
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// src/index.ts
|
|
341
|
+
import {
|
|
342
|
+
DirtyTracker,
|
|
343
|
+
createDirtyTracker,
|
|
344
|
+
defaultIsEqual
|
|
345
|
+
} from "@pixerate/editor";
|
|
346
|
+
|
|
232
347
|
// src/spreadsheet/SpreadsheetEditor.svelte
|
|
233
348
|
import "svelte/internal/disclose-version";
|
|
234
|
-
import * as $
|
|
349
|
+
import * as $8 from "svelte/internal/client";
|
|
235
350
|
import { indexToColName as indexToColName2 } from "@pixerate/editor";
|
|
236
351
|
|
|
237
352
|
// src/spreadsheet/FormulaBar.svelte
|
|
238
353
|
import "svelte/internal/disclose-version";
|
|
239
|
-
import * as $
|
|
354
|
+
import * as $6 from "svelte/internal/client";
|
|
240
355
|
import { indexToColName } from "@pixerate/editor";
|
|
241
|
-
var root4 = $
|
|
356
|
+
var root4 = $6.from_html(`<div><div class="flex h-6 min-w-[3rem] items-center justify-center rounded border border-border bg-background px-1.5 font-semibold text-foreground"> </div> <div class="flex items-center text-muted-foreground select-none"><span class="italic font-serif font-bold text-sm text-primary">fx</span></div> <input type="text" class="flex-1 bg-transparent px-2 py-0.5 outline-none font-sans text-xs text-foreground placeholder:text-muted-foreground/60 focus:bg-background focus:ring-1 focus:ring-primary rounded" placeholder="Enter a value or formula (e.g. =SUM(A1:A5))"/></div>`);
|
|
242
357
|
function FormulaBar($$anchor, $$props) {
|
|
243
|
-
$
|
|
244
|
-
let sheetState = $
|
|
245
|
-
let effectiveCoord = $
|
|
358
|
+
$6.push($$props, true);
|
|
359
|
+
let sheetState = $6.prop($$props, "sheetState", 7), activeCoord = $6.prop($$props, "activeCoord", 3, null), value = $6.prop($$props, "value", 15, ""), className = $6.prop($$props, "class", 3, "");
|
|
360
|
+
let effectiveCoord = $6.derived(() => {
|
|
246
361
|
if (sheetState()) return sheetState().activeCell;
|
|
247
362
|
return activeCoord();
|
|
248
363
|
});
|
|
249
|
-
let coordLabel = $
|
|
250
|
-
if (!$
|
|
251
|
-
const colName = indexToColName($
|
|
252
|
-
return `${colName}${$
|
|
364
|
+
let coordLabel = $6.derived(() => {
|
|
365
|
+
if (!$6.get(effectiveCoord)) return "--";
|
|
366
|
+
const colName = indexToColName($6.get(effectiveCoord).col);
|
|
367
|
+
return `${colName}${$6.get(effectiveCoord).row + 1}`;
|
|
253
368
|
});
|
|
254
|
-
let effectiveValue = $
|
|
369
|
+
let effectiveValue = $6.derived(() => {
|
|
255
370
|
if (sheetState()) {
|
|
256
371
|
if (sheetState().editingCell) return sheetState().draftValue;
|
|
257
372
|
if (!sheetState().activeCell) return "";
|
|
@@ -269,11 +384,11 @@ function FormulaBar($$anchor, $$props) {
|
|
|
269
384
|
const row = sheetState().document.rows[sheetState().activeCell.row];
|
|
270
385
|
const col = sheetState().document.columns[sheetState().activeCell.col];
|
|
271
386
|
if (row && col) {
|
|
272
|
-
sheetState().setCellValue(row.id, col.id, $
|
|
387
|
+
sheetState().setCellValue(row.id, col.id, $6.get(effectiveValue));
|
|
273
388
|
}
|
|
274
389
|
sheetState().commitEditing();
|
|
275
390
|
}
|
|
276
|
-
$$props.onCommit?.($
|
|
391
|
+
$$props.onCommit?.($6.get(effectiveValue));
|
|
277
392
|
} else if (e.key === "Escape") {
|
|
278
393
|
e.preventDefault();
|
|
279
394
|
if (sheetState()) {
|
|
@@ -295,28 +410,28 @@ function FormulaBar($$anchor, $$props) {
|
|
|
295
410
|
$$props.onChange?.(target.value);
|
|
296
411
|
}
|
|
297
412
|
var div = root4();
|
|
298
|
-
var div_1 = $
|
|
299
|
-
var text = $
|
|
300
|
-
var input = $
|
|
301
|
-
$
|
|
302
|
-
$
|
|
303
|
-
$
|
|
304
|
-
$
|
|
305
|
-
$
|
|
306
|
-
$
|
|
413
|
+
var div_1 = $6.child(div);
|
|
414
|
+
var text = $6.only_child(div_1, true);
|
|
415
|
+
var input = $6.sibling(div_1, 4);
|
|
416
|
+
$6.remove_input_defaults(input);
|
|
417
|
+
$6.reset(div);
|
|
418
|
+
$6.template_effect(() => {
|
|
419
|
+
$6.set_class(div, 1, `flex items-center gap-2 border-b border-border bg-muted/20 px-3 py-1.5 text-xs font-mono ${className() ?? ""}`);
|
|
420
|
+
$6.set_text(text, $6.get(coordLabel));
|
|
421
|
+
$6.set_value(input, $6.get(effectiveValue));
|
|
307
422
|
});
|
|
308
|
-
$
|
|
309
|
-
$
|
|
310
|
-
$
|
|
311
|
-
$
|
|
423
|
+
$6.delegated("input", input, handleInput);
|
|
424
|
+
$6.delegated("keydown", input, handleKeyDown);
|
|
425
|
+
$6.append($$anchor, div);
|
|
426
|
+
$6.pop();
|
|
312
427
|
}
|
|
313
|
-
$
|
|
428
|
+
$6.delegate(["input", "keydown"]);
|
|
314
429
|
|
|
315
430
|
// src/spreadsheet/spreadsheet.svelte.ts
|
|
316
|
-
import * as $
|
|
431
|
+
import * as $7 from "svelte/internal/client";
|
|
317
432
|
import { SpreadsheetController } from "@pixerate/editor";
|
|
318
433
|
function createReactiveSpreadsheet(options = {}) {
|
|
319
|
-
let doc = $
|
|
434
|
+
let doc = $7.state($7.proxy({
|
|
320
435
|
id: options.document?.id || `sheet_${Date.now()}`,
|
|
321
436
|
name: options.document?.name || "Sheet 1",
|
|
322
437
|
columns: options.document?.columns || [],
|
|
@@ -325,47 +440,47 @@ function createReactiveSpreadsheet(options = {}) {
|
|
|
325
440
|
createdAt: options.document?.createdAt || Date.now(),
|
|
326
441
|
updatedAt: options.document?.updatedAt || Date.now()
|
|
327
442
|
}));
|
|
328
|
-
let activeCell = $
|
|
329
|
-
let selectedRange = $
|
|
330
|
-
let editingCell = $
|
|
331
|
-
let draftValue = $
|
|
443
|
+
let activeCell = $7.state(null);
|
|
444
|
+
let selectedRange = $7.state(null);
|
|
445
|
+
let editingCell = $7.state(null);
|
|
446
|
+
let draftValue = $7.state("");
|
|
332
447
|
const controller = new SpreadsheetController({
|
|
333
448
|
...options,
|
|
334
449
|
document: options.document,
|
|
335
450
|
onDocumentChange: (updated) => {
|
|
336
|
-
$
|
|
451
|
+
$7.set(doc, { ...updated }, true);
|
|
337
452
|
options.onDocumentChange?.(updated);
|
|
338
453
|
},
|
|
339
454
|
onSelectionChange: (active, range) => {
|
|
340
|
-
$
|
|
341
|
-
$
|
|
455
|
+
$7.set(activeCell, active, true);
|
|
456
|
+
$7.set(selectedRange, range, true);
|
|
342
457
|
options.onSelectionChange?.(active, range);
|
|
343
458
|
},
|
|
344
459
|
onCellCommit: (rowId, colId, raw, value) => {
|
|
345
460
|
options.onCellCommit?.(rowId, colId, raw, value);
|
|
346
461
|
}
|
|
347
462
|
});
|
|
348
|
-
$
|
|
349
|
-
$
|
|
350
|
-
$
|
|
463
|
+
$7.set(doc, { ...controller.document }, true);
|
|
464
|
+
$7.set(activeCell, controller.activeCell, true);
|
|
465
|
+
$7.set(selectedRange, controller.selectedRange, true);
|
|
351
466
|
return {
|
|
352
467
|
get document() {
|
|
353
|
-
return $
|
|
468
|
+
return $7.get(doc);
|
|
354
469
|
},
|
|
355
470
|
get activeCell() {
|
|
356
|
-
return $
|
|
471
|
+
return $7.get(activeCell);
|
|
357
472
|
},
|
|
358
473
|
get selectedRange() {
|
|
359
|
-
return $
|
|
474
|
+
return $7.get(selectedRange);
|
|
360
475
|
},
|
|
361
476
|
get editingCell() {
|
|
362
|
-
return $
|
|
477
|
+
return $7.get(editingCell);
|
|
363
478
|
},
|
|
364
479
|
get draftValue() {
|
|
365
|
-
return $
|
|
480
|
+
return $7.get(draftValue);
|
|
366
481
|
},
|
|
367
482
|
set draftValue(val) {
|
|
368
|
-
$
|
|
483
|
+
$7.set(draftValue, val, true);
|
|
369
484
|
controller.draftValue = val;
|
|
370
485
|
},
|
|
371
486
|
controller,
|
|
@@ -374,124 +489,124 @@ function createReactiveSpreadsheet(options = {}) {
|
|
|
374
489
|
},
|
|
375
490
|
setCellValue(rowId, colId, raw) {
|
|
376
491
|
controller.setCellValue(rowId, colId, raw);
|
|
377
|
-
$
|
|
492
|
+
$7.set(doc, { ...controller.document }, true);
|
|
378
493
|
},
|
|
379
494
|
selectCell(row, col, extendSelection = false) {
|
|
380
495
|
controller.selectCell(row, col, extendSelection);
|
|
381
|
-
$
|
|
382
|
-
$
|
|
496
|
+
$7.set(activeCell, controller.activeCell, true);
|
|
497
|
+
$7.set(selectedRange, controller.selectedRange, true);
|
|
383
498
|
},
|
|
384
499
|
selectRange(range) {
|
|
385
500
|
controller.selectRange(range);
|
|
386
|
-
$
|
|
501
|
+
$7.set(selectedRange, controller.selectedRange, true);
|
|
387
502
|
},
|
|
388
503
|
startEditing(row, col, initialVal) {
|
|
389
504
|
controller.startEditing(row, col, initialVal);
|
|
390
|
-
$
|
|
391
|
-
$
|
|
392
|
-
$
|
|
505
|
+
$7.set(activeCell, controller.activeCell, true);
|
|
506
|
+
$7.set(editingCell, controller.editingCell, true);
|
|
507
|
+
$7.set(draftValue, controller.draftValue, true);
|
|
393
508
|
},
|
|
394
509
|
commitEditing(val) {
|
|
395
510
|
controller.commitEditing(val);
|
|
396
|
-
$
|
|
397
|
-
$
|
|
398
|
-
$
|
|
511
|
+
$7.set(editingCell, null);
|
|
512
|
+
$7.set(draftValue, "");
|
|
513
|
+
$7.set(doc, { ...controller.document }, true);
|
|
399
514
|
},
|
|
400
515
|
cancelEditing() {
|
|
401
516
|
controller.cancelEditing();
|
|
402
|
-
$
|
|
403
|
-
$
|
|
517
|
+
$7.set(editingCell, null);
|
|
518
|
+
$7.set(draftValue, "");
|
|
404
519
|
},
|
|
405
520
|
moveCursor(dir, extend = false) {
|
|
406
521
|
controller.moveCursor(dir, extend);
|
|
407
|
-
$
|
|
408
|
-
$
|
|
522
|
+
$7.set(activeCell, controller.activeCell, true);
|
|
523
|
+
$7.set(selectedRange, controller.selectedRange, true);
|
|
409
524
|
},
|
|
410
525
|
insertColumn(index2, config) {
|
|
411
526
|
controller.insertColumn(index2, config);
|
|
412
|
-
$
|
|
527
|
+
$7.set(doc, { ...controller.document }, true);
|
|
413
528
|
},
|
|
414
529
|
deleteColumn(colId) {
|
|
415
530
|
controller.deleteColumn(colId);
|
|
416
|
-
$
|
|
531
|
+
$7.set(doc, { ...controller.document }, true);
|
|
417
532
|
},
|
|
418
533
|
insertRow(index2, config) {
|
|
419
534
|
controller.insertRow(index2, config);
|
|
420
|
-
$
|
|
535
|
+
$7.set(doc, { ...controller.document }, true);
|
|
421
536
|
},
|
|
422
537
|
deleteRow(rowId) {
|
|
423
538
|
controller.deleteRow(rowId);
|
|
424
|
-
$
|
|
539
|
+
$7.set(doc, { ...controller.document }, true);
|
|
425
540
|
},
|
|
426
541
|
setColumnWidth(colId, width) {
|
|
427
542
|
controller.setColumnWidth(colId, width);
|
|
428
|
-
$
|
|
543
|
+
$7.set(doc, { ...controller.document }, true);
|
|
429
544
|
},
|
|
430
545
|
autoFitColumnWidth(colId, customWidth) {
|
|
431
546
|
controller.autoFitColumnWidth(colId, customWidth);
|
|
432
|
-
$
|
|
547
|
+
$7.set(doc, { ...controller.document }, true);
|
|
433
548
|
},
|
|
434
549
|
loadDocument(document2) {
|
|
435
550
|
controller.loadDocument(document2);
|
|
436
|
-
$
|
|
437
|
-
$
|
|
438
|
-
$
|
|
439
|
-
$
|
|
440
|
-
$
|
|
551
|
+
$7.set(doc, { ...controller.document }, true);
|
|
552
|
+
$7.set(activeCell, controller.activeCell, true);
|
|
553
|
+
$7.set(selectedRange, controller.selectedRange, true);
|
|
554
|
+
$7.set(editingCell, controller.editingCell, true);
|
|
555
|
+
$7.set(draftValue, controller.draftValue, true);
|
|
441
556
|
},
|
|
442
557
|
syncWithDataSource() {
|
|
443
558
|
controller.syncWithDataSource();
|
|
444
559
|
controller.recalculateAll();
|
|
445
|
-
$
|
|
560
|
+
$7.set(doc, { ...controller.document }, true);
|
|
446
561
|
},
|
|
447
562
|
registerDataSource(ds) {
|
|
448
563
|
controller.registerDataSource(ds);
|
|
449
|
-
$
|
|
564
|
+
$7.set(doc, { ...controller.document }, true);
|
|
450
565
|
},
|
|
451
566
|
setPrimaryDataSource(id) {
|
|
452
567
|
controller.setPrimaryDataSource(id);
|
|
453
|
-
$
|
|
568
|
+
$7.set(doc, { ...controller.document }, true);
|
|
454
569
|
},
|
|
455
570
|
recalculateAll() {
|
|
456
571
|
controller.recalculateAll();
|
|
457
|
-
$
|
|
572
|
+
$7.set(doc, { ...controller.document }, true);
|
|
458
573
|
},
|
|
459
574
|
exportToTsv() {
|
|
460
575
|
return controller.exportToTsv();
|
|
461
576
|
},
|
|
462
577
|
importFromTsv(data) {
|
|
463
578
|
controller.importFromTsv(data);
|
|
464
|
-
$
|
|
579
|
+
$7.set(doc, { ...controller.document }, true);
|
|
465
580
|
},
|
|
466
581
|
undo() {
|
|
467
582
|
controller.undo();
|
|
468
|
-
$
|
|
583
|
+
$7.set(doc, { ...controller.document }, true);
|
|
469
584
|
},
|
|
470
585
|
redo() {
|
|
471
586
|
controller.redo();
|
|
472
|
-
$
|
|
587
|
+
$7.set(doc, { ...controller.document }, true);
|
|
473
588
|
}
|
|
474
589
|
};
|
|
475
590
|
}
|
|
476
591
|
|
|
477
592
|
// src/spreadsheet/SpreadsheetEditor.svelte
|
|
478
|
-
var root5 = $
|
|
479
|
-
var root_13 = $
|
|
480
|
-
var root_22 = $
|
|
481
|
-
var root_32 = $
|
|
482
|
-
var root_42 = $
|
|
483
|
-
var root_5 = $
|
|
484
|
-
var root_6 = $
|
|
485
|
-
var root_7 = $
|
|
593
|
+
var root5 = $8.from_html(`<th><div class="flex items-center justify-between gap-1 min-w-0 overflow-hidden truncate"><span class="truncate font-semibold text-foreground text-xs min-w-0"> </span> <span class="text-[10px] text-muted-foreground/70 font-mono font-normal shrink-0"> </span></div> <div class="col-resize-handle svelte-m799ch" style="position: absolute; top: 0; bottom: 0; width: 12px; right: -6px; cursor: col-resize !important; z-index: 20; display: flex; justify-content: center; touch-action: none;" role="separator" aria-orientation="vertical" tabindex="-1"><div class="col-resize-handle-line svelte-m799ch"></div></div></th>`);
|
|
594
|
+
var root_13 = $8.from_html(`<th class="w-10 min-w-[2.5rem] px-1 text-center bg-muted/40 hover:bg-muted cursor-pointer transition-colors svelte-m799ch" title="Add Column"><span class="text-xs font-bold text-muted-foreground">+</span></th>`);
|
|
595
|
+
var root_22 = $8.from_html(`<input type="text" class="absolute inset-0 w-full h-full px-2 py-1 bg-background text-foreground outline-none font-sans text-xs border-2 border-primary z-20"/>`);
|
|
596
|
+
var root_32 = $8.from_html(`<span> </span>`);
|
|
597
|
+
var root_42 = $8.from_html(`<td style="max-width: 0; overflow: hidden;"><!></td>`);
|
|
598
|
+
var root_5 = $8.from_html(`<td class="w-10 min-w-[2.5rem] bg-muted/10 border-r border-border svelte-m799ch"></td>`);
|
|
599
|
+
var root_6 = $8.from_html(`<tr class="border-b border-border hover:bg-muted/10 transition-colors"><td class="w-12 min-w-[3rem] sticky left-0 z-10 bg-muted/50 border-r border-border text-center text-[10px] text-muted-foreground font-mono select-none svelte-m799ch"> </td><!><!><td class="border-b border-border bg-transparent p-0 svelte-m799ch"></td></tr>`);
|
|
600
|
+
var root_7 = $8.from_html(`<div tabindex="0" role="grid" aria-label="Spreadsheet"><!> <div class="relative flex-1 overflow-auto"><table class="border-collapse table-fixed w-max min-w-full svelte-m799ch"><thead><tr class="h-7 bg-muted/60 sticky top-0 z-20 border-b border-border shadow-xs"><th class="w-12 min-w-[3rem] sticky left-0 z-30 bg-muted/90 border-r border-border text-center text-[10px] text-muted-foreground font-medium svelte-m799ch">#</th><!><!><th class="border-b border-border bg-transparent p-0 font-normal svelte-m799ch"></th></tr></thead><tbody></tbody></table></div></div>`);
|
|
486
601
|
function SpreadsheetEditor($$anchor, $$props) {
|
|
487
|
-
$
|
|
488
|
-
let sheetState = $
|
|
489
|
-
let isReadOnly = $
|
|
490
|
-
let gridContainer = $
|
|
491
|
-
let resizingColId = $
|
|
492
|
-
let hoveredColId = $
|
|
493
|
-
let resizeStartX = $
|
|
494
|
-
let resizeStartWidth = $
|
|
602
|
+
$8.push($$props, true);
|
|
603
|
+
let sheetState = $8.prop($$props, "sheetState", 23, createReactiveSpreadsheet), readOnly = $8.prop($$props, "readOnly", 3, false), readonly = $8.prop($$props, "readonly", 3, false), showFormulaBar = $8.prop($$props, "showFormulaBar", 3, true), className = $8.prop($$props, "class", 3, "");
|
|
604
|
+
let isReadOnly = $8.derived(() => readOnly() || readonly());
|
|
605
|
+
let gridContainer = $8.state(null);
|
|
606
|
+
let resizingColId = $8.state(null);
|
|
607
|
+
let hoveredColId = $8.state(null);
|
|
608
|
+
let resizeStartX = $8.state(0);
|
|
609
|
+
let resizeStartWidth = $8.state(0);
|
|
495
610
|
function handleCellClick(rIdx, cIdx, e) {
|
|
496
611
|
if (sheetState().editingCell && (sheetState().editingCell.row !== rIdx || sheetState().editingCell.col !== cIdx)) {
|
|
497
612
|
sheetState().commitEditing();
|
|
@@ -499,7 +614,7 @@ function SpreadsheetEditor($$anchor, $$props) {
|
|
|
499
614
|
sheetState().selectCell(rIdx, cIdx, e.shiftKey);
|
|
500
615
|
}
|
|
501
616
|
function handleCellDblClick(rIdx, cIdx) {
|
|
502
|
-
if ($
|
|
617
|
+
if ($8.get(isReadOnly)) return;
|
|
503
618
|
const col = sheetState().document.columns[cIdx];
|
|
504
619
|
if (col?.readOnly) return;
|
|
505
620
|
sheetState().startEditing(rIdx, cIdx);
|
|
@@ -537,11 +652,11 @@ function SpreadsheetEditor($$anchor, $$props) {
|
|
|
537
652
|
} else if (e.key === "Enter") {
|
|
538
653
|
e.preventDefault();
|
|
539
654
|
const col = sheetState().document.columns[sheetState().activeCell.col];
|
|
540
|
-
if (!$
|
|
655
|
+
if (!$8.get(isReadOnly) && !col?.readOnly) {
|
|
541
656
|
sheetState().startEditing();
|
|
542
657
|
}
|
|
543
658
|
} else if (e.key === "Backspace" || e.key === "Delete") {
|
|
544
|
-
if ($
|
|
659
|
+
if ($8.get(isReadOnly)) return;
|
|
545
660
|
const row = sheetState().document.rows[sheetState().activeCell.row];
|
|
546
661
|
const col = sheetState().document.columns[sheetState().activeCell.col];
|
|
547
662
|
if (row && col && !col.readOnly) {
|
|
@@ -559,7 +674,7 @@ function SpreadsheetEditor($$anchor, $$props) {
|
|
|
559
674
|
e.preventDefault();
|
|
560
675
|
const tsv = sheetState().exportToTsv();
|
|
561
676
|
navigator.clipboard?.writeText(tsv);
|
|
562
|
-
} else if (!$
|
|
677
|
+
} else if (!$8.get(isReadOnly) && e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
563
678
|
const col = sheetState().document.columns[sheetState().activeCell.col];
|
|
564
679
|
if (!col?.readOnly) {
|
|
565
680
|
sheetState().startEditing(sheetState().activeCell.row, sheetState().activeCell.col, e.key);
|
|
@@ -569,9 +684,9 @@ function SpreadsheetEditor($$anchor, $$props) {
|
|
|
569
684
|
function handleResizeStart(colId, width, e) {
|
|
570
685
|
e.preventDefault();
|
|
571
686
|
e.stopPropagation();
|
|
572
|
-
$
|
|
573
|
-
$
|
|
574
|
-
$
|
|
687
|
+
$8.set(resizingColId, colId, true);
|
|
688
|
+
$8.set(resizeStartX, e.clientX, true);
|
|
689
|
+
$8.set(resizeStartWidth, width, true);
|
|
575
690
|
if (typeof document !== "undefined") {
|
|
576
691
|
document.body.style.cursor = "col-resize";
|
|
577
692
|
document.body.style.userSelect = "none";
|
|
@@ -580,17 +695,17 @@ function SpreadsheetEditor($$anchor, $$props) {
|
|
|
580
695
|
let pendingWidth = width;
|
|
581
696
|
let hasDragged = false;
|
|
582
697
|
const handleMouseMove = (moveEvent) => {
|
|
583
|
-
if (!$
|
|
584
|
-
const delta = moveEvent.clientX - $
|
|
698
|
+
if (!$8.get(resizingColId)) return;
|
|
699
|
+
const delta = moveEvent.clientX - $8.get(resizeStartX);
|
|
585
700
|
if (Math.abs(delta) > 2) {
|
|
586
701
|
hasDragged = true;
|
|
587
702
|
}
|
|
588
|
-
pendingWidth = Math.max(30, $
|
|
703
|
+
pendingWidth = Math.max(30, $8.get(resizeStartWidth) + delta);
|
|
589
704
|
if (rafId === null) {
|
|
590
705
|
rafId = requestAnimationFrame(() => {
|
|
591
706
|
rafId = null;
|
|
592
|
-
if ($
|
|
593
|
-
sheetState().setColumnWidth($
|
|
707
|
+
if ($8.get(resizingColId)) {
|
|
708
|
+
sheetState().setColumnWidth($8.get(resizingColId), pendingWidth);
|
|
594
709
|
}
|
|
595
710
|
});
|
|
596
711
|
}
|
|
@@ -600,14 +715,14 @@ function SpreadsheetEditor($$anchor, $$props) {
|
|
|
600
715
|
cancelAnimationFrame(rafId);
|
|
601
716
|
rafId = null;
|
|
602
717
|
}
|
|
603
|
-
if ($
|
|
604
|
-
sheetState().setColumnWidth($
|
|
605
|
-
const col = sheetState().document.columns.find((c) => c.id === $
|
|
718
|
+
if ($8.get(resizingColId) && hasDragged) {
|
|
719
|
+
sheetState().setColumnWidth($8.get(resizingColId), pendingWidth);
|
|
720
|
+
const col = sheetState().document.columns.find((c) => c.id === $8.get(resizingColId));
|
|
606
721
|
if (col && $$props.onColumnResize) {
|
|
607
722
|
$$props.onColumnResize(col.id, col.width || pendingWidth);
|
|
608
723
|
}
|
|
609
724
|
}
|
|
610
|
-
$
|
|
725
|
+
$8.set(resizingColId, null);
|
|
611
726
|
if (typeof document !== "undefined") {
|
|
612
727
|
document.body.style.cursor = "";
|
|
613
728
|
document.body.style.userSelect = "";
|
|
@@ -670,14 +785,14 @@ function SpreadsheetEditor($$anchor, $$props) {
|
|
|
670
785
|
const col = sheetState().document.columns.find((c) => c.id === colId);
|
|
671
786
|
if (!col) return;
|
|
672
787
|
let calculatedWidth = 0;
|
|
673
|
-
if ($
|
|
674
|
-
const table = $
|
|
788
|
+
if ($8.get(gridContainer) && typeof document !== "undefined") {
|
|
789
|
+
const table = $8.get(gridContainer).querySelector("table");
|
|
675
790
|
if (table) {
|
|
676
791
|
const thElements = table.querySelectorAll("thead th");
|
|
677
792
|
const th = thElements[colIndex + 1];
|
|
678
793
|
if (th) {
|
|
679
794
|
const headerInner = th.firstElementChild || th;
|
|
680
|
-
const headerW = measureElementContentWidth(headerInner, $
|
|
795
|
+
const headerW = measureElementContentWidth(headerInner, $8.get(gridContainer));
|
|
681
796
|
calculatedWidth = Math.max(calculatedWidth, headerW + 28);
|
|
682
797
|
}
|
|
683
798
|
const rows = table.querySelectorAll("tbody tr");
|
|
@@ -686,7 +801,7 @@ function SpreadsheetEditor($$anchor, $$props) {
|
|
|
686
801
|
const tr = rows[r];
|
|
687
802
|
const td = tr.children[colIndex + 1];
|
|
688
803
|
if (td) {
|
|
689
|
-
const cellW = measureElementContentWidth(td, $
|
|
804
|
+
const cellW = measureElementContentWidth(td, $8.get(gridContainer));
|
|
690
805
|
calculatedWidth = Math.max(calculatedWidth, cellW + 20);
|
|
691
806
|
}
|
|
692
807
|
}
|
|
@@ -731,7 +846,7 @@ function SpreadsheetEditor($$anchor, $$props) {
|
|
|
731
846
|
return sheetState().activeCell?.row === rIdx && sheetState().activeCell?.col === cIdx;
|
|
732
847
|
}
|
|
733
848
|
var div = root_7();
|
|
734
|
-
var node_1 = $
|
|
849
|
+
var node_1 = $8.child(div);
|
|
735
850
|
{
|
|
736
851
|
var consequent = ($$anchor2) => {
|
|
737
852
|
FormulaBar($$anchor2, {
|
|
@@ -740,137 +855,137 @@ function SpreadsheetEditor($$anchor, $$props) {
|
|
|
740
855
|
}
|
|
741
856
|
});
|
|
742
857
|
};
|
|
743
|
-
$
|
|
858
|
+
$8.if(node_1, ($$render) => {
|
|
744
859
|
if (showFormulaBar()) $$render(consequent);
|
|
745
860
|
});
|
|
746
861
|
}
|
|
747
|
-
var div_1 = $
|
|
748
|
-
var table_1 = $
|
|
749
|
-
var thead = $
|
|
750
|
-
var tr_1 = $
|
|
751
|
-
var node_2 = $
|
|
752
|
-
$
|
|
862
|
+
var div_1 = $8.sibling(node_1, 2);
|
|
863
|
+
var table_1 = $8.child(div_1);
|
|
864
|
+
var thead = $8.child(table_1);
|
|
865
|
+
var tr_1 = $8.child(thead);
|
|
866
|
+
var node_2 = $8.sibling($8.child(tr_1));
|
|
867
|
+
$8.each(node_2, 19, () => sheetState().document.columns, (col) => col.id, ($$anchor2, col, cIdx) => {
|
|
753
868
|
var th_1 = root5();
|
|
754
|
-
var div_2 = $
|
|
755
|
-
var span = $
|
|
756
|
-
var text = $
|
|
757
|
-
var span_1 = $
|
|
758
|
-
var text_1 = $
|
|
759
|
-
$
|
|
760
|
-
var div_3 = $
|
|
761
|
-
var div_4 = $
|
|
762
|
-
$
|
|
763
|
-
$
|
|
764
|
-
$
|
|
765
|
-
$
|
|
766
|
-
$
|
|
767
|
-
$
|
|
768
|
-
$
|
|
869
|
+
var div_2 = $8.child(th_1);
|
|
870
|
+
var span = $8.child(div_2);
|
|
871
|
+
var text = $8.only_child(span, true);
|
|
872
|
+
var span_1 = $8.sibling(span, 2);
|
|
873
|
+
var text_1 = $8.only_child(span_1);
|
|
874
|
+
$8.reset(div_2);
|
|
875
|
+
var div_3 = $8.sibling(div_2, 2);
|
|
876
|
+
var div_4 = $8.only_child(div_3);
|
|
877
|
+
$8.reset(th_1);
|
|
878
|
+
$8.template_effect(() => {
|
|
879
|
+
$8.set_class(th_1, 1, `relative border-r border-border px-2 text-left font-medium text-muted-foreground hover:bg-muted/90 transition-colors group overflow-hidden max-w-0 ${$$props.onColumnHeaderClick ? "cursor-pointer" : "cursor-default"}`, "svelte-m799ch");
|
|
880
|
+
$8.set_style(th_1, `width: ${($8.get(col).width || 130) ?? ""}px; min-width: ${($8.get(col).width || 130) ?? ""}px; max-width: ${($8.get(col).width || 130) ?? ""}px; overflow: hidden;`);
|
|
881
|
+
$8.set_text(text, $8.get(col).title);
|
|
882
|
+
$8.set_text(text_1, `(${$8.get(col).key ?? ""})`);
|
|
883
|
+
$8.set_style(div_4, `width: 2px; height: 100%; pointer-events: none; transition: background-color 150ms ease; background-color: ${$8.get(resizingColId) === $8.get(col).id ? "var(--primary, #6366f1)" : $8.get(hoveredColId) === $8.get(col).id ? "color-mix(in srgb, var(--primary, #6366f1) 75%, transparent)" : "transparent"};`);
|
|
769
884
|
});
|
|
770
|
-
$
|
|
771
|
-
$
|
|
772
|
-
$
|
|
773
|
-
$
|
|
774
|
-
if ($
|
|
885
|
+
$8.delegated("click", th_1, () => $$props.onColumnHeaderClick?.($8.get(col)));
|
|
886
|
+
$8.delegated("dblclick", th_1, (e) => handleHeaderDblClick($8.get(col).id, $8.get(cIdx), e));
|
|
887
|
+
$8.event("mouseenter", div_3, () => $8.set(hoveredColId, $8.get(col).id, true));
|
|
888
|
+
$8.event("mouseleave", div_3, () => {
|
|
889
|
+
if ($8.get(hoveredColId) === $8.get(col).id) $8.set(hoveredColId, null);
|
|
775
890
|
});
|
|
776
|
-
$
|
|
777
|
-
$
|
|
778
|
-
$
|
|
891
|
+
$8.delegated("mousedown", div_3, (e) => handleResizeStart($8.get(col).id, $8.get(col).width || 130, e));
|
|
892
|
+
$8.delegated("dblclick", div_3, (e) => handleResizeDblClick($8.get(col).id, $8.get(cIdx), e));
|
|
893
|
+
$8.append($$anchor2, th_1);
|
|
779
894
|
});
|
|
780
|
-
var node_3 = $
|
|
895
|
+
var node_3 = $8.sibling(node_2);
|
|
781
896
|
{
|
|
782
897
|
var consequent_1 = ($$anchor2) => {
|
|
783
898
|
var th_2 = root_13();
|
|
784
|
-
$
|
|
899
|
+
$8.delegated("click", th_2, function(...$$args) {
|
|
785
900
|
$$props.onAddColumnClick?.apply(this, $$args);
|
|
786
901
|
});
|
|
787
|
-
$
|
|
902
|
+
$8.append($$anchor2, th_2);
|
|
788
903
|
};
|
|
789
|
-
$
|
|
904
|
+
$8.if(node_3, ($$render) => {
|
|
790
905
|
if ($$props.onAddColumnClick) $$render(consequent_1);
|
|
791
906
|
});
|
|
792
907
|
}
|
|
793
|
-
$
|
|
794
|
-
$
|
|
795
|
-
$
|
|
796
|
-
var tbody = $
|
|
797
|
-
$
|
|
908
|
+
$8.next();
|
|
909
|
+
$8.reset(tr_1);
|
|
910
|
+
$8.reset(thead);
|
|
911
|
+
var tbody = $8.sibling(thead);
|
|
912
|
+
$8.each(tbody, 23, () => sheetState().document.rows, (row) => row.id, ($$anchor2, row, rIdx) => {
|
|
798
913
|
var tr_2 = root_6();
|
|
799
|
-
var td_1 = $
|
|
800
|
-
var text_2 = $
|
|
801
|
-
var node_4 = $
|
|
802
|
-
$
|
|
803
|
-
const cell = $
|
|
804
|
-
const selected = $
|
|
805
|
-
const active = $
|
|
806
|
-
const isEditing = $
|
|
914
|
+
var td_1 = $8.child(tr_2);
|
|
915
|
+
var text_2 = $8.only_child(td_1, true);
|
|
916
|
+
var node_4 = $8.sibling(td_1);
|
|
917
|
+
$8.each(node_4, 19, () => sheetState().document.columns, (col) => col.id, ($$anchor3, col, cIdx) => {
|
|
918
|
+
const cell = $8.derived(() => sheetState().getCell($8.get(row).id, $8.get(col).id));
|
|
919
|
+
const selected = $8.derived(() => isCellSelected($8.get(rIdx), $8.get(cIdx)));
|
|
920
|
+
const active = $8.derived(() => isActiveCell($8.get(rIdx), $8.get(cIdx)));
|
|
921
|
+
const isEditing = $8.derived(() => sheetState().editingCell?.row === $8.get(rIdx) && sheetState().editingCell?.col === $8.get(cIdx));
|
|
807
922
|
var td_2 = root_42();
|
|
808
|
-
var node_5 = $
|
|
923
|
+
var node_5 = $8.child(td_2);
|
|
809
924
|
{
|
|
810
925
|
var consequent_2 = ($$anchor4) => {
|
|
811
926
|
var input = root_22();
|
|
812
|
-
$
|
|
813
|
-
$
|
|
814
|
-
$
|
|
815
|
-
$
|
|
927
|
+
$8.remove_input_defaults(input);
|
|
928
|
+
$8.event("blur", input, () => sheetState().commitEditing());
|
|
929
|
+
$8.bind_value(input, () => sheetState().draftValue, ($$value) => sheetState().draftValue = $$value);
|
|
930
|
+
$8.append($$anchor4, input);
|
|
816
931
|
};
|
|
817
932
|
var consequent_3 = ($$anchor4) => {
|
|
818
|
-
const cellArg = $
|
|
819
|
-
var fragment_1 = $
|
|
820
|
-
var node_6 = $
|
|
821
|
-
$
|
|
822
|
-
$
|
|
933
|
+
const cellArg = $8.derived(() => Object.assign({ row: $8.get(row), col: $8.get(col), cell: $8.get(cell) }, $8.get(cell)));
|
|
934
|
+
var fragment_1 = $8.comment();
|
|
935
|
+
var node_6 = $8.first_child(fragment_1);
|
|
936
|
+
$8.snippet(node_6, () => $$props.customCellRenderer, () => $8.get(cellArg), () => $8.get(col), () => $8.get(row));
|
|
937
|
+
$8.append($$anchor4, fragment_1);
|
|
823
938
|
};
|
|
824
939
|
var alternate = ($$anchor4) => {
|
|
825
940
|
var span_2 = root_32();
|
|
826
|
-
var text_3 = $
|
|
827
|
-
$
|
|
828
|
-
$
|
|
829
|
-
$
|
|
941
|
+
var text_3 = $8.only_child(span_2, true);
|
|
942
|
+
$8.template_effect(() => {
|
|
943
|
+
$8.set_class(span_2, 1, `truncate block max-w-full ${$8.get(cell).error ? "text-destructive font-semibold" : ""}`);
|
|
944
|
+
$8.set_text(text_3, $8.get(cell).error || ($8.get(cell).value ?? ""));
|
|
830
945
|
});
|
|
831
|
-
$
|
|
946
|
+
$8.append($$anchor4, span_2);
|
|
832
947
|
};
|
|
833
|
-
$
|
|
834
|
-
if ($
|
|
948
|
+
$8.if(node_5, ($$render) => {
|
|
949
|
+
if ($8.get(isEditing)) $$render(consequent_2);
|
|
835
950
|
else if ($$props.customCellRenderer) $$render(consequent_3, 1);
|
|
836
951
|
else $$render(alternate, -1);
|
|
837
952
|
});
|
|
838
953
|
}
|
|
839
|
-
$
|
|
840
|
-
$
|
|
841
|
-
$
|
|
842
|
-
$
|
|
843
|
-
$
|
|
954
|
+
$8.reset(td_2);
|
|
955
|
+
$8.template_effect(() => $8.set_class(td_2, 1, `relative border-r border-border px-2 py-1 truncate max-w-0 text-foreground transition-colors ${$8.get(selected) ? "bg-primary/10" : ""} ${$8.get(active) ? "ring-2 ring-primary ring-inset z-10" : ""}`, "svelte-m799ch"));
|
|
956
|
+
$8.delegated("click", td_2, (e) => handleCellClick($8.get(rIdx), $8.get(cIdx), e));
|
|
957
|
+
$8.delegated("dblclick", td_2, () => handleCellDblClick($8.get(rIdx), $8.get(cIdx)));
|
|
958
|
+
$8.append($$anchor3, td_2);
|
|
844
959
|
});
|
|
845
|
-
var node_7 = $
|
|
960
|
+
var node_7 = $8.sibling(node_4);
|
|
846
961
|
{
|
|
847
962
|
var consequent_4 = ($$anchor3) => {
|
|
848
963
|
var td_3 = root_5();
|
|
849
|
-
$
|
|
964
|
+
$8.append($$anchor3, td_3);
|
|
850
965
|
};
|
|
851
|
-
$
|
|
966
|
+
$8.if(node_7, ($$render) => {
|
|
852
967
|
if ($$props.onAddColumnClick) $$render(consequent_4);
|
|
853
968
|
});
|
|
854
969
|
}
|
|
855
|
-
$
|
|
856
|
-
$
|
|
857
|
-
$
|
|
858
|
-
$
|
|
859
|
-
$
|
|
970
|
+
$8.next();
|
|
971
|
+
$8.reset(tr_2);
|
|
972
|
+
$8.template_effect(() => {
|
|
973
|
+
$8.set_style(tr_2, `height: ${($8.get(row).height || 32) ?? ""}px;`);
|
|
974
|
+
$8.set_text(text_2, $8.get(rIdx) + 1);
|
|
860
975
|
});
|
|
861
|
-
$
|
|
976
|
+
$8.append($$anchor2, tr_2);
|
|
862
977
|
});
|
|
863
|
-
$
|
|
864
|
-
$
|
|
865
|
-
$
|
|
866
|
-
$
|
|
867
|
-
$
|
|
868
|
-
$
|
|
869
|
-
$
|
|
870
|
-
$
|
|
871
|
-
$
|
|
978
|
+
$8.reset(tbody);
|
|
979
|
+
$8.reset(table_1);
|
|
980
|
+
$8.reset(div_1);
|
|
981
|
+
$8.reset(div);
|
|
982
|
+
$8.bind_this(div, ($$value) => $8.set(gridContainer, $$value), () => $8.get(gridContainer));
|
|
983
|
+
$8.template_effect(() => $8.set_class(div, 1, `flex flex-col h-full w-full overflow-hidden border border-border bg-background select-none outline-none text-foreground font-sans text-xs ${className() ?? ""}`, "svelte-m799ch"));
|
|
984
|
+
$8.delegated("keydown", div, handleKeyDown);
|
|
985
|
+
$8.append($$anchor, div);
|
|
986
|
+
$8.pop();
|
|
872
987
|
}
|
|
873
|
-
$
|
|
988
|
+
$8.delegate(["keydown", "click", "dblclick", "mousedown"]);
|
|
874
989
|
|
|
875
990
|
// src/index.ts
|
|
876
991
|
var EditableTextNodeEditor2 = EditableTextNodeEditor;
|
|
@@ -878,12 +993,17 @@ var BubbleMenu2 = BubbleMenu;
|
|
|
878
993
|
var TemplateRenderer2 = TemplateRenderer;
|
|
879
994
|
export {
|
|
880
995
|
BubbleMenu2 as BubbleMenu,
|
|
996
|
+
DirtyTracker,
|
|
881
997
|
EditableTextNodeEditor2 as EditableTextNodeEditor,
|
|
882
998
|
FormulaBar,
|
|
883
999
|
SpreadsheetEditor,
|
|
884
1000
|
TemplateRenderer2 as TemplateRenderer,
|
|
1001
|
+
createDirtyTracker,
|
|
1002
|
+
createNavigationGuard,
|
|
885
1003
|
createReactiveEditor,
|
|
886
1004
|
createReactiveSpreadsheet,
|
|
887
|
-
|
|
1005
|
+
defaultIsEqual,
|
|
1006
|
+
initiateEditor,
|
|
1007
|
+
navigationGuard
|
|
888
1008
|
};
|
|
889
1009
|
//# sourceMappingURL=index.js.map
|