@gridsheet/react-core 2.0.5 → 2.1.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/Cell.d.ts +1 -2
- package/dist/components/Cell.d.ts.map +1 -1
- package/dist/components/CellStateOverlay.d.ts +8 -0
- package/dist/components/CellStateOverlay.d.ts.map +1 -0
- package/dist/components/Tabular.d.ts.map +1 -1
- package/dist/index.js +370 -232
- package/dist/index.js.map +1 -1
- package/dist/lib/table.d.ts.map +1 -1
- package/dist/lib/virtualization.d.ts.map +1 -1
- package/dist/styles/minified.d.ts +2 -2
- package/dist/styles/minified.d.ts.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -505,21 +505,17 @@ const isXSheetFocused = (store) => {
|
|
|
505
505
|
};
|
|
506
506
|
const getCellRectPositions = (table, { y, x }) => {
|
|
507
507
|
var _a, _b;
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
width += table.headerWidth;
|
|
515
|
-
height += table.headerHeight;
|
|
516
|
-
const w = ((_a = table.getCellByPoint({ y: 0, x }, "SYSTEM")) == null ? void 0 : _a.width) || DEFAULT_WIDTH;
|
|
517
|
-
const h = ((_b = table.getCellByPoint({ y, x: 0 }, "SYSTEM")) == null ? void 0 : _b.height) || DEFAULT_HEIGHT;
|
|
508
|
+
const colCell = table.getCellByPoint({ y: 0, x }, "SYSTEM");
|
|
509
|
+
const rowCell = table.getCellByPoint({ y, x: 0 }, "SYSTEM");
|
|
510
|
+
const left = ((_a = colCell == null ? void 0 : colCell.system) == null ? void 0 : _a.offsetLeft) ?? 0;
|
|
511
|
+
const top = ((_b = rowCell == null ? void 0 : rowCell.system) == null ? void 0 : _b.offsetTop) ?? 0;
|
|
512
|
+
const w = (colCell == null ? void 0 : colCell.width) || DEFAULT_WIDTH;
|
|
513
|
+
const h = (rowCell == null ? void 0 : rowCell.height) || DEFAULT_HEIGHT;
|
|
518
514
|
return {
|
|
519
|
-
top
|
|
520
|
-
left
|
|
521
|
-
bottom:
|
|
522
|
-
right:
|
|
515
|
+
top,
|
|
516
|
+
left,
|
|
517
|
+
bottom: top + h,
|
|
518
|
+
right: left + w,
|
|
523
519
|
width: w,
|
|
524
520
|
height: h
|
|
525
521
|
};
|
|
@@ -7888,26 +7884,46 @@ class Table {
|
|
|
7888
7884
|
return (this.wire.cellHead++).toString(36);
|
|
7889
7885
|
}
|
|
7890
7886
|
getRectSize({ top, left, bottom, right }) {
|
|
7891
|
-
var _a, _b;
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
}
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7887
|
+
var _a, _b, _c, _d;
|
|
7888
|
+
const l = left || 1;
|
|
7889
|
+
const t = top || 1;
|
|
7890
|
+
const colRightCell = this.getCellByPoint({ y: 0, x: right }, "SYSTEM");
|
|
7891
|
+
const colLeftCell = this.getCellByPoint({ y: 0, x: l }, "SYSTEM");
|
|
7892
|
+
const rowBottomCell = this.getCellByPoint({ y: bottom, x: 0 }, "SYSTEM");
|
|
7893
|
+
const rowTopCell = this.getCellByPoint({ y: t, x: 0 }, "SYSTEM");
|
|
7894
|
+
const rw = ((_a = colRightCell == null ? void 0 : colRightCell.system) == null ? void 0 : _a.offsetLeft) ?? 0;
|
|
7895
|
+
const lw = ((_b = colLeftCell == null ? void 0 : colLeftCell.system) == null ? void 0 : _b.offsetLeft) ?? 0;
|
|
7896
|
+
const rh = ((_c = rowBottomCell == null ? void 0 : rowBottomCell.system) == null ? void 0 : _c.offsetTop) ?? 0;
|
|
7897
|
+
const th = ((_d = rowTopCell == null ? void 0 : rowTopCell.system) == null ? void 0 : _d.offsetTop) ?? 0;
|
|
7898
|
+
const width = Math.max(0, rw - lw);
|
|
7899
|
+
const height = Math.max(0, rh - th);
|
|
7899
7900
|
return { width, height };
|
|
7900
7901
|
}
|
|
7901
7902
|
setTotalSize() {
|
|
7902
|
-
const
|
|
7903
|
-
const
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7903
|
+
const numCols = this.getNumCols();
|
|
7904
|
+
const numRows = this.getNumRows();
|
|
7905
|
+
const headerW = this.headerWidth;
|
|
7906
|
+
const headerH = this.headerHeight;
|
|
7907
|
+
let accW = 0;
|
|
7908
|
+
for (let x = 1; x <= numCols; x++) {
|
|
7909
|
+
const cell = this.getCellByPoint({ y: 0, x }, "SYSTEM");
|
|
7910
|
+
const w = (cell == null ? void 0 : cell.width) || DEFAULT_WIDTH;
|
|
7911
|
+
if (cell == null ? void 0 : cell.system) {
|
|
7912
|
+
cell.system.offsetLeft = headerW + accW;
|
|
7913
|
+
}
|
|
7914
|
+
accW += w;
|
|
7915
|
+
}
|
|
7916
|
+
this.totalWidth = headerW + accW;
|
|
7917
|
+
let accH = 0;
|
|
7918
|
+
for (let y = 1; y <= numRows; y++) {
|
|
7919
|
+
const cell = this.getCellByPoint({ y, x: 0 }, "SYSTEM");
|
|
7920
|
+
const h = (cell == null ? void 0 : cell.height) || DEFAULT_HEIGHT;
|
|
7921
|
+
if (cell == null ? void 0 : cell.system) {
|
|
7922
|
+
cell.system.offsetTop = headerH + accH;
|
|
7923
|
+
}
|
|
7924
|
+
accH += h;
|
|
7925
|
+
}
|
|
7926
|
+
this.totalHeight = headerH + accH;
|
|
7911
7927
|
}
|
|
7912
7928
|
refresh(relocate = false, resize = false) {
|
|
7913
7929
|
this.incrementVersion();
|
|
@@ -9263,7 +9279,7 @@ const safePreventDefault = (e) => {
|
|
|
9263
9279
|
e.preventDefault();
|
|
9264
9280
|
}
|
|
9265
9281
|
};
|
|
9266
|
-
const Cell = memo(({ y, x
|
|
9282
|
+
const Cell = memo(({ y, x }) => {
|
|
9267
9283
|
const rowId = y2r(y);
|
|
9268
9284
|
const colId = x2c(x);
|
|
9269
9285
|
const address = `${colId}${rowId}`;
|
|
@@ -9499,8 +9515,7 @@ const Cell = memo(({ y, x, operationStyle }) => {
|
|
|
9499
9515
|
"data-address": address,
|
|
9500
9516
|
className: `gs-cell ${among(selectingArea, { y, x }) ? "gs-selecting" : ""} ${pointed ? "gs-choosing" : ""} ${editing ? "gs-editing" : ""}`,
|
|
9501
9517
|
style: {
|
|
9502
|
-
...cell == null ? void 0 : cell.style
|
|
9503
|
-
...operationStyle
|
|
9518
|
+
...cell == null ? void 0 : cell.style
|
|
9504
9519
|
},
|
|
9505
9520
|
onContextMenu,
|
|
9506
9521
|
onDoubleClick,
|
|
@@ -10076,6 +10091,260 @@ const HeaderCellLeft = memo(({ y }) => {
|
|
|
10076
10091
|
}
|
|
10077
10092
|
);
|
|
10078
10093
|
});
|
|
10094
|
+
const COLOR_POINTED = "#0077ff";
|
|
10095
|
+
const COLOR_SELECTED = "#0077ff";
|
|
10096
|
+
const SELECTING_FILL = "rgba(0, 128, 255, 0.2)";
|
|
10097
|
+
const COLOR_COPYING = "#0077ff";
|
|
10098
|
+
const COLOR_CUTTING = "#0077ff";
|
|
10099
|
+
const SEARCH_MATCHING_BACKGROUND = "rgba(0, 200, 100, 0.2)";
|
|
10100
|
+
const COLOR_SEARCH_MATCHING = "#00aa78";
|
|
10101
|
+
const COLOR_AUTOFILL = "#444444";
|
|
10102
|
+
const HEADER_COLORS = {
|
|
10103
|
+
light: {
|
|
10104
|
+
selecting: "rgba(0, 0, 0, 0.1)",
|
|
10105
|
+
choosing: "rgba(0, 0, 0, 0.2)",
|
|
10106
|
+
thSelecting: "rgba(0, 0, 0, 0.55)"
|
|
10107
|
+
},
|
|
10108
|
+
dark: {
|
|
10109
|
+
selecting: "rgba(255, 255, 255, 0.08)",
|
|
10110
|
+
choosing: "rgba(255, 255, 255, 0.18)",
|
|
10111
|
+
thSelecting: "rgba(255, 255, 255, 0.4)"
|
|
10112
|
+
}
|
|
10113
|
+
};
|
|
10114
|
+
const fillRect = (ctx, x, y, width, height, color) => {
|
|
10115
|
+
ctx.fillStyle = color;
|
|
10116
|
+
ctx.fillRect(x, y, width, height);
|
|
10117
|
+
};
|
|
10118
|
+
const drawRect = (ctx, x, y, width, height, color, lineWidth = 2, dashPattern = [], fillColor) => {
|
|
10119
|
+
if (fillColor) {
|
|
10120
|
+
ctx.fillStyle = fillColor;
|
|
10121
|
+
ctx.fillRect(x, y, width, height);
|
|
10122
|
+
}
|
|
10123
|
+
ctx.strokeStyle = color;
|
|
10124
|
+
ctx.lineWidth = lineWidth;
|
|
10125
|
+
ctx.setLineDash(dashPattern);
|
|
10126
|
+
ctx.strokeRect(x + lineWidth / 2, y + lineWidth / 2, width - lineWidth, height - lineWidth);
|
|
10127
|
+
ctx.setLineDash([]);
|
|
10128
|
+
};
|
|
10129
|
+
const drawAreaRectViewport = (ctx, table, scrollTop, scrollLeft, viewW, viewH, area, color, lineWidth = 2, dashPattern = [], fillColor) => {
|
|
10130
|
+
const { top, left, bottom, right } = area;
|
|
10131
|
+
if (top === -1 || left === -1 || bottom === -1 || right === -1) {
|
|
10132
|
+
return;
|
|
10133
|
+
}
|
|
10134
|
+
const topLeft = getCellRectPositions(table, { y: top, x: left });
|
|
10135
|
+
const bottomRight = getCellRectPositions(table, { y: bottom, x: right });
|
|
10136
|
+
const x1 = topLeft.left - scrollLeft;
|
|
10137
|
+
const y1 = topLeft.top - scrollTop;
|
|
10138
|
+
const x2 = bottomRight.right - scrollLeft;
|
|
10139
|
+
const y2 = bottomRight.bottom - scrollTop;
|
|
10140
|
+
if (x2 < 0 || x1 > viewW || y2 < 0 || y1 > viewH) {
|
|
10141
|
+
return;
|
|
10142
|
+
}
|
|
10143
|
+
drawRect(ctx, x1, y1, x2 - x1, y2 - y1, color, lineWidth, dashPattern, fillColor);
|
|
10144
|
+
};
|
|
10145
|
+
const CellStateOverlay = ({ refs = {} }) => {
|
|
10146
|
+
const { store } = useContext(Context);
|
|
10147
|
+
const {
|
|
10148
|
+
tableReactive,
|
|
10149
|
+
tabularRef,
|
|
10150
|
+
choosing,
|
|
10151
|
+
selectingZone,
|
|
10152
|
+
matchingCells,
|
|
10153
|
+
matchingCellIndex,
|
|
10154
|
+
autofillDraggingTo,
|
|
10155
|
+
topHeaderSelecting,
|
|
10156
|
+
leftHeaderSelecting,
|
|
10157
|
+
mode,
|
|
10158
|
+
dragging
|
|
10159
|
+
} = store;
|
|
10160
|
+
const table = tableReactive.current;
|
|
10161
|
+
const canvasRef = useRef(null);
|
|
10162
|
+
const rafIdRef = useRef(0);
|
|
10163
|
+
const storeRef = useRef(store);
|
|
10164
|
+
storeRef.current = store;
|
|
10165
|
+
const drawCanvas = useCallback(() => {
|
|
10166
|
+
if (!table || !tabularRef.current || !canvasRef.current) {
|
|
10167
|
+
return;
|
|
10168
|
+
}
|
|
10169
|
+
const canvas = canvasRef.current;
|
|
10170
|
+
const ctx = canvas.getContext("2d");
|
|
10171
|
+
if (!ctx) {
|
|
10172
|
+
return;
|
|
10173
|
+
}
|
|
10174
|
+
const container = tabularRef.current;
|
|
10175
|
+
const dpr = window.devicePixelRatio || 1;
|
|
10176
|
+
const w = container.clientWidth;
|
|
10177
|
+
const h = container.clientHeight;
|
|
10178
|
+
if (canvas.width !== w * dpr || canvas.height !== h * dpr) {
|
|
10179
|
+
canvas.style.width = `${w}px`;
|
|
10180
|
+
canvas.style.height = `${h}px`;
|
|
10181
|
+
canvas.width = w * dpr;
|
|
10182
|
+
canvas.height = h * dpr;
|
|
10183
|
+
}
|
|
10184
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
10185
|
+
ctx.clearRect(0, 0, w, h);
|
|
10186
|
+
const { wire } = table;
|
|
10187
|
+
const scrollTop = container.scrollTop;
|
|
10188
|
+
const scrollLeft = container.scrollLeft;
|
|
10189
|
+
const headerW = table.headerWidth;
|
|
10190
|
+
const headerH = table.headerHeight;
|
|
10191
|
+
ctx.save();
|
|
10192
|
+
ctx.beginPath();
|
|
10193
|
+
ctx.rect(headerW, headerH, w - headerW, h - headerH);
|
|
10194
|
+
ctx.clip();
|
|
10195
|
+
const selectingArea = zoneToArea(selectingZone);
|
|
10196
|
+
drawAreaRectViewport(ctx, table, scrollTop, scrollLeft, w, h, selectingArea, COLOR_SELECTED, 1, [], SELECTING_FILL);
|
|
10197
|
+
if (autofillDraggingTo) {
|
|
10198
|
+
const autofill = new Autofill(storeRef.current, autofillDraggingTo);
|
|
10199
|
+
drawAreaRectViewport(ctx, table, scrollTop, scrollLeft, w, h, autofill.wholeArea, COLOR_AUTOFILL, 1, [5, 5]);
|
|
10200
|
+
}
|
|
10201
|
+
{
|
|
10202
|
+
const { y, x } = choosing;
|
|
10203
|
+
if (y !== -1 && x !== -1) {
|
|
10204
|
+
const pos = getCellRectPositions(table, { y, x });
|
|
10205
|
+
const vx = pos.left - scrollLeft;
|
|
10206
|
+
const vy = pos.top - scrollTop;
|
|
10207
|
+
drawRect(ctx, vx, vy, pos.width, pos.height, COLOR_POINTED, 2, []);
|
|
10208
|
+
}
|
|
10209
|
+
}
|
|
10210
|
+
const { copyingSheetId, copyingZone, cutting } = wire;
|
|
10211
|
+
if (table.sheetId === copyingSheetId) {
|
|
10212
|
+
const copyingArea = zoneToArea(copyingZone);
|
|
10213
|
+
const color = cutting ? COLOR_CUTTING : COLOR_COPYING;
|
|
10214
|
+
const dashPattern = cutting ? [4, 4] : [6, 4];
|
|
10215
|
+
drawAreaRectViewport(ctx, table, scrollTop, scrollLeft, w, h, copyingArea, color, 2.5, dashPattern);
|
|
10216
|
+
}
|
|
10217
|
+
Object.entries(refs).forEach(([ref, i]) => {
|
|
10218
|
+
const palette = COLOR_PALETTE[i % COLOR_PALETTE.length];
|
|
10219
|
+
try {
|
|
10220
|
+
const refArea = table.rangeToArea(ref);
|
|
10221
|
+
drawAreaRectViewport(ctx, table, scrollTop, scrollLeft, w, h, refArea, palette, 2, [5, 5]);
|
|
10222
|
+
} catch (e) {
|
|
10223
|
+
}
|
|
10224
|
+
});
|
|
10225
|
+
matchingCells.forEach((address, index) => {
|
|
10226
|
+
const { y, x } = a2p(address);
|
|
10227
|
+
const pos = getCellRectPositions(table, { y, x });
|
|
10228
|
+
const vx = pos.left - scrollLeft;
|
|
10229
|
+
const vy = pos.top - scrollTop;
|
|
10230
|
+
if (vx + pos.width < 0 || vx > w || vy + pos.height < 0 || vy > h) {
|
|
10231
|
+
return;
|
|
10232
|
+
}
|
|
10233
|
+
const isCurrentMatch = index === matchingCellIndex;
|
|
10234
|
+
drawRect(
|
|
10235
|
+
ctx,
|
|
10236
|
+
vx,
|
|
10237
|
+
vy,
|
|
10238
|
+
pos.width,
|
|
10239
|
+
pos.height,
|
|
10240
|
+
isCurrentMatch ? COLOR_SEARCH_MATCHING : "transparent",
|
|
10241
|
+
isCurrentMatch ? 2 : 0,
|
|
10242
|
+
[],
|
|
10243
|
+
SEARCH_MATCHING_BACKGROUND
|
|
10244
|
+
);
|
|
10245
|
+
});
|
|
10246
|
+
ctx.restore();
|
|
10247
|
+
const headerColors = HEADER_COLORS[mode] || HEADER_COLORS.light;
|
|
10248
|
+
const numCols = table.getNumCols();
|
|
10249
|
+
const numRows = table.getNumRows();
|
|
10250
|
+
for (let x = 1; x <= numCols; x++) {
|
|
10251
|
+
let color = null;
|
|
10252
|
+
if (between({ start: selectingZone.startX, end: selectingZone.endX }, x)) {
|
|
10253
|
+
color = topHeaderSelecting ? headerColors.thSelecting : headerColors.selecting;
|
|
10254
|
+
}
|
|
10255
|
+
if (choosing.x === x) {
|
|
10256
|
+
color = headerColors.choosing;
|
|
10257
|
+
}
|
|
10258
|
+
if (!color) {
|
|
10259
|
+
continue;
|
|
10260
|
+
}
|
|
10261
|
+
const pos = getCellRectPositions(table, { y: 1, x });
|
|
10262
|
+
const left = pos.left - scrollLeft;
|
|
10263
|
+
if (left + pos.width < headerW || left > w) {
|
|
10264
|
+
continue;
|
|
10265
|
+
}
|
|
10266
|
+
fillRect(ctx, left, 0, pos.width, headerH, color);
|
|
10267
|
+
}
|
|
10268
|
+
for (let y = 1; y <= numRows; y++) {
|
|
10269
|
+
let color = null;
|
|
10270
|
+
if (between({ start: selectingZone.startY, end: selectingZone.endY }, y)) {
|
|
10271
|
+
color = leftHeaderSelecting ? headerColors.thSelecting : headerColors.selecting;
|
|
10272
|
+
}
|
|
10273
|
+
if (choosing.y === y) {
|
|
10274
|
+
color = headerColors.choosing;
|
|
10275
|
+
}
|
|
10276
|
+
if (!color) {
|
|
10277
|
+
continue;
|
|
10278
|
+
}
|
|
10279
|
+
const pos = getCellRectPositions(table, { y, x: 1 });
|
|
10280
|
+
const top = pos.top - scrollTop;
|
|
10281
|
+
if (top + pos.height < headerH || top > h) {
|
|
10282
|
+
continue;
|
|
10283
|
+
}
|
|
10284
|
+
fillRect(ctx, 0, top, headerW, pos.height, color);
|
|
10285
|
+
}
|
|
10286
|
+
}, [
|
|
10287
|
+
table,
|
|
10288
|
+
tabularRef,
|
|
10289
|
+
choosing,
|
|
10290
|
+
selectingZone,
|
|
10291
|
+
matchingCells,
|
|
10292
|
+
matchingCellIndex,
|
|
10293
|
+
autofillDraggingTo,
|
|
10294
|
+
topHeaderSelecting,
|
|
10295
|
+
leftHeaderSelecting,
|
|
10296
|
+
mode,
|
|
10297
|
+
dragging,
|
|
10298
|
+
refs
|
|
10299
|
+
]);
|
|
10300
|
+
const scheduleDrawCanvas = useCallback(() => {
|
|
10301
|
+
cancelAnimationFrame(rafIdRef.current);
|
|
10302
|
+
rafIdRef.current = requestAnimationFrame(drawCanvas);
|
|
10303
|
+
}, [drawCanvas]);
|
|
10304
|
+
const handleScroll = useCallback(() => {
|
|
10305
|
+
drawCanvas();
|
|
10306
|
+
}, [drawCanvas]);
|
|
10307
|
+
useEffect(() => {
|
|
10308
|
+
scheduleDrawCanvas();
|
|
10309
|
+
return () => cancelAnimationFrame(rafIdRef.current);
|
|
10310
|
+
}, [scheduleDrawCanvas]);
|
|
10311
|
+
useEffect(() => {
|
|
10312
|
+
const container = tabularRef.current;
|
|
10313
|
+
if (!container) {
|
|
10314
|
+
return;
|
|
10315
|
+
}
|
|
10316
|
+
container.addEventListener("scroll", handleScroll);
|
|
10317
|
+
return () => {
|
|
10318
|
+
container.removeEventListener("scroll", handleScroll);
|
|
10319
|
+
};
|
|
10320
|
+
}, [tabularRef, handleScroll]);
|
|
10321
|
+
return /* @__PURE__ */ jsx(
|
|
10322
|
+
"div",
|
|
10323
|
+
{
|
|
10324
|
+
style: {
|
|
10325
|
+
position: "sticky",
|
|
10326
|
+
top: 0,
|
|
10327
|
+
left: 0,
|
|
10328
|
+
width: 0,
|
|
10329
|
+
height: 0,
|
|
10330
|
+
overflow: "visible",
|
|
10331
|
+
pointerEvents: "none",
|
|
10332
|
+
zIndex: 10
|
|
10333
|
+
},
|
|
10334
|
+
children: /* @__PURE__ */ jsx(
|
|
10335
|
+
"canvas",
|
|
10336
|
+
{
|
|
10337
|
+
ref: canvasRef,
|
|
10338
|
+
className: "gs-cell-state-overlay",
|
|
10339
|
+
style: {
|
|
10340
|
+
pointerEvents: "none",
|
|
10341
|
+
display: "block"
|
|
10342
|
+
}
|
|
10343
|
+
}
|
|
10344
|
+
)
|
|
10345
|
+
}
|
|
10346
|
+
);
|
|
10347
|
+
};
|
|
10079
10348
|
const Tabular = () => {
|
|
10080
10349
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
10081
10350
|
const [palette, setPalette] = useState({});
|
|
@@ -10176,13 +10445,13 @@ const Tabular = () => {
|
|
|
10176
10445
|
}
|
|
10177
10446
|
setVirtualized(virtualize(table, tabularRef.current));
|
|
10178
10447
|
}, [tabularRef.current, tableReactive, (_a = mainRef.current) == null ? void 0 : _a.clientHeight, (_b = mainRef.current) == null ? void 0 : _b.clientWidth]);
|
|
10448
|
+
const mergedRefs = {
|
|
10449
|
+
...palette,
|
|
10450
|
+
...table ? table.wire.paletteBySheetName[table.sheetName] : {}
|
|
10451
|
+
};
|
|
10179
10452
|
if (!table || !table.wire.ready) {
|
|
10180
10453
|
return null;
|
|
10181
10454
|
}
|
|
10182
|
-
const operationStyles = useOperationStyles(store, {
|
|
10183
|
-
...palette,
|
|
10184
|
-
...table.wire.paletteBySheetName[table.sheetName]
|
|
10185
|
-
});
|
|
10186
10455
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
10187
10456
|
"div",
|
|
10188
10457
|
{
|
|
@@ -10194,7 +10463,7 @@ const Tabular = () => {
|
|
|
10194
10463
|
ref: tabularRef,
|
|
10195
10464
|
onMouseMove: handleMouseMove,
|
|
10196
10465
|
onScroll: handleScroll,
|
|
10197
|
-
children: /* @__PURE__ */
|
|
10466
|
+
children: /* @__PURE__ */ jsxs(
|
|
10198
10467
|
"div",
|
|
10199
10468
|
{
|
|
10200
10469
|
className: "gs-tabular-inner",
|
|
@@ -10202,204 +10471,73 @@ const Tabular = () => {
|
|
|
10202
10471
|
width: table.totalWidth + 1,
|
|
10203
10472
|
height: table.totalHeight + 1
|
|
10204
10473
|
},
|
|
10205
|
-
children:
|
|
10206
|
-
/* @__PURE__ */ jsx(
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10215
|
-
{
|
|
10216
|
-
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
/* @__PURE__ */
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10474
|
+
children: [
|
|
10475
|
+
/* @__PURE__ */ jsx(CellStateOverlay, { refs: mergedRefs }),
|
|
10476
|
+
/* @__PURE__ */ jsxs("table", { className: `gs-table`, children: [
|
|
10477
|
+
/* @__PURE__ */ jsx("thead", { className: "gs-thead", style: { height: table.headerHeight }, children: /* @__PURE__ */ jsxs("tr", { className: "gs-row", children: [
|
|
10478
|
+
/* @__PURE__ */ jsx(
|
|
10479
|
+
"th",
|
|
10480
|
+
{
|
|
10481
|
+
className: "gs-th gs-th-left gs-th-top",
|
|
10482
|
+
style: { position: "sticky", width: table.headerWidth, height: table.headerHeight },
|
|
10483
|
+
onClick: handleSelectAllClick,
|
|
10484
|
+
children: /* @__PURE__ */ jsx("div", { className: "gs-th-inner", children: /* @__PURE__ */ jsx(
|
|
10485
|
+
ScrollHandle,
|
|
10486
|
+
{
|
|
10487
|
+
className: leftHeaderSelecting || topHeaderSelecting ? "gs-hidden" : "",
|
|
10488
|
+
style: { position: "absolute" },
|
|
10489
|
+
horizontal: leftHeaderSelecting ? 0 : -1,
|
|
10490
|
+
vertical: topHeaderSelecting ? 0 : -1
|
|
10491
|
+
}
|
|
10492
|
+
) })
|
|
10493
|
+
}
|
|
10494
|
+
),
|
|
10495
|
+
/* @__PURE__ */ jsx(
|
|
10496
|
+
"th",
|
|
10497
|
+
{
|
|
10498
|
+
className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-left",
|
|
10499
|
+
style: { width: ((_c = virtualized == null ? void 0 : virtualized.adjuster) == null ? void 0 : _c.left) ?? 1 }
|
|
10500
|
+
}
|
|
10501
|
+
),
|
|
10502
|
+
(_e = (_d = virtualized == null ? void 0 : virtualized.xs) == null ? void 0 : _d.map) == null ? void 0 : _e.call(_d, (x) => /* @__PURE__ */ jsx(HeaderCellTop, { x }, x)),
|
|
10503
|
+
/* @__PURE__ */ jsx(
|
|
10504
|
+
"th",
|
|
10505
|
+
{
|
|
10506
|
+
className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-right",
|
|
10507
|
+
style: { width: (_f = virtualized == null ? void 0 : virtualized.adjuster) == null ? void 0 : _f.right }
|
|
10508
|
+
}
|
|
10509
|
+
)
|
|
10510
|
+
] }) }),
|
|
10511
|
+
/* @__PURE__ */ jsx("tbody", { className: "gs-table-body-adjuster", children: /* @__PURE__ */ jsxs("tr", { className: "gs-row", children: [
|
|
10512
|
+
/* @__PURE__ */ jsx(
|
|
10513
|
+
"th",
|
|
10514
|
+
{
|
|
10515
|
+
className: `gs-adjuster gs-adjuster-horizontal gs-adjuster-vertical`,
|
|
10516
|
+
style: { height: ((_g = virtualized == null ? void 0 : virtualized.adjuster) == null ? void 0 : _g.top) ?? 1 }
|
|
10517
|
+
}
|
|
10518
|
+
),
|
|
10519
|
+
/* @__PURE__ */ jsx("td", { className: "gs-adjuster gs-adjuster-vertical" }),
|
|
10520
|
+
(_h = virtualized == null ? void 0 : virtualized.xs) == null ? void 0 : _h.map((x) => /* @__PURE__ */ jsx("td", { className: "gs-adjuster gs-adjuster-vertical" }, x)),
|
|
10521
|
+
/* @__PURE__ */ jsx("th", { className: `gs-adjuster gs-adjuster-horizontal gs-adjuster-vertical` })
|
|
10522
|
+
] }) }),
|
|
10523
|
+
/* @__PURE__ */ jsx("tbody", { className: "gs-table-body-data", children: (_i = virtualized == null ? void 0 : virtualized.ys) == null ? void 0 : _i.map((y) => {
|
|
10524
|
+
var _a2;
|
|
10525
|
+
return /* @__PURE__ */ jsxs("tr", { className: "gs-row", children: [
|
|
10526
|
+
/* @__PURE__ */ jsx(HeaderCellLeft, { y }),
|
|
10527
|
+
/* @__PURE__ */ jsx("td", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-left" }),
|
|
10528
|
+
(_a2 = virtualized == null ? void 0 : virtualized.xs) == null ? void 0 : _a2.map((x) => /* @__PURE__ */ jsx(Cell, { y, x }, x)),
|
|
10529
|
+
/* @__PURE__ */ jsx("td", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-right" })
|
|
10530
|
+
] }, y);
|
|
10531
|
+
}) })
|
|
10532
|
+
] })
|
|
10533
|
+
]
|
|
10262
10534
|
}
|
|
10263
10535
|
)
|
|
10264
10536
|
}
|
|
10265
10537
|
) });
|
|
10266
10538
|
};
|
|
10267
|
-
const
|
|
10268
|
-
const BORDER_SELECTED = "solid 1px #0077ff";
|
|
10269
|
-
const BORDER_CUTTING = "dotted 2px #0077ff";
|
|
10270
|
-
const BORDER_COPYING = "dashed 2px #0077ff";
|
|
10271
|
-
const SEARCH_MATCHING_BACKGROUND = "rgba(0,200,100,.2)";
|
|
10272
|
-
const SEARCH_MATCHING_BORDER = "solid 2px #00aa78";
|
|
10273
|
-
const AUTOFILL_BORDER = "dashed 1px #444444";
|
|
10274
|
-
const useOperationStyles = (store, refs) => {
|
|
10275
|
-
const cellStyles = {};
|
|
10276
|
-
const updateStyle = (point, style) => {
|
|
10277
|
-
const address = p2a(point);
|
|
10278
|
-
cellStyles[address] = cellStyles[address] || {};
|
|
10279
|
-
Object.assign(cellStyles[address], style);
|
|
10280
|
-
};
|
|
10281
|
-
const {
|
|
10282
|
-
choosing,
|
|
10283
|
-
selectingZone,
|
|
10284
|
-
matchingCells,
|
|
10285
|
-
matchingCellIndex,
|
|
10286
|
-
tableReactive,
|
|
10287
|
-
autofillDraggingTo,
|
|
10288
|
-
editingAddress
|
|
10289
|
-
} = store;
|
|
10290
|
-
const table = tableReactive.current;
|
|
10291
|
-
if (!table) {
|
|
10292
|
-
return {};
|
|
10293
|
-
}
|
|
10294
|
-
const { wire } = table;
|
|
10295
|
-
const { copyingSheetId, copyingZone, cutting } = wire;
|
|
10296
|
-
const editingAnywhere = !!(wire.editingAddress || editingAddress);
|
|
10297
|
-
{
|
|
10298
|
-
const { top, left, bottom, right } = zoneToArea(selectingZone);
|
|
10299
|
-
if (!editingAnywhere) {
|
|
10300
|
-
for (let y = top; y <= bottom; y++) {
|
|
10301
|
-
updateStyle({ y, x: left - 1 }, { borderRight: BORDER_SELECTED });
|
|
10302
|
-
updateStyle({ y, x: left }, { borderLeft: BORDER_SELECTED });
|
|
10303
|
-
updateStyle({ y, x: right }, { borderRight: BORDER_SELECTED });
|
|
10304
|
-
updateStyle({ y, x: right + 1 }, { borderLeft: BORDER_SELECTED });
|
|
10305
|
-
}
|
|
10306
|
-
for (let x = left; x <= right; x++) {
|
|
10307
|
-
updateStyle({ y: top - 1, x }, { borderBottom: BORDER_SELECTED });
|
|
10308
|
-
updateStyle({ y: top, x }, { borderTop: BORDER_SELECTED });
|
|
10309
|
-
updateStyle({ y: bottom, x }, { borderBottom: BORDER_SELECTED });
|
|
10310
|
-
updateStyle({ y: bottom + 1, x }, { borderTop: BORDER_SELECTED });
|
|
10311
|
-
}
|
|
10312
|
-
}
|
|
10313
|
-
}
|
|
10314
|
-
if (autofillDraggingTo) {
|
|
10315
|
-
const autofill = new Autofill(store, autofillDraggingTo);
|
|
10316
|
-
const { top, left, bottom, right } = autofill.wholeArea;
|
|
10317
|
-
for (let y = top; y <= bottom; y++) {
|
|
10318
|
-
updateStyle({ y, x: left - 1 }, { borderRight: AUTOFILL_BORDER });
|
|
10319
|
-
updateStyle({ y, x: left }, { borderLeft: AUTOFILL_BORDER });
|
|
10320
|
-
updateStyle({ y, x: right }, { borderRight: AUTOFILL_BORDER });
|
|
10321
|
-
updateStyle({ y, x: right + 1 }, { borderLeft: AUTOFILL_BORDER });
|
|
10322
|
-
}
|
|
10323
|
-
for (let x = left; x <= right; x++) {
|
|
10324
|
-
updateStyle({ y: top - 1, x }, { borderBottom: AUTOFILL_BORDER });
|
|
10325
|
-
updateStyle({ y: top, x }, { borderTop: AUTOFILL_BORDER });
|
|
10326
|
-
updateStyle({ y: bottom, x }, { borderBottom: AUTOFILL_BORDER });
|
|
10327
|
-
updateStyle({ y: bottom + 1, x }, { borderTop: AUTOFILL_BORDER });
|
|
10328
|
-
}
|
|
10329
|
-
}
|
|
10330
|
-
{
|
|
10331
|
-
const { y, x } = choosing;
|
|
10332
|
-
updateStyle(
|
|
10333
|
-
{ y, x },
|
|
10334
|
-
{
|
|
10335
|
-
borderLeft: BORDER_POINTED,
|
|
10336
|
-
borderRight: BORDER_POINTED,
|
|
10337
|
-
borderTop: BORDER_POINTED,
|
|
10338
|
-
borderBottom: BORDER_POINTED
|
|
10339
|
-
}
|
|
10340
|
-
);
|
|
10341
|
-
updateStyle({ y, x: x - 1 }, { borderRight: BORDER_POINTED });
|
|
10342
|
-
updateStyle({ y, x: x + 1 }, { borderLeft: BORDER_POINTED });
|
|
10343
|
-
updateStyle({ y: y - 1, x }, { borderBottom: BORDER_POINTED });
|
|
10344
|
-
updateStyle({ y: y + 1, x }, { borderTop: BORDER_POINTED });
|
|
10345
|
-
}
|
|
10346
|
-
if (table.sheetId === copyingSheetId) {
|
|
10347
|
-
const borderStyle = cutting ? BORDER_CUTTING : BORDER_COPYING;
|
|
10348
|
-
const { top, left, bottom, right } = zoneToArea(copyingZone);
|
|
10349
|
-
for (let y = top; y <= bottom; y++) {
|
|
10350
|
-
updateStyle({ y, x: left - 1 }, { borderRight: borderStyle });
|
|
10351
|
-
updateStyle({ y, x: left }, { borderLeft: borderStyle });
|
|
10352
|
-
updateStyle({ y, x: right }, { borderRight: borderStyle });
|
|
10353
|
-
updateStyle({ y, x: right + 1 }, { borderLeft: borderStyle });
|
|
10354
|
-
}
|
|
10355
|
-
for (let x = left; x <= right; x++) {
|
|
10356
|
-
updateStyle({ y: top - 1, x }, { borderBottom: borderStyle });
|
|
10357
|
-
updateStyle({ y: top, x }, { borderTop: borderStyle });
|
|
10358
|
-
updateStyle({ y: bottom, x }, { borderBottom: borderStyle });
|
|
10359
|
-
updateStyle({ y: bottom + 1, x }, { borderTop: borderStyle });
|
|
10360
|
-
}
|
|
10361
|
-
}
|
|
10362
|
-
Object.entries(refs).forEach(([ref, i]) => {
|
|
10363
|
-
const palette = COLOR_PALETTE[i % COLOR_PALETTE.length];
|
|
10364
|
-
const borderStyle = `dashed 2px ${palette}`;
|
|
10365
|
-
const { top, left, bottom, right } = table.rangeToArea(ref);
|
|
10366
|
-
for (let y = top; y <= bottom; y++) {
|
|
10367
|
-
updateStyle({ y, x: left - 1 }, { borderRight: borderStyle });
|
|
10368
|
-
updateStyle({ y, x: left }, { borderLeft: borderStyle });
|
|
10369
|
-
updateStyle({ y, x: right }, { borderRight: borderStyle });
|
|
10370
|
-
updateStyle({ y, x: right + 1 }, { borderLeft: borderStyle });
|
|
10371
|
-
}
|
|
10372
|
-
for (let x = left; x <= right; x++) {
|
|
10373
|
-
updateStyle({ y: top - 1, x }, { borderBottom: borderStyle });
|
|
10374
|
-
updateStyle({ y: top, x }, { borderTop: borderStyle });
|
|
10375
|
-
updateStyle({ y: bottom, x }, { borderBottom: borderStyle });
|
|
10376
|
-
updateStyle({ y: bottom + 1, x }, { borderTop: borderStyle });
|
|
10377
|
-
}
|
|
10378
|
-
});
|
|
10379
|
-
matchingCells.forEach((address) => {
|
|
10380
|
-
const { y, x } = a2p(address);
|
|
10381
|
-
updateStyle({ y, x }, { backgroundColor: SEARCH_MATCHING_BACKGROUND });
|
|
10382
|
-
});
|
|
10383
|
-
if (matchingCells.length > 0) {
|
|
10384
|
-
const { y, x } = a2p(matchingCells[matchingCellIndex]);
|
|
10385
|
-
updateStyle(
|
|
10386
|
-
{ y, x },
|
|
10387
|
-
{
|
|
10388
|
-
borderLeft: SEARCH_MATCHING_BORDER,
|
|
10389
|
-
borderRight: SEARCH_MATCHING_BORDER,
|
|
10390
|
-
borderTop: SEARCH_MATCHING_BORDER,
|
|
10391
|
-
borderBottom: SEARCH_MATCHING_BORDER
|
|
10392
|
-
}
|
|
10393
|
-
);
|
|
10394
|
-
updateStyle({ y, x: x - 1 }, { borderRight: SEARCH_MATCHING_BORDER });
|
|
10395
|
-
updateStyle({ y, x: x + 1 }, { borderLeft: SEARCH_MATCHING_BORDER });
|
|
10396
|
-
updateStyle({ y: y - 1, x }, { borderBottom: SEARCH_MATCHING_BORDER });
|
|
10397
|
-
updateStyle({ y: y + 1, x }, { borderTop: SEARCH_MATCHING_BORDER });
|
|
10398
|
-
}
|
|
10399
|
-
return cellStyles;
|
|
10400
|
-
};
|
|
10401
|
-
const LAST_MODIFIED = 1753483021;
|
|
10402
|
-
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{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.gs-selecting{background-color:#d2d2d2}.gs-root1[data-mode=light] .gs-th.gs-choosing{background-color:#bbb}.gs-root1[data-mode=light] .gs-th.gs-th-selecting{background-color:#555;color:#fff}.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.gs-selecting{background-color:#606060}.gs-root1[data-mode=dark] .gs-th.gs-choosing{background-color:#777}.gs-root1[data-mode=dark] .gs-th.gs-th-selecting{background-color:#aaa;color:#444}.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-cell-inner-wrap.gs-selecting{background-color:rgba(0,128,255,.2)}.gs-cell.gs-copying textarea:focus{outline:solid 1px #0077ff}.gs-cell.gs-selecting{z-index:1}.gs-cell.gs-selecting .gs-cell-inner{background-color:rgba(0,128,255,.2)}.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:3;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-x:contain}.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)}}`;
|
|
10539
|
+
const LAST_MODIFIED = 1770663713;
|
|
10540
|
+
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)}}`;
|
|
10403
10541
|
const embedStyle = () => {
|
|
10404
10542
|
if (typeof window === "undefined") {
|
|
10405
10543
|
return;
|