@gridsheet/preact-core 2.1.0 → 2.2.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/components/ColumnMenu.d.ts +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1140 -47
- package/dist/index.js.map +1 -1
- package/dist/lib/date.d.ts +2 -0
- package/dist/lib/filter.d.ts +7 -0
- package/dist/lib/operation.d.ts +6 -0
- package/dist/lib/table.d.ts +48 -2
- package/dist/lib/time.d.ts +1 -0
- package/dist/store/actions.d.ts +93 -1
- package/dist/store/dispatchers.d.ts +9 -1
- package/dist/styles/minified.d.ts +2 -2
- package/dist/types.d.ts +31 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -466,6 +466,8 @@ const shouldTracking = (operation2) => {
|
|
|
466
466
|
return true;
|
|
467
467
|
case "MOVE":
|
|
468
468
|
return true;
|
|
469
|
+
case "SORT_ROWS":
|
|
470
|
+
return true;
|
|
469
471
|
}
|
|
470
472
|
return false;
|
|
471
473
|
};
|
|
@@ -511,7 +513,7 @@ const getCellRectPositions = (table, { y, x }) => {
|
|
|
511
513
|
const left = ((_a = colCell == null ? void 0 : colCell.system) == null ? void 0 : _a.offsetLeft) ?? 0;
|
|
512
514
|
const top = ((_b = rowCell == null ? void 0 : rowCell.system) == null ? void 0 : _b.offsetTop) ?? 0;
|
|
513
515
|
const w = (colCell == null ? void 0 : colCell.width) || DEFAULT_WIDTH;
|
|
514
|
-
const h2 = (rowCell == null ? void 0 : rowCell.height) || DEFAULT_HEIGHT;
|
|
516
|
+
const h2 = (rowCell == null ? void 0 : rowCell.filtered) ? 0 : (rowCell == null ? void 0 : rowCell.height) || DEFAULT_HEIGHT;
|
|
515
517
|
return {
|
|
516
518
|
top,
|
|
517
519
|
left,
|
|
@@ -547,6 +549,9 @@ const virtualize = (table, e) => {
|
|
|
547
549
|
}
|
|
548
550
|
}
|
|
549
551
|
for (let y = 1; y <= table.getNumRows(); y++) {
|
|
552
|
+
if (table.isRowFiltered(y)) {
|
|
553
|
+
continue;
|
|
554
|
+
}
|
|
550
555
|
const h2 = ((_b = table.getCellByPoint({ y, x: 0 }, "SYSTEM")) == null ? void 0 : _b.height) || DEFAULT_HEIGHT;
|
|
551
556
|
height += h2;
|
|
552
557
|
if (boundaryTop === 0 && height > top) {
|
|
@@ -557,7 +562,7 @@ const virtualize = (table, e) => {
|
|
|
557
562
|
break;
|
|
558
563
|
}
|
|
559
564
|
}
|
|
560
|
-
const ys = range(boundaryTop, boundaryBottom);
|
|
565
|
+
const ys = boundaryTop === 0 ? [] : range(boundaryTop, boundaryBottom).filter((y) => !table.isRowFiltered(y));
|
|
561
566
|
const xs = range(boundaryLeft, boundaryRight);
|
|
562
567
|
const before = table.getRectSize({
|
|
563
568
|
top: 1,
|
|
@@ -659,14 +664,20 @@ const Resize = 1024;
|
|
|
659
664
|
const SetRenderer = 2048;
|
|
660
665
|
const SetParser = 4096;
|
|
661
666
|
const SetPolicy = 16384;
|
|
667
|
+
const Sort = 32768;
|
|
668
|
+
const Filter = 65536;
|
|
669
|
+
const SetLabel = 131072;
|
|
670
|
+
const SetLabeler = 262144;
|
|
662
671
|
const NoOperation = 0;
|
|
663
672
|
const Move = MoveFrom | MoveTo;
|
|
664
|
-
const Update = Write | Style | Copy | Resize | SetRenderer | SetParser | SetPolicy;
|
|
673
|
+
const Update = Write | Style | Copy | Resize | SetRenderer | SetParser | SetPolicy | SetLabel | SetLabeler;
|
|
665
674
|
const InsertRows = InsertRowsAbove | InsertRowsBelow;
|
|
666
675
|
const InsertCols = InsertColsLeft | InsertColsRight;
|
|
667
676
|
const Add = InsertRows | InsertCols;
|
|
668
677
|
const Delete = RemoveRows | RemoveCols;
|
|
669
678
|
const ReadOnly = Update | Delete | Add | Move;
|
|
679
|
+
const ColumnMenu$1 = Filter | Sort | SetLabel;
|
|
680
|
+
const ViewOnly = ReadOnly | ColumnMenu$1;
|
|
670
681
|
const hasOperation = (operation2, flag) => {
|
|
671
682
|
if (operation2 === void 0) {
|
|
672
683
|
return false;
|
|
@@ -714,13 +725,27 @@ const debugOperations = (prevention) => {
|
|
|
714
725
|
if (hasOperation(prevention, SetParser)) {
|
|
715
726
|
operations2.push("SetParser");
|
|
716
727
|
}
|
|
728
|
+
if (hasOperation(prevention, SetPolicy)) {
|
|
729
|
+
operations2.push("SetPolicy");
|
|
730
|
+
}
|
|
731
|
+
if (hasOperation(prevention, SetLabel)) {
|
|
732
|
+
operations2.push("SetLabel");
|
|
733
|
+
}
|
|
734
|
+
if (hasOperation(prevention, Sort)) {
|
|
735
|
+
operations2.push("Sort");
|
|
736
|
+
}
|
|
737
|
+
if (hasOperation(prevention, Filter)) {
|
|
738
|
+
operations2.push("Filter");
|
|
739
|
+
}
|
|
717
740
|
return operations2;
|
|
718
741
|
};
|
|
719
742
|
const operation = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
720
743
|
__proto__: null,
|
|
721
744
|
Add,
|
|
745
|
+
ColumnMenu: ColumnMenu$1,
|
|
722
746
|
Copy,
|
|
723
747
|
Delete,
|
|
748
|
+
Filter,
|
|
724
749
|
InsertCols,
|
|
725
750
|
InsertColsLeft,
|
|
726
751
|
InsertColsRight,
|
|
@@ -735,11 +760,15 @@ const operation = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
735
760
|
RemoveCols,
|
|
736
761
|
RemoveRows,
|
|
737
762
|
Resize,
|
|
763
|
+
SetLabel,
|
|
764
|
+
SetLabeler,
|
|
738
765
|
SetParser,
|
|
739
766
|
SetPolicy,
|
|
740
767
|
SetRenderer,
|
|
768
|
+
Sort,
|
|
741
769
|
Style,
|
|
742
770
|
Update,
|
|
771
|
+
ViewOnly,
|
|
743
772
|
Write,
|
|
744
773
|
debugOperations,
|
|
745
774
|
hasOperation
|
|
@@ -1885,6 +1914,9 @@ class TimeDelta {
|
|
|
1885
1914
|
result = result.replace("S", String(tokens[3]).padStart(1, "0").substring(0, 1));
|
|
1886
1915
|
return result;
|
|
1887
1916
|
}
|
|
1917
|
+
toMilliseconds() {
|
|
1918
|
+
return this.date1.getTime() - this.date2.getTime();
|
|
1919
|
+
}
|
|
1888
1920
|
toJSON() {
|
|
1889
1921
|
return this.stringify();
|
|
1890
1922
|
}
|
|
@@ -3030,13 +3062,23 @@ class ArrowAction extends CoreAction {
|
|
|
3030
3062
|
if (nextY < 1 || numRows < nextY || nextX < 1 || numCols < nextX) {
|
|
3031
3063
|
return store;
|
|
3032
3064
|
}
|
|
3065
|
+
let resolvedY = nextY;
|
|
3066
|
+
if (table.isRowFiltered(resolvedY)) {
|
|
3067
|
+
const dir = deltaY >= 0 ? 1 : -1;
|
|
3068
|
+
while (resolvedY >= 1 && resolvedY <= numRows && table.isRowFiltered(resolvedY)) {
|
|
3069
|
+
resolvedY += dir;
|
|
3070
|
+
}
|
|
3071
|
+
if (resolvedY < 1 || resolvedY > numRows) {
|
|
3072
|
+
return store;
|
|
3073
|
+
}
|
|
3074
|
+
}
|
|
3033
3075
|
let { y: editorTop, x: editorLeft, height, width } = store.editorRect;
|
|
3034
3076
|
if (deltaY > 0) {
|
|
3035
|
-
for (let i = y; i <
|
|
3077
|
+
for (let i = y; i < resolvedY; i++) {
|
|
3036
3078
|
editorTop += ((_a = table.getCellByPoint({ y: i, x: 0 }, "SYSTEM")) == null ? void 0 : _a.height) || DEFAULT_HEIGHT;
|
|
3037
3079
|
}
|
|
3038
3080
|
} else if (deltaY < 0) {
|
|
3039
|
-
for (let i = y - 1; i >=
|
|
3081
|
+
for (let i = y - 1; i >= resolvedY; i--) {
|
|
3040
3082
|
editorTop -= ((_b = table.getCellByPoint({ y: i, x: 0 }, "SYSTEM")) == null ? void 0 : _b.height) || DEFAULT_HEIGHT;
|
|
3041
3083
|
}
|
|
3042
3084
|
}
|
|
@@ -3049,14 +3091,14 @@ class ArrowAction extends CoreAction {
|
|
|
3049
3091
|
editorLeft -= ((_d = table.getCellByPoint({ y: 0, x: i }, "SYSTEM")) == null ? void 0 : _d.width) || DEFAULT_WIDTH;
|
|
3050
3092
|
}
|
|
3051
3093
|
}
|
|
3052
|
-
const cell = table.getCellByPoint({ y:
|
|
3094
|
+
const cell = table.getCellByPoint({ y: resolvedY, x: nextX }, "SYSTEM");
|
|
3053
3095
|
height = (cell == null ? void 0 : cell.height) || DEFAULT_HEIGHT;
|
|
3054
3096
|
width = (cell == null ? void 0 : cell.width) || DEFAULT_WIDTH;
|
|
3055
|
-
smartScroll(table, tabularRef.current, { y:
|
|
3097
|
+
smartScroll(table, tabularRef.current, { y: resolvedY, x: nextX });
|
|
3056
3098
|
return {
|
|
3057
3099
|
...store,
|
|
3058
3100
|
selectingZone: { startY: -1, startX: -1, endY: -1, endX: -1 },
|
|
3059
|
-
choosing: { y:
|
|
3101
|
+
choosing: { y: resolvedY, x: nextX },
|
|
3060
3102
|
editorRect: { y: editorTop, x: editorLeft, height, width }
|
|
3061
3103
|
};
|
|
3062
3104
|
}
|
|
@@ -3124,6 +3166,17 @@ class WalkAction extends CoreAction {
|
|
|
3124
3166
|
if (nextY < 1 || numRows < nextY || nextX < 1 || numCols < nextX) {
|
|
3125
3167
|
return store;
|
|
3126
3168
|
}
|
|
3169
|
+
if (table.isRowFiltered(nextY)) {
|
|
3170
|
+
const dir = deltaY >= 0 ? 1 : -1;
|
|
3171
|
+
const lo = top !== -1 ? top : 1;
|
|
3172
|
+
const hi = bottom !== -1 ? bottom : numRows;
|
|
3173
|
+
while (nextY >= lo && nextY <= hi && table.isRowFiltered(nextY)) {
|
|
3174
|
+
nextY += dir;
|
|
3175
|
+
}
|
|
3176
|
+
if (nextY < lo || nextY > hi || table.isRowFiltered(nextY)) {
|
|
3177
|
+
return store;
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3127
3180
|
if (deltaY > 0) {
|
|
3128
3181
|
for (let i = y; i < nextY; i++) {
|
|
3129
3182
|
editorTop += ((_a = table.getCellByPoint({ y: i, x: 0 }, "SYSTEM")) == null ? void 0 : _a.height) || DEFAULT_HEIGHT;
|
|
@@ -3367,6 +3420,152 @@ class RemoveColsAction extends CoreAction {
|
|
|
3367
3420
|
}
|
|
3368
3421
|
}
|
|
3369
3422
|
const removeCols = new RemoveColsAction().bind();
|
|
3423
|
+
class SortRowsAction extends CoreAction {
|
|
3424
|
+
reduce(store, payload) {
|
|
3425
|
+
const { x, direction } = payload;
|
|
3426
|
+
const { tableReactive: tableRef, selectingZone, choosing } = store;
|
|
3427
|
+
const table = tableRef.current;
|
|
3428
|
+
if (table == null) {
|
|
3429
|
+
return store;
|
|
3430
|
+
}
|
|
3431
|
+
table.sortRows({
|
|
3432
|
+
x,
|
|
3433
|
+
direction,
|
|
3434
|
+
undoReflection: {
|
|
3435
|
+
sheetId: table.sheetId,
|
|
3436
|
+
selectingZone,
|
|
3437
|
+
choosing
|
|
3438
|
+
},
|
|
3439
|
+
redoReflection: {
|
|
3440
|
+
sheetId: table.sheetId,
|
|
3441
|
+
selectingZone,
|
|
3442
|
+
choosing
|
|
3443
|
+
}
|
|
3444
|
+
});
|
|
3445
|
+
return {
|
|
3446
|
+
...store,
|
|
3447
|
+
tableReactive: { current: table }
|
|
3448
|
+
};
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
const sortRows = new SortRowsAction().bind();
|
|
3452
|
+
class FilterRowsAction extends CoreAction {
|
|
3453
|
+
reduce(store, payload) {
|
|
3454
|
+
const { x, filter } = payload;
|
|
3455
|
+
const { tableReactive: tableRef, selectingZone, choosing } = store;
|
|
3456
|
+
const table = tableRef.current;
|
|
3457
|
+
if (table == null) {
|
|
3458
|
+
return store;
|
|
3459
|
+
}
|
|
3460
|
+
table.filterRows({
|
|
3461
|
+
x,
|
|
3462
|
+
filter,
|
|
3463
|
+
undoReflection: {
|
|
3464
|
+
sheetId: table.sheetId,
|
|
3465
|
+
selectingZone,
|
|
3466
|
+
choosing
|
|
3467
|
+
},
|
|
3468
|
+
redoReflection: {
|
|
3469
|
+
sheetId: table.sheetId,
|
|
3470
|
+
selectingZone,
|
|
3471
|
+
choosing
|
|
3472
|
+
}
|
|
3473
|
+
});
|
|
3474
|
+
let newChoosing = choosing;
|
|
3475
|
+
if (table.isRowFiltered(choosing.y)) {
|
|
3476
|
+
for (let y = 1; y <= table.getNumRows(); y++) {
|
|
3477
|
+
if (!table.isRowFiltered(y)) {
|
|
3478
|
+
newChoosing = { y, x: choosing.x };
|
|
3479
|
+
break;
|
|
3480
|
+
}
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3483
|
+
return {
|
|
3484
|
+
...store,
|
|
3485
|
+
choosing: newChoosing,
|
|
3486
|
+
selectingZone: newChoosing !== choosing ? resetZone : selectingZone,
|
|
3487
|
+
tableReactive: { current: table }
|
|
3488
|
+
};
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
const filterRows = new FilterRowsAction().bind();
|
|
3492
|
+
class ClearFilterRowsAction extends CoreAction {
|
|
3493
|
+
reduce(store, payload) {
|
|
3494
|
+
const { x } = payload;
|
|
3495
|
+
const { tableReactive: tableRef, selectingZone, choosing } = store;
|
|
3496
|
+
const table = tableRef.current;
|
|
3497
|
+
if (table == null) {
|
|
3498
|
+
return store;
|
|
3499
|
+
}
|
|
3500
|
+
table.clearFilterRows(
|
|
3501
|
+
x,
|
|
3502
|
+
{
|
|
3503
|
+
sheetId: table.sheetId,
|
|
3504
|
+
selectingZone,
|
|
3505
|
+
choosing
|
|
3506
|
+
},
|
|
3507
|
+
{
|
|
3508
|
+
sheetId: table.sheetId,
|
|
3509
|
+
selectingZone,
|
|
3510
|
+
choosing
|
|
3511
|
+
}
|
|
3512
|
+
);
|
|
3513
|
+
let newChoosing = choosing;
|
|
3514
|
+
if (table.isRowFiltered(choosing.y)) {
|
|
3515
|
+
for (let y = 1; y <= table.getNumRows(); y++) {
|
|
3516
|
+
if (!table.isRowFiltered(y)) {
|
|
3517
|
+
newChoosing = { y, x: choosing.x };
|
|
3518
|
+
break;
|
|
3519
|
+
}
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3522
|
+
return {
|
|
3523
|
+
...store,
|
|
3524
|
+
choosing: newChoosing,
|
|
3525
|
+
selectingZone: newChoosing !== choosing ? resetZone : selectingZone,
|
|
3526
|
+
tableReactive: { current: table }
|
|
3527
|
+
};
|
|
3528
|
+
}
|
|
3529
|
+
}
|
|
3530
|
+
const clearFilterRows = new ClearFilterRowsAction().bind();
|
|
3531
|
+
class SetColumnMenuAction extends CoreAction {
|
|
3532
|
+
reduce(store, payload) {
|
|
3533
|
+
return {
|
|
3534
|
+
...store,
|
|
3535
|
+
columnMenuState: payload
|
|
3536
|
+
};
|
|
3537
|
+
}
|
|
3538
|
+
}
|
|
3539
|
+
const setColumnMenu = new SetColumnMenuAction().bind();
|
|
3540
|
+
class SetColLabelAction extends CoreAction {
|
|
3541
|
+
reduce(store, payload) {
|
|
3542
|
+
const { x, label } = payload;
|
|
3543
|
+
const { tableReactive: tableRef, selectingZone, choosing } = store;
|
|
3544
|
+
const table = tableRef.current;
|
|
3545
|
+
if (table == null) {
|
|
3546
|
+
return store;
|
|
3547
|
+
}
|
|
3548
|
+
table.setColLabel({
|
|
3549
|
+
x,
|
|
3550
|
+
label,
|
|
3551
|
+
undoReflection: {
|
|
3552
|
+
sheetId: table.sheetId,
|
|
3553
|
+
selectingZone,
|
|
3554
|
+
choosing
|
|
3555
|
+
},
|
|
3556
|
+
redoReflection: {
|
|
3557
|
+
sheetId: table.sheetId,
|
|
3558
|
+
selectingZone,
|
|
3559
|
+
choosing
|
|
3560
|
+
}
|
|
3561
|
+
});
|
|
3562
|
+
return {
|
|
3563
|
+
...store,
|
|
3564
|
+
tableReactive: { current: table }
|
|
3565
|
+
};
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
const setColLabel = new SetColLabelAction().bind();
|
|
3370
3569
|
class setStoreAction extends CoreAction {
|
|
3371
3570
|
reduce(store, payload) {
|
|
3372
3571
|
return {
|
|
@@ -3399,7 +3598,11 @@ const userActions = {
|
|
|
3399
3598
|
insertColsLeft,
|
|
3400
3599
|
insertColsRight,
|
|
3401
3600
|
removeRows,
|
|
3402
|
-
removeCols
|
|
3601
|
+
removeCols,
|
|
3602
|
+
sortRows,
|
|
3603
|
+
filterRows,
|
|
3604
|
+
clearFilterRows,
|
|
3605
|
+
setColLabel
|
|
3403
3606
|
};
|
|
3404
3607
|
const clip = (store) => {
|
|
3405
3608
|
const { selectingZone, choosing, editorRef, tableReactive: tableRef } = store;
|
|
@@ -4816,6 +5019,26 @@ const colsRemover = async ({ store, dispatch }) => {
|
|
|
4816
5019
|
dispatch(removeCols({ numCols, x: left, operator: "USER" }));
|
|
4817
5020
|
(_a = editorRef.current) == null ? void 0 : _a.focus();
|
|
4818
5021
|
};
|
|
5022
|
+
const rowsSorterAsc = async ({ store, dispatch }, x) => {
|
|
5023
|
+
var _a;
|
|
5024
|
+
dispatch(sortRows({ x, direction: "asc" }));
|
|
5025
|
+
(_a = store.editorRef.current) == null ? void 0 : _a.focus();
|
|
5026
|
+
};
|
|
5027
|
+
const rowsSorterDesc = async ({ store, dispatch }, x) => {
|
|
5028
|
+
var _a;
|
|
5029
|
+
dispatch(sortRows({ x, direction: "desc" }));
|
|
5030
|
+
(_a = store.editorRef.current) == null ? void 0 : _a.focus();
|
|
5031
|
+
};
|
|
5032
|
+
const rowsFilterer = async ({ store, dispatch }, x, filter) => {
|
|
5033
|
+
var _a;
|
|
5034
|
+
dispatch(filterRows({ x, filter }));
|
|
5035
|
+
(_a = store.editorRef.current) == null ? void 0 : _a.focus();
|
|
5036
|
+
};
|
|
5037
|
+
const rowsFilterClearer = async ({ store, dispatch }, x) => {
|
|
5038
|
+
var _a;
|
|
5039
|
+
dispatch(clearFilterRows({ x }));
|
|
5040
|
+
(_a = store.editorRef.current) == null ? void 0 : _a.focus();
|
|
5041
|
+
};
|
|
4819
5042
|
const syncers = {
|
|
4820
5043
|
copy: copier,
|
|
4821
5044
|
cut: cutter,
|
|
@@ -4827,7 +5050,11 @@ const syncers = {
|
|
|
4827
5050
|
insertColsLeft: colsInserterLeft,
|
|
4828
5051
|
insertColsRight: colsInserterRight,
|
|
4829
5052
|
removeRows: rowsRemover,
|
|
4830
|
-
removeCols: colsRemover
|
|
5053
|
+
removeCols: colsRemover,
|
|
5054
|
+
sortRowsAsc: rowsSorterAsc,
|
|
5055
|
+
sortRowsDesc: rowsSorterDesc,
|
|
5056
|
+
filterRows: rowsFilterer,
|
|
5057
|
+
clearFilter: rowsFilterClearer
|
|
4831
5058
|
};
|
|
4832
5059
|
const ContextMenu = () => {
|
|
4833
5060
|
const { store, dispatch } = useContext(Context);
|
|
@@ -5121,6 +5348,310 @@ const defaultContextMenuItems = [
|
|
|
5121
5348
|
UndoItem,
|
|
5122
5349
|
RedoItem
|
|
5123
5350
|
];
|
|
5351
|
+
const METHOD_LABELS = {
|
|
5352
|
+
eq: "=",
|
|
5353
|
+
ne: "≠",
|
|
5354
|
+
gt: ">",
|
|
5355
|
+
gte: "≥",
|
|
5356
|
+
lt: "<",
|
|
5357
|
+
lte: "≤",
|
|
5358
|
+
blank: "Blank",
|
|
5359
|
+
nonblank: "Nonblank",
|
|
5360
|
+
includes: "Includes",
|
|
5361
|
+
excludes: "Excludes"
|
|
5362
|
+
};
|
|
5363
|
+
const NO_VALUE_METHODS = ["blank", "nonblank"];
|
|
5364
|
+
const DEFAULT_CONDITION = { method: "eq", value: [""] };
|
|
5365
|
+
const ColumnMenu = () => {
|
|
5366
|
+
const { store, dispatch } = useContext(Context);
|
|
5367
|
+
const { columnMenuState, tableReactive: tableRef, editorRef } = store;
|
|
5368
|
+
const table = tableRef.current;
|
|
5369
|
+
const [conditions, setConditions] = useState([{ ...DEFAULT_CONDITION }]);
|
|
5370
|
+
const [mode, setMode] = useState("or");
|
|
5371
|
+
const [label, setLabel] = useState("");
|
|
5372
|
+
const labelInputRef = useRef(null);
|
|
5373
|
+
const x = columnMenuState == null ? void 0 : columnMenuState.x;
|
|
5374
|
+
const position = columnMenuState == null ? void 0 : columnMenuState.position;
|
|
5375
|
+
useEffect(() => {
|
|
5376
|
+
if (x != null && table) {
|
|
5377
|
+
const colCell2 = table.getCellByPoint({ y: 0, x }, "SYSTEM");
|
|
5378
|
+
const existing = colCell2 == null ? void 0 : colCell2.filter;
|
|
5379
|
+
if (existing && existing.conditions.length > 0) {
|
|
5380
|
+
setConditions(existing.conditions.map((c) => ({ ...c, value: [...c.value] })));
|
|
5381
|
+
setMode(existing.mode || "or");
|
|
5382
|
+
} else {
|
|
5383
|
+
setConditions([{ ...DEFAULT_CONDITION, value: [""] }]);
|
|
5384
|
+
setMode("or");
|
|
5385
|
+
}
|
|
5386
|
+
setLabel((colCell2 == null ? void 0 : colCell2.label) ?? "");
|
|
5387
|
+
}
|
|
5388
|
+
}, [x]);
|
|
5389
|
+
const handleClose = useCallback(() => {
|
|
5390
|
+
var _a;
|
|
5391
|
+
dispatch(setColumnMenu(null));
|
|
5392
|
+
(_a = editorRef.current) == null ? void 0 : _a.focus();
|
|
5393
|
+
}, [dispatch, editorRef]);
|
|
5394
|
+
const handleApplyLabel = useCallback(() => {
|
|
5395
|
+
var _a;
|
|
5396
|
+
if (x == null) {
|
|
5397
|
+
return;
|
|
5398
|
+
}
|
|
5399
|
+
dispatch(setColLabel({ x, label }));
|
|
5400
|
+
dispatch(setColumnMenu(null));
|
|
5401
|
+
(_a = editorRef.current) == null ? void 0 : _a.focus();
|
|
5402
|
+
}, [dispatch, x, label, editorRef]);
|
|
5403
|
+
const handleSortAsc = useCallback(() => {
|
|
5404
|
+
var _a;
|
|
5405
|
+
if (x == null) {
|
|
5406
|
+
return;
|
|
5407
|
+
}
|
|
5408
|
+
dispatch(sortRows({ x, direction: "asc" }));
|
|
5409
|
+
dispatch(setColumnMenu(null));
|
|
5410
|
+
(_a = editorRef.current) == null ? void 0 : _a.focus();
|
|
5411
|
+
}, [dispatch, x, editorRef]);
|
|
5412
|
+
const handleSortDesc = useCallback(() => {
|
|
5413
|
+
var _a;
|
|
5414
|
+
if (x == null) {
|
|
5415
|
+
return;
|
|
5416
|
+
}
|
|
5417
|
+
dispatch(sortRows({ x, direction: "desc" }));
|
|
5418
|
+
dispatch(setColumnMenu(null));
|
|
5419
|
+
(_a = editorRef.current) == null ? void 0 : _a.focus();
|
|
5420
|
+
}, [dispatch, x, editorRef]);
|
|
5421
|
+
const handleApplyFilter = useCallback(() => {
|
|
5422
|
+
var _a;
|
|
5423
|
+
if (x == null) {
|
|
5424
|
+
return;
|
|
5425
|
+
}
|
|
5426
|
+
const valid = conditions.filter((c) => {
|
|
5427
|
+
if (NO_VALUE_METHODS.includes(c.method)) {
|
|
5428
|
+
return true;
|
|
5429
|
+
}
|
|
5430
|
+
return c.value.some((v) => v.trim() !== "");
|
|
5431
|
+
});
|
|
5432
|
+
if (valid.length === 0) {
|
|
5433
|
+
dispatch(clearFilterRows({ x }));
|
|
5434
|
+
} else {
|
|
5435
|
+
dispatch(
|
|
5436
|
+
filterRows({
|
|
5437
|
+
x,
|
|
5438
|
+
filter: { mode, conditions: valid }
|
|
5439
|
+
})
|
|
5440
|
+
);
|
|
5441
|
+
}
|
|
5442
|
+
dispatch(setColumnMenu(null));
|
|
5443
|
+
(_a = editorRef.current) == null ? void 0 : _a.focus();
|
|
5444
|
+
}, [dispatch, x, conditions, mode, editorRef]);
|
|
5445
|
+
const handleResetColumn = useCallback(() => {
|
|
5446
|
+
var _a;
|
|
5447
|
+
if (x == null) return;
|
|
5448
|
+
dispatch(clearFilterRows({ x }));
|
|
5449
|
+
setConditions([{ ...DEFAULT_CONDITION, value: [""] }]);
|
|
5450
|
+
setMode("or");
|
|
5451
|
+
dispatch(setColumnMenu(null));
|
|
5452
|
+
(_a = editorRef.current) == null ? void 0 : _a.focus();
|
|
5453
|
+
}, [dispatch, x, editorRef]);
|
|
5454
|
+
const handleResetAll = useCallback(() => {
|
|
5455
|
+
var _a;
|
|
5456
|
+
dispatch(clearFilterRows({}));
|
|
5457
|
+
setConditions([{ ...DEFAULT_CONDITION, value: [""] }]);
|
|
5458
|
+
setMode("or");
|
|
5459
|
+
dispatch(setColumnMenu(null));
|
|
5460
|
+
(_a = editorRef.current) == null ? void 0 : _a.focus();
|
|
5461
|
+
}, [dispatch, editorRef]);
|
|
5462
|
+
const updateCondition = useCallback((index, patch) => {
|
|
5463
|
+
setConditions((prev) => {
|
|
5464
|
+
const next = [...prev];
|
|
5465
|
+
next[index] = { ...next[index], ...patch };
|
|
5466
|
+
return next;
|
|
5467
|
+
});
|
|
5468
|
+
}, []);
|
|
5469
|
+
const addCondition = useCallback(() => {
|
|
5470
|
+
setConditions((prev) => [...prev, { ...DEFAULT_CONDITION, value: [""] }]);
|
|
5471
|
+
}, []);
|
|
5472
|
+
const removeCondition = useCallback((index) => {
|
|
5473
|
+
setConditions((prev) => {
|
|
5474
|
+
if (prev.length <= 1) {
|
|
5475
|
+
return [{ ...DEFAULT_CONDITION, value: [""] }];
|
|
5476
|
+
}
|
|
5477
|
+
return prev.filter((_, i) => i !== index);
|
|
5478
|
+
});
|
|
5479
|
+
}, []);
|
|
5480
|
+
if (!columnMenuState || !table || x == null || !position) {
|
|
5481
|
+
return null;
|
|
5482
|
+
}
|
|
5483
|
+
const hasAnyFilter = table.hasActiveFilters();
|
|
5484
|
+
const colCell = table.getCellByPoint({ y: 0, x }, "SYSTEM");
|
|
5485
|
+
const sortDisabled = hasOperation(colCell == null ? void 0 : colCell.prevention, Sort);
|
|
5486
|
+
const filterDisabled = hasOperation(colCell == null ? void 0 : colCell.prevention, Filter);
|
|
5487
|
+
const labelDisabled = hasOperation(colCell == null ? void 0 : colCell.prevention, SetLabel);
|
|
5488
|
+
const labelPlaceholder = table.getLabel(void 0, colCell == null ? void 0 : colCell.labeler, x) ?? x2c(x);
|
|
5489
|
+
const insertDisabled = table.maxNumCols !== -1 && table.getNumCols() + 1 > table.maxNumCols;
|
|
5490
|
+
insertDisabled || hasOperation(colCell == null ? void 0 : colCell.prevention, InsertColsLeft);
|
|
5491
|
+
insertDisabled || hasOperation(colCell == null ? void 0 : colCell.prevention, InsertColsRight);
|
|
5492
|
+
table.minNumCols !== -1 && table.getNumCols() - 1 < table.minNumCols || hasOperation(colCell == null ? void 0 : colCell.prevention, RemoveCols);
|
|
5493
|
+
return /* @__PURE__ */ jsx(
|
|
5494
|
+
Fixed,
|
|
5495
|
+
{
|
|
5496
|
+
className: "gs-column-menu-modal",
|
|
5497
|
+
onClick: (e) => {
|
|
5498
|
+
e.preventDefault();
|
|
5499
|
+
handleClose();
|
|
5500
|
+
return false;
|
|
5501
|
+
},
|
|
5502
|
+
children: /* @__PURE__ */ jsx(
|
|
5503
|
+
"div",
|
|
5504
|
+
{
|
|
5505
|
+
className: "gs-column-menu",
|
|
5506
|
+
style: { top: position.y, left: position.x },
|
|
5507
|
+
onClick: (e) => e.stopPropagation(),
|
|
5508
|
+
children: /* @__PURE__ */ jsxs("ul", { children: [
|
|
5509
|
+
/* @__PURE__ */ jsxs("li", { className: `gs-column-menu-filter${filterDisabled ? " gs-disabled" : ""}`, children: [
|
|
5510
|
+
/* @__PURE__ */ jsxs("div", { className: "gs-filter-header", children: [
|
|
5511
|
+
/* @__PURE__ */ jsx("div", { className: "gs-menu-name", children: "Filter" }),
|
|
5512
|
+
/* @__PURE__ */ jsx("button", { className: "gs-filter-add-btn", onClick: addCondition, disabled: filterDisabled, children: "+ ADD" }),
|
|
5513
|
+
/* @__PURE__ */ jsxs("div", { className: `gs-filter-mode-toggle${conditions.length <= 1 ? " gs-disabled" : ""}`, children: [
|
|
5514
|
+
/* @__PURE__ */ jsxs("label", { className: mode === "and" ? "gs-active" : "", children: [
|
|
5515
|
+
/* @__PURE__ */ jsx(
|
|
5516
|
+
"input",
|
|
5517
|
+
{
|
|
5518
|
+
type: "radio",
|
|
5519
|
+
name: "gs-filter-mode",
|
|
5520
|
+
checked: mode === "and",
|
|
5521
|
+
onChange: () => setMode("and"),
|
|
5522
|
+
disabled: filterDisabled || conditions.length <= 1
|
|
5523
|
+
}
|
|
5524
|
+
),
|
|
5525
|
+
"AND"
|
|
5526
|
+
] }),
|
|
5527
|
+
/* @__PURE__ */ jsxs("label", { className: mode === "or" ? "gs-active" : "", children: [
|
|
5528
|
+
/* @__PURE__ */ jsx(
|
|
5529
|
+
"input",
|
|
5530
|
+
{
|
|
5531
|
+
type: "radio",
|
|
5532
|
+
name: "gs-filter-mode",
|
|
5533
|
+
checked: mode === "or",
|
|
5534
|
+
onChange: () => setMode("or"),
|
|
5535
|
+
disabled: filterDisabled || conditions.length <= 1
|
|
5536
|
+
}
|
|
5537
|
+
),
|
|
5538
|
+
"OR"
|
|
5539
|
+
] })
|
|
5540
|
+
] })
|
|
5541
|
+
] }),
|
|
5542
|
+
/* @__PURE__ */ jsx("div", { className: "gs-filter-conditions", children: conditions.map((cond, i) => /* @__PURE__ */ jsxs("div", { className: "gs-filter-condition-row", children: [
|
|
5543
|
+
/* @__PURE__ */ jsx(
|
|
5544
|
+
"select",
|
|
5545
|
+
{
|
|
5546
|
+
className: "gs-filter-method-select",
|
|
5547
|
+
value: cond.method,
|
|
5548
|
+
disabled: filterDisabled,
|
|
5549
|
+
onChange: (e) => updateCondition(i, {
|
|
5550
|
+
method: e.target.value
|
|
5551
|
+
}),
|
|
5552
|
+
children: Object.keys(METHOD_LABELS).map((m) => /* @__PURE__ */ jsx("option", { value: m, children: METHOD_LABELS[m] }, m))
|
|
5553
|
+
}
|
|
5554
|
+
),
|
|
5555
|
+
!NO_VALUE_METHODS.includes(cond.method) && /* @__PURE__ */ jsx(
|
|
5556
|
+
"input",
|
|
5557
|
+
{
|
|
5558
|
+
className: "gs-filter-value-input",
|
|
5559
|
+
type: "text",
|
|
5560
|
+
placeholder: "Value",
|
|
5561
|
+
value: cond.value[0] || "",
|
|
5562
|
+
disabled: filterDisabled,
|
|
5563
|
+
onChange: (e) => updateCondition(i, { value: [e.target.value] }),
|
|
5564
|
+
onKeyDown: (e) => {
|
|
5565
|
+
if (e.nativeEvent.isComposing) {
|
|
5566
|
+
return;
|
|
5567
|
+
}
|
|
5568
|
+
if (e.key === "Enter") {
|
|
5569
|
+
handleApplyFilter();
|
|
5570
|
+
}
|
|
5571
|
+
if (e.key === "Escape") {
|
|
5572
|
+
handleClose();
|
|
5573
|
+
}
|
|
5574
|
+
}
|
|
5575
|
+
}
|
|
5576
|
+
),
|
|
5577
|
+
/* @__PURE__ */ jsx(
|
|
5578
|
+
"button",
|
|
5579
|
+
{
|
|
5580
|
+
className: "gs-filter-remove-btn",
|
|
5581
|
+
onClick: () => removeCondition(i),
|
|
5582
|
+
disabled: filterDisabled,
|
|
5583
|
+
title: "Remove condition",
|
|
5584
|
+
children: "✕"
|
|
5585
|
+
}
|
|
5586
|
+
)
|
|
5587
|
+
] }, i)) }),
|
|
5588
|
+
/* @__PURE__ */ jsxs("div", { className: "gs-filter-actions", children: [
|
|
5589
|
+
hasAnyFilter && /* @__PURE__ */ jsx("button", { className: "gs-filter-reset-all-btn", onClick: handleResetAll, disabled: filterDisabled, children: "RESET ALL" }),
|
|
5590
|
+
/* @__PURE__ */ jsxs("div", { className: "gs-filter-actions-right", children: [
|
|
5591
|
+
(colCell == null ? void 0 : colCell.filter) && /* @__PURE__ */ jsx("button", { className: "gs-filter-reset-btn", onClick: handleResetColumn, disabled: filterDisabled, children: "RESET" }),
|
|
5592
|
+
/* @__PURE__ */ jsx("button", { className: "gs-filter-apply-btn", onClick: handleApplyFilter, disabled: filterDisabled, children: "APPLY" })
|
|
5593
|
+
] })
|
|
5594
|
+
] })
|
|
5595
|
+
] }),
|
|
5596
|
+
/* @__PURE__ */ jsx("li", { className: "gs-menu-divider" }),
|
|
5597
|
+
/* @__PURE__ */ jsx(
|
|
5598
|
+
"li",
|
|
5599
|
+
{
|
|
5600
|
+
className: sortDisabled ? "gs-disabled" : "gs-enabled",
|
|
5601
|
+
onClick: () => {
|
|
5602
|
+
if (!sortDisabled) {
|
|
5603
|
+
handleSortAsc();
|
|
5604
|
+
}
|
|
5605
|
+
},
|
|
5606
|
+
children: /* @__PURE__ */ jsx("div", { className: "gs-menu-name", children: "Sort A to Z" })
|
|
5607
|
+
}
|
|
5608
|
+
),
|
|
5609
|
+
/* @__PURE__ */ jsx(
|
|
5610
|
+
"li",
|
|
5611
|
+
{
|
|
5612
|
+
className: sortDisabled ? "gs-disabled" : "gs-enabled",
|
|
5613
|
+
onClick: () => {
|
|
5614
|
+
if (!sortDisabled) {
|
|
5615
|
+
handleSortDesc();
|
|
5616
|
+
}
|
|
5617
|
+
},
|
|
5618
|
+
children: /* @__PURE__ */ jsx("div", { className: "gs-menu-name", children: "Sort Z to A" })
|
|
5619
|
+
}
|
|
5620
|
+
),
|
|
5621
|
+
/* @__PURE__ */ jsx("li", { className: "gs-menu-divider" }),
|
|
5622
|
+
/* @__PURE__ */ jsx("li", { className: `gs-column-menu-label${labelDisabled ? " gs-disabled" : ""}`, children: /* @__PURE__ */ jsxs("div", { className: "gs-label-input-row", children: [
|
|
5623
|
+
/* @__PURE__ */ jsx("div", { className: "gs-menu-name", children: "Label:" }),
|
|
5624
|
+
/* @__PURE__ */ jsx(
|
|
5625
|
+
"input",
|
|
5626
|
+
{
|
|
5627
|
+
ref: labelInputRef,
|
|
5628
|
+
className: "gs-label-input",
|
|
5629
|
+
type: "text",
|
|
5630
|
+
placeholder: labelPlaceholder,
|
|
5631
|
+
value: label,
|
|
5632
|
+
disabled: labelDisabled,
|
|
5633
|
+
onChange: (e) => setLabel(e.target.value),
|
|
5634
|
+
onKeyDown: (e) => {
|
|
5635
|
+
if (e.nativeEvent.isComposing) {
|
|
5636
|
+
return;
|
|
5637
|
+
}
|
|
5638
|
+
if (e.key === "Enter") {
|
|
5639
|
+
handleApplyLabel();
|
|
5640
|
+
}
|
|
5641
|
+
if (e.key === "Escape") {
|
|
5642
|
+
handleClose();
|
|
5643
|
+
}
|
|
5644
|
+
}
|
|
5645
|
+
}
|
|
5646
|
+
),
|
|
5647
|
+
/* @__PURE__ */ jsx("button", { className: "gs-label-apply-btn", onClick: handleApplyLabel, disabled: labelDisabled, children: "UPDATE" })
|
|
5648
|
+
] }) })
|
|
5649
|
+
] })
|
|
5650
|
+
}
|
|
5651
|
+
)
|
|
5652
|
+
}
|
|
5653
|
+
);
|
|
5654
|
+
};
|
|
5124
5655
|
var utc$2 = { exports: {} };
|
|
5125
5656
|
var utc$1 = utc$2.exports;
|
|
5126
5657
|
var hasRequiredUtc;
|
|
@@ -5276,11 +5807,103 @@ var timezoneExports = requireTimezone();
|
|
|
5276
5807
|
const timezone = /* @__PURE__ */ getDefaultExportFromCjs(timezoneExports);
|
|
5277
5808
|
dayjs.extend(timezone);
|
|
5278
5809
|
dayjs.extend(utc);
|
|
5279
|
-
const BOOLS = { true: true, false: false };
|
|
5280
5810
|
const NUMS = /* @__PURE__ */ new Set(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]);
|
|
5281
5811
|
const NUMS_Z = /* @__PURE__ */ new Set([...NUMS, "Z", "z"]);
|
|
5282
5812
|
const JFMASOND = /* @__PURE__ */ new Set(["J", "F", "M", "A", "S", "O", "N", "D", ...NUMS]);
|
|
5283
5813
|
const NBRYNLGPTVC = /* @__PURE__ */ new Set(["N", "B", "R", "Y", "N", "L", "G", "P", "T", "V", "C", ...NUMS_Z]);
|
|
5814
|
+
const DATE_WORDS = /* @__PURE__ */ new Set([
|
|
5815
|
+
"jan",
|
|
5816
|
+
"feb",
|
|
5817
|
+
"mar",
|
|
5818
|
+
"apr",
|
|
5819
|
+
"may",
|
|
5820
|
+
"jun",
|
|
5821
|
+
"jul",
|
|
5822
|
+
"aug",
|
|
5823
|
+
"sep",
|
|
5824
|
+
"oct",
|
|
5825
|
+
"nov",
|
|
5826
|
+
"dec",
|
|
5827
|
+
"january",
|
|
5828
|
+
"february",
|
|
5829
|
+
"march",
|
|
5830
|
+
"april",
|
|
5831
|
+
"june",
|
|
5832
|
+
"july",
|
|
5833
|
+
"august",
|
|
5834
|
+
"september",
|
|
5835
|
+
"october",
|
|
5836
|
+
"november",
|
|
5837
|
+
"december",
|
|
5838
|
+
"mon",
|
|
5839
|
+
"tue",
|
|
5840
|
+
"wed",
|
|
5841
|
+
"thu",
|
|
5842
|
+
"fri",
|
|
5843
|
+
"sat",
|
|
5844
|
+
"sun",
|
|
5845
|
+
"monday",
|
|
5846
|
+
"tuesday",
|
|
5847
|
+
"wednesday",
|
|
5848
|
+
"thursday",
|
|
5849
|
+
"friday",
|
|
5850
|
+
"saturday",
|
|
5851
|
+
"sunday",
|
|
5852
|
+
"am",
|
|
5853
|
+
"pm",
|
|
5854
|
+
"utc",
|
|
5855
|
+
"gmt",
|
|
5856
|
+
"est",
|
|
5857
|
+
"cst",
|
|
5858
|
+
"mst",
|
|
5859
|
+
"pst",
|
|
5860
|
+
"jst",
|
|
5861
|
+
"cet",
|
|
5862
|
+
"eet",
|
|
5863
|
+
"ist",
|
|
5864
|
+
"aest",
|
|
5865
|
+
"edt",
|
|
5866
|
+
"cdt",
|
|
5867
|
+
"mdt",
|
|
5868
|
+
"pdt",
|
|
5869
|
+
"bst",
|
|
5870
|
+
"hst",
|
|
5871
|
+
"akst",
|
|
5872
|
+
"akdt",
|
|
5873
|
+
"nzst",
|
|
5874
|
+
"nzdt",
|
|
5875
|
+
"t",
|
|
5876
|
+
"z"
|
|
5877
|
+
]);
|
|
5878
|
+
function parseDate(value) {
|
|
5879
|
+
const first = value[0];
|
|
5880
|
+
if (first == null || !JFMASOND.has(first.toUpperCase())) {
|
|
5881
|
+
return;
|
|
5882
|
+
}
|
|
5883
|
+
if (!NBRYNLGPTVC.has(value[value.length - 1].toUpperCase())) {
|
|
5884
|
+
return;
|
|
5885
|
+
}
|
|
5886
|
+
if (value.match(/[=*&#@!?[\]{}"'()|%\\<>~+\r\n]/)) {
|
|
5887
|
+
return;
|
|
5888
|
+
}
|
|
5889
|
+
const words = value.split(/[\s,/\-:.]+/).filter(Boolean);
|
|
5890
|
+
for (const word of words) {
|
|
5891
|
+
if (/^[a-zA-Z]+$/.test(word) && !DATE_WORDS.has(word.toLowerCase())) {
|
|
5892
|
+
return;
|
|
5893
|
+
}
|
|
5894
|
+
}
|
|
5895
|
+
let timeZone = "UTC";
|
|
5896
|
+
try {
|
|
5897
|
+
timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
5898
|
+
} catch (e) {
|
|
5899
|
+
}
|
|
5900
|
+
try {
|
|
5901
|
+
const day = dayjs.tz(value, timeZone);
|
|
5902
|
+
return day.toDate();
|
|
5903
|
+
} catch (e) {
|
|
5904
|
+
}
|
|
5905
|
+
}
|
|
5906
|
+
const BOOLS = { true: true, false: false };
|
|
5284
5907
|
class Parser2 {
|
|
5285
5908
|
constructor(props) {
|
|
5286
5909
|
this.applyMixins(props == null ? void 0 : props.mixins);
|
|
@@ -5368,26 +5991,7 @@ class Parser2 {
|
|
|
5368
5991
|
return TimeDelta.parse(value);
|
|
5369
5992
|
}
|
|
5370
5993
|
date(value, cell) {
|
|
5371
|
-
|
|
5372
|
-
if (first == null || !JFMASOND.has(first.toUpperCase())) {
|
|
5373
|
-
return;
|
|
5374
|
-
}
|
|
5375
|
-
if (!NBRYNLGPTVC.has(value[value.length - 1].toUpperCase())) {
|
|
5376
|
-
return;
|
|
5377
|
-
}
|
|
5378
|
-
if (value.match(/[=*&#@!?[\]{}"'()|%\\<>~+\r\n]/)) {
|
|
5379
|
-
return;
|
|
5380
|
-
}
|
|
5381
|
-
let timeZone = "UTC";
|
|
5382
|
-
try {
|
|
5383
|
-
timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
5384
|
-
} catch (e) {
|
|
5385
|
-
}
|
|
5386
|
-
try {
|
|
5387
|
-
const day = dayjs.tz(value, timeZone);
|
|
5388
|
-
return day.toDate();
|
|
5389
|
-
} catch (e) {
|
|
5390
|
-
}
|
|
5994
|
+
return parseDate(value);
|
|
5391
5995
|
}
|
|
5392
5996
|
}
|
|
5393
5997
|
const defaultParser = new Parser2();
|
|
@@ -7658,6 +8262,174 @@ class Policy {
|
|
|
7658
8262
|
}
|
|
7659
8263
|
}
|
|
7660
8264
|
const defaultPolicy = new Policy();
|
|
8265
|
+
const _str = (v) => v == null ? "" : String(v);
|
|
8266
|
+
function detectType(cellValue) {
|
|
8267
|
+
if (typeof cellValue === "number") {
|
|
8268
|
+
return "number";
|
|
8269
|
+
}
|
|
8270
|
+
if (cellValue instanceof Date) {
|
|
8271
|
+
return "date";
|
|
8272
|
+
}
|
|
8273
|
+
if (TimeDelta.is(cellValue)) {
|
|
8274
|
+
return "timedelta";
|
|
8275
|
+
}
|
|
8276
|
+
if (typeof cellValue === "boolean") {
|
|
8277
|
+
return "boolean";
|
|
8278
|
+
}
|
|
8279
|
+
return "string";
|
|
8280
|
+
}
|
|
8281
|
+
function parseAsType(v, type) {
|
|
8282
|
+
switch (type) {
|
|
8283
|
+
case "number": {
|
|
8284
|
+
let s = v.replace(/[,_]/g, "");
|
|
8285
|
+
let scale = 1;
|
|
8286
|
+
if (s.endsWith("%")) {
|
|
8287
|
+
s = s.slice(0, -1);
|
|
8288
|
+
scale = 0.01;
|
|
8289
|
+
}
|
|
8290
|
+
const n = Number(s);
|
|
8291
|
+
return { ok: !isNaN(n), num: n * scale };
|
|
8292
|
+
}
|
|
8293
|
+
case "date": {
|
|
8294
|
+
const d = parseDate(v);
|
|
8295
|
+
if (!d) {
|
|
8296
|
+
return { ok: false, num: NaN };
|
|
8297
|
+
}
|
|
8298
|
+
return { ok: true, num: d.getTime() };
|
|
8299
|
+
}
|
|
8300
|
+
case "timedelta": {
|
|
8301
|
+
const td = TimeDelta.parse(v);
|
|
8302
|
+
return td ? { ok: true, num: td.toMilliseconds() } : { ok: false, num: NaN };
|
|
8303
|
+
}
|
|
8304
|
+
case "boolean": {
|
|
8305
|
+
const bv = v.toLowerCase();
|
|
8306
|
+
if (bv === "true") {
|
|
8307
|
+
return { ok: true, num: 1 };
|
|
8308
|
+
}
|
|
8309
|
+
if (bv === "false") {
|
|
8310
|
+
return { ok: true, num: 0 };
|
|
8311
|
+
}
|
|
8312
|
+
return { ok: false, num: NaN };
|
|
8313
|
+
}
|
|
8314
|
+
default:
|
|
8315
|
+
return { ok: false, num: NaN };
|
|
8316
|
+
}
|
|
8317
|
+
}
|
|
8318
|
+
function toNumeric(cellValue, type) {
|
|
8319
|
+
switch (type) {
|
|
8320
|
+
case "number":
|
|
8321
|
+
return cellValue;
|
|
8322
|
+
case "date":
|
|
8323
|
+
return cellValue.getTime();
|
|
8324
|
+
case "timedelta":
|
|
8325
|
+
return TimeDelta.ensure(cellValue).toMilliseconds();
|
|
8326
|
+
case "boolean":
|
|
8327
|
+
return cellValue ? 1 : 0;
|
|
8328
|
+
default:
|
|
8329
|
+
return NaN;
|
|
8330
|
+
}
|
|
8331
|
+
}
|
|
8332
|
+
const filterEq = (condition, cellValue) => {
|
|
8333
|
+
const vt = detectType(cellValue);
|
|
8334
|
+
if (vt === "string") {
|
|
8335
|
+
const s = _str(cellValue);
|
|
8336
|
+
return condition.value.some((v) => s === v);
|
|
8337
|
+
}
|
|
8338
|
+
const cellNum = toNumeric(cellValue, vt);
|
|
8339
|
+
return condition.value.some((v) => {
|
|
8340
|
+
const parsed = parseAsType(v, vt);
|
|
8341
|
+
return parsed.ok && cellNum === parsed.num;
|
|
8342
|
+
});
|
|
8343
|
+
};
|
|
8344
|
+
const filterNe = (condition, cellValue) => {
|
|
8345
|
+
const vt = detectType(cellValue);
|
|
8346
|
+
if (vt === "string") {
|
|
8347
|
+
const s = _str(cellValue);
|
|
8348
|
+
return !condition.value.some((v) => s === v);
|
|
8349
|
+
}
|
|
8350
|
+
const cellNum = toNumeric(cellValue, vt);
|
|
8351
|
+
return !condition.value.some((v) => {
|
|
8352
|
+
const parsed = parseAsType(v, vt);
|
|
8353
|
+
return parsed.ok && cellNum === parsed.num;
|
|
8354
|
+
});
|
|
8355
|
+
};
|
|
8356
|
+
const filterGt = (condition, cellValue) => {
|
|
8357
|
+
const vt = detectType(cellValue);
|
|
8358
|
+
if (vt === "string") {
|
|
8359
|
+
return _str(cellValue) > condition.value[0];
|
|
8360
|
+
}
|
|
8361
|
+
const cellNum = toNumeric(cellValue, vt);
|
|
8362
|
+
const parsed = parseAsType(condition.value[0], vt);
|
|
8363
|
+
return parsed.ok && cellNum > parsed.num;
|
|
8364
|
+
};
|
|
8365
|
+
const filterGte = (condition, cellValue) => {
|
|
8366
|
+
const vt = detectType(cellValue);
|
|
8367
|
+
if (vt === "string") {
|
|
8368
|
+
return _str(cellValue) >= condition.value[0];
|
|
8369
|
+
}
|
|
8370
|
+
const cellNum = toNumeric(cellValue, vt);
|
|
8371
|
+
const parsed = parseAsType(condition.value[0], vt);
|
|
8372
|
+
return parsed.ok && cellNum >= parsed.num;
|
|
8373
|
+
};
|
|
8374
|
+
const filterLt = (condition, cellValue) => {
|
|
8375
|
+
const vt = detectType(cellValue);
|
|
8376
|
+
if (vt === "string") {
|
|
8377
|
+
return _str(cellValue) < condition.value[0];
|
|
8378
|
+
}
|
|
8379
|
+
const cellNum = toNumeric(cellValue, vt);
|
|
8380
|
+
const parsed = parseAsType(condition.value[0], vt);
|
|
8381
|
+
return parsed.ok && cellNum < parsed.num;
|
|
8382
|
+
};
|
|
8383
|
+
const filterLte = (condition, cellValue) => {
|
|
8384
|
+
const vt = detectType(cellValue);
|
|
8385
|
+
if (vt === "string") {
|
|
8386
|
+
return _str(cellValue) <= condition.value[0];
|
|
8387
|
+
}
|
|
8388
|
+
const cellNum = toNumeric(cellValue, vt);
|
|
8389
|
+
const parsed = parseAsType(condition.value[0], vt);
|
|
8390
|
+
return parsed.ok && cellNum <= parsed.num;
|
|
8391
|
+
};
|
|
8392
|
+
const filterBlank = (_condition, cellValue) => {
|
|
8393
|
+
return cellValue == null || _str(cellValue) === "";
|
|
8394
|
+
};
|
|
8395
|
+
const filterNonblank = (_condition, cellValue) => {
|
|
8396
|
+
return cellValue != null && _str(cellValue) !== "";
|
|
8397
|
+
};
|
|
8398
|
+
const filterIncludes = (condition, cellValue) => {
|
|
8399
|
+
const s = _str(cellValue).toLowerCase();
|
|
8400
|
+
return condition.value.some((v) => s.includes(v.toLowerCase()));
|
|
8401
|
+
};
|
|
8402
|
+
const filterExcludes = (condition, cellValue) => {
|
|
8403
|
+
const s = _str(cellValue).toLowerCase();
|
|
8404
|
+
return !condition.value.some((v) => s.includes(v.toLowerCase()));
|
|
8405
|
+
};
|
|
8406
|
+
const filterFunctions = {
|
|
8407
|
+
eq: filterEq,
|
|
8408
|
+
ne: filterNe,
|
|
8409
|
+
gt: filterGt,
|
|
8410
|
+
gte: filterGte,
|
|
8411
|
+
lt: filterLt,
|
|
8412
|
+
lte: filterLte,
|
|
8413
|
+
blank: filterBlank,
|
|
8414
|
+
nonblank: filterNonblank,
|
|
8415
|
+
includes: filterIncludes,
|
|
8416
|
+
excludes: filterExcludes
|
|
8417
|
+
};
|
|
8418
|
+
function evaluateFilterCondition(condition, cellValue) {
|
|
8419
|
+
const fn = filterFunctions[condition.method];
|
|
8420
|
+
return fn ? fn(condition, cellValue) : true;
|
|
8421
|
+
}
|
|
8422
|
+
function evaluateFilterConfig(filter, cellValue) {
|
|
8423
|
+
const mode = filter.mode ?? "or";
|
|
8424
|
+
if (filter.conditions.length === 0) {
|
|
8425
|
+
return true;
|
|
8426
|
+
}
|
|
8427
|
+
if (mode === "and") {
|
|
8428
|
+
return filter.conditions.every((c) => evaluateFilterCondition(c, cellValue));
|
|
8429
|
+
} else {
|
|
8430
|
+
return filter.conditions.some((c) => evaluateFilterCondition(c, cellValue));
|
|
8431
|
+
}
|
|
8432
|
+
}
|
|
7661
8433
|
class ReferencePreserver {
|
|
7662
8434
|
constructor(table) {
|
|
7663
8435
|
this.map = {};
|
|
@@ -7709,6 +8481,7 @@ class Table {
|
|
|
7709
8481
|
this.idsToBeIdentified = [];
|
|
7710
8482
|
this.totalWidth = 0;
|
|
7711
8483
|
this.totalHeight = 0;
|
|
8484
|
+
this.fullHeight = 0;
|
|
7712
8485
|
this.version = 0;
|
|
7713
8486
|
this.area = { top: 0, left: 0, bottom: 0, right: 0 };
|
|
7714
8487
|
this.addressCaches = /* @__PURE__ */ new Map();
|
|
@@ -7743,6 +8516,278 @@ class Table {
|
|
|
7743
8516
|
historicize
|
|
7744
8517
|
});
|
|
7745
8518
|
}
|
|
8519
|
+
/** Get the raw (mutable) cell data for a point. Unlike getCellByPoint, this returns the actual wire.data reference. */
|
|
8520
|
+
_getRawCellByPoint({ y, x }) {
|
|
8521
|
+
var _a;
|
|
8522
|
+
const id = (_a = this.idMatrix[y]) == null ? void 0 : _a[x];
|
|
8523
|
+
if (id == null) {
|
|
8524
|
+
return void 0;
|
|
8525
|
+
}
|
|
8526
|
+
return this.wire.data[id];
|
|
8527
|
+
}
|
|
8528
|
+
isRowFiltered(y) {
|
|
8529
|
+
var _a;
|
|
8530
|
+
return !!((_a = this._getRawCellByPoint({ y, x: 0 })) == null ? void 0 : _a.filtered);
|
|
8531
|
+
}
|
|
8532
|
+
hasActiveFilters() {
|
|
8533
|
+
const numCols = this.getNumCols();
|
|
8534
|
+
for (let col = 1; col <= numCols; col++) {
|
|
8535
|
+
const colCell = this._getRawCellByPoint({ y: 0, x: col });
|
|
8536
|
+
if ((colCell == null ? void 0 : colCell.filter) && colCell.filter.conditions.length > 0) {
|
|
8537
|
+
return true;
|
|
8538
|
+
}
|
|
8539
|
+
}
|
|
8540
|
+
return false;
|
|
8541
|
+
}
|
|
8542
|
+
/** Capture the current state of all filter-related cells (column headers + row headers) as a CellsByIdType snapshot */
|
|
8543
|
+
/** Capture the full cell state of all filter-related header cells as a CellsByIdType snapshot */
|
|
8544
|
+
_captureFilterCellStates() {
|
|
8545
|
+
var _a, _b;
|
|
8546
|
+
const snapshot = {};
|
|
8547
|
+
const numCols = this.getNumCols();
|
|
8548
|
+
const numRows = this.getNumRows();
|
|
8549
|
+
for (let col = 1; col <= numCols; col++) {
|
|
8550
|
+
const id = (_a = this.idMatrix[0]) == null ? void 0 : _a[col];
|
|
8551
|
+
if (id != null) {
|
|
8552
|
+
snapshot[id] = { ...this.wire.data[id] };
|
|
8553
|
+
}
|
|
8554
|
+
}
|
|
8555
|
+
for (let y = 1; y <= numRows; y++) {
|
|
8556
|
+
const id = (_b = this.idMatrix[y]) == null ? void 0 : _b[0];
|
|
8557
|
+
if (id != null) {
|
|
8558
|
+
snapshot[id] = { ...this.wire.data[id] };
|
|
8559
|
+
}
|
|
8560
|
+
}
|
|
8561
|
+
return snapshot;
|
|
8562
|
+
}
|
|
8563
|
+
filterRows({
|
|
8564
|
+
x,
|
|
8565
|
+
filter,
|
|
8566
|
+
undoReflection,
|
|
8567
|
+
redoReflection
|
|
8568
|
+
}) {
|
|
8569
|
+
const diffBefore = this._captureFilterCellStates();
|
|
8570
|
+
const colCell = this._getRawCellByPoint({ y: 0, x });
|
|
8571
|
+
if (colCell) {
|
|
8572
|
+
colCell.filter = filter;
|
|
8573
|
+
}
|
|
8574
|
+
this._reapplyFilters();
|
|
8575
|
+
const diffAfter = this._captureFilterCellStates();
|
|
8576
|
+
this.pushHistory({
|
|
8577
|
+
applyed: true,
|
|
8578
|
+
operation: "UPDATE",
|
|
8579
|
+
srcSheetId: this.sheetId,
|
|
8580
|
+
dstSheetId: this.sheetId,
|
|
8581
|
+
undoReflection,
|
|
8582
|
+
redoReflection,
|
|
8583
|
+
diffBefore,
|
|
8584
|
+
diffAfter,
|
|
8585
|
+
partial: false
|
|
8586
|
+
});
|
|
8587
|
+
return this.refresh(false, true);
|
|
8588
|
+
}
|
|
8589
|
+
setColLabel({
|
|
8590
|
+
x,
|
|
8591
|
+
label,
|
|
8592
|
+
undoReflection,
|
|
8593
|
+
redoReflection
|
|
8594
|
+
}) {
|
|
8595
|
+
var _a;
|
|
8596
|
+
const id = (_a = this.idMatrix[0]) == null ? void 0 : _a[x];
|
|
8597
|
+
const diffBefore = {};
|
|
8598
|
+
if (id != null) {
|
|
8599
|
+
diffBefore[id] = { ...this.wire.data[id] };
|
|
8600
|
+
}
|
|
8601
|
+
const colCell = this._getRawCellByPoint({ y: 0, x });
|
|
8602
|
+
if (colCell) {
|
|
8603
|
+
if (label === "") {
|
|
8604
|
+
delete colCell.label;
|
|
8605
|
+
} else {
|
|
8606
|
+
colCell.label = label;
|
|
8607
|
+
}
|
|
8608
|
+
}
|
|
8609
|
+
const diffAfter = {};
|
|
8610
|
+
if (id != null) {
|
|
8611
|
+
diffAfter[id] = { ...this.wire.data[id] };
|
|
8612
|
+
}
|
|
8613
|
+
const changed = Object.keys(diffBefore).some(
|
|
8614
|
+
(id2) => JSON.stringify(diffBefore[id2]) !== JSON.stringify(diffAfter[id2])
|
|
8615
|
+
);
|
|
8616
|
+
if (changed) {
|
|
8617
|
+
this.pushHistory({
|
|
8618
|
+
applyed: true,
|
|
8619
|
+
operation: "UPDATE",
|
|
8620
|
+
srcSheetId: this.sheetId,
|
|
8621
|
+
dstSheetId: this.sheetId,
|
|
8622
|
+
undoReflection,
|
|
8623
|
+
redoReflection,
|
|
8624
|
+
diffBefore,
|
|
8625
|
+
diffAfter,
|
|
8626
|
+
partial: false
|
|
8627
|
+
});
|
|
8628
|
+
}
|
|
8629
|
+
return this.refresh(false, true);
|
|
8630
|
+
}
|
|
8631
|
+
clearFilterRows(x, undoReflection, redoReflection) {
|
|
8632
|
+
const diffBefore = this._captureFilterCellStates();
|
|
8633
|
+
if (x != null) {
|
|
8634
|
+
const colCell = this._getRawCellByPoint({ y: 0, x });
|
|
8635
|
+
if (colCell) {
|
|
8636
|
+
delete colCell.filter;
|
|
8637
|
+
}
|
|
8638
|
+
} else {
|
|
8639
|
+
const numCols = this.getNumCols();
|
|
8640
|
+
for (let col = 1; col <= numCols; col++) {
|
|
8641
|
+
const colCell = this._getRawCellByPoint({ y: 0, x: col });
|
|
8642
|
+
if (colCell == null ? void 0 : colCell.filter) {
|
|
8643
|
+
delete colCell.filter;
|
|
8644
|
+
}
|
|
8645
|
+
}
|
|
8646
|
+
}
|
|
8647
|
+
this._reapplyFilters();
|
|
8648
|
+
const diffAfter = this._captureFilterCellStates();
|
|
8649
|
+
const changed = Object.keys(diffBefore).some(
|
|
8650
|
+
(id) => JSON.stringify(diffBefore[id]) !== JSON.stringify(diffAfter[id])
|
|
8651
|
+
);
|
|
8652
|
+
if (changed) {
|
|
8653
|
+
this.pushHistory({
|
|
8654
|
+
applyed: true,
|
|
8655
|
+
operation: "UPDATE",
|
|
8656
|
+
srcSheetId: this.sheetId,
|
|
8657
|
+
dstSheetId: this.sheetId,
|
|
8658
|
+
undoReflection,
|
|
8659
|
+
redoReflection,
|
|
8660
|
+
diffBefore,
|
|
8661
|
+
diffAfter,
|
|
8662
|
+
partial: false
|
|
8663
|
+
});
|
|
8664
|
+
}
|
|
8665
|
+
return this.refresh(false, true);
|
|
8666
|
+
}
|
|
8667
|
+
_evaluateFilterConfig(filter, cellValue) {
|
|
8668
|
+
return evaluateFilterConfig(filter, cellValue);
|
|
8669
|
+
}
|
|
8670
|
+
_reapplyFilters() {
|
|
8671
|
+
const numCols = this.getNumCols();
|
|
8672
|
+
const activeFilters = [];
|
|
8673
|
+
for (let col = 1; col <= numCols; col++) {
|
|
8674
|
+
const colCell = this._getRawCellByPoint({ y: 0, x: col });
|
|
8675
|
+
if ((colCell == null ? void 0 : colCell.filter) && colCell.filter.conditions.length > 0) {
|
|
8676
|
+
activeFilters.push({ x: col, filter: colCell.filter });
|
|
8677
|
+
}
|
|
8678
|
+
}
|
|
8679
|
+
const numRows = this.getNumRows();
|
|
8680
|
+
for (let y = 1; y <= numRows; y++) {
|
|
8681
|
+
const rowCell = this._getRawCellByPoint({ y, x: 0 });
|
|
8682
|
+
if (rowCell) {
|
|
8683
|
+
delete rowCell.filtered;
|
|
8684
|
+
}
|
|
8685
|
+
}
|
|
8686
|
+
if (activeFilters.length === 0) {
|
|
8687
|
+
return;
|
|
8688
|
+
}
|
|
8689
|
+
for (let y = 1; y <= numRows; y++) {
|
|
8690
|
+
let visible = true;
|
|
8691
|
+
for (const { x: col, filter } of activeFilters) {
|
|
8692
|
+
const cell = this.getCellByPoint({ y, x: col }, "COMPLETE");
|
|
8693
|
+
if (!this._evaluateFilterConfig(filter, cell == null ? void 0 : cell.value)) {
|
|
8694
|
+
visible = false;
|
|
8695
|
+
break;
|
|
8696
|
+
}
|
|
8697
|
+
}
|
|
8698
|
+
if (!visible) {
|
|
8699
|
+
const rowCell = this._getRawCellByPoint({ y, x: 0 });
|
|
8700
|
+
if (rowCell) {
|
|
8701
|
+
rowCell.filtered = true;
|
|
8702
|
+
}
|
|
8703
|
+
}
|
|
8704
|
+
}
|
|
8705
|
+
}
|
|
8706
|
+
sortRows({
|
|
8707
|
+
x,
|
|
8708
|
+
direction,
|
|
8709
|
+
undoReflection,
|
|
8710
|
+
redoReflection
|
|
8711
|
+
}) {
|
|
8712
|
+
const numRows = this.getNumRows();
|
|
8713
|
+
if (numRows <= 1) {
|
|
8714
|
+
return this;
|
|
8715
|
+
}
|
|
8716
|
+
const rowsBefore = [];
|
|
8717
|
+
for (let y = 1; y <= numRows; y++) {
|
|
8718
|
+
rowsBefore.push([...this.idMatrix[y]]);
|
|
8719
|
+
}
|
|
8720
|
+
const rowIndices = [];
|
|
8721
|
+
for (let y = 1; y <= numRows; y++) {
|
|
8722
|
+
rowIndices.push(y);
|
|
8723
|
+
}
|
|
8724
|
+
rowIndices.sort((a, b) => {
|
|
8725
|
+
const cellA = this.getCellByPoint({ y: a, x }, "COMPLETE");
|
|
8726
|
+
const cellB = this.getCellByPoint({ y: b, x }, "COMPLETE");
|
|
8727
|
+
const valA = cellA == null ? void 0 : cellA.value;
|
|
8728
|
+
const valB = cellB == null ? void 0 : cellB.value;
|
|
8729
|
+
if (valA == null && valB == null) {
|
|
8730
|
+
return 0;
|
|
8731
|
+
}
|
|
8732
|
+
if (valA == null) {
|
|
8733
|
+
return 1;
|
|
8734
|
+
}
|
|
8735
|
+
if (valB == null) {
|
|
8736
|
+
return -1;
|
|
8737
|
+
}
|
|
8738
|
+
let cmp = 0;
|
|
8739
|
+
if (typeof valA === "number" && typeof valB === "number") {
|
|
8740
|
+
cmp = valA - valB;
|
|
8741
|
+
} else if (valA instanceof Date && valB instanceof Date) {
|
|
8742
|
+
cmp = valA.getTime() - valB.getTime();
|
|
8743
|
+
} else {
|
|
8744
|
+
cmp = String(valA).localeCompare(String(valB));
|
|
8745
|
+
}
|
|
8746
|
+
return direction === "asc" ? cmp : -cmp;
|
|
8747
|
+
});
|
|
8748
|
+
let changed = false;
|
|
8749
|
+
for (let i = 0; i < rowIndices.length; i++) {
|
|
8750
|
+
if (rowIndices[i] !== i + 1) {
|
|
8751
|
+
changed = true;
|
|
8752
|
+
break;
|
|
8753
|
+
}
|
|
8754
|
+
}
|
|
8755
|
+
if (!changed) {
|
|
8756
|
+
return this;
|
|
8757
|
+
}
|
|
8758
|
+
this._applySortOrder(rowIndices);
|
|
8759
|
+
const rowsAfter = [];
|
|
8760
|
+
for (let y = 1; y <= numRows; y++) {
|
|
8761
|
+
rowsAfter.push([...this.idMatrix[y]]);
|
|
8762
|
+
}
|
|
8763
|
+
this.pushHistory({
|
|
8764
|
+
applyed: true,
|
|
8765
|
+
operation: "SORT_ROWS",
|
|
8766
|
+
srcSheetId: this.sheetId,
|
|
8767
|
+
dstSheetId: this.sheetId,
|
|
8768
|
+
undoReflection,
|
|
8769
|
+
redoReflection,
|
|
8770
|
+
rowsBefore,
|
|
8771
|
+
rowsAfter
|
|
8772
|
+
});
|
|
8773
|
+
return this.refresh(true, true);
|
|
8774
|
+
}
|
|
8775
|
+
_applySortOrder(newOrder) {
|
|
8776
|
+
const savedRows = [];
|
|
8777
|
+
for (let i = 0; i < newOrder.length; i++) {
|
|
8778
|
+
savedRows.push(this.idMatrix[newOrder[i]]);
|
|
8779
|
+
}
|
|
8780
|
+
for (let i = 0; i < newOrder.length; i++) {
|
|
8781
|
+
this.idMatrix[i + 1] = savedRows[i];
|
|
8782
|
+
}
|
|
8783
|
+
this.addressCaches.clear();
|
|
8784
|
+
}
|
|
8785
|
+
_restoreRows(rows) {
|
|
8786
|
+
for (let i = 0; i < rows.length; i++) {
|
|
8787
|
+
this.idMatrix[i + 1] = [...rows[i]];
|
|
8788
|
+
}
|
|
8789
|
+
this.addressCaches.clear();
|
|
8790
|
+
}
|
|
7746
8791
|
get isInitialized() {
|
|
7747
8792
|
return this.status === 2;
|
|
7748
8793
|
}
|
|
@@ -7866,6 +8911,7 @@ class Table {
|
|
|
7866
8911
|
} else {
|
|
7867
8912
|
delete stacked.height;
|
|
7868
8913
|
delete stacked.width;
|
|
8914
|
+
delete stacked.label;
|
|
7869
8915
|
delete stacked.labeler;
|
|
7870
8916
|
}
|
|
7871
8917
|
stacked.system = { id, changedAt, dependents: /* @__PURE__ */ new Set(), sheetId: this.sheetId };
|
|
@@ -7916,15 +8962,20 @@ class Table {
|
|
|
7916
8962
|
}
|
|
7917
8963
|
this.totalWidth = headerW + accW;
|
|
7918
8964
|
let accH = 0;
|
|
8965
|
+
let fullH = 0;
|
|
7919
8966
|
for (let y = 1; y <= numRows; y++) {
|
|
7920
8967
|
const cell = this.getCellByPoint({ y, x: 0 }, "SYSTEM");
|
|
7921
8968
|
const h2 = (cell == null ? void 0 : cell.height) || DEFAULT_HEIGHT;
|
|
7922
8969
|
if (cell == null ? void 0 : cell.system) {
|
|
7923
8970
|
cell.system.offsetTop = headerH + accH;
|
|
7924
8971
|
}
|
|
7925
|
-
|
|
8972
|
+
if (!(cell == null ? void 0 : cell.filtered)) {
|
|
8973
|
+
accH += h2;
|
|
8974
|
+
}
|
|
8975
|
+
fullH += h2;
|
|
7926
8976
|
}
|
|
7927
8977
|
this.totalHeight = headerH + accH;
|
|
8978
|
+
this.fullHeight = headerH + fullH;
|
|
7928
8979
|
}
|
|
7929
8980
|
refresh(relocate = false, resize = false) {
|
|
7930
8981
|
this.incrementVersion();
|
|
@@ -8537,7 +9588,7 @@ class Table {
|
|
|
8537
9588
|
diff,
|
|
8538
9589
|
partial = true,
|
|
8539
9590
|
updateChangedAt = true,
|
|
8540
|
-
ignoreFields = ["labeler"],
|
|
9591
|
+
ignoreFields = ["label", "labeler"],
|
|
8541
9592
|
operator = "SYSTEM",
|
|
8542
9593
|
operation: op = Update,
|
|
8543
9594
|
formulaIdentify = true
|
|
@@ -9060,7 +10111,7 @@ class Table {
|
|
|
9060
10111
|
break;
|
|
9061
10112
|
case "INSERT_ROWS": {
|
|
9062
10113
|
if (history.diffBefore) {
|
|
9063
|
-
dstTable.applyDiff(history.diffBefore,
|
|
10114
|
+
dstTable.applyDiff(history.diffBefore, false);
|
|
9064
10115
|
}
|
|
9065
10116
|
const { height } = matrixShape({ matrix: history.idMatrix });
|
|
9066
10117
|
dstTable.idMatrix.splice(history.y, height);
|
|
@@ -9125,6 +10176,11 @@ class Table {
|
|
|
9125
10176
|
}
|
|
9126
10177
|
break;
|
|
9127
10178
|
}
|
|
10179
|
+
case "SORT_ROWS": {
|
|
10180
|
+
dstTable._restoreRows(history.rowsBefore);
|
|
10181
|
+
dstTable._reapplyFilters();
|
|
10182
|
+
break;
|
|
10183
|
+
}
|
|
9128
10184
|
}
|
|
9129
10185
|
this.refresh(shouldTracking(history.operation), true);
|
|
9130
10186
|
return {
|
|
@@ -9149,11 +10205,11 @@ class Table {
|
|
|
9149
10205
|
}
|
|
9150
10206
|
switch (history.operation) {
|
|
9151
10207
|
case "UPDATE":
|
|
9152
|
-
dstTable.applyDiff(history.diffAfter,
|
|
10208
|
+
dstTable.applyDiff(history.diffAfter, false);
|
|
9153
10209
|
break;
|
|
9154
10210
|
case "INSERT_ROWS": {
|
|
9155
10211
|
if (history.diffAfter) {
|
|
9156
|
-
dstTable.applyDiff(history.diffAfter,
|
|
10212
|
+
dstTable.applyDiff(history.diffAfter, false);
|
|
9157
10213
|
}
|
|
9158
10214
|
const { height } = matrixShape({ matrix: history.idMatrix });
|
|
9159
10215
|
dstTable.idMatrix.splice(history.y, 0, ...history.idMatrix);
|
|
@@ -9162,7 +10218,7 @@ class Table {
|
|
|
9162
10218
|
}
|
|
9163
10219
|
case "INSERT_COLS": {
|
|
9164
10220
|
if (history.diffAfter) {
|
|
9165
|
-
dstTable.applyDiff(history.diffAfter,
|
|
10221
|
+
dstTable.applyDiff(history.diffAfter, false);
|
|
9166
10222
|
}
|
|
9167
10223
|
const { width } = matrixShape({ matrix: history.idMatrix });
|
|
9168
10224
|
dstTable.idMatrix.map((row, i) => {
|
|
@@ -9196,6 +10252,12 @@ class Table {
|
|
|
9196
10252
|
if (srcTable) {
|
|
9197
10253
|
dstTable.move({ srcTable, src, dst, operator: "USER", historicize: false });
|
|
9198
10254
|
}
|
|
10255
|
+
break;
|
|
10256
|
+
}
|
|
10257
|
+
case "SORT_ROWS": {
|
|
10258
|
+
dstTable._restoreRows(history.rowsAfter);
|
|
10259
|
+
dstTable._reapplyFilters();
|
|
10260
|
+
break;
|
|
9199
10261
|
}
|
|
9200
10262
|
}
|
|
9201
10263
|
this.refresh(shouldTracking(history.operation), true);
|
|
@@ -9210,12 +10272,18 @@ class Table {
|
|
|
9210
10272
|
getFunction(name) {
|
|
9211
10273
|
return this.functions[name];
|
|
9212
10274
|
}
|
|
9213
|
-
getLabel(
|
|
9214
|
-
if (
|
|
10275
|
+
getLabel(label, labelerKey, n) {
|
|
10276
|
+
if (label != null) {
|
|
10277
|
+
return label;
|
|
10278
|
+
}
|
|
10279
|
+
if (labelerKey == null) {
|
|
9215
10280
|
return null;
|
|
9216
10281
|
}
|
|
9217
|
-
const labeler = this.labelers[
|
|
9218
|
-
|
|
10282
|
+
const labeler = this.labelers[labelerKey];
|
|
10283
|
+
if (labeler) {
|
|
10284
|
+
return labeler(n);
|
|
10285
|
+
}
|
|
10286
|
+
return null;
|
|
9219
10287
|
}
|
|
9220
10288
|
getBase() {
|
|
9221
10289
|
return this;
|
|
@@ -9736,11 +10804,13 @@ const HeaderCellTop = memo(({ x }) => {
|
|
|
9736
10804
|
editorRef,
|
|
9737
10805
|
autofillDraggingTo,
|
|
9738
10806
|
dragging,
|
|
9739
|
-
contextMenuItems
|
|
10807
|
+
contextMenuItems,
|
|
10808
|
+
columnMenuState
|
|
9740
10809
|
} = store;
|
|
9741
10810
|
const table = tableRef.current;
|
|
9742
10811
|
const col = table == null ? void 0 : table.getCellByPoint({ y: 0, x }, "SYSTEM");
|
|
9743
10812
|
const width = (col == null ? void 0 : col.width) || DEFAULT_WIDTH;
|
|
10813
|
+
const hasFilter = !!((col == null ? void 0 : col.filter) && col.filter.conditions.length > 0);
|
|
9744
10814
|
const xSheetFocused = isXSheetFocused(store);
|
|
9745
10815
|
const lastFocused = table == null ? void 0 : table.wire.lastFocused;
|
|
9746
10816
|
const editingAnywhere = !!((table == null ? void 0 : table.wire.editingAddress) || editingAddress);
|
|
@@ -9889,7 +10959,25 @@ const HeaderCellTop = memo(({ x }) => {
|
|
|
9889
10959
|
vertical: -1
|
|
9890
10960
|
}
|
|
9891
10961
|
),
|
|
9892
|
-
table.getLabel(col == null ? void 0 : col.labeler, x) ?? colId,
|
|
10962
|
+
table.getLabel(col == null ? void 0 : col.label, col == null ? void 0 : col.labeler, x) ?? colId,
|
|
10963
|
+
!hasOperation(col == null ? void 0 : col.prevention, ColumnMenu$1) && /* @__PURE__ */ jsx(
|
|
10964
|
+
"button",
|
|
10965
|
+
{
|
|
10966
|
+
className: `gs-column-menu-btn ${hasFilter ? "gs-filtered" : ""} ${(columnMenuState == null ? void 0 : columnMenuState.x) === x ? "gs-active" : ""}`,
|
|
10967
|
+
onMouseDown: (e) => {
|
|
10968
|
+
e.stopPropagation();
|
|
10969
|
+
e.preventDefault();
|
|
10970
|
+
const rect = e.target.getBoundingClientRect();
|
|
10971
|
+
if ((columnMenuState == null ? void 0 : columnMenuState.x) === x) {
|
|
10972
|
+
dispatch(setColumnMenu(null));
|
|
10973
|
+
} else {
|
|
10974
|
+
dispatch(setColumnMenu({ x, position: { y: rect.bottom, x: rect.left } }));
|
|
10975
|
+
}
|
|
10976
|
+
},
|
|
10977
|
+
title: "Sort & Filter",
|
|
10978
|
+
children: "⋮"
|
|
10979
|
+
}
|
|
10980
|
+
),
|
|
9893
10981
|
/* @__PURE__ */ jsx(
|
|
9894
10982
|
"div",
|
|
9895
10983
|
{
|
|
@@ -10074,7 +11162,7 @@ const HeaderCellLeft = memo(({ y }) => {
|
|
|
10074
11162
|
horizontal: -1
|
|
10075
11163
|
}
|
|
10076
11164
|
),
|
|
10077
|
-
table.getLabel(row == null ? void 0 : row.labeler, y) ?? rowId,
|
|
11165
|
+
table.getLabel(row == null ? void 0 : row.label, row == null ? void 0 : row.labeler, y) ?? rowId,
|
|
10078
11166
|
/* @__PURE__ */ jsx(
|
|
10079
11167
|
"div",
|
|
10080
11168
|
{
|
|
@@ -10267,6 +11355,9 @@ const CellStateOverlay = ({ refs = {} }) => {
|
|
|
10267
11355
|
fillRect(ctx, left, 0, pos.width, headerH, color);
|
|
10268
11356
|
}
|
|
10269
11357
|
for (let y = 1; y <= numRows; y++) {
|
|
11358
|
+
if (table.isRowFiltered(y)) {
|
|
11359
|
+
continue;
|
|
11360
|
+
}
|
|
10270
11361
|
let color = null;
|
|
10271
11362
|
if (between({ start: selectingZone.startY, end: selectingZone.endY }, y)) {
|
|
10272
11363
|
color = leftHeaderSelecting ? headerColors.thSelecting : headerColors.selecting;
|
|
@@ -10537,8 +11628,8 @@ const Tabular = () => {
|
|
|
10537
11628
|
}
|
|
10538
11629
|
) });
|
|
10539
11630
|
};
|
|
10540
|
-
const LAST_MODIFIED =
|
|
10541
|
-
const CSS = `.gs-root1{display:inline-block;position:relative;border-spacing:0;width:fit-content;max-width:100%;line-height:normal;overflow:auto;font-family:"SF Pro Text","SF Pro Icons","Helvetica Neue",Helvetica,Arial,Meiryo,sans-serif;visibility:hidden;opacity:0}.gs-root1.gs-initialized{visibility:visible;opacity:1;transition:opacity .2s ease-in-out}.gs-root1 .gs-main{flex:1;max-width:100%;overflow:hidden;position:relative;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.gs-root1 .gs-resizing{width:100%;height:100%;position:absolute;background-color:rgba(0,127,255,.08);top:0;left:0;z-index:2}.gs-root1 .gs-line-horizontal{width:100%}.gs-root1 .gs-line-vertical{height:100%}.gs-root1 .gs-line{position:relative;top:0;left:0;border:dotted 1px #07f;box-sizing:border-box}.gs-root1 .gs-line span{font-size:10px;padding:3px;background-color:#07f;color:#fff;margin:0;position:absolute;top:0;left:0}.gs-root1 .gs-scroll-handle{width:100%;height:100%;cursor:cell}.gs-hidden{visibility:hidden;position:absolute;top:0;left:0;width:0;height:0;overflow:hidden;pointer-events:none;z-index:-1}.gs-fixed{position:fixed;top:0;left:0;z-index:1}.gs-root1[data-mode=light]{background-color:#e2e2e2;color:#000}.gs-root1[data-mode=light] .gs-main{background-color:#e2e2e2;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd}.gs-root1[data-mode=light] .gs-tabular{background-color:#e2e2e2}.gs-root1[data-mode=light] .gs-formula-bar{background-color:#efefef}.gs-root1[data-mode=light] .gs-formula-bar-editor-inner{color:#555}.gs-root1[data-mode=light] .gs-cell{border-top:solid 1px #ddd;border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-adjuster{background-color:#ddd}.gs-root1[data-mode=light] .gs-tabular-inner{background-color:#f7f7f7}.gs-root1[data-mode=light] .gs-th{background-color:#efefef;color:#666}.gs-root1[data-mode=light] .gs-th-top{border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-top .gs-th-inner{border-top:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-left{border-top:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-left .gs-th-inner{border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-search-bar{color:rgba(0,0,0,.3)}.gs-editor[data-mode=light].gs-editing textarea{caret-color:#000000}.gs-editor[data-mode=light].gs-editing .gs-editor-hl{background-color:#f7f7f7;color:#000}.gs-editor[data-mode=light] .gs-editor-options{color:#000;background-color:#f7f7f7;border:solid 1px #ddd}.gs-root1[data-mode=dark]{background-color:#5a5a5a;color:#eee}.gs-root1[data-mode=dark] .gs-main{background-color:#3f3f3f;border-right:solid 1px #5a5a5a;border-bottom:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-tabular{background-color:#3f3f3f}.gs-root1[data-mode=dark] .gs-formula-bar{background-color:#4f4f4f}.gs-root1[data-mode=dark] .gs-formula-bar-editor-inner{color:#bbb}.gs-root1[data-mode=dark] .gs-cell{border-top:solid 1px #5a5a5a;border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-adjuster{background-color:#5a5a5a}.gs-root1[data-mode=dark] .gs-tabular-inner{background-color:#212121}.gs-root1[data-mode=dark] .gs-large-editor textarea{color:#eee;caret-color:#eeeeee}.gs-root1[data-mode=dark] .gs-th{background-color:#4f4f4f;color:#eee}.gs-root1[data-mode=dark] .gs-th-top{border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-top .gs-th-inner{border-top:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-left{border-top:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-left .gs-th-inner{border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-search-bar textarea{color:#eee;caret-color:#eeeeee}.gs-root1[data-mode=dark] .gs-search-bar{color:rgba(255,255,255,.3)}.gs-editor[data-mode=dark].gs-editing textarea{caret-color:#eeeeee}.gs-editor[data-mode=dark].gs-editing .gs-editor-hl{background-color:#212121;color:#eee}.gs-editor[data-mode=dark] .gs-editor-options{color:#eee;background-color:#5a5a5a;border:solid 1px #5a5a5a}.gs-cell{transition:border-color .2s ease;padding:0;margin:0;box-sizing:border-box;position:relative;font-size:13px;letter-spacing:1px;line-height:24px;cursor:cell;user-select:none;-webkit-user-select:none;-moz-user-select:none}.gs-cell.gs-copying textarea:focus{outline:solid 1px #0077ff}.gs-cell.gs-selecting{z-index:1}.gs-cell.gs-selecting .gs-cell-label{display:block}.gs-cell.gs-choosing{margin-top:-1px;margin-left:-1px;z-index:1}.gs-cell.gs-choosing.gs-editing{color:transparent}.gs-cell.gs-choosing .gs-cell-label{display:block}.gs-cell .gs-formula-error-triangle{position:absolute;top:0;right:0;border-top:3px solid rgba(200,0,0,.9);border-right:3px solid rgba(200,0,0,.9);border-bottom:3px solid transparent;border-left:3px solid transparent;z-index:1}.gs-cell .gs-cell-label{font-size:8px;font-weight:400;font-style:normal;font-family:math,monospace,serif;letter-spacing:1px;line-height:14px;position:absolute;top:0;right:0;background-color:rgba(0,128,255,.2);color:rgba(255,255,255,.6);padding:0 2px;display:none;opacity:.7}.gs-cell .gs-cell-inner-wrap{width:100%;height:100%;position:absolute;top:0;left:0}.gs-cell .gs-cell-inner{width:100%;height:100%;overflow:hidden;display:flex;box-sizing:border-box;border:none!important}.gs-cell .gs-cell-rendered{overflow:hidden;white-space:pre-wrap;cursor:cell;word-wrap:break-word;word-break:break-all;padding:0 2px;width:100%;height:100%}.gs-cell .gs-cell-rendered>*{position:relative}.gs-cell .gs-cell-rendered>.backface{z-index:0}.gs-cell .gs-autofill-drag{background-color:#07f;position:absolute;width:7px;height:7px;bottom:0;right:0;margin-right:-3.5px;margin-bottom:-3.5px;cursor:crosshair;z-index:1}.gs-th[data-x="1"] .gs-th-inner-wrap{border-left:none}.gs-th[data-y="1"] .gs-th-inner-wrap{border-top:none}.gs-cell[data-x="1"]{border-left:none}.gs-cell[data-y="1"]{border-top:none}.gs-contextmenu-modal{width:100%;height:100vh;z-index:3}.gs-contextmenu{z-index:3;position:fixed;background-color:#fff;padding:5px 0;border-radius:5px;box-shadow:rgba(60,64,67,.3) 0 1px 2px 0,rgba(60,64,67,.15) 0 1px 3px 1px}.gs-contextmenu ul{min-width:250px;color:#555;margin:0;padding:0}.gs-contextmenu li{padding:5px 10px;list-style-type:none;display:flex}.gs-contextmenu li.gs-enabled{cursor:pointer}.gs-contextmenu li.gs-enabled:hover{background-color:#eee}.gs-contextmenu li.gs-disabled{opacity:.5;cursor:not-allowed}.gs-contextmenu li.gs-menu-divider{background-color:#aaa;margin:10px 0;padding:0;height:1px}.gs-contextmenu li .gs-menu-name{flex:1;font-size:15px;letter-spacing:1px}.gs-contextmenu li .gs-menu-shortcut{font-size:10px;line-height:20px;color:#999}.gs-contextmenu li .gs-menu-shortcut:before{content:"( "}.gs-contextmenu li .gs-menu-shortcut:after{content:" )"}.gs-contextmenu li .gs-menu-shortcut .gs-menu-underline{text-decoration:underline}.gs-editor-hl{padding:0 2px!important;position:absolute;font-family:monospace,Arial;font-size:12px;line-height:24px;letter-spacing:1px}.gs-formula-bar-editor-inner{position:relative;display:table-cell}.gs-editor{opacity:0;z-index:-1}.gs-editor .gs-editor-inner{position:relative}.gs-editor .gs-editor-hl{box-sizing:content-box;border:solid 2px #07f;margin:-2px -1px}.gs-editor textarea{width:100%;padding:0 2px!important;position:absolute;font-size:12px;font-family:monospace,Arial;line-height:24px;letter-spacing:1px;top:0;left:0;border:none;outline:0;background-color:transparent;color:transparent;resize:none;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;overflow:hidden;cursor:default;white-space:pre;height:auto}.gs-editor.gs-editing{z-index:11;opacity:1}.gs-editor.gs-editing .gs-cell-label{pointer-events:none;font-family:math,monospace,serif;position:absolute;top:0;right:0;margin-top:-15px;margin-right:-2px;padding:0 2px;font-size:10px;background-color:rgba(0,119,255,.75);color:#fff;z-index:1}.gs-formula-bar{width:100%;position:relative;display:table;align-items:center;justify-content:center;border-top:solid 1px rgba(128,128,128,.3);border-left:solid 1px rgba(128,128,128,.3);border-right:solid 1px rgba(128,128,128,.3);box-sizing:border-box}.gs-formula-bar .gs-selecting-address{display:table-cell;vertical-align:middle;width:60px;color:rgba(200,200,200);font-size:13px;text-align:center}.gs-formula-bar .gs-fx{display:table-cell;vertical-align:middle;width:30px;color:rgba(200,200,200);font-style:italic;font-family:cursive;text-align:center;border-left:solid 1px rgba(128,128,128,.5);font-size:15px}.gs-formula-bar .gs-editor-hl{z-index:0;overflow-y:auto;box-sizing:border-box;white-space:pre-wrap;word-break:break-all}.gs-formula-bar textarea{position:relative;z-index:1;width:100%;vertical-align:bottom;color:transparent;border:none;background-color:transparent;padding:0 2px;box-sizing:border-box;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;font-size:12px;font-family:monospace,Arial;height:24px;line-height:24px;min-height:24px;letter-spacing:1px;resize:vertical;caret-color:rgba(128,128,128);white-space:pre-wrap;word-break:break-all}.gs-token-type-INVALID_REF{color:red}.gs-token-type-VALUE.gs-token-entity-type-boolean,.gs-token-type-VALUE.gs-token-entity-type-number{color:#39f}.gs-token-type-VALUE.gs-token-entity-type-string{color:#090}.gs-editor-options{padding:0;box-shadow:0 2px 8px rgba(0,0,0,.25);border:1px solid rgba(128,128,128,.2);border-radius:4px}.gs-editor-option{cursor:pointer;list-style:none;padding:5px;font-size:12px}.gs-editor-option:hover{background-color:rgba(128,128,128,.1)}.gs-editor-option-selected{background-color:rgba(128,128,128,.2)}.gs-adjuster{padding:0}.gs-table{margin:0}.gs-tabular{overflow:auto;display:block;box-sizing:border-box;overscroll-behavior:none;position:relative}.gs-tabular-inner>table{table-layout:fixed;border-collapse:collapse;border-spacing:0}.gs-th{z-index:2;padding:0;position:sticky;font-size:13px;font-weight:400;box-sizing:border-box;vertical-align:top}.gs-th .gs-resizer{position:absolute;border-color:transparent;box-sizing:border-box;z-index:2}.gs-th .gs-resizer:hover{background-color:#07f}.gs-th .gs-resizer.gs-protected{display:none}.gs-th-inner{height:100%;box-sizing:border-box;vertical-align:middle;overflow:hidden;display:flex;align-items:center;justify-content:center}.gs-th-inner-wrap{height:100%;box-sizing:border-box;background-color:transparent}.gs-th-top{top:0;overflow:hidden}.gs-th-top .gs-resizer{top:0;right:0;width:3px;cursor:e-resize}.gs-th-top .gs-resizer.gs-dragging{border-right-style:dotted;height:1000000px!important;cursor:e-resize}.gs-th-left{left:0;overflow:hidden;min-width:30px;border-top:solid 1px #ddd}.gs-th-left .gs-resizer{left:0;bottom:0;height:3px;cursor:n-resize}.gs-th-left .gs-resizer.gs-dragging{border-bottom-style:dotted;width:1000000px!important;cursor:n-resize}.gs-th-top.gs-th-left{top:0;left:0;z-index:3;border:none!important}.gs-search-bar{width:100%;display:table;align-items:center;justify-content:center;border-top:solid 1px rgba(128,128,128,.3);border-left:solid 1px rgba(128,128,128,.3);border-right:solid 1px rgba(128,128,128,.3);box-sizing:border-box;background-color:rgba(200,50,0,.2)}.gs-search-bar.gs-search-found{background-color:rgba(0,200,100,.2)}.gs-search-bar .gs-search-bar-inner{vertical-align:middle;border-left:solid 1px rgba(128,128,128,.5)}.gs-search-bar .gs-search-bar-icon{border-left:solid 1px rgba(128,128,128,.3);display:table-cell;vertical-align:middle;width:30px}.gs-search-bar textarea{background-color:transparent;border:none;padding:0 2px;box-sizing:border-box;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;font-size:12px;font-family:monospace,Arial;height:24px;line-height:24px;min-height:24px;letter-spacing:1px;caret-color:rgba(128,128,128);white-space:pre-wrap;word-break:break-all;display:table-cell;vertical-align:middle;width:100%;resize:none}.gs-search-progress{display:table-cell;color:#999;font-size:13px;width:60px;vertical-align:middle;white-space:nowrap;text-align:center}.gs-search-close{display:table-cell;cursor:pointer;vertical-align:middle;width:24px}.gs-search-casesensitive{display:table-cell;cursor:pointer;vertical-align:middle;width:30px}.gs-search-casesensitive span{font-size:14px;padding:0 3px}.gs-search-casesensitive span.gs-search-casesensitive-on{color:#07f;background-color:rgba(200,200,255,.5);border-radius:3px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}`;
|
|
11631
|
+
const LAST_MODIFIED = 1771145572;
|
|
11632
|
+
const CSS = `.gs-root1{display:inline-block;position:relative;border-spacing:0;width:fit-content;max-width:100%;overflow:auto;font-family:"SF Pro Text","SF Pro Icons","Helvetica Neue",Helvetica,Arial,Meiryo,sans-serif;visibility:hidden;opacity:0}.gs-root1.gs-initialized{visibility:visible;opacity:1;transition:opacity .2s ease-in-out}.gs-root1 .gs-main{flex:1;max-width:100%;overflow:hidden;position:relative;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.gs-root1 .gs-resizing{width:100%;height:100%;position:absolute;background-color:rgba(0,127,255,.08);top:0;left:0;z-index:2}.gs-root1 .gs-line-horizontal{width:100%}.gs-root1 .gs-line-vertical{height:100%}.gs-root1 .gs-line{position:relative;top:0;left:0;border:dotted 1px #07f;box-sizing:border-box}.gs-root1 .gs-line span{font-size:10px;padding:3px;background-color:#07f;color:#fff;margin:0;position:absolute;top:0;left:0}.gs-root1 .gs-scroll-handle{width:100%;height:100%;cursor:cell}.gs-hidden{visibility:hidden;position:absolute;top:0;left:0;width:0;height:0;overflow:hidden;pointer-events:none;z-index:-1}.gs-fixed{position:fixed;top:0;left:0;z-index:1}.gs-root1[data-mode=light]{background-color:#e2e2e2;color:#000}.gs-root1[data-mode=light] .gs-main{background-color:#e2e2e2;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd}.gs-root1[data-mode=light] .gs-tabular{background-color:#e2e2e2}.gs-root1[data-mode=light] .gs-formula-bar{background-color:#efefef}.gs-root1[data-mode=light] .gs-formula-bar-editor-inner{color:#555}.gs-root1[data-mode=light] .gs-cell{background-color:#f7f7f7;border-top:solid 1px #ddd;border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-adjuster{background-color:#ddd}.gs-root1[data-mode=light] .gs-tabular-inner{background-color:#ddd}.gs-root1[data-mode=light] .gs-th{background-color:#efefef;color:#666}.gs-root1[data-mode=light] .gs-th-top{border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-top .gs-th-inner{border-top:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-left{border-top:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-left .gs-th-inner{border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-search-bar{color:rgba(0,0,0,.3)}.gs-editor[data-mode=light].gs-editing textarea{caret-color:#000000}.gs-editor[data-mode=light].gs-editing .gs-editor-hl{background-color:#f7f7f7;color:#000}.gs-editor[data-mode=light] .gs-editor-options{color:#000;background-color:#f7f7f7;border:solid 1px #ddd}.gs-root1[data-mode=dark]{background-color:#5a5a5a;color:#eee}.gs-root1[data-mode=dark] .gs-main{background-color:#3f3f3f;border-right:solid 1px #5a5a5a;border-bottom:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-tabular{background-color:#3f3f3f}.gs-root1[data-mode=dark] .gs-formula-bar{background-color:#4f4f4f}.gs-root1[data-mode=dark] .gs-formula-bar-editor-inner{color:#bbb}.gs-root1[data-mode=dark] .gs-cell{background-color:#212121;border-top:solid 1px #5a5a5a;border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-adjuster{background-color:#5a5a5a}.gs-root1[data-mode=dark] .gs-tabular-inner{background-color:#5a5a5a}.gs-root1[data-mode=dark] .gs-large-editor textarea{color:#eee;caret-color:#eeeeee}.gs-root1[data-mode=dark] .gs-th{background-color:#4f4f4f;color:#eee}.gs-root1[data-mode=dark] .gs-th-top{border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-top .gs-th-inner{border-top:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-left{border-top:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-left .gs-th-inner{border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-search-bar textarea{color:#eee;caret-color:#eeeeee}.gs-root1[data-mode=dark] .gs-search-bar{color:rgba(255,255,255,.3)}.gs-editor[data-mode=dark].gs-editing textarea{caret-color:#eeeeee}.gs-editor[data-mode=dark].gs-editing .gs-editor-hl{background-color:#212121;color:#eee}.gs-editor[data-mode=dark] .gs-editor-options{color:#eee;background-color:#5a5a5a;border:solid 1px #5a5a5a}.gs-cell{transition:border-color .2s ease;padding:0;margin:0;box-sizing:border-box;position:relative;font-size:13px;letter-spacing:1px;line-height:24px;cursor:cell;user-select:none;-webkit-user-select:none;-moz-user-select:none}.gs-cell.gs-copying textarea:focus{outline:solid 1px #0077ff}.gs-cell.gs-selecting{z-index:1}.gs-cell.gs-selecting .gs-cell-label{display:block}.gs-cell.gs-choosing{margin-top:-1px;margin-left:-1px;z-index:1}.gs-cell.gs-choosing.gs-editing{color:transparent}.gs-cell.gs-choosing .gs-cell-label{display:block}.gs-cell .gs-formula-error-triangle{position:absolute;top:0;right:0;border-top:3px solid rgba(200,0,0,.9);border-right:3px solid rgba(200,0,0,.9);border-bottom:3px solid transparent;border-left:3px solid transparent;z-index:1}.gs-cell .gs-cell-label{font-size:8px;font-weight:400;font-style:normal;font-family:math,monospace,serif;letter-spacing:1px;line-height:14px;position:absolute;top:0;right:0;background-color:rgba(0,128,255,.6);color:rgba(255,255,255,.6);padding:0 2px;display:none;opacity:.7}.gs-cell .gs-cell-inner-wrap{width:100%;height:100%;position:absolute;top:0;left:0}.gs-cell .gs-cell-inner{width:100%;height:100%;overflow:hidden;display:flex;box-sizing:border-box;border:none!important}.gs-cell .gs-cell-rendered{overflow:hidden;white-space:pre-wrap;cursor:cell;word-wrap:break-word;word-break:break-all;padding:0 2px;width:100%;height:100%}.gs-cell .gs-cell-rendered>*{position:relative}.gs-cell .gs-cell-rendered>.backface{z-index:0}.gs-cell .gs-autofill-drag{background-color:#07f;position:absolute;width:7px;height:7px;bottom:0;right:0;margin-right:-3.5px;margin-bottom:-3.5px;cursor:crosshair;z-index:1}.gs-th[data-x="1"] .gs-th-inner-wrap{border-left:none}.gs-th[data-y="1"] .gs-th-inner-wrap{border-top:none}.gs-cell[data-x="1"]{border-left:none}.gs-cell[data-y="1"]{border-top:none}.gs-contextmenu-modal{width:100%;height:100vh;z-index:12}.gs-contextmenu{z-index:12;position:fixed;background-color:#fff;padding:5px 0;border-radius:5px;box-shadow:rgba(60,64,67,.3) 0 1px 2px 0,rgba(60,64,67,.15) 0 1px 3px 1px}.gs-contextmenu ul{color:#555;margin:0;padding:0;min-width:250px}.gs-contextmenu li{padding:5px 10px;list-style-type:none;display:flex}.gs-contextmenu li.gs-enabled{cursor:pointer}.gs-contextmenu li.gs-enabled:hover{background-color:#eee}.gs-contextmenu li.gs-disabled{opacity:.5;cursor:not-allowed}.gs-contextmenu li .gs-menu-name{font-size:13px;letter-spacing:1px}.gs-contextmenu li.gs-menu-divider{background-color:#aaa;padding:0;height:1px;margin:10px 0}.gs-contextmenu li .gs-menu-name{flex:1}.gs-contextmenu li .gs-menu-shortcut{font-size:10px;line-height:20px;color:#999}.gs-contextmenu li .gs-menu-shortcut:before{content:"( "}.gs-contextmenu li .gs-menu-shortcut:after{content:" )"}.gs-contextmenu li .gs-menu-shortcut .gs-menu-underline{text-decoration:underline}.gs-column-menu-modal{width:100%;height:100vh;z-index:12}.gs-column-menu{z-index:12;position:fixed;background-color:#fff;padding:5px 0;border-radius:5px;box-shadow:rgba(60,64,67,.3) 0 1px 2px 0,rgba(60,64,67,.15) 0 1px 3px 1px}.gs-column-menu ul{color:#555;margin:0;padding:0;min-width:200px}.gs-column-menu li{padding:5px 10px;list-style-type:none}.gs-column-menu li.gs-enabled{cursor:pointer}.gs-column-menu li.gs-enabled:hover{background-color:#eee}.gs-column-menu li.gs-disabled{opacity:.5;cursor:not-allowed}.gs-column-menu li .gs-menu-name{font-size:13px;letter-spacing:1px}.gs-column-menu li.gs-menu-divider{background-color:#aaa;padding:0;height:1px;margin:5px 0}.gs-column-menu .gs-column-menu-label{padding:5px 10px}.gs-column-menu .gs-label-input-row{display:flex;gap:4px;align-items:center}.gs-column-menu .gs-label-input{flex:1;font-size:13px;padding:4px 6px;border:none;border-bottom:1px solid #ccc;border-radius:0;outline:0;min-width:0;background-color:transparent;box-shadow:none}.gs-column-menu .gs-label-input:focus{border-bottom-color:#07f;outline:0;box-shadow:none}.gs-column-menu .gs-label-apply-btn{font-size:12px;padding:3px 13px;border:1px solid transparent;border-radius:3px;background-color:transparent;color:#1a8a1a;cursor:pointer;font-weight:700;letter-spacing:1px}.gs-column-menu .gs-label-apply-btn:hover{border-color:#1a8a1a}.gs-column-menu .gs-column-menu-filter{padding:5px 10px}.gs-column-menu .gs-filter-header{display:flex;align-items:center;gap:8px}.gs-column-menu .gs-filter-header .gs-filter-add-btn{font-size:12px;padding:3px 9px;border:1px solid transparent;border-radius:3px;background-color:transparent;cursor:pointer;color:#555;letter-spacing:1px}.gs-column-menu .gs-filter-header .gs-filter-add-btn:hover{border-color:#555}.gs-column-menu .gs-filter-mode-toggle{display:flex;gap:6px;margin-left:auto}.gs-column-menu .gs-filter-mode-toggle label{display:flex;align-items:center;gap:3px;font-size:11px;font-weight:700;letter-spacing:.5px;color:#888;cursor:pointer;user-select:none}.gs-column-menu .gs-filter-mode-toggle label input[type=radio]{margin:0;cursor:pointer}.gs-column-menu .gs-filter-mode-toggle label.gs-active{color:#07f}.gs-column-menu .gs-filter-mode-toggle.gs-disabled{opacity:.4;pointer-events:none}.gs-column-menu .gs-filter-conditions{display:flex;flex-direction:column;gap:5px;margin-top:6px;max-height:200px;overflow-y:auto}.gs-column-menu .gs-filter-condition-row{display:flex;gap:4px;align-items:normal}.gs-column-menu .gs-filter-method-select{font-size:12px;padding:4px 4px;border:none;border-bottom:1px solid #ccc;border-radius:0;outline:0;background-color:#fff;box-shadow:none;min-width:40px;max-width:80px;cursor:pointer}.gs-column-menu .gs-filter-method-select:focus{border-bottom-color:#07f;outline:0;box-shadow:none}.gs-column-menu .gs-filter-value-input{flex:1;font-size:13px;padding:4px 6px;border:none;border-bottom:1px solid #ccc;border-radius:0;outline:0;min-width:0;width:80px;background-color:transparent;box-shadow:none}.gs-column-menu .gs-filter-value-input:focus{border-bottom-color:#07f;outline:0;box-shadow:none}.gs-column-menu .gs-filter-remove-btn{font-size:12px;padding:0;border:none;border-radius:3px;background-color:transparent;cursor:pointer;color:#999;line-height:1;flex-shrink:0}.gs-column-menu .gs-filter-remove-btn:hover{color:#c33}.gs-column-menu .gs-filter-actions{display:flex;gap:4px;margin-top:10px;align-items:center}.gs-column-menu .gs-filter-actions .gs-filter-reset-all-btn{font-size:12px;padding:3px 9px;border:1px solid transparent;border-radius:3px;background-color:transparent;cursor:pointer;color:#c33;font-weight:700;letter-spacing:1px}.gs-column-menu .gs-filter-actions .gs-filter-reset-all-btn:hover{border-color:#c33}.gs-column-menu .gs-filter-actions .gs-filter-actions-right{display:flex;gap:4px;margin-left:auto}.gs-column-menu .gs-filter-actions .gs-filter-reset-btn{font-size:12px;padding:3px 9px;border:1px solid transparent;border-radius:3px;background-color:transparent;cursor:pointer;color:#e08000;font-weight:700;letter-spacing:1px}.gs-column-menu .gs-filter-actions .gs-filter-reset-btn:hover{border-color:#e08000}.gs-column-menu .gs-filter-actions .gs-filter-apply-btn{font-size:12px;padding:3px 13px;border:1px solid transparent;border-radius:3px;background-color:transparent;color:#07f;cursor:pointer;font-weight:700;letter-spacing:1px}.gs-column-menu .gs-filter-actions .gs-filter-apply-btn:hover{border-color:#07f}.gs-column-menu-btn{position:absolute;right:4px;top:50%;transform:translateY(-50%);background-color:rgba(128,128,128,.3);border:1px solid #ccc;border-radius:50%;cursor:pointer;font-size:12px;font-weight:700;line-height:1;color:#888;width:18px;height:18px;padding:0;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease;z-index:2}.gs-column-menu-btn.gs-filtered{opacity:1;background-color:#e0edff;border-color:#07f;color:#07f}.gs-column-menu-btn.gs-active{opacity:1;background-color:#d0e0ff;border-color:#07f;color:#07f}.gs-th-top:hover .gs-column-menu-btn{opacity:1}.gs-editor-hl{padding:0 2px!important;position:absolute;font-family:monospace,Arial;font-size:12px;line-height:24px;letter-spacing:1px}.gs-formula-bar-editor-inner{position:relative;display:table-cell}.gs-editor{opacity:0;z-index:-1}.gs-editor .gs-editor-inner{position:relative}.gs-editor .gs-editor-hl{box-sizing:content-box;border:solid 2px #07f;margin:-2px -1px}.gs-editor textarea{width:100%;padding:0 2px!important;position:absolute;font-size:12px;font-family:monospace,Arial;line-height:24px;letter-spacing:1px;top:0;left:0;border:none;outline:0;background-color:transparent;color:transparent;resize:none;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;overflow:hidden;cursor:default;white-space:pre;height:auto}.gs-editor.gs-editing{z-index:11;opacity:1}.gs-editor.gs-editing .gs-cell-label{pointer-events:none;font-family:math,monospace,serif;position:absolute;top:0;right:0;margin-top:-15px;margin-right:-2px;padding:0 2px;font-size:10px;background-color:rgba(0,119,255,.75);color:#fff;z-index:1}.gs-formula-bar{width:100%;position:relative;display:table;align-items:center;justify-content:center;border-top:solid 1px rgba(128,128,128,.3);border-left:solid 1px rgba(128,128,128,.3);border-right:solid 1px rgba(128,128,128,.3);box-sizing:border-box}.gs-formula-bar .gs-selecting-address{display:table-cell;vertical-align:middle;width:60px;color:rgba(200,200,200);font-size:13px;text-align:center}.gs-formula-bar .gs-fx{display:table-cell;vertical-align:middle;width:30px;color:rgba(200,200,200);font-style:italic;font-family:cursive;text-align:center;border-left:solid 1px rgba(128,128,128,.5);font-size:15px}.gs-formula-bar .gs-editor-hl{z-index:0;overflow-y:auto;box-sizing:border-box;white-space:pre-wrap;word-break:break-all}.gs-formula-bar textarea{position:relative;z-index:1;width:100%;vertical-align:bottom;color:transparent;border:none;background-color:transparent;padding:0 2px;box-sizing:border-box;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;font-size:12px;font-family:monospace,Arial;height:24px;line-height:24px;min-height:24px;letter-spacing:1px;resize:vertical;caret-color:rgba(128,128,128);white-space:pre-wrap;word-break:break-all}.gs-token-type-INVALID_REF{color:red}.gs-token-type-VALUE.gs-token-entity-type-boolean,.gs-token-type-VALUE.gs-token-entity-type-number{color:#39f}.gs-token-type-VALUE.gs-token-entity-type-string{color:#090}.gs-editor-options{padding:0;box-shadow:0 2px 8px rgba(0,0,0,.25);border:1px solid rgba(128,128,128,.2);border-radius:4px}.gs-editor-option{cursor:pointer;list-style:none;padding:5px;font-size:12px}.gs-editor-option:hover{background-color:rgba(128,128,128,.1)}.gs-editor-option-selected{background-color:rgba(128,128,128,.2)}.gs-adjuster{padding:0}.gs-table{margin:0}.gs-tabular{overflow:auto;display:block;box-sizing:border-box;overscroll-behavior:none;position:relative}.gs-tabular-inner>table{table-layout:fixed;border-collapse:collapse;border-spacing:0}.gs-th{z-index:2;padding:0;position:sticky;font-size:13px;font-weight:400;box-sizing:border-box;vertical-align:top}.gs-th .gs-resizer{position:absolute;border-color:transparent;box-sizing:border-box;z-index:2}.gs-th .gs-resizer:hover{background-color:#07f}.gs-th .gs-resizer.gs-protected{display:none}.gs-th-inner{height:100%;box-sizing:border-box;vertical-align:middle;overflow:hidden;display:flex;align-items:center;justify-content:center}.gs-th-inner-wrap{height:100%;box-sizing:border-box;background-color:transparent}.gs-th-top{top:0;overflow:hidden}.gs-th-top .gs-resizer{top:0;right:0;width:3px;cursor:e-resize}.gs-th-top .gs-resizer.gs-dragging{border-right-style:dotted;height:1000000px!important;cursor:e-resize}.gs-th-left{left:0;overflow:hidden;min-width:30px;border-top:solid 1px #ddd}.gs-th-left .gs-resizer{left:0;bottom:0;height:3px;cursor:n-resize}.gs-th-left .gs-resizer.gs-dragging{border-bottom-style:dotted;width:1000000px!important;cursor:n-resize}.gs-th-top.gs-th-left{top:0;left:0;z-index:3;border:none!important}.gs-search-bar{width:100%;display:table;align-items:center;justify-content:center;border-top:solid 1px rgba(128,128,128,.3);border-left:solid 1px rgba(128,128,128,.3);border-right:solid 1px rgba(128,128,128,.3);box-sizing:border-box;background-color:rgba(200,50,0,.2)}.gs-search-bar.gs-search-found{background-color:rgba(0,200,100,.2)}.gs-search-bar .gs-search-bar-inner{vertical-align:middle;border-left:solid 1px rgba(128,128,128,.5)}.gs-search-bar .gs-search-bar-icon{border-left:solid 1px rgba(128,128,128,.3);display:table-cell;vertical-align:middle;width:30px}.gs-search-bar textarea{background-color:transparent;border:none;padding:0 2px;box-sizing:border-box;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;font-size:12px;font-family:monospace,Arial;height:24px;line-height:24px;min-height:24px;letter-spacing:1px;caret-color:rgba(128,128,128);white-space:pre-wrap;word-break:break-all;display:table-cell;vertical-align:middle;width:100%;resize:none}.gs-search-progress{display:table-cell;color:#999;font-size:13px;width:60px;vertical-align:middle;white-space:nowrap;text-align:center}.gs-search-close{display:table-cell;cursor:pointer;vertical-align:middle;width:24px}.gs-search-casesensitive{display:table-cell;cursor:pointer;vertical-align:middle;width:30px}.gs-search-casesensitive span{font-size:14px;padding:0 3px}.gs-search-casesensitive span.gs-search-casesensitive-on{color:#07f;background-color:rgba(200,200,255,.5);border-radius:3px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}`;
|
|
10542
11633
|
const embedStyle = () => {
|
|
10543
11634
|
if (typeof window === "undefined") {
|
|
10544
11635
|
return;
|
|
@@ -10943,6 +12034,7 @@ function GridSheet({
|
|
|
10943
12034
|
contextMenuItems: contextMenuItems ?? defaultContextMenuItems,
|
|
10944
12035
|
resizingPositionY: [-1, -1, -1],
|
|
10945
12036
|
resizingPositionX: [-1, -1, -1],
|
|
12037
|
+
columnMenuState: null,
|
|
10946
12038
|
minNumRows: 1,
|
|
10947
12039
|
maxNumRows: -1,
|
|
10948
12040
|
minNumCols: 1,
|
|
@@ -10999,7 +12091,7 @@ function GridSheet({
|
|
|
10999
12091
|
style: {
|
|
11000
12092
|
//width: '100%',
|
|
11001
12093
|
maxWidth: (((_a = store.tableReactive.current) == null ? void 0 : _a.totalWidth) || 0) + 2,
|
|
11002
|
-
maxHeight: (((_b = store.tableReactive.current) == null ? void 0 : _b.
|
|
12094
|
+
maxHeight: (((_b = store.tableReactive.current) == null ? void 0 : _b.fullHeight) || 0) + 2,
|
|
11003
12095
|
overflow: "auto",
|
|
11004
12096
|
resize: sheetResize,
|
|
11005
12097
|
...style
|
|
@@ -11009,6 +12101,7 @@ function GridSheet({
|
|
|
11009
12101
|
/* @__PURE__ */ jsx(Tabular, {}),
|
|
11010
12102
|
/* @__PURE__ */ jsx(StoreObserver, { ...{ ...options, sheetHeight, sheetWidth, sheetName, connector } }),
|
|
11011
12103
|
/* @__PURE__ */ jsx(ContextMenu, {}),
|
|
12104
|
+
/* @__PURE__ */ jsx(ColumnMenu, {}),
|
|
11012
12105
|
/* @__PURE__ */ jsx(Resizer, {}),
|
|
11013
12106
|
/* @__PURE__ */ jsx(Emitter, {})
|
|
11014
12107
|
]
|