@teselagen/ui 0.3.21 → 0.3.22
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 +97 -106
- package/index.es.js +97 -106
- package/package.json +1 -1
- package/src/FormComponents/Uploader.js +12 -9
- package/src/UploadCsvWizard.js +13 -1
package/index.cjs.js
CHANGED
|
@@ -30418,10 +30418,10 @@ var _propertyDesc = function (bitmap, value) {
|
|
|
30418
30418
|
};
|
|
30419
30419
|
};
|
|
30420
30420
|
|
|
30421
|
-
var dP$
|
|
30421
|
+
var dP$2 = require_objectDp();
|
|
30422
30422
|
var createDesc$3 = _propertyDesc;
|
|
30423
30423
|
var _hide = require_descriptors() ? function (object, key, value) {
|
|
30424
|
-
return dP$
|
|
30424
|
+
return dP$2.f(object, key, createDesc$3(1, value));
|
|
30425
30425
|
} : function (object, key, value) {
|
|
30426
30426
|
object[key] = value;
|
|
30427
30427
|
return object;
|
|
@@ -30437,7 +30437,7 @@ var core$3 = _coreExports;
|
|
|
30437
30437
|
var ctx$1 = _ctx;
|
|
30438
30438
|
var hide$2 = _hide;
|
|
30439
30439
|
var has$b = _has;
|
|
30440
|
-
var PROTOTYPE$
|
|
30440
|
+
var PROTOTYPE$2 = 'prototype';
|
|
30441
30441
|
|
|
30442
30442
|
var $export$8 = function (type, name, source) {
|
|
30443
30443
|
var IS_FORCED = type & $export$8.F;
|
|
@@ -30447,8 +30447,8 @@ var $export$8 = function (type, name, source) {
|
|
|
30447
30447
|
var IS_BIND = type & $export$8.B;
|
|
30448
30448
|
var IS_WRAP = type & $export$8.W;
|
|
30449
30449
|
var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
|
|
30450
|
-
var expProto = exports[PROTOTYPE$
|
|
30451
|
-
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$
|
|
30450
|
+
var expProto = exports[PROTOTYPE$2];
|
|
30451
|
+
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$2];
|
|
30452
30452
|
var key, own, out;
|
|
30453
30453
|
if (IS_GLOBAL) source = name;
|
|
30454
30454
|
for (key in source) {
|
|
@@ -30472,7 +30472,7 @@ var $export$8 = function (type, name, source) {
|
|
|
30472
30472
|
} return new C(a, b, c);
|
|
30473
30473
|
} return C.apply(this, arguments);
|
|
30474
30474
|
};
|
|
30475
|
-
F[PROTOTYPE$
|
|
30475
|
+
F[PROTOTYPE$2] = C[PROTOTYPE$2];
|
|
30476
30476
|
return F;
|
|
30477
30477
|
// make static versions for prototype methods
|
|
30478
30478
|
})(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
|
|
@@ -30501,20 +30501,12 @@ var _cof = function (it) {
|
|
|
30501
30501
|
return toString$6.call(it).slice(8, -1);
|
|
30502
30502
|
};
|
|
30503
30503
|
|
|
30504
|
-
|
|
30505
|
-
var
|
|
30506
|
-
|
|
30507
|
-
|
|
30508
|
-
|
|
30509
|
-
|
|
30510
|
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
30511
|
-
var cof = _cof;
|
|
30512
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
30513
|
-
_iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
30514
|
-
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
30515
|
-
};
|
|
30516
|
-
return _iobject;
|
|
30517
|
-
}
|
|
30504
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
30505
|
+
var cof$2 = _cof;
|
|
30506
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
30507
|
+
var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
30508
|
+
return cof$2(it) == 'String' ? it.split('') : Object(it);
|
|
30509
|
+
};
|
|
30518
30510
|
|
|
30519
30511
|
// 7.2.1 RequireObjectCoercible(argument)
|
|
30520
30512
|
var _defined = function (it) {
|
|
@@ -30523,7 +30515,7 @@ var _defined = function (it) {
|
|
|
30523
30515
|
};
|
|
30524
30516
|
|
|
30525
30517
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
30526
|
-
var IObject =
|
|
30518
|
+
var IObject = _iobject;
|
|
30527
30519
|
var defined$2 = _defined;
|
|
30528
30520
|
var _toIobject = function (it) {
|
|
30529
30521
|
return IObject(defined$2(it));
|
|
@@ -30609,14 +30601,14 @@ var _sharedKey = function (key) {
|
|
|
30609
30601
|
var has$a = _has;
|
|
30610
30602
|
var toIObject$4 = _toIobject;
|
|
30611
30603
|
var arrayIndexOf = _arrayIncludes(false);
|
|
30612
|
-
var IE_PROTO$
|
|
30604
|
+
var IE_PROTO$2 = _sharedKey('IE_PROTO');
|
|
30613
30605
|
|
|
30614
30606
|
var _objectKeysInternal = function (object, names) {
|
|
30615
30607
|
var O = toIObject$4(object);
|
|
30616
30608
|
var i = 0;
|
|
30617
30609
|
var result = [];
|
|
30618
30610
|
var key;
|
|
30619
|
-
for (key in O) if (key != IE_PROTO$
|
|
30611
|
+
for (key in O) if (key != IE_PROTO$2) has$a(O, key) && result.push(key);
|
|
30620
30612
|
// Don't enum bug & hidden keys
|
|
30621
30613
|
while (names.length > i) if (has$a(O, key = names[i++])) {
|
|
30622
30614
|
~arrayIndexOf(result, key) || result.push(key);
|
|
@@ -30631,10 +30623,10 @@ var _enumBugKeys = (
|
|
|
30631
30623
|
|
|
30632
30624
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
30633
30625
|
var $keys$3 = _objectKeysInternal;
|
|
30634
|
-
var enumBugKeys = _enumBugKeys;
|
|
30626
|
+
var enumBugKeys$1 = _enumBugKeys;
|
|
30635
30627
|
|
|
30636
30628
|
var _objectKeys = Object.keys || function keys(O) {
|
|
30637
|
-
return $keys$3(O, enumBugKeys);
|
|
30629
|
+
return $keys$3(O, enumBugKeys$1);
|
|
30638
30630
|
};
|
|
30639
30631
|
|
|
30640
30632
|
var _objectGops = {};
|
|
@@ -30670,7 +30662,7 @@ function require_objectAssign () {
|
|
|
30670
30662
|
var gOPS = _objectGops;
|
|
30671
30663
|
var pIE = require_objectPie();
|
|
30672
30664
|
var toObject = _toObject;
|
|
30673
|
-
var IObject =
|
|
30665
|
+
var IObject = _iobject;
|
|
30674
30666
|
var $assign = Object.assign;
|
|
30675
30667
|
|
|
30676
30668
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
@@ -30741,27 +30733,19 @@ var _iterators = {};
|
|
|
30741
30733
|
|
|
30742
30734
|
var _redefine = _hide;
|
|
30743
30735
|
|
|
30744
|
-
var
|
|
30745
|
-
var
|
|
30746
|
-
|
|
30747
|
-
function require_objectDps () {
|
|
30748
|
-
if (hasRequired_objectDps) return _objectDps;
|
|
30749
|
-
hasRequired_objectDps = 1;
|
|
30750
|
-
var dP = require_objectDp();
|
|
30751
|
-
var anObject = _anObject;
|
|
30752
|
-
var getKeys = _objectKeys;
|
|
30736
|
+
var dP$1 = require_objectDp();
|
|
30737
|
+
var anObject$4 = _anObject;
|
|
30738
|
+
var getKeys$1 = _objectKeys;
|
|
30753
30739
|
|
|
30754
|
-
|
|
30755
|
-
|
|
30756
|
-
|
|
30757
|
-
|
|
30758
|
-
|
|
30759
|
-
|
|
30760
|
-
|
|
30761
|
-
|
|
30762
|
-
|
|
30763
|
-
return _objectDps;
|
|
30764
|
-
}
|
|
30740
|
+
var _objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
30741
|
+
anObject$4(O);
|
|
30742
|
+
var keys = getKeys$1(Properties);
|
|
30743
|
+
var length = keys.length;
|
|
30744
|
+
var i = 0;
|
|
30745
|
+
var P;
|
|
30746
|
+
while (length > i) dP$1.f(O, P = keys[i++], Properties[P]);
|
|
30747
|
+
return O;
|
|
30748
|
+
};
|
|
30765
30749
|
|
|
30766
30750
|
var _html;
|
|
30767
30751
|
var hasRequired_html;
|
|
@@ -30774,55 +30758,47 @@ function require_html () {
|
|
|
30774
30758
|
return _html;
|
|
30775
30759
|
}
|
|
30776
30760
|
|
|
30777
|
-
|
|
30778
|
-
var
|
|
30779
|
-
|
|
30780
|
-
|
|
30781
|
-
|
|
30782
|
-
|
|
30783
|
-
|
|
30784
|
-
var anObject = _anObject;
|
|
30785
|
-
var dPs = require_objectDps();
|
|
30786
|
-
var enumBugKeys = _enumBugKeys;
|
|
30787
|
-
var IE_PROTO = _sharedKey('IE_PROTO');
|
|
30788
|
-
var Empty = function () { /* empty */ };
|
|
30789
|
-
var PROTOTYPE = 'prototype';
|
|
30790
|
-
|
|
30791
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
30792
|
-
var createDict = function () {
|
|
30793
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
30794
|
-
var iframe = require_domCreate()('iframe');
|
|
30795
|
-
var i = enumBugKeys.length;
|
|
30796
|
-
var lt = '<';
|
|
30797
|
-
var gt = '>';
|
|
30798
|
-
var iframeDocument;
|
|
30799
|
-
iframe.style.display = 'none';
|
|
30800
|
-
require_html().appendChild(iframe);
|
|
30801
|
-
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
30802
|
-
// createDict = iframe.contentWindow.Object;
|
|
30803
|
-
// html.removeChild(iframe);
|
|
30804
|
-
iframeDocument = iframe.contentWindow.document;
|
|
30805
|
-
iframeDocument.open();
|
|
30806
|
-
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
30807
|
-
iframeDocument.close();
|
|
30808
|
-
createDict = iframeDocument.F;
|
|
30809
|
-
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
30810
|
-
return createDict();
|
|
30811
|
-
};
|
|
30761
|
+
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
30762
|
+
var anObject$3 = _anObject;
|
|
30763
|
+
var dPs = _objectDps;
|
|
30764
|
+
var enumBugKeys = _enumBugKeys;
|
|
30765
|
+
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30766
|
+
var Empty = function () { /* empty */ };
|
|
30767
|
+
var PROTOTYPE$1 = 'prototype';
|
|
30812
30768
|
|
|
30813
|
-
|
|
30814
|
-
|
|
30815
|
-
|
|
30816
|
-
|
|
30817
|
-
|
|
30818
|
-
|
|
30819
|
-
|
|
30820
|
-
|
|
30821
|
-
|
|
30822
|
-
|
|
30823
|
-
|
|
30824
|
-
|
|
30825
|
-
|
|
30769
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
30770
|
+
var createDict = function () {
|
|
30771
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
30772
|
+
var iframe = require_domCreate()('iframe');
|
|
30773
|
+
var i = enumBugKeys.length;
|
|
30774
|
+
var lt = '<';
|
|
30775
|
+
var gt = '>';
|
|
30776
|
+
var iframeDocument;
|
|
30777
|
+
iframe.style.display = 'none';
|
|
30778
|
+
require_html().appendChild(iframe);
|
|
30779
|
+
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
30780
|
+
// createDict = iframe.contentWindow.Object;
|
|
30781
|
+
// html.removeChild(iframe);
|
|
30782
|
+
iframeDocument = iframe.contentWindow.document;
|
|
30783
|
+
iframeDocument.open();
|
|
30784
|
+
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
30785
|
+
iframeDocument.close();
|
|
30786
|
+
createDict = iframeDocument.F;
|
|
30787
|
+
while (i--) delete createDict[PROTOTYPE$1][enumBugKeys[i]];
|
|
30788
|
+
return createDict();
|
|
30789
|
+
};
|
|
30790
|
+
|
|
30791
|
+
var _objectCreate = Object.create || function create(O, Properties) {
|
|
30792
|
+
var result;
|
|
30793
|
+
if (O !== null) {
|
|
30794
|
+
Empty[PROTOTYPE$1] = anObject$3(O);
|
|
30795
|
+
result = new Empty();
|
|
30796
|
+
Empty[PROTOTYPE$1] = null;
|
|
30797
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
30798
|
+
result[IE_PROTO$1] = O;
|
|
30799
|
+
} else result = createDict();
|
|
30800
|
+
return Properties === undefined ? result : dPs(result, Properties);
|
|
30801
|
+
};
|
|
30826
30802
|
|
|
30827
30803
|
var _wks = {exports: {}};
|
|
30828
30804
|
|
|
@@ -30848,7 +30824,7 @@ var _setToStringTag = function (it, tag, stat) {
|
|
|
30848
30824
|
if (it && !has$9(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
|
|
30849
30825
|
};
|
|
30850
30826
|
|
|
30851
|
-
var create$3 =
|
|
30827
|
+
var create$3 = _objectCreate;
|
|
30852
30828
|
var descriptor = _propertyDesc;
|
|
30853
30829
|
var setToStringTag$2 = _setToStringTag;
|
|
30854
30830
|
var IteratorPrototype = {};
|
|
@@ -31491,7 +31467,7 @@ var toObject$1 = _toObject;
|
|
|
31491
31467
|
var toIObject = _toIobject;
|
|
31492
31468
|
var toPrimitive = _toPrimitive;
|
|
31493
31469
|
var createDesc = _propertyDesc;
|
|
31494
|
-
var _create$1 =
|
|
31470
|
+
var _create$1 = _objectCreate;
|
|
31495
31471
|
var gOPNExt = _objectGopnExt;
|
|
31496
31472
|
var $GOPD = _objectGopd;
|
|
31497
31473
|
var $GOPS = _objectGops;
|
|
@@ -31801,7 +31777,7 @@ var setPrototypeOf = { "default": setPrototypeOf$1, __esModule: true };
|
|
|
31801
31777
|
|
|
31802
31778
|
var $export = _export;
|
|
31803
31779
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
31804
|
-
$export($export.S, 'Object', { create:
|
|
31780
|
+
$export($export.S, 'Object', { create: _objectCreate });
|
|
31805
31781
|
|
|
31806
31782
|
var $Object$1 = _coreExports.Object;
|
|
31807
31783
|
var create$2 = function create(P, D) {
|
|
@@ -92407,6 +92383,16 @@ const SimpleInsertDataDialog = compose(
|
|
|
92407
92383
|
reduxFormCellValidation
|
|
92408
92384
|
);
|
|
92409
92385
|
return /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement("div", { className: "bp3-dialog-body" }, /* @__PURE__ */ React$1.createElement(
|
|
92386
|
+
InputField,
|
|
92387
|
+
{
|
|
92388
|
+
isRequired: true,
|
|
92389
|
+
rightElement: /* @__PURE__ */ React$1.createElement("div", { style: { paddingTop: 6, paddingRight: 5 } }, ".csv"),
|
|
92390
|
+
inlineLabel: true,
|
|
92391
|
+
label: "File Name:",
|
|
92392
|
+
defaultValue: "manual_data_entry",
|
|
92393
|
+
name: "fileName"
|
|
92394
|
+
}
|
|
92395
|
+
), /* @__PURE__ */ React$1.createElement(
|
|
92410
92396
|
PreviewCsvData,
|
|
92411
92397
|
{
|
|
92412
92398
|
...{
|
|
@@ -92425,7 +92411,7 @@ const SimpleInsertDataDialog = compose(
|
|
|
92425
92411
|
DialogFooter,
|
|
92426
92412
|
{
|
|
92427
92413
|
submitting,
|
|
92428
|
-
onClick: handleSubmit(async () => {
|
|
92414
|
+
onClick: handleSubmit(async ({ fileName }) => {
|
|
92429
92415
|
if (lodashExports.some(validationToUse, (e) => e))
|
|
92430
92416
|
return;
|
|
92431
92417
|
if (await asyncValidateHelper(
|
|
@@ -92436,6 +92422,7 @@ const SimpleInsertDataDialog = compose(
|
|
|
92436
92422
|
))
|
|
92437
92423
|
return;
|
|
92438
92424
|
onSimpleInsertDialogFinish({
|
|
92425
|
+
fileName: fileName + ".csv",
|
|
92439
92426
|
newEntities: maybeStripIdFromEntities(
|
|
92440
92427
|
entsToUse,
|
|
92441
92428
|
validateAgainstSchema
|
|
@@ -99883,7 +99870,7 @@ function UploaderInner({
|
|
|
99883
99870
|
}
|
|
99884
99871
|
handleManuallyEnterData = async (e) => {
|
|
99885
99872
|
e.stopPropagation();
|
|
99886
|
-
const { newEntities } = await showSimpleInsertDataDialog(
|
|
99873
|
+
const { newEntities, fileName } = await showSimpleInsertDataDialog(
|
|
99887
99874
|
"onSimpleInsertDialogFinish",
|
|
99888
99875
|
{
|
|
99889
99876
|
validateAgainstSchema
|
|
@@ -99892,10 +99879,7 @@ function UploaderInner({
|
|
|
99892
99879
|
if (!newEntities) {
|
|
99893
99880
|
return;
|
|
99894
99881
|
} else {
|
|
99895
|
-
const newFileName = getNewName(
|
|
99896
|
-
fileListToUse,
|
|
99897
|
-
`manual_data_entry.csv`
|
|
99898
|
-
);
|
|
99882
|
+
const newFileName = getNewName(fileListToUse, fileName);
|
|
99899
99883
|
const { newFile, cleanedEntities } = getNewCsvFile(
|
|
99900
99884
|
newEntities,
|
|
99901
99885
|
newFileName
|
|
@@ -100070,6 +100054,7 @@ function UploaderInner({
|
|
|
100070
100054
|
onFieldSubmit(responses);
|
|
100071
100055
|
}
|
|
100072
100056
|
} else {
|
|
100057
|
+
console.log(`cleanedFileList:`, cleanedFileList);
|
|
100073
100058
|
onChange(
|
|
100074
100059
|
cleanedFileList.map(function(file) {
|
|
100075
100060
|
return {
|
|
@@ -100559,12 +100544,15 @@ function UploaderInner({
|
|
|
100559
100544
|
incomingData: file.parsedData,
|
|
100560
100545
|
validateAgainstSchema
|
|
100561
100546
|
});
|
|
100562
|
-
const { newEntities } = await showSimpleInsertDataDialog(
|
|
100547
|
+
const { newEntities, fileName } = await showSimpleInsertDataDialog(
|
|
100563
100548
|
"onSimpleInsertDialogFinish",
|
|
100564
100549
|
{
|
|
100565
100550
|
dialogProps: {
|
|
100566
100551
|
title: "Edit Data"
|
|
100567
100552
|
},
|
|
100553
|
+
initialValues: {
|
|
100554
|
+
fileName: removeExt(file.name)
|
|
100555
|
+
},
|
|
100568
100556
|
validateAgainstSchema,
|
|
100569
100557
|
isEditingExistingFile: true,
|
|
100570
100558
|
searchResults,
|
|
@@ -100575,13 +100563,16 @@ function UploaderInner({
|
|
|
100575
100563
|
if (!newEntities) {
|
|
100576
100564
|
return;
|
|
100577
100565
|
} else {
|
|
100578
|
-
const { newFile, cleanedEntities } = getNewCsvFile(newEntities,
|
|
100579
|
-
Object.assign(file, {
|
|
100566
|
+
const { newFile, cleanedEntities } = getNewCsvFile(newEntities, fileName);
|
|
100567
|
+
const zoink = Object.assign({}, file, {
|
|
100580
100568
|
...newFile,
|
|
100581
100569
|
originFileObj: newFile,
|
|
100582
100570
|
originalFileObj: newFile,
|
|
100583
100571
|
parsedData: cleanedEntities
|
|
100584
100572
|
});
|
|
100573
|
+
zoink.name = newFile.name;
|
|
100574
|
+
fileList = [...fileList];
|
|
100575
|
+
fileList[index] = zoink;
|
|
100585
100576
|
handleSecondHalfOfUpload({
|
|
100586
100577
|
acceptedFiles: fileList,
|
|
100587
100578
|
cleanedFileList: fileList
|
package/index.es.js
CHANGED
|
@@ -30397,10 +30397,10 @@ var _propertyDesc = function (bitmap, value) {
|
|
|
30397
30397
|
};
|
|
30398
30398
|
};
|
|
30399
30399
|
|
|
30400
|
-
var dP$
|
|
30400
|
+
var dP$2 = require_objectDp();
|
|
30401
30401
|
var createDesc$3 = _propertyDesc;
|
|
30402
30402
|
var _hide = require_descriptors() ? function (object, key, value) {
|
|
30403
|
-
return dP$
|
|
30403
|
+
return dP$2.f(object, key, createDesc$3(1, value));
|
|
30404
30404
|
} : function (object, key, value) {
|
|
30405
30405
|
object[key] = value;
|
|
30406
30406
|
return object;
|
|
@@ -30416,7 +30416,7 @@ var core$3 = _coreExports;
|
|
|
30416
30416
|
var ctx$1 = _ctx;
|
|
30417
30417
|
var hide$2 = _hide;
|
|
30418
30418
|
var has$b = _has;
|
|
30419
|
-
var PROTOTYPE$
|
|
30419
|
+
var PROTOTYPE$2 = 'prototype';
|
|
30420
30420
|
|
|
30421
30421
|
var $export$8 = function (type, name, source) {
|
|
30422
30422
|
var IS_FORCED = type & $export$8.F;
|
|
@@ -30426,8 +30426,8 @@ var $export$8 = function (type, name, source) {
|
|
|
30426
30426
|
var IS_BIND = type & $export$8.B;
|
|
30427
30427
|
var IS_WRAP = type & $export$8.W;
|
|
30428
30428
|
var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
|
|
30429
|
-
var expProto = exports[PROTOTYPE$
|
|
30430
|
-
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$
|
|
30429
|
+
var expProto = exports[PROTOTYPE$2];
|
|
30430
|
+
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$2];
|
|
30431
30431
|
var key, own, out;
|
|
30432
30432
|
if (IS_GLOBAL) source = name;
|
|
30433
30433
|
for (key in source) {
|
|
@@ -30451,7 +30451,7 @@ var $export$8 = function (type, name, source) {
|
|
|
30451
30451
|
} return new C(a, b, c);
|
|
30452
30452
|
} return C.apply(this, arguments);
|
|
30453
30453
|
};
|
|
30454
|
-
F[PROTOTYPE$
|
|
30454
|
+
F[PROTOTYPE$2] = C[PROTOTYPE$2];
|
|
30455
30455
|
return F;
|
|
30456
30456
|
// make static versions for prototype methods
|
|
30457
30457
|
})(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
|
|
@@ -30480,20 +30480,12 @@ var _cof = function (it) {
|
|
|
30480
30480
|
return toString$6.call(it).slice(8, -1);
|
|
30481
30481
|
};
|
|
30482
30482
|
|
|
30483
|
-
|
|
30484
|
-
var
|
|
30485
|
-
|
|
30486
|
-
|
|
30487
|
-
|
|
30488
|
-
|
|
30489
|
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
30490
|
-
var cof = _cof;
|
|
30491
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
30492
|
-
_iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
30493
|
-
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
30494
|
-
};
|
|
30495
|
-
return _iobject;
|
|
30496
|
-
}
|
|
30483
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
30484
|
+
var cof$2 = _cof;
|
|
30485
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
30486
|
+
var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
30487
|
+
return cof$2(it) == 'String' ? it.split('') : Object(it);
|
|
30488
|
+
};
|
|
30497
30489
|
|
|
30498
30490
|
// 7.2.1 RequireObjectCoercible(argument)
|
|
30499
30491
|
var _defined = function (it) {
|
|
@@ -30502,7 +30494,7 @@ var _defined = function (it) {
|
|
|
30502
30494
|
};
|
|
30503
30495
|
|
|
30504
30496
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
30505
|
-
var IObject =
|
|
30497
|
+
var IObject = _iobject;
|
|
30506
30498
|
var defined$2 = _defined;
|
|
30507
30499
|
var _toIobject = function (it) {
|
|
30508
30500
|
return IObject(defined$2(it));
|
|
@@ -30588,14 +30580,14 @@ var _sharedKey = function (key) {
|
|
|
30588
30580
|
var has$a = _has;
|
|
30589
30581
|
var toIObject$4 = _toIobject;
|
|
30590
30582
|
var arrayIndexOf = _arrayIncludes(false);
|
|
30591
|
-
var IE_PROTO$
|
|
30583
|
+
var IE_PROTO$2 = _sharedKey('IE_PROTO');
|
|
30592
30584
|
|
|
30593
30585
|
var _objectKeysInternal = function (object, names) {
|
|
30594
30586
|
var O = toIObject$4(object);
|
|
30595
30587
|
var i = 0;
|
|
30596
30588
|
var result = [];
|
|
30597
30589
|
var key;
|
|
30598
|
-
for (key in O) if (key != IE_PROTO$
|
|
30590
|
+
for (key in O) if (key != IE_PROTO$2) has$a(O, key) && result.push(key);
|
|
30599
30591
|
// Don't enum bug & hidden keys
|
|
30600
30592
|
while (names.length > i) if (has$a(O, key = names[i++])) {
|
|
30601
30593
|
~arrayIndexOf(result, key) || result.push(key);
|
|
@@ -30610,10 +30602,10 @@ var _enumBugKeys = (
|
|
|
30610
30602
|
|
|
30611
30603
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
30612
30604
|
var $keys$3 = _objectKeysInternal;
|
|
30613
|
-
var enumBugKeys = _enumBugKeys;
|
|
30605
|
+
var enumBugKeys$1 = _enumBugKeys;
|
|
30614
30606
|
|
|
30615
30607
|
var _objectKeys = Object.keys || function keys(O) {
|
|
30616
|
-
return $keys$3(O, enumBugKeys);
|
|
30608
|
+
return $keys$3(O, enumBugKeys$1);
|
|
30617
30609
|
};
|
|
30618
30610
|
|
|
30619
30611
|
var _objectGops = {};
|
|
@@ -30649,7 +30641,7 @@ function require_objectAssign () {
|
|
|
30649
30641
|
var gOPS = _objectGops;
|
|
30650
30642
|
var pIE = require_objectPie();
|
|
30651
30643
|
var toObject = _toObject;
|
|
30652
|
-
var IObject =
|
|
30644
|
+
var IObject = _iobject;
|
|
30653
30645
|
var $assign = Object.assign;
|
|
30654
30646
|
|
|
30655
30647
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
@@ -30720,27 +30712,19 @@ var _iterators = {};
|
|
|
30720
30712
|
|
|
30721
30713
|
var _redefine = _hide;
|
|
30722
30714
|
|
|
30723
|
-
var
|
|
30724
|
-
var
|
|
30725
|
-
|
|
30726
|
-
function require_objectDps () {
|
|
30727
|
-
if (hasRequired_objectDps) return _objectDps;
|
|
30728
|
-
hasRequired_objectDps = 1;
|
|
30729
|
-
var dP = require_objectDp();
|
|
30730
|
-
var anObject = _anObject;
|
|
30731
|
-
var getKeys = _objectKeys;
|
|
30715
|
+
var dP$1 = require_objectDp();
|
|
30716
|
+
var anObject$4 = _anObject;
|
|
30717
|
+
var getKeys$1 = _objectKeys;
|
|
30732
30718
|
|
|
30733
|
-
|
|
30734
|
-
|
|
30735
|
-
|
|
30736
|
-
|
|
30737
|
-
|
|
30738
|
-
|
|
30739
|
-
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
return _objectDps;
|
|
30743
|
-
}
|
|
30719
|
+
var _objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
30720
|
+
anObject$4(O);
|
|
30721
|
+
var keys = getKeys$1(Properties);
|
|
30722
|
+
var length = keys.length;
|
|
30723
|
+
var i = 0;
|
|
30724
|
+
var P;
|
|
30725
|
+
while (length > i) dP$1.f(O, P = keys[i++], Properties[P]);
|
|
30726
|
+
return O;
|
|
30727
|
+
};
|
|
30744
30728
|
|
|
30745
30729
|
var _html;
|
|
30746
30730
|
var hasRequired_html;
|
|
@@ -30753,55 +30737,47 @@ function require_html () {
|
|
|
30753
30737
|
return _html;
|
|
30754
30738
|
}
|
|
30755
30739
|
|
|
30756
|
-
|
|
30757
|
-
var
|
|
30758
|
-
|
|
30759
|
-
|
|
30760
|
-
|
|
30761
|
-
|
|
30762
|
-
|
|
30763
|
-
var anObject = _anObject;
|
|
30764
|
-
var dPs = require_objectDps();
|
|
30765
|
-
var enumBugKeys = _enumBugKeys;
|
|
30766
|
-
var IE_PROTO = _sharedKey('IE_PROTO');
|
|
30767
|
-
var Empty = function () { /* empty */ };
|
|
30768
|
-
var PROTOTYPE = 'prototype';
|
|
30769
|
-
|
|
30770
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
30771
|
-
var createDict = function () {
|
|
30772
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
30773
|
-
var iframe = require_domCreate()('iframe');
|
|
30774
|
-
var i = enumBugKeys.length;
|
|
30775
|
-
var lt = '<';
|
|
30776
|
-
var gt = '>';
|
|
30777
|
-
var iframeDocument;
|
|
30778
|
-
iframe.style.display = 'none';
|
|
30779
|
-
require_html().appendChild(iframe);
|
|
30780
|
-
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
30781
|
-
// createDict = iframe.contentWindow.Object;
|
|
30782
|
-
// html.removeChild(iframe);
|
|
30783
|
-
iframeDocument = iframe.contentWindow.document;
|
|
30784
|
-
iframeDocument.open();
|
|
30785
|
-
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
30786
|
-
iframeDocument.close();
|
|
30787
|
-
createDict = iframeDocument.F;
|
|
30788
|
-
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
30789
|
-
return createDict();
|
|
30790
|
-
};
|
|
30740
|
+
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
30741
|
+
var anObject$3 = _anObject;
|
|
30742
|
+
var dPs = _objectDps;
|
|
30743
|
+
var enumBugKeys = _enumBugKeys;
|
|
30744
|
+
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30745
|
+
var Empty = function () { /* empty */ };
|
|
30746
|
+
var PROTOTYPE$1 = 'prototype';
|
|
30791
30747
|
|
|
30792
|
-
|
|
30793
|
-
|
|
30794
|
-
|
|
30795
|
-
|
|
30796
|
-
|
|
30797
|
-
|
|
30798
|
-
|
|
30799
|
-
|
|
30800
|
-
|
|
30801
|
-
|
|
30802
|
-
|
|
30803
|
-
|
|
30804
|
-
|
|
30748
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
30749
|
+
var createDict = function () {
|
|
30750
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
30751
|
+
var iframe = require_domCreate()('iframe');
|
|
30752
|
+
var i = enumBugKeys.length;
|
|
30753
|
+
var lt = '<';
|
|
30754
|
+
var gt = '>';
|
|
30755
|
+
var iframeDocument;
|
|
30756
|
+
iframe.style.display = 'none';
|
|
30757
|
+
require_html().appendChild(iframe);
|
|
30758
|
+
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
30759
|
+
// createDict = iframe.contentWindow.Object;
|
|
30760
|
+
// html.removeChild(iframe);
|
|
30761
|
+
iframeDocument = iframe.contentWindow.document;
|
|
30762
|
+
iframeDocument.open();
|
|
30763
|
+
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
30764
|
+
iframeDocument.close();
|
|
30765
|
+
createDict = iframeDocument.F;
|
|
30766
|
+
while (i--) delete createDict[PROTOTYPE$1][enumBugKeys[i]];
|
|
30767
|
+
return createDict();
|
|
30768
|
+
};
|
|
30769
|
+
|
|
30770
|
+
var _objectCreate = Object.create || function create(O, Properties) {
|
|
30771
|
+
var result;
|
|
30772
|
+
if (O !== null) {
|
|
30773
|
+
Empty[PROTOTYPE$1] = anObject$3(O);
|
|
30774
|
+
result = new Empty();
|
|
30775
|
+
Empty[PROTOTYPE$1] = null;
|
|
30776
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
30777
|
+
result[IE_PROTO$1] = O;
|
|
30778
|
+
} else result = createDict();
|
|
30779
|
+
return Properties === undefined ? result : dPs(result, Properties);
|
|
30780
|
+
};
|
|
30805
30781
|
|
|
30806
30782
|
var _wks = {exports: {}};
|
|
30807
30783
|
|
|
@@ -30827,7 +30803,7 @@ var _setToStringTag = function (it, tag, stat) {
|
|
|
30827
30803
|
if (it && !has$9(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
|
|
30828
30804
|
};
|
|
30829
30805
|
|
|
30830
|
-
var create$3 =
|
|
30806
|
+
var create$3 = _objectCreate;
|
|
30831
30807
|
var descriptor = _propertyDesc;
|
|
30832
30808
|
var setToStringTag$2 = _setToStringTag;
|
|
30833
30809
|
var IteratorPrototype = {};
|
|
@@ -31470,7 +31446,7 @@ var toObject$1 = _toObject;
|
|
|
31470
31446
|
var toIObject = _toIobject;
|
|
31471
31447
|
var toPrimitive = _toPrimitive;
|
|
31472
31448
|
var createDesc = _propertyDesc;
|
|
31473
|
-
var _create$1 =
|
|
31449
|
+
var _create$1 = _objectCreate;
|
|
31474
31450
|
var gOPNExt = _objectGopnExt;
|
|
31475
31451
|
var $GOPD = _objectGopd;
|
|
31476
31452
|
var $GOPS = _objectGops;
|
|
@@ -31780,7 +31756,7 @@ var setPrototypeOf = { "default": setPrototypeOf$1, __esModule: true };
|
|
|
31780
31756
|
|
|
31781
31757
|
var $export = _export;
|
|
31782
31758
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
31783
|
-
$export($export.S, 'Object', { create:
|
|
31759
|
+
$export($export.S, 'Object', { create: _objectCreate });
|
|
31784
31760
|
|
|
31785
31761
|
var $Object$1 = _coreExports.Object;
|
|
31786
31762
|
var create$2 = function create(P, D) {
|
|
@@ -92386,6 +92362,16 @@ const SimpleInsertDataDialog = compose(
|
|
|
92386
92362
|
reduxFormCellValidation
|
|
92387
92363
|
);
|
|
92388
92364
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: "bp3-dialog-body" }, /* @__PURE__ */ React__default.createElement(
|
|
92365
|
+
InputField,
|
|
92366
|
+
{
|
|
92367
|
+
isRequired: true,
|
|
92368
|
+
rightElement: /* @__PURE__ */ React__default.createElement("div", { style: { paddingTop: 6, paddingRight: 5 } }, ".csv"),
|
|
92369
|
+
inlineLabel: true,
|
|
92370
|
+
label: "File Name:",
|
|
92371
|
+
defaultValue: "manual_data_entry",
|
|
92372
|
+
name: "fileName"
|
|
92373
|
+
}
|
|
92374
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
92389
92375
|
PreviewCsvData,
|
|
92390
92376
|
{
|
|
92391
92377
|
...{
|
|
@@ -92404,7 +92390,7 @@ const SimpleInsertDataDialog = compose(
|
|
|
92404
92390
|
DialogFooter,
|
|
92405
92391
|
{
|
|
92406
92392
|
submitting,
|
|
92407
|
-
onClick: handleSubmit(async () => {
|
|
92393
|
+
onClick: handleSubmit(async ({ fileName }) => {
|
|
92408
92394
|
if (lodashExports.some(validationToUse, (e) => e))
|
|
92409
92395
|
return;
|
|
92410
92396
|
if (await asyncValidateHelper(
|
|
@@ -92415,6 +92401,7 @@ const SimpleInsertDataDialog = compose(
|
|
|
92415
92401
|
))
|
|
92416
92402
|
return;
|
|
92417
92403
|
onSimpleInsertDialogFinish({
|
|
92404
|
+
fileName: fileName + ".csv",
|
|
92418
92405
|
newEntities: maybeStripIdFromEntities(
|
|
92419
92406
|
entsToUse,
|
|
92420
92407
|
validateAgainstSchema
|
|
@@ -99862,7 +99849,7 @@ function UploaderInner({
|
|
|
99862
99849
|
}
|
|
99863
99850
|
handleManuallyEnterData = async (e) => {
|
|
99864
99851
|
e.stopPropagation();
|
|
99865
|
-
const { newEntities } = await showSimpleInsertDataDialog(
|
|
99852
|
+
const { newEntities, fileName } = await showSimpleInsertDataDialog(
|
|
99866
99853
|
"onSimpleInsertDialogFinish",
|
|
99867
99854
|
{
|
|
99868
99855
|
validateAgainstSchema
|
|
@@ -99871,10 +99858,7 @@ function UploaderInner({
|
|
|
99871
99858
|
if (!newEntities) {
|
|
99872
99859
|
return;
|
|
99873
99860
|
} else {
|
|
99874
|
-
const newFileName = getNewName(
|
|
99875
|
-
fileListToUse,
|
|
99876
|
-
`manual_data_entry.csv`
|
|
99877
|
-
);
|
|
99861
|
+
const newFileName = getNewName(fileListToUse, fileName);
|
|
99878
99862
|
const { newFile, cleanedEntities } = getNewCsvFile(
|
|
99879
99863
|
newEntities,
|
|
99880
99864
|
newFileName
|
|
@@ -100049,6 +100033,7 @@ function UploaderInner({
|
|
|
100049
100033
|
onFieldSubmit(responses);
|
|
100050
100034
|
}
|
|
100051
100035
|
} else {
|
|
100036
|
+
console.log(`cleanedFileList:`, cleanedFileList);
|
|
100052
100037
|
onChange(
|
|
100053
100038
|
cleanedFileList.map(function(file) {
|
|
100054
100039
|
return {
|
|
@@ -100538,12 +100523,15 @@ function UploaderInner({
|
|
|
100538
100523
|
incomingData: file.parsedData,
|
|
100539
100524
|
validateAgainstSchema
|
|
100540
100525
|
});
|
|
100541
|
-
const { newEntities } = await showSimpleInsertDataDialog(
|
|
100526
|
+
const { newEntities, fileName } = await showSimpleInsertDataDialog(
|
|
100542
100527
|
"onSimpleInsertDialogFinish",
|
|
100543
100528
|
{
|
|
100544
100529
|
dialogProps: {
|
|
100545
100530
|
title: "Edit Data"
|
|
100546
100531
|
},
|
|
100532
|
+
initialValues: {
|
|
100533
|
+
fileName: removeExt(file.name)
|
|
100534
|
+
},
|
|
100547
100535
|
validateAgainstSchema,
|
|
100548
100536
|
isEditingExistingFile: true,
|
|
100549
100537
|
searchResults,
|
|
@@ -100554,13 +100542,16 @@ function UploaderInner({
|
|
|
100554
100542
|
if (!newEntities) {
|
|
100555
100543
|
return;
|
|
100556
100544
|
} else {
|
|
100557
|
-
const { newFile, cleanedEntities } = getNewCsvFile(newEntities,
|
|
100558
|
-
Object.assign(file, {
|
|
100545
|
+
const { newFile, cleanedEntities } = getNewCsvFile(newEntities, fileName);
|
|
100546
|
+
const zoink = Object.assign({}, file, {
|
|
100559
100547
|
...newFile,
|
|
100560
100548
|
originFileObj: newFile,
|
|
100561
100549
|
originalFileObj: newFile,
|
|
100562
100550
|
parsedData: cleanedEntities
|
|
100563
100551
|
});
|
|
100552
|
+
zoink.name = newFile.name;
|
|
100553
|
+
fileList = [...fileList];
|
|
100554
|
+
fileList[index] = zoink;
|
|
100564
100555
|
handleSecondHalfOfUpload({
|
|
100565
100556
|
acceptedFiles: fileList,
|
|
100566
100557
|
cleanedFileList: fileList
|
package/package.json
CHANGED
|
@@ -228,7 +228,7 @@ function UploaderInner({
|
|
|
228
228
|
}
|
|
229
229
|
handleManuallyEnterData = async e => {
|
|
230
230
|
e.stopPropagation();
|
|
231
|
-
const { newEntities } = await showSimpleInsertDataDialog(
|
|
231
|
+
const { newEntities, fileName } = await showSimpleInsertDataDialog(
|
|
232
232
|
"onSimpleInsertDialogFinish",
|
|
233
233
|
{
|
|
234
234
|
validateAgainstSchema
|
|
@@ -239,10 +239,7 @@ function UploaderInner({
|
|
|
239
239
|
} else {
|
|
240
240
|
//check existing files to make sure the new file name gets incremented if necessary
|
|
241
241
|
// fileList
|
|
242
|
-
const newFileName = getNewName(
|
|
243
|
-
fileListToUse,
|
|
244
|
-
`manual_data_entry.csv`
|
|
245
|
-
);
|
|
242
|
+
const newFileName = getNewName(fileListToUse, fileName);
|
|
246
243
|
const { newFile, cleanedEntities } = getNewCsvFile(
|
|
247
244
|
newEntities,
|
|
248
245
|
newFileName
|
|
@@ -453,6 +450,7 @@ function UploaderInner({
|
|
|
453
450
|
onFieldSubmit(responses);
|
|
454
451
|
}
|
|
455
452
|
} else {
|
|
453
|
+
console.log(`cleanedFileList:`, cleanedFileList);
|
|
456
454
|
onChange(
|
|
457
455
|
cleanedFileList.map(function (file) {
|
|
458
456
|
return {
|
|
@@ -1057,13 +1055,16 @@ function UploaderInner({
|
|
|
1057
1055
|
validateAgainstSchema
|
|
1058
1056
|
});
|
|
1059
1057
|
|
|
1060
|
-
const { newEntities } =
|
|
1058
|
+
const { newEntities, fileName } =
|
|
1061
1059
|
await showSimpleInsertDataDialog(
|
|
1062
1060
|
"onSimpleInsertDialogFinish",
|
|
1063
1061
|
{
|
|
1064
1062
|
dialogProps: {
|
|
1065
1063
|
title: "Edit Data"
|
|
1066
1064
|
},
|
|
1065
|
+
initialValues: {
|
|
1066
|
+
fileName: removeExt(file.name)
|
|
1067
|
+
},
|
|
1067
1068
|
validateAgainstSchema,
|
|
1068
1069
|
isEditingExistingFile: true,
|
|
1069
1070
|
searchResults,
|
|
@@ -1076,14 +1077,16 @@ function UploaderInner({
|
|
|
1076
1077
|
return;
|
|
1077
1078
|
} else {
|
|
1078
1079
|
const { newFile, cleanedEntities } =
|
|
1079
|
-
getNewCsvFile(newEntities,
|
|
1080
|
-
|
|
1081
|
-
Object.assign(file, {
|
|
1080
|
+
getNewCsvFile(newEntities, fileName);
|
|
1081
|
+
const zoink = Object.assign({}, file, {
|
|
1082
1082
|
...newFile,
|
|
1083
1083
|
originFileObj: newFile,
|
|
1084
1084
|
originalFileObj: newFile,
|
|
1085
1085
|
parsedData: cleanedEntities
|
|
1086
1086
|
});
|
|
1087
|
+
zoink.name = newFile.name;
|
|
1088
|
+
fileList = [...fileList];
|
|
1089
|
+
fileList[index] = zoink;
|
|
1087
1090
|
handleSecondHalfOfUpload({
|
|
1088
1091
|
acceptedFiles: fileList,
|
|
1089
1092
|
cleanedFileList: fileList
|
package/src/UploadCsvWizard.js
CHANGED
|
@@ -21,6 +21,7 @@ import { MatchHeaders } from "./MatchHeaders";
|
|
|
21
21
|
import { isEmpty } from "lodash";
|
|
22
22
|
import { addSpecialPropToAsyncErrs } from "./FormComponents/tryToMatchSchemas";
|
|
23
23
|
import { cloneDeep } from "lodash";
|
|
24
|
+
import { InputField } from "./FormComponents";
|
|
24
25
|
|
|
25
26
|
const getInitialSteps = csvValidationIssue => [
|
|
26
27
|
{ text: "Review Headers", active: csvValidationIssue },
|
|
@@ -628,6 +629,16 @@ export const SimpleInsertDataDialog = compose(
|
|
|
628
629
|
return (
|
|
629
630
|
<>
|
|
630
631
|
<div className="bp3-dialog-body">
|
|
632
|
+
<InputField
|
|
633
|
+
isRequired
|
|
634
|
+
rightElement={
|
|
635
|
+
<div style={{ paddingTop: 6, paddingRight: 5 }}>.csv</div>
|
|
636
|
+
}
|
|
637
|
+
inlineLabel
|
|
638
|
+
label="File Name:"
|
|
639
|
+
defaultValue={"manual_data_entry"}
|
|
640
|
+
name="fileName"
|
|
641
|
+
></InputField>
|
|
631
642
|
<PreviewCsvData
|
|
632
643
|
{...{
|
|
633
644
|
matchedHeaders,
|
|
@@ -644,7 +655,7 @@ export const SimpleInsertDataDialog = compose(
|
|
|
644
655
|
</div>
|
|
645
656
|
<DialogFooter
|
|
646
657
|
submitting={submitting}
|
|
647
|
-
onClick={handleSubmit(async () => {
|
|
658
|
+
onClick={handleSubmit(async ({fileName}) => {
|
|
648
659
|
if (some(validationToUse, e => e)) return;
|
|
649
660
|
//do async validation here if needed
|
|
650
661
|
if (
|
|
@@ -657,6 +668,7 @@ export const SimpleInsertDataDialog = compose(
|
|
|
657
668
|
)
|
|
658
669
|
return;
|
|
659
670
|
onSimpleInsertDialogFinish({
|
|
671
|
+
fileName: fileName + ".csv",
|
|
660
672
|
newEntities: maybeStripIdFromEntities(
|
|
661
673
|
entsToUse,
|
|
662
674
|
validateAgainstSchema
|