fuse-importer 0.21.0 → 0.23.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 (58) hide show
  1. package/README.md +259 -0
  2. package/lib/esm/Importer/ImporterContextProvider.d.ts +31 -4
  3. package/lib/esm/Importer/ImporterContextProvider.js +40 -33
  4. package/lib/esm/Importer/Matcher/index.js +6 -5
  5. package/lib/esm/Importer/PreviewModeBanner.d.ts +2 -0
  6. package/lib/esm/Importer/PreviewModeBanner.js +20 -0
  7. package/lib/esm/Importer/Review/index.js +14 -18
  8. package/lib/esm/Importer/SpreadsheetReviewContextProvider.js +1 -1
  9. package/lib/esm/Importer/Stepper.js +10 -3
  10. package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterDropzone.js +4 -1
  11. package/lib/esm/Importer/Uploader/HeadersPreview.js +19 -17
  12. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider.js +7 -5
  13. package/lib/esm/Importer/common/Spreadsheet/common/FieldHeader.d.ts +7 -0
  14. package/lib/esm/Importer/common/Spreadsheet/common/FieldHeader.js +31 -0
  15. package/lib/esm/Importer/common/Spreadsheet/common/fields/SpeadsheetAutocomplete.d.ts +11 -6
  16. package/lib/esm/Importer/common/Spreadsheet/common/fields/SpeadsheetAutocomplete.js +6 -7
  17. package/lib/esm/Importer/common/Spreadsheet/common/fields/SpreadsheetInput.d.ts +4 -4
  18. package/lib/esm/Importer/common/Spreadsheet/common/fields/SpreadsheetInput.js +4 -5
  19. package/lib/esm/Importer/common/Spreadsheet/common/fields/index.d.ts +6 -5
  20. package/lib/esm/Importer/common/Spreadsheet/common/fields/index.js +14 -6
  21. package/lib/esm/Importer/common/Spreadsheet/common/index.d.ts +3 -0
  22. package/lib/esm/Importer/common/Spreadsheet/common/index.js +53 -9
  23. package/lib/esm/Importer/common/Spreadsheet/index.js +28 -57
  24. package/lib/esm/Importer/common/Spreadsheet/inputs/Boolean.d.ts +3 -0
  25. package/lib/esm/Importer/common/Spreadsheet/inputs/Boolean.js +18 -0
  26. package/lib/esm/Importer/common/Spreadsheet/inputs/EmailInput.d.ts +3 -0
  27. package/lib/esm/Importer/common/Spreadsheet/inputs/EmailInput.js +14 -0
  28. package/lib/esm/Importer/common/Spreadsheet/inputs/EnumInput.d.ts +6 -0
  29. package/lib/esm/Importer/common/Spreadsheet/inputs/EnumInput.js +30 -0
  30. package/lib/esm/Importer/common/Spreadsheet/inputs/FloatInput.d.ts +3 -0
  31. package/lib/esm/Importer/common/Spreadsheet/inputs/FloatInput.js +16 -0
  32. package/lib/esm/Importer/common/Spreadsheet/inputs/IntegerInput.d.ts +3 -0
  33. package/lib/esm/Importer/common/Spreadsheet/inputs/IntegerInput.js +16 -0
  34. package/lib/esm/Importer/common/Spreadsheet/inputs/StringInput.d.ts +3 -0
  35. package/lib/esm/Importer/common/Spreadsheet/inputs/StringInput.js +14 -0
  36. package/lib/esm/Importer/common/Spreadsheet/inputs/index.d.ts +13 -0
  37. package/lib/esm/Importer/common/Spreadsheet/inputs/index.js +20 -0
  38. package/lib/esm/Importer/common/index.d.ts +2 -2
  39. package/lib/esm/Importer/common/index.js +2 -2
  40. package/lib/esm/Importer/index.d.ts +1 -0
  41. package/lib/esm/Importer/index.js +3 -4
  42. package/lib/esm/Importer/theme.d.ts +225 -0
  43. package/lib/esm/Importer/theme.js +18 -0
  44. package/lib/esm/common/buttons.d.ts +15 -5
  45. package/lib/esm/common/buttons.js +13 -11
  46. package/lib/esm/common/index.js +1 -1
  47. package/lib/esm/common/inputs/Autocomplete.d.ts +2 -2
  48. package/lib/esm/common/inputs/TextInput.js +8 -1
  49. package/lib/esm/common/logo.js +1 -1
  50. package/lib/esm/styled/themeType.d.ts +1 -1
  51. package/lib/esm/styled/utils.d.ts +3 -0
  52. package/lib/esm/styled/utils.js +4 -3
  53. package/lib/esm/types.d.ts +7 -2
  54. package/lib/esm/types.js +4 -1
  55. package/lib/main.js +1 -1
  56. package/package.json +2 -2
  57. package/lib/esm/Importer/useCustomImporter.d.ts +0 -4
  58. package/lib/esm/Importer/useCustomImporter.js +0 -81
@@ -10,4 +10,4 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- export var logo = (_jsxs("svg", __assign({ width: "176", height: "30", viewBox: "0 0 176 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M0 29.9999L20.5392 29.9999L31.5691 14.6739L21.1845 -2.83335e-06L0 29.9999Z", fill: "#214BA7" }), _jsx("path", { d: "M0.151122 0.00026989L10.2386 15.5298L21.2304 0.000268968L0.151122 0.00026989Z", fill: "#3A69CD" }), _jsx("path", { d: "M17.0308 0.000269593L10.2388 15.5298L21.2308 0.000269409L17.0308 0.000269593Z", fill: "#1A3778" }), _jsx("path", { d: "M40.5811 7.21279H47.5848C49.2586 7.21279 50.7343 7.53866 52.0117 8.19041C53.3038 8.82734 54.3022 9.73089 55.007 10.9011C55.7264 12.0712 56.0862 13.434 56.0862 14.9893C56.0862 16.5446 55.7264 17.9073 55.007 19.0775C54.3022 20.2477 53.3038 21.1586 52.0117 21.8104C50.7343 22.4473 49.2586 22.7658 47.5848 22.7658H40.5811V7.21279ZM47.4086 19.8107C48.9503 19.8107 50.1763 19.3812 51.0866 18.522C52.0117 17.6481 52.4742 16.4705 52.4742 14.9893C52.4742 13.508 52.0117 12.3379 51.0866 11.4788C50.1763 10.6048 48.9503 10.1679 47.4086 10.1679H44.149V19.8107H47.4086Z", fill: "#242934" }), _jsx("path", { d: "M70.5871 19.433H63.4292L62.0637 22.7658H58.4077L65.2792 7.21279H68.8031L75.6967 22.7658H71.9526L70.5871 19.433ZM69.4639 16.7001L67.0192 10.7455L64.5745 16.7001H69.4639Z", fill: "#242934" }), _jsx("path", { d: "M81.5876 10.1456H76.6541V7.21279H90.0889V10.1456H85.1555V22.7658H81.5876V10.1456Z", fill: "#242934" }), _jsx("path", { d: "M103.26 19.433H96.1017L94.7362 22.7658H91.0802L97.9518 7.21279H101.476L108.369 22.7658H104.625L103.26 19.433ZM102.136 16.7001L99.6917 10.7455L97.247 16.7001H102.136Z", fill: "#242934" }), _jsx("path", { d: "M134.304 7.21279L129.26 22.7658H125.428L122.036 12.2342L118.534 22.7658H114.724L109.659 7.21279H113.359L116.838 18.1443L120.472 7.21279H123.776L127.3 18.2332L130.89 7.21279H134.304Z", fill: "#242934" }), _jsx("path", { d: "M138.168 7.21279H141.736V22.7658H138.168V7.21279Z", fill: "#242934" }), _jsx("path", { d: "M152.332 23.0324C151.113 23.0324 149.931 22.8695 148.786 22.5436C147.656 22.2029 146.745 21.7659 146.055 21.2327L147.266 18.522C147.927 19.0108 148.713 19.4034 149.623 19.6996C150.533 19.9959 151.444 20.144 152.354 20.144C153.367 20.144 154.116 19.9959 154.601 19.6996C155.085 19.3886 155.327 18.9812 155.327 18.4776C155.327 18.1073 155.18 17.8036 154.887 17.5666C154.608 17.3148 154.241 17.1149 153.786 16.9667C153.345 16.8186 152.743 16.6557 151.98 16.4779C150.805 16.1965 149.843 15.9151 149.094 15.6336C148.346 15.3522 147.7 14.9004 147.156 14.2783C146.628 13.6562 146.363 12.8267 146.363 11.7898C146.363 10.8863 146.606 10.0716 147.09 9.34577C147.575 8.60515 148.302 8.02006 149.271 7.5905C150.254 7.16095 151.451 6.94617 152.861 6.94617C153.844 6.94617 154.806 7.06467 155.746 7.30166C156.685 7.53866 157.508 7.87935 158.212 8.32372L157.111 11.0566C155.687 10.2419 154.263 9.83458 152.839 9.83458C151.84 9.83458 151.099 9.99751 150.614 10.3234C150.144 10.6493 149.909 11.0788 149.909 11.6121C149.909 12.1453 150.181 12.5452 150.724 12.8119C151.282 13.0637 152.126 13.3155 153.257 13.5673C154.432 13.8487 155.393 14.1302 156.142 14.4116C156.891 14.693 157.53 15.1374 158.058 15.7447C158.602 16.352 158.873 17.1741 158.873 18.211C158.873 19.0997 158.624 19.9144 158.124 20.655C157.64 21.3808 156.906 21.9585 155.922 22.3881C154.938 22.8176 153.742 23.0324 152.332 23.0324Z", fill: "#242934" }), _jsx("path", { d: "M175.12 19.8774V22.7658H163.183V7.21279H174.834V10.1012H166.729V13.4784H173.887V16.278H166.729V19.8774H175.12Z", fill: "#242934" })] })));
13
+ export var logo = (_jsxs("svg", __assign({ width: "220", height: "32", viewBox: "0 0 220 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M3.96044 28.355L19.3937 28.355C19.5463 28.355 19.6898 28.2803 19.7803 28.1537L28.2598 16.2897C28.3833 16.117 28.3845 15.882 28.2628 15.708L19.827 3.64491L3.76198 27.9689C3.65363 28.133 3.76776 28.355 3.96044 28.355Z", fill: "#FD395E" }), _jsx("path", { d: "M3.76198 4.03111L11.667 16L19.827 3.64507L3.96044 3.64507C3.76775 3.64507 3.65363 3.86706 3.76198 4.03111Z", fill: "url(#paint0_linear_1502_38864)" }), _jsx("path", { d: "M15.0273 3.64506L11.6673 16L19.8273 3.64506L15.0273 3.64506Z", fill: "#8A0E25" }), _jsx("path", { d: "M39.3532 22.7756H42.8606V17.3201H47.9331V14.7574H42.8606V11.7869H48.1593V9.22419H39.3532V22.7756Z", fill: "black" }), _jsx("path", { d: "M52.1884 22.7756H61.1265V20.0964H55.6957V9.22419H52.1884V22.7756Z", fill: "black" }), _jsx("path", { d: "M63.8544 22.7756H67.4183L68.4554 19.8828H73.3959L74.3765 22.7756H78.2233L73.1508 9.22419H68.8514L63.8544 22.7756ZM72.5662 17.3201H69.2663L70.9634 12.0199H71.0011L72.5662 17.3201Z", fill: "black" }), _jsx("path", { d: "M82.8424 22.7756H86.3498V11.9034H89.5932V9.22419H79.5991V11.9034H82.8424V22.7756Z", fill: "black" }), _jsx("path", { d: "M93.4902 22.7756H96.9976V9.22419H93.4902V22.7756Z", fill: "black" }), _jsx("path", { d: "M101.787 22.7756H105.294V17.4172H106.03C107.331 17.4172 107.783 17.9996 108.5 20.3294L109.254 22.7756H112.912L111.63 19.0868C110.97 17.4366 110.895 16.4076 109.763 16.097V16.0581C111.46 15.6504 112.29 14.4467 112.29 12.6412C112.29 10.3114 110.386 9.22419 108.047 9.22419H101.787V22.7756ZM105.294 11.7869H106.218C107.557 11.7869 108.783 12.0199 108.783 13.2818C108.783 14.8156 107.35 14.8544 106.218 14.8544H105.294V11.7869Z", fill: "black" }), _jsx("path", { d: "M116.231 15.9999C116.231 20.31 118.532 23.0086 122.831 23.0086C127.13 23.0086 129.431 20.31 129.431 15.9999C129.431 11.651 127.168 8.99121 122.831 8.99121C118.494 8.99121 116.231 11.651 116.231 15.9999ZM119.852 15.9999C119.852 13.6507 120.7 11.6704 122.831 11.6704C124.962 11.6704 125.81 13.6507 125.81 15.9999C125.81 18.2326 124.962 20.3294 122.831 20.3294C120.7 20.3294 119.852 18.2326 119.852 15.9999Z", fill: "black" }), _jsx("path", { d: "M133.717 22.7756H136.942L136.829 13.5148H136.866L141.468 22.7756H145.823V9.22419H142.618L142.674 18.4267H142.637L138.186 9.22419H133.717V22.7756Z", fill: "black" }), _jsx("path", { d: "M150.336 22.4262C151.505 22.8144 153.033 23.0086 154.258 23.0086C157.181 23.0086 160.047 22.0573 160.047 18.5432C160.047 13.6507 153.825 15.1262 153.825 12.9324C153.825 11.7481 155.296 11.6704 156.182 11.6704C157.181 11.6704 158.2 11.8646 159.105 12.2917L159.331 9.49599C158.445 9.18536 157.2 8.99121 155.937 8.99121C153.297 8.99121 150.204 9.88428 150.204 13.1459C150.204 18.0773 156.427 16.4853 156.427 19.0092C156.427 20.0964 155.371 20.3294 154.258 20.3294C152.806 20.3294 151.543 19.9411 150.638 19.4363L150.336 22.4262Z", fill: "black" }), _jsx("path", { d: "M164.392 22.7756H167.9V17.3201H172.972V14.7574H167.9V11.7869H173.198V9.22419H164.392V22.7756Z", fill: "#FD395E" }), _jsx("path", { d: "M188.579 9.22419H185.072V17.0289C185.072 18.815 184.6 20.3294 182.809 20.3294C181.018 20.3294 180.546 18.815 180.546 17.0289V9.22419H177.039V17.6307C177.039 21.3389 179.377 23.0086 182.809 23.0086C186.241 23.0086 188.579 21.3389 188.579 17.6307V9.22419Z", fill: "#FD395E" }), _jsx("path", { d: "M192.835 22.4262C194.004 22.8144 195.531 23.0086 196.757 23.0086C199.68 23.0086 202.546 22.0573 202.546 18.5432C202.546 13.6507 196.323 15.1262 196.323 12.9324C196.323 11.7481 197.794 11.6704 198.68 11.6704C199.68 11.6704 200.698 11.8646 201.603 12.2917L201.829 9.49599C200.943 9.18536 199.699 8.99121 198.435 8.99121C195.795 8.99121 192.703 9.88428 192.703 13.1459C192.703 18.0773 198.926 16.4853 198.926 19.0092C198.926 20.0964 197.87 20.3294 196.757 20.3294C195.305 20.3294 194.042 19.9411 193.137 19.4363L192.835 22.4262Z", fill: "#FD395E" }), _jsx("path", { d: "M206.795 22.7756H216.28V20.2129H210.302V17.1454H215.752V14.5826H210.302V11.7869H216.073V9.22419H206.795V22.7756Z", fill: "#FD395E" }), _jsx("defs", { children: _jsxs("linearGradient", __assign({ id: "paint0_linear_1502_38864", x1: "1.81659", y1: "3.64507", x2: "20.2841", y2: "9.7137", gradientUnits: "userSpaceOnUse" }, { children: [_jsx("stop", { offset: "0.03125", stopColor: "#CA405A", stopOpacity: "0.958429" }), _jsx("stop", { offset: "1", stopColor: "#A2243B" })] })) })] })));
@@ -1,4 +1,4 @@
1
1
  import { ThemedCssFunction } from "styled-components";
2
2
  import { theme } from "./theme";
3
- export declare const css: ThemedCssFunction<null>;
3
+ export declare const css: ThemedCssFunction<any>;
4
4
  export declare type ThemeType = typeof theme;
@@ -8,9 +8,12 @@ export declare type CSSAnyProps = CSSProps | {
8
8
  [key: string]: any;
9
9
  };
10
10
  export declare const Div: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, CSSProps, never>;
11
+ export declare const HTMLButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, CSSProps, never>;
11
12
  export declare const Span: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, CSSProps, never>;
12
13
  export declare const P: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, CSSProps, never>;
13
14
  export declare type DivProps = React.HTMLAttributes<HTMLDivElement>;
15
+ export declare type HTMLButtonProps = React.HTMLAttributes<HTMLButtonElement>;
14
16
  export declare type HTMLInputProps = React.InputHTMLAttributes<HTMLInputElement>;
15
17
  export declare type DivCSSProps = DivProps & CSSProps;
18
+ export declare type HTMLButtonCSSProps = HTMLButtonProps & CSSProps;
16
19
  export declare type HTMLInputCSSProps = HTMLInputProps & CSSProps;
@@ -9,6 +9,7 @@ export var themeProps = css(templateObject_1 || (templateObject_1 = __makeTempla
9
9
  .filter(function (c) { return c; });
10
10
  });
11
11
  export var Div = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), themeProps);
12
- export var Span = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), themeProps);
13
- export var P = styled.p(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), themeProps);
14
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
12
+ export var HTMLButton = styled.button(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), themeProps);
13
+ export var Span = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), themeProps);
14
+ export var P = styled.p(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), themeProps);
15
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -7,6 +7,7 @@ export declare type SpreadsheetOptions = {
7
7
  export declare type ImporterOptions = {
8
8
  zIndex?: number;
9
9
  env?: EnvironmentType;
10
+ previewMode?: boolean;
10
11
  } & SpreadsheetOptions;
11
12
  export declare enum FieldTypes {
12
13
  boolean = "boolean",
@@ -14,8 +15,11 @@ export declare enum FieldTypes {
14
15
  float = "float",
15
16
  string = "string",
16
17
  email = "email",
17
- autocomplete = "autocomplete",
18
- enum = "enum"
18
+ enum = "enum",
19
+ url = "url",
20
+ date = "date",
21
+ datetime = "datetime",
22
+ time = "time"
19
23
  }
20
24
  export declare type Field = {
21
25
  name: string;
@@ -23,6 +27,7 @@ export declare type Field = {
23
27
  type: FieldTypes;
24
28
  isRequired?: boolean;
25
29
  options?: any;
30
+ pattern?: string;
26
31
  };
27
32
  export declare type SpreadsheetValidationErrors = {
28
33
  [rowId: string]: ValidationErrors;
package/lib/esm/types.js CHANGED
@@ -11,6 +11,9 @@ export var FieldTypes;
11
11
  FieldTypes["float"] = "float";
12
12
  FieldTypes["string"] = "string";
13
13
  FieldTypes["email"] = "email";
14
- FieldTypes["autocomplete"] = "autocomplete";
15
14
  FieldTypes["enum"] = "enum";
15
+ FieldTypes["url"] = "url";
16
+ FieldTypes["date"] = "date";
17
+ FieldTypes["datetime"] = "datetime";
18
+ FieldTypes["time"] = "time";
16
19
  })(FieldTypes || (FieldTypes = {}));