@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.
Files changed (67) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/build/index.cjs +61 -10
  3. package/build/index.cjs.map +1 -1
  4. package/build/index.esm.js +61 -10
  5. package/build/index.esm.js.map +1 -1
  6. package/build/index.js +61 -10
  7. package/build/index.js.map +1 -1
  8. package/build/index.mjs +61 -10
  9. package/build/index.mjs.map +1 -1
  10. package/build/index.umd.js +61 -10
  11. package/build/index.umd.js.map +1 -1
  12. package/build/index.umd.min.js +33 -4
  13. package/build/index.umd.min.js.map +1 -1
  14. package/build/types/lib/useCsvReactPlugin.d.ts +3 -7
  15. package/build/types/lib/useCsvReactPlugin.d.ts.map +1 -1
  16. package/package.json +4 -4
  17. package/.babelrc.jest.js +0 -14
  18. package/.editorconfig +0 -15
  19. package/.env +0 -0
  20. package/.env.example +0 -1
  21. package/.eslintignore +0 -1
  22. package/.eslintrc.airbnbts.js +0 -73
  23. package/.eslintrc.json +0 -91
  24. package/.github/PULL_REQUEST_TEMPLATE.md +0 -7
  25. package/.github/dependabot.yml +0 -7
  26. package/.github/workflows/main.yml +0 -44
  27. package/.github/workflows/publish.yml +0 -19
  28. package/.github/workflows/sementic_release.yml +0 -27
  29. package/.gitignore +0 -8
  30. package/.nvmrc +0 -1
  31. package/.nyc_output/0196dd80-12a9-4176-bd5b-4a8bc6e984f9.json +0 -1
  32. package/.nyc_output/0d5259bc-f1f3-4ca2-9d4f-1f77daccebf4.json +0 -1
  33. package/.nyc_output/92c6bc34-84c6-46f7-9e14-0d1bd2068352.json +0 -1
  34. package/.nyc_output/a0942cca-db9b-40d2-833e-8fcf7011171f.json +0 -1
  35. package/.nyc_output/b3fc15a1-349d-4d4c-a8dd-2142cc988ac3.json +0 -1
  36. package/.nyc_output/processinfo/0196dd80-12a9-4176-bd5b-4a8bc6e984f9.json +0 -1
  37. package/.nyc_output/processinfo/0d5259bc-f1f3-4ca2-9d4f-1f77daccebf4.json +0 -1
  38. package/.nyc_output/processinfo/92c6bc34-84c6-46f7-9e14-0d1bd2068352.json +0 -1
  39. package/.nyc_output/processinfo/a0942cca-db9b-40d2-833e-8fcf7011171f.json +0 -1
  40. package/.nyc_output/processinfo/b3fc15a1-349d-4d4c-a8dd-2142cc988ac3.json +0 -1
  41. package/.nyc_output/processinfo/index.json +0 -1
  42. package/.nycrc +0 -8
  43. package/.prettierignore +0 -2
  44. package/.prettierrc.js +0 -6
  45. package/.releaserc.json +0 -39
  46. package/.vscode/extensions.json +0 -8
  47. package/.vscode/launch.json +0 -29
  48. package/.vscode/settings.json +0 -21
  49. package/commitlint.config.js +0 -1
  50. package/config/rollup.config.js +0 -78
  51. package/config/webpack.dev.js +0 -59
  52. package/reports/coverage/base.css +0 -224
  53. package/reports/coverage/block-navigation.js +0 -79
  54. package/reports/coverage/favicon.png +0 -0
  55. package/reports/coverage/index.html +0 -96
  56. package/reports/coverage/prettify.css +0 -1
  57. package/reports/coverage/prettify.js +0 -2
  58. package/reports/coverage/sort-arrow-sprite.png +0 -0
  59. package/reports/coverage/sorter.js +0 -170
  60. package/src/dev/index.html +0 -14
  61. package/src/dev/index.tsx +0 -22
  62. package/src/index.tsx +0 -3
  63. package/src/lib/useCsvReactPlugin.tsx +0 -42
  64. package/src/test/jest-setup.ts +0 -7
  65. package/tsconfig.json +0 -35
  66. package/tsconfig.module.json +0 -23
  67. package/yarn.lock +0 -11867
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>usecsv plugin</title>
8
- </head>
9
-
10
- <body id="root">
11
-
12
- </body>
13
-
14
- </html>
package/src/dev/index.tsx DELETED
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- import ReactDOM from "react-dom";
3
-
4
- import UseCsvButton from "../index";
5
-
6
- ReactDOM.render(
7
- <React.StrictMode>
8
- <div
9
- style={{
10
- position: "absolute",
11
- top: "50%",
12
- left: "50%",
13
- transform: "translateX(-50%) translateY(-50%)",
14
- }}
15
- >
16
- <UseCsvButton importerKey="your-importer-key" user={{ userId: "12345" }} metadata={{ anotherId: "12345" }}>
17
- Import Data
18
- </UseCsvButton>
19
- </div>
20
- </React.StrictMode>,
21
- document.getElementById("root"),
22
- );
package/src/index.tsx DELETED
@@ -1,3 +0,0 @@
1
- import UseCsvButton from "./lib/useCsvReactPlugin";
2
-
3
- export default UseCsvButton;
@@ -1,42 +0,0 @@
1
- import useCsvPlugin from "@usecsv/js";
2
- import React, { FC, ReactNode } from "react";
3
-
4
- type UserObject = {
5
- readonly userId: string;
6
- };
7
- type UseCsvButtonTypes = {
8
- readonly importerKey: string;
9
- readonly user?: UserObject;
10
- readonly metadata: Record<string, string | number> | undefined;
11
- readonly render?: ((onClick: () => Promise<any>) => ReactNode) | undefined | null;
12
- };
13
-
14
- const UseCsvButton: FC<UseCsvButtonTypes> = ({ children, importerKey, user, metadata, render }) => {
15
- return (
16
- <>
17
- {render ? (
18
- <>{render(() => useCsvPlugin({ importerKey, user, metadata }))}</>
19
- ) : (
20
- <button
21
- type="button"
22
- id="usecsv-button"
23
- style={{
24
- backgroundColor: "#FFF",
25
- color: "#000",
26
- border: "2px solid #000",
27
- borderRadius: "6px",
28
- padding: "10px 15px",
29
- textAlign: "center",
30
- fontSize: "16px",
31
- cursor: "pointer",
32
- }}
33
- onClick={() => useCsvPlugin({ importerKey, user, metadata })}
34
- >
35
- {children}
36
- </button>
37
- )}
38
- </>
39
- );
40
- };
41
-
42
- export default UseCsvButton;
@@ -1,7 +0,0 @@
1
- // Global setup for Jest, will run once per test file
2
- // TODO: add spec files
3
- afterAll(() => {
4
- console.log("done");
5
- });
6
-
7
- export default {};
package/tsconfig.json DELETED
@@ -1,35 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- // Module settings.
4
- "allowSyntheticDefaultImports": true,
5
- "esModuleInterop": true,
6
- "isolatedModules": true,
7
- "moduleResolution": "node",
8
- "resolveJsonModule": true,
9
- // Strictness and quality settings.
10
- "alwaysStrict": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "importsNotUsedAsValues": "error",
13
- "noFallthroughCasesInSwitch": true,
14
- "noImplicitOverride": true,
15
- "noImplicitReturns": true,
16
- "noPropertyAccessFromIndexSignature": true,
17
- "noUncheckedIndexedAccess": true,
18
- "noUnusedLocals": true,
19
- "noUnusedParameters": true,
20
- "strict": true,
21
- "pretty": true /* Stylize errors and messages using color and context. */,
22
- // Type-checking settings.
23
- "lib": [
24
- "ES2020",
25
- "DOM"
26
- ],
27
- "skipDefaultLibCheck": true,
28
- "skipLibCheck": true,
29
- "jsx": "react"
30
- },
31
- "include": [
32
- "./src/**/*.ts",
33
- "src/index.tsx", "./src/**/*.tsx",
34
- ],
35
- }
@@ -1,23 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- // Transpilation settings.
5
- "module": "ES2020",
6
- "target": "ES5",
7
- // Output settings.
8
- "charset": "utf-8",
9
- "newLine": "LF",
10
- "sourceMap": true,
11
- // Type declaration settings.
12
- "declaration": true,
13
- "declarationDir": "build/types/",
14
- // "emitDeclarationOnly": true,
15
- "declarationMap": true,
16
- "jsx": "react"
17
- },
18
- "exclude": [
19
- "src/lib/**/*.spec.ts",
20
- "src/**/dev",
21
- "./**/test"
22
- ]
23
- }