@perspective-dev/viewer-datagrid 4.3.0 → 4.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/cdn/perspective-viewer-datagrid.js +5 -5
- package/dist/cdn/perspective-viewer-datagrid.js.map +4 -4
- package/dist/css/perspective-viewer-datagrid-toolbar.css +1 -1
- package/dist/css/perspective-viewer-datagrid.css +1 -1
- package/dist/esm/perspective-viewer-datagrid.js +2 -2
- package/dist/esm/perspective-viewer-datagrid.js.map +3 -3
- package/dist/esm/style_handlers/table_cell/datetime.d.ts +6 -2
- package/package.json +2 -2
- package/src/css/mitered-headers.css +64 -0
- package/src/css/perspective-viewer-datagrid.css +6 -0
- package/src/{less/pro.less → css/pro.css} +32 -31
- package/src/{less/regular_table.less → css/regular_table.css} +163 -156
- package/src/{less/row-hover.less → css/row-hover.css} +28 -22
- package/src/{less/scrollbar.less → css/scrollbar.css} +16 -15
- package/src/{less/sub-cell-scroll.less → css/sub-cell-scroll.css} +14 -13
- package/src/{less/toolbar.less → css/toolbar.css} +46 -39
- package/src/ts/model/create.ts +4 -4
- package/src/ts/style_handlers/body.ts +15 -13
- package/src/ts/style_handlers/table_cell/datetime.ts +12 -9
- package/src/less/mitered-headers.less +0 -65
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { CellMetadata } from "regular-table/dist/esm/types.js";
|
|
2
|
-
import type { DatagridModel, ColumnConfig } from "../../types.js";
|
|
3
|
-
|
|
2
|
+
import type { DatagridModel, ColumnConfig, ColorRecord } from "../../types.js";
|
|
3
|
+
interface PluginWithColor extends Omit<ColumnConfig, "color"> {
|
|
4
|
+
color?: ColorRecord;
|
|
5
|
+
}
|
|
6
|
+
export declare function cell_style_datetime(this: DatagridModel, plugin: PluginWithColor, td: HTMLElement, metadata: CellMetadata): void;
|
|
7
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perspective-dev/viewer-datagrid",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Perspective datagrid plugin based on `regular-table`",
|
|
5
5
|
"unpkg": "dist/cdn/perspective-viewer-datagrid.js",
|
|
6
6
|
"jsdelivr": "dist/cdn/perspective-viewer-datagrid.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"regular-table": "=0.8.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"
|
|
38
|
+
"lightningcss": "^1.29.0",
|
|
39
39
|
"@perspective-dev/esbuild-plugin": "",
|
|
40
40
|
"@perspective-dev/test": "",
|
|
41
41
|
"@types/chroma-js": "^3.1.2",
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
2
|
+
* ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
|
|
3
|
+
* ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
|
|
4
|
+
* ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
|
|
5
|
+
* ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
|
|
6
|
+
* ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
|
|
7
|
+
* ┃ Copyright (c) 2017, the Perspective Authors. ┃
|
|
8
|
+
* ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
|
|
9
|
+
* ┃ This file is part of the Perspective library, distributed under the terms ┃
|
|
10
|
+
* ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
|
+
* ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
.psp-header-border:not(.psp-is-top):not(.psp-header-leaf) {
|
|
15
|
+
/* right */
|
|
16
|
+
box-shadow: 1px 0px var(--psp-inactive--border-color, #8b868045);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.psp-header-group {
|
|
20
|
+
/* bottom */
|
|
21
|
+
box-shadow: 0px 10px 0 -9px var(--psp-inactive--border-color, #8b868045);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.psp-is-top {
|
|
25
|
+
/* top-miter-right */
|
|
26
|
+
box-shadow: 5px 4px 0px -4px var(--psp-inactive--border-color, #8b868045);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.psp-is-top.psp-header-group:not(.psp-header-group-corner) {
|
|
30
|
+
/* top-miter-right and bottom */
|
|
31
|
+
box-shadow:
|
|
32
|
+
5px 4px 0px -4px var(--psp-inactive--border-color, #8b868045),
|
|
33
|
+
0px 10px 0 -9px var(--psp-inactive--border-color, #8b868045);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.psp-header-border.psp-header-group {
|
|
37
|
+
&:not(.psp-is-top):not(.psp-header-group-corner) {
|
|
38
|
+
/* right and bottom */
|
|
39
|
+
box-shadow:
|
|
40
|
+
1px 0px var(--psp-inactive--border-color, #8b868045),
|
|
41
|
+
0px 10px 0 -9px var(--psp-inactive--border-color, #8b868045);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
perspective-viewer[settings]
|
|
46
|
+
tr.rt-autosize
|
|
47
|
+
.psp-header-leaf.psp-header-border:not(.psp-menu-enabled) {
|
|
48
|
+
box-shadow: 1px 0px var(--psp-inactive--border-color, #8b868045);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host-context(perspective-viewer[settings])
|
|
52
|
+
tr.rt-autosize
|
|
53
|
+
.psp-header-leaf.psp-header-border:not(.psp-menu-enabled) {
|
|
54
|
+
box-shadow: 1px 0px var(--psp-inactive--border-color, #8b868045);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.psp-header-leaf.psp-header-border {
|
|
58
|
+
/* bottom-miter-right */
|
|
59
|
+
box-shadow: 5px -4px 0px -4px var(--psp-inactive--border-color, #8b868045);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
tr:only-child th {
|
|
63
|
+
box-shadow: none !important;
|
|
64
|
+
}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@row-height: 19px;
|
|
1
|
+
/* ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
2
|
+
* ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
|
|
3
|
+
* ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
|
|
4
|
+
* ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
|
|
5
|
+
* ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
|
|
6
|
+
* ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
|
|
7
|
+
* ┃ Copyright (c) 2017, the Perspective Authors. ┃
|
|
8
|
+
* ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
|
|
9
|
+
* ┃ This file is part of the Perspective library, distributed under the terms ┃
|
|
10
|
+
* ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
|
+
* ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
|
+
*/
|
|
14
13
|
|
|
15
14
|
regular-table {
|
|
16
15
|
padding: 0;
|
|
17
16
|
margin: 12px 0 0 12px;
|
|
18
17
|
font-family: inherit;
|
|
19
|
-
--
|
|
18
|
+
--psp-datagrid--hover--border-color: var(--psp-inactive--color, #c5c9d080);
|
|
20
19
|
|
|
21
20
|
div[tabindex] {
|
|
22
21
|
outline: none;
|
|
@@ -35,7 +34,7 @@ regular-table {
|
|
|
35
34
|
text-align: center;
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
/* Header groups should overflow and not contribute to auto-sizing. */
|
|
39
38
|
thead tr:not(.rt-autosize) th {
|
|
40
39
|
overflow: hidden;
|
|
41
40
|
max-width: 0px;
|
|
@@ -70,7 +69,7 @@ regular-table {
|
|
|
70
69
|
text-align: left;
|
|
71
70
|
}
|
|
72
71
|
|
|
73
|
-
|
|
72
|
+
/* frozen rows */
|
|
74
73
|
|
|
75
74
|
thead tr:last-child th {
|
|
76
75
|
border-bottom: 1px solid #8b868045;
|
|
@@ -95,12 +94,11 @@ regular-table {
|
|
|
95
94
|
td,
|
|
96
95
|
th {
|
|
97
96
|
white-space: nowrap;
|
|
98
|
-
font-size: 12px;
|
|
99
97
|
padding-right: 5px;
|
|
100
98
|
padding-left: 5px;
|
|
101
99
|
padding-top: 0px;
|
|
102
100
|
padding-bottom: 0px;
|
|
103
|
-
height:
|
|
101
|
+
height: var(--psp-datagrid--row--height, 19px);
|
|
104
102
|
}
|
|
105
103
|
|
|
106
104
|
table * {
|
|
@@ -116,7 +114,7 @@ regular-table {
|
|
|
116
114
|
span.rt-row-header-icon {
|
|
117
115
|
color: #aaa;
|
|
118
116
|
padding-right: 4px;
|
|
119
|
-
font-family: var(--button--font-family);
|
|
117
|
+
font-family: var(--psp-button--font-family);
|
|
120
118
|
}
|
|
121
119
|
|
|
122
120
|
span.rt-column-header-icon {
|
|
@@ -124,7 +122,7 @@ regular-table {
|
|
|
124
122
|
padding-left: 3px;
|
|
125
123
|
display: inline-block;
|
|
126
124
|
width: 10px;
|
|
127
|
-
font-family: var(--button--font-family);
|
|
125
|
+
font-family: var(--psp-button--font-family);
|
|
128
126
|
}
|
|
129
127
|
|
|
130
128
|
span.rt-row-header-icon:hover {
|
|
@@ -141,17 +139,17 @@ regular-table {
|
|
|
141
139
|
text-overflow: ellipsis;
|
|
142
140
|
}
|
|
143
141
|
|
|
144
|
-
|
|
142
|
+
/* OPTIONAL zebra striping */
|
|
145
143
|
|
|
146
|
-
|
|
144
|
+
/* @zebra-stripe-color: rgb(238,238,238); */
|
|
147
145
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
/* tbody tr:nth-child(even) td:not(.rt-group-header) { */
|
|
147
|
+
/* background: @zebra-stripe-color; */
|
|
148
|
+
/* } */
|
|
151
149
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
150
|
+
/* tbody tr:nth-child(even) span.rt-group-name { */
|
|
151
|
+
/* background: @zebra-stripe-color; */
|
|
152
|
+
/* } */
|
|
155
153
|
|
|
156
154
|
td span.rt-group-name,
|
|
157
155
|
th span.rt-group-name {
|
|
@@ -182,15 +180,18 @@ regular-table {
|
|
|
182
180
|
}
|
|
183
181
|
|
|
184
182
|
a {
|
|
185
|
-
color: var(--
|
|
183
|
+
color: var(--psp-datagrid--pos-cell--color);
|
|
186
184
|
}
|
|
187
185
|
|
|
188
186
|
a:visited {
|
|
189
|
-
color: var(--active--color);
|
|
187
|
+
color: var(--psp-active--color);
|
|
190
188
|
}
|
|
191
189
|
|
|
192
190
|
td.psp-null:after,
|
|
193
191
|
th.psp-null:after {
|
|
194
|
-
content: var(--null--content, "-");
|
|
192
|
+
content: var(--psp-label--null--content, "-");
|
|
193
|
+
color: var(--psp-label--null--color, inherit);
|
|
194
|
+
font-size: var(--psp-label--null--font-size, inherit);
|
|
195
|
+
vertical-align: middle;
|
|
195
196
|
}
|
|
196
197
|
}
|