@teselagen/ui 0.3.71 → 0.3.72
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/index.cjs.js +63 -36
- package/index.es.js +63 -36
- package/package.json +1 -1
- package/src/DataTable/index.js +48 -27
- package/src/FormComponents/Uploader.js +4 -5
package/index.cjs.js
CHANGED
|
@@ -17117,16 +17117,25 @@ var toString$6 = {}.toString;
|
|
|
17117
17117
|
var _cof = /* @__PURE__ */ __name(function(it) {
|
|
17118
17118
|
return toString$6.call(it).slice(8, -1);
|
|
17119
17119
|
}, "_cof");
|
|
17120
|
-
var
|
|
17121
|
-
var
|
|
17122
|
-
|
|
17123
|
-
|
|
17120
|
+
var _iobject;
|
|
17121
|
+
var hasRequired_iobject;
|
|
17122
|
+
function require_iobject() {
|
|
17123
|
+
if (hasRequired_iobject)
|
|
17124
|
+
return _iobject;
|
|
17125
|
+
hasRequired_iobject = 1;
|
|
17126
|
+
var cof2 = _cof;
|
|
17127
|
+
_iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
|
|
17128
|
+
return cof2(it) == "String" ? it.split("") : Object(it);
|
|
17129
|
+
};
|
|
17130
|
+
return _iobject;
|
|
17131
|
+
}
|
|
17132
|
+
__name(require_iobject, "require_iobject");
|
|
17124
17133
|
var _defined = /* @__PURE__ */ __name(function(it) {
|
|
17125
17134
|
if (it == void 0)
|
|
17126
17135
|
throw TypeError("Can't call method on " + it);
|
|
17127
17136
|
return it;
|
|
17128
17137
|
}, "_defined");
|
|
17129
|
-
var IObject =
|
|
17138
|
+
var IObject = require_iobject();
|
|
17130
17139
|
var defined$2 = _defined;
|
|
17131
17140
|
var _toIobject = /* @__PURE__ */ __name(function(it) {
|
|
17132
17141
|
return IObject(defined$2(it));
|
|
@@ -17247,7 +17256,7 @@ function require_objectAssign() {
|
|
|
17247
17256
|
var gOPS2 = _objectGops;
|
|
17248
17257
|
var pIE2 = require_objectPie();
|
|
17249
17258
|
var toObject2 = _toObject;
|
|
17250
|
-
var IObject2 =
|
|
17259
|
+
var IObject2 = require_iobject();
|
|
17251
17260
|
var $assign = Object.assign;
|
|
17252
17261
|
_objectAssign = !$assign || _fails(function() {
|
|
17253
17262
|
var A2 = {};
|
|
@@ -55774,7 +55783,7 @@ const _DataTable = class _DataTable extends React$1.Component {
|
|
|
55774
55783
|
onFinishMsg: "Column Copied"
|
|
55775
55784
|
});
|
|
55776
55785
|
}, "handleCopyColumn"));
|
|
55777
|
-
__publicField(this, "handleCopyRows", /* @__PURE__ */ __name((rowElsToCopy, { specificColumn, onFinishMsg } = {}) => {
|
|
55786
|
+
__publicField(this, "handleCopyRows", /* @__PURE__ */ __name((rowElsToCopy, { specificColumn, onFinishMsg, isDownload } = {}) => {
|
|
55778
55787
|
let textToCopy = [];
|
|
55779
55788
|
const jsonToCopy = [];
|
|
55780
55789
|
lodashExports.forEach(rowElsToCopy, (rowEl) => {
|
|
@@ -55785,7 +55794,15 @@ const _DataTable = class _DataTable extends React$1.Component {
|
|
|
55785
55794
|
textToCopy = textToCopy.filter((text2) => text2).join("\n");
|
|
55786
55795
|
if (!textToCopy)
|
|
55787
55796
|
return window.toastr.warning("No text to copy");
|
|
55788
|
-
|
|
55797
|
+
if (isDownload) {
|
|
55798
|
+
downloadjs(textToCopy.replaceAll(" ", ","), "tableData.csv", "text/csv");
|
|
55799
|
+
} else {
|
|
55800
|
+
this.handleCopyHelper(
|
|
55801
|
+
textToCopy,
|
|
55802
|
+
jsonToCopy,
|
|
55803
|
+
onFinishMsg || "Row Copied"
|
|
55804
|
+
);
|
|
55805
|
+
}
|
|
55789
55806
|
}, "handleCopyRows"));
|
|
55790
55807
|
__publicField(this, "updateEntitiesHelper", /* @__PURE__ */ __name((ents, fn4) => {
|
|
55791
55808
|
const { change, reduxFormEntitiesUndoRedoStack = { currentVersion: 0 } } = this.props;
|
|
@@ -55838,14 +55855,14 @@ const _DataTable = class _DataTable extends React$1.Component {
|
|
|
55838
55855
|
window.toastr.success(message);
|
|
55839
55856
|
}
|
|
55840
55857
|
}, "handleCopyHelper"));
|
|
55841
|
-
__publicField(this, "handleCopyTable", /* @__PURE__ */ __name((e2) => {
|
|
55858
|
+
__publicField(this, "handleCopyTable", /* @__PURE__ */ __name((e2, opts) => {
|
|
55842
55859
|
try {
|
|
55843
55860
|
const allRowEls = getAllRows(e2);
|
|
55844
55861
|
if (!allRowEls)
|
|
55845
55862
|
return;
|
|
55846
|
-
this.handleCopyRows(allRowEls, {
|
|
55863
|
+
this.handleCopyRows(allRowEls, __spreadProps(__spreadValues({}, opts), {
|
|
55847
55864
|
onFinishMsg: "Table Copied"
|
|
55848
|
-
});
|
|
55865
|
+
}));
|
|
55849
55866
|
} catch (error) {
|
|
55850
55867
|
console.error(`error:`, error);
|
|
55851
55868
|
window.toastr.error("Error copying rows.");
|
|
@@ -58097,27 +58114,6 @@ const _DataTable = class _DataTable extends React$1.Component {
|
|
|
58097
58114
|
if (n2)
|
|
58098
58115
|
this.table = n2;
|
|
58099
58116
|
},
|
|
58100
|
-
additionalBodyEl: isCellEditable && !onlyShowRowsWErrors && /* @__PURE__ */ React$1.createElement(
|
|
58101
|
-
"div",
|
|
58102
|
-
{
|
|
58103
|
-
style: {
|
|
58104
|
-
width: "100%",
|
|
58105
|
-
display: "flex",
|
|
58106
|
-
justifyContent: "center"
|
|
58107
|
-
}
|
|
58108
|
-
},
|
|
58109
|
-
/* @__PURE__ */ React$1.createElement(
|
|
58110
|
-
core$5.Button,
|
|
58111
|
-
{
|
|
58112
|
-
icon: "add",
|
|
58113
|
-
onClick: () => {
|
|
58114
|
-
this.insertRows({ numRows: 10, appendToBottom: true });
|
|
58115
|
-
},
|
|
58116
|
-
minimal: true
|
|
58117
|
-
},
|
|
58118
|
-
"Add 10 Rows"
|
|
58119
|
-
)
|
|
58120
|
-
),
|
|
58121
58117
|
className: classNames({
|
|
58122
58118
|
isCellEditable,
|
|
58123
58119
|
"tg-table-loading": isLoading,
|
|
@@ -58159,6 +58155,37 @@ const _DataTable = class _DataTable extends React$1.Component {
|
|
|
58159
58155
|
SubComponent: SubComponentToUse
|
|
58160
58156
|
}, ReactTableProps)
|
|
58161
58157
|
),
|
|
58158
|
+
isCellEditable && /* @__PURE__ */ React$1.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React$1.createElement(
|
|
58159
|
+
"div",
|
|
58160
|
+
{
|
|
58161
|
+
style: {
|
|
58162
|
+
width: "100%",
|
|
58163
|
+
display: "flex",
|
|
58164
|
+
justifyContent: "center"
|
|
58165
|
+
}
|
|
58166
|
+
},
|
|
58167
|
+
!onlyShowRowsWErrors && /* @__PURE__ */ React$1.createElement(
|
|
58168
|
+
core$5.Button,
|
|
58169
|
+
{
|
|
58170
|
+
icon: "add",
|
|
58171
|
+
onClick: () => {
|
|
58172
|
+
this.insertRows({ numRows: 10, appendToBottom: true });
|
|
58173
|
+
},
|
|
58174
|
+
minimal: true
|
|
58175
|
+
},
|
|
58176
|
+
"Add 10 Rows"
|
|
58177
|
+
)
|
|
58178
|
+
), /* @__PURE__ */ React$1.createElement(
|
|
58179
|
+
core$5.Button,
|
|
58180
|
+
{
|
|
58181
|
+
onClick: (e2) => {
|
|
58182
|
+
this.handleCopyTable(e2, { isDownload: true });
|
|
58183
|
+
},
|
|
58184
|
+
"data-tip": "Download Table as CSV",
|
|
58185
|
+
minimal: true,
|
|
58186
|
+
icon: "download"
|
|
58187
|
+
}
|
|
58188
|
+
)),
|
|
58162
58189
|
!noFooter && /* @__PURE__ */ React$1.createElement(
|
|
58163
58190
|
"div",
|
|
58164
58191
|
{
|
|
@@ -70704,7 +70731,7 @@ function UploaderInner({
|
|
|
70704
70731
|
dropzoneProps = {},
|
|
70705
70732
|
overflowList,
|
|
70706
70733
|
autoUnzip,
|
|
70707
|
-
_disabled,
|
|
70734
|
+
disabled: _disabled,
|
|
70708
70735
|
noBuildCsvOption,
|
|
70709
70736
|
initializeForm,
|
|
70710
70737
|
showFilesCount,
|
|
@@ -70732,9 +70759,9 @@ function UploaderInner({
|
|
|
70732
70759
|
}
|
|
70733
70760
|
if (acceptLoading)
|
|
70734
70761
|
dropzoneDisabled = true;
|
|
70735
|
-
const accept = !_accept ? void 0 :
|
|
70736
|
-
const callout = _callout || ((_b = (_a2 = accept.find) == null ? void 0 : _a2.call(accept, (a2) => a2 == null ? void 0 : a2.callout)) == null ? void 0 : _b.callout);
|
|
70737
|
-
const validateAgainstSchemaToUse = _validateAgainstSchema || ((_d = (_c = accept.find) == null ? void 0 : _c.call(accept, (a2) => a2 == null ? void 0 : a2.validateAgainstSchema)) == null ? void 0 : _d.validateAgainstSchema);
|
|
70762
|
+
const accept = !_accept ? void 0 : isAcceptPromise && !resolvedAccept ? [] : lodashExports.isPlainObject(_accept) ? [_accept] : lodashExports.isArray(_accept) ? _accept : _accept.split(",").map((a2) => ({ type: a2 }));
|
|
70763
|
+
const callout = _callout || ((_b = (_a2 = accept == null ? void 0 : accept.find) == null ? void 0 : _a2.call(accept, (a2) => a2 == null ? void 0 : a2.callout)) == null ? void 0 : _b.callout);
|
|
70764
|
+
const validateAgainstSchemaToUse = _validateAgainstSchema || ((_d = (_c = accept == null ? void 0 : accept.find) == null ? void 0 : _c.call(accept, (a2) => a2 == null ? void 0 : a2.validateAgainstSchema)) == null ? void 0 : _d.validateAgainstSchema);
|
|
70738
70765
|
React$1.useEffect(() => {
|
|
70739
70766
|
validateAgainstSchemaStore.current.setValidateAgainstSchema(
|
|
70740
70767
|
validateAgainstSchemaToUse
|
package/index.es.js
CHANGED
|
@@ -17099,16 +17099,25 @@ var toString$6 = {}.toString;
|
|
|
17099
17099
|
var _cof = /* @__PURE__ */ __name(function(it) {
|
|
17100
17100
|
return toString$6.call(it).slice(8, -1);
|
|
17101
17101
|
}, "_cof");
|
|
17102
|
-
var
|
|
17103
|
-
var
|
|
17104
|
-
|
|
17105
|
-
|
|
17102
|
+
var _iobject;
|
|
17103
|
+
var hasRequired_iobject;
|
|
17104
|
+
function require_iobject() {
|
|
17105
|
+
if (hasRequired_iobject)
|
|
17106
|
+
return _iobject;
|
|
17107
|
+
hasRequired_iobject = 1;
|
|
17108
|
+
var cof2 = _cof;
|
|
17109
|
+
_iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
|
|
17110
|
+
return cof2(it) == "String" ? it.split("") : Object(it);
|
|
17111
|
+
};
|
|
17112
|
+
return _iobject;
|
|
17113
|
+
}
|
|
17114
|
+
__name(require_iobject, "require_iobject");
|
|
17106
17115
|
var _defined = /* @__PURE__ */ __name(function(it) {
|
|
17107
17116
|
if (it == void 0)
|
|
17108
17117
|
throw TypeError("Can't call method on " + it);
|
|
17109
17118
|
return it;
|
|
17110
17119
|
}, "_defined");
|
|
17111
|
-
var IObject =
|
|
17120
|
+
var IObject = require_iobject();
|
|
17112
17121
|
var defined$2 = _defined;
|
|
17113
17122
|
var _toIobject = /* @__PURE__ */ __name(function(it) {
|
|
17114
17123
|
return IObject(defined$2(it));
|
|
@@ -17229,7 +17238,7 @@ function require_objectAssign() {
|
|
|
17229
17238
|
var gOPS2 = _objectGops;
|
|
17230
17239
|
var pIE2 = require_objectPie();
|
|
17231
17240
|
var toObject2 = _toObject;
|
|
17232
|
-
var IObject2 =
|
|
17241
|
+
var IObject2 = require_iobject();
|
|
17233
17242
|
var $assign = Object.assign;
|
|
17234
17243
|
_objectAssign = !$assign || _fails(function() {
|
|
17235
17244
|
var A2 = {};
|
|
@@ -55756,7 +55765,7 @@ const _DataTable = class _DataTable extends React__default.Component {
|
|
|
55756
55765
|
onFinishMsg: "Column Copied"
|
|
55757
55766
|
});
|
|
55758
55767
|
}, "handleCopyColumn"));
|
|
55759
|
-
__publicField(this, "handleCopyRows", /* @__PURE__ */ __name((rowElsToCopy, { specificColumn, onFinishMsg } = {}) => {
|
|
55768
|
+
__publicField(this, "handleCopyRows", /* @__PURE__ */ __name((rowElsToCopy, { specificColumn, onFinishMsg, isDownload } = {}) => {
|
|
55760
55769
|
let textToCopy = [];
|
|
55761
55770
|
const jsonToCopy = [];
|
|
55762
55771
|
lodashExports.forEach(rowElsToCopy, (rowEl) => {
|
|
@@ -55767,7 +55776,15 @@ const _DataTable = class _DataTable extends React__default.Component {
|
|
|
55767
55776
|
textToCopy = textToCopy.filter((text2) => text2).join("\n");
|
|
55768
55777
|
if (!textToCopy)
|
|
55769
55778
|
return window.toastr.warning("No text to copy");
|
|
55770
|
-
|
|
55779
|
+
if (isDownload) {
|
|
55780
|
+
downloadjs(textToCopy.replaceAll(" ", ","), "tableData.csv", "text/csv");
|
|
55781
|
+
} else {
|
|
55782
|
+
this.handleCopyHelper(
|
|
55783
|
+
textToCopy,
|
|
55784
|
+
jsonToCopy,
|
|
55785
|
+
onFinishMsg || "Row Copied"
|
|
55786
|
+
);
|
|
55787
|
+
}
|
|
55771
55788
|
}, "handleCopyRows"));
|
|
55772
55789
|
__publicField(this, "updateEntitiesHelper", /* @__PURE__ */ __name((ents, fn4) => {
|
|
55773
55790
|
const { change: change2, reduxFormEntitiesUndoRedoStack = { currentVersion: 0 } } = this.props;
|
|
@@ -55820,14 +55837,14 @@ const _DataTable = class _DataTable extends React__default.Component {
|
|
|
55820
55837
|
window.toastr.success(message);
|
|
55821
55838
|
}
|
|
55822
55839
|
}, "handleCopyHelper"));
|
|
55823
|
-
__publicField(this, "handleCopyTable", /* @__PURE__ */ __name((e2) => {
|
|
55840
|
+
__publicField(this, "handleCopyTable", /* @__PURE__ */ __name((e2, opts) => {
|
|
55824
55841
|
try {
|
|
55825
55842
|
const allRowEls = getAllRows(e2);
|
|
55826
55843
|
if (!allRowEls)
|
|
55827
55844
|
return;
|
|
55828
|
-
this.handleCopyRows(allRowEls, {
|
|
55845
|
+
this.handleCopyRows(allRowEls, __spreadProps(__spreadValues({}, opts), {
|
|
55829
55846
|
onFinishMsg: "Table Copied"
|
|
55830
|
-
});
|
|
55847
|
+
}));
|
|
55831
55848
|
} catch (error) {
|
|
55832
55849
|
console.error(`error:`, error);
|
|
55833
55850
|
window.toastr.error("Error copying rows.");
|
|
@@ -58079,27 +58096,6 @@ const _DataTable = class _DataTable extends React__default.Component {
|
|
|
58079
58096
|
if (n2)
|
|
58080
58097
|
this.table = n2;
|
|
58081
58098
|
},
|
|
58082
|
-
additionalBodyEl: isCellEditable && !onlyShowRowsWErrors && /* @__PURE__ */ React__default.createElement(
|
|
58083
|
-
"div",
|
|
58084
|
-
{
|
|
58085
|
-
style: {
|
|
58086
|
-
width: "100%",
|
|
58087
|
-
display: "flex",
|
|
58088
|
-
justifyContent: "center"
|
|
58089
|
-
}
|
|
58090
|
-
},
|
|
58091
|
-
/* @__PURE__ */ React__default.createElement(
|
|
58092
|
-
Button,
|
|
58093
|
-
{
|
|
58094
|
-
icon: "add",
|
|
58095
|
-
onClick: () => {
|
|
58096
|
-
this.insertRows({ numRows: 10, appendToBottom: true });
|
|
58097
|
-
},
|
|
58098
|
-
minimal: true
|
|
58099
|
-
},
|
|
58100
|
-
"Add 10 Rows"
|
|
58101
|
-
)
|
|
58102
|
-
),
|
|
58103
58099
|
className: classNames({
|
|
58104
58100
|
isCellEditable,
|
|
58105
58101
|
"tg-table-loading": isLoading,
|
|
@@ -58141,6 +58137,37 @@ const _DataTable = class _DataTable extends React__default.Component {
|
|
|
58141
58137
|
SubComponent: SubComponentToUse
|
|
58142
58138
|
}, ReactTableProps)
|
|
58143
58139
|
),
|
|
58140
|
+
isCellEditable && /* @__PURE__ */ React__default.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React__default.createElement(
|
|
58141
|
+
"div",
|
|
58142
|
+
{
|
|
58143
|
+
style: {
|
|
58144
|
+
width: "100%",
|
|
58145
|
+
display: "flex",
|
|
58146
|
+
justifyContent: "center"
|
|
58147
|
+
}
|
|
58148
|
+
},
|
|
58149
|
+
!onlyShowRowsWErrors && /* @__PURE__ */ React__default.createElement(
|
|
58150
|
+
Button,
|
|
58151
|
+
{
|
|
58152
|
+
icon: "add",
|
|
58153
|
+
onClick: () => {
|
|
58154
|
+
this.insertRows({ numRows: 10, appendToBottom: true });
|
|
58155
|
+
},
|
|
58156
|
+
minimal: true
|
|
58157
|
+
},
|
|
58158
|
+
"Add 10 Rows"
|
|
58159
|
+
)
|
|
58160
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
58161
|
+
Button,
|
|
58162
|
+
{
|
|
58163
|
+
onClick: (e2) => {
|
|
58164
|
+
this.handleCopyTable(e2, { isDownload: true });
|
|
58165
|
+
},
|
|
58166
|
+
"data-tip": "Download Table as CSV",
|
|
58167
|
+
minimal: true,
|
|
58168
|
+
icon: "download"
|
|
58169
|
+
}
|
|
58170
|
+
)),
|
|
58144
58171
|
!noFooter && /* @__PURE__ */ React__default.createElement(
|
|
58145
58172
|
"div",
|
|
58146
58173
|
{
|
|
@@ -70686,7 +70713,7 @@ function UploaderInner({
|
|
|
70686
70713
|
dropzoneProps = {},
|
|
70687
70714
|
overflowList,
|
|
70688
70715
|
autoUnzip,
|
|
70689
|
-
_disabled,
|
|
70716
|
+
disabled: _disabled,
|
|
70690
70717
|
noBuildCsvOption,
|
|
70691
70718
|
initializeForm,
|
|
70692
70719
|
showFilesCount,
|
|
@@ -70714,9 +70741,9 @@ function UploaderInner({
|
|
|
70714
70741
|
}
|
|
70715
70742
|
if (acceptLoading)
|
|
70716
70743
|
dropzoneDisabled = true;
|
|
70717
|
-
const accept = !_accept ? void 0 :
|
|
70718
|
-
const callout = _callout || ((_b = (_a2 = accept.find) == null ? void 0 : _a2.call(accept, (a2) => a2 == null ? void 0 : a2.callout)) == null ? void 0 : _b.callout);
|
|
70719
|
-
const validateAgainstSchemaToUse = _validateAgainstSchema || ((_d = (_c = accept.find) == null ? void 0 : _c.call(accept, (a2) => a2 == null ? void 0 : a2.validateAgainstSchema)) == null ? void 0 : _d.validateAgainstSchema);
|
|
70744
|
+
const accept = !_accept ? void 0 : isAcceptPromise && !resolvedAccept ? [] : lodashExports.isPlainObject(_accept) ? [_accept] : lodashExports.isArray(_accept) ? _accept : _accept.split(",").map((a2) => ({ type: a2 }));
|
|
70745
|
+
const callout = _callout || ((_b = (_a2 = accept == null ? void 0 : accept.find) == null ? void 0 : _a2.call(accept, (a2) => a2 == null ? void 0 : a2.callout)) == null ? void 0 : _b.callout);
|
|
70746
|
+
const validateAgainstSchemaToUse = _validateAgainstSchema || ((_d = (_c = accept == null ? void 0 : accept.find) == null ? void 0 : _c.call(accept, (a2) => a2 == null ? void 0 : a2.validateAgainstSchema)) == null ? void 0 : _d.validateAgainstSchema);
|
|
70720
70747
|
useEffect(() => {
|
|
70721
70748
|
validateAgainstSchemaStore.current.setValidateAgainstSchema(
|
|
70722
70749
|
validateAgainstSchemaToUse
|
package/package.json
CHANGED
package/src/DataTable/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import React, { useState } from "react";
|
|
|
3
3
|
import ReactDOM from "react-dom";
|
|
4
4
|
import { arrayMove } from "react-sortable-hoc";
|
|
5
5
|
import copy from "copy-to-clipboard";
|
|
6
|
+
import download from "downloadjs";
|
|
6
7
|
import {
|
|
7
8
|
invert,
|
|
8
9
|
toNumber,
|
|
@@ -880,7 +881,10 @@ class DataTable extends React.Component {
|
|
|
880
881
|
onFinishMsg: "Column Copied"
|
|
881
882
|
});
|
|
882
883
|
};
|
|
883
|
-
handleCopyRows = (
|
|
884
|
+
handleCopyRows = (
|
|
885
|
+
rowElsToCopy,
|
|
886
|
+
{ specificColumn, onFinishMsg, isDownload } = {}
|
|
887
|
+
) => {
|
|
884
888
|
let textToCopy = [];
|
|
885
889
|
const jsonToCopy = [];
|
|
886
890
|
forEach(rowElsToCopy, rowEl => {
|
|
@@ -890,8 +894,15 @@ class DataTable extends React.Component {
|
|
|
890
894
|
});
|
|
891
895
|
textToCopy = textToCopy.filter(text => text).join("\n");
|
|
892
896
|
if (!textToCopy) return window.toastr.warning("No text to copy");
|
|
893
|
-
|
|
894
|
-
|
|
897
|
+
if (isDownload) {
|
|
898
|
+
download(textToCopy.replaceAll("\t", ","), "tableData.csv", "text/csv");
|
|
899
|
+
} else {
|
|
900
|
+
this.handleCopyHelper(
|
|
901
|
+
textToCopy,
|
|
902
|
+
jsonToCopy,
|
|
903
|
+
onFinishMsg || "Row Copied"
|
|
904
|
+
);
|
|
905
|
+
}
|
|
895
906
|
};
|
|
896
907
|
updateEntitiesHelper = (ents, fn) => {
|
|
897
908
|
const { change, reduxFormEntitiesUndoRedoStack = { currentVersion: 0 } } =
|
|
@@ -953,11 +964,12 @@ class DataTable extends React.Component {
|
|
|
953
964
|
}
|
|
954
965
|
};
|
|
955
966
|
|
|
956
|
-
handleCopyTable = e => {
|
|
967
|
+
handleCopyTable = (e, opts) => {
|
|
957
968
|
try {
|
|
958
969
|
const allRowEls = getAllRows(e);
|
|
959
970
|
if (!allRowEls) return;
|
|
960
971
|
this.handleCopyRows(allRowEls, {
|
|
972
|
+
...opts,
|
|
961
973
|
onFinishMsg: "Table Copied"
|
|
962
974
|
});
|
|
963
975
|
} catch (error) {
|
|
@@ -1721,28 +1733,7 @@ class DataTable extends React.Component {
|
|
|
1721
1733
|
ref={n => {
|
|
1722
1734
|
if (n) this.table = n;
|
|
1723
1735
|
}}
|
|
1724
|
-
additionalBodyEl={
|
|
1725
|
-
isCellEditable &&
|
|
1726
|
-
!onlyShowRowsWErrors && (
|
|
1727
|
-
<div
|
|
1728
|
-
style={{
|
|
1729
|
-
width: "100%",
|
|
1730
|
-
display: "flex",
|
|
1731
|
-
justifyContent: "center"
|
|
1732
|
-
}}
|
|
1733
|
-
>
|
|
1734
|
-
<Button
|
|
1735
|
-
icon="add"
|
|
1736
|
-
onClick={() => {
|
|
1737
|
-
this.insertRows({ numRows: 10, appendToBottom: true });
|
|
1738
|
-
}}
|
|
1739
|
-
minimal
|
|
1740
|
-
>
|
|
1741
|
-
Add 10 Rows
|
|
1742
|
-
</Button>
|
|
1743
|
-
</div>
|
|
1744
|
-
)
|
|
1745
|
-
}
|
|
1736
|
+
// additionalBodyEl={}
|
|
1746
1737
|
className={classNames({
|
|
1747
1738
|
isCellEditable,
|
|
1748
1739
|
"tg-table-loading": isLoading,
|
|
@@ -1801,7 +1792,37 @@ class DataTable extends React.Component {
|
|
|
1801
1792
|
SubComponent={SubComponentToUse}
|
|
1802
1793
|
{...ReactTableProps}
|
|
1803
1794
|
/>
|
|
1804
|
-
|
|
1795
|
+
{isCellEditable && (
|
|
1796
|
+
<div style={{ display: "flex" }}>
|
|
1797
|
+
<div
|
|
1798
|
+
style={{
|
|
1799
|
+
width: "100%",
|
|
1800
|
+
display: "flex",
|
|
1801
|
+
justifyContent: "center"
|
|
1802
|
+
}}
|
|
1803
|
+
>
|
|
1804
|
+
{!onlyShowRowsWErrors && (
|
|
1805
|
+
<Button
|
|
1806
|
+
icon="add"
|
|
1807
|
+
onClick={() => {
|
|
1808
|
+
this.insertRows({ numRows: 10, appendToBottom: true });
|
|
1809
|
+
}}
|
|
1810
|
+
minimal
|
|
1811
|
+
>
|
|
1812
|
+
Add 10 Rows
|
|
1813
|
+
</Button>
|
|
1814
|
+
)}
|
|
1815
|
+
</div>
|
|
1816
|
+
<Button
|
|
1817
|
+
onClick={e => {
|
|
1818
|
+
this.handleCopyTable(e, { isDownload: true });
|
|
1819
|
+
}}
|
|
1820
|
+
data-tip="Download Table as CSV"
|
|
1821
|
+
minimal
|
|
1822
|
+
icon="download"
|
|
1823
|
+
></Button>
|
|
1824
|
+
</div>
|
|
1825
|
+
)}
|
|
1805
1826
|
{!noFooter && (
|
|
1806
1827
|
<div
|
|
1807
1828
|
className="data-table-footer"
|
|
@@ -139,7 +139,7 @@ function UploaderInner({
|
|
|
139
139
|
dropzoneProps = {},
|
|
140
140
|
overflowList,
|
|
141
141
|
autoUnzip,
|
|
142
|
-
_disabled,
|
|
142
|
+
disabled: _disabled,
|
|
143
143
|
noBuildCsvOption,
|
|
144
144
|
initializeForm,
|
|
145
145
|
showFilesCount,
|
|
@@ -169,22 +169,21 @@ function UploaderInner({
|
|
|
169
169
|
);
|
|
170
170
|
_accept = [];
|
|
171
171
|
}
|
|
172
|
-
|
|
173
172
|
if (acceptLoading) dropzoneDisabled = true;
|
|
174
173
|
const accept = !_accept
|
|
175
174
|
? undefined
|
|
176
|
-
:
|
|
175
|
+
: isAcceptPromise && !resolvedAccept
|
|
177
176
|
? []
|
|
178
177
|
: isPlainObject(_accept)
|
|
179
178
|
? [_accept]
|
|
180
179
|
: isArray(_accept)
|
|
181
180
|
? _accept
|
|
182
181
|
: _accept.split(",").map(a => ({ type: a }));
|
|
183
|
-
const callout = _callout || accept
|
|
182
|
+
const callout = _callout || accept?.find?.(a => a?.callout)?.callout;
|
|
184
183
|
|
|
185
184
|
const validateAgainstSchemaToUse =
|
|
186
185
|
_validateAgainstSchema ||
|
|
187
|
-
accept
|
|
186
|
+
accept?.find?.(a => a?.validateAgainstSchema)?.validateAgainstSchema;
|
|
188
187
|
|
|
189
188
|
useEffect(() => {
|
|
190
189
|
// validateAgainstSchema
|