foldkit-data-grid 0.8.0 → 0.10.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/README.md +85 -15
- package/dist/clipboard.d.ts +7 -0
- package/dist/clipboard.d.ts.map +1 -1
- package/dist/clipboard.js +14 -0
- package/dist/clipboard.js.map +1 -1
- package/dist/columns.d.ts +17 -1
- package/dist/columns.d.ts.map +1 -1
- package/dist/columns.js.map +1 -1
- package/dist/fill.d.ts +14 -4
- package/dist/fill.d.ts.map +1 -1
- package/dist/fill.js +91 -11
- package/dist/fill.js.map +1 -1
- package/dist/grid.d.ts +879 -34
- package/dist/grid.d.ts.map +1 -1
- package/dist/grid.js +82 -3
- package/dist/grid.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/package.json +8 -8
package/dist/grid.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { GridProjection } from "./projection.js";
|
|
|
6
6
|
import { ColumnState } from "./columnState.js";
|
|
7
7
|
import { FilterChange, FilterOf, FilterValue, FilterableId, Filters } from "./filter.js";
|
|
8
8
|
import { GridWindow, Viewport } from "./virtual.js";
|
|
9
|
+
import * as Update from "foldkit/update";
|
|
9
10
|
/**
|
|
10
11
|
* One grid's interaction state: focus, the viewport and the column state, as
|
|
11
12
|
* one Bundle. Its update is the parts' own, joined: a key that moves focus
|
|
@@ -27,6 +28,8 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
27
28
|
filterFor: (column: keyof Specs & string) => Option.Option<CellEditor>;
|
|
28
29
|
Filters: Schema.Codec<Filters<Specs>, unknown, never, never>;
|
|
29
30
|
noFilters: Filters<Specs>;
|
|
31
|
+
filterCount: (filters: Filters<Specs>) => number;
|
|
32
|
+
hasFilters: (filters: Filters<Specs>) => boolean;
|
|
30
33
|
setFilter: (filters: Filters<Specs>, change: FilterChange<Specs>) => Filters<Specs>;
|
|
31
34
|
keeps: (filters: Filters<Specs>, read: { readonly [K in FilterableId<Specs>]: (row: Row) => FilterValue<FilterOf<Specs[K]>>; }) => ((row: Row) => boolean);
|
|
32
35
|
matchEdit: <const Handlers extends { readonly [K in EditableId<Specs>]: (edited: {
|
|
@@ -170,6 +173,141 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
170
173
|
readonly columns?: number;
|
|
171
174
|
};
|
|
172
175
|
}) => GridWindow<keyof Specs & string>;
|
|
176
|
+
rangeSize: (rows: RowModel<Row>, model: {
|
|
177
|
+
readonly focus: {
|
|
178
|
+
readonly current: Option.Option<{
|
|
179
|
+
readonly row: string;
|
|
180
|
+
readonly column: keyof Specs & string;
|
|
181
|
+
}>;
|
|
182
|
+
readonly header: Option.Option<keyof Specs & string>;
|
|
183
|
+
};
|
|
184
|
+
readonly viewport: {
|
|
185
|
+
readonly top: number;
|
|
186
|
+
readonly left: number;
|
|
187
|
+
readonly width: number;
|
|
188
|
+
readonly height: number;
|
|
189
|
+
};
|
|
190
|
+
readonly columns: {
|
|
191
|
+
readonly start: readonly (keyof Specs & string)[];
|
|
192
|
+
readonly center: readonly (keyof Specs & string)[];
|
|
193
|
+
readonly end: readonly (keyof Specs & string)[];
|
|
194
|
+
readonly hidden: readonly (keyof Specs & string)[];
|
|
195
|
+
readonly widths: readonly {
|
|
196
|
+
readonly column: keyof Specs & string;
|
|
197
|
+
readonly width: number;
|
|
198
|
+
}[];
|
|
199
|
+
};
|
|
200
|
+
readonly resizing: Option.Option<{
|
|
201
|
+
readonly column: keyof Specs & string;
|
|
202
|
+
readonly from: number;
|
|
203
|
+
}>;
|
|
204
|
+
readonly dragging: Option.Option<{
|
|
205
|
+
readonly column: keyof Specs & string;
|
|
206
|
+
readonly delta: number;
|
|
207
|
+
}>;
|
|
208
|
+
readonly menu: Option.Option<{
|
|
209
|
+
readonly column: keyof Specs & string;
|
|
210
|
+
readonly active: number;
|
|
211
|
+
}>;
|
|
212
|
+
readonly filling: Option.Option<{
|
|
213
|
+
readonly source: {
|
|
214
|
+
readonly anchor: {
|
|
215
|
+
readonly row: string;
|
|
216
|
+
readonly column: keyof Specs & string;
|
|
217
|
+
};
|
|
218
|
+
readonly focus: {
|
|
219
|
+
readonly row: string;
|
|
220
|
+
readonly column: keyof Specs & string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
readonly to: {
|
|
224
|
+
readonly row: string;
|
|
225
|
+
readonly column: keyof Specs & string;
|
|
226
|
+
};
|
|
227
|
+
}>;
|
|
228
|
+
readonly selection: {
|
|
229
|
+
readonly rows: {
|
|
230
|
+
readonly _tag: "AllExcept";
|
|
231
|
+
readonly except: readonly string[];
|
|
232
|
+
} | {
|
|
233
|
+
readonly _tag: "Keys";
|
|
234
|
+
readonly keys: readonly string[];
|
|
235
|
+
};
|
|
236
|
+
readonly anchor: Option.Option<string>;
|
|
237
|
+
readonly cells: Option.Option<{
|
|
238
|
+
readonly anchor: {
|
|
239
|
+
readonly row: string;
|
|
240
|
+
readonly column: keyof Specs & string;
|
|
241
|
+
};
|
|
242
|
+
readonly focus: {
|
|
243
|
+
readonly row: string;
|
|
244
|
+
readonly column: keyof Specs & string;
|
|
245
|
+
};
|
|
246
|
+
}>;
|
|
247
|
+
};
|
|
248
|
+
readonly editing: Option.Option<{
|
|
249
|
+
readonly address: {
|
|
250
|
+
readonly row: string;
|
|
251
|
+
readonly column: keyof Specs & string;
|
|
252
|
+
};
|
|
253
|
+
readonly from: string;
|
|
254
|
+
readonly draft: string;
|
|
255
|
+
readonly error: Option.Option<string>;
|
|
256
|
+
}>;
|
|
257
|
+
readonly filtering: Option.Option<{
|
|
258
|
+
readonly column: keyof Specs & string;
|
|
259
|
+
readonly form: {
|
|
260
|
+
readonly text: string;
|
|
261
|
+
readonly min: string;
|
|
262
|
+
readonly max: string;
|
|
263
|
+
readonly options: readonly string[];
|
|
264
|
+
readonly checked: "any" | "false" | "true";
|
|
265
|
+
readonly from: string;
|
|
266
|
+
readonly to: string;
|
|
267
|
+
};
|
|
268
|
+
readonly reported: Option.Option<{
|
|
269
|
+
readonly _tag: "Between";
|
|
270
|
+
readonly from: Option.Option<string>;
|
|
271
|
+
readonly to: Option.Option<string>;
|
|
272
|
+
} | {
|
|
273
|
+
readonly _tag: "Contains";
|
|
274
|
+
readonly text: string;
|
|
275
|
+
} | {
|
|
276
|
+
readonly _tag: "Is";
|
|
277
|
+
readonly checked: boolean;
|
|
278
|
+
} | {
|
|
279
|
+
readonly _tag: "OneOf";
|
|
280
|
+
readonly options: readonly string[];
|
|
281
|
+
} | {
|
|
282
|
+
readonly _tag: "Range";
|
|
283
|
+
readonly min: Option.Option<number>;
|
|
284
|
+
readonly max: Option.Option<number>;
|
|
285
|
+
}>;
|
|
286
|
+
readonly sent: readonly Option.Option<{
|
|
287
|
+
readonly _tag: "Between";
|
|
288
|
+
readonly from: Option.Option<string>;
|
|
289
|
+
readonly to: Option.Option<string>;
|
|
290
|
+
} | {
|
|
291
|
+
readonly _tag: "Contains";
|
|
292
|
+
readonly text: string;
|
|
293
|
+
} | {
|
|
294
|
+
readonly _tag: "Is";
|
|
295
|
+
readonly checked: boolean;
|
|
296
|
+
} | {
|
|
297
|
+
readonly _tag: "OneOf";
|
|
298
|
+
readonly options: readonly string[];
|
|
299
|
+
} | {
|
|
300
|
+
readonly _tag: "Range";
|
|
301
|
+
readonly min: Option.Option<number>;
|
|
302
|
+
readonly max: Option.Option<number>;
|
|
303
|
+
}>[];
|
|
304
|
+
readonly generation: number;
|
|
305
|
+
}>;
|
|
306
|
+
}) => Option.Option<{
|
|
307
|
+
rows: number;
|
|
308
|
+
columns: number;
|
|
309
|
+
cells: number;
|
|
310
|
+
}>;
|
|
173
311
|
fill: (rows: RowModel<Row>, state: {
|
|
174
312
|
readonly columns: {
|
|
175
313
|
readonly start: readonly (keyof Specs & string)[];
|
|
@@ -303,12 +441,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
303
441
|
readonly to: string;
|
|
304
442
|
};
|
|
305
443
|
readonly reported: Option.Option<{
|
|
306
|
-
readonly _tag: "Contains";
|
|
307
|
-
readonly text: string;
|
|
308
|
-
} | {
|
|
309
444
|
readonly _tag: "Between";
|
|
310
445
|
readonly from: Option.Option<string>;
|
|
311
446
|
readonly to: Option.Option<string>;
|
|
447
|
+
} | {
|
|
448
|
+
readonly _tag: "Contains";
|
|
449
|
+
readonly text: string;
|
|
312
450
|
} | {
|
|
313
451
|
readonly _tag: "Is";
|
|
314
452
|
readonly checked: boolean;
|
|
@@ -321,12 +459,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
321
459
|
readonly max: Option.Option<number>;
|
|
322
460
|
}>;
|
|
323
461
|
readonly sent: readonly Option.Option<{
|
|
324
|
-
readonly _tag: "Contains";
|
|
325
|
-
readonly text: string;
|
|
326
|
-
} | {
|
|
327
462
|
readonly _tag: "Between";
|
|
328
463
|
readonly from: Option.Option<string>;
|
|
329
464
|
readonly to: Option.Option<string>;
|
|
465
|
+
} | {
|
|
466
|
+
readonly _tag: "Contains";
|
|
467
|
+
readonly text: string;
|
|
330
468
|
} | {
|
|
331
469
|
readonly _tag: "Is";
|
|
332
470
|
readonly checked: boolean;
|
|
@@ -436,12 +574,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
436
574
|
readonly to: string;
|
|
437
575
|
};
|
|
438
576
|
readonly reported: Option.Option<{
|
|
439
|
-
readonly _tag: "Contains";
|
|
440
|
-
readonly text: string;
|
|
441
|
-
} | {
|
|
442
577
|
readonly _tag: "Between";
|
|
443
578
|
readonly from: Option.Option<string>;
|
|
444
579
|
readonly to: Option.Option<string>;
|
|
580
|
+
} | {
|
|
581
|
+
readonly _tag: "Contains";
|
|
582
|
+
readonly text: string;
|
|
445
583
|
} | {
|
|
446
584
|
readonly _tag: "Is";
|
|
447
585
|
readonly checked: boolean;
|
|
@@ -454,12 +592,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
454
592
|
readonly max: Option.Option<number>;
|
|
455
593
|
}>;
|
|
456
594
|
readonly sent: readonly Option.Option<{
|
|
457
|
-
readonly _tag: "Contains";
|
|
458
|
-
readonly text: string;
|
|
459
|
-
} | {
|
|
460
595
|
readonly _tag: "Between";
|
|
461
596
|
readonly from: Option.Option<string>;
|
|
462
597
|
readonly to: Option.Option<string>;
|
|
598
|
+
} | {
|
|
599
|
+
readonly _tag: "Contains";
|
|
600
|
+
readonly text: string;
|
|
463
601
|
} | {
|
|
464
602
|
readonly _tag: "Is";
|
|
465
603
|
readonly checked: boolean;
|
|
@@ -498,6 +636,11 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
498
636
|
readonly error: Schema.String;
|
|
499
637
|
}>>;
|
|
500
638
|
};
|
|
639
|
+
/** A copy of `rows` by `columns` cells, whose text is already on the clipboard. */
|
|
640
|
+
Copied: {
|
|
641
|
+
rows: Schema.Number;
|
|
642
|
+
columns: Schema.Number;
|
|
643
|
+
};
|
|
501
644
|
UndoRequested: {};
|
|
502
645
|
RedoRequested: {};
|
|
503
646
|
/**
|
|
@@ -548,6 +691,10 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
548
691
|
readonly error: Schema.String;
|
|
549
692
|
}>>;
|
|
550
693
|
};
|
|
694
|
+
readonly Copied: {
|
|
695
|
+
rows: Schema.Number;
|
|
696
|
+
columns: Schema.Number;
|
|
697
|
+
};
|
|
551
698
|
readonly UndoRequested: {};
|
|
552
699
|
readonly RedoRequested: {};
|
|
553
700
|
readonly Filled: {
|
|
@@ -1006,6 +1153,11 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1006
1153
|
readonly from: Schema.String;
|
|
1007
1154
|
}>>;
|
|
1008
1155
|
};
|
|
1156
|
+
/** The view's copy wrote the text of a box of `rows` by `columns` cells to the clipboard. */
|
|
1157
|
+
readonly Copied: {
|
|
1158
|
+
rows: Schema.Number;
|
|
1159
|
+
columns: Schema.Number;
|
|
1160
|
+
};
|
|
1009
1161
|
/**
|
|
1010
1162
|
* Ctrl or Meta with Z on the grid, or with Shift (or Ctrl+Y) for redo.
|
|
1011
1163
|
* An open edit keeps them, since the editor's own undo is the field's.
|
|
@@ -1271,12 +1423,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1271
1423
|
readonly to: string;
|
|
1272
1424
|
};
|
|
1273
1425
|
readonly reported: Option.Option<{
|
|
1274
|
-
readonly _tag: "Contains";
|
|
1275
|
-
readonly text: string;
|
|
1276
|
-
} | {
|
|
1277
1426
|
readonly _tag: "Between";
|
|
1278
1427
|
readonly from: Option.Option<string>;
|
|
1279
1428
|
readonly to: Option.Option<string>;
|
|
1429
|
+
} | {
|
|
1430
|
+
readonly _tag: "Contains";
|
|
1431
|
+
readonly text: string;
|
|
1280
1432
|
} | {
|
|
1281
1433
|
readonly _tag: "Is";
|
|
1282
1434
|
readonly checked: boolean;
|
|
@@ -1289,12 +1441,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1289
1441
|
readonly max: Option.Option<number>;
|
|
1290
1442
|
}>;
|
|
1291
1443
|
readonly sent: readonly Option.Option<{
|
|
1292
|
-
readonly _tag: "Contains";
|
|
1293
|
-
readonly text: string;
|
|
1294
|
-
} | {
|
|
1295
1444
|
readonly _tag: "Between";
|
|
1296
1445
|
readonly from: Option.Option<string>;
|
|
1297
1446
|
readonly to: Option.Option<string>;
|
|
1447
|
+
} | {
|
|
1448
|
+
readonly _tag: "Contains";
|
|
1449
|
+
readonly text: string;
|
|
1298
1450
|
} | {
|
|
1299
1451
|
readonly _tag: "Is";
|
|
1300
1452
|
readonly checked: boolean;
|
|
@@ -1359,6 +1511,10 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1359
1511
|
} | {
|
|
1360
1512
|
readonly _tag: "ColumnShown";
|
|
1361
1513
|
readonly column: keyof Specs & string;
|
|
1514
|
+
} | {
|
|
1515
|
+
readonly _tag: "Copied";
|
|
1516
|
+
readonly rows: number;
|
|
1517
|
+
readonly columns: number;
|
|
1362
1518
|
} | {
|
|
1363
1519
|
readonly _tag: "EditCancelled";
|
|
1364
1520
|
} | {
|
|
@@ -1437,12 +1593,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1437
1593
|
readonly state: "any" | "false" | "true";
|
|
1438
1594
|
readonly stale: Option.Option<{
|
|
1439
1595
|
readonly drawn: Option.Option<{
|
|
1440
|
-
readonly _tag: "Contains";
|
|
1441
|
-
readonly text: string;
|
|
1442
|
-
} | {
|
|
1443
1596
|
readonly _tag: "Between";
|
|
1444
1597
|
readonly from: Option.Option<string>;
|
|
1445
1598
|
readonly to: Option.Option<string>;
|
|
1599
|
+
} | {
|
|
1600
|
+
readonly _tag: "Contains";
|
|
1601
|
+
readonly text: string;
|
|
1446
1602
|
} | {
|
|
1447
1603
|
readonly _tag: "Is";
|
|
1448
1604
|
readonly checked: boolean;
|
|
@@ -1460,12 +1616,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1460
1616
|
readonly _tag: "FilterCleared";
|
|
1461
1617
|
readonly stale: Option.Option<{
|
|
1462
1618
|
readonly drawn: Option.Option<{
|
|
1463
|
-
readonly _tag: "Contains";
|
|
1464
|
-
readonly text: string;
|
|
1465
|
-
} | {
|
|
1466
1619
|
readonly _tag: "Between";
|
|
1467
1620
|
readonly from: Option.Option<string>;
|
|
1468
1621
|
readonly to: Option.Option<string>;
|
|
1622
|
+
} | {
|
|
1623
|
+
readonly _tag: "Contains";
|
|
1624
|
+
readonly text: string;
|
|
1469
1625
|
} | {
|
|
1470
1626
|
readonly _tag: "Is";
|
|
1471
1627
|
readonly checked: boolean;
|
|
@@ -1485,12 +1641,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1485
1641
|
readonly _tag: "FilterOpened";
|
|
1486
1642
|
readonly column: keyof Specs & string;
|
|
1487
1643
|
readonly drawn: Option.Option<{
|
|
1488
|
-
readonly _tag: "Contains";
|
|
1489
|
-
readonly text: string;
|
|
1490
|
-
} | {
|
|
1491
1644
|
readonly _tag: "Between";
|
|
1492
1645
|
readonly from: Option.Option<string>;
|
|
1493
1646
|
readonly to: Option.Option<string>;
|
|
1647
|
+
} | {
|
|
1648
|
+
readonly _tag: "Contains";
|
|
1649
|
+
readonly text: string;
|
|
1494
1650
|
} | {
|
|
1495
1651
|
readonly _tag: "Is";
|
|
1496
1652
|
readonly checked: boolean;
|
|
@@ -1507,12 +1663,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1507
1663
|
readonly option: string;
|
|
1508
1664
|
readonly stale: Option.Option<{
|
|
1509
1665
|
readonly drawn: Option.Option<{
|
|
1510
|
-
readonly _tag: "Contains";
|
|
1511
|
-
readonly text: string;
|
|
1512
|
-
} | {
|
|
1513
1666
|
readonly _tag: "Between";
|
|
1514
1667
|
readonly from: Option.Option<string>;
|
|
1515
1668
|
readonly to: Option.Option<string>;
|
|
1669
|
+
} | {
|
|
1670
|
+
readonly _tag: "Contains";
|
|
1671
|
+
readonly text: string;
|
|
1516
1672
|
} | {
|
|
1517
1673
|
readonly _tag: "Is";
|
|
1518
1674
|
readonly checked: boolean;
|
|
@@ -1532,12 +1688,12 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1532
1688
|
readonly text: string;
|
|
1533
1689
|
readonly stale: Option.Option<{
|
|
1534
1690
|
readonly drawn: Option.Option<{
|
|
1535
|
-
readonly _tag: "Contains";
|
|
1536
|
-
readonly text: string;
|
|
1537
|
-
} | {
|
|
1538
1691
|
readonly _tag: "Between";
|
|
1539
1692
|
readonly from: Option.Option<string>;
|
|
1540
1693
|
readonly to: Option.Option<string>;
|
|
1694
|
+
} | {
|
|
1695
|
+
readonly _tag: "Contains";
|
|
1696
|
+
readonly text: string;
|
|
1541
1697
|
} | {
|
|
1542
1698
|
readonly _tag: "Is";
|
|
1543
1699
|
readonly checked: boolean;
|
|
@@ -1624,6 +1780,10 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1624
1780
|
readonly rows: readonly string[];
|
|
1625
1781
|
readonly to: string;
|
|
1626
1782
|
}, [FilterableId<Specs>] extends [never] ? {
|
|
1783
|
+
readonly _tag: "Copied";
|
|
1784
|
+
readonly rows: number;
|
|
1785
|
+
readonly columns: number;
|
|
1786
|
+
} | {
|
|
1627
1787
|
readonly _tag: "Edited";
|
|
1628
1788
|
readonly row: string;
|
|
1629
1789
|
readonly column: keyof Specs & string;
|
|
@@ -1666,6 +1826,10 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1666
1826
|
} | {
|
|
1667
1827
|
readonly _tag: "UndoRequested";
|
|
1668
1828
|
} : {
|
|
1829
|
+
readonly _tag: "Copied";
|
|
1830
|
+
readonly rows: number;
|
|
1831
|
+
readonly columns: number;
|
|
1832
|
+
} | {
|
|
1669
1833
|
readonly _tag: "Edited";
|
|
1670
1834
|
readonly row: string;
|
|
1671
1835
|
readonly column: keyof Specs & string;
|
|
@@ -1710,7 +1874,688 @@ declare const make: <Row, Specs extends Record<string, ColumnSpec<Row, unknown>>
|
|
|
1710
1874
|
readonly to: string;
|
|
1711
1875
|
} | {
|
|
1712
1876
|
readonly _tag: "UndoRequested";
|
|
1713
|
-
}, never, never, import("foldkit-bundle").NoView, {}, {
|
|
1877
|
+
}, never, never, import("foldkit-bundle").NoView, {}, {
|
|
1878
|
+
reveal: (model: {
|
|
1879
|
+
readonly focus: {
|
|
1880
|
+
readonly current: Option.Option<{
|
|
1881
|
+
readonly row: string;
|
|
1882
|
+
readonly column: keyof Specs & string;
|
|
1883
|
+
}>;
|
|
1884
|
+
readonly header: Option.Option<keyof Specs & string>;
|
|
1885
|
+
};
|
|
1886
|
+
readonly viewport: {
|
|
1887
|
+
readonly top: number;
|
|
1888
|
+
readonly left: number;
|
|
1889
|
+
readonly width: number;
|
|
1890
|
+
readonly height: number;
|
|
1891
|
+
};
|
|
1892
|
+
readonly columns: {
|
|
1893
|
+
readonly start: readonly (keyof Specs & string)[];
|
|
1894
|
+
readonly center: readonly (keyof Specs & string)[];
|
|
1895
|
+
readonly end: readonly (keyof Specs & string)[];
|
|
1896
|
+
readonly hidden: readonly (keyof Specs & string)[];
|
|
1897
|
+
readonly widths: readonly {
|
|
1898
|
+
readonly column: keyof Specs & string;
|
|
1899
|
+
readonly width: number;
|
|
1900
|
+
}[];
|
|
1901
|
+
};
|
|
1902
|
+
readonly resizing: Option.Option<{
|
|
1903
|
+
readonly column: keyof Specs & string;
|
|
1904
|
+
readonly from: number;
|
|
1905
|
+
}>;
|
|
1906
|
+
readonly dragging: Option.Option<{
|
|
1907
|
+
readonly column: keyof Specs & string;
|
|
1908
|
+
readonly delta: number;
|
|
1909
|
+
}>;
|
|
1910
|
+
readonly menu: Option.Option<{
|
|
1911
|
+
readonly column: keyof Specs & string;
|
|
1912
|
+
readonly active: number;
|
|
1913
|
+
}>;
|
|
1914
|
+
readonly filling: Option.Option<{
|
|
1915
|
+
readonly source: {
|
|
1916
|
+
readonly anchor: {
|
|
1917
|
+
readonly row: string;
|
|
1918
|
+
readonly column: keyof Specs & string;
|
|
1919
|
+
};
|
|
1920
|
+
readonly focus: {
|
|
1921
|
+
readonly row: string;
|
|
1922
|
+
readonly column: keyof Specs & string;
|
|
1923
|
+
};
|
|
1924
|
+
};
|
|
1925
|
+
readonly to: {
|
|
1926
|
+
readonly row: string;
|
|
1927
|
+
readonly column: keyof Specs & string;
|
|
1928
|
+
};
|
|
1929
|
+
}>;
|
|
1930
|
+
readonly selection: {
|
|
1931
|
+
readonly rows: {
|
|
1932
|
+
readonly _tag: "AllExcept";
|
|
1933
|
+
readonly except: readonly string[];
|
|
1934
|
+
} | {
|
|
1935
|
+
readonly _tag: "Keys";
|
|
1936
|
+
readonly keys: readonly string[];
|
|
1937
|
+
};
|
|
1938
|
+
readonly anchor: Option.Option<string>;
|
|
1939
|
+
readonly cells: Option.Option<{
|
|
1940
|
+
readonly anchor: {
|
|
1941
|
+
readonly row: string;
|
|
1942
|
+
readonly column: keyof Specs & string;
|
|
1943
|
+
};
|
|
1944
|
+
readonly focus: {
|
|
1945
|
+
readonly row: string;
|
|
1946
|
+
readonly column: keyof Specs & string;
|
|
1947
|
+
};
|
|
1948
|
+
}>;
|
|
1949
|
+
};
|
|
1950
|
+
readonly editing: Option.Option<{
|
|
1951
|
+
readonly address: {
|
|
1952
|
+
readonly row: string;
|
|
1953
|
+
readonly column: keyof Specs & string;
|
|
1954
|
+
};
|
|
1955
|
+
readonly from: string;
|
|
1956
|
+
readonly draft: string;
|
|
1957
|
+
readonly error: Option.Option<string>;
|
|
1958
|
+
}>;
|
|
1959
|
+
readonly filtering: Option.Option<{
|
|
1960
|
+
readonly column: keyof Specs & string;
|
|
1961
|
+
readonly form: {
|
|
1962
|
+
readonly text: string;
|
|
1963
|
+
readonly min: string;
|
|
1964
|
+
readonly max: string;
|
|
1965
|
+
readonly options: readonly string[];
|
|
1966
|
+
readonly checked: "any" | "false" | "true";
|
|
1967
|
+
readonly from: string;
|
|
1968
|
+
readonly to: string;
|
|
1969
|
+
};
|
|
1970
|
+
readonly reported: Option.Option<{
|
|
1971
|
+
readonly _tag: "Between";
|
|
1972
|
+
readonly from: Option.Option<string>;
|
|
1973
|
+
readonly to: Option.Option<string>;
|
|
1974
|
+
} | {
|
|
1975
|
+
readonly _tag: "Contains";
|
|
1976
|
+
readonly text: string;
|
|
1977
|
+
} | {
|
|
1978
|
+
readonly _tag: "Is";
|
|
1979
|
+
readonly checked: boolean;
|
|
1980
|
+
} | {
|
|
1981
|
+
readonly _tag: "OneOf";
|
|
1982
|
+
readonly options: readonly string[];
|
|
1983
|
+
} | {
|
|
1984
|
+
readonly _tag: "Range";
|
|
1985
|
+
readonly min: Option.Option<number>;
|
|
1986
|
+
readonly max: Option.Option<number>;
|
|
1987
|
+
}>;
|
|
1988
|
+
readonly sent: readonly Option.Option<{
|
|
1989
|
+
readonly _tag: "Between";
|
|
1990
|
+
readonly from: Option.Option<string>;
|
|
1991
|
+
readonly to: Option.Option<string>;
|
|
1992
|
+
} | {
|
|
1993
|
+
readonly _tag: "Contains";
|
|
1994
|
+
readonly text: string;
|
|
1995
|
+
} | {
|
|
1996
|
+
readonly _tag: "Is";
|
|
1997
|
+
readonly checked: boolean;
|
|
1998
|
+
} | {
|
|
1999
|
+
readonly _tag: "OneOf";
|
|
2000
|
+
readonly options: readonly string[];
|
|
2001
|
+
} | {
|
|
2002
|
+
readonly _tag: "Range";
|
|
2003
|
+
readonly min: Option.Option<number>;
|
|
2004
|
+
readonly max: Option.Option<number>;
|
|
2005
|
+
}>[];
|
|
2006
|
+
readonly generation: number;
|
|
2007
|
+
}>;
|
|
2008
|
+
}, rows: RowModel<Row>, target: {
|
|
2009
|
+
readonly row: number;
|
|
2010
|
+
readonly column?: keyof Specs & string;
|
|
2011
|
+
readonly rowHeight: number;
|
|
2012
|
+
readonly headerHeight: number;
|
|
2013
|
+
}) => Update.ReturnWithOutMessage<{
|
|
2014
|
+
readonly focus: {
|
|
2015
|
+
readonly current: Option.Option<{
|
|
2016
|
+
readonly row: string;
|
|
2017
|
+
readonly column: keyof Specs & string;
|
|
2018
|
+
}>;
|
|
2019
|
+
readonly header: Option.Option<keyof Specs & string>;
|
|
2020
|
+
};
|
|
2021
|
+
readonly viewport: {
|
|
2022
|
+
readonly top: number;
|
|
2023
|
+
readonly left: number;
|
|
2024
|
+
readonly width: number;
|
|
2025
|
+
readonly height: number;
|
|
2026
|
+
};
|
|
2027
|
+
readonly columns: {
|
|
2028
|
+
readonly start: readonly (keyof Specs & string)[];
|
|
2029
|
+
readonly center: readonly (keyof Specs & string)[];
|
|
2030
|
+
readonly end: readonly (keyof Specs & string)[];
|
|
2031
|
+
readonly hidden: readonly (keyof Specs & string)[];
|
|
2032
|
+
readonly widths: readonly {
|
|
2033
|
+
readonly column: keyof Specs & string;
|
|
2034
|
+
readonly width: number;
|
|
2035
|
+
}[];
|
|
2036
|
+
};
|
|
2037
|
+
readonly resizing: Option.Option<{
|
|
2038
|
+
readonly column: keyof Specs & string;
|
|
2039
|
+
readonly from: number;
|
|
2040
|
+
}>;
|
|
2041
|
+
readonly dragging: Option.Option<{
|
|
2042
|
+
readonly column: keyof Specs & string;
|
|
2043
|
+
readonly delta: number;
|
|
2044
|
+
}>;
|
|
2045
|
+
readonly menu: Option.Option<{
|
|
2046
|
+
readonly column: keyof Specs & string;
|
|
2047
|
+
readonly active: number;
|
|
2048
|
+
}>;
|
|
2049
|
+
readonly filling: Option.Option<{
|
|
2050
|
+
readonly source: {
|
|
2051
|
+
readonly anchor: {
|
|
2052
|
+
readonly row: string;
|
|
2053
|
+
readonly column: keyof Specs & string;
|
|
2054
|
+
};
|
|
2055
|
+
readonly focus: {
|
|
2056
|
+
readonly row: string;
|
|
2057
|
+
readonly column: keyof Specs & string;
|
|
2058
|
+
};
|
|
2059
|
+
};
|
|
2060
|
+
readonly to: {
|
|
2061
|
+
readonly row: string;
|
|
2062
|
+
readonly column: keyof Specs & string;
|
|
2063
|
+
};
|
|
2064
|
+
}>;
|
|
2065
|
+
readonly selection: {
|
|
2066
|
+
readonly rows: {
|
|
2067
|
+
readonly _tag: "AllExcept";
|
|
2068
|
+
readonly except: readonly string[];
|
|
2069
|
+
} | {
|
|
2070
|
+
readonly _tag: "Keys";
|
|
2071
|
+
readonly keys: readonly string[];
|
|
2072
|
+
};
|
|
2073
|
+
readonly anchor: Option.Option<string>;
|
|
2074
|
+
readonly cells: Option.Option<{
|
|
2075
|
+
readonly anchor: {
|
|
2076
|
+
readonly row: string;
|
|
2077
|
+
readonly column: keyof Specs & string;
|
|
2078
|
+
};
|
|
2079
|
+
readonly focus: {
|
|
2080
|
+
readonly row: string;
|
|
2081
|
+
readonly column: keyof Specs & string;
|
|
2082
|
+
};
|
|
2083
|
+
}>;
|
|
2084
|
+
};
|
|
2085
|
+
readonly editing: Option.Option<{
|
|
2086
|
+
readonly address: {
|
|
2087
|
+
readonly row: string;
|
|
2088
|
+
readonly column: keyof Specs & string;
|
|
2089
|
+
};
|
|
2090
|
+
readonly from: string;
|
|
2091
|
+
readonly draft: string;
|
|
2092
|
+
readonly error: Option.Option<string>;
|
|
2093
|
+
}>;
|
|
2094
|
+
readonly filtering: Option.Option<{
|
|
2095
|
+
readonly column: keyof Specs & string;
|
|
2096
|
+
readonly form: {
|
|
2097
|
+
readonly text: string;
|
|
2098
|
+
readonly min: string;
|
|
2099
|
+
readonly max: string;
|
|
2100
|
+
readonly options: readonly string[];
|
|
2101
|
+
readonly checked: "any" | "false" | "true";
|
|
2102
|
+
readonly from: string;
|
|
2103
|
+
readonly to: string;
|
|
2104
|
+
};
|
|
2105
|
+
readonly reported: Option.Option<{
|
|
2106
|
+
readonly _tag: "Between";
|
|
2107
|
+
readonly from: Option.Option<string>;
|
|
2108
|
+
readonly to: Option.Option<string>;
|
|
2109
|
+
} | {
|
|
2110
|
+
readonly _tag: "Contains";
|
|
2111
|
+
readonly text: string;
|
|
2112
|
+
} | {
|
|
2113
|
+
readonly _tag: "Is";
|
|
2114
|
+
readonly checked: boolean;
|
|
2115
|
+
} | {
|
|
2116
|
+
readonly _tag: "OneOf";
|
|
2117
|
+
readonly options: readonly string[];
|
|
2118
|
+
} | {
|
|
2119
|
+
readonly _tag: "Range";
|
|
2120
|
+
readonly min: Option.Option<number>;
|
|
2121
|
+
readonly max: Option.Option<number>;
|
|
2122
|
+
}>;
|
|
2123
|
+
readonly sent: readonly Option.Option<{
|
|
2124
|
+
readonly _tag: "Between";
|
|
2125
|
+
readonly from: Option.Option<string>;
|
|
2126
|
+
readonly to: Option.Option<string>;
|
|
2127
|
+
} | {
|
|
2128
|
+
readonly _tag: "Contains";
|
|
2129
|
+
readonly text: string;
|
|
2130
|
+
} | {
|
|
2131
|
+
readonly _tag: "Is";
|
|
2132
|
+
readonly checked: boolean;
|
|
2133
|
+
} | {
|
|
2134
|
+
readonly _tag: "OneOf";
|
|
2135
|
+
readonly options: readonly string[];
|
|
2136
|
+
} | {
|
|
2137
|
+
readonly _tag: "Range";
|
|
2138
|
+
readonly min: Option.Option<number>;
|
|
2139
|
+
readonly max: Option.Option<number>;
|
|
2140
|
+
}>[];
|
|
2141
|
+
readonly generation: number;
|
|
2142
|
+
}>;
|
|
2143
|
+
}, {
|
|
2144
|
+
readonly _tag: "RedoRequested";
|
|
2145
|
+
} | {
|
|
2146
|
+
readonly _tag: "UndoRequested";
|
|
2147
|
+
} | {
|
|
2148
|
+
readonly _tag: "AllRowsSelected";
|
|
2149
|
+
} | {
|
|
2150
|
+
readonly _tag: "CellPressed";
|
|
2151
|
+
readonly cell: string;
|
|
2152
|
+
readonly shiftKey: boolean;
|
|
2153
|
+
readonly toggleKey: boolean;
|
|
2154
|
+
} | {
|
|
2155
|
+
readonly _tag: "CellsCleared";
|
|
2156
|
+
} | {
|
|
2157
|
+
readonly _tag: "CellsSelected";
|
|
2158
|
+
readonly anchor: {
|
|
2159
|
+
readonly row: string;
|
|
2160
|
+
readonly column: keyof Specs & string;
|
|
2161
|
+
};
|
|
2162
|
+
readonly focus: {
|
|
2163
|
+
readonly row: string;
|
|
2164
|
+
readonly column: keyof Specs & string;
|
|
2165
|
+
};
|
|
2166
|
+
readonly reveal: Option.Option<{
|
|
2167
|
+
readonly top: number;
|
|
2168
|
+
readonly left: number;
|
|
2169
|
+
}>;
|
|
2170
|
+
} | {
|
|
2171
|
+
readonly _tag: "ColumnDragEnded";
|
|
2172
|
+
readonly completed: boolean;
|
|
2173
|
+
} | {
|
|
2174
|
+
readonly _tag: "ColumnDragStarted";
|
|
2175
|
+
readonly header: string;
|
|
2176
|
+
} | {
|
|
2177
|
+
readonly _tag: "ColumnDragged";
|
|
2178
|
+
readonly delta: number;
|
|
2179
|
+
} | {
|
|
2180
|
+
readonly _tag: "ColumnHidden";
|
|
2181
|
+
readonly column: keyof Specs & string;
|
|
2182
|
+
} | {
|
|
2183
|
+
readonly _tag: "ColumnMoved";
|
|
2184
|
+
readonly column: keyof Specs & string;
|
|
2185
|
+
readonly region: "center" | "end" | "start";
|
|
2186
|
+
readonly index: number;
|
|
2187
|
+
} | {
|
|
2188
|
+
readonly _tag: "ColumnResized";
|
|
2189
|
+
readonly column: keyof Specs & string;
|
|
2190
|
+
readonly width: number;
|
|
2191
|
+
} | {
|
|
2192
|
+
readonly _tag: "ColumnShown";
|
|
2193
|
+
readonly column: keyof Specs & string;
|
|
2194
|
+
} | {
|
|
2195
|
+
readonly _tag: "Copied";
|
|
2196
|
+
readonly rows: number;
|
|
2197
|
+
readonly columns: number;
|
|
2198
|
+
} | {
|
|
2199
|
+
readonly _tag: "EditCancelled";
|
|
2200
|
+
} | {
|
|
2201
|
+
readonly _tag: "EditChanged";
|
|
2202
|
+
readonly draft: string;
|
|
2203
|
+
} | {
|
|
2204
|
+
readonly _tag: "EditChosen";
|
|
2205
|
+
readonly draft: string;
|
|
2206
|
+
} | {
|
|
2207
|
+
readonly _tag: "EditCommitted";
|
|
2208
|
+
readonly next: Option.Option<{
|
|
2209
|
+
readonly row: string;
|
|
2210
|
+
readonly column: keyof Specs & string;
|
|
2211
|
+
}>;
|
|
2212
|
+
readonly reveal: Option.Option<{
|
|
2213
|
+
readonly top: number;
|
|
2214
|
+
readonly left: number;
|
|
2215
|
+
}>;
|
|
2216
|
+
} | {
|
|
2217
|
+
readonly _tag: "EditStarted";
|
|
2218
|
+
readonly address: {
|
|
2219
|
+
readonly row: string;
|
|
2220
|
+
readonly column: keyof Specs & string;
|
|
2221
|
+
};
|
|
2222
|
+
readonly draft: string;
|
|
2223
|
+
} | {
|
|
2224
|
+
readonly _tag: "EditStepped";
|
|
2225
|
+
readonly by: "first" | "last" | "next" | "pageNext" | "pagePrevious" | "previous";
|
|
2226
|
+
} | {
|
|
2227
|
+
readonly _tag: "EditToggled";
|
|
2228
|
+
readonly cell: string;
|
|
2229
|
+
readonly checked: boolean;
|
|
2230
|
+
readonly by: {
|
|
2231
|
+
readonly _tag: "Key";
|
|
2232
|
+
readonly drawn: Option.Option<{
|
|
2233
|
+
readonly row: string;
|
|
2234
|
+
readonly column: keyof Specs & string;
|
|
2235
|
+
}>;
|
|
2236
|
+
} | {
|
|
2237
|
+
readonly _tag: "Press";
|
|
2238
|
+
};
|
|
2239
|
+
} | {
|
|
2240
|
+
readonly _tag: "EditTyped";
|
|
2241
|
+
readonly address: {
|
|
2242
|
+
readonly row: string;
|
|
2243
|
+
readonly column: keyof Specs & string;
|
|
2244
|
+
};
|
|
2245
|
+
readonly text: string;
|
|
2246
|
+
readonly from: string;
|
|
2247
|
+
} | {
|
|
2248
|
+
readonly _tag: "FillDragged";
|
|
2249
|
+
readonly cell: string;
|
|
2250
|
+
} | {
|
|
2251
|
+
readonly _tag: "FillEnded";
|
|
2252
|
+
readonly completed: boolean;
|
|
2253
|
+
} | {
|
|
2254
|
+
readonly _tag: "FillRequested";
|
|
2255
|
+
readonly source: {
|
|
2256
|
+
readonly anchor: {
|
|
2257
|
+
readonly row: string;
|
|
2258
|
+
readonly column: keyof Specs & string;
|
|
2259
|
+
};
|
|
2260
|
+
readonly focus: {
|
|
2261
|
+
readonly row: string;
|
|
2262
|
+
readonly column: keyof Specs & string;
|
|
2263
|
+
};
|
|
2264
|
+
};
|
|
2265
|
+
readonly to: {
|
|
2266
|
+
readonly row: string;
|
|
2267
|
+
readonly column: keyof Specs & string;
|
|
2268
|
+
};
|
|
2269
|
+
} | {
|
|
2270
|
+
readonly _tag: "FillStarted";
|
|
2271
|
+
} | {
|
|
2272
|
+
readonly _tag: "FilterChecked";
|
|
2273
|
+
readonly state: "any" | "false" | "true";
|
|
2274
|
+
readonly stale: Option.Option<{
|
|
2275
|
+
readonly drawn: Option.Option<{
|
|
2276
|
+
readonly _tag: "Between";
|
|
2277
|
+
readonly from: Option.Option<string>;
|
|
2278
|
+
readonly to: Option.Option<string>;
|
|
2279
|
+
} | {
|
|
2280
|
+
readonly _tag: "Contains";
|
|
2281
|
+
readonly text: string;
|
|
2282
|
+
} | {
|
|
2283
|
+
readonly _tag: "Is";
|
|
2284
|
+
readonly checked: boolean;
|
|
2285
|
+
} | {
|
|
2286
|
+
readonly _tag: "OneOf";
|
|
2287
|
+
readonly options: readonly string[];
|
|
2288
|
+
} | {
|
|
2289
|
+
readonly _tag: "Range";
|
|
2290
|
+
readonly min: Option.Option<number>;
|
|
2291
|
+
readonly max: Option.Option<number>;
|
|
2292
|
+
}>;
|
|
2293
|
+
readonly generation: number;
|
|
2294
|
+
}>;
|
|
2295
|
+
} | {
|
|
2296
|
+
readonly _tag: "FilterCleared";
|
|
2297
|
+
readonly stale: Option.Option<{
|
|
2298
|
+
readonly drawn: Option.Option<{
|
|
2299
|
+
readonly _tag: "Between";
|
|
2300
|
+
readonly from: Option.Option<string>;
|
|
2301
|
+
readonly to: Option.Option<string>;
|
|
2302
|
+
} | {
|
|
2303
|
+
readonly _tag: "Contains";
|
|
2304
|
+
readonly text: string;
|
|
2305
|
+
} | {
|
|
2306
|
+
readonly _tag: "Is";
|
|
2307
|
+
readonly checked: boolean;
|
|
2308
|
+
} | {
|
|
2309
|
+
readonly _tag: "OneOf";
|
|
2310
|
+
readonly options: readonly string[];
|
|
2311
|
+
} | {
|
|
2312
|
+
readonly _tag: "Range";
|
|
2313
|
+
readonly min: Option.Option<number>;
|
|
2314
|
+
readonly max: Option.Option<number>;
|
|
2315
|
+
}>;
|
|
2316
|
+
readonly generation: number;
|
|
2317
|
+
}>;
|
|
2318
|
+
} | {
|
|
2319
|
+
readonly _tag: "FilterClosed";
|
|
2320
|
+
} | {
|
|
2321
|
+
readonly _tag: "FilterOpened";
|
|
2322
|
+
readonly column: keyof Specs & string;
|
|
2323
|
+
readonly drawn: Option.Option<{
|
|
2324
|
+
readonly _tag: "Between";
|
|
2325
|
+
readonly from: Option.Option<string>;
|
|
2326
|
+
readonly to: Option.Option<string>;
|
|
2327
|
+
} | {
|
|
2328
|
+
readonly _tag: "Contains";
|
|
2329
|
+
readonly text: string;
|
|
2330
|
+
} | {
|
|
2331
|
+
readonly _tag: "Is";
|
|
2332
|
+
readonly checked: boolean;
|
|
2333
|
+
} | {
|
|
2334
|
+
readonly _tag: "OneOf";
|
|
2335
|
+
readonly options: readonly string[];
|
|
2336
|
+
} | {
|
|
2337
|
+
readonly _tag: "Range";
|
|
2338
|
+
readonly min: Option.Option<number>;
|
|
2339
|
+
readonly max: Option.Option<number>;
|
|
2340
|
+
}>;
|
|
2341
|
+
} | {
|
|
2342
|
+
readonly _tag: "FilterOptionToggled";
|
|
2343
|
+
readonly option: string;
|
|
2344
|
+
readonly stale: Option.Option<{
|
|
2345
|
+
readonly drawn: Option.Option<{
|
|
2346
|
+
readonly _tag: "Between";
|
|
2347
|
+
readonly from: Option.Option<string>;
|
|
2348
|
+
readonly to: Option.Option<string>;
|
|
2349
|
+
} | {
|
|
2350
|
+
readonly _tag: "Contains";
|
|
2351
|
+
readonly text: string;
|
|
2352
|
+
} | {
|
|
2353
|
+
readonly _tag: "Is";
|
|
2354
|
+
readonly checked: boolean;
|
|
2355
|
+
} | {
|
|
2356
|
+
readonly _tag: "OneOf";
|
|
2357
|
+
readonly options: readonly string[];
|
|
2358
|
+
} | {
|
|
2359
|
+
readonly _tag: "Range";
|
|
2360
|
+
readonly min: Option.Option<number>;
|
|
2361
|
+
readonly max: Option.Option<number>;
|
|
2362
|
+
}>;
|
|
2363
|
+
readonly generation: number;
|
|
2364
|
+
}>;
|
|
2365
|
+
} | {
|
|
2366
|
+
readonly _tag: "FilterTyped";
|
|
2367
|
+
readonly field: "from" | "max" | "min" | "text" | "to";
|
|
2368
|
+
readonly text: string;
|
|
2369
|
+
readonly stale: Option.Option<{
|
|
2370
|
+
readonly drawn: Option.Option<{
|
|
2371
|
+
readonly _tag: "Between";
|
|
2372
|
+
readonly from: Option.Option<string>;
|
|
2373
|
+
readonly to: Option.Option<string>;
|
|
2374
|
+
} | {
|
|
2375
|
+
readonly _tag: "Contains";
|
|
2376
|
+
readonly text: string;
|
|
2377
|
+
} | {
|
|
2378
|
+
readonly _tag: "Is";
|
|
2379
|
+
readonly checked: boolean;
|
|
2380
|
+
} | {
|
|
2381
|
+
readonly _tag: "OneOf";
|
|
2382
|
+
readonly options: readonly string[];
|
|
2383
|
+
} | {
|
|
2384
|
+
readonly _tag: "Range";
|
|
2385
|
+
readonly min: Option.Option<number>;
|
|
2386
|
+
readonly max: Option.Option<number>;
|
|
2387
|
+
}>;
|
|
2388
|
+
readonly generation: number;
|
|
2389
|
+
}>;
|
|
2390
|
+
} | {
|
|
2391
|
+
readonly _tag: "Focused";
|
|
2392
|
+
readonly address: {
|
|
2393
|
+
readonly row: string;
|
|
2394
|
+
readonly column: keyof Specs & string;
|
|
2395
|
+
};
|
|
2396
|
+
} | {
|
|
2397
|
+
readonly _tag: "HeaderFocused";
|
|
2398
|
+
readonly column: keyof Specs & string;
|
|
2399
|
+
readonly reveal: Option.Option<{
|
|
2400
|
+
readonly top: number;
|
|
2401
|
+
readonly left: number;
|
|
2402
|
+
}>;
|
|
2403
|
+
} | {
|
|
2404
|
+
readonly _tag: "Measured";
|
|
2405
|
+
readonly top: number;
|
|
2406
|
+
readonly left: number;
|
|
2407
|
+
readonly width: number;
|
|
2408
|
+
readonly height: number;
|
|
2409
|
+
} | {
|
|
2410
|
+
readonly _tag: "MenuChosen";
|
|
2411
|
+
readonly index: number;
|
|
2412
|
+
} | {
|
|
2413
|
+
readonly _tag: "MenuClosed";
|
|
2414
|
+
} | {
|
|
2415
|
+
readonly _tag: "MenuMoved";
|
|
2416
|
+
readonly active: number;
|
|
2417
|
+
} | {
|
|
2418
|
+
readonly _tag: "MenuOpened";
|
|
2419
|
+
readonly column: keyof Specs & string;
|
|
2420
|
+
} | {
|
|
2421
|
+
readonly _tag: "MountStarted";
|
|
2422
|
+
} | {
|
|
2423
|
+
readonly _tag: "Moved";
|
|
2424
|
+
readonly address: {
|
|
2425
|
+
readonly row: string;
|
|
2426
|
+
readonly column: keyof Specs & string;
|
|
2427
|
+
};
|
|
2428
|
+
readonly reveal: Option.Option<{
|
|
2429
|
+
readonly top: number;
|
|
2430
|
+
readonly left: number;
|
|
2431
|
+
}>;
|
|
2432
|
+
} | {
|
|
2433
|
+
readonly _tag: "Pasted";
|
|
2434
|
+
readonly cells: readonly {
|
|
2435
|
+
readonly row: string;
|
|
2436
|
+
readonly column: keyof Specs & string;
|
|
2437
|
+
readonly text: string;
|
|
2438
|
+
readonly from: string;
|
|
2439
|
+
}[];
|
|
2440
|
+
} | {
|
|
2441
|
+
readonly _tag: "ResizeEnded";
|
|
2442
|
+
readonly completed: boolean;
|
|
2443
|
+
} | {
|
|
2444
|
+
readonly _tag: "ResizeMoved";
|
|
2445
|
+
readonly delta: number;
|
|
2446
|
+
} | {
|
|
2447
|
+
readonly _tag: "ResizeStarted";
|
|
2448
|
+
readonly header: string;
|
|
2449
|
+
} | {
|
|
2450
|
+
readonly _tag: "Revealed";
|
|
2451
|
+
readonly top: number;
|
|
2452
|
+
readonly left: number;
|
|
2453
|
+
} | {
|
|
2454
|
+
readonly _tag: "RowSelected";
|
|
2455
|
+
readonly row: string;
|
|
2456
|
+
} | {
|
|
2457
|
+
readonly _tag: "RowsCleared";
|
|
2458
|
+
} | {
|
|
2459
|
+
readonly _tag: "RowsExtended";
|
|
2460
|
+
readonly rows: readonly string[];
|
|
2461
|
+
readonly to: string;
|
|
2462
|
+
}, [FilterableId<Specs>] extends [never] ? {
|
|
2463
|
+
readonly _tag: "Copied";
|
|
2464
|
+
readonly rows: number;
|
|
2465
|
+
readonly columns: number;
|
|
2466
|
+
} | {
|
|
2467
|
+
readonly _tag: "Edited";
|
|
2468
|
+
readonly row: string;
|
|
2469
|
+
readonly column: keyof Specs & string;
|
|
2470
|
+
readonly text: string;
|
|
2471
|
+
} | {
|
|
2472
|
+
readonly _tag: "Filled";
|
|
2473
|
+
readonly source: {
|
|
2474
|
+
readonly anchor: {
|
|
2475
|
+
readonly row: string;
|
|
2476
|
+
readonly column: keyof Specs & string;
|
|
2477
|
+
};
|
|
2478
|
+
readonly focus: {
|
|
2479
|
+
readonly row: string;
|
|
2480
|
+
readonly column: keyof Specs & string;
|
|
2481
|
+
};
|
|
2482
|
+
};
|
|
2483
|
+
readonly to: {
|
|
2484
|
+
readonly row: string;
|
|
2485
|
+
readonly column: keyof Specs & string;
|
|
2486
|
+
};
|
|
2487
|
+
} | {
|
|
2488
|
+
readonly _tag: "Pasted";
|
|
2489
|
+
readonly accepted: readonly {
|
|
2490
|
+
readonly row: string;
|
|
2491
|
+
readonly column: keyof Specs & string;
|
|
2492
|
+
readonly text: string;
|
|
2493
|
+
}[];
|
|
2494
|
+
readonly refused: readonly {
|
|
2495
|
+
readonly row: string;
|
|
2496
|
+
readonly column: keyof Specs & string;
|
|
2497
|
+
readonly text: string;
|
|
2498
|
+
readonly error: string;
|
|
2499
|
+
}[];
|
|
2500
|
+
} | {
|
|
2501
|
+
readonly _tag: "RedoRequested";
|
|
2502
|
+
} | {
|
|
2503
|
+
readonly _tag: "RowsRequested";
|
|
2504
|
+
readonly from: string;
|
|
2505
|
+
readonly to: string;
|
|
2506
|
+
} | {
|
|
2507
|
+
readonly _tag: "UndoRequested";
|
|
2508
|
+
} : {
|
|
2509
|
+
readonly _tag: "Copied";
|
|
2510
|
+
readonly rows: number;
|
|
2511
|
+
readonly columns: number;
|
|
2512
|
+
} | {
|
|
2513
|
+
readonly _tag: "Edited";
|
|
2514
|
+
readonly row: string;
|
|
2515
|
+
readonly column: keyof Specs & string;
|
|
2516
|
+
readonly text: string;
|
|
2517
|
+
} | {
|
|
2518
|
+
readonly _tag: "Filled";
|
|
2519
|
+
readonly source: {
|
|
2520
|
+
readonly anchor: {
|
|
2521
|
+
readonly row: string;
|
|
2522
|
+
readonly column: keyof Specs & string;
|
|
2523
|
+
};
|
|
2524
|
+
readonly focus: {
|
|
2525
|
+
readonly row: string;
|
|
2526
|
+
readonly column: keyof Specs & string;
|
|
2527
|
+
};
|
|
2528
|
+
};
|
|
2529
|
+
readonly to: {
|
|
2530
|
+
readonly row: string;
|
|
2531
|
+
readonly column: keyof Specs & string;
|
|
2532
|
+
};
|
|
2533
|
+
} | {
|
|
2534
|
+
readonly _tag: "Filtered";
|
|
2535
|
+
readonly change: FilterChange<Specs>;
|
|
2536
|
+
} | {
|
|
2537
|
+
readonly _tag: "Pasted";
|
|
2538
|
+
readonly accepted: readonly {
|
|
2539
|
+
readonly row: string;
|
|
2540
|
+
readonly column: keyof Specs & string;
|
|
2541
|
+
readonly text: string;
|
|
2542
|
+
}[];
|
|
2543
|
+
readonly refused: readonly {
|
|
2544
|
+
readonly row: string;
|
|
2545
|
+
readonly column: keyof Specs & string;
|
|
2546
|
+
readonly text: string;
|
|
2547
|
+
readonly error: string;
|
|
2548
|
+
}[];
|
|
2549
|
+
} | {
|
|
2550
|
+
readonly _tag: "RedoRequested";
|
|
2551
|
+
} | {
|
|
2552
|
+
readonly _tag: "RowsRequested";
|
|
2553
|
+
readonly from: string;
|
|
2554
|
+
readonly to: string;
|
|
2555
|
+
} | {
|
|
2556
|
+
readonly _tag: "UndoRequested";
|
|
2557
|
+
}, never>;
|
|
2558
|
+
}>;
|
|
1714
2559
|
};
|
|
1715
2560
|
export declare const DataGrid: {
|
|
1716
2561
|
make: typeof make;
|