@ishibashi0112/spreadsheet-grid-solid 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API_REFERENCE.md +155 -14
- package/README.md +9 -9
- package/dist/{ColumnFilterPopover-t32VGfTq.js → ColumnFilterPopover-DYnfyUTm.js} +40 -41
- package/dist/devWarnings.d.ts +5 -0
- package/dist/features/cellSpan.d.ts +2 -0
- package/dist/features/pagination.d.ts +2 -0
- package/dist/features/types.d.ts +14 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4401 -3914
- package/dist/inputValue-Dvxw-RUC.js +69 -0
- package/dist/model/gridTypes.d.ts +4 -0
- package/dist/primitives/rowDrag.d.ts +1 -0
- package/dist/source/chunks/{ColumnFilterPopover-JL3HPGXY.jsx → ColumnFilterPopover-7COSTSPD.jsx} +2 -4
- package/dist/source/chunks/{chunk-AI3CSPI3.jsx → chunk-D4IAL3ZE.jsx} +43 -1
- package/dist/source/chunks/{toolPanelViews-N6TGBFFW.jsx → toolPanelViews-WBFE4QVY.jsx} +2 -4
- package/dist/source/index.jsx +1487 -755
- package/dist/style.css +1 -1
- package/dist/style.layer.css +1 -1
- package/dist/{toolPanelViews-CPYtBTQP.js → toolPanelViews-BgEAIDpk.js} +35 -36
- package/dist/view/DefaultGridBottomBar.d.ts +3 -0
- package/dist/view/DefaultGridTopBar.d.ts +1 -0
- package/dist/view/GridBodyGroupRow.d.ts +1 -0
- package/dist/view/GridBodyLabelRow.d.ts +1 -0
- package/dist/view/GridBodyLayer.d.ts +5 -0
- package/dist/view/GridBodySkeletonRow.d.ts +2 -0
- package/dist/view/GridPager.d.ts +9 -0
- package/dist/view/GridScrollHint.d.ts +2 -0
- package/dist/view/GridStickyLabelLayer.d.ts +1 -0
- package/package.json +3 -3
- package/skills/spreadsheet-grid-solid/SKILL.md +4 -1
- package/dist/inputValue-C6BHBMBx.js +0 -24
- package/dist/portalTokens-LgUwLYnR.js +0 -47
- package/dist/source/chunks/chunk-WLXZT66B.jsx +0 -44
package/dist/source/index.jsx
CHANGED
|
@@ -14,13 +14,14 @@ import {
|
|
|
14
14
|
} from "./chunks/chunk-ZZTXTW4Z.jsx";
|
|
15
15
|
import {
|
|
16
16
|
GridPortalContext,
|
|
17
|
+
createInputValue,
|
|
17
18
|
createPortalTokens,
|
|
18
19
|
px,
|
|
19
20
|
readEventKey,
|
|
20
21
|
toEditorKeyEvent,
|
|
21
22
|
toSolidStyle,
|
|
22
23
|
useGridPortal
|
|
23
|
-
} from "./chunks/chunk-
|
|
24
|
+
} from "./chunks/chunk-D4IAL3ZE.jsx";
|
|
24
25
|
import {
|
|
25
26
|
GridLocaleTextContext,
|
|
26
27
|
mergeFeatureLocaleDefaults,
|
|
@@ -32,7 +33,8 @@ import {
|
|
|
32
33
|
import { merge } from "solid-js";
|
|
33
34
|
|
|
34
35
|
// src/SpreadsheetGrid.tsx
|
|
35
|
-
import { For as
|
|
36
|
+
import { For as For6, Match, NoHydration, Show as Show13, Switch, createEffect as createEffect4, createMemo as createMemo10, createSignal as createSignal9, createUniqueId as createUniqueId3, flush, isHydrating, latest as latest2, onCleanup as onCleanup8, runWithOwner as runWithOwner3, untrack as untrack13 } from "solid-js";
|
|
37
|
+
import { INERT_CELL_SPAN_INDEX } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/features";
|
|
36
38
|
import { isServer } from "@solidjs/web";
|
|
37
39
|
import { createGridEngine } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/createGridEngine";
|
|
38
40
|
import { gridActions } from "@ishibashi0112/spreadsheet-grid-core/internal/model/gridActions";
|
|
@@ -140,8 +142,19 @@ import {
|
|
|
140
142
|
import { createPointerInteractionsController } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/pointerInteractionsController";
|
|
141
143
|
import {
|
|
142
144
|
createHistoryController,
|
|
143
|
-
createHistoryRowLocator
|
|
145
|
+
createHistoryRowLocator,
|
|
146
|
+
pageHistoryRowLocator
|
|
144
147
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/historyController";
|
|
148
|
+
import {
|
|
149
|
+
createLoadingPlaceholderRowModel,
|
|
150
|
+
resolveCarriedLabelIndex,
|
|
151
|
+
resolveLoadingPlaceholderRows,
|
|
152
|
+
resolvePagedStickyLabel,
|
|
153
|
+
resolveStatePage,
|
|
154
|
+
shiftRowRunsToPage,
|
|
155
|
+
shiftSelectionRows,
|
|
156
|
+
sliceLabelDisplayForPage
|
|
157
|
+
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/pagination";
|
|
145
158
|
import {
|
|
146
159
|
createScrollScaleAnchor,
|
|
147
160
|
createViewportSyncController
|
|
@@ -781,6 +794,23 @@ var NO_VALUE = () => null;
|
|
|
781
794
|
var joinMarks = (first, second) => first === null ? second : second === null ? first : () => [first(), second()];
|
|
782
795
|
var NO_SLOT = () => EMPTY_SLOT;
|
|
783
796
|
var NO_FALSE = () => false;
|
|
797
|
+
var NO_SPAN = () => void 0;
|
|
798
|
+
var writeSpanAttributes = (element, draw) => {
|
|
799
|
+
const rows = draw && draw.rowSpan > 1 ? String(draw.rowSpan) : null;
|
|
800
|
+
const cols = draw && draw.colSpan > 1 ? String(draw.colSpan) : null;
|
|
801
|
+
for (const [name, value] of [
|
|
802
|
+
["aria-rowspan", rows],
|
|
803
|
+
["aria-colspan", cols],
|
|
804
|
+
["data-ssg-row-span", rows],
|
|
805
|
+
["data-ssg-col-span", cols]
|
|
806
|
+
]) {
|
|
807
|
+
if (value === null) {
|
|
808
|
+
element.removeAttribute(name);
|
|
809
|
+
} else if (element.getAttribute(name) !== value) {
|
|
810
|
+
element.setAttribute(name, value);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
};
|
|
784
814
|
var EMPTY_NEW_ROW = /* @__PURE__ */ Object.freeze({});
|
|
785
815
|
var renderNewRowPlaceholder = (text) => text === null ? null : <span class="ssg-new-row-placeholder">{text}</span>;
|
|
786
816
|
var joinClasses = (...parts) => {
|
|
@@ -829,21 +859,35 @@ function GridBodyLayer(props) {
|
|
|
829
859
|
if (row.skeleton) {
|
|
830
860
|
return "skeleton";
|
|
831
861
|
}
|
|
832
|
-
if (row.newRow === true) {
|
|
862
|
+
if (row.newRow === true || row.spanGhost !== void 0) {
|
|
833
863
|
return "keyed";
|
|
834
864
|
}
|
|
835
865
|
const model = props.rowModel;
|
|
836
866
|
return model.getGroupRow?.(row.index) !== void 0 || model.getLabelRow?.(row.index) !== void 0 ? "keyed" : "data";
|
|
837
867
|
};
|
|
868
|
+
const paneRows = createMemo5(() => {
|
|
869
|
+
const rows = props.rows;
|
|
870
|
+
if (!rows.some((row) => row.spanGhost !== void 0)) {
|
|
871
|
+
return rows;
|
|
872
|
+
}
|
|
873
|
+
const entries = props.entries;
|
|
874
|
+
return rows.filter((row) => {
|
|
875
|
+
const ghost = row.spanGhost;
|
|
876
|
+
return ghost === void 0 || entries.some((entry) => ghost.has(entry.logicalIndex));
|
|
877
|
+
});
|
|
878
|
+
});
|
|
838
879
|
const slotted = createMemo5(
|
|
839
880
|
(prev) => {
|
|
840
881
|
const model = props.rowModel;
|
|
841
|
-
return { state: assignRowSlots(prev?.state,
|
|
882
|
+
return { state: assignRowSlots(prev?.state, paneRows(), slotKindOf, prev?.model === model), model };
|
|
842
883
|
}
|
|
843
884
|
);
|
|
885
|
+
const spanOn = createMemo5(() => props.cellSpans !== void 0);
|
|
844
886
|
const trackingOn = createMemo5(() => props.unsavedTracking !== void 0);
|
|
845
887
|
const originalOn = createMemo5(() => props.unsavedTracking?.describeOriginal !== void 0);
|
|
846
888
|
const treeKey = createMemo5(() => props.treeColumnKey);
|
|
889
|
+
const rowOffset = createMemo5(() => props.rowModel.pageStart ?? 0);
|
|
890
|
+
const rowAriaOffset = createMemo5(() => props.ariaRowOffset + rowOffset());
|
|
847
891
|
return <For2 each={slotted().state.items} keyed={(item) => item.slot}>
|
|
848
892
|
{(item) => {
|
|
849
893
|
const rowIndex = createMemo5(() => item().index);
|
|
@@ -856,17 +900,19 @@ function GridBodyLayer(props) {
|
|
|
856
900
|
rowIndex={rowIndex()}
|
|
857
901
|
top={item().start}
|
|
858
902
|
rowHeight={item().size ?? props.rowHeight}
|
|
859
|
-
ariaRowOffset={
|
|
903
|
+
ariaRowOffset={rowAriaOffset()}
|
|
860
904
|
rowHeaderWidth={props.rowHeaderWidth}
|
|
861
905
|
entries={props.entries}
|
|
862
|
-
isRowHovered={props.hoveredRowIndex === rowIndex()}
|
|
906
|
+
isRowHovered={!props.placeholderRows && props.hoveredRowIndex === rowIndex()}
|
|
863
907
|
showRowCheckbox={props.enableRowSelection}
|
|
864
|
-
onRowHeaderPointerDown={props.onRowHeaderPointerDown}
|
|
865
|
-
onRowHeaderPointerEnter={props.onRowHeaderPointerEnter}
|
|
866
|
-
onRowHeaderPointerLeave={props.onRowHeaderPointerLeave}
|
|
867
|
-
onCellPointerDown={props.onCellPointerDown}
|
|
868
|
-
onCellPointerEnter={props.onCellPointerEnter}
|
|
908
|
+
onRowHeaderPointerDown={props.placeholderRows ? IGNORE_POINTER : props.onRowHeaderPointerDown}
|
|
909
|
+
onRowHeaderPointerEnter={props.placeholderRows ? IGNORE_POINTER : props.onRowHeaderPointerEnter}
|
|
910
|
+
onRowHeaderPointerLeave={props.placeholderRows ? IGNORE_POINTER : props.onRowHeaderPointerLeave}
|
|
911
|
+
onCellPointerDown={props.placeholderRows ? IGNORE_POINTER : props.onCellPointerDown}
|
|
912
|
+
onCellPointerEnter={props.placeholderRows ? IGNORE_POINTER : props.onCellPointerEnter}
|
|
869
913
|
slots={props.slots}
|
|
914
|
+
placeholder={props.placeholderRows === true}
|
|
915
|
+
rowNumberOffset={rowOffset()}
|
|
870
916
|
/>;
|
|
871
917
|
}
|
|
872
918
|
const isEntry = untrack3(() => item().newRow === true);
|
|
@@ -893,7 +939,8 @@ function GridBodyLayer(props) {
|
|
|
893
939
|
rowHeight={item().size ?? props.rowHeight}
|
|
894
940
|
rowHeaderWidth={props.rowHeaderWidth}
|
|
895
941
|
entries={props.entries}
|
|
896
|
-
ariaRowOffset={
|
|
942
|
+
ariaRowOffset={rowAriaOffset()}
|
|
943
|
+
rowNumberOffset={rowOffset()}
|
|
897
944
|
isRowHovered={props.hoveredRowIndex === rowIndex()}
|
|
898
945
|
showRowCheckbox={props.enableRowSelection}
|
|
899
946
|
groupRow={group()}
|
|
@@ -919,7 +966,8 @@ function GridBodyLayer(props) {
|
|
|
919
966
|
rowIndex={rowIndex()}
|
|
920
967
|
rowKey={labelRowKey()}
|
|
921
968
|
top={item().start}
|
|
922
|
-
ariaRowOffset={
|
|
969
|
+
ariaRowOffset={rowAriaOffset()}
|
|
970
|
+
rowIndexOffset={rowOffset()}
|
|
923
971
|
rowHeight={item().size ?? props.rowHeight}
|
|
924
972
|
rowHeaderWidth={props.rowHeaderWidth}
|
|
925
973
|
labelRow={label()}
|
|
@@ -954,6 +1002,24 @@ function GridBodyLayer(props) {
|
|
|
954
1002
|
}
|
|
955
1003
|
const sourceRowIndex = isEntry || isRemoved ? () => -1 : createMemo5(() => props.rowModel.getSourceIndex(rowIndex()) ?? rowIndex());
|
|
956
1004
|
const rowSize = createMemo5(() => item().size ?? props.rowHeight);
|
|
1005
|
+
const isGhost = untrack3(() => item().spanGhost) !== void 0;
|
|
1006
|
+
const rowSpans = createMemoWhen(
|
|
1007
|
+
spanOn,
|
|
1008
|
+
() => props.cellSpans?.forRow(rowIndex()),
|
|
1009
|
+
void 0
|
|
1010
|
+
);
|
|
1011
|
+
const rowEntries = createMemo5(() => {
|
|
1012
|
+
const ghostCols = isGhost ? item().spanGhost : void 0;
|
|
1013
|
+
const base = ghostCols ? props.entries.filter((entry) => ghostCols.has(entry.logicalIndex)) : props.entries;
|
|
1014
|
+
const spans = rowSpans();
|
|
1015
|
+
if (!spans) {
|
|
1016
|
+
return base;
|
|
1017
|
+
}
|
|
1018
|
+
const extras = props.pane === "center" ? spans.centerExtras : void 0;
|
|
1019
|
+
const withExtras = extras && extras.length > 0 ? [...extras, ...base] : base;
|
|
1020
|
+
return spans.hidden.size > 0 ? withExtras.filter((entry) => !spans.hidden.has(entry.logicalIndex)) : withExtras;
|
|
1021
|
+
});
|
|
1022
|
+
const spanHost = () => rowSpans()?.host === true;
|
|
957
1023
|
const isRowChecked = createMemo5(
|
|
958
1024
|
() => props.enableRowSelection && !isEntry && !isRemoved ? resolveIsRowSelected(props.rowSelectionState, rowKey()) : false
|
|
959
1025
|
);
|
|
@@ -978,7 +1044,7 @@ function GridBodyLayer(props) {
|
|
|
978
1044
|
const activeCol = createMemo5(
|
|
979
1045
|
() => !isRemoved && props.activeCell?.row === rowIndex() ? props.activeCell.col : -1
|
|
980
1046
|
);
|
|
981
|
-
const rowFindHits = createMemo5(() => props.findIndex.get(rowIndex()));
|
|
1047
|
+
const rowFindHits = createMemo5(() => props.findIndex.get(rowIndex() + rowOffset()));
|
|
982
1048
|
const rowFindCurrent = createMemo5(() => {
|
|
983
1049
|
const hits = rowFindHits();
|
|
984
1050
|
const current = hits ? props.findCurrentIndex : null;
|
|
@@ -999,16 +1065,16 @@ function GridBodyLayer(props) {
|
|
|
999
1065
|
const isHovered = createMemo5(() => !isRemoved && props.hoveredRowIndex === rowIndex());
|
|
1000
1066
|
const rowSlot = createMemo5(
|
|
1001
1067
|
() => newRowBlank() || isRemoved ? EMPTY_SLOT : resolveSlotProps(
|
|
1002
|
-
props.getRowClassName?.(currentRow(), rowIndex(), {
|
|
1068
|
+
props.getRowClassName?.(currentRow(), rowIndex() + rowOffset(), {
|
|
1003
1069
|
row: currentRow(),
|
|
1004
|
-
rowIndex: rowIndex(),
|
|
1070
|
+
rowIndex: rowIndex() + rowOffset(),
|
|
1005
1071
|
sourceRowIndex: sourceRowIndex(),
|
|
1006
1072
|
rowKey: rowKey(),
|
|
1007
1073
|
isSelected: isRowChecked()
|
|
1008
1074
|
})
|
|
1009
1075
|
)
|
|
1010
1076
|
);
|
|
1011
|
-
const rowNumber = () => props.labelViewIndexes ? resolveDataRowNumber(props.labelViewIndexes, rowIndex()) : rowIndex() + 1;
|
|
1077
|
+
const rowNumber = () => props.labelViewIndexes ? resolveDataRowNumber(props.labelViewIndexes, rowIndex() + rowOffset()) : rowIndex() + rowOffset() + 1;
|
|
1012
1078
|
const rowTracking = isEntry || isRemoved ? NO_FALSE : trackingOn;
|
|
1013
1079
|
const rowUnsavedTexts = createMemoWhen(
|
|
1014
1080
|
rowTracking,
|
|
@@ -1104,7 +1170,7 @@ ${decoration}`;
|
|
|
1104
1170
|
const isSelected = () => isRowSelected() || selectedColStart() >= 0 && colIndex() >= selectedColStart() && colIndex() <= selectedColEnd();
|
|
1105
1171
|
const readOnlyCell = () => {
|
|
1106
1172
|
const env = editPermission();
|
|
1107
|
-
return !isColumnEditable(env.readOnly, unbound()) || env.canEditCell !== void 0 && !isCellEditable(env, rowIndex(), colIndex(), currentRow(), unbound(), {
|
|
1173
|
+
return !isColumnEditable(env.readOnly, unbound()) || env.canEditCell !== void 0 && !isCellEditable(env, rowIndex() + rowOffset(), colIndex(), currentRow(), unbound(), {
|
|
1108
1174
|
sourceRowIndex: sourceRowIndex(),
|
|
1109
1175
|
rowKey: rowKey()
|
|
1110
1176
|
});
|
|
@@ -1163,279 +1229,308 @@ ${decoration}`;
|
|
|
1163
1229
|
{trailingMark}
|
|
1164
1230
|
</div>;
|
|
1165
1231
|
};
|
|
1166
|
-
const cells = () =>
|
|
1232
|
+
const cells = () => {
|
|
1233
|
+
const spanMode = untrack3(spanOn);
|
|
1234
|
+
return <For2 each={rowEntries()} keyed={cellKey}>
|
|
1167
1235
|
{(entry) => {
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
}
|
|
1172
|
-
const plain = shape !== "decorated";
|
|
1173
|
-
const newRowSynthetic = isEntry && untrack3(() => isSyntheticColumnKey2(entry().column.key));
|
|
1174
|
-
const removedSynthetic = isRemoved && untrack3(() => isSyntheticColumnKey2(entry().column.key));
|
|
1175
|
-
const decorOff = newRowSynthetic || isRemoved ? () => true : newRowBlank;
|
|
1176
|
-
const unbound = createMemo5(() => entry().column);
|
|
1177
|
-
const column = () => unbound();
|
|
1178
|
-
const colIndex = createMemo5(() => entry().logicalIndex);
|
|
1179
|
-
const size = () => entry().paneLocalSize;
|
|
1180
|
-
const isActive = () => activeCol() === colIndex();
|
|
1181
|
-
const isEditing = () => editingCol() === colIndex();
|
|
1182
|
-
const isSelected = () => isRowSelected() || selectedColStart() >= 0 && colIndex() >= selectedColStart() && colIndex() <= selectedColEnd();
|
|
1183
|
-
const readOnlyCell = () => {
|
|
1184
|
-
if (isRemoved) {
|
|
1185
|
-
return true;
|
|
1236
|
+
const shape = untrack3(() => cellShapeOf(entry().column));
|
|
1237
|
+
if (shape === "text" && !isEntry && !isRemoved && !spanMode) {
|
|
1238
|
+
return renderTextCell(entry);
|
|
1186
1239
|
}
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1240
|
+
const plain = shape !== "decorated";
|
|
1241
|
+
const newRowSynthetic = isEntry && untrack3(() => isSyntheticColumnKey2(entry().column.key));
|
|
1242
|
+
const removedSynthetic = isRemoved && untrack3(() => isSyntheticColumnKey2(entry().column.key));
|
|
1243
|
+
const decorOff = newRowSynthetic || isRemoved ? () => true : newRowBlank;
|
|
1244
|
+
const unbound = createMemo5(() => entry().column);
|
|
1245
|
+
const column = () => unbound();
|
|
1246
|
+
const colIndex = createMemo5(() => entry().logicalIndex);
|
|
1247
|
+
const spanDraw = spanMode ? createMemo5(() => rowSpans()?.cells.get(colIndex())) : NO_SPAN;
|
|
1248
|
+
const spanned = spanMode ? createMemo5(() => spanDraw() !== void 0) : NO_FALSE;
|
|
1249
|
+
const size = () => spanDraw()?.width ?? entry().paneLocalSize;
|
|
1250
|
+
const isActive = () => activeCol() === colIndex();
|
|
1251
|
+
const isEditing = () => editingCol() === colIndex();
|
|
1252
|
+
const isSelected = () => isRowSelected() || selectedColStart() >= 0 && colIndex() >= selectedColStart() && colIndex() <= selectedColEnd();
|
|
1253
|
+
const readOnlyCell = () => {
|
|
1254
|
+
if (isRemoved) {
|
|
1255
|
+
return true;
|
|
1256
|
+
}
|
|
1257
|
+
const env = editPermission();
|
|
1258
|
+
return !isColumnEditable(env.readOnly, unbound()) || env.canEditCell !== void 0 && !newRowBlank() && !isCellEditable(env, rowIndex() + rowOffset(), colIndex(), currentRow(), unbound(), {
|
|
1259
|
+
sourceRowIndex: sourceRowIndex(),
|
|
1260
|
+
rowKey: rowKey()
|
|
1261
|
+
});
|
|
1262
|
+
};
|
|
1263
|
+
const value = () => getCellValue(currentRow(), unbound());
|
|
1264
|
+
const treeAggregates = () => {
|
|
1265
|
+
const aggregates = treeRow()?.aggregates;
|
|
1266
|
+
return aggregates !== void 0 && Object.prototype.hasOwnProperty.call(aggregates, column().key) ? aggregates : void 0;
|
|
1267
|
+
};
|
|
1268
|
+
const shownValue = () => {
|
|
1269
|
+
const aggregates = treeAggregates();
|
|
1270
|
+
return aggregates !== void 0 ? aggregates[column().key] : value();
|
|
1271
|
+
};
|
|
1272
|
+
const findRanges = createMemoWhen(
|
|
1273
|
+
() => rowFindHits()?.has(colIndex()) === true,
|
|
1274
|
+
() => rowFindHits()?.get(colIndex()),
|
|
1275
|
+
void 0
|
|
1276
|
+
);
|
|
1277
|
+
const cellState = {
|
|
1278
|
+
get rowIndex() {
|
|
1279
|
+
return rowIndex();
|
|
1280
|
+
},
|
|
1281
|
+
get colIndex() {
|
|
1282
|
+
return colIndex();
|
|
1283
|
+
},
|
|
1284
|
+
get sourceRowIndex() {
|
|
1285
|
+
return sourceRowIndex();
|
|
1286
|
+
},
|
|
1287
|
+
get rowKey() {
|
|
1288
|
+
return rowKey();
|
|
1289
|
+
},
|
|
1290
|
+
get findRanges() {
|
|
1291
|
+
return findRanges();
|
|
1292
|
+
},
|
|
1293
|
+
get findCurrentIndex() {
|
|
1294
|
+
return rowFindCurrent();
|
|
1295
|
+
},
|
|
1296
|
+
get treeRow() {
|
|
1297
|
+
return treeRow();
|
|
1298
|
+
},
|
|
1299
|
+
get isActive() {
|
|
1300
|
+
return isActive();
|
|
1301
|
+
},
|
|
1302
|
+
get isSelected() {
|
|
1303
|
+
return isSelected();
|
|
1304
|
+
},
|
|
1305
|
+
get isEditing() {
|
|
1306
|
+
return isEditing();
|
|
1307
|
+
},
|
|
1308
|
+
get readOnly() {
|
|
1309
|
+
return readOnlyCell();
|
|
1310
|
+
}
|
|
1311
|
+
};
|
|
1312
|
+
const needsStyleContext = () => typeof column().cellClassName === "function" || !!column().cellNote;
|
|
1313
|
+
const styleContext = plain ? NO_VALUE : createMemoWhen(
|
|
1314
|
+
() => !decorOff() && needsStyleContext(),
|
|
1315
|
+
() => ({
|
|
1316
|
+
row: currentRow(),
|
|
1317
|
+
rowIndex: rowIndex() + rowOffset(),
|
|
1318
|
+
sourceRowIndex: sourceRowIndex(),
|
|
1319
|
+
rowKey: rowKey(),
|
|
1320
|
+
colIndex: colIndex(),
|
|
1321
|
+
value: shownValue(),
|
|
1322
|
+
column: column(),
|
|
1323
|
+
isActive: isActive(),
|
|
1324
|
+
isSelected: isSelected(),
|
|
1325
|
+
isEditing: isEditing(),
|
|
1326
|
+
readOnly: readOnlyCell(),
|
|
1327
|
+
// 追加(1.9.0 の点検 案 A): ツリーデータの行のセルのときだけ、深さ・子の有無・開閉と集計のセルか(React 版と同じ)。
|
|
1328
|
+
...treeStyleOf(treeRow(), treeAggregates() !== void 0)
|
|
1329
|
+
}),
|
|
1330
|
+
null
|
|
1331
|
+
);
|
|
1332
|
+
const conditionalCell = plain || newRowSynthetic || removedSynthetic ? NO_SLOT : createMemoWhen(
|
|
1333
|
+
() => column().cellClassName !== void 0,
|
|
1334
|
+
() => {
|
|
1335
|
+
const cellClassName = column().cellClassName;
|
|
1336
|
+
const context = styleContext();
|
|
1337
|
+
return resolveSlotProps(
|
|
1338
|
+
typeof cellClassName === "function" ? context ? cellClassName(context) : void 0 : cellClassName
|
|
1339
|
+
);
|
|
1340
|
+
},
|
|
1341
|
+
resolveSlotProps(void 0)
|
|
1342
|
+
);
|
|
1343
|
+
const formatRules = () => props.conditionalFormat && !decorOff() ? column().conditionalFormat : void 0;
|
|
1344
|
+
const dataBar = plain ? NO_VALUE : createMemoWhen(
|
|
1345
|
+
() => formatRules()?.dataBar !== void 0,
|
|
1346
|
+
() => {
|
|
1347
|
+
const feature = props.conditionalFormat;
|
|
1348
|
+
const rules = formatRules();
|
|
1349
|
+
return feature && rules?.dataBar && treeAggregates() === void 0 ? feature.resolveDataBar(rules.dataBar, value(), props.conditionalFormatStats.get(column().key)) : null;
|
|
1350
|
+
},
|
|
1351
|
+
null
|
|
1352
|
+
);
|
|
1353
|
+
const scaleBackground = plain ? NO_VALUE : createMemoWhen(
|
|
1354
|
+
() => formatRules()?.colorScale !== void 0,
|
|
1355
|
+
() => {
|
|
1356
|
+
const feature = props.conditionalFormat;
|
|
1357
|
+
const rules = formatRules();
|
|
1358
|
+
return feature && rules?.colorScale && treeAggregates() === void 0 ? feature.resolveColorScaleBackground(
|
|
1359
|
+
rules.colorScale,
|
|
1360
|
+
value(),
|
|
1361
|
+
props.conditionalFormatStats.get(column().key)
|
|
1362
|
+
) : null;
|
|
1363
|
+
},
|
|
1364
|
+
null
|
|
1365
|
+
);
|
|
1366
|
+
const dataBarColor = () => {
|
|
1367
|
+
const bar = dataBar();
|
|
1368
|
+
const rules = formatRules()?.dataBar;
|
|
1369
|
+
return bar ? bar.negative ? rules?.negativeColor : rules?.color : void 0;
|
|
1370
|
+
};
|
|
1371
|
+
const invalidMessage = plain ? NO_VALUE : createMemoWhen(
|
|
1372
|
+
() => !decorOff() && !!props.showValidationMarks && hasCellValidation(unbound()),
|
|
1373
|
+
() => treeAggregates() !== void 0 ? null : getInvalidMessage(unbound(), currentRow(), value(), texts()),
|
|
1374
|
+
null
|
|
1375
|
+
);
|
|
1376
|
+
const cellNote = plain ? NO_VALUE : createMemoWhen(
|
|
1377
|
+
() => !decorOff() && !!column().cellNote,
|
|
1378
|
+
() => {
|
|
1379
|
+
const note = column().cellNote;
|
|
1380
|
+
const context = styleContext();
|
|
1381
|
+
return note && context ? normalizeCellNote(note(context)) : null;
|
|
1382
|
+
},
|
|
1383
|
+
null
|
|
1384
|
+
);
|
|
1385
|
+
const unsavedText = unsavedTextOf(untrack3(unbound).key);
|
|
1386
|
+
const unsavedMark = unsavedMarkOf(unsavedText);
|
|
1387
|
+
const originalText = originalTextOf(untrack3(unbound).key);
|
|
1388
|
+
const trailingMark = joinMarks(originalMarkOf(originalText), unsavedMark);
|
|
1389
|
+
const tooltipText = () => resolveCellTooltipText(invalidMessage(), cellNote(), unsavedText());
|
|
1390
|
+
const autoHeightFlags = createMemoWhen(
|
|
1391
|
+
rowAutoHeight,
|
|
1392
|
+
() => {
|
|
1393
|
+
const content = column().autoHeight === true;
|
|
1394
|
+
const top = rowSize() > props.rowHeight && (column().verticalAlign ?? props.verticalAlign ?? (content ? "top" : "center")) === "top";
|
|
1395
|
+
return (content ? 1 : 0) | (top ? 2 : 0);
|
|
1396
|
+
},
|
|
1397
|
+
0
|
|
1398
|
+
);
|
|
1399
|
+
const isAutoHeightCell = () => (autoHeightFlags() & 1) !== 0 && !spanned();
|
|
1400
|
+
const alignTop = () => (autoHeightFlags() & 2) !== 0;
|
|
1401
|
+
const markOverflowTooltip = () => shouldMarkCellOverflowTooltip({
|
|
1402
|
+
enabled: cellEnv().showCellOverflowTooltip,
|
|
1403
|
+
isAutoHeightCell: isAutoHeightCell(),
|
|
1404
|
+
hasRenderCell: column().renderCell !== void 0
|
|
1191
1405
|
});
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
const aggregates = treeAggregates();
|
|
1200
|
-
return aggregates !== void 0 ? aggregates[column().key] : value();
|
|
1201
|
-
};
|
|
1202
|
-
const findRanges = createMemoWhen(
|
|
1203
|
-
() => rowFindHits()?.has(colIndex()) === true,
|
|
1204
|
-
() => rowFindHits()?.get(colIndex()),
|
|
1205
|
-
void 0
|
|
1206
|
-
);
|
|
1207
|
-
const cellState = {
|
|
1208
|
-
get rowIndex() {
|
|
1209
|
-
return rowIndex();
|
|
1210
|
-
},
|
|
1211
|
-
get colIndex() {
|
|
1212
|
-
return colIndex();
|
|
1213
|
-
},
|
|
1214
|
-
get sourceRowIndex() {
|
|
1215
|
-
return sourceRowIndex();
|
|
1216
|
-
},
|
|
1217
|
-
get rowKey() {
|
|
1218
|
-
return rowKey();
|
|
1219
|
-
},
|
|
1220
|
-
get findRanges() {
|
|
1221
|
-
return findRanges();
|
|
1222
|
-
},
|
|
1223
|
-
get findCurrentIndex() {
|
|
1224
|
-
return rowFindCurrent();
|
|
1225
|
-
},
|
|
1226
|
-
get treeRow() {
|
|
1227
|
-
return treeRow();
|
|
1228
|
-
},
|
|
1229
|
-
get isActive() {
|
|
1230
|
-
return isActive();
|
|
1231
|
-
},
|
|
1232
|
-
get isSelected() {
|
|
1233
|
-
return isSelected();
|
|
1234
|
-
},
|
|
1235
|
-
get isEditing() {
|
|
1236
|
-
return isEditing();
|
|
1237
|
-
},
|
|
1238
|
-
get readOnly() {
|
|
1239
|
-
return readOnlyCell();
|
|
1240
|
-
}
|
|
1241
|
-
};
|
|
1242
|
-
const needsStyleContext = () => typeof column().cellClassName === "function" || !!column().cellNote;
|
|
1243
|
-
const styleContext = plain ? NO_VALUE : createMemoWhen(
|
|
1244
|
-
() => !decorOff() && needsStyleContext(),
|
|
1245
|
-
() => ({
|
|
1246
|
-
row: currentRow(),
|
|
1247
|
-
rowIndex: rowIndex(),
|
|
1248
|
-
sourceRowIndex: sourceRowIndex(),
|
|
1249
|
-
rowKey: rowKey(),
|
|
1250
|
-
colIndex: colIndex(),
|
|
1251
|
-
value: shownValue(),
|
|
1252
|
-
column: column(),
|
|
1253
|
-
isActive: isActive(),
|
|
1254
|
-
isSelected: isSelected(),
|
|
1255
|
-
isEditing: isEditing(),
|
|
1256
|
-
readOnly: readOnlyCell(),
|
|
1257
|
-
// 追加(1.9.0 の点検 案 A): ツリーデータの行のセルのときだけ、深さ・子の有無・開閉と集計のセルか(React 版と同じ)。
|
|
1258
|
-
...treeStyleOf(treeRow(), treeAggregates() !== void 0)
|
|
1259
|
-
}),
|
|
1260
|
-
null
|
|
1261
|
-
);
|
|
1262
|
-
const conditionalCell = plain || newRowSynthetic || removedSynthetic ? NO_SLOT : createMemoWhen(
|
|
1263
|
-
() => column().cellClassName !== void 0,
|
|
1264
|
-
() => {
|
|
1265
|
-
const cellClassName = column().cellClassName;
|
|
1266
|
-
const context = styleContext();
|
|
1267
|
-
return resolveSlotProps(
|
|
1268
|
-
typeof cellClassName === "function" ? context ? cellClassName(context) : void 0 : cellClassName
|
|
1269
|
-
);
|
|
1270
|
-
},
|
|
1271
|
-
resolveSlotProps(void 0)
|
|
1272
|
-
);
|
|
1273
|
-
const formatRules = () => props.conditionalFormat && !decorOff() ? column().conditionalFormat : void 0;
|
|
1274
|
-
const dataBar = plain ? NO_VALUE : createMemoWhen(
|
|
1275
|
-
() => formatRules()?.dataBar !== void 0,
|
|
1276
|
-
() => {
|
|
1277
|
-
const feature = props.conditionalFormat;
|
|
1278
|
-
const rules = formatRules();
|
|
1279
|
-
return feature && rules?.dataBar && treeAggregates() === void 0 ? feature.resolveDataBar(rules.dataBar, value(), props.conditionalFormatStats.get(column().key)) : null;
|
|
1280
|
-
},
|
|
1281
|
-
null
|
|
1282
|
-
);
|
|
1283
|
-
const scaleBackground = plain ? NO_VALUE : createMemoWhen(
|
|
1284
|
-
() => formatRules()?.colorScale !== void 0,
|
|
1285
|
-
() => {
|
|
1286
|
-
const feature = props.conditionalFormat;
|
|
1287
|
-
const rules = formatRules();
|
|
1288
|
-
return feature && rules?.colorScale && treeAggregates() === void 0 ? feature.resolveColorScaleBackground(
|
|
1289
|
-
rules.colorScale,
|
|
1290
|
-
value(),
|
|
1291
|
-
props.conditionalFormatStats.get(column().key)
|
|
1292
|
-
) : null;
|
|
1293
|
-
},
|
|
1294
|
-
null
|
|
1295
|
-
);
|
|
1296
|
-
const dataBarColor = () => {
|
|
1297
|
-
const bar = dataBar();
|
|
1298
|
-
const rules = formatRules()?.dataBar;
|
|
1299
|
-
return bar ? bar.negative ? rules?.negativeColor : rules?.color : void 0;
|
|
1300
|
-
};
|
|
1301
|
-
const invalidMessage = plain ? NO_VALUE : createMemoWhen(
|
|
1302
|
-
() => !decorOff() && !!props.showValidationMarks && hasCellValidation(unbound()),
|
|
1303
|
-
() => treeAggregates() !== void 0 ? null : getInvalidMessage(unbound(), currentRow(), value(), texts()),
|
|
1304
|
-
null
|
|
1305
|
-
);
|
|
1306
|
-
const cellNote = plain ? NO_VALUE : createMemoWhen(
|
|
1307
|
-
() => !decorOff() && !!column().cellNote,
|
|
1308
|
-
() => {
|
|
1309
|
-
const note = column().cellNote;
|
|
1310
|
-
const context = styleContext();
|
|
1311
|
-
return note && context ? normalizeCellNote(note(context)) : null;
|
|
1312
|
-
},
|
|
1313
|
-
null
|
|
1314
|
-
);
|
|
1315
|
-
const unsavedText = unsavedTextOf(untrack3(unbound).key);
|
|
1316
|
-
const unsavedMark = unsavedMarkOf(unsavedText);
|
|
1317
|
-
const originalText = originalTextOf(untrack3(unbound).key);
|
|
1318
|
-
const trailingMark = joinMarks(originalMarkOf(originalText), unsavedMark);
|
|
1319
|
-
const tooltipText = () => resolveCellTooltipText(invalidMessage(), cellNote(), unsavedText());
|
|
1320
|
-
const autoHeightFlags = createMemoWhen(
|
|
1321
|
-
rowAutoHeight,
|
|
1322
|
-
() => {
|
|
1323
|
-
const content = column().autoHeight === true;
|
|
1324
|
-
const top = rowSize() > props.rowHeight && (column().verticalAlign ?? props.verticalAlign ?? (content ? "top" : "center")) === "top";
|
|
1325
|
-
return (content ? 1 : 0) | (top ? 2 : 0);
|
|
1326
|
-
},
|
|
1327
|
-
0
|
|
1328
|
-
);
|
|
1329
|
-
const isAutoHeightCell = () => (autoHeightFlags() & 1) !== 0;
|
|
1330
|
-
const alignTop = () => (autoHeightFlags() & 2) !== 0;
|
|
1331
|
-
const markOverflowTooltip = () => shouldMarkCellOverflowTooltip({
|
|
1332
|
-
enabled: cellEnv().showCellOverflowTooltip,
|
|
1333
|
-
isAutoHeightCell: isAutoHeightCell(),
|
|
1334
|
-
hasRenderCell: column().renderCell !== void 0
|
|
1335
|
-
});
|
|
1336
|
-
const cell = () => ({ row: rowIndex(), col: colIndex() });
|
|
1337
|
-
const keyedContent = untrack3(() => entry().column.renderCell !== void 0);
|
|
1338
|
-
const contentColumn = isRemoved ? createMemo5(() => {
|
|
1339
|
-
const current = column();
|
|
1340
|
-
return current.renderCell || current.conditionalFormat ? { ...current, renderCell: void 0, conditionalFormat: void 0 } : current;
|
|
1341
|
-
}) : column;
|
|
1342
|
-
const cellChildren = plain ? () => props.renderCellContent(currentRow, contentColumn(), cellState) : () => <>
|
|
1406
|
+
const cell = () => ({ row: rowIndex(), col: colIndex() });
|
|
1407
|
+
const keyedContent = untrack3(() => entry().column.renderCell !== void 0);
|
|
1408
|
+
const contentColumn = isRemoved ? createMemo5(() => {
|
|
1409
|
+
const current = column();
|
|
1410
|
+
return current.renderCell || current.conditionalFormat ? { ...current, renderCell: void 0, conditionalFormat: void 0 } : current;
|
|
1411
|
+
}) : column;
|
|
1412
|
+
const cellChildren = plain ? () => props.renderCellContent(currentRow, contentColumn(), cellState) : () => <>
|
|
1343
1413
|
<Show2 when={dataBar()}>
|
|
1344
1414
|
{(bar) => <span
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1415
|
+
class={["ssg-cf-bar", { "ssg-cf-bar--negative": bar().negative }]}
|
|
1416
|
+
style={{
|
|
1417
|
+
left: `${bar().start}%`,
|
|
1418
|
+
width: `${bar().end - bar().start}%`,
|
|
1419
|
+
...dataBarColor() ? { "background-color": dataBarColor() } : null
|
|
1420
|
+
}}
|
|
1421
|
+
aria-hidden="true"
|
|
1422
|
+
/>}
|
|
1353
1423
|
</Show2>
|
|
1354
1424
|
<Show2
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1425
|
+
when={isAutoHeightCell()}
|
|
1426
|
+
fallback={props.renderCellContent(currentRow, contentColumn(), cellState)}
|
|
1427
|
+
>
|
|
1358
1428
|
<div class="ssg-autoheight-content" data-autoheight-content="">
|
|
1359
1429
|
{props.renderCellContent(currentRow, contentColumn(), cellState)}
|
|
1360
1430
|
</div>
|
|
1361
1431
|
</Show2>
|
|
1362
1432
|
</>;
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1433
|
+
const dataContent = keyedContent ? () => {
|
|
1434
|
+
rowKey();
|
|
1435
|
+
return cellChildren();
|
|
1436
|
+
} : cellChildren;
|
|
1437
|
+
const cellContent = removedSynthetic ? NO_VALUE : !isEntry ? dataContent : newRowSynthetic ? NO_VALUE : () => newRowBlank() ? renderNewRowPlaceholder(isEditing() ? null : props.newRowLayer?.placeholder(column()) ?? null) : dataContent();
|
|
1438
|
+
const shownContent = spanMode ? () => <Show2 when={spanned()} fallback={cellContent()}>
|
|
1439
|
+
<div
|
|
1440
|
+
class="ssg-cell-span-content"
|
|
1441
|
+
style={{ top: px(props.spanStickyTop ?? 0), height: px(rowSize()) }}
|
|
1442
|
+
>
|
|
1443
|
+
{cellContent()}
|
|
1444
|
+
</div>
|
|
1445
|
+
</Show2> : cellContent;
|
|
1446
|
+
let spanElement;
|
|
1447
|
+
if (spanMode) {
|
|
1448
|
+
createRenderEffect(spanDraw, (draw) => {
|
|
1449
|
+
if (spanElement) {
|
|
1450
|
+
writeSpanAttributes(spanElement, draw);
|
|
1451
|
+
}
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
const bindSpanAttributes = (element) => {
|
|
1455
|
+
markClickTarget(element);
|
|
1456
|
+
spanElement = element;
|
|
1457
|
+
writeSpanAttributes(element, untrack3(spanDraw));
|
|
1458
|
+
};
|
|
1459
|
+
return <div
|
|
1460
|
+
role="gridcell"
|
|
1461
|
+
aria-colindex={colIndex() + 2}
|
|
1462
|
+
aria-selected={isSelected() ? "true" : "false"}
|
|
1463
|
+
aria-readonly={readOnlyCell() ? "true" : void 0}
|
|
1464
|
+
aria-invalid={invalidMessage() !== null ? "true" : void 0}
|
|
1465
|
+
aria-description={describeCell(tooltipText(), isActive())}
|
|
1466
|
+
id={isActive() ? props.activeCellDomId : void 0}
|
|
1467
|
+
aria-owns={isEditing() ? props.cellEditorDomId : void 0}
|
|
1468
|
+
data-ssg-col-key={column().key}
|
|
1469
|
+
data-autoheight-cell={isAutoHeightCell() ? "" : void 0}
|
|
1470
|
+
data-ssg-tooltip={tooltipText() ?? void 0}
|
|
1471
|
+
data-ssg-tooltip-overflow={markOverflowTooltip() ? "" : void 0}
|
|
1472
|
+
class={joinClasses(
|
|
1473
|
+
"ssg-body-cell",
|
|
1474
|
+
treeRow() !== void 0 && column().key === props.treeColumnKey && "ssg-tree-cell",
|
|
1475
|
+
rowSlot().className,
|
|
1476
|
+
conditionalCell().className,
|
|
1477
|
+
cellEnv().bodyCellSlot?.className,
|
|
1478
|
+
column().align === "center" && "ssg-body-cell--align-center",
|
|
1479
|
+
column().align === "right" && "ssg-body-cell--align-right",
|
|
1480
|
+
dataBar() !== null && "ssg-body-cell--cf-bar",
|
|
1481
|
+
scaleBackground() !== null && "ssg-body-cell--cf-scale",
|
|
1482
|
+
formatRules()?.chips !== void 0 && size() < CHIP_COMPACT_MAX_WIDTH && "ssg-body-cell--chip-compact",
|
|
1483
|
+
isAutoHeightCell() && "ssg-body-cell--autoheight",
|
|
1484
|
+
alignTop() && "ssg-body-cell--valign-top",
|
|
1485
|
+
readOnlyCell() && !isSelected() && "ssg-body-cell--readonly",
|
|
1486
|
+
// 追加(1.9.0 の点検 案 A「今の見た目 + 目印のクラス」): 子を持つ行の集計のセル(公開の契約)。
|
|
1487
|
+
treeAggregates() !== void 0 && "ssg-body-cell--tree-aggregate",
|
|
1488
|
+
invalidMessage() !== null && "ssg-body-cell--invalid",
|
|
1489
|
+
cellNote() !== null && "ssg-body-cell--has-note",
|
|
1490
|
+
unsavedText() !== null && "ssg-body-cell--unsaved",
|
|
1491
|
+
originalText() !== null && "ssg-body-cell--with-original",
|
|
1492
|
+
// 変更(1.16.0): 結合のセルは行のホバーの色を塗りません(ほかの行にもかかるため)。
|
|
1493
|
+
isHovered() && !spanned() && "ssg-body-cell--row-hovered",
|
|
1494
|
+
spanned() && "ssg-body-cell--spanned"
|
|
1495
|
+
)}
|
|
1496
|
+
onPointerDown={(event) => {
|
|
1497
|
+
if (isRemoved) {
|
|
1498
|
+
return;
|
|
1499
|
+
}
|
|
1500
|
+
if (event.target instanceof Element && event.target.closest(".ssg-detail-toggle, .ssg-tree-toggle")) {
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
props.onCellPointerDown(cell(), event);
|
|
1504
|
+
}}
|
|
1505
|
+
onPointerEnter={isRemoved ? IGNORE_POINTER : (event) => props.onCellPointerEnter(cell(), event)}
|
|
1506
|
+
onClick={isRemoved ? IGNORE_POINTER : (event) => props.onCellClick(cell(), event)}
|
|
1507
|
+
onDblClick={isRemoved ? IGNORE_POINTER : (event) => props.onCellDoubleClick(cell(), event)}
|
|
1508
|
+
ref={spanMode ? bindSpanAttributes : markClickTarget}
|
|
1509
|
+
style={{
|
|
1510
|
+
...cellEnv().bodyCellSlot?.style,
|
|
1511
|
+
...scaleBackground() !== null ? { "background-color": scaleBackground() } : null,
|
|
1512
|
+
...rowSlot().style,
|
|
1513
|
+
...conditionalCell().style,
|
|
1514
|
+
left: px(cellEnv().leadingWidth + entry().paneLocalStart),
|
|
1515
|
+
width: px(size()),
|
|
1516
|
+
"min-width": px(size()),
|
|
1517
|
+
height: px(spanDraw()?.height ?? rowSize()),
|
|
1518
|
+
"word-break": column().wordBreak,
|
|
1519
|
+
"line-break": column().lineBreak,
|
|
1520
|
+
"z-index": isActive() ? 3 : 1
|
|
1521
|
+
}}
|
|
1522
|
+
>
|
|
1523
|
+
{shownContent()}
|
|
1431
1524
|
{trailingMark}
|
|
1432
1525
|
</div>;
|
|
1433
|
-
|
|
1526
|
+
}}
|
|
1434
1527
|
</For2>;
|
|
1528
|
+
};
|
|
1435
1529
|
const switchedCells = createMemo5(() => {
|
|
1436
1530
|
trackingOn();
|
|
1437
1531
|
originalOn();
|
|
1438
1532
|
treeKey();
|
|
1533
|
+
spanOn();
|
|
1439
1534
|
return untrack3(cells);
|
|
1440
1535
|
});
|
|
1441
1536
|
return <div
|
|
@@ -1445,7 +1540,7 @@ ${decoration}`;
|
|
|
1445
1540
|
data-pane={props.pane}
|
|
1446
1541
|
data-row-index={rowIndex()}
|
|
1447
1542
|
role="row"
|
|
1448
|
-
aria-rowindex={rowIndex() + 2 +
|
|
1543
|
+
aria-rowindex={rowIndex() + 2 + rowAriaOffset()}
|
|
1449
1544
|
aria-selected={props.enableRowSelection && !isEntry && !isRemoved ? isRowChecked() ? "true" : "false" : void 0}
|
|
1450
1545
|
data-row-key={String(rowKey())}
|
|
1451
1546
|
data-ssg-new-row={newRowState?.()}
|
|
@@ -1467,16 +1562,19 @@ ${decoration}`;
|
|
|
1467
1562
|
isEntry && "ssg-body-row--new",
|
|
1468
1563
|
// 追加(1.13.0 / 差分の表示): 削除の行と、変更を回って着いた削除の行。
|
|
1469
1564
|
isRemoved && "ssg-body-row--removed",
|
|
1470
|
-
isRemoved && props.changeNavRowKey !== null && props.changeNavRowKey !== void 0 && props.changeNavRowKey === rowKey() && "ssg-body-row--change-target"
|
|
1565
|
+
isRemoved && props.changeNavRowKey !== null && props.changeNavRowKey !== void 0 && props.changeNavRowKey === rowKey() && "ssg-body-row--change-target",
|
|
1566
|
+
// 追加(1.16.0 の別視点のレビュー): 縦の結合を描く行(内部のクラス。行の枠は押せず、塗りはセルで)。
|
|
1567
|
+
spanHost() && "ssg-body-row--span-host"
|
|
1471
1568
|
)}
|
|
1472
1569
|
style={{
|
|
1473
1570
|
...props.slots.bodyRow?.style,
|
|
1474
1571
|
...rowSlot().style,
|
|
1475
1572
|
height: px(rowSize()),
|
|
1476
|
-
|
|
1573
|
+
// 変更(1.16.0): 縦の結合を描く行は top で置き(中身の sticky を効かせる)、塗りの閉じ込めを外して下の行に重ねます。
|
|
1574
|
+
...spanHost() ? { top: px(item().start), transform: "none", contain: "layout style", "z-index": 1 } : { transform: `translateY(${item().start}px)` }
|
|
1477
1575
|
}}
|
|
1478
1576
|
>
|
|
1479
|
-
<Show2 when={props.ownsRowHeader}>
|
|
1577
|
+
<Show2 when={props.ownsRowHeader && !isGhost}>
|
|
1480
1578
|
<div
|
|
1481
1579
|
role="rowheader"
|
|
1482
1580
|
aria-colindex={1}
|
|
@@ -1539,10 +1637,93 @@ ${decoration}`;
|
|
|
1539
1637
|
</For2>;
|
|
1540
1638
|
}
|
|
1541
1639
|
|
|
1640
|
+
// src/view/GridBodySkeletonRow.tsx
|
|
1641
|
+
import { For as For3, Show as Show3 } from "solid-js";
|
|
1642
|
+
var SKELETON_BAR_WIDTHS = ["62%", "46%", "78%", "54%"];
|
|
1643
|
+
function GridBodySkeletonRow(props) {
|
|
1644
|
+
return <div
|
|
1645
|
+
data-pane={props.pane}
|
|
1646
|
+
data-row-index={props.rowIndex}
|
|
1647
|
+
data-skeleton-row=""
|
|
1648
|
+
role={props.placeholder ? void 0 : "row"}
|
|
1649
|
+
aria-rowindex={props.placeholder ? void 0 : props.rowIndex + 2 + props.ariaRowOffset}
|
|
1650
|
+
aria-busy={props.placeholder ? void 0 : "true"}
|
|
1651
|
+
aria-hidden={props.placeholder ? "true" : void 0}
|
|
1652
|
+
class={["ssg-body-row", { "ssg-body-row--placeholder": props.placeholder === true }, props.slots.bodyRow?.className]}
|
|
1653
|
+
style={{
|
|
1654
|
+
...props.slots.bodyRow?.style,
|
|
1655
|
+
height: px(props.rowHeight),
|
|
1656
|
+
transform: `translateY(${props.top}px)`
|
|
1657
|
+
}}
|
|
1658
|
+
>
|
|
1659
|
+
<Show3 when={props.ownsRowHeader}>
|
|
1660
|
+
<div
|
|
1661
|
+
role={props.placeholder ? void 0 : "rowheader"}
|
|
1662
|
+
aria-colindex={props.placeholder ? void 0 : 1}
|
|
1663
|
+
onPointerDown={(event) => props.onRowHeaderPointerDown(props.rowIndex, event)}
|
|
1664
|
+
onPointerEnter={(event) => props.onRowHeaderPointerEnter(props.rowIndex, event)}
|
|
1665
|
+
onPointerLeave={() => props.onRowHeaderPointerLeave(props.rowIndex)}
|
|
1666
|
+
class={[
|
|
1667
|
+
"ssg-header-cell",
|
|
1668
|
+
"ssg-row-header-cell",
|
|
1669
|
+
"ssg-skeleton-rowheader",
|
|
1670
|
+
{
|
|
1671
|
+
"ssg-row-header-cell--checkbox": props.showRowCheckbox,
|
|
1672
|
+
"ssg-header-cell--hovered": props.isRowHovered
|
|
1673
|
+
},
|
|
1674
|
+
props.slots.rowHeaderCell?.className
|
|
1675
|
+
]}
|
|
1676
|
+
style={{
|
|
1677
|
+
...props.slots.rowHeaderCell?.style,
|
|
1678
|
+
width: px(props.rowHeaderWidth),
|
|
1679
|
+
"min-width": px(props.rowHeaderWidth),
|
|
1680
|
+
height: px(props.rowHeight)
|
|
1681
|
+
}}
|
|
1682
|
+
>
|
|
1683
|
+
<Show3 when={!props.placeholder}>
|
|
1684
|
+
<Show3 when={props.showRowCheckbox} fallback={props.rowIndex + (props.rowNumberOffset ?? 0) + 1}>
|
|
1685
|
+
<RowSelectionCheckbox slot={props.slots.checkbox} state="unchecked" disabled />
|
|
1686
|
+
</Show3>
|
|
1687
|
+
</Show3>
|
|
1688
|
+
</div>
|
|
1689
|
+
</Show3>
|
|
1690
|
+
<For3 each={props.entries} keyed={(entry) => entry.logicalIndex}>
|
|
1691
|
+
{(entry) => {
|
|
1692
|
+
const cell = () => ({ row: props.rowIndex, col: entry().logicalIndex });
|
|
1693
|
+
return <div
|
|
1694
|
+
role={props.placeholder ? void 0 : "gridcell"}
|
|
1695
|
+
aria-colindex={props.placeholder ? void 0 : entry().logicalIndex + 2}
|
|
1696
|
+
class={[
|
|
1697
|
+
"ssg-body-cell",
|
|
1698
|
+
{ "ssg-body-cell--row-hovered": props.isRowHovered },
|
|
1699
|
+
props.slots.bodyCell?.className
|
|
1700
|
+
]}
|
|
1701
|
+
onPointerDown={(event) => props.onCellPointerDown(cell(), event)}
|
|
1702
|
+
onPointerEnter={(event) => props.onCellPointerEnter(cell(), event)}
|
|
1703
|
+
style={{
|
|
1704
|
+
...props.slots.bodyCell?.style,
|
|
1705
|
+
left: px(props.leadingWidth + entry().paneLocalStart),
|
|
1706
|
+
width: px(entry().paneLocalSize),
|
|
1707
|
+
"min-width": px(entry().paneLocalSize),
|
|
1708
|
+
height: px(props.rowHeight),
|
|
1709
|
+
"z-index": 1
|
|
1710
|
+
}}
|
|
1711
|
+
>
|
|
1712
|
+
<div
|
|
1713
|
+
aria-hidden="true"
|
|
1714
|
+
class="ssg-skeleton-bar"
|
|
1715
|
+
style={{ width: SKELETON_BAR_WIDTHS[entry().logicalIndex % SKELETON_BAR_WIDTHS.length] }}
|
|
1716
|
+
/>
|
|
1717
|
+
</div>;
|
|
1718
|
+
}}
|
|
1719
|
+
</For3>
|
|
1720
|
+
</div>;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1542
1723
|
// src/view/Overlay.tsx
|
|
1543
|
-
import { Show as
|
|
1724
|
+
import { Show as Show4 } from "solid-js";
|
|
1544
1725
|
function Overlay(props) {
|
|
1545
|
-
return <
|
|
1726
|
+
return <Show4 when={props.rect}>
|
|
1546
1727
|
{(rect) => <div
|
|
1547
1728
|
class={[props.class, props.slot?.className]}
|
|
1548
1729
|
style={{
|
|
@@ -1554,11 +1735,11 @@ function Overlay(props) {
|
|
|
1554
1735
|
height: px(rect().height)
|
|
1555
1736
|
}}
|
|
1556
1737
|
/>}
|
|
1557
|
-
</
|
|
1738
|
+
</Show4>;
|
|
1558
1739
|
}
|
|
1559
1740
|
|
|
1560
1741
|
// src/view/GridDetailLayer.tsx
|
|
1561
|
-
import { For as
|
|
1742
|
+
import { For as For4, Show as Show5, createMemo as createMemo6, onCleanup as onCleanup2, untrack as untrack4 } from "solid-js";
|
|
1562
1743
|
import { notifyDetailCardFocusLost } from "@ishibashi0112/spreadsheet-grid-core/internal/controllers/detailRowController";
|
|
1563
1744
|
var stopPropagation = (event) => {
|
|
1564
1745
|
event.stopPropagation();
|
|
@@ -1568,11 +1749,11 @@ var mergeSlotStyles = (...styles) => {
|
|
|
1568
1749
|
return present.length === 0 ? void 0 : Object.assign({}, ...present);
|
|
1569
1750
|
};
|
|
1570
1751
|
function GridDetailLayer(props) {
|
|
1571
|
-
return <
|
|
1752
|
+
return <For4 each={props.entries} keyed={(entry) => entry.rowKey}>
|
|
1572
1753
|
{(entry) => {
|
|
1573
1754
|
const index = createMemo6(() => entry().virtualRow.index);
|
|
1574
1755
|
const detailSize = () => entry().virtualRow.detailSize ?? 0;
|
|
1575
|
-
return <
|
|
1756
|
+
return <Show5 when={detailSize() > 0}>
|
|
1576
1757
|
<div
|
|
1577
1758
|
class={["ssg-detail-band", props.slots.detailBand?.className]}
|
|
1578
1759
|
role={props.mode === "center" ? "row" : void 0}
|
|
@@ -1587,13 +1768,13 @@ function GridDetailLayer(props) {
|
|
|
1587
1768
|
height: px(detailSize())
|
|
1588
1769
|
}}
|
|
1589
1770
|
>
|
|
1590
|
-
<
|
|
1771
|
+
<Show5 when={props.mode === "center"}>
|
|
1591
1772
|
<DetailCard entry={entry} index={index} layer={props} />
|
|
1592
|
-
</
|
|
1773
|
+
</Show5>
|
|
1593
1774
|
</div>
|
|
1594
|
-
</
|
|
1775
|
+
</Show5>;
|
|
1595
1776
|
}}
|
|
1596
|
-
</
|
|
1777
|
+
</For4>;
|
|
1597
1778
|
}
|
|
1598
1779
|
function DetailCard(props) {
|
|
1599
1780
|
const layer = props.layer;
|
|
@@ -1605,8 +1786,9 @@ function DetailCard(props) {
|
|
|
1605
1786
|
return row();
|
|
1606
1787
|
},
|
|
1607
1788
|
rowKey,
|
|
1789
|
+
// 変更(1.15.0 / ページ送り): 通し番号(props.index はページの中の番号)。
|
|
1608
1790
|
get rowIndex() {
|
|
1609
|
-
return props.index();
|
|
1791
|
+
return props.index() + (layer.rowModel.pageStart ?? 0);
|
|
1610
1792
|
},
|
|
1611
1793
|
get sourceRowIndex() {
|
|
1612
1794
|
return sourceRowIndex();
|
|
@@ -1639,7 +1821,7 @@ function DetailCard(props) {
|
|
|
1639
1821
|
onDragStart={stopPropagation}
|
|
1640
1822
|
onDblClick={stopPropagation}
|
|
1641
1823
|
>
|
|
1642
|
-
<
|
|
1824
|
+
<Show5 when={row() !== void 0}>{layer.renderCard?.(ctx)}</Show5>
|
|
1643
1825
|
</div>
|
|
1644
1826
|
</div>;
|
|
1645
1827
|
}
|
|
@@ -1691,7 +1873,7 @@ function CheckboxCell(props) {
|
|
|
1691
1873
|
}
|
|
1692
1874
|
|
|
1693
1875
|
// src/editors/CellEditorLayer.tsx
|
|
1694
|
-
import { Show as
|
|
1876
|
+
import { Show as Show9, createMemo as createMemo7, untrack as untrack11 } from "solid-js";
|
|
1695
1877
|
import { toDateInputValue } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorValues";
|
|
1696
1878
|
import { resolveTypedStartText } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorStart";
|
|
1697
1879
|
import { formatLocaleText as formatLocaleText4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
@@ -1700,7 +1882,7 @@ import { isDateTimeEditor } from "@ishibashi0112/spreadsheet-grid-core/internal/
|
|
|
1700
1882
|
import { isMultiSelectEditor } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/multiSelect";
|
|
1701
1883
|
|
|
1702
1884
|
// src/editors/TextCellEditor.tsx
|
|
1703
|
-
import { Show as
|
|
1885
|
+
import { Show as Show7, createRenderEffect as createRenderEffect3, createSignal as createSignal4, onCleanup as onCleanup3, onSettled as onSettled3, untrack as untrack6 } from "solid-js";
|
|
1704
1886
|
import { handleEditorKeyDown } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/editorKeys";
|
|
1705
1887
|
import {
|
|
1706
1888
|
fitMultilineEditor,
|
|
@@ -1727,16 +1909,16 @@ function createTopAlignedInput(input, alignTop, cellHeight) {
|
|
|
1727
1909
|
}
|
|
1728
1910
|
|
|
1729
1911
|
// src/editors/CellEditorErrorBubble.tsx
|
|
1730
|
-
import { Show as
|
|
1912
|
+
import { Show as Show6, createSignal as createSignal3, onSettled as onSettled2 } from "solid-js";
|
|
1731
1913
|
import {
|
|
1732
1914
|
DEFAULT_ERROR_BUBBLE_PLACEMENT,
|
|
1733
1915
|
ERROR_BUBBLE_ABOVE_CLASS,
|
|
1734
1916
|
placeErrorBubble
|
|
1735
1917
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/utils/errorBubblePlacement";
|
|
1736
1918
|
function CellEditorError(props) {
|
|
1737
|
-
return <
|
|
1919
|
+
return <Show6 when={props.message !== null ? { message: props.message } : null} keyed>
|
|
1738
1920
|
{(state) => <CellEditorErrorBubble message={state.message} />}
|
|
1739
|
-
</
|
|
1921
|
+
</Show6>;
|
|
1740
1922
|
}
|
|
1741
1923
|
function CellEditorErrorBubble(props) {
|
|
1742
1924
|
let element;
|
|
@@ -1892,9 +2074,9 @@ function TextCellEditor(props) {
|
|
|
1892
2074
|
<CellEditorError message={error()} />
|
|
1893
2075
|
</div>;
|
|
1894
2076
|
};
|
|
1895
|
-
return <
|
|
2077
|
+
return <Show7 when={props.multiline ?? false} fallback={renderInput()}>
|
|
1896
2078
|
{renderTextarea()}
|
|
1897
|
-
</
|
|
2079
|
+
</Show7>;
|
|
1898
2080
|
}
|
|
1899
2081
|
|
|
1900
2082
|
// src/editors/NumberCellEditor.tsx
|
|
@@ -1972,8 +2154,8 @@ function NumberCellEditor(props) {
|
|
|
1972
2154
|
|
|
1973
2155
|
// src/editors/SelectCellEditor.tsx
|
|
1974
2156
|
import {
|
|
1975
|
-
For as
|
|
1976
|
-
Show as
|
|
2157
|
+
For as For5,
|
|
2158
|
+
Show as Show8,
|
|
1977
2159
|
createEffect as createEffect2,
|
|
1978
2160
|
createRenderEffect as createRenderEffect4,
|
|
1979
2161
|
createSignal as createSignal6,
|
|
@@ -2187,7 +2369,7 @@ function SelectCellEditor(props) {
|
|
|
2187
2369
|
style={props.align ? { "text-align": props.align } : void 0}
|
|
2188
2370
|
/>
|
|
2189
2371
|
<CellEditorError message={error()} />
|
|
2190
|
-
<
|
|
2372
|
+
<Show8 when={mount()}>
|
|
2191
2373
|
{(container) => <Portal mount={container()}>
|
|
2192
2374
|
<div
|
|
2193
2375
|
ref={setList}
|
|
@@ -2205,7 +2387,7 @@ function SelectCellEditor(props) {
|
|
|
2205
2387
|
}}
|
|
2206
2388
|
onPointerDown={(event) => event.preventDefault()}
|
|
2207
2389
|
>
|
|
2208
|
-
<
|
|
2390
|
+
<Show8
|
|
2209
2391
|
when={props.options.length > 0}
|
|
2210
2392
|
fallback={<div class="ssg-select-editor-empty">{texts().noOptions}</div>}
|
|
2211
2393
|
>
|
|
@@ -2213,7 +2395,7 @@ function SelectCellEditor(props) {
|
|
|
2213
2395
|
/* 候補の要素は位置で使い回します(行で決まる候補の関数が新しい配列を返しても作り直さない。React 版の
|
|
2214
2396
|
key={`${value}-${index}`} に近い) */
|
|
2215
2397
|
}
|
|
2216
|
-
<
|
|
2398
|
+
<For5 each={props.options} keyed={false}>
|
|
2217
2399
|
{(option, index) => <div
|
|
2218
2400
|
id={`${listId}-${index}`}
|
|
2219
2401
|
role="option"
|
|
@@ -2232,11 +2414,11 @@ function SelectCellEditor(props) {
|
|
|
2232
2414
|
>
|
|
2233
2415
|
{option().label}
|
|
2234
2416
|
</div>}
|
|
2235
|
-
</
|
|
2236
|
-
</
|
|
2417
|
+
</For5>
|
|
2418
|
+
</Show8>
|
|
2237
2419
|
</div>
|
|
2238
2420
|
</Portal>}
|
|
2239
|
-
</
|
|
2421
|
+
</Show8>
|
|
2240
2422
|
</>;
|
|
2241
2423
|
createPortalTokens(list, () => props.themeClassName, placement2);
|
|
2242
2424
|
createRenderEffect4(
|
|
@@ -2448,13 +2630,13 @@ function CellEditorLayer(props) {
|
|
|
2448
2630
|
commit: (value, direction) => props.onCommit(value, direction) ?? { status: "noop" },
|
|
2449
2631
|
cancel: () => props.onCancel()
|
|
2450
2632
|
};
|
|
2451
|
-
return <
|
|
2633
|
+
return <Show9 when={session() !== null}>
|
|
2452
2634
|
<CustomCellEditor
|
|
2453
2635
|
render={render}
|
|
2454
2636
|
context={context}
|
|
2455
2637
|
onRegisterLateCommit={(receiver) => props.onRegisterLateCommit?.(receiver) ?? NOOP2}
|
|
2456
2638
|
/>
|
|
2457
|
-
</
|
|
2639
|
+
</Show9>;
|
|
2458
2640
|
};
|
|
2459
2641
|
const renderEditor = (type, sessionId) => {
|
|
2460
2642
|
const common = {
|
|
@@ -2478,7 +2660,7 @@ function CellEditorLayer(props) {
|
|
|
2478
2660
|
get onCommitToSelection() {
|
|
2479
2661
|
return props.onCommitToSelection;
|
|
2480
2662
|
},
|
|
2481
|
-
onRegisterFlush: (
|
|
2663
|
+
onRegisterFlush: (flush2) => props.onRegisterFlush?.(flush2)
|
|
2482
2664
|
};
|
|
2483
2665
|
const initialValue = untrack11(props.initialValue);
|
|
2484
2666
|
if (type === "select" || type === "custom") {
|
|
@@ -2601,7 +2783,7 @@ function CellEditorLayer(props) {
|
|
|
2601
2783
|
}
|
|
2602
2784
|
}
|
|
2603
2785
|
};
|
|
2604
|
-
return <
|
|
2786
|
+
return <Show9 when={props.rect !== null ? props.sessionId : null} keyed>
|
|
2605
2787
|
{(sessionId) => <div
|
|
2606
2788
|
class={["ssg-cell-editor", props.leadingInset && "ssg-cell-editor--tree-inset", props.slots.cellEditor?.className]}
|
|
2607
2789
|
role={props.session ? "group" : void 0}
|
|
@@ -2616,15 +2798,15 @@ function CellEditorLayer(props) {
|
|
|
2616
2798
|
height: px(props.rect?.height ?? 0)
|
|
2617
2799
|
}}
|
|
2618
2800
|
>
|
|
2619
|
-
<
|
|
2801
|
+
<Show9 when={kind()} keyed>
|
|
2620
2802
|
{(type) => renderEditor(type, sessionId)}
|
|
2621
|
-
</
|
|
2803
|
+
</Show9>
|
|
2622
2804
|
</div>}
|
|
2623
|
-
</
|
|
2805
|
+
</Show9>;
|
|
2624
2806
|
}
|
|
2625
2807
|
|
|
2626
2808
|
// src/view/DefaultGridTopBar.tsx
|
|
2627
|
-
import { Show as
|
|
2809
|
+
import { Show as Show10, createMemo as createMemo8, createRenderEffect as createRenderEffect5, createSignal as createSignal8, createUniqueId as createUniqueId2, untrack as untrack12 } from "solid-js";
|
|
2628
2810
|
var DefaultFilterIcon = () => <svg
|
|
2629
2811
|
width="14"
|
|
2630
2812
|
height="14"
|
|
@@ -2674,13 +2856,20 @@ function DefaultGridTopBar(props) {
|
|
|
2674
2856
|
});
|
|
2675
2857
|
return <div class={["ssg-bar--top", props.slot?.className]} style={props.slot?.style}>
|
|
2676
2858
|
<div class="ssg-bar-container">
|
|
2677
|
-
<
|
|
2859
|
+
<Show10 when={props.showSummary}>
|
|
2678
2860
|
<div class="ssg-bar-group ssg-bar-leading">
|
|
2679
|
-
<
|
|
2680
|
-
<span
|
|
2861
|
+
<Show10 when={props.showCounts}>
|
|
2862
|
+
<span
|
|
2863
|
+
class={[
|
|
2864
|
+
"ssg-bar-chip ssg-bar-chip--emphasis",
|
|
2865
|
+
{ "ssg-bar-chip--loading": props.loadingText != null }
|
|
2866
|
+
]}
|
|
2867
|
+
>
|
|
2868
|
+
{props.loadingText ?? props.derivedSummary.rowSummaryText}
|
|
2869
|
+
</span>
|
|
2681
2870
|
<span class="ssg-bar-chip ssg-bar-chip--emphasis">{props.derivedSummary.columnSummaryText}</span>
|
|
2682
|
-
</
|
|
2683
|
-
<
|
|
2871
|
+
</Show10>
|
|
2872
|
+
<Show10
|
|
2684
2873
|
when={props.onFilterSummaryClick}
|
|
2685
2874
|
fallback={<span class="ssg-bar-chip ssg-bar-chip--emphasis">{props.derivedSummary.filterSummaryText}</span>}
|
|
2686
2875
|
>
|
|
@@ -2700,22 +2889,22 @@ function DefaultGridTopBar(props) {
|
|
|
2700
2889
|
<span id={`${filterSummaryId}-text`}>{props.derivedSummary.filterSummaryText}</span>
|
|
2701
2890
|
</button>
|
|
2702
2891
|
)}
|
|
2703
|
-
</
|
|
2892
|
+
</Show10>
|
|
2704
2893
|
<span class="ssg-bar-chip ssg-bar-chip--emphasis">{props.derivedSummary.sortSummaryText}</span>
|
|
2705
|
-
<
|
|
2894
|
+
<Show10 when={props.onFilterSummaryClick}>
|
|
2706
2895
|
<span id={`${filterSummaryId}-action`} hidden>
|
|
2707
2896
|
{texts().toggleFilterPanel}
|
|
2708
2897
|
</span>
|
|
2709
|
-
</
|
|
2898
|
+
</Show10>
|
|
2710
2899
|
</div>
|
|
2711
|
-
</
|
|
2712
|
-
<
|
|
2900
|
+
</Show10>
|
|
2901
|
+
<Show10 when={props.showFilter}>
|
|
2713
2902
|
<div class="ssg-bar-input-group">
|
|
2714
|
-
<
|
|
2903
|
+
<Show10 when={filterIcon()}>
|
|
2715
2904
|
{(icon) => <span class="ssg-bar-input-icon" aria-hidden="true">
|
|
2716
2905
|
{icon()}
|
|
2717
2906
|
</span>}
|
|
2718
|
-
</
|
|
2907
|
+
</Show10>
|
|
2719
2908
|
<input
|
|
2720
2909
|
ref={setInput}
|
|
2721
2910
|
type="text"
|
|
@@ -2725,7 +2914,7 @@ function DefaultGridTopBar(props) {
|
|
|
2725
2914
|
aria-label={placeholder() || texts().globalFilterLabel}
|
|
2726
2915
|
class="ssg-bar-input"
|
|
2727
2916
|
/>
|
|
2728
|
-
<
|
|
2917
|
+
<Show10 when={hasFilterText()}>
|
|
2729
2918
|
<button
|
|
2730
2919
|
type="button"
|
|
2731
2920
|
onClick={() => props.setGlobalFilterText("")}
|
|
@@ -2735,15 +2924,15 @@ function DefaultGridTopBar(props) {
|
|
|
2735
2924
|
>
|
|
2736
2925
|
<ClearIcon />
|
|
2737
2926
|
</button>
|
|
2738
|
-
</
|
|
2927
|
+
</Show10>
|
|
2739
2928
|
</div>
|
|
2740
|
-
</
|
|
2929
|
+
</Show10>
|
|
2741
2930
|
</div>
|
|
2742
2931
|
</div>;
|
|
2743
2932
|
}
|
|
2744
2933
|
|
|
2745
2934
|
// src/view/DefaultGridBottomBar.tsx
|
|
2746
|
-
import { Show as
|
|
2935
|
+
import { Show as Show11 } from "solid-js";
|
|
2747
2936
|
import { formatLocaleText as formatLocaleText5 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
2748
2937
|
function DefaultGridBottomBar(props) {
|
|
2749
2938
|
const texts = useGridLocaleText();
|
|
@@ -2753,22 +2942,33 @@ function DefaultGridBottomBar(props) {
|
|
|
2753
2942
|
};
|
|
2754
2943
|
const unsavedChip = () => <>
|
|
2755
2944
|
{props.diffChip}
|
|
2756
|
-
<
|
|
2945
|
+
<Show11 when={props.unsavedText}>
|
|
2757
2946
|
{(text) => <span class="ssg-bar-chip ssg-bar-chip--unsaved">{text()}</span>}
|
|
2758
|
-
</
|
|
2947
|
+
</Show11>
|
|
2759
2948
|
</>;
|
|
2760
|
-
return <div
|
|
2949
|
+
return <div
|
|
2950
|
+
class={["ssg-bar--bottom", { "ssg-bar--paged": props.paged === true }, props.slot?.className]}
|
|
2951
|
+
style={props.slot?.style}
|
|
2952
|
+
>
|
|
2761
2953
|
<div class="ssg-bar-container">
|
|
2762
|
-
<
|
|
2954
|
+
<Show11 when={props.showCounts}>
|
|
2763
2955
|
<div class="ssg-bar-group">
|
|
2764
|
-
|
|
2956
|
+
{
|
|
2957
|
+
/* 変更(1.15.0): 読み込み中は件数の所に「読み込み中」(React 版と同じ)。 */
|
|
2958
|
+
}
|
|
2959
|
+
<span class={["ssg-bar-chip", { "ssg-bar-chip--loading": props.loadingText != null }]}>
|
|
2960
|
+
{props.loadingText ?? props.derivedSummary.rowSummaryText}
|
|
2961
|
+
</span>
|
|
2765
2962
|
<span class="ssg-bar-chip">{props.derivedSummary.columnSummaryText}</span>
|
|
2766
2963
|
{unsavedChip()}
|
|
2767
2964
|
</div>
|
|
2768
2965
|
{aggregates(false)}
|
|
2769
|
-
</
|
|
2966
|
+
</Show11>
|
|
2770
2967
|
<div class="ssg-bar-group">
|
|
2771
|
-
<
|
|
2968
|
+
<Show11 when={!props.showCounts && props.loadingText != null}>
|
|
2969
|
+
<span class="ssg-bar-chip ssg-bar-chip--loading">{props.loadingText}</span>
|
|
2970
|
+
</Show11>
|
|
2971
|
+
<Show11 when={!props.showCounts}>{unsavedChip()}</Show11>
|
|
2772
2972
|
<span class="ssg-bar-chip">
|
|
2773
2973
|
{formatLocaleText5(texts().activeCell, { cell: props.derivedSummary.activeCellLabel })}
|
|
2774
2974
|
</span>
|
|
@@ -2778,13 +2978,14 @@ function DefaultGridBottomBar(props) {
|
|
|
2778
2978
|
<span class="ssg-bar-chip">{props.derivedSummary.selectionStatsText}</span>
|
|
2779
2979
|
<span class="ssg-bar-chip">{props.derivedSummary.selectedColumnsText}</span>
|
|
2780
2980
|
</div>
|
|
2781
|
-
<
|
|
2981
|
+
<Show11 when={!props.showCounts}>{aggregates(true)}</Show11>
|
|
2982
|
+
{props.pager}
|
|
2782
2983
|
</div>
|
|
2783
2984
|
</div>;
|
|
2784
2985
|
}
|
|
2785
2986
|
|
|
2786
2987
|
// src/view/CopyRangeOverlay.tsx
|
|
2787
|
-
import { Show as
|
|
2988
|
+
import { Show as Show12 } from "solid-js";
|
|
2788
2989
|
var placement = (props, rect) => ({
|
|
2789
2990
|
position: "absolute",
|
|
2790
2991
|
left: px(props.leadingWidth + rect.left),
|
|
@@ -2793,18 +2994,18 @@ var placement = (props, rect) => ({
|
|
|
2793
2994
|
height: px(rect.height)
|
|
2794
2995
|
});
|
|
2795
2996
|
function CopyRangeOverlay(props) {
|
|
2796
|
-
return <
|
|
2997
|
+
return <Show12 when={props.rect}>
|
|
2797
2998
|
{(rect) => <div
|
|
2798
2999
|
class={["ssg-copy-range-overlay", props.slot?.className]}
|
|
2799
3000
|
style={{ ...props.slot?.style, ...placement(props, rect()) }}
|
|
2800
3001
|
data-ssg-copy-range=""
|
|
2801
3002
|
/>}
|
|
2802
|
-
</
|
|
3003
|
+
</Show12>;
|
|
2803
3004
|
}
|
|
2804
3005
|
function ColumnHoverOverlay(props) {
|
|
2805
|
-
return <
|
|
3006
|
+
return <Show12 when={props.rect}>
|
|
2806
3007
|
{(rect) => <div class="ssg-col-hover-overlay" style={placement(props, rect())} data-ssg-col-hover="" />}
|
|
2807
|
-
</
|
|
3008
|
+
</Show12>;
|
|
2808
3009
|
}
|
|
2809
3010
|
|
|
2810
3011
|
// src/devWarnings.ts
|
|
@@ -2886,6 +3087,17 @@ var FEATURE_PROPS = {
|
|
|
2886
3087
|
],
|
|
2887
3088
|
// 追加(1.13.0 / 範囲の飾り)
|
|
2888
3089
|
rangeDecorations: [{ prop: "rangeDecorations", isUsed: (props) => (props.rangeDecorations?.length ?? 0) > 0 }],
|
|
3090
|
+
// 追加(1.15.0 / ページ送り)
|
|
3091
|
+
pagination: [{ prop: "pagination", isUsed: (props) => props.pagination !== void 0 && props.pagination !== false }],
|
|
3092
|
+
// 追加(1.16.0 / セルの結合): どれか 1 列でも spanRows / colSpan を書いたら(機能が無いとふつうのセルで描く)。
|
|
3093
|
+
cellSpan: [
|
|
3094
|
+
{
|
|
3095
|
+
prop: "columns[].spanRows / colSpan",
|
|
3096
|
+
isUsed: (props) => props.columns.some(
|
|
3097
|
+
(column) => column.spanRows !== void 0 && column.spanRows !== false || typeof column.colSpan === "function"
|
|
3098
|
+
)
|
|
3099
|
+
}
|
|
3100
|
+
],
|
|
2889
3101
|
// 追加(1.10.0 / Excel のキー): 切り取り以外のキーを効かせたとき(切り取りは本体なので、既定の省略では警告しない)。
|
|
2890
3102
|
excelShortcuts: [
|
|
2891
3103
|
{
|
|
@@ -3075,6 +3287,15 @@ function createShellDevWarningsInDev(args) {
|
|
|
3075
3287
|
}
|
|
3076
3288
|
}
|
|
3077
3289
|
);
|
|
3290
|
+
createChangeEffect(args.autoPageSizeWithAutoHeight, (conflict) => {
|
|
3291
|
+
if (conflict) {
|
|
3292
|
+
warnOncePerGrid(
|
|
3293
|
+
warned,
|
|
3294
|
+
"autoPageSizeAutoHeight",
|
|
3295
|
+
"[SpreadsheetGrid] pagination \u306E autoPageSize \u306F autoHeight(\u884C\u306E\u9AD8\u3055\u304C\u5909\u308F\u308B\u8868)\u3067\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002pageSize \u3067\u533A\u5207\u308A\u307E\u3059\u3002\n[SpreadsheetGrid] pagination.autoPageSize does not work with autoHeight (rows of varying height). The grid uses pageSize instead."
|
|
3296
|
+
);
|
|
3297
|
+
}
|
|
3298
|
+
});
|
|
3078
3299
|
createChangeEffect(
|
|
3079
3300
|
() => args.detailRowEnabled() && args.detailExtraCount() > 0 && !args.detailActive(),
|
|
3080
3301
|
(overflow) => {
|
|
@@ -3154,6 +3375,12 @@ function createShellDevWarningsInDev(args) {
|
|
|
3154
3375
|
warnOncePerGrid(treeDataWarned, warning.id, warning.message);
|
|
3155
3376
|
}
|
|
3156
3377
|
});
|
|
3378
|
+
const cellSpanWarned = /* @__PURE__ */ new Set();
|
|
3379
|
+
createChangeEffect(args.cellSpanWarnings, (warnings) => {
|
|
3380
|
+
for (const warning of warnings) {
|
|
3381
|
+
warnOncePerGrid(cellSpanWarned, warning.id, warning.message);
|
|
3382
|
+
}
|
|
3383
|
+
});
|
|
3157
3384
|
const multiSelectWarned = /* @__PURE__ */ new Set();
|
|
3158
3385
|
createChangeEffect(args.multiSelectWarnings, (warnings) => {
|
|
3159
3386
|
for (const warning of warnings) {
|
|
@@ -3280,7 +3507,10 @@ var SLOT_CONTEXT_KEYS = Object.keys({
|
|
|
3280
3507
|
globalFilterStatus: true,
|
|
3281
3508
|
globalFilterProgress: true,
|
|
3282
3509
|
selectionAggregates: true,
|
|
3283
|
-
unsavedChanges: true
|
|
3510
|
+
unsavedChanges: true,
|
|
3511
|
+
// 追加(1.15.0): ページ送り(効いていなければ null)と読み込み中。
|
|
3512
|
+
pagination: true,
|
|
3513
|
+
loading: true
|
|
3284
3514
|
});
|
|
3285
3515
|
var DERIVED_SUMMARY_KEYS = Object.keys({
|
|
3286
3516
|
rowSummaryText: true,
|
|
@@ -3763,7 +3993,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3763
3993
|
onWriteStateChange: engine.saveStatus.handle
|
|
3764
3994
|
}));
|
|
3765
3995
|
const refetchingRows = createMemo10(() => isServerSide() && serverSide !== void 0 && serverSide.refetching());
|
|
3766
|
-
const
|
|
3996
|
+
const loading = () => props.loading ?? false;
|
|
3997
|
+
const editLocked = () => readOnly() || refetchingRows() || loading();
|
|
3998
|
+
const editCommitLocked = () => readOnly() || refetchingRows();
|
|
3767
3999
|
const baseRowModel = createMemo10(() => {
|
|
3768
4000
|
if (!isServerSide() || !serverSide) {
|
|
3769
4001
|
return clientRowModel().rowModel;
|
|
@@ -3779,7 +4011,38 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3779
4011
|
const newRowActive = createMemo10(
|
|
3780
4012
|
() => newRowGiven() && newRowParts !== void 0 && !isServerSide() && props.onRowsChange != null && props.createRow !== void 0 && props.rowKeyGetter !== void 0 && !readOnly() && !newRowHasRowGroup()
|
|
3781
4013
|
);
|
|
3782
|
-
const
|
|
4014
|
+
const paginationParts = features.pagination;
|
|
4015
|
+
const paginationOptions = createMemo10(
|
|
4016
|
+
() => paginationParts ? paginationParts.resolvePaginationOptions(props.pagination) : null
|
|
4017
|
+
);
|
|
4018
|
+
const autoPageSizeWanted = () => paginationOptions()?.autoPageSize === true;
|
|
4019
|
+
const autoPageSizeValue = createMemo10(
|
|
4020
|
+
() => autoPageSizeWanted() && !(props.autoHeight ?? false) && paginationParts ? paginationParts.resolveAutoPageSize(viewportHeight() - headerHeight(), rowHeight()) : null
|
|
4021
|
+
);
|
|
4022
|
+
const baseRowCount = createMemo10(() => baseRowModel().getRowCount());
|
|
4023
|
+
const uiPage = createMemo10(() => ui().page);
|
|
4024
|
+
const uiPageSize = createMemo10(() => ui().pageSize);
|
|
4025
|
+
const pageWindow = createMemo10(
|
|
4026
|
+
() => engine.pagination.resolveWindow({
|
|
4027
|
+
active: paginationOptions() !== null,
|
|
4028
|
+
options: paginationOptions(),
|
|
4029
|
+
rowCount: baseRowCount(),
|
|
4030
|
+
page: uiPage(),
|
|
4031
|
+
pageSize: uiPageSize(),
|
|
4032
|
+
autoPageSize: autoPageSizeValue()
|
|
4033
|
+
})
|
|
4034
|
+
);
|
|
4035
|
+
const pageRowModel = createMemo10(() => engine.pagination.wrapRowModel(baseRowModel(), pageWindow()));
|
|
4036
|
+
const copyPageStart = () => paginationOptions() === null ? 0 : pageWindow()?.firstRow ?? 0;
|
|
4037
|
+
const loadingEmpty = createMemo10(() => loading() && baseRowCount() === 0);
|
|
4038
|
+
const loadingWithRows = createMemo10(() => loading() && baseRowCount() > 0);
|
|
4039
|
+
const newRowShown = createMemo10(() => {
|
|
4040
|
+
const window2 = pageWindow();
|
|
4041
|
+
return newRowActive() && !loadingEmpty() && (window2 === null || window2.page === window2.pageCount - 1);
|
|
4042
|
+
});
|
|
4043
|
+
const rowModel = createMemo10(() => engine.newRow.wrapRowModel(pageRowModel(), newRowShown()));
|
|
4044
|
+
const fullRowModel = createMemo10(() => pageWindow() === null ? rowModel() : baseRowModel());
|
|
4045
|
+
const pageStart = createMemo10(() => rowModel().pageStart ?? 0);
|
|
3783
4046
|
const newRowLayer = createMemo10(() => {
|
|
3784
4047
|
if (!newRowActive() || newRowParts === void 0) {
|
|
3785
4048
|
return void 0;
|
|
@@ -3802,10 +4065,22 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3802
4065
|
props.canEditCell
|
|
3803
4066
|
) : props.canEditCell;
|
|
3804
4067
|
});
|
|
3805
|
-
const
|
|
4068
|
+
const applyServerSideCellEditsAbsolute = createMemo10(
|
|
3806
4069
|
() => isServerSide() && serverSide?.canUpdateRows() ? serverSide.applyCellEdits : void 0
|
|
3807
4070
|
);
|
|
4071
|
+
const applyServerSideCellEdits = createMemo10(() => {
|
|
4072
|
+
const absolute = applyServerSideCellEditsAbsolute();
|
|
4073
|
+
const offset = pageStart();
|
|
4074
|
+
return absolute === void 0 || offset === 0 ? absolute : (edits, onSettled12) => absolute(
|
|
4075
|
+
edits.map((edit2) => ({ ...edit2, viewIndex: edit2.viewIndex + offset })),
|
|
4076
|
+
onSettled12
|
|
4077
|
+
);
|
|
4078
|
+
});
|
|
3808
4079
|
const viewRowCount = createMemo10(() => rowModel().getRowCount());
|
|
4080
|
+
const ariaBodyRowCount = createMemo10(() => {
|
|
4081
|
+
const window2 = pageWindow();
|
|
4082
|
+
return window2 === null ? viewRowCount() : window2.rowCount + (newRowActive() && !loadingEmpty() ? 1 : 0);
|
|
4083
|
+
});
|
|
3809
4084
|
const viewColCount = () => orderedColumns().length;
|
|
3810
4085
|
const order = () => orderResolution().order;
|
|
3811
4086
|
const groupTree = () => clientRowModel().groupTree;
|
|
@@ -3817,7 +4092,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3817
4092
|
if (tree) {
|
|
3818
4093
|
return tree.visibility.matchedCount;
|
|
3819
4094
|
}
|
|
3820
|
-
return clientRowModel().groupedDisplay || clientRowModel().labelDisplay || removedViewIndexes() ? order().length :
|
|
4095
|
+
return clientRowModel().groupedDisplay || clientRowModel().labelDisplay || removedViewIndexes() ? order().length : baseRowCount();
|
|
3821
4096
|
});
|
|
3822
4097
|
const handleGroupToggle = (groupKey) => dispatch(gridActions.toggleGroupCollapsed(groupKey));
|
|
3823
4098
|
const groupingFeature2 = features.grouping;
|
|
@@ -3850,18 +4125,32 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3850
4125
|
{ name: "moveActiveCellOffRemovedRow" }
|
|
3851
4126
|
);
|
|
3852
4127
|
const autoHeightSnapshot = createExternalStoreSignal(engine.autoHeightMeasurer, "autoHeightStore");
|
|
4128
|
+
const loadingPlaceholderCount = createMemo10(
|
|
4129
|
+
() => loadingEmpty() ? resolveLoadingPlaceholderRows(viewportHeight() - headerHeight(), rowHeight()) : 0
|
|
4130
|
+
);
|
|
4131
|
+
const loadingPlaceholderModel = createMemo10(() => {
|
|
4132
|
+
const count = loadingPlaceholderCount();
|
|
4133
|
+
return count > 0 ? createLoadingPlaceholderRowModel(count) : null;
|
|
4134
|
+
});
|
|
4135
|
+
const layoutRowModel = createMemo10(() => loadingPlaceholderModel() ?? rowModel());
|
|
4136
|
+
const layoutRowCount = createMemo10(() => loadingPlaceholderModel() ? loadingPlaceholderCount() : viewRowCount());
|
|
4137
|
+
const pageLabelDisplay = createMemo10(() => {
|
|
4138
|
+
const display = labelDisplay();
|
|
4139
|
+
const window2 = pageWindow();
|
|
4140
|
+
return display && window2 ? sliceLabelDisplayForPage(display, window2) : display;
|
|
4141
|
+
});
|
|
3853
4142
|
const vertical = createMemo10(
|
|
3854
4143
|
() => engine.resolveVerticalLayout({
|
|
3855
4144
|
isServerSide: isServerSide(),
|
|
3856
4145
|
autoHeight: props.autoHeight ?? false,
|
|
3857
4146
|
visibleColumns: visibleColumns(),
|
|
3858
|
-
viewRowCount:
|
|
4147
|
+
viewRowCount: layoutRowCount(),
|
|
3859
4148
|
estimateRowHeight: props.estimateRowHeight ?? rowHeight(),
|
|
3860
4149
|
rowHeight: rowHeight(),
|
|
3861
4150
|
headerHeight: headerHeight(),
|
|
3862
4151
|
viewportHeight: viewportHeight(),
|
|
3863
4152
|
scrollTop: viewScrollTop(),
|
|
3864
|
-
rowModel:
|
|
4153
|
+
rowModel: layoutRowModel(),
|
|
3865
4154
|
measuredHeights: engine.autoHeightMeasurer.measuredHeights,
|
|
3866
4155
|
autoHeightVersion: autoHeightSnapshot().version,
|
|
3867
4156
|
detailRowEnabled: detailRowEnabled(),
|
|
@@ -3869,7 +4158,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3869
4158
|
detailHeight: props.detailRow?.height ?? DEFAULT_DETAIL_ROW_HEIGHT,
|
|
3870
4159
|
detailIsExpandable: props.detailRow?.isExpandable,
|
|
3871
4160
|
detailIndexCacheRef: engine.detailIndexCache,
|
|
3872
|
-
labelDisplay:
|
|
4161
|
+
labelDisplay: pageLabelDisplay(),
|
|
3873
4162
|
labelRowHeight: labelRowHeightOption(),
|
|
3874
4163
|
maxBodyPx: viewMaxBodyPx()
|
|
3875
4164
|
})
|
|
@@ -3886,6 +4175,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3886
4175
|
detailRowEnabled,
|
|
3887
4176
|
detailExtraCount: () => vertical().detailExtras.length,
|
|
3888
4177
|
detailActive: () => vertical().detailActive,
|
|
4178
|
+
// 追加(1.15.0 / ページ送り): autoPageSize は行の高さが変わる表では使えない(pageSize で区切る)。
|
|
4179
|
+
autoPageSizeWithAutoHeight: () => autoPageSizeWanted() && (props.autoHeight ?? false),
|
|
3889
4180
|
maxBodyPx: () => viewMaxBodyPx() ?? MAX_BODY_PX,
|
|
3890
4181
|
globalFilterText,
|
|
3891
4182
|
columnFilterCount: () => Object.keys(columnFilters()).length,
|
|
@@ -3919,6 +4210,13 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3919
4210
|
rangeDecorationWarnCount: rangeDecorationResolver?.warnCount ?? Number.POSITIVE_INFINITY,
|
|
3920
4211
|
rangeDecorationWithoutRowKeysWarning: rangeDecorationResolver?.withoutRowKeysWarning,
|
|
3921
4212
|
hasRowKeyGetter: () => props.rowKeyGetter !== void 0,
|
|
4213
|
+
// 追加(1.16.0 / セルの結合): serverSide では結ばない(React 版と同じ)。
|
|
4214
|
+
cellSpanWarnings: () => engine.cellSpan.warnings({
|
|
4215
|
+
isServerSide: isServerSide(),
|
|
4216
|
+
columns: props.columns,
|
|
4217
|
+
// 追加(1.16.0 の実アプリの点検 CS3-04): 木の列に書いた結合も警告(React 版と同じ)。
|
|
4218
|
+
treeColumnKey: treeColumnKey()
|
|
4219
|
+
}),
|
|
3922
4220
|
// 追加(1.9.0 / ツリーデータ): 一緒に使えないもの・効かない理由と、木の形の問題(親のキーが rows に無い行・循環・同じキーの行)。
|
|
3923
4221
|
treeDataWarnings: () => {
|
|
3924
4222
|
const parts = treeDataParts;
|
|
@@ -3942,17 +4240,44 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3942
4240
|
return structure ? [...warnings, ...parts.describeTreeStructureProblems(structure)] : warnings;
|
|
3943
4241
|
}
|
|
3944
4242
|
});
|
|
4243
|
+
const carriedStickyLabel = createMemo10(() => {
|
|
4244
|
+
const display = labelDisplay();
|
|
4245
|
+
const window2 = pageWindow();
|
|
4246
|
+
if (!labelSticky() || !display || !window2 || !labelRowFeature2) {
|
|
4247
|
+
return null;
|
|
4248
|
+
}
|
|
4249
|
+
const index = resolveCarriedLabelIndex(display.labelViewIndexes, window2);
|
|
4250
|
+
const base = baseRowModel();
|
|
4251
|
+
const descriptor = index >= 0 ? base.getLabelRow?.(index) : void 0;
|
|
4252
|
+
if (!descriptor) {
|
|
4253
|
+
return null;
|
|
4254
|
+
}
|
|
4255
|
+
const heightOption = labelRowHeightOption();
|
|
4256
|
+
const height = typeof heightOption === "function" ? heightOption(descriptor.row) : heightOption ?? rowHeight();
|
|
4257
|
+
return {
|
|
4258
|
+
viewIndex: index - window2.firstRow,
|
|
4259
|
+
height,
|
|
4260
|
+
descriptor,
|
|
4261
|
+
rowKey: base.getRowKey(index) ?? index
|
|
4262
|
+
};
|
|
4263
|
+
});
|
|
3945
4264
|
const stickyLabelIndexes = createMemo10(() => {
|
|
3946
|
-
const indexes =
|
|
3947
|
-
|
|
4265
|
+
const indexes = pageLabelDisplay()?.labelViewIndexes;
|
|
4266
|
+
if (!labelSticky() || !labelRowFeature2 || !indexes) {
|
|
4267
|
+
return null;
|
|
4268
|
+
}
|
|
4269
|
+
return indexes.length > 0 || carriedStickyLabel() !== null ? indexes : null;
|
|
3948
4270
|
});
|
|
3949
4271
|
const stickyLabelEntry = createMemo10(() => {
|
|
3950
4272
|
const indexes = stickyLabelIndexes();
|
|
3951
4273
|
if (!indexes || !labelRowFeature2) {
|
|
3952
4274
|
return null;
|
|
3953
4275
|
}
|
|
3954
|
-
const
|
|
4276
|
+
const carriedLabel = carriedStickyLabel();
|
|
4277
|
+
const resolution = resolvePagedStickyLabel(
|
|
4278
|
+
labelRowFeature2.resolveStickyLabel,
|
|
3955
4279
|
indexes,
|
|
4280
|
+
carriedLabel,
|
|
3956
4281
|
vertical().rowMetrics,
|
|
3957
4282
|
physicalToLogicalScrollTop(viewScrollTop(), vertical().verticalScaleFactor)
|
|
3958
4283
|
);
|
|
@@ -3960,14 +4285,15 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3960
4285
|
return null;
|
|
3961
4286
|
}
|
|
3962
4287
|
const model = rowModel();
|
|
3963
|
-
const
|
|
4288
|
+
const carried = carriedLabel !== null && resolution.labelViewIndex === carriedLabel.viewIndex;
|
|
4289
|
+
const descriptor = carried ? carriedLabel.descriptor : model.getLabelRow?.(resolution.labelViewIndex);
|
|
3964
4290
|
if (!descriptor) {
|
|
3965
4291
|
return null;
|
|
3966
4292
|
}
|
|
3967
4293
|
return {
|
|
3968
4294
|
labelRow: descriptor,
|
|
3969
4295
|
rowIndex: resolution.labelViewIndex,
|
|
3970
|
-
rowKey: model.getRowKey(resolution.labelViewIndex) ?? resolution.labelViewIndex,
|
|
4296
|
+
rowKey: carried ? carriedLabel.rowKey : model.getRowKey(resolution.labelViewIndex) ?? resolution.labelViewIndex,
|
|
3971
4297
|
height: resolution.height,
|
|
3972
4298
|
pushOffset: resolution.pushOffset
|
|
3973
4299
|
};
|
|
@@ -3979,18 +4305,20 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
3979
4305
|
return void 0;
|
|
3980
4306
|
}
|
|
3981
4307
|
const rowMetrics = vertical().rowMetrics;
|
|
4308
|
+
const carriedLabel = carriedStickyLabel();
|
|
4309
|
+
const resolveAt = (top) => resolvePagedStickyLabel(feature.resolveStickyLabel, indexes, carriedLabel, rowMetrics, top);
|
|
3982
4310
|
return {
|
|
3983
4311
|
visibleAt: (logicalScrollTop) => {
|
|
3984
|
-
const resolution =
|
|
4312
|
+
const resolution = resolveAt(logicalScrollTop);
|
|
3985
4313
|
return resolution ? Math.max(resolution.height - resolution.pushOffset, 0) : 0;
|
|
3986
4314
|
},
|
|
3987
4315
|
// 上端が rowTop の行を可視域の先頭に置いたときの帯(その行が属するセクションのラベル。行がラベル行なら無し)。
|
|
3988
|
-
coveringRowAt: (rowTop) =>
|
|
4316
|
+
coveringRowAt: (rowTop) => resolveAt(rowTop)?.height ?? 0
|
|
3989
4317
|
};
|
|
3990
4318
|
});
|
|
3991
4319
|
const conditionalFormatFeature2 = features.conditionalFormat;
|
|
3992
4320
|
const multiSelectParts = features.multiSelect;
|
|
3993
|
-
const conditionalFormatStats = createMemo10(() => engine.resolveConditionalFormatStats(
|
|
4321
|
+
const conditionalFormatStats = createMemo10(() => engine.resolveConditionalFormatStats(fullRowModel(), orderedColumns()));
|
|
3994
4322
|
const totalRowCells = createMemo10(
|
|
3995
4323
|
() => totalRowEnabled() ? engine.resolveTotalRowCells({
|
|
3996
4324
|
rows: rows(),
|
|
@@ -4032,7 +4360,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4032
4360
|
if (!chipFeature) {
|
|
4033
4361
|
return void 0;
|
|
4034
4362
|
}
|
|
4035
|
-
const model =
|
|
4363
|
+
const model = fullRowModel();
|
|
4036
4364
|
const columnsNow = orderedColumns();
|
|
4037
4365
|
const keyGetter = resolvedRowKeyGetter();
|
|
4038
4366
|
const topCount = pinnedTopCount();
|
|
@@ -4080,7 +4408,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4080
4408
|
};
|
|
4081
4409
|
});
|
|
4082
4410
|
const columnAutosize = columnAutosizeFeature2?.createColumnAutosize(() => ({
|
|
4083
|
-
|
|
4411
|
+
// 変更(1.15.0 / ページ送り): 全ページの行で測ります(ページを替えても列の幅が変わらないように)。
|
|
4412
|
+
rowModel: fullRowModel(),
|
|
4084
4413
|
gridRootRef,
|
|
4085
4414
|
columnWidths: paneResolution().effectiveColumnWidths,
|
|
4086
4415
|
dispatch,
|
|
@@ -4128,8 +4457,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4128
4457
|
const autoHeightActive = createMemo10(() => vertical().autoHeightActive);
|
|
4129
4458
|
const bodyRows = createMemo10(() => {
|
|
4130
4459
|
const { virtualRows, virtualRowIndexes } = vertical();
|
|
4131
|
-
const model =
|
|
4132
|
-
const serverSideActive = isServerSide();
|
|
4460
|
+
const model = layoutRowModel();
|
|
4461
|
+
const serverSideActive = isServerSide() || loadingEmpty();
|
|
4133
4462
|
const items = [];
|
|
4134
4463
|
const entryIndex = model.newRow?.index ?? -1;
|
|
4135
4464
|
for (const virtualRow of virtualRows) {
|
|
@@ -4224,12 +4553,12 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4224
4553
|
const windowFirstRow = createMemo10(() => vertical().windowFirstRow);
|
|
4225
4554
|
const windowLastRow = createMemo10(() => vertical().windowLastRow);
|
|
4226
4555
|
createEffect4(
|
|
4227
|
-
() => [isServerSide(), windowFirstRow(), windowLastRow(), serverSideQueryKey()],
|
|
4228
|
-
([serverSideActive, firstRow, lastRow]) => {
|
|
4556
|
+
() => [isServerSide(), windowFirstRow(), windowLastRow(), pageStart(), serverSideQueryKey()],
|
|
4557
|
+
([serverSideActive, firstRow, lastRow, offset]) => {
|
|
4229
4558
|
if (!serverSideActive || !serverSide || lastRow < firstRow) {
|
|
4230
4559
|
return;
|
|
4231
4560
|
}
|
|
4232
|
-
serverSide.requestRange(firstRow, lastRow + 1);
|
|
4561
|
+
serverSide.requestRange(firstRow + offset, lastRow + 1 + offset);
|
|
4233
4562
|
},
|
|
4234
4563
|
{ name: "serverSideRequestRange" }
|
|
4235
4564
|
);
|
|
@@ -4256,16 +4585,83 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4256
4585
|
const entries = centerEntries();
|
|
4257
4586
|
return columnVirtualizer.items().map((item) => entries[item.index]).filter((entry) => Boolean(entry));
|
|
4258
4587
|
});
|
|
4588
|
+
const cellSpanParts = features.cellSpan;
|
|
4589
|
+
const [rowDragging, setRowDragging] = createSignal9(false, { name: "cellSpanRowDragging" });
|
|
4590
|
+
const cellSpanBaseIndex = createMemo10(() => {
|
|
4591
|
+
const columns2 = orderedColumns();
|
|
4592
|
+
if (cellSpanParts === void 0 || !cellSpanParts.hasCellSpanColumns(columns2)) {
|
|
4593
|
+
return INERT_CELL_SPAN_INDEX;
|
|
4594
|
+
}
|
|
4595
|
+
return engine.cellSpan.resolve({
|
|
4596
|
+
enabled: !isServerSide() && !loadingEmpty(),
|
|
4597
|
+
rowModel: rowModel(),
|
|
4598
|
+
columns: columns2,
|
|
4599
|
+
detailOpenRows: vertical().detailActive ? vertical().detailExtras : null,
|
|
4600
|
+
treeColumnKey: treeStage() ? treeColumnKey() : void 0
|
|
4601
|
+
});
|
|
4602
|
+
});
|
|
4603
|
+
const cellSpanIndex = createMemo10(() => rowDragging() ? INERT_CELL_SPAN_INDEX : cellSpanBaseIndex());
|
|
4604
|
+
connectController(engine.cellSpan, () => ({ index: cellSpanIndex(), dispatch }), "render", "cellSpan");
|
|
4605
|
+
const handleRowDraggingChange = (dragging) => {
|
|
4606
|
+
setRowDragging(dragging);
|
|
4607
|
+
if (dragging) {
|
|
4608
|
+
flush();
|
|
4609
|
+
}
|
|
4610
|
+
};
|
|
4611
|
+
const cellSpanLayoutResolver = cellSpanParts?.createCellSpanLayoutResolver();
|
|
4612
|
+
const cellSpanLayout = createMemo10(() => {
|
|
4613
|
+
const index = cellSpanIndex();
|
|
4614
|
+
if (!cellSpanLayoutResolver || !index.active) {
|
|
4615
|
+
return void 0;
|
|
4616
|
+
}
|
|
4617
|
+
const v = vertical();
|
|
4618
|
+
return cellSpanLayoutResolver({
|
|
4619
|
+
index,
|
|
4620
|
+
windowFirstRow: v.windowFirstRow,
|
|
4621
|
+
windowLastRow: v.windowLastRow,
|
|
4622
|
+
rowMetrics: v.rowMetrics,
|
|
4623
|
+
paneLayout: paneLayout(),
|
|
4624
|
+
centerRenderEntries: centerRenderEntries()
|
|
4625
|
+
});
|
|
4626
|
+
});
|
|
4627
|
+
const bodyRowsWithSpans = createMemo10(() => {
|
|
4628
|
+
const items = bodyRows();
|
|
4629
|
+
const spanLayout = cellSpanLayout();
|
|
4630
|
+
if (!spanLayout || spanLayout.ghosts.length === 0) {
|
|
4631
|
+
return items;
|
|
4632
|
+
}
|
|
4633
|
+
const top = vertical().virtualRows.find((virtualRow) => virtualRow.index === spanLayout.windowFirstRow);
|
|
4634
|
+
if (!top) {
|
|
4635
|
+
return items;
|
|
4636
|
+
}
|
|
4637
|
+
const model = layoutRowModel();
|
|
4638
|
+
const ghosts = [];
|
|
4639
|
+
for (const ghost of spanLayout.ghosts) {
|
|
4640
|
+
if (model.getRow(ghost.row) === void 0) {
|
|
4641
|
+
continue;
|
|
4642
|
+
}
|
|
4643
|
+
ghosts.push({
|
|
4644
|
+
index: ghost.row,
|
|
4645
|
+
start: top.start,
|
|
4646
|
+
size: top.size,
|
|
4647
|
+
key: `__ssg_span__:${String(model.getRowKey(ghost.row) ?? ghost.row)}`,
|
|
4648
|
+
skeleton: false,
|
|
4649
|
+
spanGhost: ghost.cols
|
|
4650
|
+
});
|
|
4651
|
+
}
|
|
4652
|
+
return ghosts.length === 0 ? items : [...ghosts, ...items];
|
|
4653
|
+
});
|
|
4259
4654
|
const activeCellRendered = createMemo10(
|
|
4260
4655
|
() => isActiveCellRendered(ui().activeCell, vertical().virtualRowIndexes, rowModel(), [
|
|
4261
4656
|
paneLayout().left.entries,
|
|
4262
4657
|
centerRenderEntries(),
|
|
4263
4658
|
paneLayout().right.entries
|
|
4264
|
-
])
|
|
4659
|
+
]) || // 追加(1.16.0): 窓より上の結合の左上・横の窓の外の結合の左の列も描いている(React 版と同じ)。
|
|
4660
|
+
ui().activeCell !== null && cellSpanLayout()?.drawsCell(ui().activeCell) === true
|
|
4265
4661
|
);
|
|
4266
4662
|
const prefersReducedMotion = createExternalStoreSignal(reducedMotionStore, "reducedMotionStore");
|
|
4267
4663
|
const resolvedMotion = () => resolveGridMotion(props.motion ?? "auto", prefersReducedMotion());
|
|
4268
|
-
const animateRowsActive = () => (props.animateRows ?? true) && resolvedMotion() === "on" && !autoHeightActive() && !isServerSide();
|
|
4664
|
+
const animateRowsActive = () => (props.animateRows ?? true) && resolvedMotion() === "on" && !autoHeightActive() && !isServerSide() && !cellSpanBaseIndex().active;
|
|
4269
4665
|
connectController(engine.rowEnter, () => ({
|
|
4270
4666
|
scrollContainerRef,
|
|
4271
4667
|
skeletonEnter: isServerSide() && resolvedMotion() === "on",
|
|
@@ -4296,12 +4692,56 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4296
4692
|
const slots = createMemo10(
|
|
4297
4693
|
() => resolveSlotMapFromSignature(slotSignature())
|
|
4298
4694
|
);
|
|
4299
|
-
const
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4695
|
+
const spanPlacementOf = (cell) => {
|
|
4696
|
+
const index = cellSpanIndex();
|
|
4697
|
+
if (!cell || !cellSpanParts || !index.active) {
|
|
4698
|
+
return null;
|
|
4699
|
+
}
|
|
4700
|
+
const v = vertical();
|
|
4701
|
+
return cellSpanParts.resolveCellSpanPlacement(index, cell, paneLayout(), v.rowMetrics, v.windowFirstRow, v.windowLastRow);
|
|
4702
|
+
};
|
|
4703
|
+
const activeCellPlacement = createMemo10(() => {
|
|
4704
|
+
const cell = ui().activeCell;
|
|
4705
|
+
const placement2 = resolveCellPlacement(cell, viewRowCount(), paneLayout(), vertical().rowMetrics);
|
|
4706
|
+
const span = placement2 ? spanPlacementOf(cell) : null;
|
|
4707
|
+
return placement2 && span ? { pane: placement2.pane, rect: { left: span.left, top: span.top, width: span.width, height: span.height } } : placement2;
|
|
4708
|
+
});
|
|
4709
|
+
const editingSpanRow = createMemo10(() => {
|
|
4710
|
+
const cell = ui().editingCell;
|
|
4711
|
+
const index = cellSpanIndex();
|
|
4712
|
+
const span = cell && index.active ? index.getSpan(cell.row, cell.col) : null;
|
|
4713
|
+
if (!span || span.top === span.bottom) {
|
|
4714
|
+
return null;
|
|
4715
|
+
}
|
|
4716
|
+
const metrics = vertical().rowMetrics;
|
|
4717
|
+
const visibleTop = untrack13(
|
|
4718
|
+
() => physicalToLogicalScrollTop(store.getViewState().scrollTop, vertical().verticalScaleFactor)
|
|
4719
|
+
);
|
|
4720
|
+
let row = Math.max(span.top, Math.min(span.bottom, metrics.rowAtContentY(visibleTop)));
|
|
4721
|
+
if (row < span.bottom && metrics.rowTop(row) < visibleTop) {
|
|
4722
|
+
row += 1;
|
|
4723
|
+
}
|
|
4724
|
+
return row;
|
|
4725
|
+
});
|
|
4726
|
+
const editingCellPlacement = createMemo10(() => {
|
|
4727
|
+
const cell = ui().editingCell;
|
|
4728
|
+
const metrics = vertical().rowMetrics;
|
|
4729
|
+
const placement2 = resolveCellPlacement(cell, viewRowCount(), paneLayout(), metrics);
|
|
4730
|
+
const span = placement2 ? spanPlacementOf(cell) : null;
|
|
4731
|
+
if (!placement2 || !cell || !span) {
|
|
4732
|
+
return placement2;
|
|
4733
|
+
}
|
|
4734
|
+
const column = orderedColumns()[cell.col];
|
|
4735
|
+
const editor = column ? resolveColumnEditor(column, rowModel().getRow(cell.row)) : void 0;
|
|
4736
|
+
const spanRow = editingSpanRow();
|
|
4737
|
+
if (spanRow === null || editor?.type === "text" && editor.multiline === true) {
|
|
4738
|
+
return { pane: placement2.pane, rect: { left: span.left, top: span.top, width: span.width, height: span.height } };
|
|
4739
|
+
}
|
|
4740
|
+
return {
|
|
4741
|
+
pane: placement2.pane,
|
|
4742
|
+
rect: { left: span.left, top: metrics.rowTop(spanRow), width: span.width, height: metrics.cellHeight(spanRow) }
|
|
4743
|
+
};
|
|
4744
|
+
});
|
|
4305
4745
|
const editorAlignTop = createMemo10(() => {
|
|
4306
4746
|
const editing = ui().editingCell;
|
|
4307
4747
|
const column = editing ? orderedColumns()[editing.col] : void 0;
|
|
@@ -4346,7 +4786,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4346
4786
|
filters: state.filters,
|
|
4347
4787
|
collapsedGroupKeys: state.collapsedGroupKeys,
|
|
4348
4788
|
viewRowCount: viewRowCount(),
|
|
4349
|
-
columns: orderedColumnKeys()
|
|
4789
|
+
columns: orderedColumnKeys(),
|
|
4790
|
+
pageStart: copyPageStart()
|
|
4350
4791
|
}) ? copied.selection : null;
|
|
4351
4792
|
});
|
|
4352
4793
|
const copiedExtents = createMemo10(() => resolveSelectionExtents(copiedSelection(), paneLayout(), viewRowCount()));
|
|
@@ -4414,10 +4855,15 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4414
4855
|
enableRowHover: enableRowHover(),
|
|
4415
4856
|
isHoverControlled: props.hoveredRowIndex !== void 0,
|
|
4416
4857
|
onHoveredRowChange: inOwnTick(props.onHoveredRowChange),
|
|
4417
|
-
setHoveredRowIndex: viewSetters.setHoveredRowIndex
|
|
4858
|
+
setHoveredRowIndex: viewSetters.setHoveredRowIndex,
|
|
4859
|
+
// 追加(1.15.0 / ページ送り): 通知する行の番号は通し番号(ホバーの行はページの中の番号)。
|
|
4860
|
+
rowOffset: pageStart()
|
|
4418
4861
|
}), "render", "hoverRowNotifier");
|
|
4419
4862
|
const applyHoveredRowChange = engine.hoverRowNotifier.applyHoveredRowChange;
|
|
4420
|
-
const resolvedHoveredRowIndex = () => !enableRowHover() ? null : props.hoveredRowIndex !== void 0 ?
|
|
4863
|
+
const resolvedHoveredRowIndex = () => !enableRowHover() ? null : props.hoveredRowIndex !== void 0 ? (
|
|
4864
|
+
// 追加(1.15.0 / ページ送り): hoveredRowIndex prop は通し番号。行はページの中の番号で比べます。
|
|
4865
|
+
props.hoveredRowIndex === null ? null : props.hoveredRowIndex - pageStart()
|
|
4866
|
+
) : view().hoveredRowIndex;
|
|
4421
4867
|
const viewportSync = createViewportSyncController();
|
|
4422
4868
|
const scaleAnchor = createScrollScaleAnchor();
|
|
4423
4869
|
connectController(
|
|
@@ -4437,6 +4883,15 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4437
4883
|
"effect",
|
|
4438
4884
|
"verticalScaleAnchor"
|
|
4439
4885
|
);
|
|
4886
|
+
const activeCellSpanned = createMemo10(() => {
|
|
4887
|
+
const index = cellSpanIndex();
|
|
4888
|
+
if (!index.active) {
|
|
4889
|
+
return void 0;
|
|
4890
|
+
}
|
|
4891
|
+
const cell = ui().activeCell;
|
|
4892
|
+
const span = cell ? index.getSpan(cell.row, cell.col) : null;
|
|
4893
|
+
return span !== null && span.bottom > span.top;
|
|
4894
|
+
});
|
|
4440
4895
|
connectController(
|
|
4441
4896
|
viewportSync,
|
|
4442
4897
|
() => ({
|
|
@@ -4452,6 +4907,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4452
4907
|
activeCellRect: activeCellPlacement()?.rect ?? null,
|
|
4453
4908
|
isRowFollowMove: engine.activeRowFollow.isFollowMove,
|
|
4454
4909
|
activeCellPinned: activeCellPlacement() !== null && activeCellPlacement()?.pane !== "center",
|
|
4910
|
+
// 追加(1.16.0 の別視点のレビュー): 縦に結合したセルは、見えている所にかかっていれば縦に動かさない(React 版と同じ)。
|
|
4911
|
+
activeCellSpanned: activeCellSpanned(),
|
|
4455
4912
|
activeCell: ui().activeCell,
|
|
4456
4913
|
verticalScaleFactor: vertical().verticalScaleFactor,
|
|
4457
4914
|
footerHeight: footerHeight(),
|
|
@@ -4489,7 +4946,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4489
4946
|
});
|
|
4490
4947
|
const rowSelectionCommands = engine.rowSelectionCommands;
|
|
4491
4948
|
connectController(rowSelectionCommands, () => ({
|
|
4492
|
-
|
|
4949
|
+
// 変更(1.15.0 / ページ送り): 区切る前の行モデルと、ページの先頭の行の通し番号(Shift の範囲はページをまたげる)。
|
|
4950
|
+
rowModel: fullRowModel(),
|
|
4951
|
+
rowOffset: pageStart(),
|
|
4493
4952
|
rowSelectionState: ui().rowSelection,
|
|
4494
4953
|
rowSelectionMode: rowSelectionMode(),
|
|
4495
4954
|
onRowSelectionChange: inOwnTick(props.onRowSelectionChange),
|
|
@@ -4577,6 +5036,10 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4577
5036
|
const entry = stickyLabelEntry();
|
|
4578
5037
|
return resolveSlotProps2(entry ? resolveLabelRowSlot(entry.labelRow) : void 0);
|
|
4579
5038
|
});
|
|
5039
|
+
const spanStickyTop = () => {
|
|
5040
|
+
const label = stickyLabelEntry();
|
|
5041
|
+
return headerHeight() + (label ? Math.max(0, label.height - label.pushOffset) : 0) - vertical().bodyLayerTranslateY;
|
|
5042
|
+
};
|
|
4580
5043
|
const labelRowExport = createMemo10(() => {
|
|
4581
5044
|
const isLabelRow = labelIsLabelRow();
|
|
4582
5045
|
const getLabel = labelGetLabel();
|
|
@@ -4657,7 +5120,10 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4657
5120
|
onGutterRowSelectDrag: rowSelectionCommands.handleGutterRowSelectDrag
|
|
4658
5121
|
}), "render", "pointer");
|
|
4659
5122
|
const history = createHistoryController();
|
|
4660
|
-
const historyRowLocator = createMemo10(() =>
|
|
5123
|
+
const historyRowLocator = createMemo10(() => {
|
|
5124
|
+
const locator = createHistoryRowLocator(fullRowModel(), treeStage());
|
|
5125
|
+
return pageWindow() === null ? locator : pageHistoryRowLocator(locator, pageStart(), engine.pagination.reveal);
|
|
5126
|
+
});
|
|
4661
5127
|
connectController(history, () => ({
|
|
4662
5128
|
rows: rows(),
|
|
4663
5129
|
selection: ui().selection,
|
|
@@ -4665,7 +5131,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4665
5131
|
onRowsChange: inOwnTick(props.onRowsChange),
|
|
4666
5132
|
dispatch,
|
|
4667
5133
|
// サーバーサイドは rows を持たず戻す先が無いので無効(React 版と同じ)。
|
|
4668
|
-
|
|
5134
|
+
// 変更(1.15.0 のレビュー): 読み込み中(loading)も止めます(差し替わる行へ戻さない。積んだ履歴は消さない)。
|
|
5135
|
+
enabled: (props.enableUndoRedo ?? true) && !readOnly() && !loading() && !isServerSide(),
|
|
4669
5136
|
limit: props.undoHistoryLimit ?? 100,
|
|
4670
5137
|
onUndoRedoStateChange: inOwnTick(props.onUndoRedoStateChange),
|
|
4671
5138
|
onAfterRestore: (activeCell) => {
|
|
@@ -4783,10 +5250,26 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4783
5250
|
getUnsavedCells: changeTracker.getUnsavedCells,
|
|
4784
5251
|
trackedColumns: changeTracker.getTrackedColumns(),
|
|
4785
5252
|
revert: changeTracker.revert,
|
|
4786
|
-
texts
|
|
5253
|
+
texts,
|
|
5254
|
+
// 追加(1.16.0 の実アプリの点検 CS1-01): 縦の結合のセルは結合のすべての行を取り消す(React 版と同じ)。
|
|
5255
|
+
getSpan: (row, col) => engine.cellSpan.current().getSpan(row, col)
|
|
4787
5256
|
});
|
|
4788
5257
|
};
|
|
4789
5258
|
const handleRowsChange = () => props.onRowsChange ? history.handleRowsChange : void 0;
|
|
5259
|
+
const spanRowsChange = () => {
|
|
5260
|
+
const write = handleRowsChange();
|
|
5261
|
+
return write && cellSpanBaseIndex().active ? (next) => {
|
|
5262
|
+
const previous = untrack13(rows);
|
|
5263
|
+
const reconciled = engine.cellSpan.reconcileWrites(previous, next, {
|
|
5264
|
+
readOnly: untrack13(readOnly),
|
|
5265
|
+
canEditCell: untrack13(canEditCell),
|
|
5266
|
+
validationTexts: untrack13(localeTexts)
|
|
5267
|
+
});
|
|
5268
|
+
if (reconciled !== previous) {
|
|
5269
|
+
write(reconciled);
|
|
5270
|
+
}
|
|
5271
|
+
} : write;
|
|
5272
|
+
};
|
|
4790
5273
|
connectController(engine.newRow, () => {
|
|
4791
5274
|
rowModel();
|
|
4792
5275
|
void ui().activeCell;
|
|
@@ -4815,6 +5298,34 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4815
5298
|
"effect",
|
|
4816
5299
|
"newRowDraftNotifier"
|
|
4817
5300
|
);
|
|
5301
|
+
const paginationActiveRow = createMemo10(() => ui().activeCell?.row);
|
|
5302
|
+
connectController(engine.pagination, () => {
|
|
5303
|
+
void uiPage();
|
|
5304
|
+
void uiPageSize();
|
|
5305
|
+
if (paginationOptions() !== null) {
|
|
5306
|
+
void paginationActiveRow();
|
|
5307
|
+
}
|
|
5308
|
+
return {
|
|
5309
|
+
window: pageWindow(),
|
|
5310
|
+
options: paginationOptions(),
|
|
5311
|
+
dispatch,
|
|
5312
|
+
getUiState: store.getState,
|
|
5313
|
+
scrollContainerRef,
|
|
5314
|
+
markApiScroll: engine.scrollSync.markApiScroll,
|
|
5315
|
+
onPageChange: inOwnTick(props.onPageChange),
|
|
5316
|
+
hasNewRow: newRowActive() && !loadingEmpty()
|
|
5317
|
+
};
|
|
5318
|
+
}, "render", "pagination");
|
|
5319
|
+
connectController(
|
|
5320
|
+
{ update: () => engine.pagination.notify() },
|
|
5321
|
+
() => {
|
|
5322
|
+
void pageWindow();
|
|
5323
|
+
void props.onPageChange;
|
|
5324
|
+
return null;
|
|
5325
|
+
},
|
|
5326
|
+
"effect",
|
|
5327
|
+
"paginationNotifier"
|
|
5328
|
+
);
|
|
4818
5329
|
const cells = createCellCommands();
|
|
4819
5330
|
const { selectEntireGrid, clearSelectedCells, tryStartEdit: tryStartEditCell } = cells;
|
|
4820
5331
|
const orderedColumnKeys = createMemo10(() => orderedColumns().map((column) => column.key).join("\0"));
|
|
@@ -4848,7 +5359,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4848
5359
|
filters: state.filters,
|
|
4849
5360
|
collapsedGroupKeys: state.collapsedGroupKeys,
|
|
4850
5361
|
viewRowCount: untrack13(viewRowCount),
|
|
4851
|
-
columns: untrack13(orderedColumnKeys)
|
|
5362
|
+
columns: untrack13(orderedColumnKeys),
|
|
5363
|
+
pageStart: untrack13(copyPageStart)
|
|
4852
5364
|
},
|
|
4853
5365
|
...cut === void 0 ? {} : { cut }
|
|
4854
5366
|
}
|
|
@@ -4863,7 +5375,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4863
5375
|
filters: state.filters,
|
|
4864
5376
|
collapsedGroupKeys: state.collapsedGroupKeys,
|
|
4865
5377
|
viewRowCount: untrack13(viewRowCount),
|
|
4866
|
-
columns: untrack13(orderedColumnKeys)
|
|
5378
|
+
columns: untrack13(orderedColumnKeys),
|
|
5379
|
+
pageStart: untrack13(copyPageStart)
|
|
4867
5380
|
}) ? copied : null;
|
|
4868
5381
|
},
|
|
4869
5382
|
onCutPasted: () => store.setViewState({ copiedRange: null }),
|
|
@@ -4879,7 +5392,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4879
5392
|
richCopy: props.copyFormat === "rich" ? features.richCopy : void 0,
|
|
4880
5393
|
getCopyColorHost: () => gridRootRef.current,
|
|
4881
5394
|
getConditionalFormatStats: features.conditionalFormat ? () => untrack13(conditionalFormatStats) : void 0,
|
|
4882
|
-
onRowsChange:
|
|
5395
|
+
onRowsChange: spanRowsChange(),
|
|
5396
|
+
// 追加(1.16.0 / セルの結合): 書式つきのコピーの rowspan / colspan。
|
|
5397
|
+
cellSpans: engine.cellSpan,
|
|
4883
5398
|
onColumnsChange: inOwnTick(props.onColumnsChange),
|
|
4884
5399
|
applyServerSideCellEdits: applyServerSideCellEdits(),
|
|
4885
5400
|
isRowExportable: props.isRowExportable,
|
|
@@ -4940,11 +5455,23 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4940
5455
|
const { viewIndexOf } = stage.display;
|
|
4941
5456
|
return (rowIndex) => viewIndexOf[allOpen.order[rowIndex] ?? -1] ?? -1;
|
|
4942
5457
|
});
|
|
5458
|
+
const findPageSize = createMemo10(() => pageWindow()?.pageSize ?? null);
|
|
5459
|
+
const findIsHiddenCell = createMemo10(() => {
|
|
5460
|
+
if (!cellSpanBaseIndex().active) {
|
|
5461
|
+
return void 0;
|
|
5462
|
+
}
|
|
5463
|
+
const model = findTreeRowModel() ?? fullRowModel();
|
|
5464
|
+
const pageSize = findPageSize();
|
|
5465
|
+
const detailKeys = vertical().detailActive ? ui().expandedDetailRowKeys : null;
|
|
5466
|
+
return (rowIndex, colIndex) => engine.cellSpan.resolveFull(model, pageSize, detailKeys).isCovered(rowIndex, colIndex);
|
|
5467
|
+
});
|
|
4943
5468
|
connectController(engine.find, () => {
|
|
4944
5469
|
const treeRowModel = findTreeRowModel();
|
|
4945
5470
|
return {
|
|
4946
5471
|
enabled: findEnabled(),
|
|
4947
|
-
|
|
5472
|
+
// 変更(1.15.0 / ページ送り): 全ページを探します(当たりの行は通し番号。ほかのページの当たりへはハンドルの selectCell がページを
|
|
5473
|
+
// 替えて移る。React 版と同じ)。
|
|
5474
|
+
rowModel: treeRowModel ?? fullRowModel(),
|
|
4948
5475
|
columns: orderedColumns(),
|
|
4949
5476
|
caseSensitive: findOptions()?.caseSensitive ?? false,
|
|
4950
5477
|
// 条件付き書式の機能が無ければチップもデータバーも描かれないので、値の文字を探す(React 版 1.0.2 / QB-1)。
|
|
@@ -4954,6 +5481,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4954
5481
|
multiSelectSeparator: localeTexts().multiSelectSeparator,
|
|
4955
5482
|
// 追加(1.12.0 / 検索と置換): 「選んだ範囲だけ」の範囲(件数・印・↑↓ も範囲の中だけ。React 版と同じ)。
|
|
4956
5483
|
scope: findReplaceSnapshot().scope,
|
|
5484
|
+
// 追加(1.16.0 / セルの結合): 結合に隠れたセルは数えない(結合は 1 つのセルとして 1 回。ページ送りではページごとに結ぶ)。
|
|
5485
|
+
// 変更(1.16.0 の別視点のレビュー): 結合の表が変わったら(ページの行の数・展開行の開閉・列)探し直す(関数を memo で控える)。
|
|
5486
|
+
isHiddenCell: findIsHiddenCell(),
|
|
4957
5487
|
// カレントのヒットへ: クリックと同じ 1 セルの選択 + 見える位置へのスクロール(命令的 API と同じ経路)。
|
|
4958
5488
|
// 変更(1.9.0 の点検 T3-02 / T6-09): 打っている途中の移動('query')で開いた親は、次の文字の移動で閉じ直す(React 版と同じ)。
|
|
4959
5489
|
onNavigate: (rowIndex, colIndex, cause) => {
|
|
@@ -4979,19 +5509,26 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
4979
5509
|
enabled: findReplaceEnabled(),
|
|
4980
5510
|
find: engine.find,
|
|
4981
5511
|
rows: rows(),
|
|
4982
|
-
rowModel: treeRowModel ??
|
|
5512
|
+
rowModel: treeRowModel ?? fullRowModel(),
|
|
4983
5513
|
columns: orderedColumns(),
|
|
4984
5514
|
caseSensitive: findOptions()?.caseSensitive ?? false,
|
|
4985
5515
|
conditionalFormat: conditionalFormatFeature2 !== void 0,
|
|
4986
5516
|
multiSelectSeparator: localeTexts().multiSelectSeparator,
|
|
4987
5517
|
validationTexts: localeTexts(),
|
|
4988
5518
|
toViewRow: findToViewRow(),
|
|
5519
|
+
// 追加(1.16.0 の実アプリの点検 CS1-05): すべて置換は結合を 1 つと数える(検索と同じ。React 版と同じ)。
|
|
5520
|
+
isHiddenCell: findIsHiddenCell(),
|
|
4989
5521
|
readOnly: editLocked(),
|
|
4990
5522
|
canEditCell: canEditCell(),
|
|
4991
5523
|
// 履歴付きの onRowsChange(元に戻すが 1 回・変更の追跡の印も付く)。
|
|
4992
|
-
commitRows: (nextRows) =>
|
|
4993
|
-
|
|
4994
|
-
|
|
5524
|
+
commitRows: (nextRows) => spanRowsChange()?.(nextRows),
|
|
5525
|
+
// 変更(1.15.0 / ページ送り): 選んだ範囲は通し番号で(探す行モデルが全ページのため。React 版と同じ)。
|
|
5526
|
+
getSelection: () => {
|
|
5527
|
+
const offset = untrack13(pageStart);
|
|
5528
|
+
const selection = store.getState().selection;
|
|
5529
|
+
return offset === 0 ? selection : shiftSelectionRows({ activeCell: null, selection }, offset).selection;
|
|
5530
|
+
},
|
|
5531
|
+
viewRowCount: fullRowModel().getRowCount(),
|
|
4995
5532
|
viewSignature: [state.sort, state.filters, state.collapsedGroupKeys, orderedColumnKeys()]
|
|
4996
5533
|
};
|
|
4997
5534
|
}, "render", "findReplace");
|
|
@@ -5013,7 +5550,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5013
5550
|
return null;
|
|
5014
5551
|
}
|
|
5015
5552
|
const v = vertical();
|
|
5016
|
-
return resolveRowRunsPaneRects(findScopeRowRuns(scope), scope.startCol, scope.endCol, {
|
|
5553
|
+
return resolveRowRunsPaneRects(shiftRowRunsToPage(findScopeRowRuns(scope), pageStart(), viewRowCount()), scope.startCol, scope.endCol, {
|
|
5017
5554
|
paneLayout: paneLayout(),
|
|
5018
5555
|
viewRowCount: viewRowCount(),
|
|
5019
5556
|
windowFirstRow: v.windowFirstRow,
|
|
@@ -5309,7 +5846,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5309
5846
|
// 最終列の Tab: その行のカードが開いていればカードの最初の要素へ、無ければ表の直後の目印から既定の Tab(段階 2 C-N2 / F-10)。
|
|
5310
5847
|
onTabPastLastColumn: detailRows.handleTabPastLastColumn,
|
|
5311
5848
|
// 追加(1.9.0 / ツリーデータ): 木の列のセルの Alt+Shift+↓ / ↑ で開く / 閉じる。
|
|
5312
|
-
onToggleTreeRow: treeStage() ? engine.gridApi.toggleTreeCell : void 0
|
|
5849
|
+
onToggleTreeRow: treeStage() ? engine.gridApi.toggleTreeCell : void 0,
|
|
5850
|
+
// 追加(1.16.0 / セルの結合): 結合から出るとき(入ったセルの行 / 列から)。
|
|
5851
|
+
cellSpans: engine.cellSpan
|
|
5313
5852
|
}), "render", "keyboard");
|
|
5314
5853
|
connectController(edit, () => ({
|
|
5315
5854
|
uiState: ui(),
|
|
@@ -5317,12 +5856,15 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5317
5856
|
visibleColumns: orderedColumns(),
|
|
5318
5857
|
rowModel: rowModel(),
|
|
5319
5858
|
setEditorInitialValue,
|
|
5320
|
-
onRowsChange:
|
|
5859
|
+
onRowsChange: spanRowsChange(),
|
|
5321
5860
|
applyServerSideCellEdits: applyServerSideCellEdits(),
|
|
5322
5861
|
dispatch,
|
|
5323
5862
|
gridRootRef,
|
|
5863
|
+
// 追加(1.16.0 / セルの結合): Enter / Tab の確定の後の移動は結合の外へ(入ったセルの行 / 列から)。
|
|
5864
|
+
cellSpans: engine.cellSpan,
|
|
5324
5865
|
editorActionGuardRef,
|
|
5325
|
-
readOnly:
|
|
5866
|
+
readOnly: editCommitLocked(),
|
|
5867
|
+
startLocked: loading(),
|
|
5326
5868
|
canEditCell: canEditCell(),
|
|
5327
5869
|
localeTexts: localeTexts(),
|
|
5328
5870
|
followsRow: activeRowFollowEnabled(),
|
|
@@ -5339,7 +5881,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5339
5881
|
getUiState: store.getState,
|
|
5340
5882
|
readOnly: editLocked(),
|
|
5341
5883
|
canEditCell: canEditCell(),
|
|
5342
|
-
handleRowsChange:
|
|
5884
|
+
handleRowsChange: spanRowsChange(),
|
|
5343
5885
|
applyServerSideCellEdits: applyServerSideCellEdits(),
|
|
5344
5886
|
startEditWithValue: edit.startEditWithValue,
|
|
5345
5887
|
dispatch
|
|
@@ -5352,7 +5894,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5352
5894
|
getUiState: store.getState,
|
|
5353
5895
|
readOnly: editLocked(),
|
|
5354
5896
|
canEditCell: canEditCell(),
|
|
5355
|
-
handleRowsChange:
|
|
5897
|
+
handleRowsChange: spanRowsChange(),
|
|
5356
5898
|
applyServerSideCellEdits: applyServerSideCellEdits(),
|
|
5357
5899
|
dispatch,
|
|
5358
5900
|
shortcuts: resolvedExcelShortcuts(),
|
|
@@ -5595,7 +6137,10 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5595
6137
|
}
|
|
5596
6138
|
commitRowMove(fromIndex, toIndex);
|
|
5597
6139
|
};
|
|
5598
|
-
const commitRowMoveFromDrag = (
|
|
6140
|
+
const commitRowMoveFromDrag = (pageFromIndex, pageToIndex) => {
|
|
6141
|
+
const offset = untrack13(pageStart);
|
|
6142
|
+
const fromIndex = pageFromIndex + offset;
|
|
6143
|
+
const toIndex = pageToIndex + offset;
|
|
5599
6144
|
const moved = commitRowMove(fromIndex, toIndex);
|
|
5600
6145
|
applyHoveredRowChange(null);
|
|
5601
6146
|
const columnsNow = orderedColumns();
|
|
@@ -5663,7 +6208,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5663
6208
|
endEditLeftOpen: edit.endEditLeftOpen,
|
|
5664
6209
|
commitRowMove: commitRowMoveFromDrag,
|
|
5665
6210
|
ghostSlot: slots().dragGhost,
|
|
5666
|
-
motion: resolvedMotion() === "off" ? "ghost" : props.rowDragMotion ?? "ghost"
|
|
6211
|
+
motion: resolvedMotion() === "off" ? "ghost" : props.rowDragMotion ?? "ghost",
|
|
6212
|
+
// 追加(1.16.0 / セルの結合): 引いている間は結合を外す(結合の列があるときだけ)。
|
|
6213
|
+
onDraggingChange: cellSpanBaseIndex().active || rowDragging() ? handleRowDraggingChange : void 0
|
|
5667
6214
|
}),
|
|
5668
6215
|
rowModel,
|
|
5669
6216
|
visibleColumns,
|
|
@@ -5671,14 +6218,15 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5671
6218
|
rows,
|
|
5672
6219
|
resolveRowKey: resolvedRowKeyGetter,
|
|
5673
6220
|
hasRowKeys: () => props.rowKeyGetter !== void 0,
|
|
5674
|
-
dragRowLabel: () => localeTexts().dragRowLabel
|
|
6221
|
+
dragRowLabel: () => localeTexts().dragRowLabel,
|
|
6222
|
+
rowOffset: pageStart
|
|
5675
6223
|
});
|
|
5676
|
-
const renderRowDropIndicator = (pane, cap) => rowDrag ? <
|
|
6224
|
+
const renderRowDropIndicator = (pane, cap) => rowDrag ? <Show13 when={rowDragAvailable()}>
|
|
5677
6225
|
<div
|
|
5678
6226
|
ref={(element) => rowDrag.setIndicator(pane, element)}
|
|
5679
6227
|
class={["ssg-row-drop-indicator", { "ssg-row-drop-indicator--cap": cap() }]}
|
|
5680
6228
|
/>
|
|
5681
|
-
</
|
|
6229
|
+
</Show13> : null;
|
|
5682
6230
|
const handleCornerHeaderPointerDown = (event) => {
|
|
5683
6231
|
event.preventDefault();
|
|
5684
6232
|
if (event.button !== 0) {
|
|
@@ -5722,6 +6270,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5722
6270
|
connectController(engine.gridApi, () => ({
|
|
5723
6271
|
scrollContainerRef,
|
|
5724
6272
|
dispatch,
|
|
6273
|
+
// 追加(1.16.0 / セルの結合): エクスポートの cellSpans。
|
|
6274
|
+
cellSpans: engine.cellSpan,
|
|
5725
6275
|
// 追加(1.10.0 / 入力行): focusNewRow() が移る最初の編集できる列を決める。
|
|
5726
6276
|
readOnly: editLocked(),
|
|
5727
6277
|
rowModel: rowModel(),
|
|
@@ -5739,6 +6289,14 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5739
6289
|
focusGrid: () => gridRootRef.current?.focus({ preventScroll: true }),
|
|
5740
6290
|
beforeDetailRowsCollapse: detailRows.returnFocusFromCards,
|
|
5741
6291
|
startEditCell: tryStartEditCell,
|
|
6292
|
+
// 追加(1.15.0 / ページ送り): ほかのページのセルの編集を始められるか(ページを替える前に確かめる)と、ページ送りの接続(React 版と同じ)。
|
|
6293
|
+
canStartEditCell: cells.canStartEdit,
|
|
6294
|
+
pagination: pageWindow() === null ? null : {
|
|
6295
|
+
controller: engine.pagination,
|
|
6296
|
+
fullRowModel: baseRowModel(),
|
|
6297
|
+
hasNewRow: newRowActive() && !loadingEmpty(),
|
|
6298
|
+
applyServerSideCellEdits: applyServerSideCellEditsAbsolute()
|
|
6299
|
+
},
|
|
5742
6300
|
// 列のグループ(1.6.0): setColumnGroupOpen / getState の closedColumnGroups / エクスポートの段。
|
|
5743
6301
|
columnGroupTree: columnGroupTree(),
|
|
5744
6302
|
headerHeight: headerHeight(),
|
|
@@ -5854,6 +6412,14 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5854
6412
|
// 段の memo を読みません(読むとこの effect がほかの通知の effect の後ろに回り、onColumnGroupOpenChange との順番が
|
|
5855
6413
|
// React 版と変わっていた)。
|
|
5856
6414
|
closedTreeRows: treeDataActive() ? treeClosedRowKeys() : null,
|
|
6415
|
+
// 追加(1.15.0 のレビュー): ページと 1 ページの行の数(ページ送りのときだけ状態に入る。getState と同じ今のページ)。ページ送りの
|
|
6416
|
+
// 無い表ではページの memo を読みません(木の段と同じく、読むとこの effect の順番が React 版と変わる)。
|
|
6417
|
+
...paginationOptions() === null ? null : {
|
|
6418
|
+
// 変更(1.15.0 の実アプリの点検): 行が 0 の間(読み込み前)は store に残しているページ(initialState のページ)。
|
|
6419
|
+
page: resolveStatePage(pageWindow()),
|
|
6420
|
+
pageSize: pageWindow()?.pageSize,
|
|
6421
|
+
pageProvisional: pageWindow()?.provisional === true
|
|
6422
|
+
},
|
|
5857
6423
|
onStateChange: inOwnTick(props.onStateChange),
|
|
5858
6424
|
onFiltersChange: inOwnTick(props.onFiltersChange),
|
|
5859
6425
|
onSortChange: inOwnTick(props.onSortChange)
|
|
@@ -5907,6 +6473,12 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5907
6473
|
})
|
|
5908
6474
|
);
|
|
5909
6475
|
const rowNumberer = createMemo10(() => createDataRowNumberer(labelViewIndexes()));
|
|
6476
|
+
const barSelection = createMemo10(() => {
|
|
6477
|
+
const offset = pageStart();
|
|
6478
|
+
const activeCell = ui().activeCell;
|
|
6479
|
+
const selection = ui().selection;
|
|
6480
|
+
return offset === 0 ? { activeCell, selection } : shiftSelectionRows({ activeCell, selection }, offset);
|
|
6481
|
+
});
|
|
5910
6482
|
const slotContextBase = createMemo10(() => ({
|
|
5911
6483
|
rows: rows(),
|
|
5912
6484
|
columns: props.columns,
|
|
@@ -5914,8 +6486,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5914
6486
|
globalFilterText: globalFilterText(),
|
|
5915
6487
|
columnFilterValues: columnFilters(),
|
|
5916
6488
|
sortState: ui().sort,
|
|
5917
|
-
activeCell:
|
|
5918
|
-
selection:
|
|
6489
|
+
activeCell: barSelection().activeCell,
|
|
6490
|
+
selection: barSelection().selection
|
|
5919
6491
|
}));
|
|
5920
6492
|
const derivedSummary = createMemo10(() => {
|
|
5921
6493
|
const titles = columnTitles();
|
|
@@ -5931,7 +6503,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5931
6503
|
// 件数はグループ行 / ラベル行を除くデータ行の数(slotContext.filteredRows と同じ)。分母(総データ行数)はラベル行を除く
|
|
5932
6504
|
// (ラベル行が無ければ rows の数)。サーバーサイドは rows が空なので、サーバーが返した今の条件での件数(React 版と同じ)。
|
|
5933
6505
|
leafRowCount(),
|
|
5934
|
-
|
|
6506
|
+
// 変更(1.15.0 / ページ送り): サーバーサイドの分母は区切る前の行の数(React 版と同じ)。
|
|
6507
|
+
isServerSide() ? baseRowCount() : labelLayout()?.dataRowCount,
|
|
5935
6508
|
columnNamer(),
|
|
5936
6509
|
rowNumberer(),
|
|
5937
6510
|
localeTexts()
|
|
@@ -5948,6 +6521,21 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5948
6521
|
rowModel: rowModel()
|
|
5949
6522
|
})) : () => null;
|
|
5950
6523
|
const liveDerivedSummary = createLiveObject(DERIVED_SUMMARY_KEYS, derivedSummary);
|
|
6524
|
+
const paginationContext = createMemo10(() => {
|
|
6525
|
+
const window2 = pageWindow();
|
|
6526
|
+
const options = paginationOptions();
|
|
6527
|
+
return window2 === null || options === null ? null : {
|
|
6528
|
+
page: window2.page,
|
|
6529
|
+
pageCount: window2.pageCount,
|
|
6530
|
+
pageSize: window2.pageSize,
|
|
6531
|
+
rowCount: window2.rowCount,
|
|
6532
|
+
firstRow: window2.firstRow,
|
|
6533
|
+
pageSizeOptions: options.pageSizeOptions,
|
|
6534
|
+
// ハンドルと同じ(編集中ならエディタを確定してから替える)。
|
|
6535
|
+
setPage: engine.gridApi.handle.setPage,
|
|
6536
|
+
setPageSize: engine.gridApi.handle.setPageSize
|
|
6537
|
+
};
|
|
6538
|
+
});
|
|
5951
6539
|
const slotContext = createMemo10(() => {
|
|
5952
6540
|
const filteredRows = getFilteredRows();
|
|
5953
6541
|
return {
|
|
@@ -5961,7 +6549,10 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5961
6549
|
globalFilterProgress: globalFilterProgress(),
|
|
5962
6550
|
selectionAggregates: selectionAggregates(),
|
|
5963
6551
|
// 追加(1.8.0): 変更の追跡の件数(効いていなければ null)。
|
|
5964
|
-
unsavedChanges: unsavedChanges()
|
|
6552
|
+
unsavedChanges: unsavedChanges(),
|
|
6553
|
+
// 追加(1.15.0): ページ送り(効いていなければ null)と読み込み中。
|
|
6554
|
+
pagination: paginationContext(),
|
|
6555
|
+
loading: loading()
|
|
5965
6556
|
};
|
|
5966
6557
|
});
|
|
5967
6558
|
const liveSlotContext = createLiveObject(SLOT_CONTEXT_KEYS, slotContext);
|
|
@@ -5977,10 +6568,10 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5977
6568
|
});
|
|
5978
6569
|
const showTopBarSummary = () => props.showTopBarSummary ?? true;
|
|
5979
6570
|
const showTopBarFilter = () => (props.showTopBarFilter ?? true) && globalFilterEnabled();
|
|
5980
|
-
const topBar = () => <
|
|
5981
|
-
<
|
|
6571
|
+
const topBar = () => <Show13 when={props.showTopBar ?? true}>
|
|
6572
|
+
<Show13
|
|
5982
6573
|
when={renderTopBarFn() !== void 0}
|
|
5983
|
-
fallback={<
|
|
6574
|
+
fallback={<Show13 when={showTopBarSummary() || showTopBarFilter()}>
|
|
5984
6575
|
<DefaultGridTopBar
|
|
5985
6576
|
slot={slots().toolbar}
|
|
5986
6577
|
derivedSummary={derivedSummary()}
|
|
@@ -5993,12 +6584,13 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
5993
6584
|
globalFilterIcon={props.globalFilterIcon}
|
|
5994
6585
|
onFilterSummaryClick={columnFilterEnabled() && toolPanel ? toggleFilterManager : void 0}
|
|
5995
6586
|
filterPanelOpen={toolPanel?.activeTab() === "filter"}
|
|
6587
|
+
loadingText={loading() ? localeTexts().loadingRows : null}
|
|
5996
6588
|
/>
|
|
5997
|
-
</
|
|
6589
|
+
</Show13>}
|
|
5998
6590
|
>
|
|
5999
6591
|
{customTopBar()}
|
|
6000
|
-
</
|
|
6001
|
-
</
|
|
6592
|
+
</Show13>
|
|
6593
|
+
</Show13>;
|
|
6002
6594
|
const removedRowLayer = createMemo10(
|
|
6003
6595
|
() => diffShowRemoved() && removedViewIndexes() ? { description: localeTexts().diffRemovedRow } : void 0
|
|
6004
6596
|
);
|
|
@@ -6017,7 +6609,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6017
6609
|
return null;
|
|
6018
6610
|
}
|
|
6019
6611
|
const DiffBarChip = parts.DiffBarChip;
|
|
6020
|
-
return <
|
|
6612
|
+
return <Show13 when={diffActive()}>
|
|
6021
6613
|
<DiffBarChip
|
|
6022
6614
|
parts={parts.formatDiffSummaryParts(changeSnapshot(), !diffComparing(), diffTexts())}
|
|
6023
6615
|
comparingText={diffTexts().diffComparing}
|
|
@@ -6028,10 +6620,19 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6028
6620
|
onPrev={engine.gridApi.handle.goToPrevChange}
|
|
6029
6621
|
onNext={engine.gridApi.handle.goToNextChange}
|
|
6030
6622
|
/>
|
|
6031
|
-
</
|
|
6623
|
+
</Show13>;
|
|
6032
6624
|
};
|
|
6033
|
-
const
|
|
6034
|
-
|
|
6625
|
+
const Pager = paginationParts?.Pager;
|
|
6626
|
+
const barPager = () => Pager ? <Show13 when={paginationContext()}>
|
|
6627
|
+
{(info) => <Pager info={info()} variant="bar" withCounts={props.showBottomBarCounts ?? true} loading={loading()} />}
|
|
6628
|
+
</Show13> : null;
|
|
6629
|
+
const pagerBand = () => Pager ? <Show13 when={paginationContext()}>
|
|
6630
|
+
{(info) => <div class="ssg-pager-band">
|
|
6631
|
+
<Pager info={info()} variant="band" loading={loading()} />
|
|
6632
|
+
</div>}
|
|
6633
|
+
</Show13> : null;
|
|
6634
|
+
const bottomBar = () => <Show13 when={props.showBottomBar ?? true} fallback={pagerBand()}>
|
|
6635
|
+
<Show13
|
|
6035
6636
|
when={renderBottomBarFn() !== void 0}
|
|
6036
6637
|
fallback={<DefaultGridBottomBar
|
|
6037
6638
|
slot={slots().statusBar}
|
|
@@ -6041,11 +6642,14 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6041
6642
|
SelectionAggregates={selectionAggregatesFeature2?.SelectionAggregates}
|
|
6042
6643
|
unsavedText={changeTrackingParts && !diffActive() ? changeTrackingParts.formatUnsavedSummary(unsavedChanges(), localeTexts()) : null}
|
|
6043
6644
|
diffChip={diffBarChip()}
|
|
6645
|
+
loadingText={loading() ? localeTexts().loadingRows : null}
|
|
6646
|
+
pager={barPager()}
|
|
6647
|
+
paged={paginationContext() !== null}
|
|
6044
6648
|
/>}
|
|
6045
6649
|
>
|
|
6046
6650
|
{customBottomBar()}
|
|
6047
|
-
</
|
|
6048
|
-
</
|
|
6651
|
+
</Show13>
|
|
6652
|
+
</Show13>;
|
|
6049
6653
|
const editorSession = createMemo10((previous) => {
|
|
6050
6654
|
const cell = ui().editingCell;
|
|
6051
6655
|
if (cell === null) {
|
|
@@ -6095,7 +6699,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6095
6699
|
const { sourceRowIndex, rowKey } = resolveCanEditCellContext(model, cell.row);
|
|
6096
6700
|
return {
|
|
6097
6701
|
row,
|
|
6098
|
-
|
|
6702
|
+
// 変更(1.15.0 / ページ送り): custom エディタの ctx.rowIndex は通し番号。
|
|
6703
|
+
rowIndex: cell.row + (model.pageStart ?? 0),
|
|
6099
6704
|
sourceRowIndex,
|
|
6100
6705
|
rowKey,
|
|
6101
6706
|
colIndex: cell.col,
|
|
@@ -6126,7 +6731,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6126
6731
|
return;
|
|
6127
6732
|
}
|
|
6128
6733
|
writeCellValueTo(
|
|
6129
|
-
{ rows: untrack13(rows), rowModel: model, handleRowsChange: untrack13(
|
|
6734
|
+
{ rows: untrack13(rows), rowModel: model, handleRowsChange: untrack13(spanRowsChange), applyServerSideCellEdits: untrack13(applyServerSideCellEdits) },
|
|
6130
6735
|
viewIndex,
|
|
6131
6736
|
row,
|
|
6132
6737
|
column,
|
|
@@ -6143,13 +6748,13 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6143
6748
|
const isRowDraggable = props.isRowDraggable;
|
|
6144
6749
|
return !isRowDraggable || isRowDraggable(row, { rowKey: cell.rowKey, sourceRowIndex: cell.sourceRowIndex });
|
|
6145
6750
|
});
|
|
6146
|
-
return <
|
|
6751
|
+
return <Show13 when={draggable()}>
|
|
6147
6752
|
<RowDragHandle2
|
|
6148
6753
|
operable={rowDragOperable()}
|
|
6149
6754
|
tooltip={rowDragOperable() ? rowDragTexts().dragRow : orderResolution().rowDragBlockedByRemovedRows ? rowDragTexts().dragRowDisabledRemoved : rowDragTexts().dragRowDisabled}
|
|
6150
6755
|
onPointerDown={(event) => rowDrag.onRowDragHandlePointerDown(untrack13(() => cell.rowIndex), event)}
|
|
6151
6756
|
/>
|
|
6152
|
-
</
|
|
6757
|
+
</Show13>;
|
|
6153
6758
|
};
|
|
6154
6759
|
const cellTextOf = (row, column) => {
|
|
6155
6760
|
return formatCellText(
|
|
@@ -6192,9 +6797,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6192
6797
|
return editor?.type === "checkbox" ? editor : void 0;
|
|
6193
6798
|
});
|
|
6194
6799
|
const otherwise = renderDefaultCellContent(currentRow, column, cell, treeAggregate, true);
|
|
6195
|
-
return <
|
|
6800
|
+
return <Show13 when={checkboxEditor() !== void 0} fallback={otherwise}>
|
|
6196
6801
|
{renderCheckbox(() => checkboxEditor() ?? {})}
|
|
6197
|
-
</
|
|
6802
|
+
</Show13>;
|
|
6198
6803
|
}
|
|
6199
6804
|
const staticEditor = resolveStaticColumnEditor2(column);
|
|
6200
6805
|
if (!column.renderCell && staticEditor?.type === "checkbox") {
|
|
@@ -6219,18 +6824,20 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6219
6824
|
if (column.key === DETAIL_TOGGLE_COLUMN_KEY2) {
|
|
6220
6825
|
const rowNumber = () => {
|
|
6221
6826
|
const indexes = labelViewIndexes();
|
|
6222
|
-
|
|
6827
|
+
const publicRowIndex = cell.rowIndex + pageStart();
|
|
6828
|
+
return indexes ? resolveDataRowNumber2(indexes, publicRowIndex) : publicRowIndex + 1;
|
|
6223
6829
|
};
|
|
6224
|
-
return <
|
|
6830
|
+
return <Show13 when={expandable()}>
|
|
6225
6831
|
<DetailToggleButton detail={detail} rowNumber={rowNumber()} onPress={edit.endEditLeftOpen} />
|
|
6226
|
-
</
|
|
6832
|
+
</Show13>;
|
|
6227
6833
|
}
|
|
6228
6834
|
const context = {
|
|
6229
6835
|
get row() {
|
|
6230
6836
|
return currentRow();
|
|
6231
6837
|
},
|
|
6838
|
+
// 変更(1.15.0 / ページ送り): 利用側へ渡す行の番号は通し番号(cell.rowIndex はページの中の番号)。
|
|
6232
6839
|
get rowIndex() {
|
|
6233
|
-
return cell.rowIndex;
|
|
6840
|
+
return cell.rowIndex + pageStart();
|
|
6234
6841
|
},
|
|
6235
6842
|
get sourceRowIndex() {
|
|
6236
6843
|
return cell.sourceRowIndex;
|
|
@@ -6297,13 +6904,13 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6297
6904
|
const ranges = cell.findRanges;
|
|
6298
6905
|
return list && ranges && ranges.length > 0 ? splitRangesByChips2(list, separator().length, ranges) : void 0;
|
|
6299
6906
|
});
|
|
6300
|
-
return <
|
|
6907
|
+
return <Show13 when={labels()} fallback={<span class="ssg-cell-value">{highlightCellFind(textOf(currentRow()))}</span>}>
|
|
6301
6908
|
{(list) => <MultiSelectChips
|
|
6302
6909
|
labels={list()}
|
|
6303
6910
|
separator={separator()}
|
|
6304
6911
|
renderLabel={(label, index) => highlightFind(label, chipRanges()?.[index], findCurrentIndex2)}
|
|
6305
6912
|
/>}
|
|
6306
|
-
</
|
|
6913
|
+
</Show13>;
|
|
6307
6914
|
}
|
|
6308
6915
|
const chips = formatRules?.chips;
|
|
6309
6916
|
if (conditionalFormatFeature2 && chips) {
|
|
@@ -6314,8 +6921,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6314
6921
|
const chip = createMemo10(
|
|
6315
6922
|
() => resolveChipSpec2(chips, {
|
|
6316
6923
|
row,
|
|
6924
|
+
// 変更(1.15.0 / ページ送り): 通し番号。
|
|
6317
6925
|
get rowIndex() {
|
|
6318
|
-
return cell.rowIndex;
|
|
6926
|
+
return cell.rowIndex + pageStart();
|
|
6319
6927
|
},
|
|
6320
6928
|
get sourceRowIndex() {
|
|
6321
6929
|
return cell.sourceRowIndex;
|
|
@@ -6340,9 +6948,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6340
6948
|
}
|
|
6341
6949
|
})
|
|
6342
6950
|
);
|
|
6343
|
-
return <
|
|
6951
|
+
return <Show13 when={chip()} fallback={<span class="ssg-cell-value">{highlightCellFind(text)}</span>}>
|
|
6344
6952
|
{(spec) => <GridChip2 spec={spec()}>{highlightCellFind(spec().label ?? text)}</GridChip2>}
|
|
6345
|
-
</
|
|
6953
|
+
</Show13>;
|
|
6346
6954
|
}
|
|
6347
6955
|
return <span class="ssg-cell-value">{highlightCellFind(textOf(currentRow()))}</span>;
|
|
6348
6956
|
};
|
|
@@ -6361,9 +6969,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6361
6969
|
const value = createMemo10(() => cell.treeRow?.aggregates?.[column.key]);
|
|
6362
6970
|
const aggregate = { has, value };
|
|
6363
6971
|
const TreeAggregateValue = parts.TreeAggregateValue;
|
|
6364
|
-
content = column.renderCell ? renderDefaultCellContent(currentRow, column, cell, aggregate) : <
|
|
6972
|
+
content = column.renderCell ? renderDefaultCellContent(currentRow, column, cell, aggregate) : <Show13 when={has()} fallback={renderDefaultCellContent(currentRow, column, cell)}>
|
|
6365
6973
|
<TreeAggregateValue column={column} value={value()} />
|
|
6366
|
-
</
|
|
6974
|
+
</Show13>;
|
|
6367
6975
|
} else {
|
|
6368
6976
|
content = renderDefaultCellContent(currentRow, column, cell);
|
|
6369
6977
|
}
|
|
@@ -6373,17 +6981,17 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6373
6981
|
const TreeCellPrefix = parts.TreeCellPrefix;
|
|
6374
6982
|
const rowLabel = () => cellTextOf(currentRow(), column);
|
|
6375
6983
|
return <>
|
|
6376
|
-
<
|
|
6984
|
+
<Show13 when={cell.treeRow}>
|
|
6377
6985
|
{(tree) => <TreeCellPrefix
|
|
6378
6986
|
level={tree().level}
|
|
6379
6987
|
hasChildren={tree().hasChildren}
|
|
6380
6988
|
open={tree().open}
|
|
6381
6989
|
rowLabel={rowLabel()}
|
|
6382
|
-
rowNumber={cell.rowIndex + 1}
|
|
6990
|
+
rowNumber={cell.rowIndex + pageStart() + 1}
|
|
6383
6991
|
onToggle={(open) => engine.gridApi.handle.setTreeRowOpen(cell.rowKey, open)}
|
|
6384
6992
|
onPress={edit.endEditLeftOpen}
|
|
6385
6993
|
/>}
|
|
6386
|
-
</
|
|
6994
|
+
</Show13>
|
|
6387
6995
|
{content}
|
|
6388
6996
|
</>;
|
|
6389
6997
|
};
|
|
@@ -6411,7 +7019,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6411
7019
|
const activeRect = () => placementRectInPane(activeCellPlacement(), pane);
|
|
6412
7020
|
const editorRect = () => placementRectInPane(editingCellPlacement(), pane);
|
|
6413
7021
|
const clearHoveredRow = () => applyHoveredRowChange(null);
|
|
6414
|
-
const renderPinnedRows = (position) => PinnedRows ? <
|
|
7022
|
+
const renderPinnedRows = (position) => PinnedRows ? <Show13 when={position === "top" ? pinnedTop() : pinnedBottom()}>
|
|
6415
7023
|
{(pinnedRows) => <PinnedRows
|
|
6416
7024
|
pane={pane}
|
|
6417
7025
|
position={position}
|
|
@@ -6424,7 +7032,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6424
7032
|
bodyHeight={position === "top" || pinnedBelowTotal() ? 0 : vertical().physicalBodyHeight}
|
|
6425
7033
|
entries={entries()}
|
|
6426
7034
|
rowKeyGetter={resolvedRowKeyGetter()}
|
|
6427
|
-
ariaRowIndexStart={(position === "top" ? 2 :
|
|
7035
|
+
ariaRowIndexStart={(position === "top" ? 2 : ariaBodyRowCount() + 2 + pinnedTopCount() + (pinnedBelowTotal() ? 1 : 0)) + columnGroupDepth()}
|
|
6428
7036
|
getRowClassName={props.getRowClassName}
|
|
6429
7037
|
showCellOverflowTooltip={props.showCellOverflowTooltip ?? false}
|
|
6430
7038
|
conditionalFormat={conditionalFormatFeature2}
|
|
@@ -6433,8 +7041,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6433
7041
|
slots={slots()}
|
|
6434
7042
|
onPointerEnter={clearHoveredRow}
|
|
6435
7043
|
/>}
|
|
6436
|
-
</
|
|
6437
|
-
const renderTotalRow = () => TotalRow ? <
|
|
7044
|
+
</Show13> : null;
|
|
7045
|
+
const renderTotalRow = () => TotalRow ? <Show13 when={totalRowEnabled()}>
|
|
6438
7046
|
<TotalRow
|
|
6439
7047
|
pane={pane}
|
|
6440
7048
|
ownsRowHeader={ownsRowHeader()}
|
|
@@ -6447,14 +7055,14 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6447
7055
|
cells={totalRowCells()}
|
|
6448
7056
|
label={totalRowLabel()}
|
|
6449
7057
|
labelColumnKey={totalRowLabelColumnKey()}
|
|
6450
|
-
ariaRowIndex={
|
|
7058
|
+
ariaRowIndex={ariaBodyRowCount() + 2 + pinnedTopCount() + (pinnedBelowTotal() ? 0 : pinnedBottomCount()) + columnGroupDepth()}
|
|
6451
7059
|
renderCell={totalRowOptions()?.renderCell}
|
|
6452
7060
|
rowClassName={totalRowSlot().className}
|
|
6453
7061
|
rowStyle={totalRowSlot().style}
|
|
6454
7062
|
slots={slots()}
|
|
6455
7063
|
onPointerEnter={clearHoveredRow}
|
|
6456
7064
|
/>
|
|
6457
|
-
</
|
|
7065
|
+
</Show13> : null;
|
|
6458
7066
|
return <div
|
|
6459
7067
|
style={{
|
|
6460
7068
|
position: "relative",
|
|
@@ -6468,7 +7076,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6468
7076
|
{
|
|
6469
7077
|
/* 列のグループの段(1.6.0。列見出しの行の前の sticky の器)。 */
|
|
6470
7078
|
}
|
|
6471
|
-
{ColumnGroupHeader ? <
|
|
7079
|
+
{ColumnGroupHeader ? <Show13 when={columnGroupTree()}>
|
|
6472
7080
|
{(tree) => <ColumnGroupHeader
|
|
6473
7081
|
pane={pane}
|
|
6474
7082
|
tree={tree()}
|
|
@@ -6487,7 +7095,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6487
7095
|
onResizePointerDown={columnCommands.handleColumnGroupResizePointerDown}
|
|
6488
7096
|
onGripPointerDown={columnGroupDragHandler()}
|
|
6489
7097
|
/>}
|
|
6490
|
-
</
|
|
7098
|
+
</Show13> : null}
|
|
6491
7099
|
<GridHeaderRow
|
|
6492
7100
|
pane={pane}
|
|
6493
7101
|
ownsRowHeader={ownsRowHeader()}
|
|
@@ -6544,6 +7152,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6544
7152
|
rowClassName={stickyLabelSlot().className}
|
|
6545
7153
|
rowStyle={stickyLabelSlot().style}
|
|
6546
7154
|
slots={slots()}
|
|
7155
|
+
rowIndexOffset={pageStart()}
|
|
6547
7156
|
/> : null}
|
|
6548
7157
|
<div
|
|
6549
7158
|
style={{
|
|
@@ -6569,16 +7178,16 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6569
7178
|
}
|
|
6570
7179
|
{findReplaceFeature2 ? (() => {
|
|
6571
7180
|
const { FindScopeOverlay } = findReplaceFeature2;
|
|
6572
|
-
return <
|
|
7181
|
+
return <For6 each={findScopeRectsForPane(pane)} keyed={false}>
|
|
6573
7182
|
{(rect) => <FindScopeOverlay
|
|
6574
7183
|
rect={rect()}
|
|
6575
7184
|
headerHeight={headerHeight()}
|
|
6576
7185
|
leadingWidth={leadingWidth()}
|
|
6577
7186
|
baseOffset={vertical().overlayBaseOffset}
|
|
6578
7187
|
/>}
|
|
6579
|
-
</
|
|
7188
|
+
</For6>;
|
|
6580
7189
|
})() : null}
|
|
6581
|
-
<
|
|
7190
|
+
<For6 each={selectionRectsForPane(pane)} keyed={false}>
|
|
6582
7191
|
{(rect) => <Overlay
|
|
6583
7192
|
class="ssg-selection-overlay"
|
|
6584
7193
|
slot={slots().selectionOverlay}
|
|
@@ -6587,8 +7196,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6587
7196
|
leadingWidth={leadingWidth()}
|
|
6588
7197
|
baseOffset={vertical().overlayBaseOffset}
|
|
6589
7198
|
/>}
|
|
6590
|
-
</
|
|
6591
|
-
<
|
|
7199
|
+
</For6>
|
|
7200
|
+
<For6 each={copyRectsForPane(pane)} keyed={false}>
|
|
6592
7201
|
{(rect) => <CopyRangeOverlay
|
|
6593
7202
|
slot={slots().copyRangeOverlay}
|
|
6594
7203
|
rect={rect()}
|
|
@@ -6596,7 +7205,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6596
7205
|
leadingWidth={leadingWidth()}
|
|
6597
7206
|
baseOffset={vertical().overlayBaseOffset}
|
|
6598
7207
|
/>}
|
|
6599
|
-
</
|
|
7208
|
+
</For6>
|
|
6600
7209
|
{motionExtrasFeature2 ? (() => {
|
|
6601
7210
|
const { ColumnHoverOverlay: ColumnHoverOverlay2 } = motionExtrasFeature2;
|
|
6602
7211
|
return <>
|
|
@@ -6668,7 +7277,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6668
7277
|
collapsedGroupKeys={ui().collapsedGroupKeys}
|
|
6669
7278
|
onGroupToggle={handleGroupToggle}
|
|
6670
7279
|
labelRowLayer={pane === "center" ? labelRowLayerCenter() : labelRowLayerBand()}
|
|
6671
|
-
skeletonRow={isServerSide() ? serverSideFeature2?.BodySkeletonRow : void 0}
|
|
7280
|
+
skeletonRow={isServerSide() ? serverSideFeature2?.BodySkeletonRow : loadingEmpty() ? GridBodySkeletonRow : void 0}
|
|
7281
|
+
placeholderRows={loadingEmpty()}
|
|
6672
7282
|
labelViewIndexes={labelViewIndexes()}
|
|
6673
7283
|
newRowLayer={newRowLayer()}
|
|
6674
7284
|
newRowDraft={newRowDraft()}
|
|
@@ -6676,9 +7286,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6676
7286
|
changeNavRowKey={changeNavRowKey()}
|
|
6677
7287
|
activeCellDecorationText={activeCellDecorationText()}
|
|
6678
7288
|
rowHeaderWidth={rowHeaderWidth()}
|
|
6679
|
-
rows={
|
|
7289
|
+
rows={bodyRowsWithSpans()}
|
|
6680
7290
|
entries={entries()}
|
|
6681
|
-
rowModel={
|
|
7291
|
+
rowModel={layoutRowModel()}
|
|
6682
7292
|
ariaRowOffset={pinnedTopCount() + columnGroupDepth()}
|
|
6683
7293
|
activeCell={ui().activeCell}
|
|
6684
7294
|
editingCell={ui().editingCell}
|
|
@@ -6698,6 +7308,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6698
7308
|
renderCellContent={renderCellContent}
|
|
6699
7309
|
isTextCellColumn={isTextCellColumn}
|
|
6700
7310
|
treeColumnKey={treeStage() ? treeColumnKey() : void 0}
|
|
7311
|
+
cellSpans={cellSpanLayout()}
|
|
7312
|
+
spanStickyTop={spanStickyTop()}
|
|
6701
7313
|
cellText={cellText}
|
|
6702
7314
|
onRowHeaderPointerDown={pointer.handleRowHeaderPointerDown}
|
|
6703
7315
|
onRowHeaderPointerEnter={pointer.handleRowHeaderPointerEnter}
|
|
@@ -6729,10 +7341,10 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6729
7341
|
{
|
|
6730
7342
|
/* 下端の行(本体ぶんの空きの直後 = 箱の下端の sticky の行)。既定は下の固定行 → 合計行、'belowTotal' は合計行 → 固定行。 */
|
|
6731
7343
|
}
|
|
6732
|
-
<
|
|
7344
|
+
<Show13 when={pinnedBelowTotal()} fallback={[renderPinnedRows("bottom"), renderTotalRow()]}>
|
|
6733
7345
|
{renderTotalRow()}
|
|
6734
7346
|
{renderPinnedRows("bottom")}
|
|
6735
|
-
</
|
|
7347
|
+
</Show13>
|
|
6736
7348
|
{
|
|
6737
7349
|
/* 中央ペインのドロップの縦線(左右のペインは、固定列が 0 本でも線を出せるよう外側の器に置く。React 版と同じ)。 */
|
|
6738
7350
|
}
|
|
@@ -6775,11 +7387,15 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6775
7387
|
"ssg-root--dim-readonly": props.dimReadOnlyCells ?? false,
|
|
6776
7388
|
// 追加(1.5.0 / serverSideRefetch="keep"): 取り直しの間に前の行を見せている(行を薄くする)。
|
|
6777
7389
|
"ssg-root--refetching": refetchingRows(),
|
|
7390
|
+
// 追加(1.15.0): 読み込み中(行があるとき。薄くする面と動く線は取り直しと同じ)。
|
|
7391
|
+
"ssg-root--loading": loading(),
|
|
6778
7392
|
// 追加(1.13.0 / 差分の表示): baseline と比べている(変更のセル・追加の行・削除の行を色で塗る。ユーザー判断 C)。
|
|
6779
7393
|
"ssg-root--diff": diffActive(),
|
|
6780
7394
|
"ssg-root--fill-height": heightLayout().fillParent,
|
|
6781
7395
|
// クロスヘア(列見出し / 行番号を選択の色で染める。列の帯は ColumnHoverOverlay)。
|
|
6782
|
-
"ssg-root--hover-cross": hoverCross()
|
|
7396
|
+
"ssg-root--hover-cross": hoverCross(),
|
|
7397
|
+
// 追加(1.16.0 の別視点のレビュー): セルの結合を描いている(内部のクラス。React 版と同じ)。
|
|
7398
|
+
"ssg-root--cell-spans": cellSpanIndex().active
|
|
6783
7399
|
}
|
|
6784
7400
|
]}
|
|
6785
7401
|
style={{
|
|
@@ -6794,7 +7410,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6794
7410
|
{
|
|
6795
7411
|
/* フィルターのチップのバー(showFilterChipBar)。適用中の列フィルターをチップで並べる(0 件なら出さない)。 */
|
|
6796
7412
|
}
|
|
6797
|
-
{filterManagement && filteringFeature2 ? <
|
|
7413
|
+
{filterManagement && filteringFeature2 ? <Show13 when={props.showFilterChipBar}>
|
|
6798
7414
|
<filteringFeature2.FilterChipBar
|
|
6799
7415
|
slot={slots().filterChipBar}
|
|
6800
7416
|
entries={filterManagement.entries()}
|
|
@@ -6803,7 +7419,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6803
7419
|
onClearFilter={columnCommands.handleFilterManagerClearFilter}
|
|
6804
7420
|
onClearAllFilters={columnCommands.handleFilterManagerClearAll}
|
|
6805
7421
|
/>
|
|
6806
|
-
</
|
|
7422
|
+
</Show13> : null}
|
|
6807
7423
|
<div
|
|
6808
7424
|
ref={(element) => {
|
|
6809
7425
|
gridRootRef.current = element;
|
|
@@ -6860,11 +7476,11 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6860
7476
|
}}
|
|
6861
7477
|
role={treeStage() ? "treegrid" : "grid"}
|
|
6862
7478
|
aria-label={props.ariaLabel}
|
|
6863
|
-
aria-rowcount={
|
|
7479
|
+
aria-rowcount={ariaBodyRowCount() + 1 + pinnedTopCount() + pinnedBottomCount() + (totalRowEnabled() ? 1 : 0) + columnGroupDepth()}
|
|
6864
7480
|
aria-colcount={orderedColumns().length + 1}
|
|
6865
7481
|
aria-multiselectable={enableRangeSelection() ? "true" : void 0}
|
|
6866
7482
|
aria-readonly={readOnly() ? "true" : void 0}
|
|
6867
|
-
aria-busy={refetchingRows() ? "true" : void 0}
|
|
7483
|
+
aria-busy={refetchingRows() || loading() ? "true" : void 0}
|
|
6868
7484
|
class={["ssg-scroll-container", { "ssg-scroll-container--custom-scrollbar": customScrollbar() }]}
|
|
6869
7485
|
style={toSolidStyle(heightLayout().scrollContainerStyle)}
|
|
6870
7486
|
>
|
|
@@ -6882,7 +7498,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6882
7498
|
}}
|
|
6883
7499
|
style={pinnedPaneStyle("left", paneResolution().leftPaneTotalWidth, paneLayout().left.entries.length > 0)}
|
|
6884
7500
|
>
|
|
6885
|
-
<
|
|
7501
|
+
<Show13 when={paneResolution().hasLeftPane}>
|
|
6886
7502
|
{renderPane(
|
|
6887
7503
|
"left",
|
|
6888
7504
|
() => paneResolution().leftPaneTotalWidth,
|
|
@@ -6890,7 +7506,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6890
7506
|
() => true,
|
|
6891
7507
|
() => paneLayout().left.entries
|
|
6892
7508
|
)}
|
|
6893
|
-
</
|
|
7509
|
+
</Show13>
|
|
6894
7510
|
{renderColumnDropIndicator("left")}
|
|
6895
7511
|
</div>
|
|
6896
7512
|
<div
|
|
@@ -6917,7 +7533,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6917
7533
|
}}
|
|
6918
7534
|
style={pinnedPaneStyle("right", paneResolution().rightPaneTotalWidth, paneLayout().right.entries.length > 0)}
|
|
6919
7535
|
>
|
|
6920
|
-
<
|
|
7536
|
+
<Show13 when={paneResolution().hasRightPane}>
|
|
6921
7537
|
{renderPane(
|
|
6922
7538
|
"right",
|
|
6923
7539
|
() => paneResolution().rightPaneTotalWidth,
|
|
@@ -6925,15 +7541,18 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6925
7541
|
() => false,
|
|
6926
7542
|
() => paneLayout().right.entries
|
|
6927
7543
|
)}
|
|
6928
|
-
</
|
|
7544
|
+
</Show13>
|
|
6929
7545
|
{renderColumnDropIndicator("right")}
|
|
6930
7546
|
</div>
|
|
6931
7547
|
</div>
|
|
6932
|
-
|
|
7548
|
+
{
|
|
7549
|
+
/* 変更(1.15.0): 読み込み中で行が無い間は骨組みの行を描くので、空の文言は出しません。 */
|
|
7550
|
+
}
|
|
7551
|
+
<Show13 when={viewRowCount() === 0 && hydrated() && !loadingEmpty()}>
|
|
6933
7552
|
<div class={["ssg-empty-state", slots().emptyState?.className]} style={slots().emptyState?.style}>
|
|
6934
7553
|
{emptyStateText()}
|
|
6935
7554
|
</div>
|
|
6936
|
-
</
|
|
7555
|
+
</Show13>
|
|
6937
7556
|
</div>
|
|
6938
7557
|
<span
|
|
6939
7558
|
ref={(element) => {
|
|
@@ -6944,7 +7563,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6944
7563
|
aria-hidden={hasDetailCards() ? void 0 : "true"}
|
|
6945
7564
|
onFocus={(event) => detailRows.handleTableExitFocus(event.relatedTarget)}
|
|
6946
7565
|
/>
|
|
6947
|
-
<
|
|
7566
|
+
<Show13 when={scrollHintFeature2 !== void 0 && activeScrollHint()}>
|
|
6948
7567
|
{(options) => {
|
|
6949
7568
|
const ScrollHint = scrollHintFeature2.ScrollHint;
|
|
6950
7569
|
return <ScrollHint
|
|
@@ -6959,29 +7578,31 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6959
7578
|
rowMetrics={vertical().rowMetrics}
|
|
6960
7579
|
rowModel={rowModel()}
|
|
6961
7580
|
labelViewIndexes={labelViewIndexes()}
|
|
7581
|
+
rowOffset={pageStart()}
|
|
7582
|
+
totalDataRowCount={pageWindow() === null ? void 0 : leafRowCount()}
|
|
6962
7583
|
/>;
|
|
6963
7584
|
}}
|
|
6964
|
-
</
|
|
7585
|
+
</Show13>
|
|
6965
7586
|
{
|
|
6966
7587
|
/* 列幅の自動調整の計測中の overlay(遅れて出す。pointer-events: none で操作は素通し)。 */
|
|
6967
7588
|
}
|
|
6968
|
-
<
|
|
7589
|
+
<Show13 when={isAutosizing()}>
|
|
6969
7590
|
<div class="ssg-autosize-overlay">
|
|
6970
7591
|
<span class="ssg-autosize-pill">{localeTexts().sizingColumns}</span>
|
|
6971
7592
|
</div>
|
|
6972
|
-
</
|
|
7593
|
+
</Show13>
|
|
6973
7594
|
{
|
|
6974
7595
|
/* 追加(1.13.0 の実アプリでの点検 RD4-02): ▲ ▼ で回った先の読み上げ(見た目には出さない。差分の表示の間だけ置く)。 */
|
|
6975
7596
|
}
|
|
6976
|
-
<
|
|
7597
|
+
<Show13 when={diffActive() && diffViewParts !== void 0}>
|
|
6977
7598
|
<span class="ssg-visually-hidden" aria-live="polite" aria-atomic="true">
|
|
6978
7599
|
{changeNavAnnouncement()}
|
|
6979
7600
|
</span>
|
|
6980
|
-
</
|
|
7601
|
+
</Show13>
|
|
6981
7602
|
{
|
|
6982
7603
|
/* グローバルフィルターの適用中の overlay(しきい値を超える表の時間分割の間だけ。pointer-events: none)。 */
|
|
6983
7604
|
}
|
|
6984
|
-
<
|
|
7605
|
+
<Show13 when={globalFilterStatus() === "filtering"}>
|
|
6985
7606
|
<div class="ssg-filter-overlay">
|
|
6986
7607
|
<span class="ssg-filter-overlay-chip" role="status" aria-live="polite">
|
|
6987
7608
|
<span class="ssg-filter-spinner" aria-hidden="true" />
|
|
@@ -6990,11 +7611,11 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
6990
7611
|
</span>
|
|
6991
7612
|
</span>
|
|
6992
7613
|
</div>
|
|
6993
|
-
</
|
|
7614
|
+
</Show13>
|
|
6994
7615
|
{
|
|
6995
7616
|
/* セル内検索のバー(右上に浮く。見出しの直下)。開いているときだけ描きます。 */
|
|
6996
7617
|
}
|
|
6997
|
-
<
|
|
7618
|
+
<Show13 when={findSnapshot().open}>
|
|
6998
7619
|
{FindBar && <FindBar
|
|
6999
7620
|
snapshot={findSnapshot()}
|
|
7000
7621
|
headerHeight={headerHeight()}
|
|
@@ -7016,11 +7637,11 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
7016
7637
|
onScopeChange={engine.findReplace.setScopeEnabled}
|
|
7017
7638
|
onReplaceShortcut={() => engine.findReplace.setExpanded(true)}
|
|
7018
7639
|
/>}
|
|
7019
|
-
</
|
|
7640
|
+
</Show13>
|
|
7020
7641
|
{
|
|
7021
7642
|
/* サーバーサイドのエラーバー(取得の失敗の再試行 / 保存の失敗。機能 features/serverSide の部品)。 */
|
|
7022
7643
|
}
|
|
7023
|
-
{serverSide && serverSideFeature2 ? <
|
|
7644
|
+
{serverSide && serverSideFeature2 ? <Show13 when={isServerSide()}>
|
|
7024
7645
|
<serverSideFeature2.ErrorBars
|
|
7025
7646
|
loadError={serverSide.loadError()}
|
|
7026
7647
|
writeError={serverSide.writeError()}
|
|
@@ -7028,12 +7649,15 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
7028
7649
|
slot={slots().errorBar}
|
|
7029
7650
|
localeTexts={localeTexts()}
|
|
7030
7651
|
/>
|
|
7031
|
-
</
|
|
7652
|
+
</Show13> : null}
|
|
7032
7653
|
{
|
|
7033
7654
|
/* 追加(1.5.0 / serverSideRefetch="keep"): 前の行を見せたまま取り直している間、本体の見えている所を薄くする面と、
|
|
7034
7655
|
列見出しの下に流れる線(大きさはスクロールバーを除いた見える範囲。測る前は CSS の left / right / bottom。React 版と同じ)。 */
|
|
7035
7656
|
}
|
|
7036
|
-
|
|
7657
|
+
{
|
|
7658
|
+
/* 変更(1.15.0): 読み込み中(loading)で行があるときも同じ面と線。 */
|
|
7659
|
+
}
|
|
7660
|
+
<Show13 when={refetchingRows() || loadingWithRows()}>
|
|
7037
7661
|
<div
|
|
7038
7662
|
class="ssg-refetch-veil"
|
|
7039
7663
|
aria-hidden="true"
|
|
@@ -7048,12 +7672,12 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
7048
7672
|
aria-hidden="true"
|
|
7049
7673
|
style={{ top: `${headerHeight()}px`, width: viewportWidth() > 0 ? `${viewportWidth()}px` : void 0 }}
|
|
7050
7674
|
/>
|
|
7051
|
-
</
|
|
7675
|
+
</Show13>
|
|
7052
7676
|
{
|
|
7053
7677
|
/* IME オンのままの直接入力の入力受け(imeDirectInput が有効なときだけ)。値 / 位置 / 変換中の見た目はコントローラが
|
|
7054
7678
|
直接扱います。Tab の順番には入れません(タブストップはシェルのまま)。 */
|
|
7055
7679
|
}
|
|
7056
|
-
<
|
|
7680
|
+
<Show13 when={imeDirectInputEnabled()}>
|
|
7057
7681
|
<input
|
|
7058
7682
|
ref={(element) => engine.imeInput.attach(element)}
|
|
7059
7683
|
{...{ [IME_INPUT_ATTRIBUTE]: "" }}
|
|
@@ -7066,14 +7690,14 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
7066
7690
|
spellcheck="false"
|
|
7067
7691
|
aria-label={localeTexts().cellInput}
|
|
7068
7692
|
/>
|
|
7069
|
-
</
|
|
7693
|
+
</Show13>
|
|
7070
7694
|
</div>
|
|
7071
7695
|
{bottomBar()}
|
|
7072
7696
|
{
|
|
7073
7697
|
/* 列メニュー(グリッドの外のポップアップ)。 */
|
|
7074
7698
|
}
|
|
7075
|
-
{columnMenu && columnMenuFeature2 ? <
|
|
7076
|
-
{(column) => <
|
|
7699
|
+
{columnMenu && columnMenuFeature2 ? <Show13 when={columnMenu.openedColumn()}>
|
|
7700
|
+
{(column) => <Show13 when={columnMenu.layout()}>
|
|
7077
7701
|
{(layout) => <columnMenuFeature2.ColumnMenuPopover
|
|
7078
7702
|
slots={slots()}
|
|
7079
7703
|
themeClassName={portalClassName()}
|
|
@@ -7122,8 +7746,8 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
7122
7746
|
}}
|
|
7123
7747
|
onRequestClose={columnMenu.close}
|
|
7124
7748
|
/>}
|
|
7125
|
-
</
|
|
7126
|
-
</
|
|
7749
|
+
</Show13>}
|
|
7750
|
+
</Show13> : null}
|
|
7127
7751
|
{
|
|
7128
7752
|
/* 列フィルターのポップオーバー(グリッドの外のポップアップ。閉じている間は何も描かない)。 */
|
|
7129
7753
|
}
|
|
@@ -7146,9 +7770,9 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
7146
7770
|
/* ツールパネル(グリッドの外のポップアップ。開いている間だけ描く)。タブを切り替えると中身を作り直す(タブの中の検索の
|
|
7147
7771
|
文字などは戻る。React 版と同じ)。 */
|
|
7148
7772
|
}
|
|
7149
|
-
{toolPanel && toolPanelViews ? <
|
|
7150
|
-
{(tab) => <
|
|
7151
|
-
{(layout) => <
|
|
7773
|
+
{toolPanel && toolPanelViews ? <Show13 when={toolPanel.activeTab()}>
|
|
7774
|
+
{(tab) => <Show13 when={toolPanel.layout()}>
|
|
7775
|
+
{(layout) => <Show13 when={toolPanelViews()}>
|
|
7152
7776
|
{(views) => {
|
|
7153
7777
|
const { ToolPanel, FilterManagementPanel, ColumnChooserPanel, SortManagementPanel } = untrack13(views);
|
|
7154
7778
|
return <ToolPanel
|
|
@@ -7207,13 +7831,13 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
7207
7831
|
</Switch>
|
|
7208
7832
|
</ToolPanel>;
|
|
7209
7833
|
}}
|
|
7210
|
-
</
|
|
7211
|
-
</
|
|
7212
|
-
</
|
|
7834
|
+
</Show13>}
|
|
7835
|
+
</Show13>}
|
|
7836
|
+
</Show13> : null}
|
|
7213
7837
|
{
|
|
7214
7838
|
/* セル / 行番号の右クリックメニュー(グリッドの外のポップアップ)。 */
|
|
7215
7839
|
}
|
|
7216
|
-
{contextMenu && contextMenuFeature2 ? <
|
|
7840
|
+
{contextMenu && contextMenuFeature2 ? <Show13 when={contextMenuView()}>
|
|
7217
7841
|
{(open) => <contextMenuFeature2.CellContextMenuPopover
|
|
7218
7842
|
items={open().items}
|
|
7219
7843
|
layout={open().layout}
|
|
@@ -7223,7 +7847,7 @@ function GridShellBody(props, features, mountGate, mode) {
|
|
|
7223
7847
|
themeClassName={portalClassName()}
|
|
7224
7848
|
slots={slots()}
|
|
7225
7849
|
/>}
|
|
7226
|
-
</
|
|
7850
|
+
</Show13> : null}
|
|
7227
7851
|
{
|
|
7228
7852
|
/* フィルハンドルの埋めたあとのメニュー / ドラッグ中の値のツールチップ(グリッドの外のポップアップ)。 */
|
|
7229
7853
|
}
|
|
@@ -7316,7 +7940,7 @@ import {
|
|
|
7316
7940
|
import { DEFAULT_COLUMN_GROUPS_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
7317
7941
|
|
|
7318
7942
|
// src/view/GridColumnGroupHeader.tsx
|
|
7319
|
-
import { For as
|
|
7943
|
+
import { For as For7, Show as Show14, createMemo as createMemo11 } from "solid-js";
|
|
7320
7944
|
import {
|
|
7321
7945
|
createColumnGroupResize,
|
|
7322
7946
|
resolveColumnGroupCells
|
|
@@ -7362,7 +7986,7 @@ function GridColumnGroupHeader(props) {
|
|
|
7362
7986
|
return result.map((levelCells, level) => ({ level, cells: levelCells })).filter((entry) => entry.cells.length > 0);
|
|
7363
7987
|
});
|
|
7364
7988
|
return <div data-pane={props.pane} class="ssg-col-group-block" style={{ height: px(tree().depth * props.groupRowHeight) }}>
|
|
7365
|
-
<
|
|
7989
|
+
<For7 each={levels()} keyed={(entry) => entry.level}>
|
|
7366
7990
|
{(entry) => (
|
|
7367
7991
|
// 段ごとに 1 行(3 ペインの同じ段は同じ行番号)。
|
|
7368
7992
|
<div
|
|
@@ -7371,7 +7995,7 @@ function GridColumnGroupHeader(props) {
|
|
|
7371
7995
|
class="ssg-col-group-row"
|
|
7372
7996
|
style={{ top: px(entry().level * props.groupRowHeight), height: px(props.groupRowHeight) }}
|
|
7373
7997
|
>
|
|
7374
|
-
<
|
|
7998
|
+
<For7 each={entry().cells} keyed={(cell) => cell.id}>
|
|
7375
7999
|
{(cell) => {
|
|
7376
8000
|
const group = createMemo11(() => cell().group);
|
|
7377
8001
|
const definition = createMemo11(() => group().definition);
|
|
@@ -7438,7 +8062,7 @@ function GridColumnGroupHeader(props) {
|
|
|
7438
8062
|
>
|
|
7439
8063
|
{definition().renderHeader ? definition().renderHeader?.(context) : title()}
|
|
7440
8064
|
</span>
|
|
7441
|
-
<
|
|
8065
|
+
<Show14 when={group().collapsible}>
|
|
7442
8066
|
<button
|
|
7443
8067
|
type="button"
|
|
7444
8068
|
tabindex={-1}
|
|
@@ -7470,8 +8094,8 @@ function GridColumnGroupHeader(props) {
|
|
|
7470
8094
|
/>
|
|
7471
8095
|
</svg>
|
|
7472
8096
|
</button>
|
|
7473
|
-
</
|
|
7474
|
-
<
|
|
8097
|
+
</Show14>
|
|
8098
|
+
<Show14 when={props.onGripPointerDown}>
|
|
7475
8099
|
{(handler) => <span
|
|
7476
8100
|
aria-hidden="true"
|
|
7477
8101
|
class="ssg-header-grip ssg-col-group-grip"
|
|
@@ -7487,17 +8111,17 @@ function GridColumnGroupHeader(props) {
|
|
|
7487
8111
|
<circle cx="6" cy="11" r="1" />
|
|
7488
8112
|
</svg>
|
|
7489
8113
|
</span>}
|
|
7490
|
-
</
|
|
8114
|
+
</Show14>
|
|
7491
8115
|
</div>
|
|
7492
|
-
<
|
|
8116
|
+
<Show14 when={resize()}>
|
|
7493
8117
|
{(value) => <div class="ssg-header-resize" onPointerDown={(event) => props.onResizePointerDown(value(), event)} />}
|
|
7494
|
-
</
|
|
8118
|
+
</Show14>
|
|
7495
8119
|
</div>;
|
|
7496
8120
|
}}
|
|
7497
|
-
</
|
|
8121
|
+
</For7>
|
|
7498
8122
|
</div>
|
|
7499
8123
|
)}
|
|
7500
|
-
</
|
|
8124
|
+
</For7>
|
|
7501
8125
|
</div>;
|
|
7502
8126
|
}
|
|
7503
8127
|
|
|
@@ -7556,7 +8180,7 @@ function createColumnMenu(inputs) {
|
|
|
7556
8180
|
}
|
|
7557
8181
|
|
|
7558
8182
|
// src/view/ColumnMenuPopover.tsx
|
|
7559
|
-
import { For as
|
|
8183
|
+
import { For as For8, Show as Show15, createEffect as createEffect5, createMemo as createMemo13, createSignal as createSignal10, createUniqueId as createUniqueId4, onCleanup as onCleanup9 } from "solid-js";
|
|
7560
8184
|
import { Portal as Portal2 } from "@solidjs/web";
|
|
7561
8185
|
var PINNED_ITEMS = [
|
|
7562
8186
|
{ value: void 0, label: "menuPinNone" },
|
|
@@ -7659,7 +8283,7 @@ function ColumnMenuPopover(props) {
|
|
|
7659
8283
|
props.slots?.menuItem?.className
|
|
7660
8284
|
];
|
|
7661
8285
|
const itemStyle = () => props.slots?.menuItem?.style;
|
|
7662
|
-
return <
|
|
8286
|
+
return <Show15 when={container}>
|
|
7663
8287
|
{(mount) => <Portal2 mount={mount()}>
|
|
7664
8288
|
<div
|
|
7665
8289
|
ref={(node) => {
|
|
@@ -7692,8 +8316,8 @@ function ColumnMenuPopover(props) {
|
|
|
7692
8316
|
{
|
|
7693
8317
|
/* 列のグループの開閉(1.6.0 の実アプリの点検 G5-02)。 */
|
|
7694
8318
|
}
|
|
7695
|
-
<
|
|
7696
|
-
<
|
|
8319
|
+
<Show15 when={props.onToggleColumnGroup !== void 0 && (props.columnGroupToggles?.length ?? 0) > 0}>
|
|
8320
|
+
<For8 each={props.columnGroupToggles ?? []} keyed={(toggle) => toggle.key}>
|
|
7697
8321
|
{(toggle) => <button
|
|
7698
8322
|
type="button"
|
|
7699
8323
|
role="menuitem"
|
|
@@ -7705,11 +8329,11 @@ function ColumnMenuPopover(props) {
|
|
|
7705
8329
|
<span class="ssg-menu-icon" />
|
|
7706
8330
|
<span class="ssg-menu-label">{toggle().label}</span>
|
|
7707
8331
|
</button>}
|
|
7708
|
-
</
|
|
8332
|
+
</For8>
|
|
7709
8333
|
<div role="separator" class="ssg-menu-separator" />
|
|
7710
|
-
</
|
|
8334
|
+
</Show15>
|
|
7711
8335
|
|
|
7712
|
-
<
|
|
8336
|
+
<Show15 when={props.canFilter}>
|
|
7713
8337
|
<button
|
|
7714
8338
|
type="button"
|
|
7715
8339
|
role="menuitem"
|
|
@@ -7722,9 +8346,9 @@ function ColumnMenuPopover(props) {
|
|
|
7722
8346
|
<span class="ssg-menu-label">{texts().menuFilter}</span>
|
|
7723
8347
|
</button>
|
|
7724
8348
|
<div role="separator" class="ssg-menu-separator" />
|
|
7725
|
-
</
|
|
8349
|
+
</Show15>
|
|
7726
8350
|
|
|
7727
|
-
<
|
|
8351
|
+
<Show15 when={props.canSort}>
|
|
7728
8352
|
<SortItem
|
|
7729
8353
|
direction="asc"
|
|
7730
8354
|
sortDirection={props.sortDirection}
|
|
@@ -7743,7 +8367,7 @@ function ColumnMenuPopover(props) {
|
|
|
7743
8367
|
class={itemClass()}
|
|
7744
8368
|
style={itemStyle()}
|
|
7745
8369
|
/>
|
|
7746
|
-
<
|
|
8370
|
+
<Show15 when={props.onOpenSortManager}>
|
|
7747
8371
|
{(open) => <button
|
|
7748
8372
|
type="button"
|
|
7749
8373
|
role="menuitem"
|
|
@@ -7755,10 +8379,10 @@ function ColumnMenuPopover(props) {
|
|
|
7755
8379
|
<span class="ssg-menu-icon" />
|
|
7756
8380
|
<span class="ssg-menu-label">{texts().menuManageSort}</span>
|
|
7757
8381
|
</button>}
|
|
7758
|
-
</
|
|
7759
|
-
</
|
|
8382
|
+
</Show15>
|
|
8383
|
+
</Show15>
|
|
7760
8384
|
|
|
7761
|
-
<
|
|
8385
|
+
<Show15 when={props.canManageFilters ? props.onOpenFilterManager : void 0}>
|
|
7762
8386
|
{(open) => <button
|
|
7763
8387
|
type="button"
|
|
7764
8388
|
role="menuitem"
|
|
@@ -7770,16 +8394,16 @@ function ColumnMenuPopover(props) {
|
|
|
7770
8394
|
<span class="ssg-menu-icon" />
|
|
7771
8395
|
<span class="ssg-menu-label">{texts().menuManageFilters}</span>
|
|
7772
8396
|
</button>}
|
|
7773
|
-
</
|
|
8397
|
+
</Show15>
|
|
7774
8398
|
|
|
7775
8399
|
{
|
|
7776
8400
|
/* 区切りは、並び替えの項目かフィルターを管理…のどちらかが出ているとき。 */
|
|
7777
8401
|
}
|
|
7778
|
-
<
|
|
8402
|
+
<Show15 when={props.canSort || props.canManageFilters && props.onOpenFilterManager !== void 0}>
|
|
7779
8403
|
<div role="separator" class="ssg-menu-separator" />
|
|
7780
|
-
</
|
|
8404
|
+
</Show15>
|
|
7781
8405
|
|
|
7782
|
-
<
|
|
8406
|
+
<Show15 when={props.onGroupByColumn}>
|
|
7783
8407
|
{(groupBy) => <button
|
|
7784
8408
|
type="button"
|
|
7785
8409
|
role="menuitem"
|
|
@@ -7791,8 +8415,8 @@ function ColumnMenuPopover(props) {
|
|
|
7791
8415
|
<span class="ssg-menu-icon" />
|
|
7792
8416
|
<span class="ssg-menu-label">{texts().menuGroupBy}</span>
|
|
7793
8417
|
</button>}
|
|
7794
|
-
</
|
|
7795
|
-
<
|
|
8418
|
+
</Show15>
|
|
8419
|
+
<Show15 when={props.onUngroup}>
|
|
7796
8420
|
{(ungroup) => <button
|
|
7797
8421
|
type="button"
|
|
7798
8422
|
role="menuitem"
|
|
@@ -7804,10 +8428,10 @@ function ColumnMenuPopover(props) {
|
|
|
7804
8428
|
<span class="ssg-menu-icon" />
|
|
7805
8429
|
<span class="ssg-menu-label">{texts().menuUngroup}</span>
|
|
7806
8430
|
</button>}
|
|
7807
|
-
</
|
|
7808
|
-
<
|
|
8431
|
+
</Show15>
|
|
8432
|
+
<Show15 when={props.onGroupByColumn !== void 0 || props.onUngroup !== void 0}>
|
|
7809
8433
|
<div role="separator" class="ssg-menu-separator" />
|
|
7810
|
-
</
|
|
8434
|
+
</Show15>
|
|
7811
8435
|
|
|
7812
8436
|
{
|
|
7813
8437
|
/* 列の固定 ›(小メニューはこの行 = position: relative を基準に置く。パネルの子孫なので外側の押下の判定にも入る)。 */
|
|
@@ -7868,7 +8492,7 @@ function ColumnMenuPopover(props) {
|
|
|
7868
8492
|
›
|
|
7869
8493
|
</span>
|
|
7870
8494
|
</button>
|
|
7871
|
-
<
|
|
8495
|
+
<Show15 when={isPinSubmenuOpen()}>
|
|
7872
8496
|
<div
|
|
7873
8497
|
ref={(node) => {
|
|
7874
8498
|
pinSubmenuElement = node;
|
|
@@ -7887,7 +8511,7 @@ function ColumnMenuPopover(props) {
|
|
|
7887
8511
|
pinButton?.focus();
|
|
7888
8512
|
}}
|
|
7889
8513
|
>
|
|
7890
|
-
<
|
|
8514
|
+
<For8 each={PINNED_ITEMS}>
|
|
7891
8515
|
{(item) => {
|
|
7892
8516
|
const isSelected = () => props.pinned === item.value;
|
|
7893
8517
|
return <button
|
|
@@ -7911,17 +8535,17 @@ function ColumnMenuPopover(props) {
|
|
|
7911
8535
|
<span class="ssg-menu-label">{texts()[item.label]}</span>
|
|
7912
8536
|
</button>;
|
|
7913
8537
|
}}
|
|
7914
|
-
</
|
|
7915
|
-
<
|
|
8538
|
+
</For8>
|
|
8539
|
+
<Show15 when={!props.canChangePinned}>
|
|
7916
8540
|
<div id={pinNoteId} role="none" class="ssg-menu-note">
|
|
7917
8541
|
{texts().menuPinUnavailable}
|
|
7918
8542
|
</div>
|
|
7919
|
-
</
|
|
8543
|
+
</Show15>
|
|
7920
8544
|
</div>
|
|
7921
|
-
</
|
|
8545
|
+
</Show15>
|
|
7922
8546
|
</div>
|
|
7923
8547
|
|
|
7924
|
-
<
|
|
8548
|
+
<Show15 when={props.onAutosizeColumn && props.onAutosizeAllColumns}>
|
|
7925
8549
|
<button
|
|
7926
8550
|
type="button"
|
|
7927
8551
|
role="menuitem"
|
|
@@ -7944,9 +8568,9 @@ function ColumnMenuPopover(props) {
|
|
|
7944
8568
|
<span class="ssg-menu-icon" />
|
|
7945
8569
|
<span class="ssg-menu-label">{texts().menuAutosizeAll}</span>
|
|
7946
8570
|
</button>
|
|
7947
|
-
</
|
|
8571
|
+
</Show15>
|
|
7948
8572
|
|
|
7949
|
-
<
|
|
8573
|
+
<Show15 when={props.onOpenColumnChooser}>
|
|
7950
8574
|
{(open) => <button
|
|
7951
8575
|
type="button"
|
|
7952
8576
|
role="menuitem"
|
|
@@ -7958,7 +8582,7 @@ function ColumnMenuPopover(props) {
|
|
|
7958
8582
|
<span class="ssg-menu-icon" />
|
|
7959
8583
|
<span class="ssg-menu-label">{texts().menuColumns}</span>
|
|
7960
8584
|
</button>}
|
|
7961
|
-
</
|
|
8585
|
+
</Show15>
|
|
7962
8586
|
|
|
7963
8587
|
<button
|
|
7964
8588
|
type="button"
|
|
@@ -7986,7 +8610,7 @@ function ColumnMenuPopover(props) {
|
|
|
7986
8610
|
</div>
|
|
7987
8611
|
</div>
|
|
7988
8612
|
</Portal2>}
|
|
7989
|
-
</
|
|
8613
|
+
</Show15>;
|
|
7990
8614
|
}
|
|
7991
8615
|
function SortItem(props) {
|
|
7992
8616
|
const active = () => props.sortDirection === props.direction;
|
|
@@ -8065,7 +8689,7 @@ import {
|
|
|
8065
8689
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/conditionalFormat";
|
|
8066
8690
|
|
|
8067
8691
|
// src/view/GridChip.tsx
|
|
8068
|
-
import { Show as
|
|
8692
|
+
import { Show as Show16 } from "solid-js";
|
|
8069
8693
|
import { resolveChipTone } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/conditionalFormat";
|
|
8070
8694
|
var SVG_NOT_FOCUSABLE3 = { focusable: "false" };
|
|
8071
8695
|
var ICON_PATHS = {
|
|
@@ -8091,7 +8715,7 @@ function GridChip(props) {
|
|
|
8091
8715
|
class={["ssg-chip", custom() ? "ssg-chip--custom" : `ssg-chip--${tone()}`]}
|
|
8092
8716
|
style={custom() ? { "--ssg-cf-chip-color": props.spec.color } : void 0}
|
|
8093
8717
|
>
|
|
8094
|
-
<
|
|
8718
|
+
<Show16 when={props.spec.icon !== false}>
|
|
8095
8719
|
<span class="ssg-chip-icon" aria-hidden="true">
|
|
8096
8720
|
<svg
|
|
8097
8721
|
viewBox="0 0 12 12"
|
|
@@ -8105,7 +8729,7 @@ function GridChip(props) {
|
|
|
8105
8729
|
{ICON_PATHS[tone()]()}
|
|
8106
8730
|
</svg>
|
|
8107
8731
|
</span>
|
|
8108
|
-
</
|
|
8732
|
+
</Show16>
|
|
8109
8733
|
<span class="ssg-chip-label">{props.children}</span>
|
|
8110
8734
|
</span>;
|
|
8111
8735
|
}
|
|
@@ -8145,7 +8769,7 @@ function createCellContextMenu(inputs) {
|
|
|
8145
8769
|
}
|
|
8146
8770
|
|
|
8147
8771
|
// src/view/CellContextMenuPopover.tsx
|
|
8148
|
-
import { For as
|
|
8772
|
+
import { For as For9, Match as Match2, Show as Show17, Switch as Switch2, createMemo as createMemo15, createSignal as createSignal11, onCleanup as onCleanup10 } from "solid-js";
|
|
8149
8773
|
import { Portal as Portal3 } from "@solidjs/web";
|
|
8150
8774
|
function CellContextMenuPopover(props) {
|
|
8151
8775
|
const portal = useGridPortal();
|
|
@@ -8158,7 +8782,7 @@ function CellContextMenuPopover(props) {
|
|
|
8158
8782
|
}
|
|
8159
8783
|
});
|
|
8160
8784
|
const layout = createMemo15(() => props.layout);
|
|
8161
|
-
const element = <
|
|
8785
|
+
const element = <Show17 when={container}>
|
|
8162
8786
|
{(mount) => <Portal3 mount={mount()}>
|
|
8163
8787
|
<div
|
|
8164
8788
|
ref={(node) => {
|
|
@@ -8184,7 +8808,7 @@ function CellContextMenuPopover(props) {
|
|
|
8184
8808
|
...layout().maxHeight !== void 0 ? { "max-height": px(layout().maxHeight ?? 0), "overflow-y": "auto" } : null
|
|
8185
8809
|
}}
|
|
8186
8810
|
>
|
|
8187
|
-
<
|
|
8811
|
+
<For9 each={props.items}>
|
|
8188
8812
|
{(item) => <Switch2
|
|
8189
8813
|
fallback={
|
|
8190
8814
|
// action(kind 省略 or 'action')。押すと onSelect の後に閉じる。disabled は button の disabled で押せない。
|
|
@@ -8216,10 +8840,10 @@ function CellContextMenuPopover(props) {
|
|
|
8216
8840
|
{(custom) => <div role="none">{custom().render({ close: props.onRequestClose })}</div>}
|
|
8217
8841
|
</Match2>
|
|
8218
8842
|
</Switch2>}
|
|
8219
|
-
</
|
|
8843
|
+
</For9>
|
|
8220
8844
|
</div>
|
|
8221
8845
|
</Portal3>}
|
|
8222
|
-
</
|
|
8846
|
+
</Show17>;
|
|
8223
8847
|
createPortalTokens(panel, () => props.themeClassName, layout);
|
|
8224
8848
|
return element;
|
|
8225
8849
|
}
|
|
@@ -8437,7 +9061,7 @@ function createFillHandle(inputs) {
|
|
|
8437
9061
|
}
|
|
8438
9062
|
|
|
8439
9063
|
// src/view/FillHandleLayer.tsx
|
|
8440
|
-
import { For as
|
|
9064
|
+
import { For as For10, Show as Show18, createEffect as createEffect7, createMemo as createMemo17, createSignal as createSignal12, onCleanup as onCleanup11 } from "solid-js";
|
|
8441
9065
|
import { Portal as Portal4 } from "@solidjs/web";
|
|
8442
9066
|
import { formatLocaleText as formatLocaleText8 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
8443
9067
|
import { getActiveElement } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/shadowDom";
|
|
@@ -8459,7 +9083,7 @@ function FillHandleLayer(props) {
|
|
|
8459
9083
|
{
|
|
8460
9084
|
/* ドラッグ中の埋める範囲の点線。 */
|
|
8461
9085
|
}
|
|
8462
|
-
<
|
|
9086
|
+
<For10 each={props.fill.previewRects(props.pane)} keyed={false}>
|
|
8463
9087
|
{(rect) => <div
|
|
8464
9088
|
class="ssg-fill-preview"
|
|
8465
9089
|
style={{
|
|
@@ -8471,11 +9095,11 @@ function FillHandleLayer(props) {
|
|
|
8471
9095
|
}}
|
|
8472
9096
|
data-ssg-fill-preview=""
|
|
8473
9097
|
/>}
|
|
8474
|
-
</
|
|
9098
|
+
</For10>
|
|
8475
9099
|
{
|
|
8476
9100
|
/* 選択範囲の右下の四角。 */
|
|
8477
9101
|
}
|
|
8478
|
-
<
|
|
9102
|
+
<Show18 when={corner()}>
|
|
8479
9103
|
{(current) => <div
|
|
8480
9104
|
class="ssg-fill-handle"
|
|
8481
9105
|
style={{
|
|
@@ -8487,12 +9111,12 @@ function FillHandleLayer(props) {
|
|
|
8487
9111
|
aria-hidden="true"
|
|
8488
9112
|
onPointerDown={(event) => props.fill.controller.handlePointerDown(event)}
|
|
8489
9113
|
/>}
|
|
8490
|
-
</
|
|
9114
|
+
</Show18>
|
|
8491
9115
|
{
|
|
8492
9116
|
/* 埋めたあとのボタン(左上の位置)。 */
|
|
8493
9117
|
}
|
|
8494
|
-
<
|
|
8495
|
-
{(snapshot2) => <
|
|
9118
|
+
<Show18 when={filled()}>
|
|
9119
|
+
{(snapshot2) => <Show18 when={chip()}>
|
|
8496
9120
|
{(position) => <FillOptionsChip
|
|
8497
9121
|
fill={props.fill}
|
|
8498
9122
|
x={props.leadingWidth + position().x}
|
|
@@ -8500,8 +9124,8 @@ function FillHandleLayer(props) {
|
|
|
8500
9124
|
kind={snapshot2().kind}
|
|
8501
9125
|
menuOpen={snapshot2().menu !== null}
|
|
8502
9126
|
/>}
|
|
8503
|
-
</
|
|
8504
|
-
</
|
|
9127
|
+
</Show18>}
|
|
9128
|
+
</Show18>
|
|
8505
9129
|
</>;
|
|
8506
9130
|
}
|
|
8507
9131
|
function FillOptionsChip(props) {
|
|
@@ -8588,7 +9212,7 @@ function FillOptionsMenu(props) {
|
|
|
8588
9212
|
}
|
|
8589
9213
|
event.stopPropagation();
|
|
8590
9214
|
};
|
|
8591
|
-
const element = <
|
|
9215
|
+
const element = <Show18 when={container}>
|
|
8592
9216
|
{(mount) => <Portal4 mount={mount()}>
|
|
8593
9217
|
<div
|
|
8594
9218
|
ref={(node) => {
|
|
@@ -8604,7 +9228,7 @@ function FillOptionsMenu(props) {
|
|
|
8604
9228
|
onKeyDown={handleKeyDown}
|
|
8605
9229
|
onContextMenu={(event) => event.preventDefault()}
|
|
8606
9230
|
>
|
|
8607
|
-
<
|
|
9231
|
+
<For10 each={MENU_ITEMS}>
|
|
8608
9232
|
{(item) => {
|
|
8609
9233
|
const disabled = () => item.kind === "series" && !props.seriesAvailable;
|
|
8610
9234
|
const checked = () => item.kind === props.kind;
|
|
@@ -8623,10 +9247,10 @@ function FillOptionsMenu(props) {
|
|
|
8623
9247
|
<span class="ssg-menu-label">{texts()[item.label]}</span>
|
|
8624
9248
|
</button>;
|
|
8625
9249
|
}}
|
|
8626
|
-
</
|
|
9250
|
+
</For10>
|
|
8627
9251
|
</div>
|
|
8628
9252
|
</Portal4>}
|
|
8629
|
-
</
|
|
9253
|
+
</Show18>;
|
|
8630
9254
|
createPortalTokens(panel, () => props.themeClassName, () => null);
|
|
8631
9255
|
return element;
|
|
8632
9256
|
}
|
|
@@ -8641,7 +9265,7 @@ function FillTooltip(props) {
|
|
|
8641
9265
|
const visible = createMemo17(() => pointer() !== null);
|
|
8642
9266
|
const container = createMemo17(() => visible() ? portal.container() : null);
|
|
8643
9267
|
const [tooltip, setTooltip] = createSignal12();
|
|
8644
|
-
const element = <
|
|
9268
|
+
const element = <Show18 when={container()}>
|
|
8645
9269
|
{(mount) => <Portal4 mount={mount()}>
|
|
8646
9270
|
<div
|
|
8647
9271
|
ref={setTooltip}
|
|
@@ -8656,7 +9280,7 @@ function FillTooltip(props) {
|
|
|
8656
9280
|
{props.text}
|
|
8657
9281
|
</div>
|
|
8658
9282
|
</Portal4>}
|
|
8659
|
-
</
|
|
9283
|
+
</Show18>;
|
|
8660
9284
|
createPortalTokens(tooltip, () => props.themeClassName, () => null);
|
|
8661
9285
|
return element;
|
|
8662
9286
|
}
|
|
@@ -8670,8 +9294,8 @@ function FillHandlePortals(props) {
|
|
|
8670
9294
|
return snapshot2.status === "dragging" ? snapshot2.previewText : null;
|
|
8671
9295
|
});
|
|
8672
9296
|
return <>
|
|
8673
|
-
<
|
|
8674
|
-
{(snapshot2) => <
|
|
9297
|
+
<Show18 when={menu()}>
|
|
9298
|
+
{(snapshot2) => <Show18 when={snapshot2().menu}>
|
|
8675
9299
|
{(layout) => <FillOptionsMenu
|
|
8676
9300
|
fill={props.fill}
|
|
8677
9301
|
layout={layout()}
|
|
@@ -8679,11 +9303,11 @@ function FillHandlePortals(props) {
|
|
|
8679
9303
|
seriesAvailable={snapshot2().seriesAvailable}
|
|
8680
9304
|
themeClassName={props.themeClassName}
|
|
8681
9305
|
/>}
|
|
8682
|
-
</
|
|
8683
|
-
</
|
|
8684
|
-
<
|
|
9306
|
+
</Show18>}
|
|
9307
|
+
</Show18>
|
|
9308
|
+
<Show18 when={tooltipText() !== null}>
|
|
8685
9309
|
<FillTooltip fill={props.fill} text={tooltipText() ?? ""} themeClassName={props.themeClassName} />
|
|
8686
|
-
</
|
|
9310
|
+
</Show18>
|
|
8687
9311
|
</>;
|
|
8688
9312
|
}
|
|
8689
9313
|
|
|
@@ -8993,7 +9617,7 @@ function createFilterManagement(inputs) {
|
|
|
8993
9617
|
}
|
|
8994
9618
|
|
|
8995
9619
|
// src/view/ColumnFilterPopoverHost.tsx
|
|
8996
|
-
import { Show as
|
|
9620
|
+
import { Show as Show19, createMemo as createMemo21, untrack as untrack16 } from "solid-js";
|
|
8997
9621
|
import {
|
|
8998
9622
|
createFilterPopoverCommands,
|
|
8999
9623
|
createFilterPopoverDerivedResolver
|
|
@@ -9169,12 +9793,12 @@ function ColumnFilterPopoverHost(props) {
|
|
|
9169
9793
|
columnKey
|
|
9170
9794
|
});
|
|
9171
9795
|
});
|
|
9172
|
-
return <
|
|
9173
|
-
{(column) => <
|
|
9174
|
-
{(layout) => <
|
|
9796
|
+
return <Show19 when={openedColumn()}>
|
|
9797
|
+
{(column) => <Show19 when={filterPopover.layout()}>
|
|
9798
|
+
{(layout) => <Show19 when={props.views()}>
|
|
9175
9799
|
{(views) => {
|
|
9176
9800
|
const ColumnFilterPopover = untrack16(views).ColumnFilterPopover;
|
|
9177
|
-
return <
|
|
9801
|
+
return <Show19 when={column().key} keyed>
|
|
9178
9802
|
{(columnKey) => <ColumnFilterPopover
|
|
9179
9803
|
popoverSlot={props.popoverSlot}
|
|
9180
9804
|
themeClassName={props.themeClassName}
|
|
@@ -9215,22 +9839,22 @@ function ColumnFilterPopoverHost(props) {
|
|
|
9215
9839
|
onSetClear={commands.clearSetFilterPopoverValue}
|
|
9216
9840
|
onSetReplaceSelection={commands.handleSetFilterReplaceSelection}
|
|
9217
9841
|
/>}
|
|
9218
|
-
</
|
|
9842
|
+
</Show19>;
|
|
9219
9843
|
}}
|
|
9220
|
-
</
|
|
9221
|
-
</
|
|
9222
|
-
</
|
|
9844
|
+
</Show19>}
|
|
9845
|
+
</Show19>}
|
|
9846
|
+
</Show19>;
|
|
9223
9847
|
}
|
|
9224
9848
|
|
|
9225
9849
|
// src/view/GridFilterChipBar.tsx
|
|
9226
|
-
import { For as
|
|
9850
|
+
import { For as For11, Show as Show20, createUniqueId as createUniqueId5 } from "solid-js";
|
|
9227
9851
|
import { formatLocaleText as formatLocaleText11 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
9228
9852
|
function GridFilterChipBar(props) {
|
|
9229
9853
|
const texts = useFeatureLocaleText();
|
|
9230
9854
|
const chipIdBase = createUniqueId5();
|
|
9231
|
-
return <
|
|
9855
|
+
return <Show20 when={props.entries.length > 0}>
|
|
9232
9856
|
<div class={["ssg-filter-chip-bar", props.slot?.className]} style={props.slot?.style}>
|
|
9233
|
-
<
|
|
9857
|
+
<For11 each={props.entries} keyed={(entry) => entry.columnKey}>
|
|
9234
9858
|
{(entry, index) => <div class={entry().isHidden ? "ssg-filter-chip ssg-filter-chip--hidden" : "ssg-filter-chip"}>
|
|
9235
9859
|
<button
|
|
9236
9860
|
type="button"
|
|
@@ -9265,7 +9889,7 @@ function GridFilterChipBar(props) {
|
|
|
9265
9889
|
{formatLocaleText11(texts().filterEditFor, { column: entry().title })}
|
|
9266
9890
|
</span>
|
|
9267
9891
|
</div>}
|
|
9268
|
-
</
|
|
9892
|
+
</For11>
|
|
9269
9893
|
<button
|
|
9270
9894
|
type="button"
|
|
9271
9895
|
class="ssg-filter-chip-bar-clear-all"
|
|
@@ -9275,15 +9899,15 @@ function GridFilterChipBar(props) {
|
|
|
9275
9899
|
{texts().clearAll}
|
|
9276
9900
|
</button>
|
|
9277
9901
|
</div>
|
|
9278
|
-
</
|
|
9902
|
+
</Show20>;
|
|
9279
9903
|
}
|
|
9280
9904
|
|
|
9281
9905
|
// src/view/lazyPopups.ts
|
|
9282
9906
|
import { createEffect as createEffect8, createMemo as createMemo22 } from "solid-js";
|
|
9283
9907
|
import { createLazyModule } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/lazyModule";
|
|
9284
9908
|
import { scheduleIdleTask } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/scheduler";
|
|
9285
|
-
var filterPopoverModule = /* @__PURE__ */ createLazyModule(() => import("./chunks/ColumnFilterPopover-
|
|
9286
|
-
var toolPanelModule = /* @__PURE__ */ createLazyModule(() => import("./chunks/toolPanelViews-
|
|
9909
|
+
var filterPopoverModule = /* @__PURE__ */ createLazyModule(() => import("./chunks/ColumnFilterPopover-7COSTSPD.jsx"));
|
|
9910
|
+
var toolPanelModule = /* @__PURE__ */ createLazyModule(() => import("./chunks/toolPanelViews-WBFE4QVY.jsx"));
|
|
9287
9911
|
var dateEditorCalendarModule = /* @__PURE__ */ createLazyModule(() => import("./chunks/DateEditorCalendar-FVUNVD7Y.jsx"));
|
|
9288
9912
|
var preloadGridPopups = async () => {
|
|
9289
9913
|
await Promise.all([filterPopoverModule.load(), toolPanelModule.load(), dateEditorCalendarModule.load()]);
|
|
@@ -9348,7 +9972,7 @@ import { splitTextByFindRanges } from "@ishibashi0112/spreadsheet-grid-core/inte
|
|
|
9348
9972
|
import { DEFAULT_FIND_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
9349
9973
|
|
|
9350
9974
|
// src/view/GridFindBar.tsx
|
|
9351
|
-
import { Show as
|
|
9975
|
+
import { Show as Show21, createEffect as createEffect9, createRenderEffect as createRenderEffect6, createSignal as createSignal14, onSettled as onSettled7, untrack as untrack17 } from "solid-js";
|
|
9352
9976
|
import { isImeComposingKeyEvent as isImeComposingKeyEvent3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
|
|
9353
9977
|
function GridFindBar(props) {
|
|
9354
9978
|
const texts = useFeatureLocaleText();
|
|
@@ -9502,10 +10126,10 @@ function GridFindBar(props) {
|
|
|
9502
10126
|
}}
|
|
9503
10127
|
data-ssg-find-bar=""
|
|
9504
10128
|
>
|
|
9505
|
-
<
|
|
10129
|
+
<Show21 when={props.replaceParts} fallback={main()}>
|
|
9506
10130
|
{(parts) => <>
|
|
9507
10131
|
<div class="ssg-find-bar-row">{main(parts())}</div>
|
|
9508
|
-
<
|
|
10132
|
+
<Show21 when={props.replaceSnapshot?.expanded === true && props.replaceSnapshot}>
|
|
9509
10133
|
{(snapshot2) => {
|
|
9510
10134
|
const Section = untrack17(parts).FindReplaceSection;
|
|
9511
10135
|
return <Section
|
|
@@ -9518,9 +10142,9 @@ function GridFindBar(props) {
|
|
|
9518
10142
|
onClose={() => props.onClose()}
|
|
9519
10143
|
/>;
|
|
9520
10144
|
}}
|
|
9521
|
-
</
|
|
10145
|
+
</Show21>
|
|
9522
10146
|
</>}
|
|
9523
|
-
</
|
|
10147
|
+
</Show21>
|
|
9524
10148
|
</div>;
|
|
9525
10149
|
}
|
|
9526
10150
|
|
|
@@ -9537,7 +10161,7 @@ import { createFindReplaceController } from "@ishibashi0112/spreadsheet-grid-cor
|
|
|
9537
10161
|
import { DEFAULT_FIND_REPLACE_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
9538
10162
|
|
|
9539
10163
|
// src/view/GridFindReplace.tsx
|
|
9540
|
-
import { Show as
|
|
10164
|
+
import { Show as Show22, createRenderEffect as createRenderEffect7, createSignal as createSignal15, untrack as untrack18 } from "solid-js";
|
|
9541
10165
|
import { formatLocaleText as formatLocaleText12 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
9542
10166
|
import { isImeComposingKeyEvent as isImeComposingKeyEvent4 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
|
|
9543
10167
|
var describeFindReplaceNotice = (notice, texts) => {
|
|
@@ -9685,17 +10309,17 @@ function GridFindReplaceSection(props) {
|
|
|
9685
10309
|
/* 知らせのたびに文の要素を作り直します(同じ文が続いても読み上げに届く。React 版と同じ)。 */
|
|
9686
10310
|
}
|
|
9687
10311
|
<div class={["ssg-find-bar-message", { "ssg-find-bar-message--empty": message().length === 0 }]} aria-live="polite">
|
|
9688
|
-
<
|
|
10312
|
+
<Show22 when={props.snapshot.noticeId + 1} keyed>
|
|
9689
10313
|
{(noticeKey) => {
|
|
9690
10314
|
void noticeKey;
|
|
9691
10315
|
return <span>{message()}</span>;
|
|
9692
10316
|
}}
|
|
9693
|
-
</
|
|
10317
|
+
</Show22>
|
|
9694
10318
|
</div>
|
|
9695
10319
|
</>;
|
|
9696
10320
|
}
|
|
9697
10321
|
function GridFindScopeOverlay(props) {
|
|
9698
|
-
return <
|
|
10322
|
+
return <Show22 when={props.rect}>
|
|
9699
10323
|
{(rect) => <div
|
|
9700
10324
|
class="ssg-find-scope-overlay"
|
|
9701
10325
|
style={{
|
|
@@ -9707,7 +10331,7 @@ function GridFindScopeOverlay(props) {
|
|
|
9707
10331
|
}}
|
|
9708
10332
|
data-ssg-find-scope=""
|
|
9709
10333
|
/>}
|
|
9710
|
-
</
|
|
10334
|
+
</Show22>;
|
|
9711
10335
|
}
|
|
9712
10336
|
|
|
9713
10337
|
// src/features/findReplace.ts
|
|
@@ -9736,7 +10360,7 @@ import { buildGroupTree, flattenGroupTree } from "@ishibashi0112/spreadsheet-gri
|
|
|
9736
10360
|
import { DEFAULT_GROUPING_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
9737
10361
|
|
|
9738
10362
|
// src/view/GridBodyGroupRow.tsx
|
|
9739
|
-
import { For as
|
|
10363
|
+
import { For as For12, Show as Show23, createMemo as createMemo23 } from "solid-js";
|
|
9740
10364
|
import { GROUP_AUTO_COLUMN_KEY as GROUP_AUTO_COLUMN_KEY3 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/grouping";
|
|
9741
10365
|
import {
|
|
9742
10366
|
formatTotalRowCellText,
|
|
@@ -9766,7 +10390,7 @@ function GridBodyGroupRow(props) {
|
|
|
9766
10390
|
}}
|
|
9767
10391
|
onDblClick={() => props.onGroupToggle(props.groupRow.groupKey)}
|
|
9768
10392
|
>
|
|
9769
|
-
<
|
|
10393
|
+
<Show23 when={props.ownsRowHeader}>
|
|
9770
10394
|
<div
|
|
9771
10395
|
role={rowHeaderIsCell() ? "rowheader" : void 0}
|
|
9772
10396
|
aria-colindex={rowHeaderIsCell() ? 1 : void 0}
|
|
@@ -9789,10 +10413,10 @@ function GridBodyGroupRow(props) {
|
|
|
9789
10413
|
height: px(props.rowHeight)
|
|
9790
10414
|
}}
|
|
9791
10415
|
>
|
|
9792
|
-
{props.showRowCheckbox ? null : props.rowIndex + 1}
|
|
10416
|
+
{props.showRowCheckbox ? null : props.rowIndex + (props.rowNumberOffset ?? 0) + 1}
|
|
9793
10417
|
</div>
|
|
9794
|
-
</
|
|
9795
|
-
<
|
|
10418
|
+
</Show23>
|
|
10419
|
+
<For12 each={props.entries} keyed={(entry) => entry.column.key}>
|
|
9796
10420
|
{(entry) => {
|
|
9797
10421
|
const unbound = createMemo23(() => entry().column);
|
|
9798
10422
|
const column = () => unbound();
|
|
@@ -9834,19 +10458,19 @@ function GridBodyGroupRow(props) {
|
|
|
9834
10458
|
"z-index": 1
|
|
9835
10459
|
}}
|
|
9836
10460
|
>
|
|
9837
|
-
<
|
|
10461
|
+
<Show23
|
|
9838
10462
|
when={isAutoGroupColumn()}
|
|
9839
|
-
fallback={<
|
|
10463
|
+
fallback={<Show23 when={aggregate()}>
|
|
9840
10464
|
{(shown) => <span
|
|
9841
10465
|
class="ssg-group-value"
|
|
9842
10466
|
data-ssg-tooltip-overflow={shown().text !== "" ? shown().caption !== void 0 ? `${shown().caption} ${shown().text}` : shown().text : void 0}
|
|
9843
10467
|
>
|
|
9844
|
-
<
|
|
10468
|
+
<Show23 when={shown().caption !== void 0 && shown().text !== ""}>
|
|
9845
10469
|
<span class="ssg-group-caption">{shown().caption}</span>
|
|
9846
|
-
</
|
|
10470
|
+
</Show23>
|
|
9847
10471
|
{shown().text}
|
|
9848
10472
|
</span>}
|
|
9849
|
-
</
|
|
10473
|
+
</Show23>}
|
|
9850
10474
|
>
|
|
9851
10475
|
<span
|
|
9852
10476
|
aria-hidden="true"
|
|
@@ -9870,10 +10494,10 @@ function GridBodyGroupRow(props) {
|
|
|
9870
10494
|
<span class="ssg-group-count">
|
|
9871
10495
|
{formatLocaleText13(texts().groupRowCount, { count: formatTotalRowNumber(props.groupRow.leafCount) })}
|
|
9872
10496
|
</span>
|
|
9873
|
-
</
|
|
10497
|
+
</Show23>
|
|
9874
10498
|
</div>;
|
|
9875
10499
|
}}
|
|
9876
|
-
</
|
|
10500
|
+
</For12>
|
|
9877
10501
|
</div>;
|
|
9878
10502
|
}
|
|
9879
10503
|
|
|
@@ -9906,7 +10530,7 @@ import {
|
|
|
9906
10530
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/labelRows";
|
|
9907
10531
|
|
|
9908
10532
|
// src/view/GridBodyLabelRow.tsx
|
|
9909
|
-
import { Show as
|
|
10533
|
+
import { Show as Show24, createMemo as createMemo24 } from "solid-js";
|
|
9910
10534
|
var createLabelRowRenderContext = (labelRow, rowIndex, rowKey) => {
|
|
9911
10535
|
const row = createMemo24(() => labelRow().row);
|
|
9912
10536
|
const sourceRowIndex = createMemo24(() => labelRow().sourceIndex);
|
|
@@ -9936,7 +10560,7 @@ var createLabelRowRenderContext = (labelRow, rowIndex, rowKey) => {
|
|
|
9936
10560
|
function GridBodyLabelRow(props) {
|
|
9937
10561
|
const ctx = createLabelRowRenderContext(
|
|
9938
10562
|
() => props.labelRow,
|
|
9939
|
-
() => props.rowIndex,
|
|
10563
|
+
() => props.rowIndex + (props.rowIndexOffset ?? 0),
|
|
9940
10564
|
() => props.rowKey
|
|
9941
10565
|
);
|
|
9942
10566
|
return <div
|
|
@@ -9956,7 +10580,7 @@ function GridBodyLabelRow(props) {
|
|
|
9956
10580
|
transform: `translateY(${props.top}px)`
|
|
9957
10581
|
}}
|
|
9958
10582
|
>
|
|
9959
|
-
<
|
|
10583
|
+
<Show24 when={props.ownsRowHeader}>
|
|
9960
10584
|
<div
|
|
9961
10585
|
aria-hidden="true"
|
|
9962
10586
|
class={["ssg-header-cell", "ssg-row-header-cell", "ssg-row-header-cell--label", props.slots.rowHeaderCell?.className]}
|
|
@@ -9967,8 +10591,8 @@ function GridBodyLabelRow(props) {
|
|
|
9967
10591
|
height: px(props.rowHeight)
|
|
9968
10592
|
}}
|
|
9969
10593
|
/>
|
|
9970
|
-
</
|
|
9971
|
-
<
|
|
10594
|
+
</Show24>
|
|
10595
|
+
<Show24 when={props.renderContent}>
|
|
9972
10596
|
{(render) => <div
|
|
9973
10597
|
role="rowheader"
|
|
9974
10598
|
aria-colindex={1}
|
|
@@ -9982,17 +10606,17 @@ function GridBodyLabelRow(props) {
|
|
|
9982
10606
|
{render()(ctx)}
|
|
9983
10607
|
</div>
|
|
9984
10608
|
</div>}
|
|
9985
|
-
</
|
|
10609
|
+
</Show24>
|
|
9986
10610
|
</div>;
|
|
9987
10611
|
}
|
|
9988
10612
|
|
|
9989
10613
|
// src/view/GridStickyLabelLayer.tsx
|
|
9990
|
-
import { Show as
|
|
10614
|
+
import { Show as Show25, createMemo as createMemo25, onSettled as onSettled8 } from "solid-js";
|
|
9991
10615
|
var FOCUSABLE_SELECTOR = 'a[href], button, input, select, textarea, [tabindex], [contenteditable="true"]';
|
|
9992
10616
|
function GridStickyLabelLayer(props) {
|
|
9993
|
-
return <
|
|
10617
|
+
return <Show25 when={props.entry}>
|
|
9994
10618
|
{(entry) => <StickyLabel layer={props} entry={entry} />}
|
|
9995
|
-
</
|
|
10619
|
+
</Show25>;
|
|
9996
10620
|
}
|
|
9997
10621
|
function StickyLabel(props) {
|
|
9998
10622
|
const layer = props.layer;
|
|
@@ -10000,7 +10624,7 @@ function StickyLabel(props) {
|
|
|
10000
10624
|
const rowIndex = createMemo25(() => props.entry().rowIndex);
|
|
10001
10625
|
const rowKey = createMemo25(() => props.entry().rowKey);
|
|
10002
10626
|
const height = createMemo25(() => props.entry().height);
|
|
10003
|
-
const ctx = createLabelRowRenderContext(labelRow, rowIndex, rowKey);
|
|
10627
|
+
const ctx = createLabelRowRenderContext(labelRow, () => rowIndex() + (layer.rowIndexOffset ?? 0), rowKey);
|
|
10004
10628
|
let element;
|
|
10005
10629
|
onSettled8(() => {
|
|
10006
10630
|
const target = element;
|
|
@@ -10054,7 +10678,7 @@ function StickyLabel(props) {
|
|
|
10054
10678
|
...props.entry().pushOffset > 0 ? { transform: `translateY(${-props.entry().pushOffset}px)` } : null
|
|
10055
10679
|
}}
|
|
10056
10680
|
>
|
|
10057
|
-
<
|
|
10681
|
+
<Show25 when={layer.ownsRowHeader}>
|
|
10058
10682
|
<div
|
|
10059
10683
|
class={["ssg-header-cell", "ssg-row-header-cell", "ssg-row-header-cell--label", layer.slots.rowHeaderCell?.className]}
|
|
10060
10684
|
style={{
|
|
@@ -10064,8 +10688,8 @@ function StickyLabel(props) {
|
|
|
10064
10688
|
height: px(height())
|
|
10065
10689
|
}}
|
|
10066
10690
|
/>
|
|
10067
|
-
</
|
|
10068
|
-
<
|
|
10691
|
+
</Show25>
|
|
10692
|
+
<Show25 when={layer.renderContent}>
|
|
10069
10693
|
{(render) => <div
|
|
10070
10694
|
class="ssg-label-row-content-holder"
|
|
10071
10695
|
style={{ left: px(layer.contentStickyLeft), width: px(layer.contentWidth), height: px(height()) }}
|
|
@@ -10074,12 +10698,12 @@ function StickyLabel(props) {
|
|
|
10074
10698
|
class={["ssg-label-row-content", layer.slots.labelRowContent?.className]}
|
|
10075
10699
|
style={layer.slots.labelRowContent?.style}
|
|
10076
10700
|
>
|
|
10077
|
-
<
|
|
10701
|
+
<Show25 when={[rowKey(), render()]} keyed>
|
|
10078
10702
|
{([, renderContent]) => renderContent(ctx)}
|
|
10079
|
-
</
|
|
10703
|
+
</Show25>
|
|
10080
10704
|
</div>
|
|
10081
10705
|
</div>}
|
|
10082
|
-
</
|
|
10706
|
+
</Show25>
|
|
10083
10707
|
</div>
|
|
10084
10708
|
</div>
|
|
10085
10709
|
);
|
|
@@ -10158,7 +10782,7 @@ function createServerSide(args) {
|
|
|
10158
10782
|
}
|
|
10159
10783
|
|
|
10160
10784
|
// src/view/GridServerSideErrorBars.tsx
|
|
10161
|
-
import { Show as
|
|
10785
|
+
import { Show as Show26, createSignal as createSignal16 } from "solid-js";
|
|
10162
10786
|
import { formatLocaleText as formatLocaleText14 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
10163
10787
|
function GridServerSideErrorBars(props) {
|
|
10164
10788
|
const [dismissedLoadError, setDismissedLoadError] = createSignal16(null);
|
|
@@ -10166,9 +10790,9 @@ function GridServerSideErrorBars(props) {
|
|
|
10166
10790
|
const texts = () => props.localeTexts;
|
|
10167
10791
|
const shownLoadError = () => props.loadError !== null && props.loadError !== dismissedLoadError() ? props.loadError : null;
|
|
10168
10792
|
const shownWriteError = () => props.writeError !== null && props.writeError !== dismissedWriteError() ? props.writeError : null;
|
|
10169
|
-
return <
|
|
10793
|
+
return <Show26 when={shownLoadError() !== null || shownWriteError() !== null}>
|
|
10170
10794
|
<div class="ssg-ssrm-error-bars">
|
|
10171
|
-
<
|
|
10795
|
+
<Show26 when={shownLoadError()}>
|
|
10172
10796
|
{(loadError) => <div class={["ssg-ssrm-error-bar", props.slot?.className]} style={props.slot?.style} role="alert">
|
|
10173
10797
|
<span class="ssg-ssrm-error-bar-dot" aria-hidden="true" />
|
|
10174
10798
|
<span class="ssg-ssrm-error-bar-msg">
|
|
@@ -10186,8 +10810,8 @@ function GridServerSideErrorBars(props) {
|
|
|
10186
10810
|
×
|
|
10187
10811
|
</button>
|
|
10188
10812
|
</div>}
|
|
10189
|
-
</
|
|
10190
|
-
<
|
|
10813
|
+
</Show26>
|
|
10814
|
+
<Show26 when={shownWriteError()}>
|
|
10191
10815
|
{(writeError) => <div class={["ssg-ssrm-error-bar", props.slot?.className]} style={props.slot?.style} role="alert">
|
|
10192
10816
|
<span class="ssg-ssrm-error-bar-dot" aria-hidden="true" />
|
|
10193
10817
|
<span class="ssg-ssrm-error-bar-msg">
|
|
@@ -10202,89 +10826,9 @@ function GridServerSideErrorBars(props) {
|
|
|
10202
10826
|
×
|
|
10203
10827
|
</button>
|
|
10204
10828
|
</div>}
|
|
10205
|
-
</
|
|
10829
|
+
</Show26>
|
|
10206
10830
|
</div>
|
|
10207
|
-
</
|
|
10208
|
-
}
|
|
10209
|
-
|
|
10210
|
-
// src/view/GridBodySkeletonRow.tsx
|
|
10211
|
-
import { For as For12, Show as Show26 } from "solid-js";
|
|
10212
|
-
var SKELETON_BAR_WIDTHS = ["62%", "46%", "78%", "54%"];
|
|
10213
|
-
function GridBodySkeletonRow(props) {
|
|
10214
|
-
return <div
|
|
10215
|
-
data-pane={props.pane}
|
|
10216
|
-
data-row-index={props.rowIndex}
|
|
10217
|
-
data-skeleton-row=""
|
|
10218
|
-
role="row"
|
|
10219
|
-
aria-rowindex={props.rowIndex + 2 + props.ariaRowOffset}
|
|
10220
|
-
aria-busy="true"
|
|
10221
|
-
class={["ssg-body-row", props.slots.bodyRow?.className]}
|
|
10222
|
-
style={{
|
|
10223
|
-
...props.slots.bodyRow?.style,
|
|
10224
|
-
height: px(props.rowHeight),
|
|
10225
|
-
transform: `translateY(${props.top}px)`
|
|
10226
|
-
}}
|
|
10227
|
-
>
|
|
10228
|
-
<Show26 when={props.ownsRowHeader}>
|
|
10229
|
-
<div
|
|
10230
|
-
role="rowheader"
|
|
10231
|
-
aria-colindex={1}
|
|
10232
|
-
onPointerDown={(event) => props.onRowHeaderPointerDown(props.rowIndex, event)}
|
|
10233
|
-
onPointerEnter={(event) => props.onRowHeaderPointerEnter(props.rowIndex, event)}
|
|
10234
|
-
onPointerLeave={() => props.onRowHeaderPointerLeave(props.rowIndex)}
|
|
10235
|
-
class={[
|
|
10236
|
-
"ssg-header-cell",
|
|
10237
|
-
"ssg-row-header-cell",
|
|
10238
|
-
"ssg-skeleton-rowheader",
|
|
10239
|
-
{
|
|
10240
|
-
"ssg-row-header-cell--checkbox": props.showRowCheckbox,
|
|
10241
|
-
"ssg-header-cell--hovered": props.isRowHovered
|
|
10242
|
-
},
|
|
10243
|
-
props.slots.rowHeaderCell?.className
|
|
10244
|
-
]}
|
|
10245
|
-
style={{
|
|
10246
|
-
...props.slots.rowHeaderCell?.style,
|
|
10247
|
-
width: px(props.rowHeaderWidth),
|
|
10248
|
-
"min-width": px(props.rowHeaderWidth),
|
|
10249
|
-
height: px(props.rowHeight)
|
|
10250
|
-
}}
|
|
10251
|
-
>
|
|
10252
|
-
<Show26 when={props.showRowCheckbox} fallback={props.rowIndex + 1}>
|
|
10253
|
-
<RowSelectionCheckbox slot={props.slots.checkbox} state="unchecked" disabled />
|
|
10254
|
-
</Show26>
|
|
10255
|
-
</div>
|
|
10256
|
-
</Show26>
|
|
10257
|
-
<For12 each={props.entries} keyed={(entry) => entry.logicalIndex}>
|
|
10258
|
-
{(entry) => {
|
|
10259
|
-
const cell = () => ({ row: props.rowIndex, col: entry().logicalIndex });
|
|
10260
|
-
return <div
|
|
10261
|
-
role="gridcell"
|
|
10262
|
-
aria-colindex={entry().logicalIndex + 2}
|
|
10263
|
-
class={[
|
|
10264
|
-
"ssg-body-cell",
|
|
10265
|
-
{ "ssg-body-cell--row-hovered": props.isRowHovered },
|
|
10266
|
-
props.slots.bodyCell?.className
|
|
10267
|
-
]}
|
|
10268
|
-
onPointerDown={(event) => props.onCellPointerDown(cell(), event)}
|
|
10269
|
-
onPointerEnter={(event) => props.onCellPointerEnter(cell(), event)}
|
|
10270
|
-
style={{
|
|
10271
|
-
...props.slots.bodyCell?.style,
|
|
10272
|
-
left: px(props.leadingWidth + entry().paneLocalStart),
|
|
10273
|
-
width: px(entry().paneLocalSize),
|
|
10274
|
-
"min-width": px(entry().paneLocalSize),
|
|
10275
|
-
height: px(props.rowHeight),
|
|
10276
|
-
"z-index": 1
|
|
10277
|
-
}}
|
|
10278
|
-
>
|
|
10279
|
-
<div
|
|
10280
|
-
aria-hidden="true"
|
|
10281
|
-
class="ssg-skeleton-bar"
|
|
10282
|
-
style={{ width: SKELETON_BAR_WIDTHS[entry().logicalIndex % SKELETON_BAR_WIDTHS.length] }}
|
|
10283
|
-
/>
|
|
10284
|
-
</div>;
|
|
10285
|
-
}}
|
|
10286
|
-
</For12>
|
|
10287
|
-
</div>;
|
|
10831
|
+
</Show26>;
|
|
10288
10832
|
}
|
|
10289
10833
|
|
|
10290
10834
|
// src/features/serverSide.ts
|
|
@@ -10551,7 +11095,9 @@ function createRowDrag(inputs) {
|
|
|
10551
11095
|
const leftIndicatorRef = { current: null };
|
|
10552
11096
|
const centerIndicatorRef = { current: null };
|
|
10553
11097
|
const rightIndicatorRef = { current: null };
|
|
10554
|
-
const canDropAt = createMemo28(
|
|
11098
|
+
const canDropAt = createMemo28(
|
|
11099
|
+
() => createRowDropCheck(inputs.canDropRow(), inputs.rows(), inputs.resolveRowKey(), inputs.rowOffset?.() ?? 0)
|
|
11100
|
+
);
|
|
10555
11101
|
const getRowDragLabel = (viewIndex) => resolveRowDragLabel(untrack20(inputs.rowModel), untrack20(inputs.visibleColumns), viewIndex, untrack20(inputs.dragRowLabel));
|
|
10556
11102
|
const getDragRow = (viewIndex) => getDragRowToken(untrack20(inputs.rowModel), viewIndex);
|
|
10557
11103
|
const locateDragRow = createMemo28(() => {
|
|
@@ -10735,17 +11281,38 @@ function GridScrollHint(props) {
|
|
|
10735
11281
|
{ name: "scrollHintGutterWheel" }
|
|
10736
11282
|
);
|
|
10737
11283
|
const rulerHeight = () => Math.max(props.viewportHeight - props.headerHeight, 0);
|
|
10738
|
-
const
|
|
11284
|
+
const rowOffset = () => props.rowOffset ?? 0;
|
|
11285
|
+
const labelCount = createMemo29(() => {
|
|
11286
|
+
const labels = props.labelViewIndexes;
|
|
11287
|
+
if (!labels) {
|
|
11288
|
+
return 0;
|
|
11289
|
+
}
|
|
11290
|
+
const first = rowOffset();
|
|
11291
|
+
const end = first + props.rowMetrics.rowCount;
|
|
11292
|
+
let count = 0;
|
|
11293
|
+
for (let k = 0; k < labels.length; k += 1) {
|
|
11294
|
+
const index = labels[k] ?? -1;
|
|
11295
|
+
if (index >= first && index < end) {
|
|
11296
|
+
count += 1;
|
|
11297
|
+
}
|
|
11298
|
+
}
|
|
11299
|
+
return count;
|
|
11300
|
+
});
|
|
10739
11301
|
const dataRowCount = createMemo29(() => Math.max(props.rowMetrics.rowCount - labelCount(), 0));
|
|
10740
11302
|
const rowNumberOf = (viewIndex) => {
|
|
10741
11303
|
const labels = props.labelViewIndexes;
|
|
10742
|
-
return labels && labels.length > 0 ? resolveDataRowNumber3(labels, viewIndex) : viewIndex + 1;
|
|
11304
|
+
return labels && labels.length > 0 ? resolveDataRowNumber3(labels, viewIndex + rowOffset()) : viewIndex + rowOffset() + 1;
|
|
10743
11305
|
};
|
|
11306
|
+
const firstRowNumber = createMemo29(() => {
|
|
11307
|
+
const labels = props.labelViewIndexes;
|
|
11308
|
+
return labels && labels.length > 0 ? resolveDataRowNumber3(labels, rowOffset()) : rowOffset() + 1;
|
|
11309
|
+
});
|
|
10744
11310
|
const rulerTicks = createMemo29(
|
|
10745
11311
|
() => props.options.ruler ? computeScrollHintRulerTicks({
|
|
10746
11312
|
rowCount: dataRowCount(),
|
|
10747
11313
|
rulerHeight: rulerHeight(),
|
|
10748
|
-
tenThousands: texts().scrollHintTenThousands
|
|
11314
|
+
tenThousands: texts().scrollHintTenThousands,
|
|
11315
|
+
labelOffset: firstRowNumber() - 1
|
|
10749
11316
|
}) : []
|
|
10750
11317
|
);
|
|
10751
11318
|
const visible = () => props.options.trigger === "always" || scrollActive() || props.options.trigger === "hover" && hovered();
|
|
@@ -10763,7 +11330,8 @@ function GridScrollHint(props) {
|
|
|
10763
11330
|
return props.rowMetrics.rowAtContentY(logical);
|
|
10764
11331
|
});
|
|
10765
11332
|
const detailOf = (rowIndex) => resolveScrollHintDetail(props.options, {
|
|
10766
|
-
rowIndex
|
|
11333
|
+
// 変更(1.15.0 / ページ送り): renderHint の rowIndex は通し番号。
|
|
11334
|
+
rowIndex: rowIndex + rowOffset(),
|
|
10767
11335
|
rowData: props.rowModel.getRow(rowIndex)
|
|
10768
11336
|
});
|
|
10769
11337
|
const detail = createMemo29(() => detailOf(topRowIndex()));
|
|
@@ -10882,7 +11450,7 @@ function GridScrollHint(props) {
|
|
|
10882
11450
|
<span class="ssg-scroll-hint-bubble-main">
|
|
10883
11451
|
{formatLocaleText16(texts().scrollHintRow, { row: rowNumberOf(topRowIndex()).toLocaleString() })}
|
|
10884
11452
|
<span class="ssg-scroll-hint-bubble-total">
|
|
10885
|
-
{" "}/ {dataRowCount().toLocaleString()}
|
|
11453
|
+
{" "}/ {(props.totalDataRowCount ?? dataRowCount()).toLocaleString()}
|
|
10886
11454
|
</span>
|
|
10887
11455
|
</span>
|
|
10888
11456
|
<Show28 when={detail() !== null}>
|
|
@@ -11289,7 +11857,7 @@ function DateTimeCellEditor(props) {
|
|
|
11289
11857
|
onCommit={(value, direction) => props.onCommit(value, direction)}
|
|
11290
11858
|
onCancel={() => props.onCancel()}
|
|
11291
11859
|
onCommitToSelection={props.onCommitToSelection}
|
|
11292
|
-
onRegisterFlush={(
|
|
11860
|
+
onRegisterFlush={(flush2) => props.onRegisterFlush?.(flush2)}
|
|
11293
11861
|
align={props.align}
|
|
11294
11862
|
cellHeight={props.cellHeight}
|
|
11295
11863
|
alignTop={props.alignTop}
|
|
@@ -12263,6 +12831,166 @@ var rangeDecorationsFeature = {
|
|
|
12263
12831
|
RangeDecorationFrames: GridRangeDecorationFrames
|
|
12264
12832
|
};
|
|
12265
12833
|
|
|
12834
|
+
// src/features/pagination.ts
|
|
12835
|
+
import { createPaginationController } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/paginationController";
|
|
12836
|
+
import {
|
|
12837
|
+
resolveAutoPageSize,
|
|
12838
|
+
resolvePaginationOptions
|
|
12839
|
+
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/pagination";
|
|
12840
|
+
import { DEFAULT_PAGINATION_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
12841
|
+
|
|
12842
|
+
// src/view/GridPager.tsx
|
|
12843
|
+
import { For as For21, Show as Show35, createMemo as createMemo34, createSignal as createSignal21, createEffect as createEffect15 } from "solid-js";
|
|
12844
|
+
import { formatLocaleText as formatLocaleText18 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
12845
|
+
import {
|
|
12846
|
+
resolvePageRangeValues,
|
|
12847
|
+
resolvePageSizeChoices,
|
|
12848
|
+
resolvePagerItems,
|
|
12849
|
+
resolvePagerSizerTexts
|
|
12850
|
+
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/pagination";
|
|
12851
|
+
import { keepPagerFocus } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/pagerFocus";
|
|
12852
|
+
function GridPager(props) {
|
|
12853
|
+
const texts = useFeatureLocaleText();
|
|
12854
|
+
const rangeText = createMemo34(() => {
|
|
12855
|
+
const range = resolvePageRangeValues(props.info);
|
|
12856
|
+
if (range === null) {
|
|
12857
|
+
return props.loading === true ? texts().loadingRows : texts().pageRangeEmpty;
|
|
12858
|
+
}
|
|
12859
|
+
return formatLocaleText18(texts().pageRange, range);
|
|
12860
|
+
});
|
|
12861
|
+
const items = createMemo34(
|
|
12862
|
+
() => resolvePagerItems(props.info.page, props.info.pageCount).map((page, index) => ({
|
|
12863
|
+
key: page === null ? `gap-${index}` : `page-${page}`,
|
|
12864
|
+
page
|
|
12865
|
+
}))
|
|
12866
|
+
);
|
|
12867
|
+
const sizer = createMemo34(() => resolvePagerSizerTexts(props.info, texts()));
|
|
12868
|
+
const choices = createMemo34(() => resolvePageSizeChoices(props.info.pageSizeOptions, props.info.pageSize));
|
|
12869
|
+
const bindSize = createInputValue(() => String(props.info.pageSize));
|
|
12870
|
+
const [announcement, setAnnouncement] = createSignal21("");
|
|
12871
|
+
let announcedKey = null;
|
|
12872
|
+
createEffect15(
|
|
12873
|
+
() => [props.info.rowCount === 0 ? "" : `${props.info.page}:${props.info.pageSize}`, rangeText()],
|
|
12874
|
+
([key, text]) => {
|
|
12875
|
+
if (announcedKey !== null && announcedKey !== key && announcedKey !== "" && key !== "") {
|
|
12876
|
+
setAnnouncement(text);
|
|
12877
|
+
}
|
|
12878
|
+
announcedKey = key;
|
|
12879
|
+
}
|
|
12880
|
+
);
|
|
12881
|
+
let navElement;
|
|
12882
|
+
return <nav
|
|
12883
|
+
ref={(element) => {
|
|
12884
|
+
navElement = element;
|
|
12885
|
+
}}
|
|
12886
|
+
class={[
|
|
12887
|
+
"ssg-pager",
|
|
12888
|
+
`ssg-pager--${props.variant}`,
|
|
12889
|
+
{ "ssg-pager--with-counts": props.variant === "bar" && (props.withCounts ?? true) }
|
|
12890
|
+
]}
|
|
12891
|
+
aria-label={texts().paginationLabel}
|
|
12892
|
+
style={{ "--ssg-pager-digits": String(sizer().digits) }}
|
|
12893
|
+
>
|
|
12894
|
+
<span class="ssg-pager-range" data-ssg-pager-sizer={sizer().range}>
|
|
12895
|
+
<span>{rangeText()}</span>
|
|
12896
|
+
</span>
|
|
12897
|
+
<span class="ssg-pager-pages">
|
|
12898
|
+
<button
|
|
12899
|
+
type="button"
|
|
12900
|
+
class="ssg-pager-button ssg-pager-button--prev"
|
|
12901
|
+
aria-label={texts().previousPage}
|
|
12902
|
+
data-ssg-tooltip={texts().previousPage}
|
|
12903
|
+
disabled={props.info.page <= 0}
|
|
12904
|
+
onClick={() => {
|
|
12905
|
+
keepPagerFocus(navElement, "prev");
|
|
12906
|
+
props.info.setPage(props.info.page - 1);
|
|
12907
|
+
}}
|
|
12908
|
+
>
|
|
12909
|
+
<span aria-hidden="true">{"\u2039"}</span>
|
|
12910
|
+
</button>
|
|
12911
|
+
<For21 each={items()} keyed={(item) => item.key}>
|
|
12912
|
+
{(item) => <Show35
|
|
12913
|
+
when={item().page !== null}
|
|
12914
|
+
fallback={<span class="ssg-pager-gap" aria-hidden="true">
|
|
12915
|
+
{"\u2026"}
|
|
12916
|
+
</span>}
|
|
12917
|
+
>
|
|
12918
|
+
<button
|
|
12919
|
+
type="button"
|
|
12920
|
+
class="ssg-pager-button ssg-pager-button--page"
|
|
12921
|
+
aria-label={formatLocaleText18(texts().goToPage, { page: (item().page ?? 0) + 1 })}
|
|
12922
|
+
aria-current={item().page === props.info.page ? "page" : void 0}
|
|
12923
|
+
onClick={() => props.info.setPage(item().page ?? 0)}
|
|
12924
|
+
>
|
|
12925
|
+
{(item().page ?? 0) + 1}
|
|
12926
|
+
</button>
|
|
12927
|
+
</Show35>}
|
|
12928
|
+
</For21>
|
|
12929
|
+
<span class="ssg-pager-status" data-ssg-pager-sizer={sizer().status}>
|
|
12930
|
+
<span>{formatLocaleText18(texts().pageOfPages, { page: props.info.page + 1, pageCount: props.info.pageCount })}</span>
|
|
12931
|
+
</span>
|
|
12932
|
+
<button
|
|
12933
|
+
type="button"
|
|
12934
|
+
class="ssg-pager-button ssg-pager-button--next"
|
|
12935
|
+
aria-label={texts().nextPage}
|
|
12936
|
+
data-ssg-tooltip={texts().nextPage}
|
|
12937
|
+
disabled={props.info.page >= props.info.pageCount - 1}
|
|
12938
|
+
onClick={() => {
|
|
12939
|
+
keepPagerFocus(navElement, "next");
|
|
12940
|
+
props.info.setPage(props.info.page + 1);
|
|
12941
|
+
}}
|
|
12942
|
+
>
|
|
12943
|
+
<span aria-hidden="true">{"\u203A"}</span>
|
|
12944
|
+
</button>
|
|
12945
|
+
</span>
|
|
12946
|
+
<Show35 when={choices().length > 0}>
|
|
12947
|
+
<label class="ssg-pager-size">
|
|
12948
|
+
<span class="ssg-pager-size-label">{texts().pageSizeLabel}</span>
|
|
12949
|
+
<select
|
|
12950
|
+
ref={bindSize}
|
|
12951
|
+
class="ssg-pager-size-select"
|
|
12952
|
+
onChange={(event) => props.info.setPageSize(Number(event.currentTarget.value))}
|
|
12953
|
+
>
|
|
12954
|
+
{
|
|
12955
|
+
/* 変更(1.15.0 のレビュー): 選んだ件数の項目に selected(選択肢が後から描かれると select の value が先頭に戻っていた)。 */
|
|
12956
|
+
}
|
|
12957
|
+
<For21 each={choices()}>
|
|
12958
|
+
{(choice) => <option value={String(choice)} selected={choice === props.info.pageSize}>
|
|
12959
|
+
{choice}
|
|
12960
|
+
</option>}
|
|
12961
|
+
</For21>
|
|
12962
|
+
</select>
|
|
12963
|
+
</label>
|
|
12964
|
+
</Show35>
|
|
12965
|
+
<span class="ssg-visually-hidden" aria-live="polite" aria-atomic="true">
|
|
12966
|
+
{announcement()}
|
|
12967
|
+
</span>
|
|
12968
|
+
</nav>;
|
|
12969
|
+
}
|
|
12970
|
+
|
|
12971
|
+
// src/features/pagination.ts
|
|
12972
|
+
var paginationFeature = {
|
|
12973
|
+
createPaginationController,
|
|
12974
|
+
resolvePaginationOptions,
|
|
12975
|
+
resolveAutoPageSize,
|
|
12976
|
+
Pager: GridPager,
|
|
12977
|
+
localeText: DEFAULT_PAGINATION_LOCALE_TEXT
|
|
12978
|
+
};
|
|
12979
|
+
|
|
12980
|
+
// src/features/cellSpan.ts
|
|
12981
|
+
import { createCellSpanController } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/cellSpanController";
|
|
12982
|
+
import {
|
|
12983
|
+
createCellSpanLayoutResolver,
|
|
12984
|
+
resolveCellSpanPlacement
|
|
12985
|
+
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cellSpanLayout";
|
|
12986
|
+
import { hasCellSpanColumns } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/cellSpans";
|
|
12987
|
+
var cellSpanFeature = {
|
|
12988
|
+
createCellSpanController,
|
|
12989
|
+
createCellSpanLayoutResolver,
|
|
12990
|
+
resolveCellSpanPlacement,
|
|
12991
|
+
hasCellSpanColumns
|
|
12992
|
+
};
|
|
12993
|
+
|
|
12266
12994
|
// src/features/excelShortcuts.ts
|
|
12267
12995
|
import { createExcelShortcutCommands } from "@ishibashi0112/spreadsheet-grid-core/internal/engine/excelShortcutCommands";
|
|
12268
12996
|
var excelShortcutsFeature = {
|
|
@@ -12291,29 +13019,29 @@ import { createTreeStage } from "@ishibashi0112/spreadsheet-grid-core/internal/e
|
|
|
12291
13019
|
import { DEFAULT_TREE_DATA_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
12292
13020
|
|
|
12293
13021
|
// src/view/GridTreeCell.tsx
|
|
12294
|
-
import { createMemo as
|
|
12295
|
-
import { formatLocaleText as
|
|
13022
|
+
import { createMemo as createMemo35, Show as Show36 } from "solid-js";
|
|
13023
|
+
import { formatLocaleText as formatLocaleText19 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
12296
13024
|
import {
|
|
12297
13025
|
formatTotalRowCellText as formatTotalRowCellText2,
|
|
12298
13026
|
resolveTotalRowCaption as resolveTotalRowCaption2
|
|
12299
13027
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
|
|
12300
13028
|
function GridTreeCellPrefix(props) {
|
|
12301
13029
|
const texts = useFeatureLocaleText();
|
|
12302
|
-
const label =
|
|
13030
|
+
const label = createMemo35(() => {
|
|
12303
13031
|
const name = props.rowLabel.trim();
|
|
12304
|
-
return
|
|
12305
|
-
row: name !== "" ? name :
|
|
13032
|
+
return formatLocaleText19(props.open ? texts().collapseTreeRow : texts().expandTreeRow, {
|
|
13033
|
+
row: name !== "" ? name : formatLocaleText19(texts().treeRowNumber, { row: props.rowNumber })
|
|
12306
13034
|
});
|
|
12307
13035
|
});
|
|
12308
13036
|
return <>
|
|
12309
|
-
<
|
|
13037
|
+
<Show36 when={props.level > 0}>
|
|
12310
13038
|
<span
|
|
12311
13039
|
aria-hidden="true"
|
|
12312
13040
|
class="ssg-tree-indent"
|
|
12313
13041
|
style={{ width: `calc(var(--ssg-tree-indent) * ${props.level})` }}
|
|
12314
13042
|
/>
|
|
12315
|
-
</
|
|
12316
|
-
<
|
|
13043
|
+
</Show36>
|
|
13044
|
+
<Show36 when={props.hasChildren} fallback={<span aria-hidden="true" class="ssg-tree-spacer" />}>
|
|
12317
13045
|
<button
|
|
12318
13046
|
type="button"
|
|
12319
13047
|
tabindex={-1}
|
|
@@ -12334,28 +13062,28 @@ function GridTreeCellPrefix(props) {
|
|
|
12334
13062
|
>
|
|
12335
13063
|
{props.open ? "\u25BE" : "\u25B8"}
|
|
12336
13064
|
</button>
|
|
12337
|
-
</
|
|
13065
|
+
</Show36>
|
|
12338
13066
|
</>;
|
|
12339
13067
|
}
|
|
12340
13068
|
function GridTreeAggregateValue(props) {
|
|
12341
13069
|
const texts = useFeatureLocaleText();
|
|
12342
|
-
const shown =
|
|
13070
|
+
const shown = createMemo35(() => {
|
|
12343
13071
|
const column = props.column;
|
|
12344
13072
|
const kind = typeof column.aggFunc === "string" ? column.aggFunc : "custom";
|
|
12345
13073
|
const text = formatTotalRowCellText2(column, { value: props.value, kind });
|
|
12346
13074
|
return text === "" ? null : { text, caption: resolveTotalRowCaption2(kind, texts()) };
|
|
12347
13075
|
});
|
|
12348
|
-
return <
|
|
13076
|
+
return <Show36 when={shown()}>
|
|
12349
13077
|
{(current) => <span
|
|
12350
13078
|
class="ssg-group-value ssg-tree-aggregate"
|
|
12351
13079
|
data-ssg-tooltip-overflow={current().caption !== void 0 ? `${current().caption} ${current().text}` : current().text}
|
|
12352
13080
|
>
|
|
12353
|
-
<
|
|
13081
|
+
<Show36 when={current().caption !== void 0}>
|
|
12354
13082
|
<span class="ssg-group-caption">{current().caption}</span>
|
|
12355
|
-
</
|
|
13083
|
+
</Show36>
|
|
12356
13084
|
{current().text}
|
|
12357
13085
|
</span>}
|
|
12358
|
-
</
|
|
13086
|
+
</Show36>;
|
|
12359
13087
|
}
|
|
12360
13088
|
|
|
12361
13089
|
// src/features/treeData.ts
|
|
@@ -12375,7 +13103,7 @@ var treeDataFeature = {
|
|
|
12375
13103
|
import { DEFAULT_AGGREGATES_LOCALE_TEXT } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures";
|
|
12376
13104
|
|
|
12377
13105
|
// src/primitives/selectionAggregates.ts
|
|
12378
|
-
import { createMemo as
|
|
13106
|
+
import { createMemo as createMemo36 } from "solid-js";
|
|
12379
13107
|
import {
|
|
12380
13108
|
createSelectionAggregatesRunner,
|
|
12381
13109
|
resolveSyncSelectionAggregates,
|
|
@@ -12387,15 +13115,15 @@ import {
|
|
|
12387
13115
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionAggregates";
|
|
12388
13116
|
function createSelectionAggregates(args) {
|
|
12389
13117
|
const stabilizeTarget = createSelectionAggregateTargetStabilizer();
|
|
12390
|
-
const target =
|
|
13118
|
+
const target = createMemo36(() => {
|
|
12391
13119
|
const current = args();
|
|
12392
13120
|
return stabilizeTarget(
|
|
12393
13121
|
current.enabled ? resolveSelectionAggregateTarget(current.selection, current.viewRowCount, current.orderedColumns) : null
|
|
12394
13122
|
);
|
|
12395
13123
|
});
|
|
12396
|
-
const rowModel =
|
|
12397
|
-
const key =
|
|
12398
|
-
const syncResult =
|
|
13124
|
+
const rowModel = createMemo36(() => args().rowModel);
|
|
13125
|
+
const key = createMemo36(() => ({ rowModel: rowModel(), target: target() }));
|
|
13126
|
+
const syncResult = createMemo36(() => resolveSyncSelectionAggregates(key()));
|
|
12399
13127
|
const runner = createSelectionAggregatesRunner();
|
|
12400
13128
|
connectController(
|
|
12401
13129
|
runner,
|
|
@@ -12404,16 +13132,16 @@ function createSelectionAggregates(args) {
|
|
|
12404
13132
|
"selectionAggregates"
|
|
12405
13133
|
);
|
|
12406
13134
|
const snapshot2 = createExternalStoreSignal(runner, "selectionAggregatesStore");
|
|
12407
|
-
return
|
|
13135
|
+
return createMemo36(() => selectSelectionAggregatesResult(syncResult(), snapshot2(), key()));
|
|
12408
13136
|
}
|
|
12409
13137
|
|
|
12410
13138
|
// src/view/GridSelectionAggregates.tsx
|
|
12411
|
-
import { For as
|
|
13139
|
+
import { For as For22, Show as Show37, createMemo as createMemo37 } from "solid-js";
|
|
12412
13140
|
import { formatSelectionAggregateNumber } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/selectionAggregates";
|
|
12413
|
-
import { formatLocaleText as
|
|
13141
|
+
import { formatLocaleText as formatLocaleText20 } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText";
|
|
12414
13142
|
function GridSelectionAggregates(props) {
|
|
12415
13143
|
const texts = useFeatureLocaleText();
|
|
12416
|
-
const chips =
|
|
13144
|
+
const chips = createMemo37(() => {
|
|
12417
13145
|
const aggregates = props.aggregates;
|
|
12418
13146
|
if (!aggregates) {
|
|
12419
13147
|
return null;
|
|
@@ -12423,7 +13151,7 @@ function GridSelectionAggregates(props) {
|
|
|
12423
13151
|
return [
|
|
12424
13152
|
{
|
|
12425
13153
|
key: "computing",
|
|
12426
|
-
text:
|
|
13154
|
+
text: formatLocaleText20(localeTexts.aggregateComputing, { percent: Math.floor(aggregates.progress * 100) })
|
|
12427
13155
|
}
|
|
12428
13156
|
];
|
|
12429
13157
|
}
|
|
@@ -12446,12 +13174,12 @@ function GridSelectionAggregates(props) {
|
|
|
12446
13174
|
}
|
|
12447
13175
|
return list;
|
|
12448
13176
|
});
|
|
12449
|
-
return <
|
|
13177
|
+
return <Show37 when={chips()}>
|
|
12450
13178
|
{(list) => <div class={["ssg-bar-aggregates", { "ssg-bar-aggregates--trailing": props.trailing }]}>
|
|
12451
13179
|
<div class="ssg-bar-aggregates-inner" title={list().map((chip) => chip.text).join(" ")}>
|
|
12452
13180
|
<div class="ssg-bar-aggregates-list">
|
|
12453
13181
|
<span class="ssg-bar-aggregates-fit" aria-hidden="true" />
|
|
12454
|
-
<
|
|
13182
|
+
<For22 each={list()} keyed={(chip) => chip.key}>
|
|
12455
13183
|
{(chip, index) => <span
|
|
12456
13184
|
class={[
|
|
12457
13185
|
"ssg-bar-chip",
|
|
@@ -12462,16 +13190,16 @@ function GridSelectionAggregates(props) {
|
|
|
12462
13190
|
]}
|
|
12463
13191
|
style={{ order: String(-index()) }}
|
|
12464
13192
|
>
|
|
12465
|
-
<
|
|
13193
|
+
<Show37 when={chip().label !== void 0} fallback={chip().text}>
|
|
12466
13194
|
{chip().label}
|
|
12467
13195
|
<b class="ssg-bar-aggregate-value">{chip().value}</b>
|
|
12468
|
-
</
|
|
13196
|
+
</Show37>
|
|
12469
13197
|
</span>}
|
|
12470
|
-
</
|
|
13198
|
+
</For22>
|
|
12471
13199
|
</div>
|
|
12472
13200
|
</div>
|
|
12473
13201
|
</div>}
|
|
12474
|
-
</
|
|
13202
|
+
</Show37>;
|
|
12475
13203
|
}
|
|
12476
13204
|
|
|
12477
13205
|
// src/features/selectionAggregates.ts
|
|
@@ -12482,7 +13210,7 @@ var selectionAggregatesFeature = {
|
|
|
12482
13210
|
};
|
|
12483
13211
|
|
|
12484
13212
|
// src/primitives/toolPanel.ts
|
|
12485
|
-
import { createMemo as
|
|
13213
|
+
import { createMemo as createMemo38 } from "solid-js";
|
|
12486
13214
|
import {
|
|
12487
13215
|
createToolPanelController,
|
|
12488
13216
|
resolveActiveToolPanelTab,
|
|
@@ -12501,7 +13229,7 @@ function createToolPanel(inputs) {
|
|
|
12501
13229
|
onSuppressedEscape: inputs.onSuppressedEscape
|
|
12502
13230
|
}), "render", "toolPanel");
|
|
12503
13231
|
const snapshot2 = createExternalStoreSignal(controller, "toolPanelStore");
|
|
12504
|
-
const availableTabs =
|
|
13232
|
+
const availableTabs = createMemo38(
|
|
12505
13233
|
() => resolveAvailableToolPanelTabs({
|
|
12506
13234
|
canUseFilterTab: inputs.canUseFilterTab(),
|
|
12507
13235
|
canUseColumnsTab: inputs.canUseColumnsTab(),
|
|
@@ -12510,10 +13238,10 @@ function createToolPanel(inputs) {
|
|
|
12510
13238
|
{ equals: sameTabs }
|
|
12511
13239
|
);
|
|
12512
13240
|
return {
|
|
12513
|
-
activeTab:
|
|
13241
|
+
activeTab: createMemo38(() => resolveActiveToolPanelTab(snapshot2().requestedTab, availableTabs())),
|
|
12514
13242
|
availableTabs,
|
|
12515
|
-
layout:
|
|
12516
|
-
flashTick:
|
|
13243
|
+
layout: createMemo38(() => snapshot2().layout),
|
|
13244
|
+
flashTick: createMemo38(() => snapshot2().flashTick),
|
|
12517
13245
|
panelRef: controller.panelRef,
|
|
12518
13246
|
open: controller.open,
|
|
12519
13247
|
close: controller.close,
|
|
@@ -12537,7 +13265,7 @@ import {
|
|
|
12537
13265
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/totalRow";
|
|
12538
13266
|
|
|
12539
13267
|
// src/view/GridTotalRow.tsx
|
|
12540
|
-
import { For as
|
|
13268
|
+
import { For as For23, Show as Show38, createMemo as createMemo39 } from "solid-js";
|
|
12541
13269
|
import {
|
|
12542
13270
|
formatTotalRowCellText as formatTotalRowCellText3,
|
|
12543
13271
|
resolveTotalRowCaption as resolveTotalRowCaption3
|
|
@@ -12564,7 +13292,7 @@ function GridTotalRow(props) {
|
|
|
12564
13292
|
...props.stickyBottom > 0 ? { bottom: px(props.stickyBottom) } : null
|
|
12565
13293
|
}}
|
|
12566
13294
|
>
|
|
12567
|
-
<
|
|
13295
|
+
<Show38 when={props.ownsRowHeader}>
|
|
12568
13296
|
<div
|
|
12569
13297
|
role={rowHeaderIsCell() ? "rowheader" : void 0}
|
|
12570
13298
|
aria-colindex={rowHeaderIsCell() ? 1 : void 0}
|
|
@@ -12579,13 +13307,13 @@ function GridTotalRow(props) {
|
|
|
12579
13307
|
>
|
|
12580
13308
|
{rowHeaderText() === "" ? null : rowHeaderText()}
|
|
12581
13309
|
</div>
|
|
12582
|
-
</
|
|
12583
|
-
<
|
|
13310
|
+
</Show38>
|
|
13311
|
+
<For23 each={props.entries} keyed={(entry) => entry.column.key}>
|
|
12584
13312
|
{(entry) => {
|
|
12585
|
-
const unbound =
|
|
13313
|
+
const unbound = createMemo39(() => entry().column);
|
|
12586
13314
|
const cell = () => props.cells.get(unbound().key);
|
|
12587
13315
|
const isLabelCell = () => unbound().key === props.labelColumnKey;
|
|
12588
|
-
const content =
|
|
13316
|
+
const content = createMemo39(() => {
|
|
12589
13317
|
const total = cell();
|
|
12590
13318
|
if (total) {
|
|
12591
13319
|
const column = unbound();
|
|
@@ -12637,7 +13365,7 @@ function GridTotalRow(props) {
|
|
|
12637
13365
|
{content()}
|
|
12638
13366
|
</div>;
|
|
12639
13367
|
}}
|
|
12640
|
-
</
|
|
13368
|
+
</For23>
|
|
12641
13369
|
</div>
|
|
12642
13370
|
</>;
|
|
12643
13371
|
}
|
|
@@ -12672,6 +13400,8 @@ var fullGridFeatures = {
|
|
|
12672
13400
|
changeTracking: changeTrackingFeature,
|
|
12673
13401
|
diffView: diffViewFeature,
|
|
12674
13402
|
rangeDecorations: rangeDecorationsFeature,
|
|
13403
|
+
pagination: paginationFeature,
|
|
13404
|
+
cellSpan: cellSpanFeature,
|
|
12675
13405
|
excelShortcuts: excelShortcutsFeature,
|
|
12676
13406
|
newRow: newRowFeature,
|
|
12677
13407
|
treeData: treeDataFeature,
|
|
@@ -12710,6 +13440,7 @@ import { restoreColumnsFromState } from "@ishibashi0112/spreadsheet-grid-core/in
|
|
|
12710
13440
|
export {
|
|
12711
13441
|
SpreadsheetGrid,
|
|
12712
13442
|
autoHeightFeature,
|
|
13443
|
+
cellSpanFeature,
|
|
12713
13444
|
changeTrackingFeature,
|
|
12714
13445
|
columnAutosizeFeature,
|
|
12715
13446
|
columnGroupsFeature,
|
|
@@ -12734,6 +13465,7 @@ export {
|
|
|
12734
13465
|
newRowFeature,
|
|
12735
13466
|
numberFormatter,
|
|
12736
13467
|
numberParser,
|
|
13468
|
+
paginationFeature,
|
|
12737
13469
|
pinnedRowsFeature,
|
|
12738
13470
|
preloadGridPopups,
|
|
12739
13471
|
rangeDecorationsFeature,
|