@usecsv/react 0.2.6 → 0.2.7

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/build/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @usecsv/react v0.2.6
2
+ * @usecsv/react v0.2.7
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.3.1
35
+ * @usecsv/js v0.6.0
36
36
  * (c) layercode
37
37
  * Released under the MIT License.
38
38
  */
@@ -624,7 +624,7 @@ var insertIframe = function (id) {
624
624
  return iframe;
625
625
  };
626
626
  var useCsvPlugin = function (_a) {
627
- var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData;
627
+ var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData, onRecordsInitial = _a.onRecordsInitial, onRecordEdit = _a.onRecordEdit;
628
628
  var id = "usecsv-".concat(Math.round(Math.random() * 100000000));
629
629
  return whenDomReady().then(function () {
630
630
  var iframe = insertIframe(id);
@@ -634,10 +634,18 @@ var useCsvPlugin = function (_a) {
634
634
  };
635
635
  var iframeConnection = connectToChild({
636
636
  iframe: iframe,
637
- methods: __assign({ closeIframe: closeIframe }, (onData
637
+ methods: __assign(__assign(__assign({ closeIframe: closeIframe }, (onData
638
638
  ? {
639
639
  onData: function (data) { return onData(data, closeIframe); },
640
640
  }
641
+ : {})), (onRecordsInitial
642
+ ? {
643
+ onRecordsInitial: onRecordsInitial,
644
+ }
645
+ : {})), (onRecordEdit
646
+ ? {
647
+ onRecordEdit: onRecordEdit,
648
+ }
641
649
  : {})),
642
650
  });
643
651
  iframeConnection.promise.then(function (child) {