react-table-edit 1.2.50 → 1.2.51
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.js +14 -5
- package/dist/index.mjs +17 -8
- package/package.json +24 -9
package/dist/index.js
CHANGED
|
@@ -2882,18 +2882,27 @@ var sidebar_setting_column_default = SidebarSetColumn;
|
|
|
2882
2882
|
var import_react16 = require("react");
|
|
2883
2883
|
var import_react_datepicker = __toESM(require("react-datepicker"));
|
|
2884
2884
|
var import_react_input_mask = __toESM(require("react-input-mask"));
|
|
2885
|
+
var import_react_datepicker2 = require("react-datepicker/dist/react-datepicker.css");
|
|
2885
2886
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2886
|
-
var
|
|
2887
|
+
var CustomInput = ({ value, onChange }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2888
|
+
import_react_input_mask.default,
|
|
2889
|
+
{
|
|
2890
|
+
mask: "99/99/9999",
|
|
2891
|
+
placeholder: "dd/MM/yyyy",
|
|
2892
|
+
value,
|
|
2893
|
+
onChange
|
|
2894
|
+
}
|
|
2895
|
+
);
|
|
2896
|
+
var DateInput = (props) => {
|
|
2887
2897
|
const { id, onKeyDown, dateFormat, className, onChange, value } = props;
|
|
2888
2898
|
const [open, setOpen] = (0, import_react16.useState)(false);
|
|
2889
2899
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2890
2900
|
import_react_datepicker.default,
|
|
2891
2901
|
{
|
|
2892
2902
|
id,
|
|
2893
|
-
ref,
|
|
2894
2903
|
open,
|
|
2895
2904
|
className,
|
|
2896
|
-
selected: value,
|
|
2905
|
+
selected: value instanceof Date ? value : null,
|
|
2897
2906
|
onChange: (date) => {
|
|
2898
2907
|
if (onChange) {
|
|
2899
2908
|
onChange(date);
|
|
@@ -2906,7 +2915,7 @@ var DateInput = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
2906
2915
|
dropdownMode: "select",
|
|
2907
2916
|
onCalendarClose: () => setOpen(false),
|
|
2908
2917
|
onCalendarOpen: () => setOpen(true),
|
|
2909
|
-
customInput: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2918
|
+
customInput: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CustomInput, {}),
|
|
2910
2919
|
onKeyDown: (e) => {
|
|
2911
2920
|
if (e.code === "Space") {
|
|
2912
2921
|
setOpen(!open);
|
|
@@ -2927,7 +2936,7 @@ var DateInput = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
2927
2936
|
}
|
|
2928
2937
|
}
|
|
2929
2938
|
);
|
|
2930
|
-
}
|
|
2939
|
+
};
|
|
2931
2940
|
var input_date_default = DateInput;
|
|
2932
2941
|
|
|
2933
2942
|
// src/component/table/index.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/component/table/index.tsx
|
|
2
|
-
import { Fragment as Fragment21, forwardRef as
|
|
2
|
+
import { Fragment as Fragment21, forwardRef as forwardRef4, useEffect as useEffect9, useImperativeHandle, useRef as useRef4, useState as useState9 } from "react";
|
|
3
3
|
import { Button as Button6, DropdownMenu as DropdownMenu4, DropdownToggle as DropdownToggle4, Input as Input8, UncontrolledDropdown, UncontrolledTooltip as UncontrolledTooltip5 } from "reactstrap";
|
|
4
4
|
import classnames9 from "classnames";
|
|
5
5
|
import { useTranslation as useTranslation12 } from "react-i18next";
|
|
@@ -2849,21 +2849,30 @@ var SidebarSetColumn = (props) => {
|
|
|
2849
2849
|
var sidebar_setting_column_default = SidebarSetColumn;
|
|
2850
2850
|
|
|
2851
2851
|
// src/component/input-date/index.tsx
|
|
2852
|
-
import {
|
|
2852
|
+
import { useState as useState8 } from "react";
|
|
2853
2853
|
import DatePicker from "react-datepicker";
|
|
2854
2854
|
import InputMask from "react-input-mask";
|
|
2855
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
2855
2856
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2856
|
-
var
|
|
2857
|
+
var CustomInput = ({ value, onChange }) => /* @__PURE__ */ jsx17(
|
|
2858
|
+
InputMask,
|
|
2859
|
+
{
|
|
2860
|
+
mask: "99/99/9999",
|
|
2861
|
+
placeholder: "dd/MM/yyyy",
|
|
2862
|
+
value,
|
|
2863
|
+
onChange
|
|
2864
|
+
}
|
|
2865
|
+
);
|
|
2866
|
+
var DateInput = (props) => {
|
|
2857
2867
|
const { id, onKeyDown, dateFormat, className, onChange, value } = props;
|
|
2858
2868
|
const [open, setOpen] = useState8(false);
|
|
2859
2869
|
return /* @__PURE__ */ jsx17(
|
|
2860
2870
|
DatePicker,
|
|
2861
2871
|
{
|
|
2862
2872
|
id,
|
|
2863
|
-
ref,
|
|
2864
2873
|
open,
|
|
2865
2874
|
className,
|
|
2866
|
-
selected: value,
|
|
2875
|
+
selected: value instanceof Date ? value : null,
|
|
2867
2876
|
onChange: (date) => {
|
|
2868
2877
|
if (onChange) {
|
|
2869
2878
|
onChange(date);
|
|
@@ -2876,7 +2885,7 @@ var DateInput = forwardRef4((props, ref) => {
|
|
|
2876
2885
|
dropdownMode: "select",
|
|
2877
2886
|
onCalendarClose: () => setOpen(false),
|
|
2878
2887
|
onCalendarOpen: () => setOpen(true),
|
|
2879
|
-
customInput: /* @__PURE__ */ jsx17(
|
|
2888
|
+
customInput: /* @__PURE__ */ jsx17(CustomInput, {}),
|
|
2880
2889
|
onKeyDown: (e) => {
|
|
2881
2890
|
if (e.code === "Space") {
|
|
2882
2891
|
setOpen(!open);
|
|
@@ -2897,12 +2906,12 @@ var DateInput = forwardRef4((props, ref) => {
|
|
|
2897
2906
|
}
|
|
2898
2907
|
}
|
|
2899
2908
|
);
|
|
2900
|
-
}
|
|
2909
|
+
};
|
|
2901
2910
|
var input_date_default = DateInput;
|
|
2902
2911
|
|
|
2903
2912
|
// src/component/table/index.tsx
|
|
2904
2913
|
import { Fragment as Fragment22, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2905
|
-
var TableEdit =
|
|
2914
|
+
var TableEdit = forwardRef4((props, ref) => {
|
|
2906
2915
|
const { t } = useTranslation12();
|
|
2907
2916
|
const {
|
|
2908
2917
|
idTable,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-table-edit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.51",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
12
|
-
"start": "node dist/index.js"
|
|
12
|
+
"start": "node dist/index.js",
|
|
13
|
+
"test": "jest",
|
|
14
|
+
"lint": "eslint . --ext .ts,.tsx"
|
|
13
15
|
},
|
|
14
16
|
"keywords": [
|
|
15
17
|
"react",
|
|
@@ -19,35 +21,48 @@
|
|
|
19
21
|
"table-edit",
|
|
20
22
|
"datagrid"
|
|
21
23
|
],
|
|
24
|
+
"description": "A React table editing solution with customizable features",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/<your-username>/react-table-edit"
|
|
28
|
+
},
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/<your-username>/react-table-edit/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/<your-username>/react-table-edit#readme",
|
|
22
33
|
"license": "ISC",
|
|
23
34
|
"author": "hungnv",
|
|
24
35
|
"dependencies": {
|
|
25
36
|
"@hookform/resolvers": "^2.8.10",
|
|
26
|
-
"@types/react-datepicker": "^7.0.0",
|
|
27
|
-
"@types/react-input-mask": "^3.0.6",
|
|
28
37
|
"@types/react-resizable": "^3.0.7",
|
|
29
38
|
"becoxy-icons": "1.8.1",
|
|
30
39
|
"classnames": "2.3.1",
|
|
31
40
|
"i18next": "^21.8.2",
|
|
32
|
-
"react-datepicker": "^7.5.0",
|
|
33
41
|
"react-hook-form": "7.43.9",
|
|
34
42
|
"react-hot-toast": "2.2.0",
|
|
35
43
|
"react-i18next": "^11.16.9",
|
|
36
|
-
"react-input-mask": "^2.0.4",
|
|
37
44
|
"react-number-format": "^5.3.3",
|
|
38
45
|
"react-resizable": "^3.0.5",
|
|
39
46
|
"react-router-dom": "^6.3.0",
|
|
40
47
|
"reactstrap": "9.0.1",
|
|
41
48
|
"sweetalert2": "^11.4.14",
|
|
42
49
|
"sweetalert2-react-content": "^5.0.0",
|
|
43
|
-
"yup": "^0.32.11"
|
|
50
|
+
"yup": "^0.32.11",
|
|
51
|
+
"react-datepicker": "^7.3.0",
|
|
52
|
+
"react-input-mask": "^2.0.4"
|
|
44
53
|
},
|
|
45
54
|
"peerDependencies": {
|
|
46
|
-
"react": ">=16.8.6",
|
|
47
|
-
"react-dom": ">=16.8.6"
|
|
55
|
+
"react": ">=16.8.6 <19.0.0",
|
|
56
|
+
"react-dom": ">=16.8.6 <19.0.0"
|
|
48
57
|
},
|
|
49
58
|
"devDependencies": {
|
|
59
|
+
"@types/react-datepicker": "^6.2.0",
|
|
60
|
+
"@types/react-input-mask": "^3.0.6",
|
|
50
61
|
"tsup": "^8.0.2",
|
|
51
62
|
"typescript": "^5.6.3"
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=14.0.0",
|
|
66
|
+
"npm": ">=6.0.0"
|
|
52
67
|
}
|
|
53
68
|
}
|