@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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @usecsv/react v0.2.11
2
+ * @usecsv/react v0.2.13
3
3
  * (c) layercode
4
4
  * Released under the MIT License.
5
5
  */
@@ -38,7 +38,7 @@
38
38
  }
39
39
 
40
40
  /*!
41
- * @usecsv/js v0.8.0
41
+ * @usecsv/js v0.9.0
42
42
  * (c) layercode
43
43
  * Released under the MIT License.
44
44
  */
@@ -638,7 +638,7 @@
638
638
  return iframe;
639
639
  };
640
640
  var useCsvPlugin = function (_a) {
641
- 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;
641
+ 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;
642
642
  var id = "usecsv-".concat(Math.round(Math.random() * 100000000));
643
643
  return whenDomReady().then(function () {
644
644
  var iframe = insertIframe(id, importerDisplay);
@@ -648,7 +648,7 @@
648
648
  };
649
649
  var iframeConnection = connectToChild({
650
650
  iframe: iframe,
651
- methods: __assign(__assign(__assign({ closeIframe: closeIframe }, (onData
651
+ methods: __assign(__assign(__assign(__assign({ closeIframe: closeIframe }, (onData
652
652
  ? {
653
653
  onData: function (data) { return onData(data, closeIframe); },
654
654
  }
@@ -660,13 +660,17 @@
660
660
  ? {
661
661
  onRecordEdit: onRecordEdit,
662
662
  }
663
+ : {})), (onClose
664
+ ? {
665
+ onClose: onClose,
666
+ }
663
667
  : {})),
664
668
  });
665
669
  iframeConnection.promise.then(function (child) {
666
670
  var _a;
667
671
  (_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.classList.remove("loading");
668
672
  // eslint-disable-next-line dot-notation
669
- child["setParams"] && child["setParams"]({ importerKey: importerKey, user: user, metadata: metadata });
673
+ child["setParams"] && child["setParams"]({ importerKey: importerKey, user: user, metadata: metadata, importerDisplay: importerDisplay });
670
674
  });
671
675
  return iframeConnection;
672
676
  });