@ishibashi0112/spreadsheet-grid-solid 1.9.0 → 1.11.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.
Files changed (40) hide show
  1. package/API_REFERENCE.md +263 -31
  2. package/README.md +6 -6
  3. package/dist/{ColumnFilterPopover-mENgY4gl.js → ColumnFilterPopover-t32VGfTq.js} +135 -134
  4. package/dist/DateEditorCalendar-CWaFuibK.js +118 -0
  5. package/dist/devWarnings.d.ts +7 -0
  6. package/dist/editors/CellEditorLayer.d.ts +7 -2
  7. package/dist/editors/DateCellEditor.d.ts +2 -1
  8. package/dist/editors/DateTimeCellEditor.d.ts +26 -0
  9. package/dist/editors/MultiSelectCellEditor.d.ts +24 -0
  10. package/dist/editors/NumberCellEditor.d.ts +2 -1
  11. package/dist/editors/SearchSelectCellEditor.d.ts +1 -0
  12. package/dist/editors/SelectCellEditor.d.ts +1 -0
  13. package/dist/editors/TextCellEditor.d.ts +1 -0
  14. package/dist/features/dateTimeEditors.d.ts +2 -0
  15. package/dist/features/excelShortcuts.d.ts +2 -0
  16. package/dist/features/multiSelect.d.ts +2 -0
  17. package/dist/features/newRow.d.ts +2 -0
  18. package/dist/features/types.d.ts +18 -0
  19. package/dist/index.d.ts +5 -1
  20. package/dist/index.js +5064 -4128
  21. package/dist/localeText-CCqvpkYM.js +10 -0
  22. package/dist/model/gridTypes.d.ts +2 -0
  23. package/dist/portalTokens-LgUwLYnR.js +47 -0
  24. package/dist/source/chunks/{ColumnFilterPopover-D7INPNVB.jsx → ColumnFilterPopover-JL3HPGXY.jsx} +4 -2
  25. package/dist/source/chunks/DateEditorCalendar-FVUNVD7Y.jsx +170 -0
  26. package/dist/source/chunks/{chunk-RJB7JN2Y.jsx → chunk-AI3CSPI3.jsx} +3 -29
  27. package/dist/source/chunks/chunk-ZW5ET5DO.jsx +28 -0
  28. package/dist/source/chunks/{toolPanelViews-BRH5PCOI.jsx → toolPanelViews-N6TGBFFW.jsx} +4 -2
  29. package/dist/source/index.jsx +1719 -373
  30. package/dist/style.css +1 -1
  31. package/dist/style.layer.css +1 -1
  32. package/dist/{toolPanelViews-DMEVr1KV.js → toolPanelViews-CPYtBTQP.js} +2 -1
  33. package/dist/view/DateEditorCalendar.d.ts +15 -0
  34. package/dist/view/GridBodyLayer.d.ts +11 -0
  35. package/dist/view/GridMultiSelectChips.d.ts +6 -0
  36. package/dist/view/GridPinnedRows.d.ts +1 -0
  37. package/dist/view/lazyPopups.d.ts +3 -1
  38. package/package.json +3 -3
  39. package/skills/spreadsheet-grid-solid/SKILL.md +1 -1
  40. package/dist/portalTokens-Gz03P3fZ.js +0 -52
@@ -13,27 +13,34 @@ import {
13
13
  runInMountGate
14
14
  } from "./chunks/chunk-ZZTXTW4Z.jsx";
15
15
  import {
16
- GridLocaleTextContext,
17
16
  GridPortalContext,
18
17
  createPortalTokens,
19
- mergeFeatureLocaleDefaults,
20
18
  px,
21
19
  readEventKey,
22
20
  toEditorKeyEvent,
23
21
  toSolidStyle,
24
- useFeatureLocaleText,
25
- useGridLocaleText,
26
22
  useGridPortal
27
- } from "./chunks/chunk-RJB7JN2Y.jsx";
23
+ } from "./chunks/chunk-AI3CSPI3.jsx";
24
+ import {
25
+ GridLocaleTextContext,
26
+ mergeFeatureLocaleDefaults,
27
+ useFeatureLocaleText,
28
+ useGridLocaleText
29
+ } from "./chunks/chunk-ZW5ET5DO.jsx";
28
30
 
29
31
  // src/createSpreadsheetGrid.tsx
30
32
  import { merge } from "solid-js";
31
33
 
32
34
  // src/SpreadsheetGrid.tsx
33
- import { For as For5, Match, NoHydration, Show as Show11, Switch, createEffect as createEffect4, createMemo as createMemo10, createSignal as createSignal9, createUniqueId as createUniqueId3, isHydrating, latest as latest2, onCleanup as onCleanup8, runWithOwner as runWithOwner3, untrack as untrack13 } from "solid-js";
35
+ import { For as For5, Match, NoHydration, Show as Show12, Switch, createEffect as createEffect4, createMemo as createMemo10, createSignal as createSignal9, createUniqueId as createUniqueId3, isHydrating, latest as latest2, onCleanup as onCleanup8, runWithOwner as runWithOwner3, untrack as untrack13 } from "solid-js";
34
36
  import { isServer } from "@solidjs/web";
35
37
  import { createGridEngine } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/createGridEngine";
36
38
  import { gridActions } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridActions";
39
+ import { isCopiedRangeCurrent } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridStore";
40
+ import {
41
+ resolveExcelShortcuts as resolveExcelShortcuts2,
42
+ usesExcelShortcutCommands as usesExcelShortcutCommands2
43
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/excelShortcuts";
37
44
  import { buildSelectionSnapshot, selectGlobalFilter } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridSelectors";
38
45
  import {
39
46
  buildColumnMeasurements,
@@ -85,7 +92,7 @@ import {
85
92
  isControlColumnKey,
86
93
  isDetailRowExpandable,
87
94
  isInsideDetailCardOf,
88
- isSyntheticColumnKey as isSyntheticColumnKey2,
95
+ isSyntheticColumnKey as isSyntheticColumnKey3,
89
96
  resolveFirstDataColIndex
90
97
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/detailRow";
91
98
  import { resolveDataRowNumber as resolveDataRowNumber2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/labelRows";
@@ -100,7 +107,19 @@ import {
100
107
  resolvePopupContainer
101
108
  } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/popupContainer";
102
109
  import { createCellCommands, writeCellValueTo } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/cellCommands";
103
- import { getCellValue as getCellValue2 } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions";
110
+ import { getCellValue as getCellValue2, resolveCanEditCellContext } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions";
111
+ import {
112
+ getSelectableRowCount,
113
+ NEW_ROW_KEY,
114
+ peekEditRow,
115
+ resolveFirstEditableColIndex
116
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/newRow";
117
+ import {
118
+ hasRowEditor,
119
+ mayHaveEditorType,
120
+ resolveColumnEditor,
121
+ resolveStaticColumnEditor as resolveStaticColumnEditor2
122
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/columnEditor";
104
123
  import { IME_INPUT_ATTRIBUTE, isImeComposingKeyEvent as isImeComposingKeyEvent2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
105
124
  import {
106
125
  createKeyboardController,
@@ -615,6 +634,7 @@ import { For as For2, Show as Show2, createMemo as createMemo5, createRenderEffe
615
634
  import { getCellValue, isCellEditable, isColumnEditable } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions";
616
635
  import { resolveIsRowSelected } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/rowSelection";
617
636
  import { resolveDataRowNumber } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/labelRows";
637
+ import { isSyntheticColumnKey as isSyntheticColumnKey2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/detailRow";
618
638
  import { shouldMarkCellOverflowTooltip } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cellOverflowTooltip";
619
639
  import { getInvalidMessage, hasCellValidation } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/validation";
620
640
  import { normalizeCellNote, resolveCellTooltipText } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cellNote";
@@ -750,6 +770,9 @@ var NO_SELECTED_COLUMNS = [-1, -1];
750
770
  var EMPTY_SLOT = resolveSlotProps(void 0);
751
771
  var NO_VALUE = () => null;
752
772
  var NO_SLOT = () => EMPTY_SLOT;
773
+ var NO_FALSE = () => false;
774
+ var EMPTY_NEW_ROW = /* @__PURE__ */ Object.freeze({});
775
+ var renderNewRowPlaceholder = (text) => text === null ? null : <span class="ssg-new-row-placeholder">{text}</span>;
753
776
  var joinClasses = (...parts) => {
754
777
  let out = "";
755
778
  for (const part of parts) {
@@ -796,6 +819,9 @@ function GridBodyLayer(props) {
796
819
  if (row.skeleton) {
797
820
  return "skeleton";
798
821
  }
822
+ if (row.newRow === true) {
823
+ return "keyed";
824
+ }
799
825
  const model = props.rowModel;
800
826
  return model.getGroupRow?.(row.index) !== void 0 || model.getLabelRow?.(row.index) !== void 0 ? "keyed" : "data";
801
827
  };
@@ -832,7 +858,10 @@ function GridBodyLayer(props) {
832
858
  slots={props.slots}
833
859
  />;
834
860
  }
835
- const row = () => props.rowModel.getRow(rowIndex());
861
+ const isEntry = untrack3(() => item().newRow === true);
862
+ const newRowState = isEntry ? createMemo5(() => props.newRowDraft?.draft !== void 0 ? "draft" : "empty") : void 0;
863
+ const newRowBlank = newRowState ? () => newRowState() === "empty" : NO_FALSE;
864
+ const row = isEntry ? () => props.newRowLayer ? props.newRowDraft?.draft ?? EMPTY_NEW_ROW : void 0 : () => props.rowModel.getRow(rowIndex());
836
865
  const groupRow = createMemo5(() => props.grouping ? props.rowModel.getGroupRow?.(rowIndex()) : void 0);
837
866
  const labelRow = createMemo5(
838
867
  () => props.labelRowLayer ? props.rowModel.getLabelRow?.(rowIndex()) : void 0
@@ -891,28 +920,35 @@ function GridBodyLayer(props) {
891
920
  </Show2>
892
921
  <Show2 when={row()}>
893
922
  {(currentRow) => {
894
- const rowKey = createMemo5(() => props.rowModel.getRowKey(rowIndex()) ?? rowIndex());
923
+ const rowKey = createMemo5(() => {
924
+ if (isEntry) {
925
+ void props.newRowDraft;
926
+ }
927
+ return props.rowModel.getRowKey(rowIndex()) ?? rowIndex();
928
+ });
895
929
  let rowElement;
896
- createRenderEffect(
897
- rowKey,
898
- (_next, previous) => {
899
- if (previous !== void 0 && rowElement) {
900
- markReusedRow(rowElement);
901
- }
902
- },
903
- { name: "reusedRow" }
904
- );
905
- const sourceRowIndex = createMemo5(() => props.rowModel.getSourceIndex(rowIndex()) ?? rowIndex());
930
+ if (!isEntry) {
931
+ createRenderEffect(
932
+ rowKey,
933
+ (_next, previous) => {
934
+ if (previous !== void 0 && rowElement) {
935
+ markReusedRow(rowElement);
936
+ }
937
+ },
938
+ { name: "reusedRow" }
939
+ );
940
+ }
941
+ const sourceRowIndex = isEntry ? () => -1 : createMemo5(() => props.rowModel.getSourceIndex(rowIndex()) ?? rowIndex());
906
942
  const rowSize = createMemo5(() => item().size ?? props.rowHeight);
907
943
  const isRowChecked = createMemo5(
908
- () => props.enableRowSelection ? resolveIsRowSelected(props.rowSelectionState, rowKey()) : false
944
+ () => props.enableRowSelection && !isEntry ? resolveIsRowSelected(props.rowSelectionState, rowKey()) : false
909
945
  );
910
946
  const isRowSelected = createMemo5(
911
- () => props.selection.kind === "row" && rowIndex() >= props.selection.startRow && rowIndex() <= props.selection.endRow
947
+ () => !isEntry && props.selection.kind === "row" && rowIndex() >= props.selection.startRow && rowIndex() <= props.selection.endRow
912
948
  );
913
949
  const selectedColRange = createMemo5(() => {
914
950
  const selection = props.selection;
915
- if (selection.kind === "col") {
951
+ if (selection.kind === "col" && !isEntry) {
916
952
  return [selection.startCol, selection.endCol];
917
953
  }
918
954
  if (selection.kind === "cell" && rowIndex() >= selection.startRow && rowIndex() <= selection.endRow) {
@@ -941,7 +977,7 @@ function GridBodyLayer(props) {
941
977
  const rowAutoHeight = createMemo5(() => !!props.autoHeight);
942
978
  const isHovered = createMemo5(() => props.hoveredRowIndex === rowIndex());
943
979
  const rowSlot = createMemo5(
944
- () => resolveSlotProps(
980
+ () => newRowBlank() ? EMPTY_SLOT : resolveSlotProps(
945
981
  props.getRowClassName?.(currentRow(), rowIndex(), {
946
982
  row: currentRow(),
947
983
  rowIndex: rowIndex(),
@@ -952,8 +988,9 @@ function GridBodyLayer(props) {
952
988
  )
953
989
  );
954
990
  const rowNumber = () => props.labelViewIndexes ? resolveDataRowNumber(props.labelViewIndexes, rowIndex()) : rowIndex() + 1;
991
+ const rowTracking = isEntry ? NO_FALSE : trackingOn;
955
992
  const rowUnsavedTexts = createMemoWhen(
956
- trackingOn,
993
+ rowTracking,
957
994
  () => {
958
995
  const marks = props.unsavedTracking;
959
996
  const saved = marks?.getUnsavedCells(rowKey());
@@ -975,19 +1012,23 @@ function GridBodyLayer(props) {
975
1012
  );
976
1013
  const rowUnsaved = () => rowUnsavedTexts() !== void 0;
977
1014
  const closedTreeUnsaved = () => props.closedTreeUnsaved?.has(rowKey()) === true;
1015
+ const rowAdded = () => props.unsavedTracking?.isAddedRow?.(rowKey()) === true;
978
1016
  const rowHeaderDescription = () => {
979
- const own = rowUnsaved() ? props.unsavedTracking?.rowDescription : void 0;
980
- const inside = closedTreeUnsaved() ? props.unsavedTracking?.closedTreeDescription : void 0;
981
- return own !== void 0 && inside !== void 0 ? `${own} / ${inside}` : own ?? inside;
1017
+ const parts = [
1018
+ rowAdded() ? props.unsavedTracking?.addedRowDescription : void 0,
1019
+ rowUnsaved() ? props.unsavedTracking?.rowDescription : void 0,
1020
+ closedTreeUnsaved() ? props.unsavedTracking?.closedTreeDescription : void 0
1021
+ ].filter((part) => part !== void 0 && part !== "");
1022
+ return parts.length === 0 ? void 0 : parts.join(" / ");
982
1023
  };
983
1024
  const treeRow = createMemoWhen(
984
- () => props.treeColumnKey !== void 0,
1025
+ () => !isEntry && props.treeColumnKey !== void 0,
985
1026
  () => props.rowModel.getTreeRow?.(rowIndex()),
986
1027
  void 0,
987
1028
  sameTreeRow
988
1029
  );
989
- const unsavedTextOf = (columnKey) => untrack3(trackingOn) ? () => rowUnsavedTexts()?.get(columnKey) ?? null : NO_VALUE;
990
- const unsavedMarkOf = (unsavedText) => untrack3(trackingOn) ? () => unsavedText() !== null ? <span class="ssg-unsaved-mark" aria-hidden="true" /> : null : null;
1030
+ const unsavedTextOf = (columnKey) => untrack3(rowTracking) ? () => rowUnsavedTexts()?.get(columnKey) ?? null : NO_VALUE;
1031
+ const unsavedMarkOf = (unsavedText) => untrack3(rowTracking) ? () => unsavedText() !== null ? <span class="ssg-unsaved-mark" aria-hidden="true" /> : null : null;
991
1032
  const textCellBase = createMemo5(() => {
992
1033
  const slot = rowSlot();
993
1034
  const bodyCell = cellEnv().bodyCellSlot;
@@ -1064,10 +1105,12 @@ function GridBodyLayer(props) {
1064
1105
  const cells = () => <For2 each={props.entries} keyed={cellKey}>
1065
1106
  {(entry) => {
1066
1107
  const shape = untrack3(() => cellShapeOf(entry().column));
1067
- if (shape === "text") {
1108
+ if (shape === "text" && !isEntry) {
1068
1109
  return renderTextCell(entry);
1069
1110
  }
1070
- const plain = shape === "plain";
1111
+ const plain = shape !== "decorated";
1112
+ const newRowSynthetic = isEntry && untrack3(() => isSyntheticColumnKey2(entry().column.key));
1113
+ const decorOff = newRowSynthetic ? () => true : newRowBlank;
1071
1114
  const unbound = createMemo5(() => entry().column);
1072
1115
  const column = () => unbound();
1073
1116
  const colIndex = createMemo5(() => entry().logicalIndex);
@@ -1077,7 +1120,7 @@ function GridBodyLayer(props) {
1077
1120
  const isSelected = () => isRowSelected() || selectedColStart() >= 0 && colIndex() >= selectedColStart() && colIndex() <= selectedColEnd();
1078
1121
  const readOnlyCell = () => {
1079
1122
  const env = editPermission();
1080
- return !isColumnEditable(env.readOnly, unbound()) || env.canEditCell !== void 0 && !isCellEditable(env, rowIndex(), colIndex(), currentRow(), unbound(), {
1123
+ return !isColumnEditable(env.readOnly, unbound()) || env.canEditCell !== void 0 && !newRowBlank() && !isCellEditable(env, rowIndex(), colIndex(), currentRow(), unbound(), {
1081
1124
  sourceRowIndex: sourceRowIndex(),
1082
1125
  rowKey: rowKey()
1083
1126
  });
@@ -1133,7 +1176,7 @@ function GridBodyLayer(props) {
1133
1176
  };
1134
1177
  const needsStyleContext = () => typeof column().cellClassName === "function" || !!column().cellNote;
1135
1178
  const styleContext = plain ? NO_VALUE : createMemoWhen(
1136
- needsStyleContext,
1179
+ () => !decorOff() && needsStyleContext(),
1137
1180
  () => ({
1138
1181
  row: currentRow(),
1139
1182
  rowIndex: rowIndex(),
@@ -1151,7 +1194,7 @@ function GridBodyLayer(props) {
1151
1194
  }),
1152
1195
  null
1153
1196
  );
1154
- const conditionalCell = plain ? NO_SLOT : createMemoWhen(
1197
+ const conditionalCell = plain || newRowSynthetic ? NO_SLOT : createMemoWhen(
1155
1198
  () => column().cellClassName !== void 0,
1156
1199
  () => {
1157
1200
  const cellClassName = column().cellClassName;
@@ -1162,7 +1205,7 @@ function GridBodyLayer(props) {
1162
1205
  },
1163
1206
  resolveSlotProps(void 0)
1164
1207
  );
1165
- const formatRules = () => props.conditionalFormat ? column().conditionalFormat : void 0;
1208
+ const formatRules = () => props.conditionalFormat && !decorOff() ? column().conditionalFormat : void 0;
1166
1209
  const dataBar = plain ? NO_VALUE : createMemoWhen(
1167
1210
  () => formatRules()?.dataBar !== void 0,
1168
1211
  () => {
@@ -1191,12 +1234,12 @@ function GridBodyLayer(props) {
1191
1234
  return bar ? bar.negative ? rules?.negativeColor : rules?.color : void 0;
1192
1235
  };
1193
1236
  const invalidMessage = plain ? NO_VALUE : createMemoWhen(
1194
- () => !!props.showValidationMarks && hasCellValidation(unbound()),
1237
+ () => !decorOff() && !!props.showValidationMarks && hasCellValidation(unbound()),
1195
1238
  () => treeAggregates() !== void 0 ? null : getInvalidMessage(unbound(), currentRow(), value(), texts()),
1196
1239
  null
1197
1240
  );
1198
1241
  const cellNote = plain ? NO_VALUE : createMemoWhen(
1199
- () => !!column().cellNote,
1242
+ () => !decorOff() && !!column().cellNote,
1200
1243
  () => {
1201
1244
  const note = column().cellNote;
1202
1245
  const context = styleContext();
@@ -1246,10 +1289,11 @@ function GridBodyLayer(props) {
1246
1289
  </div>
1247
1290
  </Show2>
1248
1291
  </>;
1249
- const cellContent = keyedContent ? () => {
1292
+ const dataContent = keyedContent ? () => {
1250
1293
  rowKey();
1251
1294
  return cellChildren();
1252
1295
  } : cellChildren;
1296
+ const cellContent = !isEntry ? dataContent : newRowSynthetic ? NO_VALUE : () => newRowBlank() ? renderNewRowPlaceholder(isEditing() ? null : props.newRowLayer?.placeholder(column()) ?? null) : dataContent();
1253
1297
  return <div
1254
1298
  role="gridcell"
1255
1299
  aria-colindex={colIndex() + 2}
@@ -1326,8 +1370,9 @@ function GridBodyLayer(props) {
1326
1370
  data-row-index={rowIndex()}
1327
1371
  role="row"
1328
1372
  aria-rowindex={rowIndex() + 2 + props.ariaRowOffset}
1329
- aria-selected={props.enableRowSelection ? isRowChecked() ? "true" : "false" : void 0}
1373
+ aria-selected={props.enableRowSelection && !isEntry ? isRowChecked() ? "true" : "false" : void 0}
1330
1374
  data-row-key={String(rowKey())}
1375
+ data-ssg-new-row={newRowState?.()}
1331
1376
  aria-level={treeRow() !== void 0 ? treeRow().level + 1 : void 0}
1332
1377
  aria-expanded={treeRow()?.hasChildren ? treeRow().open ? "true" : "false" : void 0}
1333
1378
  aria-posinset={treeRow()?.posInSet}
@@ -1339,7 +1384,11 @@ function GridBodyLayer(props) {
1339
1384
  props.slots.bodyRow?.className,
1340
1385
  isRowChecked() && "ssg-body-row--checked",
1341
1386
  rowUnsaved() && "ssg-body-row--unsaved",
1342
- treeRow()?.matched === false && "ssg-body-row--tree-unmatched"
1387
+ // 追加(1.10.0): グリッドで足した行。
1388
+ rowAdded() && "ssg-body-row--added",
1389
+ treeRow()?.matched === false && "ssg-body-row--tree-unmatched",
1390
+ // 追加(1.10.0): 入力行(公開の契約。状態は data-ssg-new-row)。
1391
+ isEntry && "ssg-body-row--new"
1343
1392
  )}
1344
1393
  style={{
1345
1394
  ...props.slots.bodyRow?.style,
@@ -1360,9 +1409,13 @@ function GridBodyLayer(props) {
1360
1409
  "ssg-header-cell ssg-row-header-cell",
1361
1410
  rowSlot().className,
1362
1411
  props.slots.rowHeaderCell?.className,
1363
- props.enableRowSelection && "ssg-row-header-cell--checkbox",
1412
+ props.enableRowSelection && !isEntry && "ssg-row-header-cell--checkbox",
1413
+ // 追加(1.10.0): 入力行の行番号(* / 下書きは ✎)。
1414
+ isEntry && "ssg-row-header-cell--new",
1364
1415
  (rowUnsaved() || closedTreeUnsaved()) && "ssg-row-header-cell--unsaved",
1365
- (props.isWholeGridSelected || isRowSelected()) && "ssg-header-cell--selected",
1416
+ // 追加(1.10.0): グリッドで足した行の行番号(左の縦の線)。
1417
+ rowAdded() && "ssg-row-header-cell--added",
1418
+ (props.isWholeGridSelected && !isEntry || isRowSelected()) && "ssg-header-cell--selected",
1366
1419
  isHovered() && "ssg-header-cell--hovered"
1367
1420
  )}
1368
1421
  style={{
@@ -1373,13 +1426,21 @@ function GridBodyLayer(props) {
1373
1426
  height: px(rowSize())
1374
1427
  }}
1375
1428
  >
1376
- <Show2 when={props.enableRowSelection} fallback={rowNumber()}>
1377
- <RowSelectionCheckbox
1429
+ {newRowState ? (
1430
+ // 追加(1.10.0): 入力行の行番号は印(* / ✎)なので、読み上げの名前を見えない文字で添える(E4-08)。
1431
+ <>
1432
+ <span aria-hidden="true">{newRowState() === "draft" ? "\u270E" : "\uFF0A"}</span>
1433
+ <span class="ssg-visually-hidden">
1434
+ {newRowState() === "draft" ? props.newRowLayer?.draftHeader : props.newRowLayer?.header}
1435
+ </span>
1436
+ </>
1437
+ ) : <Show2 when={props.enableRowSelection} fallback={rowNumber()}>
1438
+ <RowSelectionCheckbox
1378
1439
  slot={props.slots.checkbox}
1379
1440
  label={formatLocaleText2(texts().selectRow, { row: rowNumber() })}
1380
1441
  state={isRowChecked() ? "checked" : "unchecked"}
1381
1442
  />
1382
- </Show2>
1443
+ </Show2>}
1383
1444
  </div>
1384
1445
  </Show2>
1385
1446
  {switchedCells()}
@@ -1548,6 +1609,8 @@ import { toDateInputValue } from "@ishibashi0112/spreadsheet-grid-core/internal/
1548
1609
  import { resolveTypedStartText } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorStart";
1549
1610
  import { formatLocaleText as formatLocaleText4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
1550
1611
  import { isSearchSelectEditor } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectEditorState";
1612
+ import { isDateTimeEditor } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/columnEditor";
1613
+ import { isMultiSelectEditor } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
1551
1614
 
1552
1615
  // src/editors/TextCellEditor.tsx
1553
1616
  import { Show as Show6, createRenderEffect as createRenderEffect3, createSignal as createSignal4, onCleanup as onCleanup3, onSettled as onSettled3, untrack as untrack6 } from "solid-js";
@@ -1696,7 +1759,8 @@ function TextCellEditor(props) {
1696
1759
  onCommit: props.onCommit,
1697
1760
  onCancel: props.onCancel,
1698
1761
  onRejected: setError,
1699
- enterMove: props.enterMove
1762
+ enterMove: props.enterMove,
1763
+ onCommitToSelection: props.onCommitToSelection
1700
1764
  })}
1701
1765
  onBlur={(event) => commitOnBlur(event.currentTarget.value)}
1702
1766
  aria-label={props.ariaLabel}
@@ -1798,7 +1862,8 @@ function NumberCellEditor(props) {
1798
1862
  onCommit: props.onCommit,
1799
1863
  onCancel: props.onCancel,
1800
1864
  onRejected: setError,
1801
- enterMove: props.enterMove
1865
+ enterMove: props.enterMove,
1866
+ onCommitToSelection: props.onCommitToSelection
1802
1867
  })}
1803
1868
  onBlur={(event) => {
1804
1869
  if (disposed) {
@@ -1844,6 +1909,7 @@ import {
1844
1909
  import { withAnchorVisibility } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/editorVisibleBounds";
1845
1910
  import { revealOverflowTitle } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/overflowTitle";
1846
1911
  import { isImeComposingKeyEvent } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
1912
+ import { isCommitToSelectionKey } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorKeys";
1847
1913
  function SelectCellEditor(props) {
1848
1914
  const texts = useGridLocaleText();
1849
1915
  const portal = useGridPortal();
@@ -1951,6 +2017,20 @@ function SelectCellEditor(props) {
1951
2017
  }
1952
2018
  return;
1953
2019
  }
2020
+ const toSelection = props.onCommitToSelection;
2021
+ if (toSelection !== void 0 && isCommitToSelectionKey(event)) {
2022
+ event.preventDefault();
2023
+ const option = props.options[currentHighlight];
2024
+ if (!option) {
2025
+ props.onCancel();
2026
+ return;
2027
+ }
2028
+ const result = toSelection(option.value);
2029
+ if (result && result.status === "rejected") {
2030
+ setError(result.message);
2031
+ }
2032
+ return;
2033
+ }
1954
2034
  handleSelectEditorKeyDown(toEditorKeyEvent(event), {
1955
2035
  optionCount: props.options.length,
1956
2036
  enterMove: props.enterMove,
@@ -2125,12 +2205,12 @@ function DateCellEditor(props) {
2125
2205
  }
2126
2206
  setShift(resolveShiftIntoView(element));
2127
2207
  });
2128
- const commitDraft = (value, direction) => {
2208
+ const commitDraft = (value, direction, commit = props.onCommit) => {
2129
2209
  if (!textMode) {
2130
- return props.onCommit(value, direction);
2210
+ return commit(value, direction);
2131
2211
  }
2132
2212
  const normalized = readTypedDateCommitValue(value);
2133
- return normalized === null ? { status: "rejected", message: texts().enterDate } : props.onCommit(normalized, direction);
2213
+ return normalized === null ? { status: "rejected", message: texts().enterDate } : commit(normalized, direction);
2134
2214
  };
2135
2215
  props.onRegisterFlush?.(() => {
2136
2216
  untrack9(() => {
@@ -2152,6 +2232,11 @@ function DateCellEditor(props) {
2152
2232
  onCancel: props.onCancel,
2153
2233
  onRejected: setError,
2154
2234
  enterMove: props.enterMove,
2235
+ // 追加(1.10.0 / Excel のキー): 一括入力も文字の欄は日付として読んでから。
2236
+ onCommitToSelection: props.onCommitToSelection === void 0 ? void 0 : (value) => {
2237
+ const toSelection = props.onCommitToSelection;
2238
+ return toSelection === void 0 ? void 0 : commitDraft(value, void 0, (committed) => toSelection(committed));
2239
+ },
2155
2240
  // 日付の入力欄では Home / End でもグリッドがスクロールしていたので止めます(文字の欄ではカーソルの移動なので止めない)。
2156
2241
  blockHomeEnd: !textMode
2157
2242
  })}
@@ -2217,6 +2302,12 @@ function CellEditorLayer(props) {
2217
2302
  const texts = useGridLocaleText();
2218
2303
  const editor = () => props.editor;
2219
2304
  const kind = createMemo7(() => {
2305
+ if (props.DateTimeEditor && isDateTimeEditor(editor())) {
2306
+ return "dateTime";
2307
+ }
2308
+ if (isMultiSelectEditor(editor())) {
2309
+ return props.MultiSelectEditor ? "multiSelect" : "text";
2310
+ }
2220
2311
  const type = editor()?.type;
2221
2312
  return type === "number" || type === "select" || type === "date" || type === "custom" ? type : "text";
2222
2313
  });
@@ -2297,6 +2388,9 @@ function CellEditorLayer(props) {
2297
2388
  },
2298
2389
  onCommit: (value, direction, option, forwardText) => props.onCommit(value, direction, option, forwardText),
2299
2390
  onCancel: () => props.onCancel(),
2391
+ get onCommitToSelection() {
2392
+ return props.onCommitToSelection;
2393
+ },
2300
2394
  onRegisterFlush: (flush) => props.onRegisterFlush?.(flush)
2301
2395
  };
2302
2396
  const initialValue = untrack11(props.initialValue);
@@ -2325,6 +2419,25 @@ function CellEditorLayer(props) {
2325
2419
  initialText={session ? resolveTypedStartText(initialValue, session.value) : void 0}
2326
2420
  />;
2327
2421
  }
2422
+ case "dateTime": {
2423
+ const session = untrack11(() => props.session);
2424
+ const current = untrack11(editor);
2425
+ const DateTimeEditor = props.DateTimeEditor;
2426
+ if (!DateTimeEditor || !isDateTimeEditor(current)) {
2427
+ return null;
2428
+ }
2429
+ return <DateTimeEditor
2430
+ {...common}
2431
+ editor={current}
2432
+ columnTitle={session ? session.column.title || session.column.key : ""}
2433
+ value={session ? session.value : initialValue}
2434
+ initialValue={initialValue}
2435
+ popoverSlot={props.slots.popover}
2436
+ themeClassName={props.themeClassName}
2437
+ cellTop={props.rect?.top ?? 0}
2438
+ cellLeft={props.rect?.left ?? 0}
2439
+ />;
2440
+ }
2328
2441
  case "select": {
2329
2442
  const session = untrack11(() => props.session);
2330
2443
  const current = untrack11(editor);
@@ -2357,6 +2470,27 @@ function CellEditorLayer(props) {
2357
2470
  initialText={initialText}
2358
2471
  />;
2359
2472
  }
2473
+ case "multiSelect": {
2474
+ const session = untrack11(() => props.session);
2475
+ const current = untrack11(editor);
2476
+ const MultiSelectEditor = props.MultiSelectEditor;
2477
+ if (!MultiSelectEditor || current?.type !== "select") {
2478
+ return null;
2479
+ }
2480
+ const loadOptions = current.loadOptions;
2481
+ return <MultiSelectEditor
2482
+ {...common}
2483
+ popoverSlot={props.slots.popover}
2484
+ themeClassName={props.themeClassName}
2485
+ options={selectOptions()}
2486
+ value={session?.value}
2487
+ search={current.search ?? loadOptions !== void 0}
2488
+ load={loadOptions && session ? (query, signal) => loadOptions({ query, row: session.row, rowKey: session.rowKey, column: session.column, signal }) : void 0}
2489
+ initialText={session ? resolveTypedStartText(initialValue, session.value) : void 0}
2490
+ cellTop={props.rect?.top ?? 0}
2491
+ cellLeft={props.rect?.left ?? 0}
2492
+ />;
2493
+ }
2360
2494
  case "custom": {
2361
2495
  const current = untrack11(editor);
2362
2496
  if (current?.type !== "custom") {
@@ -2559,10 +2693,41 @@ function DefaultGridBottomBar(props) {
2559
2693
  </div>;
2560
2694
  }
2561
2695
 
2696
+ // src/view/CopyRangeOverlay.tsx
2697
+ import { Show as Show11 } from "solid-js";
2698
+ var placement = (props, rect) => ({
2699
+ position: "absolute",
2700
+ left: px(props.leadingWidth + rect.left),
2701
+ top: px(props.headerHeight + rect.top - props.baseOffset),
2702
+ width: px(rect.width),
2703
+ height: px(rect.height)
2704
+ });
2705
+ function CopyRangeOverlay(props) {
2706
+ return <Show11 when={props.rect}>
2707
+ {(rect) => <div
2708
+ class={["ssg-copy-range-overlay", props.slot?.className]}
2709
+ style={{ ...props.slot?.style, ...placement(props, rect()) }}
2710
+ data-ssg-copy-range=""
2711
+ />}
2712
+ </Show11>;
2713
+ }
2714
+ function ColumnHoverOverlay(props) {
2715
+ return <Show11 when={props.rect}>
2716
+ {(rect) => <div class="ssg-col-hover-overlay" style={placement(props, rect())} data-ssg-col-hover="" />}
2717
+ </Show11>;
2718
+ }
2719
+
2562
2720
  // src/devWarnings.ts
2563
2721
  import { createEffect as createEffect3, createMemo as createMemo9 } from "solid-js";
2564
2722
  import { AUTO_HEIGHT_MAX_ROWS } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/verticalGeometry";
2565
2723
  import { isSearchSelectEditor as isSearchSelectEditor2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectEditorState";
2724
+ import { isMultiSelectEditor as isMultiSelectEditor2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
2725
+ import { isDateTimeEditor as isDateTimeEditor2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/columnEditor";
2726
+ import { resolveStaticColumnEditor } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/columnEditor";
2727
+ import {
2728
+ resolveExcelShortcuts,
2729
+ usesExcelShortcutCommands
2730
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/excelShortcuts";
2566
2731
  import { createInertExportCommands } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/features";
2567
2732
  import {
2568
2733
  warnUnregisteredFeatureMethod,
@@ -2587,14 +2752,41 @@ var FEATURE_PROPS = {
2587
2752
  selectSearch: [
2588
2753
  {
2589
2754
  prop: "columns[].editor.search / loadOptions / allowFreeText",
2590
- isUsed: (props) => props.columns.some((column) => isSearchSelectEditor2(column.editor))
2755
+ isUsed: (props) => props.columns.some((column) => isSearchSelectEditor2(resolveStaticColumnEditor(column)))
2756
+ }
2757
+ ],
2758
+ // 追加(1.11.0): time / datetime / date の picker: 'calendar' のエディタ(React 版と同じ)。
2759
+ dateTimeEditors: [
2760
+ {
2761
+ prop: "columns[].editor.type 'time' / 'datetime' / picker: 'calendar'",
2762
+ isUsed: (props) => props.columns.some((column) => isDateTimeEditor2(resolveStaticColumnEditor(column)))
2763
+ }
2764
+ ],
2765
+ // 追加(1.11.0 / 複数選択): multiple: true の select(React 版と同じ)。
2766
+ multiSelect: [
2767
+ {
2768
+ prop: "columns[].editor.multiple",
2769
+ isUsed: (props) => props.columns.some((column) => isMultiSelectEditor2(resolveStaticColumnEditor(column)))
2591
2770
  }
2592
2771
  ],
2593
2772
  // 変更の追跡(React 版と同じ)。
2594
2773
  changeTracking: [
2595
- { prop: "trackChanges", isUsed: (props) => props.trackChanges === true },
2774
+ {
2775
+ prop: "trackChanges",
2776
+ // 変更(1.10.0): オブジェクトの形({ rows: true } / {})も指定したことになります。
2777
+ isUsed: (props) => props.trackChanges === true || typeof props.trackChanges === "object" && props.trackChanges !== null
2778
+ },
2596
2779
  { prop: "onChangesChange", isUsed: (props) => props.onChangesChange !== void 0 }
2597
2780
  ],
2781
+ // 追加(1.10.0 / Excel のキー): 切り取り以外のキーを効かせたとき(切り取りは本体なので、既定の省略では警告しない)。
2782
+ excelShortcuts: [
2783
+ {
2784
+ prop: "excelShortcuts",
2785
+ isUsed: (props) => usesExcelShortcutCommands(resolveExcelShortcuts(props.excelShortcuts))
2786
+ }
2787
+ ],
2788
+ // 追加(1.10.0 / 入力行)。
2789
+ newRow: [{ prop: "newRow", isUsed: (props) => props.newRow !== void 0 && props.newRow !== false }],
2598
2790
  totalRow: [{ prop: "totalRow", isUsed: (props) => props.totalRow !== void 0 && props.totalRow !== false }],
2599
2791
  pinnedRows: [
2600
2792
  { prop: "pinnedTopRows", isUsed: (props) => (props.pinnedTopRows?.length ?? 0) > 0 },
@@ -2808,12 +3000,48 @@ function createShellDevWarningsInDev(args) {
2808
3000
  );
2809
3001
  }
2810
3002
  });
3003
+ const newRowWarned = /* @__PURE__ */ new Set();
3004
+ createChangeEffect(
3005
+ () => {
3006
+ const reason = args.newRowUnavailable();
3007
+ return reason === null || typeof reason === "string" ? reason : `missing:${reason.missing}`;
3008
+ },
3009
+ (reason) => {
3010
+ if (reason === "serverSide") {
3011
+ warnOncePerGrid(
3012
+ newRowWarned,
3013
+ "newRowServerSide",
3014
+ "[SpreadsheetGrid] newRow \u306F serverSide(dataSource)\u3067\u306F\u4F7F\u3048\u307E\u305B\u3093(\u5165\u529B\u884C\u306F\u51FA\u307E\u305B\u3093\u3002\u884C\u306F\u30B5\u30FC\u30D0\u30FC\u306B\u8DB3\u3057\u3066\u304B\u3089\u53D6\u308A\u76F4\u3057\u307E\u3059)\u3002\n[SpreadsheetGrid] newRow does not work with serverSide (dataSource). No entry row is shown; add rows on the server and refetch."
3015
+ );
3016
+ } else if (reason === "rowGroup") {
3017
+ warnOncePerGrid(
3018
+ newRowWarned,
3019
+ "newRowRowGroup",
3020
+ "[SpreadsheetGrid] newRow \u306F\u884C\u306E\u30B0\u30EB\u30FC\u30D7\u5316(rowGroup)\u3068\u4E00\u7DD2\u306B\u306F\u4F7F\u3048\u307E\u305B\u3093(\u5165\u529B\u884C\u306F\u51FA\u307E\u305B\u3093)\u3002\n[SpreadsheetGrid] newRow does not work together with row grouping (rowGroup). No entry row is shown."
3021
+ );
3022
+ } else if (reason !== null) {
3023
+ const missing = reason.slice("missing:".length);
3024
+ warnOncePerGrid(
3025
+ newRowWarned,
3026
+ "newRowMissing",
3027
+ `[SpreadsheetGrid] newRow \u306B\u306F ${missing} \u304C\u8981\u308A\u307E\u3059(\u6307\u5B9A\u3059\u308B\u307E\u3067\u5165\u529B\u884C\u306F\u51FA\u307E\u305B\u3093)\u3002
3028
+ [SpreadsheetGrid] newRow needs ${missing}. No entry row is shown until you set it.`
3029
+ );
3030
+ }
3031
+ }
3032
+ );
2811
3033
  const treeDataWarned = /* @__PURE__ */ new Set();
2812
3034
  createChangeEffect(args.treeDataWarnings, (warnings) => {
2813
3035
  for (const warning of warnings) {
2814
3036
  warnOncePerGrid(treeDataWarned, warning.id, warning.message);
2815
3037
  }
2816
3038
  });
3039
+ const multiSelectWarned = /* @__PURE__ */ new Set();
3040
+ createChangeEffect(args.multiSelectWarnings, (warnings) => {
3041
+ for (const warning of warnings) {
3042
+ warnOncePerGrid(multiSelectWarned, warning.id, warning.message);
3043
+ }
3044
+ });
2817
3045
  if (!args.filteringAvailable) {
2818
3046
  createChangeEffect(
2819
3047
  () => args.globalFilterText().trim() !== "" || args.columnFilterCount() > 0,
@@ -2852,6 +3080,11 @@ var warnHandleCallBeforeMount = (warned, method) => {
2852
3080
  };
2853
3081
 
2854
3082
  // src/SpreadsheetGrid.tsx
3083
+ import { formatCellText } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cellText";
3084
+ import {
3085
+ describeMultiSelectColumnProblems,
3086
+ mayBeMultiSelectColumn
3087
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
2855
3088
  var EMPTY_ROWS = [];
2856
3089
  var NEVER_EDITABLE = () => false;
2857
3090
  var NO_TREE_DATA_WARNINGS = [];
@@ -2860,6 +3093,7 @@ var NO_COLUMN_FILTERS = {};
2860
3093
  var renderDetailToggleCell = () => null;
2861
3094
  var noop3 = () => {
2862
3095
  };
3096
+ var isTrackChangesOn = (value) => value === true || typeof value === "object" && value !== null;
2863
3097
  var applyHandleRef = (ref, handle) => {
2864
3098
  if (typeof ref === "function") {
2865
3099
  runWithOwner3(null, () => untrack13(() => ref(handle)));
@@ -3051,6 +3285,7 @@ function GridShellBody(props, features, mountGate, mode) {
3051
3285
  const viewportHeight = createMemo10(() => view().viewportHeight);
3052
3286
  const viewScrollTop = createMemo10(() => view().scrollTop);
3053
3287
  const viewMaxBodyPx = createMemo10(() => view().maxBodyPx);
3288
+ const newRowDraft = createMemo10(() => view().newRowDraft ?? null);
3054
3289
  const viewSetters = createGridViewSetters(store);
3055
3290
  const { setHoveredColumnIndex, setIsCornerHovered, setEditorInitialValue } = viewSetters;
3056
3291
  const gridRootRef = { current: null };
@@ -3296,7 +3531,7 @@ function GridShellBody(props, features, mountGate, mode) {
3296
3531
  }));
3297
3532
  const refetchingRows = createMemo10(() => isServerSide() && serverSide !== void 0 && serverSide.refetching());
3298
3533
  const editLocked = () => readOnly() || refetchingRows();
3299
- const rowModel = createMemo10(() => {
3534
+ const baseRowModel = createMemo10(() => {
3300
3535
  if (!isServerSide() || !serverSide) {
3301
3536
  return clientRowModel().rowModel;
3302
3537
  }
@@ -3305,6 +3540,27 @@ function GridShellBody(props, features, mountGate, mode) {
3305
3540
  const getLabel = labelGetLabel();
3306
3541
  return isLabelRow && getLabel && labelRowFeature2 ? labelRowFeature2.wrapRowModelWithLabelRows(base, isLabelRow, getLabel) : base;
3307
3542
  });
3543
+ const newRowParts = features.newRow;
3544
+ const newRowGiven = () => props.newRow !== void 0 && props.newRow !== false;
3545
+ const newRowHasRowGroup = () => !isServerSide() && clientRowModel().groupedDisplay != null;
3546
+ const newRowActive = createMemo10(
3547
+ () => newRowGiven() && newRowParts !== void 0 && !isServerSide() && props.onRowsChange != null && props.createRow !== void 0 && props.rowKeyGetter !== void 0 && !readOnly() && !newRowHasRowGroup()
3548
+ );
3549
+ const rowModel = createMemo10(() => engine.newRow.wrapRowModel(baseRowModel(), newRowActive()));
3550
+ const newRowLayer = createMemo10(() => {
3551
+ if (!newRowActive() || newRowParts === void 0) {
3552
+ return void 0;
3553
+ }
3554
+ const texts = localeTexts();
3555
+ const placeholderOption = typeof props.newRow === "object" ? props.newRow.placeholder : void 0;
3556
+ const columnsNow = orderedColumns();
3557
+ const firstEditableKey = columnsNow[resolveFirstEditableColIndex(columnsNow, readOnly())]?.key;
3558
+ return {
3559
+ header: texts.newRowHeader,
3560
+ draftHeader: texts.newRowDraftHeader,
3561
+ placeholder: (column) => newRowParts.resolveNewRowPlaceholder(placeholderOption, texts.newRowPlaceholder, column, firstEditableKey)
3562
+ };
3563
+ });
3308
3564
  const canEditCell = createMemo10(() => {
3309
3565
  if (isServerSide() && !(serverSide?.canUpdateRows() ?? false)) {
3310
3566
  return NEVER_EDITABLE;
@@ -3327,7 +3583,7 @@ function GridShellBody(props, features, mountGate, mode) {
3327
3583
  if (tree) {
3328
3584
  return tree.visibility.matchedCount;
3329
3585
  }
3330
- return clientRowModel().groupedDisplay || clientRowModel().labelDisplay ? order().length : viewRowCount();
3586
+ return clientRowModel().groupedDisplay || clientRowModel().labelDisplay ? order().length : newRowActive() ? viewRowCount() - 1 : viewRowCount();
3331
3587
  });
3332
3588
  const handleGroupToggle = (groupKey) => dispatch(gridActions.toggleGroupCollapsed(groupKey));
3333
3589
  const groupingFeature2 = features.grouping;
@@ -3385,7 +3641,27 @@ function GridShellBody(props, features, mountGate, mode) {
3385
3641
  maxBodyPx: () => viewMaxBodyPx() ?? MAX_BODY_PX,
3386
3642
  globalFilterText,
3387
3643
  columnFilterCount: () => Object.keys(columnFilters()).length,
3388
- trackChangesUnavailable: () => !(props.trackChanges ?? false) || features.changeTracking === void 0 ? null : isServerSide() ? "serverSide" : props.rowKeyGetter === void 0 ? "rowKeyGetter" : props.onRowsChange == null ? "onRowsChange" : null,
3644
+ trackChangesUnavailable: () => !isTrackChangesOn(props.trackChanges) || features.changeTracking === void 0 ? null : isServerSide() ? "serverSide" : props.rowKeyGetter === void 0 ? "rowKeyGetter" : props.onRowsChange == null ? "onRowsChange" : null,
3645
+ // 追加(1.10.0 / 入力行): 入力行が出ない理由(機能があり newRow を指定したときだけ。React 版と同じ条件と文言)。
3646
+ newRowUnavailable: () => {
3647
+ if (!newRowGiven() || newRowParts === void 0) {
3648
+ return null;
3649
+ }
3650
+ if (isServerSide()) {
3651
+ return "serverSide";
3652
+ }
3653
+ if (newRowHasRowGroup()) {
3654
+ return "rowGroup";
3655
+ }
3656
+ const missing = [
3657
+ props.onRowsChange == null ? "onRowsChange" : null,
3658
+ props.createRow === void 0 ? "createRow" : null,
3659
+ props.rowKeyGetter === void 0 ? "rowKeyGetter" : null
3660
+ ].filter((name) => name !== null).join(" / ");
3661
+ return missing === "" ? null : { missing };
3662
+ },
3663
+ // 追加(1.11.0 / 複数選択): 複数選択の列でこの版では効かない書き方(allowFreeText / fillRow / rowGroup。React 版と同じ)。
3664
+ multiSelectWarnings: () => describeMultiSelectColumnProblems(props.columns),
3389
3665
  // 追加(1.9.0 / ツリーデータ): 一緒に使えないもの・効かない理由と、木の形の問題(親のキーが rows に無い行・循環・同じキーの行)。
3390
3666
  treeDataWarnings: () => {
3391
3667
  const parts = treeDataParts;
@@ -3456,6 +3732,7 @@ function GridShellBody(props, features, mountGate, mode) {
3456
3732
  };
3457
3733
  });
3458
3734
  const conditionalFormatFeature2 = features.conditionalFormat;
3735
+ const multiSelectParts = features.multiSelect;
3459
3736
  const conditionalFormatStats = createMemo10(() => engine.resolveConditionalFormatStats(rowModel(), orderedColumns()));
3460
3737
  const totalRowCells = createMemo10(
3461
3738
  () => totalRowEnabled() ? engine.resolveTotalRowCells({
@@ -3532,8 +3809,8 @@ function GridShellBody(props, features, mountGate, mode) {
3532
3809
  const spec = chipFeature.resolveChipSpec(chips, {
3533
3810
  row,
3534
3811
  rowIndex: viewIndex,
3535
- sourceRowIndex: model.getSourceIndex(viewIndex) ?? viewIndex,
3536
- rowKey: model.getRowKey(viewIndex) ?? viewIndex,
3812
+ // 変更(1.10.0 / 入力行): 入力行の下書きの行は sourceRowIndex が -1、rowKey はその行の rowKeyGetter の値(React 版と同じ)。
3813
+ ...resolveCanEditCellContext(model, viewIndex),
3537
3814
  colIndex,
3538
3815
  value,
3539
3816
  column,
@@ -3597,10 +3874,22 @@ function GridShellBody(props, features, mountGate, mode) {
3597
3874
  const model = rowModel();
3598
3875
  const serverSideActive = isServerSide();
3599
3876
  const items = [];
3877
+ const entryIndex = model.newRow?.index ?? -1;
3600
3878
  for (const virtualRow of virtualRows) {
3601
3879
  if (!virtualRowIndexes.has(virtualRow.index)) {
3602
3880
  continue;
3603
3881
  }
3882
+ if (virtualRow.index === entryIndex) {
3883
+ items.push({
3884
+ index: virtualRow.index,
3885
+ start: virtualRow.start,
3886
+ size: virtualRow.size,
3887
+ key: String(NEW_ROW_KEY),
3888
+ skeleton: false,
3889
+ newRow: true
3890
+ });
3891
+ continue;
3892
+ }
3604
3893
  const skeleton = serverSideActive && model.getRow(virtualRow.index) === void 0 && model.getLabelRow?.(virtualRow.index) === void 0;
3605
3894
  items.push({
3606
3895
  index: virtualRow.index,
@@ -3791,11 +4080,17 @@ function GridShellBody(props, features, mountGate, mode) {
3791
4080
  const motionExtrasFeature2 = features.motionExtras;
3792
4081
  const copiedSelection = createMemo10(() => {
3793
4082
  const copied = view().copiedRange;
3794
- if (!motionExtrasFeature2 || !(props.showCopyRange ?? true) || !copied) {
4083
+ if (!copied || copied.cut === void 0 && (!motionExtrasFeature2 || !(props.showCopyRange ?? true))) {
3795
4084
  return null;
3796
4085
  }
3797
4086
  const state = ui();
3798
- return copied.view.sort === state.sort && copied.view.filters === state.filters && copied.view.collapsedGroupKeys === state.collapsedGroupKeys && copied.view.viewRowCount === viewRowCount() && copied.view.columns === orderedColumnKeys() ? copied.selection : null;
4087
+ return isCopiedRangeCurrent(copied, {
4088
+ sort: state.sort,
4089
+ filters: state.filters,
4090
+ collapsedGroupKeys: state.collapsedGroupKeys,
4091
+ viewRowCount: viewRowCount(),
4092
+ columns: orderedColumnKeys()
4093
+ }) ? copied.selection : null;
3799
4094
  });
3800
4095
  const copiedExtents = createMemo10(() => resolveSelectionExtents(copiedSelection(), paneLayout(), viewRowCount()));
3801
4096
  const copiedBand = createMemo10(
@@ -4107,7 +4402,10 @@ function GridShellBody(props, features, mountGate, mode) {
4107
4402
  const changeTrackingParts = features.changeTracking;
4108
4403
  const changeTracker = engine.changeTracker;
4109
4404
  const changeTrackingActive = createMemo10(
4110
- () => (props.trackChanges ?? false) && changeTrackingParts !== void 0 && !isServerSide() && props.rowKeyGetter !== void 0 && props.onRowsChange != null
4405
+ () => isTrackChangesOn(props.trackChanges) && changeTrackingParts !== void 0 && !isServerSide() && props.rowKeyGetter !== void 0 && props.onRowsChange != null
4406
+ );
4407
+ const trackRowChanges = createMemo10(
4408
+ () => changeTrackingActive() && typeof props.trackChanges === "object" && props.trackChanges.rows === true
4111
4409
  );
4112
4410
  const history = createHistoryController();
4113
4411
  const historyRowLocator = createMemo10(() => createHistoryRowLocator(rowModel(), treeStage()));
@@ -4132,14 +4430,17 @@ function GridShellBody(props, features, mountGate, mode) {
4132
4430
  // 追加(1.9.0 の点検): 元に戻した後のアクティブセルと選択を行のキーで付け替える(React 版と同じ)。
4133
4431
  rowLocator: historyRowLocator(),
4134
4432
  // 追加(1.9.0 の点検 T6-02): 元に戻したアクティブセルは行のキーで付け替えるので、並びに付いていく仕組みに教える(React 版と同じ)。
4135
- noteFollowMove: engine.activeRowFollow.noteFollowMove
4433
+ noteFollowMove: engine.activeRowFollow.noteFollowMove,
4434
+ // 追加(1.10.0 の別視点のレビュー RA-6): 元に戻す / やり直すの前に入力行の下書きを行にする(React 版と同じ)。
4435
+ beforeRestore: newRowActive() ? engine.newRow.commitDraft : void 0
4136
4436
  }), "render", "history");
4137
4437
  connectController(changeTracker, () => ({
4138
4438
  enabled: changeTrackingActive(),
4139
4439
  rows: rows(),
4140
4440
  columns: columns(),
4141
4441
  rowKeyGetter: props.rowKeyGetter,
4142
- applyRows: props.onRowsChange ? history.applyRows : void 0
4442
+ applyRows: props.onRowsChange ? history.applyRows : void 0,
4443
+ trackRows: trackRowChanges()
4143
4444
  }), "render", "changeTracker");
4144
4445
  const changeSnapshot = createExternalStoreSignal(changeTracker, "changeTrackerStore");
4145
4446
  connectController(
@@ -4152,8 +4453,21 @@ function GridShellBody(props, features, mountGate, mode) {
4152
4453
  "changeNotifier"
4153
4454
  );
4154
4455
  const unsavedChanges = createMemo10(
4155
- () => changeTrackingActive() ? { rowCount: changeSnapshot().rowCount, cellCount: changeSnapshot().cellCount } : null,
4156
- { equals: (a, b) => a === b || a !== null && b !== null && a.rowCount === b.rowCount && a.cellCount === b.cellCount }
4456
+ () => {
4457
+ if (!changeTrackingActive()) {
4458
+ return null;
4459
+ }
4460
+ const snapshot2 = changeSnapshot();
4461
+ return trackRowChanges() ? {
4462
+ rowCount: snapshot2.rowCount,
4463
+ cellCount: snapshot2.cellCount,
4464
+ addedCount: snapshot2.addedCount,
4465
+ removedCount: snapshot2.removedCount
4466
+ } : { rowCount: snapshot2.rowCount, cellCount: snapshot2.cellCount };
4467
+ },
4468
+ {
4469
+ equals: (a, b) => a === b || a !== null && b !== null && a.rowCount === b.rowCount && a.cellCount === b.cellCount && a.addedCount === b.addedCount && a.removedCount === b.removedCount
4470
+ }
4157
4471
  );
4158
4472
  const unsavedTracking = createMemo10(() => {
4159
4473
  const parts = changeTrackingParts;
@@ -4167,11 +4481,14 @@ function GridShellBody(props, features, mountGate, mode) {
4167
4481
  trackedColumns: changeTracker.getTrackedColumns(),
4168
4482
  describeCell: (column, row, savedValue) => parts.describeUnsavedCell(column, row, savedValue, texts),
4169
4483
  rowDescription: texts.unsavedRow,
4170
- closedTreeDescription: texts.unsavedInClosedTreeRow
4484
+ closedTreeDescription: texts.unsavedInClosedTreeRow,
4485
+ // 追加(1.10.0): グリッドで足した行(行を追っているときだけ)。
4486
+ isAddedRow: trackRowChanges() ? changeTracker.isAddedRow : void 0,
4487
+ addedRowDescription: texts.unsavedAddedRow
4171
4488
  };
4172
4489
  });
4173
4490
  const closedTreeUnsaved = createMemo10(
4174
- () => changeTrackingActive() && treeStage() && changeSnapshot().rowCount > 0 ? engine.rowPipeline.getClosedTreeAncestorKeys(treeOpenState(), changeTracker.getUnsavedRowKeys()) : null
4491
+ () => changeTrackingActive() && treeStage() && (changeSnapshot().rowCount > 0 || changeSnapshot().addedCount > 0) ? engine.rowPipeline.getClosedTreeAncestorKeys(treeOpenState(), changeTracker.getUnsavedRowKeys()) : null
4175
4492
  );
4176
4493
  const resolveRevertItems = () => {
4177
4494
  const parts = changeTrackingParts;
@@ -4195,9 +4512,44 @@ function GridShellBody(props, features, mountGate, mode) {
4195
4512
  });
4196
4513
  };
4197
4514
  const handleRowsChange = () => props.onRowsChange ? history.handleRowsChange : void 0;
4515
+ connectController(engine.newRow, () => {
4516
+ rowModel();
4517
+ void ui().activeCell;
4518
+ void ui().editingCell;
4519
+ return {
4520
+ active: newRowActive(),
4521
+ rows: rows(),
4522
+ createRow: props.createRow,
4523
+ rowKeyGetter: props.rowKeyGetter,
4524
+ handleRowsChange: handleRowsChange(),
4525
+ getUiState: store.getState,
4526
+ dispatch,
4527
+ getViewState: store.getViewState,
4528
+ setViewState: store.setViewState,
4529
+ gridRootRef,
4530
+ scrollContainerRef
4531
+ };
4532
+ }, "render", "newRow");
4533
+ connectController(
4534
+ { update: (args) => engine.newRow.notifyDraft(args.callback) },
4535
+ () => {
4536
+ newRowDraft();
4537
+ const option = props.newRow;
4538
+ return { callback: inOwnTick(typeof option === "object" ? option.onDraftChange : void 0) };
4539
+ },
4540
+ "effect",
4541
+ "newRowDraftNotifier"
4542
+ );
4198
4543
  const cells = createCellCommands();
4199
4544
  const { selectEntireGrid, clearSelectedCells, tryStartEdit: tryStartEditCell } = cells;
4200
4545
  const orderedColumnKeys = createMemo10(() => orderedColumns().map((column) => column.key).join("\0"));
4546
+ const resolvedExcelShortcuts = createMemo10(() => resolveExcelShortcuts2(props.excelShortcuts));
4547
+ const excelShortcutCommandsEnabled = createMemo10(
4548
+ () => features.excelShortcuts !== void 0 && usesExcelShortcutCommands2(resolvedExcelShortcuts())
4549
+ );
4550
+ const fillSelectionEnabled = createMemo10(
4551
+ () => features.excelShortcuts !== void 0 && resolvedExcelShortcuts().fillSelection
4552
+ );
4201
4553
  const clipboard = createClipboardController();
4202
4554
  connectController(clipboard, () => ({
4203
4555
  rows: rows(),
@@ -4210,7 +4562,8 @@ function GridShellBody(props, features, mountGate, mode) {
4210
4562
  readOnly: editLocked(),
4211
4563
  canEditCell: canEditCell(),
4212
4564
  rowKeyGetter: resolvedRowKeyGetter(),
4213
- onCopied: (selection) => {
4565
+ // 変更(1.10.0 / Excel のキー): 切り取りのときは元のセルの控え(cut)も入れます。
4566
+ onCopied: (selection, cut) => {
4214
4567
  const state = store.getState();
4215
4568
  store.setViewState({
4216
4569
  copiedRange: {
@@ -4221,10 +4574,24 @@ function GridShellBody(props, features, mountGate, mode) {
4221
4574
  collapsedGroupKeys: state.collapsedGroupKeys,
4222
4575
  viewRowCount: untrack13(viewRowCount),
4223
4576
  columns: untrack13(orderedColumnKeys)
4224
- }
4577
+ },
4578
+ ...cut === void 0 ? {} : { cut }
4225
4579
  }
4226
4580
  });
4227
4581
  },
4582
+ // 追加(1.10.0 / Excel のキー): 切り取りが生きているか(点線を描く条件と同じ = 今の見え方のまま)。
4583
+ getLiveCopiedRange: () => {
4584
+ const copied = store.getViewState().copiedRange;
4585
+ const state = store.getState();
4586
+ return copied !== null && isCopiedRangeCurrent(copied, {
4587
+ sort: state.sort,
4588
+ filters: state.filters,
4589
+ collapsedGroupKeys: state.collapsedGroupKeys,
4590
+ viewRowCount: untrack13(viewRowCount),
4591
+ columns: untrack13(orderedColumnKeys)
4592
+ }) ? copied : null;
4593
+ },
4594
+ onCutPasted: () => store.setViewState({ copiedRange: null }),
4228
4595
  createRow: props.createRow,
4229
4596
  createOverflowColumn: props.createOverflowColumn,
4230
4597
  onPasteSkipped: inOwnTick(props.onPasteSkipped),
@@ -4237,7 +4604,7 @@ function GridShellBody(props, features, mountGate, mode) {
4237
4604
  dispatch
4238
4605
  }), "render", "clipboard");
4239
4606
  const isWholeGridSelected = createMemo10(
4240
- () => computeIsWholeGridSelected(ui().selection, viewRowCount(), visibleColumns().length)
4607
+ () => computeIsWholeGridSelected(ui().selection, getSelectableRowCount(rowModel()), visibleColumns().length)
4241
4608
  );
4242
4609
  const fillHandleFeature2 = features.fillHandle;
4243
4610
  const fill = fillHandleFeature2?.createFillHandle({
@@ -4298,6 +4665,8 @@ function GridShellBody(props, features, mountGate, mode) {
4298
4665
  // 条件付き書式の機能が無ければチップもデータバーも描かれないので、値の文字を探す(React 版 1.0.2 / QB-1)。
4299
4666
  conditionalFormat: conditionalFormatFeature2 !== void 0,
4300
4667
  toViewRow: findToViewRow(),
4668
+ // 追加(1.11.0 / 複数選択): 複数選択のセルの文字の区切り(チップの印と同じ位置。React 版と同じ)。
4669
+ multiSelectSeparator: localeTexts().multiSelectSeparator,
4301
4670
  // カレントのヒットへ: クリックと同じ 1 セルの選択 + 見える位置へのスクロール(命令的 API と同じ経路)。
4302
4671
  // 変更(1.9.0 の点検 T3-02 / T6-09): 打っている途中の移動('query')で開いた親は、次の文字の移動で閉じ直す(React 版と同じ)。
4303
4672
  onNavigate: (rowIndex, colIndex, cause) => {
@@ -4348,7 +4717,7 @@ function GridShellBody(props, features, mountGate, mode) {
4348
4717
  const openColumnMenuForCell = (col) => {
4349
4718
  const column = untrack13(orderedColumns)[col];
4350
4719
  const root = gridRootRef.current;
4351
- if (!columnMenu || !column || !root || isSyntheticColumnKey2(column.key)) {
4720
+ if (!columnMenu || !column || !root || isSyntheticColumnKey3(column.key)) {
4352
4721
  return false;
4353
4722
  }
4354
4723
  const header = Array.from(root.querySelectorAll(".ssg-header-cell[data-ssg-col-key]")).find(
@@ -4524,6 +4893,12 @@ function GridShellBody(props, features, mountGate, mode) {
4524
4893
  setEditorInitialValue,
4525
4894
  dispatch,
4526
4895
  handleCopy: clipboard.handleCopy,
4896
+ // 追加(1.10.0 / Excel のキー): Ctrl / ⌘ + X の切り取り(excelShortcuts で外したときは渡さない)と、ほかの 6 つ(機能)。
4897
+ handleCut: resolvedExcelShortcuts().cut ? clipboard.handleCut : void 0,
4898
+ // 追加(1.10.0 / 入力行): 編集していない入力行の Escape は下書きを捨てる。
4899
+ onEscapeNewRow: newRowActive() ? engine.newRow.discardAt : void 0,
4900
+ onTabPastNewRowDraft: newRowActive() ? engine.newRow.commitFromLastColumn : void 0,
4901
+ onShortcutKeyDown: excelShortcutCommandsEnabled() ? engine.excelShortcuts.handleKeyDown : void 0,
4527
4902
  openFind: findShortcut() ? openFindFromShortcut : void 0,
4528
4903
  handleCellDoubleClick: tryStartEditCell,
4529
4904
  isWholeGridSelected: isWholeGridSelected(),
@@ -4576,6 +4951,22 @@ function GridShellBody(props, features, mountGate, mode) {
4576
4951
  startEditWithValue: edit.startEditWithValue,
4577
4952
  dispatch
4578
4953
  }), "render", "cells");
4954
+ connectController(engine.excelShortcuts, () => ({
4955
+ rows: rows(),
4956
+ rowModel: rowModel(),
4957
+ orderedColumns: orderedColumns(),
4958
+ uiState: ui(),
4959
+ getUiState: store.getState,
4960
+ readOnly: editLocked(),
4961
+ canEditCell: canEditCell(),
4962
+ handleRowsChange: handleRowsChange(),
4963
+ applyServerSideCellEdits: applyServerSideCellEdits(),
4964
+ dispatch,
4965
+ shortcuts: resolvedExcelShortcuts(),
4966
+ localeTexts: localeTexts(),
4967
+ commitEdit: (value) => edit.commitEdit(value),
4968
+ endEdit: edit.cancelEdit
4969
+ }), "render", "excelShortcuts");
4579
4970
  const imeDirectInputEnabled = createMemo10(() => (props.imeDirectInput ?? false) && imeFeature !== void 0);
4580
4971
  connectController(
4581
4972
  engine.imeInput,
@@ -4601,7 +4992,7 @@ function GridShellBody(props, features, mountGate, mode) {
4601
4992
  ) === true,
4602
4993
  startEdit: edit.startEditWithValue,
4603
4994
  // number の列は確定した文字を半角の数値の表記へ直して編集を始めます(読めない変換は捨てる)。
4604
- resolveEditText: (cell, text) => imeFeature ? imeFeature.resolveImeEditText(untrack13(orderedColumns), cell, text) : text
4995
+ resolveEditText: (cell, text) => imeFeature ? imeFeature.resolveImeEditText(untrack13(orderedColumns), cell, text, untrack13(rowModel)) : text
4605
4996
  };
4606
4997
  },
4607
4998
  "effect",
@@ -4714,7 +5105,7 @@ function GridShellBody(props, features, mountGate, mode) {
4714
5105
  return tree && columnGroupsFeature2 ? columnGroupsFeature2.createColumnChooserDropClamp(tree, columns()) : void 0;
4715
5106
  });
4716
5107
  const sortManagerColumns = createMemo10(
4717
- () => [...visibleColumns(), ...activeGroupColumns()].filter((column) => !isSyntheticColumnKey2(column.key)).map((column) => ({ key: column.key, title: columnTitles()?.get(column.key) ?? (column.title || column.key) }))
5108
+ () => [...visibleColumns(), ...activeGroupColumns()].filter((column) => !isSyntheticColumnKey3(column.key)).map((column) => ({ key: column.key, title: columnTitles()?.get(column.key) ?? (column.title || column.key) }))
4718
5109
  );
4719
5110
  const showGlobalFilterRow = () => globalFilterEnabled() && globalFilterText().trim().length > 0;
4720
5111
  const toolPanelTabs = createMemo10(
@@ -4889,12 +5280,12 @@ function GridShellBody(props, features, mountGate, mode) {
4889
5280
  hasRowKeys: () => props.rowKeyGetter !== void 0,
4890
5281
  dragRowLabel: () => localeTexts().dragRowLabel
4891
5282
  });
4892
- const renderRowDropIndicator = (pane, cap) => rowDrag ? <Show11 when={rowDragAvailable()}>
5283
+ const renderRowDropIndicator = (pane, cap) => rowDrag ? <Show12 when={rowDragAvailable()}>
4893
5284
  <div
4894
5285
  ref={(element) => rowDrag.setIndicator(pane, element)}
4895
5286
  class={["ssg-row-drop-indicator", { "ssg-row-drop-indicator--cap": cap() }]}
4896
5287
  />
4897
- </Show11> : null;
5288
+ </Show12> : null;
4898
5289
  const handleCornerHeaderPointerDown = (event) => {
4899
5290
  event.preventDefault();
4900
5291
  if (event.button !== 0) {
@@ -4938,6 +5329,8 @@ function GridShellBody(props, features, mountGate, mode) {
4938
5329
  connectController(engine.gridApi, () => ({
4939
5330
  scrollContainerRef,
4940
5331
  dispatch,
5332
+ // 追加(1.10.0 / 入力行): focusNewRow() が移る最初の編集できる列を決める。
5333
+ readOnly: editLocked(),
4941
5334
  rowModel: rowModel(),
4942
5335
  viewRowCount: viewRowCount(),
4943
5336
  leafRowCount: leafRowCount(),
@@ -5172,10 +5565,10 @@ function GridShellBody(props, features, mountGate, mode) {
5172
5565
  });
5173
5566
  const showTopBarSummary = () => props.showTopBarSummary ?? true;
5174
5567
  const showTopBarFilter = () => (props.showTopBarFilter ?? true) && globalFilterEnabled();
5175
- const topBar = () => <Show11 when={props.showTopBar ?? true}>
5176
- <Show11
5568
+ const topBar = () => <Show12 when={props.showTopBar ?? true}>
5569
+ <Show12
5177
5570
  when={renderTopBarFn() !== void 0}
5178
- fallback={<Show11 when={showTopBarSummary() || showTopBarFilter()}>
5571
+ fallback={<Show12 when={showTopBarSummary() || showTopBarFilter()}>
5179
5572
  <DefaultGridTopBar
5180
5573
  slot={slots().toolbar}
5181
5574
  derivedSummary={derivedSummary()}
@@ -5189,13 +5582,13 @@ function GridShellBody(props, features, mountGate, mode) {
5189
5582
  onFilterSummaryClick={columnFilterEnabled() && toolPanel ? toggleFilterManager : void 0}
5190
5583
  filterPanelOpen={toolPanel?.activeTab() === "filter"}
5191
5584
  />
5192
- </Show11>}
5585
+ </Show12>}
5193
5586
  >
5194
5587
  {customTopBar()}
5195
- </Show11>
5196
- </Show11>;
5197
- const bottomBar = () => <Show11 when={props.showBottomBar ?? true}>
5198
- <Show11
5588
+ </Show12>
5589
+ </Show12>;
5590
+ const bottomBar = () => <Show12 when={props.showBottomBar ?? true}>
5591
+ <Show12
5199
5592
  when={renderBottomBarFn() !== void 0}
5200
5593
  fallback={<DefaultGridBottomBar
5201
5594
  slot={slots().statusBar}
@@ -5207,15 +5600,16 @@ function GridShellBody(props, features, mountGate, mode) {
5207
5600
  />}
5208
5601
  >
5209
5602
  {customBottomBar()}
5210
- </Show11>
5211
- </Show11>;
5603
+ </Show12>
5604
+ </Show12>;
5212
5605
  const editorSession = createMemo10((previous) => {
5213
5606
  const cell = ui().editingCell;
5214
5607
  if (cell === null) {
5215
5608
  return null;
5216
5609
  }
5217
5610
  const model = rowModel();
5218
- if (model.getRow(cell.row) === void 0) {
5611
+ newRowDraft();
5612
+ if (peekEditRow(model, cell.row) === void 0) {
5219
5613
  return previous ?? { id: 1, identity: null };
5220
5614
  }
5221
5615
  const identity = {
@@ -5249,20 +5643,33 @@ function GridShellBody(props, features, mountGate, mode) {
5249
5643
  }
5250
5644
  const column = orderedColumns()[cell.col];
5251
5645
  const model = rowModel();
5252
- const row = model.getRow(cell.row);
5646
+ newRowDraft();
5647
+ const row = peekEditRow(model, cell.row);
5253
5648
  if (!column || !row) {
5254
5649
  return null;
5255
5650
  }
5651
+ const { sourceRowIndex, rowKey } = resolveCanEditCellContext(model, cell.row);
5256
5652
  return {
5257
5653
  row,
5258
5654
  rowIndex: cell.row,
5259
- sourceRowIndex: model.getSourceIndex(cell.row) ?? cell.row,
5260
- rowKey: model.getRowKey(cell.row) ?? cell.row,
5655
+ sourceRowIndex,
5656
+ rowKey,
5261
5657
  colIndex: cell.col,
5262
5658
  column,
5263
5659
  value: getCellValue2(row, column)
5264
5660
  };
5265
5661
  });
5662
+ const editingEditor = createMemo10((previous) => {
5663
+ const column = editingColumn();
5664
+ if (column === void 0) {
5665
+ return void 0;
5666
+ }
5667
+ if (!hasRowEditor(column)) {
5668
+ return resolveStaticColumnEditor2(column);
5669
+ }
5670
+ const session = editingSessionInfo();
5671
+ return session ? resolveColumnEditor(column, session.row) : previous;
5672
+ });
5266
5673
  const portalClassName = () => [themeClassName(), resolvedMotion() === "off" ? MOTION_OFF_CLASS_NAME : void 0].filter(Boolean).join(" ") || void 0;
5267
5674
  const writeRenderedCellValue = (rowKey, column, nextValue) => {
5268
5675
  const viewIndex = engine.gridApi.handle.getViewRowIndex(rowKey);
@@ -5292,17 +5699,21 @@ function GridShellBody(props, features, mountGate, mode) {
5292
5699
  const isRowDraggable = props.isRowDraggable;
5293
5700
  return !isRowDraggable || isRowDraggable(row, { rowKey: cell.rowKey, sourceRowIndex: cell.sourceRowIndex });
5294
5701
  });
5295
- return <Show11 when={draggable()}>
5702
+ return <Show12 when={draggable()}>
5296
5703
  <RowDragHandle2
5297
5704
  operable={rowDragOperable()}
5298
5705
  tooltip={rowDragOperable() ? rowDragTexts().dragRow : rowDragTexts().dragRowDisabled}
5299
5706
  onPointerDown={(event) => rowDrag.onRowDragHandlePointerDown(untrack13(() => cell.rowIndex), event)}
5300
5707
  />
5301
- </Show11>;
5708
+ </Show12>;
5302
5709
  };
5303
5710
  const cellTextOf = (row, column) => {
5304
- const value = getCellValue2(row, column);
5305
- return column.valueFormatter ? column.valueFormatter({ value, row, column }) : String(value ?? "");
5711
+ return formatCellText(
5712
+ column,
5713
+ getCellValue2(row, column),
5714
+ row,
5715
+ localeTexts().multiSelectSeparator
5716
+ );
5306
5717
  };
5307
5718
  const splitFind = findFeature2?.splitTextByFindRanges;
5308
5719
  const highlightFind = (content, ranges, findCurrentIndex2) => {
@@ -5316,22 +5727,34 @@ function GridShellBody(props, features, mountGate, mode) {
5316
5727
  </mark> : segment.text;
5317
5728
  });
5318
5729
  };
5319
- const isTextCellColumn = (column) => column.key !== ROW_DRAG_HANDLE_COLUMN_KEY2 && !column.renderCell && column.editor?.type !== "checkbox" && !(conditionalFormatFeature2 && (column.conditionalFormat?.chips !== void 0 || column.conditionalFormat?.dataBar?.showValue === false));
5730
+ const isTextCellColumn = (column) => column.key !== ROW_DRAG_HANDLE_COLUMN_KEY2 && !column.renderCell && !mayHaveEditorType(column, "checkbox") && // 追加(1.11.0 / 複数選択): 複数選択になりうる列はチップを描くので外します(機能があり valueFormatter の無い列)。
5731
+ !(multiSelectParts && column.valueFormatter === void 0 && mayBeMultiSelectColumn(column)) && !(conditionalFormatFeature2 && (column.conditionalFormat?.chips !== void 0 || column.conditionalFormat?.dataBar?.showValue === false));
5320
5732
  const cellText = (row, column, ranges, findCurrentIndex2) => highlightFind(cellTextOf(row, column), ranges, findCurrentIndex2);
5321
- const renderDefaultCellContent = (currentRow, column, cell, treeAggregate) => {
5733
+ const renderDefaultCellContent = (currentRow, column, cell, treeAggregate, notCheckbox = false) => {
5322
5734
  if (column.key === ROW_DRAG_HANDLE_COLUMN_KEY2) {
5323
5735
  return renderRowDragHandleCell(currentRow(), cell);
5324
5736
  }
5325
5737
  const unbound = column;
5326
- if (!column.renderCell && column.editor?.type === "checkbox") {
5327
- const editor = column.editor;
5328
- return <CheckboxCell
5329
- slot={slots().checkbox}
5330
- label={column.title || column.key}
5331
- checked={isCheckboxChecked(getCellValue2(currentRow(), unbound), editor)}
5332
- readOnly={cell.readOnly}
5333
- onToggle={() => cells.toggleCheckbox({ row: cell.rowIndex, col: cell.colIndex })}
5334
- />;
5738
+ const renderCheckbox = (editor) => <CheckboxCell
5739
+ slot={slots().checkbox}
5740
+ label={column.title || column.key}
5741
+ checked={isCheckboxChecked(getCellValue2(currentRow(), unbound), editor())}
5742
+ readOnly={cell.readOnly}
5743
+ onToggle={() => cells.toggleCheckbox({ row: cell.rowIndex, col: cell.colIndex })}
5744
+ />;
5745
+ if (!column.renderCell && !notCheckbox && hasRowEditor(column)) {
5746
+ const checkboxEditor = createMemo10(() => {
5747
+ const editor = resolveColumnEditor(unbound, currentRow());
5748
+ return editor?.type === "checkbox" ? editor : void 0;
5749
+ });
5750
+ const otherwise = renderDefaultCellContent(currentRow, column, cell, treeAggregate, true);
5751
+ return <Show12 when={checkboxEditor() !== void 0} fallback={otherwise}>
5752
+ {renderCheckbox(() => checkboxEditor() ?? {})}
5753
+ </Show12>;
5754
+ }
5755
+ const staticEditor = resolveStaticColumnEditor2(column);
5756
+ if (!column.renderCell && staticEditor?.type === "checkbox") {
5757
+ return renderCheckbox(() => staticEditor);
5335
5758
  }
5336
5759
  if (column.renderCell) {
5337
5760
  const cellValue = createMemo10(() => getCellValue2(currentRow(), unbound));
@@ -5354,9 +5777,9 @@ function GridShellBody(props, features, mountGate, mode) {
5354
5777
  const indexes = labelViewIndexes();
5355
5778
  return indexes ? resolveDataRowNumber2(indexes, cell.rowIndex) : cell.rowIndex + 1;
5356
5779
  };
5357
- return <Show11 when={expandable()}>
5780
+ return <Show12 when={expandable()}>
5358
5781
  <DetailToggleButton detail={detail} rowNumber={rowNumber()} onPress={edit.endEditLeftOpen} />
5359
- </Show11>;
5782
+ </Show12>;
5360
5783
  }
5361
5784
  const context = {
5362
5785
  get row() {
@@ -5418,6 +5841,26 @@ function GridShellBody(props, features, mountGate, mode) {
5418
5841
  textOf(currentRow());
5419
5842
  return null;
5420
5843
  }
5844
+ if (multiSelectParts && unbound.valueFormatter === void 0 && mayBeMultiSelectColumn(unbound)) {
5845
+ const { MultiSelectChips, resolveChipLabels, splitRangesByChips: splitRangesByChips2 } = multiSelectParts;
5846
+ const labels = createMemo10(() => {
5847
+ const row = currentRow();
5848
+ return resolveChipLabels(resolveColumnEditor(unbound, row), getCellValue2(row, unbound), row);
5849
+ });
5850
+ const separator = () => localeTexts().multiSelectSeparator;
5851
+ const chipRanges = createMemo10(() => {
5852
+ const list = labels();
5853
+ const ranges = cell.findRanges;
5854
+ return list && ranges && ranges.length > 0 ? splitRangesByChips2(list, separator().length, ranges) : void 0;
5855
+ });
5856
+ return <Show12 when={labels()} fallback={<span class="ssg-cell-value">{highlightCellFind(textOf(currentRow()))}</span>}>
5857
+ {(list) => <MultiSelectChips
5858
+ labels={list()}
5859
+ separator={separator()}
5860
+ renderLabel={(label, index) => highlightFind(label, chipRanges()?.[index], findCurrentIndex2)}
5861
+ />}
5862
+ </Show12>;
5863
+ }
5421
5864
  const chips = formatRules?.chips;
5422
5865
  if (conditionalFormatFeature2 && chips) {
5423
5866
  const { GridChip: GridChip2, resolveChipSpec: resolveChipSpec2 } = conditionalFormatFeature2;
@@ -5453,9 +5896,9 @@ function GridShellBody(props, features, mountGate, mode) {
5453
5896
  }
5454
5897
  })
5455
5898
  );
5456
- return <Show11 when={chip()} fallback={<span class="ssg-cell-value">{highlightCellFind(text)}</span>}>
5899
+ return <Show12 when={chip()} fallback={<span class="ssg-cell-value">{highlightCellFind(text)}</span>}>
5457
5900
  {(spec) => <GridChip2 spec={spec()}>{highlightCellFind(spec().label ?? text)}</GridChip2>}
5458
- </Show11>;
5901
+ </Show12>;
5459
5902
  }
5460
5903
  return <span class="ssg-cell-value">{highlightCellFind(textOf(currentRow()))}</span>;
5461
5904
  };
@@ -5474,9 +5917,9 @@ function GridShellBody(props, features, mountGate, mode) {
5474
5917
  const value = createMemo10(() => cell.treeRow?.aggregates?.[column.key]);
5475
5918
  const aggregate = { has, value };
5476
5919
  const TreeAggregateValue = parts.TreeAggregateValue;
5477
- content = column.renderCell ? renderDefaultCellContent(currentRow, column, cell, aggregate) : <Show11 when={has()} fallback={renderDefaultCellContent(currentRow, column, cell)}>
5920
+ content = column.renderCell ? renderDefaultCellContent(currentRow, column, cell, aggregate) : <Show12 when={has()} fallback={renderDefaultCellContent(currentRow, column, cell)}>
5478
5921
  <TreeAggregateValue column={column} value={value()} />
5479
- </Show11>;
5922
+ </Show12>;
5480
5923
  } else {
5481
5924
  content = renderDefaultCellContent(currentRow, column, cell);
5482
5925
  }
@@ -5486,7 +5929,7 @@ function GridShellBody(props, features, mountGate, mode) {
5486
5929
  const TreeCellPrefix = parts.TreeCellPrefix;
5487
5930
  const rowLabel = () => cellTextOf(currentRow(), column);
5488
5931
  return <>
5489
- <Show11 when={cell.treeRow}>
5932
+ <Show12 when={cell.treeRow}>
5490
5933
  {(tree) => <TreeCellPrefix
5491
5934
  level={tree().level}
5492
5935
  hasChildren={tree().hasChildren}
@@ -5496,7 +5939,7 @@ function GridShellBody(props, features, mountGate, mode) {
5496
5939
  onToggle={(open) => engine.gridApi.handle.setTreeRowOpen(cell.rowKey, open)}
5497
5940
  onPress={edit.endEditLeftOpen}
5498
5941
  />}
5499
- </Show11>
5942
+ </Show12>
5500
5943
  {content}
5501
5944
  </>;
5502
5945
  };
@@ -5524,7 +5967,7 @@ function GridShellBody(props, features, mountGate, mode) {
5524
5967
  const activeRect = () => placementRectInPane(activeCellPlacement(), pane);
5525
5968
  const editorRect = () => placementRectInPane(editingCellPlacement(), pane);
5526
5969
  const clearHoveredRow = () => applyHoveredRowChange(null);
5527
- const renderPinnedRows = (position) => PinnedRows ? <Show11 when={position === "top" ? pinnedTop() : pinnedBottom()}>
5970
+ const renderPinnedRows = (position) => PinnedRows ? <Show12 when={position === "top" ? pinnedTop() : pinnedBottom()}>
5528
5971
  {(pinnedRows) => <PinnedRows
5529
5972
  pane={pane}
5530
5973
  position={position}
@@ -5542,11 +5985,12 @@ function GridShellBody(props, features, mountGate, mode) {
5542
5985
  showCellOverflowTooltip={props.showCellOverflowTooltip ?? false}
5543
5986
  conditionalFormat={conditionalFormatFeature2}
5544
5987
  conditionalFormatStats={conditionalFormatStats()}
5988
+ multiSelect={multiSelectParts}
5545
5989
  slots={slots()}
5546
5990
  onPointerEnter={clearHoveredRow}
5547
5991
  />}
5548
- </Show11> : null;
5549
- const renderTotalRow = () => TotalRow ? <Show11 when={totalRowEnabled()}>
5992
+ </Show12> : null;
5993
+ const renderTotalRow = () => TotalRow ? <Show12 when={totalRowEnabled()}>
5550
5994
  <TotalRow
5551
5995
  pane={pane}
5552
5996
  ownsRowHeader={ownsRowHeader()}
@@ -5566,7 +6010,7 @@ function GridShellBody(props, features, mountGate, mode) {
5566
6010
  slots={slots()}
5567
6011
  onPointerEnter={clearHoveredRow}
5568
6012
  />
5569
- </Show11> : null;
6013
+ </Show12> : null;
5570
6014
  return <div
5571
6015
  style={{
5572
6016
  position: "relative",
@@ -5580,7 +6024,7 @@ function GridShellBody(props, features, mountGate, mode) {
5580
6024
  {
5581
6025
  /* 列のグループの段(1.6.0。列見出しの行の前の sticky の器)。 */
5582
6026
  }
5583
- {ColumnGroupHeader ? <Show11 when={columnGroupTree()}>
6027
+ {ColumnGroupHeader ? <Show12 when={columnGroupTree()}>
5584
6028
  {(tree) => <ColumnGroupHeader
5585
6029
  pane={pane}
5586
6030
  tree={tree()}
@@ -5599,7 +6043,7 @@ function GridShellBody(props, features, mountGate, mode) {
5599
6043
  onResizePointerDown={columnCommands.handleColumnGroupResizePointerDown}
5600
6044
  onGripPointerDown={columnGroupDragHandler()}
5601
6045
  />}
5602
- </Show11> : null}
6046
+ </Show12> : null}
5603
6047
  <GridHeaderRow
5604
6048
  pane={pane}
5605
6049
  ownsRowHeader={ownsRowHeader()}
@@ -5675,20 +6119,20 @@ function GridShellBody(props, features, mountGate, mode) {
5675
6119
  headerHeight={headerHeight()}
5676
6120
  leadingWidth={leadingWidth()}
5677
6121
  baseOffset={vertical().overlayBaseOffset}
6122
+ />}
6123
+ </For5>
6124
+ <For5 each={copyRectsForPane(pane)} keyed={false}>
6125
+ {(rect) => <CopyRangeOverlay
6126
+ slot={slots().copyRangeOverlay}
6127
+ rect={rect()}
6128
+ headerHeight={headerHeight()}
6129
+ leadingWidth={leadingWidth()}
6130
+ baseOffset={vertical().overlayBaseOffset}
5678
6131
  />}
5679
6132
  </For5>
5680
6133
  {motionExtrasFeature2 ? (() => {
5681
- const { CopyRangeOverlay: CopyRangeOverlay2, ColumnHoverOverlay: ColumnHoverOverlay2 } = motionExtrasFeature2;
6134
+ const { ColumnHoverOverlay: ColumnHoverOverlay2 } = motionExtrasFeature2;
5682
6135
  return <>
5683
- <For5 each={copyRectsForPane(pane)} keyed={false}>
5684
- {(rect) => <CopyRangeOverlay2
5685
- slot={slots().copyRangeOverlay}
5686
- rect={rect()}
5687
- headerHeight={headerHeight()}
5688
- leadingWidth={leadingWidth()}
5689
- baseOffset={vertical().overlayBaseOffset}
5690
- />}
5691
- </For5>
5692
6136
  <ColumnHoverOverlay2
5693
6137
  rect={columnHoverRectForPane(pane)}
5694
6138
  headerHeight={headerHeight()}
@@ -5722,13 +6166,16 @@ function GridShellBody(props, features, mountGate, mode) {
5722
6166
  leadingWidth={leadingWidth()}
5723
6167
  baseOffset={vertical().overlayBaseOffset}
5724
6168
  initialValue={() => view().editorInitialValue ?? store.getViewState().editorInitialValue ?? ""}
5725
- editor={editingColumn()?.editor}
6169
+ editor={editingEditor()}
5726
6170
  session={editingSessionInfo()}
5727
6171
  themeClassName={portalClassName()}
5728
6172
  slots={slots()}
5729
6173
  onCommit={(value, direction, option, forwardText) => edit.commitEdit(value, direction, option, forwardText)}
5730
6174
  SearchSelectEditor={features.selectSearch?.SearchSelectCellEditor}
6175
+ DateTimeEditor={features.dateTimeEditors?.DateTimeCellEditor}
6176
+ MultiSelectEditor={features.multiSelect?.MultiSelectCellEditor}
5731
6177
  onCancel={edit.cancelEdit}
6178
+ onCommitToSelection={fillSelectionEnabled() ? engine.excelShortcuts.commitToSelection : void 0}
5732
6179
  onRegisterFlush={edit.registerDraftFlush}
5733
6180
  onRegisterLateCommit={edit.registerLateCommitReceiver}
5734
6181
  align={editingColumn()?.align}
@@ -5756,6 +6203,8 @@ function GridShellBody(props, features, mountGate, mode) {
5756
6203
  labelRowLayer={pane === "center" ? labelRowLayerCenter() : labelRowLayerBand()}
5757
6204
  skeletonRow={isServerSide() ? serverSideFeature2?.BodySkeletonRow : void 0}
5758
6205
  labelViewIndexes={labelViewIndexes()}
6206
+ newRowLayer={newRowLayer()}
6207
+ newRowDraft={newRowDraft()}
5759
6208
  rowHeaderWidth={rowHeaderWidth()}
5760
6209
  rows={bodyRows()}
5761
6210
  entries={entries()}
@@ -5810,10 +6259,10 @@ function GridShellBody(props, features, mountGate, mode) {
5810
6259
  {
5811
6260
  /* 下端の行(本体ぶんの空きの直後 = 箱の下端の sticky の行)。既定は下の固定行 → 合計行、'belowTotal' は合計行 → 固定行。 */
5812
6261
  }
5813
- <Show11 when={pinnedBelowTotal()} fallback={[renderPinnedRows("bottom"), renderTotalRow()]}>
6262
+ <Show12 when={pinnedBelowTotal()} fallback={[renderPinnedRows("bottom"), renderTotalRow()]}>
5814
6263
  {renderTotalRow()}
5815
6264
  {renderPinnedRows("bottom")}
5816
- </Show11>
6265
+ </Show12>
5817
6266
  {
5818
6267
  /* 中央ペインのドロップの縦線(左右のペインは、固定列が 0 本でも線を出せるよう外側の器に置く。React 版と同じ)。 */
5819
6268
  }
@@ -5861,7 +6310,7 @@ function GridShellBody(props, features, mountGate, mode) {
5861
6310
  {
5862
6311
  /* フィルターのチップのバー(showFilterChipBar)。適用中の列フィルターをチップで並べる(0 件なら出さない)。 */
5863
6312
  }
5864
- {filterManagement && filteringFeature2 ? <Show11 when={props.showFilterChipBar}>
6313
+ {filterManagement && filteringFeature2 ? <Show12 when={props.showFilterChipBar}>
5865
6314
  <filteringFeature2.FilterChipBar
5866
6315
  slot={slots().filterChipBar}
5867
6316
  entries={filterManagement.entries()}
@@ -5870,7 +6319,7 @@ function GridShellBody(props, features, mountGate, mode) {
5870
6319
  onClearFilter={columnCommands.handleFilterManagerClearFilter}
5871
6320
  onClearAllFilters={columnCommands.handleFilterManagerClearAll}
5872
6321
  />
5873
- </Show11> : null}
6322
+ </Show12> : null}
5874
6323
  <div
5875
6324
  ref={(element) => {
5876
6325
  gridRootRef.current = element;
@@ -5949,7 +6398,7 @@ function GridShellBody(props, features, mountGate, mode) {
5949
6398
  }}
5950
6399
  style={pinnedPaneStyle("left", paneResolution().leftPaneTotalWidth, paneLayout().left.entries.length > 0)}
5951
6400
  >
5952
- <Show11 when={paneResolution().hasLeftPane}>
6401
+ <Show12 when={paneResolution().hasLeftPane}>
5953
6402
  {renderPane(
5954
6403
  "left",
5955
6404
  () => paneResolution().leftPaneTotalWidth,
@@ -5957,7 +6406,7 @@ function GridShellBody(props, features, mountGate, mode) {
5957
6406
  () => true,
5958
6407
  () => paneLayout().left.entries
5959
6408
  )}
5960
- </Show11>
6409
+ </Show12>
5961
6410
  {renderColumnDropIndicator("left")}
5962
6411
  </div>
5963
6412
  <div
@@ -5984,7 +6433,7 @@ function GridShellBody(props, features, mountGate, mode) {
5984
6433
  }}
5985
6434
  style={pinnedPaneStyle("right", paneResolution().rightPaneTotalWidth, paneLayout().right.entries.length > 0)}
5986
6435
  >
5987
- <Show11 when={paneResolution().hasRightPane}>
6436
+ <Show12 when={paneResolution().hasRightPane}>
5988
6437
  {renderPane(
5989
6438
  "right",
5990
6439
  () => paneResolution().rightPaneTotalWidth,
@@ -5992,15 +6441,15 @@ function GridShellBody(props, features, mountGate, mode) {
5992
6441
  () => false,
5993
6442
  () => paneLayout().right.entries
5994
6443
  )}
5995
- </Show11>
6444
+ </Show12>
5996
6445
  {renderColumnDropIndicator("right")}
5997
6446
  </div>
5998
6447
  </div>
5999
- <Show11 when={viewRowCount() === 0 && hydrated()}>
6448
+ <Show12 when={viewRowCount() === 0 && hydrated()}>
6000
6449
  <div class={["ssg-empty-state", slots().emptyState?.className]} style={slots().emptyState?.style}>
6001
6450
  {emptyStateText()}
6002
6451
  </div>
6003
- </Show11>
6452
+ </Show12>
6004
6453
  </div>
6005
6454
  <span
6006
6455
  ref={(element) => {
@@ -6011,7 +6460,7 @@ function GridShellBody(props, features, mountGate, mode) {
6011
6460
  aria-hidden={hasDetailCards() ? void 0 : "true"}
6012
6461
  onFocus={(event) => detailRows.handleTableExitFocus(event.relatedTarget)}
6013
6462
  />
6014
- <Show11 when={scrollHintFeature2 !== void 0 && activeScrollHint()}>
6463
+ <Show12 when={scrollHintFeature2 !== void 0 && activeScrollHint()}>
6015
6464
  {(options) => {
6016
6465
  const ScrollHint = scrollHintFeature2.ScrollHint;
6017
6466
  return <ScrollHint
@@ -6028,19 +6477,19 @@ function GridShellBody(props, features, mountGate, mode) {
6028
6477
  labelViewIndexes={labelViewIndexes()}
6029
6478
  />;
6030
6479
  }}
6031
- </Show11>
6480
+ </Show12>
6032
6481
  {
6033
6482
  /* 列幅の自動調整の計測中の overlay(遅れて出す。pointer-events: none で操作は素通し)。 */
6034
6483
  }
6035
- <Show11 when={isAutosizing()}>
6484
+ <Show12 when={isAutosizing()}>
6036
6485
  <div class="ssg-autosize-overlay">
6037
6486
  <span class="ssg-autosize-pill">{localeTexts().sizingColumns}</span>
6038
6487
  </div>
6039
- </Show11>
6488
+ </Show12>
6040
6489
  {
6041
6490
  /* グローバルフィルターの適用中の overlay(しきい値を超える表の時間分割の間だけ。pointer-events: none)。 */
6042
6491
  }
6043
- <Show11 when={globalFilterStatus() === "filtering"}>
6492
+ <Show12 when={globalFilterStatus() === "filtering"}>
6044
6493
  <div class="ssg-filter-overlay">
6045
6494
  <span class="ssg-filter-overlay-chip" role="status" aria-live="polite">
6046
6495
  <span class="ssg-filter-spinner" aria-hidden="true" />
@@ -6049,11 +6498,11 @@ function GridShellBody(props, features, mountGate, mode) {
6049
6498
  </span>
6050
6499
  </span>
6051
6500
  </div>
6052
- </Show11>
6501
+ </Show12>
6053
6502
  {
6054
6503
  /* セル内検索のバー(右上に浮く。見出しの直下)。開いているときだけ描きます。 */
6055
6504
  }
6056
- <Show11 when={findSnapshot().open}>
6505
+ <Show12 when={findSnapshot().open}>
6057
6506
  {FindBar && <FindBar
6058
6507
  snapshot={findSnapshot()}
6059
6508
  headerHeight={headerHeight()}
@@ -6063,11 +6512,11 @@ function GridShellBody(props, features, mountGate, mode) {
6063
6512
  onClose={closeFindAndRefocus}
6064
6513
  slot={slots().findBar}
6065
6514
  />}
6066
- </Show11>
6515
+ </Show12>
6067
6516
  {
6068
6517
  /* サーバーサイドのエラーバー(取得の失敗の再試行 / 保存の失敗。機能 features/serverSide の部品)。 */
6069
6518
  }
6070
- {serverSide && serverSideFeature2 ? <Show11 when={isServerSide()}>
6519
+ {serverSide && serverSideFeature2 ? <Show12 when={isServerSide()}>
6071
6520
  <serverSideFeature2.ErrorBars
6072
6521
  loadError={serverSide.loadError()}
6073
6522
  writeError={serverSide.writeError()}
@@ -6075,12 +6524,12 @@ function GridShellBody(props, features, mountGate, mode) {
6075
6524
  slot={slots().errorBar}
6076
6525
  localeTexts={localeTexts()}
6077
6526
  />
6078
- </Show11> : null}
6527
+ </Show12> : null}
6079
6528
  {
6080
6529
  /* 追加(1.5.0 / serverSideRefetch="keep"): 前の行を見せたまま取り直している間、本体の見えている所を薄くする面と、
6081
6530
  列見出しの下に流れる線(大きさはスクロールバーを除いた見える範囲。測る前は CSS の left / right / bottom。React 版と同じ)。 */
6082
6531
  }
6083
- <Show11 when={refetchingRows()}>
6532
+ <Show12 when={refetchingRows()}>
6084
6533
  <div
6085
6534
  class="ssg-refetch-veil"
6086
6535
  aria-hidden="true"
@@ -6095,12 +6544,12 @@ function GridShellBody(props, features, mountGate, mode) {
6095
6544
  aria-hidden="true"
6096
6545
  style={{ top: `${headerHeight()}px`, width: viewportWidth() > 0 ? `${viewportWidth()}px` : void 0 }}
6097
6546
  />
6098
- </Show11>
6547
+ </Show12>
6099
6548
  {
6100
6549
  /* IME オンのままの直接入力の入力受け(imeDirectInput が有効なときだけ)。値 / 位置 / 変換中の見た目はコントローラが
6101
6550
  直接扱います。Tab の順番には入れません(タブストップはシェルのまま)。 */
6102
6551
  }
6103
- <Show11 when={imeDirectInputEnabled()}>
6552
+ <Show12 when={imeDirectInputEnabled()}>
6104
6553
  <input
6105
6554
  ref={(element) => engine.imeInput.attach(element)}
6106
6555
  {...{ [IME_INPUT_ATTRIBUTE]: "" }}
@@ -6113,14 +6562,14 @@ function GridShellBody(props, features, mountGate, mode) {
6113
6562
  spellcheck="false"
6114
6563
  aria-label={localeTexts().cellInput}
6115
6564
  />
6116
- </Show11>
6565
+ </Show12>
6117
6566
  </div>
6118
6567
  {bottomBar()}
6119
6568
  {
6120
6569
  /* 列メニュー(グリッドの外のポップアップ)。 */
6121
6570
  }
6122
- {columnMenu && columnMenuFeature2 ? <Show11 when={columnMenu.openedColumn()}>
6123
- {(column) => <Show11 when={columnMenu.layout()}>
6571
+ {columnMenu && columnMenuFeature2 ? <Show12 when={columnMenu.openedColumn()}>
6572
+ {(column) => <Show12 when={columnMenu.layout()}>
6124
6573
  {(layout) => <columnMenuFeature2.ColumnMenuPopover
6125
6574
  slots={slots()}
6126
6575
  themeClassName={portalClassName()}
@@ -6148,7 +6597,7 @@ function GridShellBody(props, features, mountGate, mode) {
6148
6597
  // 表に出ている最後のデータ列は出さない(自動グループ列だけが残ると列メニューが無くなり、「グループ化を外す」へ
6149
6598
  // 戻れない。React 版と同じ)。
6150
6599
  columnMenuGroupingAvailable() && column().aggFunc == null && column().rowGroup !== true && visibleColumns().some(
6151
- (candidate) => candidate.key !== column().key && candidate.rowGroup !== true && !isSyntheticColumnKey2(candidate.key)
6600
+ (candidate) => candidate.key !== column().key && candidate.rowGroup !== true && !isSyntheticColumnKey3(candidate.key)
6152
6601
  ) ? () => columnCommands.handleColumnMenuGroupBy(column().key) : void 0
6153
6602
  }
6154
6603
  onUngroup={columnMenuGroupingAvailable() && rowGroupingActive() ? columnCommands.handleColumnMenuUngroup : void 0}
@@ -6169,8 +6618,8 @@ function GridShellBody(props, features, mountGate, mode) {
6169
6618
  }}
6170
6619
  onRequestClose={columnMenu.close}
6171
6620
  />}
6172
- </Show11>}
6173
- </Show11> : null}
6621
+ </Show12>}
6622
+ </Show12> : null}
6174
6623
  {
6175
6624
  /* 列フィルターのポップオーバー(グリッドの外のポップアップ。閉じている間は何も描かない)。 */
6176
6625
  }
@@ -6193,9 +6642,9 @@ function GridShellBody(props, features, mountGate, mode) {
6193
6642
  /* ツールパネル(グリッドの外のポップアップ。開いている間だけ描く)。タブを切り替えると中身を作り直す(タブの中の検索の
6194
6643
  文字などは戻る。React 版と同じ)。 */
6195
6644
  }
6196
- {toolPanel && toolPanelViews ? <Show11 when={toolPanel.activeTab()}>
6197
- {(tab) => <Show11 when={toolPanel.layout()}>
6198
- {(layout) => <Show11 when={toolPanelViews()}>
6645
+ {toolPanel && toolPanelViews ? <Show12 when={toolPanel.activeTab()}>
6646
+ {(tab) => <Show12 when={toolPanel.layout()}>
6647
+ {(layout) => <Show12 when={toolPanelViews()}>
6199
6648
  {(views) => {
6200
6649
  const { ToolPanel, FilterManagementPanel, ColumnChooserPanel, SortManagementPanel } = untrack13(views);
6201
6650
  return <ToolPanel
@@ -6254,13 +6703,13 @@ function GridShellBody(props, features, mountGate, mode) {
6254
6703
  </Switch>
6255
6704
  </ToolPanel>;
6256
6705
  }}
6257
- </Show11>}
6258
- </Show11>}
6259
- </Show11> : null}
6706
+ </Show12>}
6707
+ </Show12>}
6708
+ </Show12> : null}
6260
6709
  {
6261
6710
  /* セル / 行番号の右クリックメニュー(グリッドの外のポップアップ)。 */
6262
6711
  }
6263
- {contextMenu && contextMenuFeature2 ? <Show11 when={contextMenuView()}>
6712
+ {contextMenu && contextMenuFeature2 ? <Show12 when={contextMenuView()}>
6264
6713
  {(open) => <contextMenuFeature2.CellContextMenuPopover
6265
6714
  items={open().items}
6266
6715
  layout={open().layout}
@@ -6270,7 +6719,7 @@ function GridShellBody(props, features, mountGate, mode) {
6270
6719
  themeClassName={portalClassName()}
6271
6720
  slots={slots()}
6272
6721
  />}
6273
- </Show11> : null}
6722
+ </Show12> : null}
6274
6723
  {
6275
6724
  /* フィルハンドルの埋めたあとのメニュー / ドラッグ中の値のツールチップ(グリッドの外のポップアップ)。 */
6276
6725
  }
@@ -6363,7 +6812,7 @@ import {
6363
6812
  import { DEFAULT_COLUMN_GROUPS_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
6364
6813
 
6365
6814
  // src/view/GridColumnGroupHeader.tsx
6366
- import { For as For6, Show as Show12, createMemo as createMemo11 } from "solid-js";
6815
+ import { For as For6, Show as Show13, createMemo as createMemo11 } from "solid-js";
6367
6816
  import {
6368
6817
  createColumnGroupResize,
6369
6818
  resolveColumnGroupCells
@@ -6485,7 +6934,7 @@ function GridColumnGroupHeader(props) {
6485
6934
  >
6486
6935
  {definition().renderHeader ? definition().renderHeader?.(context) : title()}
6487
6936
  </span>
6488
- <Show12 when={group().collapsible}>
6937
+ <Show13 when={group().collapsible}>
6489
6938
  <button
6490
6939
  type="button"
6491
6940
  tabindex={-1}
@@ -6517,8 +6966,8 @@ function GridColumnGroupHeader(props) {
6517
6966
  />
6518
6967
  </svg>
6519
6968
  </button>
6520
- </Show12>
6521
- <Show12 when={props.onGripPointerDown}>
6969
+ </Show13>
6970
+ <Show13 when={props.onGripPointerDown}>
6522
6971
  {(handler) => <span
6523
6972
  aria-hidden="true"
6524
6973
  class="ssg-header-grip ssg-col-group-grip"
@@ -6534,11 +6983,11 @@ function GridColumnGroupHeader(props) {
6534
6983
  <circle cx="6" cy="11" r="1" />
6535
6984
  </svg>
6536
6985
  </span>}
6537
- </Show12>
6986
+ </Show13>
6538
6987
  </div>
6539
- <Show12 when={resize()}>
6988
+ <Show13 when={resize()}>
6540
6989
  {(value) => <div class="ssg-header-resize" onPointerDown={(event) => props.onResizePointerDown(value(), event)} />}
6541
- </Show12>
6990
+ </Show13>
6542
6991
  </div>;
6543
6992
  }}
6544
6993
  </For6>
@@ -6603,7 +7052,7 @@ function createColumnMenu(inputs) {
6603
7052
  }
6604
7053
 
6605
7054
  // src/view/ColumnMenuPopover.tsx
6606
- import { For as For7, Show as Show13, createEffect as createEffect5, createMemo as createMemo13, createSignal as createSignal10, createUniqueId as createUniqueId4, onCleanup as onCleanup9 } from "solid-js";
7055
+ import { For as For7, Show as Show14, createEffect as createEffect5, createMemo as createMemo13, createSignal as createSignal10, createUniqueId as createUniqueId4, onCleanup as onCleanup9 } from "solid-js";
6607
7056
  import { Portal as Portal2 } from "@solidjs/web";
6608
7057
  var PINNED_ITEMS = [
6609
7058
  { value: void 0, label: "menuPinNone" },
@@ -6706,7 +7155,7 @@ function ColumnMenuPopover(props) {
6706
7155
  props.slots?.menuItem?.className
6707
7156
  ];
6708
7157
  const itemStyle = () => props.slots?.menuItem?.style;
6709
- return <Show13 when={container}>
7158
+ return <Show14 when={container}>
6710
7159
  {(mount) => <Portal2 mount={mount()}>
6711
7160
  <div
6712
7161
  ref={(node) => {
@@ -6739,7 +7188,7 @@ function ColumnMenuPopover(props) {
6739
7188
  {
6740
7189
  /* 列のグループの開閉(1.6.0 の実アプリの点検 G5-02)。 */
6741
7190
  }
6742
- <Show13 when={props.onToggleColumnGroup !== void 0 && (props.columnGroupToggles?.length ?? 0) > 0}>
7191
+ <Show14 when={props.onToggleColumnGroup !== void 0 && (props.columnGroupToggles?.length ?? 0) > 0}>
6743
7192
  <For7 each={props.columnGroupToggles ?? []} keyed={(toggle) => toggle.key}>
6744
7193
  {(toggle) => <button
6745
7194
  type="button"
@@ -6754,9 +7203,9 @@ function ColumnMenuPopover(props) {
6754
7203
  </button>}
6755
7204
  </For7>
6756
7205
  <div role="separator" class="ssg-menu-separator" />
6757
- </Show13>
7206
+ </Show14>
6758
7207
 
6759
- <Show13 when={props.canFilter}>
7208
+ <Show14 when={props.canFilter}>
6760
7209
  <button
6761
7210
  type="button"
6762
7211
  role="menuitem"
@@ -6769,9 +7218,9 @@ function ColumnMenuPopover(props) {
6769
7218
  <span class="ssg-menu-label">{texts().menuFilter}</span>
6770
7219
  </button>
6771
7220
  <div role="separator" class="ssg-menu-separator" />
6772
- </Show13>
7221
+ </Show14>
6773
7222
 
6774
- <Show13 when={props.canSort}>
7223
+ <Show14 when={props.canSort}>
6775
7224
  <SortItem
6776
7225
  direction="asc"
6777
7226
  sortDirection={props.sortDirection}
@@ -6790,7 +7239,7 @@ function ColumnMenuPopover(props) {
6790
7239
  class={itemClass()}
6791
7240
  style={itemStyle()}
6792
7241
  />
6793
- <Show13 when={props.onOpenSortManager}>
7242
+ <Show14 when={props.onOpenSortManager}>
6794
7243
  {(open) => <button
6795
7244
  type="button"
6796
7245
  role="menuitem"
@@ -6802,10 +7251,10 @@ function ColumnMenuPopover(props) {
6802
7251
  <span class="ssg-menu-icon" />
6803
7252
  <span class="ssg-menu-label">{texts().menuManageSort}</span>
6804
7253
  </button>}
6805
- </Show13>
6806
- </Show13>
7254
+ </Show14>
7255
+ </Show14>
6807
7256
 
6808
- <Show13 when={props.canManageFilters ? props.onOpenFilterManager : void 0}>
7257
+ <Show14 when={props.canManageFilters ? props.onOpenFilterManager : void 0}>
6809
7258
  {(open) => <button
6810
7259
  type="button"
6811
7260
  role="menuitem"
@@ -6817,16 +7266,16 @@ function ColumnMenuPopover(props) {
6817
7266
  <span class="ssg-menu-icon" />
6818
7267
  <span class="ssg-menu-label">{texts().menuManageFilters}</span>
6819
7268
  </button>}
6820
- </Show13>
7269
+ </Show14>
6821
7270
 
6822
7271
  {
6823
7272
  /* 区切りは、並び替えの項目かフィルターを管理…のどちらかが出ているとき。 */
6824
7273
  }
6825
- <Show13 when={props.canSort || props.canManageFilters && props.onOpenFilterManager !== void 0}>
7274
+ <Show14 when={props.canSort || props.canManageFilters && props.onOpenFilterManager !== void 0}>
6826
7275
  <div role="separator" class="ssg-menu-separator" />
6827
- </Show13>
7276
+ </Show14>
6828
7277
 
6829
- <Show13 when={props.onGroupByColumn}>
7278
+ <Show14 when={props.onGroupByColumn}>
6830
7279
  {(groupBy) => <button
6831
7280
  type="button"
6832
7281
  role="menuitem"
@@ -6838,8 +7287,8 @@ function ColumnMenuPopover(props) {
6838
7287
  <span class="ssg-menu-icon" />
6839
7288
  <span class="ssg-menu-label">{texts().menuGroupBy}</span>
6840
7289
  </button>}
6841
- </Show13>
6842
- <Show13 when={props.onUngroup}>
7290
+ </Show14>
7291
+ <Show14 when={props.onUngroup}>
6843
7292
  {(ungroup) => <button
6844
7293
  type="button"
6845
7294
  role="menuitem"
@@ -6851,10 +7300,10 @@ function ColumnMenuPopover(props) {
6851
7300
  <span class="ssg-menu-icon" />
6852
7301
  <span class="ssg-menu-label">{texts().menuUngroup}</span>
6853
7302
  </button>}
6854
- </Show13>
6855
- <Show13 when={props.onGroupByColumn !== void 0 || props.onUngroup !== void 0}>
7303
+ </Show14>
7304
+ <Show14 when={props.onGroupByColumn !== void 0 || props.onUngroup !== void 0}>
6856
7305
  <div role="separator" class="ssg-menu-separator" />
6857
- </Show13>
7306
+ </Show14>
6858
7307
 
6859
7308
  {
6860
7309
  /* 列の固定 ›(小メニューはこの行 = position: relative を基準に置く。パネルの子孫なので外側の押下の判定にも入る)。 */
@@ -6915,7 +7364,7 @@ function ColumnMenuPopover(props) {
6915
7364
  ›
6916
7365
  </span>
6917
7366
  </button>
6918
- <Show13 when={isPinSubmenuOpen()}>
7367
+ <Show14 when={isPinSubmenuOpen()}>
6919
7368
  <div
6920
7369
  ref={(node) => {
6921
7370
  pinSubmenuElement = node;
@@ -6959,16 +7408,16 @@ function ColumnMenuPopover(props) {
6959
7408
  </button>;
6960
7409
  }}
6961
7410
  </For7>
6962
- <Show13 when={!props.canChangePinned}>
7411
+ <Show14 when={!props.canChangePinned}>
6963
7412
  <div id={pinNoteId} role="none" class="ssg-menu-note">
6964
7413
  {texts().menuPinUnavailable}
6965
7414
  </div>
6966
- </Show13>
7415
+ </Show14>
6967
7416
  </div>
6968
- </Show13>
7417
+ </Show14>
6969
7418
  </div>
6970
7419
 
6971
- <Show13 when={props.onAutosizeColumn && props.onAutosizeAllColumns}>
7420
+ <Show14 when={props.onAutosizeColumn && props.onAutosizeAllColumns}>
6972
7421
  <button
6973
7422
  type="button"
6974
7423
  role="menuitem"
@@ -6991,9 +7440,9 @@ function ColumnMenuPopover(props) {
6991
7440
  <span class="ssg-menu-icon" />
6992
7441
  <span class="ssg-menu-label">{texts().menuAutosizeAll}</span>
6993
7442
  </button>
6994
- </Show13>
7443
+ </Show14>
6995
7444
 
6996
- <Show13 when={props.onOpenColumnChooser}>
7445
+ <Show14 when={props.onOpenColumnChooser}>
6997
7446
  {(open) => <button
6998
7447
  type="button"
6999
7448
  role="menuitem"
@@ -7005,7 +7454,7 @@ function ColumnMenuPopover(props) {
7005
7454
  <span class="ssg-menu-icon" />
7006
7455
  <span class="ssg-menu-label">{texts().menuColumns}</span>
7007
7456
  </button>}
7008
- </Show13>
7457
+ </Show14>
7009
7458
 
7010
7459
  <button
7011
7460
  type="button"
@@ -7033,7 +7482,7 @@ function ColumnMenuPopover(props) {
7033
7482
  </div>
7034
7483
  </div>
7035
7484
  </Portal2>}
7036
- </Show13>;
7485
+ </Show14>;
7037
7486
  }
7038
7487
  function SortItem(props) {
7039
7488
  const active = () => props.sortDirection === props.direction;
@@ -7112,7 +7561,7 @@ import {
7112
7561
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/conditionalFormat";
7113
7562
 
7114
7563
  // src/view/GridChip.tsx
7115
- import { Show as Show14 } from "solid-js";
7564
+ import { Show as Show15 } from "solid-js";
7116
7565
  import { resolveChipTone } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/conditionalFormat";
7117
7566
  var SVG_NOT_FOCUSABLE3 = { focusable: "false" };
7118
7567
  var ICON_PATHS = {
@@ -7138,7 +7587,7 @@ function GridChip(props) {
7138
7587
  class={["ssg-chip", custom() ? "ssg-chip--custom" : `ssg-chip--${tone()}`]}
7139
7588
  style={custom() ? { "--ssg-cf-chip-color": props.spec.color } : void 0}
7140
7589
  >
7141
- <Show14 when={props.spec.icon !== false}>
7590
+ <Show15 when={props.spec.icon !== false}>
7142
7591
  <span class="ssg-chip-icon" aria-hidden="true">
7143
7592
  <svg
7144
7593
  viewBox="0 0 12 12"
@@ -7152,7 +7601,7 @@ function GridChip(props) {
7152
7601
  {ICON_PATHS[tone()]()}
7153
7602
  </svg>
7154
7603
  </span>
7155
- </Show14>
7604
+ </Show15>
7156
7605
  <span class="ssg-chip-label">{props.children}</span>
7157
7606
  </span>;
7158
7607
  }
@@ -7192,7 +7641,7 @@ function createCellContextMenu(inputs) {
7192
7641
  }
7193
7642
 
7194
7643
  // src/view/CellContextMenuPopover.tsx
7195
- import { For as For8, Match as Match2, Show as Show15, Switch as Switch2, createMemo as createMemo15, createSignal as createSignal11, onCleanup as onCleanup10 } from "solid-js";
7644
+ import { For as For8, Match as Match2, Show as Show16, Switch as Switch2, createMemo as createMemo15, createSignal as createSignal11, onCleanup as onCleanup10 } from "solid-js";
7196
7645
  import { Portal as Portal3 } from "@solidjs/web";
7197
7646
  function CellContextMenuPopover(props) {
7198
7647
  const portal = useGridPortal();
@@ -7205,7 +7654,7 @@ function CellContextMenuPopover(props) {
7205
7654
  }
7206
7655
  });
7207
7656
  const layout = createMemo15(() => props.layout);
7208
- const element = <Show15 when={container}>
7657
+ const element = <Show16 when={container}>
7209
7658
  {(mount) => <Portal3 mount={mount()}>
7210
7659
  <div
7211
7660
  ref={(node) => {
@@ -7266,7 +7715,7 @@ function CellContextMenuPopover(props) {
7266
7715
  </For8>
7267
7716
  </div>
7268
7717
  </Portal3>}
7269
- </Show15>;
7718
+ </Show16>;
7270
7719
  createPortalTokens(panel, () => props.themeClassName, layout);
7271
7720
  return element;
7272
7721
  }
@@ -7484,7 +7933,7 @@ function createFillHandle(inputs) {
7484
7933
  }
7485
7934
 
7486
7935
  // src/view/FillHandleLayer.tsx
7487
- import { For as For9, Show as Show16, createEffect as createEffect7, createMemo as createMemo17, createSignal as createSignal12, onCleanup as onCleanup11 } from "solid-js";
7936
+ import { For as For9, Show as Show17, createEffect as createEffect7, createMemo as createMemo17, createSignal as createSignal12, onCleanup as onCleanup11 } from "solid-js";
7488
7937
  import { Portal as Portal4 } from "@solidjs/web";
7489
7938
  import { formatLocaleText as formatLocaleText8 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
7490
7939
  import { getActiveElement } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/shadowDom";
@@ -7522,7 +7971,7 @@ function FillHandleLayer(props) {
7522
7971
  {
7523
7972
  /* 選択範囲の右下の四角。 */
7524
7973
  }
7525
- <Show16 when={corner()}>
7974
+ <Show17 when={corner()}>
7526
7975
  {(current) => <div
7527
7976
  class="ssg-fill-handle"
7528
7977
  style={{
@@ -7534,12 +7983,12 @@ function FillHandleLayer(props) {
7534
7983
  aria-hidden="true"
7535
7984
  onPointerDown={(event) => props.fill.controller.handlePointerDown(event)}
7536
7985
  />}
7537
- </Show16>
7986
+ </Show17>
7538
7987
  {
7539
7988
  /* 埋めたあとのボタン(左上の位置)。 */
7540
7989
  }
7541
- <Show16 when={filled()}>
7542
- {(snapshot2) => <Show16 when={chip()}>
7990
+ <Show17 when={filled()}>
7991
+ {(snapshot2) => <Show17 when={chip()}>
7543
7992
  {(position) => <FillOptionsChip
7544
7993
  fill={props.fill}
7545
7994
  x={props.leadingWidth + position().x}
@@ -7547,8 +7996,8 @@ function FillHandleLayer(props) {
7547
7996
  kind={snapshot2().kind}
7548
7997
  menuOpen={snapshot2().menu !== null}
7549
7998
  />}
7550
- </Show16>}
7551
- </Show16>
7999
+ </Show17>}
8000
+ </Show17>
7552
8001
  </>;
7553
8002
  }
7554
8003
  function FillOptionsChip(props) {
@@ -7635,7 +8084,7 @@ function FillOptionsMenu(props) {
7635
8084
  }
7636
8085
  event.stopPropagation();
7637
8086
  };
7638
- const element = <Show16 when={container}>
8087
+ const element = <Show17 when={container}>
7639
8088
  {(mount) => <Portal4 mount={mount()}>
7640
8089
  <div
7641
8090
  ref={(node) => {
@@ -7673,7 +8122,7 @@ function FillOptionsMenu(props) {
7673
8122
  </For9>
7674
8123
  </div>
7675
8124
  </Portal4>}
7676
- </Show16>;
8125
+ </Show17>;
7677
8126
  createPortalTokens(panel, () => props.themeClassName, () => null);
7678
8127
  return element;
7679
8128
  }
@@ -7688,7 +8137,7 @@ function FillTooltip(props) {
7688
8137
  const visible = createMemo17(() => pointer() !== null);
7689
8138
  const container = createMemo17(() => visible() ? portal.container() : null);
7690
8139
  const [tooltip, setTooltip] = createSignal12();
7691
- const element = <Show16 when={container()}>
8140
+ const element = <Show17 when={container()}>
7692
8141
  {(mount) => <Portal4 mount={mount()}>
7693
8142
  <div
7694
8143
  ref={setTooltip}
@@ -7703,7 +8152,7 @@ function FillTooltip(props) {
7703
8152
  {props.text}
7704
8153
  </div>
7705
8154
  </Portal4>}
7706
- </Show16>;
8155
+ </Show17>;
7707
8156
  createPortalTokens(tooltip, () => props.themeClassName, () => null);
7708
8157
  return element;
7709
8158
  }
@@ -7717,8 +8166,8 @@ function FillHandlePortals(props) {
7717
8166
  return snapshot2.status === "dragging" ? snapshot2.previewText : null;
7718
8167
  });
7719
8168
  return <>
7720
- <Show16 when={menu()}>
7721
- {(snapshot2) => <Show16 when={snapshot2().menu}>
8169
+ <Show17 when={menu()}>
8170
+ {(snapshot2) => <Show17 when={snapshot2().menu}>
7722
8171
  {(layout) => <FillOptionsMenu
7723
8172
  fill={props.fill}
7724
8173
  layout={layout()}
@@ -7726,11 +8175,11 @@ function FillHandlePortals(props) {
7726
8175
  seriesAvailable={snapshot2().seriesAvailable}
7727
8176
  themeClassName={props.themeClassName}
7728
8177
  />}
7729
- </Show16>}
7730
- </Show16>
7731
- <Show16 when={tooltipText() !== null}>
8178
+ </Show17>}
8179
+ </Show17>
8180
+ <Show17 when={tooltipText() !== null}>
7732
8181
  <FillTooltip fill={props.fill} text={tooltipText() ?? ""} themeClassName={props.themeClassName} />
7733
- </Show16>
8182
+ </Show17>
7734
8183
  </>;
7735
8184
  }
7736
8185
 
@@ -7806,6 +8255,7 @@ import {
7806
8255
  resolveOpenedFilterColumn
7807
8256
  } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/filterPopoverController";
7808
8257
  import { inferColumnFilterType } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/inferFilterType";
8258
+ import { resolveStaticColumnEditor as resolveStaticColumnEditor3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/columnEditor";
7809
8259
  import { getCellValue as getCellValue3 } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions";
7810
8260
  import { GROUP_AUTO_COLUMN_KEY } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/grouping";
7811
8261
  var NO_GROUP_COLUMNS = [];
@@ -7824,7 +8274,8 @@ function createFilterPopover(inputs) {
7824
8274
  const rows = inputs.rows();
7825
8275
  const isLabelRow = inputs.isLabelRow?.();
7826
8276
  const result = inferColumnFilterType({
7827
- editorType: column.editor?.type,
8277
+ // 変更(1.11.0 / 行ごとのエディタ): 行の無い所なので、列の editor で推定します(editorForRow は見ない)。
8278
+ editorType: resolveStaticColumnEditor3(column)?.type,
7828
8279
  isServerSide: inputs.isServerSide(),
7829
8280
  rowCount: rows.length,
7830
8281
  // ラベル行は空として数えます(見出しの文字で数値の列が文字の列に推定されないように)。
@@ -8038,7 +8489,7 @@ function createFilterManagement(inputs) {
8038
8489
  }
8039
8490
 
8040
8491
  // src/view/ColumnFilterPopoverHost.tsx
8041
- import { Show as Show17, createMemo as createMemo21, untrack as untrack16 } from "solid-js";
8492
+ import { Show as Show18, createMemo as createMemo21, untrack as untrack16 } from "solid-js";
8042
8493
  import {
8043
8494
  createFilterPopoverCommands,
8044
8495
  createFilterPopoverDerivedResolver
@@ -8049,6 +8500,7 @@ import {
8049
8500
  resolveSyncSelectOptions,
8050
8501
  selectCollectorResult
8051
8502
  } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/selectOptionsCollector";
8503
+ import { resolveMultiSelectFilterOptions } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
8052
8504
  import {
8053
8505
  createAsyncSelectOptionsSource,
8054
8506
  selectAsyncOptionsResult
@@ -8132,7 +8584,9 @@ function ColumnFilterPopoverHost(props) {
8132
8584
  rowCount: optionRows().length,
8133
8585
  getRawValueAt: getOpenedColumnRawValueAt(),
8134
8586
  numeric: numeric(),
8135
- sourceKey: sourceKey()
8587
+ sourceKey: sourceKey(),
8588
+ // 追加(1.11.0 / 複数選択): 複数選択の列は配列を要素ごとに集める(名前と並びは候補から)。
8589
+ multiOptions: resolveMultiSelectFilterOptions(collectColumn())
8136
8590
  }), "render", "filterValueCollector");
8137
8591
  const collectorSnapshot = createExternalStoreSignal(collector, "filterValueStore");
8138
8592
  const optionsResult = createMemo21(() => {
@@ -8211,12 +8665,12 @@ function ColumnFilterPopoverHost(props) {
8211
8665
  columnKey
8212
8666
  });
8213
8667
  });
8214
- return <Show17 when={openedColumn()}>
8215
- {(column) => <Show17 when={filterPopover.layout()}>
8216
- {(layout) => <Show17 when={props.views()}>
8668
+ return <Show18 when={openedColumn()}>
8669
+ {(column) => <Show18 when={filterPopover.layout()}>
8670
+ {(layout) => <Show18 when={props.views()}>
8217
8671
  {(views) => {
8218
8672
  const ColumnFilterPopover = untrack16(views).ColumnFilterPopover;
8219
- return <Show17 when={column().key} keyed>
8673
+ return <Show18 when={column().key} keyed>
8220
8674
  {(columnKey) => <ColumnFilterPopover
8221
8675
  popoverSlot={props.popoverSlot}
8222
8676
  themeClassName={props.themeClassName}
@@ -8257,20 +8711,20 @@ function ColumnFilterPopoverHost(props) {
8257
8711
  onSetClear={commands.clearSetFilterPopoverValue}
8258
8712
  onSetReplaceSelection={commands.handleSetFilterReplaceSelection}
8259
8713
  />}
8260
- </Show17>;
8714
+ </Show18>;
8261
8715
  }}
8262
- </Show17>}
8263
- </Show17>}
8264
- </Show17>;
8716
+ </Show18>}
8717
+ </Show18>}
8718
+ </Show18>;
8265
8719
  }
8266
8720
 
8267
8721
  // src/view/GridFilterChipBar.tsx
8268
- import { For as For10, Show as Show18, createUniqueId as createUniqueId5 } from "solid-js";
8722
+ import { For as For10, Show as Show19, createUniqueId as createUniqueId5 } from "solid-js";
8269
8723
  import { formatLocaleText as formatLocaleText11 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
8270
8724
  function GridFilterChipBar(props) {
8271
8725
  const texts = useFeatureLocaleText();
8272
8726
  const chipIdBase = createUniqueId5();
8273
- return <Show18 when={props.entries.length > 0}>
8727
+ return <Show19 when={props.entries.length > 0}>
8274
8728
  <div class={["ssg-filter-chip-bar", props.slot?.className]} style={props.slot?.style}>
8275
8729
  <For10 each={props.entries} keyed={(entry) => entry.columnKey}>
8276
8730
  {(entry, index) => <div class={entry().isHidden ? "ssg-filter-chip ssg-filter-chip--hidden" : "ssg-filter-chip"}>
@@ -8317,17 +8771,18 @@ function GridFilterChipBar(props) {
8317
8771
  {texts().clearAll}
8318
8772
  </button>
8319
8773
  </div>
8320
- </Show18>;
8774
+ </Show19>;
8321
8775
  }
8322
8776
 
8323
8777
  // src/view/lazyPopups.ts
8324
8778
  import { createEffect as createEffect8, createMemo as createMemo22 } from "solid-js";
8325
8779
  import { createLazyModule } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/lazyModule";
8326
8780
  import { scheduleIdleTask } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/scheduler";
8327
- var filterPopoverModule = /* @__PURE__ */ createLazyModule(() => import("./chunks/ColumnFilterPopover-D7INPNVB.jsx"));
8328
- var toolPanelModule = /* @__PURE__ */ createLazyModule(() => import("./chunks/toolPanelViews-BRH5PCOI.jsx"));
8781
+ var filterPopoverModule = /* @__PURE__ */ createLazyModule(() => import("./chunks/ColumnFilterPopover-JL3HPGXY.jsx"));
8782
+ var toolPanelModule = /* @__PURE__ */ createLazyModule(() => import("./chunks/toolPanelViews-N6TGBFFW.jsx"));
8783
+ var dateEditorCalendarModule = /* @__PURE__ */ createLazyModule(() => import("./chunks/DateEditorCalendar-FVUNVD7Y.jsx"));
8329
8784
  var preloadGridPopups = async () => {
8330
- await Promise.all([filterPopoverModule.load(), toolPanelModule.load()]);
8785
+ await Promise.all([filterPopoverModule.load(), toolPanelModule.load(), dateEditorCalendarModule.load()]);
8331
8786
  };
8332
8787
  var reportLoadError = (error) => {
8333
8788
  console.error("[SpreadsheetGrid] \u30DD\u30C3\u30D7\u30AA\u30FC\u30D0\u30FC\u90E8\u54C1\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\n[SpreadsheetGrid] Failed to load the popup components.", error);
@@ -8525,7 +8980,7 @@ import { buildGroupTree, flattenGroupTree } from "@ishibashi0112/spreadsheet-gri
8525
8980
  import { DEFAULT_GROUPING_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
8526
8981
 
8527
8982
  // src/view/GridBodyGroupRow.tsx
8528
- import { For as For11, Show as Show19, createMemo as createMemo23 } from "solid-js";
8983
+ import { For as For11, Show as Show20, createMemo as createMemo23 } from "solid-js";
8529
8984
  import { GROUP_AUTO_COLUMN_KEY as GROUP_AUTO_COLUMN_KEY3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/grouping";
8530
8985
  import {
8531
8986
  formatTotalRowCellText,
@@ -8555,7 +9010,7 @@ function GridBodyGroupRow(props) {
8555
9010
  }}
8556
9011
  onDblClick={() => props.onGroupToggle(props.groupRow.groupKey)}
8557
9012
  >
8558
- <Show19 when={props.ownsRowHeader}>
9013
+ <Show20 when={props.ownsRowHeader}>
8559
9014
  <div
8560
9015
  role={rowHeaderIsCell() ? "rowheader" : void 0}
8561
9016
  aria-colindex={rowHeaderIsCell() ? 1 : void 0}
@@ -8580,7 +9035,7 @@ function GridBodyGroupRow(props) {
8580
9035
  >
8581
9036
  {props.showRowCheckbox ? null : props.rowIndex + 1}
8582
9037
  </div>
8583
- </Show19>
9038
+ </Show20>
8584
9039
  <For11 each={props.entries} keyed={(entry) => entry.column.key}>
8585
9040
  {(entry) => {
8586
9041
  const unbound = createMemo23(() => entry().column);
@@ -8623,19 +9078,19 @@ function GridBodyGroupRow(props) {
8623
9078
  "z-index": 1
8624
9079
  }}
8625
9080
  >
8626
- <Show19
9081
+ <Show20
8627
9082
  when={isAutoGroupColumn()}
8628
- fallback={<Show19 when={aggregate()}>
9083
+ fallback={<Show20 when={aggregate()}>
8629
9084
  {(shown) => <span
8630
9085
  class="ssg-group-value"
8631
9086
  data-ssg-tooltip-overflow={shown().text !== "" ? shown().caption !== void 0 ? `${shown().caption} ${shown().text}` : shown().text : void 0}
8632
9087
  >
8633
- <Show19 when={shown().caption !== void 0 && shown().text !== ""}>
9088
+ <Show20 when={shown().caption !== void 0 && shown().text !== ""}>
8634
9089
  <span class="ssg-group-caption">{shown().caption}</span>
8635
- </Show19>
9090
+ </Show20>
8636
9091
  {shown().text}
8637
9092
  </span>}
8638
- </Show19>}
9093
+ </Show20>}
8639
9094
  >
8640
9095
  <span
8641
9096
  aria-hidden="true"
@@ -8659,7 +9114,7 @@ function GridBodyGroupRow(props) {
8659
9114
  <span class="ssg-group-count">
8660
9115
  {formatLocaleText12(texts().groupRowCount, { count: formatTotalRowNumber(props.groupRow.leafCount) })}
8661
9116
  </span>
8662
- </Show19>
9117
+ </Show20>
8663
9118
  </div>;
8664
9119
  }}
8665
9120
  </For11>
@@ -8695,7 +9150,7 @@ import {
8695
9150
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/labelRows";
8696
9151
 
8697
9152
  // src/view/GridBodyLabelRow.tsx
8698
- import { Show as Show20, createMemo as createMemo24 } from "solid-js";
9153
+ import { Show as Show21, createMemo as createMemo24 } from "solid-js";
8699
9154
  var createLabelRowRenderContext = (labelRow, rowIndex, rowKey) => {
8700
9155
  const row = createMemo24(() => labelRow().row);
8701
9156
  const sourceRowIndex = createMemo24(() => labelRow().sourceIndex);
@@ -8745,7 +9200,7 @@ function GridBodyLabelRow(props) {
8745
9200
  transform: `translateY(${props.top}px)`
8746
9201
  }}
8747
9202
  >
8748
- <Show20 when={props.ownsRowHeader}>
9203
+ <Show21 when={props.ownsRowHeader}>
8749
9204
  <div
8750
9205
  aria-hidden="true"
8751
9206
  class={["ssg-header-cell", "ssg-row-header-cell", "ssg-row-header-cell--label", props.slots.rowHeaderCell?.className]}
@@ -8756,8 +9211,8 @@ function GridBodyLabelRow(props) {
8756
9211
  height: px(props.rowHeight)
8757
9212
  }}
8758
9213
  />
8759
- </Show20>
8760
- <Show20 when={props.renderContent}>
9214
+ </Show21>
9215
+ <Show21 when={props.renderContent}>
8761
9216
  {(render) => <div
8762
9217
  role="rowheader"
8763
9218
  aria-colindex={1}
@@ -8771,17 +9226,17 @@ function GridBodyLabelRow(props) {
8771
9226
  {render()(ctx)}
8772
9227
  </div>
8773
9228
  </div>}
8774
- </Show20>
9229
+ </Show21>
8775
9230
  </div>;
8776
9231
  }
8777
9232
 
8778
9233
  // src/view/GridStickyLabelLayer.tsx
8779
- import { Show as Show21, createMemo as createMemo25, onSettled as onSettled8 } from "solid-js";
9234
+ import { Show as Show22, createMemo as createMemo25, onSettled as onSettled8 } from "solid-js";
8780
9235
  var FOCUSABLE_SELECTOR = 'a[href], button, input, select, textarea, [tabindex], [contenteditable="true"]';
8781
9236
  function GridStickyLabelLayer(props) {
8782
- return <Show21 when={props.entry}>
9237
+ return <Show22 when={props.entry}>
8783
9238
  {(entry) => <StickyLabel layer={props} entry={entry} />}
8784
- </Show21>;
9239
+ </Show22>;
8785
9240
  }
8786
9241
  function StickyLabel(props) {
8787
9242
  const layer = props.layer;
@@ -8843,7 +9298,7 @@ function StickyLabel(props) {
8843
9298
  ...props.entry().pushOffset > 0 ? { transform: `translateY(${-props.entry().pushOffset}px)` } : null
8844
9299
  }}
8845
9300
  >
8846
- <Show21 when={layer.ownsRowHeader}>
9301
+ <Show22 when={layer.ownsRowHeader}>
8847
9302
  <div
8848
9303
  class={["ssg-header-cell", "ssg-row-header-cell", "ssg-row-header-cell--label", layer.slots.rowHeaderCell?.className]}
8849
9304
  style={{
@@ -8853,8 +9308,8 @@ function StickyLabel(props) {
8853
9308
  height: px(height())
8854
9309
  }}
8855
9310
  />
8856
- </Show21>
8857
- <Show21 when={layer.renderContent}>
9311
+ </Show22>
9312
+ <Show22 when={layer.renderContent}>
8858
9313
  {(render) => <div
8859
9314
  class="ssg-label-row-content-holder"
8860
9315
  style={{ left: px(layer.contentStickyLeft), width: px(layer.contentWidth), height: px(height()) }}
@@ -8863,12 +9318,12 @@ function StickyLabel(props) {
8863
9318
  class={["ssg-label-row-content", layer.slots.labelRowContent?.className]}
8864
9319
  style={layer.slots.labelRowContent?.style}
8865
9320
  >
8866
- <Show21 when={[rowKey(), render()]} keyed>
9321
+ <Show22 when={[rowKey(), render()]} keyed>
8867
9322
  {([, renderContent]) => renderContent(ctx)}
8868
- </Show21>
9323
+ </Show22>
8869
9324
  </div>
8870
9325
  </div>}
8871
- </Show21>
9326
+ </Show22>
8872
9327
  </div>
8873
9328
  </div>
8874
9329
  );
@@ -8945,7 +9400,7 @@ function createServerSide(args) {
8945
9400
  }
8946
9401
 
8947
9402
  // src/view/GridServerSideErrorBars.tsx
8948
- import { Show as Show22, createSignal as createSignal15 } from "solid-js";
9403
+ import { Show as Show23, createSignal as createSignal15 } from "solid-js";
8949
9404
  import { formatLocaleText as formatLocaleText13 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
8950
9405
  function GridServerSideErrorBars(props) {
8951
9406
  const [dismissedLoadError, setDismissedLoadError] = createSignal15(null);
@@ -8953,9 +9408,9 @@ function GridServerSideErrorBars(props) {
8953
9408
  const texts = () => props.localeTexts;
8954
9409
  const shownLoadError = () => props.loadError !== null && props.loadError !== dismissedLoadError() ? props.loadError : null;
8955
9410
  const shownWriteError = () => props.writeError !== null && props.writeError !== dismissedWriteError() ? props.writeError : null;
8956
- return <Show22 when={shownLoadError() !== null || shownWriteError() !== null}>
9411
+ return <Show23 when={shownLoadError() !== null || shownWriteError() !== null}>
8957
9412
  <div class="ssg-ssrm-error-bars">
8958
- <Show22 when={shownLoadError()}>
9413
+ <Show23 when={shownLoadError()}>
8959
9414
  {(loadError) => <div class={["ssg-ssrm-error-bar", props.slot?.className]} style={props.slot?.style} role="alert">
8960
9415
  <span class="ssg-ssrm-error-bar-dot" aria-hidden="true" />
8961
9416
  <span class="ssg-ssrm-error-bar-msg">
@@ -8973,8 +9428,8 @@ function GridServerSideErrorBars(props) {
8973
9428
  ×
8974
9429
  </button>
8975
9430
  </div>}
8976
- </Show22>
8977
- <Show22 when={shownWriteError()}>
9431
+ </Show23>
9432
+ <Show23 when={shownWriteError()}>
8978
9433
  {(writeError) => <div class={["ssg-ssrm-error-bar", props.slot?.className]} style={props.slot?.style} role="alert">
8979
9434
  <span class="ssg-ssrm-error-bar-dot" aria-hidden="true" />
8980
9435
  <span class="ssg-ssrm-error-bar-msg">
@@ -8989,13 +9444,13 @@ function GridServerSideErrorBars(props) {
8989
9444
  ×
8990
9445
  </button>
8991
9446
  </div>}
8992
- </Show22>
9447
+ </Show23>
8993
9448
  </div>
8994
- </Show22>;
9449
+ </Show23>;
8995
9450
  }
8996
9451
 
8997
9452
  // src/view/GridBodySkeletonRow.tsx
8998
- import { For as For12, Show as Show23 } from "solid-js";
9453
+ import { For as For12, Show as Show24 } from "solid-js";
8999
9454
  var SKELETON_BAR_WIDTHS = ["62%", "46%", "78%", "54%"];
9000
9455
  function GridBodySkeletonRow(props) {
9001
9456
  return <div
@@ -9012,7 +9467,7 @@ function GridBodySkeletonRow(props) {
9012
9467
  transform: `translateY(${props.top}px)`
9013
9468
  }}
9014
9469
  >
9015
- <Show23 when={props.ownsRowHeader}>
9470
+ <Show24 when={props.ownsRowHeader}>
9016
9471
  <div
9017
9472
  role="rowheader"
9018
9473
  aria-colindex={1}
@@ -9036,11 +9491,11 @@ function GridBodySkeletonRow(props) {
9036
9491
  height: px(props.rowHeight)
9037
9492
  }}
9038
9493
  >
9039
- <Show23 when={props.showRowCheckbox} fallback={props.rowIndex + 1}>
9494
+ <Show24 when={props.showRowCheckbox} fallback={props.rowIndex + 1}>
9040
9495
  <RowSelectionCheckbox slot={props.slots.checkbox} state="unchecked" disabled />
9041
- </Show23>
9496
+ </Show24>
9042
9497
  </div>
9043
- </Show23>
9498
+ </Show24>
9044
9499
  <For12 each={props.entries} keyed={(entry) => entry.logicalIndex}>
9045
9500
  {(entry) => {
9046
9501
  const cell = () => ({ row: props.rowIndex, col: entry().logicalIndex });
@@ -9085,32 +9540,6 @@ var serverSideFeature = {
9085
9540
 
9086
9541
  // src/features/motionExtras.ts
9087
9542
  import { createChangeHighlightController } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/changeHighlightController";
9088
-
9089
- // src/view/CopyRangeOverlay.tsx
9090
- import { Show as Show24 } from "solid-js";
9091
- var placement = (props, rect) => ({
9092
- position: "absolute",
9093
- left: px(props.leadingWidth + rect.left),
9094
- top: px(props.headerHeight + rect.top - props.baseOffset),
9095
- width: px(rect.width),
9096
- height: px(rect.height)
9097
- });
9098
- function CopyRangeOverlay(props) {
9099
- return <Show24 when={props.rect}>
9100
- {(rect) => <div
9101
- class={["ssg-copy-range-overlay", props.slot?.className]}
9102
- style={{ ...props.slot?.style, ...placement(props, rect()) }}
9103
- data-ssg-copy-range=""
9104
- />}
9105
- </Show24>;
9106
- }
9107
- function ColumnHoverOverlay(props) {
9108
- return <Show24 when={props.rect}>
9109
- {(rect) => <div class="ssg-col-hover-overlay" style={placement(props, rect())} data-ssg-col-hover="" />}
9110
- </Show24>;
9111
- }
9112
-
9113
- // src/features/motionExtras.ts
9114
9543
  var motionExtrasFeature = {
9115
9544
  createChangeHighlightController,
9116
9545
  CopyRangeOverlay,
@@ -9123,12 +9552,15 @@ import { DEFAULT_PINNED_ROWS_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid
9123
9552
  // src/view/GridPinnedRows.tsx
9124
9553
  import { For as For13, Show as Show25, createMemo as createMemo27 } from "solid-js";
9125
9554
  import { resolveSlotProps as resolveSlotProps3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/slotProps";
9126
- import { isSyntheticColumnKey as isSyntheticColumnKey3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/detailRow";
9555
+ import { isSyntheticColumnKey as isSyntheticColumnKey4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/detailRow";
9127
9556
  import { isCheckboxChecked as isCheckboxChecked2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/checkboxEditor";
9557
+ import { resolveColumnEditor as resolveColumnEditor2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/columnEditor";
9128
9558
  import { formatLocaleText as formatLocaleText14 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
9129
9559
  import { getCellValue as getCellValue5 } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions";
9560
+ import { formatCellText as formatCellText2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cellText";
9130
9561
  var noop4 = () => {
9131
9562
  };
9563
+ var plainLabel = (label) => label;
9132
9564
  var PIN_ICON_PATH = "M9.8 1.5 14.5 6.2l-1.4 1.4-1-.9-2.6 2.6.3 3.2-1.4 1.4-2.6-2.6-3.3 3.3-.7-.7 3.3-3.3L2.5 8l1.4-1.4 3.2.3 2.6-2.6-.9-1z";
9133
9565
  function GridPinnedRows(props) {
9134
9566
  const texts = useFeatureLocaleText();
@@ -9244,18 +9676,19 @@ function GridPinnedRows(props) {
9244
9676
  };
9245
9677
  const content = createMemo27(() => {
9246
9678
  const current = column();
9247
- if (isSyntheticColumnKey3(current.key)) {
9679
+ if (isSyntheticColumnKey4(current.key)) {
9248
9680
  return null;
9249
9681
  }
9250
9682
  const context = ctx();
9251
9683
  if (current.renderCell) {
9252
9684
  return current.renderCell({ ...context, tree: void 0, setValue: noop4 });
9253
9685
  }
9254
- if (current.editor?.type === "checkbox") {
9686
+ const cellEditor = resolveColumnEditor2(current, context.row);
9687
+ if (cellEditor?.type === "checkbox") {
9255
9688
  return <CheckboxCell
9256
9689
  slot={props.slots.checkbox}
9257
9690
  label={current.title || current.key}
9258
- checked={isCheckboxChecked2(context.value, current.editor)}
9691
+ checked={isCheckboxChecked2(context.value, cellEditor)}
9259
9692
  readOnly
9260
9693
  onToggle={noop4}
9261
9694
  />;
@@ -9265,7 +9698,16 @@ function GridPinnedRows(props) {
9265
9698
  if (format?.dataBar?.showValue === false) {
9266
9699
  return null;
9267
9700
  }
9268
- const text = current.valueFormatter ? current.valueFormatter({ value: context.value, row: context.row, column: current }) : String(context.value ?? "");
9701
+ const multiSelect = props.multiSelect;
9702
+ const chipLabels = multiSelect && current.valueFormatter === void 0 ? multiSelect.resolveChipLabels(cellEditor, context.value, context.row) : void 0;
9703
+ if (multiSelect && chipLabels !== void 0) {
9704
+ return <multiSelect.MultiSelectChips
9705
+ labels={chipLabels}
9706
+ separator={texts().multiSelectSeparator}
9707
+ renderLabel={plainLabel}
9708
+ />;
9709
+ }
9710
+ const text = formatCellText2(current, context.value, context.row, texts().multiSelectSeparator);
9269
9711
  const chips = unbound().conditionalFormat?.chips;
9270
9712
  const chip = feature && chips ? feature.resolveChipSpec(chips, context) : null;
9271
9713
  if (feature && chip) {
@@ -9369,7 +9811,9 @@ function createRowDrag(inputs) {
9369
9811
  getRowDragLabel,
9370
9812
  getDragRow,
9371
9813
  locateDragRow: locateDragRow(),
9372
- canDropAt: canDropAt()
9814
+ canDropAt: canDropAt(),
9815
+ // 追加(1.10.0 / 入力行): 入力行の下へは落とせない(落とせる最後のスロット = 入力行の上。React 版と同じ)。
9816
+ maxDropSlot: inputs.rowModel().newRow?.index
9373
9817
  }),
9374
9818
  "effect",
9375
9819
  "rowDrag"
@@ -9747,6 +10191,7 @@ import {
9747
10191
  createSearchSelectEditorController
9748
10192
  } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/searchSelectEditorController";
9749
10193
  import { isImeComposingKeyEvent as isImeComposingKeyEvent4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
10194
+ import { isCommitToSelectionKey as isCommitToSelectionKey2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorKeys";
9750
10195
  function MatchedText(props) {
9751
10196
  const parts = createMemo30(() => splitSelectSearchText(props.text, props.range));
9752
10197
  return <For15 each={parts()} keyed={false}>
@@ -9765,8 +10210,11 @@ function SearchSelectCellEditor(props) {
9765
10210
  const listId = createUniqueId6();
9766
10211
  const pointerMoved = createPointerMoveFilter2();
9767
10212
  const [error, setError] = createSignal17(null);
10213
+ let commitToSelectionPending = false;
9768
10214
  const commitWithResult = (committed, direction, option, forwardText) => {
9769
- const result = props.onCommit(committed, direction, option, forwardText);
10215
+ const toSelection = commitToSelectionPending ? props.onCommitToSelection : void 0;
10216
+ commitToSelectionPending = false;
10217
+ const result = toSelection !== void 0 ? toSelection(committed) : props.onCommit(committed, direction, option, forwardText);
9770
10218
  if (result && result.status === "rejected") {
9771
10219
  setError(result.message);
9772
10220
  }
@@ -9875,6 +10323,11 @@ function SearchSelectCellEditor(props) {
9875
10323
  return;
9876
10324
  }
9877
10325
  const before = controller.getSnapshot().highlight;
10326
+ if (props.onCommitToSelection !== void 0 && isCommitToSelectionKey2(event)) {
10327
+ commitToSelectionPending = true;
10328
+ } else if (controller.getSnapshot().status !== "loading") {
10329
+ commitToSelectionPending = false;
10330
+ }
9878
10331
  if (controller.keyDown(toEditorKeyEvent(event), props.enterMove) && controller.getSnapshot().highlight !== before) {
9879
10332
  setError(null);
9880
10333
  reveal(untrack20(scroller), untrack20(viewportHeight));
@@ -10032,57 +10485,942 @@ var selectSearchFeature = {
10032
10485
  localeText: DEFAULT_SELECT_SEARCH_LOCALE_TEXT
10033
10486
  };
10034
10487
 
10035
- // src/features/changeTracking.ts
10036
- import { createChangeTracker } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/changeTracker";
10037
- import {
10038
- buildRevertMenuItems,
10039
- describeUnsavedCell,
10040
- formatUnsavedSummary
10041
- } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/changeTracking";
10042
- import { DEFAULT_CHANGE_TRACKING_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
10043
- var changeTrackingFeature = {
10044
- createChangeTracker,
10045
- describeUnsavedCell,
10046
- formatUnsavedSummary,
10047
- buildRevertMenuItems,
10048
- localeText: DEFAULT_CHANGE_TRACKING_LOCALE_TEXT
10049
- };
10488
+ // src/features/dateTimeEditors.ts
10489
+ import { DEFAULT_DATE_TIME_EDITORS_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
10050
10490
 
10051
- // src/features/treeData.ts
10491
+ // src/editors/DateTimeCellEditor.tsx
10492
+ import { For as For16, Show as Show28, createEffect as createEffect12, createMemo as createMemo31, createRenderEffect as createRenderEffect8, createSignal as createSignal18, createUniqueId as createUniqueId7, onCleanup as onCleanup14, onSettled as onSettled10, untrack as untrack21 } from "solid-js";
10493
+ import { Portal as Portal6 } from "@solidjs/web";
10494
+ import { handleEditorKeyDown as handleEditorKeyDown4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorKeys";
10495
+ import { formatLocaleText as formatLocaleText16 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
10496
+ import { isImeComposingKeyEvent as isImeComposingKeyEvent5 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
10497
+ import { toDateInputValue as toDateInputValue2 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorValues";
10498
+ import { toDateTimeValue, toTimeValue } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/dateTimeValues";
10052
10499
  import {
10053
- collectTreeAncestors,
10054
- describeTreeDataProblem,
10055
- describeTreeStructureProblems,
10056
- followTreeRowsAfterToggle,
10500
+ centerTimeListRow,
10501
+ isCoarsePointer,
10502
+ placeDateTimePopup,
10503
+ resolveDateTimeTypedText,
10504
+ resolveDefaultTime,
10505
+ resolveTimePartRange,
10506
+ resolveTimeStep
10507
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/dateTimeEditor";
10508
+ import {
10509
+ resolveSelectListWindow as resolveSelectListWindow2,
10510
+ revealSelectListRow as revealSelectListRow2
10511
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectSearch";
10512
+ import {
10513
+ computeSelectPopoverPlacement as computeSelectPopoverPlacement3,
10514
+ resolveSelectOptionRowHeight as resolveSelectOptionRowHeight3
10515
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectEditorState";
10516
+ import { withAnchorVisibility as withAnchorVisibility3 } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/editorVisibleBounds";
10517
+ import {
10518
+ createDateTimeEditorController
10519
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/dateTimeEditorController";
10520
+ var TIME_LIST_MIN_WIDTH = 96;
10521
+ function DateTimeCellEditor(props) {
10522
+ const kind = untrack21(() => props.editor.type);
10523
+ const defaultTime = resolveDefaultTime(untrack21(() => props.editor.type === "datetime" ? props.editor.defaultTime : void 0));
10524
+ const typedText = untrack21(() => resolveDateTimeTypedText(kind, props.initialValue, props.value, defaultTime));
10525
+ if (typedText === void 0 && isCoarsePointer()) {
10526
+ if (kind === "date") {
10527
+ return <DateCellEditor
10528
+ ariaLabel={props.ariaLabel}
10529
+ enterMove={props.enterMove}
10530
+ initialValue={toDateInputValue2(untrack21(() => props.value))}
10531
+ onCommit={(value, direction) => props.onCommit(value, direction)}
10532
+ onCancel={() => props.onCancel()}
10533
+ onCommitToSelection={props.onCommitToSelection}
10534
+ onRegisterFlush={(flush) => props.onRegisterFlush?.(flush)}
10535
+ align={props.align}
10536
+ cellHeight={props.cellHeight}
10537
+ alignTop={props.alignTop}
10538
+ />;
10539
+ }
10540
+ return <NativeDateTimeEditor {...props} kind={kind} defaultTime={defaultTime} />;
10541
+ }
10542
+ return <TypedDateTimeEditor {...props} kind={kind} defaultTime={defaultTime} typedText={typedText} />;
10543
+ }
10544
+ function NativeDateTimeEditor(props) {
10545
+ const [input, setInput] = createSignal18();
10546
+ const [error, setError] = createSignal18(null);
10547
+ createTopAlignedInput(input, () => props.alignTop ?? false, () => props.cellHeight ?? 0);
10548
+ const kind = untrack21(() => props.kind);
10549
+ const startValue = untrack21(
10550
+ () => kind === "time" ? toTimeValue(props.value) : toDateTimeValue(props.value, props.defaultTime)
10551
+ );
10552
+ const step = resolveTimeStep(untrack21(() => props.editor.type === "date" ? void 0 : props.editor.step));
10553
+ let edited = false;
10554
+ const resolveValue = (current) => edited ? current : untrack21(() => props.value);
10555
+ let disposed = false;
10556
+ onCleanup14(() => {
10557
+ disposed = true;
10558
+ });
10559
+ props.onRegisterFlush?.(() => {
10560
+ untrack21(() => {
10561
+ const element = input();
10562
+ if (element && edited) {
10563
+ props.onCommit(element.value);
10564
+ }
10565
+ });
10566
+ });
10567
+ onSettled10(() => {
10568
+ untrack21(input)?.focus();
10569
+ });
10570
+ return <>
10571
+ <input
10572
+ ref={setInput}
10573
+ type={kind === "time" ? "time" : "datetime-local"}
10574
+ step={step * 60}
10575
+ value={startValue}
10576
+ onInput={() => {
10577
+ edited = true;
10578
+ setError(null);
10579
+ }}
10580
+ onKeyDown={(event) => handleEditorKeyDown4(toEditorKeyEvent(event), {
10581
+ value: event.currentTarget.value,
10582
+ onCommit: (current, direction) => props.onCommit(resolveValue(current), direction),
10583
+ onCancel: () => props.onCancel(),
10584
+ onRejected: setError,
10585
+ enterMove: props.enterMove,
10586
+ onCommitToSelection: props.onCommitToSelection === void 0 ? void 0 : (current) => props.onCommitToSelection?.(resolveValue(current)),
10587
+ blockHomeEnd: true
10588
+ })}
10589
+ onBlur={(event) => {
10590
+ if (disposed) {
10591
+ return;
10592
+ }
10593
+ const result = props.onCommit(resolveValue(event.currentTarget.value));
10594
+ if (result && result.status === "rejected") {
10595
+ props.onCancel();
10596
+ }
10597
+ }}
10598
+ aria-label={props.ariaLabel}
10599
+ aria-invalid={error() !== null ? "true" : void 0}
10600
+ class={["ssg-cell-editor-input", { "ssg-cell-editor-input--invalid": error() !== null }]}
10601
+ style={props.align ? { "text-align": props.align } : void 0}
10602
+ />
10603
+ <CellEditorError message={error()} />
10604
+ </>;
10605
+ }
10606
+ var samePlacement = (a, b) => a === b || a !== null && b !== null && a.left === b.left && a.top === b.top && a.width === b.width && a.maxHeight === b.maxHeight && a.hidden === b.hidden;
10607
+ function TypedDateTimeEditor(props) {
10608
+ const texts = useFeatureLocaleText();
10609
+ const portal = useGridPortal();
10610
+ const kind = untrack21(() => props.kind);
10611
+ const editor = untrack21(() => props.editor);
10612
+ const typedText = untrack21(() => props.typedText);
10613
+ const invalidMessage = () => kind === "date" ? texts().enterDate : kind === "time" ? texts().enterTime : texts().enterDateTime;
10614
+ const [input, setInput] = createSignal18();
10615
+ const [popover, setPopover] = createSignal18();
10616
+ const [scroller, setScroller] = createSignal18();
10617
+ createTopAlignedInput(input, () => props.alignTop ?? false, () => props.cellHeight ?? 0);
10618
+ const popupId = createUniqueId7();
10619
+ const handlers = {
10620
+ onCommit: (value, direction) => props.onCommit(value, direction),
10621
+ onCancel: () => props.onCancel(),
10622
+ get onCommitToSelection() {
10623
+ const toSelection = props.onCommitToSelection;
10624
+ return toSelection === void 0 ? void 0 : (value) => toSelection(value);
10625
+ },
10626
+ get invalidMessage() {
10627
+ return invalidMessage();
10628
+ },
10629
+ get invalidTimeMessage() {
10630
+ return texts().enterTime;
10631
+ }
10632
+ };
10633
+ const controller = untrack21(
10634
+ () => createDateTimeEditorController({
10635
+ kind,
10636
+ value: props.value,
10637
+ initialText: typedText,
10638
+ defaultTime: props.defaultTime,
10639
+ step: editor.type === "date" ? void 0 : editor.step,
10640
+ list: editor.type === "time" && editor.picker === "list",
10641
+ invalidMessage: invalidMessage(),
10642
+ onCommit: handlers.onCommit,
10643
+ onCancel: handlers.onCancel
10644
+ })
10645
+ );
10646
+ controller.setHandlers(handlers);
10647
+ const [snapshot2, setSnapshot] = createSignal18(controller.getSnapshot(), { name: "dateTimeEditorSnapshot" });
10648
+ onCleanup14(controller.subscribe(() => setSnapshot(controller.getSnapshot())));
10649
+ props.onRegisterFlush?.(controller.flush);
10650
+ const hasCalendar = kind !== "time";
10651
+ const hasList = editor.type === "time" && editor.picker === "list";
10652
+ const timeInput = editor.type === "datetime" && editor.timeInput === true;
10653
+ const popupWanted = hasCalendar || hasList;
10654
+ const calendarViews = createLazyModuleSignal(
10655
+ dateEditorCalendarModule,
10656
+ { needed: () => hasCalendar, prefetch: () => false },
10657
+ "dateEditorCalendar"
10658
+ );
10659
+ const popupReady = () => hasList || hasCalendar && calendarViews() !== null;
10660
+ const rowHeight = resolveSelectOptionRowHeight3();
10661
+ const listCount = controller.timeList.length;
10662
+ const viewportHeight = Math.min(listCount, 8) * rowHeight;
10663
+ const [placement2, setPlacement] = createSignal18(null);
10664
+ const [scrollTop, setScrollTop] = createSignal18(0);
10665
+ const measure = () => {
10666
+ const anchor = untrack21(input);
10667
+ if (!anchor) {
10668
+ return;
10669
+ }
10670
+ const rect = anchor.getBoundingClientRect();
10671
+ let next;
10672
+ if (hasList) {
10673
+ next = withAnchorVisibility3(
10674
+ anchor,
10675
+ computeSelectPopoverPlacement3(rect, listCount, window.innerWidth, window.innerHeight, rowHeight, TIME_LIST_MIN_WIDTH)
10676
+ );
10677
+ } else {
10678
+ const element = untrack21(popover);
10679
+ if (!element) {
10680
+ return;
10681
+ }
10682
+ next = withAnchorVisibility3(
10683
+ anchor,
10684
+ placeDateTimePopup(rect, { width: element.offsetWidth, height: element.offsetHeight }, window.innerWidth, window.innerHeight)
10685
+ );
10686
+ }
10687
+ if (!samePlacement(untrack21(placement2), next)) {
10688
+ setPlacement(next);
10689
+ }
10690
+ };
10691
+ let disposed = false;
10692
+ onCleanup14(() => {
10693
+ disposed = true;
10694
+ });
10695
+ onSettled10(() => {
10696
+ const element = untrack21(input);
10697
+ if (element) {
10698
+ element.focus();
10699
+ if (typedText === void 0) {
10700
+ element.select();
10701
+ } else {
10702
+ element.setSelectionRange(element.value.length, element.value.length);
10703
+ }
10704
+ }
10705
+ if (!popupWanted) {
10706
+ return void 0;
10707
+ }
10708
+ window.addEventListener("resize", measure);
10709
+ window.addEventListener("scroll", measure, true);
10710
+ return () => {
10711
+ window.removeEventListener("resize", measure);
10712
+ window.removeEventListener("scroll", measure, true);
10713
+ };
10714
+ });
10715
+ createEffect12(
10716
+ () => [popover(), snapshot2(), popupReady(), props.cellTop ?? 0, props.cellLeft ?? 0],
10717
+ outsideGraphApply(([element, , ready]) => {
10718
+ if (popupWanted && ready && (hasList || element)) {
10719
+ measure();
10720
+ }
10721
+ }),
10722
+ { name: "dateTimeEditorMeasure" }
10723
+ );
10724
+ const opened = () => placement2() !== null;
10725
+ let lastAnchor = null;
10726
+ createEffect12(
10727
+ () => [scroller(), opened(), snapshot2().listAnchor],
10728
+ outsideGraphApply(([element, isOpened, anchor]) => {
10729
+ if (!hasList || !isOpened || !element) {
10730
+ return;
10731
+ }
10732
+ const first = lastAnchor === null;
10733
+ if (!first && lastAnchor === anchor) {
10734
+ return;
10735
+ }
10736
+ lastAnchor = anchor;
10737
+ const next = first ? centerTimeListRow(anchor, viewportHeight, rowHeight, listCount) : revealSelectListRow2(anchor, element.scrollTop, viewportHeight, rowHeight);
10738
+ if (next !== element.scrollTop) {
10739
+ element.scrollTop = next;
10740
+ }
10741
+ setScrollTop(next);
10742
+ }),
10743
+ { name: "dateTimeEditorRevealTime" }
10744
+ );
10745
+ const focusInsideEditor = (next) => next instanceof Node && (untrack21(input)?.contains(next) === true || untrack21(popover)?.contains(next) === true);
10746
+ const handleBlur = (event) => {
10747
+ if (!disposed && !focusInsideEditor(event.relatedTarget)) {
10748
+ controller.blur();
10749
+ }
10750
+ };
10751
+ const handleKeyDown = (event, target) => {
10752
+ if (isImeComposingKeyEvent5(event)) {
10753
+ return;
10754
+ }
10755
+ if (target === "time") {
10756
+ controller.keyDownTime(toEditorKeyEvent(event), props.enterMove);
10757
+ } else {
10758
+ controller.keyDown(toEditorKeyEvent(event), props.enterMove);
10759
+ }
10760
+ };
10761
+ const notice = () => snapshot2().notice;
10762
+ const noticeInPopup = () => {
10763
+ const current = placement2();
10764
+ return notice() !== null && popupWanted && popupReady() && current !== null && current.hidden !== true;
10765
+ };
10766
+ const highlight = () => snapshot2().listHighlight;
10767
+ const activeId = () => hasList && opened() && highlight() >= 0 ? `${popupId}-${highlight()}` : void 0;
10768
+ const label = () => formatLocaleText16(hasList ? texts().timeEditorList : texts().dateEditorCalendar, { column: props.columnTitle });
10769
+ const visible = createMemo31(() => {
10770
+ const window_ = resolveSelectListWindow2(scrollTop(), viewportHeight, rowHeight, listCount);
10771
+ return controller.timeList.slice(window_.start, window_.end).map((time, offset) => ({ time, index: window_.start + offset }));
10772
+ });
10773
+ const mount = () => popupWanted && popupReady() ? portal.container() : null;
10774
+ const startText = untrack21(() => snapshot2().text);
10775
+ const noticeNode = () => <Show28 when={notice() !== null}>
10776
+ <div class="ssg-date-editor-notice" role="alert">
10777
+ {notice()}
10778
+ </div>
10779
+ </Show28>;
10780
+ const view = <>
10781
+ <input
10782
+ ref={setInput}
10783
+ type="text"
10784
+ value={startText}
10785
+ inputmode={kind === "time" ? "numeric" : void 0}
10786
+ onInput={(event) => controller.input(event.currentTarget.value, event.isComposing)}
10787
+ onCompositionEnd={(event) => controller.input(event.currentTarget.value, false)}
10788
+ onKeyDown={(event) => handleKeyDown(event, "date")}
10789
+ onBlur={handleBlur}
10790
+ role={popupWanted ? "combobox" : void 0}
10791
+ aria-haspopup={hasCalendar ? "dialog" : hasList ? "listbox" : void 0}
10792
+ aria-expanded={popupWanted ? opened() ? "true" : "false" : void 0}
10793
+ aria-controls={popupWanted && opened() ? popupId : void 0}
10794
+ aria-activedescendant={activeId()}
10795
+ aria-label={props.ariaLabel}
10796
+ aria-invalid={notice() !== null ? "true" : void 0}
10797
+ autocomplete="off"
10798
+ spellcheck="false"
10799
+ class={[
10800
+ "ssg-cell-editor-input",
10801
+ "ssg-cell-editor-input--date-time",
10802
+ { "ssg-cell-editor-input--invalid": notice() !== null }
10803
+ ]}
10804
+ style={props.align ? { "text-align": props.align } : void 0}
10805
+ />
10806
+ <CellEditorError message={noticeInPopup() ? null : notice()} />
10807
+ <Show28 when={mount()}>
10808
+ {(container) => <Portal6 mount={container()}>
10809
+ <div
10810
+ ref={setPopover}
10811
+ id={hasCalendar ? popupId : void 0}
10812
+ role={hasCalendar ? "dialog" : void 0}
10813
+ aria-label={hasCalendar ? label() : void 0}
10814
+ class={[
10815
+ "ssg-select-editor-popover",
10816
+ "ssg-date-editor-popover",
10817
+ hasCalendar ? "ssg-date-editor-popover--calendar" : "ssg-date-editor-popover--times",
10818
+ props.themeClassName,
10819
+ props.popoverSlot?.className
10820
+ ]}
10821
+ style={{
10822
+ ...props.popoverSlot?.style,
10823
+ left: px(placement2()?.left ?? 0),
10824
+ top: px(placement2()?.top ?? 0),
10825
+ width: placement2()?.width !== void 0 ? px(placement2()?.width ?? 0) : void 0,
10826
+ "max-height": placement2()?.maxHeight !== void 0 ? px(placement2()?.maxHeight ?? 0) : void 0,
10827
+ visibility: placement2() === null || placement2()?.hidden ? "hidden" : void 0
10828
+ }}
10829
+ onPointerDown={(event) => {
10830
+ if (!(event.target instanceof HTMLInputElement)) {
10831
+ event.preventDefault();
10832
+ }
10833
+ }}
10834
+ >
10835
+ <Show28
10836
+ when={hasCalendar ? calendarViews() : null}
10837
+ fallback={<Show28 when={hasList}>
10838
+ {noticeNode()}
10839
+ <div
10840
+ ref={setScroller}
10841
+ role="listbox"
10842
+ id={popupId}
10843
+ aria-label={label()}
10844
+ class="ssg-select-editor-scroller"
10845
+ style={{ height: px(viewportHeight) }}
10846
+ onScroll={(event) => setScrollTop(event.currentTarget.scrollTop)}
10847
+ >
10848
+ <div class="ssg-select-editor-rows" role="presentation" style={{ height: px(listCount * rowHeight) }}>
10849
+ <For16 each={visible()} keyed={false}>
10850
+ {(item) => <div
10851
+ id={`${popupId}-${item().index}`}
10852
+ role="option"
10853
+ aria-selected={item().index === highlight() ? "true" : "false"}
10854
+ aria-setsize={listCount}
10855
+ aria-posinset={item().index + 1}
10856
+ class={[
10857
+ "ssg-select-editor-option",
10858
+ { "ssg-select-editor-option--highlighted": item().index === highlight() }
10859
+ ]}
10860
+ style={{ top: px(item().index * rowHeight) }}
10861
+ onClick={() => controller.chooseTime(untrack21(item).index)}
10862
+ >
10863
+ {item().time}
10864
+ </div>}
10865
+ </For16>
10866
+ </div>
10867
+ </div>
10868
+ </Show28>}
10869
+ >
10870
+ {(views) => {
10871
+ const Calendar = untrack21(views).DateEditorCalendar;
10872
+ return <Calendar
10873
+ controller={controller}
10874
+ snapshot={snapshot2()}
10875
+ timeInput={timeInput}
10876
+ timeInputLabel={texts().dateTimeEditorTime}
10877
+ onTimeKeyDown={(event) => handleKeyDown(event, "time")}
10878
+ onTimeBlur={handleBlur}
10879
+ notice={noticeNode()}
10880
+ />;
10881
+ }}
10882
+ </Show28>
10883
+ </div>
10884
+ </Portal6>}
10885
+ </Show28>
10886
+ </>;
10887
+ createPortalTokens(popover, () => props.themeClassName, placement2);
10888
+ createRenderEffect8(
10889
+ () => [input(), snapshot2().text],
10890
+ ([element, text]) => {
10891
+ if (element && element.value !== text) {
10892
+ element.value = text;
10893
+ }
10894
+ },
10895
+ { name: "dateTimeEditorInputText" }
10896
+ );
10897
+ const timeSelection = createMemo31(() => snapshot2().timeSelection);
10898
+ createRenderEffect8(
10899
+ () => [input(), timeSelection()],
10900
+ ([element, timeSelection2]) => {
10901
+ if (!element || timeSelection2 === 0) {
10902
+ return;
10903
+ }
10904
+ const text = untrack21(() => snapshot2().text);
10905
+ if (element.value !== text) {
10906
+ element.value = text;
10907
+ }
10908
+ const range = resolveTimePartRange(text);
10909
+ if (range) {
10910
+ element.setSelectionRange(range[0], range[1]);
10911
+ }
10912
+ },
10913
+ { name: "dateTimeEditorTimeSelection" }
10914
+ );
10915
+ return view;
10916
+ }
10917
+
10918
+ // src/features/dateTimeEditors.ts
10919
+ var dateTimeEditorsFeature = {
10920
+ DateTimeCellEditor,
10921
+ localeText: DEFAULT_DATE_TIME_EDITORS_LOCALE_TEXT
10922
+ };
10923
+
10924
+ // src/features/multiSelect.ts
10925
+ import { DEFAULT_MULTI_SELECT_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
10926
+ import {
10927
+ resolveMultiSelectChipLabels,
10928
+ splitRangesByChips
10929
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
10930
+
10931
+ // src/editors/MultiSelectCellEditor.tsx
10932
+ import { For as For17, Show as Show29, createEffect as createEffect13, createMemo as createMemo32, createRenderEffect as createRenderEffect9, createSignal as createSignal19, createUniqueId as createUniqueId8, onCleanup as onCleanup15, onSettled as onSettled11, untrack as untrack22 } from "solid-js";
10933
+ import { Portal as Portal7 } from "@solidjs/web";
10934
+ import {
10935
+ computeSelectPopoverPlacement as computeSelectPopoverPlacement4,
10936
+ resolveSelectOptionRowHeight as resolveSelectOptionRowHeight4,
10937
+ SELECT_SEARCH_POPOVER_MIN_WIDTH as SELECT_SEARCH_POPOVER_MIN_WIDTH2,
10938
+ createPointerMoveFilter as createPointerMoveFilter3
10939
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectEditorState";
10940
+ import { withAnchorVisibility as withAnchorVisibility4 } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/editorVisibleBounds";
10941
+ import { revealOverflowTitle as revealOverflowTitle3 } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/overflowTitle";
10942
+ import {
10943
+ resolveSelectListWindow as resolveSelectListWindow3,
10944
+ revealSelectListRow as revealSelectListRow3,
10945
+ splitSelectSearchText as splitSelectSearchText2
10946
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectSearch";
10947
+ import { createMultiSelectEditorController } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/multiSelectEditorController";
10948
+ import { MULTI_SELECT_VISIBLE_ROWS } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
10949
+ import { isImeComposingKeyEvent as isImeComposingKeyEvent6 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
10950
+ import { isCommitToSelectionKey as isCommitToSelectionKey3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorKeys";
10951
+ function MatchedText2(props) {
10952
+ const parts = createMemo32(() => splitSelectSearchText2(props.text, props.range));
10953
+ return <For17 each={parts()} keyed={false}>
10954
+ {(part) => <Show29 when={part().match} fallback={part().text}>
10955
+ <mark class="ssg-select-editor-match">{part().text}</mark>
10956
+ </Show29>}
10957
+ </For17>;
10958
+ }
10959
+ var SVG_NOT_FOCUSABLE6 = { focusable: "false" };
10960
+ function CheckIcon() {
10961
+ return <svg
10962
+ viewBox="0 0 12 12"
10963
+ fill="none"
10964
+ stroke="currentColor"
10965
+ stroke-width="1.8"
10966
+ stroke-linecap="round"
10967
+ stroke-linejoin="round"
10968
+ {...SVG_NOT_FOCUSABLE6}
10969
+ >
10970
+ <path d="M2.6 6.3 4.9 8.6 9.4 3.7" />
10971
+ </svg>;
10972
+ }
10973
+ function MultiSelectCellEditor(props) {
10974
+ const texts = useFeatureLocaleText();
10975
+ const portal = useGridPortal();
10976
+ const [box, setBox] = createSignal19();
10977
+ const [input, setInput] = createSignal19();
10978
+ const [scroller, setScroller] = createSignal19();
10979
+ const [popover, setPopover] = createSignal19();
10980
+ const listId = createUniqueId8();
10981
+ const pointerMoved = createPointerMoveFilter3();
10982
+ const [error, setError] = createSignal19(null);
10983
+ const search = untrack22(() => props.search);
10984
+ const hint = () => search ? texts().multiSelectSearchHint : texts().multiSelectHint;
10985
+ const commitWithResult = (committed, direction) => {
10986
+ const result = props.onCommit(committed, direction);
10987
+ if (result && result.status === "rejected") {
10988
+ setError(result.message);
10989
+ }
10990
+ return result;
10991
+ };
10992
+ const controller = untrack22(
10993
+ () => createMultiSelectEditorController({
10994
+ options: props.options,
10995
+ value: props.value,
10996
+ initialText: props.initialText,
10997
+ search,
10998
+ load: props.load ? (query, signal) => props.load(query, signal) : void 0,
10999
+ onCommit: commitWithResult,
11000
+ onCancel: () => props.onCancel()
11001
+ })
11002
+ );
11003
+ const [snapshot2, setSnapshot] = createSignal19(controller.getSnapshot(), { name: "multiSelectSnapshot" });
11004
+ createEffect13(
11005
+ () => props.options,
11006
+ outsideGraphApply((options) => controller.setOptions(options)),
11007
+ { name: "multiSelectOptions" }
11008
+ );
11009
+ props.onRegisterFlush?.(controller.flush);
11010
+ const rowHeight = resolveSelectOptionRowHeight4();
11011
+ const [placement2, setPlacement] = createSignal19(null);
11012
+ const [scrollTop, setScrollTop] = createSignal19(0);
11013
+ const listRows = createMemo32(() => Math.max(snapshot2().results.length, 1));
11014
+ const visibleRows = createMemo32(() => Math.min(listRows(), MULTI_SELECT_VISIBLE_ROWS));
11015
+ const viewportHeight = createMemo32(() => visibleRows() * rowHeight);
11016
+ const measure = () => {
11017
+ const element = untrack22(box);
11018
+ if (!element) {
11019
+ return;
11020
+ }
11021
+ setPlacement(
11022
+ withAnchorVisibility4(
11023
+ element,
11024
+ computeSelectPopoverPlacement4(
11025
+ element.getBoundingClientRect(),
11026
+ untrack22(visibleRows) + 1,
11027
+ window.innerWidth,
11028
+ window.innerHeight,
11029
+ rowHeight,
11030
+ SELECT_SEARCH_POPOVER_MIN_WIDTH2
11031
+ )
11032
+ )
11033
+ );
11034
+ };
11035
+ const reveal = (element, height) => {
11036
+ if (!element) {
11037
+ return;
11038
+ }
11039
+ const current = controller.getSnapshot().highlight;
11040
+ const next = current < 0 ? 0 : revealSelectListRow3(current, element.scrollTop, height, rowHeight);
11041
+ if (next !== element.scrollTop) {
11042
+ element.scrollTop = next;
11043
+ }
11044
+ setScrollTop(next);
11045
+ };
11046
+ let disposed = false;
11047
+ onSettled11(() => {
11048
+ const element = search ? untrack22(input) : untrack22(box);
11049
+ if (element) {
11050
+ element.focus();
11051
+ if (element instanceof HTMLInputElement) {
11052
+ element.setSelectionRange(element.value.length, element.value.length);
11053
+ }
11054
+ }
11055
+ setSnapshot(controller.getSnapshot());
11056
+ const unsubscribe = controller.subscribe(() => setSnapshot(controller.getSnapshot()));
11057
+ const detach = controller.attach();
11058
+ measure();
11059
+ window.addEventListener("resize", measure);
11060
+ window.addEventListener("scroll", measure, true);
11061
+ return () => {
11062
+ window.removeEventListener("resize", measure);
11063
+ window.removeEventListener("scroll", measure, true);
11064
+ detach();
11065
+ unsubscribe();
11066
+ };
11067
+ });
11068
+ onCleanup15(() => {
11069
+ disposed = true;
11070
+ });
11071
+ let measuredKey;
11072
+ createEffect13(
11073
+ () => `${visibleRows()}:${props.cellTop ?? 0}:${props.cellLeft ?? 0}`,
11074
+ outsideGraphApply((key) => {
11075
+ const previous = measuredKey;
11076
+ measuredKey = key;
11077
+ if (previous !== void 0 && previous !== key) {
11078
+ measure();
11079
+ }
11080
+ }),
11081
+ { name: "multiSelectMeasure" }
11082
+ );
11083
+ createEffect13(
11084
+ () => [snapshot2().results, scroller(), viewportHeight()],
11085
+ outsideGraphApply(([, element, height]) => reveal(element, height)),
11086
+ { name: "multiSelectReveal" }
11087
+ );
11088
+ const handleKeyDown = (event) => {
11089
+ if (isImeComposingKeyEvent6(event)) {
11090
+ return;
11091
+ }
11092
+ if (props.onCommitToSelection !== void 0 && isCommitToSelectionKey3(event)) {
11093
+ event.preventDefault();
11094
+ const result = props.onCommitToSelection(controller.valueToCommit());
11095
+ if (result && result.status === "rejected") {
11096
+ setError(result.message);
11097
+ }
11098
+ return;
11099
+ }
11100
+ const before = controller.getSnapshot();
11101
+ if (controller.keyDown(toEditorKeyEvent(event), props.enterMove)) {
11102
+ const after = controller.getSnapshot();
11103
+ if (after.selected !== before.selected) {
11104
+ setError(null);
11105
+ }
11106
+ if (after.highlight !== before.highlight) {
11107
+ reveal(untrack22(scroller), untrack22(viewportHeight));
11108
+ }
11109
+ }
11110
+ };
11111
+ const handleBlur = () => {
11112
+ if (!disposed) {
11113
+ controller.blur();
11114
+ }
11115
+ };
11116
+ const results = () => snapshot2().results;
11117
+ const status = () => snapshot2().status;
11118
+ const visible = createMemo32(() => {
11119
+ const list = results();
11120
+ const window_ = resolveSelectListWindow3(scrollTop(), viewportHeight(), rowHeight, list.length);
11121
+ return list.slice(window_.start, window_.end).map((result, offset) => ({ result, index: window_.start + offset }));
11122
+ });
11123
+ const listShown = () => placement2() !== null && results().length > 0;
11124
+ const activeId = () => {
11125
+ const { highlight } = snapshot2();
11126
+ return listShown() && highlight >= 0 && results()[highlight] ? `${listId}-${highlight}` : void 0;
11127
+ };
11128
+ const mount = () => placement2() !== null ? portal.container() : null;
11129
+ const initialText = untrack22(() => snapshot2().text);
11130
+ const justify = () => props.align === "right" ? "flex-end" : props.align === "center" ? "center" : void 0;
11131
+ const view = <>
11132
+ <div
11133
+ ref={setBox}
11134
+ class={[
11135
+ "ssg-cell-editor-input",
11136
+ "ssg-cell-editor-input--multi",
11137
+ {
11138
+ "ssg-cell-editor-input--multi-search": search,
11139
+ "ssg-cell-editor-input--multi-top": props.alignTop === true,
11140
+ "ssg-cell-editor-input--invalid": error() !== null
11141
+ }
11142
+ ]}
11143
+ style={justify() ? { "justify-content": justify() } : void 0}
11144
+ tabindex={search ? void 0 : 0}
11145
+ role={search ? void 0 : "combobox"}
11146
+ aria-label={search ? void 0 : props.ariaLabel}
11147
+ aria-expanded={search ? void 0 : listShown() ? "true" : "false"}
11148
+ aria-controls={search ? void 0 : listShown() ? listId : void 0}
11149
+ aria-activedescendant={search ? void 0 : activeId()}
11150
+ aria-invalid={search ? void 0 : error() !== null ? "true" : void 0}
11151
+ onKeyDown={search ? void 0 : handleKeyDown}
11152
+ onBlur={search ? void 0 : handleBlur}
11153
+ onPointerDown={(event) => {
11154
+ const field2 = untrack22(input);
11155
+ if (search && event.target !== field2) {
11156
+ event.preventDefault();
11157
+ field2?.focus();
11158
+ }
11159
+ }}
11160
+ >
11161
+ <span class="ssg-multi-select-editor-chips">
11162
+ <For17 each={snapshot2().chips} keyed={(chip) => chip.value}>
11163
+ {(chip) => <span class="ssg-multi-select-chip">
11164
+ <span class="ssg-multi-select-chip-label">{chip().label}</span>
11165
+ <button
11166
+ type="button"
11167
+ tabindex={-1}
11168
+ class="ssg-multi-select-chip-remove"
11169
+ aria-label={chip().label}
11170
+ onPointerDown={(event) => event.preventDefault()}
11171
+ onClick={() => {
11172
+ setError(null);
11173
+ controller.remove(untrack22(chip).value);
11174
+ }}
11175
+ >
11176
+ ×
11177
+ </button>
11178
+ </span>}
11179
+ </For17>
11180
+ </span>
11181
+ <Show29 when={search}>
11182
+ <input
11183
+ ref={setInput}
11184
+ type="text"
11185
+ value={initialText}
11186
+ onInput={(event) => controller.input(event.currentTarget.value, event.isComposing)}
11187
+ onCompositionEnd={(event) => controller.input(event.currentTarget.value, false)}
11188
+ onKeyDown={handleKeyDown}
11189
+ onBlur={handleBlur}
11190
+ role="combobox"
11191
+ aria-autocomplete="list"
11192
+ aria-label={props.ariaLabel}
11193
+ aria-expanded={listShown() ? "true" : "false"}
11194
+ aria-controls={listShown() ? listId : void 0}
11195
+ aria-activedescendant={activeId()}
11196
+ aria-invalid={error() !== null ? "true" : void 0}
11197
+ autocomplete="off"
11198
+ spellcheck="false"
11199
+ class="ssg-multi-select-editor-search"
11200
+ />
11201
+ </Show29>
11202
+ </div>
11203
+ {
11204
+ /* 変更(1.11.0 / レビュー EB-4): 一覧を出している間は、検査で拒まれた知らせを一覧の下(操作の説明の所)に出します
11205
+ (セルの下の吹き出しは一覧に隠れていた)。一覧が隠れているときだけ吹き出し。React 版と同じ。 */
11206
+ }
11207
+ <CellEditorError message={mount() !== null && placement2()?.hidden !== true ? null : error()} />
11208
+ <Show29 when={mount()}>
11209
+ {(container) => <Portal7 mount={container()}>
11210
+ <div
11211
+ ref={setPopover}
11212
+ class={[
11213
+ "ssg-select-editor-popover",
11214
+ "ssg-select-editor-popover--search",
11215
+ "ssg-select-editor-popover--multi",
11216
+ { "ssg-select-editor-popover--loading": status() === "loading" && results().length > 0 },
11217
+ props.themeClassName,
11218
+ props.popoverSlot?.className
11219
+ ]}
11220
+ style={{
11221
+ ...props.popoverSlot?.style,
11222
+ left: px(placement2()?.left ?? 0),
11223
+ top: px(placement2()?.top ?? 0),
11224
+ width: px(placement2()?.width ?? 0),
11225
+ "max-height": px(placement2()?.maxHeight ?? 0),
11226
+ visibility: placement2()?.hidden ? "hidden" : void 0
11227
+ }}
11228
+ onPointerDown={(event) => event.preventDefault()}
11229
+ >
11230
+ <Show29 when={status() === "error"}>
11231
+ <div class="ssg-select-editor-empty ssg-select-editor-error" role="alert">
11232
+ <span class="ssg-select-editor-error-text" title={snapshot2().errorMessage ?? void 0}>
11233
+ {texts().multiSelectFailed}
11234
+ </span>
11235
+ <button type="button" class="ssg-select-editor-retry" tabindex={-1} onClick={() => controller.retry()}>
11236
+ {texts().retry}
11237
+ </button>
11238
+ </div>
11239
+ </Show29>
11240
+ <Show29 when={status() !== "error" && results().length === 0}>
11241
+ <div class="ssg-select-editor-empty" role="status">
11242
+ {status() === "loading" ? texts().multiSelectLoading : snapshot2().filtered ? texts().multiSelectNoMatch : texts().noOptions}
11243
+ </div>
11244
+ </Show29>
11245
+ <Show29 when={results().length > 0}>
11246
+ <div
11247
+ ref={setScroller}
11248
+ role="listbox"
11249
+ id={listId}
11250
+ aria-label={props.ariaLabel}
11251
+ aria-multiselectable="true"
11252
+ aria-busy={status() === "loading" ? "true" : void 0}
11253
+ class="ssg-select-editor-scroller"
11254
+ style={{ height: px(viewportHeight()) }}
11255
+ onScroll={(event) => setScrollTop(event.currentTarget.scrollTop)}
11256
+ >
11257
+ <div class="ssg-select-editor-rows" role="presentation" style={{ height: px(results().length * rowHeight) }}>
11258
+ <For17 each={visible()} keyed={false}>
11259
+ {(item) => {
11260
+ const checked = () => snapshot2().selected.includes(item().result.option.value);
11261
+ return <div
11262
+ id={`${listId}-${item().index}`}
11263
+ role="option"
11264
+ aria-selected={checked() ? "true" : "false"}
11265
+ aria-setsize={results().length}
11266
+ aria-posinset={item().index + 1}
11267
+ class={[
11268
+ "ssg-select-editor-option",
11269
+ {
11270
+ "ssg-select-editor-option--highlighted": item().index === snapshot2().highlight,
11271
+ "ssg-select-editor-option--checked": checked()
11272
+ }
11273
+ ]}
11274
+ style={{ top: px(item().index * rowHeight) }}
11275
+ onClick={() => {
11276
+ setError(null);
11277
+ controller.toggle(untrack22(item).index);
11278
+ }}
11279
+ onPointerEnter={(event) => revealOverflowTitle3(event.currentTarget)}
11280
+ onPointerMove={(event) => {
11281
+ if (pointerMoved(event)) {
11282
+ controller.hover(untrack22(item).index);
11283
+ }
11284
+ }}
11285
+ >
11286
+ <span class="ssg-multi-select-check" aria-hidden="true">
11287
+ <Show29 when={checked()}>
11288
+ <CheckIcon />
11289
+ </Show29>
11290
+ </span>
11291
+ <span class="ssg-select-editor-option-label">
11292
+ <MatchedText2 text={item().result.option.label} range={item().result.labelMatch} />
11293
+ </span>
11294
+ <Show29 when={item().result.option.description}>
11295
+ {(description) => <span class="ssg-select-editor-option-description">
11296
+ <MatchedText2 text={description()} range={item().result.descriptionMatch} />
11297
+ </span>}
11298
+ </Show29>
11299
+ </div>;
11300
+ }}
11301
+ </For17>
11302
+ </div>
11303
+ </div>
11304
+ </Show29>
11305
+ <Show29
11306
+ when={error() === null}
11307
+ fallback={<div class="ssg-multi-select-hint ssg-multi-select-hint--error" role="alert" style={{ "min-height": px(rowHeight) }}>
11308
+ {error()}
11309
+ </div>}
11310
+ >
11311
+ <Show29 when={hint() !== ""}>
11312
+ <div class="ssg-multi-select-hint" aria-hidden="true" style={{ "min-height": px(rowHeight) }}>
11313
+ {hint()}
11314
+ </div>
11315
+ </Show29>
11316
+ </Show29>
11317
+ </div>
11318
+ </Portal7>}
11319
+ </Show29>
11320
+ </>;
11321
+ createPortalTokens(popover, () => props.themeClassName, placement2);
11322
+ createRenderEffect9(
11323
+ () => [input(), snapshot2().text],
11324
+ ([element, text]) => {
11325
+ if (element && element.value !== text) {
11326
+ element.value = text;
11327
+ }
11328
+ },
11329
+ { name: "multiSelectInputText" }
11330
+ );
11331
+ return view;
11332
+ }
11333
+
11334
+ // src/view/GridMultiSelectChips.tsx
11335
+ import { For as For18, Show as Show30 } from "solid-js";
11336
+ function GridMultiSelectChips(props) {
11337
+ return <Show30 when={props.labels.length > 0}>
11338
+ <span class="ssg-multi-select-chips" data-ssg-tooltip-overflow={props.labels.join(props.separator)}>
11339
+ <For18 each={props.labels} keyed={false}>
11340
+ {(label, index) => <span class="ssg-multi-select-chip">
11341
+ <span class="ssg-multi-select-chip-label">{props.renderLabel(label(), index)}</span>
11342
+ </span>}
11343
+ </For18>
11344
+ </span>
11345
+ </Show30>;
11346
+ }
11347
+
11348
+ // src/features/multiSelect.ts
11349
+ var multiSelectFeature = {
11350
+ MultiSelectCellEditor,
11351
+ MultiSelectChips: GridMultiSelectChips,
11352
+ resolveChipLabels: resolveMultiSelectChipLabels,
11353
+ splitRangesByChips,
11354
+ localeText: DEFAULT_MULTI_SELECT_LOCALE_TEXT
11355
+ };
11356
+
11357
+ // src/features/changeTracking.ts
11358
+ import { createChangeTracker } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/changeTracker";
11359
+ import {
11360
+ buildRevertMenuItems,
11361
+ describeUnsavedCell,
11362
+ formatUnsavedSummary
11363
+ } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/changeTracking";
11364
+ import { DEFAULT_CHANGE_TRACKING_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
11365
+ var changeTrackingFeature = {
11366
+ createChangeTracker,
11367
+ describeUnsavedCell,
11368
+ formatUnsavedSummary,
11369
+ buildRevertMenuItems,
11370
+ localeText: DEFAULT_CHANGE_TRACKING_LOCALE_TEXT
11371
+ };
11372
+
11373
+ // src/features/excelShortcuts.ts
11374
+ import { createExcelShortcutCommands } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/excelShortcutCommands";
11375
+ var excelShortcutsFeature = {
11376
+ createExcelShortcutCommands
11377
+ };
11378
+
11379
+ // src/features/newRow.ts
11380
+ import { createNewRowController } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/newRowController";
11381
+ import { resolveNewRowPlaceholder } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/newRow";
11382
+ import { DEFAULT_NEW_ROW_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
11383
+ var newRowFeature = {
11384
+ createNewRowController,
11385
+ resolveNewRowPlaceholder,
11386
+ localeText: DEFAULT_NEW_ROW_LOCALE_TEXT
11387
+ };
11388
+
11389
+ // src/features/treeData.ts
11390
+ import {
11391
+ collectTreeAncestors,
11392
+ describeTreeDataProblem,
11393
+ describeTreeStructureProblems,
11394
+ followTreeRowsAfterToggle,
10057
11395
  resolveTreeDataProblems
10058
11396
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/treeData";
10059
11397
  import { createTreeStage } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/treeStage";
10060
11398
  import { DEFAULT_TREE_DATA_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
10061
11399
 
10062
11400
  // src/view/GridTreeCell.tsx
10063
- import { createMemo as createMemo31, Show as Show28 } from "solid-js";
10064
- import { formatLocaleText as formatLocaleText16 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
11401
+ import { createMemo as createMemo33, Show as Show31 } from "solid-js";
11402
+ import { formatLocaleText as formatLocaleText17 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
10065
11403
  import {
10066
11404
  formatTotalRowCellText as formatTotalRowCellText2,
10067
11405
  resolveTotalRowCaption as resolveTotalRowCaption2
10068
11406
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
10069
11407
  function GridTreeCellPrefix(props) {
10070
11408
  const texts = useFeatureLocaleText();
10071
- const label = createMemo31(() => {
11409
+ const label = createMemo33(() => {
10072
11410
  const name = props.rowLabel.trim();
10073
- return formatLocaleText16(props.open ? texts().collapseTreeRow : texts().expandTreeRow, {
10074
- row: name !== "" ? name : formatLocaleText16(texts().treeRowNumber, { row: props.rowNumber })
11411
+ return formatLocaleText17(props.open ? texts().collapseTreeRow : texts().expandTreeRow, {
11412
+ row: name !== "" ? name : formatLocaleText17(texts().treeRowNumber, { row: props.rowNumber })
10075
11413
  });
10076
11414
  });
10077
11415
  return <>
10078
- <Show28 when={props.level > 0}>
11416
+ <Show31 when={props.level > 0}>
10079
11417
  <span
10080
11418
  aria-hidden="true"
10081
11419
  class="ssg-tree-indent"
10082
11420
  style={{ width: `calc(var(--ssg-tree-indent) * ${props.level})` }}
10083
11421
  />
10084
- </Show28>
10085
- <Show28 when={props.hasChildren} fallback={<span aria-hidden="true" class="ssg-tree-spacer" />}>
11422
+ </Show31>
11423
+ <Show31 when={props.hasChildren} fallback={<span aria-hidden="true" class="ssg-tree-spacer" />}>
10086
11424
  <button
10087
11425
  type="button"
10088
11426
  tabindex={-1}
@@ -10103,28 +11441,28 @@ function GridTreeCellPrefix(props) {
10103
11441
  >
10104
11442
  {props.open ? "\u25BE" : "\u25B8"}
10105
11443
  </button>
10106
- </Show28>
11444
+ </Show31>
10107
11445
  </>;
10108
11446
  }
10109
11447
  function GridTreeAggregateValue(props) {
10110
11448
  const texts = useFeatureLocaleText();
10111
- const shown = createMemo31(() => {
11449
+ const shown = createMemo33(() => {
10112
11450
  const column = props.column;
10113
11451
  const kind = typeof column.aggFunc === "string" ? column.aggFunc : "custom";
10114
11452
  const text = formatTotalRowCellText2(column, { value: props.value, kind });
10115
11453
  return text === "" ? null : { text, caption: resolveTotalRowCaption2(kind, texts()) };
10116
11454
  });
10117
- return <Show28 when={shown()}>
11455
+ return <Show31 when={shown()}>
10118
11456
  {(current) => <span
10119
11457
  class="ssg-group-value ssg-tree-aggregate"
10120
11458
  data-ssg-tooltip-overflow={current().caption !== void 0 ? `${current().caption} ${current().text}` : current().text}
10121
11459
  >
10122
- <Show28 when={current().caption !== void 0}>
11460
+ <Show31 when={current().caption !== void 0}>
10123
11461
  <span class="ssg-group-caption">{current().caption}</span>
10124
- </Show28>
11462
+ </Show31>
10125
11463
  {current().text}
10126
11464
  </span>}
10127
- </Show28>;
11465
+ </Show31>;
10128
11466
  }
10129
11467
 
10130
11468
  // src/features/treeData.ts
@@ -10144,7 +11482,7 @@ var treeDataFeature = {
10144
11482
  import { DEFAULT_AGGREGATES_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
10145
11483
 
10146
11484
  // src/primitives/selectionAggregates.ts
10147
- import { createMemo as createMemo32 } from "solid-js";
11485
+ import { createMemo as createMemo34 } from "solid-js";
10148
11486
  import {
10149
11487
  createSelectionAggregatesRunner,
10150
11488
  resolveSyncSelectionAggregates,
@@ -10156,15 +11494,15 @@ import {
10156
11494
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionAggregates";
10157
11495
  function createSelectionAggregates(args) {
10158
11496
  const stabilizeTarget = createSelectionAggregateTargetStabilizer();
10159
- const target = createMemo32(() => {
11497
+ const target = createMemo34(() => {
10160
11498
  const current = args();
10161
11499
  return stabilizeTarget(
10162
11500
  current.enabled ? resolveSelectionAggregateTarget(current.selection, current.viewRowCount, current.orderedColumns) : null
10163
11501
  );
10164
11502
  });
10165
- const rowModel = createMemo32(() => args().rowModel);
10166
- const key = createMemo32(() => ({ rowModel: rowModel(), target: target() }));
10167
- const syncResult = createMemo32(() => resolveSyncSelectionAggregates(key()));
11503
+ const rowModel = createMemo34(() => args().rowModel);
11504
+ const key = createMemo34(() => ({ rowModel: rowModel(), target: target() }));
11505
+ const syncResult = createMemo34(() => resolveSyncSelectionAggregates(key()));
10168
11506
  const runner = createSelectionAggregatesRunner();
10169
11507
  connectController(
10170
11508
  runner,
@@ -10173,16 +11511,16 @@ function createSelectionAggregates(args) {
10173
11511
  "selectionAggregates"
10174
11512
  );
10175
11513
  const snapshot2 = createExternalStoreSignal(runner, "selectionAggregatesStore");
10176
- return createMemo32(() => selectSelectionAggregatesResult(syncResult(), snapshot2(), key()));
11514
+ return createMemo34(() => selectSelectionAggregatesResult(syncResult(), snapshot2(), key()));
10177
11515
  }
10178
11516
 
10179
11517
  // src/view/GridSelectionAggregates.tsx
10180
- import { For as For16, Show as Show29, createMemo as createMemo33 } from "solid-js";
11518
+ import { For as For19, Show as Show32, createMemo as createMemo35 } from "solid-js";
10181
11519
  import { formatSelectionAggregateNumber } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionAggregates";
10182
- import { formatLocaleText as formatLocaleText17 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
11520
+ import { formatLocaleText as formatLocaleText18 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
10183
11521
  function GridSelectionAggregates(props) {
10184
11522
  const texts = useFeatureLocaleText();
10185
- const chips = createMemo33(() => {
11523
+ const chips = createMemo35(() => {
10186
11524
  const aggregates = props.aggregates;
10187
11525
  if (!aggregates) {
10188
11526
  return null;
@@ -10192,7 +11530,7 @@ function GridSelectionAggregates(props) {
10192
11530
  return [
10193
11531
  {
10194
11532
  key: "computing",
10195
- text: formatLocaleText17(localeTexts.aggregateComputing, { percent: Math.floor(aggregates.progress * 100) })
11533
+ text: formatLocaleText18(localeTexts.aggregateComputing, { percent: Math.floor(aggregates.progress * 100) })
10196
11534
  }
10197
11535
  ];
10198
11536
  }
@@ -10215,12 +11553,12 @@ function GridSelectionAggregates(props) {
10215
11553
  }
10216
11554
  return list;
10217
11555
  });
10218
- return <Show29 when={chips()}>
11556
+ return <Show32 when={chips()}>
10219
11557
  {(list) => <div class={["ssg-bar-aggregates", { "ssg-bar-aggregates--trailing": props.trailing }]}>
10220
11558
  <div class="ssg-bar-aggregates-inner" title={list().map((chip) => chip.text).join(" ")}>
10221
11559
  <div class="ssg-bar-aggregates-list">
10222
11560
  <span class="ssg-bar-aggregates-fit" aria-hidden="true" />
10223
- <For16 each={list()} keyed={(chip) => chip.key}>
11561
+ <For19 each={list()} keyed={(chip) => chip.key}>
10224
11562
  {(chip, index) => <span
10225
11563
  class={[
10226
11564
  "ssg-bar-chip",
@@ -10231,16 +11569,16 @@ function GridSelectionAggregates(props) {
10231
11569
  ]}
10232
11570
  style={{ order: String(-index()) }}
10233
11571
  >
10234
- <Show29 when={chip().label !== void 0} fallback={chip().text}>
11572
+ <Show32 when={chip().label !== void 0} fallback={chip().text}>
10235
11573
  {chip().label}
10236
11574
  <b class="ssg-bar-aggregate-value">{chip().value}</b>
10237
- </Show29>
11575
+ </Show32>
10238
11576
  </span>}
10239
- </For16>
11577
+ </For19>
10240
11578
  </div>
10241
11579
  </div>
10242
11580
  </div>}
10243
- </Show29>;
11581
+ </Show32>;
10244
11582
  }
10245
11583
 
10246
11584
  // src/features/selectionAggregates.ts
@@ -10251,7 +11589,7 @@ var selectionAggregatesFeature = {
10251
11589
  };
10252
11590
 
10253
11591
  // src/primitives/toolPanel.ts
10254
- import { createMemo as createMemo34 } from "solid-js";
11592
+ import { createMemo as createMemo36 } from "solid-js";
10255
11593
  import {
10256
11594
  createToolPanelController,
10257
11595
  resolveActiveToolPanelTab,
@@ -10270,7 +11608,7 @@ function createToolPanel(inputs) {
10270
11608
  onSuppressedEscape: inputs.onSuppressedEscape
10271
11609
  }), "render", "toolPanel");
10272
11610
  const snapshot2 = createExternalStoreSignal(controller, "toolPanelStore");
10273
- const availableTabs = createMemo34(
11611
+ const availableTabs = createMemo36(
10274
11612
  () => resolveAvailableToolPanelTabs({
10275
11613
  canUseFilterTab: inputs.canUseFilterTab(),
10276
11614
  canUseColumnsTab: inputs.canUseColumnsTab(),
@@ -10279,10 +11617,10 @@ function createToolPanel(inputs) {
10279
11617
  { equals: sameTabs }
10280
11618
  );
10281
11619
  return {
10282
- activeTab: createMemo34(() => resolveActiveToolPanelTab(snapshot2().requestedTab, availableTabs())),
11620
+ activeTab: createMemo36(() => resolveActiveToolPanelTab(snapshot2().requestedTab, availableTabs())),
10283
11621
  availableTabs,
10284
- layout: createMemo34(() => snapshot2().layout),
10285
- flashTick: createMemo34(() => snapshot2().flashTick),
11622
+ layout: createMemo36(() => snapshot2().layout),
11623
+ flashTick: createMemo36(() => snapshot2().flashTick),
10286
11624
  panelRef: controller.panelRef,
10287
11625
  open: controller.open,
10288
11626
  close: controller.close,
@@ -10306,7 +11644,7 @@ import {
10306
11644
  } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
10307
11645
 
10308
11646
  // src/view/GridTotalRow.tsx
10309
- import { For as For17, Show as Show30, createMemo as createMemo35 } from "solid-js";
11647
+ import { For as For20, Show as Show33, createMemo as createMemo37 } from "solid-js";
10310
11648
  import {
10311
11649
  formatTotalRowCellText as formatTotalRowCellText3,
10312
11650
  resolveTotalRowCaption as resolveTotalRowCaption3
@@ -10333,7 +11671,7 @@ function GridTotalRow(props) {
10333
11671
  ...props.stickyBottom > 0 ? { bottom: px(props.stickyBottom) } : null
10334
11672
  }}
10335
11673
  >
10336
- <Show30 when={props.ownsRowHeader}>
11674
+ <Show33 when={props.ownsRowHeader}>
10337
11675
  <div
10338
11676
  role={rowHeaderIsCell() ? "rowheader" : void 0}
10339
11677
  aria-colindex={rowHeaderIsCell() ? 1 : void 0}
@@ -10348,13 +11686,13 @@ function GridTotalRow(props) {
10348
11686
  >
10349
11687
  {rowHeaderText() === "" ? null : rowHeaderText()}
10350
11688
  </div>
10351
- </Show30>
10352
- <For17 each={props.entries} keyed={(entry) => entry.column.key}>
11689
+ </Show33>
11690
+ <For20 each={props.entries} keyed={(entry) => entry.column.key}>
10353
11691
  {(entry) => {
10354
- const unbound = createMemo35(() => entry().column);
11692
+ const unbound = createMemo37(() => entry().column);
10355
11693
  const cell = () => props.cells.get(unbound().key);
10356
11694
  const isLabelCell = () => unbound().key === props.labelColumnKey;
10357
- const content = createMemo35(() => {
11695
+ const content = createMemo37(() => {
10358
11696
  const total = cell();
10359
11697
  if (total) {
10360
11698
  const column = unbound();
@@ -10406,7 +11744,7 @@ function GridTotalRow(props) {
10406
11744
  {content()}
10407
11745
  </div>;
10408
11746
  }}
10409
- </For17>
11747
+ </For20>
10410
11748
  </div>
10411
11749
  </>;
10412
11750
  }
@@ -10434,7 +11772,11 @@ var fullGridFeatures = {
10434
11772
  find: findFeature,
10435
11773
  imeDirectInput: imeDirectInputFeature,
10436
11774
  selectSearch: selectSearchFeature,
11775
+ dateTimeEditors: dateTimeEditorsFeature,
11776
+ multiSelect: multiSelectFeature,
10437
11777
  changeTracking: changeTrackingFeature,
11778
+ excelShortcuts: excelShortcutsFeature,
11779
+ newRow: newRowFeature,
10438
11780
  treeData: treeDataFeature,
10439
11781
  columnAutosize: columnAutosizeFeature,
10440
11782
  columnReorder: columnReorderFeature,
@@ -10479,6 +11821,8 @@ export {
10479
11821
  conditionalFormatFeature,
10480
11822
  contextMenuFeature,
10481
11823
  createSpreadsheetGrid,
11824
+ dateTimeEditorsFeature,
11825
+ excelShortcutsFeature,
10482
11826
  exportFeature,
10483
11827
  fillHandleFeature,
10484
11828
  filteringFeature,
@@ -10487,6 +11831,8 @@ export {
10487
11831
  imeDirectInputFeature,
10488
11832
  labelRowFeature,
10489
11833
  motionExtrasFeature,
11834
+ multiSelectFeature,
11835
+ newRowFeature,
10490
11836
  numberFormatter,
10491
11837
  numberParser,
10492
11838
  pinnedRowsFeature,