react-table-edit 0.0.7 → 0.0.8

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 CHANGED
@@ -138,6 +138,7 @@ type FromItemsField = {
138
138
 
139
139
  declare const notificationSuccess: (param: string) => string;
140
140
  declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string) => void;
141
+ declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string) => void;
141
142
  declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string) => void;
142
143
  declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
143
144
  declare const messageBoxConfirmApprove: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
@@ -145,4 +146,4 @@ declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle
145
146
  declare const notificationError: (param: string) => string;
146
147
  declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
147
148
 
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, messageBoxConfirmApprove, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxError, notificationError, notificationSuccess };
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, messageBoxConfirmApprove, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess };
package/dist/index.d.ts CHANGED
@@ -138,6 +138,7 @@ type FromItemsField = {
138
138
 
139
139
  declare const notificationSuccess: (param: string) => string;
140
140
  declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string) => void;
141
+ declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string) => void;
141
142
  declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string) => void;
142
143
  declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
143
144
  declare const messageBoxConfirmApprove: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
@@ -145,4 +146,4 @@ declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle
145
146
  declare const notificationError: (param: string) => string;
146
147
  declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;
147
148
 
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, messageBoxConfirmApprove, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxError, notificationError, notificationSuccess };
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, messageBoxConfirmApprove, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess };
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ __export(Table_edit_exports, {
36
36
  messageBoxConfirmApprove: () => messageBoxConfirmApprove,
37
37
  messageBoxConfirmDelete: () => messageBoxConfirmDelete,
38
38
  messageBoxError: () => messageBoxError,
39
+ messageHtmlBoxConfirm: () => messageHtmlBoxConfirm,
39
40
  messageHtmlBoxError: () => messageHtmlBoxError,
40
41
  notificationError: () => notificationError,
41
42
  notificationSuccess: () => notificationSuccess
@@ -113,6 +114,27 @@ var messageBoxError = (t, message) => {
113
114
  buttonsStyling: false
114
115
  });
115
116
  };
117
+ var messageHtmlBoxConfirm = (t, message, handle, data, title) => {
118
+ MySwal.fire({
119
+ title: title ? t(title) : t("Important"),
120
+ html: message.map((item, index) => {
121
+ return `<div style="min-width: 448px padding: 7px width:100% border: 1px solid #e0e0e0${index !== 0 ? " border-top-width: 0px" : ""}">${item}</div>`;
122
+ }).join(""),
123
+ allowOutsideClick: false,
124
+ showCancelButton: true,
125
+ confirmButtonText: t("Ok"),
126
+ cancelButtonText: t("Cancel"),
127
+ customClass: {
128
+ confirmButton: "btn btn-primary",
129
+ cancelButton: "btn btn-danger ms-1"
130
+ },
131
+ buttonsStyling: false
132
+ }).then(async (result) => {
133
+ if (result.value) {
134
+ handle(data);
135
+ }
136
+ });
137
+ };
116
138
  var messageHtmlBoxError = (t, message, title) => {
117
139
  MySwal.fire({
118
140
  title: title ? t(title) : t("Important"),
@@ -1503,9 +1525,9 @@ var TableEdit = (0, import_react12.forwardRef)((props, ref) => {
1503
1525
  }
1504
1526
  }
1505
1527
  }
1506
- }
1507
- if (dataSourceChange) {
1508
- dataSourceChange(dataSource);
1528
+ if (dataSourceChange) {
1529
+ dataSourceChange(dataSource);
1530
+ }
1509
1531
  }
1510
1532
  }
1511
1533
  };
@@ -2713,6 +2735,7 @@ var Table_edit_default = table_default;
2713
2735
  messageBoxConfirmApprove,
2714
2736
  messageBoxConfirmDelete,
2715
2737
  messageBoxError,
2738
+ messageHtmlBoxConfirm,
2716
2739
  messageHtmlBoxError,
2717
2740
  notificationError,
2718
2741
  notificationSuccess
package/dist/index.mjs CHANGED
@@ -69,6 +69,27 @@ var messageBoxError = (t, message) => {
69
69
  buttonsStyling: false
70
70
  });
71
71
  };
72
+ var messageHtmlBoxConfirm = (t, message, handle, data, title) => {
73
+ MySwal.fire({
74
+ title: title ? t(title) : t("Important"),
75
+ html: message.map((item, index) => {
76
+ return `<div style="min-width: 448px padding: 7px width:100% border: 1px solid #e0e0e0${index !== 0 ? " border-top-width: 0px" : ""}">${item}</div>`;
77
+ }).join(""),
78
+ allowOutsideClick: false,
79
+ showCancelButton: true,
80
+ confirmButtonText: t("Ok"),
81
+ cancelButtonText: t("Cancel"),
82
+ customClass: {
83
+ confirmButton: "btn btn-primary",
84
+ cancelButton: "btn btn-danger ms-1"
85
+ },
86
+ buttonsStyling: false
87
+ }).then(async (result) => {
88
+ if (result.value) {
89
+ handle(data);
90
+ }
91
+ });
92
+ };
72
93
  var messageHtmlBoxError = (t, message, title) => {
73
94
  MySwal.fire({
74
95
  title: title ? t(title) : t("Important"),
@@ -1477,9 +1498,9 @@ var TableEdit = forwardRef2((props, ref) => {
1477
1498
  }
1478
1499
  }
1479
1500
  }
1480
- }
1481
- if (dataSourceChange) {
1482
- dataSourceChange(dataSource);
1501
+ if (dataSourceChange) {
1502
+ dataSourceChange(dataSource);
1503
+ }
1483
1504
  }
1484
1505
  }
1485
1506
  };
@@ -2687,6 +2708,7 @@ export {
2687
2708
  messageBoxConfirmApprove,
2688
2709
  messageBoxConfirmDelete,
2689
2710
  messageBoxError,
2711
+ messageHtmlBoxConfirm,
2690
2712
  messageHtmlBoxError,
2691
2713
  notificationError,
2692
2714
  notificationSuccess
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-table-edit",
3
3
  "license": "MIT",
4
- "version": "0.0.7",
4
+ "version": "0.0.8",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",