@ishibashi0112/spreadsheet-grid-solid 1.12.0 → 1.13.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.
@@ -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 row = isEntry ? () => props.newRowLayer ? props.newRowDraft?.draft ?? EMPTY_NEW_ROW : void 0 : () => props.rowModel.getRow(rowIndex());
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(() => props.activeCell?.row === rowIndex() ? props.activeCell.col : -1);
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(() => props.editingCell?.row === rowIndex() ? props.editingCell.col : -1);
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() ?? void 0}
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
- {unsavedMark}
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 decorOff = newRowSynthetic ? () => true : newRowBlank;
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 cellChildren = plain ? () => props.renderCellContent(currentRow, column(), cellState) : () => <>
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, column(), cellState)}
1356
+ fallback={props.renderCellContent(currentRow, contentColumn(), cellState)}
1288
1357
  >
1289
1358
  <div class="ssg-autoheight-content" data-autoheight-content="">
1290
- {props.renderCellContent(currentRow, column(), cellState)}
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() ?? void 0}
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
- {unsavedMark}
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
- (props.isWholeGridSelected && !isEntry || isRowSelected()) && "ssg-header-cell--selected",
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
- {newRowState ? (
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 = () => <Show10 when={props.unsavedText}>
2670
- {(text) => <span class="ssg-bar-chip ssg-bar-chip--unsaved">{text()}</span>}
2671
- </Show10>;
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 labelViewIndexes = createMemo10(() => labelDisplay()?.labelViewIndexes);
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,
@@ -5482,6 +5788,10 @@ function GridShellBody(props, features, mountGate, mode) {
5482
5788
  // 追加(1.8.0): 変更の追跡(getChanges / markChangesSaved / revertChanges の委譲先)。
5483
5789
  changeTracker,
5484
5790
  changeTrackingActive: changeTrackingActive(),
5791
+ // 追加(1.13.0 / 差分の表示): goToNextChange / goToPrevChange(削除の行に動いたら行に目印)。
5792
+ diffActive: diffActive(),
5793
+ setChangeNavRow,
5794
+ announceChangeNav,
5485
5795
  // 追加(1.9.0 / ツリーデータ): 木の開閉のハンドル・getState の closedTreeRows・エクスポートの深さ・検索の移動。
5486
5796
  treeData: treeApi(),
5487
5797
  detailRowEnabled: detailRowEnabled(),
@@ -5685,6 +5995,37 @@ function GridShellBody(props, features, mountGate, mode) {
5685
5995
  {customTopBar()}
5686
5996
  </Show12>
5687
5997
  </Show12>;
5998
+ const removedRowLayer = createMemo10(
5999
+ () => diffShowRemoved() && removedViewIndexes() ? { description: localeTexts().diffRemovedRow } : void 0
6000
+ );
6001
+ const diffTexts = () => localeTexts();
6002
+ const diffCanNavigate = () => {
6003
+ const snapshot2 = changeSnapshot();
6004
+ return snapshot2.cellCount > 0 || snapshot2.addedCount > 0 || diffShowRemoved() && snapshot2.removedCount > 0;
6005
+ };
6006
+ const diffComparing = () => {
6007
+ const info = diffInfo();
6008
+ return info?.result == null || info.running;
6009
+ };
6010
+ const diffBarChip = () => {
6011
+ const parts = diffViewParts;
6012
+ if (!parts) {
6013
+ return null;
6014
+ }
6015
+ const DiffBarChip = parts.DiffBarChip;
6016
+ return <Show12 when={diffActive()}>
6017
+ <DiffBarChip
6018
+ parts={parts.formatDiffSummaryParts(changeSnapshot(), !diffComparing(), diffTexts())}
6019
+ comparingText={diffTexts().diffComparing}
6020
+ separator={diffTexts().unsavedSeparator}
6021
+ prevLabel={diffTexts().diffPrevChange}
6022
+ nextLabel={diffTexts().diffNextChange}
6023
+ canNavigate={diffCanNavigate()}
6024
+ onPrev={engine.gridApi.handle.goToPrevChange}
6025
+ onNext={engine.gridApi.handle.goToNextChange}
6026
+ />
6027
+ </Show12>;
6028
+ };
5688
6029
  const bottomBar = () => <Show12 when={props.showBottomBar ?? true}>
5689
6030
  <Show12
5690
6031
  when={renderBottomBarFn() !== void 0}
@@ -5694,7 +6035,8 @@ function GridShellBody(props, features, mountGate, mode) {
5694
6035
  showCounts={props.showBottomBarCounts ?? true}
5695
6036
  selectionAggregates={selectionAggregates()}
5696
6037
  SelectionAggregates={selectionAggregatesFeature2?.SelectionAggregates}
5697
- unsavedText={changeTrackingParts ? changeTrackingParts.formatUnsavedSummary(unsavedChanges(), localeTexts()) : null}
6038
+ unsavedText={changeTrackingParts && !diffActive() ? changeTrackingParts.formatUnsavedSummary(unsavedChanges(), localeTexts()) : null}
6039
+ diffChip={diffBarChip()}
5698
6040
  />}
5699
6041
  >
5700
6042
  {customBottomBar()}
@@ -5800,7 +6142,7 @@ function GridShellBody(props, features, mountGate, mode) {
5800
6142
  return <Show12 when={draggable()}>
5801
6143
  <RowDragHandle2
5802
6144
  operable={rowDragOperable()}
5803
- tooltip={rowDragOperable() ? rowDragTexts().dragRow : rowDragTexts().dragRowDisabled}
6145
+ tooltip={rowDragOperable() ? rowDragTexts().dragRow : orderResolution().rowDragBlockedByRemovedRows ? rowDragTexts().dragRowDisabledRemoved : rowDragTexts().dragRowDisabled}
5804
6146
  onPointerDown={(event) => rowDrag.onRowDragHandlePointerDown(untrack13(() => cell.rowIndex), event)}
5805
6147
  />
5806
6148
  </Show12>;
@@ -6210,6 +6552,15 @@ function GridShellBody(props, features, mountGate, mode) {
6210
6552
  }}
6211
6553
  >
6212
6554
  {
6555
+ /* 追加(1.13.0 / 範囲の飾り): 行と列のキーの範囲の枠と名札(選択の枠より下。React 版と同じ)。 */
6556
+ }
6557
+ {RangeDecorationFrames ? <RangeDecorationFrames
6558
+ frames={rangeDecorationFramesForPane(pane)}
6559
+ headerHeight={headerHeight()}
6560
+ leadingWidth={leadingWidth()}
6561
+ baseOffset={vertical().overlayBaseOffset}
6562
+ /> : null}
6563
+ {
6213
6564
  /* 追加(1.12.0 / 検索と置換): 「選んだ範囲だけ」の範囲の色(選択の枠より下。React 版と同じ)。 */
6214
6565
  }
6215
6566
  {findReplaceFeature2 ? (() => {
@@ -6317,6 +6668,9 @@ function GridShellBody(props, features, mountGate, mode) {
6317
6668
  labelViewIndexes={labelViewIndexes()}
6318
6669
  newRowLayer={newRowLayer()}
6319
6670
  newRowDraft={newRowDraft()}
6671
+ removedRowLayer={removedRowLayer()}
6672
+ changeNavRowKey={changeNavRowKey()}
6673
+ activeCellDecorationText={activeCellDecorationText()}
6320
6674
  rowHeaderWidth={rowHeaderWidth()}
6321
6675
  rows={bodyRows()}
6322
6676
  entries={entries()}
@@ -6382,7 +6736,17 @@ function GridShellBody(props, features, mountGate, mode) {
6382
6736
  </div>;
6383
6737
  };
6384
6738
  const activeDescendantId = () => activeCellRendered() ? activeCellDomId : void 0;
6385
- const emptyStateText = () => (isServerSide() ? !filterConditionsActive() : rows().length === 0 && !manualFilterActive()) ? props.noRowsText ?? localeTexts().noRows : props.noMatchingRowsText ?? localeTexts().noMatchingRows;
6739
+ const diffEmptyText = () => {
6740
+ if (!diffChangedOnly() || rows().length === 0) {
6741
+ return null;
6742
+ }
6743
+ if (diffComparing()) {
6744
+ return diffTexts().diffComparing;
6745
+ }
6746
+ const snapshot2 = changeSnapshot();
6747
+ return snapshot2.cellCount + snapshot2.addedCount + snapshot2.removedCount === 0 ? diffTexts().diffNoChanges : null;
6748
+ };
6749
+ const emptyStateText = () => (isServerSide() ? !filterConditionsActive() : rows().length === 0 && !manualFilterActive()) ? props.noRowsText ?? localeTexts().noRows : diffEmptyText() ?? props.noMatchingRowsText ?? localeTexts().noMatchingRows;
6386
6750
  const rootStyle = () => ({
6387
6751
  ...toSolidStyle(heightLayout().rootStyle),
6388
6752
  ...slots().root?.style,
@@ -6402,9 +6766,13 @@ function GridShellBody(props, features, mountGate, mode) {
6402
6766
  "ssg-root--selecting": ui().dragState?.type === "selection",
6403
6767
  "ssg-root--filling": fill?.filling() ?? false,
6404
6768
  "ssg-root--animate-rows": animateRowsActive(),
6769
+ // 追加(1.13.0 のレビュー DA-5): 列の幅を引いている間(範囲の飾りの枠を滑らせない)。
6770
+ "ssg-root--resizing-column": ui().dragState?.type === "columnResize",
6405
6771
  "ssg-root--dim-readonly": props.dimReadOnlyCells ?? false,
6406
6772
  // 追加(1.5.0 / serverSideRefetch="keep"): 取り直しの間に前の行を見せている(行を薄くする)。
6407
6773
  "ssg-root--refetching": refetchingRows(),
6774
+ // 追加(1.13.0 / 差分の表示): baseline と比べている(変更のセル・追加の行・削除の行を色で塗る。ユーザー判断 C)。
6775
+ "ssg-root--diff": diffActive(),
6408
6776
  "ssg-root--fill-height": heightLayout().fillParent,
6409
6777
  // クロスヘア(列見出し / 行番号を選択の色で染める。列の帯は ColumnHoverOverlay)。
6410
6778
  "ssg-root--hover-cross": hoverCross()
@@ -6599,6 +6967,14 @@ function GridShellBody(props, features, mountGate, mode) {
6599
6967
  </div>
6600
6968
  </Show12>
6601
6969
  {
6970
+ /* 追加(1.13.0 の実アプリでの点検 RD4-02): ▲ ▼ で回った先の読み上げ(見た目には出さない。差分の表示の間だけ置く)。 */
6971
+ }
6972
+ <Show12 when={diffActive() && diffViewParts !== void 0}>
6973
+ <span class="ssg-visually-hidden" aria-live="polite" aria-atomic="true">
6974
+ {changeNavAnnouncement()}
6975
+ </span>
6976
+ </Show12>
6977
+ {
6602
6978
  /* グローバルフィルターの適用中の overlay(しきい値を超える表の時間分割の間だけ。pointer-events: none)。 */
6603
6979
  }
6604
6980
  <Show12 when={globalFilterStatus() === "filtering"}>
@@ -11746,6 +12122,141 @@ var changeTrackingFeature = {
11746
12122
  localeText: DEFAULT_CHANGE_TRACKING_LOCALE_TEXT
11747
12123
  };
11748
12124
 
12125
+ // src/features/diffView.ts
12126
+ import { createRowDiffer } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/rowDiffer";
12127
+ import { createDiffStage } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/diffStage";
12128
+ import { collectChangeTargets } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/changeNavigation";
12129
+ import {
12130
+ describeChangeNavTarget,
12131
+ describeDiffCell,
12132
+ formatDiffOriginalText,
12133
+ formatDiffSummaryParts,
12134
+ nextChangeNavAnnouncement
12135
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/diffView";
12136
+ import { DEFAULT_DIFF_VIEW_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
12137
+
12138
+ // src/view/GridDiffBar.tsx
12139
+ import { For as For19, Show as Show33 } from "solid-js";
12140
+ var keepFocus = (event, run) => {
12141
+ const button = event.currentTarget;
12142
+ run();
12143
+ if (button.isConnected && button.ownerDocument.activeElement !== button) {
12144
+ button.focus({ preventScroll: true });
12145
+ }
12146
+ };
12147
+ function GridDiffBarChip(props) {
12148
+ return <>
12149
+ <span class="ssg-bar-chip ssg-bar-chip--diff">
12150
+ <Show33 when={props.parts} fallback={props.comparingText}>
12151
+ {(parts) => <For19 each={parts()} keyed={(part) => part.kind}>
12152
+ {(part, index) => <span class="ssg-bar-diff-part" data-kind={part().kind}>
12153
+ <Show33 when={index() > 0}>
12154
+ <span class="ssg-bar-diff-sep">{props.separator}</span>
12155
+ </Show33>
12156
+ <span class="ssg-bar-diff-count">{part().text}</span>
12157
+ </span>}
12158
+ </For19>}
12159
+ </Show33>
12160
+ </span>
12161
+ <span class="ssg-bar-diff-nav">
12162
+ <button
12163
+ type="button"
12164
+ class="ssg-bar-diff-nav-btn"
12165
+ aria-label={props.prevLabel}
12166
+ data-ssg-tooltip={props.prevLabel}
12167
+ disabled={!props.canNavigate}
12168
+ onClick={(event) => keepFocus(event, props.onPrev)}
12169
+ >
12170
+ <span aria-hidden="true">{"\u25B2"}</span>
12171
+ </button>
12172
+ <button
12173
+ type="button"
12174
+ class="ssg-bar-diff-nav-btn"
12175
+ aria-label={props.nextLabel}
12176
+ data-ssg-tooltip={props.nextLabel}
12177
+ disabled={!props.canNavigate}
12178
+ onClick={(event) => keepFocus(event, props.onNext)}
12179
+ >
12180
+ <span aria-hidden="true">{"\u25BC"}</span>
12181
+ </button>
12182
+ </span>
12183
+ </>;
12184
+ }
12185
+
12186
+ // src/features/diffView.ts
12187
+ var diffViewFeature = {
12188
+ createRowDiffer,
12189
+ createDiffStage,
12190
+ collectChangeTargets,
12191
+ describeDiffCell,
12192
+ formatDiffOriginalText,
12193
+ formatDiffSummaryParts,
12194
+ describeChangeNavTarget,
12195
+ nextChangeNavAnnouncement,
12196
+ DiffBarChip: GridDiffBarChip,
12197
+ localeText: DEFAULT_DIFF_VIEW_LOCALE_TEXT
12198
+ };
12199
+
12200
+ // src/features/rangeDecorations.ts
12201
+ import { createRangeDecorationResolver } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/rangeDecorations";
12202
+
12203
+ // src/view/GridRangeDecorations.tsx
12204
+ import { For as For20, Show as Show34, createMemo as createMemo33 } from "solid-js";
12205
+ function GridRangeDecorationFrames(props) {
12206
+ return <For20 each={props.frames} keyed={(frame2) => frame2.key}>
12207
+ {(frame2) => {
12208
+ const label = createMemo33(() => frame2().label);
12209
+ return <div
12210
+ aria-hidden="true"
12211
+ data-ssg-range-decoration={frame2().id}
12212
+ class={[
12213
+ "ssg-range-decoration",
12214
+ {
12215
+ "ssg-range-decoration--fill": frame2().fill,
12216
+ "ssg-range-decoration--dashed": frame2().dashed,
12217
+ "ssg-range-decoration--open-left": frame2().openLeft,
12218
+ "ssg-range-decoration--open-right": frame2().openRight,
12219
+ "ssg-range-decoration--open-top": frame2().openTop,
12220
+ "ssg-range-decoration--open-bottom": frame2().openBottom
12221
+ }
12222
+ ]}
12223
+ style={{
12224
+ position: "absolute",
12225
+ left: px(props.leadingWidth + frame2().rect.left),
12226
+ top: px(props.headerHeight + frame2().rect.top - props.baseOffset),
12227
+ width: px(frame2().rect.width),
12228
+ height: px(frame2().rect.height),
12229
+ "--ssg-range-decoration-color": frame2().color
12230
+ }}
12231
+ >
12232
+ <Show34 when={label()}>
12233
+ {(current) => <span
12234
+ class={[
12235
+ "ssg-range-decoration-label",
12236
+ {
12237
+ "ssg-range-decoration-label--right": current().side === "right",
12238
+ "ssg-range-decoration-label--inside": current().inside
12239
+ }
12240
+ ]}
12241
+ style={{
12242
+ "--ssg-range-decoration-label-color": current().color,
12243
+ top: current().offsetTop > 0 ? px(current().offsetTop + 1) : void 0
12244
+ }}
12245
+ >
12246
+ {current().text}
12247
+ </span>}
12248
+ </Show34>
12249
+ </div>;
12250
+ }}
12251
+ </For20>;
12252
+ }
12253
+
12254
+ // src/features/rangeDecorations.ts
12255
+ var rangeDecorationsFeature = {
12256
+ createRangeDecorationResolver,
12257
+ RangeDecorationFrames: GridRangeDecorationFrames
12258
+ };
12259
+
11749
12260
  // src/features/excelShortcuts.ts
11750
12261
  import { createExcelShortcutCommands } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/excelShortcutCommands";
11751
12262
  var excelShortcutsFeature = {
@@ -11774,7 +12285,7 @@ import { createTreeStage } from "@ishibashi0112/spreadsheet-grid-core/internal/e
11774
12285
  import { DEFAULT_TREE_DATA_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
11775
12286
 
11776
12287
  // src/view/GridTreeCell.tsx
11777
- import { createMemo as createMemo33, Show as Show33 } from "solid-js";
12288
+ import { createMemo as createMemo34, Show as Show35 } from "solid-js";
11778
12289
  import { formatLocaleText as formatLocaleText18 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
11779
12290
  import {
11780
12291
  formatTotalRowCellText as formatTotalRowCellText2,
@@ -11782,21 +12293,21 @@ import {
11782
12293
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
11783
12294
  function GridTreeCellPrefix(props) {
11784
12295
  const texts = useFeatureLocaleText();
11785
- const label = createMemo33(() => {
12296
+ const label = createMemo34(() => {
11786
12297
  const name = props.rowLabel.trim();
11787
12298
  return formatLocaleText18(props.open ? texts().collapseTreeRow : texts().expandTreeRow, {
11788
12299
  row: name !== "" ? name : formatLocaleText18(texts().treeRowNumber, { row: props.rowNumber })
11789
12300
  });
11790
12301
  });
11791
12302
  return <>
11792
- <Show33 when={props.level > 0}>
12303
+ <Show35 when={props.level > 0}>
11793
12304
  <span
11794
12305
  aria-hidden="true"
11795
12306
  class="ssg-tree-indent"
11796
12307
  style={{ width: `calc(var(--ssg-tree-indent) * ${props.level})` }}
11797
12308
  />
11798
- </Show33>
11799
- <Show33 when={props.hasChildren} fallback={<span aria-hidden="true" class="ssg-tree-spacer" />}>
12309
+ </Show35>
12310
+ <Show35 when={props.hasChildren} fallback={<span aria-hidden="true" class="ssg-tree-spacer" />}>
11800
12311
  <button
11801
12312
  type="button"
11802
12313
  tabindex={-1}
@@ -11817,28 +12328,28 @@ function GridTreeCellPrefix(props) {
11817
12328
  >
11818
12329
  {props.open ? "\u25BE" : "\u25B8"}
11819
12330
  </button>
11820
- </Show33>
12331
+ </Show35>
11821
12332
  </>;
11822
12333
  }
11823
12334
  function GridTreeAggregateValue(props) {
11824
12335
  const texts = useFeatureLocaleText();
11825
- const shown = createMemo33(() => {
12336
+ const shown = createMemo34(() => {
11826
12337
  const column = props.column;
11827
12338
  const kind = typeof column.aggFunc === "string" ? column.aggFunc : "custom";
11828
12339
  const text = formatTotalRowCellText2(column, { value: props.value, kind });
11829
12340
  return text === "" ? null : { text, caption: resolveTotalRowCaption2(kind, texts()) };
11830
12341
  });
11831
- return <Show33 when={shown()}>
12342
+ return <Show35 when={shown()}>
11832
12343
  {(current) => <span
11833
12344
  class="ssg-group-value ssg-tree-aggregate"
11834
12345
  data-ssg-tooltip-overflow={current().caption !== void 0 ? `${current().caption} ${current().text}` : current().text}
11835
12346
  >
11836
- <Show33 when={current().caption !== void 0}>
12347
+ <Show35 when={current().caption !== void 0}>
11837
12348
  <span class="ssg-group-caption">{current().caption}</span>
11838
- </Show33>
12349
+ </Show35>
11839
12350
  {current().text}
11840
12351
  </span>}
11841
- </Show33>;
12352
+ </Show35>;
11842
12353
  }
11843
12354
 
11844
12355
  // src/features/treeData.ts
@@ -11858,7 +12369,7 @@ var treeDataFeature = {
11858
12369
  import { DEFAULT_AGGREGATES_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
11859
12370
 
11860
12371
  // src/primitives/selectionAggregates.ts
11861
- import { createMemo as createMemo34 } from "solid-js";
12372
+ import { createMemo as createMemo35 } from "solid-js";
11862
12373
  import {
11863
12374
  createSelectionAggregatesRunner,
11864
12375
  resolveSyncSelectionAggregates,
@@ -11870,15 +12381,15 @@ import {
11870
12381
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionAggregates";
11871
12382
  function createSelectionAggregates(args) {
11872
12383
  const stabilizeTarget = createSelectionAggregateTargetStabilizer();
11873
- const target = createMemo34(() => {
12384
+ const target = createMemo35(() => {
11874
12385
  const current = args();
11875
12386
  return stabilizeTarget(
11876
12387
  current.enabled ? resolveSelectionAggregateTarget(current.selection, current.viewRowCount, current.orderedColumns) : null
11877
12388
  );
11878
12389
  });
11879
- const rowModel = createMemo34(() => args().rowModel);
11880
- const key = createMemo34(() => ({ rowModel: rowModel(), target: target() }));
11881
- const syncResult = createMemo34(() => resolveSyncSelectionAggregates(key()));
12390
+ const rowModel = createMemo35(() => args().rowModel);
12391
+ const key = createMemo35(() => ({ rowModel: rowModel(), target: target() }));
12392
+ const syncResult = createMemo35(() => resolveSyncSelectionAggregates(key()));
11882
12393
  const runner = createSelectionAggregatesRunner();
11883
12394
  connectController(
11884
12395
  runner,
@@ -11887,16 +12398,16 @@ function createSelectionAggregates(args) {
11887
12398
  "selectionAggregates"
11888
12399
  );
11889
12400
  const snapshot2 = createExternalStoreSignal(runner, "selectionAggregatesStore");
11890
- return createMemo34(() => selectSelectionAggregatesResult(syncResult(), snapshot2(), key()));
12401
+ return createMemo35(() => selectSelectionAggregatesResult(syncResult(), snapshot2(), key()));
11891
12402
  }
11892
12403
 
11893
12404
  // src/view/GridSelectionAggregates.tsx
11894
- import { For as For19, Show as Show34, createMemo as createMemo35 } from "solid-js";
12405
+ import { For as For21, Show as Show36, createMemo as createMemo36 } from "solid-js";
11895
12406
  import { formatSelectionAggregateNumber } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionAggregates";
11896
12407
  import { formatLocaleText as formatLocaleText19 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
11897
12408
  function GridSelectionAggregates(props) {
11898
12409
  const texts = useFeatureLocaleText();
11899
- const chips = createMemo35(() => {
12410
+ const chips = createMemo36(() => {
11900
12411
  const aggregates = props.aggregates;
11901
12412
  if (!aggregates) {
11902
12413
  return null;
@@ -11929,12 +12440,12 @@ function GridSelectionAggregates(props) {
11929
12440
  }
11930
12441
  return list;
11931
12442
  });
11932
- return <Show34 when={chips()}>
12443
+ return <Show36 when={chips()}>
11933
12444
  {(list) => <div class={["ssg-bar-aggregates", { "ssg-bar-aggregates--trailing": props.trailing }]}>
11934
12445
  <div class="ssg-bar-aggregates-inner" title={list().map((chip) => chip.text).join(" ")}>
11935
12446
  <div class="ssg-bar-aggregates-list">
11936
12447
  <span class="ssg-bar-aggregates-fit" aria-hidden="true" />
11937
- <For19 each={list()} keyed={(chip) => chip.key}>
12448
+ <For21 each={list()} keyed={(chip) => chip.key}>
11938
12449
  {(chip, index) => <span
11939
12450
  class={[
11940
12451
  "ssg-bar-chip",
@@ -11945,16 +12456,16 @@ function GridSelectionAggregates(props) {
11945
12456
  ]}
11946
12457
  style={{ order: String(-index()) }}
11947
12458
  >
11948
- <Show34 when={chip().label !== void 0} fallback={chip().text}>
12459
+ <Show36 when={chip().label !== void 0} fallback={chip().text}>
11949
12460
  {chip().label}
11950
12461
  <b class="ssg-bar-aggregate-value">{chip().value}</b>
11951
- </Show34>
12462
+ </Show36>
11952
12463
  </span>}
11953
- </For19>
12464
+ </For21>
11954
12465
  </div>
11955
12466
  </div>
11956
12467
  </div>}
11957
- </Show34>;
12468
+ </Show36>;
11958
12469
  }
11959
12470
 
11960
12471
  // src/features/selectionAggregates.ts
@@ -11965,7 +12476,7 @@ var selectionAggregatesFeature = {
11965
12476
  };
11966
12477
 
11967
12478
  // src/primitives/toolPanel.ts
11968
- import { createMemo as createMemo36 } from "solid-js";
12479
+ import { createMemo as createMemo37 } from "solid-js";
11969
12480
  import {
11970
12481
  createToolPanelController,
11971
12482
  resolveActiveToolPanelTab,
@@ -11984,7 +12495,7 @@ function createToolPanel(inputs) {
11984
12495
  onSuppressedEscape: inputs.onSuppressedEscape
11985
12496
  }), "render", "toolPanel");
11986
12497
  const snapshot2 = createExternalStoreSignal(controller, "toolPanelStore");
11987
- const availableTabs = createMemo36(
12498
+ const availableTabs = createMemo37(
11988
12499
  () => resolveAvailableToolPanelTabs({
11989
12500
  canUseFilterTab: inputs.canUseFilterTab(),
11990
12501
  canUseColumnsTab: inputs.canUseColumnsTab(),
@@ -11993,10 +12504,10 @@ function createToolPanel(inputs) {
11993
12504
  { equals: sameTabs }
11994
12505
  );
11995
12506
  return {
11996
- activeTab: createMemo36(() => resolveActiveToolPanelTab(snapshot2().requestedTab, availableTabs())),
12507
+ activeTab: createMemo37(() => resolveActiveToolPanelTab(snapshot2().requestedTab, availableTabs())),
11997
12508
  availableTabs,
11998
- layout: createMemo36(() => snapshot2().layout),
11999
- flashTick: createMemo36(() => snapshot2().flashTick),
12509
+ layout: createMemo37(() => snapshot2().layout),
12510
+ flashTick: createMemo37(() => snapshot2().flashTick),
12000
12511
  panelRef: controller.panelRef,
12001
12512
  open: controller.open,
12002
12513
  close: controller.close,
@@ -12020,7 +12531,7 @@ import {
12020
12531
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
12021
12532
 
12022
12533
  // src/view/GridTotalRow.tsx
12023
- import { For as For20, Show as Show35, createMemo as createMemo37 } from "solid-js";
12534
+ import { For as For22, Show as Show37, createMemo as createMemo38 } from "solid-js";
12024
12535
  import {
12025
12536
  formatTotalRowCellText as formatTotalRowCellText3,
12026
12537
  resolveTotalRowCaption as resolveTotalRowCaption3
@@ -12047,7 +12558,7 @@ function GridTotalRow(props) {
12047
12558
  ...props.stickyBottom > 0 ? { bottom: px(props.stickyBottom) } : null
12048
12559
  }}
12049
12560
  >
12050
- <Show35 when={props.ownsRowHeader}>
12561
+ <Show37 when={props.ownsRowHeader}>
12051
12562
  <div
12052
12563
  role={rowHeaderIsCell() ? "rowheader" : void 0}
12053
12564
  aria-colindex={rowHeaderIsCell() ? 1 : void 0}
@@ -12062,13 +12573,13 @@ function GridTotalRow(props) {
12062
12573
  >
12063
12574
  {rowHeaderText() === "" ? null : rowHeaderText()}
12064
12575
  </div>
12065
- </Show35>
12066
- <For20 each={props.entries} keyed={(entry) => entry.column.key}>
12576
+ </Show37>
12577
+ <For22 each={props.entries} keyed={(entry) => entry.column.key}>
12067
12578
  {(entry) => {
12068
- const unbound = createMemo37(() => entry().column);
12579
+ const unbound = createMemo38(() => entry().column);
12069
12580
  const cell = () => props.cells.get(unbound().key);
12070
12581
  const isLabelCell = () => unbound().key === props.labelColumnKey;
12071
- const content = createMemo37(() => {
12582
+ const content = createMemo38(() => {
12072
12583
  const total = cell();
12073
12584
  if (total) {
12074
12585
  const column = unbound();
@@ -12120,7 +12631,7 @@ function GridTotalRow(props) {
12120
12631
  {content()}
12121
12632
  </div>;
12122
12633
  }}
12123
- </For20>
12634
+ </For22>
12124
12635
  </div>
12125
12636
  </>;
12126
12637
  }
@@ -12153,6 +12664,8 @@ var fullGridFeatures = {
12153
12664
  dateTimeEditors: dateTimeEditorsFeature,
12154
12665
  multiSelect: multiSelectFeature,
12155
12666
  changeTracking: changeTrackingFeature,
12667
+ diffView: diffViewFeature,
12668
+ rangeDecorations: rangeDecorationsFeature,
12156
12669
  excelShortcuts: excelShortcutsFeature,
12157
12670
  newRow: newRowFeature,
12158
12671
  treeData: treeDataFeature,
@@ -12200,6 +12713,7 @@ export {
12200
12713
  contextMenuFeature,
12201
12714
  createSpreadsheetGrid,
12202
12715
  dateTimeEditorsFeature,
12716
+ diffViewFeature,
12203
12717
  excelShortcutsFeature,
12204
12718
  exportFeature,
12205
12719
  fillHandleFeature,
@@ -12216,6 +12730,7 @@ export {
12216
12730
  numberParser,
12217
12731
  pinnedRowsFeature,
12218
12732
  preloadGridPopups,
12733
+ rangeDecorationsFeature,
12219
12734
  restoreColumnsFromState,
12220
12735
  richCopyFeature,
12221
12736
  rowDragFeature,