react-table-edit 0.8.3 → 0.8.5
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/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4 -5
- package/dist/index.mjs +4 -5
- package/package.json +3 -4
package/dist/index.d.mts
CHANGED
|
@@ -100,9 +100,9 @@ type IColumnTable = {
|
|
|
100
100
|
validate?: any;
|
|
101
101
|
disabledCondition?: any;
|
|
102
102
|
callback?: any;
|
|
103
|
-
width?: number;
|
|
104
|
-
minWidth?: number;
|
|
105
|
-
maxWidth?: number;
|
|
103
|
+
width?: number | string;
|
|
104
|
+
minWidth?: number | string;
|
|
105
|
+
maxWidth?: number | string;
|
|
106
106
|
editEnable?: boolean;
|
|
107
107
|
visible?: boolean;
|
|
108
108
|
invisibleDisable?: boolean;
|
|
@@ -195,9 +195,9 @@ type IFRef = {
|
|
|
195
195
|
type IHeaderColumnTable = {
|
|
196
196
|
field: string;
|
|
197
197
|
headerText?: string;
|
|
198
|
-
width?: number;
|
|
199
|
-
minWidth?: number;
|
|
200
|
-
maxWidth?: number;
|
|
198
|
+
width?: number | string;
|
|
199
|
+
minWidth?: number | string;
|
|
200
|
+
maxWidth?: number | string;
|
|
201
201
|
visible?: boolean;
|
|
202
202
|
rowspan?: number;
|
|
203
203
|
columns?: IColumnTable[];
|
package/dist/index.d.ts
CHANGED
|
@@ -100,9 +100,9 @@ type IColumnTable = {
|
|
|
100
100
|
validate?: any;
|
|
101
101
|
disabledCondition?: any;
|
|
102
102
|
callback?: any;
|
|
103
|
-
width?: number;
|
|
104
|
-
minWidth?: number;
|
|
105
|
-
maxWidth?: number;
|
|
103
|
+
width?: number | string;
|
|
104
|
+
minWidth?: number | string;
|
|
105
|
+
maxWidth?: number | string;
|
|
106
106
|
editEnable?: boolean;
|
|
107
107
|
visible?: boolean;
|
|
108
108
|
invisibleDisable?: boolean;
|
|
@@ -195,9 +195,9 @@ type IFRef = {
|
|
|
195
195
|
type IHeaderColumnTable = {
|
|
196
196
|
field: string;
|
|
197
197
|
headerText?: string;
|
|
198
|
-
width?: number;
|
|
199
|
-
minWidth?: number;
|
|
200
|
-
maxWidth?: number;
|
|
198
|
+
width?: number | string;
|
|
199
|
+
minWidth?: number | string;
|
|
200
|
+
maxWidth?: number | string;
|
|
201
201
|
visible?: boolean;
|
|
202
202
|
rowspan?: number;
|
|
203
203
|
columns?: IColumnTable[];
|
package/dist/index.js
CHANGED
|
@@ -5179,7 +5179,7 @@ var HeaderTableCol = (props) => {
|
|
|
5179
5179
|
import_react_resizable.Resizable,
|
|
5180
5180
|
{
|
|
5181
5181
|
className: "r-resize",
|
|
5182
|
-
width: Number(col.width ?? 0),
|
|
5182
|
+
width: typeof col.width === "number" ? col.width : Number((col.width ?? "").replaceAll(new RegExp(`[^0-9]`, "g"), "")),
|
|
5183
5183
|
height: 0,
|
|
5184
5184
|
onResize: handleResize,
|
|
5185
5185
|
draggableOpts: { enableUserSelectHack: false },
|
|
@@ -5193,9 +5193,9 @@ var HeaderTableCol = (props) => {
|
|
|
5193
5193
|
top: `${indexParent * 42}px`,
|
|
5194
5194
|
left: col.fixedType === "left" ? objWidthFix[col.index ?? 0] : void 0,
|
|
5195
5195
|
right: col.fixedType === "right" ? objWidthFix[col.index ?? 0] : void 0,
|
|
5196
|
-
width: col.width,
|
|
5197
|
-
minWidth: col.width,
|
|
5198
|
-
maxWidth: col.width
|
|
5196
|
+
width: col.width ? typeof col.width === "number" ? col.width : col.width?.includes("px") || col.width?.includes("%") ? col.width : `${col.width}px` : "auto",
|
|
5197
|
+
minWidth: col.width ? typeof col.width === "number" ? col.width : col.width?.includes("px") || col.width?.includes("%") ? col.width : `${col.width}px` : "auto",
|
|
5198
|
+
maxWidth: col.width ? typeof col.width === "number" ? col.width : col.width?.includes("px") || col.width?.includes("%") ? col.width : `${col.width}px` : "auto"
|
|
5199
5199
|
},
|
|
5200
5200
|
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
5201
5201
|
"div",
|
|
@@ -6534,7 +6534,6 @@ var TableEdit = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
6534
6534
|
style: {
|
|
6535
6535
|
left: col.fixedType === "left" ? objWidthFix[indexCol] : void 0,
|
|
6536
6536
|
right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
|
|
6537
|
-
width: col.width,
|
|
6538
6537
|
textAlign: col.textAlign ? col.textAlign : "left"
|
|
6539
6538
|
},
|
|
6540
6539
|
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "r-footer-div", children: col.haveSum === true && col.editType === "numeric" ? formartNumberic(dataSource.reduce(function(accumulator, currentValue) {
|
package/dist/index.mjs
CHANGED
|
@@ -5179,7 +5179,7 @@ var HeaderTableCol = (props) => {
|
|
|
5179
5179
|
import_react_resizable.Resizable,
|
|
5180
5180
|
{
|
|
5181
5181
|
className: "r-resize",
|
|
5182
|
-
width: Number(col.width ?? 0),
|
|
5182
|
+
width: typeof col.width === "number" ? col.width : Number((col.width ?? "").replaceAll(new RegExp(`[^0-9]`, "g"), "")),
|
|
5183
5183
|
height: 0,
|
|
5184
5184
|
onResize: handleResize,
|
|
5185
5185
|
draggableOpts: { enableUserSelectHack: false },
|
|
@@ -5193,9 +5193,9 @@ var HeaderTableCol = (props) => {
|
|
|
5193
5193
|
top: `${indexParent * 42}px`,
|
|
5194
5194
|
left: col.fixedType === "left" ? objWidthFix[col.index ?? 0] : void 0,
|
|
5195
5195
|
right: col.fixedType === "right" ? objWidthFix[col.index ?? 0] : void 0,
|
|
5196
|
-
width: col.width,
|
|
5197
|
-
minWidth: col.width,
|
|
5198
|
-
maxWidth: col.width
|
|
5196
|
+
width: col.width ? typeof col.width === "number" ? col.width : col.width?.includes("px") || col.width?.includes("%") ? col.width : `${col.width}px` : "auto",
|
|
5197
|
+
minWidth: col.width ? typeof col.width === "number" ? col.width : col.width?.includes("px") || col.width?.includes("%") ? col.width : `${col.width}px` : "auto",
|
|
5198
|
+
maxWidth: col.width ? typeof col.width === "number" ? col.width : col.width?.includes("px") || col.width?.includes("%") ? col.width : `${col.width}px` : "auto"
|
|
5199
5199
|
},
|
|
5200
5200
|
children: /* @__PURE__ */ jsxs13(
|
|
5201
5201
|
"div",
|
|
@@ -6534,7 +6534,6 @@ var TableEdit = forwardRef3((props, ref) => {
|
|
|
6534
6534
|
style: {
|
|
6535
6535
|
left: col.fixedType === "left" ? objWidthFix[indexCol] : void 0,
|
|
6536
6536
|
right: col.fixedType === "right" ? objWidthFix[indexCol] : void 0,
|
|
6537
|
-
width: col.width,
|
|
6538
6537
|
textAlign: col.textAlign ? col.textAlign : "left"
|
|
6539
6538
|
},
|
|
6540
6539
|
children: /* @__PURE__ */ jsx16("div", { className: "r-footer-div", children: col.haveSum === true && col.editType === "numeric" ? formartNumberic(dataSource.reduce(function(accumulator, currentValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-table-edit",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.5",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@hookform/resolvers": "^2.8.10",
|
|
27
27
|
"@syncfusion/ej2-react-dropdowns": "20.2.36",
|
|
28
|
+
"@types/react-resizable": "^3.0.8",
|
|
28
29
|
"becoxy-icons": "1.8.1",
|
|
29
30
|
"bootstrap": "5.1.0",
|
|
30
31
|
"classnames": "2.3.1",
|
|
@@ -42,9 +43,7 @@
|
|
|
42
43
|
"yup": "^0.32.11"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@types/react-resizable": "^3.0.8",
|
|
46
46
|
"tsup": "^8.0.2",
|
|
47
|
-
"typescript": "^5.4.5"
|
|
48
|
-
"react-resizable": "^3.0.4"
|
|
47
|
+
"typescript": "^5.4.5"
|
|
49
48
|
}
|
|
50
49
|
}
|