wenay-react2 1.0.35 → 1.0.37
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 +8 -53
- package/lib/common/api.d.ts +28 -28
- package/lib/common/api.js +31 -31
- package/lib/common/src/components/Buttons/MiniButton.d.ts +1 -3
- package/lib/common/src/components/Buttons/MiniButton.js +1 -3
- package/lib/common/src/components/Dnd/{RNDFunc.d.ts → DragArea.d.ts} +1 -1
- package/lib/common/src/components/Dnd/{RNDFunc.js → DragArea.js} +1 -1
- package/lib/common/src/components/Dnd/{RNDFunc3.d.ts → FloatingWindow.d.ts} +7 -7
- package/lib/common/src/components/Dnd/{RNDFunc3.js → FloatingWindow.js} +10 -10
- package/lib/common/src/components/Dnd/OutlineDragDemo.d.ts +1 -0
- package/lib/common/src/components/Dnd/{DraggableOutlineDiv.js → OutlineDragDemo.js} +1 -2
- package/lib/common/src/components/Dnd/Resizable.js +1 -1
- package/lib/common/src/components/Dnd/index.d.ts +3 -3
- package/lib/common/src/components/Dnd/index.js +3 -3
- package/lib/common/src/components/Input.d.ts +5 -5
- package/lib/common/src/components/Input.js +10 -10
- package/lib/common/src/components/Menu/RightMenu.d.ts +25 -5
- package/lib/common/src/components/Menu/RightMenu.js +27 -19
- package/lib/common/src/components/Menu/RightMenuStore.d.ts +2 -2
- package/lib/common/src/components/Menu/RightMenuStore.js +1 -1
- package/lib/common/src/components/Modal/LeftModal.js +4 -4
- package/lib/common/src/components/Modal/Modal.d.ts +11 -17
- package/lib/common/src/components/Modal/Modal.js +15 -21
- package/lib/common/src/components/Modal/ModalContextProvider.d.ts +0 -6
- package/lib/common/src/components/Modal/ModalContextProvider.js +2 -9
- package/lib/common/src/components/Other.d.ts +2 -2
- package/lib/common/src/components/Other.js +5 -5
- package/lib/common/src/components/Parameters.d.ts +3 -3
- package/lib/common/src/components/Parameters.js +3 -3
- package/lib/common/src/components/{ParametersEngine.d.ts → ParamsEditor.d.ts} +1 -1
- package/lib/common/src/components/{ParametersEngine.js → ParamsEditor.js} +10 -10
- package/lib/common/src/components/Settings/SettingsDialog.d.ts +4 -4
- package/lib/common/src/components/Toolbar/Toolbar.d.ts +50 -37
- package/lib/common/src/components/Toolbar/Toolbar.js +60 -23
- package/lib/common/src/components/UiSlot/UiSlot.d.ts +3 -3
- package/lib/common/src/components/UiSlot/UiSlot.js +6 -6
- package/lib/common/src/grid/agGrid4/agGrid4.d.ts +4 -4
- package/lib/common/src/grid/agGrid4/agGrid4.js +6 -6
- package/lib/common/src/grid/agGrid4/index.d.ts +3 -3
- package/lib/common/src/grid/agGrid4/index.js +1 -1
- package/lib/common/src/grid/agGrid4/theme.d.ts +3 -3
- package/lib/common/src/grid/columnState/CardList.d.ts +11 -0
- package/lib/common/src/grid/columnState/CardList.js +28 -0
- package/lib/common/src/grid/columnState/ColumnDots.d.ts +9 -0
- package/lib/common/src/grid/columnState/ColumnDots.js +121 -0
- package/lib/common/src/grid/columnState/ColumnsMenu.d.ts +65 -0
- package/lib/common/src/grid/columnState/ColumnsMenu.js +123 -0
- package/lib/common/src/grid/columnState/columnState.d.ts +113 -0
- package/lib/common/src/grid/columnState/columnState.js +284 -0
- package/lib/common/src/grid/columnState/index.d.ts +4 -0
- package/lib/common/src/grid/columnState/index.js +4 -0
- package/lib/common/src/hooks/index.d.ts +1 -1
- package/lib/common/src/hooks/index.js +1 -1
- package/lib/common/src/hooks/useKeyboard.d.ts +18 -0
- package/lib/common/src/hooks/{useAddDownAnyKey.js → useKeyboard.js} +16 -24
- package/lib/common/src/hooks/useObserveStore.d.ts +12 -12
- package/lib/common/src/hooks/useObserveStore.js +2 -2
- package/lib/common/src/hooks/useOutside.d.ts +12 -19
- package/lib/common/src/hooks/useOutside.js +9 -16
- package/lib/common/src/hooks/useReorder.d.ts +4 -4
- package/lib/common/src/hooks/useReorderBoard.d.ts +15 -15
- package/lib/common/src/hooks/useReplay.d.ts +9 -9
- package/lib/common/src/hooks/useReplay.js +7 -7
- package/lib/common/src/logs/logs.d.ts +3 -3
- package/lib/common/src/logs/logs.js +11 -13
- package/lib/common/src/logs/{logs3.d.ts → logsContext.d.ts} +4 -4
- package/lib/common/src/logs/{logs3.js → logsContext.js} +4 -4
- package/lib/common/src/menu/menu.d.ts +16 -16
- package/lib/common/src/menu/menu.js +12 -11
- package/lib/common/src/menu/menuMouse.d.ts +71 -13
- package/lib/common/src/menu/menuMouse.js +189 -21
- package/lib/common/src/menu/menuR.d.ts +3 -3
- package/lib/common/src/menu/menuR.js +5 -5
- package/lib/common/src/styles/styleGrid.d.ts +1 -1
- package/lib/common/src/styles/tokens.d.ts +1 -1
- package/lib/common/src/styles/tokens.js +1 -1
- package/lib/common/src/utils/cache.d.ts +11 -11
- package/lib/common/src/utils/cache.js +0 -0
- package/lib/common/src/utils/gridRows.d.ts +37 -0
- package/lib/common/src/utils/{applyTransactionAsyncUpdate.js → gridRows.js} +6 -38
- package/lib/common/src/utils/index.d.ts +2 -2
- package/lib/common/src/utils/index.js +2 -2
- package/lib/common/src/utils/inputAutoStep.d.ts +2 -2
- package/lib/common/src/utils/inputAutoStep.js +26 -37
- package/lib/common/src/utils/{mapMemory.d.ts → memoryStore.d.ts} +13 -13
- package/lib/common/src/utils/{mapMemory.js → memoryStore.js} +32 -32
- package/lib/common/src/utils/observableMap.d.ts +5 -5
- package/lib/common/src/utils/observableMap.js +3 -3
- package/lib/common/updateBy.js +2 -2
- package/lib/style/style.css +3 -3
- package/lib/style/tokens.css +1 -1
- package/package.json +49 -49
- package/lib/common/src/components/Dnd/DraggableOutlineDiv.d.ts +0 -2
- package/lib/common/src/hooks/useAddDownAnyKey.d.ts +0 -24
- package/lib/common/src/utils/applyTransactionAsyncUpdate.d.ts +0 -53
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { ObservableMap } from "./observableMap";
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function
|
|
2
|
+
export declare function memorySet(key: any, data: object): void;
|
|
3
|
+
export declare function memoryGet(key: any): object | undefined;
|
|
4
4
|
export declare function deepMergeWithMap(target: any, source: any, visited?: Map<any, any>): any;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function memoryGetOrCreate<T extends object>(key: any, def: T, options?: {
|
|
6
6
|
abs?: boolean;
|
|
7
7
|
deepAutoMerge?: boolean;
|
|
8
8
|
reversDeep?: boolean;
|
|
9
9
|
}): T;
|
|
10
|
-
/** Announce a direct in-place mutation of an object taken from
|
|
11
|
-
* mutations are invisible to map methods.
|
|
12
|
-
* their set() calls are observed by
|
|
13
|
-
export declare function
|
|
14
|
-
/** App-facing change of a persisted
|
|
10
|
+
/** Announce a direct in-place mutation of an object taken from memoryGetOrCreate - such
|
|
11
|
+
* mutations are invisible to map methods. memorySet/memoryGetOrCreate need no announcement:
|
|
12
|
+
* their set() calls are observed by memoryCache automatically. */
|
|
13
|
+
export declare function memoryMarkDirty(key: any): void;
|
|
14
|
+
/** App-facing change of a persisted memoryProps entry in one call:
|
|
15
15
|
* mutate + rerender subscribers + mark the cache dirty. No-op if the key is absent. */
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
18
|
-
export declare const
|
|
16
|
+
export declare function memoryUpdate<T extends object>(key: any, mutate: (cur: T) => void): T | undefined;
|
|
17
|
+
export declare function memoryGetById<T extends object>(key: any, def: T, id: string | number): T;
|
|
18
|
+
export declare const memoryCache: {
|
|
19
19
|
load(): Promise<void>;
|
|
20
20
|
save(): Promise<void>;
|
|
21
21
|
saveDebounced(delay?: number): void;
|
|
22
22
|
flush(): Promise<void>;
|
|
23
23
|
clear(): Promise<void>;
|
|
24
24
|
markDirty: (scope?: string, key?: string) => void;
|
|
25
|
-
onDirty(cb: import("./cache").
|
|
25
|
+
onDirty(cb: import("./cache").DirtyListener): () => void;
|
|
26
26
|
isDirty(): boolean;
|
|
27
27
|
getArr: [k: string, v: Map<string, unknown>][];
|
|
28
28
|
};
|
|
29
|
-
export declare const
|
|
29
|
+
export declare const memoryMaps: {
|
|
30
30
|
rnd: ObservableMap<string, {
|
|
31
31
|
position: {
|
|
32
32
|
x: number;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { deepClone } from "wenay-common2";
|
|
2
2
|
import { renderBy } from "../../updateBy";
|
|
3
|
-
import {
|
|
3
|
+
import { floatingWindowMap } from "../components/Dnd/FloatingWindow";
|
|
4
4
|
import { mapResiReact } from "../components/Dnd/Resizable";
|
|
5
5
|
import { mapRightMenu } from "../components/Menu/RightMenuStore";
|
|
6
|
-
import {
|
|
6
|
+
import { createCacheMap } from "./cache";
|
|
7
7
|
import { ObservableMap } from "./observableMap";
|
|
8
|
-
// observable -
|
|
9
|
-
const
|
|
10
|
-
export function
|
|
11
|
-
if (!
|
|
12
|
-
|
|
8
|
+
// observable - memoryCache marks itself dirty on its mutations
|
|
9
|
+
const memoryProps = new ObservableMap();
|
|
10
|
+
export function memorySet(key, data) {
|
|
11
|
+
if (!memoryProps.has(key))
|
|
12
|
+
memoryProps.set(key, data);
|
|
13
13
|
}
|
|
14
|
-
export function
|
|
15
|
-
return
|
|
14
|
+
export function memoryGet(key) {
|
|
15
|
+
return memoryProps.get(key);
|
|
16
16
|
}
|
|
17
17
|
function isObject(item) {
|
|
18
18
|
return item !== null && typeof item === 'object' && !Array.isArray(item);
|
|
@@ -42,54 +42,54 @@ export function deepMergeWithMap(target, source, visited = new Map()) {
|
|
|
42
42
|
}
|
|
43
43
|
// WeakSet: a strict Map kept every def object alive forever
|
|
44
44
|
const merged = new WeakSet();
|
|
45
|
-
export function
|
|
45
|
+
export function memoryGetOrCreate(key, def, options = { reversDeep: false }) {
|
|
46
46
|
if (options.deepAutoMerge && !merged.has(def)) {
|
|
47
47
|
merged.add(def);
|
|
48
48
|
if (!options.reversDeep)
|
|
49
|
-
|
|
49
|
+
memoryProps.set(key, deepMergeWithMap(memoryProps.get(key) ?? {}, def));
|
|
50
50
|
else
|
|
51
|
-
|
|
51
|
+
memoryProps.set(key, deepMergeWithMap(deepClone(def), memoryProps.get(key) ?? {}));
|
|
52
52
|
}
|
|
53
53
|
if (options.abs)
|
|
54
|
-
|
|
55
|
-
const t = (
|
|
54
|
+
memoryProps.set(key, def);
|
|
55
|
+
const t = (memoryProps.has(key) ? memoryProps.get(key) : memoryProps.set(key, def).get(key));
|
|
56
56
|
return t; // Object.assign(def, t) // t //
|
|
57
57
|
}
|
|
58
|
-
/** Announce a direct in-place mutation of an object taken from
|
|
59
|
-
* mutations are invisible to map methods.
|
|
60
|
-
* their set() calls are observed by
|
|
61
|
-
export function
|
|
62
|
-
|
|
58
|
+
/** Announce a direct in-place mutation of an object taken from memoryGetOrCreate - such
|
|
59
|
+
* mutations are invisible to map methods. memorySet/memoryGetOrCreate need no announcement:
|
|
60
|
+
* their set() calls are observed by memoryCache automatically. */
|
|
61
|
+
export function memoryMarkDirty(key) {
|
|
62
|
+
memoryProps.touch(typeof key == "string" ? key : undefined);
|
|
63
63
|
}
|
|
64
|
-
/** App-facing change of a persisted
|
|
64
|
+
/** App-facing change of a persisted memoryProps entry in one call:
|
|
65
65
|
* mutate + rerender subscribers + mark the cache dirty. No-op if the key is absent. */
|
|
66
|
-
export function
|
|
67
|
-
const cur =
|
|
66
|
+
export function memoryUpdate(key, mutate) {
|
|
67
|
+
const cur = memoryProps.get(key);
|
|
68
68
|
if (cur === undefined)
|
|
69
69
|
return undefined;
|
|
70
70
|
mutate(cur);
|
|
71
71
|
renderBy(cur);
|
|
72
|
-
|
|
72
|
+
memoryMarkDirty(key);
|
|
73
73
|
return cur;
|
|
74
74
|
}
|
|
75
|
-
export function
|
|
76
|
-
const stored =
|
|
75
|
+
export function memoryGetById(key, def, id) {
|
|
76
|
+
const stored = memoryProps.get(key);
|
|
77
77
|
if (!stored || stored.__id !== id) {
|
|
78
78
|
const fresh = { __id: id, data: def };
|
|
79
|
-
|
|
79
|
+
memoryProps.set(key, fresh);
|
|
80
80
|
return fresh.data;
|
|
81
81
|
}
|
|
82
82
|
return stored.data;
|
|
83
83
|
}
|
|
84
|
-
export const
|
|
84
|
+
export const memoryCache = createCacheMap([
|
|
85
85
|
["mapResiReact", mapResiReact],
|
|
86
|
-
["
|
|
86
|
+
["floatingWindowMap", floatingWindowMap],
|
|
87
87
|
["mapRightMenu", mapRightMenu],
|
|
88
|
-
["
|
|
88
|
+
["memoryProps", memoryProps]
|
|
89
89
|
]);
|
|
90
|
-
export const
|
|
91
|
-
rnd:
|
|
90
|
+
export const memoryMaps = {
|
|
91
|
+
rnd: floatingWindowMap,
|
|
92
92
|
resize: mapResiReact,
|
|
93
93
|
rightMenu: mapRightMenu,
|
|
94
|
-
other:
|
|
94
|
+
other: memoryProps
|
|
95
95
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/** Map that announces its own mutations. The persisted-state maps (
|
|
2
|
-
* mapRightMenu,
|
|
1
|
+
/** Map that announces its own mutations. The persisted-state maps (floatingWindowMap, mapResiReact,
|
|
2
|
+
* mapRightMenu, memoryProps) are ObservableMap instances, so the dirty signal originates in
|
|
3
3
|
* the data layer itself: set/delete/clear emit automatically, touch(key) announces an
|
|
4
|
-
* in-place mutation of a stored object (invisible to map methods).
|
|
4
|
+
* in-place mutation of a stored object (invisible to map methods). createCacheMapWithStorage
|
|
5
5
|
* subscribes to the maps it owns - mutation sites never talk to the cache directly. */
|
|
6
|
-
export type
|
|
6
|
+
export type MapChangeListener<K> = (key?: K) => void;
|
|
7
7
|
export declare class ObservableMap<K, V> extends Map<K, V> {
|
|
8
8
|
private listeners?;
|
|
9
9
|
/** Subscribe to mutations (set/delete/clear/touch); returns unsubscribe. */
|
|
10
|
-
onChange(cb:
|
|
10
|
+
onChange(cb: MapChangeListener<K>): () => void;
|
|
11
11
|
/** Announce an in-place mutation of a stored value. */
|
|
12
12
|
touch(key?: K): void;
|
|
13
13
|
private emit;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/** Map that announces its own mutations. The persisted-state maps (
|
|
2
|
-
* mapRightMenu,
|
|
1
|
+
/** Map that announces its own mutations. The persisted-state maps (floatingWindowMap, mapResiReact,
|
|
2
|
+
* mapRightMenu, memoryProps) are ObservableMap instances, so the dirty signal originates in
|
|
3
3
|
* the data layer itself: set/delete/clear emit automatically, touch(key) announces an
|
|
4
|
-
* in-place mutation of a stored object (invisible to map methods).
|
|
4
|
+
* in-place mutation of a stored object (invisible to map methods). createCacheMapWithStorage
|
|
5
5
|
* subscribes to the maps it owns - mutation sites never talk to the cache directly. */
|
|
6
6
|
export class ObservableMap extends Map {
|
|
7
7
|
// no initializer: Map's constructor calls this.set() before class fields are assigned
|
package/lib/common/updateBy.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCallback, useLayoutEffect, useSyncExternalStore } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { listen as createListen, waitRun } from "wenay-common2";
|
|
3
3
|
export const map3 = new WeakMap();
|
|
4
4
|
export const mapWait = new Map();
|
|
5
5
|
const updateListens = new WeakMap();
|
|
6
6
|
function getUpdateListen(obj) {
|
|
7
7
|
let listen = updateListens.get(obj);
|
|
8
8
|
if (!listen) {
|
|
9
|
-
listen =
|
|
9
|
+
listen = createListen();
|
|
10
10
|
updateListens.set(obj, listen);
|
|
11
11
|
}
|
|
12
12
|
return listen;
|
package/lib/style/style.css
CHANGED
|
@@ -319,7 +319,7 @@ body {
|
|
|
319
319
|
margin-left: -1px;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
/*
|
|
322
|
+
/* FloatingWindow window chrome. All visuals go through --wnd-* tokens (tokens.css);
|
|
323
323
|
defaults reproduce the legacy look, apps re-skin via :root[data-theme] token overrides. */
|
|
324
324
|
.wenayWnd {
|
|
325
325
|
background: var(--wnd-bg);
|
|
@@ -350,7 +350,7 @@ body {
|
|
|
350
350
|
background: var(--wnd-header-stripes);
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
/* Window close button (
|
|
353
|
+
/* Window close button (FloatingWindow and others) */
|
|
354
354
|
.wenayCloseBtn {
|
|
355
355
|
width: var(--wnd-close-size, 28px);
|
|
356
356
|
height: var(--wnd-close-size, 28px);
|
|
@@ -378,7 +378,7 @@ body {
|
|
|
378
378
|
.wenayCloseBtn:active {
|
|
379
379
|
transform: scale(0.95);
|
|
380
380
|
}
|
|
381
|
-
/* Positioning of the close button inside
|
|
381
|
+
/* Positioning of the close button inside FloatingWindow. Kept separate from .wenayCloseBtn,
|
|
382
382
|
which may be used outside windows and must not become position:absolute there. */
|
|
383
383
|
.wenayWndClose {
|
|
384
384
|
position: absolute;
|
package/lib/style/tokens.css
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
/* Menu shadow (was a literal in .MenuR) */
|
|
33
33
|
--menu-shadow: 0 0 20px 14px rgba(34, 60, 80, 0.2);
|
|
34
34
|
|
|
35
|
-
/* Window (
|
|
35
|
+
/* Window (FloatingWindow) chrome. Defaults = legacy look, so apps without themes do not change.
|
|
36
36
|
Apps re-skin via :root[data-theme='...'] overrides, same contract as --color-* / --menu-*.
|
|
37
37
|
Intentionally NOT declared here (fall back to inherit/auto until a theme declares them):
|
|
38
38
|
--wnd-header-height, --wnd-header-color, --wnd-header-font-size,
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "wenay-react2",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Common react",
|
|
5
|
-
"strict": true,
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"lib/**/*",
|
|
10
|
-
"!**/*.tsbuildinfo"
|
|
11
|
-
],
|
|
12
|
-
"author": "wenay",
|
|
13
|
-
"license": "ISC",
|
|
14
|
-
"peerDependenciesMeta": {
|
|
15
|
-
"react-dom": {
|
|
16
|
-
"optional": true
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"ag-grid-community": "^35.1.0",
|
|
21
|
-
"ag-grid-react": "^35.1.0",
|
|
22
|
-
"re-resizable": "^6.11.2",
|
|
23
|
-
"react": "^19.2.0",
|
|
24
|
-
"react-dom": "^19.2.0",
|
|
25
|
-
"react-rnd": "^10.5.3",
|
|
26
|
-
"wenay-common2": "^1.0.
|
|
27
|
-
},
|
|
28
|
-
"peerDependencies": {
|
|
29
|
-
"react": "^19.2.0",
|
|
30
|
-
"react-dom": "^19.2.0"
|
|
31
|
-
},
|
|
32
|
-
"engines": {
|
|
33
|
-
"node": ">=18",
|
|
34
|
-
"vscode": "^1.22.0"
|
|
35
|
-
},
|
|
36
|
-
"browserslist": {
|
|
37
|
-
"production": [
|
|
38
|
-
">0.2%",
|
|
39
|
-
"not dead"
|
|
40
|
-
],
|
|
41
|
-
"development": [
|
|
42
|
-
">1%"
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
"exports": {
|
|
46
|
-
".": "./lib/index.js",
|
|
47
|
-
"./package.json": "./package.json"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "wenay-react2",
|
|
3
|
+
"version": "1.0.37",
|
|
4
|
+
"description": "Common react",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"lib/**/*",
|
|
10
|
+
"!**/*.tsbuildinfo"
|
|
11
|
+
],
|
|
12
|
+
"author": "wenay",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"peerDependenciesMeta": {
|
|
15
|
+
"react-dom": {
|
|
16
|
+
"optional": true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"ag-grid-community": "^35.1.0",
|
|
21
|
+
"ag-grid-react": "^35.1.0",
|
|
22
|
+
"re-resizable": "^6.11.2",
|
|
23
|
+
"react": "^19.2.0",
|
|
24
|
+
"react-dom": "^19.2.0",
|
|
25
|
+
"react-rnd": "^10.5.3",
|
|
26
|
+
"wenay-common2": "^1.0.64"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"react": "^19.2.0",
|
|
30
|
+
"react-dom": "^19.2.0"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18",
|
|
34
|
+
"vscode": "^1.22.0"
|
|
35
|
+
},
|
|
36
|
+
"browserslist": {
|
|
37
|
+
"production": [
|
|
38
|
+
">0.2%",
|
|
39
|
+
"not dead"
|
|
40
|
+
],
|
|
41
|
+
"development": [
|
|
42
|
+
">1%"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"exports": {
|
|
46
|
+
".": "./lib/index.js",
|
|
47
|
+
"./package.json": "./package.json"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const KeyDown: {
|
|
2
|
-
key: string;
|
|
3
|
-
};
|
|
4
|
-
export type AnyKeyDownApi = {
|
|
5
|
-
readonly key: string;
|
|
6
|
-
getKey(): string;
|
|
7
|
-
get(): string;
|
|
8
|
-
clear(): void;
|
|
9
|
-
reset(): void;
|
|
10
|
-
subscribe(listener: (key: string, event?: KeyboardEvent) => void): () => void;
|
|
11
|
-
on(listener: (key: string, event?: KeyboardEvent) => void): () => void;
|
|
12
|
-
};
|
|
13
|
-
export declare const keyDownApi: AnyKeyDownApi;
|
|
14
|
-
export declare function useAddDownAnyKey(options?: {
|
|
15
|
-
enabled?: boolean;
|
|
16
|
-
target?: Document | HTMLElement;
|
|
17
|
-
onKeyDown?: (key: string, event: KeyboardEvent) => void;
|
|
18
|
-
}): AnyKeyDownApi;
|
|
19
|
-
export declare const useKeyDown: typeof useAddDownAnyKey;
|
|
20
|
-
export declare const useAnyKey: typeof useAddDownAnyKey;
|
|
21
|
-
/** @deprecated Use `useKeyDown(options)` or `useAnyKey(options)`. */
|
|
22
|
-
export declare function addDownAnyKey(): AnyKeyDownApi;
|
|
23
|
-
/** @deprecated Use `useKeyDown(options)` or `useAnyKey(options)`. */
|
|
24
|
-
export declare const useAddDownAnyKeyOld: typeof useAddDownAnyKey;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ColDef, GridReadyEvent } from "ag-grid-community";
|
|
2
|
-
declare const optionsDef: {
|
|
3
|
-
update: boolean;
|
|
4
|
-
add: boolean;
|
|
5
|
-
updateBuffer: boolean;
|
|
6
|
-
sync: boolean;
|
|
7
|
-
};
|
|
8
|
-
type options = Partial<typeof optionsDef>;
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated v1: does not support row removal and silently loses data while the grid is not ready.
|
|
11
|
-
* Use `useAgGrid`/`createGridBuffer` (grid/agGrid4) - buffer + attach/sync,
|
|
12
|
-
* or at least `applyTransactionAsyncUpdate2`.
|
|
13
|
-
*/
|
|
14
|
-
export declare function applyTransactionAsyncUpdate<T>(grid: GridReadyEvent<T, any> | null | undefined, newData: (Partial<T>)[], getId: (...a: any[]) => string, bufTable: {
|
|
15
|
-
[id: string]: Partial<T>;
|
|
16
|
-
}, option?: options): void;
|
|
17
|
-
/** @deprecated No-op stub: always returns {}. Never implemented; will be removed in a major version. */
|
|
18
|
-
export declare function getUpdateTable<T>(grid: GridReadyEvent<T, any> | null | undefined, newData: (Partial<T>)[], getId: (...a: any[]) => string, bufTable: {
|
|
19
|
-
[id: string]: Partial<T>;
|
|
20
|
-
}, option?: options): {};
|
|
21
|
-
type CommonParams<T> = {
|
|
22
|
-
getId: (...a: any[]) => string;
|
|
23
|
-
bufTable: {
|
|
24
|
-
[id: string]: Partial<T>;
|
|
25
|
-
};
|
|
26
|
-
option?: options;
|
|
27
|
-
};
|
|
28
|
-
type params<T> = CommonParams<T> & ({
|
|
29
|
-
newData?: (Partial<T>)[];
|
|
30
|
-
removeData?: (Partial<T>)[];
|
|
31
|
-
synchronization?: never;
|
|
32
|
-
gridRef?: React.RefObject<GridReadyEvent<T, any> | null | undefined>;
|
|
33
|
-
grid?: GridReadyEvent<T, any> | null | undefined;
|
|
34
|
-
onlyMemo?: boolean;
|
|
35
|
-
} | ({
|
|
36
|
-
newData?: never;
|
|
37
|
-
removeData?: never;
|
|
38
|
-
synchronization: true;
|
|
39
|
-
onlyMemo?: never;
|
|
40
|
-
} & ({
|
|
41
|
-
grid: GridReadyEvent<T, any> | null | undefined;
|
|
42
|
-
gridRef?: never;
|
|
43
|
-
} | {
|
|
44
|
-
gridRef: React.RefObject<GridReadyEvent<T, any> | null | undefined>;
|
|
45
|
-
grid?: never;
|
|
46
|
-
})));
|
|
47
|
-
export declare function applyTransactionAsyncUpdate2<T>(params: params<T>): void;
|
|
48
|
-
type UnUndefined<T extends (any | undefined)> = T extends undefined ? never : T;
|
|
49
|
-
type t1<T = any> = ColDef<T>["comparator"];
|
|
50
|
-
type paramsCompare<TData = any> = Parameters<Extract<UnUndefined<t1>, (...args: any) => any>>;
|
|
51
|
-
/** @deprecated Duplicate of `numericComparator` from grid/agGrid4 (core.ts) - use that instead. */
|
|
52
|
-
export declare function getComparatorGrid<T = any>(func?: (...param: paramsCompare<T>) => [a: number, b: number]): t1;
|
|
53
|
-
export {};
|