@intable/react 0.0.18 → 0.0.20

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 huodoushigemi
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 huodoushigemi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -99,7 +99,7 @@ export interface TableProps {
99
99
  export type THProps = {
100
100
  x: number;
101
101
  col: TableColumn;
102
- children: JSX.Element;
102
+ children?: JSX.Element;
103
103
  rowspan?: number;
104
104
  colspan?: number;
105
105
  style?: any;
@@ -109,7 +109,7 @@ export type TDProps = {
109
109
  y: number;
110
110
  data: any;
111
111
  col: TableColumn;
112
- children: JSX.Element;
112
+ children?: JSX.Element;
113
113
  rowspan?: number;
114
114
  colspan?: number;
115
115
  };
@@ -4,7 +4,8 @@ declare module '../index' {
4
4
  }
5
5
  interface TableStore {
6
6
  commands: Commands;
7
- scrollToCell?: (x: number | object, y: number | object, opt?: ScrollIntoViewOptions) => void;
7
+ scrollToCell: (x: number | object, y: number | object, opt?: ScrollIntoViewOptions) => void;
8
+ scrollCellIfNeeded: (x: number | object, y: number | object, opt?: boolean) => void;
8
9
  }
9
10
  interface Plugin {
10
11
  commands?: (store: TableStore, commands: Partial<Commands>) => Partial<Commands> & Record<string, any>;
@@ -1,8 +1,11 @@
1
1
  import { type JSX } from 'solid-js';
2
2
  import { type Plugin, type TableColumn } from '..';
3
3
  declare module '../index' {
4
+ interface TableProps {
5
+ editable?: boolean | ((props: TDProps) => boolean);
6
+ }
4
7
  interface TableColumn {
5
- editable?: boolean;
8
+ editable?: boolean | ((props: TDProps) => boolean);
6
9
  editor?: string | Editor;
7
10
  editorProps?: any;
8
11
  editorPopup?: boolean;
@@ -33,6 +36,7 @@ export interface EditorOpt {
33
36
  export declare const EditablePlugin: Plugin;
34
37
  export declare const editors: {
35
38
  text: Editor;
39
+ textarea: Editor;
36
40
  number: Editor;
37
41
  range: Editor;
38
42
  date: Editor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intable/react",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "dependencies": {
20
20
  "dayjs": "^1.11.20",
21
21
  "solid-js": "^1.9.9",
22
- "intable": "^0.0.18"
22
+ "intable": "^0.0.20"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",