react-table-edit 0.1.3 → 0.1.4
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 -7
- package/dist/index.d.ts +6 -7
- package/dist/index.js +24 -45
- package/dist/index.mjs +24 -44
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -136,14 +136,13 @@ type FromItemsField = {
|
|
|
136
136
|
options?: any[];
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
declare const
|
|
140
|
-
declare const
|
|
141
|
-
declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string) => void;
|
|
142
|
-
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string) => void;
|
|
139
|
+
declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
140
|
+
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnCancel?: string) => void;
|
|
143
141
|
declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
144
|
-
declare const
|
|
145
|
-
declare const
|
|
142
|
+
declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle: any, data: any, message: string, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
143
|
+
declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string, title?: string, btnCancel?: string) => void;
|
|
146
144
|
declare const notificationError: (param: string) => string;
|
|
145
|
+
declare const notificationSuccess: (param: string) => string;
|
|
147
146
|
declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
|
|
148
147
|
|
|
149
|
-
export { type FromItemsField, type IColumnTable, type ICommandItem, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditProps, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, TableEdit as default, messageBoxConfirm, messageBoxConfirm2,
|
|
148
|
+
export { type FromItemsField, type IColumnTable, type ICommandItem, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditProps, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, TableEdit as default, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess };
|
package/dist/index.d.ts
CHANGED
|
@@ -136,14 +136,13 @@ type FromItemsField = {
|
|
|
136
136
|
options?: any[];
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
declare const
|
|
140
|
-
declare const
|
|
141
|
-
declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string) => void;
|
|
142
|
-
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string) => void;
|
|
139
|
+
declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
140
|
+
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnCancel?: string) => void;
|
|
143
141
|
declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
|
|
144
|
-
declare const
|
|
145
|
-
declare const
|
|
142
|
+
declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle: any, data: any, message: string, title?: string, btnOk?: string, btnCancel?: string) => void;
|
|
143
|
+
declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string, title?: string, btnCancel?: string) => void;
|
|
146
144
|
declare const notificationError: (param: string) => string;
|
|
145
|
+
declare const notificationSuccess: (param: string) => string;
|
|
147
146
|
declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
|
|
148
147
|
|
|
149
|
-
export { type FromItemsField, type IColumnTable, type ICommandItem, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditProps, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, TableEdit as default, messageBoxConfirm, messageBoxConfirm2,
|
|
148
|
+
export { type FromItemsField, type IColumnTable, type ICommandItem, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFTableEditProps, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, TableEdit as default, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess };
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,6 @@ __export(Table_edit_exports, {
|
|
|
33
33
|
default: () => Table_edit_default,
|
|
34
34
|
messageBoxConfirm: () => messageBoxConfirm,
|
|
35
35
|
messageBoxConfirm2: () => messageBoxConfirm2,
|
|
36
|
-
messageBoxConfirmApprove: () => messageBoxConfirmApprove,
|
|
37
36
|
messageBoxConfirmDelete: () => messageBoxConfirmDelete,
|
|
38
37
|
messageBoxError: () => messageBoxError,
|
|
39
38
|
messageHtmlBoxConfirm: () => messageHtmlBoxConfirm,
|
|
@@ -92,38 +91,16 @@ var import_sweetalert2_react_content = __toESM(require("sweetalert2-react-conten
|
|
|
92
91
|
var import_react_hot_toast = __toESM(require("react-hot-toast"));
|
|
93
92
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
94
93
|
var MySwal = (0, import_sweetalert2_react_content.default)(import_sweetalert2.default);
|
|
95
|
-
var
|
|
96
|
-
return import_react_hot_toast.default.success(
|
|
97
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react2.Fragment, { children: [
|
|
98
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "toastify-header", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "title-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h6", { className: "toast-title", children: param }) }) }),
|
|
99
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "toastify-body", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "list-unstyled mb-0", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", {}) }) })
|
|
100
|
-
] })
|
|
101
|
-
);
|
|
102
|
-
};
|
|
103
|
-
var messageBoxError = (t, message) => {
|
|
104
|
-
MySwal.fire({
|
|
105
|
-
title: t("Important"),
|
|
106
|
-
text: t(message),
|
|
107
|
-
allowOutsideClick: false,
|
|
108
|
-
showCancelButton: true,
|
|
109
|
-
showConfirmButton: false,
|
|
110
|
-
cancelButtonText: t("Ok"),
|
|
111
|
-
customClass: {
|
|
112
|
-
cancelButton: "btn btn-danger ms-1"
|
|
113
|
-
},
|
|
114
|
-
buttonsStyling: false
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
var messageHtmlBoxConfirm = (t, message, handle, data, title) => {
|
|
94
|
+
var messageHtmlBoxConfirm = (t, message, handle, data, title = "Important", btnOk = "Ok", btnCancel = "Cancel") => {
|
|
118
95
|
MySwal.fire({
|
|
119
|
-
title:
|
|
96
|
+
title: t(title),
|
|
120
97
|
html: message.map((item, index) => {
|
|
121
98
|
return `<div style="min-width: 448px padding: 7px width:100% border: 1px solid #e0e0e0${index !== 0 ? " border-top-width: 0px" : ""}">${item}</div>`;
|
|
122
99
|
}).join(""),
|
|
123
100
|
allowOutsideClick: false,
|
|
124
101
|
showCancelButton: true,
|
|
125
|
-
confirmButtonText: t(
|
|
126
|
-
cancelButtonText: t(
|
|
102
|
+
confirmButtonText: t(btnOk),
|
|
103
|
+
cancelButtonText: t(btnCancel),
|
|
127
104
|
customClass: {
|
|
128
105
|
confirmButton: "btn btn-primary",
|
|
129
106
|
cancelButton: "btn btn-danger ms-1"
|
|
@@ -135,16 +112,16 @@ var messageHtmlBoxConfirm = (t, message, handle, data, title) => {
|
|
|
135
112
|
}
|
|
136
113
|
});
|
|
137
114
|
};
|
|
138
|
-
var messageHtmlBoxError = (t, message, title) => {
|
|
115
|
+
var messageHtmlBoxError = (t, message, title = "Important", btnCancel = "Ok") => {
|
|
139
116
|
MySwal.fire({
|
|
140
|
-
title:
|
|
117
|
+
title: t(title),
|
|
141
118
|
html: message.map((item, index) => {
|
|
142
119
|
return `<div style="min-width: 448px padding: 7px width:100% border: 1px solid #e0e0e0${index !== 0 ? " border-top-width: 0px" : ""}">${item}</div>`;
|
|
143
120
|
}).join(""),
|
|
144
121
|
allowOutsideClick: false,
|
|
145
122
|
showCancelButton: true,
|
|
146
123
|
showConfirmButton: false,
|
|
147
|
-
cancelButtonText: t(
|
|
124
|
+
cancelButtonText: t(btnCancel),
|
|
148
125
|
width: "auto",
|
|
149
126
|
customClass: {
|
|
150
127
|
cancelButton: "btn btn-danger ms-1"
|
|
@@ -171,14 +148,14 @@ var messageBoxConfirmDelete = (t, handle, data) => {
|
|
|
171
148
|
}
|
|
172
149
|
});
|
|
173
150
|
};
|
|
174
|
-
var
|
|
151
|
+
var messageBoxConfirm = (t, handle, data, message, title = "Important", btnOk = "Ok", btnCancel = "Cancel") => {
|
|
175
152
|
MySwal.fire({
|
|
176
|
-
title: t(
|
|
177
|
-
text: t(
|
|
153
|
+
title: t(title),
|
|
154
|
+
text: t(message),
|
|
178
155
|
allowOutsideClick: false,
|
|
179
156
|
showCancelButton: true,
|
|
180
|
-
confirmButtonText: t(
|
|
181
|
-
cancelButtonText: t(
|
|
157
|
+
confirmButtonText: t(btnOk),
|
|
158
|
+
cancelButtonText: t(btnCancel),
|
|
182
159
|
customClass: {
|
|
183
160
|
confirmButton: "btn btn-primary",
|
|
184
161
|
cancelButton: "btn btn-danger ms-1"
|
|
@@ -190,23 +167,18 @@ var messageBoxConfirmApprove = (t, handle, data) => {
|
|
|
190
167
|
}
|
|
191
168
|
});
|
|
192
169
|
};
|
|
193
|
-
var
|
|
170
|
+
var messageBoxError = (t, message, title = "Important", btnCancel = "Ok") => {
|
|
194
171
|
MySwal.fire({
|
|
195
|
-
title: t(
|
|
172
|
+
title: t(title),
|
|
196
173
|
text: t(message),
|
|
197
174
|
allowOutsideClick: false,
|
|
198
175
|
showCancelButton: true,
|
|
199
|
-
|
|
200
|
-
cancelButtonText: t(
|
|
176
|
+
showConfirmButton: false,
|
|
177
|
+
cancelButtonText: t(btnCancel),
|
|
201
178
|
customClass: {
|
|
202
|
-
confirmButton: "btn btn-primary",
|
|
203
179
|
cancelButton: "btn btn-danger ms-1"
|
|
204
180
|
},
|
|
205
181
|
buttonsStyling: false
|
|
206
|
-
}).then(async (result) => {
|
|
207
|
-
if (result.value) {
|
|
208
|
-
handle(data);
|
|
209
|
-
}
|
|
210
182
|
});
|
|
211
183
|
};
|
|
212
184
|
var notificationError = (param) => {
|
|
@@ -217,6 +189,14 @@ var notificationError = (param) => {
|
|
|
217
189
|
] })
|
|
218
190
|
);
|
|
219
191
|
};
|
|
192
|
+
var notificationSuccess = (param) => {
|
|
193
|
+
return import_react_hot_toast.default.success(
|
|
194
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react2.Fragment, { children: [
|
|
195
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "toastify-header", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "title-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h6", { className: "toast-title", children: param }) }) }),
|
|
196
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "toastify-body", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "list-unstyled mb-0", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", {}) }) })
|
|
197
|
+
] })
|
|
198
|
+
);
|
|
199
|
+
};
|
|
220
200
|
var messageBoxConfirm2 = async (t, data, data2, message) => {
|
|
221
201
|
return new Promise((resolve) => {
|
|
222
202
|
MySwal.fire({
|
|
@@ -2735,7 +2715,6 @@ var Table_edit_default = table_default;
|
|
|
2735
2715
|
0 && (module.exports = {
|
|
2736
2716
|
messageBoxConfirm,
|
|
2737
2717
|
messageBoxConfirm2,
|
|
2738
|
-
messageBoxConfirmApprove,
|
|
2739
2718
|
messageBoxConfirmDelete,
|
|
2740
2719
|
messageBoxError,
|
|
2741
2720
|
messageHtmlBoxConfirm,
|
package/dist/index.mjs
CHANGED
|
@@ -47,38 +47,16 @@ import withReactContent from "sweetalert2-react-content";
|
|
|
47
47
|
import toast from "react-hot-toast";
|
|
48
48
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
49
49
|
var MySwal = withReactContent(Swal);
|
|
50
|
-
var
|
|
51
|
-
return toast.success(
|
|
52
|
-
/* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
53
|
-
/* @__PURE__ */ jsx2("div", { className: "toastify-header", children: /* @__PURE__ */ jsx2("div", { className: "title-wrapper", children: /* @__PURE__ */ jsx2("h6", { className: "toast-title", children: param }) }) }),
|
|
54
|
-
/* @__PURE__ */ jsx2("div", { className: "toastify-body", children: /* @__PURE__ */ jsx2("ul", { className: "list-unstyled mb-0", children: /* @__PURE__ */ jsx2("li", {}) }) })
|
|
55
|
-
] })
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
var messageBoxError = (t, message) => {
|
|
59
|
-
MySwal.fire({
|
|
60
|
-
title: t("Important"),
|
|
61
|
-
text: t(message),
|
|
62
|
-
allowOutsideClick: false,
|
|
63
|
-
showCancelButton: true,
|
|
64
|
-
showConfirmButton: false,
|
|
65
|
-
cancelButtonText: t("Ok"),
|
|
66
|
-
customClass: {
|
|
67
|
-
cancelButton: "btn btn-danger ms-1"
|
|
68
|
-
},
|
|
69
|
-
buttonsStyling: false
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
var messageHtmlBoxConfirm = (t, message, handle, data, title) => {
|
|
50
|
+
var messageHtmlBoxConfirm = (t, message, handle, data, title = "Important", btnOk = "Ok", btnCancel = "Cancel") => {
|
|
73
51
|
MySwal.fire({
|
|
74
|
-
title:
|
|
52
|
+
title: t(title),
|
|
75
53
|
html: message.map((item, index) => {
|
|
76
54
|
return `<div style="min-width: 448px padding: 7px width:100% border: 1px solid #e0e0e0${index !== 0 ? " border-top-width: 0px" : ""}">${item}</div>`;
|
|
77
55
|
}).join(""),
|
|
78
56
|
allowOutsideClick: false,
|
|
79
57
|
showCancelButton: true,
|
|
80
|
-
confirmButtonText: t(
|
|
81
|
-
cancelButtonText: t(
|
|
58
|
+
confirmButtonText: t(btnOk),
|
|
59
|
+
cancelButtonText: t(btnCancel),
|
|
82
60
|
customClass: {
|
|
83
61
|
confirmButton: "btn btn-primary",
|
|
84
62
|
cancelButton: "btn btn-danger ms-1"
|
|
@@ -90,16 +68,16 @@ var messageHtmlBoxConfirm = (t, message, handle, data, title) => {
|
|
|
90
68
|
}
|
|
91
69
|
});
|
|
92
70
|
};
|
|
93
|
-
var messageHtmlBoxError = (t, message, title) => {
|
|
71
|
+
var messageHtmlBoxError = (t, message, title = "Important", btnCancel = "Ok") => {
|
|
94
72
|
MySwal.fire({
|
|
95
|
-
title:
|
|
73
|
+
title: t(title),
|
|
96
74
|
html: message.map((item, index) => {
|
|
97
75
|
return `<div style="min-width: 448px padding: 7px width:100% border: 1px solid #e0e0e0${index !== 0 ? " border-top-width: 0px" : ""}">${item}</div>`;
|
|
98
76
|
}).join(""),
|
|
99
77
|
allowOutsideClick: false,
|
|
100
78
|
showCancelButton: true,
|
|
101
79
|
showConfirmButton: false,
|
|
102
|
-
cancelButtonText: t(
|
|
80
|
+
cancelButtonText: t(btnCancel),
|
|
103
81
|
width: "auto",
|
|
104
82
|
customClass: {
|
|
105
83
|
cancelButton: "btn btn-danger ms-1"
|
|
@@ -126,14 +104,14 @@ var messageBoxConfirmDelete = (t, handle, data) => {
|
|
|
126
104
|
}
|
|
127
105
|
});
|
|
128
106
|
};
|
|
129
|
-
var
|
|
107
|
+
var messageBoxConfirm = (t, handle, data, message, title = "Important", btnOk = "Ok", btnCancel = "Cancel") => {
|
|
130
108
|
MySwal.fire({
|
|
131
|
-
title: t(
|
|
132
|
-
text: t(
|
|
109
|
+
title: t(title),
|
|
110
|
+
text: t(message),
|
|
133
111
|
allowOutsideClick: false,
|
|
134
112
|
showCancelButton: true,
|
|
135
|
-
confirmButtonText: t(
|
|
136
|
-
cancelButtonText: t(
|
|
113
|
+
confirmButtonText: t(btnOk),
|
|
114
|
+
cancelButtonText: t(btnCancel),
|
|
137
115
|
customClass: {
|
|
138
116
|
confirmButton: "btn btn-primary",
|
|
139
117
|
cancelButton: "btn btn-danger ms-1"
|
|
@@ -145,23 +123,18 @@ var messageBoxConfirmApprove = (t, handle, data) => {
|
|
|
145
123
|
}
|
|
146
124
|
});
|
|
147
125
|
};
|
|
148
|
-
var
|
|
126
|
+
var messageBoxError = (t, message, title = "Important", btnCancel = "Ok") => {
|
|
149
127
|
MySwal.fire({
|
|
150
|
-
title: t(
|
|
128
|
+
title: t(title),
|
|
151
129
|
text: t(message),
|
|
152
130
|
allowOutsideClick: false,
|
|
153
131
|
showCancelButton: true,
|
|
154
|
-
|
|
155
|
-
cancelButtonText: t(
|
|
132
|
+
showConfirmButton: false,
|
|
133
|
+
cancelButtonText: t(btnCancel),
|
|
156
134
|
customClass: {
|
|
157
|
-
confirmButton: "btn btn-primary",
|
|
158
135
|
cancelButton: "btn btn-danger ms-1"
|
|
159
136
|
},
|
|
160
137
|
buttonsStyling: false
|
|
161
|
-
}).then(async (result) => {
|
|
162
|
-
if (result.value) {
|
|
163
|
-
handle(data);
|
|
164
|
-
}
|
|
165
138
|
});
|
|
166
139
|
};
|
|
167
140
|
var notificationError = (param) => {
|
|
@@ -172,6 +145,14 @@ var notificationError = (param) => {
|
|
|
172
145
|
] })
|
|
173
146
|
);
|
|
174
147
|
};
|
|
148
|
+
var notificationSuccess = (param) => {
|
|
149
|
+
return toast.success(
|
|
150
|
+
/* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
151
|
+
/* @__PURE__ */ jsx2("div", { className: "toastify-header", children: /* @__PURE__ */ jsx2("div", { className: "title-wrapper", children: /* @__PURE__ */ jsx2("h6", { className: "toast-title", children: param }) }) }),
|
|
152
|
+
/* @__PURE__ */ jsx2("div", { className: "toastify-body", children: /* @__PURE__ */ jsx2("ul", { className: "list-unstyled mb-0", children: /* @__PURE__ */ jsx2("li", {}) }) })
|
|
153
|
+
] })
|
|
154
|
+
);
|
|
155
|
+
};
|
|
175
156
|
var messageBoxConfirm2 = async (t, data, data2, message) => {
|
|
176
157
|
return new Promise((resolve) => {
|
|
177
158
|
MySwal.fire({
|
|
@@ -2708,7 +2689,6 @@ export {
|
|
|
2708
2689
|
Table_edit_default as default,
|
|
2709
2690
|
messageBoxConfirm,
|
|
2710
2691
|
messageBoxConfirm2,
|
|
2711
|
-
messageBoxConfirmApprove,
|
|
2712
2692
|
messageBoxConfirmDelete,
|
|
2713
2693
|
messageBoxError,
|
|
2714
2694
|
messageHtmlBoxConfirm,
|