@keenmate/web-grid 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -2
- package/ai/basic-setup.txt +1 -0
- package/ai/callbacks-events.txt +2 -1
- package/ai/columns.txt +1 -1
- package/ai/editing.txt +21 -0
- package/ai/public-methods.txt +6 -0
- package/ai/selection.txt +4 -2
- package/ai/styling-theming.txt +3 -0
- package/ai/toolbar-actions.txt +2 -0
- package/ai/typescript-types.txt +1 -1
- package/dist/grid.d.ts +11 -0
- package/dist/logger.d.ts +54 -0
- package/dist/modules/actions/adapter.d.ts +4 -0
- package/dist/types.d.ts +1 -0
- package/dist/web-component.d.ts +6 -0
- package/dist/web-grid.js +1789 -1453
- package/dist/web-grid.umd.js +72 -72
- package/package.json +1 -1
- package/src/css/_cell-selection.css +4 -4
- package/src/css/_cells.css +1 -1
- package/src/css/_dark-mode.css +5 -0
- package/src/css/_dirty-indicator.css +37 -0
- package/src/css/_fill-handle.css +2 -2
- package/src/css/_freeze.css +4 -3
- package/src/css/_header.css +1 -1
- package/src/css/_reorder.css +2 -2
- package/src/css/_resize.css +1 -1
- package/src/css/_shortcuts.css +1 -1
- package/src/css/_table.css +2 -2
- package/src/css/_variables.css +25 -3
- package/src/css/main.css +9 -8
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
.wg__cell--in-range {
|
|
8
8
|
background: var(--wg-cell-selection-bg) !important;
|
|
9
9
|
position: relative;
|
|
10
|
-
z-index:
|
|
10
|
+
z-index: var(--wg-z-cell-highlight);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/* Don't highlight when cell is editing */
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
|
|
28
28
|
/* Range border - thick blue border around entire range
|
|
29
29
|
Shown during drag AND after selection completes.
|
|
30
|
-
z-index must be below frozen cells
|
|
30
|
+
z-index must be below frozen cells so the border
|
|
31
31
|
scrolls behind frozen columns instead of bleeding over them. */
|
|
32
32
|
.wg__cell-range-border {
|
|
33
33
|
position: absolute;
|
|
34
34
|
border: var(--wg-cell-selection-border-width) solid var(--wg-cell-selection-border);
|
|
35
35
|
pointer-events: none;
|
|
36
|
-
z-index:
|
|
36
|
+
z-index: var(--wg-z-selection-border);
|
|
37
37
|
box-sizing: border-box;
|
|
38
38
|
border-radius: 1px;
|
|
39
39
|
}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
position: absolute;
|
|
70
70
|
border: var(--wg-selection-border-width) solid var(--wg-selection-border-color);
|
|
71
71
|
pointer-events: none;
|
|
72
|
-
z-index:
|
|
72
|
+
z-index: var(--wg-z-selection-border);
|
|
73
73
|
box-sizing: border-box;
|
|
74
74
|
border-radius: 1px;
|
|
75
75
|
}
|
package/src/css/_cells.css
CHANGED
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
background: var(--wg-surface-1);
|
|
77
77
|
outline: 2px solid var(--wg-accent-color);
|
|
78
78
|
outline-offset: -2px;
|
|
79
|
-
z-index:
|
|
79
|
+
z-index: var(--wg-z-cell-highlight); /* Paint above neighboring cells so outline isn't hidden */
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/* Hide the dashed hover border when editing */
|
package/src/css/_dark-mode.css
CHANGED
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
--wg-active-bg: #4a4a4a;
|
|
33
33
|
--wg-danger-bg-light: #442726;
|
|
34
34
|
--wg-danger-color: #f87c86;
|
|
35
|
+
--wg-dirty-indicator-color: #ffa940;
|
|
36
|
+
--wg-dirty-cell-bg: rgba(255, 169, 64, 0.12);
|
|
37
|
+
--wg-dirty-row-number-border-color: #ffa940;
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
|
|
@@ -56,6 +59,8 @@
|
|
|
56
59
|
--wg-active-bg: #4a4a4a;
|
|
57
60
|
--wg-danger-bg-light: #442726;
|
|
58
61
|
--wg-danger-color: #f87c86;
|
|
62
|
+
--wg-dirty-indicator-color: #ffa940;
|
|
63
|
+
--wg-dirty-row-number-border-color: #ffa940;
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
/* ==============================================================================
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* ==============================================================================
|
|
2
|
+
DIRTY INDICATOR (Unsaved Changes)
|
|
3
|
+
==============================================================================
|
|
4
|
+
Shows a small triangle in the top-left corner of cells that have been edited
|
|
5
|
+
but not yet saved/committed to the original data.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* Dirty cell - subtle background tint */
|
|
9
|
+
.wg__cell--dirty {
|
|
10
|
+
background: var(--wg-dirty-cell-bg) !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Dirty cell - small corner triangle via ::before */
|
|
14
|
+
.wg__cell--dirty::before {
|
|
15
|
+
content: "";
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
width: 0;
|
|
20
|
+
height: 0;
|
|
21
|
+
border-style: solid;
|
|
22
|
+
border-width: var(--wg-dirty-indicator-size) var(--wg-dirty-indicator-size) 0 0;
|
|
23
|
+
border-color: var(--wg-dirty-indicator-color) transparent transparent transparent;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Don't show dirty indicator when cell is being actively edited */
|
|
28
|
+
.wg__cell--dirty.wg__cell--editing::before {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Row number dirty indicator - left border accent */
|
|
33
|
+
.wg__row-number--dirty {
|
|
34
|
+
box-shadow:
|
|
35
|
+
inset 3px 0 0 var(--wg-dirty-row-number-border-color),
|
|
36
|
+
inset calc(-1 * var(--wg-cell-splitter-width)) 0 0 var(--wg-cell-splitter-color);
|
|
37
|
+
}
|
package/src/css/_fill-handle.css
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
background: var(--wg-fill-handle-bg);
|
|
13
13
|
border: var(--wg-fill-handle-border-width) solid var(--wg-fill-handle-border-color);
|
|
14
14
|
cursor: crosshair;
|
|
15
|
-
z-index:
|
|
15
|
+
z-index: var(--wg-z-fill-handle);
|
|
16
16
|
pointer-events: auto;
|
|
17
17
|
box-sizing: border-box;
|
|
18
18
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
background: var(--wg-fill-range-bg);
|
|
29
29
|
border: 1px dashed var(--wg-fill-range-border-color);
|
|
30
30
|
pointer-events: none;
|
|
31
|
-
z-index:
|
|
31
|
+
z-index: var(--wg-z-fill-handle-area);
|
|
32
32
|
box-sizing: border-box;
|
|
33
33
|
}
|
|
34
34
|
|
package/src/css/_freeze.css
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
.wg__header--frozen {
|
|
12
12
|
background: var(--wg-frozen-header-bg, var(--wg-header-bg));
|
|
13
|
+
z-index: var(--wg-z-frozen-header) !important;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
/* Selected frozen header (column selection) */
|
|
@@ -19,9 +20,9 @@
|
|
|
19
20
|
color: var(--wg-selection-row-number-color);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
/* Corner cell (row number header when sticky) - highest z-index */
|
|
23
|
+
/* Corner cell (row number header when sticky) - highest table z-index */
|
|
23
24
|
.wg__row-number-header.wg__header--frozen {
|
|
24
|
-
z-index:
|
|
25
|
+
z-index: var(--wg-z-frozen-header) !important;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
/* ==========================================================================
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
/* Row number cells when sticky */
|
|
41
42
|
.wg__row-number.wg__cell--frozen {
|
|
42
43
|
background: var(--wg-header-bg);
|
|
43
|
-
z-index:
|
|
44
|
+
z-index: var(--wg-z-frozen) !important;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
/* ==========================================================================
|
package/src/css/_header.css
CHANGED
package/src/css/_reorder.css
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
/* Ghost element that follows cursor - fixed to viewport for simplicity */
|
|
16
16
|
.wg__reorder-ghost {
|
|
17
17
|
position: fixed;
|
|
18
|
-
z-index:
|
|
18
|
+
z-index: var(--wg-z-reorder-ghost);
|
|
19
19
|
background: var(--wg-header-bg);
|
|
20
20
|
border: 2px solid var(--wg-accent-color);
|
|
21
21
|
border-radius: var(--wg-border-radius-sm);
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
position: absolute;
|
|
35
35
|
width: 3px;
|
|
36
36
|
background: var(--wg-accent-color);
|
|
37
|
-
z-index:
|
|
37
|
+
z-index: var(--wg-z-reorder-indicator);
|
|
38
38
|
pointer-events: none;
|
|
39
39
|
display: none;
|
|
40
40
|
}
|
package/src/css/_resize.css
CHANGED
package/src/css/_shortcuts.css
CHANGED
package/src/css/_table.css
CHANGED
|
@@ -59,7 +59,7 @@ web-grid:not(:defined) {
|
|
|
59
59
|
.wg--table-border-only .wg__table-container .wg__header {
|
|
60
60
|
position: sticky;
|
|
61
61
|
top: 0;
|
|
62
|
-
z-index:
|
|
62
|
+
z-index: var(--wg-z-header);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/* ==============================================================================
|
|
@@ -88,7 +88,7 @@ web-grid:not(:defined) {
|
|
|
88
88
|
th.wg__filler {
|
|
89
89
|
position: sticky;
|
|
90
90
|
top: 0;
|
|
91
|
-
z-index:
|
|
91
|
+
z-index: var(--wg-z-header);
|
|
92
92
|
background: var(--wg-header-bg);
|
|
93
93
|
/* Use box-shadow for bottom border - real borders disappear with border-collapse when content scrolls underneath */
|
|
94
94
|
box-shadow: inset 0 -2px 0 var(--wg-border-color) !important;
|
package/src/css/_variables.css
CHANGED
|
@@ -209,6 +209,14 @@
|
|
|
209
209
|
--wg-error-message-font-size: var(--wg-font-size-xs);
|
|
210
210
|
--wg-error-indicator-color: var(--wg-danger-color);
|
|
211
211
|
|
|
212
|
+
/* ==========================================================================
|
|
213
|
+
DIRTY INDICATOR (unsaved changes)
|
|
214
|
+
========================================================================== */
|
|
215
|
+
--wg-dirty-indicator-color: #ed8b00;
|
|
216
|
+
--wg-dirty-indicator-size: 6px;
|
|
217
|
+
--wg-dirty-cell-bg: rgba(237, 139, 0, 0.08);
|
|
218
|
+
--wg-dirty-row-number-border-color: #ed8b00;
|
|
219
|
+
|
|
212
220
|
/* ==========================================================================
|
|
213
221
|
EDITOR
|
|
214
222
|
========================================================================== */
|
|
@@ -273,7 +281,7 @@
|
|
|
273
281
|
/* ==========================================================================
|
|
274
282
|
CONTEXT MENU
|
|
275
283
|
========================================================================== */
|
|
276
|
-
--wg-context-menu-z-index:
|
|
284
|
+
--wg-context-menu-z-index: var(--wg-z-context-menu);
|
|
277
285
|
--wg-context-menu-min-width: calc(16 * var(--wg-rem));
|
|
278
286
|
|
|
279
287
|
/* ==========================================================================
|
|
@@ -293,10 +301,24 @@
|
|
|
293
301
|
|
|
294
302
|
/* ==========================================================================
|
|
295
303
|
Z-INDEX LAYERS
|
|
296
|
-
|
|
297
|
-
|
|
304
|
+
Table-internal stacking (within scroll container):
|
|
305
|
+
========================================================================== */
|
|
306
|
+
--wg-z-cell-highlight: 1; /* Cell in-range / selection highlight */
|
|
307
|
+
--wg-z-selection-border: 1; /* Range, row, column selection borders */
|
|
308
|
+
--wg-z-frozen: 2; /* Frozen columns (sticky) */
|
|
309
|
+
--wg-z-header: 3; /* Sticky header row */
|
|
310
|
+
--wg-z-frozen-header: 4; /* Frozen header corner cell (sticky both ways) */
|
|
311
|
+
--wg-z-fill-handle: 5; /* Fill handle dot */
|
|
312
|
+
--wg-z-fill-handle-area: 4; /* Fill handle drag area */
|
|
313
|
+
--wg-z-resize-handle: 6; /* Column resize handle */
|
|
314
|
+
--wg-z-shortcuts-help: 10; /* Keyboard shortcuts overlay */
|
|
315
|
+
|
|
316
|
+
/* Popover layers (above grid content): */
|
|
317
|
+
--wg-z-reorder-indicator: 100; /* Column reorder drop indicator */
|
|
298
318
|
--wg-z-toolbar: 1000;
|
|
299
319
|
--wg-z-context-menu: 1001;
|
|
320
|
+
--wg-z-dropdown: 9999;
|
|
321
|
+
--wg-z-reorder-ghost: 10000; /* Column reorder drag ghost */
|
|
300
322
|
--wg-z-tooltip: 10000;
|
|
301
323
|
|
|
302
324
|
/* ==========================================================================
|
package/src/css/main.css
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
- _header.css : Header, sort indicators, filter row
|
|
10
10
|
- _resize.css : Column resize handles
|
|
11
11
|
- _reorder.css : Column reorder drag-and-drop
|
|
12
|
-
- _fill-handle.css : Fill handle (Excel-like autofill)
|
|
13
|
-
- _selection.css : Row selection via row numbers
|
|
14
|
-
- _cell-selection.css : Cell range selection (Excel-like)
|
|
15
|
-
- _freeze.css : Freeze panes (sticky columns)
|
|
12
|
+
- _fill-handle.css : Fill handle (Excel-like autofill)
|
|
13
|
+
- _selection.css : Row selection via row numbers
|
|
14
|
+
- _cell-selection.css : Cell range selection (Excel-like)
|
|
15
|
+
- _freeze.css : Freeze panes (sticky columns)
|
|
16
16
|
- _cells.css : Cells, editable states, editing, validation
|
|
17
17
|
- _editors.css : All editor types (text, number, date, combobox, etc)
|
|
18
18
|
- _dropdown.css : Dropdown menus, select triggers
|
|
@@ -32,12 +32,13 @@
|
|
|
32
32
|
@import '_header.css';
|
|
33
33
|
@import '_resize.css';
|
|
34
34
|
@import '_reorder.css';
|
|
35
|
-
@import '_fill-handle.css';
|
|
36
|
-
@import '_selection.css';
|
|
37
|
-
@import '_cell-selection.css';
|
|
38
|
-
@import '_freeze.css';
|
|
35
|
+
@import '_fill-handle.css';
|
|
36
|
+
@import '_selection.css';
|
|
37
|
+
@import '_cell-selection.css';
|
|
38
|
+
@import '_freeze.css';
|
|
39
39
|
@import '_cells.css';
|
|
40
40
|
@import '_row-locking.css';
|
|
41
|
+
@import '_dirty-indicator.css';
|
|
41
42
|
@import '_editors.css';
|
|
42
43
|
@import '_dropdown.css';
|
|
43
44
|
@import '_navigation.css';
|