@usecsv/react 0.2.11 → 0.2.13
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 -5
- package/build/index.cjs.map +1 -1
- package/build/index.esm.js +9 -5
- package/build/index.esm.js.map +1 -1
- package/build/index.js +9 -5
- package/build/index.js.map +1 -1
- package/build/index.mjs +9 -5
- package/build/index.mjs.map +1 -1
- package/build/index.umd.js +9 -5
- package/build/index.umd.js.map +1 -1
- package/build/index.umd.min.js +3 -3
- package/build/index.umd.min.js.map +1 -1
- package/package.json +2 -2
package/build/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @usecsv/react v0.2.
|
|
2
|
+
* @usecsv/react v0.2.13
|
|
3
3
|
* (c) layercode
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -32,7 +32,7 @@ function __rest(s, e) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/*!
|
|
35
|
-
* @usecsv/js v0.
|
|
35
|
+
* @usecsv/js v0.9.0
|
|
36
36
|
* (c) layercode
|
|
37
37
|
* Released under the MIT License.
|
|
38
38
|
*/
|
|
@@ -632,7 +632,7 @@ var insertIframe = function (id, importerDisplay) {
|
|
|
632
632
|
return iframe;
|
|
633
633
|
};
|
|
634
634
|
var useCsvPlugin = function (_a) {
|
|
635
|
-
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;
|
|
635
|
+
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;
|
|
636
636
|
var id = "usecsv-".concat(Math.round(Math.random() * 100000000));
|
|
637
637
|
return whenDomReady().then(function () {
|
|
638
638
|
var iframe = insertIframe(id, importerDisplay);
|
|
@@ -642,7 +642,7 @@ var useCsvPlugin = function (_a) {
|
|
|
642
642
|
};
|
|
643
643
|
var iframeConnection = connectToChild({
|
|
644
644
|
iframe: iframe,
|
|
645
|
-
methods: __assign(__assign(__assign({ closeIframe: closeIframe }, (onData
|
|
645
|
+
methods: __assign(__assign(__assign(__assign({ closeIframe: closeIframe }, (onData
|
|
646
646
|
? {
|
|
647
647
|
onData: function (data) { return onData(data, closeIframe); },
|
|
648
648
|
}
|
|
@@ -654,13 +654,17 @@ var useCsvPlugin = function (_a) {
|
|
|
654
654
|
? {
|
|
655
655
|
onRecordEdit: onRecordEdit,
|
|
656
656
|
}
|
|
657
|
+
: {})), (onClose
|
|
658
|
+
? {
|
|
659
|
+
onClose: onClose,
|
|
660
|
+
}
|
|
657
661
|
: {})),
|
|
658
662
|
});
|
|
659
663
|
iframeConnection.promise.then(function (child) {
|
|
660
664
|
var _a;
|
|
661
665
|
(_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.classList.remove("loading");
|
|
662
666
|
// eslint-disable-next-line dot-notation
|
|
663
|
-
child["setParams"] && child["setParams"]({ importerKey: importerKey, user: user, metadata: metadata });
|
|
667
|
+
child["setParams"] && child["setParams"]({ importerKey: importerKey, user: user, metadata: metadata, importerDisplay: importerDisplay });
|
|
664
668
|
});
|
|
665
669
|
return iframeConnection;
|
|
666
670
|
});
|