argus-table 0.3.0 → 0.4.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/argus-column-group.js +66 -0
- package/dist/argus-column-group.js.map +1 -0
- package/dist/argus-column.js +4 -25
- package/dist/argus-column.js.map +1 -1
- package/dist/argus-table.js +553 -200
- package/dist/argus-table.js.map +1 -1
- package/dist/attributes.js +21 -0
- package/dist/attributes.js.map +1 -0
- package/dist/cdn/argus-table.js +92 -57
- package/dist/cdn/argus-table.js.map +1 -1
- package/dist/column-registry.js +23 -0
- package/dist/column-registry.js.map +1 -0
- package/dist/controllers/auto-width.js +6 -5
- package/dist/controllers/auto-width.js.map +1 -1
- package/dist/controllers/column-children.js +32 -9
- package/dist/controllers/column-children.js.map +1 -1
- package/dist/controllers/column-window.js +0 -4
- package/dist/controllers/column-window.js.map +1 -1
- package/dist/controllers/plugins.js +25 -6
- package/dist/controllers/plugins.js.map +1 -1
- package/dist/controllers/reorder-drag.js +12 -9
- package/dist/controllers/reorder-drag.js.map +1 -1
- package/dist/controllers/row-measure.js +2 -1
- package/dist/controllers/row-measure.js.map +1 -1
- package/dist/controllers/virtual-controller.js +25 -32
- package/dist/controllers/virtual-controller.js.map +1 -1
- package/dist/core/src/columns/column-groups.js +129 -0
- package/dist/core/src/columns/column-groups.js.map +1 -0
- package/dist/core/src/columns/column-order.js +125 -31
- package/dist/core/src/columns/column-order.js.map +1 -1
- package/dist/core/src/columns/resolve-columns.js +0 -1
- package/dist/core/src/columns/resolve-columns.js.map +1 -1
- package/dist/core/src/columns/spread-width.js +43 -0
- package/dist/core/src/columns/spread-width.js.map +1 -0
- package/dist/core/src/filters/filter.js +6 -8
- package/dist/core/src/filters/filter.js.map +1 -1
- package/dist/core/src/grid/row-layout.js +19 -11
- package/dist/core/src/grid/row-layout.js.map +1 -1
- package/dist/core/src/state/selection.js +2 -1
- package/dist/core/src/state/selection.js.map +1 -1
- package/dist/core/src/table/create-table.js +57 -22
- package/dist/core/src/table/create-table.js.map +1 -1
- package/dist/core/src/table/sorted-row-model.js.map +1 -1
- package/dist/core/src/virtual/row-sizes.js +0 -4
- package/dist/core/src/virtual/row-sizes.js.map +1 -1
- package/dist/custom-elements.json +489 -245
- package/dist/events.js +16 -16
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +273 -127
- package/dist/index.js +3 -2
- package/dist/render/body.js +2 -2
- package/dist/render/body.js.map +1 -1
- package/dist/render/cells.js +11 -3
- package/dist/render/cells.js.map +1 -1
- package/dist/render/content-directive.js +1 -1
- package/dist/render/content-directive.js.map +1 -1
- package/dist/render/content.js +15 -3
- package/dist/render/content.js.map +1 -1
- package/dist/render/header.js +82 -19
- package/dist/render/header.js.map +1 -1
- package/dist/styles/base.js +1 -1
- package/dist/styles/base.js.map +1 -1
- package/package.json +1 -1
|
@@ -44,52 +44,104 @@
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"kind": "javascript-module",
|
|
47
|
-
"path": "src/argus-column.ts",
|
|
47
|
+
"path": "src/argus-column-group.ts",
|
|
48
48
|
"declarations": [
|
|
49
49
|
{
|
|
50
|
-
"kind": "
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
"text": "void"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"parameters": [
|
|
50
|
+
"kind": "class",
|
|
51
|
+
"description": "A header over the `<argus-column>` children it wraps, written as markup instead\nof an entry in the table's `columnGroups` property. Groups nest: a group inside\na group adds a header row. It is data only and renders nothing.\n\nOnly direct children of the table or of another group count. A non-empty\n`columnGroups` property wins over the children, and a non-empty `columns`\nproperty turns all column and group children off.",
|
|
52
|
+
"name": "ArgusColumnGroup",
|
|
53
|
+
"members": [
|
|
58
54
|
{
|
|
59
|
-
"
|
|
55
|
+
"kind": "field",
|
|
56
|
+
"name": "groupId",
|
|
60
57
|
"type": {
|
|
61
|
-
"text": "
|
|
62
|
-
}
|
|
58
|
+
"text": "string"
|
|
59
|
+
},
|
|
60
|
+
"default": "''",
|
|
61
|
+
"description": "Stable key. Must be unique among the table's groups; it may equal a column id.",
|
|
62
|
+
"attribute": "group-id"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
|
-
"
|
|
65
|
+
"kind": "field",
|
|
66
|
+
"name": "header",
|
|
66
67
|
"type": {
|
|
67
|
-
"text": "() =>
|
|
68
|
-
}
|
|
68
|
+
"text": "CellContent | (() => CellContent) | undefined"
|
|
69
|
+
},
|
|
70
|
+
"description": "Header content: text as an attribute; a Lit template, a node or a function as a property. Default: the id.",
|
|
71
|
+
"attribute": "header"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"kind": "field",
|
|
75
|
+
"name": "reorderable",
|
|
76
|
+
"type": {
|
|
77
|
+
"text": "boolean | undefined"
|
|
78
|
+
},
|
|
79
|
+
"description": "Whether the group can be moved as a whole. Default: `true`; `reorderable=\"false\"` turns it off.",
|
|
80
|
+
"attribute": "reorderable"
|
|
69
81
|
}
|
|
70
82
|
],
|
|
71
|
-
"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"kind": "function",
|
|
75
|
-
"name": "unwatchColumns",
|
|
76
|
-
"return": {
|
|
77
|
-
"type": {
|
|
78
|
-
"text": "void"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"parameters": [
|
|
83
|
+
"attributes": [
|
|
82
84
|
{
|
|
83
|
-
"name": "
|
|
85
|
+
"name": "group-id",
|
|
84
86
|
"type": {
|
|
85
|
-
"text": "
|
|
86
|
-
}
|
|
87
|
+
"text": "string"
|
|
88
|
+
},
|
|
89
|
+
"default": "''",
|
|
90
|
+
"description": "Stable key. Must be unique among the table's groups; it may equal a column id.",
|
|
91
|
+
"fieldName": "groupId"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "header",
|
|
95
|
+
"type": {
|
|
96
|
+
"text": "CellContent | (() => CellContent) | undefined"
|
|
97
|
+
},
|
|
98
|
+
"description": "Header content: text as an attribute; a Lit template, a node or a function as a property. Default: the id.",
|
|
99
|
+
"fieldName": "header"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "reorderable",
|
|
103
|
+
"type": {
|
|
104
|
+
"text": "boolean | undefined"
|
|
105
|
+
},
|
|
106
|
+
"description": "Whether the group can be moved as a whole. Default: `true`; `reorderable=\"false\"` turns it off.",
|
|
107
|
+
"fieldName": "reorderable"
|
|
87
108
|
}
|
|
88
|
-
]
|
|
109
|
+
],
|
|
110
|
+
"superclass": {
|
|
111
|
+
"name": "ReactiveElement",
|
|
112
|
+
"package": "lit"
|
|
113
|
+
},
|
|
114
|
+
"summary": "Declarative column group of an `<argus-table>`.",
|
|
115
|
+
"tagName": "argus-column-group",
|
|
116
|
+
"customElement": true
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"exports": [
|
|
120
|
+
{
|
|
121
|
+
"kind": "js",
|
|
122
|
+
"name": "ArgusColumnGroup",
|
|
123
|
+
"declaration": {
|
|
124
|
+
"name": "ArgusColumnGroup",
|
|
125
|
+
"module": "src/argus-column-group.ts"
|
|
126
|
+
}
|
|
89
127
|
},
|
|
128
|
+
{
|
|
129
|
+
"kind": "custom-element-definition",
|
|
130
|
+
"name": "argus-column-group",
|
|
131
|
+
"declaration": {
|
|
132
|
+
"name": "ArgusColumnGroup",
|
|
133
|
+
"module": "src/argus-column-group.ts"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"kind": "javascript-module",
|
|
140
|
+
"path": "src/argus-column.ts",
|
|
141
|
+
"declarations": [
|
|
90
142
|
{
|
|
91
143
|
"kind": "class",
|
|
92
|
-
"description": "One column of the parent `<argus-table>`, written as markup instead of an entry in\nits `columns` property. It is data only and renders nothing.\n\nOnly direct children of the table count, in
|
|
144
|
+
"description": "One column of the parent `<argus-table>`, written as markup instead of an entry in\nits `columns` property. It is data only and renders nothing.\n\nOnly direct children of the table or of an `<argus-column-group>` count, in\ndocument order. A non-empty `columns` property wins over the children. Adding, removing, moving or changing a column\nupdates the table; sizes, order and sorting are kept by `column-id`.\n\nA `<template>` child is the content of every cell in the column (static: the same\nfor each row). Set the `cell` property for content that depends on the row.\n\nThe standard `hidden` attribute (or property) hides the column, like `hidden` in\n`columns`; the table's `columnVisibility` overrides it.",
|
|
93
145
|
"name": "ArgusColumn",
|
|
94
146
|
"members": [
|
|
95
147
|
{
|
|
@@ -260,16 +312,6 @@
|
|
|
260
312
|
"text": "readonly FilterValue[] | undefined"
|
|
261
313
|
},
|
|
262
314
|
"description": "The values a `set` filter offers; needed with a `dataSource`. Property only."
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
"kind": "method",
|
|
266
|
-
"name": "toColumnDef",
|
|
267
|
-
"return": {
|
|
268
|
-
"type": {
|
|
269
|
-
"text": "ColumnDef<T>"
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
"description": "The column as the table reads it. Unset fields stay `undefined`, which the\ntable reads as its defaults. An unknown `pin` is ignored and an unknown\n`align` falls back to `start`."
|
|
273
315
|
}
|
|
274
316
|
],
|
|
275
317
|
"attributes": [
|
|
@@ -416,22 +458,6 @@
|
|
|
416
458
|
}
|
|
417
459
|
],
|
|
418
460
|
"exports": [
|
|
419
|
-
{
|
|
420
|
-
"kind": "js",
|
|
421
|
-
"name": "watchColumns",
|
|
422
|
-
"declaration": {
|
|
423
|
-
"name": "watchColumns",
|
|
424
|
-
"module": "src/argus-column.ts"
|
|
425
|
-
}
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
"kind": "js",
|
|
429
|
-
"name": "unwatchColumns",
|
|
430
|
-
"declaration": {
|
|
431
|
-
"name": "unwatchColumns",
|
|
432
|
-
"module": "src/argus-column.ts"
|
|
433
|
-
}
|
|
434
|
-
},
|
|
435
461
|
{
|
|
436
462
|
"kind": "js",
|
|
437
463
|
"name": "ArgusColumn",
|
|
@@ -456,7 +482,7 @@
|
|
|
456
482
|
"declarations": [
|
|
457
483
|
{
|
|
458
484
|
"kind": "class",
|
|
459
|
-
"description": "A virtualized data table.\n\nSet `columns`, and `data` or `dataSource`, as properties. Columns can also be\nwritten as `<argus-column>` children; a non-empty `columns` wins over them.\nHeader and cell content is rendered into the element's light DOM and slotted\ninto the cells, so page CSS and the page's own components work inside cells.\n\nAny number of rows scrolls to the end. Browsers limit an element's height\n(about 800k rows of 40 px in Chromium and Safari, 400k in Firefox), so a taller\nbody renders shorter and its scroll position is scaled onto the rows: the\nscrollbar still spans every row, and a wheel step covers a few more of them.\nUse `scrollToRow()` rather than setting the scroll container's `scrollTop`.",
|
|
485
|
+
"description": "A virtualized data table.\n\nSet `columns`, and `data` or `dataSource`, as properties. Columns can also be\nwritten as `<argus-column>` children; a non-empty `columns` wins over them.\n`columnGroups` (or `<argus-column-group>` children) adds headers over several\ncolumns, a header row per level of nesting.\nHeader and cell content is rendered into the element's light DOM and slotted\ninto the cells, so page CSS and the page's own components work inside cells.\n\nAny number of rows scrolls to the end. Browsers limit an element's height\n(about 800k rows of 40 px in Chromium and Safari, 400k in Firefox), so a taller\nbody renders shorter and its scroll position is scaled onto the rows: the\nscrollbar still spans every row, and a wheel step covers a few more of them.\nUse `scrollToRow()` rather than setting the scroll container's `scrollTop`.",
|
|
460
486
|
"name": "ArgusTable",
|
|
461
487
|
"cssProperties": [
|
|
462
488
|
{
|
|
@@ -493,17 +519,17 @@
|
|
|
493
519
|
"default": "1px"
|
|
494
520
|
},
|
|
495
521
|
{
|
|
496
|
-
"description": "Border around the whole table, as a `border` shorthand (`1px solid …`). Inside the element's size.",
|
|
497
|
-
"name": "--argus-
|
|
522
|
+
"description": "Border around the whole table, as a `border` shorthand (`1px solid …`). Inside the element's size. The lines between rows are `--argus-border-width` and `--argus-border-color`.",
|
|
523
|
+
"name": "--argus-border",
|
|
498
524
|
"default": "none"
|
|
499
525
|
},
|
|
500
526
|
{
|
|
501
527
|
"description": "Corner radius of the table. Header, rows and pinned columns are clipped to it.",
|
|
502
|
-
"name": "--argus-radius",
|
|
528
|
+
"name": "--argus-border-radius",
|
|
503
529
|
"default": "0"
|
|
504
530
|
},
|
|
505
531
|
{
|
|
506
|
-
"description": "Height of a row. Default per density: 32px, 40px, 52px. With `rowHeight: 'auto'`: the header
|
|
532
|
+
"description": "Height of a row, and of each header row. Default per density: 32px, 40px, 52px. With `rowHeight: 'auto'`: the height of each header row and the least a body or pinned row is.",
|
|
507
533
|
"name": "--argus-row-height"
|
|
508
534
|
},
|
|
509
535
|
{
|
|
@@ -516,7 +542,7 @@
|
|
|
516
542
|
},
|
|
517
543
|
{
|
|
518
544
|
"description": "Background of odd rows. Default: no stripes.",
|
|
519
|
-
"name": "--argus-row-
|
|
545
|
+
"name": "--argus-row-odd-bg"
|
|
520
546
|
},
|
|
521
547
|
{
|
|
522
548
|
"description": "Shadow on the pinned edge, as a `box-shadow` falling toward the end side (`4px 0 6px -4px …`). Mirrored for the end edge and in RTL; `none` removes it.",
|
|
@@ -547,7 +573,7 @@
|
|
|
547
573
|
},
|
|
548
574
|
{
|
|
549
575
|
"description": "Background of the pinned rows, pinned columns included.",
|
|
550
|
-
"name": "--argus-pinned-
|
|
576
|
+
"name": "--argus-row-pinned-bg",
|
|
551
577
|
"default": "var(--argus-bg)"
|
|
552
578
|
},
|
|
553
579
|
{
|
|
@@ -569,17 +595,53 @@
|
|
|
569
595
|
"name": "header"
|
|
570
596
|
},
|
|
571
597
|
{
|
|
572
|
-
"description": "The header row.",
|
|
598
|
+
"description": "The row of column headers: the last header row when there are column groups.",
|
|
573
599
|
"name": "header-row"
|
|
574
600
|
},
|
|
575
601
|
{
|
|
576
|
-
"description": "
|
|
602
|
+
"description": "A row of column group headers (`columnGroups`), one per level of nesting, above `header-row`.",
|
|
603
|
+
"name": "header-group-row"
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"description": "A column group's header, spanning its columns.",
|
|
607
|
+
"name": "header-group-cell"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"description": "Added to `header-group-cell` on the group being dragged to a new position.",
|
|
611
|
+
"name": "header-group-cell-dragging"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"description": "The empty cell of a group row over columns without a group at that level.",
|
|
615
|
+
"name": "header-group-filler"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"description": "Every column header.",
|
|
577
619
|
"name": "header-cell"
|
|
578
620
|
},
|
|
579
621
|
{
|
|
580
|
-
"description": "
|
|
622
|
+
"description": "Added to `header-cell` on the headers of sorted columns. The direction is also in `aria-sort`.",
|
|
581
623
|
"name": "header-cell-sorted"
|
|
582
624
|
},
|
|
625
|
+
{
|
|
626
|
+
"description": "Added to `header-cell` on the headers of columns sorted ascending, next to `header-cell-sorted`.",
|
|
627
|
+
"name": "header-cell-sorted-asc"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"description": "Added to `header-cell` on the headers of columns sorted descending, next to `header-cell-sorted`.",
|
|
631
|
+
"name": "header-cell-sorted-desc"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"description": "Added to `header-cell` on the headers of pinned columns, on either side.",
|
|
635
|
+
"name": "header-cell-pinned"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"description": "Added to `header-cell-pinned` on the pinned header next to the scrolling columns (one per pinned side).",
|
|
639
|
+
"name": "header-cell-pinned-edge"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"description": "The chevron in a sortable column's header, shown while it is sorted and pointing the way it sorts. It is drawn with borders in `currentColor`.",
|
|
643
|
+
"name": "sort-indicator"
|
|
644
|
+
},
|
|
583
645
|
{
|
|
584
646
|
"description": "Added to `header-cell` on the headers of filtered columns.",
|
|
585
647
|
"name": "header-cell-filtered"
|
|
@@ -589,15 +651,15 @@
|
|
|
589
651
|
"name": "filter-indicator"
|
|
590
652
|
},
|
|
591
653
|
{
|
|
592
|
-
"description": "Added to `header-cell` on the header being dragged to a new position.",
|
|
654
|
+
"description": "Added to `header-cell` on the header being dragged to a new position, and on the headers of a dragged group's columns.",
|
|
593
655
|
"name": "header-cell-dragging"
|
|
594
656
|
},
|
|
595
657
|
{
|
|
596
|
-
"description": "The line on the edge of the header where a dragged column would land.",
|
|
658
|
+
"description": "The line on the edge of the header where a dragged column or group would land.",
|
|
597
659
|
"name": "drop-indicator"
|
|
598
660
|
},
|
|
599
661
|
{
|
|
600
|
-
"description": "The drag handle on the inline-end edge of a resizable column's header. A double-click fits the column to its content.",
|
|
662
|
+
"description": "The drag handle on the inline-end edge of a resizable column's header, and of a column group's header with resizable columns. A double-click fits the column (or the group's columns) to its content.",
|
|
601
663
|
"name": "resize-handle"
|
|
602
664
|
},
|
|
603
665
|
{
|
|
@@ -620,6 +682,10 @@
|
|
|
620
682
|
"description": "Body rows whose `dataSource` page hasn't loaded yet, or failed.",
|
|
621
683
|
"name": "row-loading"
|
|
622
684
|
},
|
|
685
|
+
{
|
|
686
|
+
"description": "Added to `row-loading` on body rows whose `dataSource` page failed to load.",
|
|
687
|
+
"name": "row-error"
|
|
688
|
+
},
|
|
623
689
|
{
|
|
624
690
|
"description": "Body rows whose id is in `selection`.",
|
|
625
691
|
"name": "row-selected"
|
|
@@ -650,22 +716,22 @@
|
|
|
650
716
|
},
|
|
651
717
|
{
|
|
652
718
|
"description": "Every cell of a pinned row (next to `cell`).",
|
|
653
|
-
"name": "cell-pinned-row"
|
|
719
|
+
"name": "cell-in-pinned-row"
|
|
654
720
|
},
|
|
655
721
|
{
|
|
656
722
|
"description": "Every body cell.",
|
|
657
723
|
"name": "cell"
|
|
658
724
|
},
|
|
659
725
|
{
|
|
660
|
-
"description": "Body cells in the sorted column.",
|
|
726
|
+
"description": "Body and pinned-row cells in the sorted column.",
|
|
661
727
|
"name": "cell-sorted"
|
|
662
728
|
},
|
|
663
729
|
{
|
|
664
|
-
"description": "Body cells in a pinned column, on either side.",
|
|
730
|
+
"description": "Body and pinned-row cells in a pinned column, on either side.",
|
|
665
731
|
"name": "cell-pinned"
|
|
666
732
|
},
|
|
667
733
|
{
|
|
668
|
-
"description": "The pinned
|
|
734
|
+
"description": "The pinned cell next to the scrolling columns (one per pinned side), in body and pinned rows.",
|
|
669
735
|
"name": "cell-pinned-edge"
|
|
670
736
|
},
|
|
671
737
|
{
|
|
@@ -700,6 +766,14 @@
|
|
|
700
766
|
},
|
|
701
767
|
"description": "Column definitions. Property only: functions can't be attributes. While empty,\nthe table reads its `<argus-column>` children instead. `null` or `undefined`\nmeans `[]`."
|
|
702
768
|
},
|
|
769
|
+
{
|
|
770
|
+
"kind": "field",
|
|
771
|
+
"name": "columnGroups",
|
|
772
|
+
"type": {
|
|
773
|
+
"text": "readonly ColumnGroup[]"
|
|
774
|
+
},
|
|
775
|
+
"description": "Headers over several columns: `{ id, header, columns }`, where `columns` lists\ncolumn ids and nested groups. Each level of nesting adds a header row. A group's\ncolumns stay next to each other: they move within the group, and the group\nmoves as a whole (drag its header, or Alt+Shift+Arrow). A group whose columns\nare pinned to different sides shows on each side. Property only. While empty\nand `columns` is too, the table reads its `<argus-column-group>` children.\n`null` or `undefined` means `[]`."
|
|
776
|
+
},
|
|
703
777
|
{
|
|
704
778
|
"kind": "field",
|
|
705
779
|
"name": "data",
|
|
@@ -714,7 +788,7 @@
|
|
|
714
788
|
"type": {
|
|
715
789
|
"text": "DataSource<T> | undefined"
|
|
716
790
|
},
|
|
717
|
-
"description": "Loads rows page by page as they scroll into view, instead of `data`:\n`{ getRows({ start, end, sorting, signal }), pageSize? }
|
|
791
|
+
"description": "Loads rows page by page as they scroll into view, instead of `data`:\n`{ getRows({ start, end, sorting, filters, quickFilter, signal }), pageSize? }`,\nwhere `end` is exclusive and `getRows` resolves to `{ rows, total? }`. Without a\n`total`, the table grows as pages arrive and a short page marks the end. Sorting\nand filtering happen on the server: a new order or filter reloads from the top.\nWhile set, it wins over `data`. Replace the object to change `getRows` or\n`pageSize`."
|
|
718
792
|
},
|
|
719
793
|
{
|
|
720
794
|
"kind": "field",
|
|
@@ -768,7 +842,7 @@
|
|
|
768
842
|
"text": "boolean"
|
|
769
843
|
},
|
|
770
844
|
"default": "false",
|
|
771
|
-
"description": "Renders only the scrolling columns in view (plus two on each side), for\nwide tables: a few dozen columns and more. Pinned columns, the checkbox\ncolumn and the focused cell's column always render. Off by default: then\nevery column renders, as before. Cells are placed in their grid column\nexplicitly, so page CSS that relies on their order in the DOM (`:nth-child`\non cells) doesn't apply. `autosizeColumns()` and `width: 'auto'` columns\nstill measure columns out of view: they render for the measurement.",
|
|
845
|
+
"description": "Renders only the scrolling columns in view (plus two on each side), for\nwide tables: a few dozen columns and more. Pinned columns, the checkbox\ncolumn and the focused cell's column always render. Off by default: then\nevery column renders, as before. Cells are placed in their grid column\nexplicitly, so page CSS that relies on their order in the DOM (`:nth-child`\non cells) doesn't apply. `autosizeColumns()` and `width: 'auto'` columns\nstill measure columns out of view: they render for the measurement.\nAs an attribute, `virtualize-columns=\"false\"` is off, like no attribute.",
|
|
772
846
|
"attribute": "virtualize-columns"
|
|
773
847
|
},
|
|
774
848
|
{
|
|
@@ -777,7 +851,7 @@
|
|
|
777
851
|
"type": {
|
|
778
852
|
"text": "SortState"
|
|
779
853
|
},
|
|
780
|
-
"description": "The sort order, e.g. `[{ id: 'total', desc: true }]`; `[]` when unsorted. Unset,\nthe table keeps it itself and header clicks change it. Once set, it is\ncontrolled: a click only fires `argus-
|
|
854
|
+
"description": "The sort order, e.g. `[{ id: 'total', desc: true }]`; `[]` when unsorted. Unset,\nthe table keeps it itself and header clicks change it. Once set, it is\ncontrolled: a click only fires `argus-sorting-change` with the proposed order,\nand nothing changes until you set the property. Set `undefined` to hand it back."
|
|
781
855
|
},
|
|
782
856
|
{
|
|
783
857
|
"kind": "field",
|
|
@@ -785,7 +859,7 @@
|
|
|
785
859
|
"type": {
|
|
786
860
|
"text": "ColumnSizingState"
|
|
787
861
|
},
|
|
788
|
-
"description": "Resized widths in px by column id, e.g. `{ name: 240 }`. A resized flex column\nbecomes fixed. Uncontrolled until set, like `sorting`: once set, a resize only\nfires `argus-column-
|
|
862
|
+
"description": "Resized widths in px by column id, e.g. `{ name: 240 }`. A resized flex column\nbecomes fixed. Uncontrolled until set, like `sorting`: once set, a resize only\nfires `argus-column-sizing-change` with the proposed widths. `undefined` hands it back."
|
|
789
863
|
},
|
|
790
864
|
{
|
|
791
865
|
"kind": "field",
|
|
@@ -793,7 +867,7 @@
|
|
|
793
867
|
"type": {
|
|
794
868
|
"text": "ColumnOrderState"
|
|
795
869
|
},
|
|
796
|
-
"description": "The column order: column ids as the table shows them, e.g.\n`['id', 'total', 'customer']`. `[]` (the default) keeps the order of `columns`.\nEach pin group (start-pinned, scrolling, end-pinned) takes its columns in this\norder; unknown ids are ignored and columns it doesn't list follow the listed\nones of their group. After a move it holds every column id. Uncontrolled\nuntil set, like `sorting`: once set, a move only fires `argus-column-
|
|
870
|
+
"description": "The column order: column ids as the table shows them, e.g.\n`['id', 'total', 'customer']`. `[]` (the default) keeps the order of `columns`.\nEach pin group (start-pinned, scrolling, end-pinned) takes its columns in this\norder; unknown ids are ignored and columns it doesn't list follow the listed\nones of their group. After a move it holds every column id. Uncontrolled\nuntil set, like `sorting`: once set, a move only fires `argus-column-order-change`\nwith the proposed order. `undefined` hands it back."
|
|
797
871
|
},
|
|
798
872
|
{
|
|
799
873
|
"kind": "field",
|
|
@@ -801,7 +875,7 @@
|
|
|
801
875
|
"type": {
|
|
802
876
|
"text": "ColumnPinningState"
|
|
803
877
|
},
|
|
804
|
-
"description": "Pins by column id, over the columns' own `pin`: `'start'` or `'end'` pins a\ncolumn, `false` unpins one whose definition pins it, e.g.\n`{ total: 'end', id: false }`. Columns it doesn't list keep their `pin`. A pinned\ncolumn joins the edge of its group nearest its place in `columnOrder`, and stops\nflexing. Uncontrolled until set, like `sorting`: once set, pinning from a plugin\nonly fires `argus-column-
|
|
878
|
+
"description": "Pins by column id, over the columns' own `pin`: `'start'` or `'end'` pins a\ncolumn, `false` unpins one whose definition pins it, e.g.\n`{ total: 'end', id: false }`. Columns it doesn't list keep their `pin`. A pinned\ncolumn joins the edge of its group nearest its place in `columnOrder`, and stops\nflexing. Uncontrolled until set, like `sorting`: once set, pinning from a plugin\nonly fires `argus-column-pinning-change` with the proposed pins. `undefined` hands it back."
|
|
805
879
|
},
|
|
806
880
|
{
|
|
807
881
|
"kind": "field",
|
|
@@ -809,7 +883,7 @@
|
|
|
809
883
|
"type": {
|
|
810
884
|
"text": "ColumnVisibilityState"
|
|
811
885
|
},
|
|
812
|
-
"description": "Visibility by column id, over the columns' own `hidden`: `false` hides a column,\n`true` shows one defined as `hidden`, e.g. `{ email: false }`. Columns it\ndoesn't list keep their `hidden`. A hidden column isn't rendered, but sorting by\nit still works and it keeps its place in `columnOrder`. Uncontrolled until set,\nlike `sorting`: once set, hiding or showing from a plugin only fires\n`argus-column-
|
|
886
|
+
"description": "Visibility by column id, over the columns' own `hidden`: `false` hides a column,\n`true` shows one defined as `hidden`, e.g. `{ email: false }`. Columns it\ndoesn't list keep their `hidden`. A hidden column isn't rendered, but sorting by\nit still works and it keeps its place in `columnOrder`. Uncontrolled until set,\nlike `sorting`: once set, hiding or showing from a plugin only fires\n`argus-column-visibility-change` with the proposed visibility. `undefined` hands it back."
|
|
813
887
|
},
|
|
814
888
|
{
|
|
815
889
|
"kind": "field",
|
|
@@ -817,7 +891,7 @@
|
|
|
817
891
|
"type": {
|
|
818
892
|
"text": "ColumnFilterState"
|
|
819
893
|
},
|
|
820
|
-
"description": "Filters by column id, e.g. `{ city: { kind: 'set', values: ['Berlin'] } }` or\n`{ total: { kind: 'number', op: 'gt', value: 100 } }`. A row shows when it passes\nevery filter and `quickFilter`. Filters on hidden columns still apply; unknown ids\nare ignored. A column's `filterFn` replaces the built-in matching. With a\n`dataSource`, the filters go to `getRows()` and the server filters. Users set\nfilters through plugins (the column menu) on columns with a `filter` kind.\nUncontrolled until set, like `sorting`: once set, a change from a plugin only\nfires `argus-column-
|
|
894
|
+
"description": "Filters by column id, e.g. `{ city: { kind: 'set', values: ['Berlin'] } }` or\n`{ total: { kind: 'number', op: 'gt', value: 100 } }`. A row shows when it passes\nevery filter and `quickFilter`. Filters on hidden columns still apply; unknown ids\nare ignored. A column's `filterFn` replaces the built-in matching. With a\n`dataSource`, the filters go to `getRows()` and the server filters. Users set\nfilters through plugins (the column menu) on columns with a `filter` kind.\nUncontrolled until set, like `sorting`: once set, a change from a plugin only\nfires `argus-column-filters-change` with the proposed filters. `undefined` hands it back."
|
|
821
895
|
},
|
|
822
896
|
{
|
|
823
897
|
"kind": "field",
|
|
@@ -845,7 +919,7 @@
|
|
|
845
919
|
"text": "boolean"
|
|
846
920
|
},
|
|
847
921
|
"default": "false",
|
|
848
|
-
"description": "Adds a checkbox column, pinned first at the start, while `selectionMode` is\n`single` or `multi`. A row's checkbox toggles it (Shift+click adds the range\nfrom the last row clicked); in `multi` mode the header's checkbox selects\nevery row, or clears the selection when all are selected. Space on a\nfocused checkbox cell does the same. The column isn't part of `columns`,\n`columnOrder` or `columnSizing`, and it fires no `argus-cell-click
|
|
922
|
+
"description": "Adds a checkbox column, pinned first at the start, while `selectionMode` is\n`single` or `multi`. A row's checkbox toggles it (Shift+click adds the range\nfrom the last row clicked); in `multi` mode the header's checkbox selects\nevery row, or clears the selection when all are selected. Space on a\nfocused checkbox cell does the same. The column isn't part of `columns`,\n`columnOrder` or `columnSizing`, and it fires no `argus-cell-click`.\nAs an attribute, `selection-checkboxes=\"false\"` is off, like no attribute.",
|
|
849
923
|
"attribute": "selection-checkboxes"
|
|
850
924
|
},
|
|
851
925
|
{
|
|
@@ -854,7 +928,7 @@
|
|
|
854
928
|
"type": {
|
|
855
929
|
"text": "SelectionState"
|
|
856
930
|
},
|
|
857
|
-
"description": "The selected rows, as row ids (from `getRowId`, or the row's index as a\nstring), e.g. `['p4', 'p7']`. Uncontrolled until set, like `sorting`: once\nset, a click only fires `argus-
|
|
931
|
+
"description": "The selected rows, as row ids (from `getRowId`, or the row's index as a\nstring), e.g. `['p4', 'p7']`. Uncontrolled until set, like `sorting`: once\nset, a click only fires `argus-selection-change` with the proposed ids.\n`undefined` hands it back. The table never drops ids on its own: they stay\nthrough sorting, a new `data` or reloaded pages. With a `dataSource`,\nCtrl/Cmd+A selects the loaded rows only."
|
|
858
932
|
},
|
|
859
933
|
{
|
|
860
934
|
"kind": "field",
|
|
@@ -899,7 +973,7 @@
|
|
|
899
973
|
}
|
|
900
974
|
}
|
|
901
975
|
],
|
|
902
|
-
"description": "Fits columns to their content: the header, the pinned rows and the body rows\nrendered now (rows out of view aren't measured). It resizes them like a drag\nwould, so `argus-column-
|
|
976
|
+
"description": "Fits columns to their content: the header, the pinned rows and the body rows\nrendered now (rows out of view aren't measured). It resizes them like a drag\nwould, so `argus-column-sizing-change` fires for each column that changes, and with a\ncontrolled `columnSizing` nothing changes until you set it. Without `ids`, fits\nevery resizable column; columns with `resizable: false` keep their width.\nWith `virtualizeColumns`, columns out of view render for the measurement.\nResolves once the table has re-rendered."
|
|
903
977
|
},
|
|
904
978
|
{
|
|
905
979
|
"kind": "method",
|
|
@@ -927,7 +1001,7 @@
|
|
|
927
1001
|
"text": "Required<TableState>"
|
|
928
1002
|
}
|
|
929
1003
|
},
|
|
930
|
-
"description": "The state users change, as one object of plain JSON for saving a user's\nlayout: `sorting`, `columnSizing`, `columnOrder`, `columnPinning`,\n`columnVisibility`, `columnFilters`, `selection`, `quickFilter`, and `scroll`\n(the row at the top and the
|
|
1004
|
+
"description": "The state users change, as one object of plain JSON for saving a user's\nlayout: `sorting`, `columnSizing`, `columnOrder`, `columnPinning`,\n`columnVisibility`, `columnFilters`, `selection`, `quickFilter`, and `scroll`\n(the row at the top and the inline offset), with `version: 1`. Controlled properties are\nincluded with the values you set. The object is a copy: changing it changes\nnothing in the table."
|
|
931
1005
|
},
|
|
932
1006
|
{
|
|
933
1007
|
"kind": "method",
|
|
@@ -945,57 +1019,64 @@
|
|
|
945
1019
|
}
|
|
946
1020
|
}
|
|
947
1021
|
],
|
|
948
|
-
"description": "Restores state from `getState()`, for example a layout saved in\n`localStorage`. Only the keys given change; ids of columns that no longer\nexist are ignored. Properties you control are left alone (set them\nyourself), and the others stay uncontrolled. No change events fire.\n`quickFilter` is set like the property: a search box of yours shows it only\nif you read it back. `scroll` is applied after the rest, so with a\n`dataSource` the restored rows load where it points. Resolves once the table\nhas re-rendered there."
|
|
1022
|
+
"description": "Restores state from `getState()`, for example a layout saved in\n`localStorage`. Only the keys given change; ids of columns that no longer\nexist are ignored. State of another `version` is ignored as a whole. Properties you control are left alone (set them\nyourself), and the others stay uncontrolled. No change events fire.\n`quickFilter` is set like the property: a search box of yours shows it only\nif you read it back. `scroll` is applied after the rest, so with a\n`dataSource` the restored rows load where it points. Resolves once the table\nhas re-rendered there."
|
|
949
1023
|
}
|
|
950
1024
|
],
|
|
951
1025
|
"events": [
|
|
952
1026
|
{
|
|
953
1027
|
"type": {
|
|
954
|
-
"text": "CustomEvent<
|
|
1028
|
+
"text": "CustomEvent<SortingChangeDetail>"
|
|
1029
|
+
},
|
|
1030
|
+
"description": "`sorting` changed: a sortable header was clicked, or activated with Enter or Space. `detail: { sorting }`. The new value fires after the update that applied it; when the property is controlled, the proposed value fires right away and nothing changes until the host sets it.",
|
|
1031
|
+
"name": "argus-sorting-change"
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
"type": {
|
|
1035
|
+
"text": "CustomEvent<ColumnSizingChangeDetail>"
|
|
955
1036
|
},
|
|
956
|
-
"description": "
|
|
957
|
-
"name": "argus-
|
|
1037
|
+
"description": "`columnSizing` changed: a column was resized by dragging its handle, with Alt+Arrow on its header, by a double-click on its handle (fit to content) or by `autosizeColumns()`. `detail: { columnSizing, columnId, width }`. Fires on every frame of a drag, and once per column that changes (a group resize, `autosizeColumns()`). The new value fires after the update that applied it; when the property is controlled, the proposed value fires right away and nothing changes until the host sets it.",
|
|
1038
|
+
"name": "argus-column-sizing-change"
|
|
958
1039
|
},
|
|
959
1040
|
{
|
|
960
1041
|
"type": {
|
|
961
|
-
"text": "CustomEvent<
|
|
1042
|
+
"text": "CustomEvent<ColumnOrderChangeDetail>"
|
|
962
1043
|
},
|
|
963
|
-
"description": "
|
|
964
|
-
"name": "argus-column-
|
|
1044
|
+
"description": "`columnOrder` changed: a column or column group was moved by dragging its header, or with Alt+Shift+Arrow on its focused header. Columns move within their pin side (start-pinned, scrolling, end-pinned) and their column group; groups move as a whole. `detail: { columnOrder, columnId, groupId? }`: `groupId` is set when a group moved, and `columnId` is then its first column. Fires once per move, on drop. The new value fires after the update that applied it; when the property is controlled, the proposed value fires right away and nothing changes until the host sets it.",
|
|
1045
|
+
"name": "argus-column-order-change"
|
|
965
1046
|
},
|
|
966
1047
|
{
|
|
967
1048
|
"type": {
|
|
968
|
-
"text": "CustomEvent<
|
|
1049
|
+
"text": "CustomEvent<ColumnPinningChangeDetail>"
|
|
969
1050
|
},
|
|
970
|
-
"description": "
|
|
971
|
-
"name": "argus-column-
|
|
1051
|
+
"description": "`columnPinning` changed: a column was pinned to a side or unpinned, through a plugin such as the column menu. `detail: { columnPinning, columnId, pin }`: `pin` is `'start'`, `'end'` or `false`. The new value fires after the update that applied it; when the property is controlled, the proposed value fires right away and nothing changes until the host sets it.",
|
|
1052
|
+
"name": "argus-column-pinning-change"
|
|
972
1053
|
},
|
|
973
1054
|
{
|
|
974
1055
|
"type": {
|
|
975
|
-
"text": "CustomEvent<
|
|
1056
|
+
"text": "CustomEvent<ColumnVisibilityChangeDetail>"
|
|
976
1057
|
},
|
|
977
|
-
"description": "
|
|
978
|
-
"name": "argus-column-
|
|
1058
|
+
"description": "`columnVisibility` changed: a column was hidden or shown, through a plugin such as the column menu. `detail: { columnVisibility, columnId, visible }`: `visible` is `false` when it was hidden. The new value fires after the update that applied it; when the property is controlled, the proposed value fires right away and nothing changes until the host sets it.",
|
|
1059
|
+
"name": "argus-column-visibility-change"
|
|
979
1060
|
},
|
|
980
1061
|
{
|
|
981
1062
|
"type": {
|
|
982
|
-
"text": "CustomEvent<
|
|
1063
|
+
"text": "CustomEvent<ColumnFiltersChangeDetail>"
|
|
983
1064
|
},
|
|
984
|
-
"description": "
|
|
985
|
-
"name": "argus-column-
|
|
1065
|
+
"description": "`columnFilters` changed: a column's filter was set, changed or cleared, through a plugin such as the column menu. `detail: { columnFilters, columnId, columnFilter }`: `columnFilter` is the column's new filter, or `undefined` when it was cleared. The new value fires after the update that applied it; when the property is controlled, the proposed value fires right away and nothing changes until the host sets it.",
|
|
1066
|
+
"name": "argus-column-filters-change"
|
|
986
1067
|
},
|
|
987
1068
|
{
|
|
988
1069
|
"type": {
|
|
989
|
-
"text": "CustomEvent<
|
|
1070
|
+
"text": "CustomEvent<SelectionChangeDetail>"
|
|
990
1071
|
},
|
|
991
|
-
"description": "
|
|
992
|
-
"name": "argus-
|
|
1072
|
+
"description": "`selection` changed: by a click on a row (Ctrl/Cmd toggles, Shift selects a range), with Space, Shift+Arrow or Shift+PageUp/PageDown on a body cell, or with Ctrl/Cmd+A. Only with a `selectionMode`. `detail: { selection }`. The new value fires after the update that applied it; when the property is controlled, the proposed value fires right away and nothing changes until the host sets it.",
|
|
1073
|
+
"name": "argus-selection-change"
|
|
993
1074
|
},
|
|
994
1075
|
{
|
|
995
1076
|
"type": {
|
|
996
1077
|
"text": "CustomEvent<CellClickDetail<T>>"
|
|
997
1078
|
},
|
|
998
|
-
"description": "A body or pinned-row cell was clicked, or Enter was pressed on it. `detail: { row, columnId, value, pinned? }`; `pinned` is `'top'` or `'bottom'` for a pinned row. Fires before `argus-row-click`.",
|
|
1079
|
+
"description": "A body or pinned-row cell was clicked, or Enter was pressed on it. `detail: { row, rowId, index, columnId, value, pinned? }`; `pinned` is `'top'` or `'bottom'` for a pinned row, and `index` is then its index in its list. Fires before `argus-row-click`.",
|
|
999
1080
|
"name": "argus-cell-click"
|
|
1000
1081
|
},
|
|
1001
1082
|
{
|
|
@@ -1009,16 +1090,9 @@
|
|
|
1009
1090
|
"type": {
|
|
1010
1091
|
"text": "CustomEvent<RangeChangeDetail>"
|
|
1011
1092
|
},
|
|
1012
|
-
"description": "The
|
|
1093
|
+
"description": "The rows in view changed (rows rendered ahead of the scroll position not counted). `detail: { first, last }` (row indices in the current order, both inclusive).",
|
|
1013
1094
|
"name": "argus-range-change"
|
|
1014
1095
|
},
|
|
1015
|
-
{
|
|
1016
|
-
"type": {
|
|
1017
|
-
"text": "CustomEvent<RowSelectDetail>"
|
|
1018
|
-
},
|
|
1019
|
-
"description": "The selected rows changed: by a click on a row (Ctrl/Cmd toggles, Shift selects a range), with Space, Shift+Arrow or Shift+PageUp/PageDown on a body cell, or with Ctrl/Cmd+A. Only with a `selectionMode`. `detail: { selection }`: the new row ids, or the proposed ones when `selection` is controlled.",
|
|
1020
|
-
"name": "argus-row-select"
|
|
1021
|
-
},
|
|
1022
1096
|
{
|
|
1023
1097
|
"type": {
|
|
1024
1098
|
"text": "CustomEvent<LoadErrorDetail>"
|
|
@@ -1059,7 +1133,7 @@
|
|
|
1059
1133
|
"text": "boolean"
|
|
1060
1134
|
},
|
|
1061
1135
|
"default": "false",
|
|
1062
|
-
"description": "Renders only the scrolling columns in view (plus two on each side), for\nwide tables: a few dozen columns and more. Pinned columns, the checkbox\ncolumn and the focused cell's column always render. Off by default: then\nevery column renders, as before. Cells are placed in their grid column\nexplicitly, so page CSS that relies on their order in the DOM (`:nth-child`\non cells) doesn't apply. `autosizeColumns()` and `width: 'auto'` columns\nstill measure columns out of view: they render for the measurement.",
|
|
1136
|
+
"description": "Renders only the scrolling columns in view (plus two on each side), for\nwide tables: a few dozen columns and more. Pinned columns, the checkbox\ncolumn and the focused cell's column always render. Off by default: then\nevery column renders, as before. Cells are placed in their grid column\nexplicitly, so page CSS that relies on their order in the DOM (`:nth-child`\non cells) doesn't apply. `autosizeColumns()` and `width: 'auto'` columns\nstill measure columns out of view: they render for the measurement.\nAs an attribute, `virtualize-columns=\"false\"` is off, like no attribute.",
|
|
1063
1137
|
"fieldName": "virtualizeColumns"
|
|
1064
1138
|
},
|
|
1065
1139
|
{
|
|
@@ -1085,7 +1159,7 @@
|
|
|
1085
1159
|
"text": "boolean"
|
|
1086
1160
|
},
|
|
1087
1161
|
"default": "false",
|
|
1088
|
-
"description": "Adds a checkbox column, pinned first at the start, while `selectionMode` is\n`single` or `multi`. A row's checkbox toggles it (Shift+click adds the range\nfrom the last row clicked); in `multi` mode the header's checkbox selects\nevery row, or clears the selection when all are selected. Space on a\nfocused checkbox cell does the same. The column isn't part of `columns`,\n`columnOrder` or `columnSizing`, and it fires no `argus-cell-click
|
|
1162
|
+
"description": "Adds a checkbox column, pinned first at the start, while `selectionMode` is\n`single` or `multi`. A row's checkbox toggles it (Shift+click adds the range\nfrom the last row clicked); in `multi` mode the header's checkbox selects\nevery row, or clears the selection when all are selected. Space on a\nfocused checkbox cell does the same. The column isn't part of `columns`,\n`columnOrder` or `columnSizing`, and it fires no `argus-cell-click`.\nAs an attribute, `selection-checkboxes=\"false\"` is off, like no attribute.",
|
|
1089
1163
|
"fieldName": "selectionCheckboxes"
|
|
1090
1164
|
}
|
|
1091
1165
|
],
|
|
@@ -1117,6 +1191,103 @@
|
|
|
1117
1191
|
}
|
|
1118
1192
|
]
|
|
1119
1193
|
},
|
|
1194
|
+
{
|
|
1195
|
+
"kind": "javascript-module",
|
|
1196
|
+
"path": "src/attributes.ts",
|
|
1197
|
+
"declarations": [],
|
|
1198
|
+
"exports": []
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"kind": "javascript-module",
|
|
1202
|
+
"path": "src/column-registry.ts",
|
|
1203
|
+
"declarations": [
|
|
1204
|
+
{
|
|
1205
|
+
"kind": "function",
|
|
1206
|
+
"name": "watchColumns",
|
|
1207
|
+
"return": {
|
|
1208
|
+
"type": {
|
|
1209
|
+
"text": "void"
|
|
1210
|
+
}
|
|
1211
|
+
},
|
|
1212
|
+
"parameters": [
|
|
1213
|
+
{
|
|
1214
|
+
"name": "host",
|
|
1215
|
+
"type": {
|
|
1216
|
+
"text": "Element"
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"name": "onChange",
|
|
1221
|
+
"type": {
|
|
1222
|
+
"text": "() => void"
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
],
|
|
1226
|
+
"description": "Calls `onChange` whenever a column or group child of `host` is added, removed, moved or changed."
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
"kind": "function",
|
|
1230
|
+
"name": "unwatchColumns",
|
|
1231
|
+
"return": {
|
|
1232
|
+
"type": {
|
|
1233
|
+
"text": "void"
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1236
|
+
"parameters": [
|
|
1237
|
+
{
|
|
1238
|
+
"name": "host",
|
|
1239
|
+
"type": {
|
|
1240
|
+
"text": "Element"
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
]
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"kind": "function",
|
|
1247
|
+
"name": "notify",
|
|
1248
|
+
"return": {
|
|
1249
|
+
"type": {
|
|
1250
|
+
"text": "void"
|
|
1251
|
+
}
|
|
1252
|
+
},
|
|
1253
|
+
"parameters": [
|
|
1254
|
+
{
|
|
1255
|
+
"name": "parent",
|
|
1256
|
+
"type": {
|
|
1257
|
+
"text": "Element | null"
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
],
|
|
1261
|
+
"description": "Tells a column's or group's parent that it changed."
|
|
1262
|
+
}
|
|
1263
|
+
],
|
|
1264
|
+
"exports": [
|
|
1265
|
+
{
|
|
1266
|
+
"kind": "js",
|
|
1267
|
+
"name": "watchColumns",
|
|
1268
|
+
"declaration": {
|
|
1269
|
+
"name": "watchColumns",
|
|
1270
|
+
"module": "src/column-registry.ts"
|
|
1271
|
+
}
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"kind": "js",
|
|
1275
|
+
"name": "unwatchColumns",
|
|
1276
|
+
"declaration": {
|
|
1277
|
+
"name": "unwatchColumns",
|
|
1278
|
+
"module": "src/column-registry.ts"
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
"kind": "js",
|
|
1283
|
+
"name": "notify",
|
|
1284
|
+
"declaration": {
|
|
1285
|
+
"name": "notify",
|
|
1286
|
+
"module": "src/column-registry.ts"
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
]
|
|
1290
|
+
},
|
|
1120
1291
|
{
|
|
1121
1292
|
"kind": "javascript-module",
|
|
1122
1293
|
"path": "src/events.ts",
|
|
@@ -1128,88 +1299,88 @@
|
|
|
1128
1299
|
"text": "string"
|
|
1129
1300
|
},
|
|
1130
1301
|
"default": "'argus-range-change'",
|
|
1131
|
-
"description": "Fired after an update when the
|
|
1302
|
+
"description": "Fired after an update when the rows in view changed."
|
|
1132
1303
|
},
|
|
1133
1304
|
{
|
|
1134
1305
|
"kind": "variable",
|
|
1135
|
-
"name": "
|
|
1306
|
+
"name": "SORTING_CHANGE",
|
|
1136
1307
|
"type": {
|
|
1137
1308
|
"text": "string"
|
|
1138
1309
|
},
|
|
1139
|
-
"default": "'argus-
|
|
1140
|
-
"description": "
|
|
1310
|
+
"default": "'argus-sorting-change'",
|
|
1311
|
+
"description": "`sorting` changed (uncontrolled), or the proposed order (controlled)."
|
|
1141
1312
|
},
|
|
1142
1313
|
{
|
|
1143
1314
|
"kind": "variable",
|
|
1144
|
-
"name": "
|
|
1315
|
+
"name": "COLUMN_SIZING_CHANGE",
|
|
1145
1316
|
"type": {
|
|
1146
1317
|
"text": "string"
|
|
1147
1318
|
},
|
|
1148
|
-
"default": "'argus-column-
|
|
1149
|
-
"description": "
|
|
1319
|
+
"default": "'argus-column-sizing-change'",
|
|
1320
|
+
"description": "`columnSizing` changed (uncontrolled), or the proposed widths (controlled). Once per column."
|
|
1150
1321
|
},
|
|
1151
1322
|
{
|
|
1152
1323
|
"kind": "variable",
|
|
1153
|
-
"name": "
|
|
1324
|
+
"name": "COLUMN_ORDER_CHANGE",
|
|
1154
1325
|
"type": {
|
|
1155
1326
|
"text": "string"
|
|
1156
1327
|
},
|
|
1157
|
-
"default": "'argus-column-
|
|
1158
|
-
"description": "
|
|
1328
|
+
"default": "'argus-column-order-change'",
|
|
1329
|
+
"description": "`columnOrder` changed (uncontrolled), or the proposed order (controlled)."
|
|
1159
1330
|
},
|
|
1160
1331
|
{
|
|
1161
1332
|
"kind": "variable",
|
|
1162
|
-
"name": "
|
|
1333
|
+
"name": "COLUMN_PINNING_CHANGE",
|
|
1163
1334
|
"type": {
|
|
1164
1335
|
"text": "string"
|
|
1165
1336
|
},
|
|
1166
|
-
"default": "'argus-column-
|
|
1167
|
-
"description": "
|
|
1337
|
+
"default": "'argus-column-pinning-change'",
|
|
1338
|
+
"description": "`columnPinning` changed (uncontrolled), or the proposed pins (controlled)."
|
|
1168
1339
|
},
|
|
1169
1340
|
{
|
|
1170
1341
|
"kind": "variable",
|
|
1171
|
-
"name": "
|
|
1342
|
+
"name": "COLUMN_VISIBILITY_CHANGE",
|
|
1172
1343
|
"type": {
|
|
1173
1344
|
"text": "string"
|
|
1174
1345
|
},
|
|
1175
|
-
"default": "'argus-column-
|
|
1176
|
-
"description": "
|
|
1346
|
+
"default": "'argus-column-visibility-change'",
|
|
1347
|
+
"description": "`columnVisibility` changed (uncontrolled), or the proposed visibility (controlled)."
|
|
1177
1348
|
},
|
|
1178
1349
|
{
|
|
1179
1350
|
"kind": "variable",
|
|
1180
|
-
"name": "
|
|
1351
|
+
"name": "COLUMN_FILTERS_CHANGE",
|
|
1181
1352
|
"type": {
|
|
1182
1353
|
"text": "string"
|
|
1183
1354
|
},
|
|
1184
|
-
"default": "'argus-column-
|
|
1185
|
-
"description": "
|
|
1355
|
+
"default": "'argus-column-filters-change'",
|
|
1356
|
+
"description": "`columnFilters` changed (uncontrolled), or the proposed filters (controlled)."
|
|
1186
1357
|
},
|
|
1187
1358
|
{
|
|
1188
1359
|
"kind": "variable",
|
|
1189
|
-
"name": "
|
|
1360
|
+
"name": "SELECTION_CHANGE",
|
|
1190
1361
|
"type": {
|
|
1191
1362
|
"text": "string"
|
|
1192
1363
|
},
|
|
1193
|
-
"default": "'argus-
|
|
1194
|
-
"description": "
|
|
1364
|
+
"default": "'argus-selection-change'",
|
|
1365
|
+
"description": "`selection` changed (uncontrolled), or the proposed ids (controlled)."
|
|
1195
1366
|
},
|
|
1196
1367
|
{
|
|
1197
1368
|
"kind": "variable",
|
|
1198
|
-
"name": "
|
|
1369
|
+
"name": "ROW_CLICK",
|
|
1199
1370
|
"type": {
|
|
1200
1371
|
"text": "string"
|
|
1201
1372
|
},
|
|
1202
|
-
"default": "'argus-
|
|
1203
|
-
"description": "Fired when a body
|
|
1373
|
+
"default": "'argus-row-click'",
|
|
1374
|
+
"description": "Fired when a body row was clicked, after `argus-cell-click`."
|
|
1204
1375
|
},
|
|
1205
1376
|
{
|
|
1206
1377
|
"kind": "variable",
|
|
1207
|
-
"name": "
|
|
1378
|
+
"name": "CELL_CLICK",
|
|
1208
1379
|
"type": {
|
|
1209
1380
|
"text": "string"
|
|
1210
1381
|
},
|
|
1211
|
-
"default": "'argus-
|
|
1212
|
-
"description": "Fired when
|
|
1382
|
+
"default": "'argus-cell-click'",
|
|
1383
|
+
"description": "Fired when a body cell was clicked, before `argus-row-click`."
|
|
1213
1384
|
},
|
|
1214
1385
|
{
|
|
1215
1386
|
"kind": "variable",
|
|
@@ -1262,73 +1433,73 @@
|
|
|
1262
1433
|
},
|
|
1263
1434
|
{
|
|
1264
1435
|
"kind": "js",
|
|
1265
|
-
"name": "
|
|
1436
|
+
"name": "SORTING_CHANGE",
|
|
1266
1437
|
"declaration": {
|
|
1267
|
-
"name": "
|
|
1438
|
+
"name": "SORTING_CHANGE",
|
|
1268
1439
|
"module": "src/events.ts"
|
|
1269
1440
|
}
|
|
1270
1441
|
},
|
|
1271
1442
|
{
|
|
1272
1443
|
"kind": "js",
|
|
1273
|
-
"name": "
|
|
1444
|
+
"name": "COLUMN_SIZING_CHANGE",
|
|
1274
1445
|
"declaration": {
|
|
1275
|
-
"name": "
|
|
1446
|
+
"name": "COLUMN_SIZING_CHANGE",
|
|
1276
1447
|
"module": "src/events.ts"
|
|
1277
1448
|
}
|
|
1278
1449
|
},
|
|
1279
1450
|
{
|
|
1280
1451
|
"kind": "js",
|
|
1281
|
-
"name": "
|
|
1452
|
+
"name": "COLUMN_ORDER_CHANGE",
|
|
1282
1453
|
"declaration": {
|
|
1283
|
-
"name": "
|
|
1454
|
+
"name": "COLUMN_ORDER_CHANGE",
|
|
1284
1455
|
"module": "src/events.ts"
|
|
1285
1456
|
}
|
|
1286
1457
|
},
|
|
1287
1458
|
{
|
|
1288
1459
|
"kind": "js",
|
|
1289
|
-
"name": "
|
|
1460
|
+
"name": "COLUMN_PINNING_CHANGE",
|
|
1290
1461
|
"declaration": {
|
|
1291
|
-
"name": "
|
|
1462
|
+
"name": "COLUMN_PINNING_CHANGE",
|
|
1292
1463
|
"module": "src/events.ts"
|
|
1293
1464
|
}
|
|
1294
1465
|
},
|
|
1295
1466
|
{
|
|
1296
1467
|
"kind": "js",
|
|
1297
|
-
"name": "
|
|
1468
|
+
"name": "COLUMN_VISIBILITY_CHANGE",
|
|
1298
1469
|
"declaration": {
|
|
1299
|
-
"name": "
|
|
1470
|
+
"name": "COLUMN_VISIBILITY_CHANGE",
|
|
1300
1471
|
"module": "src/events.ts"
|
|
1301
1472
|
}
|
|
1302
1473
|
},
|
|
1303
1474
|
{
|
|
1304
1475
|
"kind": "js",
|
|
1305
|
-
"name": "
|
|
1476
|
+
"name": "COLUMN_FILTERS_CHANGE",
|
|
1306
1477
|
"declaration": {
|
|
1307
|
-
"name": "
|
|
1478
|
+
"name": "COLUMN_FILTERS_CHANGE",
|
|
1308
1479
|
"module": "src/events.ts"
|
|
1309
1480
|
}
|
|
1310
1481
|
},
|
|
1311
1482
|
{
|
|
1312
1483
|
"kind": "js",
|
|
1313
|
-
"name": "
|
|
1484
|
+
"name": "SELECTION_CHANGE",
|
|
1314
1485
|
"declaration": {
|
|
1315
|
-
"name": "
|
|
1486
|
+
"name": "SELECTION_CHANGE",
|
|
1316
1487
|
"module": "src/events.ts"
|
|
1317
1488
|
}
|
|
1318
1489
|
},
|
|
1319
1490
|
{
|
|
1320
1491
|
"kind": "js",
|
|
1321
|
-
"name": "
|
|
1492
|
+
"name": "ROW_CLICK",
|
|
1322
1493
|
"declaration": {
|
|
1323
|
-
"name": "
|
|
1494
|
+
"name": "ROW_CLICK",
|
|
1324
1495
|
"module": "src/events.ts"
|
|
1325
1496
|
}
|
|
1326
1497
|
},
|
|
1327
1498
|
{
|
|
1328
1499
|
"kind": "js",
|
|
1329
|
-
"name": "
|
|
1500
|
+
"name": "CELL_CLICK",
|
|
1330
1501
|
"declaration": {
|
|
1331
|
-
"name": "
|
|
1502
|
+
"name": "CELL_CLICK",
|
|
1332
1503
|
"module": "src/events.ts"
|
|
1333
1504
|
}
|
|
1334
1505
|
},
|
|
@@ -1363,6 +1534,14 @@
|
|
|
1363
1534
|
"module": "./argus-column.js"
|
|
1364
1535
|
}
|
|
1365
1536
|
},
|
|
1537
|
+
{
|
|
1538
|
+
"kind": "js",
|
|
1539
|
+
"name": "ArgusColumnGroup",
|
|
1540
|
+
"declaration": {
|
|
1541
|
+
"name": "ArgusColumnGroup",
|
|
1542
|
+
"module": "./argus-column-group.js"
|
|
1543
|
+
}
|
|
1544
|
+
},
|
|
1366
1545
|
{
|
|
1367
1546
|
"kind": "js",
|
|
1368
1547
|
"name": "ArgusTable",
|
|
@@ -1389,41 +1568,41 @@
|
|
|
1389
1568
|
},
|
|
1390
1569
|
{
|
|
1391
1570
|
"kind": "js",
|
|
1392
|
-
"name": "
|
|
1571
|
+
"name": "COLUMN_FILTERS_CHANGE",
|
|
1393
1572
|
"declaration": {
|
|
1394
|
-
"name": "
|
|
1573
|
+
"name": "COLUMN_FILTERS_CHANGE",
|
|
1395
1574
|
"module": "./events.js"
|
|
1396
1575
|
}
|
|
1397
1576
|
},
|
|
1398
1577
|
{
|
|
1399
1578
|
"kind": "js",
|
|
1400
|
-
"name": "
|
|
1579
|
+
"name": "COLUMN_ORDER_CHANGE",
|
|
1401
1580
|
"declaration": {
|
|
1402
|
-
"name": "
|
|
1581
|
+
"name": "COLUMN_ORDER_CHANGE",
|
|
1403
1582
|
"module": "./events.js"
|
|
1404
1583
|
}
|
|
1405
1584
|
},
|
|
1406
1585
|
{
|
|
1407
1586
|
"kind": "js",
|
|
1408
|
-
"name": "
|
|
1587
|
+
"name": "COLUMN_PINNING_CHANGE",
|
|
1409
1588
|
"declaration": {
|
|
1410
|
-
"name": "
|
|
1589
|
+
"name": "COLUMN_PINNING_CHANGE",
|
|
1411
1590
|
"module": "./events.js"
|
|
1412
1591
|
}
|
|
1413
1592
|
},
|
|
1414
1593
|
{
|
|
1415
1594
|
"kind": "js",
|
|
1416
|
-
"name": "
|
|
1595
|
+
"name": "COLUMN_SIZING_CHANGE",
|
|
1417
1596
|
"declaration": {
|
|
1418
|
-
"name": "
|
|
1597
|
+
"name": "COLUMN_SIZING_CHANGE",
|
|
1419
1598
|
"module": "./events.js"
|
|
1420
1599
|
}
|
|
1421
1600
|
},
|
|
1422
1601
|
{
|
|
1423
1602
|
"kind": "js",
|
|
1424
|
-
"name": "
|
|
1603
|
+
"name": "COLUMN_VISIBILITY_CHANGE",
|
|
1425
1604
|
"declaration": {
|
|
1426
|
-
"name": "
|
|
1605
|
+
"name": "COLUMN_VISIBILITY_CHANGE",
|
|
1427
1606
|
"module": "./events.js"
|
|
1428
1607
|
}
|
|
1429
1608
|
},
|
|
@@ -1453,17 +1632,17 @@
|
|
|
1453
1632
|
},
|
|
1454
1633
|
{
|
|
1455
1634
|
"kind": "js",
|
|
1456
|
-
"name": "
|
|
1635
|
+
"name": "SELECTION_CHANGE",
|
|
1457
1636
|
"declaration": {
|
|
1458
|
-
"name": "
|
|
1637
|
+
"name": "SELECTION_CHANGE",
|
|
1459
1638
|
"module": "./events.js"
|
|
1460
1639
|
}
|
|
1461
1640
|
},
|
|
1462
1641
|
{
|
|
1463
1642
|
"kind": "js",
|
|
1464
|
-
"name": "
|
|
1643
|
+
"name": "SORTING_CHANGE",
|
|
1465
1644
|
"declaration": {
|
|
1466
|
-
"name": "
|
|
1645
|
+
"name": "SORTING_CHANGE",
|
|
1467
1646
|
"module": "./events.js"
|
|
1468
1647
|
}
|
|
1469
1648
|
},
|
|
@@ -1711,9 +1890,9 @@
|
|
|
1711
1890
|
},
|
|
1712
1891
|
{
|
|
1713
1892
|
"kind": "js",
|
|
1714
|
-
"name": "
|
|
1893
|
+
"name": "ColumnFiltersChangeDetail",
|
|
1715
1894
|
"declaration": {
|
|
1716
|
-
"name": "
|
|
1895
|
+
"name": "ColumnFiltersChangeDetail",
|
|
1717
1896
|
"package": "@argus-table/core"
|
|
1718
1897
|
}
|
|
1719
1898
|
},
|
|
@@ -1727,9 +1906,9 @@
|
|
|
1727
1906
|
},
|
|
1728
1907
|
{
|
|
1729
1908
|
"kind": "js",
|
|
1730
|
-
"name": "
|
|
1909
|
+
"name": "ColumnOrderChangeDetail",
|
|
1731
1910
|
"declaration": {
|
|
1732
|
-
"name": "
|
|
1911
|
+
"name": "ColumnOrderChangeDetail",
|
|
1733
1912
|
"package": "@argus-table/core"
|
|
1734
1913
|
}
|
|
1735
1914
|
},
|
|
@@ -1751,9 +1930,9 @@
|
|
|
1751
1930
|
},
|
|
1752
1931
|
{
|
|
1753
1932
|
"kind": "js",
|
|
1754
|
-
"name": "
|
|
1933
|
+
"name": "ColumnPinningChangeDetail",
|
|
1755
1934
|
"declaration": {
|
|
1756
|
-
"name": "
|
|
1935
|
+
"name": "ColumnPinningChangeDetail",
|
|
1757
1936
|
"package": "@argus-table/core"
|
|
1758
1937
|
}
|
|
1759
1938
|
},
|
|
@@ -1767,25 +1946,25 @@
|
|
|
1767
1946
|
},
|
|
1768
1947
|
{
|
|
1769
1948
|
"kind": "js",
|
|
1770
|
-
"name": "
|
|
1949
|
+
"name": "ColumnSizingChangeDetail",
|
|
1771
1950
|
"declaration": {
|
|
1772
|
-
"name": "
|
|
1951
|
+
"name": "ColumnSizingChangeDetail",
|
|
1773
1952
|
"package": "@argus-table/core"
|
|
1774
1953
|
}
|
|
1775
1954
|
},
|
|
1776
1955
|
{
|
|
1777
1956
|
"kind": "js",
|
|
1778
|
-
"name": "
|
|
1957
|
+
"name": "ColumnSizingState",
|
|
1779
1958
|
"declaration": {
|
|
1780
|
-
"name": "
|
|
1959
|
+
"name": "ColumnSizingState",
|
|
1781
1960
|
"package": "@argus-table/core"
|
|
1782
1961
|
}
|
|
1783
1962
|
},
|
|
1784
1963
|
{
|
|
1785
1964
|
"kind": "js",
|
|
1786
|
-
"name": "
|
|
1965
|
+
"name": "ColumnVisibilityChangeDetail",
|
|
1787
1966
|
"declaration": {
|
|
1788
|
-
"name": "
|
|
1967
|
+
"name": "ColumnVisibilityChangeDetail",
|
|
1789
1968
|
"package": "@argus-table/core"
|
|
1790
1969
|
}
|
|
1791
1970
|
},
|
|
@@ -1911,17 +2090,17 @@
|
|
|
1911
2090
|
},
|
|
1912
2091
|
{
|
|
1913
2092
|
"kind": "js",
|
|
1914
|
-
"name": "
|
|
2093
|
+
"name": "ScrollState",
|
|
1915
2094
|
"declaration": {
|
|
1916
|
-
"name": "
|
|
2095
|
+
"name": "ScrollState",
|
|
1917
2096
|
"package": "@argus-table/core"
|
|
1918
2097
|
}
|
|
1919
2098
|
},
|
|
1920
2099
|
{
|
|
1921
2100
|
"kind": "js",
|
|
1922
|
-
"name": "
|
|
2101
|
+
"name": "SelectionChangeDetail",
|
|
1923
2102
|
"declaration": {
|
|
1924
|
-
"name": "
|
|
2103
|
+
"name": "SelectionChangeDetail",
|
|
1925
2104
|
"package": "@argus-table/core"
|
|
1926
2105
|
}
|
|
1927
2106
|
},
|
|
@@ -1951,9 +2130,17 @@
|
|
|
1951
2130
|
},
|
|
1952
2131
|
{
|
|
1953
2132
|
"kind": "js",
|
|
1954
|
-
"name": "
|
|
2133
|
+
"name": "SortDirection",
|
|
2134
|
+
"declaration": {
|
|
2135
|
+
"name": "SortDirection",
|
|
2136
|
+
"package": "@argus-table/core"
|
|
2137
|
+
}
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
"kind": "js",
|
|
2141
|
+
"name": "SortingChangeDetail",
|
|
1955
2142
|
"declaration": {
|
|
1956
|
-
"name": "
|
|
2143
|
+
"name": "SortingChangeDetail",
|
|
1957
2144
|
"package": "@argus-table/core"
|
|
1958
2145
|
}
|
|
1959
2146
|
},
|
|
@@ -2135,7 +2322,7 @@
|
|
|
2135
2322
|
"declarations": [
|
|
2136
2323
|
{
|
|
2137
2324
|
"kind": "class",
|
|
2138
|
-
"description": "Reads the host's `<argus-column>` children into `ColumnDef`s.
|
|
2325
|
+
"description": "Reads the host's `<argus-column>` children, and those in its\n`<argus-column-group>` children, into `ColumnDef`s, and the groups into\n`ColumnGroup`s. Columns and groups tell the host when they change\n(`watchColumns`); the lists are rebuilt only then, so they keep their identity\nbetween changes.",
|
|
2139
2326
|
"name": "ColumnChildrenController",
|
|
2140
2327
|
"members": [
|
|
2141
2328
|
{
|
|
@@ -2171,7 +2358,16 @@
|
|
|
2171
2358
|
"type": {
|
|
2172
2359
|
"text": "readonly ColumnDef<T>[]"
|
|
2173
2360
|
},
|
|
2174
|
-
"description": "The children's columns, in document order.",
|
|
2361
|
+
"description": "The children's columns, in document order, those in groups included.",
|
|
2362
|
+
"readonly": true
|
|
2363
|
+
},
|
|
2364
|
+
{
|
|
2365
|
+
"kind": "field",
|
|
2366
|
+
"name": "groups",
|
|
2367
|
+
"type": {
|
|
2368
|
+
"text": "readonly ColumnGroup[]"
|
|
2369
|
+
},
|
|
2370
|
+
"description": "The `<argus-column-group>` children's groups, in document order.",
|
|
2175
2371
|
"readonly": true
|
|
2176
2372
|
}
|
|
2177
2373
|
]
|
|
@@ -2233,15 +2429,6 @@
|
|
|
2233
2429
|
}
|
|
2234
2430
|
}
|
|
2235
2431
|
},
|
|
2236
|
-
{
|
|
2237
|
-
"kind": "field",
|
|
2238
|
-
"name": "poolSize",
|
|
2239
|
-
"type": {
|
|
2240
|
-
"text": "number"
|
|
2241
|
-
},
|
|
2242
|
-
"description": "Number of column pool slots created so far.",
|
|
2243
|
-
"readonly": true
|
|
2244
|
-
},
|
|
2245
2432
|
{
|
|
2246
2433
|
"kind": "method",
|
|
2247
2434
|
"name": "compute",
|
|
@@ -2598,6 +2785,24 @@
|
|
|
2598
2785
|
],
|
|
2599
2786
|
"description": "The plugins' `columns` transforms applied in order; the same array while nothing changed."
|
|
2600
2787
|
},
|
|
2788
|
+
{
|
|
2789
|
+
"kind": "method",
|
|
2790
|
+
"name": "transformGroups",
|
|
2791
|
+
"return": {
|
|
2792
|
+
"type": {
|
|
2793
|
+
"text": "readonly ColumnGroup[]"
|
|
2794
|
+
}
|
|
2795
|
+
},
|
|
2796
|
+
"parameters": [
|
|
2797
|
+
{
|
|
2798
|
+
"name": "input",
|
|
2799
|
+
"type": {
|
|
2800
|
+
"text": "readonly ColumnGroup[]"
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
],
|
|
2804
|
+
"description": "The plugins' `columnGroups` transforms applied in order; the same array while nothing changed."
|
|
2805
|
+
},
|
|
2601
2806
|
{
|
|
2602
2807
|
"kind": "method",
|
|
2603
2808
|
"name": "invalidate",
|
|
@@ -2864,7 +3069,7 @@
|
|
|
2864
3069
|
"declarations": [
|
|
2865
3070
|
{
|
|
2866
3071
|
"kind": "class",
|
|
2867
|
-
"description": "Rows of different heights (`rowHeight: 'auto'`): reads the heights of the\nrendered body rows and of the pinned row groups once their content has\nrendered, and watches them for changes the table doesn't render (an image\nloading, a web font, a framework component updating), which request an\nupdate that reads them again. Pooled rows show other rows as the body\nscrolls, so
|
|
3072
|
+
"description": "Rows of different heights (`rowHeight: 'auto'`): reads the heights of the\nrendered body rows and of the pinned row groups once their content has\nrendered, and watches them for changes the table doesn't render (an image\nloading, a web font, a framework component updating), which request an\nupdate that reads them again. Pooled rows show other rows as the body\nscrolls, so each update reads every rendered row that shows another row than\nat its last read (all of them after `invalidate()`): one that now shows a row\nof the same height doesn't resize, and the observer wouldn't report it.",
|
|
2868
3073
|
"name": "RowMeasure",
|
|
2869
3074
|
"members": [
|
|
2870
3075
|
{
|
|
@@ -3097,15 +3302,6 @@
|
|
|
3097
3302
|
],
|
|
3098
3303
|
"description": "Auto mode: how many rows a page moves from row `from`, the rows that fit in\n`view` px below it (`down`) or above it. At least one."
|
|
3099
3304
|
},
|
|
3100
|
-
{
|
|
3101
|
-
"kind": "field",
|
|
3102
|
-
"name": "poolSize",
|
|
3103
|
-
"type": {
|
|
3104
|
-
"text": "number"
|
|
3105
|
-
},
|
|
3106
|
-
"description": "Number of pool slots created so far: bounded by the most rows rendered at once.",
|
|
3107
|
-
"readonly": true
|
|
3108
|
-
},
|
|
3109
3305
|
{
|
|
3110
3306
|
"kind": "field",
|
|
3111
3307
|
"name": "scaled",
|
|
@@ -3390,6 +3586,12 @@
|
|
|
3390
3586
|
"text": "readonly RenderedColumn<T>[]"
|
|
3391
3587
|
}
|
|
3392
3588
|
},
|
|
3589
|
+
{
|
|
3590
|
+
"name": "groups",
|
|
3591
|
+
"type": {
|
|
3592
|
+
"text": "readonly (readonly HeaderGroupCell<CellContent>[])[]"
|
|
3593
|
+
}
|
|
3594
|
+
},
|
|
3393
3595
|
{
|
|
3394
3596
|
"name": "renderBefore",
|
|
3395
3597
|
"type": {
|
|
@@ -3397,7 +3599,7 @@
|
|
|
3397
3599
|
}
|
|
3398
3600
|
}
|
|
3399
3601
|
],
|
|
3400
|
-
"description": "Renders header and cell content into the host's light DOM, as direct children\n(a slot only takes the host's own children). Keyed and ordered by pool slot,\nso recycled content updates in place instead of moving (ADR 0001). The part\nends at `renderBefore`, so the host's other children (`<argus-column>`) stay\noutside it, wherever they are added. `rendered` are the columns the shadow\nroot renders, with their slots and keys. What `header` and `cell` return goes\nthrough `content()`, so foreign content reaches the table's `contentRenderer`.\nReturns the part, which the table disconnects when it is disconnected."
|
|
3602
|
+
"description": "Renders header and cell content into the host's light DOM, as direct children\n(a slot only takes the host's own children). Keyed and ordered by pool slot,\nso recycled content updates in place instead of moving (ADR 0001). The part\nends at `renderBefore`, so the host's other children (`<argus-column>`) stay\noutside it, wherever they are added. `rendered` are the columns the shadow\nroot renders, with their slots and keys. What `header` and `cell` return goes\nthrough `content()`, so foreign content reaches the table's `contentRenderer`.\nGroup headers come first, one per group and pin side (`groups`, the header's\ngroup rows).\nReturns the part, which the table disconnects when it is disconnected."
|
|
3401
3603
|
}
|
|
3402
3604
|
],
|
|
3403
3605
|
"exports": [
|
|
@@ -3540,7 +3742,7 @@
|
|
|
3540
3742
|
}
|
|
3541
3743
|
}
|
|
3542
3744
|
],
|
|
3543
|
-
"description": "Private slot names (ADR 0001): cells by row pool slot and column slot,\nheaders by column slot, pinned rows by side
|
|
3745
|
+
"description": "Private slot names (ADR 0001): cells by row pool slot and column slot,\nheaders by column slot, group headers by group and pin side, pinned rows by side,\nindex and column slot. A\ncolumn's slot is its `colIndex`, or its pool slot with `virtualizeColumns`."
|
|
3544
3746
|
},
|
|
3545
3747
|
{
|
|
3546
3748
|
"kind": "function",
|
|
@@ -3554,6 +3756,19 @@
|
|
|
3554
3756
|
}
|
|
3555
3757
|
]
|
|
3556
3758
|
},
|
|
3759
|
+
{
|
|
3760
|
+
"kind": "function",
|
|
3761
|
+
"name": "groupSlot",
|
|
3762
|
+
"parameters": [
|
|
3763
|
+
{
|
|
3764
|
+
"name": "slot",
|
|
3765
|
+
"type": {
|
|
3766
|
+
"text": "number"
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
],
|
|
3770
|
+
"description": "A column group's header, by the group's slot number (`HeaderGroupCell.slot`)."
|
|
3771
|
+
},
|
|
3557
3772
|
{
|
|
3558
3773
|
"kind": "function",
|
|
3559
3774
|
"name": "pinnedSlot",
|
|
@@ -3635,6 +3850,24 @@
|
|
|
3635
3850
|
}
|
|
3636
3851
|
],
|
|
3637
3852
|
"description": "Inline style of a cell or header: a pinned one's sticky inset, from the\nstart or the end edge, and with `virtualizeColumns` the grid cell it is\nplaced in. Cells are in pool order there, not in column order, so the row is\nexplicit too: auto-placement would wrap a cell that comes after one of a\nlater column into a new grid row."
|
|
3853
|
+
},
|
|
3854
|
+
{
|
|
3855
|
+
"kind": "function",
|
|
3856
|
+
"name": "groupStyle",
|
|
3857
|
+
"return": {
|
|
3858
|
+
"type": {
|
|
3859
|
+
"text": "string"
|
|
3860
|
+
}
|
|
3861
|
+
},
|
|
3862
|
+
"parameters": [
|
|
3863
|
+
{
|
|
3864
|
+
"name": "cell",
|
|
3865
|
+
"type": {
|
|
3866
|
+
"text": "Pinnable & { offset: number; colIndex: number; span: number }"
|
|
3867
|
+
}
|
|
3868
|
+
}
|
|
3869
|
+
],
|
|
3870
|
+
"description": "Inline style of a group header row's cell: the columns it spans, placed\nexplicitly (the rows are grids on every column's track), and a pinned one's\nsticky inset."
|
|
3638
3871
|
}
|
|
3639
3872
|
],
|
|
3640
3873
|
"exports": [
|
|
@@ -3670,6 +3903,14 @@
|
|
|
3670
3903
|
"module": "src/render/content.ts"
|
|
3671
3904
|
}
|
|
3672
3905
|
},
|
|
3906
|
+
{
|
|
3907
|
+
"kind": "js",
|
|
3908
|
+
"name": "groupSlot",
|
|
3909
|
+
"declaration": {
|
|
3910
|
+
"name": "groupSlot",
|
|
3911
|
+
"module": "src/render/content.ts"
|
|
3912
|
+
}
|
|
3913
|
+
},
|
|
3673
3914
|
{
|
|
3674
3915
|
"kind": "js",
|
|
3675
3916
|
"name": "pinnedSlot",
|
|
@@ -3701,6 +3942,14 @@
|
|
|
3701
3942
|
"name": "cellStyle",
|
|
3702
3943
|
"module": "src/render/content.ts"
|
|
3703
3944
|
}
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
"kind": "js",
|
|
3948
|
+
"name": "groupStyle",
|
|
3949
|
+
"declaration": {
|
|
3950
|
+
"name": "groupStyle",
|
|
3951
|
+
"module": "src/render/content.ts"
|
|
3952
|
+
}
|
|
3704
3953
|
}
|
|
3705
3954
|
]
|
|
3706
3955
|
},
|
|
@@ -3710,45 +3959,40 @@
|
|
|
3710
3959
|
"declarations": [
|
|
3711
3960
|
{
|
|
3712
3961
|
"kind": "function",
|
|
3713
|
-
"name": "
|
|
3962
|
+
"name": "columnKey",
|
|
3714
3963
|
"parameters": [
|
|
3715
3964
|
{
|
|
3716
|
-
"name": "
|
|
3717
|
-
"type": {
|
|
3718
|
-
"text": "readonly RenderedColumn<T>[]"
|
|
3719
|
-
}
|
|
3720
|
-
},
|
|
3721
|
-
{
|
|
3722
|
-
"name": "handlers",
|
|
3723
|
-
"type": {
|
|
3724
|
-
"text": "HeaderHandlers"
|
|
3725
|
-
}
|
|
3726
|
-
},
|
|
3727
|
-
{
|
|
3728
|
-
"name": "activeCol",
|
|
3729
|
-
"type": {
|
|
3730
|
-
"text": "string | undefined"
|
|
3731
|
-
}
|
|
3732
|
-
},
|
|
3733
|
-
{
|
|
3734
|
-
"name": "drag",
|
|
3735
|
-
"optional": true,
|
|
3965
|
+
"name": "columnId",
|
|
3736
3966
|
"type": {
|
|
3737
|
-
"text": "
|
|
3967
|
+
"text": "string"
|
|
3738
3968
|
}
|
|
3739
|
-
}
|
|
3969
|
+
}
|
|
3970
|
+
],
|
|
3971
|
+
"description": "The drop slot key of a column (`c:` and its id) or a group cell (its `key`)."
|
|
3972
|
+
},
|
|
3973
|
+
{
|
|
3974
|
+
"kind": "function",
|
|
3975
|
+
"name": "renderHeader",
|
|
3976
|
+
"parameters": [
|
|
3740
3977
|
{
|
|
3741
|
-
"name": "checkAll",
|
|
3742
|
-
"optional": true,
|
|
3978
|
+
"name": "{\n columns,\n groups,\n handlers,\n active,\n drag,\n checkAll,\n}",
|
|
3743
3979
|
"type": {
|
|
3744
|
-
"text": "
|
|
3980
|
+
"text": "HeaderOptions<T>"
|
|
3745
3981
|
}
|
|
3746
3982
|
}
|
|
3747
3983
|
],
|
|
3748
|
-
"description": "The sticky header row. Header content is slotted from the light DOM. Pinned\nheader cells use the same private `data-pin` hooks as body cells,
|
|
3984
|
+
"description": "The sticky header: a row per level of column groups, then the row of column\nheaders. Header content is slotted from the light DOM. Pinned\nheader cells use the same private `data-pin` hooks as body cells, and the parts\n`header-cell-pinned` and `header-cell-pinned-edge`.\nEvery header carries `data-col` (its column id) and sortable ones also\n`data-sort-col`; the element's delegated handlers read them. Headers take part\nin the grid's roving tabindex: the active one is the tab stop (`activeCol`).\nResizable columns get a `resize-handle` on the header's inline-end edge; a\ndouble-click on it fits the column to its content. It is not focusable: the\nfocused header resizes with Alt+Arrow.\n\nReorderable columns carry `data-move-col`: a drag on the header moves the\ncolumn. While one is dragged (`drag`), its header adds `header-cell-dragging`\nand the target header shows a `drop-indicator` on the edge it would land at."
|
|
3749
3985
|
}
|
|
3750
3986
|
],
|
|
3751
3987
|
"exports": [
|
|
3988
|
+
{
|
|
3989
|
+
"kind": "js",
|
|
3990
|
+
"name": "columnKey",
|
|
3991
|
+
"declaration": {
|
|
3992
|
+
"name": "columnKey",
|
|
3993
|
+
"module": "src/render/header.ts"
|
|
3994
|
+
}
|
|
3995
|
+
},
|
|
3752
3996
|
{
|
|
3753
3997
|
"kind": "js",
|
|
3754
3998
|
"name": "renderHeader",
|
|
@@ -3819,7 +4063,7 @@
|
|
|
3819
4063
|
{
|
|
3820
4064
|
"kind": "variable",
|
|
3821
4065
|
"name": "baseStyles",
|
|
3822
|
-
"default": "css` @layer argus-base { :host { display: block; /* A table that virtualizes needs a bounded height; set your own on the element. */ block-size: 400px; box-sizing: border-box; contain: content; color-scheme: light dark; color: var(--argus-fg, CanvasText); background: var(--argus-bg, Canvas); font: var(--argus-font, inherit); /* contain: content clips the header, rows and pinned shadows to the rounded corners. */ border: var(--argus-outline, none); border-radius: var(--argus-radius, 0); --_row-height: var(--argus-row-height, 40px); --_pad: var(--argus-cell-padding-inline, 12px); --_border: var(--argus-border-width, 1px) solid var(--argus-border-color, light-dark(#e5e7eb, #374151)); /* 1 in LTR, -1 in RTL: mirrors the pinned-edge shadow. */ --_dir: 1; } :host(:dir(rtl)) { --_dir: -1; } :host([density='compact']) { --_row-height: var(--argus-row-height, 32px); --_pad: var(--argus-cell-padding-inline, 8px); } :host([density='spacious']) { --_row-height: var(--argus-row-height, 52px); --_pad: var(--argus-cell-padding-inline, 16px); } :host([hidden]) { display: none; } [part~='table'] { position: relative; block-size: 100%; overflow: auto; overscroll-behavior: contain; } /* * A cell focused or moved to by keyboard scrolls clear of the sticky header, the * pinned rows and the pinned columns: scroll margins on the cells that scroll. * Not scroll padding on the scroller: Chromium and WebKit measure the sticky * header and pinned rows against it too, so focusing one of them (a click, Tab, * an arrow key) scrolled the body. */ [part~='body'] > .row > [role='gridcell'] { scroll-margin-block: calc((1 + var(--_pin-top-rows, 0)) * var(--_row-height)) calc(var(--_pin-bottom-rows, 0) * var(--_row-height)); } [role='gridcell']:not([data-pin]), [role='columnheader']:not([data-pin]) { scroll-margin-inline: var(--_pin-start, 0) var(--_pin-end, 0); } .row { display: grid; grid-template-columns: var(--_cols); inline-size: var(--_width); min-inline-size: 100%; block-size: var(--_row-height); box-sizing: border-box; } [part~='header'] { position: sticky; inset-block-start: 0; z-index: 2; } [part~='body'] { position: relative; contain: layout; } [part~='body'] > .row { position: absolute; inset-block-start: 0; inset-inline-start: 0; } [part~='row'] { --_row-bg: var(--argus-bg, Canvas); --_row-surface: var(--_row-bg); background: var(--_row-surface); } [part~='row-odd'] { --_row-bg: var(--argus-row-stripe-bg, var(--argus-bg, Canvas)); } [part~='row']:hover { --_row-surface: var(--argus-row-hover-bg, var(--_row-bg)); } /* Selected wins over stripes and hover. */ [part~='row-selected'], [part~='row-selected']:hover { --_row-bg: var( --argus-row-selected-bg, color-mix(in srgb, Highlight 22%, var(--argus-bg, Canvas)) ); --_row-surface: var(--_row-bg); } @media (forced-colors: active) { [part~='row-selected'] { forced-color-adjust: none; --_row-bg: Highlight; color: HighlightText; } } /* * Pinned rows: a sticky row group below the header and one at the bottom of * the view. The header is one row tall. They keep their place in the flow, * so body row i still starts i rows below the top group. */ .pinned { position: sticky; z-index: 2; } .pinned[data-side='top'] { inset-block-start: var(--_row-height); } .pinned[data-side='bottom'] { inset-block-end: 0; } [part~='row-pinned'] { --_row-bg: var(--argus-pinned-row-bg, var(--argus-bg, Canvas)); } [part~='cell'], [part~='header-cell'] { display: flex; align-items: center; min-inline-size: 0; box-sizing: border-box; padding-inline: var(--_pad); overflow: hidden; white-space: nowrap; border-block-end: var(--_border); } /* The checkbox column: the checkbox centred, no padding to squeeze it. */ [part~='cell-selection'], [part~='header-cell-selection'] { justify-content: center; padding-inline: 0; } [part~='selection-checkbox'] { margin: 0; cursor: pointer; } [part~='header-cell'] { background: var(--argus-header-bg, light-dark(#f9fafb, #111827)); color: var(--argus-header-fg, inherit); font-weight: 600; } [part~='header-cell'] { position: relative; } [part~='resize-handle'] { position: absolute; inset-block: 0; inset-inline-end: 0; inline-size: 8px; z-index: 1; cursor: col-resize; touch-action: none; } [part~='resize-handle']::after { content: ''; position: absolute; inset-block: 25%; inset-inline-end: 0; inline-size: 2px; background: var(--argus-resize-handle-color, light-dark(#9ca3af, #6b7280)); opacity: 0; } [part~='header-cell']:hover [part~='resize-handle']::after, [part~='header-cell']:focus-visible [part~='resize-handle']::after, [part~='resize-handle'][data-active]::after { opacity: 1; } [data-sort-col] { cursor: pointer; user-select: none; } /* A drag on a reorderable header moves the column, so its text isn't selectable. */ [data-move-col] { user-select: none; } [data-dragging], [data-dragging] [part~='header-cell'] { cursor: grabbing; } [part~='header-cell-dragging'] { opacity: 0.5; } /* The line where a dragged column would land, on the target header's logical edge. */ [part~='drop-indicator'] { position: absolute; inset-block: 0; inline-size: 2px; z-index: 2; background: var(--argus-drop-indicator-color, Highlight); pointer-events: none; } [part~='drop-indicator'][data-edge='start'] { inset-inline-start: 0; } [part~='drop-indicator'][data-edge='end'] { inset-inline-end: 0; } [part~='header-cell']:focus-visible, [part~='cell']:focus-visible { outline: var(--argus-focus-ring, 2px solid Highlight); outline-offset: -2px; } /* A small chevron after the header content; only the sorted column shows it. */ .sort-indicator { flex: none; inline-size: 0.35em; block-size: 0.35em; margin-inline-start: 0.4em; /* Physical sides on purpose: the chevron is rotated, so it must not mirror in RTL. */ border-right: 0.12em solid currentColor; border-bottom: 0.12em solid currentColor; visibility: hidden; } [aria-sort] .sort-indicator { visibility: visible; } [aria-sort='ascending'] .sort-indicator { transform: translateY(0.1em) rotate(-135deg); } [aria-sort='descending'] .sort-indicator { transform: translateY(-0.1em) rotate(45deg); } [data-align='end'] .sort-indicator { order: -1; margin-inline: 0 0.4em; } /* A funnel: the column is filtered. */ [part~='filter-indicator'] { flex: none; inline-size: 0.7em; block-size: 0.7em; margin-inline-start: 0.35em; background: var(--argus-filter-indicator-color, currentColor); clip-path: polygon(0 0, 100% 0, 62% 48%, 62% 100%, 38% 82%, 38% 48%); } [data-align='end'] [part~='filter-indicator'] { order: -2; margin-inline: 0 0.35em; } @media (forced-colors: active) { /* Backgrounds are forced to Canvas there, which would hide the funnel. */ [part~='filter-indicator'] { forced-color-adjust: none; background: CanvasText; } } /* * Pinned columns: sticky inside the scroll container, with offsets from the * table model. Logical insets make RTL work without extra rules. */ [data-pin] { position: sticky; z-index: 1; } [data-pin='start'] { inset-inline-start: var(--_pin-offset); } [data-pin='end'] { inset-inline-end: var(--_pin-offset); } /* * Pinned body cells are sticky only while the table scrolls sideways * (data-hscroll on the scroller). At rest they are plain cells shifted by the * horizontal scroll offset, which vertical scrolling never changes: a sticky * cell per row is a compositing layer each, and Safari stutters moving them * (PinScrollController). Both place the cells at the same spot. */ [part~='row'] > [data-pin] { position: relative; inset-inline: auto; } [part~='row'] > [data-pin='start'] { transform: translateX(var(--_sx, 0px)); } [part~='row'] > [data-pin='end'] { transform: translateX(calc(var(--_sx, 0px) - var(--_dir) * var(--_max-x, 0px))); } [data-hscroll] [part~='row'] > [data-pin] { position: sticky; transform: none; } [data-hscroll] [part~='row'] > [data-pin='start'] { inset-inline-start: var(--_pin-offset); } [data-hscroll] [part~='row'] > [data-pin='end'] { inset-inline-end: var(--_pin-offset); } [part~='cell-pinned'] { background: var(--_row-surface); } /* * The edge shadow, once per pinned side (.pin-shadow, beside the scroller). * --argus-pinned-shadow is written for a shadow falling toward the end side; * the start edge in RTL and the end edge in LTR mirror it. */ .pin-shadow { position: absolute; inset-block-start: 0; block-size: min(var(--_view-h, 100%), var(--_content-h, 100%)); z-index: 3; pointer-events: none; } .pin-shadow[data-side='start'] { inset-inline-start: 0; } .pin-shadow[data-side='end'] { inset-inline-end: var(--_sb-x, 0px); } .pin-shadow::after { content: ''; position: absolute; inset: 0; box-shadow: var( --argus-pinned-shadow, 4px 0 6px -4px light-dark(rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.6)) ); transform: scaleX(var(--_dir)); } .pin-shadow[data-side='end']::after { transform: scaleX(calc(-1 * var(--_dir))); } [data-align='center'] { justify-content: center; text-align: center; } [data-align='end'] { justify-content: flex-end; text-align: end; } /* * Wrapped text (ColumnDef.wrap). In a fixed-height row, text taller than the row * starts at the top (safe) and is clipped below. */ [part~='cell'][data-wrap] { white-space: normal; overflow-wrap: anywhere; align-items: center; align-items: safe center; } /* * rowHeight: 'auto'. Body and pinned rows fit their content, at least one row * tall; the header keeps its height. Content sits at the top of the cell, with * the block padding that centres one line in a one-row cell, so one-line rows * look as they do with a fixed height. The rows' heights are measured and * placed by the table: the browser's scroll anchoring would fight it. */ [data-auto-rows] { overflow-anchor: none; } [data-auto-rows] > [part~='body'] > .row, [data-auto-rows] > .pinned > .row { block-size: auto; min-block-size: var(--_row-height); grid-template-rows: minmax(var(--_row-height), auto); } /* Reading the rows' own heights: without the height each row renders at. */ [data-auto-rows] > [part~='body'] > .row[data-measure-row] { min-block-size: var(--_row-height) !important; } [data-auto-rows] [part~='cell'] { align-items: start; padding-block: var( --argus-cell-padding-block, max(0px, (var(--_row-height) - 1lh - var(--argus-border-width, 1px)) / 2) ); } /* Skeleton bars and the Retry button, centred in a one-row row as before. */ [data-auto-rows] [part~='row-loading'] > [part~='cell'] { align-items: center; padding-block: 0; } [data-auto-rows] > [part~='body'] > .row > [role='gridcell'] { scroll-margin-block: calc(var(--_row-height) + var(--_pin-top-h, 0px)) var(--_pin-bottom-h, 0px); } [data-auto-rows] > [part~='empty'] { min-block-size: calc( 100% - var(--_row-height) - var(--_pin-top-h, 0px) - var(--_pin-bottom-h, 0px) ); } ::slotted(*) { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; } /* Fitting a column to its content: set for one synchronous measurement, never painted. */ [data-measure] { inline-size: max-content; } /* Rows of a data source that haven't loaded: a bar per cell, pulsing gently. */ [part~='skeleton'] { flex: none; inline-size: min(60%, 8em); block-size: 0.6em; border-radius: 0.3em; background: var(--argus-skeleton-bg, color-mix(in srgb, currentColor 12%, transparent)); animation: argus-skeleton-pulse 1.6s ease-in-out infinite; } [part~='skeleton-error'] { animation: none; opacity: 0.5; } @keyframes argus-skeleton-pulse { 50% { opacity: 0.45; } } @media (prefers-reduced-motion: reduce) { [part~='skeleton'] { animation: none; } } [part~='retry'] { font: inherit; color: inherit; cursor: pointer; } [part~='empty'] { display: flex; align-items: center; justify-content: center; min-block-size: calc( 100% - (1 + var(--_pin-top-rows, 0) + var(--_pin-bottom-rows, 0)) * var(--_row-height) ); padding: var(--_pad); box-sizing: border-box; } /* Measures the resolved row height in px for the virtualizer. */ .probe { position: absolute; inset-block-start: 0; inline-size: 0; block-size: var(--_row-height); visibility: hidden; pointer-events: none; } } `",
|
|
4066
|
+
"default": "css` @layer argus-base { :host { display: block; /* A table that virtualizes needs a bounded height; set your own on the element. */ block-size: 400px; box-sizing: border-box; contain: content; color-scheme: light dark; color: var(--argus-fg, CanvasText); background: var(--argus-bg, Canvas); font: var(--argus-font, inherit); /* contain: content clips the header, rows and pinned shadows to the rounded corners. */ border: var(--argus-border, none); border-radius: var(--argus-border-radius, 0); --_row-height: var(--argus-row-height, 40px); --_pad: var(--argus-cell-padding-inline, 12px); --_border: var(--argus-border-width, 1px) solid var(--argus-border-color, light-dark(#e5e7eb, #374151)); /* 1 in LTR, -1 in RTL: mirrors the pinned-edge shadow. */ --_dir: 1; } :host(:dir(rtl)) { --_dir: -1; } :host([density='compact']) { --_row-height: var(--argus-row-height, 32px); --_pad: var(--argus-cell-padding-inline, 8px); } :host([density='spacious']) { --_row-height: var(--argus-row-height, 52px); --_pad: var(--argus-cell-padding-inline, 16px); } :host([hidden]) { display: none; } [part~='table'] { position: relative; block-size: 100%; overflow: auto; overscroll-behavior: contain; /* The header: one row tall, and a row more per level of column groups. */ --_header-h: calc(var(--_header-rows, 1) * var(--_row-height)); } /* * A cell focused or moved to by keyboard scrolls clear of the sticky header, the * pinned rows and the pinned columns: scroll margins on the cells that scroll. * Not scroll padding on the scroller: Chromium and WebKit measure the sticky * header and pinned rows against it too, so focusing one of them (a click, Tab, * an arrow key) scrolled the body. */ [part~='body'] > .row > [role='gridcell'] { scroll-margin-block: calc(var(--_header-h) + var(--_pin-top-rows, 0) * var(--_row-height)) calc(var(--_pin-bottom-rows, 0) * var(--_row-height)); } [role='gridcell']:not([data-pin]), [role='columnheader']:not([data-pin]) { scroll-margin-inline: var(--_pin-start, 0) var(--_pin-end, 0); } .row { display: grid; grid-template-columns: var(--_cols); inline-size: var(--_width); min-inline-size: 100%; block-size: var(--_row-height); box-sizing: border-box; } [part~='header'] { position: sticky; inset-block-start: 0; z-index: 2; } [part~='body'] { position: relative; contain: layout; } [part~='body'] > .row { position: absolute; inset-block-start: 0; inset-inline-start: 0; } [part~='row'] { --_row-bg: var(--argus-bg, Canvas); --_row-surface: var(--_row-bg); background: var(--_row-surface); } [part~='row-odd'] { --_row-bg: var(--argus-row-odd-bg, var(--argus-bg, Canvas)); } [part~='row']:hover { --_row-surface: var(--argus-row-hover-bg, var(--_row-bg)); } /* Selected wins over stripes and hover. */ [part~='row-selected'], [part~='row-selected']:hover { --_row-bg: var( --argus-row-selected-bg, color-mix(in srgb, Highlight 22%, var(--argus-bg, Canvas)) ); --_row-surface: var(--_row-bg); } @media (forced-colors: active) { [part~='row-selected'] { forced-color-adjust: none; --_row-bg: Highlight; color: HighlightText; } } /* * Pinned rows: a sticky row group below the header and one at the bottom of * the view. The header is --_header-h tall. They keep their place in the flow, * so body row i still starts i rows below the top group. */ .pinned { position: sticky; z-index: 2; } .pinned[data-side='top'] { inset-block-start: var(--_header-h); } .pinned[data-side='bottom'] { inset-block-end: 0; } [part~='row-pinned'] { --_row-bg: var(--argus-row-pinned-bg, var(--argus-bg, Canvas)); } [part~='cell'], [part~='header-cell'] { display: flex; align-items: center; min-inline-size: 0; box-sizing: border-box; padding-inline: var(--_pad); overflow: hidden; white-space: nowrap; border-block-end: var(--_border); } /* The checkbox column: the checkbox centred, no padding to squeeze it. */ [part~='cell-selection'], [part~='header-cell-selection'] { justify-content: center; padding-inline: 0; } [part~='selection-checkbox'] { margin: 0; cursor: pointer; } [part~='header-cell'] { background: var(--argus-header-bg, light-dark(#f9fafb, #111827)); color: var(--argus-header-fg, inherit); font-weight: 600; position: relative; } /* * Column groups: a cell per group over its columns, and an empty filler over * columns without a group at that level, so the header reads as one block. The * label of a group in the scrolling area stays in view while its columns scroll * past (sticky inside the cell, which clips rather than scrolls). */ [part~='header-group-cell'], [part~='header-group-filler'] { box-sizing: border-box; min-inline-size: 0; background: var(--argus-header-bg, light-dark(#f9fafb, #111827)); color: var(--argus-header-fg, inherit); } [part~='header-group-cell'] { display: flex; align-items: center; position: relative; padding-inline: var(--_pad); overflow: clip; white-space: nowrap; font-weight: 600; border-block-end: var(--_border); border-inline-end: var(--_border); } .group-label { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; } [part~='header-group-cell']:not([data-pin]) > .group-label { position: sticky; inset-inline-start: calc(var(--_pin-start, 0px) + var(--_pad)); } [data-move-group] { user-select: none; } [data-dragging] [part~='header-group-cell'] { cursor: grabbing; } [part~='header-group-cell-dragging'] { opacity: 0.5; } [part~='resize-handle'] { position: absolute; inset-block: 0; inset-inline-end: 0; inline-size: 8px; z-index: 1; cursor: col-resize; touch-action: none; } [part~='resize-handle']::after { content: ''; position: absolute; inset-block: 25%; inset-inline-end: 0; inline-size: 2px; background: var(--argus-resize-handle-color, light-dark(#9ca3af, #6b7280)); opacity: 0; } [part~='header-cell']:hover [part~='resize-handle']::after, [part~='header-cell']:focus-visible [part~='resize-handle']::after, [part~='header-group-cell']:hover [part~='resize-handle']::after, [part~='header-group-cell']:focus-visible [part~='resize-handle']::after, [part~='resize-handle'][data-active]::after { opacity: 1; } [data-sort-col] { cursor: pointer; user-select: none; } /* A drag on a reorderable header moves the column, so its text isn't selectable. */ [data-move-col] { user-select: none; } [data-dragging], [data-dragging] [part~='header-cell'] { cursor: grabbing; } [part~='header-cell-dragging'] { opacity: 0.5; } /* The line where a dragged column would land, on the target header's logical edge. */ [part~='drop-indicator'] { position: absolute; inset-block: 0; inline-size: 2px; z-index: 2; background: var(--argus-drop-indicator-color, Highlight); pointer-events: none; } [part~='drop-indicator'][data-edge='start'] { inset-inline-start: 0; } [part~='drop-indicator'][data-edge='end'] { inset-inline-end: 0; } [part~='header-cell']:focus-visible, [part~='header-group-cell']:focus-visible, [part~='cell']:focus-visible { outline: var(--argus-focus-ring, 2px solid Highlight); outline-offset: -2px; } /* A small chevron after the header content; only the sorted column shows it. */ .sort-indicator { flex: none; inline-size: 0.35em; block-size: 0.35em; margin-inline-start: 0.4em; /* Physical sides on purpose: the chevron is rotated, so it must not mirror in RTL. */ border-right: 0.12em solid currentColor; border-bottom: 0.12em solid currentColor; visibility: hidden; } [aria-sort] .sort-indicator { visibility: visible; } [aria-sort='ascending'] .sort-indicator { transform: translateY(0.1em) rotate(-135deg); } [aria-sort='descending'] .sort-indicator { transform: translateY(-0.1em) rotate(45deg); } [data-align='end'] .sort-indicator { order: -1; margin-inline: 0 0.4em; } /* A funnel: the column is filtered. */ [part~='filter-indicator'] { flex: none; inline-size: 0.7em; block-size: 0.7em; margin-inline-start: 0.35em; background: var(--argus-filter-indicator-color, currentColor); clip-path: polygon(0 0, 100% 0, 62% 48%, 62% 100%, 38% 82%, 38% 48%); } [data-align='end'] [part~='filter-indicator'] { order: -2; margin-inline: 0 0.35em; } @media (forced-colors: active) { /* Backgrounds are forced to Canvas there, which would hide the funnel. */ [part~='filter-indicator'] { forced-color-adjust: none; background: CanvasText; } } /* * Pinned columns: sticky inside the scroll container, with offsets from the * table model. Logical insets make RTL work without extra rules. */ [data-pin] { position: sticky; z-index: 1; } [data-pin='start'] { inset-inline-start: var(--_pin-offset); } [data-pin='end'] { inset-inline-end: var(--_pin-offset); } /* * Pinned body cells are sticky only while the table scrolls sideways * (data-hscroll on the scroller). At rest they are plain cells shifted by the * horizontal scroll offset, which vertical scrolling never changes: a sticky * cell per row is a compositing layer each, and Safari stutters moving them * (PinScrollController). Both place the cells at the same spot. */ [part~='row'] > [data-pin] { position: relative; inset-inline: auto; } [part~='row'] > [data-pin='start'] { transform: translateX(var(--_sx, 0px)); } [part~='row'] > [data-pin='end'] { transform: translateX(calc(var(--_sx, 0px) - var(--_dir) * var(--_max-x, 0px))); } [data-hscroll] [part~='row'] > [data-pin] { position: sticky; transform: none; } [data-hscroll] [part~='row'] > [data-pin='start'] { inset-inline-start: var(--_pin-offset); } [data-hscroll] [part~='row'] > [data-pin='end'] { inset-inline-end: var(--_pin-offset); } [part~='cell-pinned'] { background: var(--_row-surface); } /* * The edge shadow, once per pinned side (.pin-shadow, beside the scroller). * --argus-pinned-shadow is written for a shadow falling toward the end side; * the start edge in RTL and the end edge in LTR mirror it. */ .pin-shadow { position: absolute; inset-block-start: 0; block-size: min(var(--_view-h, 100%), var(--_content-h, 100%)); z-index: 3; pointer-events: none; } .pin-shadow[data-side='start'] { inset-inline-start: 0; } .pin-shadow[data-side='end'] { inset-inline-end: var(--_sb-x, 0px); } .pin-shadow::after { content: ''; position: absolute; inset: 0; box-shadow: var( --argus-pinned-shadow, 4px 0 6px -4px light-dark(rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.6)) ); transform: scaleX(var(--_dir)); } .pin-shadow[data-side='end']::after { transform: scaleX(calc(-1 * var(--_dir))); } [data-align='center'] { justify-content: center; text-align: center; } [data-align='end'] { justify-content: flex-end; text-align: end; } /* * Wrapped text (ColumnDef.wrap). In a fixed-height row, text taller than the row * starts at the top (safe) and is clipped below. */ [part~='cell'][data-wrap] { white-space: normal; overflow-wrap: anywhere; align-items: center; align-items: safe center; } /* * rowHeight: 'auto'. Body and pinned rows fit their content, at least one row * tall; the header keeps its height. Content sits at the top of the cell, with * the block padding that centres one line in a one-row cell, so one-line rows * look as they do with a fixed height. The rows' heights are measured and * placed by the table: the browser's scroll anchoring would fight it. */ [data-auto-rows] { overflow-anchor: none; } [data-auto-rows] > [part~='body'] > .row, [data-auto-rows] > .pinned > .row { block-size: auto; min-block-size: var(--_row-height); grid-template-rows: minmax(var(--_row-height), auto); } /* Reading the rows' own heights: without the height each row renders at. */ [data-auto-rows] > [part~='body'] > .row[data-measure-row] { min-block-size: var(--_row-height) !important; } [data-auto-rows] [part~='cell'] { align-items: start; padding-block: var( --argus-cell-padding-block, max(0px, (var(--_row-height) - 1lh - var(--argus-border-width, 1px)) / 2) ); } /* Skeleton bars and the Retry button, centred in a one-row row as before. */ [data-auto-rows] [part~='row-loading'] > [part~='cell'] { align-items: center; padding-block: 0; } [data-auto-rows] > [part~='body'] > .row > [role='gridcell'] { scroll-margin-block: calc(var(--_header-h) + var(--_pin-top-h, 0px)) var(--_pin-bottom-h, 0px); } [data-auto-rows] > [part~='empty'] { min-block-size: calc( 100% - var(--_header-h) - var(--_pin-top-h, 0px) - var(--_pin-bottom-h, 0px) ); } ::slotted(*) { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; } /* Fitting a column to its content: set for one synchronous measurement, never painted. */ [data-measure] { inline-size: max-content; } /* Rows of a data source that haven't loaded: a bar per cell, pulsing gently. */ [part~='skeleton'] { flex: none; inline-size: min(60%, 8em); block-size: 0.6em; border-radius: 0.3em; background: var(--argus-skeleton-bg, color-mix(in srgb, currentColor 12%, transparent)); animation: argus-skeleton-pulse 1.6s ease-in-out infinite; } [part~='skeleton-error'] { animation: none; opacity: 0.5; } @keyframes argus-skeleton-pulse { 50% { opacity: 0.45; } } @media (prefers-reduced-motion: reduce) { [part~='skeleton'] { animation: none; } } [part~='retry'] { font: inherit; color: inherit; cursor: pointer; } [part~='empty'] { display: flex; align-items: center; justify-content: center; min-block-size: calc( 100% - var(--_header-h) - (var(--_pin-top-rows, 0) + var(--_pin-bottom-rows, 0)) * var(--_row-height) ); padding: var(--_pad); box-sizing: border-box; } /* Measures the resolved row height in px for the virtualizer. */ .probe { position: absolute; inset-block-start: 0; inline-size: 0; block-size: var(--_row-height); visibility: hidden; pointer-events: none; } } `",
|
|
3823
4067
|
"description": "Base styles. Everything sits in `@layer argus-base`, and every value reads a\npublic token with a neutral fallback, so themes and page CSS always win.\n`--_*` properties are private."
|
|
3824
4068
|
}
|
|
3825
4069
|
],
|