@macrostrat/data-sheet 4.0.0-dev3 → 4.0.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/CHANGELOG.md +56 -0
- package/README.md +44 -0
- package/dist/actions/builtin.cjs +36 -5
- package/dist/actions/builtin.cjs.map +1 -1
- package/dist/actions/builtin.d.ts +3 -2
- package/dist/actions/builtin.js +36 -5
- package/dist/actions/builtin.js.map +1 -1
- package/dist/actions/column-controls.cjs +149 -0
- package/dist/actions/column-controls.cjs.map +1 -0
- package/dist/actions/column-controls.d.ts +11 -0
- package/dist/actions/column-controls.js +147 -0
- package/dist/actions/column-controls.js.map +1 -0
- package/dist/actions/column-filter.cjs +68 -0
- package/dist/actions/column-filter.cjs.map +1 -0
- package/dist/actions/column-filter.d.ts +11 -0
- package/dist/actions/column-filter.js +66 -0
- package/dist/actions/column-filter.js.map +1 -0
- package/dist/actions/edit-actions.cjs +42 -0
- package/dist/actions/edit-actions.cjs.map +1 -0
- package/dist/actions/edit-actions.d.ts +14 -0
- package/dist/actions/edit-actions.js +42 -0
- package/dist/actions/edit-actions.js.map +1 -0
- package/dist/actions/filters.cjs +39 -23
- package/dist/actions/filters.cjs.map +1 -1
- package/dist/actions/filters.d.ts +6 -3
- package/dist/actions/filters.js +41 -25
- package/dist/actions/filters.js.map +1 -1
- package/dist/actions/index.d.ts +4 -0
- package/dist/actions/selection.cjs +51 -32
- package/dist/actions/selection.cjs.map +1 -1
- package/dist/actions/selection.d.ts +3 -7
- package/dist/actions/selection.js +51 -32
- package/dist/actions/selection.js.map +1 -1
- package/dist/actions/table-controls.cjs +41 -0
- package/dist/actions/table-controls.cjs.map +1 -0
- package/dist/actions/table-controls.d.ts +4 -0
- package/dist/actions/table-controls.js +39 -0
- package/dist/actions/table-controls.js.map +1 -0
- package/dist/actions/toolbar.cjs +69 -10
- package/dist/actions/toolbar.cjs.map +1 -1
- package/dist/actions/toolbar.d.ts +9 -6
- package/dist/actions/toolbar.js +69 -10
- package/dist/actions/toolbar.js.map +1 -1
- package/dist/actions/toolbar.module.sass.cjs +12 -7
- package/dist/actions/toolbar.module.sass.cjs.map +1 -1
- package/dist/actions/toolbar.module.sass.js +12 -7
- package/dist/actions/toolbar.module.sass.js.map +1 -1
- package/dist/actions/types.d.ts +49 -4
- package/dist/cell-renderer.cjs +150 -14
- package/dist/cell-renderer.cjs.map +1 -1
- package/dist/cell-renderer.d.ts +1 -1
- package/dist/cell-renderer.js +151 -15
- package/dist/cell-renderer.js.map +1 -1
- package/dist/components/cell-detail.cjs +24 -0
- package/dist/components/cell-detail.cjs.map +1 -0
- package/dist/components/cell-detail.d.ts +12 -0
- package/dist/components/cell-detail.js +24 -0
- package/dist/components/cell-detail.js.map +1 -0
- package/dist/components/editor-popup.cjs +28 -24
- package/dist/components/editor-popup.cjs.map +1 -1
- package/dist/components/editor-popup.js +29 -25
- package/dist/components/editor-popup.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/text-areas.cjs +51 -7
- package/dist/components/text-areas.cjs.map +1 -1
- package/dist/components/text-areas.d.ts +4 -1
- package/dist/components/text-areas.js +51 -7
- package/dist/components/text-areas.js.map +1 -1
- package/dist/components/view-info.cjs +46 -9
- package/dist/components/view-info.cjs.map +1 -1
- package/dist/components/view-info.d.ts +5 -1
- package/dist/components/view-info.js +47 -10
- package/dist/components/view-info.js.map +1 -1
- package/dist/core.cjs +167 -73
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.ts +53 -6
- package/dist/core.js +169 -75
- package/dist/core.js.map +1 -1
- package/dist/data-sheet.css +72 -123
- package/dist/filters/operators.cjs +91 -0
- package/dist/filters/operators.cjs.map +1 -0
- package/dist/filters/operators.d.ts +17 -0
- package/dist/filters/operators.js +91 -0
- package/dist/filters/operators.js.map +1 -0
- package/dist/index.cjs +38 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +44 -16
- package/dist/index.js.map +1 -1
- package/dist/main.module.sass.cjs +13 -12
- package/dist/main.module.sass.cjs.map +1 -1
- package/dist/main.module.sass.js +13 -12
- package/dist/main.module.sass.js.map +1 -1
- package/dist/postgrest-table/data-loaders.cjs +255 -146
- package/dist/postgrest-table/data-loaders.cjs.map +1 -1
- package/dist/postgrest-table/data-loaders.d.ts +144 -46
- package/dist/postgrest-table/data-loaders.js +259 -150
- package/dist/postgrest-table/data-loaders.js.map +1 -1
- package/dist/postgrest-table/index.cjs +58 -169
- package/dist/postgrest-table/index.cjs.map +1 -1
- package/dist/postgrest-table/index.d.ts +5 -2
- package/dist/postgrest-table/index.js +63 -174
- package/dist/postgrest-table/index.js.map +1 -1
- package/dist/postgrest-table/loading-utils.cjs +0 -4
- package/dist/postgrest-table/loading-utils.cjs.map +1 -1
- package/dist/postgrest-table/loading-utils.js +1 -5
- package/dist/postgrest-table/loading-utils.js.map +1 -1
- package/dist/postgrest-table/main.module.sass.cjs +14 -13
- package/dist/postgrest-table/main.module.sass.cjs.map +1 -1
- package/dist/postgrest-table/main.module.sass.js +14 -13
- package/dist/postgrest-table/main.module.sass.js.map +1 -1
- package/dist/provider.cjs +68 -11
- package/dist/provider.cjs.map +1 -1
- package/dist/provider.d.ts +25 -0
- package/dist/provider.js +68 -11
- package/dist/provider.js.map +1 -1
- package/dist/renderers/column-header-cell.cjs +95 -75
- package/dist/renderers/column-header-cell.cjs.map +1 -1
- package/dist/renderers/column-header-cell.d.ts +3 -18
- package/dist/renderers/column-header-cell.js +98 -78
- package/dist/renderers/column-header-cell.js.map +1 -1
- package/dist/renderers/index.d.ts +0 -1
- package/dist/types.cjs +2 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.ts +84 -1
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/column-spec.cjs.map +1 -1
- package/dist/utils/column-spec.d.ts +101 -1
- package/dist/utils/column-spec.js.map +1 -1
- package/dist/utils/debug-overlay.cjs +24 -0
- package/dist/utils/debug-overlay.cjs.map +1 -0
- package/dist/utils/debug-overlay.d.ts +4 -0
- package/dist/utils/debug-overlay.js +24 -0
- package/dist/utils/debug-overlay.js.map +1 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/key-handling.cjs +52 -6
- package/dist/utils/key-handling.cjs.map +1 -1
- package/dist/utils/key-handling.js +52 -6
- package/dist/utils/key-handling.js.map +1 -1
- package/dist/utils/validation.cjs +41 -0
- package/dist/utils/validation.cjs.map +1 -0
- package/dist/utils/validation.d.ts +26 -0
- package/dist/utils/validation.js +41 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/zustand-store.cjs +119 -61
- package/dist/zustand-store.cjs.map +1 -1
- package/dist/zustand-store.js +121 -63
- package/dist/zustand-store.js.map +1 -1
- package/package.json +3 -3
- package/src/actions/builtin.ts +62 -7
- package/src/actions/column-controls.ts +185 -0
- package/src/actions/column-filter.ts +104 -0
- package/src/actions/edit-actions.ts +67 -0
- package/src/actions/filters.ts +54 -28
- package/src/actions/index.ts +4 -0
- package/src/actions/selection.ts +73 -54
- package/src/actions/table-controls.ts +46 -0
- package/src/actions/toolbar.module.sass +22 -2
- package/src/actions/toolbar.ts +113 -16
- package/src/actions/types.ts +49 -4
- package/src/cell-renderer.ts +211 -16
- package/src/components/cell-detail.ts +30 -0
- package/src/components/editor-popup.ts +39 -25
- package/src/components/index.ts +2 -2
- package/src/components/text-areas.ts +80 -16
- package/src/components/view-info.ts +63 -4
- package/src/core.ts +321 -103
- package/src/filters/operators.ts +127 -0
- package/src/index.ts +2 -0
- package/src/main.module.sass +6 -0
- package/src/postgrest-table/data-loaders.ts +459 -209
- package/src/postgrest-table/index.ts +81 -254
- package/src/postgrest-table/main.module.sass +11 -0
- package/src/provider.ts +109 -12
- package/src/renderers/column-header-cell.ts +60 -272
- package/src/renderers/index.ts +0 -1
- package/src/types.ts +76 -2
- package/src/utils/column-spec.ts +112 -1
- package/src/utils/debug-overlay.ts +22 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/key-handling.ts +70 -6
- package/src/utils/validation.ts +72 -0
- package/src/zustand-store.ts +167 -60
- package/dist/components/actions.cjs +0 -12
- package/dist/components/actions.cjs.map +0 -1
- package/dist/components/actions.d.ts +0 -2
- package/dist/components/actions.js +0 -12
- package/dist/components/actions.js.map +0 -1
- package/dist/components/actions.module.sass.cjs +0 -12
- package/dist/components/actions.module.sass.cjs.map +0 -1
- package/dist/components/actions.module.sass.js +0 -11
- package/dist/components/actions.module.sass.js.map +0 -1
- package/dist/postgrest-table/lazy-loader-table.cjs +0 -27
- package/dist/postgrest-table/lazy-loader-table.cjs.map +0 -1
- package/dist/postgrest-table/lazy-loader-table.d.ts +0 -3
- package/dist/postgrest-table/lazy-loader-table.js +0 -27
- package/dist/postgrest-table/lazy-loader-table.js.map +0 -1
- package/dist/renderers/column-header-cell-postgrest.cjs +0 -216
- package/dist/renderers/column-header-cell-postgrest.cjs.map +0 -1
- package/dist/renderers/column-header-cell-postgrest.d.ts +0 -13
- package/dist/renderers/column-header-cell-postgrest.js +0 -216
- package/dist/renderers/column-header-cell-postgrest.js.map +0 -1
- package/dist/renderers/column-header-cell-postgrest.module.sass.cjs +0 -23
- package/dist/renderers/column-header-cell-postgrest.module.sass.cjs.map +0 -1
- package/dist/renderers/column-header-cell-postgrest.module.sass.js +0 -22
- package/dist/renderers/column-header-cell-postgrest.module.sass.js.map +0 -1
- package/src/components/actions.ts +0 -9
- package/src/postgrest-table/lazy-loader-table.ts +0 -25
- package/src/renderers/column-header-cell-postgrest.ts +0 -282
|
@@ -95,13 +95,36 @@ export const tableHotkeysAtom = atom<HotkeyConfig[]>((get) => {
|
|
|
95
95
|
})
|
|
96
96
|
.filter(Boolean) as HotkeyConfig[];
|
|
97
97
|
|
|
98
|
+
// Backspace/Delete: on a whole-row selection, delete the row(s); otherwise
|
|
99
|
+
// clear the selected cells.
|
|
100
|
+
const clearOrDeleteSelection = keyHandler((e, state) => {
|
|
101
|
+
const sel = state.selection ?? [];
|
|
102
|
+
const isRowSelection =
|
|
103
|
+
sel.length > 0 && sel.every((r) => r.cols == null && r.rows != null);
|
|
104
|
+
if (isRowSelection) {
|
|
105
|
+
state.deleteSelectedRows();
|
|
106
|
+
} else {
|
|
107
|
+
state.clearSelection();
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
98
111
|
return [
|
|
99
112
|
{
|
|
100
113
|
combo: "esc",
|
|
101
|
-
label: "
|
|
114
|
+
label: "Exit editing / clear selection",
|
|
102
115
|
group: "Selection",
|
|
103
116
|
allowInInput: true,
|
|
104
117
|
onKeyDown: keyHandler((e, state) => {
|
|
118
|
+
// First Escape closes the focused cell's open surface (editor/panel)
|
|
119
|
+
// while keeping the selection, so arrow keys keep working — in both
|
|
120
|
+
// auto and manual modes. A second Escape (nothing open) clears the
|
|
121
|
+
// selection.
|
|
122
|
+
if (state.cellSurfaceOpen) {
|
|
123
|
+
state.closeCellSurface();
|
|
124
|
+
e.preventDefault();
|
|
125
|
+
e.stopPropagation();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
105
128
|
if (state.selection.length == 0) {
|
|
106
129
|
// Focus goes back to parent
|
|
107
130
|
return;
|
|
@@ -113,13 +136,19 @@ export const tableHotkeysAtom = atom<HotkeyConfig[]>((get) => {
|
|
|
113
136
|
},
|
|
114
137
|
{
|
|
115
138
|
combo: "backspace",
|
|
116
|
-
label: "Clear
|
|
139
|
+
label: "Clear cells / delete rows",
|
|
117
140
|
group: "Selection",
|
|
118
141
|
allowInInput: true,
|
|
119
142
|
disabled: !editable,
|
|
120
|
-
onKeyDown:
|
|
121
|
-
|
|
122
|
-
|
|
143
|
+
onKeyDown: clearOrDeleteSelection,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
combo: "del",
|
|
147
|
+
label: "Clear cells / delete rows",
|
|
148
|
+
group: "Selection",
|
|
149
|
+
allowInInput: true,
|
|
150
|
+
disabled: !editable,
|
|
151
|
+
onKeyDown: clearOrDeleteSelection,
|
|
123
152
|
},
|
|
124
153
|
{
|
|
125
154
|
combo: "tab",
|
|
@@ -132,13 +161,35 @@ export const tableHotkeysAtom = atom<HotkeyConfig[]>((get) => {
|
|
|
132
161
|
},
|
|
133
162
|
{
|
|
134
163
|
combo: "enter",
|
|
135
|
-
label: "
|
|
164
|
+
label: "Edit cell / move focus down",
|
|
136
165
|
group: "Navigation",
|
|
137
166
|
allowInInput: true,
|
|
138
167
|
onKeyDown: keyHandler((e, state) => {
|
|
168
|
+
// In navigation mode (no surface open), Enter enters edit mode —
|
|
169
|
+
// opening and focusing the focused cell's surface (Google Sheets
|
|
170
|
+
// style). While a surface is open, Enter advances downward as usual
|
|
171
|
+
// (an inline editor blurs and this moves to the next row).
|
|
172
|
+
if (!state.cellSurfaceOpen) {
|
|
173
|
+
state.armAutoActivate();
|
|
174
|
+
state.openCellSurface();
|
|
175
|
+
e.preventDefault();
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
139
178
|
state.moveFocusedCell("down");
|
|
140
179
|
}),
|
|
141
180
|
},
|
|
181
|
+
{
|
|
182
|
+
combo: "f2",
|
|
183
|
+
label: "Edit / open cell",
|
|
184
|
+
group: "Editing",
|
|
185
|
+
onKeyDown: keyHandler((e, state) => {
|
|
186
|
+
// Enter edit mode from the keyboard: re-arm auto-activation and open
|
|
187
|
+
// the focused cell's surface (which focuses the editor).
|
|
188
|
+
state.armAutoActivate();
|
|
189
|
+
state.openCellSurface();
|
|
190
|
+
e.preventDefault();
|
|
191
|
+
}),
|
|
192
|
+
},
|
|
142
193
|
...directionCombos,
|
|
143
194
|
...actionsCombos,
|
|
144
195
|
];
|
|
@@ -155,7 +206,20 @@ const isSingleCellSelectionAtom = atom((get) => {
|
|
|
155
206
|
});
|
|
156
207
|
|
|
157
208
|
export const editorKeyHandlerAtom = atom((get) => {
|
|
209
|
+
const store = get(storeAPIAtom);
|
|
158
210
|
return (e: KeyboardEvent) => {
|
|
211
|
+
if (e.key === "Escape") {
|
|
212
|
+
// Escape exits the inline editor: close the surface (which enters
|
|
213
|
+
// navigation mode in auto), keep the selection, and return focus to the
|
|
214
|
+
// table so arrow keys navigate. Stop propagation so the table's own
|
|
215
|
+
// Escape hotkey doesn't also fire.
|
|
216
|
+
const state = store?.getState();
|
|
217
|
+
state?.closeCellSurface();
|
|
218
|
+
state?.tableElement?.focus();
|
|
219
|
+
e.preventDefault();
|
|
220
|
+
e.stopPropagation();
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
159
223
|
const isSingleCellSelection = get(isSingleCellSelectionAtom);
|
|
160
224
|
editorKeyHandler(e, isSingleCellSelection);
|
|
161
225
|
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { CellValidation, ColumnSpec } from "./column-spec";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Validate a single cell against its column spec. Order: `required` (empty →
|
|
5
|
+
* error), then `validate`, then the deprecated `isValid` boolean. Returns
|
|
6
|
+
* `null` when valid.
|
|
7
|
+
*/
|
|
8
|
+
export function validateCell(
|
|
9
|
+
col: ColumnSpec,
|
|
10
|
+
value: any,
|
|
11
|
+
row: any,
|
|
12
|
+
rowIndex: number,
|
|
13
|
+
): CellValidation | null {
|
|
14
|
+
const isEmpty = value == null || value === "";
|
|
15
|
+
|
|
16
|
+
if (col.required && isEmpty) {
|
|
17
|
+
return { severity: "error", message: `${col.name} is required` };
|
|
18
|
+
}
|
|
19
|
+
if (col.validate != null) {
|
|
20
|
+
return col.validate(value, row, { rowIndex });
|
|
21
|
+
}
|
|
22
|
+
if (col.isValid != null && !col.isValid(value)) {
|
|
23
|
+
return { severity: "error", message: `Invalid ${col.name}` };
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** A validation error located to a specific cell. */
|
|
29
|
+
export interface CellValidationError {
|
|
30
|
+
rowIndex: number;
|
|
31
|
+
columnKey: string;
|
|
32
|
+
severity: "error";
|
|
33
|
+
message?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Collect all cell **errors** (not warnings) across the loaded rows, using the
|
|
38
|
+
* merged (base + edited) row values. Skips deleted rows. Used to block saving.
|
|
39
|
+
* Iterates loaded rows × validating columns — for very large tables, consider
|
|
40
|
+
* a memoized index; here it early-exits are the caller's (e.g. a length check).
|
|
41
|
+
*/
|
|
42
|
+
export function collectValidationErrors(s: {
|
|
43
|
+
data?: any[];
|
|
44
|
+
updatedData?: any[];
|
|
45
|
+
columnSpec?: ColumnSpec[];
|
|
46
|
+
rowStatus?: readonly string[];
|
|
47
|
+
}): CellValidationError[] {
|
|
48
|
+
const data = s.data ?? [];
|
|
49
|
+
const updatedData = s.updatedData ?? [];
|
|
50
|
+
const columnSpec = s.columnSpec ?? [];
|
|
51
|
+
const rowStatus = s.rowStatus ?? [];
|
|
52
|
+
|
|
53
|
+
// Only columns that actually validate need scanning.
|
|
54
|
+
const cols = columnSpec.filter(
|
|
55
|
+
(c) => c.required || c.validate != null || c.isValid != null,
|
|
56
|
+
);
|
|
57
|
+
if (cols.length === 0) return [];
|
|
58
|
+
|
|
59
|
+
const errors: CellValidationError[] = [];
|
|
60
|
+
const n = Math.max(data.length, updatedData.length);
|
|
61
|
+
for (let i = 0; i < n; i++) {
|
|
62
|
+
if (rowStatus[i] === "deleted") continue;
|
|
63
|
+
const row = { ...data[i], ...updatedData[i] };
|
|
64
|
+
for (const col of cols) {
|
|
65
|
+
const v = validateCell(col, row[col.key], row, i);
|
|
66
|
+
if (v?.severity === "error") {
|
|
67
|
+
errors.push({ rowIndex: i, columnKey: col.key, severity: "error", message: v.message });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return errors;
|
|
72
|
+
}
|
package/src/zustand-store.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
DataSheetState,
|
|
3
3
|
DataSheetStore,
|
|
4
4
|
DataSheetStoreMain,
|
|
5
|
+
DS_ROW_ID,
|
|
5
6
|
StateUpdater,
|
|
6
7
|
TableElementStatus,
|
|
7
8
|
VisibleCells,
|
|
@@ -17,10 +18,11 @@ import {
|
|
|
17
18
|
getSelectedColumnKeys,
|
|
18
19
|
getSelectedRowIndices,
|
|
19
20
|
getSelectionCardinality,
|
|
20
|
-
computeFilteredRowIndices,
|
|
21
|
-
computeTransformedRowIndices,
|
|
22
21
|
} from "./actions";
|
|
23
22
|
|
|
23
|
+
/** Monotonic counter for synthetic ids on in-table-added rows. */
|
|
24
|
+
let _addedRowCounter = 0;
|
|
25
|
+
|
|
24
26
|
export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
25
27
|
return {
|
|
26
28
|
/** All the data in the table */
|
|
@@ -42,10 +44,40 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
42
44
|
columnSorts: [],
|
|
43
45
|
clipboardProxy: null,
|
|
44
46
|
filteredRowIndices: null,
|
|
47
|
+
cellInteraction: "auto",
|
|
48
|
+
autoActivateArmed: true,
|
|
49
|
+
lastNavDirection: null,
|
|
50
|
+
tableElement: null,
|
|
51
|
+
cellSurfaceOpen: false,
|
|
52
|
+
identity: (row: any) => row?.id,
|
|
53
|
+
pendingOverlayById: new Map(),
|
|
54
|
+
controlledOverlay: false,
|
|
55
|
+
canDeleteRows: true,
|
|
45
56
|
setSelection(selection: Region[]) {
|
|
46
57
|
set(updateSelection(selection));
|
|
47
58
|
},
|
|
48
59
|
columnWidthsIndex: new Map<string, number>(),
|
|
60
|
+
suppressAutoActivate() {
|
|
61
|
+
set({ autoActivateArmed: false });
|
|
62
|
+
},
|
|
63
|
+
armAutoActivate() {
|
|
64
|
+
set({ autoActivateArmed: true });
|
|
65
|
+
},
|
|
66
|
+
openCellSurface() {
|
|
67
|
+
set({ cellSurfaceOpen: true });
|
|
68
|
+
},
|
|
69
|
+
closeCellSurface(opts?: { suppress?: boolean }) {
|
|
70
|
+
const suppress = opts?.suppress ?? true;
|
|
71
|
+
set((state) => ({
|
|
72
|
+
cellSurfaceOpen: false,
|
|
73
|
+
// Escape (suppress) drops auto mode into navigation mode so surfaces
|
|
74
|
+
// stop auto-opening until the next click. A click-dismiss doesn't.
|
|
75
|
+
autoActivateArmed:
|
|
76
|
+
suppress && state.cellInteraction === "auto"
|
|
77
|
+
? false
|
|
78
|
+
: state.autoActivateArmed,
|
|
79
|
+
}));
|
|
80
|
+
},
|
|
49
81
|
moveFocusedCell(direction: "up" | "down" | "left" | "right") {
|
|
50
82
|
set((state) => {
|
|
51
83
|
const { topLeftCell } = state;
|
|
@@ -69,12 +101,21 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
69
101
|
break;
|
|
70
102
|
}
|
|
71
103
|
const region: Region = { cols: [col, col], rows: [row, row] };
|
|
72
|
-
|
|
104
|
+
// Record the travel direction (so the next editor places its cursor on
|
|
105
|
+
// the side we're moving toward) and open the new cell's surface only
|
|
106
|
+
// when auto-activation is armed.
|
|
107
|
+
return {
|
|
108
|
+
...updateSelection([region]),
|
|
109
|
+
lastNavDirection: direction,
|
|
110
|
+
cellSurfaceOpen:
|
|
111
|
+
state.cellInteraction === "auto" && state.autoActivateArmed,
|
|
112
|
+
};
|
|
73
113
|
});
|
|
74
114
|
},
|
|
75
115
|
addRow(row: Partial<T> = {} as T) {
|
|
76
116
|
/** Add a new row. If there is a selection, use the last row index to determine
|
|
77
117
|
* where to insert the new row. Otherwise, append to the end of the data. */
|
|
118
|
+
let newIndex = -1;
|
|
78
119
|
set((state) => {
|
|
79
120
|
const { updatedData, data, selection, rowStatus } = state;
|
|
80
121
|
|
|
@@ -83,11 +124,19 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
83
124
|
Math.max(data.length, updatedData.length) - 1;
|
|
84
125
|
// Use $set at a specific index to correctly extend the sparse array.
|
|
85
126
|
// $splice fails when the target index exceeds the array length.
|
|
86
|
-
|
|
127
|
+
newIndex = lastRowIndex + 1;
|
|
128
|
+
|
|
129
|
+
// Stamp a stable synthetic id so the added row survives a provider
|
|
130
|
+
// re-fetch (it has no provider row to match on). Its values live in the
|
|
131
|
+
// overlay (`updatedData`), which the loader-boundary remap re-appends.
|
|
132
|
+
const newRow = {
|
|
133
|
+
...(row as any),
|
|
134
|
+
[DS_ROW_ID]: `__added_${_addedRowCounter++}`,
|
|
135
|
+
} as T;
|
|
87
136
|
|
|
88
137
|
return {
|
|
89
|
-
|
|
90
|
-
data: insertItemAtIndex(data, newIndex,
|
|
138
|
+
updatedData: insertItemAtIndex(updatedData, newIndex, newRow),
|
|
139
|
+
data: insertItemAtIndex(data, newIndex, newRow),
|
|
91
140
|
rowStatus: insertItemAtIndex(
|
|
92
141
|
rowStatus,
|
|
93
142
|
newIndex,
|
|
@@ -95,6 +144,7 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
95
144
|
),
|
|
96
145
|
};
|
|
97
146
|
});
|
|
147
|
+
get().onEdit?.({ type: "addRow", rowIndex: newIndex, value: row });
|
|
98
148
|
},
|
|
99
149
|
setUpdatedData(data: StateUpdater<T>) {
|
|
100
150
|
if (Array.isArray(data)) {
|
|
@@ -106,10 +156,15 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
106
156
|
}
|
|
107
157
|
},
|
|
108
158
|
deleteSelectedRows() {
|
|
159
|
+
// Deletion is a provider capability: if the active data provider can't
|
|
160
|
+
// delete (no `deleteRows`), the whole affordance is disabled.
|
|
161
|
+
if (!get().canDeleteRows) return;
|
|
109
162
|
// Remove selected rows from the data and updatedData arrays
|
|
163
|
+
let deletedIndices: number[] = [];
|
|
110
164
|
set((state) => {
|
|
111
165
|
const { selection, deletedRows } = state;
|
|
112
166
|
const rowIndices = getRowIndices(selection);
|
|
167
|
+
deletedIndices = rowIndices;
|
|
113
168
|
|
|
114
169
|
// Delete rows from both updatedData and data
|
|
115
170
|
|
|
@@ -158,10 +213,14 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
158
213
|
fillValueBaseCell: null,
|
|
159
214
|
};
|
|
160
215
|
});
|
|
216
|
+
if (deletedIndices.length > 0) {
|
|
217
|
+
get().onEdit?.({ type: "deleteRows", rowIndices: deletedIndices });
|
|
218
|
+
}
|
|
161
219
|
},
|
|
162
220
|
resetChanges(regions?: Region[]) {
|
|
163
221
|
// Reset the updated data to the initial data
|
|
164
222
|
set((state) => resetChangesForSelection(state, regions));
|
|
223
|
+
get().onEdit?.({ type: "resetChanges" });
|
|
165
224
|
},
|
|
166
225
|
onColumnWidthChanged(columnIx: number, newWidth: number) {
|
|
167
226
|
set((state) => {
|
|
@@ -184,27 +243,45 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
184
243
|
if (!editable) return {};
|
|
185
244
|
let rowSpec: any;
|
|
186
245
|
|
|
187
|
-
// Check to see if the new value is
|
|
188
|
-
|
|
246
|
+
// Check to see if the new value is meaningfully different from the old
|
|
247
|
+
// one. Empty string and null/undefined are treated as equivalent, so
|
|
248
|
+
// focusing (and blurring) an empty cell doesn't record a phantom edit.
|
|
249
|
+
const oldValue = data[rowIndex]?.[columnName];
|
|
250
|
+
if (!valuesAreEquivalent(value, oldValue)) {
|
|
189
251
|
const rowOp = updatedData[rowIndex] != null ? "$merge" : "$set";
|
|
190
252
|
rowSpec = { [rowOp]: { [columnName]: value } };
|
|
191
|
-
} else {
|
|
253
|
+
} else if (updatedData[rowIndex] != null) {
|
|
254
|
+
// No change — drop any prior override for this cell.
|
|
192
255
|
rowSpec = { $unset: [columnName] };
|
|
256
|
+
} else {
|
|
257
|
+
// No change and no prior override: nothing to do. (`$unset` on an
|
|
258
|
+
// absent row would throw in immutability-helper.)
|
|
259
|
+
return {};
|
|
193
260
|
}
|
|
194
261
|
const spec: Spec<T[]> = { [rowIndex]: rowSpec };
|
|
195
262
|
return { updatedData: update(updatedData, spec) };
|
|
196
263
|
});
|
|
264
|
+
if (get().editable) {
|
|
265
|
+
get().onEdit?.({
|
|
266
|
+
type: "setCells",
|
|
267
|
+
cells: [{ rowIndex, column: columnName, value }],
|
|
268
|
+
});
|
|
269
|
+
}
|
|
197
270
|
},
|
|
198
271
|
clearSelection() {
|
|
272
|
+
const edits: { rowIndex: number; column: string; value: any }[] = [];
|
|
199
273
|
set((state) => {
|
|
200
274
|
// Delete all selected cells
|
|
201
275
|
const { selection, updatedData, columnSpec, data } = state;
|
|
276
|
+
const numVisible = visibleRowCount(state);
|
|
202
277
|
let spec = {};
|
|
203
278
|
for (const region of selection) {
|
|
204
279
|
const { cols, rows } = region;
|
|
205
|
-
const rowRange = range(rows ?? [0,
|
|
280
|
+
const rowRange = range(rows ?? [0, numVisible - 1]);
|
|
206
281
|
const colRange = range(cols ?? [0, columnSpec.length - 1]);
|
|
207
|
-
for (const
|
|
282
|
+
for (const visibleRow of rowRange) {
|
|
283
|
+
// Selection indices are visible positions; map to the data row.
|
|
284
|
+
const row = toDataRowIndex(state, visibleRow);
|
|
208
285
|
// Don't clear row if it has been deleted
|
|
209
286
|
const rowIsDeleted =
|
|
210
287
|
state.rowStatus[row] === TableElementStatus.DELETED;
|
|
@@ -215,6 +292,7 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
215
292
|
const currentValue = updatedData[row]?.[key] ?? data[row]?.[key];
|
|
216
293
|
if (currentValue != null && currentValue !== "") {
|
|
217
294
|
vals[key] = "";
|
|
295
|
+
edits.push({ rowIndex: row, column: key, value: "" });
|
|
218
296
|
}
|
|
219
297
|
}
|
|
220
298
|
let op = updatedData[row] == null ? "$set" : "$merge";
|
|
@@ -225,6 +303,9 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
225
303
|
updatedData: update(updatedData, spec),
|
|
226
304
|
};
|
|
227
305
|
});
|
|
306
|
+
if (edits.length > 0) {
|
|
307
|
+
get().onEdit?.({ type: "setCells", cells: edits });
|
|
308
|
+
}
|
|
228
309
|
},
|
|
229
310
|
onSelection(selection: Region[]) {
|
|
230
311
|
set((state) => {
|
|
@@ -239,6 +320,7 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
239
320
|
focusedCell: null,
|
|
240
321
|
topLeftCell: null,
|
|
241
322
|
fillValueBaseCell: null,
|
|
323
|
+
cellSurfaceOpen: false,
|
|
242
324
|
};
|
|
243
325
|
}
|
|
244
326
|
|
|
@@ -246,24 +328,41 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
246
328
|
if (state.fillValueBaseCell != null) {
|
|
247
329
|
spec.updatedData = fillValues(state, selection);
|
|
248
330
|
}
|
|
331
|
+
// A click (user selection) re-arms auto-activation and clears the
|
|
332
|
+
// travel direction so the editor opens with a default cursor.
|
|
333
|
+
spec.autoActivateArmed = true;
|
|
334
|
+
spec.lastNavDirection = null;
|
|
335
|
+
// Only open when the selection actually MOVES to a (single) cell.
|
|
336
|
+
// A click on the already-selected cell leaves open-state to the
|
|
337
|
+
// target's click toggle — this avoids racing the selection event
|
|
338
|
+
// (which fires on mousedown, possibly more than once) and is what
|
|
339
|
+
// makes both re-focus-to-open and click-to-close reliable.
|
|
340
|
+
if (!selectionEquals(selection, state.selection)) {
|
|
341
|
+
spec.cellSurfaceOpen = singleFocusedCell(selection) != null;
|
|
342
|
+
}
|
|
249
343
|
return spec;
|
|
250
344
|
});
|
|
251
345
|
},
|
|
252
346
|
onSelectionEdited(value: any) {
|
|
253
347
|
// Apply the same value to all selected cells
|
|
348
|
+
const edits: { rowIndex: number; column: string; value: any }[] = [];
|
|
254
349
|
set((state) => {
|
|
255
350
|
const { selection, updatedData, columnSpec, editable } = state;
|
|
256
351
|
if (!editable) return {};
|
|
352
|
+
const numVisible = visibleRowCount(state);
|
|
257
353
|
let spec = {};
|
|
258
354
|
for (const region of selection) {
|
|
259
355
|
const { cols, rows } = region;
|
|
260
|
-
const rowRange = range(rows ?? [0,
|
|
356
|
+
const rowRange = range(rows ?? [0, numVisible - 1]);
|
|
261
357
|
const colRange = range(cols ?? [0, columnSpec.length - 1]);
|
|
262
|
-
for (const
|
|
358
|
+
for (const visibleRow of rowRange) {
|
|
359
|
+
// Selection indices are visible positions; map to the data row.
|
|
360
|
+
const row = toDataRowIndex(state, visibleRow);
|
|
263
361
|
let vals = {};
|
|
264
362
|
for (const col of colRange) {
|
|
265
363
|
const key = columnSpec[col].key;
|
|
266
364
|
vals[key] = value;
|
|
365
|
+
edits.push({ rowIndex: row, column: key, value });
|
|
267
366
|
}
|
|
268
367
|
let op = updatedData[row] == null ? "$set" : "$merge";
|
|
269
368
|
spec[row] = { [op]: vals };
|
|
@@ -273,6 +372,9 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
273
372
|
updatedData: update(updatedData, spec),
|
|
274
373
|
};
|
|
275
374
|
});
|
|
375
|
+
if (edits.length > 0) {
|
|
376
|
+
get().onEdit?.({ type: "setCells", cells: edits });
|
|
377
|
+
}
|
|
276
378
|
},
|
|
277
379
|
onColumnsReordered(oldIndex: number, newIndex: number, length: number) {
|
|
278
380
|
set((state) => {
|
|
@@ -291,21 +393,17 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
291
393
|
rows: [rowIndex, rowIndex],
|
|
292
394
|
});
|
|
293
395
|
},
|
|
396
|
+
// Sort/filter state changes flow to the data provider (via the loader,
|
|
397
|
+
// which reads `activeFilters`/`columnSorts` and re-fetches). The library no
|
|
398
|
+
// longer computes a client-side `filteredRowIndices` view — `data` arrives
|
|
399
|
+
// already ordered from the provider (in memory for a local source).
|
|
294
400
|
setFilter(filterId: string, filter: any, filterState: any) {
|
|
295
401
|
set((state) => {
|
|
296
402
|
const newFilters = new Map<string, { filter: any; state: any }>(
|
|
297
403
|
state.activeFilters,
|
|
298
404
|
);
|
|
299
405
|
newFilters.set(filterId, { filter, state: filterState });
|
|
300
|
-
return {
|
|
301
|
-
activeFilters: newFilters,
|
|
302
|
-
filteredRowIndices: computeTransformedRowIndices(
|
|
303
|
-
state.data,
|
|
304
|
-
state.updatedData,
|
|
305
|
-
newFilters,
|
|
306
|
-
state.columnSorts,
|
|
307
|
-
),
|
|
308
|
-
};
|
|
406
|
+
return { activeFilters: newFilters };
|
|
309
407
|
});
|
|
310
408
|
},
|
|
311
409
|
removeFilter(filterId: string) {
|
|
@@ -314,26 +412,12 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
314
412
|
state.activeFilters,
|
|
315
413
|
);
|
|
316
414
|
newFilters.delete(filterId);
|
|
317
|
-
return {
|
|
318
|
-
activeFilters: newFilters,
|
|
319
|
-
filteredRowIndices: computeTransformedRowIndices(
|
|
320
|
-
state.data,
|
|
321
|
-
state.updatedData,
|
|
322
|
-
newFilters,
|
|
323
|
-
state.columnSorts,
|
|
324
|
-
),
|
|
325
|
-
};
|
|
415
|
+
return { activeFilters: newFilters };
|
|
326
416
|
});
|
|
327
417
|
},
|
|
328
418
|
clearFilters() {
|
|
329
|
-
set((
|
|
419
|
+
set(() => ({
|
|
330
420
|
activeFilters: new Map<string, { filter: any; state: any }>(),
|
|
331
|
-
filteredRowIndices: computeTransformedRowIndices(
|
|
332
|
-
state.data,
|
|
333
|
-
state.updatedData,
|
|
334
|
-
new Map(),
|
|
335
|
-
state.columnSorts,
|
|
336
|
-
),
|
|
337
421
|
}));
|
|
338
422
|
},
|
|
339
423
|
setColumnSort(key: string, ascending: boolean | null) {
|
|
@@ -345,27 +429,11 @@ export function createZustandStore<T>(set, get): DataSheetStoreMain<T> {
|
|
|
345
429
|
const without = state.columnSorts.filter((s) => s.key !== key);
|
|
346
430
|
newSorts = [...without, { key, ascending }];
|
|
347
431
|
}
|
|
348
|
-
return {
|
|
349
|
-
columnSorts: newSorts,
|
|
350
|
-
filteredRowIndices: computeTransformedRowIndices(
|
|
351
|
-
state.data,
|
|
352
|
-
state.updatedData,
|
|
353
|
-
state.activeFilters,
|
|
354
|
-
newSorts,
|
|
355
|
-
),
|
|
356
|
-
};
|
|
432
|
+
return { columnSorts: newSorts };
|
|
357
433
|
});
|
|
358
434
|
},
|
|
359
435
|
clearColumnSorts() {
|
|
360
|
-
set((
|
|
361
|
-
columnSorts: [],
|
|
362
|
-
filteredRowIndices: computeTransformedRowIndices(
|
|
363
|
-
state.data,
|
|
364
|
-
state.updatedData,
|
|
365
|
-
state.activeFilters,
|
|
366
|
-
[],
|
|
367
|
-
),
|
|
368
|
-
}));
|
|
436
|
+
set(() => ({ columnSorts: [] }));
|
|
369
437
|
},
|
|
370
438
|
setClipboardProxy(proxy) {
|
|
371
439
|
set({ clipboardProxy: proxy });
|
|
@@ -479,13 +547,16 @@ function fillValues<T>(state: DataSheetStore<T>, selection: Region[]) {
|
|
|
479
547
|
|
|
480
548
|
// Fill values downwards
|
|
481
549
|
if (!editable || fillValueBaseCell == null) return updatedData;
|
|
482
|
-
const { col, row } = fillValueBaseCell;
|
|
550
|
+
const { col, row: baseVisibleRow } = fillValueBaseCell;
|
|
551
|
+
// The base cell and target rows are visible positions; map to data rows.
|
|
552
|
+
const baseRow = toDataRowIndex(state, baseVisibleRow);
|
|
483
553
|
const key = columnSpec[col].key;
|
|
484
|
-
const value = updatedData[
|
|
554
|
+
const value = updatedData[baseRow]?.[key] ?? data[baseRow]?.[key];
|
|
485
555
|
const spec = {};
|
|
486
556
|
for (const region of regions) {
|
|
487
|
-
const {
|
|
488
|
-
for (const
|
|
557
|
+
const { rows } = region;
|
|
558
|
+
for (const visibleRow of range(rows)) {
|
|
559
|
+
const row = toDataRowIndex(state, visibleRow);
|
|
489
560
|
let op = updatedData[row] == null ? "$set" : "$merge";
|
|
490
561
|
spec[row] = { [op]: { [key]: value } };
|
|
491
562
|
}
|
|
@@ -493,6 +564,42 @@ function fillValues<T>(state: DataSheetStore<T>, selection: Region[]) {
|
|
|
493
564
|
return update(updatedData, spec);
|
|
494
565
|
}
|
|
495
566
|
|
|
567
|
+
/** Number of rows currently visible (post-filter/sort), or the full data
|
|
568
|
+
* length when no view transform is active. Uses the max of `data` and
|
|
569
|
+
* `updatedData` lengths because `updatedData` is sparse — keying off it alone
|
|
570
|
+
* would stop a whole-column edit at the last already-edited row. */
|
|
571
|
+
function visibleRowCount<T>(state: DataSheetStore<T>): number {
|
|
572
|
+
const { filteredRowIndices, updatedData, data } = state;
|
|
573
|
+
return filteredRowIndices != null
|
|
574
|
+
? filteredRowIndices.length
|
|
575
|
+
: Math.max(data.length, updatedData.length);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/** Map a visible (post-filter/sort) row position to its underlying data
|
|
579
|
+
* index. Edit methods receive selection indices in visible space, so they
|
|
580
|
+
* must translate before writing to `updatedData`/`data`. */
|
|
581
|
+
function toDataRowIndex<T>(
|
|
582
|
+
state: DataSheetStore<T>,
|
|
583
|
+
visibleRow: number,
|
|
584
|
+
): number {
|
|
585
|
+
const { filteredRowIndices } = state;
|
|
586
|
+
if (filteredRowIndices == null) return visibleRow;
|
|
587
|
+
return filteredRowIndices[visibleRow] ?? visibleRow;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/** Whether two cell values are equivalent for edit-tracking. Empty string and
|
|
591
|
+
* null/undefined are equivalent (so clearing an empty cell is a no-op), and
|
|
592
|
+
* non-blank values are compared by string form so a text editor's `"42"`
|
|
593
|
+
* matches a numeric base `42` (otherwise the cell reads as edited when its
|
|
594
|
+
* value didn't actually change). */
|
|
595
|
+
function valuesAreEquivalent(a: any, b: any): boolean {
|
|
596
|
+
if (a === b) return true;
|
|
597
|
+
const aBlank = a == null || a === "";
|
|
598
|
+
const bBlank = b == null || b === "";
|
|
599
|
+
if (aBlank || bBlank) return aBlank && bBlank;
|
|
600
|
+
return String(a) === String(b);
|
|
601
|
+
}
|
|
602
|
+
|
|
496
603
|
function resetChangesForSelection<T>(
|
|
497
604
|
state: DataSheetStore<T>,
|
|
498
605
|
selection: Region[],
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const actions_module = require("./actions.module.sass.cjs");
|
|
4
|
-
function DataSheetActionsRow(props) {
|
|
5
|
-
return actions_module("div.table-actions", props.children);
|
|
6
|
-
}
|
|
7
|
-
function DataSheetAction(props) {
|
|
8
|
-
return actions_module("div.table-action", props.children);
|
|
9
|
-
}
|
|
10
|
-
exports.DataSheetAction = DataSheetAction;
|
|
11
|
-
exports.DataSheetActionsRow = DataSheetActionsRow;
|
|
12
|
-
//# sourceMappingURL=actions.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.cjs","sources":["../../src/components/actions.ts"],"sourcesContent":["import h from \"./actions.module.sass\";\n\nexport function DataSheetActionsRow(props) {\n return h(\"div.table-actions\", props.children);\n}\n\nexport function DataSheetAction(props) {\n return h(\"div.table-action\", props.children);\n}\n"],"names":["h"],"mappings":";;;AAEO,SAAS,oBAAoB,OAAO;AACzC,SAAOA,eAAE,qBAAqB,MAAM,QAAQ;AAC9C;AAEO,SAAS,gBAAgB,OAAO;AACrC,SAAOA,eAAE,oBAAoB,MAAM,QAAQ;AAC7C;;;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import h from "./actions.module.sass.js";
|
|
2
|
-
function DataSheetActionsRow(props) {
|
|
3
|
-
return h("div.table-actions", props.children);
|
|
4
|
-
}
|
|
5
|
-
function DataSheetAction(props) {
|
|
6
|
-
return h("div.table-action", props.children);
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
DataSheetAction,
|
|
10
|
-
DataSheetActionsRow
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=actions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sources":["../../src/components/actions.ts"],"sourcesContent":["import h from \"./actions.module.sass\";\n\nexport function DataSheetActionsRow(props) {\n return h(\"div.table-actions\", props.children);\n}\n\nexport function DataSheetAction(props) {\n return h(\"div.table-action\", props.children);\n}\n"],"names":[],"mappings":";AAEO,SAAS,oBAAoB,OAAO;AACzC,SAAO,EAAE,qBAAqB,MAAM,QAAQ;AAC9C;AAEO,SAAS,gBAAgB,OAAO;AACrC,SAAO,EAAE,oBAAoB,MAAM,QAAQ;AAC7C;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const h$1 = require("@macrostrat/hyper");
|
|
3
|
-
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
4
|
-
const h__default = /* @__PURE__ */ _interopDefault(h$1);
|
|
5
|
-
const styles = {
|
|
6
|
-
"table-actions": "_table-actions_1xz9a_1",
|
|
7
|
-
"table-action": "_table-action_1xz9a_1"
|
|
8
|
-
};
|
|
9
|
-
let h = h__default.default.styled(styles);
|
|
10
|
-
Object.assign(h, styles);
|
|
11
|
-
module.exports = h;
|
|
12
|
-
//# sourceMappingURL=actions.module.sass.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.module.sass.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import h$1 from "@macrostrat/hyper";
|
|
2
|
-
const styles = {
|
|
3
|
-
"table-actions": "_table-actions_1xz9a_1",
|
|
4
|
-
"table-action": "_table-action_1xz9a_1"
|
|
5
|
-
};
|
|
6
|
-
let h = h$1.styled(styles);
|
|
7
|
-
Object.assign(h, styles);
|
|
8
|
-
export {
|
|
9
|
-
h as default
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=actions.module.sass.js.map
|