@ishibashi0112/spreadsheet-grid-solid 1.13.0 → 1.15.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/API_REFERENCE.md +228 -16
- package/README.md +10 -8
- package/dist/{ColumnFilterPopover-t32VGfTq.js → ColumnFilterPopover-DYnfyUTm.js} +40 -41
- package/dist/ai.d.ts +2 -0
- package/dist/ai.js +48 -47
- package/dist/devWarnings.d.ts +1 -0
- package/dist/features/pagination.d.ts +2 -0
- package/dist/features/types.d.ts +7 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3611 -3312
- package/dist/inputValue-Dvxw-RUC.js +69 -0
- package/dist/primitives/rowDrag.d.ts +1 -0
- package/dist/primitives/serverSide.d.ts +2 -1
- package/dist/source/ai.jsx +3 -0
- package/dist/source/chunks/{ColumnFilterPopover-JL3HPGXY.jsx → ColumnFilterPopover-7COSTSPD.jsx} +2 -4
- package/dist/source/chunks/{chunk-AI3CSPI3.jsx → chunk-D4IAL3ZE.jsx} +43 -1
- package/dist/source/chunks/{toolPanelViews-N6TGBFFW.jsx → toolPanelViews-WBFE4QVY.jsx} +2 -4
- package/dist/source/index.jsx +926 -477
- package/dist/style.css +1 -1
- package/dist/style.layer.css +1 -1
- package/dist/{toolPanelViews-CPYtBTQP.js → toolPanelViews-BgEAIDpk.js} +35 -36
- package/dist/view/DefaultGridBottomBar.d.ts +3 -0
- package/dist/view/DefaultGridTopBar.d.ts +1 -0
- package/dist/view/GridBodyGroupRow.d.ts +1 -0
- package/dist/view/GridBodyLabelRow.d.ts +1 -0
- package/dist/view/GridBodyLayer.d.ts +1 -0
- package/dist/view/GridBodySkeletonRow.d.ts +2 -0
- package/dist/view/GridPager.d.ts +9 -0
- package/dist/view/GridScrollHint.d.ts +2 -0
- package/dist/view/GridStickyLabelLayer.d.ts +1 -0
- package/package.json +3 -3
- package/skills/spreadsheet-grid-solid/SKILL.md +5 -1
- package/dist/inputValue-C6BHBMBx.js +0 -24
- package/dist/portalTokens-LgUwLYnR.js +0 -47
- package/dist/source/chunks/chunk-WLXZT66B.jsx +0 -44
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { createContext as e, createEffect as t, createRenderEffect as n, createSignal as r, useContext as i } from "solid-js";
|
|
2
|
+
import { syncPopupOrigin as a } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/popupContainer";
|
|
3
|
+
import { isTabKeyEvent as o } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/domGuards";
|
|
4
|
+
import { watchPortalTokens as s } from "@ishibashi0112/spreadsheet-grid-core/internal/utils/portalTokens";
|
|
5
|
+
//#region src/primitives/style.ts
|
|
6
|
+
var c = /* @__PURE__ */ new Set([
|
|
7
|
+
"opacity",
|
|
8
|
+
"z-index",
|
|
9
|
+
"flex",
|
|
10
|
+
"flex-grow",
|
|
11
|
+
"flex-shrink",
|
|
12
|
+
"line-height",
|
|
13
|
+
"order",
|
|
14
|
+
"font-weight"
|
|
15
|
+
]), l = (e) => e.startsWith("--") ? e : e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), u = (e) => {
|
|
16
|
+
if (!e) return;
|
|
17
|
+
let t = {};
|
|
18
|
+
for (let [n, r] of Object.entries(e)) {
|
|
19
|
+
if (r == null || r === !1) continue;
|
|
20
|
+
let e = l(n);
|
|
21
|
+
t[e] = typeof r == "number" && !c.has(e) ? `${r}px` : String(r);
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
}, d = (e) => `${e}px`, f = (e) => o(e) ? "Tab" : e.key, p = (e) => ({
|
|
25
|
+
key: f(e),
|
|
26
|
+
altKey: e.altKey,
|
|
27
|
+
ctrlKey: e.ctrlKey,
|
|
28
|
+
metaKey: e.metaKey,
|
|
29
|
+
shiftKey: e.shiftKey,
|
|
30
|
+
isComposing: e.isComposing,
|
|
31
|
+
keyCode: e.keyCode,
|
|
32
|
+
currentTarget: e.currentTarget,
|
|
33
|
+
preventDefault: () => e.preventDefault()
|
|
34
|
+
}), m = e({
|
|
35
|
+
source: () => null,
|
|
36
|
+
container: () => typeof document > "u" ? null : document.body
|
|
37
|
+
}), h = () => i(m);
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/primitives/portalTokens.ts
|
|
40
|
+
function g(e, n, r, i) {
|
|
41
|
+
let { source: o } = h();
|
|
42
|
+
t(() => [e(), n()], ([e]) => e ? s(o, e) : void 0, { name: "portalTokens" }), i?.origin !== !1 && t(() => [e(), r()], ([e]) => {
|
|
43
|
+
e && a(e);
|
|
44
|
+
}, { name: "portalLayout" });
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/primitives/inputValue.ts
|
|
48
|
+
function _(e) {
|
|
49
|
+
let [t, i] = r();
|
|
50
|
+
return n(() => [t(), e()], ([e, t]) => {
|
|
51
|
+
e && e.value !== t && (e.value = t);
|
|
52
|
+
}, { name: "inputValue" }), (e) => {
|
|
53
|
+
i(() => e);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
var v = (e, t) => (n) => {
|
|
57
|
+
let r = n.currentTarget;
|
|
58
|
+
r.checked = !r.checked, r.indeterminate = e(), t();
|
|
59
|
+
};
|
|
60
|
+
function y(e) {
|
|
61
|
+
let [t, i] = r();
|
|
62
|
+
return n(() => [t(), e()], ([e, t]) => {
|
|
63
|
+
e && (e.indeterminate = t);
|
|
64
|
+
}, { name: "inputIndeterminate" }), (e) => {
|
|
65
|
+
i(() => e);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { m as a, p as c, g as i, d as l, y as n, h as o, _ as r, f as s, v as t, u };
|
|
@@ -10,6 +10,7 @@ export type RowDragInputs<T> = {
|
|
|
10
10
|
resolveRowKey: () => (row: T, index: number) => GridRowKey;
|
|
11
11
|
hasRowKeys: () => boolean;
|
|
12
12
|
dragRowLabel: () => string;
|
|
13
|
+
rowOffset?: (() => number) | undefined;
|
|
13
14
|
};
|
|
14
15
|
export type RowDrag = {
|
|
15
16
|
onRowDragHandlePointerDown: RowDragController['onRowDragHandlePointerDown'];
|
|
@@ -9,7 +9,8 @@ export declare function createServerSide<T>(args: () => ServerSideRowModelArgs<T
|
|
|
9
9
|
requestRange: (startIndex: number, endIndex: number) => void;
|
|
10
10
|
refresh: () => void;
|
|
11
11
|
retryFailedBlocks: () => void;
|
|
12
|
+
isLoading: () => boolean;
|
|
12
13
|
canUpdateRows: import("solid-js").SourceAccessor<boolean>;
|
|
13
|
-
applyCellEdits: (edits: import("@ishibashi0112/spreadsheet-grid-core/internal/logic/serverSideEdits").ServerSideCellEditInput<T>[]) => number;
|
|
14
|
+
applyCellEdits: (edits: import("@ishibashi0112/spreadsheet-grid-core/internal/logic/serverSideEdits").ServerSideCellEditInput<T>[], onSettled?: (saved: boolean) => void) => number;
|
|
14
15
|
};
|
|
15
16
|
export type ServerSide<T> = ReturnType<typeof createServerSide<T>>;
|
package/dist/source/ai.jsx
CHANGED
|
@@ -606,8 +606,10 @@ import {
|
|
|
606
606
|
readGridAskAnswer as readGridAskAnswer2,
|
|
607
607
|
removeGridAskItem as removeGridAskItem2
|
|
608
608
|
} from "@ishibashi0112/spreadsheet-grid-core/internal/logic/gridAsk";
|
|
609
|
+
import { createGridAgentTools, registerGridAgentTools } from "@ishibashi0112/spreadsheet-grid-core/internal/logic/gridAgentTools";
|
|
609
610
|
export {
|
|
610
611
|
GridAskBar,
|
|
612
|
+
createGridAgentTools,
|
|
611
613
|
createGridAsk,
|
|
612
614
|
createGridAskRequest2 as createGridAskRequest,
|
|
613
615
|
describeGridAskView2 as describeGridAskView,
|
|
@@ -615,5 +617,6 @@ export {
|
|
|
615
617
|
isGridAskColumnsChanged2 as isGridAskColumnsChanged,
|
|
616
618
|
isSameGridAskView2 as isSameGridAskView,
|
|
617
619
|
readGridAskAnswer2 as readGridAskAnswer,
|
|
620
|
+
registerGridAgentTools,
|
|
618
621
|
removeGridAskItem2 as removeGridAskItem
|
|
619
622
|
};
|
package/dist/source/chunks/{ColumnFilterPopover-JL3HPGXY.jsx → ColumnFilterPopover-7COSTSPD.jsx}
RENAMED
|
@@ -6,14 +6,12 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
controlledToggle,
|
|
8
8
|
createIndeterminate,
|
|
9
|
-
createInputValue
|
|
10
|
-
} from "./chunk-WLXZT66B.jsx";
|
|
11
|
-
import {
|
|
9
|
+
createInputValue,
|
|
12
10
|
createPortalTokens,
|
|
13
11
|
px,
|
|
14
12
|
readEventKey,
|
|
15
13
|
useGridPortal
|
|
16
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D4IAL3ZE.jsx";
|
|
17
15
|
import {
|
|
18
16
|
usePopupLocaleText
|
|
19
17
|
} from "./chunk-ZW5ET5DO.jsx";
|
|
@@ -65,6 +65,45 @@ function createPortalTokens(portal, modifierClassName, layout, options) {
|
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
// src/primitives/inputValue.ts
|
|
69
|
+
import { createRenderEffect, createSignal } from "solid-js";
|
|
70
|
+
function createInputValue(value) {
|
|
71
|
+
const [element, setElement] = createSignal();
|
|
72
|
+
createRenderEffect(
|
|
73
|
+
() => [element(), value()],
|
|
74
|
+
([target, next]) => {
|
|
75
|
+
if (target && target.value !== next) {
|
|
76
|
+
target.value = next;
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{ name: "inputValue" }
|
|
80
|
+
);
|
|
81
|
+
return (target) => {
|
|
82
|
+
setElement(() => target);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
var controlledToggle = (indeterminate, action) => (event) => {
|
|
86
|
+
const target = event.currentTarget;
|
|
87
|
+
target.checked = !target.checked;
|
|
88
|
+
target.indeterminate = indeterminate();
|
|
89
|
+
action();
|
|
90
|
+
};
|
|
91
|
+
function createIndeterminate(value) {
|
|
92
|
+
const [element, setElement] = createSignal();
|
|
93
|
+
createRenderEffect(
|
|
94
|
+
() => [element(), value()],
|
|
95
|
+
([target, next]) => {
|
|
96
|
+
if (target) {
|
|
97
|
+
target.indeterminate = next;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{ name: "inputIndeterminate" }
|
|
101
|
+
);
|
|
102
|
+
return (target) => {
|
|
103
|
+
setElement(() => target);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
68
107
|
export {
|
|
69
108
|
toSolidStyle,
|
|
70
109
|
px,
|
|
@@ -72,5 +111,8 @@ export {
|
|
|
72
111
|
toEditorKeyEvent,
|
|
73
112
|
GridPortalContext,
|
|
74
113
|
useGridPortal,
|
|
75
|
-
createPortalTokens
|
|
114
|
+
createPortalTokens,
|
|
115
|
+
createInputValue,
|
|
116
|
+
controlledToggle,
|
|
117
|
+
createIndeterminate
|
|
76
118
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
createInputValue
|
|
3
|
-
} from "./chunk-WLXZT66B.jsx";
|
|
4
|
-
import {
|
|
2
|
+
createInputValue,
|
|
5
3
|
createPortalTokens,
|
|
6
4
|
px,
|
|
7
5
|
readEventKey,
|
|
8
6
|
useGridPortal
|
|
9
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D4IAL3ZE.jsx";
|
|
10
8
|
import {
|
|
11
9
|
usePopupLocaleText
|
|
12
10
|
} from "./chunk-ZW5ET5DO.jsx";
|