@guiexpert/table 1.1.98 → 1.1.99
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/README.md +9 -0
- package/css/main.css +296 -0
- package/css/table-clipboard.css +41 -0
- package/css/table-color-vars.css +56 -0
- package/css/table-sheet-editing.css +149 -0
- package/css/table-spreadsheet.css +50 -0
- package/index.cjs +46 -59
- package/index.d.ts +46 -0
- package/index.js +18934 -11624
- package/lib/table/action/action-id.type.d.ts +1 -1
- package/lib/table/action/shortcut.service.d.ts +9 -0
- package/lib/table/aria/aria-texts.d.ts +26 -0
- package/lib/table/aria/aria-texts.if.d.ts +196 -0
- package/lib/table/batch-edit/batch-edit-service.d.ts +22 -0
- package/lib/table/batch-edit/cell-change.if.d.ts +6 -2
- package/lib/table/batch-edit/pending-cell-changes.d.ts +7 -0
- package/lib/table/batch-edit/write-row-value.d.ts +14 -0
- package/lib/table/calc/column-values.d.ts +2 -0
- package/lib/table/clipboard/clipboard-html.d.ts +41 -0
- package/lib/table/clipboard/clipboard-keymap.d.ts +18 -0
- package/lib/table/clipboard/clipboard-options.d.ts +30 -0
- package/lib/table/clipboard/clipboard-options.if.d.ts +67 -0
- package/lib/table/clipboard/clipboard-service.d.ts +122 -0
- package/lib/table/clipboard/input-pipes.d.ts +59 -0
- package/lib/table/clipboard/paste-plan.d.ts +96 -0
- package/lib/table/clipboard/tsv.d.ts +31 -0
- package/lib/table/data/common/event/ge-edit-event.d.ts +46 -0
- package/lib/table/data/common/event/ge-row-drag-event.d.ts +2 -2
- package/lib/table/data/common/event/ge-undo-event.d.ts +29 -0
- package/lib/table/data/options/table-options.d.ts +28 -0
- package/lib/table/data/options/table-options.if.d.ts +99 -1
- package/lib/table/data/tablemodel/areamodel/abstract-area-model.d.ts +11 -2
- package/lib/table/data/tablemodel/areamodel/area-model-array-of-arrays.d.ts +14 -0
- package/lib/table/data/tablemodel/areamodel/area-model-object-array.d.ts +14 -0
- package/lib/table/data/tablemodel/areamodel/area-model.if.d.ts +11 -0
- package/lib/table/data/tablemodel/column/column-def.d.ts +13 -0
- package/lib/table/data/tablemodel/column/column-def.if.d.ts +36 -1
- package/lib/table/data/tablemodel/column/default-editable.d.ts +18 -0
- package/lib/table/event-adapter.d.ts +6 -0
- package/lib/table/event-listener-hub.d.ts +10 -0
- package/lib/table/event-listener.if.d.ts +16 -0
- package/lib/table/factory/pivot-factory.d.ts +1 -1
- package/lib/table/factory/row-group-factory.d.ts +1 -1
- package/lib/table/factory/table-factory.d.ts +14 -0
- package/lib/table/formula/formula-ast.if.d.ts +32 -2
- package/lib/table/formula/formula-error.d.ts +4 -2
- package/lib/table/formula/parser.d.ts +5 -2
- package/lib/table/formula/tokenizer.d.ts +5 -2
- package/lib/table/input-handler.d.ts +8 -0
- package/lib/table/master-detail/master-detail-service.d.ts +9 -0
- package/lib/table/render-scope.d.ts +40 -0
- package/lib/table/row-drag/row-drag-service.d.ts +3 -2
- package/lib/table/selection/selection-service.d.ts +48 -0
- package/lib/table/service/excel-export-options.if.d.ts +6 -0
- package/lib/table/service/excel-service.d.ts +4 -0
- package/lib/table/service/excel-service.if.d.ts +35 -0
- package/lib/table/sheet/cell-address.d.ts +100 -0
- package/lib/table/sheet/cell-formula-options.d.ts +27 -0
- package/lib/table/sheet/cell-formula-options.if.d.ts +27 -0
- package/lib/table/sheet/excel-formula.d.ts +20 -0
- package/lib/table/sheet/format-formula.d.ts +19 -0
- package/lib/table/sheet/sheet-cells.if.d.ts +17 -0
- package/lib/table/sheet/sheet-compiler.d.ts +47 -0
- package/lib/table/sheet/sheet-engine.d.ts +207 -0
- package/lib/table/sheet/sheet-function-info.d.ts +25 -0
- package/lib/table/sheet/sheet-functions.d.ts +27 -0
- package/lib/table/sheet/sheet-values.d.ts +154 -0
- package/lib/table/sheet/shift-formula.d.ts +71 -0
- package/lib/table/sheet/table-sheet.d.ts +214 -0
- package/lib/table/sheet-editing/cell-editor-service.d.ts +105 -0
- package/lib/table/sheet-editing/cell-editor.if.d.ts +110 -0
- package/lib/table/sheet-editing/editing-keymap.d.ts +17 -0
- package/lib/table/sheet-editing/editing-options.d.ts +34 -0
- package/lib/table/sheet-editing/editing-options.if.d.ts +49 -0
- package/lib/table/sheet-editing/editors/date-cell-editor.d.ts +23 -0
- package/lib/table/sheet-editing/editors/number-cell-editor.d.ts +18 -0
- package/lib/table/sheet-editing/editors/select-cell-editor.d.ts +36 -0
- package/lib/table/sheet-editing/editors/text-cell-editor.d.ts +35 -0
- package/lib/table/sheet-editing/formula-assist.d.ts +103 -0
- package/lib/table/sheet-editing/formula-text.d.ts +61 -0
- package/lib/table/sheet-editing/sheet-navigation.d.ts +26 -0
- package/lib/table/spreadsheet/area-model-sheet.d.ts +170 -0
- package/lib/table/spreadsheet/formula-bar.d.ts +53 -0
- package/lib/table/spreadsheet/spreadsheet-factory.d.ts +111 -0
- package/lib/table/spreadsheet/spreadsheet-options.if.d.ts +28 -0
- package/lib/table/spreadsheet/spreadsheet-preset.d.ts +37 -0
- package/lib/table/spreadsheet/structure-edit.d.ts +35 -0
- package/lib/table/table-api.d.ts +511 -2
- package/lib/table/table-scope.d.ts +294 -1
- package/lib/table/undo/cell-changes-undoable.d.ts +34 -0
- package/lib/table/undo/model-rows.d.ts +17 -0
- package/lib/table/undo/pending-changes-undoable.d.ts +35 -0
- package/lib/table/undo/undo-keymap.d.ts +17 -0
- package/lib/table/undo/undo-options.d.ts +26 -0
- package/lib/table/undo/undo-options.if.d.ts +30 -0
- package/lib/table/undo/undo-service.d.ts +103 -0
- package/lib/table/undo/undo-stack.d.ts +62 -0
- package/lib/table/undo/undoable.if.d.ts +36 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,6 +61,15 @@ This is the UI-agnostic table component for your next web app. 😊
|
|
|
61
61
|
- Right-to-left (Arabic, Hebrew, Persian, Urdu): `tableOptions.direction: "rtl"` (or `"auto"` from the page) mirrors
|
|
62
62
|
the whole table – first column on the right, horizontal scrolling, fixed columns, tree indent, resize handles, fill
|
|
63
63
|
handle, row drag, master/detail, arrow keys; right-to-left Excel sheet – since 1.1.98
|
|
64
|
+
- Excel-style editing (`tableOptions.editing`): type to overwrite, F2, Enter/Tab, Delete, Ctrl+Enter, Ctrl+arrow to
|
|
65
|
+
the data edge, IME; copy, cut and paste with Excel and Google Sheets (`clipboard`); undo and redo of every change
|
|
66
|
+
(`undo`, `tableApi.undo()`) – since 1.1.99
|
|
67
|
+
- Spreadsheet cell formulas (`tableOptions.cellFormulas`): `=B2*C2`, `$A$1`, ranges, 70 Excel functions, a dependency
|
|
68
|
+
graph that recalculates only dependent cells, colored references and pointing while typing, Excel export with real
|
|
69
|
+
formulas – own parser, no `eval`. `SheetEngine` works without a table – since 1.1.99
|
|
70
|
+
- Spreadsheet mode: `SpreadsheetFactory.create({ data })` builds column letters, row numbers, a sparse body (a million
|
|
71
|
+
empty rows cost nothing) and all of the above; `FormulaBar`, insert/delete rows and columns with adjusted references;
|
|
72
|
+
`spreadsheet: true` for an existing table – since 1.1.99
|
|
64
73
|
- Custom Filtering
|
|
65
74
|
- In-place Cell Editing
|
|
66
75
|
- Userdefined Key and Mouse Events
|
package/css/main.css
CHANGED
|
@@ -280,6 +280,47 @@
|
|
|
280
280
|
animation: none; /* a still ring segment and the text */
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
+
/* Copy, cut and paste (since 1.1.99, tableOptions.clipboard) */
|
|
284
|
+
|
|
285
|
+
/* the hidden text field that gets the focus for the moment of Ctrl/⌘+C, X, V (the browser fires its clipboard event there) */
|
|
286
|
+
.ge-table-clipboard-proxy {
|
|
287
|
+
position: absolute;
|
|
288
|
+
top: 0;
|
|
289
|
+
left: 0;
|
|
290
|
+
width: 1px;
|
|
291
|
+
height: 1px;
|
|
292
|
+
margin: 0;
|
|
293
|
+
padding: 0;
|
|
294
|
+
border: 0;
|
|
295
|
+
opacity: 0;
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
resize: none;
|
|
298
|
+
pointer-events: none;
|
|
299
|
+
font-size: 16px; /* iOS zooms into a focused field with a smaller font */
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* cut cells: a dashed frame ("marching ants") until they are pasted, Escape or another change */
|
|
303
|
+
.ge-table-cut-range {
|
|
304
|
+
position: absolute;
|
|
305
|
+
display: none;
|
|
306
|
+
z-index: 8998; /* below the fill preview (8999) and the editor (9500) */
|
|
307
|
+
box-sizing: border-box;
|
|
308
|
+
pointer-events: none;
|
|
309
|
+
border: 2px dashed var(--ge-table-cut-range-border);
|
|
310
|
+
animation: ge-table-cut-range-ants 0.8s linear infinite;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
@keyframes ge-table-cut-range-ants {
|
|
314
|
+
50% {
|
|
315
|
+
border-color: var(--ge-table-cut-range-border-alt);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
@media (prefers-reduced-motion: reduce) {
|
|
320
|
+
.ge-table-cut-range {
|
|
321
|
+
animation: none; /* the dashed frame alone */
|
|
322
|
+
}
|
|
323
|
+
}
|
|
283
324
|
|
|
284
325
|
|
|
285
326
|
.ge-table { background-color: var(--ge-table-bg); }
|
|
@@ -517,6 +558,34 @@
|
|
|
517
558
|
--ge-table-detail-border: #c9d1db;
|
|
518
559
|
--ge-table-detail-toggle-color: #5f6368;
|
|
519
560
|
--ge-table-detail-toggle-hover-bg: rgba(128, 128, 128, 0.15);
|
|
561
|
+
|
|
562
|
+
/* Excel-style editing (since 1.1.99): the editor above the cell */
|
|
563
|
+
--ge-table-cell-editor-bg: #fff;
|
|
564
|
+
--ge-table-cell-editor-text: #111;
|
|
565
|
+
--ge-table-cell-editor-border: #0a6ebd;
|
|
566
|
+
--ge-table-cell-editor-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
567
|
+
--ge-table-cell-editor-invalid-border: #d93025;
|
|
568
|
+
--ge-table-cut-range-border: #0a6ebd;
|
|
569
|
+
--ge-table-cut-range-border-alt: #9ec9ec;
|
|
570
|
+
/* formula input (since 1.1.99): colors of the references 0–7, function list and hint */
|
|
571
|
+
--ge-table-formula-ref-0: #1a73e8;
|
|
572
|
+
--ge-table-formula-ref-1: #d93025;
|
|
573
|
+
--ge-table-formula-ref-2: #7b1fa2;
|
|
574
|
+
--ge-table-formula-ref-3: #188038;
|
|
575
|
+
--ge-table-formula-ref-4: #c26401;
|
|
576
|
+
--ge-table-formula-ref-5: #00838f;
|
|
577
|
+
--ge-table-formula-ref-6: #c2185b;
|
|
578
|
+
--ge-table-formula-ref-7: #5d4037;
|
|
579
|
+
--ge-table-formula-popup-bg: #fff;
|
|
580
|
+
--ge-table-formula-popup-text: #111;
|
|
581
|
+
--ge-table-formula-popup-muted: #5f6368;
|
|
582
|
+
--ge-table-formula-popup-border: #c4c7c5;
|
|
583
|
+
--ge-table-formula-popup-active-bg: #e8f0fe;
|
|
584
|
+
/* formula bar (since 1.1.99) */
|
|
585
|
+
--ge-table-formula-bar-bg: #fff;
|
|
586
|
+
--ge-table-formula-bar-text: #111;
|
|
587
|
+
--ge-table-formula-bar-muted: #5f6368;
|
|
588
|
+
--ge-table-formula-bar-border: #c4c7c5;
|
|
520
589
|
}
|
|
521
590
|
|
|
522
591
|
|
|
@@ -644,6 +713,34 @@ html[data-theme="dark"] {
|
|
|
644
713
|
--ge-table-detail-border: #3c434d;
|
|
645
714
|
--ge-table-detail-toggle-color: #bdc1c6;
|
|
646
715
|
--ge-table-detail-toggle-hover-bg: rgba(255, 255, 255, 0.12);
|
|
716
|
+
|
|
717
|
+
/* Excel-style editing (since 1.1.99) */
|
|
718
|
+
--ge-table-cell-editor-bg: #1f2937;
|
|
719
|
+
--ge-table-cell-editor-text: #f3f4f6;
|
|
720
|
+
--ge-table-cell-editor-border: #8ab4f8;
|
|
721
|
+
--ge-table-cell-editor-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
|
|
722
|
+
--ge-table-cell-editor-invalid-border: #f28b82;
|
|
723
|
+
--ge-table-cut-range-border: #8ab4f8;
|
|
724
|
+
--ge-table-cut-range-border-alt: #3c5a85;
|
|
725
|
+
/* formula input (since 1.1.99) */
|
|
726
|
+
--ge-table-formula-ref-0: #8ab4f8;
|
|
727
|
+
--ge-table-formula-ref-1: #f28b82;
|
|
728
|
+
--ge-table-formula-ref-2: #d7aefb;
|
|
729
|
+
--ge-table-formula-ref-3: #81c995;
|
|
730
|
+
--ge-table-formula-ref-4: #fcad70;
|
|
731
|
+
--ge-table-formula-ref-5: #78d9ec;
|
|
732
|
+
--ge-table-formula-ref-6: #ff8bcb;
|
|
733
|
+
--ge-table-formula-ref-7: #d7ccc8;
|
|
734
|
+
--ge-table-formula-popup-bg: #1f2937;
|
|
735
|
+
--ge-table-formula-popup-text: #f3f4f6;
|
|
736
|
+
--ge-table-formula-popup-muted: #9aa0a6;
|
|
737
|
+
--ge-table-formula-popup-border: #4b5563;
|
|
738
|
+
--ge-table-formula-popup-active-bg: #374151;
|
|
739
|
+
/* formula bar (since 1.1.99) */
|
|
740
|
+
--ge-table-formula-bar-bg: #1f2937;
|
|
741
|
+
--ge-table-formula-bar-text: #f3f4f6;
|
|
742
|
+
--ge-table-formula-bar-muted: #9aa0a6;
|
|
743
|
+
--ge-table-formula-bar-border: #4b5563;
|
|
647
744
|
}
|
|
648
745
|
/* Fill handle and batch edit (since 1.1.96) – colors in table-color-vars.css (--ge-table-fill-*, --ge-table-cell-*) */
|
|
649
746
|
|
|
@@ -973,6 +1070,205 @@ html[data-theme="dark"] {
|
|
|
973
1070
|
font-variant-numeric: tabular-nums;
|
|
974
1071
|
font-weight: var(--ge-table-row-group-label-font-weight);
|
|
975
1072
|
}
|
|
1073
|
+
/* Excel-style editing (since 1.1.99): one editor element above the edited cell (tableOptions.editing) */
|
|
1074
|
+
.ge-table-cell-editor {
|
|
1075
|
+
position: absolute;
|
|
1076
|
+
display: none;
|
|
1077
|
+
box-sizing: border-box;
|
|
1078
|
+
z-index: 9500; /* above the cells, the detail layer (1000) and the fill preview (8999), below the focus frame (9999) and overlay (10000) */
|
|
1079
|
+
background: var(--ge-table-cell-editor-bg);
|
|
1080
|
+
box-shadow: var(--ge-table-cell-editor-shadow);
|
|
1081
|
+
}
|
|
1082
|
+
.ge-table-cell-editor.ge-table-cell-editor-clipped {
|
|
1083
|
+
pointer-events: none; /* scrolled out of view: invisible, but still focused */
|
|
1084
|
+
box-shadow: none;
|
|
1085
|
+
}
|
|
1086
|
+
.ge-table-cell-editor-field {
|
|
1087
|
+
box-sizing: border-box;
|
|
1088
|
+
width: 100%;
|
|
1089
|
+
height: 100%;
|
|
1090
|
+
margin: 0;
|
|
1091
|
+
padding: 0 6px;
|
|
1092
|
+
border: 2px solid var(--ge-table-cell-editor-border);
|
|
1093
|
+
border-radius: 0;
|
|
1094
|
+
outline: none;
|
|
1095
|
+
font: inherit;
|
|
1096
|
+
color: var(--ge-table-cell-editor-text);
|
|
1097
|
+
background: var(--ge-table-cell-editor-bg);
|
|
1098
|
+
}
|
|
1099
|
+
.ge-table-cell-editor-field[aria-invalid="true"] {
|
|
1100
|
+
border-color: var(--ge-table-cell-editor-invalid-border);
|
|
1101
|
+
}
|
|
1102
|
+
.ge-table-cell-editor-number {
|
|
1103
|
+
text-align: end;
|
|
1104
|
+
font-variant-numeric: tabular-nums;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
/* The editors inside the cell (InputCellRenderer, SelectCellRenderer) – before 1.1.99 these were inline styles,
|
|
1108
|
+
which a strict Content-Security-Policy (style-src without 'unsafe-inline') blocks */
|
|
1109
|
+
input.ge-table-cell-editor-input {
|
|
1110
|
+
width: calc(100% - 8px);
|
|
1111
|
+
height: 100%;
|
|
1112
|
+
border: 0;
|
|
1113
|
+
padding: 0;
|
|
1114
|
+
padding-inline-start: 8px;
|
|
1115
|
+
}
|
|
1116
|
+
select.ge-table-cell-editor-select {
|
|
1117
|
+
width: 100%;
|
|
1118
|
+
height: 100%;
|
|
1119
|
+
border: 0;
|
|
1120
|
+
padding: 0;
|
|
1121
|
+
padding-inline-start: 8px;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
/* Formula input (since 1.1.99, tableOptions.cellFormulas): colored references in the editor (a mirror behind the
|
|
1125
|
+
transparent text of the input), frames around the referenced cells, function suggestions and the argument hint */
|
|
1126
|
+
.ge-table-formula-mirror {
|
|
1127
|
+
position: absolute;
|
|
1128
|
+
inset: 0;
|
|
1129
|
+
box-sizing: border-box;
|
|
1130
|
+
display: flex;
|
|
1131
|
+
align-items: center;
|
|
1132
|
+
padding: 0 6px;
|
|
1133
|
+
border: 2px solid transparent;
|
|
1134
|
+
overflow: hidden;
|
|
1135
|
+
white-space: pre;
|
|
1136
|
+
pointer-events: none;
|
|
1137
|
+
font: inherit;
|
|
1138
|
+
color: var(--ge-table-cell-editor-text);
|
|
1139
|
+
direction: ltr;
|
|
1140
|
+
text-align: left;
|
|
1141
|
+
}
|
|
1142
|
+
.ge-table-cell-editor-field.ge-table-formula-input {
|
|
1143
|
+
position: relative;
|
|
1144
|
+
color: transparent;
|
|
1145
|
+
caret-color: var(--ge-table-cell-editor-text);
|
|
1146
|
+
background: transparent;
|
|
1147
|
+
text-align: left; /* formulas read left to right (Excel), also in number columns and right-to-left tables */
|
|
1148
|
+
direction: ltr;
|
|
1149
|
+
}
|
|
1150
|
+
.ge-table-cell-editor-field.ge-table-formula-input::selection {
|
|
1151
|
+
color: transparent;
|
|
1152
|
+
background: rgba(10, 110, 189, 0.3); /* the mirror's text stays readable under the selection */
|
|
1153
|
+
}
|
|
1154
|
+
.ge-table-formula-ref {
|
|
1155
|
+
position: absolute;
|
|
1156
|
+
box-sizing: border-box;
|
|
1157
|
+
border: 2px solid var(--ge-table-formula-ref-0);
|
|
1158
|
+
pointer-events: none;
|
|
1159
|
+
z-index: 9400; /* above the cells, below the editor (9500) */
|
|
1160
|
+
}
|
|
1161
|
+
.ge-table-formula-ref-text-0 { color: var(--ge-table-formula-ref-0); }
|
|
1162
|
+
.ge-table-formula-ref-text-1 { color: var(--ge-table-formula-ref-1); }
|
|
1163
|
+
.ge-table-formula-ref-text-2 { color: var(--ge-table-formula-ref-2); }
|
|
1164
|
+
.ge-table-formula-ref-text-3 { color: var(--ge-table-formula-ref-3); }
|
|
1165
|
+
.ge-table-formula-ref-text-4 { color: var(--ge-table-formula-ref-4); }
|
|
1166
|
+
.ge-table-formula-ref-text-5 { color: var(--ge-table-formula-ref-5); }
|
|
1167
|
+
.ge-table-formula-ref-text-6 { color: var(--ge-table-formula-ref-6); }
|
|
1168
|
+
.ge-table-formula-ref-text-7 { color: var(--ge-table-formula-ref-7); }
|
|
1169
|
+
.ge-table-formula-ref.ge-table-formula-ref-1 { border-color: var(--ge-table-formula-ref-1); }
|
|
1170
|
+
.ge-table-formula-ref.ge-table-formula-ref-2 { border-color: var(--ge-table-formula-ref-2); }
|
|
1171
|
+
.ge-table-formula-ref.ge-table-formula-ref-3 { border-color: var(--ge-table-formula-ref-3); }
|
|
1172
|
+
.ge-table-formula-ref.ge-table-formula-ref-4 { border-color: var(--ge-table-formula-ref-4); }
|
|
1173
|
+
.ge-table-formula-ref.ge-table-formula-ref-5 { border-color: var(--ge-table-formula-ref-5); }
|
|
1174
|
+
.ge-table-formula-ref.ge-table-formula-ref-6 { border-color: var(--ge-table-formula-ref-6); }
|
|
1175
|
+
.ge-table-formula-ref.ge-table-formula-ref-7 { border-color: var(--ge-table-formula-ref-7); }
|
|
1176
|
+
.ge-table-formula-list,
|
|
1177
|
+
.ge-table-formula-hint {
|
|
1178
|
+
position: absolute;
|
|
1179
|
+
top: 100%;
|
|
1180
|
+
inset-inline-start: 0;
|
|
1181
|
+
margin-top: 2px;
|
|
1182
|
+
box-sizing: border-box;
|
|
1183
|
+
background: var(--ge-table-formula-popup-bg);
|
|
1184
|
+
color: var(--ge-table-formula-popup-text);
|
|
1185
|
+
border: 1px solid var(--ge-table-formula-popup-border);
|
|
1186
|
+
box-shadow: var(--ge-table-cell-editor-shadow);
|
|
1187
|
+
font-size: 13px;
|
|
1188
|
+
line-height: 1.5;
|
|
1189
|
+
}
|
|
1190
|
+
.ge-table-formula-list {
|
|
1191
|
+
min-width: 260px;
|
|
1192
|
+
max-width: 420px;
|
|
1193
|
+
max-height: 216px;
|
|
1194
|
+
overflow-y: auto;
|
|
1195
|
+
padding: 2px 0;
|
|
1196
|
+
}
|
|
1197
|
+
.ge-table-formula-option {
|
|
1198
|
+
display: flex;
|
|
1199
|
+
gap: 8px;
|
|
1200
|
+
padding: 1px 8px;
|
|
1201
|
+
white-space: nowrap;
|
|
1202
|
+
cursor: pointer;
|
|
1203
|
+
}
|
|
1204
|
+
.ge-table-formula-option[aria-selected="true"] {
|
|
1205
|
+
background: var(--ge-table-formula-popup-active-bg);
|
|
1206
|
+
}
|
|
1207
|
+
.ge-table-formula-option-name {
|
|
1208
|
+
font-weight: 600;
|
|
1209
|
+
}
|
|
1210
|
+
.ge-table-formula-option-description {
|
|
1211
|
+
overflow: hidden;
|
|
1212
|
+
text-overflow: ellipsis;
|
|
1213
|
+
color: var(--ge-table-formula-popup-muted);
|
|
1214
|
+
}
|
|
1215
|
+
.ge-table-formula-hint {
|
|
1216
|
+
padding: 2px 8px;
|
|
1217
|
+
white-space: nowrap;
|
|
1218
|
+
}
|
|
1219
|
+
.ge-table-formula-hint b {
|
|
1220
|
+
font-weight: 700;
|
|
1221
|
+
}
|
|
1222
|
+
/* Spreadsheet mode (since 1.1.99): the formula bar (FormulaBar) */
|
|
1223
|
+
.ge-table-formula-bar {
|
|
1224
|
+
display: flex;
|
|
1225
|
+
align-items: stretch;
|
|
1226
|
+
gap: 0;
|
|
1227
|
+
box-sizing: border-box;
|
|
1228
|
+
height: 30px;
|
|
1229
|
+
border: 1px solid var(--ge-table-formula-bar-border);
|
|
1230
|
+
background: var(--ge-table-formula-bar-bg);
|
|
1231
|
+
color: var(--ge-table-formula-bar-text);
|
|
1232
|
+
font: inherit;
|
|
1233
|
+
}
|
|
1234
|
+
.ge-table-formula-bar-address,
|
|
1235
|
+
.ge-table-formula-bar-input {
|
|
1236
|
+
box-sizing: border-box;
|
|
1237
|
+
margin: 0;
|
|
1238
|
+
padding: 0 8px;
|
|
1239
|
+
border: 0;
|
|
1240
|
+
outline: none;
|
|
1241
|
+
font: inherit;
|
|
1242
|
+
color: inherit;
|
|
1243
|
+
background: transparent;
|
|
1244
|
+
}
|
|
1245
|
+
.ge-table-formula-bar-address {
|
|
1246
|
+
flex: 0 0 96px;
|
|
1247
|
+
width: 96px;
|
|
1248
|
+
border-inline-end: 1px solid var(--ge-table-formula-bar-border);
|
|
1249
|
+
font-variant-numeric: tabular-nums;
|
|
1250
|
+
}
|
|
1251
|
+
.ge-table-formula-bar-address[aria-invalid="true"] {
|
|
1252
|
+
box-shadow: inset 0 0 0 2px var(--ge-table-cell-editor-invalid-border);
|
|
1253
|
+
}
|
|
1254
|
+
.ge-table-formula-bar-fx {
|
|
1255
|
+
display: flex;
|
|
1256
|
+
align-items: center;
|
|
1257
|
+
padding: 0 8px;
|
|
1258
|
+
font-style: italic;
|
|
1259
|
+
color: var(--ge-table-formula-bar-muted);
|
|
1260
|
+
border-inline-end: 1px solid var(--ge-table-formula-bar-border);
|
|
1261
|
+
}
|
|
1262
|
+
.ge-table-formula-bar-input {
|
|
1263
|
+
flex: 1 1 auto;
|
|
1264
|
+
min-width: 0;
|
|
1265
|
+
direction: ltr; /* formulas read left to right */
|
|
1266
|
+
text-align: left;
|
|
1267
|
+
}
|
|
1268
|
+
.ge-table-formula-bar-address:focus-visible,
|
|
1269
|
+
.ge-table-formula-bar-input:focus-visible {
|
|
1270
|
+
box-shadow: inset 0 0 0 2px var(--ge-table-cell-editor-border);
|
|
1271
|
+
}
|
|
976
1272
|
/* Tree table */
|
|
977
1273
|
|
|
978
1274
|
.ge-table-col-div.ge-table-col-div-0.ge-table-tree-cell {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* Copy, cut and paste (since 1.1.99, tableOptions.clipboard) */
|
|
2
|
+
|
|
3
|
+
/* the hidden text field that gets the focus for the moment of Ctrl/⌘+C, X, V (the browser fires its clipboard event there) */
|
|
4
|
+
.ge-table-clipboard-proxy {
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
width: 1px;
|
|
9
|
+
height: 1px;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
border: 0;
|
|
13
|
+
opacity: 0;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
resize: none;
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
font-size: 16px; /* iOS zooms into a focused field with a smaller font */
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* cut cells: a dashed frame ("marching ants") until they are pasted, Escape or another change */
|
|
21
|
+
.ge-table-cut-range {
|
|
22
|
+
position: absolute;
|
|
23
|
+
display: none;
|
|
24
|
+
z-index: 8998; /* below the fill preview (8999) and the editor (9500) */
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
border: 2px dashed var(--ge-table-cut-range-border);
|
|
28
|
+
animation: ge-table-cut-range-ants 0.8s linear infinite;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes ge-table-cut-range-ants {
|
|
32
|
+
50% {
|
|
33
|
+
border-color: var(--ge-table-cut-range-border-alt);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (prefers-reduced-motion: reduce) {
|
|
38
|
+
.ge-table-cut-range {
|
|
39
|
+
animation: none; /* the dashed frame alone */
|
|
40
|
+
}
|
|
41
|
+
}
|
package/css/table-color-vars.css
CHANGED
|
@@ -136,6 +136,34 @@ html, html[data-theme="light"] {
|
|
|
136
136
|
--ge-table-detail-border: #c9d1db;
|
|
137
137
|
--ge-table-detail-toggle-color: #5f6368;
|
|
138
138
|
--ge-table-detail-toggle-hover-bg: rgba(128, 128, 128, 0.15);
|
|
139
|
+
|
|
140
|
+
/* Excel-style editing (since 1.1.99): the editor above the cell */
|
|
141
|
+
--ge-table-cell-editor-bg: #fff;
|
|
142
|
+
--ge-table-cell-editor-text: #111;
|
|
143
|
+
--ge-table-cell-editor-border: #0a6ebd;
|
|
144
|
+
--ge-table-cell-editor-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
145
|
+
--ge-table-cell-editor-invalid-border: #d93025;
|
|
146
|
+
--ge-table-cut-range-border: #0a6ebd;
|
|
147
|
+
--ge-table-cut-range-border-alt: #9ec9ec;
|
|
148
|
+
/* formula input (since 1.1.99): colors of the references 0–7, function list and hint */
|
|
149
|
+
--ge-table-formula-ref-0: #1a73e8;
|
|
150
|
+
--ge-table-formula-ref-1: #d93025;
|
|
151
|
+
--ge-table-formula-ref-2: #7b1fa2;
|
|
152
|
+
--ge-table-formula-ref-3: #188038;
|
|
153
|
+
--ge-table-formula-ref-4: #c26401;
|
|
154
|
+
--ge-table-formula-ref-5: #00838f;
|
|
155
|
+
--ge-table-formula-ref-6: #c2185b;
|
|
156
|
+
--ge-table-formula-ref-7: #5d4037;
|
|
157
|
+
--ge-table-formula-popup-bg: #fff;
|
|
158
|
+
--ge-table-formula-popup-text: #111;
|
|
159
|
+
--ge-table-formula-popup-muted: #5f6368;
|
|
160
|
+
--ge-table-formula-popup-border: #c4c7c5;
|
|
161
|
+
--ge-table-formula-popup-active-bg: #e8f0fe;
|
|
162
|
+
/* formula bar (since 1.1.99) */
|
|
163
|
+
--ge-table-formula-bar-bg: #fff;
|
|
164
|
+
--ge-table-formula-bar-text: #111;
|
|
165
|
+
--ge-table-formula-bar-muted: #5f6368;
|
|
166
|
+
--ge-table-formula-bar-border: #c4c7c5;
|
|
139
167
|
}
|
|
140
168
|
|
|
141
169
|
|
|
@@ -263,4 +291,32 @@ html[data-theme="dark"] {
|
|
|
263
291
|
--ge-table-detail-border: #3c434d;
|
|
264
292
|
--ge-table-detail-toggle-color: #bdc1c6;
|
|
265
293
|
--ge-table-detail-toggle-hover-bg: rgba(255, 255, 255, 0.12);
|
|
294
|
+
|
|
295
|
+
/* Excel-style editing (since 1.1.99) */
|
|
296
|
+
--ge-table-cell-editor-bg: #1f2937;
|
|
297
|
+
--ge-table-cell-editor-text: #f3f4f6;
|
|
298
|
+
--ge-table-cell-editor-border: #8ab4f8;
|
|
299
|
+
--ge-table-cell-editor-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
|
|
300
|
+
--ge-table-cell-editor-invalid-border: #f28b82;
|
|
301
|
+
--ge-table-cut-range-border: #8ab4f8;
|
|
302
|
+
--ge-table-cut-range-border-alt: #3c5a85;
|
|
303
|
+
/* formula input (since 1.1.99) */
|
|
304
|
+
--ge-table-formula-ref-0: #8ab4f8;
|
|
305
|
+
--ge-table-formula-ref-1: #f28b82;
|
|
306
|
+
--ge-table-formula-ref-2: #d7aefb;
|
|
307
|
+
--ge-table-formula-ref-3: #81c995;
|
|
308
|
+
--ge-table-formula-ref-4: #fcad70;
|
|
309
|
+
--ge-table-formula-ref-5: #78d9ec;
|
|
310
|
+
--ge-table-formula-ref-6: #ff8bcb;
|
|
311
|
+
--ge-table-formula-ref-7: #d7ccc8;
|
|
312
|
+
--ge-table-formula-popup-bg: #1f2937;
|
|
313
|
+
--ge-table-formula-popup-text: #f3f4f6;
|
|
314
|
+
--ge-table-formula-popup-muted: #9aa0a6;
|
|
315
|
+
--ge-table-formula-popup-border: #4b5563;
|
|
316
|
+
--ge-table-formula-popup-active-bg: #374151;
|
|
317
|
+
/* formula bar (since 1.1.99) */
|
|
318
|
+
--ge-table-formula-bar-bg: #1f2937;
|
|
319
|
+
--ge-table-formula-bar-text: #f3f4f6;
|
|
320
|
+
--ge-table-formula-bar-muted: #9aa0a6;
|
|
321
|
+
--ge-table-formula-bar-border: #4b5563;
|
|
266
322
|
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/* Excel-style editing (since 1.1.99): one editor element above the edited cell (tableOptions.editing) */
|
|
2
|
+
.ge-table-cell-editor {
|
|
3
|
+
position: absolute;
|
|
4
|
+
display: none;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
z-index: 9500; /* above the cells, the detail layer (1000) and the fill preview (8999), below the focus frame (9999) and overlay (10000) */
|
|
7
|
+
background: var(--ge-table-cell-editor-bg);
|
|
8
|
+
box-shadow: var(--ge-table-cell-editor-shadow);
|
|
9
|
+
}
|
|
10
|
+
.ge-table-cell-editor.ge-table-cell-editor-clipped {
|
|
11
|
+
pointer-events: none; /* scrolled out of view: invisible, but still focused */
|
|
12
|
+
box-shadow: none;
|
|
13
|
+
}
|
|
14
|
+
.ge-table-cell-editor-field {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0 6px;
|
|
20
|
+
border: 2px solid var(--ge-table-cell-editor-border);
|
|
21
|
+
border-radius: 0;
|
|
22
|
+
outline: none;
|
|
23
|
+
font: inherit;
|
|
24
|
+
color: var(--ge-table-cell-editor-text);
|
|
25
|
+
background: var(--ge-table-cell-editor-bg);
|
|
26
|
+
}
|
|
27
|
+
.ge-table-cell-editor-field[aria-invalid="true"] {
|
|
28
|
+
border-color: var(--ge-table-cell-editor-invalid-border);
|
|
29
|
+
}
|
|
30
|
+
.ge-table-cell-editor-number {
|
|
31
|
+
text-align: end;
|
|
32
|
+
font-variant-numeric: tabular-nums;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* The editors inside the cell (InputCellRenderer, SelectCellRenderer) – before 1.1.99 these were inline styles,
|
|
36
|
+
which a strict Content-Security-Policy (style-src without 'unsafe-inline') blocks */
|
|
37
|
+
input.ge-table-cell-editor-input {
|
|
38
|
+
width: calc(100% - 8px);
|
|
39
|
+
height: 100%;
|
|
40
|
+
border: 0;
|
|
41
|
+
padding: 0;
|
|
42
|
+
padding-inline-start: 8px;
|
|
43
|
+
}
|
|
44
|
+
select.ge-table-cell-editor-select {
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 100%;
|
|
47
|
+
border: 0;
|
|
48
|
+
padding: 0;
|
|
49
|
+
padding-inline-start: 8px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Formula input (since 1.1.99, tableOptions.cellFormulas): colored references in the editor (a mirror behind the
|
|
53
|
+
transparent text of the input), frames around the referenced cells, function suggestions and the argument hint */
|
|
54
|
+
.ge-table-formula-mirror {
|
|
55
|
+
position: absolute;
|
|
56
|
+
inset: 0;
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
padding: 0 6px;
|
|
61
|
+
border: 2px solid transparent;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
white-space: pre;
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
font: inherit;
|
|
66
|
+
color: var(--ge-table-cell-editor-text);
|
|
67
|
+
direction: ltr;
|
|
68
|
+
text-align: left;
|
|
69
|
+
}
|
|
70
|
+
.ge-table-cell-editor-field.ge-table-formula-input {
|
|
71
|
+
position: relative;
|
|
72
|
+
color: transparent;
|
|
73
|
+
caret-color: var(--ge-table-cell-editor-text);
|
|
74
|
+
background: transparent;
|
|
75
|
+
text-align: left; /* formulas read left to right (Excel), also in number columns and right-to-left tables */
|
|
76
|
+
direction: ltr;
|
|
77
|
+
}
|
|
78
|
+
.ge-table-cell-editor-field.ge-table-formula-input::selection {
|
|
79
|
+
color: transparent;
|
|
80
|
+
background: rgba(10, 110, 189, 0.3); /* the mirror's text stays readable under the selection */
|
|
81
|
+
}
|
|
82
|
+
.ge-table-formula-ref {
|
|
83
|
+
position: absolute;
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
border: 2px solid var(--ge-table-formula-ref-0);
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
z-index: 9400; /* above the cells, below the editor (9500) */
|
|
88
|
+
}
|
|
89
|
+
.ge-table-formula-ref-text-0 { color: var(--ge-table-formula-ref-0); }
|
|
90
|
+
.ge-table-formula-ref-text-1 { color: var(--ge-table-formula-ref-1); }
|
|
91
|
+
.ge-table-formula-ref-text-2 { color: var(--ge-table-formula-ref-2); }
|
|
92
|
+
.ge-table-formula-ref-text-3 { color: var(--ge-table-formula-ref-3); }
|
|
93
|
+
.ge-table-formula-ref-text-4 { color: var(--ge-table-formula-ref-4); }
|
|
94
|
+
.ge-table-formula-ref-text-5 { color: var(--ge-table-formula-ref-5); }
|
|
95
|
+
.ge-table-formula-ref-text-6 { color: var(--ge-table-formula-ref-6); }
|
|
96
|
+
.ge-table-formula-ref-text-7 { color: var(--ge-table-formula-ref-7); }
|
|
97
|
+
.ge-table-formula-ref.ge-table-formula-ref-1 { border-color: var(--ge-table-formula-ref-1); }
|
|
98
|
+
.ge-table-formula-ref.ge-table-formula-ref-2 { border-color: var(--ge-table-formula-ref-2); }
|
|
99
|
+
.ge-table-formula-ref.ge-table-formula-ref-3 { border-color: var(--ge-table-formula-ref-3); }
|
|
100
|
+
.ge-table-formula-ref.ge-table-formula-ref-4 { border-color: var(--ge-table-formula-ref-4); }
|
|
101
|
+
.ge-table-formula-ref.ge-table-formula-ref-5 { border-color: var(--ge-table-formula-ref-5); }
|
|
102
|
+
.ge-table-formula-ref.ge-table-formula-ref-6 { border-color: var(--ge-table-formula-ref-6); }
|
|
103
|
+
.ge-table-formula-ref.ge-table-formula-ref-7 { border-color: var(--ge-table-formula-ref-7); }
|
|
104
|
+
.ge-table-formula-list,
|
|
105
|
+
.ge-table-formula-hint {
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: 100%;
|
|
108
|
+
inset-inline-start: 0;
|
|
109
|
+
margin-top: 2px;
|
|
110
|
+
box-sizing: border-box;
|
|
111
|
+
background: var(--ge-table-formula-popup-bg);
|
|
112
|
+
color: var(--ge-table-formula-popup-text);
|
|
113
|
+
border: 1px solid var(--ge-table-formula-popup-border);
|
|
114
|
+
box-shadow: var(--ge-table-cell-editor-shadow);
|
|
115
|
+
font-size: 13px;
|
|
116
|
+
line-height: 1.5;
|
|
117
|
+
}
|
|
118
|
+
.ge-table-formula-list {
|
|
119
|
+
min-width: 260px;
|
|
120
|
+
max-width: 420px;
|
|
121
|
+
max-height: 216px;
|
|
122
|
+
overflow-y: auto;
|
|
123
|
+
padding: 2px 0;
|
|
124
|
+
}
|
|
125
|
+
.ge-table-formula-option {
|
|
126
|
+
display: flex;
|
|
127
|
+
gap: 8px;
|
|
128
|
+
padding: 1px 8px;
|
|
129
|
+
white-space: nowrap;
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
}
|
|
132
|
+
.ge-table-formula-option[aria-selected="true"] {
|
|
133
|
+
background: var(--ge-table-formula-popup-active-bg);
|
|
134
|
+
}
|
|
135
|
+
.ge-table-formula-option-name {
|
|
136
|
+
font-weight: 600;
|
|
137
|
+
}
|
|
138
|
+
.ge-table-formula-option-description {
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
text-overflow: ellipsis;
|
|
141
|
+
color: var(--ge-table-formula-popup-muted);
|
|
142
|
+
}
|
|
143
|
+
.ge-table-formula-hint {
|
|
144
|
+
padding: 2px 8px;
|
|
145
|
+
white-space: nowrap;
|
|
146
|
+
}
|
|
147
|
+
.ge-table-formula-hint b {
|
|
148
|
+
font-weight: 700;
|
|
149
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* Spreadsheet mode (since 1.1.99): the formula bar (FormulaBar) */
|
|
2
|
+
.ge-table-formula-bar {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: stretch;
|
|
5
|
+
gap: 0;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
height: 30px;
|
|
8
|
+
border: 1px solid var(--ge-table-formula-bar-border);
|
|
9
|
+
background: var(--ge-table-formula-bar-bg);
|
|
10
|
+
color: var(--ge-table-formula-bar-text);
|
|
11
|
+
font: inherit;
|
|
12
|
+
}
|
|
13
|
+
.ge-table-formula-bar-address,
|
|
14
|
+
.ge-table-formula-bar-input {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
margin: 0;
|
|
17
|
+
padding: 0 8px;
|
|
18
|
+
border: 0;
|
|
19
|
+
outline: none;
|
|
20
|
+
font: inherit;
|
|
21
|
+
color: inherit;
|
|
22
|
+
background: transparent;
|
|
23
|
+
}
|
|
24
|
+
.ge-table-formula-bar-address {
|
|
25
|
+
flex: 0 0 96px;
|
|
26
|
+
width: 96px;
|
|
27
|
+
border-inline-end: 1px solid var(--ge-table-formula-bar-border);
|
|
28
|
+
font-variant-numeric: tabular-nums;
|
|
29
|
+
}
|
|
30
|
+
.ge-table-formula-bar-address[aria-invalid="true"] {
|
|
31
|
+
box-shadow: inset 0 0 0 2px var(--ge-table-cell-editor-invalid-border);
|
|
32
|
+
}
|
|
33
|
+
.ge-table-formula-bar-fx {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
padding: 0 8px;
|
|
37
|
+
font-style: italic;
|
|
38
|
+
color: var(--ge-table-formula-bar-muted);
|
|
39
|
+
border-inline-end: 1px solid var(--ge-table-formula-bar-border);
|
|
40
|
+
}
|
|
41
|
+
.ge-table-formula-bar-input {
|
|
42
|
+
flex: 1 1 auto;
|
|
43
|
+
min-width: 0;
|
|
44
|
+
direction: ltr; /* formulas read left to right */
|
|
45
|
+
text-align: left;
|
|
46
|
+
}
|
|
47
|
+
.ge-table-formula-bar-address:focus-visible,
|
|
48
|
+
.ge-table-formula-bar-input:focus-visible {
|
|
49
|
+
box-shadow: inset 0 0 0 2px var(--ge-table-cell-editor-border);
|
|
50
|
+
}
|