@ishibashi0112/spreadsheet-grid-core 0.46.0 → 0.47.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/dist/controllers/changeHighlightController.cjs +1 -0
- package/dist/controllers/changeHighlightController.d.ts +31 -0
- package/dist/controllers/changeHighlightController.js +97 -0
- package/dist/controllers/clipboardController.cjs +1 -1
- package/dist/controllers/clipboardController.d.ts +1 -0
- package/dist/controllers/clipboardController.js +1 -1
- package/dist/controllers/columnHeaderDragController.cjs +1 -1
- package/dist/controllers/columnHeaderDragController.d.ts +1 -0
- package/dist/controllers/columnHeaderDragController.js +132 -74
- package/dist/controllers/findController.cjs +1 -0
- package/dist/controllers/findController.d.ts +38 -0
- package/dist/controllers/findController.js +137 -0
- package/dist/controllers/keyboardController.cjs +1 -1
- package/dist/controllers/keyboardController.d.ts +1 -0
- package/dist/controllers/keyboardController.js +14 -10
- package/dist/controllers/pointerInteractionsController.cjs +1 -1
- package/dist/controllers/pointerInteractionsController.d.ts +1 -0
- package/dist/controllers/pointerInteractionsController.js +1 -1
- package/dist/controllers/reducedMotionStore.cjs +1 -0
- package/dist/controllers/reducedMotionStore.d.ts +5 -0
- package/dist/controllers/reducedMotionStore.js +18 -0
- package/dist/controllers/rowDragController.cjs +1 -1
- package/dist/controllers/rowDragController.d.ts +1 -0
- package/dist/controllers/rowDragController.js +121 -70
- package/dist/controllers/rowEnterController.cjs +1 -0
- package/dist/controllers/rowEnterController.d.ts +19 -0
- package/dist/controllers/rowEnterController.js +88 -0
- package/dist/controllers/saveStatusController.cjs +1 -0
- package/dist/controllers/saveStatusController.d.ts +30 -0
- package/dist/controllers/saveStatusController.js +74 -0
- package/dist/controllers/scrollSyncController.cjs +1 -1
- package/dist/controllers/scrollSyncController.d.ts +2 -0
- package/dist/controllers/scrollSyncController.js +36 -34
- package/dist/controllers/serverSideRowModel.cjs +1 -1
- package/dist/controllers/serverSideRowModel.d.ts +8 -0
- package/dist/controllers/serverSideRowModel.js +21 -6
- package/dist/controllers/tooltipController.cjs +1 -1
- package/dist/controllers/tooltipController.js +1 -1
- package/dist/engine/createGridEngine.cjs +1 -1
- package/dist/engine/createGridEngine.d.ts +10 -0
- package/dist/engine/createGridEngine.js +56 -46
- package/dist/engine/gridApi.cjs +1 -1
- package/dist/engine/gridApi.d.ts +6 -0
- package/dist/engine/gridApi.js +12 -0
- package/dist/logic/conditionalFormat.cjs +1 -0
- package/dist/logic/conditionalFormat.d.ts +19 -0
- package/dist/logic/conditionalFormat.js +88 -0
- package/dist/logic/find.cjs +1 -0
- package/dist/logic/find.d.ts +27 -0
- package/dist/logic/find.js +56 -0
- package/dist/logic/motion.cjs +1 -0
- package/dist/logic/motion.d.ts +4 -0
- package/dist/logic/motion.js +4 -0
- package/dist/logic/selectionOverlayGeometry.cjs +1 -0
- package/dist/logic/selectionOverlayGeometry.d.ts +15 -0
- package/dist/logic/selectionOverlayGeometry.js +43 -0
- package/dist/model/gridStore.cjs +1 -1
- package/dist/model/gridStore.d.ts +13 -1
- package/dist/model/gridStore.js +11 -5
- package/dist/model/gridTypes.core.d.ts +198 -0
- package/dist/model/gridTypes.unbound.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { splitRowBandByDetail as e } from "./detailRow.js";
|
|
2
|
+
import { computeFullWidthPaneExtents as t, computePaneColumnExtents as n } from "./geometry.js";
|
|
3
|
+
import { normalizeCellRange as r, normalizeColumnRange as i, normalizeRowRange as a } from "../model/gridSelectors.js";
|
|
4
|
+
import { clipRowRangeToWindow as o } from "./verticalGeometry.js";
|
|
5
|
+
//#region src/logic/selectionOverlayGeometry.ts
|
|
6
|
+
var s = (e, o, s) => {
|
|
7
|
+
if (!e) return null;
|
|
8
|
+
if (e.type === "cell") {
|
|
9
|
+
let t = r(e.range);
|
|
10
|
+
return {
|
|
11
|
+
extents: n(o, t.start.col, t.end.col),
|
|
12
|
+
startRow: t.start.row,
|
|
13
|
+
endRow: t.end.row
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (e.type === "row") {
|
|
17
|
+
let n = a(e.startRow, e.endRow);
|
|
18
|
+
return {
|
|
19
|
+
extents: t(o),
|
|
20
|
+
startRow: n.startRow,
|
|
21
|
+
endRow: n.endRow
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
let c = i(e.startCol, e.endCol);
|
|
25
|
+
return {
|
|
26
|
+
extents: n(o, c.startCol, c.endCol),
|
|
27
|
+
startRow: 0,
|
|
28
|
+
endRow: Math.max(s - 1, 0)
|
|
29
|
+
};
|
|
30
|
+
}, c = (e, t, n, r) => {
|
|
31
|
+
if (!e) return null;
|
|
32
|
+
let i = o(e.startRow, e.endRow, t, n);
|
|
33
|
+
return i ? {
|
|
34
|
+
top: r.rowTop(i.start),
|
|
35
|
+
height: r.rowsHeight(i.start, i.end)
|
|
36
|
+
} : null;
|
|
37
|
+
}, l = (t, n, r, i, a, s) => {
|
|
38
|
+
if (!t || !n) return null;
|
|
39
|
+
let c = o(n.startRow, n.endRow, r, i);
|
|
40
|
+
return c ? e(c.start, c.end, a, s) : null;
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { c as resolveSelectionBand, l as resolveSelectionBandSegments, s as resolveSelectionExtents };
|
package/dist/model/gridStore.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./gridReducer.cjs");var t=()=>({scrollTop:0,viewportWidth:0,viewportHeight:0,hoveredRowIndex:null,hoveredColumnIndex:null,isCornerHovered:!1}),n=(e,t)=>typeof e==`function`?e(t):e,r=(n,r=e.gridUiReducer,i=t())=>{let a=n,o=i,s=new Set,c=()=>{for(let e of Array.from(s))e()}
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./gridReducer.cjs");var t=()=>({scrollTop:0,viewportWidth:0,viewportHeight:0,hoveredRowIndex:null,hoveredColumnIndex:null,isCornerHovered:!1,copiedRange:null}),n=(e,t)=>typeof e==`function`?e(t):e,r=(n,r=e.gridUiReducer,i=t())=>{let a=n,o=i,s=new Set,c=()=>{for(let e of Array.from(s))e()},l=()=>a,u=e=>e.type===`edit/start`||e.type===`selection/clear`;return{getState:l,dispatch:e=>{let t=!1;o.copiedRange!==null&&u(e)&&(o={...o,copiedRange:null},t=!0);let n=r(a,e);Object.is(n,a)||(a=n,t=!0),t&&c()},getViewState:()=>o,setViewState:e=>{let t=typeof e==`function`?e(o):e,n=!1;for(let e of Object.keys(t))if(!Object.is(t[e],o[e])){n=!0;break}n&&(o={...o,...t},c())},subscribe:e=>(s.add(e),()=>{s.delete(e)})}};exports.createGridStore=r,exports.createInitialGridViewState=t,exports.resolveUpdater=n;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GridUiAction } from './gridActions.js';
|
|
2
|
-
import type { GridUiState } from './gridTypes.unbound.js';
|
|
2
|
+
import type { GridUiState, GridSelection } from './gridTypes.unbound.js';
|
|
3
3
|
export type GridStoreListener = () => void;
|
|
4
4
|
export type GridViewState = {
|
|
5
5
|
scrollTop: number;
|
|
@@ -8,6 +8,18 @@ export type GridViewState = {
|
|
|
8
8
|
hoveredRowIndex: number | null;
|
|
9
9
|
hoveredColumnIndex: number | null;
|
|
10
10
|
isCornerHovered: boolean;
|
|
11
|
+
copiedRange: GridCopiedRange | null;
|
|
12
|
+
};
|
|
13
|
+
export type GridCopiedRange = {
|
|
14
|
+
selection: NonNullable<GridSelection>;
|
|
15
|
+
view: GridCopiedRangeView;
|
|
16
|
+
};
|
|
17
|
+
export type GridCopiedRangeView = {
|
|
18
|
+
sort: unknown;
|
|
19
|
+
filters: unknown;
|
|
20
|
+
collapsedGroupKeys: unknown;
|
|
21
|
+
viewRowCount: number;
|
|
22
|
+
columns: unknown;
|
|
11
23
|
};
|
|
12
24
|
export declare const createInitialGridViewState: () => GridViewState;
|
|
13
25
|
export type Updater<T> = T | ((prev: T) => T);
|
package/dist/model/gridStore.js
CHANGED
|
@@ -6,16 +6,22 @@ var t = () => ({
|
|
|
6
6
|
viewportHeight: 0,
|
|
7
7
|
hoveredRowIndex: null,
|
|
8
8
|
hoveredColumnIndex: null,
|
|
9
|
-
isCornerHovered: !1
|
|
9
|
+
isCornerHovered: !1,
|
|
10
|
+
copiedRange: null
|
|
10
11
|
}), n = (e, t) => typeof e == "function" ? e(t) : e, r = (n, r = e, i = t()) => {
|
|
11
12
|
let a = n, o = i, s = /* @__PURE__ */ new Set(), c = () => {
|
|
12
13
|
for (let e of Array.from(s)) e();
|
|
13
|
-
};
|
|
14
|
+
}, l = () => a, u = (e) => e.type === "edit/start" || e.type === "selection/clear";
|
|
14
15
|
return {
|
|
15
|
-
getState:
|
|
16
|
+
getState: l,
|
|
16
17
|
dispatch: (e) => {
|
|
17
|
-
let t =
|
|
18
|
-
|
|
18
|
+
let t = !1;
|
|
19
|
+
o.copiedRange !== null && u(e) && (o = {
|
|
20
|
+
...o,
|
|
21
|
+
copiedRange: null
|
|
22
|
+
}, t = !0);
|
|
23
|
+
let n = r(a, e);
|
|
24
|
+
Object.is(n, a) || (a = n, t = !0), t && c();
|
|
19
25
|
},
|
|
20
26
|
getViewState: () => o,
|
|
21
27
|
setViewState: (e) => {
|
|
@@ -636,6 +636,18 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
636
636
|
* `getExportData` には含めない。詳細は「セルのメモ(`cellNote`)」節。
|
|
637
637
|
*/
|
|
638
638
|
cellNote?: (ctx: CellStyleContext<T, F>) => string | null | undefined;
|
|
639
|
+
/**
|
|
640
|
+
* **条件付き書式**。既定セルの描画に、値の「量」/「向き」/「状態」を重ねる。`dataBar`(背景の帯。
|
|
641
|
+
* `min` / `max` 省略時はビュー行 = フィルター / ソート適用後の数値から自動集計、負の値は 0
|
|
642
|
+
* の軸から左へ。`color` / `negativeColor` / `showValue: false` で帯だけ)/
|
|
643
|
+
* `colorScale`(セル背景を段階的に染める。`type: 'sequential'`(既定。淡 → 濃)/ `'diverging'`(`mid`
|
|
644
|
+
* を中立色に負側 / 正側を別の色相で。`colors` で色の段を差し替え)/ `chips`(値 → 色味
|
|
645
|
+
* `'neutral' | 'info' | 'good' | 'warning' | 'critical'` か `{ tone, label, icon, color }`
|
|
646
|
+
* のマップ、または `ctx` から返す関数。アイコン + ラベルのピル)。複数を同時指定可。表示だけで、
|
|
647
|
+
* エクスポート / コピー / ソート / フィルターには影響しない。色はトークン `--ssg-cf-*`。
|
|
648
|
+
* 詳細は「条件付き書式(`conditionalFormat`)」節。
|
|
649
|
+
*/
|
|
650
|
+
conditionalFormat?: GridConditionalFormat<T, F>;
|
|
639
651
|
/**
|
|
640
652
|
* セル内容の水平寄せ(UI 表示のみ・元の値は不変)。セル表示と編集 input に反映。
|
|
641
653
|
*
|
|
@@ -1000,6 +1012,10 @@ export type GridClassNames<F extends GridFrameworkTypes = GridFrameworkTypes> =
|
|
|
1000
1012
|
activeCellOverlay?: GridSlotProps<F>;
|
|
1001
1013
|
/** `activeCellOverlay` / `selectionOverlay`: 付与先: アクティブセル枠 / 範囲選択の塗り */
|
|
1002
1014
|
selectionOverlay?: GridSlotProps<F>;
|
|
1015
|
+
/** 付与先: コピー範囲の動く点線 `.ssg-copy-range-overlay` */
|
|
1016
|
+
copyRangeOverlay?: GridSlotProps<F>;
|
|
1017
|
+
/** 付与先: セル内検索バー `.ssg-find-bar` */
|
|
1018
|
+
findBar?: GridSlotProps<F>;
|
|
1003
1019
|
};
|
|
1004
1020
|
export type ScrollAlign = 'auto' | 'start' | 'center' | 'end';
|
|
1005
1021
|
export type GridScrollPosition = {
|
|
@@ -1263,9 +1279,90 @@ export type SpreadsheetGridHandle<T> = {
|
|
|
1263
1279
|
openFilterManager: () => void;
|
|
1264
1280
|
/** フィルター管理パネルを閉じる(開いていなければ何もしない)。 */
|
|
1265
1281
|
closeFilterManager: () => void;
|
|
1282
|
+
/**
|
|
1283
|
+
* 検索バーを開く(`find` が無効なら何もしない)。`query` を渡すとその文字列で検索し、
|
|
1284
|
+
* 先頭のヒットへ移動する。省略時は前回のクエリのまま開く。
|
|
1285
|
+
*/
|
|
1286
|
+
openFind: (query?: string) => void;
|
|
1287
|
+
/** 検索バーを閉じる(クエリとヒットの強調が消える。開いていなければ何もしない)。 */
|
|
1288
|
+
closeFind: () => void;
|
|
1289
|
+
/** 次のヒットへ(循環)。カレントのヒットへアクティブセルとスクロールが追従する。 */
|
|
1290
|
+
findNext: () => void;
|
|
1291
|
+
/** 前のヒットへ(循環)。 */
|
|
1292
|
+
findPrev: () => void;
|
|
1266
1293
|
};
|
|
1267
1294
|
export type GridDensity = 'compact' | 'standard' | 'comfortable';
|
|
1268
1295
|
export type GridTheme = 'light' | 'dark' | 'auto';
|
|
1296
|
+
/** データバー(値の大きさを背景の帯で示す)。`conditionalFormat.dataBar` の設定。 */
|
|
1297
|
+
export type GridDataBarFormat = {
|
|
1298
|
+
/** 帯の下限。省略時はビュー行(フィルター / ソート適用後。SSRM はロード済み範囲)の数値の最小値。 */
|
|
1299
|
+
min?: number;
|
|
1300
|
+
/** 帯の上限。省略時はビュー行の数値の最大値。 */
|
|
1301
|
+
max?: number;
|
|
1302
|
+
/** 帯の色(CSS 色)。省略時はトークン `--ssg-cf-bar`。 */
|
|
1303
|
+
color?: string;
|
|
1304
|
+
/** 負の値の帯の色(CSS 色)。省略時はトークン `--ssg-cf-bar-negative`。 */
|
|
1305
|
+
negativeColor?: string;
|
|
1306
|
+
/** `false` で値の文字を出さず帯だけにする(既定 `true`)。 */
|
|
1307
|
+
showValue?: boolean;
|
|
1308
|
+
};
|
|
1309
|
+
/** カラースケール(値に応じてセル背景を段階的に染める)。`conditionalFormat.colorScale` の設定。 */
|
|
1310
|
+
export type GridColorScaleFormat = {
|
|
1311
|
+
/**
|
|
1312
|
+
* `'sequential'`(既定): 1 色相の淡 → 濃(量)。`'diverging'`: `mid` を中立色に、負側 / 正側を別の色相で
|
|
1313
|
+
* 濃くする(基準からの向き)。
|
|
1314
|
+
*/
|
|
1315
|
+
type?: 'sequential' | 'diverging';
|
|
1316
|
+
/** 下限。省略時はビュー行の数値の最小値。 */
|
|
1317
|
+
min?: number;
|
|
1318
|
+
/** `'diverging'` の中立点。省略時は `min < 0 < max` なら `0`、それ以外は `(min + max) / 2`。 */
|
|
1319
|
+
mid?: number;
|
|
1320
|
+
/** 上限。省略時はビュー行の数値の最大値。 */
|
|
1321
|
+
max?: number;
|
|
1322
|
+
/**
|
|
1323
|
+
* 色の段(CSS 色)。`'sequential'` は `[淡, 濃]`、`'diverging'` は `[負側, 中立, 正側]`。省略時はトークン
|
|
1324
|
+
* (`--ssg-cf-seq-min` / `--ssg-cf-seq-max`、`--ssg-cf-div-negative` / `--ssg-cf-div-mid` / `--ssg-cf-div-positive`)。
|
|
1325
|
+
*/
|
|
1326
|
+
colors?: readonly string[];
|
|
1327
|
+
};
|
|
1328
|
+
/** 状態チップの色味。アイコンとラベルを伴う(色だけで意味を運ばない)。 */
|
|
1329
|
+
export type GridChipTone = 'neutral' | 'info' | 'good' | 'warning' | 'critical';
|
|
1330
|
+
/** 状態チップ 1 つの指定。 */
|
|
1331
|
+
export type GridChipSpec = {
|
|
1332
|
+
/** 色味(既定 `'neutral'`)。 */
|
|
1333
|
+
tone?: GridChipTone;
|
|
1334
|
+
/** ラベル。省略時はセルの表示文字列(`valueFormatter` 適用後)。 */
|
|
1335
|
+
label?: string;
|
|
1336
|
+
/** `false` でアイコンを出さない(既定 `true`)。 */
|
|
1337
|
+
icon?: boolean;
|
|
1338
|
+
/** 任意の色(CSS 色)。`tone` の色より優先。 */
|
|
1339
|
+
color?: string;
|
|
1340
|
+
};
|
|
1341
|
+
/** 値(`String(value)`)→ チップのマップ。値は色味の文字列か `GridChipSpec`。載っていない値はチップにしない。 */
|
|
1342
|
+
export type GridChipMap = Readonly<Record<string, GridChipTone | GridChipSpec>>;
|
|
1343
|
+
/** 条件付き書式(`GridColumn.conditionalFormat`)。複数を同時に指定できる(帯 + 背景色など)。 */
|
|
1344
|
+
export type GridConditionalFormat<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
1345
|
+
/** データバー。 */
|
|
1346
|
+
dataBar?: GridDataBarFormat;
|
|
1347
|
+
/** カラースケール。 */
|
|
1348
|
+
colorScale?: GridColorScaleFormat;
|
|
1349
|
+
/**
|
|
1350
|
+
* 状態チップ。値 → チップのマップか、セルのコンテキスト(`cellClassName` の関数版と同じ)から
|
|
1351
|
+
* チップを返す関数(`null` / `undefined` でチップにしない)。
|
|
1352
|
+
*/
|
|
1353
|
+
chips?: GridChipMap | ((ctx: CellStyleContext<T, F>) => GridChipTone | GridChipSpec | null | undefined);
|
|
1354
|
+
};
|
|
1355
|
+
export type FindOptions = {
|
|
1356
|
+
shortcut?: boolean;
|
|
1357
|
+
caseSensitive?: boolean;
|
|
1358
|
+
};
|
|
1359
|
+
export type FindChangeParams = {
|
|
1360
|
+
query: string;
|
|
1361
|
+
matchCount: number;
|
|
1362
|
+
currentIndex: number | null;
|
|
1363
|
+
open: boolean;
|
|
1364
|
+
};
|
|
1365
|
+
export type GridMotion = 'auto' | 'on' | 'off';
|
|
1269
1366
|
export type AutoSizeColumnsMode = 'onMount' | 'onDataChange' | false;
|
|
1270
1367
|
export type ScrollHintTrigger = 'scroll' | 'hover' | 'always';
|
|
1271
1368
|
export type ScrollHintRenderArgs<T> = {
|
|
@@ -1470,6 +1567,107 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
1470
1567
|
* @defaultValue `'light'`
|
|
1471
1568
|
*/
|
|
1472
1569
|
theme?: GridTheme;
|
|
1570
|
+
/**
|
|
1571
|
+
* モーション(アニメーション / トランジション)の有効化。`'auto'` は OS /
|
|
1572
|
+
* ブラウザの「視差効果を減らす」(`prefers-reduced-motion: reduce`)が有効なら `'off'`、それ以外は
|
|
1573
|
+
* `'on'` として扱う。`'off'` では root と全ポータル(popover / menu / panel)
|
|
1574
|
+
* ・ドラッグゴースト・ツールチップへ `.ssg-motion-off` が付き、
|
|
1575
|
+
* 継続時間トークン(`--ssg-motion-fast` / `--ssg-motion-base` / `--ssg-motion-slow`)が 0
|
|
1576
|
+
* になって動きが止まる(表示結果は同じ)。`'on'` は OS 設定に関わらず動かす。
|
|
1577
|
+
* 速さの調整はトークンの上書き。詳細は「モーション」節。
|
|
1578
|
+
*
|
|
1579
|
+
* @defaultValue `'auto'`
|
|
1580
|
+
*/
|
|
1581
|
+
motion?: GridMotion;
|
|
1582
|
+
/**
|
|
1583
|
+
* 行の並び替えアニメ。ソート / フィルター / グループ開閉 / `rows` の差し替えで、
|
|
1584
|
+
* 描画中の行が新しい位置へ滑り(`--ssg-motion-base`)、
|
|
1585
|
+
* スクロールなしで現れた行は上から順にフェードインする。
|
|
1586
|
+
* スクロール中の仮想化による出入りは対象外。auto-height 行と serverSide(SSRM)では自動で無効。
|
|
1587
|
+
* `motion` の実効値が `'off'` なら動かない。詳細は「モーション」節。
|
|
1588
|
+
*
|
|
1589
|
+
* @defaultValue `true`
|
|
1590
|
+
*/
|
|
1591
|
+
animateRows?: boolean;
|
|
1592
|
+
/**
|
|
1593
|
+
* `Ctrl/Cmd+C` のあと、コピー元の範囲に Excel と同じ「動く点線」
|
|
1594
|
+
* を残す(`.ssg-copy-range-overlay`。`motion` が `'off'` なら静的な点線)。`Esc` と編集開始で消え、
|
|
1595
|
+
* ソート / フィルター / グループ開閉 / 行数 / 列の変化で描画しなくなる(貼り付けでは残る)。`false`
|
|
1596
|
+
* で点線を出さない(コピー自体は従来どおり)。
|
|
1597
|
+
*
|
|
1598
|
+
* @defaultValue `true`
|
|
1599
|
+
*/
|
|
1600
|
+
showCopyRange?: boolean;
|
|
1601
|
+
/**
|
|
1602
|
+
* ホバーの強調範囲。`'row'` はポインタの行だけ(従来)。`'cross'` はその行に加えて、
|
|
1603
|
+
* ポインタの列(列ヘッダー + 同じ列の他セルに薄い帯 `.ssg-col-hover-overlay`)
|
|
1604
|
+
* と行番号も染めるクロスヘア表示。色はトークン `--ssg-col-hover-bg`(帯)/
|
|
1605
|
+
* `--ssg-select-bg`(ヘッダー・行番号)。横に長い表で「この値はどの列か」
|
|
1606
|
+
* を視線移動なしで答えるため。
|
|
1607
|
+
*
|
|
1608
|
+
* @defaultValue `'row'`
|
|
1609
|
+
*/
|
|
1610
|
+
hoverHighlight?: 'row' | 'cross';
|
|
1611
|
+
/**
|
|
1612
|
+
* `rows` が変わったとき、値が変わったセルを一瞬アクセント色で光らせ(`.ssg-body-cell--changed`、
|
|
1613
|
+
* `--ssg-motion-slow`)、数値の既定セルは旧値から新値へカウントアップする(`--ssg-motion-base`。
|
|
1614
|
+
* 表示は `valueFormatter` で整形)。セル編集 / 貼り付け / クリア / undo・redo / 外部からの `rows`
|
|
1615
|
+
* 差し替えのすべてが対象。clientSide 専用(SSRM では無効)。描画中のセルだけが対象で、
|
|
1616
|
+
* 変わったセルが 200 を超えるとフラッシュのみ、2,000 を超える・行の挿入 / 削除 /
|
|
1617
|
+
* 並べ替えを伴う・参照の変わった行が 5,000 を超える(データの読み直し)ときは何もしない。
|
|
1618
|
+
*
|
|
1619
|
+
* @defaultValue `false`
|
|
1620
|
+
*/
|
|
1621
|
+
highlightChanges?: boolean;
|
|
1622
|
+
/**
|
|
1623
|
+
* serverSide の書き戻し(`dataSource.updateRows`)で、確定したセルに保存状態の印を出す。
|
|
1624
|
+
* 保存中は斜線 + 小さなスピナー(`[data-ssg-save="pending"]`)、成功は ✓ バッジを 1.3 秒(`"ok"`)、
|
|
1625
|
+
* 失敗は揺れ + 赤いフラッシュ + ✕ バッジ(`"failed"`)とセル下の「保存に失敗しました」チップ(4 秒 /
|
|
1626
|
+
* スクロールで消える)。既存の保存失敗バー(`onServerSideWriteError`)とは独立に出る。
|
|
1627
|
+
* 描画中のセルだけが対象。clientSide では何も出ない。
|
|
1628
|
+
*
|
|
1629
|
+
* @defaultValue `true`
|
|
1630
|
+
*/
|
|
1631
|
+
showSaveStatus?: boolean;
|
|
1632
|
+
/**
|
|
1633
|
+
* 行ドラッグ並べ替え(`enableRowDrag`)の表示方式。`'ghost'` は従来(ゴースト + ガイド線、
|
|
1634
|
+
* ドロップ後に新しい位置へスライド)。`'live'` は掴んだ行がポインタに追従し、
|
|
1635
|
+
* 通る先の行がその場で上下へ退避する(ドロップ先が「隙間」として見える。
|
|
1636
|
+
* 枠外で離しても直前の位置へ確定、`Esc` で元へ戻る)。`motion` が `'off'` のときは `'ghost'`
|
|
1637
|
+
* と同じ。
|
|
1638
|
+
*
|
|
1639
|
+
* @defaultValue `'ghost'`
|
|
1640
|
+
*/
|
|
1641
|
+
rowDragMotion?: 'ghost' | 'live';
|
|
1642
|
+
/**
|
|
1643
|
+
* 列ヘッダーのドラッグ並べ替え(`onColumnsChange` 指定時)の表示方式。`'ghost'` は従来(ゴースト +
|
|
1644
|
+
* 縦線、ドロップ後に新しい位置へスライド)。`'live'` は同じペイン内では掴んだ列(ヘッダー +
|
|
1645
|
+
* 描画中のセル)がポインタに追従し、通る先の列がその場で左右へ退避する(ドロップ先が「隙間」
|
|
1646
|
+
* として見える。枠外で離しても直前の位置へ確定、`Esc` で元へ戻る)。
|
|
1647
|
+
* 固定列のペインをまたいで移す(固定の変更)ときは `'ghost'` と同じ縦線 + ゴーストに切り替わる。
|
|
1648
|
+
* `motion` が `'off'` のときは `'ghost'` と同じ。
|
|
1649
|
+
*
|
|
1650
|
+
* @defaultValue `'ghost'`
|
|
1651
|
+
*/
|
|
1652
|
+
columnDragMotion?: 'ghost' | 'live';
|
|
1653
|
+
/**
|
|
1654
|
+
* **セル内検索**。`true` でグリッド右上の検索バー(`.ssg-find-bar`)と
|
|
1655
|
+
* `Ctrl/Cmd+F`(グリッドにフォーカスがあるときだけ横取り)が有効になる。表示文字列(`valueFormatter`
|
|
1656
|
+
* 適用後)への部分一致で、ヒットをすべて `<mark class="ssg-find-mark">` で強調し、`Enter` / `↓`
|
|
1657
|
+
* で次、`Shift+Enter` / `↑` で前へ(アクティブセルとスクロールが追従)、`Esc` で閉じる。
|
|
1658
|
+
* 行は消さない(絞り込みのフィルターとは別)。`FindOptions` =
|
|
1659
|
+
* `{ shortcut?: boolean(既定 true。false でブラウザ標準の検索に譲る), caseSensitive?: boolean(既定 false) }`。
|
|
1660
|
+
* 走査は時間分割(1 チャンク 10ms)で入力を止めない。SSRM はロード済み範囲だけが対象。ヒットは 10,
|
|
1661
|
+
* 000 件で打ち切り(件数に `+`)。詳細は「セル内検索」節。
|
|
1662
|
+
*
|
|
1663
|
+
* @defaultValue `false`
|
|
1664
|
+
*/
|
|
1665
|
+
find?: boolean | FindOptions;
|
|
1666
|
+
/**
|
|
1667
|
+
* セル内検索の状態(`{ query, matchCount, currentIndex, open }`)が変わったときの通知。
|
|
1668
|
+
* `currentIndex` は 0 始まり(ヒットなしは `null`)。ツールバーに「3 / 12」を出す等に使う。
|
|
1669
|
+
*/
|
|
1670
|
+
onFindChange?: (params: FindChangeParams) => void;
|
|
1473
1671
|
/**
|
|
1474
1672
|
* 行番号列の幅(px)。
|
|
1475
1673
|
*
|
|
@@ -8,6 +8,7 @@ export type CellRenderContext<T> = Core.CellRenderContext<T, UnboundGridTypes>;
|
|
|
8
8
|
export type DetailRowOptions<T> = Core.DetailRowOptions<T, UnboundGridTypes>;
|
|
9
9
|
export type LabelRowOptions<T> = Core.LabelRowOptions<T, UnboundGridTypes>;
|
|
10
10
|
export type CellStyleContext<T> = Core.CellStyleContext<T, UnboundGridTypes>;
|
|
11
|
+
export type GridConditionalFormat<T> = Core.GridConditionalFormat<T, UnboundGridTypes>;
|
|
11
12
|
export type HeaderRenderContext<T> = Core.HeaderRenderContext<T, UnboundGridTypes>;
|
|
12
13
|
export type CellValueFormatterParams<T> = Core.CellValueFormatterParams<T, UnboundGridTypes>;
|
|
13
14
|
export type CellValueFormatter<T> = Core.CellValueFormatter<T, UnboundGridTypes>;
|
package/package.json
CHANGED