@perspective-dev/viewer-datagrid 4.4.0 → 4.4.1
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 +4 -22
- 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/color_utils.d.ts +22 -0
- package/dist/esm/custom_elements/datagrid.d.ts +5 -5
- package/dist/esm/data_listener/format_cell.d.ts +1 -1
- package/dist/esm/data_listener/formatter_cache.d.ts +1 -1
- package/dist/esm/data_listener/index.d.ts +3 -2
- package/dist/esm/event_handlers/click/edit_click.d.ts +3 -2
- package/dist/esm/event_handlers/click.d.ts +4 -6
- package/dist/esm/event_handlers/dispatch_click.d.ts +3 -2
- package/dist/esm/event_handlers/expand_collapse.d.ts +1 -1
- package/dist/esm/event_handlers/focus.d.ts +4 -5
- package/dist/esm/event_handlers/header_click.d.ts +5 -3
- package/dist/esm/event_handlers/keydown/edit_keydown.d.ts +3 -4
- package/dist/esm/event_handlers/select_region.d.ts +3 -1
- package/dist/esm/event_handlers/sort.d.ts +8 -7
- package/dist/esm/model/create.d.ts +1 -1
- package/dist/esm/perspective-viewer-datagrid.js +3 -3
- package/dist/esm/perspective-viewer-datagrid.js.map +4 -4
- package/dist/esm/plugin/activate.d.ts +1 -1
- package/dist/esm/plugin/column_style_controls.d.ts +1 -1
- package/dist/esm/style_handlers/body.d.ts +3 -3
- package/dist/esm/style_handlers/column_header.d.ts +4 -3
- package/dist/esm/style_handlers/consolidated.d.ts +3 -47
- package/dist/esm/style_handlers/editable.d.ts +3 -2
- package/dist/esm/style_handlers/focus.d.ts +4 -4
- package/dist/esm/style_handlers/group_header.d.ts +1 -1
- package/dist/esm/style_handlers/table_cell/boolean.d.ts +1 -1
- package/dist/esm/style_handlers/table_cell/cell_flash.d.ts +1 -1
- package/dist/esm/style_handlers/table_cell/datetime.d.ts +1 -1
- package/dist/esm/style_handlers/table_cell/numeric.d.ts +1 -1
- package/dist/esm/style_handlers/table_cell/row_header.d.ts +1 -1
- package/dist/esm/style_handlers/table_cell/string.d.ts +1 -1
- package/dist/esm/style_handlers/types.d.ts +0 -4
- package/dist/esm/types.d.ts +10 -17
- package/package.json +2 -4
- package/src/css/regular_table.css +87 -31
- package/src/css/row-hover.css +20 -7
- package/src/css/toolbar.css +11 -0
- package/src/ts/color_utils.ts +144 -16
- package/src/ts/custom_elements/datagrid.ts +11 -12
- package/src/ts/custom_elements/toolbar.ts +4 -5
- package/src/ts/data_listener/format_cell.ts +28 -9
- package/src/ts/data_listener/formatter_cache.ts +1 -1
- package/src/ts/data_listener/index.ts +4 -8
- package/src/ts/event_handlers/click/edit_click.ts +7 -6
- package/src/ts/event_handlers/click.ts +39 -68
- package/src/ts/event_handlers/dispatch_click.ts +24 -25
- package/src/ts/event_handlers/expand_collapse.ts +7 -7
- package/src/ts/event_handlers/focus.ts +38 -35
- package/src/ts/event_handlers/header_click.ts +101 -62
- package/src/ts/event_handlers/keydown/edit_keydown.ts +49 -52
- package/src/ts/event_handlers/select_region.ts +144 -133
- package/src/ts/event_handlers/sort.ts +16 -24
- package/src/ts/model/column_overrides.ts +13 -4
- package/src/ts/model/create.ts +51 -55
- package/src/ts/model/toolbar.ts +23 -7
- package/src/ts/plugin/activate.ts +120 -92
- package/src/ts/plugin/column_style_controls.ts +1 -1
- package/src/ts/plugin/save.ts +1 -0
- package/src/ts/style_handlers/body.ts +44 -51
- package/src/ts/style_handlers/column_header.ts +16 -19
- package/src/ts/style_handlers/consolidated.ts +22 -123
- package/src/ts/style_handlers/editable.ts +10 -8
- package/src/ts/style_handlers/focus.ts +5 -5
- package/src/ts/style_handlers/group_header.ts +3 -2
- package/src/ts/style_handlers/table_cell/boolean.ts +3 -3
- package/src/ts/style_handlers/table_cell/cell_flash.ts +11 -11
- package/src/ts/style_handlers/table_cell/datetime.ts +3 -3
- package/src/ts/style_handlers/table_cell/numeric.ts +24 -25
- package/src/ts/style_handlers/table_cell/row_header.ts +2 -2
- package/src/ts/style_handlers/table_cell/string.ts +20 -18
- package/src/ts/style_handlers/types.ts +0 -10
- package/src/ts/types.ts +28 -20
- package/dist/esm/event_handlers/deselect_all.d.ts +0 -5
- package/dist/esm/event_handlers/row_select_click.d.ts +0 -4
- package/src/ts/event_handlers/deselect_all.ts +0 -28
- package/src/ts/event_handlers/row_select_click.ts +0 -92
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RegularTableElement } from "regular-table";
|
|
2
|
-
import { type DatagridModel, type
|
|
3
|
-
import { CollectedCell
|
|
2
|
+
import { type DatagridModel, type ColumnsConfig } from "../types.js";
|
|
3
|
+
import { CollectedCell } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Apply styles to all body cells in a single pass.
|
|
6
6
|
*/
|
|
7
|
-
export declare function applyBodyCellStyles(
|
|
7
|
+
export declare function applyBodyCellStyles(model: DatagridModel, cells: CollectedCell[], plugins: ColumnsConfig, isSettingsOpen: boolean, isSelectable: boolean, isEditable: boolean, regularTable: RegularTableElement): void;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { RegularTableElement } from "regular-table";
|
|
2
|
-
import { type DatagridModel
|
|
2
|
+
import { type DatagridModel } from "../types.js";
|
|
3
3
|
import { CollectedHeaderRow } from "./types.js";
|
|
4
|
+
import type { HTMLPerspectiveViewerElement } from "@perspective-dev/viewer";
|
|
4
5
|
/**
|
|
5
6
|
* Apply selected column styling in response to column settings toggle events.
|
|
6
7
|
* This is called directly (not as a style listener) when the user opens/closes
|
|
7
8
|
* the column settings panel.
|
|
8
9
|
*/
|
|
9
|
-
export declare function style_selected_column(
|
|
10
|
+
export declare function style_selected_column(model: DatagridModel, regularTable: RegularTableElement, viewer: HTMLPerspectiveViewerElement, selectedColumn: string | undefined): void;
|
|
10
11
|
/**
|
|
11
12
|
* Style a single column header row.
|
|
12
13
|
*/
|
|
13
|
-
export declare function styleColumnHeaderRow(
|
|
14
|
+
export declare function styleColumnHeaderRow(model: DatagridModel, headerRow: CollectedHeaderRow, regularTable: RegularTableElement, is_menu_row: boolean): void;
|
|
@@ -1,54 +1,10 @@
|
|
|
1
1
|
import { RegularTableElement } from "regular-table";
|
|
2
|
-
import type { DatagridModel,
|
|
3
|
-
import {
|
|
4
|
-
interface CollectedCell {
|
|
5
|
-
element: HTMLElement;
|
|
6
|
-
metadata: CellMetadata;
|
|
7
|
-
isHeader: boolean;
|
|
8
|
-
}
|
|
9
|
-
interface CollectedHeaderRow {
|
|
10
|
-
row: HTMLTableRowElement;
|
|
11
|
-
cells: Array<{
|
|
12
|
-
element: HTMLTableCellElement;
|
|
13
|
-
metadata: CellMetadata | undefined;
|
|
14
|
-
}>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Context object passed through consolidated styling
|
|
18
|
-
*/
|
|
19
|
-
export interface StyleContext {
|
|
20
|
-
model: DatagridModel;
|
|
21
|
-
regularTable: RegularTableElement;
|
|
22
|
-
viewer: PerspectiveViewerElement;
|
|
23
|
-
datagrid: DatagridPluginElement;
|
|
24
|
-
plugins: ColumnsConfig;
|
|
25
|
-
isSettingsOpen: boolean;
|
|
26
|
-
isSelectable: boolean;
|
|
27
|
-
isEditable: boolean;
|
|
28
|
-
selectedRowsMap: Map<RegularTableElement, unknown[]>;
|
|
29
|
-
selectedPositionMap: Map<RegularTableElement, SelectedPosition>;
|
|
30
|
-
}
|
|
31
|
-
type LocalSelectedRowsMap = WeakMap<RegularTableElement, unknown[]>;
|
|
32
|
-
type LocalSelectedPositionMap = WeakMap<RegularTableElement, SelectedPosition>;
|
|
2
|
+
import type { DatagridModel, DatagridPluginElement, SelectedPositionMap } from "../types.js";
|
|
3
|
+
import type { HTMLPerspectiveViewerElement } from "@perspective-dev/viewer";
|
|
33
4
|
/**
|
|
34
5
|
* Consolidated style listener that handles all cell styling in a single pass.
|
|
35
6
|
* This eliminates redundant DOM traversals and reduces layout thrashing by:
|
|
36
7
|
* 1. Collecting all cell metadata in a read phase
|
|
37
8
|
* 2. Applying all styles in a write phase
|
|
38
9
|
*/
|
|
39
|
-
export declare function createConsolidatedStyleListener(datagrid: DatagridPluginElement,
|
|
40
|
-
declare module "../types.js" {
|
|
41
|
-
interface DatagridModel {
|
|
42
|
-
_applyBodyCellStyles(cells: CollectedCell[], plugins: ColumnsConfig, isSettingsOpen: boolean, isSelectable: boolean, isEditable: boolean, regularTable: RegularTableElement, selectedRowsMap: LocalSelectedRowsMap, selectedPositionMap: LocalSelectedPositionMap, viewer: PerspectiveViewerElement): void;
|
|
43
|
-
_applyGroupHeaderStyles(headerRows: CollectedHeaderRow[], regularTable: RegularTableElement): void;
|
|
44
|
-
_applyColumnHeaderStyles(headerRows: CollectedHeaderRow[], regularTable: RegularTableElement, viewer: PerspectiveViewerElement): void;
|
|
45
|
-
_applyFocusStyle(cells: CollectedCell[], regularTable: RegularTableElement, selectedPositionMap: LocalSelectedPositionMap): void;
|
|
46
|
-
_styleColumnHeaderRow(headerRow: CollectedHeaderRow, regularTable: RegularTableElement, is_menu_row: boolean): void;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Install the styling methods on the DatagridModel prototype.
|
|
51
|
-
* This should be called once during module initialization.
|
|
52
|
-
*/
|
|
53
|
-
export declare function installConsolidatedStyleMethods(modelPrototype: any): void;
|
|
54
|
-
export {};
|
|
10
|
+
export declare function createConsolidatedStyleListener(datagrid: DatagridPluginElement, model: DatagridModel, regularTable: RegularTableElement, viewer: HTMLPerspectiveViewerElement, selectedPositionMap: SelectedPositionMap): () => void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RegularTableElement } from "regular-table";
|
|
2
|
-
import type { DatagridModel
|
|
2
|
+
import type { DatagridModel } from "../types.js";
|
|
3
|
+
import type { HTMLPerspectiveViewerElement } from "@perspective-dev/viewer";
|
|
3
4
|
import { CollectedHeaderRow } from "./types.js";
|
|
4
5
|
/**
|
|
5
6
|
* Apply styles to column header rows.
|
|
6
7
|
*/
|
|
7
|
-
export declare function applyColumnHeaderStyles(
|
|
8
|
+
export declare function applyColumnHeaderStyles(model: DatagridModel, headerRows: CollectedHeaderRow[], regularTable: RegularTableElement, viewer: HTMLPerspectiveViewerElement): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RegularTableElement } from "regular-table";
|
|
2
|
-
import type { DatagridModel,
|
|
3
|
-
import { CollectedCell
|
|
2
|
+
import type { DatagridModel, SelectedPositionMap } from "../types.js";
|
|
3
|
+
import { CollectedCell } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Apply focus style to the selected cell.
|
|
6
6
|
* Optimized to use collected cells instead of querySelectorAll.
|
|
7
7
|
*/
|
|
8
|
-
export declare function applyFocusStyle(
|
|
8
|
+
export declare function applyFocusStyle(_model: DatagridModel, cells: CollectedCell[], regularTable: RegularTableElement, selectedPositionMap: SelectedPositionMap): void;
|
|
9
9
|
/**
|
|
10
10
|
* Standalone function to focus the selected cell.
|
|
11
11
|
* This collects cells from the table and tries to focus the selected position.
|
|
@@ -13,4 +13,4 @@ export declare function applyFocusStyle(this: DatagridModel, cells: CollectedCel
|
|
|
13
13
|
*
|
|
14
14
|
* Used by edit_keydown.ts for keyboard navigation.
|
|
15
15
|
*/
|
|
16
|
-
export declare function focusSelectedCell(regularTable: RegularTableElement, selectedPositionMap:
|
|
16
|
+
export declare function focusSelectedCell(regularTable: RegularTableElement, selectedPositionMap: SelectedPositionMap): boolean;
|
|
@@ -4,4 +4,4 @@ import { CollectedHeaderRow } from "./types.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Apply styles to group header rows.
|
|
6
6
|
*/
|
|
7
|
-
export declare function applyGroupHeaderStyles(
|
|
7
|
+
export declare function applyGroupHeaderStyles(model: DatagridModel, headerRows: CollectedHeaderRow[], regularTable: RegularTableElement): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CellMetadata } from "regular-table/dist/esm/types.js";
|
|
2
2
|
import type { DatagridModel, ColumnConfig } from "../../types.js";
|
|
3
|
-
export declare function cell_style_boolean(
|
|
3
|
+
export declare function cell_style_boolean(model: DatagridModel, _plugin: ColumnConfig | undefined, td: HTMLElement, metadata: CellMetadata): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CellMetadataBody } from "regular-table/dist/esm/types.js";
|
|
2
2
|
import type { DatagridModel, ColorRecord } from "../../types.js";
|
|
3
|
-
export declare function style_cell_flash(
|
|
3
|
+
export declare function style_cell_flash(model: DatagridModel, metadata: CellMetadataBody, td: HTMLElement, [, , , , , pos_s, pos_e]: ColorRecord, [, , , , , neg_s, neg_e]: ColorRecord, is_settings_open: boolean): void;
|
|
@@ -3,5 +3,5 @@ import type { DatagridModel, ColumnConfig, ColorRecord } from "../../types.js";
|
|
|
3
3
|
interface PluginWithColor extends Omit<ColumnConfig, "color"> {
|
|
4
4
|
color?: ColorRecord;
|
|
5
5
|
}
|
|
6
|
-
export declare function cell_style_datetime(
|
|
6
|
+
export declare function cell_style_datetime(model: DatagridModel, plugin: PluginWithColor, td: HTMLElement, metadata: CellMetadata): void;
|
|
7
7
|
export {};
|
|
@@ -11,5 +11,5 @@ interface PluginWithColors extends Omit<ColumnConfig, "pos_fg_color" | "neg_fg_c
|
|
|
11
11
|
pos_fg_color?: ColorRecord;
|
|
12
12
|
neg_fg_color?: ColorRecord;
|
|
13
13
|
}
|
|
14
|
-
export declare function cell_style_numeric(
|
|
14
|
+
export declare function cell_style_numeric(model: DatagridModel, plugin: PluginWithColors | undefined, td: HTMLElement, metadata: CellMetaWithExtras, is_settings_open: boolean): void;
|
|
15
15
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CellMetadataRowHeader } from "regular-table/dist/esm/types.js";
|
|
2
2
|
import type { DatagridModel } from "../../types.js";
|
|
3
3
|
import { RegularTableElement } from "regular-table";
|
|
4
|
-
export declare function cell_style_row_header(
|
|
4
|
+
export declare function cell_style_row_header(model: DatagridModel, regularTable: RegularTableElement, td: HTMLElement, metadata: CellMetadataRowHeader): void;
|
|
@@ -7,5 +7,5 @@ interface CellMetaWithExtras {
|
|
|
7
7
|
interface PluginWithColor extends Omit<ColumnConfig, "color"> {
|
|
8
8
|
color?: ColorRecord;
|
|
9
9
|
}
|
|
10
|
-
export declare function cell_style_string(
|
|
10
|
+
export declare function cell_style_string(model: DatagridModel, plugin: PluginWithColor | undefined, td: HTMLElement, metadata: CellMetaWithExtras): void;
|
|
11
11
|
export {};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { RegularTableElement } from "regular-table";
|
|
2
1
|
import { CellMetadata, CellMetadataBody, CellMetadataRowHeader } from "regular-table/dist/esm/types.js";
|
|
3
|
-
import type { SelectedPosition } from "../types.js";
|
|
4
2
|
export interface CollectedCell {
|
|
5
3
|
element: HTMLElement;
|
|
6
4
|
metadata: CellMetadataRowHeader | CellMetadataBody;
|
|
@@ -13,5 +11,3 @@ export interface CollectedHeaderRow {
|
|
|
13
11
|
metadata: CellMetadata | undefined;
|
|
14
12
|
}>;
|
|
15
13
|
}
|
|
16
|
-
export type LocalSelectedRowsMap = WeakMap<RegularTableElement, unknown[]>;
|
|
17
|
-
export type LocalSelectedPositionMap = WeakMap<RegularTableElement, SelectedPosition>;
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { View, Table, ViewConfig, ColumnType, SortDir, ViewWindow, ViewConfigUpdate } from "@perspective-dev/client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { HTMLPerspectiveViewerElement, ViewerConfig } from "@perspective-dev/viewer";
|
|
3
|
+
import type { RegularTableElement } from "regular-table";
|
|
4
|
+
import type { CellMetadata, DataResponse } from "regular-table/dist/esm/types";
|
|
4
5
|
export type { RegularTableElement as RegularTable };
|
|
5
6
|
export declare function get_psp_type(model: DatagridModel, metadata: CellMetadata): ColumnType;
|
|
6
|
-
export type EditMode = "READ_ONLY" | "EDIT" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_REGION";
|
|
7
|
+
export type EditMode = "READ_ONLY" | "EDIT" | "SELECT_COLUMN" | "SELECT_ROW" | "SELECT_REGION" | "SELECT_ROW_TREE";
|
|
7
8
|
export type ColorRecord = [
|
|
8
9
|
string,
|
|
9
10
|
number,
|
|
@@ -100,10 +101,11 @@ export interface DatagridModel {
|
|
|
100
101
|
_view: View;
|
|
101
102
|
_table: Table;
|
|
102
103
|
_table_schema: Schema;
|
|
103
|
-
_config:
|
|
104
|
+
_config: ViewerConfig;
|
|
104
105
|
_num_rows: number;
|
|
105
106
|
_num_columns?: number;
|
|
106
107
|
_schema: Schema;
|
|
108
|
+
_theme: string;
|
|
107
109
|
_ids: unknown[][];
|
|
108
110
|
_plugin_background: number[];
|
|
109
111
|
_color: ColorRecord;
|
|
@@ -115,6 +117,8 @@ export interface DatagridModel {
|
|
|
115
117
|
_column_types: ColumnType[];
|
|
116
118
|
_is_editable: boolean[];
|
|
117
119
|
_edit_mode: EditMode;
|
|
120
|
+
_tree_selection_id?: unknown[];
|
|
121
|
+
_last_insert_configs?: ViewConfigUpdate[];
|
|
118
122
|
_selection_state: SelectionState;
|
|
119
123
|
_row_header_types: ColumnType[];
|
|
120
124
|
_series_color_map: Map<string, Map<string, number>>;
|
|
@@ -135,17 +139,6 @@ export interface DatagridModel {
|
|
|
135
139
|
export declare const PRIVATE_PLUGIN_SYMBOL: unique symbol;
|
|
136
140
|
export type DataListener = (regularTable: RegularTableElement, x0: number, y0: number, x1: number, y1: number) => Promise<DataResponse>;
|
|
137
141
|
export type StyleListener = () => void;
|
|
138
|
-
export interface PerspectiveViewerElement extends HTMLElement {
|
|
139
|
-
getView(): Promise<View>;
|
|
140
|
-
getTable(): Promise<Table>;
|
|
141
|
-
getEditPort(): Promise<number>;
|
|
142
|
-
restore(config: Partial<ViewConfig>): Promise<void>;
|
|
143
|
-
toggleColumnSettings(columnName?: string): Promise<void>;
|
|
144
|
-
hasAttribute(name: string): boolean;
|
|
145
|
-
setSelection(viewport?: ViewWindow): void;
|
|
146
|
-
dispatchEvent(event: Event): boolean;
|
|
147
|
-
children: HTMLCollectionOf<HTMLElement>;
|
|
148
|
-
}
|
|
149
142
|
export interface DatagridToolbarElement extends HTMLElement {
|
|
150
143
|
setEditButton(button: HTMLElement): void;
|
|
151
144
|
setScrollLockButton(button: HTMLElement): void;
|
|
@@ -165,7 +158,7 @@ export interface PerspectiveClickDetail {
|
|
|
165
158
|
column_names: string[];
|
|
166
159
|
config: Partial<ViewConfig>;
|
|
167
160
|
}
|
|
168
|
-
export { PerspectiveSelectDetail } from "@perspective-dev/viewer";
|
|
161
|
+
export { PerspectiveSelectDetail } from "@perspective-dev/viewer/src/ts/extensions.js";
|
|
169
162
|
export interface HandledMouseEvent extends MouseEvent {
|
|
170
163
|
handled?: boolean;
|
|
171
164
|
}
|
|
@@ -184,5 +177,5 @@ export interface DatagridPluginElement extends HTMLElement {
|
|
|
184
177
|
_reset_select?: boolean;
|
|
185
178
|
_reset_column_size?: boolean;
|
|
186
179
|
}
|
|
187
|
-
export type SelectedRowsMap = WeakMap<RegularTableElement, Set<number>>;
|
|
188
180
|
export type SelectedPositionMap = WeakMap<RegularTableElement, SelectedPosition>;
|
|
181
|
+
export declare function isEditableMode(model: DatagridModel, viewer: HTMLPerspectiveViewerElement, allowed?: boolean): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perspective-dev/viewer-datagrid",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.1",
|
|
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",
|
|
@@ -31,14 +31,12 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@perspective-dev/client": "",
|
|
33
33
|
"@perspective-dev/viewer": "",
|
|
34
|
-
"
|
|
35
|
-
"regular-table": "=0.8.3"
|
|
34
|
+
"regular-table": "=0.8.4"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
37
|
"lightningcss": "^1.29.0",
|
|
39
38
|
"@perspective-dev/esbuild-plugin": "",
|
|
40
39
|
"@perspective-dev/test": "",
|
|
41
|
-
"@types/chroma-js": "^3.1.2",
|
|
42
40
|
"prettier": ">=3 <4",
|
|
43
41
|
"typescript": ">=5 <6",
|
|
44
42
|
"zx": ">=8 <9"
|
|
@@ -97,34 +97,18 @@ perspective-viewer,
|
|
|
97
97
|
cursor: pointer;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.psp-row-selected,
|
|
101
|
-
:hover .psp-row-selected,
|
|
102
|
-
:hover th.psp-tree-leaf.psp-row-selected,
|
|
103
|
-
:hover th.psp-tree-label.psp-row-selected {
|
|
104
|
-
color: white !important;
|
|
105
|
-
background-color: var(--selected-row--background-color, #ea7319) !important;
|
|
106
|
-
border-color: var(--selected-row--background-color, #ea7319) !important;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
100
|
regular-table.flat-group-rollup-mode.vertical-row-headers
|
|
110
101
|
th.psp-tree-label:not(:last-of-type) {
|
|
111
102
|
writing-mode: vertical-lr;
|
|
112
103
|
}
|
|
113
104
|
|
|
114
|
-
.psp-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
color:
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.psp-row-subselected,
|
|
124
|
-
:hover .psp-row-subselected,
|
|
125
|
-
:hover th.psp-tree-leaf.psp-row-subselected,
|
|
126
|
-
:hover th.psp-tree-label.psp-row-subselected {
|
|
127
|
-
background: rgba(234, 115, 25, 0.2) !important;
|
|
105
|
+
.psp-select-region-inactive,
|
|
106
|
+
:hover .psp-select-region-inactive,
|
|
107
|
+
:hover th.psp-tree-leaf.psp-select-region-inactive,
|
|
108
|
+
:hover th.psp-tree-label.psp-select-region-inactive {
|
|
109
|
+
background-color: var(--psp-inactive--color) !important;
|
|
110
|
+
color: var(--psp--background-color) !important;
|
|
111
|
+
border-color: var(--psp--background-color) !important;
|
|
128
112
|
}
|
|
129
113
|
|
|
130
114
|
.psp-error {
|
|
@@ -265,6 +249,7 @@ tbody th:last-of-type {
|
|
|
265
249
|
overflow: hidden;
|
|
266
250
|
text-overflow: ellipsis;
|
|
267
251
|
}
|
|
252
|
+
|
|
268
253
|
tbody th:empty {
|
|
269
254
|
background-image: linear-gradient(
|
|
270
255
|
to right,
|
|
@@ -316,12 +301,78 @@ regular-table:not(.flat-group-rollup-mode) {
|
|
|
316
301
|
.psp-align-right {
|
|
317
302
|
text-align: right;
|
|
318
303
|
}
|
|
304
|
+
|
|
305
|
+
.psp-color-mode-bar {
|
|
306
|
+
padding: 0 2px;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.psp-color-mode-label-bar {
|
|
310
|
+
position: relative;
|
|
311
|
+
padding: 0 2px;
|
|
312
|
+
|
|
313
|
+
.psp-bar {
|
|
314
|
+
isolation: isolate;
|
|
315
|
+
position: unset;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.psp-bar:before {
|
|
319
|
+
color: transparent;
|
|
320
|
+
pointer-events: none;
|
|
321
|
+
content: var(--label);
|
|
322
|
+
display: inline-flex;
|
|
323
|
+
justify-content: flex-end;
|
|
324
|
+
align-items: center;
|
|
325
|
+
padding: 0 3px;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.psp-bar:after {
|
|
329
|
+
color: var(--psp-label-bar-bg);
|
|
330
|
+
content: var(--label);
|
|
331
|
+
mix-blend-mode: difference;
|
|
332
|
+
position: absolute;
|
|
333
|
+
top: 0;
|
|
334
|
+
bottom: 0;
|
|
335
|
+
left: 0;
|
|
336
|
+
right: 0;
|
|
337
|
+
display: inline-flex;
|
|
338
|
+
justify-content: flex-end;
|
|
339
|
+
align-items: center;
|
|
340
|
+
padding: 0 5px;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.psp-label-bar {
|
|
345
|
+
inset: 0;
|
|
346
|
+
pointer-events: none;
|
|
347
|
+
display: flex;
|
|
348
|
+
align-items: center;
|
|
349
|
+
justify-content: flex-end;
|
|
350
|
+
padding: 0px;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.psp-label-bar-fill {
|
|
354
|
+
position: absolute;
|
|
355
|
+
top: 10%;
|
|
356
|
+
height: 80%;
|
|
357
|
+
background: var(--psp-label-bar-color);
|
|
358
|
+
pointer-events: none;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.psp-label-bar-text {
|
|
362
|
+
position: relative;
|
|
363
|
+
color: var(--psp-label-bar-bg);
|
|
364
|
+
mix-blend-mode: difference;
|
|
365
|
+
pointer-events: none;
|
|
366
|
+
}
|
|
367
|
+
|
|
319
368
|
.psp-align-left {
|
|
320
369
|
text-align: left;
|
|
321
370
|
}
|
|
371
|
+
|
|
322
372
|
.psp-positive:not(:focus) {
|
|
323
373
|
color: var(--psp-datagrid--pos-cell--color);
|
|
324
374
|
}
|
|
375
|
+
|
|
325
376
|
.psp-negative:not(:focus) {
|
|
326
377
|
color: var(--psp-datagrid--neg-cell--color);
|
|
327
378
|
}
|
|
@@ -354,7 +405,7 @@ regular-table table {
|
|
|
354
405
|
td,
|
|
355
406
|
th {
|
|
356
407
|
border-color: var(--psp-inactive--border-color, #8b868045);
|
|
357
|
-
height: 23px;
|
|
408
|
+
height: var(--psp-datagrid--row--height, 23px);
|
|
358
409
|
}
|
|
359
410
|
|
|
360
411
|
.psp-header-group {
|
|
@@ -363,9 +414,10 @@ regular-table table {
|
|
|
363
414
|
|
|
364
415
|
th.psp-header-leaf {
|
|
365
416
|
border-bottom-width: 0px;
|
|
417
|
+
|
|
366
418
|
span {
|
|
367
|
-
height: 23px;
|
|
368
|
-
min-height: 23px;
|
|
419
|
+
height: var(--psp-datagrid--row--height, 23px);
|
|
420
|
+
min-height: var(--psp-datagrid--row--height, 23px);
|
|
369
421
|
}
|
|
370
422
|
}
|
|
371
423
|
|
|
@@ -395,18 +447,18 @@ regular-table table {
|
|
|
395
447
|
regular-table
|
|
396
448
|
tbody
|
|
397
449
|
tr:hover
|
|
398
|
-
td.psp-select-region:not(.psp-
|
|
450
|
+
td.psp-select-region:not(.psp-select-region-inactive),
|
|
399
451
|
regular-table
|
|
400
452
|
tbody
|
|
401
453
|
tr:hover
|
|
402
454
|
+ tr
|
|
403
|
-
td.psp-select-region:not(.psp-
|
|
455
|
+
td.psp-select-region:not(.psp-select-region-inactive) {
|
|
404
456
|
border-color: var(--psp--background-color) !important;
|
|
405
457
|
}
|
|
406
458
|
|
|
407
459
|
regular-table tbody tr:hover {
|
|
408
460
|
td.psp-select-region.psp-menu-open {
|
|
409
|
-
&:not(.psp-
|
|
461
|
+
&:not(.psp-select-region-inactive) {
|
|
410
462
|
box-shadow:
|
|
411
463
|
inset -2px 0px 0px var(--psp--background-color),
|
|
412
464
|
inset 2px 0px 0px var(--psp--background-color);
|
|
@@ -445,7 +497,7 @@ regular-table table thead tr:last-child:after {
|
|
|
445
497
|
width: 10000px;
|
|
446
498
|
box-sizing: border-box;
|
|
447
499
|
display: block;
|
|
448
|
-
height: 23px;
|
|
500
|
+
height: var(--psp-datagrid--row--height, 23px);
|
|
449
501
|
content: " ";
|
|
450
502
|
border-bottom: 1px solid var(--psp-inactive--border-color);
|
|
451
503
|
}
|
|
@@ -455,7 +507,7 @@ regular-table table tbody tr:after {
|
|
|
455
507
|
width: 10000px;
|
|
456
508
|
box-sizing: border-box;
|
|
457
509
|
display: block;
|
|
458
|
-
height: 23px;
|
|
510
|
+
height: var(--psp-datagrid--row--height, 23px);
|
|
459
511
|
content: " ";
|
|
460
512
|
border-top: 1px solid transparent;
|
|
461
513
|
}
|
|
@@ -479,6 +531,7 @@ regular-table table tbody tr:hover + tr:after {
|
|
|
479
531
|
rgba(0, 128, 255, 0.5)
|
|
480
532
|
);
|
|
481
533
|
}
|
|
534
|
+
|
|
482
535
|
100% {
|
|
483
536
|
background-color: var(
|
|
484
537
|
--pulse--background-color-end,
|
|
@@ -494,6 +547,7 @@ regular-table table tbody tr:hover + tr:after {
|
|
|
494
547
|
rgba(0, 128, 255, 0.5)
|
|
495
548
|
);
|
|
496
549
|
}
|
|
550
|
+
|
|
497
551
|
100% {
|
|
498
552
|
background-color: var(
|
|
499
553
|
--pulse--background-color-end,
|
|
@@ -509,6 +563,7 @@ regular-table table tbody tr:hover + tr:after {
|
|
|
509
563
|
rgba(255, 25, 0, 0.5)
|
|
510
564
|
);
|
|
511
565
|
}
|
|
566
|
+
|
|
512
567
|
100% {
|
|
513
568
|
background-color: var(
|
|
514
569
|
--pulse--background-color-end,
|
|
@@ -524,6 +579,7 @@ regular-table table tbody tr:hover + tr:after {
|
|
|
524
579
|
rgba(255, 25, 0, 0.5)
|
|
525
580
|
);
|
|
526
581
|
}
|
|
582
|
+
|
|
527
583
|
100% {
|
|
528
584
|
background-color: var(
|
|
529
585
|
--pulse--background-color-end,
|
package/src/css/row-hover.css
CHANGED
|
@@ -14,10 +14,14 @@
|
|
|
14
14
|
regular-table {
|
|
15
15
|
tbody {
|
|
16
16
|
tr:hover
|
|
17
|
-
th.psp-tree-leaf:not(.psp-
|
|
17
|
+
th.psp-tree-leaf:not(.psp-select-region):not(
|
|
18
|
+
.psp-select-region-inactive
|
|
19
|
+
),
|
|
18
20
|
tr:hover
|
|
19
|
-
th.psp-tree-label:not(.psp-
|
|
20
|
-
|
|
21
|
+
th.psp-tree-label:not(.psp-select-region):not(
|
|
22
|
+
.psp-select-region-inactive
|
|
23
|
+
),
|
|
24
|
+
tr:hover td:not(.psp-select-region):not(.psp-select-region-inactive),
|
|
21
25
|
tr:hover:after {
|
|
22
26
|
border-color: var(
|
|
23
27
|
--psp-datagrid--hover--border-color,
|
|
@@ -36,7 +40,9 @@ regular-table {
|
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
tr:last-child:hover
|
|
39
|
-
td:not(.psp-
|
|
43
|
+
td:not(.psp-select-region):not(
|
|
44
|
+
.psp-select-region-inactive
|
|
45
|
+
).psp-menu-open {
|
|
40
46
|
box-shadow:
|
|
41
47
|
inset -2px 0px 0px var(--psp--color),
|
|
42
48
|
inset 2px 0px 0px var(--psp--color),
|
|
@@ -46,11 +52,17 @@ regular-table {
|
|
|
46
52
|
|
|
47
53
|
tr:hover
|
|
48
54
|
+ tr
|
|
49
|
-
th.psp-tree-leaf:not(.psp-
|
|
55
|
+
th.psp-tree-leaf:not(.psp-select-region):not(
|
|
56
|
+
.psp-select-region-inactive
|
|
57
|
+
),
|
|
50
58
|
tr:hover
|
|
51
59
|
+ tr
|
|
52
|
-
th.psp-tree-label:not(.psp-
|
|
53
|
-
|
|
60
|
+
th.psp-tree-label:not(.psp-select-region):not(
|
|
61
|
+
.psp-select-region-inactive
|
|
62
|
+
),
|
|
63
|
+
tr:hover
|
|
64
|
+
+ tr
|
|
65
|
+
td:not(.psp-select-region):not(.psp-select-region-inactive) {
|
|
54
66
|
border-top-color: transparent;
|
|
55
67
|
}
|
|
56
68
|
|
|
@@ -72,6 +84,7 @@ regular-table {
|
|
|
72
84
|
|
|
73
85
|
tr:hover {
|
|
74
86
|
color: inherit;
|
|
87
|
+
|
|
75
88
|
th:first-child:not(:empty),
|
|
76
89
|
th:first-child:empty + th:not(:empty),
|
|
77
90
|
th:first-child:empty ~ th:empty + th:not(:empty),
|
package/src/css/toolbar.css
CHANGED
|
@@ -94,6 +94,10 @@
|
|
|
94
94
|
-webkit-mask-image: var(--psp-toolbar-edit-mode-select-region--content);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
#edit_mode[data-edit-mode="SELECT_ROW_TREE"]:before {
|
|
98
|
+
-webkit-mask-image: var(--psp-toolbar-edit-mode-select-row-tree--content);
|
|
99
|
+
}
|
|
100
|
+
|
|
97
101
|
/* #edit_mode span:before { */
|
|
98
102
|
/* content: var(--edit-mode-toggle--content, "N/A"); */
|
|
99
103
|
/* } */
|
|
@@ -124,6 +128,13 @@
|
|
|
124
128
|
);
|
|
125
129
|
}
|
|
126
130
|
|
|
131
|
+
#edit_mode[data-edit-mode="SELECT_ROW_TREE"] span:before {
|
|
132
|
+
content: var(
|
|
133
|
+
--psp-label--edit-mode-select-row-tree--content,
|
|
134
|
+
"Tree Select"
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
127
138
|
#scroll_lock span:before {
|
|
128
139
|
content: var(--psp-label--scroll-lock-toggle--content, "Free Scroll");
|
|
129
140
|
}
|