@ishibashi0112/spreadsheet-grid-solid 1.9.0 → 1.10.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/API_REFERENCE.md +142 -22
- package/README.md +6 -6
- package/dist/devWarnings.d.ts +3 -0
- package/dist/editors/CellEditorLayer.d.ts +1 -0
- package/dist/editors/DateCellEditor.d.ts +2 -1
- package/dist/editors/NumberCellEditor.d.ts +2 -1
- package/dist/editors/SearchSelectCellEditor.d.ts +1 -0
- package/dist/editors/SelectCellEditor.d.ts +1 -0
- package/dist/editors/TextCellEditor.d.ts +1 -0
- package/dist/features/excelShortcuts.d.ts +2 -0
- package/dist/features/newRow.d.ts +2 -0
- package/dist/features/types.d.ts +5 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3148 -2958
- package/dist/model/gridTypes.d.ts +2 -0
- package/dist/source/index.jsx +597 -282
- package/dist/style.css +1 -1
- package/dist/style.layer.css +1 -1
- package/dist/view/GridBodyLayer.d.ts +11 -0
- package/package.json +3 -3
- package/skills/spreadsheet-grid-solid/SKILL.md +1 -1
package/dist/source/index.jsx
CHANGED
|
@@ -30,10 +30,15 @@ import {
|
|
|
30
30
|
import { merge } from "solid-js";
|
|
31
31
|
|
|
32
32
|
// src/SpreadsheetGrid.tsx
|
|
33
|
-
import { For as For5, Match, NoHydration, Show as
|
|
33
|
+
import { For as For5, Match, NoHydration, Show as Show12, Switch, createEffect as createEffect4, createMemo as createMemo10, createSignal as createSignal9, createUniqueId as createUniqueId3, isHydrating, latest as latest2, onCleanup as onCleanup8, runWithOwner as runWithOwner3, untrack as untrack13 } from "solid-js";
|
|
34
34
|
import { isServer } from "@solidjs/web";
|
|
35
35
|
import { createGridEngine } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/createGridEngine";
|
|
36
36
|
import { gridActions } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridActions";
|
|
37
|
+
import { isCopiedRangeCurrent } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridStore";
|
|
38
|
+
import {
|
|
39
|
+
resolveExcelShortcuts as resolveExcelShortcuts2,
|
|
40
|
+
usesExcelShortcutCommands as usesExcelShortcutCommands2
|
|
41
|
+
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/excelShortcuts";
|
|
37
42
|
import { buildSelectionSnapshot, selectGlobalFilter } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridSelectors";
|
|
38
43
|
import {
|
|
39
44
|
buildColumnMeasurements,
|
|
@@ -85,7 +90,7 @@ import {
|
|
|
85
90
|
isControlColumnKey,
|
|
86
91
|
isDetailRowExpandable,
|
|
87
92
|
isInsideDetailCardOf,
|
|
88
|
-
isSyntheticColumnKey as
|
|
93
|
+
isSyntheticColumnKey as isSyntheticColumnKey3,
|
|
89
94
|
resolveFirstDataColIndex
|
|
90
95
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/detailRow";
|
|
91
96
|
import { resolveDataRowNumber as resolveDataRowNumber2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/labelRows";
|
|
@@ -100,7 +105,13 @@ import {
|
|
|
100
105
|
resolvePopupContainer
|
|
101
106
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/utils/popupContainer";
|
|
102
107
|
import { createCellCommands, writeCellValueTo } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/cellCommands";
|
|
103
|
-
import { getCellValue as getCellValue2 } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions";
|
|
108
|
+
import { getCellValue as getCellValue2, resolveCanEditCellContext } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions";
|
|
109
|
+
import {
|
|
110
|
+
getSelectableRowCount,
|
|
111
|
+
NEW_ROW_KEY,
|
|
112
|
+
peekEditRow,
|
|
113
|
+
resolveFirstEditableColIndex
|
|
114
|
+
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/newRow";
|
|
104
115
|
import { IME_INPUT_ATTRIBUTE, isImeComposingKeyEvent as isImeComposingKeyEvent2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
|
|
105
116
|
import {
|
|
106
117
|
createKeyboardController,
|
|
@@ -615,6 +626,7 @@ import { For as For2, Show as Show2, createMemo as createMemo5, createRenderEffe
|
|
|
615
626
|
import { getCellValue, isCellEditable, isColumnEditable } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions";
|
|
616
627
|
import { resolveIsRowSelected } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/rowSelection";
|
|
617
628
|
import { resolveDataRowNumber } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/labelRows";
|
|
629
|
+
import { isSyntheticColumnKey as isSyntheticColumnKey2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/detailRow";
|
|
618
630
|
import { shouldMarkCellOverflowTooltip } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cellOverflowTooltip";
|
|
619
631
|
import { getInvalidMessage, hasCellValidation } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/validation";
|
|
620
632
|
import { normalizeCellNote, resolveCellTooltipText } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cellNote";
|
|
@@ -750,6 +762,9 @@ var NO_SELECTED_COLUMNS = [-1, -1];
|
|
|
750
762
|
var EMPTY_SLOT = resolveSlotProps(void 0);
|
|
751
763
|
var NO_VALUE = () => null;
|
|
752
764
|
var NO_SLOT = () => EMPTY_SLOT;
|
|
765
|
+
var NO_FALSE = () => false;
|
|
766
|
+
var EMPTY_NEW_ROW = /* @__PURE__ */ Object.freeze({});
|
|
767
|
+
var renderNewRowPlaceholder = (text) => text === null ? null : <span class="ssg-new-row-placeholder">{text}</span>;
|
|
753
768
|
var joinClasses = (...parts) => {
|
|
754
769
|
let out = "";
|
|
755
770
|
for (const part of parts) {
|
|
@@ -796,6 +811,9 @@ function GridBodyLayer(props) {
|
|
|
796
811
|
if (row.skeleton) {
|
|
797
812
|
return "skeleton";
|
|
798
813
|
}
|
|
814
|
+
if (row.newRow === true) {
|
|
815
|
+
return "keyed";
|
|
816
|
+
}
|
|
799
817
|
const model = props.rowModel;
|
|
800
818
|
return model.getGroupRow?.(row.index) !== void 0 || model.getLabelRow?.(row.index) !== void 0 ? "keyed" : "data";
|
|
801
819
|
};
|
|
@@ -832,7 +850,10 @@ function GridBodyLayer(props) {
|
|
|
832
850
|
slots={props.slots}
|
|
833
851
|
/>;
|
|
834
852
|
}
|
|
835
|
-
const
|
|
853
|
+
const isEntry = untrack3(() => item().newRow === true);
|
|
854
|
+
const newRowState = isEntry ? createMemo5(() => props.newRowDraft?.draft !== void 0 ? "draft" : "empty") : void 0;
|
|
855
|
+
const newRowBlank = newRowState ? () => newRowState() === "empty" : NO_FALSE;
|
|
856
|
+
const row = isEntry ? () => props.newRowLayer ? props.newRowDraft?.draft ?? EMPTY_NEW_ROW : void 0 : () => props.rowModel.getRow(rowIndex());
|
|
836
857
|
const groupRow = createMemo5(() => props.grouping ? props.rowModel.getGroupRow?.(rowIndex()) : void 0);
|
|
837
858
|
const labelRow = createMemo5(
|
|
838
859
|
() => props.labelRowLayer ? props.rowModel.getLabelRow?.(rowIndex()) : void 0
|
|
@@ -891,28 +912,35 @@ function GridBodyLayer(props) {
|
|
|
891
912
|
</Show2>
|
|
892
913
|
<Show2 when={row()}>
|
|
893
914
|
{(currentRow) => {
|
|
894
|
-
const rowKey = createMemo5(() =>
|
|
915
|
+
const rowKey = createMemo5(() => {
|
|
916
|
+
if (isEntry) {
|
|
917
|
+
void props.newRowDraft;
|
|
918
|
+
}
|
|
919
|
+
return props.rowModel.getRowKey(rowIndex()) ?? rowIndex();
|
|
920
|
+
});
|
|
895
921
|
let rowElement;
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
922
|
+
if (!isEntry) {
|
|
923
|
+
createRenderEffect(
|
|
924
|
+
rowKey,
|
|
925
|
+
(_next, previous) => {
|
|
926
|
+
if (previous !== void 0 && rowElement) {
|
|
927
|
+
markReusedRow(rowElement);
|
|
928
|
+
}
|
|
929
|
+
},
|
|
930
|
+
{ name: "reusedRow" }
|
|
931
|
+
);
|
|
932
|
+
}
|
|
933
|
+
const sourceRowIndex = isEntry ? () => -1 : createMemo5(() => props.rowModel.getSourceIndex(rowIndex()) ?? rowIndex());
|
|
906
934
|
const rowSize = createMemo5(() => item().size ?? props.rowHeight);
|
|
907
935
|
const isRowChecked = createMemo5(
|
|
908
|
-
() => props.enableRowSelection ? resolveIsRowSelected(props.rowSelectionState, rowKey()) : false
|
|
936
|
+
() => props.enableRowSelection && !isEntry ? resolveIsRowSelected(props.rowSelectionState, rowKey()) : false
|
|
909
937
|
);
|
|
910
938
|
const isRowSelected = createMemo5(
|
|
911
|
-
() => props.selection.kind === "row" && rowIndex() >= props.selection.startRow && rowIndex() <= props.selection.endRow
|
|
939
|
+
() => !isEntry && props.selection.kind === "row" && rowIndex() >= props.selection.startRow && rowIndex() <= props.selection.endRow
|
|
912
940
|
);
|
|
913
941
|
const selectedColRange = createMemo5(() => {
|
|
914
942
|
const selection = props.selection;
|
|
915
|
-
if (selection.kind === "col") {
|
|
943
|
+
if (selection.kind === "col" && !isEntry) {
|
|
916
944
|
return [selection.startCol, selection.endCol];
|
|
917
945
|
}
|
|
918
946
|
if (selection.kind === "cell" && rowIndex() >= selection.startRow && rowIndex() <= selection.endRow) {
|
|
@@ -941,7 +969,7 @@ function GridBodyLayer(props) {
|
|
|
941
969
|
const rowAutoHeight = createMemo5(() => !!props.autoHeight);
|
|
942
970
|
const isHovered = createMemo5(() => props.hoveredRowIndex === rowIndex());
|
|
943
971
|
const rowSlot = createMemo5(
|
|
944
|
-
() => resolveSlotProps(
|
|
972
|
+
() => newRowBlank() ? EMPTY_SLOT : resolveSlotProps(
|
|
945
973
|
props.getRowClassName?.(currentRow(), rowIndex(), {
|
|
946
974
|
row: currentRow(),
|
|
947
975
|
rowIndex: rowIndex(),
|
|
@@ -952,8 +980,9 @@ function GridBodyLayer(props) {
|
|
|
952
980
|
)
|
|
953
981
|
);
|
|
954
982
|
const rowNumber = () => props.labelViewIndexes ? resolveDataRowNumber(props.labelViewIndexes, rowIndex()) : rowIndex() + 1;
|
|
983
|
+
const rowTracking = isEntry ? NO_FALSE : trackingOn;
|
|
955
984
|
const rowUnsavedTexts = createMemoWhen(
|
|
956
|
-
|
|
985
|
+
rowTracking,
|
|
957
986
|
() => {
|
|
958
987
|
const marks = props.unsavedTracking;
|
|
959
988
|
const saved = marks?.getUnsavedCells(rowKey());
|
|
@@ -975,19 +1004,23 @@ function GridBodyLayer(props) {
|
|
|
975
1004
|
);
|
|
976
1005
|
const rowUnsaved = () => rowUnsavedTexts() !== void 0;
|
|
977
1006
|
const closedTreeUnsaved = () => props.closedTreeUnsaved?.has(rowKey()) === true;
|
|
1007
|
+
const rowAdded = () => props.unsavedTracking?.isAddedRow?.(rowKey()) === true;
|
|
978
1008
|
const rowHeaderDescription = () => {
|
|
979
|
-
const
|
|
980
|
-
|
|
981
|
-
|
|
1009
|
+
const parts = [
|
|
1010
|
+
rowAdded() ? props.unsavedTracking?.addedRowDescription : void 0,
|
|
1011
|
+
rowUnsaved() ? props.unsavedTracking?.rowDescription : void 0,
|
|
1012
|
+
closedTreeUnsaved() ? props.unsavedTracking?.closedTreeDescription : void 0
|
|
1013
|
+
].filter((part) => part !== void 0 && part !== "");
|
|
1014
|
+
return parts.length === 0 ? void 0 : parts.join(" / ");
|
|
982
1015
|
};
|
|
983
1016
|
const treeRow = createMemoWhen(
|
|
984
|
-
() => props.treeColumnKey !== void 0,
|
|
1017
|
+
() => !isEntry && props.treeColumnKey !== void 0,
|
|
985
1018
|
() => props.rowModel.getTreeRow?.(rowIndex()),
|
|
986
1019
|
void 0,
|
|
987
1020
|
sameTreeRow
|
|
988
1021
|
);
|
|
989
|
-
const unsavedTextOf = (columnKey) => untrack3(
|
|
990
|
-
const unsavedMarkOf = (unsavedText) => untrack3(
|
|
1022
|
+
const unsavedTextOf = (columnKey) => untrack3(rowTracking) ? () => rowUnsavedTexts()?.get(columnKey) ?? null : NO_VALUE;
|
|
1023
|
+
const unsavedMarkOf = (unsavedText) => untrack3(rowTracking) ? () => unsavedText() !== null ? <span class="ssg-unsaved-mark" aria-hidden="true" /> : null : null;
|
|
991
1024
|
const textCellBase = createMemo5(() => {
|
|
992
1025
|
const slot = rowSlot();
|
|
993
1026
|
const bodyCell = cellEnv().bodyCellSlot;
|
|
@@ -1064,10 +1097,12 @@ function GridBodyLayer(props) {
|
|
|
1064
1097
|
const cells = () => <For2 each={props.entries} keyed={cellKey}>
|
|
1065
1098
|
{(entry) => {
|
|
1066
1099
|
const shape = untrack3(() => cellShapeOf(entry().column));
|
|
1067
|
-
if (shape === "text") {
|
|
1100
|
+
if (shape === "text" && !isEntry) {
|
|
1068
1101
|
return renderTextCell(entry);
|
|
1069
1102
|
}
|
|
1070
|
-
const plain = shape
|
|
1103
|
+
const plain = shape !== "decorated";
|
|
1104
|
+
const newRowSynthetic = isEntry && untrack3(() => isSyntheticColumnKey2(entry().column.key));
|
|
1105
|
+
const decorOff = newRowSynthetic ? () => true : newRowBlank;
|
|
1071
1106
|
const unbound = createMemo5(() => entry().column);
|
|
1072
1107
|
const column = () => unbound();
|
|
1073
1108
|
const colIndex = createMemo5(() => entry().logicalIndex);
|
|
@@ -1077,7 +1112,7 @@ function GridBodyLayer(props) {
|
|
|
1077
1112
|
const isSelected = () => isRowSelected() || selectedColStart() >= 0 && colIndex() >= selectedColStart() && colIndex() <= selectedColEnd();
|
|
1078
1113
|
const readOnlyCell = () => {
|
|
1079
1114
|
const env = editPermission();
|
|
1080
|
-
return !isColumnEditable(env.readOnly, unbound()) || env.canEditCell !== void 0 && !isCellEditable(env, rowIndex(), colIndex(), currentRow(), unbound(), {
|
|
1115
|
+
return !isColumnEditable(env.readOnly, unbound()) || env.canEditCell !== void 0 && !newRowBlank() && !isCellEditable(env, rowIndex(), colIndex(), currentRow(), unbound(), {
|
|
1081
1116
|
sourceRowIndex: sourceRowIndex(),
|
|
1082
1117
|
rowKey: rowKey()
|
|
1083
1118
|
});
|
|
@@ -1133,7 +1168,7 @@ function GridBodyLayer(props) {
|
|
|
1133
1168
|
};
|
|
1134
1169
|
const needsStyleContext = () => typeof column().cellClassName === "function" || !!column().cellNote;
|
|
1135
1170
|
const styleContext = plain ? NO_VALUE : createMemoWhen(
|
|
1136
|
-
needsStyleContext,
|
|
1171
|
+
() => !decorOff() && needsStyleContext(),
|
|
1137
1172
|
() => ({
|
|
1138
1173
|
row: currentRow(),
|
|
1139
1174
|
rowIndex: rowIndex(),
|
|
@@ -1151,7 +1186,7 @@ function GridBodyLayer(props) {
|
|
|
1151
1186
|
}),
|
|
1152
1187
|
null
|
|
1153
1188
|
);
|
|
1154
|
-
const conditionalCell = plain ? NO_SLOT : createMemoWhen(
|
|
1189
|
+
const conditionalCell = plain || newRowSynthetic ? NO_SLOT : createMemoWhen(
|
|
1155
1190
|
() => column().cellClassName !== void 0,
|
|
1156
1191
|
() => {
|
|
1157
1192
|
const cellClassName = column().cellClassName;
|
|
@@ -1162,7 +1197,7 @@ function GridBodyLayer(props) {
|
|
|
1162
1197
|
},
|
|
1163
1198
|
resolveSlotProps(void 0)
|
|
1164
1199
|
);
|
|
1165
|
-
const formatRules = () => props.conditionalFormat ? column().conditionalFormat : void 0;
|
|
1200
|
+
const formatRules = () => props.conditionalFormat && !decorOff() ? column().conditionalFormat : void 0;
|
|
1166
1201
|
const dataBar = plain ? NO_VALUE : createMemoWhen(
|
|
1167
1202
|
() => formatRules()?.dataBar !== void 0,
|
|
1168
1203
|
() => {
|
|
@@ -1191,12 +1226,12 @@ function GridBodyLayer(props) {
|
|
|
1191
1226
|
return bar ? bar.negative ? rules?.negativeColor : rules?.color : void 0;
|
|
1192
1227
|
};
|
|
1193
1228
|
const invalidMessage = plain ? NO_VALUE : createMemoWhen(
|
|
1194
|
-
() => !!props.showValidationMarks && hasCellValidation(unbound()),
|
|
1229
|
+
() => !decorOff() && !!props.showValidationMarks && hasCellValidation(unbound()),
|
|
1195
1230
|
() => treeAggregates() !== void 0 ? null : getInvalidMessage(unbound(), currentRow(), value(), texts()),
|
|
1196
1231
|
null
|
|
1197
1232
|
);
|
|
1198
1233
|
const cellNote = plain ? NO_VALUE : createMemoWhen(
|
|
1199
|
-
() => !!column().cellNote,
|
|
1234
|
+
() => !decorOff() && !!column().cellNote,
|
|
1200
1235
|
() => {
|
|
1201
1236
|
const note = column().cellNote;
|
|
1202
1237
|
const context = styleContext();
|
|
@@ -1246,10 +1281,11 @@ function GridBodyLayer(props) {
|
|
|
1246
1281
|
</div>
|
|
1247
1282
|
</Show2>
|
|
1248
1283
|
</>;
|
|
1249
|
-
const
|
|
1284
|
+
const dataContent = keyedContent ? () => {
|
|
1250
1285
|
rowKey();
|
|
1251
1286
|
return cellChildren();
|
|
1252
1287
|
} : cellChildren;
|
|
1288
|
+
const cellContent = !isEntry ? dataContent : newRowSynthetic ? NO_VALUE : () => newRowBlank() ? renderNewRowPlaceholder(isEditing() ? null : props.newRowLayer?.placeholder(column()) ?? null) : dataContent();
|
|
1253
1289
|
return <div
|
|
1254
1290
|
role="gridcell"
|
|
1255
1291
|
aria-colindex={colIndex() + 2}
|
|
@@ -1326,8 +1362,9 @@ function GridBodyLayer(props) {
|
|
|
1326
1362
|
data-row-index={rowIndex()}
|
|
1327
1363
|
role="row"
|
|
1328
1364
|
aria-rowindex={rowIndex() + 2 + props.ariaRowOffset}
|
|
1329
|
-
aria-selected={props.enableRowSelection ? isRowChecked() ? "true" : "false" : void 0}
|
|
1365
|
+
aria-selected={props.enableRowSelection && !isEntry ? isRowChecked() ? "true" : "false" : void 0}
|
|
1330
1366
|
data-row-key={String(rowKey())}
|
|
1367
|
+
data-ssg-new-row={newRowState?.()}
|
|
1331
1368
|
aria-level={treeRow() !== void 0 ? treeRow().level + 1 : void 0}
|
|
1332
1369
|
aria-expanded={treeRow()?.hasChildren ? treeRow().open ? "true" : "false" : void 0}
|
|
1333
1370
|
aria-posinset={treeRow()?.posInSet}
|
|
@@ -1339,7 +1376,11 @@ function GridBodyLayer(props) {
|
|
|
1339
1376
|
props.slots.bodyRow?.className,
|
|
1340
1377
|
isRowChecked() && "ssg-body-row--checked",
|
|
1341
1378
|
rowUnsaved() && "ssg-body-row--unsaved",
|
|
1342
|
-
|
|
1379
|
+
// 追加(1.10.0): グリッドで足した行。
|
|
1380
|
+
rowAdded() && "ssg-body-row--added",
|
|
1381
|
+
treeRow()?.matched === false && "ssg-body-row--tree-unmatched",
|
|
1382
|
+
// 追加(1.10.0): 入力行(公開の契約。状態は data-ssg-new-row)。
|
|
1383
|
+
isEntry && "ssg-body-row--new"
|
|
1343
1384
|
)}
|
|
1344
1385
|
style={{
|
|
1345
1386
|
...props.slots.bodyRow?.style,
|
|
@@ -1360,9 +1401,13 @@ function GridBodyLayer(props) {
|
|
|
1360
1401
|
"ssg-header-cell ssg-row-header-cell",
|
|
1361
1402
|
rowSlot().className,
|
|
1362
1403
|
props.slots.rowHeaderCell?.className,
|
|
1363
|
-
props.enableRowSelection && "ssg-row-header-cell--checkbox",
|
|
1404
|
+
props.enableRowSelection && !isEntry && "ssg-row-header-cell--checkbox",
|
|
1405
|
+
// 追加(1.10.0): 入力行の行番号(* / 下書きは ✎)。
|
|
1406
|
+
isEntry && "ssg-row-header-cell--new",
|
|
1364
1407
|
(rowUnsaved() || closedTreeUnsaved()) && "ssg-row-header-cell--unsaved",
|
|
1365
|
-
(
|
|
1408
|
+
// 追加(1.10.0): グリッドで足した行の行番号(左の縦の線)。
|
|
1409
|
+
rowAdded() && "ssg-row-header-cell--added",
|
|
1410
|
+
(props.isWholeGridSelected && !isEntry || isRowSelected()) && "ssg-header-cell--selected",
|
|
1366
1411
|
isHovered() && "ssg-header-cell--hovered"
|
|
1367
1412
|
)}
|
|
1368
1413
|
style={{
|
|
@@ -1373,13 +1418,21 @@ function GridBodyLayer(props) {
|
|
|
1373
1418
|
height: px(rowSize())
|
|
1374
1419
|
}}
|
|
1375
1420
|
>
|
|
1376
|
-
|
|
1377
|
-
|
|
1421
|
+
{newRowState ? (
|
|
1422
|
+
// 追加(1.10.0): 入力行の行番号は印(* / ✎)なので、読み上げの名前を見えない文字で添える(E4-08)。
|
|
1423
|
+
<>
|
|
1424
|
+
<span aria-hidden="true">{newRowState() === "draft" ? "\u270E" : "\uFF0A"}</span>
|
|
1425
|
+
<span class="ssg-visually-hidden">
|
|
1426
|
+
{newRowState() === "draft" ? props.newRowLayer?.draftHeader : props.newRowLayer?.header}
|
|
1427
|
+
</span>
|
|
1428
|
+
</>
|
|
1429
|
+
) : <Show2 when={props.enableRowSelection} fallback={rowNumber()}>
|
|
1430
|
+
<RowSelectionCheckbox
|
|
1378
1431
|
slot={props.slots.checkbox}
|
|
1379
1432
|
label={formatLocaleText2(texts().selectRow, { row: rowNumber() })}
|
|
1380
1433
|
state={isRowChecked() ? "checked" : "unchecked"}
|
|
1381
1434
|
/>
|
|
1382
|
-
|
|
1435
|
+
</Show2>}
|
|
1383
1436
|
</div>
|
|
1384
1437
|
</Show2>
|
|
1385
1438
|
{switchedCells()}
|
|
@@ -1696,7 +1749,8 @@ function TextCellEditor(props) {
|
|
|
1696
1749
|
onCommit: props.onCommit,
|
|
1697
1750
|
onCancel: props.onCancel,
|
|
1698
1751
|
onRejected: setError,
|
|
1699
|
-
enterMove: props.enterMove
|
|
1752
|
+
enterMove: props.enterMove,
|
|
1753
|
+
onCommitToSelection: props.onCommitToSelection
|
|
1700
1754
|
})}
|
|
1701
1755
|
onBlur={(event) => commitOnBlur(event.currentTarget.value)}
|
|
1702
1756
|
aria-label={props.ariaLabel}
|
|
@@ -1798,7 +1852,8 @@ function NumberCellEditor(props) {
|
|
|
1798
1852
|
onCommit: props.onCommit,
|
|
1799
1853
|
onCancel: props.onCancel,
|
|
1800
1854
|
onRejected: setError,
|
|
1801
|
-
enterMove: props.enterMove
|
|
1855
|
+
enterMove: props.enterMove,
|
|
1856
|
+
onCommitToSelection: props.onCommitToSelection
|
|
1802
1857
|
})}
|
|
1803
1858
|
onBlur={(event) => {
|
|
1804
1859
|
if (disposed) {
|
|
@@ -1844,6 +1899,7 @@ import {
|
|
|
1844
1899
|
import { withAnchorVisibility } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/editorVisibleBounds";
|
|
1845
1900
|
import { revealOverflowTitle } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/overflowTitle";
|
|
1846
1901
|
import { isImeComposingKeyEvent } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
|
|
1902
|
+
import { isCommitToSelectionKey } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorKeys";
|
|
1847
1903
|
function SelectCellEditor(props) {
|
|
1848
1904
|
const texts = useGridLocaleText();
|
|
1849
1905
|
const portal = useGridPortal();
|
|
@@ -1951,6 +2007,20 @@ function SelectCellEditor(props) {
|
|
|
1951
2007
|
}
|
|
1952
2008
|
return;
|
|
1953
2009
|
}
|
|
2010
|
+
const toSelection = props.onCommitToSelection;
|
|
2011
|
+
if (toSelection !== void 0 && isCommitToSelectionKey(event)) {
|
|
2012
|
+
event.preventDefault();
|
|
2013
|
+
const option = props.options[currentHighlight];
|
|
2014
|
+
if (!option) {
|
|
2015
|
+
props.onCancel();
|
|
2016
|
+
return;
|
|
2017
|
+
}
|
|
2018
|
+
const result = toSelection(option.value);
|
|
2019
|
+
if (result && result.status === "rejected") {
|
|
2020
|
+
setError(result.message);
|
|
2021
|
+
}
|
|
2022
|
+
return;
|
|
2023
|
+
}
|
|
1954
2024
|
handleSelectEditorKeyDown(toEditorKeyEvent(event), {
|
|
1955
2025
|
optionCount: props.options.length,
|
|
1956
2026
|
enterMove: props.enterMove,
|
|
@@ -2125,12 +2195,12 @@ function DateCellEditor(props) {
|
|
|
2125
2195
|
}
|
|
2126
2196
|
setShift(resolveShiftIntoView(element));
|
|
2127
2197
|
});
|
|
2128
|
-
const commitDraft = (value, direction) => {
|
|
2198
|
+
const commitDraft = (value, direction, commit = props.onCommit) => {
|
|
2129
2199
|
if (!textMode) {
|
|
2130
|
-
return
|
|
2200
|
+
return commit(value, direction);
|
|
2131
2201
|
}
|
|
2132
2202
|
const normalized = readTypedDateCommitValue(value);
|
|
2133
|
-
return normalized === null ? { status: "rejected", message: texts().enterDate } :
|
|
2203
|
+
return normalized === null ? { status: "rejected", message: texts().enterDate } : commit(normalized, direction);
|
|
2134
2204
|
};
|
|
2135
2205
|
props.onRegisterFlush?.(() => {
|
|
2136
2206
|
untrack9(() => {
|
|
@@ -2152,6 +2222,11 @@ function DateCellEditor(props) {
|
|
|
2152
2222
|
onCancel: props.onCancel,
|
|
2153
2223
|
onRejected: setError,
|
|
2154
2224
|
enterMove: props.enterMove,
|
|
2225
|
+
// 追加(1.10.0 / Excel のキー): 一括入力も文字の欄は日付として読んでから。
|
|
2226
|
+
onCommitToSelection: props.onCommitToSelection === void 0 ? void 0 : (value) => {
|
|
2227
|
+
const toSelection = props.onCommitToSelection;
|
|
2228
|
+
return toSelection === void 0 ? void 0 : commitDraft(value, void 0, (committed) => toSelection(committed));
|
|
2229
|
+
},
|
|
2155
2230
|
// 日付の入力欄では Home / End でもグリッドがスクロールしていたので止めます(文字の欄ではカーソルの移動なので止めない)。
|
|
2156
2231
|
blockHomeEnd: !textMode
|
|
2157
2232
|
})}
|
|
@@ -2297,6 +2372,9 @@ function CellEditorLayer(props) {
|
|
|
2297
2372
|
},
|
|
2298
2373
|
onCommit: (value, direction, option, forwardText) => props.onCommit(value, direction, option, forwardText),
|
|
2299
2374
|
onCancel: () => props.onCancel(),
|
|
2375
|
+
get onCommitToSelection() {
|
|
2376
|
+
return props.onCommitToSelection;
|
|
2377
|
+
},
|
|
2300
2378
|
onRegisterFlush: (flush) => props.onRegisterFlush?.(flush)
|
|
2301
2379
|
};
|
|
2302
2380
|
const initialValue = untrack11(props.initialValue);
|
|
@@ -2559,10 +2637,38 @@ function DefaultGridBottomBar(props) {
|
|
|
2559
2637
|
</div>;
|
|
2560
2638
|
}
|
|
2561
2639
|
|
|
2640
|
+
// src/view/CopyRangeOverlay.tsx
|
|
2641
|
+
import { Show as Show11 } from "solid-js";
|
|
2642
|
+
var placement = (props, rect) => ({
|
|
2643
|
+
position: "absolute",
|
|
2644
|
+
left: px(props.leadingWidth + rect.left),
|
|
2645
|
+
top: px(props.headerHeight + rect.top - props.baseOffset),
|
|
2646
|
+
width: px(rect.width),
|
|
2647
|
+
height: px(rect.height)
|
|
2648
|
+
});
|
|
2649
|
+
function CopyRangeOverlay(props) {
|
|
2650
|
+
return <Show11 when={props.rect}>
|
|
2651
|
+
{(rect) => <div
|
|
2652
|
+
class={["ssg-copy-range-overlay", props.slot?.className]}
|
|
2653
|
+
style={{ ...props.slot?.style, ...placement(props, rect()) }}
|
|
2654
|
+
data-ssg-copy-range=""
|
|
2655
|
+
/>}
|
|
2656
|
+
</Show11>;
|
|
2657
|
+
}
|
|
2658
|
+
function ColumnHoverOverlay(props) {
|
|
2659
|
+
return <Show11 when={props.rect}>
|
|
2660
|
+
{(rect) => <div class="ssg-col-hover-overlay" style={placement(props, rect())} data-ssg-col-hover="" />}
|
|
2661
|
+
</Show11>;
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2562
2664
|
// src/devWarnings.ts
|
|
2563
2665
|
import { createEffect as createEffect3, createMemo as createMemo9 } from "solid-js";
|
|
2564
2666
|
import { AUTO_HEIGHT_MAX_ROWS } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/verticalGeometry";
|
|
2565
2667
|
import { isSearchSelectEditor as isSearchSelectEditor2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectEditorState";
|
|
2668
|
+
import {
|
|
2669
|
+
resolveExcelShortcuts,
|
|
2670
|
+
usesExcelShortcutCommands
|
|
2671
|
+
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/excelShortcuts";
|
|
2566
2672
|
import { createInertExportCommands } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/features";
|
|
2567
2673
|
import {
|
|
2568
2674
|
warnUnregisteredFeatureMethod,
|
|
@@ -2592,9 +2698,22 @@ var FEATURE_PROPS = {
|
|
|
2592
2698
|
],
|
|
2593
2699
|
// 変更の追跡(React 版と同じ)。
|
|
2594
2700
|
changeTracking: [
|
|
2595
|
-
{
|
|
2701
|
+
{
|
|
2702
|
+
prop: "trackChanges",
|
|
2703
|
+
// 変更(1.10.0): オブジェクトの形({ rows: true } / {})も指定したことになります。
|
|
2704
|
+
isUsed: (props) => props.trackChanges === true || typeof props.trackChanges === "object" && props.trackChanges !== null
|
|
2705
|
+
},
|
|
2596
2706
|
{ prop: "onChangesChange", isUsed: (props) => props.onChangesChange !== void 0 }
|
|
2597
2707
|
],
|
|
2708
|
+
// 追加(1.10.0 / Excel のキー): 切り取り以外のキーを効かせたとき(切り取りは本体なので、既定の省略では警告しない)。
|
|
2709
|
+
excelShortcuts: [
|
|
2710
|
+
{
|
|
2711
|
+
prop: "excelShortcuts",
|
|
2712
|
+
isUsed: (props) => usesExcelShortcutCommands(resolveExcelShortcuts(props.excelShortcuts))
|
|
2713
|
+
}
|
|
2714
|
+
],
|
|
2715
|
+
// 追加(1.10.0 / 入力行)。
|
|
2716
|
+
newRow: [{ prop: "newRow", isUsed: (props) => props.newRow !== void 0 && props.newRow !== false }],
|
|
2598
2717
|
totalRow: [{ prop: "totalRow", isUsed: (props) => props.totalRow !== void 0 && props.totalRow !== false }],
|
|
2599
2718
|
pinnedRows: [
|
|
2600
2719
|
{ prop: "pinnedTopRows", isUsed: (props) => (props.pinnedTopRows?.length ?? 0) > 0 },
|
|
@@ -2808,6 +2927,36 @@ function createShellDevWarningsInDev(args) {
|
|
|
2808
2927
|
);
|
|
2809
2928
|
}
|
|
2810
2929
|
});
|
|
2930
|
+
const newRowWarned = /* @__PURE__ */ new Set();
|
|
2931
|
+
createChangeEffect(
|
|
2932
|
+
() => {
|
|
2933
|
+
const reason = args.newRowUnavailable();
|
|
2934
|
+
return reason === null || typeof reason === "string" ? reason : `missing:${reason.missing}`;
|
|
2935
|
+
},
|
|
2936
|
+
(reason) => {
|
|
2937
|
+
if (reason === "serverSide") {
|
|
2938
|
+
warnOncePerGrid(
|
|
2939
|
+
newRowWarned,
|
|
2940
|
+
"newRowServerSide",
|
|
2941
|
+
"[SpreadsheetGrid] newRow \u306F serverSide(dataSource)\u3067\u306F\u4F7F\u3048\u307E\u305B\u3093(\u5165\u529B\u884C\u306F\u51FA\u307E\u305B\u3093\u3002\u884C\u306F\u30B5\u30FC\u30D0\u30FC\u306B\u8DB3\u3057\u3066\u304B\u3089\u53D6\u308A\u76F4\u3057\u307E\u3059)\u3002\n[SpreadsheetGrid] newRow does not work with serverSide (dataSource). No entry row is shown; add rows on the server and refetch."
|
|
2942
|
+
);
|
|
2943
|
+
} else if (reason === "rowGroup") {
|
|
2944
|
+
warnOncePerGrid(
|
|
2945
|
+
newRowWarned,
|
|
2946
|
+
"newRowRowGroup",
|
|
2947
|
+
"[SpreadsheetGrid] newRow \u306F\u884C\u306E\u30B0\u30EB\u30FC\u30D7\u5316(rowGroup)\u3068\u4E00\u7DD2\u306B\u306F\u4F7F\u3048\u307E\u305B\u3093(\u5165\u529B\u884C\u306F\u51FA\u307E\u305B\u3093)\u3002\n[SpreadsheetGrid] newRow does not work together with row grouping (rowGroup). No entry row is shown."
|
|
2948
|
+
);
|
|
2949
|
+
} else if (reason !== null) {
|
|
2950
|
+
const missing = reason.slice("missing:".length);
|
|
2951
|
+
warnOncePerGrid(
|
|
2952
|
+
newRowWarned,
|
|
2953
|
+
"newRowMissing",
|
|
2954
|
+
`[SpreadsheetGrid] newRow \u306B\u306F ${missing} \u304C\u8981\u308A\u307E\u3059(\u6307\u5B9A\u3059\u308B\u307E\u3067\u5165\u529B\u884C\u306F\u51FA\u307E\u305B\u3093)\u3002
|
|
2955
|
+
[SpreadsheetGrid] newRow needs ${missing}. No entry row is shown until you set it.`
|
|
2956
|
+
);
|
|
2957
|
+
}
|
|
2958
|
+
}
|
|
2959
|
+
);
|
|
2811
2960
|
const treeDataWarned = /* @__PURE__ */ new Set();
|
|
2812
2961
|
createChangeEffect(args.treeDataWarnings, (warnings) => {
|
|
2813
2962
|
for (const warning of warnings) {
|
|
@@ -2860,6 +3009,7 @@ var NO_COLUMN_FILTERS = {};
|
|
|
2860
3009
|
var renderDetailToggleCell = () => null;
|
|
2861
3010
|
var noop3 = () => {
|
|
2862
3011
|
};
|
|
3012
|
+
var isTrackChangesOn = (value) => value === true || typeof value === "object" && value !== null;
|
|
2863
3013
|
var applyHandleRef = (ref, handle) => {
|
|
2864
3014
|
if (typeof ref === "function") {
|
|
2865
3015
|
runWithOwner3(null, () => untrack13(() => ref(handle)));
|
|
@@ -3051,6 +3201,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3051
3201
|
const viewportHeight = createMemo10(() => view().viewportHeight);
|
|
3052
3202
|
const viewScrollTop = createMemo10(() => view().scrollTop);
|
|
3053
3203
|
const viewMaxBodyPx = createMemo10(() => view().maxBodyPx);
|
|
3204
|
+
const newRowDraft = createMemo10(() => view().newRowDraft ?? null);
|
|
3054
3205
|
const viewSetters = createGridViewSetters(store);
|
|
3055
3206
|
const { setHoveredColumnIndex, setIsCornerHovered, setEditorInitialValue } = viewSetters;
|
|
3056
3207
|
const gridRootRef = { current: null };
|
|
@@ -3296,7 +3447,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3296
3447
|
}));
|
|
3297
3448
|
const refetchingRows = createMemo10(() => isServerSide() && serverSide !== void 0 && serverSide.refetching());
|
|
3298
3449
|
const editLocked = () => readOnly() || refetchingRows();
|
|
3299
|
-
const
|
|
3450
|
+
const baseRowModel = createMemo10(() => {
|
|
3300
3451
|
if (!isServerSide() || !serverSide) {
|
|
3301
3452
|
return clientRowModel().rowModel;
|
|
3302
3453
|
}
|
|
@@ -3305,6 +3456,27 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3305
3456
|
const getLabel = labelGetLabel();
|
|
3306
3457
|
return isLabelRow && getLabel && labelRowFeature2 ? labelRowFeature2.wrapRowModelWithLabelRows(base, isLabelRow, getLabel) : base;
|
|
3307
3458
|
});
|
|
3459
|
+
const newRowParts = features.newRow;
|
|
3460
|
+
const newRowGiven = () => props.newRow !== void 0 && props.newRow !== false;
|
|
3461
|
+
const newRowHasRowGroup = () => !isServerSide() && clientRowModel().groupedDisplay != null;
|
|
3462
|
+
const newRowActive = createMemo10(
|
|
3463
|
+
() => newRowGiven() && newRowParts !== void 0 && !isServerSide() && props.onRowsChange != null && props.createRow !== void 0 && props.rowKeyGetter !== void 0 && !readOnly() && !newRowHasRowGroup()
|
|
3464
|
+
);
|
|
3465
|
+
const rowModel = createMemo10(() => engine.newRow.wrapRowModel(baseRowModel(), newRowActive()));
|
|
3466
|
+
const newRowLayer = createMemo10(() => {
|
|
3467
|
+
if (!newRowActive() || newRowParts === void 0) {
|
|
3468
|
+
return void 0;
|
|
3469
|
+
}
|
|
3470
|
+
const texts = localeTexts();
|
|
3471
|
+
const placeholderOption = typeof props.newRow === "object" ? props.newRow.placeholder : void 0;
|
|
3472
|
+
const columnsNow = orderedColumns();
|
|
3473
|
+
const firstEditableKey = columnsNow[resolveFirstEditableColIndex(columnsNow, readOnly())]?.key;
|
|
3474
|
+
return {
|
|
3475
|
+
header: texts.newRowHeader,
|
|
3476
|
+
draftHeader: texts.newRowDraftHeader,
|
|
3477
|
+
placeholder: (column) => newRowParts.resolveNewRowPlaceholder(placeholderOption, texts.newRowPlaceholder, column, firstEditableKey)
|
|
3478
|
+
};
|
|
3479
|
+
});
|
|
3308
3480
|
const canEditCell = createMemo10(() => {
|
|
3309
3481
|
if (isServerSide() && !(serverSide?.canUpdateRows() ?? false)) {
|
|
3310
3482
|
return NEVER_EDITABLE;
|
|
@@ -3327,7 +3499,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3327
3499
|
if (tree) {
|
|
3328
3500
|
return tree.visibility.matchedCount;
|
|
3329
3501
|
}
|
|
3330
|
-
return clientRowModel().groupedDisplay || clientRowModel().labelDisplay ? order().length : viewRowCount();
|
|
3502
|
+
return clientRowModel().groupedDisplay || clientRowModel().labelDisplay ? order().length : newRowActive() ? viewRowCount() - 1 : viewRowCount();
|
|
3331
3503
|
});
|
|
3332
3504
|
const handleGroupToggle = (groupKey) => dispatch(gridActions.toggleGroupCollapsed(groupKey));
|
|
3333
3505
|
const groupingFeature2 = features.grouping;
|
|
@@ -3385,7 +3557,25 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3385
3557
|
maxBodyPx: () => viewMaxBodyPx() ?? MAX_BODY_PX,
|
|
3386
3558
|
globalFilterText,
|
|
3387
3559
|
columnFilterCount: () => Object.keys(columnFilters()).length,
|
|
3388
|
-
trackChangesUnavailable: () => !(props.trackChanges
|
|
3560
|
+
trackChangesUnavailable: () => !isTrackChangesOn(props.trackChanges) || features.changeTracking === void 0 ? null : isServerSide() ? "serverSide" : props.rowKeyGetter === void 0 ? "rowKeyGetter" : props.onRowsChange == null ? "onRowsChange" : null,
|
|
3561
|
+
// 追加(1.10.0 / 入力行): 入力行が出ない理由(機能があり newRow を指定したときだけ。React 版と同じ条件と文言)。
|
|
3562
|
+
newRowUnavailable: () => {
|
|
3563
|
+
if (!newRowGiven() || newRowParts === void 0) {
|
|
3564
|
+
return null;
|
|
3565
|
+
}
|
|
3566
|
+
if (isServerSide()) {
|
|
3567
|
+
return "serverSide";
|
|
3568
|
+
}
|
|
3569
|
+
if (newRowHasRowGroup()) {
|
|
3570
|
+
return "rowGroup";
|
|
3571
|
+
}
|
|
3572
|
+
const missing = [
|
|
3573
|
+
props.onRowsChange == null ? "onRowsChange" : null,
|
|
3574
|
+
props.createRow === void 0 ? "createRow" : null,
|
|
3575
|
+
props.rowKeyGetter === void 0 ? "rowKeyGetter" : null
|
|
3576
|
+
].filter((name) => name !== null).join(" / ");
|
|
3577
|
+
return missing === "" ? null : { missing };
|
|
3578
|
+
},
|
|
3389
3579
|
// 追加(1.9.0 / ツリーデータ): 一緒に使えないもの・効かない理由と、木の形の問題(親のキーが rows に無い行・循環・同じキーの行)。
|
|
3390
3580
|
treeDataWarnings: () => {
|
|
3391
3581
|
const parts = treeDataParts;
|
|
@@ -3532,8 +3722,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3532
3722
|
const spec = chipFeature.resolveChipSpec(chips, {
|
|
3533
3723
|
row,
|
|
3534
3724
|
rowIndex: viewIndex,
|
|
3535
|
-
|
|
3536
|
-
|
|
3725
|
+
// 変更(1.10.0 / 入力行): 入力行の下書きの行は sourceRowIndex が -1、rowKey はその行の rowKeyGetter の値(React 版と同じ)。
|
|
3726
|
+
...resolveCanEditCellContext(model, viewIndex),
|
|
3537
3727
|
colIndex,
|
|
3538
3728
|
value,
|
|
3539
3729
|
column,
|
|
@@ -3597,10 +3787,22 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3597
3787
|
const model = rowModel();
|
|
3598
3788
|
const serverSideActive = isServerSide();
|
|
3599
3789
|
const items = [];
|
|
3790
|
+
const entryIndex = model.newRow?.index ?? -1;
|
|
3600
3791
|
for (const virtualRow of virtualRows) {
|
|
3601
3792
|
if (!virtualRowIndexes.has(virtualRow.index)) {
|
|
3602
3793
|
continue;
|
|
3603
3794
|
}
|
|
3795
|
+
if (virtualRow.index === entryIndex) {
|
|
3796
|
+
items.push({
|
|
3797
|
+
index: virtualRow.index,
|
|
3798
|
+
start: virtualRow.start,
|
|
3799
|
+
size: virtualRow.size,
|
|
3800
|
+
key: String(NEW_ROW_KEY),
|
|
3801
|
+
skeleton: false,
|
|
3802
|
+
newRow: true
|
|
3803
|
+
});
|
|
3804
|
+
continue;
|
|
3805
|
+
}
|
|
3604
3806
|
const skeleton = serverSideActive && model.getRow(virtualRow.index) === void 0 && model.getLabelRow?.(virtualRow.index) === void 0;
|
|
3605
3807
|
items.push({
|
|
3606
3808
|
index: virtualRow.index,
|
|
@@ -3791,11 +3993,17 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3791
3993
|
const motionExtrasFeature2 = features.motionExtras;
|
|
3792
3994
|
const copiedSelection = createMemo10(() => {
|
|
3793
3995
|
const copied = view().copiedRange;
|
|
3794
|
-
if (!motionExtrasFeature2 || !(props.showCopyRange ?? true)
|
|
3996
|
+
if (!copied || copied.cut === void 0 && (!motionExtrasFeature2 || !(props.showCopyRange ?? true))) {
|
|
3795
3997
|
return null;
|
|
3796
3998
|
}
|
|
3797
3999
|
const state = ui();
|
|
3798
|
-
return
|
|
4000
|
+
return isCopiedRangeCurrent(copied, {
|
|
4001
|
+
sort: state.sort,
|
|
4002
|
+
filters: state.filters,
|
|
4003
|
+
collapsedGroupKeys: state.collapsedGroupKeys,
|
|
4004
|
+
viewRowCount: viewRowCount(),
|
|
4005
|
+
columns: orderedColumnKeys()
|
|
4006
|
+
}) ? copied.selection : null;
|
|
3799
4007
|
});
|
|
3800
4008
|
const copiedExtents = createMemo10(() => resolveSelectionExtents(copiedSelection(), paneLayout(), viewRowCount()));
|
|
3801
4009
|
const copiedBand = createMemo10(
|
|
@@ -4107,7 +4315,10 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4107
4315
|
const changeTrackingParts = features.changeTracking;
|
|
4108
4316
|
const changeTracker = engine.changeTracker;
|
|
4109
4317
|
const changeTrackingActive = createMemo10(
|
|
4110
|
-
() => (props.trackChanges
|
|
4318
|
+
() => isTrackChangesOn(props.trackChanges) && changeTrackingParts !== void 0 && !isServerSide() && props.rowKeyGetter !== void 0 && props.onRowsChange != null
|
|
4319
|
+
);
|
|
4320
|
+
const trackRowChanges = createMemo10(
|
|
4321
|
+
() => changeTrackingActive() && typeof props.trackChanges === "object" && props.trackChanges.rows === true
|
|
4111
4322
|
);
|
|
4112
4323
|
const history = createHistoryController();
|
|
4113
4324
|
const historyRowLocator = createMemo10(() => createHistoryRowLocator(rowModel(), treeStage()));
|
|
@@ -4132,14 +4343,17 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4132
4343
|
// 追加(1.9.0 の点検): 元に戻した後のアクティブセルと選択を行のキーで付け替える(React 版と同じ)。
|
|
4133
4344
|
rowLocator: historyRowLocator(),
|
|
4134
4345
|
// 追加(1.9.0 の点検 T6-02): 元に戻したアクティブセルは行のキーで付け替えるので、並びに付いていく仕組みに教える(React 版と同じ)。
|
|
4135
|
-
noteFollowMove: engine.activeRowFollow.noteFollowMove
|
|
4346
|
+
noteFollowMove: engine.activeRowFollow.noteFollowMove,
|
|
4347
|
+
// 追加(1.10.0 の別視点のレビュー RA-6): 元に戻す / やり直すの前に入力行の下書きを行にする(React 版と同じ)。
|
|
4348
|
+
beforeRestore: newRowActive() ? engine.newRow.commitDraft : void 0
|
|
4136
4349
|
}), "render", "history");
|
|
4137
4350
|
connectController(changeTracker, () => ({
|
|
4138
4351
|
enabled: changeTrackingActive(),
|
|
4139
4352
|
rows: rows(),
|
|
4140
4353
|
columns: columns(),
|
|
4141
4354
|
rowKeyGetter: props.rowKeyGetter,
|
|
4142
|
-
applyRows: props.onRowsChange ? history.applyRows : void 0
|
|
4355
|
+
applyRows: props.onRowsChange ? history.applyRows : void 0,
|
|
4356
|
+
trackRows: trackRowChanges()
|
|
4143
4357
|
}), "render", "changeTracker");
|
|
4144
4358
|
const changeSnapshot = createExternalStoreSignal(changeTracker, "changeTrackerStore");
|
|
4145
4359
|
connectController(
|
|
@@ -4152,8 +4366,21 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4152
4366
|
"changeNotifier"
|
|
4153
4367
|
);
|
|
4154
4368
|
const unsavedChanges = createMemo10(
|
|
4155
|
-
() =>
|
|
4156
|
-
|
|
4369
|
+
() => {
|
|
4370
|
+
if (!changeTrackingActive()) {
|
|
4371
|
+
return null;
|
|
4372
|
+
}
|
|
4373
|
+
const snapshot2 = changeSnapshot();
|
|
4374
|
+
return trackRowChanges() ? {
|
|
4375
|
+
rowCount: snapshot2.rowCount,
|
|
4376
|
+
cellCount: snapshot2.cellCount,
|
|
4377
|
+
addedCount: snapshot2.addedCount,
|
|
4378
|
+
removedCount: snapshot2.removedCount
|
|
4379
|
+
} : { rowCount: snapshot2.rowCount, cellCount: snapshot2.cellCount };
|
|
4380
|
+
},
|
|
4381
|
+
{
|
|
4382
|
+
equals: (a, b) => a === b || a !== null && b !== null && a.rowCount === b.rowCount && a.cellCount === b.cellCount && a.addedCount === b.addedCount && a.removedCount === b.removedCount
|
|
4383
|
+
}
|
|
4157
4384
|
);
|
|
4158
4385
|
const unsavedTracking = createMemo10(() => {
|
|
4159
4386
|
const parts = changeTrackingParts;
|
|
@@ -4167,11 +4394,14 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4167
4394
|
trackedColumns: changeTracker.getTrackedColumns(),
|
|
4168
4395
|
describeCell: (column, row, savedValue) => parts.describeUnsavedCell(column, row, savedValue, texts),
|
|
4169
4396
|
rowDescription: texts.unsavedRow,
|
|
4170
|
-
closedTreeDescription: texts.unsavedInClosedTreeRow
|
|
4397
|
+
closedTreeDescription: texts.unsavedInClosedTreeRow,
|
|
4398
|
+
// 追加(1.10.0): グリッドで足した行(行を追っているときだけ)。
|
|
4399
|
+
isAddedRow: trackRowChanges() ? changeTracker.isAddedRow : void 0,
|
|
4400
|
+
addedRowDescription: texts.unsavedAddedRow
|
|
4171
4401
|
};
|
|
4172
4402
|
});
|
|
4173
4403
|
const closedTreeUnsaved = createMemo10(
|
|
4174
|
-
() => changeTrackingActive() && treeStage() && changeSnapshot().rowCount > 0 ? engine.rowPipeline.getClosedTreeAncestorKeys(treeOpenState(), changeTracker.getUnsavedRowKeys()) : null
|
|
4404
|
+
() => changeTrackingActive() && treeStage() && (changeSnapshot().rowCount > 0 || changeSnapshot().addedCount > 0) ? engine.rowPipeline.getClosedTreeAncestorKeys(treeOpenState(), changeTracker.getUnsavedRowKeys()) : null
|
|
4175
4405
|
);
|
|
4176
4406
|
const resolveRevertItems = () => {
|
|
4177
4407
|
const parts = changeTrackingParts;
|
|
@@ -4195,9 +4425,44 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4195
4425
|
});
|
|
4196
4426
|
};
|
|
4197
4427
|
const handleRowsChange = () => props.onRowsChange ? history.handleRowsChange : void 0;
|
|
4428
|
+
connectController(engine.newRow, () => {
|
|
4429
|
+
rowModel();
|
|
4430
|
+
void ui().activeCell;
|
|
4431
|
+
void ui().editingCell;
|
|
4432
|
+
return {
|
|
4433
|
+
active: newRowActive(),
|
|
4434
|
+
rows: rows(),
|
|
4435
|
+
createRow: props.createRow,
|
|
4436
|
+
rowKeyGetter: props.rowKeyGetter,
|
|
4437
|
+
handleRowsChange: handleRowsChange(),
|
|
4438
|
+
getUiState: store.getState,
|
|
4439
|
+
dispatch,
|
|
4440
|
+
getViewState: store.getViewState,
|
|
4441
|
+
setViewState: store.setViewState,
|
|
4442
|
+
gridRootRef,
|
|
4443
|
+
scrollContainerRef
|
|
4444
|
+
};
|
|
4445
|
+
}, "render", "newRow");
|
|
4446
|
+
connectController(
|
|
4447
|
+
{ update: (args) => engine.newRow.notifyDraft(args.callback) },
|
|
4448
|
+
() => {
|
|
4449
|
+
newRowDraft();
|
|
4450
|
+
const option = props.newRow;
|
|
4451
|
+
return { callback: inOwnTick(typeof option === "object" ? option.onDraftChange : void 0) };
|
|
4452
|
+
},
|
|
4453
|
+
"effect",
|
|
4454
|
+
"newRowDraftNotifier"
|
|
4455
|
+
);
|
|
4198
4456
|
const cells = createCellCommands();
|
|
4199
4457
|
const { selectEntireGrid, clearSelectedCells, tryStartEdit: tryStartEditCell } = cells;
|
|
4200
4458
|
const orderedColumnKeys = createMemo10(() => orderedColumns().map((column) => column.key).join("\0"));
|
|
4459
|
+
const resolvedExcelShortcuts = createMemo10(() => resolveExcelShortcuts2(props.excelShortcuts));
|
|
4460
|
+
const excelShortcutCommandsEnabled = createMemo10(
|
|
4461
|
+
() => features.excelShortcuts !== void 0 && usesExcelShortcutCommands2(resolvedExcelShortcuts())
|
|
4462
|
+
);
|
|
4463
|
+
const fillSelectionEnabled = createMemo10(
|
|
4464
|
+
() => features.excelShortcuts !== void 0 && resolvedExcelShortcuts().fillSelection
|
|
4465
|
+
);
|
|
4201
4466
|
const clipboard = createClipboardController();
|
|
4202
4467
|
connectController(clipboard, () => ({
|
|
4203
4468
|
rows: rows(),
|
|
@@ -4210,7 +4475,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4210
4475
|
readOnly: editLocked(),
|
|
4211
4476
|
canEditCell: canEditCell(),
|
|
4212
4477
|
rowKeyGetter: resolvedRowKeyGetter(),
|
|
4213
|
-
|
|
4478
|
+
// 変更(1.10.0 / Excel のキー): 切り取りのときは元のセルの控え(cut)も入れます。
|
|
4479
|
+
onCopied: (selection, cut) => {
|
|
4214
4480
|
const state = store.getState();
|
|
4215
4481
|
store.setViewState({
|
|
4216
4482
|
copiedRange: {
|
|
@@ -4221,10 +4487,24 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4221
4487
|
collapsedGroupKeys: state.collapsedGroupKeys,
|
|
4222
4488
|
viewRowCount: untrack13(viewRowCount),
|
|
4223
4489
|
columns: untrack13(orderedColumnKeys)
|
|
4224
|
-
}
|
|
4490
|
+
},
|
|
4491
|
+
...cut === void 0 ? {} : { cut }
|
|
4225
4492
|
}
|
|
4226
4493
|
});
|
|
4227
4494
|
},
|
|
4495
|
+
// 追加(1.10.0 / Excel のキー): 切り取りが生きているか(点線を描く条件と同じ = 今の見え方のまま)。
|
|
4496
|
+
getLiveCopiedRange: () => {
|
|
4497
|
+
const copied = store.getViewState().copiedRange;
|
|
4498
|
+
const state = store.getState();
|
|
4499
|
+
return copied !== null && isCopiedRangeCurrent(copied, {
|
|
4500
|
+
sort: state.sort,
|
|
4501
|
+
filters: state.filters,
|
|
4502
|
+
collapsedGroupKeys: state.collapsedGroupKeys,
|
|
4503
|
+
viewRowCount: untrack13(viewRowCount),
|
|
4504
|
+
columns: untrack13(orderedColumnKeys)
|
|
4505
|
+
}) ? copied : null;
|
|
4506
|
+
},
|
|
4507
|
+
onCutPasted: () => store.setViewState({ copiedRange: null }),
|
|
4228
4508
|
createRow: props.createRow,
|
|
4229
4509
|
createOverflowColumn: props.createOverflowColumn,
|
|
4230
4510
|
onPasteSkipped: inOwnTick(props.onPasteSkipped),
|
|
@@ -4237,7 +4517,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4237
4517
|
dispatch
|
|
4238
4518
|
}), "render", "clipboard");
|
|
4239
4519
|
const isWholeGridSelected = createMemo10(
|
|
4240
|
-
() => computeIsWholeGridSelected(ui().selection,
|
|
4520
|
+
() => computeIsWholeGridSelected(ui().selection, getSelectableRowCount(rowModel()), visibleColumns().length)
|
|
4241
4521
|
);
|
|
4242
4522
|
const fillHandleFeature2 = features.fillHandle;
|
|
4243
4523
|
const fill = fillHandleFeature2?.createFillHandle({
|
|
@@ -4348,7 +4628,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4348
4628
|
const openColumnMenuForCell = (col) => {
|
|
4349
4629
|
const column = untrack13(orderedColumns)[col];
|
|
4350
4630
|
const root = gridRootRef.current;
|
|
4351
|
-
if (!columnMenu || !column || !root ||
|
|
4631
|
+
if (!columnMenu || !column || !root || isSyntheticColumnKey3(column.key)) {
|
|
4352
4632
|
return false;
|
|
4353
4633
|
}
|
|
4354
4634
|
const header = Array.from(root.querySelectorAll(".ssg-header-cell[data-ssg-col-key]")).find(
|
|
@@ -4524,6 +4804,12 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4524
4804
|
setEditorInitialValue,
|
|
4525
4805
|
dispatch,
|
|
4526
4806
|
handleCopy: clipboard.handleCopy,
|
|
4807
|
+
// 追加(1.10.0 / Excel のキー): Ctrl / ⌘ + X の切り取り(excelShortcuts で外したときは渡さない)と、ほかの 6 つ(機能)。
|
|
4808
|
+
handleCut: resolvedExcelShortcuts().cut ? clipboard.handleCut : void 0,
|
|
4809
|
+
// 追加(1.10.0 / 入力行): 編集していない入力行の Escape は下書きを捨てる。
|
|
4810
|
+
onEscapeNewRow: newRowActive() ? engine.newRow.discardAt : void 0,
|
|
4811
|
+
onTabPastNewRowDraft: newRowActive() ? engine.newRow.commitFromLastColumn : void 0,
|
|
4812
|
+
onShortcutKeyDown: excelShortcutCommandsEnabled() ? engine.excelShortcuts.handleKeyDown : void 0,
|
|
4527
4813
|
openFind: findShortcut() ? openFindFromShortcut : void 0,
|
|
4528
4814
|
handleCellDoubleClick: tryStartEditCell,
|
|
4529
4815
|
isWholeGridSelected: isWholeGridSelected(),
|
|
@@ -4576,6 +4862,22 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4576
4862
|
startEditWithValue: edit.startEditWithValue,
|
|
4577
4863
|
dispatch
|
|
4578
4864
|
}), "render", "cells");
|
|
4865
|
+
connectController(engine.excelShortcuts, () => ({
|
|
4866
|
+
rows: rows(),
|
|
4867
|
+
rowModel: rowModel(),
|
|
4868
|
+
orderedColumns: orderedColumns(),
|
|
4869
|
+
uiState: ui(),
|
|
4870
|
+
getUiState: store.getState,
|
|
4871
|
+
readOnly: editLocked(),
|
|
4872
|
+
canEditCell: canEditCell(),
|
|
4873
|
+
handleRowsChange: handleRowsChange(),
|
|
4874
|
+
applyServerSideCellEdits: applyServerSideCellEdits(),
|
|
4875
|
+
dispatch,
|
|
4876
|
+
shortcuts: resolvedExcelShortcuts(),
|
|
4877
|
+
localeTexts: localeTexts(),
|
|
4878
|
+
commitEdit: (value) => edit.commitEdit(value),
|
|
4879
|
+
endEdit: edit.cancelEdit
|
|
4880
|
+
}), "render", "excelShortcuts");
|
|
4579
4881
|
const imeDirectInputEnabled = createMemo10(() => (props.imeDirectInput ?? false) && imeFeature !== void 0);
|
|
4580
4882
|
connectController(
|
|
4581
4883
|
engine.imeInput,
|
|
@@ -4714,7 +5016,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4714
5016
|
return tree && columnGroupsFeature2 ? columnGroupsFeature2.createColumnChooserDropClamp(tree, columns()) : void 0;
|
|
4715
5017
|
});
|
|
4716
5018
|
const sortManagerColumns = createMemo10(
|
|
4717
|
-
() => [...visibleColumns(), ...activeGroupColumns()].filter((column) => !
|
|
5019
|
+
() => [...visibleColumns(), ...activeGroupColumns()].filter((column) => !isSyntheticColumnKey3(column.key)).map((column) => ({ key: column.key, title: columnTitles()?.get(column.key) ?? (column.title || column.key) }))
|
|
4718
5020
|
);
|
|
4719
5021
|
const showGlobalFilterRow = () => globalFilterEnabled() && globalFilterText().trim().length > 0;
|
|
4720
5022
|
const toolPanelTabs = createMemo10(
|
|
@@ -4889,12 +5191,12 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4889
5191
|
hasRowKeys: () => props.rowKeyGetter !== void 0,
|
|
4890
5192
|
dragRowLabel: () => localeTexts().dragRowLabel
|
|
4891
5193
|
});
|
|
4892
|
-
const renderRowDropIndicator = (pane, cap) => rowDrag ? <
|
|
5194
|
+
const renderRowDropIndicator = (pane, cap) => rowDrag ? <Show12 when={rowDragAvailable()}>
|
|
4893
5195
|
<div
|
|
4894
5196
|
ref={(element) => rowDrag.setIndicator(pane, element)}
|
|
4895
5197
|
class={["ssg-row-drop-indicator", { "ssg-row-drop-indicator--cap": cap() }]}
|
|
4896
5198
|
/>
|
|
4897
|
-
</
|
|
5199
|
+
</Show12> : null;
|
|
4898
5200
|
const handleCornerHeaderPointerDown = (event) => {
|
|
4899
5201
|
event.preventDefault();
|
|
4900
5202
|
if (event.button !== 0) {
|
|
@@ -4938,6 +5240,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4938
5240
|
connectController(engine.gridApi, () => ({
|
|
4939
5241
|
scrollContainerRef,
|
|
4940
5242
|
dispatch,
|
|
5243
|
+
// 追加(1.10.0 / 入力行): focusNewRow() が移る最初の編集できる列を決める。
|
|
5244
|
+
readOnly: editLocked(),
|
|
4941
5245
|
rowModel: rowModel(),
|
|
4942
5246
|
viewRowCount: viewRowCount(),
|
|
4943
5247
|
leafRowCount: leafRowCount(),
|
|
@@ -5172,10 +5476,10 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5172
5476
|
});
|
|
5173
5477
|
const showTopBarSummary = () => props.showTopBarSummary ?? true;
|
|
5174
5478
|
const showTopBarFilter = () => (props.showTopBarFilter ?? true) && globalFilterEnabled();
|
|
5175
|
-
const topBar = () => <
|
|
5176
|
-
<
|
|
5479
|
+
const topBar = () => <Show12 when={props.showTopBar ?? true}>
|
|
5480
|
+
<Show12
|
|
5177
5481
|
when={renderTopBarFn() !== void 0}
|
|
5178
|
-
fallback={<
|
|
5482
|
+
fallback={<Show12 when={showTopBarSummary() || showTopBarFilter()}>
|
|
5179
5483
|
<DefaultGridTopBar
|
|
5180
5484
|
slot={slots().toolbar}
|
|
5181
5485
|
derivedSummary={derivedSummary()}
|
|
@@ -5189,13 +5493,13 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5189
5493
|
onFilterSummaryClick={columnFilterEnabled() && toolPanel ? toggleFilterManager : void 0}
|
|
5190
5494
|
filterPanelOpen={toolPanel?.activeTab() === "filter"}
|
|
5191
5495
|
/>
|
|
5192
|
-
</
|
|
5496
|
+
</Show12>}
|
|
5193
5497
|
>
|
|
5194
5498
|
{customTopBar()}
|
|
5195
|
-
</
|
|
5196
|
-
</
|
|
5197
|
-
const bottomBar = () => <
|
|
5198
|
-
<
|
|
5499
|
+
</Show12>
|
|
5500
|
+
</Show12>;
|
|
5501
|
+
const bottomBar = () => <Show12 when={props.showBottomBar ?? true}>
|
|
5502
|
+
<Show12
|
|
5199
5503
|
when={renderBottomBarFn() !== void 0}
|
|
5200
5504
|
fallback={<DefaultGridBottomBar
|
|
5201
5505
|
slot={slots().statusBar}
|
|
@@ -5207,15 +5511,16 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5207
5511
|
/>}
|
|
5208
5512
|
>
|
|
5209
5513
|
{customBottomBar()}
|
|
5210
|
-
</
|
|
5211
|
-
</
|
|
5514
|
+
</Show12>
|
|
5515
|
+
</Show12>;
|
|
5212
5516
|
const editorSession = createMemo10((previous) => {
|
|
5213
5517
|
const cell = ui().editingCell;
|
|
5214
5518
|
if (cell === null) {
|
|
5215
5519
|
return null;
|
|
5216
5520
|
}
|
|
5217
5521
|
const model = rowModel();
|
|
5218
|
-
|
|
5522
|
+
newRowDraft();
|
|
5523
|
+
if (peekEditRow(model, cell.row) === void 0) {
|
|
5219
5524
|
return previous ?? { id: 1, identity: null };
|
|
5220
5525
|
}
|
|
5221
5526
|
const identity = {
|
|
@@ -5249,15 +5554,17 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5249
5554
|
}
|
|
5250
5555
|
const column = orderedColumns()[cell.col];
|
|
5251
5556
|
const model = rowModel();
|
|
5252
|
-
|
|
5557
|
+
newRowDraft();
|
|
5558
|
+
const row = peekEditRow(model, cell.row);
|
|
5253
5559
|
if (!column || !row) {
|
|
5254
5560
|
return null;
|
|
5255
5561
|
}
|
|
5562
|
+
const { sourceRowIndex, rowKey } = resolveCanEditCellContext(model, cell.row);
|
|
5256
5563
|
return {
|
|
5257
5564
|
row,
|
|
5258
5565
|
rowIndex: cell.row,
|
|
5259
|
-
sourceRowIndex
|
|
5260
|
-
rowKey
|
|
5566
|
+
sourceRowIndex,
|
|
5567
|
+
rowKey,
|
|
5261
5568
|
colIndex: cell.col,
|
|
5262
5569
|
column,
|
|
5263
5570
|
value: getCellValue2(row, column)
|
|
@@ -5292,13 +5599,13 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5292
5599
|
const isRowDraggable = props.isRowDraggable;
|
|
5293
5600
|
return !isRowDraggable || isRowDraggable(row, { rowKey: cell.rowKey, sourceRowIndex: cell.sourceRowIndex });
|
|
5294
5601
|
});
|
|
5295
|
-
return <
|
|
5602
|
+
return <Show12 when={draggable()}>
|
|
5296
5603
|
<RowDragHandle2
|
|
5297
5604
|
operable={rowDragOperable()}
|
|
5298
5605
|
tooltip={rowDragOperable() ? rowDragTexts().dragRow : rowDragTexts().dragRowDisabled}
|
|
5299
5606
|
onPointerDown={(event) => rowDrag.onRowDragHandlePointerDown(untrack13(() => cell.rowIndex), event)}
|
|
5300
5607
|
/>
|
|
5301
|
-
</
|
|
5608
|
+
</Show12>;
|
|
5302
5609
|
};
|
|
5303
5610
|
const cellTextOf = (row, column) => {
|
|
5304
5611
|
const value = getCellValue2(row, column);
|
|
@@ -5354,9 +5661,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5354
5661
|
const indexes = labelViewIndexes();
|
|
5355
5662
|
return indexes ? resolveDataRowNumber2(indexes, cell.rowIndex) : cell.rowIndex + 1;
|
|
5356
5663
|
};
|
|
5357
|
-
return <
|
|
5664
|
+
return <Show12 when={expandable()}>
|
|
5358
5665
|
<DetailToggleButton detail={detail} rowNumber={rowNumber()} onPress={edit.endEditLeftOpen} />
|
|
5359
|
-
</
|
|
5666
|
+
</Show12>;
|
|
5360
5667
|
}
|
|
5361
5668
|
const context = {
|
|
5362
5669
|
get row() {
|
|
@@ -5453,9 +5760,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5453
5760
|
}
|
|
5454
5761
|
})
|
|
5455
5762
|
);
|
|
5456
|
-
return <
|
|
5763
|
+
return <Show12 when={chip()} fallback={<span class="ssg-cell-value">{highlightCellFind(text)}</span>}>
|
|
5457
5764
|
{(spec) => <GridChip2 spec={spec()}>{highlightCellFind(spec().label ?? text)}</GridChip2>}
|
|
5458
|
-
</
|
|
5765
|
+
</Show12>;
|
|
5459
5766
|
}
|
|
5460
5767
|
return <span class="ssg-cell-value">{highlightCellFind(textOf(currentRow()))}</span>;
|
|
5461
5768
|
};
|
|
@@ -5474,9 +5781,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5474
5781
|
const value = createMemo10(() => cell.treeRow?.aggregates?.[column.key]);
|
|
5475
5782
|
const aggregate = { has, value };
|
|
5476
5783
|
const TreeAggregateValue = parts.TreeAggregateValue;
|
|
5477
|
-
content = column.renderCell ? renderDefaultCellContent(currentRow, column, cell, aggregate) : <
|
|
5784
|
+
content = column.renderCell ? renderDefaultCellContent(currentRow, column, cell, aggregate) : <Show12 when={has()} fallback={renderDefaultCellContent(currentRow, column, cell)}>
|
|
5478
5785
|
<TreeAggregateValue column={column} value={value()} />
|
|
5479
|
-
</
|
|
5786
|
+
</Show12>;
|
|
5480
5787
|
} else {
|
|
5481
5788
|
content = renderDefaultCellContent(currentRow, column, cell);
|
|
5482
5789
|
}
|
|
@@ -5486,7 +5793,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5486
5793
|
const TreeCellPrefix = parts.TreeCellPrefix;
|
|
5487
5794
|
const rowLabel = () => cellTextOf(currentRow(), column);
|
|
5488
5795
|
return <>
|
|
5489
|
-
<
|
|
5796
|
+
<Show12 when={cell.treeRow}>
|
|
5490
5797
|
{(tree) => <TreeCellPrefix
|
|
5491
5798
|
level={tree().level}
|
|
5492
5799
|
hasChildren={tree().hasChildren}
|
|
@@ -5496,7 +5803,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5496
5803
|
onToggle={(open) => engine.gridApi.handle.setTreeRowOpen(cell.rowKey, open)}
|
|
5497
5804
|
onPress={edit.endEditLeftOpen}
|
|
5498
5805
|
/>}
|
|
5499
|
-
</
|
|
5806
|
+
</Show12>
|
|
5500
5807
|
{content}
|
|
5501
5808
|
</>;
|
|
5502
5809
|
};
|
|
@@ -5524,7 +5831,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5524
5831
|
const activeRect = () => placementRectInPane(activeCellPlacement(), pane);
|
|
5525
5832
|
const editorRect = () => placementRectInPane(editingCellPlacement(), pane);
|
|
5526
5833
|
const clearHoveredRow = () => applyHoveredRowChange(null);
|
|
5527
|
-
const renderPinnedRows = (position) => PinnedRows ? <
|
|
5834
|
+
const renderPinnedRows = (position) => PinnedRows ? <Show12 when={position === "top" ? pinnedTop() : pinnedBottom()}>
|
|
5528
5835
|
{(pinnedRows) => <PinnedRows
|
|
5529
5836
|
pane={pane}
|
|
5530
5837
|
position={position}
|
|
@@ -5545,8 +5852,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5545
5852
|
slots={slots()}
|
|
5546
5853
|
onPointerEnter={clearHoveredRow}
|
|
5547
5854
|
/>}
|
|
5548
|
-
</
|
|
5549
|
-
const renderTotalRow = () => TotalRow ? <
|
|
5855
|
+
</Show12> : null;
|
|
5856
|
+
const renderTotalRow = () => TotalRow ? <Show12 when={totalRowEnabled()}>
|
|
5550
5857
|
<TotalRow
|
|
5551
5858
|
pane={pane}
|
|
5552
5859
|
ownsRowHeader={ownsRowHeader()}
|
|
@@ -5566,7 +5873,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5566
5873
|
slots={slots()}
|
|
5567
5874
|
onPointerEnter={clearHoveredRow}
|
|
5568
5875
|
/>
|
|
5569
|
-
</
|
|
5876
|
+
</Show12> : null;
|
|
5570
5877
|
return <div
|
|
5571
5878
|
style={{
|
|
5572
5879
|
position: "relative",
|
|
@@ -5580,7 +5887,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5580
5887
|
{
|
|
5581
5888
|
/* 列のグループの段(1.6.0。列見出しの行の前の sticky の器)。 */
|
|
5582
5889
|
}
|
|
5583
|
-
{ColumnGroupHeader ? <
|
|
5890
|
+
{ColumnGroupHeader ? <Show12 when={columnGroupTree()}>
|
|
5584
5891
|
{(tree) => <ColumnGroupHeader
|
|
5585
5892
|
pane={pane}
|
|
5586
5893
|
tree={tree()}
|
|
@@ -5599,7 +5906,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5599
5906
|
onResizePointerDown={columnCommands.handleColumnGroupResizePointerDown}
|
|
5600
5907
|
onGripPointerDown={columnGroupDragHandler()}
|
|
5601
5908
|
/>}
|
|
5602
|
-
</
|
|
5909
|
+
</Show12> : null}
|
|
5603
5910
|
<GridHeaderRow
|
|
5604
5911
|
pane={pane}
|
|
5605
5912
|
ownsRowHeader={ownsRowHeader()}
|
|
@@ -5675,20 +5982,20 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5675
5982
|
headerHeight={headerHeight()}
|
|
5676
5983
|
leadingWidth={leadingWidth()}
|
|
5677
5984
|
baseOffset={vertical().overlayBaseOffset}
|
|
5985
|
+
/>}
|
|
5986
|
+
</For5>
|
|
5987
|
+
<For5 each={copyRectsForPane(pane)} keyed={false}>
|
|
5988
|
+
{(rect) => <CopyRangeOverlay
|
|
5989
|
+
slot={slots().copyRangeOverlay}
|
|
5990
|
+
rect={rect()}
|
|
5991
|
+
headerHeight={headerHeight()}
|
|
5992
|
+
leadingWidth={leadingWidth()}
|
|
5993
|
+
baseOffset={vertical().overlayBaseOffset}
|
|
5678
5994
|
/>}
|
|
5679
5995
|
</For5>
|
|
5680
5996
|
{motionExtrasFeature2 ? (() => {
|
|
5681
|
-
const {
|
|
5997
|
+
const { ColumnHoverOverlay: ColumnHoverOverlay2 } = motionExtrasFeature2;
|
|
5682
5998
|
return <>
|
|
5683
|
-
<For5 each={copyRectsForPane(pane)} keyed={false}>
|
|
5684
|
-
{(rect) => <CopyRangeOverlay2
|
|
5685
|
-
slot={slots().copyRangeOverlay}
|
|
5686
|
-
rect={rect()}
|
|
5687
|
-
headerHeight={headerHeight()}
|
|
5688
|
-
leadingWidth={leadingWidth()}
|
|
5689
|
-
baseOffset={vertical().overlayBaseOffset}
|
|
5690
|
-
/>}
|
|
5691
|
-
</For5>
|
|
5692
5999
|
<ColumnHoverOverlay2
|
|
5693
6000
|
rect={columnHoverRectForPane(pane)}
|
|
5694
6001
|
headerHeight={headerHeight()}
|
|
@@ -5729,6 +6036,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5729
6036
|
onCommit={(value, direction, option, forwardText) => edit.commitEdit(value, direction, option, forwardText)}
|
|
5730
6037
|
SearchSelectEditor={features.selectSearch?.SearchSelectCellEditor}
|
|
5731
6038
|
onCancel={edit.cancelEdit}
|
|
6039
|
+
onCommitToSelection={fillSelectionEnabled() ? engine.excelShortcuts.commitToSelection : void 0}
|
|
5732
6040
|
onRegisterFlush={edit.registerDraftFlush}
|
|
5733
6041
|
onRegisterLateCommit={edit.registerLateCommitReceiver}
|
|
5734
6042
|
align={editingColumn()?.align}
|
|
@@ -5756,6 +6064,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5756
6064
|
labelRowLayer={pane === "center" ? labelRowLayerCenter() : labelRowLayerBand()}
|
|
5757
6065
|
skeletonRow={isServerSide() ? serverSideFeature2?.BodySkeletonRow : void 0}
|
|
5758
6066
|
labelViewIndexes={labelViewIndexes()}
|
|
6067
|
+
newRowLayer={newRowLayer()}
|
|
6068
|
+
newRowDraft={newRowDraft()}
|
|
5759
6069
|
rowHeaderWidth={rowHeaderWidth()}
|
|
5760
6070
|
rows={bodyRows()}
|
|
5761
6071
|
entries={entries()}
|
|
@@ -5810,10 +6120,10 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5810
6120
|
{
|
|
5811
6121
|
/* 下端の行(本体ぶんの空きの直後 = 箱の下端の sticky の行)。既定は下の固定行 → 合計行、'belowTotal' は合計行 → 固定行。 */
|
|
5812
6122
|
}
|
|
5813
|
-
<
|
|
6123
|
+
<Show12 when={pinnedBelowTotal()} fallback={[renderPinnedRows("bottom"), renderTotalRow()]}>
|
|
5814
6124
|
{renderTotalRow()}
|
|
5815
6125
|
{renderPinnedRows("bottom")}
|
|
5816
|
-
</
|
|
6126
|
+
</Show12>
|
|
5817
6127
|
{
|
|
5818
6128
|
/* 中央ペインのドロップの縦線(左右のペインは、固定列が 0 本でも線を出せるよう外側の器に置く。React 版と同じ)。 */
|
|
5819
6129
|
}
|
|
@@ -5861,7 +6171,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5861
6171
|
{
|
|
5862
6172
|
/* フィルターのチップのバー(showFilterChipBar)。適用中の列フィルターをチップで並べる(0 件なら出さない)。 */
|
|
5863
6173
|
}
|
|
5864
|
-
{filterManagement && filteringFeature2 ? <
|
|
6174
|
+
{filterManagement && filteringFeature2 ? <Show12 when={props.showFilterChipBar}>
|
|
5865
6175
|
<filteringFeature2.FilterChipBar
|
|
5866
6176
|
slot={slots().filterChipBar}
|
|
5867
6177
|
entries={filterManagement.entries()}
|
|
@@ -5870,7 +6180,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5870
6180
|
onClearFilter={columnCommands.handleFilterManagerClearFilter}
|
|
5871
6181
|
onClearAllFilters={columnCommands.handleFilterManagerClearAll}
|
|
5872
6182
|
/>
|
|
5873
|
-
</
|
|
6183
|
+
</Show12> : null}
|
|
5874
6184
|
<div
|
|
5875
6185
|
ref={(element) => {
|
|
5876
6186
|
gridRootRef.current = element;
|
|
@@ -5949,7 +6259,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5949
6259
|
}}
|
|
5950
6260
|
style={pinnedPaneStyle("left", paneResolution().leftPaneTotalWidth, paneLayout().left.entries.length > 0)}
|
|
5951
6261
|
>
|
|
5952
|
-
<
|
|
6262
|
+
<Show12 when={paneResolution().hasLeftPane}>
|
|
5953
6263
|
{renderPane(
|
|
5954
6264
|
"left",
|
|
5955
6265
|
() => paneResolution().leftPaneTotalWidth,
|
|
@@ -5957,7 +6267,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5957
6267
|
() => true,
|
|
5958
6268
|
() => paneLayout().left.entries
|
|
5959
6269
|
)}
|
|
5960
|
-
</
|
|
6270
|
+
</Show12>
|
|
5961
6271
|
{renderColumnDropIndicator("left")}
|
|
5962
6272
|
</div>
|
|
5963
6273
|
<div
|
|
@@ -5984,7 +6294,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5984
6294
|
}}
|
|
5985
6295
|
style={pinnedPaneStyle("right", paneResolution().rightPaneTotalWidth, paneLayout().right.entries.length > 0)}
|
|
5986
6296
|
>
|
|
5987
|
-
<
|
|
6297
|
+
<Show12 when={paneResolution().hasRightPane}>
|
|
5988
6298
|
{renderPane(
|
|
5989
6299
|
"right",
|
|
5990
6300
|
() => paneResolution().rightPaneTotalWidth,
|
|
@@ -5992,15 +6302,15 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5992
6302
|
() => false,
|
|
5993
6303
|
() => paneLayout().right.entries
|
|
5994
6304
|
)}
|
|
5995
|
-
</
|
|
6305
|
+
</Show12>
|
|
5996
6306
|
{renderColumnDropIndicator("right")}
|
|
5997
6307
|
</div>
|
|
5998
6308
|
</div>
|
|
5999
|
-
<
|
|
6309
|
+
<Show12 when={viewRowCount() === 0 && hydrated()}>
|
|
6000
6310
|
<div class={["ssg-empty-state", slots().emptyState?.className]} style={slots().emptyState?.style}>
|
|
6001
6311
|
{emptyStateText()}
|
|
6002
6312
|
</div>
|
|
6003
|
-
</
|
|
6313
|
+
</Show12>
|
|
6004
6314
|
</div>
|
|
6005
6315
|
<span
|
|
6006
6316
|
ref={(element) => {
|
|
@@ -6011,7 +6321,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6011
6321
|
aria-hidden={hasDetailCards() ? void 0 : "true"}
|
|
6012
6322
|
onFocus={(event) => detailRows.handleTableExitFocus(event.relatedTarget)}
|
|
6013
6323
|
/>
|
|
6014
|
-
<
|
|
6324
|
+
<Show12 when={scrollHintFeature2 !== void 0 && activeScrollHint()}>
|
|
6015
6325
|
{(options) => {
|
|
6016
6326
|
const ScrollHint = scrollHintFeature2.ScrollHint;
|
|
6017
6327
|
return <ScrollHint
|
|
@@ -6028,19 +6338,19 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6028
6338
|
labelViewIndexes={labelViewIndexes()}
|
|
6029
6339
|
/>;
|
|
6030
6340
|
}}
|
|
6031
|
-
</
|
|
6341
|
+
</Show12>
|
|
6032
6342
|
{
|
|
6033
6343
|
/* 列幅の自動調整の計測中の overlay(遅れて出す。pointer-events: none で操作は素通し)。 */
|
|
6034
6344
|
}
|
|
6035
|
-
<
|
|
6345
|
+
<Show12 when={isAutosizing()}>
|
|
6036
6346
|
<div class="ssg-autosize-overlay">
|
|
6037
6347
|
<span class="ssg-autosize-pill">{localeTexts().sizingColumns}</span>
|
|
6038
6348
|
</div>
|
|
6039
|
-
</
|
|
6349
|
+
</Show12>
|
|
6040
6350
|
{
|
|
6041
6351
|
/* グローバルフィルターの適用中の overlay(しきい値を超える表の時間分割の間だけ。pointer-events: none)。 */
|
|
6042
6352
|
}
|
|
6043
|
-
<
|
|
6353
|
+
<Show12 when={globalFilterStatus() === "filtering"}>
|
|
6044
6354
|
<div class="ssg-filter-overlay">
|
|
6045
6355
|
<span class="ssg-filter-overlay-chip" role="status" aria-live="polite">
|
|
6046
6356
|
<span class="ssg-filter-spinner" aria-hidden="true" />
|
|
@@ -6049,11 +6359,11 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6049
6359
|
</span>
|
|
6050
6360
|
</span>
|
|
6051
6361
|
</div>
|
|
6052
|
-
</
|
|
6362
|
+
</Show12>
|
|
6053
6363
|
{
|
|
6054
6364
|
/* セル内検索のバー(右上に浮く。見出しの直下)。開いているときだけ描きます。 */
|
|
6055
6365
|
}
|
|
6056
|
-
<
|
|
6366
|
+
<Show12 when={findSnapshot().open}>
|
|
6057
6367
|
{FindBar && <FindBar
|
|
6058
6368
|
snapshot={findSnapshot()}
|
|
6059
6369
|
headerHeight={headerHeight()}
|
|
@@ -6063,11 +6373,11 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6063
6373
|
onClose={closeFindAndRefocus}
|
|
6064
6374
|
slot={slots().findBar}
|
|
6065
6375
|
/>}
|
|
6066
|
-
</
|
|
6376
|
+
</Show12>
|
|
6067
6377
|
{
|
|
6068
6378
|
/* サーバーサイドのエラーバー(取得の失敗の再試行 / 保存の失敗。機能 features/serverSide の部品)。 */
|
|
6069
6379
|
}
|
|
6070
|
-
{serverSide && serverSideFeature2 ? <
|
|
6380
|
+
{serverSide && serverSideFeature2 ? <Show12 when={isServerSide()}>
|
|
6071
6381
|
<serverSideFeature2.ErrorBars
|
|
6072
6382
|
loadError={serverSide.loadError()}
|
|
6073
6383
|
writeError={serverSide.writeError()}
|
|
@@ -6075,12 +6385,12 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6075
6385
|
slot={slots().errorBar}
|
|
6076
6386
|
localeTexts={localeTexts()}
|
|
6077
6387
|
/>
|
|
6078
|
-
</
|
|
6388
|
+
</Show12> : null}
|
|
6079
6389
|
{
|
|
6080
6390
|
/* 追加(1.5.0 / serverSideRefetch="keep"): 前の行を見せたまま取り直している間、本体の見えている所を薄くする面と、
|
|
6081
6391
|
列見出しの下に流れる線(大きさはスクロールバーを除いた見える範囲。測る前は CSS の left / right / bottom。React 版と同じ)。 */
|
|
6082
6392
|
}
|
|
6083
|
-
<
|
|
6393
|
+
<Show12 when={refetchingRows()}>
|
|
6084
6394
|
<div
|
|
6085
6395
|
class="ssg-refetch-veil"
|
|
6086
6396
|
aria-hidden="true"
|
|
@@ -6095,12 +6405,12 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6095
6405
|
aria-hidden="true"
|
|
6096
6406
|
style={{ top: `${headerHeight()}px`, width: viewportWidth() > 0 ? `${viewportWidth()}px` : void 0 }}
|
|
6097
6407
|
/>
|
|
6098
|
-
</
|
|
6408
|
+
</Show12>
|
|
6099
6409
|
{
|
|
6100
6410
|
/* IME オンのままの直接入力の入力受け(imeDirectInput が有効なときだけ)。値 / 位置 / 変換中の見た目はコントローラが
|
|
6101
6411
|
直接扱います。Tab の順番には入れません(タブストップはシェルのまま)。 */
|
|
6102
6412
|
}
|
|
6103
|
-
<
|
|
6413
|
+
<Show12 when={imeDirectInputEnabled()}>
|
|
6104
6414
|
<input
|
|
6105
6415
|
ref={(element) => engine.imeInput.attach(element)}
|
|
6106
6416
|
{...{ [IME_INPUT_ATTRIBUTE]: "" }}
|
|
@@ -6113,14 +6423,14 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6113
6423
|
spellcheck="false"
|
|
6114
6424
|
aria-label={localeTexts().cellInput}
|
|
6115
6425
|
/>
|
|
6116
|
-
</
|
|
6426
|
+
</Show12>
|
|
6117
6427
|
</div>
|
|
6118
6428
|
{bottomBar()}
|
|
6119
6429
|
{
|
|
6120
6430
|
/* 列メニュー(グリッドの外のポップアップ)。 */
|
|
6121
6431
|
}
|
|
6122
|
-
{columnMenu && columnMenuFeature2 ? <
|
|
6123
|
-
{(column) => <
|
|
6432
|
+
{columnMenu && columnMenuFeature2 ? <Show12 when={columnMenu.openedColumn()}>
|
|
6433
|
+
{(column) => <Show12 when={columnMenu.layout()}>
|
|
6124
6434
|
{(layout) => <columnMenuFeature2.ColumnMenuPopover
|
|
6125
6435
|
slots={slots()}
|
|
6126
6436
|
themeClassName={portalClassName()}
|
|
@@ -6148,7 +6458,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6148
6458
|
// 表に出ている最後のデータ列は出さない(自動グループ列だけが残ると列メニューが無くなり、「グループ化を外す」へ
|
|
6149
6459
|
// 戻れない。React 版と同じ)。
|
|
6150
6460
|
columnMenuGroupingAvailable() && column().aggFunc == null && column().rowGroup !== true && visibleColumns().some(
|
|
6151
|
-
(candidate) => candidate.key !== column().key && candidate.rowGroup !== true && !
|
|
6461
|
+
(candidate) => candidate.key !== column().key && candidate.rowGroup !== true && !isSyntheticColumnKey3(candidate.key)
|
|
6152
6462
|
) ? () => columnCommands.handleColumnMenuGroupBy(column().key) : void 0
|
|
6153
6463
|
}
|
|
6154
6464
|
onUngroup={columnMenuGroupingAvailable() && rowGroupingActive() ? columnCommands.handleColumnMenuUngroup : void 0}
|
|
@@ -6169,8 +6479,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6169
6479
|
}}
|
|
6170
6480
|
onRequestClose={columnMenu.close}
|
|
6171
6481
|
/>}
|
|
6172
|
-
</
|
|
6173
|
-
</
|
|
6482
|
+
</Show12>}
|
|
6483
|
+
</Show12> : null}
|
|
6174
6484
|
{
|
|
6175
6485
|
/* 列フィルターのポップオーバー(グリッドの外のポップアップ。閉じている間は何も描かない)。 */
|
|
6176
6486
|
}
|
|
@@ -6193,9 +6503,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6193
6503
|
/* ツールパネル(グリッドの外のポップアップ。開いている間だけ描く)。タブを切り替えると中身を作り直す(タブの中の検索の
|
|
6194
6504
|
文字などは戻る。React 版と同じ)。 */
|
|
6195
6505
|
}
|
|
6196
|
-
{toolPanel && toolPanelViews ? <
|
|
6197
|
-
{(tab) => <
|
|
6198
|
-
{(layout) => <
|
|
6506
|
+
{toolPanel && toolPanelViews ? <Show12 when={toolPanel.activeTab()}>
|
|
6507
|
+
{(tab) => <Show12 when={toolPanel.layout()}>
|
|
6508
|
+
{(layout) => <Show12 when={toolPanelViews()}>
|
|
6199
6509
|
{(views) => {
|
|
6200
6510
|
const { ToolPanel, FilterManagementPanel, ColumnChooserPanel, SortManagementPanel } = untrack13(views);
|
|
6201
6511
|
return <ToolPanel
|
|
@@ -6254,13 +6564,13 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6254
6564
|
</Switch>
|
|
6255
6565
|
</ToolPanel>;
|
|
6256
6566
|
}}
|
|
6257
|
-
</
|
|
6258
|
-
</
|
|
6259
|
-
</
|
|
6567
|
+
</Show12>}
|
|
6568
|
+
</Show12>}
|
|
6569
|
+
</Show12> : null}
|
|
6260
6570
|
{
|
|
6261
6571
|
/* セル / 行番号の右クリックメニュー(グリッドの外のポップアップ)。 */
|
|
6262
6572
|
}
|
|
6263
|
-
{contextMenu && contextMenuFeature2 ? <
|
|
6573
|
+
{contextMenu && contextMenuFeature2 ? <Show12 when={contextMenuView()}>
|
|
6264
6574
|
{(open) => <contextMenuFeature2.CellContextMenuPopover
|
|
6265
6575
|
items={open().items}
|
|
6266
6576
|
layout={open().layout}
|
|
@@ -6270,7 +6580,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6270
6580
|
themeClassName={portalClassName()}
|
|
6271
6581
|
slots={slots()}
|
|
6272
6582
|
/>}
|
|
6273
|
-
</
|
|
6583
|
+
</Show12> : null}
|
|
6274
6584
|
{
|
|
6275
6585
|
/* フィルハンドルの埋めたあとのメニュー / ドラッグ中の値のツールチップ(グリッドの外のポップアップ)。 */
|
|
6276
6586
|
}
|
|
@@ -6363,7 +6673,7 @@ import {
|
|
|
6363
6673
|
import { DEFAULT_COLUMN_GROUPS_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
6364
6674
|
|
|
6365
6675
|
// src/view/GridColumnGroupHeader.tsx
|
|
6366
|
-
import { For as For6, Show as
|
|
6676
|
+
import { For as For6, Show as Show13, createMemo as createMemo11 } from "solid-js";
|
|
6367
6677
|
import {
|
|
6368
6678
|
createColumnGroupResize,
|
|
6369
6679
|
resolveColumnGroupCells
|
|
@@ -6485,7 +6795,7 @@ function GridColumnGroupHeader(props) {
|
|
|
6485
6795
|
>
|
|
6486
6796
|
{definition().renderHeader ? definition().renderHeader?.(context) : title()}
|
|
6487
6797
|
</span>
|
|
6488
|
-
<
|
|
6798
|
+
<Show13 when={group().collapsible}>
|
|
6489
6799
|
<button
|
|
6490
6800
|
type="button"
|
|
6491
6801
|
tabindex={-1}
|
|
@@ -6517,8 +6827,8 @@ function GridColumnGroupHeader(props) {
|
|
|
6517
6827
|
/>
|
|
6518
6828
|
</svg>
|
|
6519
6829
|
</button>
|
|
6520
|
-
</
|
|
6521
|
-
<
|
|
6830
|
+
</Show13>
|
|
6831
|
+
<Show13 when={props.onGripPointerDown}>
|
|
6522
6832
|
{(handler) => <span
|
|
6523
6833
|
aria-hidden="true"
|
|
6524
6834
|
class="ssg-header-grip ssg-col-group-grip"
|
|
@@ -6534,11 +6844,11 @@ function GridColumnGroupHeader(props) {
|
|
|
6534
6844
|
<circle cx="6" cy="11" r="1" />
|
|
6535
6845
|
</svg>
|
|
6536
6846
|
</span>}
|
|
6537
|
-
</
|
|
6847
|
+
</Show13>
|
|
6538
6848
|
</div>
|
|
6539
|
-
<
|
|
6849
|
+
<Show13 when={resize()}>
|
|
6540
6850
|
{(value) => <div class="ssg-header-resize" onPointerDown={(event) => props.onResizePointerDown(value(), event)} />}
|
|
6541
|
-
</
|
|
6851
|
+
</Show13>
|
|
6542
6852
|
</div>;
|
|
6543
6853
|
}}
|
|
6544
6854
|
</For6>
|
|
@@ -6603,7 +6913,7 @@ function createColumnMenu(inputs) {
|
|
|
6603
6913
|
}
|
|
6604
6914
|
|
|
6605
6915
|
// src/view/ColumnMenuPopover.tsx
|
|
6606
|
-
import { For as For7, Show as
|
|
6916
|
+
import { For as For7, Show as Show14, createEffect as createEffect5, createMemo as createMemo13, createSignal as createSignal10, createUniqueId as createUniqueId4, onCleanup as onCleanup9 } from "solid-js";
|
|
6607
6917
|
import { Portal as Portal2 } from "@solidjs/web";
|
|
6608
6918
|
var PINNED_ITEMS = [
|
|
6609
6919
|
{ value: void 0, label: "menuPinNone" },
|
|
@@ -6706,7 +7016,7 @@ function ColumnMenuPopover(props) {
|
|
|
6706
7016
|
props.slots?.menuItem?.className
|
|
6707
7017
|
];
|
|
6708
7018
|
const itemStyle = () => props.slots?.menuItem?.style;
|
|
6709
|
-
return <
|
|
7019
|
+
return <Show14 when={container}>
|
|
6710
7020
|
{(mount) => <Portal2 mount={mount()}>
|
|
6711
7021
|
<div
|
|
6712
7022
|
ref={(node) => {
|
|
@@ -6739,7 +7049,7 @@ function ColumnMenuPopover(props) {
|
|
|
6739
7049
|
{
|
|
6740
7050
|
/* 列のグループの開閉(1.6.0 の実アプリの点検 G5-02)。 */
|
|
6741
7051
|
}
|
|
6742
|
-
<
|
|
7052
|
+
<Show14 when={props.onToggleColumnGroup !== void 0 && (props.columnGroupToggles?.length ?? 0) > 0}>
|
|
6743
7053
|
<For7 each={props.columnGroupToggles ?? []} keyed={(toggle) => toggle.key}>
|
|
6744
7054
|
{(toggle) => <button
|
|
6745
7055
|
type="button"
|
|
@@ -6754,9 +7064,9 @@ function ColumnMenuPopover(props) {
|
|
|
6754
7064
|
</button>}
|
|
6755
7065
|
</For7>
|
|
6756
7066
|
<div role="separator" class="ssg-menu-separator" />
|
|
6757
|
-
</
|
|
7067
|
+
</Show14>
|
|
6758
7068
|
|
|
6759
|
-
<
|
|
7069
|
+
<Show14 when={props.canFilter}>
|
|
6760
7070
|
<button
|
|
6761
7071
|
type="button"
|
|
6762
7072
|
role="menuitem"
|
|
@@ -6769,9 +7079,9 @@ function ColumnMenuPopover(props) {
|
|
|
6769
7079
|
<span class="ssg-menu-label">{texts().menuFilter}</span>
|
|
6770
7080
|
</button>
|
|
6771
7081
|
<div role="separator" class="ssg-menu-separator" />
|
|
6772
|
-
</
|
|
7082
|
+
</Show14>
|
|
6773
7083
|
|
|
6774
|
-
<
|
|
7084
|
+
<Show14 when={props.canSort}>
|
|
6775
7085
|
<SortItem
|
|
6776
7086
|
direction="asc"
|
|
6777
7087
|
sortDirection={props.sortDirection}
|
|
@@ -6790,7 +7100,7 @@ function ColumnMenuPopover(props) {
|
|
|
6790
7100
|
class={itemClass()}
|
|
6791
7101
|
style={itemStyle()}
|
|
6792
7102
|
/>
|
|
6793
|
-
<
|
|
7103
|
+
<Show14 when={props.onOpenSortManager}>
|
|
6794
7104
|
{(open) => <button
|
|
6795
7105
|
type="button"
|
|
6796
7106
|
role="menuitem"
|
|
@@ -6802,10 +7112,10 @@ function ColumnMenuPopover(props) {
|
|
|
6802
7112
|
<span class="ssg-menu-icon" />
|
|
6803
7113
|
<span class="ssg-menu-label">{texts().menuManageSort}</span>
|
|
6804
7114
|
</button>}
|
|
6805
|
-
</
|
|
6806
|
-
</
|
|
7115
|
+
</Show14>
|
|
7116
|
+
</Show14>
|
|
6807
7117
|
|
|
6808
|
-
<
|
|
7118
|
+
<Show14 when={props.canManageFilters ? props.onOpenFilterManager : void 0}>
|
|
6809
7119
|
{(open) => <button
|
|
6810
7120
|
type="button"
|
|
6811
7121
|
role="menuitem"
|
|
@@ -6817,16 +7127,16 @@ function ColumnMenuPopover(props) {
|
|
|
6817
7127
|
<span class="ssg-menu-icon" />
|
|
6818
7128
|
<span class="ssg-menu-label">{texts().menuManageFilters}</span>
|
|
6819
7129
|
</button>}
|
|
6820
|
-
</
|
|
7130
|
+
</Show14>
|
|
6821
7131
|
|
|
6822
7132
|
{
|
|
6823
7133
|
/* 区切りは、並び替えの項目かフィルターを管理…のどちらかが出ているとき。 */
|
|
6824
7134
|
}
|
|
6825
|
-
<
|
|
7135
|
+
<Show14 when={props.canSort || props.canManageFilters && props.onOpenFilterManager !== void 0}>
|
|
6826
7136
|
<div role="separator" class="ssg-menu-separator" />
|
|
6827
|
-
</
|
|
7137
|
+
</Show14>
|
|
6828
7138
|
|
|
6829
|
-
<
|
|
7139
|
+
<Show14 when={props.onGroupByColumn}>
|
|
6830
7140
|
{(groupBy) => <button
|
|
6831
7141
|
type="button"
|
|
6832
7142
|
role="menuitem"
|
|
@@ -6838,8 +7148,8 @@ function ColumnMenuPopover(props) {
|
|
|
6838
7148
|
<span class="ssg-menu-icon" />
|
|
6839
7149
|
<span class="ssg-menu-label">{texts().menuGroupBy}</span>
|
|
6840
7150
|
</button>}
|
|
6841
|
-
</
|
|
6842
|
-
<
|
|
7151
|
+
</Show14>
|
|
7152
|
+
<Show14 when={props.onUngroup}>
|
|
6843
7153
|
{(ungroup) => <button
|
|
6844
7154
|
type="button"
|
|
6845
7155
|
role="menuitem"
|
|
@@ -6851,10 +7161,10 @@ function ColumnMenuPopover(props) {
|
|
|
6851
7161
|
<span class="ssg-menu-icon" />
|
|
6852
7162
|
<span class="ssg-menu-label">{texts().menuUngroup}</span>
|
|
6853
7163
|
</button>}
|
|
6854
|
-
</
|
|
6855
|
-
<
|
|
7164
|
+
</Show14>
|
|
7165
|
+
<Show14 when={props.onGroupByColumn !== void 0 || props.onUngroup !== void 0}>
|
|
6856
7166
|
<div role="separator" class="ssg-menu-separator" />
|
|
6857
|
-
</
|
|
7167
|
+
</Show14>
|
|
6858
7168
|
|
|
6859
7169
|
{
|
|
6860
7170
|
/* 列の固定 ›(小メニューはこの行 = position: relative を基準に置く。パネルの子孫なので外側の押下の判定にも入る)。 */
|
|
@@ -6915,7 +7225,7 @@ function ColumnMenuPopover(props) {
|
|
|
6915
7225
|
›
|
|
6916
7226
|
</span>
|
|
6917
7227
|
</button>
|
|
6918
|
-
<
|
|
7228
|
+
<Show14 when={isPinSubmenuOpen()}>
|
|
6919
7229
|
<div
|
|
6920
7230
|
ref={(node) => {
|
|
6921
7231
|
pinSubmenuElement = node;
|
|
@@ -6959,16 +7269,16 @@ function ColumnMenuPopover(props) {
|
|
|
6959
7269
|
</button>;
|
|
6960
7270
|
}}
|
|
6961
7271
|
</For7>
|
|
6962
|
-
<
|
|
7272
|
+
<Show14 when={!props.canChangePinned}>
|
|
6963
7273
|
<div id={pinNoteId} role="none" class="ssg-menu-note">
|
|
6964
7274
|
{texts().menuPinUnavailable}
|
|
6965
7275
|
</div>
|
|
6966
|
-
</
|
|
7276
|
+
</Show14>
|
|
6967
7277
|
</div>
|
|
6968
|
-
</
|
|
7278
|
+
</Show14>
|
|
6969
7279
|
</div>
|
|
6970
7280
|
|
|
6971
|
-
<
|
|
7281
|
+
<Show14 when={props.onAutosizeColumn && props.onAutosizeAllColumns}>
|
|
6972
7282
|
<button
|
|
6973
7283
|
type="button"
|
|
6974
7284
|
role="menuitem"
|
|
@@ -6991,9 +7301,9 @@ function ColumnMenuPopover(props) {
|
|
|
6991
7301
|
<span class="ssg-menu-icon" />
|
|
6992
7302
|
<span class="ssg-menu-label">{texts().menuAutosizeAll}</span>
|
|
6993
7303
|
</button>
|
|
6994
|
-
</
|
|
7304
|
+
</Show14>
|
|
6995
7305
|
|
|
6996
|
-
<
|
|
7306
|
+
<Show14 when={props.onOpenColumnChooser}>
|
|
6997
7307
|
{(open) => <button
|
|
6998
7308
|
type="button"
|
|
6999
7309
|
role="menuitem"
|
|
@@ -7005,7 +7315,7 @@ function ColumnMenuPopover(props) {
|
|
|
7005
7315
|
<span class="ssg-menu-icon" />
|
|
7006
7316
|
<span class="ssg-menu-label">{texts().menuColumns}</span>
|
|
7007
7317
|
</button>}
|
|
7008
|
-
</
|
|
7318
|
+
</Show14>
|
|
7009
7319
|
|
|
7010
7320
|
<button
|
|
7011
7321
|
type="button"
|
|
@@ -7033,7 +7343,7 @@ function ColumnMenuPopover(props) {
|
|
|
7033
7343
|
</div>
|
|
7034
7344
|
</div>
|
|
7035
7345
|
</Portal2>}
|
|
7036
|
-
</
|
|
7346
|
+
</Show14>;
|
|
7037
7347
|
}
|
|
7038
7348
|
function SortItem(props) {
|
|
7039
7349
|
const active = () => props.sortDirection === props.direction;
|
|
@@ -7112,7 +7422,7 @@ import {
|
|
|
7112
7422
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/conditionalFormat";
|
|
7113
7423
|
|
|
7114
7424
|
// src/view/GridChip.tsx
|
|
7115
|
-
import { Show as
|
|
7425
|
+
import { Show as Show15 } from "solid-js";
|
|
7116
7426
|
import { resolveChipTone } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/conditionalFormat";
|
|
7117
7427
|
var SVG_NOT_FOCUSABLE3 = { focusable: "false" };
|
|
7118
7428
|
var ICON_PATHS = {
|
|
@@ -7138,7 +7448,7 @@ function GridChip(props) {
|
|
|
7138
7448
|
class={["ssg-chip", custom() ? "ssg-chip--custom" : `ssg-chip--${tone()}`]}
|
|
7139
7449
|
style={custom() ? { "--ssg-cf-chip-color": props.spec.color } : void 0}
|
|
7140
7450
|
>
|
|
7141
|
-
<
|
|
7451
|
+
<Show15 when={props.spec.icon !== false}>
|
|
7142
7452
|
<span class="ssg-chip-icon" aria-hidden="true">
|
|
7143
7453
|
<svg
|
|
7144
7454
|
viewBox="0 0 12 12"
|
|
@@ -7152,7 +7462,7 @@ function GridChip(props) {
|
|
|
7152
7462
|
{ICON_PATHS[tone()]()}
|
|
7153
7463
|
</svg>
|
|
7154
7464
|
</span>
|
|
7155
|
-
</
|
|
7465
|
+
</Show15>
|
|
7156
7466
|
<span class="ssg-chip-label">{props.children}</span>
|
|
7157
7467
|
</span>;
|
|
7158
7468
|
}
|
|
@@ -7192,7 +7502,7 @@ function createCellContextMenu(inputs) {
|
|
|
7192
7502
|
}
|
|
7193
7503
|
|
|
7194
7504
|
// src/view/CellContextMenuPopover.tsx
|
|
7195
|
-
import { For as For8, Match as Match2, Show as
|
|
7505
|
+
import { For as For8, Match as Match2, Show as Show16, Switch as Switch2, createMemo as createMemo15, createSignal as createSignal11, onCleanup as onCleanup10 } from "solid-js";
|
|
7196
7506
|
import { Portal as Portal3 } from "@solidjs/web";
|
|
7197
7507
|
function CellContextMenuPopover(props) {
|
|
7198
7508
|
const portal = useGridPortal();
|
|
@@ -7205,7 +7515,7 @@ function CellContextMenuPopover(props) {
|
|
|
7205
7515
|
}
|
|
7206
7516
|
});
|
|
7207
7517
|
const layout = createMemo15(() => props.layout);
|
|
7208
|
-
const element = <
|
|
7518
|
+
const element = <Show16 when={container}>
|
|
7209
7519
|
{(mount) => <Portal3 mount={mount()}>
|
|
7210
7520
|
<div
|
|
7211
7521
|
ref={(node) => {
|
|
@@ -7266,7 +7576,7 @@ function CellContextMenuPopover(props) {
|
|
|
7266
7576
|
</For8>
|
|
7267
7577
|
</div>
|
|
7268
7578
|
</Portal3>}
|
|
7269
|
-
</
|
|
7579
|
+
</Show16>;
|
|
7270
7580
|
createPortalTokens(panel, () => props.themeClassName, layout);
|
|
7271
7581
|
return element;
|
|
7272
7582
|
}
|
|
@@ -7484,7 +7794,7 @@ function createFillHandle(inputs) {
|
|
|
7484
7794
|
}
|
|
7485
7795
|
|
|
7486
7796
|
// src/view/FillHandleLayer.tsx
|
|
7487
|
-
import { For as For9, Show as
|
|
7797
|
+
import { For as For9, Show as Show17, createEffect as createEffect7, createMemo as createMemo17, createSignal as createSignal12, onCleanup as onCleanup11 } from "solid-js";
|
|
7488
7798
|
import { Portal as Portal4 } from "@solidjs/web";
|
|
7489
7799
|
import { formatLocaleText as formatLocaleText8 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
7490
7800
|
import { getActiveElement } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/shadowDom";
|
|
@@ -7522,7 +7832,7 @@ function FillHandleLayer(props) {
|
|
|
7522
7832
|
{
|
|
7523
7833
|
/* 選択範囲の右下の四角。 */
|
|
7524
7834
|
}
|
|
7525
|
-
<
|
|
7835
|
+
<Show17 when={corner()}>
|
|
7526
7836
|
{(current) => <div
|
|
7527
7837
|
class="ssg-fill-handle"
|
|
7528
7838
|
style={{
|
|
@@ -7534,12 +7844,12 @@ function FillHandleLayer(props) {
|
|
|
7534
7844
|
aria-hidden="true"
|
|
7535
7845
|
onPointerDown={(event) => props.fill.controller.handlePointerDown(event)}
|
|
7536
7846
|
/>}
|
|
7537
|
-
</
|
|
7847
|
+
</Show17>
|
|
7538
7848
|
{
|
|
7539
7849
|
/* 埋めたあとのボタン(左上の位置)。 */
|
|
7540
7850
|
}
|
|
7541
|
-
<
|
|
7542
|
-
{(snapshot2) => <
|
|
7851
|
+
<Show17 when={filled()}>
|
|
7852
|
+
{(snapshot2) => <Show17 when={chip()}>
|
|
7543
7853
|
{(position) => <FillOptionsChip
|
|
7544
7854
|
fill={props.fill}
|
|
7545
7855
|
x={props.leadingWidth + position().x}
|
|
@@ -7547,8 +7857,8 @@ function FillHandleLayer(props) {
|
|
|
7547
7857
|
kind={snapshot2().kind}
|
|
7548
7858
|
menuOpen={snapshot2().menu !== null}
|
|
7549
7859
|
/>}
|
|
7550
|
-
</
|
|
7551
|
-
</
|
|
7860
|
+
</Show17>}
|
|
7861
|
+
</Show17>
|
|
7552
7862
|
</>;
|
|
7553
7863
|
}
|
|
7554
7864
|
function FillOptionsChip(props) {
|
|
@@ -7635,7 +7945,7 @@ function FillOptionsMenu(props) {
|
|
|
7635
7945
|
}
|
|
7636
7946
|
event.stopPropagation();
|
|
7637
7947
|
};
|
|
7638
|
-
const element = <
|
|
7948
|
+
const element = <Show17 when={container}>
|
|
7639
7949
|
{(mount) => <Portal4 mount={mount()}>
|
|
7640
7950
|
<div
|
|
7641
7951
|
ref={(node) => {
|
|
@@ -7673,7 +7983,7 @@ function FillOptionsMenu(props) {
|
|
|
7673
7983
|
</For9>
|
|
7674
7984
|
</div>
|
|
7675
7985
|
</Portal4>}
|
|
7676
|
-
</
|
|
7986
|
+
</Show17>;
|
|
7677
7987
|
createPortalTokens(panel, () => props.themeClassName, () => null);
|
|
7678
7988
|
return element;
|
|
7679
7989
|
}
|
|
@@ -7688,7 +7998,7 @@ function FillTooltip(props) {
|
|
|
7688
7998
|
const visible = createMemo17(() => pointer() !== null);
|
|
7689
7999
|
const container = createMemo17(() => visible() ? portal.container() : null);
|
|
7690
8000
|
const [tooltip, setTooltip] = createSignal12();
|
|
7691
|
-
const element = <
|
|
8001
|
+
const element = <Show17 when={container()}>
|
|
7692
8002
|
{(mount) => <Portal4 mount={mount()}>
|
|
7693
8003
|
<div
|
|
7694
8004
|
ref={setTooltip}
|
|
@@ -7703,7 +8013,7 @@ function FillTooltip(props) {
|
|
|
7703
8013
|
{props.text}
|
|
7704
8014
|
</div>
|
|
7705
8015
|
</Portal4>}
|
|
7706
|
-
</
|
|
8016
|
+
</Show17>;
|
|
7707
8017
|
createPortalTokens(tooltip, () => props.themeClassName, () => null);
|
|
7708
8018
|
return element;
|
|
7709
8019
|
}
|
|
@@ -7717,8 +8027,8 @@ function FillHandlePortals(props) {
|
|
|
7717
8027
|
return snapshot2.status === "dragging" ? snapshot2.previewText : null;
|
|
7718
8028
|
});
|
|
7719
8029
|
return <>
|
|
7720
|
-
<
|
|
7721
|
-
{(snapshot2) => <
|
|
8030
|
+
<Show17 when={menu()}>
|
|
8031
|
+
{(snapshot2) => <Show17 when={snapshot2().menu}>
|
|
7722
8032
|
{(layout) => <FillOptionsMenu
|
|
7723
8033
|
fill={props.fill}
|
|
7724
8034
|
layout={layout()}
|
|
@@ -7726,11 +8036,11 @@ function FillHandlePortals(props) {
|
|
|
7726
8036
|
seriesAvailable={snapshot2().seriesAvailable}
|
|
7727
8037
|
themeClassName={props.themeClassName}
|
|
7728
8038
|
/>}
|
|
7729
|
-
</
|
|
7730
|
-
</
|
|
7731
|
-
<
|
|
8039
|
+
</Show17>}
|
|
8040
|
+
</Show17>
|
|
8041
|
+
<Show17 when={tooltipText() !== null}>
|
|
7732
8042
|
<FillTooltip fill={props.fill} text={tooltipText() ?? ""} themeClassName={props.themeClassName} />
|
|
7733
|
-
</
|
|
8043
|
+
</Show17>
|
|
7734
8044
|
</>;
|
|
7735
8045
|
}
|
|
7736
8046
|
|
|
@@ -8038,7 +8348,7 @@ function createFilterManagement(inputs) {
|
|
|
8038
8348
|
}
|
|
8039
8349
|
|
|
8040
8350
|
// src/view/ColumnFilterPopoverHost.tsx
|
|
8041
|
-
import { Show as
|
|
8351
|
+
import { Show as Show18, createMemo as createMemo21, untrack as untrack16 } from "solid-js";
|
|
8042
8352
|
import {
|
|
8043
8353
|
createFilterPopoverCommands,
|
|
8044
8354
|
createFilterPopoverDerivedResolver
|
|
@@ -8211,12 +8521,12 @@ function ColumnFilterPopoverHost(props) {
|
|
|
8211
8521
|
columnKey
|
|
8212
8522
|
});
|
|
8213
8523
|
});
|
|
8214
|
-
return <
|
|
8215
|
-
{(column) => <
|
|
8216
|
-
{(layout) => <
|
|
8524
|
+
return <Show18 when={openedColumn()}>
|
|
8525
|
+
{(column) => <Show18 when={filterPopover.layout()}>
|
|
8526
|
+
{(layout) => <Show18 when={props.views()}>
|
|
8217
8527
|
{(views) => {
|
|
8218
8528
|
const ColumnFilterPopover = untrack16(views).ColumnFilterPopover;
|
|
8219
|
-
return <
|
|
8529
|
+
return <Show18 when={column().key} keyed>
|
|
8220
8530
|
{(columnKey) => <ColumnFilterPopover
|
|
8221
8531
|
popoverSlot={props.popoverSlot}
|
|
8222
8532
|
themeClassName={props.themeClassName}
|
|
@@ -8257,20 +8567,20 @@ function ColumnFilterPopoverHost(props) {
|
|
|
8257
8567
|
onSetClear={commands.clearSetFilterPopoverValue}
|
|
8258
8568
|
onSetReplaceSelection={commands.handleSetFilterReplaceSelection}
|
|
8259
8569
|
/>}
|
|
8260
|
-
</
|
|
8570
|
+
</Show18>;
|
|
8261
8571
|
}}
|
|
8262
|
-
</
|
|
8263
|
-
</
|
|
8264
|
-
</
|
|
8572
|
+
</Show18>}
|
|
8573
|
+
</Show18>}
|
|
8574
|
+
</Show18>;
|
|
8265
8575
|
}
|
|
8266
8576
|
|
|
8267
8577
|
// src/view/GridFilterChipBar.tsx
|
|
8268
|
-
import { For as For10, Show as
|
|
8578
|
+
import { For as For10, Show as Show19, createUniqueId as createUniqueId5 } from "solid-js";
|
|
8269
8579
|
import { formatLocaleText as formatLocaleText11 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
8270
8580
|
function GridFilterChipBar(props) {
|
|
8271
8581
|
const texts = useFeatureLocaleText();
|
|
8272
8582
|
const chipIdBase = createUniqueId5();
|
|
8273
|
-
return <
|
|
8583
|
+
return <Show19 when={props.entries.length > 0}>
|
|
8274
8584
|
<div class={["ssg-filter-chip-bar", props.slot?.className]} style={props.slot?.style}>
|
|
8275
8585
|
<For10 each={props.entries} keyed={(entry) => entry.columnKey}>
|
|
8276
8586
|
{(entry, index) => <div class={entry().isHidden ? "ssg-filter-chip ssg-filter-chip--hidden" : "ssg-filter-chip"}>
|
|
@@ -8317,7 +8627,7 @@ function GridFilterChipBar(props) {
|
|
|
8317
8627
|
{texts().clearAll}
|
|
8318
8628
|
</button>
|
|
8319
8629
|
</div>
|
|
8320
|
-
</
|
|
8630
|
+
</Show19>;
|
|
8321
8631
|
}
|
|
8322
8632
|
|
|
8323
8633
|
// src/view/lazyPopups.ts
|
|
@@ -8525,7 +8835,7 @@ import { buildGroupTree, flattenGroupTree } from "@ishibashi0112/spreadsheet-gri
|
|
|
8525
8835
|
import { DEFAULT_GROUPING_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
8526
8836
|
|
|
8527
8837
|
// src/view/GridBodyGroupRow.tsx
|
|
8528
|
-
import { For as For11, Show as
|
|
8838
|
+
import { For as For11, Show as Show20, createMemo as createMemo23 } from "solid-js";
|
|
8529
8839
|
import { GROUP_AUTO_COLUMN_KEY as GROUP_AUTO_COLUMN_KEY3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/grouping";
|
|
8530
8840
|
import {
|
|
8531
8841
|
formatTotalRowCellText,
|
|
@@ -8555,7 +8865,7 @@ function GridBodyGroupRow(props) {
|
|
|
8555
8865
|
}}
|
|
8556
8866
|
onDblClick={() => props.onGroupToggle(props.groupRow.groupKey)}
|
|
8557
8867
|
>
|
|
8558
|
-
<
|
|
8868
|
+
<Show20 when={props.ownsRowHeader}>
|
|
8559
8869
|
<div
|
|
8560
8870
|
role={rowHeaderIsCell() ? "rowheader" : void 0}
|
|
8561
8871
|
aria-colindex={rowHeaderIsCell() ? 1 : void 0}
|
|
@@ -8580,7 +8890,7 @@ function GridBodyGroupRow(props) {
|
|
|
8580
8890
|
>
|
|
8581
8891
|
{props.showRowCheckbox ? null : props.rowIndex + 1}
|
|
8582
8892
|
</div>
|
|
8583
|
-
</
|
|
8893
|
+
</Show20>
|
|
8584
8894
|
<For11 each={props.entries} keyed={(entry) => entry.column.key}>
|
|
8585
8895
|
{(entry) => {
|
|
8586
8896
|
const unbound = createMemo23(() => entry().column);
|
|
@@ -8623,19 +8933,19 @@ function GridBodyGroupRow(props) {
|
|
|
8623
8933
|
"z-index": 1
|
|
8624
8934
|
}}
|
|
8625
8935
|
>
|
|
8626
|
-
<
|
|
8936
|
+
<Show20
|
|
8627
8937
|
when={isAutoGroupColumn()}
|
|
8628
|
-
fallback={<
|
|
8938
|
+
fallback={<Show20 when={aggregate()}>
|
|
8629
8939
|
{(shown) => <span
|
|
8630
8940
|
class="ssg-group-value"
|
|
8631
8941
|
data-ssg-tooltip-overflow={shown().text !== "" ? shown().caption !== void 0 ? `${shown().caption} ${shown().text}` : shown().text : void 0}
|
|
8632
8942
|
>
|
|
8633
|
-
<
|
|
8943
|
+
<Show20 when={shown().caption !== void 0 && shown().text !== ""}>
|
|
8634
8944
|
<span class="ssg-group-caption">{shown().caption}</span>
|
|
8635
|
-
</
|
|
8945
|
+
</Show20>
|
|
8636
8946
|
{shown().text}
|
|
8637
8947
|
</span>}
|
|
8638
|
-
</
|
|
8948
|
+
</Show20>}
|
|
8639
8949
|
>
|
|
8640
8950
|
<span
|
|
8641
8951
|
aria-hidden="true"
|
|
@@ -8659,7 +8969,7 @@ function GridBodyGroupRow(props) {
|
|
|
8659
8969
|
<span class="ssg-group-count">
|
|
8660
8970
|
{formatLocaleText12(texts().groupRowCount, { count: formatTotalRowNumber(props.groupRow.leafCount) })}
|
|
8661
8971
|
</span>
|
|
8662
|
-
</
|
|
8972
|
+
</Show20>
|
|
8663
8973
|
</div>;
|
|
8664
8974
|
}}
|
|
8665
8975
|
</For11>
|
|
@@ -8695,7 +9005,7 @@ import {
|
|
|
8695
9005
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/labelRows";
|
|
8696
9006
|
|
|
8697
9007
|
// src/view/GridBodyLabelRow.tsx
|
|
8698
|
-
import { Show as
|
|
9008
|
+
import { Show as Show21, createMemo as createMemo24 } from "solid-js";
|
|
8699
9009
|
var createLabelRowRenderContext = (labelRow, rowIndex, rowKey) => {
|
|
8700
9010
|
const row = createMemo24(() => labelRow().row);
|
|
8701
9011
|
const sourceRowIndex = createMemo24(() => labelRow().sourceIndex);
|
|
@@ -8745,7 +9055,7 @@ function GridBodyLabelRow(props) {
|
|
|
8745
9055
|
transform: `translateY(${props.top}px)`
|
|
8746
9056
|
}}
|
|
8747
9057
|
>
|
|
8748
|
-
<
|
|
9058
|
+
<Show21 when={props.ownsRowHeader}>
|
|
8749
9059
|
<div
|
|
8750
9060
|
aria-hidden="true"
|
|
8751
9061
|
class={["ssg-header-cell", "ssg-row-header-cell", "ssg-row-header-cell--label", props.slots.rowHeaderCell?.className]}
|
|
@@ -8756,8 +9066,8 @@ function GridBodyLabelRow(props) {
|
|
|
8756
9066
|
height: px(props.rowHeight)
|
|
8757
9067
|
}}
|
|
8758
9068
|
/>
|
|
8759
|
-
</
|
|
8760
|
-
<
|
|
9069
|
+
</Show21>
|
|
9070
|
+
<Show21 when={props.renderContent}>
|
|
8761
9071
|
{(render) => <div
|
|
8762
9072
|
role="rowheader"
|
|
8763
9073
|
aria-colindex={1}
|
|
@@ -8771,17 +9081,17 @@ function GridBodyLabelRow(props) {
|
|
|
8771
9081
|
{render()(ctx)}
|
|
8772
9082
|
</div>
|
|
8773
9083
|
</div>}
|
|
8774
|
-
</
|
|
9084
|
+
</Show21>
|
|
8775
9085
|
</div>;
|
|
8776
9086
|
}
|
|
8777
9087
|
|
|
8778
9088
|
// src/view/GridStickyLabelLayer.tsx
|
|
8779
|
-
import { Show as
|
|
9089
|
+
import { Show as Show22, createMemo as createMemo25, onSettled as onSettled8 } from "solid-js";
|
|
8780
9090
|
var FOCUSABLE_SELECTOR = 'a[href], button, input, select, textarea, [tabindex], [contenteditable="true"]';
|
|
8781
9091
|
function GridStickyLabelLayer(props) {
|
|
8782
|
-
return <
|
|
9092
|
+
return <Show22 when={props.entry}>
|
|
8783
9093
|
{(entry) => <StickyLabel layer={props} entry={entry} />}
|
|
8784
|
-
</
|
|
9094
|
+
</Show22>;
|
|
8785
9095
|
}
|
|
8786
9096
|
function StickyLabel(props) {
|
|
8787
9097
|
const layer = props.layer;
|
|
@@ -8843,7 +9153,7 @@ function StickyLabel(props) {
|
|
|
8843
9153
|
...props.entry().pushOffset > 0 ? { transform: `translateY(${-props.entry().pushOffset}px)` } : null
|
|
8844
9154
|
}}
|
|
8845
9155
|
>
|
|
8846
|
-
<
|
|
9156
|
+
<Show22 when={layer.ownsRowHeader}>
|
|
8847
9157
|
<div
|
|
8848
9158
|
class={["ssg-header-cell", "ssg-row-header-cell", "ssg-row-header-cell--label", layer.slots.rowHeaderCell?.className]}
|
|
8849
9159
|
style={{
|
|
@@ -8853,8 +9163,8 @@ function StickyLabel(props) {
|
|
|
8853
9163
|
height: px(height())
|
|
8854
9164
|
}}
|
|
8855
9165
|
/>
|
|
8856
|
-
</
|
|
8857
|
-
<
|
|
9166
|
+
</Show22>
|
|
9167
|
+
<Show22 when={layer.renderContent}>
|
|
8858
9168
|
{(render) => <div
|
|
8859
9169
|
class="ssg-label-row-content-holder"
|
|
8860
9170
|
style={{ left: px(layer.contentStickyLeft), width: px(layer.contentWidth), height: px(height()) }}
|
|
@@ -8863,12 +9173,12 @@ function StickyLabel(props) {
|
|
|
8863
9173
|
class={["ssg-label-row-content", layer.slots.labelRowContent?.className]}
|
|
8864
9174
|
style={layer.slots.labelRowContent?.style}
|
|
8865
9175
|
>
|
|
8866
|
-
<
|
|
9176
|
+
<Show22 when={[rowKey(), render()]} keyed>
|
|
8867
9177
|
{([, renderContent]) => renderContent(ctx)}
|
|
8868
|
-
</
|
|
9178
|
+
</Show22>
|
|
8869
9179
|
</div>
|
|
8870
9180
|
</div>}
|
|
8871
|
-
</
|
|
9181
|
+
</Show22>
|
|
8872
9182
|
</div>
|
|
8873
9183
|
</div>
|
|
8874
9184
|
);
|
|
@@ -8945,7 +9255,7 @@ function createServerSide(args) {
|
|
|
8945
9255
|
}
|
|
8946
9256
|
|
|
8947
9257
|
// src/view/GridServerSideErrorBars.tsx
|
|
8948
|
-
import { Show as
|
|
9258
|
+
import { Show as Show23, createSignal as createSignal15 } from "solid-js";
|
|
8949
9259
|
import { formatLocaleText as formatLocaleText13 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
8950
9260
|
function GridServerSideErrorBars(props) {
|
|
8951
9261
|
const [dismissedLoadError, setDismissedLoadError] = createSignal15(null);
|
|
@@ -8953,9 +9263,9 @@ function GridServerSideErrorBars(props) {
|
|
|
8953
9263
|
const texts = () => props.localeTexts;
|
|
8954
9264
|
const shownLoadError = () => props.loadError !== null && props.loadError !== dismissedLoadError() ? props.loadError : null;
|
|
8955
9265
|
const shownWriteError = () => props.writeError !== null && props.writeError !== dismissedWriteError() ? props.writeError : null;
|
|
8956
|
-
return <
|
|
9266
|
+
return <Show23 when={shownLoadError() !== null || shownWriteError() !== null}>
|
|
8957
9267
|
<div class="ssg-ssrm-error-bars">
|
|
8958
|
-
<
|
|
9268
|
+
<Show23 when={shownLoadError()}>
|
|
8959
9269
|
{(loadError) => <div class={["ssg-ssrm-error-bar", props.slot?.className]} style={props.slot?.style} role="alert">
|
|
8960
9270
|
<span class="ssg-ssrm-error-bar-dot" aria-hidden="true" />
|
|
8961
9271
|
<span class="ssg-ssrm-error-bar-msg">
|
|
@@ -8973,8 +9283,8 @@ function GridServerSideErrorBars(props) {
|
|
|
8973
9283
|
×
|
|
8974
9284
|
</button>
|
|
8975
9285
|
</div>}
|
|
8976
|
-
</
|
|
8977
|
-
<
|
|
9286
|
+
</Show23>
|
|
9287
|
+
<Show23 when={shownWriteError()}>
|
|
8978
9288
|
{(writeError) => <div class={["ssg-ssrm-error-bar", props.slot?.className]} style={props.slot?.style} role="alert">
|
|
8979
9289
|
<span class="ssg-ssrm-error-bar-dot" aria-hidden="true" />
|
|
8980
9290
|
<span class="ssg-ssrm-error-bar-msg">
|
|
@@ -8989,13 +9299,13 @@ function GridServerSideErrorBars(props) {
|
|
|
8989
9299
|
×
|
|
8990
9300
|
</button>
|
|
8991
9301
|
</div>}
|
|
8992
|
-
</
|
|
9302
|
+
</Show23>
|
|
8993
9303
|
</div>
|
|
8994
|
-
</
|
|
9304
|
+
</Show23>;
|
|
8995
9305
|
}
|
|
8996
9306
|
|
|
8997
9307
|
// src/view/GridBodySkeletonRow.tsx
|
|
8998
|
-
import { For as For12, Show as
|
|
9308
|
+
import { For as For12, Show as Show24 } from "solid-js";
|
|
8999
9309
|
var SKELETON_BAR_WIDTHS = ["62%", "46%", "78%", "54%"];
|
|
9000
9310
|
function GridBodySkeletonRow(props) {
|
|
9001
9311
|
return <div
|
|
@@ -9012,7 +9322,7 @@ function GridBodySkeletonRow(props) {
|
|
|
9012
9322
|
transform: `translateY(${props.top}px)`
|
|
9013
9323
|
}}
|
|
9014
9324
|
>
|
|
9015
|
-
<
|
|
9325
|
+
<Show24 when={props.ownsRowHeader}>
|
|
9016
9326
|
<div
|
|
9017
9327
|
role="rowheader"
|
|
9018
9328
|
aria-colindex={1}
|
|
@@ -9036,11 +9346,11 @@ function GridBodySkeletonRow(props) {
|
|
|
9036
9346
|
height: px(props.rowHeight)
|
|
9037
9347
|
}}
|
|
9038
9348
|
>
|
|
9039
|
-
<
|
|
9349
|
+
<Show24 when={props.showRowCheckbox} fallback={props.rowIndex + 1}>
|
|
9040
9350
|
<RowSelectionCheckbox slot={props.slots.checkbox} state="unchecked" disabled />
|
|
9041
|
-
</
|
|
9351
|
+
</Show24>
|
|
9042
9352
|
</div>
|
|
9043
|
-
</
|
|
9353
|
+
</Show24>
|
|
9044
9354
|
<For12 each={props.entries} keyed={(entry) => entry.logicalIndex}>
|
|
9045
9355
|
{(entry) => {
|
|
9046
9356
|
const cell = () => ({ row: props.rowIndex, col: entry().logicalIndex });
|
|
@@ -9085,32 +9395,6 @@ var serverSideFeature = {
|
|
|
9085
9395
|
|
|
9086
9396
|
// src/features/motionExtras.ts
|
|
9087
9397
|
import { createChangeHighlightController } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/changeHighlightController";
|
|
9088
|
-
|
|
9089
|
-
// src/view/CopyRangeOverlay.tsx
|
|
9090
|
-
import { Show as Show24 } from "solid-js";
|
|
9091
|
-
var placement = (props, rect) => ({
|
|
9092
|
-
position: "absolute",
|
|
9093
|
-
left: px(props.leadingWidth + rect.left),
|
|
9094
|
-
top: px(props.headerHeight + rect.top - props.baseOffset),
|
|
9095
|
-
width: px(rect.width),
|
|
9096
|
-
height: px(rect.height)
|
|
9097
|
-
});
|
|
9098
|
-
function CopyRangeOverlay(props) {
|
|
9099
|
-
return <Show24 when={props.rect}>
|
|
9100
|
-
{(rect) => <div
|
|
9101
|
-
class={["ssg-copy-range-overlay", props.slot?.className]}
|
|
9102
|
-
style={{ ...props.slot?.style, ...placement(props, rect()) }}
|
|
9103
|
-
data-ssg-copy-range=""
|
|
9104
|
-
/>}
|
|
9105
|
-
</Show24>;
|
|
9106
|
-
}
|
|
9107
|
-
function ColumnHoverOverlay(props) {
|
|
9108
|
-
return <Show24 when={props.rect}>
|
|
9109
|
-
{(rect) => <div class="ssg-col-hover-overlay" style={placement(props, rect())} data-ssg-col-hover="" />}
|
|
9110
|
-
</Show24>;
|
|
9111
|
-
}
|
|
9112
|
-
|
|
9113
|
-
// src/features/motionExtras.ts
|
|
9114
9398
|
var motionExtrasFeature = {
|
|
9115
9399
|
createChangeHighlightController,
|
|
9116
9400
|
CopyRangeOverlay,
|
|
@@ -9123,7 +9407,7 @@ import { DEFAULT_PINNED_ROWS_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid
|
|
|
9123
9407
|
// src/view/GridPinnedRows.tsx
|
|
9124
9408
|
import { For as For13, Show as Show25, createMemo as createMemo27 } from "solid-js";
|
|
9125
9409
|
import { resolveSlotProps as resolveSlotProps3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/slotProps";
|
|
9126
|
-
import { isSyntheticColumnKey as
|
|
9410
|
+
import { isSyntheticColumnKey as isSyntheticColumnKey4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/detailRow";
|
|
9127
9411
|
import { isCheckboxChecked as isCheckboxChecked2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/checkboxEditor";
|
|
9128
9412
|
import { formatLocaleText as formatLocaleText14 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
9129
9413
|
import { getCellValue as getCellValue5 } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions";
|
|
@@ -9244,7 +9528,7 @@ function GridPinnedRows(props) {
|
|
|
9244
9528
|
};
|
|
9245
9529
|
const content = createMemo27(() => {
|
|
9246
9530
|
const current = column();
|
|
9247
|
-
if (
|
|
9531
|
+
if (isSyntheticColumnKey4(current.key)) {
|
|
9248
9532
|
return null;
|
|
9249
9533
|
}
|
|
9250
9534
|
const context = ctx();
|
|
@@ -9369,7 +9653,9 @@ function createRowDrag(inputs) {
|
|
|
9369
9653
|
getRowDragLabel,
|
|
9370
9654
|
getDragRow,
|
|
9371
9655
|
locateDragRow: locateDragRow(),
|
|
9372
|
-
canDropAt: canDropAt()
|
|
9656
|
+
canDropAt: canDropAt(),
|
|
9657
|
+
// 追加(1.10.0 / 入力行): 入力行の下へは落とせない(落とせる最後のスロット = 入力行の上。React 版と同じ)。
|
|
9658
|
+
maxDropSlot: inputs.rowModel().newRow?.index
|
|
9373
9659
|
}),
|
|
9374
9660
|
"effect",
|
|
9375
9661
|
"rowDrag"
|
|
@@ -9747,6 +10033,7 @@ import {
|
|
|
9747
10033
|
createSearchSelectEditorController
|
|
9748
10034
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/searchSelectEditorController";
|
|
9749
10035
|
import { isImeComposingKeyEvent as isImeComposingKeyEvent4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
|
|
10036
|
+
import { isCommitToSelectionKey as isCommitToSelectionKey2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorKeys";
|
|
9750
10037
|
function MatchedText(props) {
|
|
9751
10038
|
const parts = createMemo30(() => splitSelectSearchText(props.text, props.range));
|
|
9752
10039
|
return <For15 each={parts()} keyed={false}>
|
|
@@ -9765,8 +10052,11 @@ function SearchSelectCellEditor(props) {
|
|
|
9765
10052
|
const listId = createUniqueId6();
|
|
9766
10053
|
const pointerMoved = createPointerMoveFilter2();
|
|
9767
10054
|
const [error, setError] = createSignal17(null);
|
|
10055
|
+
let commitToSelectionPending = false;
|
|
9768
10056
|
const commitWithResult = (committed, direction, option, forwardText) => {
|
|
9769
|
-
const
|
|
10057
|
+
const toSelection = commitToSelectionPending ? props.onCommitToSelection : void 0;
|
|
10058
|
+
commitToSelectionPending = false;
|
|
10059
|
+
const result = toSelection !== void 0 ? toSelection(committed) : props.onCommit(committed, direction, option, forwardText);
|
|
9770
10060
|
if (result && result.status === "rejected") {
|
|
9771
10061
|
setError(result.message);
|
|
9772
10062
|
}
|
|
@@ -9875,6 +10165,11 @@ function SearchSelectCellEditor(props) {
|
|
|
9875
10165
|
return;
|
|
9876
10166
|
}
|
|
9877
10167
|
const before = controller.getSnapshot().highlight;
|
|
10168
|
+
if (props.onCommitToSelection !== void 0 && isCommitToSelectionKey2(event)) {
|
|
10169
|
+
commitToSelectionPending = true;
|
|
10170
|
+
} else if (controller.getSnapshot().status !== "loading") {
|
|
10171
|
+
commitToSelectionPending = false;
|
|
10172
|
+
}
|
|
9878
10173
|
if (controller.keyDown(toEditorKeyEvent(event), props.enterMove) && controller.getSnapshot().highlight !== before) {
|
|
9879
10174
|
setError(null);
|
|
9880
10175
|
reveal(untrack20(scroller), untrack20(viewportHeight));
|
|
@@ -10048,6 +10343,22 @@ var changeTrackingFeature = {
|
|
|
10048
10343
|
localeText: DEFAULT_CHANGE_TRACKING_LOCALE_TEXT
|
|
10049
10344
|
};
|
|
10050
10345
|
|
|
10346
|
+
// src/features/excelShortcuts.ts
|
|
10347
|
+
import { createExcelShortcutCommands } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/excelShortcutCommands";
|
|
10348
|
+
var excelShortcutsFeature = {
|
|
10349
|
+
createExcelShortcutCommands
|
|
10350
|
+
};
|
|
10351
|
+
|
|
10352
|
+
// src/features/newRow.ts
|
|
10353
|
+
import { createNewRowController } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/newRowController";
|
|
10354
|
+
import { resolveNewRowPlaceholder } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/newRow";
|
|
10355
|
+
import { DEFAULT_NEW_ROW_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
10356
|
+
var newRowFeature = {
|
|
10357
|
+
createNewRowController,
|
|
10358
|
+
resolveNewRowPlaceholder,
|
|
10359
|
+
localeText: DEFAULT_NEW_ROW_LOCALE_TEXT
|
|
10360
|
+
};
|
|
10361
|
+
|
|
10051
10362
|
// src/features/treeData.ts
|
|
10052
10363
|
import {
|
|
10053
10364
|
collectTreeAncestors,
|
|
@@ -10435,6 +10746,8 @@ var fullGridFeatures = {
|
|
|
10435
10746
|
imeDirectInput: imeDirectInputFeature,
|
|
10436
10747
|
selectSearch: selectSearchFeature,
|
|
10437
10748
|
changeTracking: changeTrackingFeature,
|
|
10749
|
+
excelShortcuts: excelShortcutsFeature,
|
|
10750
|
+
newRow: newRowFeature,
|
|
10438
10751
|
treeData: treeDataFeature,
|
|
10439
10752
|
columnAutosize: columnAutosizeFeature,
|
|
10440
10753
|
columnReorder: columnReorderFeature,
|
|
@@ -10479,6 +10792,7 @@ export {
|
|
|
10479
10792
|
conditionalFormatFeature,
|
|
10480
10793
|
contextMenuFeature,
|
|
10481
10794
|
createSpreadsheetGrid,
|
|
10795
|
+
excelShortcutsFeature,
|
|
10482
10796
|
exportFeature,
|
|
10483
10797
|
fillHandleFeature,
|
|
10484
10798
|
filteringFeature,
|
|
@@ -10487,6 +10801,7 @@ export {
|
|
|
10487
10801
|
imeDirectInputFeature,
|
|
10488
10802
|
labelRowFeature,
|
|
10489
10803
|
motionExtrasFeature,
|
|
10804
|
+
newRowFeature,
|
|
10490
10805
|
numberFormatter,
|
|
10491
10806
|
numberParser,
|
|
10492
10807
|
pinnedRowsFeature,
|