@usecsv/react 0.1.0 → 0.2.2
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 +21 -0
- package/build/index.cjs +61 -10
- package/build/index.cjs.map +1 -1
- package/build/index.esm.js +61 -10
- package/build/index.esm.js.map +1 -1
- package/build/index.js +61 -10
- package/build/index.js.map +1 -1
- package/build/index.mjs +61 -10
- package/build/index.mjs.map +1 -1
- package/build/index.umd.js +61 -10
- package/build/index.umd.js.map +1 -1
- package/build/index.umd.min.js +33 -4
- package/build/index.umd.min.js.map +1 -1
- package/build/types/lib/useCsvReactPlugin.d.ts +3 -7
- package/build/types/lib/useCsvReactPlugin.d.ts.map +1 -1
- package/package.json +4 -4
- package/.babelrc.jest.js +0 -14
- package/.editorconfig +0 -15
- package/.env +0 -0
- package/.env.example +0 -1
- package/.eslintignore +0 -1
- package/.eslintrc.airbnbts.js +0 -73
- package/.eslintrc.json +0 -91
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -7
- package/.github/dependabot.yml +0 -7
- package/.github/workflows/main.yml +0 -44
- package/.github/workflows/publish.yml +0 -19
- package/.github/workflows/sementic_release.yml +0 -27
- package/.gitignore +0 -8
- package/.nvmrc +0 -1
- package/.nyc_output/0196dd80-12a9-4176-bd5b-4a8bc6e984f9.json +0 -1
- package/.nyc_output/0d5259bc-f1f3-4ca2-9d4f-1f77daccebf4.json +0 -1
- package/.nyc_output/92c6bc34-84c6-46f7-9e14-0d1bd2068352.json +0 -1
- package/.nyc_output/a0942cca-db9b-40d2-833e-8fcf7011171f.json +0 -1
- package/.nyc_output/b3fc15a1-349d-4d4c-a8dd-2142cc988ac3.json +0 -1
- package/.nyc_output/processinfo/0196dd80-12a9-4176-bd5b-4a8bc6e984f9.json +0 -1
- package/.nyc_output/processinfo/0d5259bc-f1f3-4ca2-9d4f-1f77daccebf4.json +0 -1
- package/.nyc_output/processinfo/92c6bc34-84c6-46f7-9e14-0d1bd2068352.json +0 -1
- package/.nyc_output/processinfo/a0942cca-db9b-40d2-833e-8fcf7011171f.json +0 -1
- package/.nyc_output/processinfo/b3fc15a1-349d-4d4c-a8dd-2142cc988ac3.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/.nycrc +0 -8
- package/.prettierignore +0 -2
- package/.prettierrc.js +0 -6
- package/.releaserc.json +0 -39
- package/.vscode/extensions.json +0 -8
- package/.vscode/launch.json +0 -29
- package/.vscode/settings.json +0 -21
- package/commitlint.config.js +0 -1
- package/config/rollup.config.js +0 -78
- package/config/webpack.dev.js +0 -59
- package/reports/coverage/base.css +0 -224
- package/reports/coverage/block-navigation.js +0 -79
- package/reports/coverage/favicon.png +0 -0
- package/reports/coverage/index.html +0 -96
- package/reports/coverage/prettify.css +0 -1
- package/reports/coverage/prettify.js +0 -2
- package/reports/coverage/sort-arrow-sprite.png +0 -0
- package/reports/coverage/sorter.js +0 -170
- package/src/dev/index.html +0 -14
- package/src/dev/index.tsx +0 -22
- package/src/index.tsx +0 -3
- package/src/lib/useCsvReactPlugin.tsx +0 -42
- package/src/test/jest-setup.ts +0 -7
- package/tsconfig.json +0 -35
- package/tsconfig.module.json +0 -23
- package/yarn.lock +0 -11867
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [0.2.2](https://github.com/layercodedev/usecsv-react-plugin/compare/v0.2.1...v0.2.2) (2022-03-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update dependencies ([fb3153c](https://github.com/layercodedev/usecsv-react-plugin/commit/fb3153cf49c312aea6f153336b69db51bcb2b38a))
|
|
7
|
+
|
|
8
|
+
## [0.2.1](https://github.com/layercodedev/usecsv-react-plugin/compare/v0.2.0...v0.2.1) (2022-03-07)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* dependencies ([0925435](https://github.com/layercodedev/usecsv-react-plugin/commit/0925435998e0e3caed86f3c9592f4e089c3d92ae))
|
|
14
|
+
|
|
15
|
+
# [0.2.0](https://github.com/layercodedev/usecsv-react-plugin/compare/v0.1.0...v0.2.0) (2022-03-07)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add onData callback ([58bed53](https://github.com/layercodedev/usecsv-react-plugin/commit/58bed53a64ef4843aae5dcea44f6e533ab756676))
|
|
21
|
+
|
|
1
22
|
# [0.1.0](https://github.com/layercodedev/usecsv-react-plugin/compare/v0.0.2...v0.1.0) (2021-12-30)
|
|
2
23
|
|
|
3
24
|
|
package/build/index.cjs
CHANGED
|
@@ -1,17 +1,70 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @usecsv/react v0.
|
|
2
|
+
* @usecsv/react v0.2.2
|
|
3
3
|
* (c) layercode
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
+
/*! *****************************************************************************
|
|
10
|
+
Copyright (c) Microsoft Corporation.
|
|
11
|
+
|
|
12
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
+
purpose with or without fee is hereby granted.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
22
|
+
***************************************************************************** */
|
|
23
|
+
|
|
24
|
+
function __rest(s, e) {
|
|
25
|
+
var t = {};
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
27
|
+
t[p] = s[p];
|
|
28
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
29
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
30
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
31
|
+
t[p[i]] = s[p[i]];
|
|
32
|
+
}
|
|
33
|
+
return t;
|
|
34
|
+
}
|
|
35
|
+
|
|
9
36
|
/*!
|
|
10
|
-
* @usecsv/js v0.
|
|
37
|
+
* @usecsv/js v0.2.2
|
|
11
38
|
* (c) layercode
|
|
12
39
|
* Released under the MIT License.
|
|
13
40
|
*/
|
|
14
41
|
|
|
42
|
+
/*! *****************************************************************************
|
|
43
|
+
Copyright (c) Microsoft Corporation.
|
|
44
|
+
|
|
45
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
46
|
+
purpose with or without fee is hereby granted.
|
|
47
|
+
|
|
48
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
49
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
50
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
51
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
52
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
53
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
54
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
55
|
+
***************************************************************************** */
|
|
56
|
+
|
|
57
|
+
var __assign = function() {
|
|
58
|
+
__assign = Object.assign || function __assign(t) {
|
|
59
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
60
|
+
s = arguments[i];
|
|
61
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
62
|
+
}
|
|
63
|
+
return t;
|
|
64
|
+
};
|
|
65
|
+
return __assign.apply(this, arguments);
|
|
66
|
+
};
|
|
67
|
+
|
|
15
68
|
var containers = []; // will store container HTMLElement references
|
|
16
69
|
var styleElements = []; // will store {prepend: HTMLElement, append: HTMLElement}
|
|
17
70
|
|
|
@@ -573,18 +626,16 @@ var insertIframe = function (id) {
|
|
|
573
626
|
return iframe;
|
|
574
627
|
};
|
|
575
628
|
var useCsvPlugin = function (_a) {
|
|
576
|
-
var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata;
|
|
629
|
+
var importerKey = _a.importerKey, user = _a.user, metadata = _a.metadata, onData = _a.onData;
|
|
577
630
|
var id = "usecsv-".concat(Math.round(Math.random() * 100000000));
|
|
578
631
|
return whenDomReady().then(function () {
|
|
579
632
|
var iframe = insertIframe(id);
|
|
580
633
|
var iframeConnection = connectToChild({
|
|
581
634
|
iframe: iframe,
|
|
582
|
-
methods: {
|
|
583
|
-
closeIframe: function () {
|
|
635
|
+
methods: __assign({ closeIframe: function () {
|
|
584
636
|
var _a;
|
|
585
637
|
(_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
586
|
-
},
|
|
587
|
-
},
|
|
638
|
+
} }, (onData ? { onData: onData } : {})),
|
|
588
639
|
});
|
|
589
640
|
iframeConnection.promise.then(function (child) {
|
|
590
641
|
var _a;
|
|
@@ -3095,8 +3146,8 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
3095
3146
|
});
|
|
3096
3147
|
|
|
3097
3148
|
var UseCsvButton = function (_a) {
|
|
3098
|
-
var children = _a.children,
|
|
3099
|
-
return (react.createElement(react.Fragment, null, render ? (react.createElement(react.Fragment, null, render(function () { return useCsvPlugin(
|
|
3149
|
+
var children = _a.children, render = _a.render, parmas = __rest(_a, ["children", "render"]);
|
|
3150
|
+
return (react.createElement(react.Fragment, null, render ? (react.createElement(react.Fragment, null, render(function () { return useCsvPlugin(parmas); }))) : (react.createElement("button", { type: "button", id: "usecsv-button", style: {
|
|
3100
3151
|
backgroundColor: "#FFF",
|
|
3101
3152
|
color: "#000",
|
|
3102
3153
|
border: "2px solid #000",
|
|
@@ -3105,7 +3156,7 @@ var UseCsvButton = function (_a) {
|
|
|
3105
3156
|
textAlign: "center",
|
|
3106
3157
|
fontSize: "16px",
|
|
3107
3158
|
cursor: "pointer",
|
|
3108
|
-
}, onClick: function () { return useCsvPlugin(
|
|
3159
|
+
}, onClick: function () { return useCsvPlugin(parmas); } }, children))));
|
|
3109
3160
|
};
|
|
3110
3161
|
|
|
3111
3162
|
module.exports = UseCsvButton;
|