@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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [0.2.13](https://github.com/layercodedev/usecsv-react-plugin/compare/v0.2.12...v0.2.13) (2022-10-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update "@usecsv/js", support onClose prop in usecsv plugin ([a9980c7](https://github.com/layercodedev/usecsv-react-plugin/commit/a9980c7c60890b981aa6302379b8b808bf440906))
7
+
8
+ ## [0.2.12](https://github.com/layercodedev/usecsv-react-plugin/compare/v0.2.11...v0.2.12) (2022-10-24)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update "@usecsv/js", remove importer modal margin in inline display ([2094ed9](https://github.com/layercodedev/usecsv-react-plugin/commit/2094ed974fe4a17ef9c72150902d0eefe984bd1e))
14
+
1
15
  ## [0.2.11](https://github.com/layercodedev/usecsv-react-plugin/compare/v0.2.10...v0.2.11) (2022-10-23)
2
16
 
3
17
 
package/build/index.cjs CHANGED
@@ -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
  */
@@ -34,7 +34,7 @@ function __rest(s, e) {
34
34
  }
35
35
 
36
36
  /*!
37
- * @usecsv/js v0.8.0
37
+ * @usecsv/js v0.9.0
38
38
  * (c) layercode
39
39
  * Released under the MIT License.
40
40
  */
@@ -634,7 +634,7 @@ var insertIframe = function (id, importerDisplay) {
634
634
  return iframe;
635
635
  };
636
636
  var useCsvPlugin = function (_a) {
637
- 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;
637
+ 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;
638
638
  var id = "usecsv-".concat(Math.round(Math.random() * 100000000));
639
639
  return whenDomReady().then(function () {
640
640
  var iframe = insertIframe(id, importerDisplay);
@@ -644,7 +644,7 @@ var useCsvPlugin = function (_a) {
644
644
  };
645
645
  var iframeConnection = connectToChild({
646
646
  iframe: iframe,
647
- methods: __assign(__assign(__assign({ closeIframe: closeIframe }, (onData
647
+ methods: __assign(__assign(__assign(__assign({ closeIframe: closeIframe }, (onData
648
648
  ? {
649
649
  onData: function (data) { return onData(data, closeIframe); },
650
650
  }
@@ -656,13 +656,17 @@ var useCsvPlugin = function (_a) {
656
656
  ? {
657
657
  onRecordEdit: onRecordEdit,
658
658
  }
659
+ : {})), (onClose
660
+ ? {
661
+ onClose: onClose,
662
+ }
659
663
  : {})),
660
664
  });
661
665
  iframeConnection.promise.then(function (child) {
662
666
  var _a;
663
667
  (_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.classList.remove("loading");
664
668
  // eslint-disable-next-line dot-notation
665
- child["setParams"] && child["setParams"]({ importerKey: importerKey, user: user, metadata: metadata });
669
+ child["setParams"] && child["setParams"]({ importerKey: importerKey, user: user, metadata: metadata, importerDisplay: importerDisplay });
666
670
  });
667
671
  return iframeConnection;
668
672
  });