@usecsv/react 0.13.0 → 0.14.1

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.14.1](https://github.com/layercodedev/usecsv-react-plugin/compare/v0.14.0...v0.14.1) (2024-04-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * types ([ca25bda](https://github.com/layercodedev/usecsv-react-plugin/commit/ca25bdaacdbfa2b22a48cd9589aa94559f710974))
7
+
8
+ # [0.14.0](https://github.com/layercodedev/usecsv-react-plugin/compare/v0.13.0...v0.14.0) (2024-03-03)
9
+
10
+
11
+ ### Features
12
+
13
+ * update usecsv/js to include close importer param ([ce46c78](https://github.com/layercodedev/usecsv-react-plugin/commit/ce46c78cedfbdf0ace1252962b0e1c304cbb56ee))
14
+
1
15
  # [0.13.0](https://github.com/layercodedev/usecsv-react-plugin/compare/v0.12.0...v0.13.0) (2024-03-02)
2
16
 
3
17
 
package/build/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @usecsv/react v0.13.0
2
+ * @usecsv/react v0.14.1
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.26.0
37
+ * @usecsv/js v0.27.0
38
38
  * (c) layercode
39
39
  * Released under the MIT License.
40
40
  */
@@ -723,9 +723,14 @@ var useCsvPlugin = function (_a) {
723
723
  var _a;
724
724
  (_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.remove();
725
725
  };
726
+ var closeImporter = function () {
727
+ if (onClose)
728
+ onClose();
729
+ return closeIframe();
730
+ };
726
731
  var iframeConnection = connectToChild({
727
732
  iframe: iframe,
728
- methods: __assign(__assign(__assign(__assign(__assign(__assign(__assign({ closeIframe: closeIframe }, (onData ? { onData: function (data) { return onData(data, closeIframe); } } : {})), (onRecordsInitial ? { onRecordsInitial: onRecordsInitial } : {})), (onRecordEdit ? { onRecordEdit: onRecordEdit } : {})), (onClose ? { onClose: onClose } : {})), (onError ? { onError: onError } : {})), (onFileUpload ? { onFileUpload: onFileUpload } : {})), (onMatchColumns ? { onMatchColumns: onMatchColumns } : {})),
733
+ methods: __assign(__assign(__assign(__assign(__assign(__assign(__assign({ closeIframe: closeIframe }, (onData ? { onData: function (data) { return onData(data, closeImporter); } } : {})), (onRecordsInitial ? { onRecordsInitial: onRecordsInitial } : {})), (onRecordEdit ? { onRecordEdit: onRecordEdit } : {})), (onClose ? { onClose: onClose } : {})), (onError ? { onError: onError } : {})), (onFileUpload ? { onFileUpload: onFileUpload } : {})), (onMatchColumns ? { onMatchColumns: onMatchColumns } : {})),
729
734
  });
730
735
  iframeConnection.promise.then(function (child) {
731
736
  var _a;
@@ -3262,7 +3267,7 @@ var UseCsvButton = function (_a) {
3262
3267
  textAlign: "center",
3263
3268
  fontSize: "16px",
3264
3269
  cursor: "pointer",
3265
- }, onClick: function () { return useCsvPlugin(parmas); } }, children))));
3270
+ }, onClick: function () { return useCsvPlugin(parmas); } }, children || "Open UseCSV"))));
3266
3271
  };
3267
3272
 
3268
3273
  module.exports = UseCsvButton;