@ishibashi0112/spreadsheet-grid-solid 1.12.0 → 1.14.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 +223 -13
- package/README.md +4 -2
- package/dist/ai.d.ts +2 -0
- package/dist/ai.js +48 -47
- package/dist/devWarnings.d.ts +5 -0
- package/dist/features/diffView.d.ts +2 -0
- package/dist/features/rangeDecorations.d.ts +2 -0
- package/dist/features/types.d.ts +16 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2846 -2531
- package/dist/primitives/serverSide.d.ts +2 -1
- package/dist/source/ai.jsx +3 -0
- package/dist/source/index.jsx +617 -96
- package/dist/style.css +1 -1
- package/dist/style.layer.css +1 -1
- package/dist/themes/astryx.css +4 -0
- package/dist/themes/heroui.css +4 -0
- package/dist/themes/mantine.css +4 -0
- package/dist/themes/shadcn.css +4 -0
- package/dist/view/DefaultGridBottomBar.d.ts +3 -1
- package/dist/view/GridBodyLayer.d.ts +7 -0
- package/dist/view/GridDiffBar.d.ts +11 -0
- package/dist/view/GridRangeDecorations.d.ts +7 -0
- package/package.json +3 -3
- package/skills/spreadsheet-grid-solid/SKILL.md +4 -0
package/dist/source/index.jsx
CHANGED
|
@@ -36,6 +36,11 @@ import { For as For5, Match, NoHydration, Show as Show12, Switch, createEffect a
|
|
|
36
36
|
import { isServer } from "@solidjs/web";
|
|
37
37
|
import { createGridEngine } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/createGridEngine";
|
|
38
38
|
import { gridActions } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridActions";
|
|
39
|
+
import {
|
|
40
|
+
resolveChangeNavOrigin,
|
|
41
|
+
resolveRowOffRemovedRow,
|
|
42
|
+
shouldClearChangeNavMark
|
|
43
|
+
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/changeNavigation";
|
|
39
44
|
import { isCopiedRangeCurrent } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridStore";
|
|
40
45
|
import {
|
|
41
46
|
resolveExcelShortcuts as resolveExcelShortcuts2,
|
|
@@ -753,6 +758,8 @@ var markReusedRow = (element) => {
|
|
|
753
758
|
};
|
|
754
759
|
|
|
755
760
|
// src/view/GridBodyLayer.tsx
|
|
761
|
+
var IGNORE_POINTER = () => {
|
|
762
|
+
};
|
|
756
763
|
var sameTreeRow = (a, b) => a === b || a !== void 0 && b !== void 0 && a.level === b.level && a.hasChildren === b.hasChildren && a.open === b.open && a.posInSet === b.posInSet && a.setSize === b.setSize && a.matched === b.matched && a.aggregates === b.aggregates;
|
|
757
764
|
var sameUnsavedTexts = (a, b) => {
|
|
758
765
|
if (a === b) {
|
|
@@ -771,6 +778,7 @@ var sameUnsavedTexts = (a, b) => {
|
|
|
771
778
|
var NO_SELECTED_COLUMNS = [-1, -1];
|
|
772
779
|
var EMPTY_SLOT = resolveSlotProps(void 0);
|
|
773
780
|
var NO_VALUE = () => null;
|
|
781
|
+
var joinMarks = (first, second) => first === null ? second : second === null ? first : () => [first(), second()];
|
|
774
782
|
var NO_SLOT = () => EMPTY_SLOT;
|
|
775
783
|
var NO_FALSE = () => false;
|
|
776
784
|
var EMPTY_NEW_ROW = /* @__PURE__ */ Object.freeze({});
|
|
@@ -834,6 +842,7 @@ function GridBodyLayer(props) {
|
|
|
834
842
|
}
|
|
835
843
|
);
|
|
836
844
|
const trackingOn = createMemo5(() => props.unsavedTracking !== void 0);
|
|
845
|
+
const originalOn = createMemo5(() => props.unsavedTracking?.describeOriginal !== void 0);
|
|
837
846
|
const treeKey = createMemo5(() => props.treeColumnKey);
|
|
838
847
|
return <For2 each={slotted().state.items} keyed={(item) => item.slot}>
|
|
839
848
|
{(item) => {
|
|
@@ -863,7 +872,10 @@ function GridBodyLayer(props) {
|
|
|
863
872
|
const isEntry = untrack3(() => item().newRow === true);
|
|
864
873
|
const newRowState = isEntry ? createMemo5(() => props.newRowDraft?.draft !== void 0 ? "draft" : "empty") : void 0;
|
|
865
874
|
const newRowBlank = newRowState ? () => newRowState() === "empty" : NO_FALSE;
|
|
866
|
-
const
|
|
875
|
+
const isRemoved = untrack3(
|
|
876
|
+
() => !isEntry && props.removedRowLayer !== void 0 && props.rowModel.getRemovedRow?.(item().index) !== void 0
|
|
877
|
+
);
|
|
878
|
+
const row = isEntry ? () => props.newRowLayer ? props.newRowDraft?.draft ?? EMPTY_NEW_ROW : void 0 : isRemoved ? () => props.rowModel.getRemovedRow?.(rowIndex()) : () => props.rowModel.getRow(rowIndex());
|
|
867
879
|
const groupRow = createMemo5(() => props.grouping ? props.rowModel.getGroupRow?.(rowIndex()) : void 0);
|
|
868
880
|
const labelRow = createMemo5(
|
|
869
881
|
() => props.labelRowLayer ? props.rowModel.getLabelRow?.(rowIndex()) : void 0
|
|
@@ -929,7 +941,7 @@ function GridBodyLayer(props) {
|
|
|
929
941
|
return props.rowModel.getRowKey(rowIndex()) ?? rowIndex();
|
|
930
942
|
});
|
|
931
943
|
let rowElement;
|
|
932
|
-
if (!isEntry) {
|
|
944
|
+
if (!isEntry && !isRemoved) {
|
|
933
945
|
createRenderEffect(
|
|
934
946
|
rowKey,
|
|
935
947
|
(_next, previous) => {
|
|
@@ -940,16 +952,19 @@ function GridBodyLayer(props) {
|
|
|
940
952
|
{ name: "reusedRow" }
|
|
941
953
|
);
|
|
942
954
|
}
|
|
943
|
-
const sourceRowIndex = isEntry ? () => -1 : createMemo5(() => props.rowModel.getSourceIndex(rowIndex()) ?? rowIndex());
|
|
955
|
+
const sourceRowIndex = isEntry || isRemoved ? () => -1 : createMemo5(() => props.rowModel.getSourceIndex(rowIndex()) ?? rowIndex());
|
|
944
956
|
const rowSize = createMemo5(() => item().size ?? props.rowHeight);
|
|
945
957
|
const isRowChecked = createMemo5(
|
|
946
|
-
() => props.enableRowSelection && !isEntry ? resolveIsRowSelected(props.rowSelectionState, rowKey()) : false
|
|
958
|
+
() => props.enableRowSelection && !isEntry && !isRemoved ? resolveIsRowSelected(props.rowSelectionState, rowKey()) : false
|
|
947
959
|
);
|
|
948
960
|
const isRowSelected = createMemo5(
|
|
949
|
-
() => !isEntry && props.selection.kind === "row" && rowIndex() >= props.selection.startRow && rowIndex() <= props.selection.endRow
|
|
961
|
+
() => !isEntry && !isRemoved && props.selection.kind === "row" && rowIndex() >= props.selection.startRow && rowIndex() <= props.selection.endRow
|
|
950
962
|
);
|
|
951
963
|
const selectedColRange = createMemo5(() => {
|
|
952
964
|
const selection = props.selection;
|
|
965
|
+
if (isRemoved) {
|
|
966
|
+
return NO_SELECTED_COLUMNS;
|
|
967
|
+
}
|
|
953
968
|
if (selection.kind === "col" && !isEntry) {
|
|
954
969
|
return [selection.startCol, selection.endCol];
|
|
955
970
|
}
|
|
@@ -960,7 +975,9 @@ function GridBodyLayer(props) {
|
|
|
960
975
|
});
|
|
961
976
|
const selectedColStart = () => selectedColRange()[0];
|
|
962
977
|
const selectedColEnd = () => selectedColRange()[1];
|
|
963
|
-
const activeCol = createMemo5(
|
|
978
|
+
const activeCol = createMemo5(
|
|
979
|
+
() => !isRemoved && props.activeCell?.row === rowIndex() ? props.activeCell.col : -1
|
|
980
|
+
);
|
|
964
981
|
const rowFindHits = createMemo5(() => props.findIndex.get(rowIndex()));
|
|
965
982
|
const rowFindCurrent = createMemo5(() => {
|
|
966
983
|
const hits = rowFindHits();
|
|
@@ -975,11 +992,13 @@ function GridBodyLayer(props) {
|
|
|
975
992
|
}
|
|
976
993
|
return null;
|
|
977
994
|
});
|
|
978
|
-
const editingCol = createMemo5(
|
|
995
|
+
const editingCol = createMemo5(
|
|
996
|
+
() => !isRemoved && props.editingCell?.row === rowIndex() ? props.editingCell.col : -1
|
|
997
|
+
);
|
|
979
998
|
const rowAutoHeight = createMemo5(() => !!props.autoHeight);
|
|
980
|
-
const isHovered = createMemo5(() => props.hoveredRowIndex === rowIndex());
|
|
999
|
+
const isHovered = createMemo5(() => !isRemoved && props.hoveredRowIndex === rowIndex());
|
|
981
1000
|
const rowSlot = createMemo5(
|
|
982
|
-
() => newRowBlank() ? EMPTY_SLOT : resolveSlotProps(
|
|
1001
|
+
() => newRowBlank() || isRemoved ? EMPTY_SLOT : resolveSlotProps(
|
|
983
1002
|
props.getRowClassName?.(currentRow(), rowIndex(), {
|
|
984
1003
|
row: currentRow(),
|
|
985
1004
|
rowIndex: rowIndex(),
|
|
@@ -990,7 +1009,7 @@ function GridBodyLayer(props) {
|
|
|
990
1009
|
)
|
|
991
1010
|
);
|
|
992
1011
|
const rowNumber = () => props.labelViewIndexes ? resolveDataRowNumber(props.labelViewIndexes, rowIndex()) : rowIndex() + 1;
|
|
993
|
-
const rowTracking = isEntry ? NO_FALSE : trackingOn;
|
|
1012
|
+
const rowTracking = isEntry || isRemoved ? NO_FALSE : trackingOn;
|
|
994
1013
|
const rowUnsavedTexts = createMemoWhen(
|
|
995
1014
|
rowTracking,
|
|
996
1015
|
() => {
|
|
@@ -1013,6 +1032,28 @@ function GridBodyLayer(props) {
|
|
|
1013
1032
|
sameUnsavedTexts
|
|
1014
1033
|
);
|
|
1015
1034
|
const rowUnsaved = () => rowUnsavedTexts() !== void 0;
|
|
1035
|
+
const rowOriginalTexts = createMemoWhen(
|
|
1036
|
+
() => rowTracking() && originalOn(),
|
|
1037
|
+
() => {
|
|
1038
|
+
const marks = props.unsavedTracking;
|
|
1039
|
+
const describeOriginal = marks?.describeOriginal;
|
|
1040
|
+
const saved = marks?.getUnsavedCells(rowKey());
|
|
1041
|
+
if (!marks || !describeOriginal || !saved) {
|
|
1042
|
+
return void 0;
|
|
1043
|
+
}
|
|
1044
|
+
const current = currentRow();
|
|
1045
|
+
let texts2;
|
|
1046
|
+
for (const [columnKey, savedValue] of saved) {
|
|
1047
|
+
const trackedColumn = marks.trackedColumns.get(columnKey);
|
|
1048
|
+
if (trackedColumn && !Object.is(getCellValue(current, trackedColumn), savedValue)) {
|
|
1049
|
+
(texts2 ??= /* @__PURE__ */ new Map()).set(columnKey, describeOriginal(trackedColumn, current, savedValue));
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
return texts2;
|
|
1053
|
+
},
|
|
1054
|
+
void 0,
|
|
1055
|
+
sameUnsavedTexts
|
|
1056
|
+
);
|
|
1016
1057
|
const closedTreeUnsaved = () => props.closedTreeUnsaved?.has(rowKey()) === true;
|
|
1017
1058
|
const rowAdded = () => props.unsavedTracking?.isAddedRow?.(rowKey()) === true;
|
|
1018
1059
|
const rowHeaderDescription = () => {
|
|
@@ -1024,13 +1065,28 @@ function GridBodyLayer(props) {
|
|
|
1024
1065
|
return parts.length === 0 ? void 0 : parts.join(" / ");
|
|
1025
1066
|
};
|
|
1026
1067
|
const treeRow = createMemoWhen(
|
|
1027
|
-
() => !isEntry && props.treeColumnKey !== void 0,
|
|
1068
|
+
() => !isEntry && !isRemoved && props.treeColumnKey !== void 0,
|
|
1028
1069
|
() => props.rowModel.getTreeRow?.(rowIndex()),
|
|
1029
1070
|
void 0,
|
|
1030
1071
|
sameTreeRow
|
|
1031
1072
|
);
|
|
1032
1073
|
const unsavedTextOf = (columnKey) => untrack3(rowTracking) ? () => rowUnsavedTexts()?.get(columnKey) ?? null : NO_VALUE;
|
|
1033
1074
|
const unsavedMarkOf = (unsavedText) => untrack3(rowTracking) ? () => unsavedText() !== null ? <span class="ssg-unsaved-mark" aria-hidden="true" /> : null : null;
|
|
1075
|
+
const originalTextOf = (columnKey) => untrack3(rowTracking) && untrack3(originalOn) ? () => rowOriginalTexts()?.get(columnKey) ?? null : NO_VALUE;
|
|
1076
|
+
const originalMarkOf = (originalText) => untrack3(rowTracking) && untrack3(originalOn) ? () => {
|
|
1077
|
+
const text = originalText();
|
|
1078
|
+
return text !== null ? <s class="ssg-diff-original" aria-hidden="true">
|
|
1079
|
+
{text}
|
|
1080
|
+
</s> : null;
|
|
1081
|
+
} : null;
|
|
1082
|
+
const describeCell = (text, active) => {
|
|
1083
|
+
const decoration = active ? props.activeCellDecorationText : void 0;
|
|
1084
|
+
if (decoration === void 0) {
|
|
1085
|
+
return text ?? void 0;
|
|
1086
|
+
}
|
|
1087
|
+
return text === null ? decoration : `${text}
|
|
1088
|
+
${decoration}`;
|
|
1089
|
+
};
|
|
1034
1090
|
const textCellBase = createMemo5(() => {
|
|
1035
1091
|
const slot = rowSlot();
|
|
1036
1092
|
const bodyCell = cellEnv().bodyCellSlot;
|
|
@@ -1062,12 +1118,14 @@ function GridBodyLayer(props) {
|
|
|
1062
1118
|
const cell = () => ({ row: rowIndex(), col: colIndex() });
|
|
1063
1119
|
const unsavedText = unsavedTextOf(untrack3(unbound).key);
|
|
1064
1120
|
const unsavedMark = unsavedMarkOf(unsavedText);
|
|
1121
|
+
const originalText = originalTextOf(untrack3(unbound).key);
|
|
1122
|
+
const trailingMark = joinMarks(originalMarkOf(originalText), unsavedMark);
|
|
1065
1123
|
return <div
|
|
1066
1124
|
role="gridcell"
|
|
1067
1125
|
aria-colindex={colIndex() + 2}
|
|
1068
1126
|
aria-selected={isSelected() ? "true" : "false"}
|
|
1069
1127
|
aria-readonly={readOnlyCell() ? "true" : void 0}
|
|
1070
|
-
aria-description={unsavedText()
|
|
1128
|
+
aria-description={describeCell(unsavedText(), isActive())}
|
|
1071
1129
|
id={isActive() ? props.activeCellDomId : void 0}
|
|
1072
1130
|
aria-owns={editingCol() === colIndex() ? props.cellEditorDomId : void 0}
|
|
1073
1131
|
data-ssg-col-key={column().key}
|
|
@@ -1080,6 +1138,7 @@ function GridBodyLayer(props) {
|
|
|
1080
1138
|
alignTop() && "ssg-body-cell--valign-top",
|
|
1081
1139
|
readOnlyCell() && !isSelected() && "ssg-body-cell--readonly",
|
|
1082
1140
|
unsavedText() !== null && "ssg-body-cell--unsaved",
|
|
1141
|
+
originalText() !== null && "ssg-body-cell--with-original",
|
|
1083
1142
|
isHovered() && "ssg-body-cell--row-hovered"
|
|
1084
1143
|
)}
|
|
1085
1144
|
onPointerDown={(event) => props.onCellPointerDown(cell(), event)}
|
|
@@ -1101,18 +1160,19 @@ function GridBodyLayer(props) {
|
|
|
1101
1160
|
<span class="ssg-cell-value">
|
|
1102
1161
|
{props.cellText(currentRow(), column(), findRanges(), rowFindCurrent)}
|
|
1103
1162
|
</span>
|
|
1104
|
-
{
|
|
1163
|
+
{trailingMark}
|
|
1105
1164
|
</div>;
|
|
1106
1165
|
};
|
|
1107
1166
|
const cells = () => <For2 each={props.entries} keyed={cellKey}>
|
|
1108
1167
|
{(entry) => {
|
|
1109
1168
|
const shape = untrack3(() => cellShapeOf(entry().column));
|
|
1110
|
-
if (shape === "text" && !isEntry) {
|
|
1169
|
+
if (shape === "text" && !isEntry && !isRemoved) {
|
|
1111
1170
|
return renderTextCell(entry);
|
|
1112
1171
|
}
|
|
1113
1172
|
const plain = shape !== "decorated";
|
|
1114
1173
|
const newRowSynthetic = isEntry && untrack3(() => isSyntheticColumnKey2(entry().column.key));
|
|
1115
|
-
const
|
|
1174
|
+
const removedSynthetic = isRemoved && untrack3(() => isSyntheticColumnKey2(entry().column.key));
|
|
1175
|
+
const decorOff = newRowSynthetic || isRemoved ? () => true : newRowBlank;
|
|
1116
1176
|
const unbound = createMemo5(() => entry().column);
|
|
1117
1177
|
const column = () => unbound();
|
|
1118
1178
|
const colIndex = createMemo5(() => entry().logicalIndex);
|
|
@@ -1121,6 +1181,9 @@ function GridBodyLayer(props) {
|
|
|
1121
1181
|
const isEditing = () => editingCol() === colIndex();
|
|
1122
1182
|
const isSelected = () => isRowSelected() || selectedColStart() >= 0 && colIndex() >= selectedColStart() && colIndex() <= selectedColEnd();
|
|
1123
1183
|
const readOnlyCell = () => {
|
|
1184
|
+
if (isRemoved) {
|
|
1185
|
+
return true;
|
|
1186
|
+
}
|
|
1124
1187
|
const env = editPermission();
|
|
1125
1188
|
return !isColumnEditable(env.readOnly, unbound()) || env.canEditCell !== void 0 && !newRowBlank() && !isCellEditable(env, rowIndex(), colIndex(), currentRow(), unbound(), {
|
|
1126
1189
|
sourceRowIndex: sourceRowIndex(),
|
|
@@ -1196,7 +1259,7 @@ function GridBodyLayer(props) {
|
|
|
1196
1259
|
}),
|
|
1197
1260
|
null
|
|
1198
1261
|
);
|
|
1199
|
-
const conditionalCell = plain || newRowSynthetic ? NO_SLOT : createMemoWhen(
|
|
1262
|
+
const conditionalCell = plain || newRowSynthetic || removedSynthetic ? NO_SLOT : createMemoWhen(
|
|
1200
1263
|
() => column().cellClassName !== void 0,
|
|
1201
1264
|
() => {
|
|
1202
1265
|
const cellClassName = column().cellClassName;
|
|
@@ -1251,6 +1314,8 @@ function GridBodyLayer(props) {
|
|
|
1251
1314
|
);
|
|
1252
1315
|
const unsavedText = unsavedTextOf(untrack3(unbound).key);
|
|
1253
1316
|
const unsavedMark = unsavedMarkOf(unsavedText);
|
|
1317
|
+
const originalText = originalTextOf(untrack3(unbound).key);
|
|
1318
|
+
const trailingMark = joinMarks(originalMarkOf(originalText), unsavedMark);
|
|
1254
1319
|
const tooltipText = () => resolveCellTooltipText(invalidMessage(), cellNote(), unsavedText());
|
|
1255
1320
|
const autoHeightFlags = createMemoWhen(
|
|
1256
1321
|
rowAutoHeight,
|
|
@@ -1270,7 +1335,11 @@ function GridBodyLayer(props) {
|
|
|
1270
1335
|
});
|
|
1271
1336
|
const cell = () => ({ row: rowIndex(), col: colIndex() });
|
|
1272
1337
|
const keyedContent = untrack3(() => entry().column.renderCell !== void 0);
|
|
1273
|
-
const
|
|
1338
|
+
const contentColumn = isRemoved ? createMemo5(() => {
|
|
1339
|
+
const current = column();
|
|
1340
|
+
return current.renderCell || current.conditionalFormat ? { ...current, renderCell: void 0, conditionalFormat: void 0 } : current;
|
|
1341
|
+
}) : column;
|
|
1342
|
+
const cellChildren = plain ? () => props.renderCellContent(currentRow, contentColumn(), cellState) : () => <>
|
|
1274
1343
|
<Show2 when={dataBar()}>
|
|
1275
1344
|
{(bar) => <span
|
|
1276
1345
|
class={["ssg-cf-bar", { "ssg-cf-bar--negative": bar().negative }]}
|
|
@@ -1284,10 +1353,10 @@ function GridBodyLayer(props) {
|
|
|
1284
1353
|
</Show2>
|
|
1285
1354
|
<Show2
|
|
1286
1355
|
when={isAutoHeightCell()}
|
|
1287
|
-
fallback={props.renderCellContent(currentRow,
|
|
1356
|
+
fallback={props.renderCellContent(currentRow, contentColumn(), cellState)}
|
|
1288
1357
|
>
|
|
1289
1358
|
<div class="ssg-autoheight-content" data-autoheight-content="">
|
|
1290
|
-
{props.renderCellContent(currentRow,
|
|
1359
|
+
{props.renderCellContent(currentRow, contentColumn(), cellState)}
|
|
1291
1360
|
</div>
|
|
1292
1361
|
</Show2>
|
|
1293
1362
|
</>;
|
|
@@ -1295,14 +1364,14 @@ function GridBodyLayer(props) {
|
|
|
1295
1364
|
rowKey();
|
|
1296
1365
|
return cellChildren();
|
|
1297
1366
|
} : cellChildren;
|
|
1298
|
-
const cellContent = !isEntry ? dataContent : newRowSynthetic ? NO_VALUE : () => newRowBlank() ? renderNewRowPlaceholder(isEditing() ? null : props.newRowLayer?.placeholder(column()) ?? null) : dataContent();
|
|
1367
|
+
const cellContent = removedSynthetic ? NO_VALUE : !isEntry ? dataContent : newRowSynthetic ? NO_VALUE : () => newRowBlank() ? renderNewRowPlaceholder(isEditing() ? null : props.newRowLayer?.placeholder(column()) ?? null) : dataContent();
|
|
1299
1368
|
return <div
|
|
1300
1369
|
role="gridcell"
|
|
1301
1370
|
aria-colindex={colIndex() + 2}
|
|
1302
1371
|
aria-selected={isSelected() ? "true" : "false"}
|
|
1303
1372
|
aria-readonly={readOnlyCell() ? "true" : void 0}
|
|
1304
1373
|
aria-invalid={invalidMessage() !== null ? "true" : void 0}
|
|
1305
|
-
aria-description={tooltipText()
|
|
1374
|
+
aria-description={describeCell(tooltipText(), isActive())}
|
|
1306
1375
|
id={isActive() ? props.activeCellDomId : void 0}
|
|
1307
1376
|
aria-owns={isEditing() ? props.cellEditorDomId : void 0}
|
|
1308
1377
|
data-ssg-col-key={column().key}
|
|
@@ -1328,17 +1397,21 @@ function GridBodyLayer(props) {
|
|
|
1328
1397
|
invalidMessage() !== null && "ssg-body-cell--invalid",
|
|
1329
1398
|
cellNote() !== null && "ssg-body-cell--has-note",
|
|
1330
1399
|
unsavedText() !== null && "ssg-body-cell--unsaved",
|
|
1400
|
+
originalText() !== null && "ssg-body-cell--with-original",
|
|
1331
1401
|
isHovered() && "ssg-body-cell--row-hovered"
|
|
1332
1402
|
)}
|
|
1333
1403
|
onPointerDown={(event) => {
|
|
1404
|
+
if (isRemoved) {
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1334
1407
|
if (event.target instanceof Element && event.target.closest(".ssg-detail-toggle, .ssg-tree-toggle")) {
|
|
1335
1408
|
return;
|
|
1336
1409
|
}
|
|
1337
1410
|
props.onCellPointerDown(cell(), event);
|
|
1338
1411
|
}}
|
|
1339
|
-
onPointerEnter={(event) => props.onCellPointerEnter(cell(), event)}
|
|
1340
|
-
onClick={(event) => props.onCellClick(cell(), event)}
|
|
1341
|
-
onDblClick={(event) => props.onCellDoubleClick(cell(), event)}
|
|
1412
|
+
onPointerEnter={isRemoved ? IGNORE_POINTER : (event) => props.onCellPointerEnter(cell(), event)}
|
|
1413
|
+
onClick={isRemoved ? IGNORE_POINTER : (event) => props.onCellClick(cell(), event)}
|
|
1414
|
+
onDblClick={isRemoved ? IGNORE_POINTER : (event) => props.onCellDoubleClick(cell(), event)}
|
|
1342
1415
|
ref={markClickTarget}
|
|
1343
1416
|
style={{
|
|
1344
1417
|
...cellEnv().bodyCellSlot?.style,
|
|
@@ -1355,12 +1428,13 @@ function GridBodyLayer(props) {
|
|
|
1355
1428
|
}}
|
|
1356
1429
|
>
|
|
1357
1430
|
{cellContent()}
|
|
1358
|
-
{
|
|
1431
|
+
{trailingMark}
|
|
1359
1432
|
</div>;
|
|
1360
1433
|
}}
|
|
1361
1434
|
</For2>;
|
|
1362
1435
|
const switchedCells = createMemo5(() => {
|
|
1363
1436
|
trackingOn();
|
|
1437
|
+
originalOn();
|
|
1364
1438
|
treeKey();
|
|
1365
1439
|
return untrack3(cells);
|
|
1366
1440
|
});
|
|
@@ -1372,7 +1446,7 @@ function GridBodyLayer(props) {
|
|
|
1372
1446
|
data-row-index={rowIndex()}
|
|
1373
1447
|
role="row"
|
|
1374
1448
|
aria-rowindex={rowIndex() + 2 + props.ariaRowOffset}
|
|
1375
|
-
aria-selected={props.enableRowSelection && !isEntry ? isRowChecked() ? "true" : "false" : void 0}
|
|
1449
|
+
aria-selected={props.enableRowSelection && !isEntry && !isRemoved ? isRowChecked() ? "true" : "false" : void 0}
|
|
1376
1450
|
data-row-key={String(rowKey())}
|
|
1377
1451
|
data-ssg-new-row={newRowState?.()}
|
|
1378
1452
|
aria-level={treeRow() !== void 0 ? treeRow().level + 1 : void 0}
|
|
@@ -1390,7 +1464,10 @@ function GridBodyLayer(props) {
|
|
|
1390
1464
|
rowAdded() && "ssg-body-row--added",
|
|
1391
1465
|
treeRow()?.matched === false && "ssg-body-row--tree-unmatched",
|
|
1392
1466
|
// 追加(1.10.0): 入力行(公開の契約。状態は data-ssg-new-row)。
|
|
1393
|
-
isEntry && "ssg-body-row--new"
|
|
1467
|
+
isEntry && "ssg-body-row--new",
|
|
1468
|
+
// 追加(1.13.0 / 差分の表示): 削除の行と、変更を回って着いた削除の行。
|
|
1469
|
+
isRemoved && "ssg-body-row--removed",
|
|
1470
|
+
isRemoved && props.changeNavRowKey !== null && props.changeNavRowKey !== void 0 && props.changeNavRowKey === rowKey() && "ssg-body-row--change-target"
|
|
1394
1471
|
)}
|
|
1395
1472
|
style={{
|
|
1396
1473
|
...props.slots.bodyRow?.style,
|
|
@@ -1404,20 +1481,22 @@ function GridBodyLayer(props) {
|
|
|
1404
1481
|
role="rowheader"
|
|
1405
1482
|
aria-colindex={1}
|
|
1406
1483
|
aria-description={rowHeaderDescription()}
|
|
1407
|
-
onPointerDown={(event) => props.onRowHeaderPointerDown(rowIndex(), event)}
|
|
1408
|
-
onPointerEnter={(event) => props.onRowHeaderPointerEnter(rowIndex(), event)}
|
|
1409
|
-
onPointerLeave={() => props.onRowHeaderPointerLeave(rowIndex())}
|
|
1484
|
+
onPointerDown={isRemoved ? IGNORE_POINTER : (event) => props.onRowHeaderPointerDown(rowIndex(), event)}
|
|
1485
|
+
onPointerEnter={isRemoved ? IGNORE_POINTER : (event) => props.onRowHeaderPointerEnter(rowIndex(), event)}
|
|
1486
|
+
onPointerLeave={isRemoved ? IGNORE_POINTER : () => props.onRowHeaderPointerLeave(rowIndex())}
|
|
1410
1487
|
class={joinClasses(
|
|
1411
1488
|
"ssg-header-cell ssg-row-header-cell",
|
|
1412
1489
|
rowSlot().className,
|
|
1413
1490
|
props.slots.rowHeaderCell?.className,
|
|
1414
|
-
props.enableRowSelection && !isEntry && "ssg-row-header-cell--checkbox",
|
|
1491
|
+
props.enableRowSelection && !isEntry && !isRemoved && "ssg-row-header-cell--checkbox",
|
|
1415
1492
|
// 追加(1.10.0): 入力行の行番号(* / 下書きは ✎)。
|
|
1416
1493
|
isEntry && "ssg-row-header-cell--new",
|
|
1417
1494
|
(rowUnsaved() || closedTreeUnsaved()) && "ssg-row-header-cell--unsaved",
|
|
1418
1495
|
// 追加(1.10.0): グリッドで足した行の行番号(左の縦の線)。
|
|
1419
1496
|
rowAdded() && "ssg-row-header-cell--added",
|
|
1420
|
-
(
|
|
1497
|
+
// 追加(1.13.0): 削除の行の行番号(「−」)。
|
|
1498
|
+
isRemoved && "ssg-row-header-cell--removed",
|
|
1499
|
+
(props.isWholeGridSelected && !isEntry && !isRemoved || isRowSelected()) && "ssg-header-cell--selected",
|
|
1421
1500
|
isHovered() && "ssg-header-cell--hovered"
|
|
1422
1501
|
)}
|
|
1423
1502
|
style={{
|
|
@@ -1428,7 +1507,13 @@ function GridBodyLayer(props) {
|
|
|
1428
1507
|
height: px(rowSize())
|
|
1429
1508
|
}}
|
|
1430
1509
|
>
|
|
1431
|
-
{
|
|
1510
|
+
{isRemoved ? (
|
|
1511
|
+
// 追加(1.13.0): 削除の行は行番号を取らないので「−」と、読み上げの名前を見えない文字で(入力行の印と同じ)。
|
|
1512
|
+
<>
|
|
1513
|
+
<span aria-hidden="true">{"\u2212"}</span>
|
|
1514
|
+
<span class="ssg-visually-hidden">{props.removedRowLayer?.description}</span>
|
|
1515
|
+
</>
|
|
1516
|
+
) : newRowState ? (
|
|
1432
1517
|
// 追加(1.10.0): 入力行の行番号は印(* / ✎)なので、読み上げの名前を見えない文字で添える(E4-08)。
|
|
1433
1518
|
<>
|
|
1434
1519
|
<span aria-hidden="true">{newRowState() === "draft" ? "\u270E" : "\uFF0A"}</span>
|
|
@@ -2666,9 +2751,12 @@ function DefaultGridBottomBar(props) {
|
|
|
2666
2751
|
const SelectionAggregates = props.SelectionAggregates;
|
|
2667
2752
|
return SelectionAggregates ? <SelectionAggregates aggregates={props.selectionAggregates} trailing={trailing} /> : null;
|
|
2668
2753
|
};
|
|
2669
|
-
const unsavedChip = () =>
|
|
2670
|
-
{
|
|
2671
|
-
|
|
2754
|
+
const unsavedChip = () => <>
|
|
2755
|
+
{props.diffChip}
|
|
2756
|
+
<Show10 when={props.unsavedText}>
|
|
2757
|
+
{(text) => <span class="ssg-bar-chip ssg-bar-chip--unsaved">{text()}</span>}
|
|
2758
|
+
</Show10>
|
|
2759
|
+
</>;
|
|
2672
2760
|
return <div class={["ssg-bar--bottom", props.slot?.className]} style={props.slot?.style}>
|
|
2673
2761
|
<div class="ssg-bar-container">
|
|
2674
2762
|
<Show10 when={props.showCounts}>
|
|
@@ -2789,6 +2877,15 @@ var FEATURE_PROPS = {
|
|
|
2789
2877
|
},
|
|
2790
2878
|
{ prop: "onChangesChange", isUsed: (props) => props.onChangesChange !== void 0 }
|
|
2791
2879
|
],
|
|
2880
|
+
// 追加(1.13.0 / 差分の表示): trackChanges の baseline(機能が無いと 1.8.0 の変更の追跡。React 版と同じ)。
|
|
2881
|
+
diffView: [
|
|
2882
|
+
{
|
|
2883
|
+
prop: "trackChanges.baseline",
|
|
2884
|
+
isUsed: (props) => typeof props.trackChanges === "object" && props.trackChanges !== null && props.trackChanges.baseline !== void 0
|
|
2885
|
+
}
|
|
2886
|
+
],
|
|
2887
|
+
// 追加(1.13.0 / 範囲の飾り)
|
|
2888
|
+
rangeDecorations: [{ prop: "rangeDecorations", isUsed: (props) => (props.rangeDecorations?.length ?? 0) > 0 }],
|
|
2792
2889
|
// 追加(1.10.0 / Excel のキー): 切り取り以外のキーを効かせたとき(切り取りは本体なので、既定の省略では警告しない)。
|
|
2793
2890
|
excelShortcuts: [
|
|
2794
2891
|
{
|
|
@@ -3063,6 +3160,38 @@ function createShellDevWarningsInDev(args) {
|
|
|
3063
3160
|
warnOncePerGrid(multiSelectWarned, warning.id, warning.message);
|
|
3064
3161
|
}
|
|
3065
3162
|
});
|
|
3163
|
+
const rangeDecorationsWarned = /* @__PURE__ */ new Set();
|
|
3164
|
+
createChangeEffect(
|
|
3165
|
+
() => args.rangeDecorationCount() > args.rangeDecorationWarnCount ? args.rangeDecorationCount() : 0,
|
|
3166
|
+
(count) => {
|
|
3167
|
+
if (count > 0) {
|
|
3168
|
+
warnOncePerGrid(
|
|
3169
|
+
rangeDecorationsWarned,
|
|
3170
|
+
"rangeDecorationsCount",
|
|
3171
|
+
`[SpreadsheetGrid] rangeDecorations \u304C ${count} \u500B\u3042\u308A\u307E\u3059(${args.rangeDecorationWarnCount} \u500B\u3092\u8D85\u3048\u308B\u3068\u63CF\u304F\u306E\u304C\u9045\u304F\u306A\u308A\u307E\u3059\u3002\u7BC4\u56F2\u3092\u307E\u3068\u3081\u3066\u304F\u3060\u3055\u3044)\u3002
|
|
3172
|
+
[SpreadsheetGrid] rangeDecorations has ${count} entries (more than ${args.rangeDecorationWarnCount} slows down drawing; merge the ranges).`
|
|
3173
|
+
);
|
|
3174
|
+
}
|
|
3175
|
+
}
|
|
3176
|
+
);
|
|
3177
|
+
createChangeEffect(
|
|
3178
|
+
() => args.rangeDecorationWithoutRowKeysWarning !== void 0 && args.rangeDecorationCount() > 0 && !args.hasRowKeyGetter(),
|
|
3179
|
+
(missing) => {
|
|
3180
|
+
if (missing && args.rangeDecorationWithoutRowKeysWarning !== void 0) {
|
|
3181
|
+
warnOncePerGrid(rangeDecorationsWarned, "rangeDecorationsRowKeyGetter", args.rangeDecorationWithoutRowKeysWarning);
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
);
|
|
3185
|
+
const diffWarned = /* @__PURE__ */ new Set();
|
|
3186
|
+
createChangeEffect(args.diffShowRemovedBlocked, (blocked) => {
|
|
3187
|
+
if (blocked) {
|
|
3188
|
+
warnOncePerGrid(
|
|
3189
|
+
diffWarned,
|
|
3190
|
+
"diffShowRemovedBlocked",
|
|
3191
|
+
"[SpreadsheetGrid] trackChanges \u306E showRemoved \u306F\u884C\u306E\u30B0\u30EB\u30FC\u30D7\u5316(rowGroup)\u30FB\u30E9\u30D9\u30EB\u884C(labelRow)\u30FB\u30C4\u30EA\u30FC\u30C7\u30FC\u30BF(treeData)\u3068\u4E00\u7DD2\u306E\u3068\u304D\u306F\u524A\u9664\u306E\u884C\u3092\u8868\u306B\u51FA\u3057\u307E\u305B\u3093(\u4EF6\u6570\u3068 getChanges() \u306B\u306F\u5165\u308A\u307E\u3059)\u3002\n[SpreadsheetGrid] trackChanges showRemoved does not show removed rows in the grid together with row grouping (rowGroup), label rows (labelRow) or tree data (treeData). They are still counted and returned by getChanges()."
|
|
3192
|
+
);
|
|
3193
|
+
}
|
|
3194
|
+
});
|
|
3066
3195
|
if (!args.filteringAvailable) {
|
|
3067
3196
|
createChangeEffect(
|
|
3068
3197
|
() => args.globalFilterText().trim() !== "" || args.columnFilterCount() > 0,
|
|
@@ -3107,6 +3236,10 @@ import {
|
|
|
3107
3236
|
mayBeMultiSelectColumn
|
|
3108
3237
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
|
|
3109
3238
|
var EMPTY_ROWS = [];
|
|
3239
|
+
var EMPTY_RANGE_DECORATIONS = [];
|
|
3240
|
+
var EMPTY_DECORATION_FRAMES = [];
|
|
3241
|
+
var EMPTY_DIFF_COLUMN_FILTERS = {};
|
|
3242
|
+
var EMPTY_DIFF_SORT = [];
|
|
3110
3243
|
var NEVER_EDITABLE = () => false;
|
|
3111
3244
|
var NO_TREE_DATA_WARNINGS = [];
|
|
3112
3245
|
var NO_COLUMNS = [];
|
|
@@ -3233,7 +3366,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3233
3366
|
const columnFilterEnabled = () => props.enableColumnFilter ?? true;
|
|
3234
3367
|
const enableRowHover = () => props.enableRowHover ?? true;
|
|
3235
3368
|
const enableColumnResize = () => props.enableColumnResize ?? true;
|
|
3236
|
-
const activeRowFollowEnabled = () => (props.activeCellFollows ?? "position") === "row" && !isServerSide();
|
|
3369
|
+
const activeRowFollowEnabled = () => (props.activeCellFollows ?? (diffChangedOnly() ? "row" : "position")) === "row" && !isServerSide();
|
|
3237
3370
|
const enableRowSelection = () => props.enableRowSelection ?? false;
|
|
3238
3371
|
const rowSelectionMode = () => props.rowSelectionMode ?? "multiple";
|
|
3239
3372
|
const enableSelectAllRows = () => props.enableSelectAllRows ?? (enableRowSelection() && rowSelectionMode() === "multiple");
|
|
@@ -3307,6 +3440,27 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3307
3440
|
const viewScrollTop = createMemo10(() => view().scrollTop);
|
|
3308
3441
|
const viewMaxBodyPx = createMemo10(() => view().maxBodyPx);
|
|
3309
3442
|
const newRowDraft = createMemo10(() => view().newRowDraft ?? null);
|
|
3443
|
+
const changeNavRowKey = createMemo10(() => view().changeNavRowKey ?? null);
|
|
3444
|
+
const setChangeNavRow = (rowKey) => {
|
|
3445
|
+
if ((store.getViewState().changeNavRowKey ?? null) !== rowKey || rowKey !== null) {
|
|
3446
|
+
store.setViewState({
|
|
3447
|
+
changeNavRowKey: rowKey,
|
|
3448
|
+
changeNavActiveCell: rowKey === null ? null : store.getState().activeCell
|
|
3449
|
+
});
|
|
3450
|
+
}
|
|
3451
|
+
};
|
|
3452
|
+
connectController(
|
|
3453
|
+
{
|
|
3454
|
+
update: (activeCell) => {
|
|
3455
|
+
if (shouldClearChangeNavMark(store.getViewState(), activeCell)) {
|
|
3456
|
+
setChangeNavRow(null);
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
},
|
|
3460
|
+
() => ui().activeCell,
|
|
3461
|
+
"effect",
|
|
3462
|
+
"changeNavClear"
|
|
3463
|
+
);
|
|
3310
3464
|
const viewSetters = createGridViewSetters(store);
|
|
3311
3465
|
const { setHoveredColumnIndex, setIsCornerHovered, setEditorInitialValue } = viewSetters;
|
|
3312
3466
|
const gridRootRef = { current: null };
|
|
@@ -3454,6 +3608,58 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3454
3608
|
const globalFilterStatus = filterOrder ? filterOrder.globalFilterStatus : () => "idle";
|
|
3455
3609
|
const globalFilterProgress = filterOrder ? filterOrder.globalFilterProgress : () => 1;
|
|
3456
3610
|
const relativeDateKey = filterOrder ? filterOrder.relativeDateKey : () => "";
|
|
3611
|
+
const changeTrackingParts = features.changeTracking;
|
|
3612
|
+
const changeTracker = engine.changeTracker;
|
|
3613
|
+
const rangeDecorationParts = features.rangeDecorations;
|
|
3614
|
+
const rangeDecorationResolver = rangeDecorationParts?.createRangeDecorationResolver() ?? null;
|
|
3615
|
+
const RangeDecorationFrames = rangeDecorationParts?.RangeDecorationFrames;
|
|
3616
|
+
const trackChangesOptions = createMemo10(
|
|
3617
|
+
() => typeof props.trackChanges === "object" && props.trackChanges !== null ? props.trackChanges : null
|
|
3618
|
+
);
|
|
3619
|
+
const diffViewParts = features.diffView;
|
|
3620
|
+
const diffRequested = createMemo10(() => trackChangesOptions()?.baseline !== void 0 && diffViewParts !== void 0);
|
|
3621
|
+
const changeTrackingActive = createMemo10(
|
|
3622
|
+
() => isTrackChangesOn(props.trackChanges) && changeTrackingParts !== void 0 && !isServerSide() && props.rowKeyGetter !== void 0 && (props.onRowsChange != null || diffRequested())
|
|
3623
|
+
);
|
|
3624
|
+
const diffActive = createMemo10(() => changeTrackingActive() && diffRequested());
|
|
3625
|
+
const trackRowChanges = createMemo10(
|
|
3626
|
+
() => changeTrackingActive() && (trackChangesOptions()?.rows === true || diffActive())
|
|
3627
|
+
);
|
|
3628
|
+
const diffShowOriginal = createMemo10(() => diffActive() && trackChangesOptions()?.showOriginal === true);
|
|
3629
|
+
const changeSnapshot = createExternalStoreSignal(changeTracker, "changeTrackerStore");
|
|
3630
|
+
const diffChangedOnly = createMemo10(() => diffActive() && trackChangesOptions()?.changedOnly === true);
|
|
3631
|
+
const diffShowRemovedRequested = createMemo10(() => diffActive() && trackChangesOptions()?.showRemoved === true);
|
|
3632
|
+
const diffShowRemoved = createMemo10(
|
|
3633
|
+
() => diffShowRemovedRequested() && !rowGroupingActive() && !labelRowEnabled() && !treeDataActive()
|
|
3634
|
+
);
|
|
3635
|
+
const diffInfo = createMemo10(() => {
|
|
3636
|
+
if (!diffActive()) {
|
|
3637
|
+
return null;
|
|
3638
|
+
}
|
|
3639
|
+
changeSnapshot();
|
|
3640
|
+
return changeTracker.getDiff?.() ?? null;
|
|
3641
|
+
});
|
|
3642
|
+
const diffStageInputs = createMemo10(() => {
|
|
3643
|
+
const info = diffInfo();
|
|
3644
|
+
const changedOnly = diffChangedOnly();
|
|
3645
|
+
const showRemoved = diffShowRemoved();
|
|
3646
|
+
if (!info || !changedOnly && !showRemoved) {
|
|
3647
|
+
return null;
|
|
3648
|
+
}
|
|
3649
|
+
return {
|
|
3650
|
+
diff: info.result,
|
|
3651
|
+
baselineIndex: info.baselineIndex,
|
|
3652
|
+
changedOnly,
|
|
3653
|
+
showRemoved,
|
|
3654
|
+
filterSortColumns: filterSortColumns(),
|
|
3655
|
+
columnFilters: manualFiltering() || !filteringAvailable ? EMPTY_DIFF_COLUMN_FILTERS : columnFilters(),
|
|
3656
|
+
relativeDateKey: relativeDateKey(),
|
|
3657
|
+
globalFilterColumns: globalFilterColumns(),
|
|
3658
|
+
globalFilterMatch: props.globalFilterMatch ?? "value",
|
|
3659
|
+
globalText: globalFilterEnabled() && !manualFiltering() && filteringAvailable ? globalFilterText() : "",
|
|
3660
|
+
sort: manualSorting() ? EMPTY_DIFF_SORT : ui().sort
|
|
3661
|
+
};
|
|
3662
|
+
});
|
|
3457
3663
|
const orderResolution = createMemo10(
|
|
3458
3664
|
() => engine.rowPipeline.resolveOrder({
|
|
3459
3665
|
rows: rows(),
|
|
@@ -3467,7 +3673,10 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3467
3673
|
manualSorting: manualSorting(),
|
|
3468
3674
|
relativeDateKey: relativeDateKey(),
|
|
3469
3675
|
// 追加(1.9.0 / ツリーデータ): 全体を並べず、絞り込んだ行を rows の順で返します(きょうだいの中で並べるのは木の段)。
|
|
3470
|
-
treeActive: treeDataActive()
|
|
3676
|
+
treeActive: treeDataActive(),
|
|
3677
|
+
// 追加(1.13.0 / 差分の表示): changedOnly で変更のある行だけに絞ります。
|
|
3678
|
+
diff: diffStageInputs(),
|
|
3679
|
+
rowKeyGetter: resolvedRowKeyGetter()
|
|
3471
3680
|
})
|
|
3472
3681
|
);
|
|
3473
3682
|
const filterConditionsActive = () => globalFilterText().trim().length > 0 || Object.keys(columnFilters()).length > 0;
|
|
@@ -3480,7 +3689,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3480
3689
|
globalText: globalFilterEnabled() ? globalFilterText() : "",
|
|
3481
3690
|
columnFilters: columnFilters(),
|
|
3482
3691
|
relativeDateKey: relativeDateKey(),
|
|
3483
|
-
pending: globalFilterStatus() === "filtering"
|
|
3692
|
+
pending: globalFilterStatus() === "filtering",
|
|
3693
|
+
changedOnly: diffChangedOnly()
|
|
3484
3694
|
}) : null
|
|
3485
3695
|
);
|
|
3486
3696
|
const treeOpenState = createMemo10(() => ui().treeOpen);
|
|
@@ -3513,7 +3723,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3513
3723
|
sortActive: !manualSorting() && ui().sort.length > 0,
|
|
3514
3724
|
manualSorting: manualSorting(),
|
|
3515
3725
|
// 追加(1.9.0 / ツリーデータ)
|
|
3516
|
-
tree: treeInputs()
|
|
3726
|
+
tree: treeInputs(),
|
|
3727
|
+
// 追加(1.13.0 / 差分の表示): showRemoved で削除の行を差し込みます。
|
|
3728
|
+
diff: diffStageInputs()
|
|
3517
3729
|
})
|
|
3518
3730
|
);
|
|
3519
3731
|
const treeStage = createMemo10(() => treeDataActive() ? clientRowModel().tree : null);
|
|
@@ -3598,13 +3810,14 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3598
3810
|
const order = () => orderResolution().order;
|
|
3599
3811
|
const groupTree = () => clientRowModel().groupTree;
|
|
3600
3812
|
const labelDisplay = () => clientRowModel().labelDisplay;
|
|
3601
|
-
const
|
|
3813
|
+
const removedViewIndexes = () => clientRowModel().removedViewIndexes;
|
|
3814
|
+
const labelViewIndexes = createMemo10(() => labelDisplay()?.labelViewIndexes ?? removedViewIndexes() ?? void 0);
|
|
3602
3815
|
const leafRowCount = createMemo10(() => {
|
|
3603
3816
|
const tree = treeStage();
|
|
3604
3817
|
if (tree) {
|
|
3605
3818
|
return tree.visibility.matchedCount;
|
|
3606
3819
|
}
|
|
3607
|
-
return clientRowModel().groupedDisplay || clientRowModel().labelDisplay ? order().length : newRowActive() ? viewRowCount() - 1 : viewRowCount();
|
|
3820
|
+
return clientRowModel().groupedDisplay || clientRowModel().labelDisplay || removedViewIndexes() ? order().length : newRowActive() ? viewRowCount() - 1 : viewRowCount();
|
|
3608
3821
|
});
|
|
3609
3822
|
const handleGroupToggle = (groupKey) => dispatch(gridActions.toggleGroupCollapsed(groupKey));
|
|
3610
3823
|
const groupingFeature2 = features.grouping;
|
|
@@ -3622,6 +3835,20 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3622
3835
|
}),
|
|
3623
3836
|
{ name: "clampSelectionToRowCount" }
|
|
3624
3837
|
);
|
|
3838
|
+
createEffect4(
|
|
3839
|
+
() => removedViewIndexes() === null ? null : rowModel(),
|
|
3840
|
+
outsideGraphApply((model) => {
|
|
3841
|
+
if (model === null) {
|
|
3842
|
+
return;
|
|
3843
|
+
}
|
|
3844
|
+
const activeCell = store.getState().activeCell;
|
|
3845
|
+
const row = activeCell === null ? null : resolveRowOffRemovedRow(model, activeCell.row);
|
|
3846
|
+
if (row !== null) {
|
|
3847
|
+
dispatch(gridActions.followActiveRow(row, model.getRowCount()));
|
|
3848
|
+
}
|
|
3849
|
+
}),
|
|
3850
|
+
{ name: "moveActiveCellOffRemovedRow" }
|
|
3851
|
+
);
|
|
3625
3852
|
const autoHeightSnapshot = createExternalStoreSignal(engine.autoHeightMeasurer, "autoHeightStore");
|
|
3626
3853
|
const vertical = createMemo10(
|
|
3627
3854
|
() => engine.resolveVerticalLayout({
|
|
@@ -3662,7 +3889,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3662
3889
|
maxBodyPx: () => viewMaxBodyPx() ?? MAX_BODY_PX,
|
|
3663
3890
|
globalFilterText,
|
|
3664
3891
|
columnFilterCount: () => Object.keys(columnFilters()).length,
|
|
3665
|
-
trackChangesUnavailable: () => !isTrackChangesOn(props.trackChanges) || features.changeTracking === void 0 ? null : isServerSide() ? "serverSide" : props.rowKeyGetter === void 0 ? "rowKeyGetter" : props.onRowsChange == null ? "onRowsChange" : null,
|
|
3892
|
+
trackChangesUnavailable: () => !isTrackChangesOn(props.trackChanges) || features.changeTracking === void 0 ? null : isServerSide() ? "serverSide" : props.rowKeyGetter === void 0 ? "rowKeyGetter" : props.onRowsChange == null && !diffRequested() ? "onRowsChange" : null,
|
|
3666
3893
|
// 追加(1.12.0 / 検索と置換): 置換を serverSide で使った(機能があるときだけ。React 版と同じ条件と文言)。
|
|
3667
3894
|
findReplaceOnServerSide: () => typeof props.find === "object" && props.find !== null && props.find.replace === true && features.find !== void 0 && features.findReplace !== void 0 && isServerSide(),
|
|
3668
3895
|
// 追加(1.10.0 / 入力行): 入力行が出ない理由(機能があり newRow を指定したときだけ。React 版と同じ条件と文言)。
|
|
@@ -3685,6 +3912,13 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3685
3912
|
},
|
|
3686
3913
|
// 追加(1.11.0 / 複数選択): 複数選択の列でこの版では効かない書き方(allowFreeText / fillRow / rowGroup。React 版と同じ)。
|
|
3687
3914
|
multiSelectWarnings: () => describeMultiSelectColumnProblems(props.columns),
|
|
3915
|
+
// 追加(1.13.0 / 差分の表示): showRemoved が効かない組み合わせ(行のグループ化・ラベル行・ツリーデータ)。
|
|
3916
|
+
diffShowRemovedBlocked: () => diffShowRemovedRequested() && !diffShowRemoved(),
|
|
3917
|
+
// 追加(1.13.0 / 範囲の飾り)
|
|
3918
|
+
rangeDecorationCount: () => rangeDecorationResolver ? props.rangeDecorations?.length ?? 0 : 0,
|
|
3919
|
+
rangeDecorationWarnCount: rangeDecorationResolver?.warnCount ?? Number.POSITIVE_INFINITY,
|
|
3920
|
+
rangeDecorationWithoutRowKeysWarning: rangeDecorationResolver?.withoutRowKeysWarning,
|
|
3921
|
+
hasRowKeyGetter: () => props.rowKeyGetter !== void 0,
|
|
3688
3922
|
// 追加(1.9.0 / ツリーデータ): 一緒に使えないもの・効かない理由と、木の形の問題(親のキーが rows に無い行・循環・同じキーの行)。
|
|
3689
3923
|
treeDataWarnings: () => {
|
|
3690
3924
|
const parts = treeDataParts;
|
|
@@ -4422,14 +4656,6 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4422
4656
|
onGutterRowSelect: rowSelectionCommands.handleGutterRowSelect,
|
|
4423
4657
|
onGutterRowSelectDrag: rowSelectionCommands.handleGutterRowSelectDrag
|
|
4424
4658
|
}), "render", "pointer");
|
|
4425
|
-
const changeTrackingParts = features.changeTracking;
|
|
4426
|
-
const changeTracker = engine.changeTracker;
|
|
4427
|
-
const changeTrackingActive = createMemo10(
|
|
4428
|
-
() => isTrackChangesOn(props.trackChanges) && changeTrackingParts !== void 0 && !isServerSide() && props.rowKeyGetter !== void 0 && props.onRowsChange != null
|
|
4429
|
-
);
|
|
4430
|
-
const trackRowChanges = createMemo10(
|
|
4431
|
-
() => changeTrackingActive() && typeof props.trackChanges === "object" && props.trackChanges.rows === true
|
|
4432
|
-
);
|
|
4433
4659
|
const history = createHistoryController();
|
|
4434
4660
|
const historyRowLocator = createMemo10(() => createHistoryRowLocator(rowModel(), treeStage()));
|
|
4435
4661
|
connectController(history, () => ({
|
|
@@ -4463,9 +4689,11 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4463
4689
|
columns: columns(),
|
|
4464
4690
|
rowKeyGetter: props.rowKeyGetter,
|
|
4465
4691
|
applyRows: props.onRowsChange ? history.applyRows : void 0,
|
|
4466
|
-
trackRows: trackRowChanges()
|
|
4692
|
+
trackRows: trackRowChanges(),
|
|
4693
|
+
// 追加(1.13.0 / 差分の表示): baseline と比べる(機能 diffView の突き合わせのランナー)。
|
|
4694
|
+
baseline: diffActive() ? trackChangesOptions()?.baseline : void 0,
|
|
4695
|
+
createRowDiffer: diffViewParts?.createRowDiffer
|
|
4467
4696
|
}), "render", "changeTracker");
|
|
4468
|
-
const changeSnapshot = createExternalStoreSignal(changeTracker, "changeTrackerStore");
|
|
4469
4697
|
connectController(
|
|
4470
4698
|
{ update: (args) => changeTracker.notifyChanges(args.callback) },
|
|
4471
4699
|
() => {
|
|
@@ -4499,17 +4727,41 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4499
4727
|
}
|
|
4500
4728
|
changeSnapshot();
|
|
4501
4729
|
const texts = localeTexts();
|
|
4730
|
+
const diffParts = diffActive() ? diffViewParts : void 0;
|
|
4731
|
+
const diffTexts2 = localeTexts();
|
|
4732
|
+
const formatOriginal = diffShowOriginal() ? diffViewParts?.formatDiffOriginalText : void 0;
|
|
4502
4733
|
return {
|
|
4503
4734
|
getUnsavedCells: changeTracker.getUnsavedCells,
|
|
4504
4735
|
trackedColumns: changeTracker.getTrackedColumns(),
|
|
4505
|
-
describeCell: (column, row, savedValue) => parts.describeUnsavedCell(column, row, savedValue, texts),
|
|
4506
|
-
rowDescription: texts.unsavedRow,
|
|
4736
|
+
describeCell: diffParts ? (column, row, savedValue) => diffParts.describeDiffCell(column, row, savedValue, diffTexts2) : (column, row, savedValue) => parts.describeUnsavedCell(column, row, savedValue, texts),
|
|
4737
|
+
rowDescription: diffParts ? diffTexts2.diffChangedRow : texts.unsavedRow,
|
|
4507
4738
|
closedTreeDescription: texts.unsavedInClosedTreeRow,
|
|
4508
4739
|
// 追加(1.10.0): グリッドで足した行(行を追っているときだけ)。
|
|
4509
4740
|
isAddedRow: trackRowChanges() ? changeTracker.isAddedRow : void 0,
|
|
4510
|
-
addedRowDescription: texts.unsavedAddedRow
|
|
4741
|
+
addedRowDescription: diffParts ? diffTexts2.diffAddedRow : texts.unsavedAddedRow,
|
|
4742
|
+
// 追加(1.13.0 / showOriginal): 変更のセルの前の値。
|
|
4743
|
+
describeOriginal: formatOriginal ? (column, row, savedValue) => formatOriginal(column, row, savedValue, diffTexts2) : void 0
|
|
4511
4744
|
};
|
|
4512
4745
|
});
|
|
4746
|
+
const changeNavAnnouncement = createMemo10(() => view().changeNavAnnouncement ?? "");
|
|
4747
|
+
const announceChangeNav = (target, position, total) => {
|
|
4748
|
+
const parts = diffViewParts;
|
|
4749
|
+
if (!parts || !diffActive()) {
|
|
4750
|
+
return;
|
|
4751
|
+
}
|
|
4752
|
+
const text = parts.describeChangeNavTarget(
|
|
4753
|
+
target,
|
|
4754
|
+
position,
|
|
4755
|
+
total,
|
|
4756
|
+
rowModel(),
|
|
4757
|
+
orderedColumns(),
|
|
4758
|
+
(rowKey, columnKey) => changeTracker.getUnsavedCells(rowKey)?.get(columnKey),
|
|
4759
|
+
localeTexts()
|
|
4760
|
+
);
|
|
4761
|
+
store.setViewState({
|
|
4762
|
+
changeNavAnnouncement: parts.nextChangeNavAnnouncement(store.getViewState().changeNavAnnouncement, text)
|
|
4763
|
+
});
|
|
4764
|
+
};
|
|
4513
4765
|
const closedTreeUnsaved = createMemo10(
|
|
4514
4766
|
() => changeTrackingActive() && treeStage() && (changeSnapshot().rowCount > 0 || changeSnapshot().addedCount > 0) ? engine.rowPipeline.getClosedTreeAncestorKeys(treeOpenState(), changeTracker.getUnsavedRowKeys()) : null
|
|
4515
4767
|
);
|
|
@@ -4772,6 +5024,58 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4772
5024
|
});
|
|
4773
5025
|
});
|
|
4774
5026
|
const findScopeRectsForPane = (pane) => findScopeRects()?.[pane] ?? [];
|
|
5027
|
+
const normalizedRangeDecorations = createMemo10(
|
|
5028
|
+
() => rangeDecorationResolver ? rangeDecorationResolver.normalize(props.rangeDecorations) : EMPTY_RANGE_DECORATIONS
|
|
5029
|
+
);
|
|
5030
|
+
const rangeDecorationVisibleFirstRow = createMemo10(() => {
|
|
5031
|
+
if (!rangeDecorationResolver || normalizedRangeDecorations().length === 0) {
|
|
5032
|
+
return void 0;
|
|
5033
|
+
}
|
|
5034
|
+
const v = vertical();
|
|
5035
|
+
return rangeDecorationResolver.resolveVisibleTop(
|
|
5036
|
+
v.rowMetrics,
|
|
5037
|
+
physicalToLogicalScrollTop(viewScrollTop(), v.verticalScaleFactor)
|
|
5038
|
+
).row;
|
|
5039
|
+
});
|
|
5040
|
+
const rangeDecorationVisibleFirstRowTight = createMemo10(() => {
|
|
5041
|
+
if (!rangeDecorationResolver || normalizedRangeDecorations().length === 0) {
|
|
5042
|
+
return void 0;
|
|
5043
|
+
}
|
|
5044
|
+
const v = vertical();
|
|
5045
|
+
return rangeDecorationResolver.resolveVisibleTop(
|
|
5046
|
+
v.rowMetrics,
|
|
5047
|
+
physicalToLogicalScrollTop(viewScrollTop(), v.verticalScaleFactor)
|
|
5048
|
+
).tight;
|
|
5049
|
+
});
|
|
5050
|
+
const rangeDecorationFrames = createMemo10(() => {
|
|
5051
|
+
const decorations = normalizedRangeDecorations();
|
|
5052
|
+
if (!rangeDecorationResolver || decorations.length === 0) {
|
|
5053
|
+
return null;
|
|
5054
|
+
}
|
|
5055
|
+
const v = vertical();
|
|
5056
|
+
return rangeDecorationResolver.resolveFrames(decorations, {
|
|
5057
|
+
paneLayout: paneLayout(),
|
|
5058
|
+
rowModel: rowModel(),
|
|
5059
|
+
windowFirstRow: v.windowFirstRow,
|
|
5060
|
+
windowLastRow: v.windowLastRow,
|
|
5061
|
+
rowMetrics: v.rowMetrics,
|
|
5062
|
+
detailActive: v.detailActive,
|
|
5063
|
+
detailExtras: v.detailExtras,
|
|
5064
|
+
visibleFirstRow: rangeDecorationVisibleFirstRow(),
|
|
5065
|
+
visibleFirstRowTight: rangeDecorationVisibleFirstRowTight()
|
|
5066
|
+
});
|
|
5067
|
+
});
|
|
5068
|
+
const rangeDecorationFramesForPane = (pane) => rangeDecorationFrames()?.[pane] ?? EMPTY_DECORATION_FRAMES;
|
|
5069
|
+
const activeCellDecorationText = createMemo10(() => {
|
|
5070
|
+
const decorations = normalizedRangeDecorations();
|
|
5071
|
+
const active = ui().activeCell;
|
|
5072
|
+
if (!rangeDecorationResolver || decorations.length === 0 || !active) {
|
|
5073
|
+
return void 0;
|
|
5074
|
+
}
|
|
5075
|
+
const model = rowModel();
|
|
5076
|
+
const rowKey = model.getRow(active.row) != null ? model.getRowKey(active.row) : void 0;
|
|
5077
|
+
return rangeDecorationResolver.describeCell(decorations, rowKey, orderedColumns()[active.col]?.key);
|
|
5078
|
+
});
|
|
4775
5079
|
const filterPopover = features.filtering?.createFilterPopover({
|
|
4776
5080
|
visibleColumns,
|
|
4777
5081
|
columnFilters,
|
|
@@ -4982,6 +5286,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4982
5286
|
handleCut: resolvedExcelShortcuts().cut ? clipboard.handleCut : void 0,
|
|
4983
5287
|
// 追加(1.10.0 / 入力行): 編集していない入力行の Escape は下書きを捨てる。
|
|
4984
5288
|
onEscapeNewRow: newRowActive() ? engine.newRow.discardAt : void 0,
|
|
5289
|
+
// 追加(1.13.0 の実アプリでの点検 RD3-05 / RD5-07): 削除の行に着いた後の ↑ ↓ はその行から(React 版と同じ)。
|
|
5290
|
+
getChangeNavOrigin: diffActive() ? () => resolveChangeNavOrigin(store.getViewState(), store.getState().activeCell, rowModel()) : void 0,
|
|
4985
5291
|
onTabPastNewRowDraft: newRowActive() ? engine.newRow.commitFromLastColumn : void 0,
|
|
4986
5292
|
onShortcutKeyDown: excelShortcutCommandsEnabled() ? engine.excelShortcuts.handleKeyDown : void 0,
|
|
4987
5293
|
openFind: findShortcut() ? openFindFromShortcut : void 0,
|
|
@@ -5449,6 +5755,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5449
5755
|
isServerSide: isServerSide(),
|
|
5450
5756
|
serverSideRefresh: serverSide?.refresh ?? noop3,
|
|
5451
5757
|
serverSideRetryFailed: serverSide?.retryFailedBlocks ?? noop3,
|
|
5758
|
+
serverSideLoading: serverSide?.isLoading,
|
|
5452
5759
|
resolvedRowKeyGetter: resolvedRowKeyGetter(),
|
|
5453
5760
|
isRowExportable: props.isRowExportable,
|
|
5454
5761
|
labelRowExport: labelRowExport(),
|
|
@@ -5479,9 +5786,16 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5479
5786
|
canRedoRows: history.canRedo,
|
|
5480
5787
|
clearUndoHistory: history.clearHistory,
|
|
5481
5788
|
applyRowsChange: props.onRowsChange ? history.applyRows : void 0,
|
|
5789
|
+
// 追加(1.14.0): setCellValues の書いてよいセルの判定と、serverSide の書き込み口(React 版と同じ)。
|
|
5790
|
+
canEditCell: canEditCell(),
|
|
5791
|
+
applyServerSideCellEdits: applyServerSideCellEdits(),
|
|
5482
5792
|
// 追加(1.8.0): 変更の追跡(getChanges / markChangesSaved / revertChanges の委譲先)。
|
|
5483
5793
|
changeTracker,
|
|
5484
5794
|
changeTrackingActive: changeTrackingActive(),
|
|
5795
|
+
// 追加(1.13.0 / 差分の表示): goToNextChange / goToPrevChange(削除の行に動いたら行に目印)。
|
|
5796
|
+
diffActive: diffActive(),
|
|
5797
|
+
setChangeNavRow,
|
|
5798
|
+
announceChangeNav,
|
|
5485
5799
|
// 追加(1.9.0 / ツリーデータ): 木の開閉のハンドル・getState の closedTreeRows・エクスポートの深さ・検索の移動。
|
|
5486
5800
|
treeData: treeApi(),
|
|
5487
5801
|
detailRowEnabled: detailRowEnabled(),
|
|
@@ -5685,6 +5999,37 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5685
5999
|
{customTopBar()}
|
|
5686
6000
|
</Show12>
|
|
5687
6001
|
</Show12>;
|
|
6002
|
+
const removedRowLayer = createMemo10(
|
|
6003
|
+
() => diffShowRemoved() && removedViewIndexes() ? { description: localeTexts().diffRemovedRow } : void 0
|
|
6004
|
+
);
|
|
6005
|
+
const diffTexts = () => localeTexts();
|
|
6006
|
+
const diffCanNavigate = () => {
|
|
6007
|
+
const snapshot2 = changeSnapshot();
|
|
6008
|
+
return snapshot2.cellCount > 0 || snapshot2.addedCount > 0 || diffShowRemoved() && snapshot2.removedCount > 0;
|
|
6009
|
+
};
|
|
6010
|
+
const diffComparing = () => {
|
|
6011
|
+
const info = diffInfo();
|
|
6012
|
+
return info?.result == null || info.running;
|
|
6013
|
+
};
|
|
6014
|
+
const diffBarChip = () => {
|
|
6015
|
+
const parts = diffViewParts;
|
|
6016
|
+
if (!parts) {
|
|
6017
|
+
return null;
|
|
6018
|
+
}
|
|
6019
|
+
const DiffBarChip = parts.DiffBarChip;
|
|
6020
|
+
return <Show12 when={diffActive()}>
|
|
6021
|
+
<DiffBarChip
|
|
6022
|
+
parts={parts.formatDiffSummaryParts(changeSnapshot(), !diffComparing(), diffTexts())}
|
|
6023
|
+
comparingText={diffTexts().diffComparing}
|
|
6024
|
+
separator={diffTexts().unsavedSeparator}
|
|
6025
|
+
prevLabel={diffTexts().diffPrevChange}
|
|
6026
|
+
nextLabel={diffTexts().diffNextChange}
|
|
6027
|
+
canNavigate={diffCanNavigate()}
|
|
6028
|
+
onPrev={engine.gridApi.handle.goToPrevChange}
|
|
6029
|
+
onNext={engine.gridApi.handle.goToNextChange}
|
|
6030
|
+
/>
|
|
6031
|
+
</Show12>;
|
|
6032
|
+
};
|
|
5688
6033
|
const bottomBar = () => <Show12 when={props.showBottomBar ?? true}>
|
|
5689
6034
|
<Show12
|
|
5690
6035
|
when={renderBottomBarFn() !== void 0}
|
|
@@ -5694,7 +6039,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5694
6039
|
showCounts={props.showBottomBarCounts ?? true}
|
|
5695
6040
|
selectionAggregates={selectionAggregates()}
|
|
5696
6041
|
SelectionAggregates={selectionAggregatesFeature2?.SelectionAggregates}
|
|
5697
|
-
unsavedText={changeTrackingParts ? changeTrackingParts.formatUnsavedSummary(unsavedChanges(), localeTexts()) : null}
|
|
6042
|
+
unsavedText={changeTrackingParts && !diffActive() ? changeTrackingParts.formatUnsavedSummary(unsavedChanges(), localeTexts()) : null}
|
|
6043
|
+
diffChip={diffBarChip()}
|
|
5698
6044
|
/>}
|
|
5699
6045
|
>
|
|
5700
6046
|
{customBottomBar()}
|
|
@@ -5800,7 +6146,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5800
6146
|
return <Show12 when={draggable()}>
|
|
5801
6147
|
<RowDragHandle2
|
|
5802
6148
|
operable={rowDragOperable()}
|
|
5803
|
-
tooltip={rowDragOperable() ? rowDragTexts().dragRow : rowDragTexts().dragRowDisabled}
|
|
6149
|
+
tooltip={rowDragOperable() ? rowDragTexts().dragRow : orderResolution().rowDragBlockedByRemovedRows ? rowDragTexts().dragRowDisabledRemoved : rowDragTexts().dragRowDisabled}
|
|
5804
6150
|
onPointerDown={(event) => rowDrag.onRowDragHandlePointerDown(untrack13(() => cell.rowIndex), event)}
|
|
5805
6151
|
/>
|
|
5806
6152
|
</Show12>;
|
|
@@ -6210,6 +6556,15 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6210
6556
|
}}
|
|
6211
6557
|
>
|
|
6212
6558
|
{
|
|
6559
|
+
/* 追加(1.13.0 / 範囲の飾り): 行と列のキーの範囲の枠と名札(選択の枠より下。React 版と同じ)。 */
|
|
6560
|
+
}
|
|
6561
|
+
{RangeDecorationFrames ? <RangeDecorationFrames
|
|
6562
|
+
frames={rangeDecorationFramesForPane(pane)}
|
|
6563
|
+
headerHeight={headerHeight()}
|
|
6564
|
+
leadingWidth={leadingWidth()}
|
|
6565
|
+
baseOffset={vertical().overlayBaseOffset}
|
|
6566
|
+
/> : null}
|
|
6567
|
+
{
|
|
6213
6568
|
/* 追加(1.12.0 / 検索と置換): 「選んだ範囲だけ」の範囲の色(選択の枠より下。React 版と同じ)。 */
|
|
6214
6569
|
}
|
|
6215
6570
|
{findReplaceFeature2 ? (() => {
|
|
@@ -6317,6 +6672,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6317
6672
|
labelViewIndexes={labelViewIndexes()}
|
|
6318
6673
|
newRowLayer={newRowLayer()}
|
|
6319
6674
|
newRowDraft={newRowDraft()}
|
|
6675
|
+
removedRowLayer={removedRowLayer()}
|
|
6676
|
+
changeNavRowKey={changeNavRowKey()}
|
|
6677
|
+
activeCellDecorationText={activeCellDecorationText()}
|
|
6320
6678
|
rowHeaderWidth={rowHeaderWidth()}
|
|
6321
6679
|
rows={bodyRows()}
|
|
6322
6680
|
entries={entries()}
|
|
@@ -6382,7 +6740,17 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6382
6740
|
</div>;
|
|
6383
6741
|
};
|
|
6384
6742
|
const activeDescendantId = () => activeCellRendered() ? activeCellDomId : void 0;
|
|
6385
|
-
const
|
|
6743
|
+
const diffEmptyText = () => {
|
|
6744
|
+
if (!diffChangedOnly() || rows().length === 0) {
|
|
6745
|
+
return null;
|
|
6746
|
+
}
|
|
6747
|
+
if (diffComparing()) {
|
|
6748
|
+
return diffTexts().diffComparing;
|
|
6749
|
+
}
|
|
6750
|
+
const snapshot2 = changeSnapshot();
|
|
6751
|
+
return snapshot2.cellCount + snapshot2.addedCount + snapshot2.removedCount === 0 ? diffTexts().diffNoChanges : null;
|
|
6752
|
+
};
|
|
6753
|
+
const emptyStateText = () => (isServerSide() ? !filterConditionsActive() : rows().length === 0 && !manualFilterActive()) ? props.noRowsText ?? localeTexts().noRows : diffEmptyText() ?? props.noMatchingRowsText ?? localeTexts().noMatchingRows;
|
|
6386
6754
|
const rootStyle = () => ({
|
|
6387
6755
|
...toSolidStyle(heightLayout().rootStyle),
|
|
6388
6756
|
...slots().root?.style,
|
|
@@ -6402,9 +6770,13 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6402
6770
|
"ssg-root--selecting": ui().dragState?.type === "selection",
|
|
6403
6771
|
"ssg-root--filling": fill?.filling() ?? false,
|
|
6404
6772
|
"ssg-root--animate-rows": animateRowsActive(),
|
|
6773
|
+
// 追加(1.13.0 のレビュー DA-5): 列の幅を引いている間(範囲の飾りの枠を滑らせない)。
|
|
6774
|
+
"ssg-root--resizing-column": ui().dragState?.type === "columnResize",
|
|
6405
6775
|
"ssg-root--dim-readonly": props.dimReadOnlyCells ?? false,
|
|
6406
6776
|
// 追加(1.5.0 / serverSideRefetch="keep"): 取り直しの間に前の行を見せている(行を薄くする)。
|
|
6407
6777
|
"ssg-root--refetching": refetchingRows(),
|
|
6778
|
+
// 追加(1.13.0 / 差分の表示): baseline と比べている(変更のセル・追加の行・削除の行を色で塗る。ユーザー判断 C)。
|
|
6779
|
+
"ssg-root--diff": diffActive(),
|
|
6408
6780
|
"ssg-root--fill-height": heightLayout().fillParent,
|
|
6409
6781
|
// クロスヘア(列見出し / 行番号を選択の色で染める。列の帯は ColumnHoverOverlay)。
|
|
6410
6782
|
"ssg-root--hover-cross": hoverCross()
|
|
@@ -6599,6 +6971,14 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6599
6971
|
</div>
|
|
6600
6972
|
</Show12>
|
|
6601
6973
|
{
|
|
6974
|
+
/* 追加(1.13.0 の実アプリでの点検 RD4-02): ▲ ▼ で回った先の読み上げ(見た目には出さない。差分の表示の間だけ置く)。 */
|
|
6975
|
+
}
|
|
6976
|
+
<Show12 when={diffActive() && diffViewParts !== void 0}>
|
|
6977
|
+
<span class="ssg-visually-hidden" aria-live="polite" aria-atomic="true">
|
|
6978
|
+
{changeNavAnnouncement()}
|
|
6979
|
+
</span>
|
|
6980
|
+
</Show12>
|
|
6981
|
+
{
|
|
6602
6982
|
/* グローバルフィルターの適用中の overlay(しきい値を超える表の時間分割の間だけ。pointer-events: none)。 */
|
|
6603
6983
|
}
|
|
6604
6984
|
<Show12 when={globalFilterStatus() === "filtering"}>
|
|
@@ -9769,6 +10149,8 @@ function createServerSide(args) {
|
|
|
9769
10149
|
requestRange,
|
|
9770
10150
|
refresh: controller.refresh,
|
|
9771
10151
|
retryFailedBlocks: controller.retryFailedBlocks,
|
|
10152
|
+
// 追加(1.14.0): サーバーから読んでいる間か(getRowCounts の loading)。
|
|
10153
|
+
isLoading: controller.isLoading,
|
|
9772
10154
|
// 書き戻し先(dataSource.updateRows)があるか。無い間はシェルがすべてのセルを編集できないようにする。
|
|
9773
10155
|
canUpdateRows: createMemo26(() => args().dataSource?.updateRows !== void 0),
|
|
9774
10156
|
applyCellEdits: controller.applyCellEdits
|
|
@@ -11746,6 +12128,141 @@ var changeTrackingFeature = {
|
|
|
11746
12128
|
localeText: DEFAULT_CHANGE_TRACKING_LOCALE_TEXT
|
|
11747
12129
|
};
|
|
11748
12130
|
|
|
12131
|
+
// src/features/diffView.ts
|
|
12132
|
+
import { createRowDiffer } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/rowDiffer";
|
|
12133
|
+
import { createDiffStage } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/diffStage";
|
|
12134
|
+
import { collectChangeTargets } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/changeNavigation";
|
|
12135
|
+
import {
|
|
12136
|
+
describeChangeNavTarget,
|
|
12137
|
+
describeDiffCell,
|
|
12138
|
+
formatDiffOriginalText,
|
|
12139
|
+
formatDiffSummaryParts,
|
|
12140
|
+
nextChangeNavAnnouncement
|
|
12141
|
+
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/diffView";
|
|
12142
|
+
import { DEFAULT_DIFF_VIEW_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
12143
|
+
|
|
12144
|
+
// src/view/GridDiffBar.tsx
|
|
12145
|
+
import { For as For19, Show as Show33 } from "solid-js";
|
|
12146
|
+
var keepFocus = (event, run) => {
|
|
12147
|
+
const button = event.currentTarget;
|
|
12148
|
+
run();
|
|
12149
|
+
if (button.isConnected && button.ownerDocument.activeElement !== button) {
|
|
12150
|
+
button.focus({ preventScroll: true });
|
|
12151
|
+
}
|
|
12152
|
+
};
|
|
12153
|
+
function GridDiffBarChip(props) {
|
|
12154
|
+
return <>
|
|
12155
|
+
<span class="ssg-bar-chip ssg-bar-chip--diff">
|
|
12156
|
+
<Show33 when={props.parts} fallback={props.comparingText}>
|
|
12157
|
+
{(parts) => <For19 each={parts()} keyed={(part) => part.kind}>
|
|
12158
|
+
{(part, index) => <span class="ssg-bar-diff-part" data-kind={part().kind}>
|
|
12159
|
+
<Show33 when={index() > 0}>
|
|
12160
|
+
<span class="ssg-bar-diff-sep">{props.separator}</span>
|
|
12161
|
+
</Show33>
|
|
12162
|
+
<span class="ssg-bar-diff-count">{part().text}</span>
|
|
12163
|
+
</span>}
|
|
12164
|
+
</For19>}
|
|
12165
|
+
</Show33>
|
|
12166
|
+
</span>
|
|
12167
|
+
<span class="ssg-bar-diff-nav">
|
|
12168
|
+
<button
|
|
12169
|
+
type="button"
|
|
12170
|
+
class="ssg-bar-diff-nav-btn"
|
|
12171
|
+
aria-label={props.prevLabel}
|
|
12172
|
+
data-ssg-tooltip={props.prevLabel}
|
|
12173
|
+
disabled={!props.canNavigate}
|
|
12174
|
+
onClick={(event) => keepFocus(event, props.onPrev)}
|
|
12175
|
+
>
|
|
12176
|
+
<span aria-hidden="true">{"\u25B2"}</span>
|
|
12177
|
+
</button>
|
|
12178
|
+
<button
|
|
12179
|
+
type="button"
|
|
12180
|
+
class="ssg-bar-diff-nav-btn"
|
|
12181
|
+
aria-label={props.nextLabel}
|
|
12182
|
+
data-ssg-tooltip={props.nextLabel}
|
|
12183
|
+
disabled={!props.canNavigate}
|
|
12184
|
+
onClick={(event) => keepFocus(event, props.onNext)}
|
|
12185
|
+
>
|
|
12186
|
+
<span aria-hidden="true">{"\u25BC"}</span>
|
|
12187
|
+
</button>
|
|
12188
|
+
</span>
|
|
12189
|
+
</>;
|
|
12190
|
+
}
|
|
12191
|
+
|
|
12192
|
+
// src/features/diffView.ts
|
|
12193
|
+
var diffViewFeature = {
|
|
12194
|
+
createRowDiffer,
|
|
12195
|
+
createDiffStage,
|
|
12196
|
+
collectChangeTargets,
|
|
12197
|
+
describeDiffCell,
|
|
12198
|
+
formatDiffOriginalText,
|
|
12199
|
+
formatDiffSummaryParts,
|
|
12200
|
+
describeChangeNavTarget,
|
|
12201
|
+
nextChangeNavAnnouncement,
|
|
12202
|
+
DiffBarChip: GridDiffBarChip,
|
|
12203
|
+
localeText: DEFAULT_DIFF_VIEW_LOCALE_TEXT
|
|
12204
|
+
};
|
|
12205
|
+
|
|
12206
|
+
// src/features/rangeDecorations.ts
|
|
12207
|
+
import { createRangeDecorationResolver } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/rangeDecorations";
|
|
12208
|
+
|
|
12209
|
+
// src/view/GridRangeDecorations.tsx
|
|
12210
|
+
import { For as For20, Show as Show34, createMemo as createMemo33 } from "solid-js";
|
|
12211
|
+
function GridRangeDecorationFrames(props) {
|
|
12212
|
+
return <For20 each={props.frames} keyed={(frame2) => frame2.key}>
|
|
12213
|
+
{(frame2) => {
|
|
12214
|
+
const label = createMemo33(() => frame2().label);
|
|
12215
|
+
return <div
|
|
12216
|
+
aria-hidden="true"
|
|
12217
|
+
data-ssg-range-decoration={frame2().id}
|
|
12218
|
+
class={[
|
|
12219
|
+
"ssg-range-decoration",
|
|
12220
|
+
{
|
|
12221
|
+
"ssg-range-decoration--fill": frame2().fill,
|
|
12222
|
+
"ssg-range-decoration--dashed": frame2().dashed,
|
|
12223
|
+
"ssg-range-decoration--open-left": frame2().openLeft,
|
|
12224
|
+
"ssg-range-decoration--open-right": frame2().openRight,
|
|
12225
|
+
"ssg-range-decoration--open-top": frame2().openTop,
|
|
12226
|
+
"ssg-range-decoration--open-bottom": frame2().openBottom
|
|
12227
|
+
}
|
|
12228
|
+
]}
|
|
12229
|
+
style={{
|
|
12230
|
+
position: "absolute",
|
|
12231
|
+
left: px(props.leadingWidth + frame2().rect.left),
|
|
12232
|
+
top: px(props.headerHeight + frame2().rect.top - props.baseOffset),
|
|
12233
|
+
width: px(frame2().rect.width),
|
|
12234
|
+
height: px(frame2().rect.height),
|
|
12235
|
+
"--ssg-range-decoration-color": frame2().color
|
|
12236
|
+
}}
|
|
12237
|
+
>
|
|
12238
|
+
<Show34 when={label()}>
|
|
12239
|
+
{(current) => <span
|
|
12240
|
+
class={[
|
|
12241
|
+
"ssg-range-decoration-label",
|
|
12242
|
+
{
|
|
12243
|
+
"ssg-range-decoration-label--right": current().side === "right",
|
|
12244
|
+
"ssg-range-decoration-label--inside": current().inside
|
|
12245
|
+
}
|
|
12246
|
+
]}
|
|
12247
|
+
style={{
|
|
12248
|
+
"--ssg-range-decoration-label-color": current().color,
|
|
12249
|
+
top: current().offsetTop > 0 ? px(current().offsetTop + 1) : void 0
|
|
12250
|
+
}}
|
|
12251
|
+
>
|
|
12252
|
+
{current().text}
|
|
12253
|
+
</span>}
|
|
12254
|
+
</Show34>
|
|
12255
|
+
</div>;
|
|
12256
|
+
}}
|
|
12257
|
+
</For20>;
|
|
12258
|
+
}
|
|
12259
|
+
|
|
12260
|
+
// src/features/rangeDecorations.ts
|
|
12261
|
+
var rangeDecorationsFeature = {
|
|
12262
|
+
createRangeDecorationResolver,
|
|
12263
|
+
RangeDecorationFrames: GridRangeDecorationFrames
|
|
12264
|
+
};
|
|
12265
|
+
|
|
11749
12266
|
// src/features/excelShortcuts.ts
|
|
11750
12267
|
import { createExcelShortcutCommands } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/excelShortcutCommands";
|
|
11751
12268
|
var excelShortcutsFeature = {
|
|
@@ -11774,7 +12291,7 @@ import { createTreeStage } from "@ishibashi0112/spreadsheet-grid-core/internal/e
|
|
|
11774
12291
|
import { DEFAULT_TREE_DATA_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
11775
12292
|
|
|
11776
12293
|
// src/view/GridTreeCell.tsx
|
|
11777
|
-
import { createMemo as
|
|
12294
|
+
import { createMemo as createMemo34, Show as Show35 } from "solid-js";
|
|
11778
12295
|
import { formatLocaleText as formatLocaleText18 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
11779
12296
|
import {
|
|
11780
12297
|
formatTotalRowCellText as formatTotalRowCellText2,
|
|
@@ -11782,21 +12299,21 @@ import {
|
|
|
11782
12299
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
|
|
11783
12300
|
function GridTreeCellPrefix(props) {
|
|
11784
12301
|
const texts = useFeatureLocaleText();
|
|
11785
|
-
const label =
|
|
12302
|
+
const label = createMemo34(() => {
|
|
11786
12303
|
const name = props.rowLabel.trim();
|
|
11787
12304
|
return formatLocaleText18(props.open ? texts().collapseTreeRow : texts().expandTreeRow, {
|
|
11788
12305
|
row: name !== "" ? name : formatLocaleText18(texts().treeRowNumber, { row: props.rowNumber })
|
|
11789
12306
|
});
|
|
11790
12307
|
});
|
|
11791
12308
|
return <>
|
|
11792
|
-
<
|
|
12309
|
+
<Show35 when={props.level > 0}>
|
|
11793
12310
|
<span
|
|
11794
12311
|
aria-hidden="true"
|
|
11795
12312
|
class="ssg-tree-indent"
|
|
11796
12313
|
style={{ width: `calc(var(--ssg-tree-indent) * ${props.level})` }}
|
|
11797
12314
|
/>
|
|
11798
|
-
</
|
|
11799
|
-
<
|
|
12315
|
+
</Show35>
|
|
12316
|
+
<Show35 when={props.hasChildren} fallback={<span aria-hidden="true" class="ssg-tree-spacer" />}>
|
|
11800
12317
|
<button
|
|
11801
12318
|
type="button"
|
|
11802
12319
|
tabindex={-1}
|
|
@@ -11817,28 +12334,28 @@ function GridTreeCellPrefix(props) {
|
|
|
11817
12334
|
>
|
|
11818
12335
|
{props.open ? "\u25BE" : "\u25B8"}
|
|
11819
12336
|
</button>
|
|
11820
|
-
</
|
|
12337
|
+
</Show35>
|
|
11821
12338
|
</>;
|
|
11822
12339
|
}
|
|
11823
12340
|
function GridTreeAggregateValue(props) {
|
|
11824
12341
|
const texts = useFeatureLocaleText();
|
|
11825
|
-
const shown =
|
|
12342
|
+
const shown = createMemo34(() => {
|
|
11826
12343
|
const column = props.column;
|
|
11827
12344
|
const kind = typeof column.aggFunc === "string" ? column.aggFunc : "custom";
|
|
11828
12345
|
const text = formatTotalRowCellText2(column, { value: props.value, kind });
|
|
11829
12346
|
return text === "" ? null : { text, caption: resolveTotalRowCaption2(kind, texts()) };
|
|
11830
12347
|
});
|
|
11831
|
-
return <
|
|
12348
|
+
return <Show35 when={shown()}>
|
|
11832
12349
|
{(current) => <span
|
|
11833
12350
|
class="ssg-group-value ssg-tree-aggregate"
|
|
11834
12351
|
data-ssg-tooltip-overflow={current().caption !== void 0 ? `${current().caption} ${current().text}` : current().text}
|
|
11835
12352
|
>
|
|
11836
|
-
<
|
|
12353
|
+
<Show35 when={current().caption !== void 0}>
|
|
11837
12354
|
<span class="ssg-group-caption">{current().caption}</span>
|
|
11838
|
-
</
|
|
12355
|
+
</Show35>
|
|
11839
12356
|
{current().text}
|
|
11840
12357
|
</span>}
|
|
11841
|
-
</
|
|
12358
|
+
</Show35>;
|
|
11842
12359
|
}
|
|
11843
12360
|
|
|
11844
12361
|
// src/features/treeData.ts
|
|
@@ -11858,7 +12375,7 @@ var treeDataFeature = {
|
|
|
11858
12375
|
import { DEFAULT_AGGREGATES_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
11859
12376
|
|
|
11860
12377
|
// src/primitives/selectionAggregates.ts
|
|
11861
|
-
import { createMemo as
|
|
12378
|
+
import { createMemo as createMemo35 } from "solid-js";
|
|
11862
12379
|
import {
|
|
11863
12380
|
createSelectionAggregatesRunner,
|
|
11864
12381
|
resolveSyncSelectionAggregates,
|
|
@@ -11870,15 +12387,15 @@ import {
|
|
|
11870
12387
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionAggregates";
|
|
11871
12388
|
function createSelectionAggregates(args) {
|
|
11872
12389
|
const stabilizeTarget = createSelectionAggregateTargetStabilizer();
|
|
11873
|
-
const target =
|
|
12390
|
+
const target = createMemo35(() => {
|
|
11874
12391
|
const current = args();
|
|
11875
12392
|
return stabilizeTarget(
|
|
11876
12393
|
current.enabled ? resolveSelectionAggregateTarget(current.selection, current.viewRowCount, current.orderedColumns) : null
|
|
11877
12394
|
);
|
|
11878
12395
|
});
|
|
11879
|
-
const rowModel =
|
|
11880
|
-
const key =
|
|
11881
|
-
const syncResult =
|
|
12396
|
+
const rowModel = createMemo35(() => args().rowModel);
|
|
12397
|
+
const key = createMemo35(() => ({ rowModel: rowModel(), target: target() }));
|
|
12398
|
+
const syncResult = createMemo35(() => resolveSyncSelectionAggregates(key()));
|
|
11882
12399
|
const runner = createSelectionAggregatesRunner();
|
|
11883
12400
|
connectController(
|
|
11884
12401
|
runner,
|
|
@@ -11887,16 +12404,16 @@ function createSelectionAggregates(args) {
|
|
|
11887
12404
|
"selectionAggregates"
|
|
11888
12405
|
);
|
|
11889
12406
|
const snapshot2 = createExternalStoreSignal(runner, "selectionAggregatesStore");
|
|
11890
|
-
return
|
|
12407
|
+
return createMemo35(() => selectSelectionAggregatesResult(syncResult(), snapshot2(), key()));
|
|
11891
12408
|
}
|
|
11892
12409
|
|
|
11893
12410
|
// src/view/GridSelectionAggregates.tsx
|
|
11894
|
-
import { For as
|
|
12411
|
+
import { For as For21, Show as Show36, createMemo as createMemo36 } from "solid-js";
|
|
11895
12412
|
import { formatSelectionAggregateNumber } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionAggregates";
|
|
11896
12413
|
import { formatLocaleText as formatLocaleText19 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
11897
12414
|
function GridSelectionAggregates(props) {
|
|
11898
12415
|
const texts = useFeatureLocaleText();
|
|
11899
|
-
const chips =
|
|
12416
|
+
const chips = createMemo36(() => {
|
|
11900
12417
|
const aggregates = props.aggregates;
|
|
11901
12418
|
if (!aggregates) {
|
|
11902
12419
|
return null;
|
|
@@ -11929,12 +12446,12 @@ function GridSelectionAggregates(props) {
|
|
|
11929
12446
|
}
|
|
11930
12447
|
return list;
|
|
11931
12448
|
});
|
|
11932
|
-
return <
|
|
12449
|
+
return <Show36 when={chips()}>
|
|
11933
12450
|
{(list) => <div class={["ssg-bar-aggregates", { "ssg-bar-aggregates--trailing": props.trailing }]}>
|
|
11934
12451
|
<div class="ssg-bar-aggregates-inner" title={list().map((chip) => chip.text).join(" ")}>
|
|
11935
12452
|
<div class="ssg-bar-aggregates-list">
|
|
11936
12453
|
<span class="ssg-bar-aggregates-fit" aria-hidden="true" />
|
|
11937
|
-
<
|
|
12454
|
+
<For21 each={list()} keyed={(chip) => chip.key}>
|
|
11938
12455
|
{(chip, index) => <span
|
|
11939
12456
|
class={[
|
|
11940
12457
|
"ssg-bar-chip",
|
|
@@ -11945,16 +12462,16 @@ function GridSelectionAggregates(props) {
|
|
|
11945
12462
|
]}
|
|
11946
12463
|
style={{ order: String(-index()) }}
|
|
11947
12464
|
>
|
|
11948
|
-
<
|
|
12465
|
+
<Show36 when={chip().label !== void 0} fallback={chip().text}>
|
|
11949
12466
|
{chip().label}
|
|
11950
12467
|
<b class="ssg-bar-aggregate-value">{chip().value}</b>
|
|
11951
|
-
</
|
|
12468
|
+
</Show36>
|
|
11952
12469
|
</span>}
|
|
11953
|
-
</
|
|
12470
|
+
</For21>
|
|
11954
12471
|
</div>
|
|
11955
12472
|
</div>
|
|
11956
12473
|
</div>}
|
|
11957
|
-
</
|
|
12474
|
+
</Show36>;
|
|
11958
12475
|
}
|
|
11959
12476
|
|
|
11960
12477
|
// src/features/selectionAggregates.ts
|
|
@@ -11965,7 +12482,7 @@ var selectionAggregatesFeature = {
|
|
|
11965
12482
|
};
|
|
11966
12483
|
|
|
11967
12484
|
// src/primitives/toolPanel.ts
|
|
11968
|
-
import { createMemo as
|
|
12485
|
+
import { createMemo as createMemo37 } from "solid-js";
|
|
11969
12486
|
import {
|
|
11970
12487
|
createToolPanelController,
|
|
11971
12488
|
resolveActiveToolPanelTab,
|
|
@@ -11984,7 +12501,7 @@ function createToolPanel(inputs) {
|
|
|
11984
12501
|
onSuppressedEscape: inputs.onSuppressedEscape
|
|
11985
12502
|
}), "render", "toolPanel");
|
|
11986
12503
|
const snapshot2 = createExternalStoreSignal(controller, "toolPanelStore");
|
|
11987
|
-
const availableTabs =
|
|
12504
|
+
const availableTabs = createMemo37(
|
|
11988
12505
|
() => resolveAvailableToolPanelTabs({
|
|
11989
12506
|
canUseFilterTab: inputs.canUseFilterTab(),
|
|
11990
12507
|
canUseColumnsTab: inputs.canUseColumnsTab(),
|
|
@@ -11993,10 +12510,10 @@ function createToolPanel(inputs) {
|
|
|
11993
12510
|
{ equals: sameTabs }
|
|
11994
12511
|
);
|
|
11995
12512
|
return {
|
|
11996
|
-
activeTab:
|
|
12513
|
+
activeTab: createMemo37(() => resolveActiveToolPanelTab(snapshot2().requestedTab, availableTabs())),
|
|
11997
12514
|
availableTabs,
|
|
11998
|
-
layout:
|
|
11999
|
-
flashTick:
|
|
12515
|
+
layout: createMemo37(() => snapshot2().layout),
|
|
12516
|
+
flashTick: createMemo37(() => snapshot2().flashTick),
|
|
12000
12517
|
panelRef: controller.panelRef,
|
|
12001
12518
|
open: controller.open,
|
|
12002
12519
|
close: controller.close,
|
|
@@ -12020,7 +12537,7 @@ import {
|
|
|
12020
12537
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
|
|
12021
12538
|
|
|
12022
12539
|
// src/view/GridTotalRow.tsx
|
|
12023
|
-
import { For as
|
|
12540
|
+
import { For as For22, Show as Show37, createMemo as createMemo38 } from "solid-js";
|
|
12024
12541
|
import {
|
|
12025
12542
|
formatTotalRowCellText as formatTotalRowCellText3,
|
|
12026
12543
|
resolveTotalRowCaption as resolveTotalRowCaption3
|
|
@@ -12047,7 +12564,7 @@ function GridTotalRow(props) {
|
|
|
12047
12564
|
...props.stickyBottom > 0 ? { bottom: px(props.stickyBottom) } : null
|
|
12048
12565
|
}}
|
|
12049
12566
|
>
|
|
12050
|
-
<
|
|
12567
|
+
<Show37 when={props.ownsRowHeader}>
|
|
12051
12568
|
<div
|
|
12052
12569
|
role={rowHeaderIsCell() ? "rowheader" : void 0}
|
|
12053
12570
|
aria-colindex={rowHeaderIsCell() ? 1 : void 0}
|
|
@@ -12062,13 +12579,13 @@ function GridTotalRow(props) {
|
|
|
12062
12579
|
>
|
|
12063
12580
|
{rowHeaderText() === "" ? null : rowHeaderText()}
|
|
12064
12581
|
</div>
|
|
12065
|
-
</
|
|
12066
|
-
<
|
|
12582
|
+
</Show37>
|
|
12583
|
+
<For22 each={props.entries} keyed={(entry) => entry.column.key}>
|
|
12067
12584
|
{(entry) => {
|
|
12068
|
-
const unbound =
|
|
12585
|
+
const unbound = createMemo38(() => entry().column);
|
|
12069
12586
|
const cell = () => props.cells.get(unbound().key);
|
|
12070
12587
|
const isLabelCell = () => unbound().key === props.labelColumnKey;
|
|
12071
|
-
const content =
|
|
12588
|
+
const content = createMemo38(() => {
|
|
12072
12589
|
const total = cell();
|
|
12073
12590
|
if (total) {
|
|
12074
12591
|
const column = unbound();
|
|
@@ -12120,7 +12637,7 @@ function GridTotalRow(props) {
|
|
|
12120
12637
|
{content()}
|
|
12121
12638
|
</div>;
|
|
12122
12639
|
}}
|
|
12123
|
-
</
|
|
12640
|
+
</For22>
|
|
12124
12641
|
</div>
|
|
12125
12642
|
</>;
|
|
12126
12643
|
}
|
|
@@ -12153,6 +12670,8 @@ var fullGridFeatures = {
|
|
|
12153
12670
|
dateTimeEditors: dateTimeEditorsFeature,
|
|
12154
12671
|
multiSelect: multiSelectFeature,
|
|
12155
12672
|
changeTracking: changeTrackingFeature,
|
|
12673
|
+
diffView: diffViewFeature,
|
|
12674
|
+
rangeDecorations: rangeDecorationsFeature,
|
|
12156
12675
|
excelShortcuts: excelShortcutsFeature,
|
|
12157
12676
|
newRow: newRowFeature,
|
|
12158
12677
|
treeData: treeDataFeature,
|
|
@@ -12200,6 +12719,7 @@ export {
|
|
|
12200
12719
|
contextMenuFeature,
|
|
12201
12720
|
createSpreadsheetGrid,
|
|
12202
12721
|
dateTimeEditorsFeature,
|
|
12722
|
+
diffViewFeature,
|
|
12203
12723
|
excelShortcutsFeature,
|
|
12204
12724
|
exportFeature,
|
|
12205
12725
|
fillHandleFeature,
|
|
@@ -12216,6 +12736,7 @@ export {
|
|
|
12216
12736
|
numberParser,
|
|
12217
12737
|
pinnedRowsFeature,
|
|
12218
12738
|
preloadGridPopups,
|
|
12739
|
+
rangeDecorationsFeature,
|
|
12219
12740
|
restoreColumnsFromState,
|
|
12220
12741
|
richCopyFeature,
|
|
12221
12742
|
rowDragFeature,
|