@usecsv/react 0.2.6 → 0.2.9

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.6
2
+ * @usecsv/react v0.2.9
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.3.1
41
+ * @usecsv/js v0.6.1
42
42
  * (c) layercode
43
43
  * Released under the MIT License.
44
44
  */
@@ -630,7 +630,7 @@
630
630
  return iframe;
631
631
  };
632
632
  var useCsvPlugin = function (_a) {
633
- var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData;
633
+ var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData, onRecordsInitial = _a.onRecordsInitial, onRecordEdit = _a.onRecordEdit;
634
634
  var id = "usecsv-".concat(Math.round(Math.random() * 100000000));
635
635
  return whenDomReady().then(function () {
636
636
  var iframe = insertIframe(id);
@@ -640,10 +640,18 @@
640
640
  };
641
641
  var iframeConnection = connectToChild({
642
642
  iframe: iframe,
643
- methods: __assign({ closeIframe: closeIframe }, (onData
643
+ methods: __assign(__assign(__assign({ closeIframe: closeIframe }, (onData
644
644
  ? {
645
645
  onData: function (data) { return onData(data, closeIframe); },
646
646
  }
647
+ : {})), (onRecordsInitial
648
+ ? {
649
+ onRecordsInitial: onRecordsInitial,
650
+ }
651
+ : {})), (onRecordEdit
652
+ ? {
653
+ onRecordEdit: onRecordEdit,
654
+ }
647
655
  : {})),
648
656
  });
649
657
  iframeConnection.promise.then(function (child) {