@usecsv/react 0.3.1 → 0.4.0
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/CHANGELOG.md +14 -0
- package/build/index.cjs +9 -4
- package/build/index.cjs.map +1 -1
- package/build/index.esm.js +9 -4
- package/build/index.esm.js.map +1 -1
- package/build/index.js +9 -4
- package/build/index.js.map +1 -1
- package/build/index.mjs +9 -4
- package/build/index.mjs.map +1 -1
- package/build/index.umd.js +9 -4
- package/build/index.umd.js.map +1 -1
- package/build/index.umd.min.js +4 -4
- package/build/index.umd.min.js.map +1 -1
- package/package.json +4 -4
package/build/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @usecsv/react v0.
|
|
2
|
+
* @usecsv/react v0.4.0
|
|
3
3
|
* (c) layercode
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -34,7 +34,7 @@ function __rest(s, e) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/*!
|
|
37
|
-
* @usecsv/js v0.
|
|
37
|
+
* @usecsv/js v0.16.0
|
|
38
38
|
* (c) layercode
|
|
39
39
|
* Released under the MIT License.
|
|
40
40
|
*/
|
|
@@ -715,7 +715,7 @@ var insertIframe = function (id, importerDisplay) {
|
|
|
715
715
|
return iframe;
|
|
716
716
|
};
|
|
717
717
|
var useCsvPlugin = function (_a) {
|
|
718
|
-
var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData, onRecordsInitial = _a.onRecordsInitial, onRecordEdit = _a.onRecordEdit, _b = _a.importerDisplay, importerDisplay = _b === void 0 ? "modal" : _b, onClose = _a.onClose, theme = _a.theme, batchSize = _a.batchSize, sampleFileURL = _a.sampleFileURL, _c = _a.downloadExampleButton, downloadExampleButton = _c === void 0 ? true : _c, dynamicColumns = _a.dynamicColumns;
|
|
718
|
+
var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData, onRecordsInitial = _a.onRecordsInitial, onRecordEdit = _a.onRecordEdit, _b = _a.importerDisplay, importerDisplay = _b === void 0 ? "modal" : _b, onClose = _a.onClose, theme = _a.theme, batchSize = _a.batchSize, sampleFileURL = _a.sampleFileURL, _c = _a.downloadExampleButton, downloadExampleButton = _c === void 0 ? true : _c, dynamicColumns = _a.dynamicColumns, defaultLanguage = _a.defaultLanguage, onError = _a.onError;
|
|
719
719
|
var id = "usecsv-".concat(Math.round(Math.random() * 100000000));
|
|
720
720
|
return whenDomReady().then(function () {
|
|
721
721
|
var iframe = insertIframe(id, importerDisplay);
|
|
@@ -725,7 +725,7 @@ var useCsvPlugin = function (_a) {
|
|
|
725
725
|
};
|
|
726
726
|
var iframeConnection = connectToChild({
|
|
727
727
|
iframe: iframe,
|
|
728
|
-
methods: __assign(__assign(__assign(__assign({ closeIframe: closeIframe }, (onData
|
|
728
|
+
methods: __assign(__assign(__assign(__assign(__assign({ closeIframe: closeIframe }, (onData
|
|
729
729
|
? {
|
|
730
730
|
onData: function (data) { return onData(data, closeIframe); },
|
|
731
731
|
}
|
|
@@ -741,6 +741,10 @@ var useCsvPlugin = function (_a) {
|
|
|
741
741
|
? {
|
|
742
742
|
onClose: onClose,
|
|
743
743
|
}
|
|
744
|
+
: {})), (onError
|
|
745
|
+
? {
|
|
746
|
+
onError: onError,
|
|
747
|
+
}
|
|
744
748
|
: {})),
|
|
745
749
|
});
|
|
746
750
|
iframeConnection.promise.then(function (child) {
|
|
@@ -759,6 +763,7 @@ var useCsvPlugin = function (_a) {
|
|
|
759
763
|
sampleFileURL: sampleFileURL,
|
|
760
764
|
downloadExampleButton: downloadExampleButton,
|
|
761
765
|
dynamicColumns: dynamicColumns,
|
|
766
|
+
defaultLanguage: defaultLanguage,
|
|
762
767
|
});
|
|
763
768
|
});
|
|
764
769
|
return iframeConnection;
|