fuse-importer 0.17.0 → 0.22.0

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 (97) hide show
  1. package/lib/esm/Importer/Footer.js +2 -2
  2. package/lib/esm/Importer/ImporterContextProvider.d.ts +35 -5
  3. package/lib/esm/Importer/ImporterContextProvider.js +43 -24
  4. package/lib/esm/Importer/ImporterFonts.js +1 -1
  5. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcher/index.js +1 -1
  6. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcher/tableColumns.js +3 -3
  7. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcherContext.js +1 -1
  8. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/index.js +3 -3
  9. package/lib/esm/Importer/Matcher/HeaderMatcher/index.js +2 -2
  10. package/lib/esm/Importer/Matcher/HeaderMatcher/tableColumns.js +3 -3
  11. package/lib/esm/Importer/Matcher/common/icons/index.js +2 -2
  12. package/lib/esm/Importer/Matcher/common/index.js +4 -4
  13. package/lib/esm/Importer/Matcher/index.js +6 -5
  14. package/lib/esm/Importer/PreviewModeBanner.d.ts +2 -0
  15. package/lib/esm/Importer/PreviewModeBanner.js +20 -0
  16. package/lib/esm/Importer/Review/AppResponseModal.js +1 -1
  17. package/lib/esm/Importer/Review/index.js +18 -22
  18. package/lib/esm/Importer/SpreadsheetReviewContextProvider.js +2 -2
  19. package/lib/esm/Importer/Stepper.js +24 -17
  20. package/lib/esm/Importer/TrialModeBanner.js +3 -3
  21. package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterDropzone.js +7 -4
  22. package/lib/esm/Importer/Uploader/DragAndDropImporter/backgrounds.js +2 -2
  23. package/lib/esm/Importer/Uploader/DragAndDropImporter/index.js +9 -9
  24. package/lib/esm/Importer/Uploader/HeadersPreview.js +21 -19
  25. package/lib/esm/Importer/Uploader/UploaderContextProvider.js +1 -1
  26. package/lib/esm/Importer/Uploader/index.js +2 -2
  27. package/lib/esm/Importer/common/AppLoading.js +1 -1
  28. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider.js +8 -6
  29. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetRowNumbers.js +2 -2
  30. package/lib/esm/Importer/common/Spreadsheet/common/FieldHeader.d.ts +7 -0
  31. package/lib/esm/Importer/common/Spreadsheet/common/FieldHeader.js +31 -0
  32. package/lib/esm/Importer/common/Spreadsheet/common/fields/SpeadsheetAutocomplete.d.ts +11 -6
  33. package/lib/esm/Importer/common/Spreadsheet/common/fields/SpeadsheetAutocomplete.js +7 -8
  34. package/lib/esm/Importer/common/Spreadsheet/common/fields/SpreadsheetInput.d.ts +4 -4
  35. package/lib/esm/Importer/common/Spreadsheet/common/fields/SpreadsheetInput.js +5 -6
  36. package/lib/esm/Importer/common/Spreadsheet/common/fields/index.d.ts +6 -5
  37. package/lib/esm/Importer/common/Spreadsheet/common/fields/index.js +15 -7
  38. package/lib/esm/Importer/common/Spreadsheet/common/index.d.ts +3 -0
  39. package/lib/esm/Importer/common/Spreadsheet/common/index.js +53 -9
  40. package/lib/esm/Importer/common/Spreadsheet/index.js +32 -61
  41. package/lib/esm/Importer/common/Spreadsheet/inputs/Boolean.d.ts +3 -0
  42. package/lib/esm/Importer/common/Spreadsheet/inputs/Boolean.js +18 -0
  43. package/lib/esm/Importer/common/Spreadsheet/inputs/EmailInput.d.ts +3 -0
  44. package/lib/esm/Importer/common/Spreadsheet/inputs/EmailInput.js +14 -0
  45. package/lib/esm/Importer/common/Spreadsheet/inputs/EnumInput.d.ts +6 -0
  46. package/lib/esm/Importer/common/Spreadsheet/inputs/EnumInput.js +30 -0
  47. package/lib/esm/Importer/common/Spreadsheet/inputs/FloatInput.d.ts +3 -0
  48. package/lib/esm/Importer/common/Spreadsheet/inputs/FloatInput.js +16 -0
  49. package/lib/esm/Importer/common/Spreadsheet/inputs/IntegerInput.d.ts +3 -0
  50. package/lib/esm/Importer/common/Spreadsheet/inputs/IntegerInput.js +16 -0
  51. package/lib/esm/Importer/common/Spreadsheet/inputs/StringInput.d.ts +3 -0
  52. package/lib/esm/Importer/common/Spreadsheet/inputs/StringInput.js +14 -0
  53. package/lib/esm/Importer/common/Spreadsheet/inputs/index.d.ts +13 -0
  54. package/lib/esm/Importer/common/Spreadsheet/inputs/index.js +20 -0
  55. package/lib/esm/Importer/common/icons/index.js +3 -3
  56. package/lib/esm/Importer/common/index.d.ts +2 -2
  57. package/lib/esm/Importer/common/index.js +2 -2
  58. package/lib/esm/Importer/index.d.ts +4 -2
  59. package/lib/esm/Importer/index.js +10 -10
  60. package/lib/esm/Importer/theme.d.ts +225 -0
  61. package/lib/esm/Importer/theme.js +18 -0
  62. package/lib/esm/common/Modal.js +1 -1
  63. package/lib/esm/common/Spinner.js +1 -1
  64. package/lib/esm/common/Table/Pagination/icons.js +5 -5
  65. package/lib/esm/common/Table/Pagination/index.js +2 -2
  66. package/lib/esm/common/Table/TableDataProvider.js +1 -1
  67. package/lib/esm/common/Table/TableView/TableHeaders.js +2 -2
  68. package/lib/esm/common/Table/TableView/TableRow.js +3 -3
  69. package/lib/esm/common/Table/TableView/index.js +5 -5
  70. package/lib/esm/common/Table/icons.js +2 -2
  71. package/lib/esm/common/Table/index.js +2 -2
  72. package/lib/esm/common/Toast.js +4 -3
  73. package/lib/esm/common/TooltipProvider.js +1 -1
  74. package/lib/esm/common/buttons.d.ts +15 -5
  75. package/lib/esm/common/buttons.js +13 -11
  76. package/lib/esm/common/icons/index.js +11 -11
  77. package/lib/esm/common/index.js +2 -2
  78. package/lib/esm/common/inputs/Autocomplete.d.ts +2 -2
  79. package/lib/esm/common/inputs/Autocomplete.js +4 -4
  80. package/lib/esm/common/inputs/SelectMenu.js +1 -1
  81. package/lib/esm/common/inputs/TextInput.js +13 -6
  82. package/lib/esm/common/logo.js +1 -1
  83. package/lib/esm/index.d.ts +2 -1
  84. package/lib/esm/index.js +1 -0
  85. package/lib/esm/styled/theme/dimensionsCss.js +1 -1
  86. package/lib/esm/styled/theme/fontCss.d.ts +0 -1
  87. package/lib/esm/styled/theme/fontCss.js +10 -11
  88. package/lib/esm/styled/theme/index.d.ts +0 -2
  89. package/lib/esm/styled/themeType.d.ts +1 -1
  90. package/lib/esm/styled/utils.d.ts +3 -0
  91. package/lib/esm/styled/utils.js +4 -3
  92. package/lib/esm/types.d.ts +8 -2
  93. package/lib/esm/types.js +4 -1
  94. package/lib/main.js +1 -1
  95. package/package.json +2 -1
  96. package/lib/esm/Importer/useCustomImporter.d.ts +0 -4
  97. package/lib/esm/Importer/useCustomImporter.js +0 -80
@@ -23,53 +23,53 @@ import { GlobalStyle } from "./GlobalStyle";
23
23
  import { ImporterContextProvider, useImporterContext, } from "./ImporterContextProvider";
24
24
  import { ImporterFonts } from "./ImporterFonts";
25
25
  import { Matcher } from "./Matcher";
26
+ import { PreviewModeBanner } from "./PreviewModeBanner";
26
27
  import Review from "./Review";
27
28
  import { SpreadsheetReviewContextProvider } from "./SpreadsheetReviewContextProvider";
28
29
  import { Stepper } from "./Stepper";
29
30
  import { TrialModeBanner } from "./TrialModeBanner";
30
31
  import { Uploader } from "./Uploader";
31
- import { useCustomImporter } from "./useCustomImporter";
32
32
  import { useFullscreenOverlay } from "./useFullscreenOverlay";
33
33
  var Content = styled(Div)(function (_a) {
34
34
  var _b = _a.theme, colors = _b.colors, c = _b.css;
35
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n "], ["\n background-color: ", ";\n "])), colors.backgroundInterface);
35
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n padding-bottom: 70px;\n "], ["\n background-color: ", ";\n padding-bottom: 70px;\n "])), colors.backgroundInterface);
36
36
  });
37
37
  export var Layout = styled(Div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: grid;\n grid-template-rows: auto 1fr auto;\n height: 100vh;\n width: 100vw;\n overflow-y: scroll;\n position: fixed;\n top: 0;\n left: 0;\n z-index: ", ";\n ", ";\n"], ["\n display: grid;\n grid-template-rows: auto 1fr auto;\n height: 100vh;\n width: 100vw;\n overflow-y: scroll;\n position: fixed;\n top: 0;\n left: 0;\n z-index: ", ";\n ", ";\n"])), function (p) { return p.zIndex; }, function (p) { return p.theme.css.scrollbarDark; });
38
38
  var steps = [
39
39
  {
40
40
  label: "Upload",
41
- component: _jsx(Uploader, {}, void 0),
41
+ component: _jsx(Uploader, {}),
42
42
  },
43
43
  {
44
44
  label: "Match",
45
- component: _jsx(Matcher, {}, void 0),
45
+ component: _jsx(Matcher, {}),
46
46
  },
47
47
  {
48
48
  label: "Review",
49
- component: _jsx(Review, {}, void 0),
49
+ component: _jsx(Review, {}),
50
50
  },
51
51
  ];
52
52
  var Importer = function (_a) {
53
- var templateSlug = _a.templateSlug, apiToken = _a.apiToken, onSubmit = _a.onSubmit, onValidateRecord = _a.onValidateRecord, onValidateBatch = _a.onValidateBatch, options = _a.options, onClose = _a.onClose;
53
+ var templateSlug = _a.templateSlug, apiToken = _a.apiToken, onSubmit = _a.onSubmit, onValidateRecord = _a.onValidateRecord, onValidateBatch = _a.onValidateBatch, formatRecord = _a.formatRecord, options = _a.options, onClose = _a.onClose;
54
54
  useFullscreenOverlay();
55
55
  return (_jsx(ImporterContextProvider, __assign({}, {
56
56
  options: options,
57
57
  templateSlug: templateSlug,
58
58
  apiToken: apiToken,
59
+ formatRecord: formatRecord,
59
60
  onValidateRecord: onValidateRecord,
60
61
  onValidateBatch: onValidateBatch,
61
62
  onClose: onClose,
62
- }, { children: _jsx(ImporterWithContext, __assign({}, { onSubmit: onSubmit }), void 0) }), void 0));
63
+ }, { children: _jsx(ImporterWithContext, __assign({}, { onSubmit: onSubmit })) })));
63
64
  };
64
65
  var ImporterWithContext = function (_a) {
65
66
  var onSubmit = _a.onSubmit;
66
- var _b = useCustomImporter(), theme = _b.theme, logoURL = _b.logoURL;
67
- var _c = useImporterContext(), currentStepIndex = _c.currentStepIndex, matcherSubstep = _c.matcherSubstep, zIndex = _c.importerOptions.zIndex;
67
+ var _b = useImporterContext(), inTrialMode = _b.inTrialMode, currentStepIndex = _b.currentStepIndex, matcherSubstep = _b.matcherSubstep, theme = _b.theme, logoURL = _b.logoURL, zIndex = _b.importerOptions.zIndex;
68
68
  var layoutRef = useRef(null);
69
69
  useEffect(function () {
70
70
  layoutRef.current.scrollTo(0, 0);
71
71
  }, [currentStepIndex, matcherSubstep]);
72
- return (_jsxs(ThemeProvider, __assign({ theme: theme }, { children: [_jsx(Toast, {}, void 0), _jsx(GlobalStyle, {}, void 0), _jsx(ImporterFonts, {}, void 0), _jsx(SpreadsheetReviewContextProvider, __assign({ onSubmit: onSubmit }, { children: _jsxs(Layout, __assign({ zIndex: zIndex, ref: layoutRef }, { children: [_jsxs(Div, { children: [_jsx(TrialModeBanner, {}, void 0), _jsx(Stepper, { stepLabels: steps.map(function (step) { return step.label; }), logoURL: logoURL }, void 0)] }, void 0), _jsx(Content, { children: steps[currentStepIndex].component }, void 0), _jsx(Content, { children: _jsx(Footer, {}, void 0) }, void 0)] }), void 0) }), void 0)] }), void 0));
72
+ return (_jsxs(ThemeProvider, __assign({ theme: theme }, { children: [_jsx(Toast, {}), _jsx(GlobalStyle, {}), _jsx(ImporterFonts, {}), _jsx(SpreadsheetReviewContextProvider, __assign({ onSubmit: onSubmit }, { children: _jsxs(Layout, __assign({ zIndex: zIndex, ref: layoutRef }, { children: [_jsxs(Div, { children: [_jsx(PreviewModeBanner, {}), _jsx(TrialModeBanner, {}), _jsx(Stepper, { stepLabels: steps.map(function (step) { return step.label; }), logoURL: logoURL })] }), _jsx(Content, { children: steps[currentStepIndex].component }), inTrialMode && (_jsx(Content, { children: _jsx(Footer, {}) }))] })) }))] })));
73
73
  };
74
74
  export * from "./common/Spreadsheet";
75
75
  export * from "./common/utils";
@@ -0,0 +1,225 @@
1
+ import { theme } from "../styled/theme";
2
+ export declare type ImporterStylePreferences = {
3
+ id: number;
4
+ background: string;
5
+ highlight1: string;
6
+ highlight2: string;
7
+ primary_color: string;
8
+ secondary_color: string;
9
+ logo_url: string;
10
+ };
11
+ export declare type Theme = typeof theme;
12
+ declare const getCustomTheme: (importerStylePreferences: ImporterStylePreferences) => {
13
+ theme: {
14
+ colors: {
15
+ backgroundInterface: string;
16
+ interactiveDisabled: string;
17
+ error: string;
18
+ warning01: string;
19
+ highlight01: string;
20
+ tableHeader: string;
21
+ outlineInputs: string;
22
+ text: string;
23
+ textPrim: string;
24
+ textSec: string;
25
+ textTert: string;
26
+ textLink: string;
27
+ placeholder: string;
28
+ disabled1: string;
29
+ disabled2: string;
30
+ disabled3: string;
31
+ background: string;
32
+ red: string;
33
+ black: string;
34
+ gold: string;
35
+ pink100: string;
36
+ pink300: string;
37
+ pink500: string;
38
+ pink700: string;
39
+ pink900: string;
40
+ white: string;
41
+ white50: string;
42
+ red50: string;
43
+ red100: string;
44
+ red200: string;
45
+ red300: string;
46
+ red400: string;
47
+ red500: string;
48
+ red600: string;
49
+ red700: string;
50
+ red800: string;
51
+ red900: string;
52
+ red1000: string;
53
+ red2000: string;
54
+ blue50: string;
55
+ blue100: string;
56
+ blue400: string;
57
+ blue500: string;
58
+ blue900: string;
59
+ gray5: string;
60
+ gray10: string;
61
+ gray50: string;
62
+ gray100: string;
63
+ gray200: string;
64
+ gray300: string;
65
+ gray390: string;
66
+ gray400: string;
67
+ gray500: string;
68
+ gray600: string;
69
+ gray700: string;
70
+ gray800: string;
71
+ gray900: string;
72
+ gray1000: string;
73
+ green50: string;
74
+ green100: string;
75
+ green200: string;
76
+ green300: string;
77
+ green400: string;
78
+ green500: string;
79
+ green600: string;
80
+ green700: string;
81
+ green800: string;
82
+ green900: string;
83
+ green1000: string;
84
+ orange50: string;
85
+ orange100: string;
86
+ orange200: string;
87
+ orange300: string;
88
+ orange400: string;
89
+ orange500: string;
90
+ orange600: string;
91
+ orange700: string;
92
+ orange800: string;
93
+ orange900: string;
94
+ orange1000: string;
95
+ };
96
+ textStyles: {
97
+ h1: import("styled-components").FlattenSimpleInterpolation;
98
+ h2: import("styled-components").FlattenSimpleInterpolation;
99
+ h3: import("styled-components").FlattenSimpleInterpolation;
100
+ h4: import("styled-components").FlattenSimpleInterpolation;
101
+ h5: import("styled-components").FlattenSimpleInterpolation;
102
+ h6: import("styled-components").FlattenSimpleInterpolation;
103
+ subtitle: import("styled-components").FlattenSimpleInterpolation;
104
+ body1: import("styled-components").FlattenSimpleInterpolation;
105
+ body2: import("styled-components").FlattenSimpleInterpolation;
106
+ body3: import("styled-components").FlattenSimpleInterpolation;
107
+ body4: import("styled-components").FlattenSimpleInterpolation;
108
+ label1: import("styled-components").FlattenSimpleInterpolation;
109
+ label2: import("styled-components").FlattenSimpleInterpolation;
110
+ label3: import("styled-components").FlattenSimpleInterpolation;
111
+ helperText: import("styled-components").FlattenSimpleInterpolation;
112
+ buttonText: import("styled-components").FlattenSimpleInterpolation;
113
+ buttonTextSmall: import("styled-components").FlattenSimpleInterpolation;
114
+ link: import("styled-components").FlattenSimpleInterpolation;
115
+ };
116
+ css: {
117
+ pt: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
118
+ pb: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
119
+ pl: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
120
+ pr: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
121
+ p: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
122
+ mt: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
123
+ mb: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
124
+ ml: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
125
+ mr: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
126
+ m: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
127
+ top: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
128
+ bottom: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
129
+ left: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
130
+ right: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
131
+ clickable: import("styled-components").FlattenSimpleInterpolation;
132
+ disabledWhen: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
133
+ selectNone: import("styled-components").FlattenSimpleInterpolation;
134
+ yscroll: import("styled-components").FlattenSimpleInterpolation;
135
+ overflowHidden: import("styled-components").FlattenSimpleInterpolation;
136
+ rotate180: import("styled-components").FlattenSimpleInterpolation;
137
+ forMobile: import("styled-components").FlattenSimpleInterpolation;
138
+ forDesktop: import("styled-components").FlattenSimpleInterpolation;
139
+ mcontainer: import("styled-components").FlattenSimpleInterpolation;
140
+ c: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
141
+ bg: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
142
+ css: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
143
+ scrollbarDark: import("styled-components").FlattenSimpleInterpolation;
144
+ border: import("styled-components").FlattenSimpleInterpolation;
145
+ outline: import("styled-components").FlattenSimpleInterpolation;
146
+ borderwhite: import("styled-components").FlattenSimpleInterpolation;
147
+ borderred: import("styled-components").FlattenSimpleInterpolation;
148
+ bgred: import("styled-components").FlattenSimpleInterpolation;
149
+ bgblue: import("styled-components").FlattenSimpleInterpolation;
150
+ opacity5: import("styled-components").FlattenSimpleInterpolation;
151
+ semiBold: import("styled-components").FlattenSimpleInterpolation;
152
+ bold: import("styled-components").FlattenSimpleInterpolation;
153
+ extraBold: import("styled-components").FlattenSimpleInterpolation;
154
+ fontweight_800: import("styled-components").FlattenSimpleInterpolation;
155
+ italic: import("styled-components").FlattenSimpleInterpolation;
156
+ DM4: import("styled-components").FlattenSimpleInterpolation;
157
+ fs: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
158
+ lh: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
159
+ ls: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
160
+ h1: import("styled-components").FlattenSimpleInterpolation;
161
+ h2: import("styled-components").FlattenSimpleInterpolation;
162
+ h3: import("styled-components").FlattenSimpleInterpolation;
163
+ h4: import("styled-components").FlattenSimpleInterpolation;
164
+ h5: import("styled-components").FlattenSimpleInterpolation;
165
+ h6: import("styled-components").FlattenSimpleInterpolation;
166
+ subtitle: import("styled-components").FlattenSimpleInterpolation;
167
+ body1: import("styled-components").FlattenSimpleInterpolation;
168
+ body2: import("styled-components").FlattenSimpleInterpolation;
169
+ body3: import("styled-components").FlattenSimpleInterpolation;
170
+ body4: import("styled-components").FlattenSimpleInterpolation;
171
+ label1: import("styled-components").FlattenSimpleInterpolation;
172
+ label2: import("styled-components").FlattenSimpleInterpolation;
173
+ label3: import("styled-components").FlattenSimpleInterpolation;
174
+ helperText: import("styled-components").FlattenSimpleInterpolation;
175
+ buttonText: import("styled-components").FlattenSimpleInterpolation;
176
+ buttonTextSmall: import("styled-components").FlattenSimpleInterpolation;
177
+ link: import("styled-components").FlattenSimpleInterpolation;
178
+ truncateText: import("styled-components").FlattenSimpleInterpolation;
179
+ dInline: import("styled-components").FlattenSimpleInterpolation;
180
+ flexWrap: import("styled-components").FlattenSimpleInterpolation;
181
+ underline: import("styled-components").FlattenSimpleInterpolation;
182
+ textAlignCenter: import("styled-components").FlattenSimpleInterpolation;
183
+ textAlignRight: import("styled-components").FlattenSimpleInterpolation;
184
+ uppercase: import("styled-components").FlattenSimpleInterpolation;
185
+ capitalize: import("styled-components").FlattenSimpleInterpolation;
186
+ lowercase: import("styled-components").FlattenSimpleInterpolation;
187
+ dflex: import("styled-components").FlattenSimpleInterpolation;
188
+ centered: import("styled-components").FlattenSimpleInterpolation;
189
+ flexColumn: import("styled-components").FlattenSimpleInterpolation;
190
+ flexColumnCentered: import("styled-components").FlattenSimpleInterpolation;
191
+ flexRowReverse: import("styled-components").FlattenSimpleInterpolation;
192
+ spaceBetween: import("styled-components").FlattenSimpleInterpolation;
193
+ spaceBetweenAligned: import("styled-components").FlattenSimpleInterpolation;
194
+ spaceAround: import("styled-components").FlattenSimpleInterpolation;
195
+ justifyEnd: import("styled-components").FlattenSimpleInterpolation;
196
+ justifyCenter: import("styled-components").FlattenSimpleInterpolation;
197
+ alignEnd: import("styled-components").FlattenSimpleInterpolation;
198
+ alignStart: import("styled-components").FlattenSimpleInterpolation;
199
+ alignCenter: import("styled-components").FlattenSimpleInterpolation;
200
+ grow: import("styled-components").FlattenSimpleInterpolation;
201
+ pAbsolute: import("styled-components").FlattenSimpleInterpolation;
202
+ pRelative: import("styled-components").FlattenSimpleInterpolation;
203
+ pSticky: import("styled-components").FlattenSimpleInterpolation;
204
+ floatLeft: import("styled-components").FlattenSimpleInterpolation;
205
+ w50: import("styled-components").FlattenSimpleInterpolation;
206
+ w100: import("styled-components").FlattenSimpleInterpolation;
207
+ h100: import("styled-components").FlattenSimpleInterpolation;
208
+ w: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
209
+ h: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
210
+ dim: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
211
+ maxw: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
212
+ maxh: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
213
+ minw: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
214
+ minh: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
215
+ br: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
216
+ fadeIn: import("styled-components").FlattenSimpleInterpolation;
217
+ };
218
+ media: {
219
+ desktop: string;
220
+ mobile: string;
221
+ };
222
+ };
223
+ logoURL: string;
224
+ };
225
+ export { theme, getCustomTheme };
@@ -0,0 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { theme } from "../styled/theme";
13
+ var getCustomTheme = function (importerStylePreferences) {
14
+ var primary_color = importerStylePreferences.primary_color, secondary_color = importerStylePreferences.secondary_color, highlight1 = importerStylePreferences.highlight1, highlight2 = importerStylePreferences.highlight2, background = importerStylePreferences.background;
15
+ var customTheme = __assign(__assign({}, theme), { colors: __assign(__assign({}, theme.colors), { pink500: primary_color, black: secondary_color, blue500: highlight1, blue100: highlight2, backgroundInterface: background }) });
16
+ return { theme: customTheme, logoURL: importerStylePreferences.logo_url };
17
+ };
18
+ export { theme, getCustomTheme };
@@ -23,6 +23,6 @@ export var ModalWrapper = styled(Div)(templateObject_3 || (templateObject_3 = __
23
23
  export var ModalCloseIcon = styled(Div)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 0;\n display: flex;\n flex-direction: row-reverse;\n"], ["\n height: 0;\n display: flex;\n flex-direction: row-reverse;\n"])));
24
24
  export var Modal = function (_a) {
25
25
  var _b = _a.isOpen, isOpen = _b === void 0 ? false : _b, _c = _a.onClose, onClose = _c === void 0 ? null : _c, children = _a.children, _d = _a.withCloseIcon, withCloseIcon = _d === void 0 ? true : _d, _e = _a.withBackdropClose, withBackdropClose = _e === void 0 ? true : _e, _f = _a.className, className = _f === void 0 ? "" : _f;
26
- return (_jsx(_Fragment, { children: isOpen && (_jsxs(Div, __assign({ className: className }, { children: [_jsx(ModalBackdrop, { onClick: withBackdropClose ? onClose : null }, void 0), _jsx(ModalContainer, { children: _jsxs(ModalWrapper, { children: [withCloseIcon && (_jsx(ModalCloseIcon, { children: _jsx(Div, __assign({ clickable: true, mt: -10, mr: -20, onClick: onClose }, { children: closeIcon }), void 0) }, void 0)), _jsx(Div, { children: children }, void 0)] }, void 0) }, void 0)] }), void 0)) }, void 0));
26
+ return (_jsx(_Fragment, { children: isOpen && (_jsxs(Div, __assign({ className: className }, { children: [_jsx(ModalBackdrop, { onClick: withBackdropClose ? onClose : null }), _jsx(ModalContainer, { children: _jsxs(ModalWrapper, { children: [withCloseIcon && (_jsx(ModalCloseIcon, { children: _jsx(Div, __assign({ clickable: true, mt: -10, mr: -20, onClick: onClose }, { children: closeIcon })) })), _jsx(Div, { children: children })] }) })] }))) }));
27
27
  };
28
28
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -35,7 +35,7 @@ var Bounce2 = styled(Bounce)(templateObject_4 || (templateObject_4 = __makeTempl
35
35
  var SpinnerContainer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 70px;\n text-align: center;\n"], ["\n width: 70px;\n text-align: center;\n"])));
36
36
  var Spinner = function (_a) {
37
37
  var _b = _a.color, color = _b === void 0 ? theme.colors.gray300 : _b, props = __rest(_a, ["color"]);
38
- return (_jsx(Wrapper, __assign({}, props, { children: _jsxs(SpinnerContainer, { children: [_jsx(Bounce1, { color: color }, void 0), _jsx(Bounce2, { color: color }, void 0), _jsx(Bounce, { color: color }, void 0)] }, void 0) }), void 0));
38
+ return (_jsx(Wrapper, __assign({}, props, { children: _jsxs(SpinnerContainer, { children: [_jsx(Bounce1, { color: color }), _jsx(Bounce2, { color: color }), _jsx(Bounce, { color: color })] }) })));
39
39
  };
40
40
  export { Spinner };
41
41
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -33,10 +33,10 @@ var IconContainer = styled(Div)(templateObject_3 || (templateObject_3 = __makeTe
33
33
  });
34
34
  export var PaginationIcon = function (_a) {
35
35
  var _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, children = _a.children, props = __rest(_a, ["isDisabled", "children"]);
36
- return (_jsx(IconContainer, __assign({ ml: 10, isDisabled: isDisabled }, props, { children: children }), void 0));
36
+ return (_jsx(IconContainer, __assign({ ml: 10, isDisabled: isDisabled }, props, { children: children })));
37
37
  };
38
- export var previousPage = (_jsx("svg", __assign({ width: "8", height: "13", viewBox: "0 0 8 13", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M7.00623 0.90802L1.26688 6.3505L7.00623 11.793", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }, void 0) }), void 0));
39
- export var nextPage = (_jsx("svg", __assign({ width: "8", height: "13", viewBox: "0 0 8 13", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M1.24243 0.90802L6.98177 6.3505L1.24243 11.793", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }, void 0) }), void 0));
40
- export var jumpToFirst = (_jsxs("svg", __assign({ width: "24", height: "19", viewBox: "0 0 24 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M16.4547 3.90802L10.7154 9.3505L16.4547 14.793", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }, void 0), _jsx("path", { d: "M6.59399 14.069L6.59399 4.68966", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }, void 0)] }), void 0));
41
- export var jumpToLast = (_jsxs("svg", __assign({ width: "25", height: "19", viewBox: "0 0 25 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M8.23022 14.8506L13.9696 9.40811L8.23023 3.96563", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }, void 0), _jsx("path", { d: "M18.0909 4.68964L18.0909 14.0689", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }, void 0)] }), void 0));
38
+ export var previousPage = (_jsx("svg", __assign({ width: "8", height: "13", viewBox: "0 0 8 13", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M7.00623 0.90802L1.26688 6.3505L7.00623 11.793", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })));
39
+ export var nextPage = (_jsx("svg", __assign({ width: "8", height: "13", viewBox: "0 0 8 13", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M1.24243 0.90802L6.98177 6.3505L1.24243 11.793", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })));
40
+ export var jumpToFirst = (_jsxs("svg", __assign({ width: "24", height: "19", viewBox: "0 0 24 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M16.4547 3.90802L10.7154 9.3505L16.4547 14.793", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M6.59399 14.069L6.59399 4.68966", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" })] })));
41
+ export var jumpToLast = (_jsxs("svg", __assign({ width: "25", height: "19", viewBox: "0 0 25 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M8.23022 14.8506L13.9696 9.40811L8.23023 3.96563", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M18.0909 4.68964L18.0909 14.0689", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" })] })));
42
42
  var templateObject_1, templateObject_2, templateObject_3;
@@ -25,8 +25,8 @@ var Pagination = function () {
25
25
  var isFirstPage = currentPage === 1;
26
26
  var isLastPage = currentPage === totalPages;
27
27
  var cursor = (currentPage - 1) * pageSize;
28
- var buttonsUI = (_jsxs(Div, __assign({ mr: 25, dflex: true }, { children: [_jsx(PaginationIcon, __assign({ isDisabled: isFirstPage, onClick: function () { return setCurrentPage(1); } }, { children: jumpToFirst }), void 0), _jsx(PaginationIcon, __assign({ isDisabled: isFirstPage, onClick: function () { return setCurrentPage(Math.max(currentPage - 1, 1)); } }, { children: previousPage }), void 0), _jsxs(Div, __assign({ centered: true, ml: 10 }, { children: [cursor + 1, "-", Math.min(cursor + pageSize, totalCount), " of ", totalCount] }), void 0), _jsx(PaginationIcon, __assign({ isDisabled: isLastPage, onClick: function () { return setCurrentPage(Math.min(currentPage + 1, totalPages)); } }, { children: nextPage }), void 0), _jsx(PaginationIcon, __assign({ isDisabled: isLastPage, onClick: function () { return setCurrentPage(totalPages); } }, { children: jumpToLast }), void 0)] }), void 0));
29
- return (_jsx(Container, __assign({ w100: true }, { children: _jsx(Div, __assign({ h: 38, bg: colors.tableHeader, justifyEnd: true }, { children: _jsx(Div, __assign({ dflex: true, alignCenter: true, body2: true, c: colors.text }, { children: buttonsUI }), void 0) }), void 0) }), void 0));
28
+ var buttonsUI = (_jsxs(Div, __assign({ mr: 25, dflex: true }, { children: [_jsx(PaginationIcon, __assign({ isDisabled: isFirstPage, onClick: function () { return setCurrentPage(1); } }, { children: jumpToFirst })), _jsx(PaginationIcon, __assign({ isDisabled: isFirstPage, onClick: function () { return setCurrentPage(Math.max(currentPage - 1, 1)); } }, { children: previousPage })), _jsxs(Div, __assign({ centered: true, ml: 10 }, { children: [cursor + 1, "-", Math.min(cursor + pageSize, totalCount), " of ", totalCount] })), _jsx(PaginationIcon, __assign({ isDisabled: isLastPage, onClick: function () { return setCurrentPage(Math.min(currentPage + 1, totalPages)); } }, { children: nextPage })), _jsx(PaginationIcon, __assign({ isDisabled: isLastPage, onClick: function () { return setCurrentPage(totalPages); } }, { children: jumpToLast }))] })));
29
+ return (_jsx(Container, __assign({ w100: true }, { children: _jsx(Div, __assign({ h: 38, bg: colors.tableHeader, justifyEnd: true }, { children: _jsx(Div, __assign({ dflex: true, alignCenter: true, body2: true, c: colors.text }, { children: buttonsUI })) })) })));
30
30
  };
31
31
  export { Pagination };
32
32
  var templateObject_1;
@@ -121,6 +121,6 @@ export var TableDataProvider = function (_a) {
121
121
  setSortBy: setSortBy,
122
122
  setCurrentPage: setCurrentPage,
123
123
  };
124
- return (_jsx(TableContext.Provider, __assign({ value: value }, { children: data ? children : isLoading && _jsx(Spinner, { mt: 200 }, void 0) }), void 0));
124
+ return (_jsx(TableContext.Provider, __assign({ value: value }, { children: data ? children : isLoading && _jsx(Spinner, { mt: 200 }) })));
125
125
  };
126
126
  export var useTableContext = function () { return useContext(TableContext); };
@@ -64,7 +64,7 @@ export var TableHeaders = function (_a) {
64
64
  });
65
65
  }
66
66
  };
67
- return (_jsxs(TableViewHeader, __assign({ isLast: index === columns.length - 1, w: columnWidthPercentage(column, columns), onClick: onHeaderClick, h: height }, props, { children: [_jsx(_Fragment, { children: Header ? _jsx(Header, {}, void 0) : header }, void 0), (sortBy === null || sortBy === void 0 ? void 0 : sortBy.field) === column.dataAccessor && (_jsx(SortIndicator, __assign({ direction: sortBy === null || sortBy === void 0 ? void 0 : sortBy.direction }, { children: chevronDownIcon }), void 0))] }), index));
68
- }) }), void 0) }), void 0));
67
+ return (_jsxs(TableViewHeader, __assign({ isLast: index === columns.length - 1, w: columnWidthPercentage(column, columns), onClick: onHeaderClick, h: height }, props, { children: [_jsx(_Fragment, { children: Header ? _jsx(Header, {}) : header }), (sortBy === null || sortBy === void 0 ? void 0 : sortBy.field) === column.dataAccessor && (_jsx(SortIndicator, __assign({ direction: sortBy === null || sortBy === void 0 ? void 0 : sortBy.direction }, { children: chevronDownIcon })))] }), index));
68
+ }) })) })));
69
69
  };
70
70
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -31,7 +31,7 @@ import { Div } from "../../../styled/utils";
31
31
  import { columnWidthPercentage, TableViewCellContainer } from "./common";
32
32
  export var Cell = function (props) {
33
33
  var row = props.row, children = props.children, cellProps = __rest(props, ["row", "children"]);
34
- return useMemo(function () { return (_jsx(TableViewCellContainer, __assign({}, cellProps, { children: children }), void 0)); },
34
+ return useMemo(function () { return (_jsx(TableViewCellContainer, __assign({}, cellProps, { children: children }))); },
35
35
  // using [row] with usememo optimizes table renders but disables react hotreloading
36
36
  // [row, children] enables hotreloading, missing tests for optimizations
37
37
  // should we use [row] instead of [row, children] for table optimization ?
@@ -51,7 +51,7 @@ export var TableRow = function (_a) {
51
51
  ? function () {
52
52
  onRowClick(row);
53
53
  }
54
- : null, w: columnWidthPercentage(column, columns) }, { children: _jsx(_Fragment, { children: Content ? (_jsx(Content, __assign({}, row, { rowIndex: indexI }), void 0)) : (_jsx(Div, __assign({ truncateText: true }, { children: row[column.dataAccessor] || "-" }), void 0)) }, void 0) }), indexJ));
55
- }) }), void 0) }, void 0));
54
+ : null, w: columnWidthPercentage(column, columns) }, { children: _jsx(_Fragment, { children: Content ? (_jsx(Content, __assign({}, row, { rowIndex: indexI }))) : (_jsx(Div, __assign({ truncateText: true }, { children: row[column.dataAccessor] || "-" }))) }) }), indexJ));
55
+ }) })) }));
56
56
  };
57
57
  var templateObject_1, templateObject_2, templateObject_3;
@@ -57,7 +57,7 @@ var TableView = function (_a) {
57
57
  columns: columns,
58
58
  sortBy: sortBy,
59
59
  setSortBy: setSortBy,
60
- }), void 0)) }, void 0));
60
+ }))) }));
61
61
  var onScroll = function (_a) {
62
62
  var scrollTop = _a.scrollTop, _scrollLeft = _a.scrollLeft;
63
63
  setScrollLeft(_scrollLeft);
@@ -79,9 +79,9 @@ var TableView = function (_a) {
79
79
  columns: columns,
80
80
  onRowClick: onRowClick,
81
81
  highlightFirstRow: highlightFirstRow,
82
- }, { h: rowHeight, row: data[rowIndex], indexI: rowIndex, isLast: rowIndex === data.length - 1, pRelative: true }), void 0) }), key));
82
+ }, { h: rowHeight, row: data[rowIndex], indexI: rowIndex, isLast: rowIndex === data.length - 1, pRelative: true })) }), key));
83
83
  };
84
- var loadingUI = (_jsx(_Fragment, { children: isLoading && (_jsx(SpinnerWrapper, __assign({ pRelative: true }, { children: _jsx(Div, __assign({ w100: true, h100: true, centered: true, h: 400, pAbsolute: true }, { children: _jsx(Spinner, {}, void 0) }), void 0) }), void 0)) }, void 0));
84
+ var loadingUI = (_jsx(_Fragment, { children: isLoading && (_jsx(SpinnerWrapper, __assign({ pRelative: true }, { children: _jsx(Div, __assign({ w100: true, h100: true, centered: true, h: 400, pAbsolute: true }, { children: _jsx(Spinner, {}) })) }))) }));
85
85
  var tableHeight = pageSize ? pageSize * rowHeight + tableHeadersHeight : h;
86
86
  return (_jsxs(TableViewWrapper, __assign({}, { isLoading: isLoading }, { h: tableHeight }, props, { children: [tableHeadersUI, loadingUI, _jsx(AutoSizer, { children: function (_a) {
87
87
  var width = _a.width, height = _a.height;
@@ -96,7 +96,7 @@ var TableView = function (_a) {
96
96
  gridStyles = __assign(__assign({}, gridStyles), { overflowX: "hidden", overflowY: "auto" });
97
97
  else if (_rowWidth > 1)
98
98
  gridStyles = __assign(__assign({}, gridStyles), { overflowX: "scroll" });
99
- return (_jsx(Grid, { scrollLeft: scrollLeft, style: gridStyles, width: width, columnCount: 1, onSectionRendered: _onSectionRendered, onScroll: onScroll, columnWidth: Math.floor(width * _rowWidth), height: height - tableHeadersHeight, rowHeight: rowHeight, cellRenderer: rowRenderer, rowCount: data.length }, void 0));
100
- } }, void 0)] }), void 0));
99
+ return (_jsx(Grid, { scrollLeft: scrollLeft, style: gridStyles, width: width, columnCount: 1, onSectionRendered: _onSectionRendered, onScroll: onScroll, columnWidth: Math.floor(width * _rowWidth), height: height - tableHeadersHeight, rowHeight: rowHeight, cellRenderer: rowRenderer, rowCount: data.length }));
100
+ } })] })));
101
101
  };
102
102
  var templateObject_1, templateObject_2, templateObject_3;
@@ -10,5 +10,5 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- export var chevronDown = (_jsx("svg", __assign({ width: "9", height: "5", viewBox: "0 0 9 5", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M4.31848 4.93945L0.421366 0.439453L8.2156 0.439454L4.31848 4.93945Z", fill: "#102622" }, void 0) }), void 0));
14
- export var chevronRight = (_jsx("svg", __assign({ width: "6", height: "8", viewBox: "0 0 6 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M5.31848 4.06738L0.818482 7.9645L0.818482 0.170269L5.31848 4.06738Z", fill: "#102622" }, void 0) }), void 0));
13
+ export var chevronDown = (_jsx("svg", __assign({ width: "9", height: "5", viewBox: "0 0 9 5", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M4.31848 4.93945L0.421366 0.439453L8.2156 0.439454L4.31848 4.93945Z", fill: "#102622" }) })));
14
+ export var chevronRight = (_jsx("svg", __assign({ width: "6", height: "8", viewBox: "0 0 6 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M5.31848 4.06738L0.818482 7.9645L0.818482 0.170269L5.31848 4.06738Z", fill: "#102622" }) })));
@@ -37,8 +37,8 @@ var Table = function (_a) {
37
37
  var columns = _a.columns, _b = _a.onRowClick, onRowClick = _b === void 0 ? null : _b, _c = _a.blankState, blankState = _c === void 0 ? null : _c, props = __rest(_a, ["columns", "onRowClick", "blankState"]);
38
38
  var _d = useTableContext(), data = _d.data, isLoading = _d.isLoading, sortBy = _d.sortBy, setSortBy = _d.setSortBy, totalPages = _d.totalPages;
39
39
  var withPagination = data.length > 0 && totalPages > 1;
40
- var paginationUI = (_jsx(_Fragment, { children: withPagination && (_jsx(Div, __assign({ dflex: true, justifyCenter: true, pb: 50 }, { children: _jsx(Pagination, {}, void 0) }), void 0)) }, void 0));
41
- return (_jsxs(Div, __assign({}, props, { children: [data.length ? (_jsx(TableView, __assign({ pageSize: data.length, withPagination: withPagination }, { isLoading: isLoading, data: data, columns: columns, sortBy: sortBy, setSortBy: setSortBy, onRowClick: onRowClick }), void 0)) : (blankState), paginationUI] }), void 0));
40
+ var paginationUI = (_jsx(_Fragment, { children: withPagination && (_jsx(Div, __assign({ dflex: true, justifyCenter: true, pb: 50 }, { children: _jsx(Pagination, {}) }))) }));
41
+ return (_jsxs(Div, __assign({}, props, { children: [data.length ? (_jsx(TableView, __assign({ pageSize: data.length, withPagination: withPagination }, { isLoading: isLoading, data: data, columns: columns, sortBy: sortBy, setSortBy: setSortBy, onRowClick: onRowClick }))) : (blankState), paginationUI] })));
42
42
  };
43
43
  export { Table };
44
44
  export * from "./TableDataProvider";
@@ -32,6 +32,7 @@ export var addToast = function (msg, type, toastOptions) {
32
32
  };
33
33
  var toastContainerCss = {
34
34
  padding: 0,
35
+ marginRight: 72,
35
36
  borderRadius: toastBorderRadius,
36
37
  boxShadow: "none",
37
38
  maxWidth: toastMaxWidth,
@@ -60,9 +61,9 @@ var Toast = function () {
60
61
  } }, { children: function (t) { return (_jsx(ToastBar, __assign({ toast: t }, { children: function (_a) {
61
62
  var message = _a.message, hotToastIcon = _a.icon;
62
63
  var _b = toastTypeStyles[t.type] || {}, icon = _b.icon, color = _b.color, backgroundColor = _b.backgroundColor;
63
- return (_jsxs(ToastWrapper, __assign({ c: color, bg: backgroundColor }, { children: [_jsx(Div, __assign({ alignCenter: true }, { children: icon || hotToastIcon }), void 0), _jsx(Div, __assign({ alignCenter: true }, { children: message }), void 0), _jsx(Div, __assign({ p: 5, clickable: true, onClick: function () { return toast.dismiss(t.id); } }, { children: closeIcon }), void 0)] }), void 0));
64
- } }), void 0)); } }), void 0));
64
+ return (_jsxs(ToastWrapper, __assign({ c: color, bg: backgroundColor }, { children: [_jsx(Div, __assign({ alignCenter: true }, { children: icon || hotToastIcon })), _jsx(Div, __assign({ alignCenter: true }, { children: message })), _jsx(Div, __assign({ p: 5, clickable: true, onClick: function () { return toast.dismiss(t.id); } }, { children: closeIcon }))] })));
65
+ } }))); } })));
65
66
  };
66
67
  export { Toast };
67
- var closeIcon = (_jsxs("svg", __assign({ width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M2.5 2.5L7.82258 7.82258", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, void 0), _jsx("path", { d: "M2.5 7.82251L7.82258 2.49993", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, void 0)] }), void 0));
68
+ var closeIcon = (_jsxs("svg", __assign({ width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M2.5 2.5L7.82258 7.82258", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M2.5 7.82251L7.82258 2.49993", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] })));
68
69
  var templateObject_1;
@@ -50,6 +50,6 @@ export var TooltipProvider = function (_a) {
50
50
  if (update)
51
51
  update();
52
52
  }, [isDisplayingTooltip]);
53
- return (_jsxs(Div, __assign({ dim: "100%", ref: setReferenceElement, onMouseOver: function () { return setIsDisplayingTooltip(true); }, onMouseOut: function () { return setIsDisplayingTooltip(false); } }, props, { children: [children, isDisplayingTooltip && tooltip && (_jsx(TooltipContent, __assign({ ref: setPopperElement, style: styles.popper }, attributes.popper, { children: tooltip }), void 0))] }), void 0));
53
+ return (_jsxs(Div, __assign({ dim: "100%", ref: setReferenceElement, onMouseOver: function () { return setIsDisplayingTooltip(true); }, onMouseOut: function () { return setIsDisplayingTooltip(false); } }, props, { children: [children, isDisplayingTooltip && tooltip && (_jsx(TooltipContent, __assign({ ref: setPopperElement, style: styles.popper }, attributes.popper, { children: tooltip })))] })));
54
54
  };
55
55
  var templateObject_1;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { DivCSSProps } from "../styled/utils";
2
+ import { CSSProps } from "../styled/utils";
3
3
  declare const types: readonly ["primary", "secondary", "tertiary"];
4
4
  export declare type ButtonTypes = typeof types[number];
5
5
  export declare type BtnProps = {
@@ -8,13 +8,23 @@ export declare type BtnProps = {
8
8
  children: any;
9
9
  isDisabled?: boolean;
10
10
  isSmall?: boolean;
11
- } & DivCSSProps;
12
- export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../styled/utils").CSSProps & {
11
+ isButtonElement?: boolean;
12
+ } & CSSProps;
13
+ export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, CSSProps & {
13
14
  onClick?: () => void;
14
15
  variant?: ButtonTypes;
15
16
  children: any;
16
17
  isDisabled?: boolean;
17
18
  isSmall?: boolean;
18
- } & import("../styled/utils").DivProps, never>;
19
- export declare const Button: ({ onClick, isDisabled, variant, isSmall, children, ...props }: BtnProps) => JSX.Element;
19
+ isButtonElement?: boolean;
20
+ }, never>;
21
+ export declare const ButtonElementWrapper: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, CSSProps & {
22
+ onClick?: () => void;
23
+ variant?: ButtonTypes;
24
+ children: any;
25
+ isDisabled?: boolean;
26
+ isSmall?: boolean;
27
+ isButtonElement?: boolean;
28
+ }, never>;
29
+ export declare const Button: ({ onClick, isDisabled, variant, isSmall, children, isButtonElement, ...props }: BtnProps) => JSX.Element;
20
30
  export {};
@@ -24,9 +24,9 @@ var __rest = (this && this.__rest) || function (s, e) {
24
24
  }
25
25
  return t;
26
26
  };
27
- import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
27
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
28
28
  import styled, { css } from "styled-components";
29
- import { Div } from "../styled/utils";
29
+ import { Div, HTMLButton } from "../styled/utils";
30
30
  var types = ["primary", "secondary", "tertiary"];
31
31
  var styles = {
32
32
  primary: css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n\n border: solid 4px ", ";\n box-sizing: border-box;\n\n :hover {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n :active {\n background: ", ";\n border: 4px solid ", ";\n }\n :focus {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n ", "\n "], ["\n color: ", ";\n background: ", ";\n\n border: solid 4px ", ";\n box-sizing: border-box;\n\n :hover {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n :active {\n background: ", ";\n border: 4px solid ", ";\n }\n :focus {\n background: ", ";\n /* a3 at the end adds 0.64 opacity */\n box-shadow: 0px 0px 8px ", "a3;\n }\n ", "\n "])), function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink700; }, function (props) { return props.theme.colors.pink500; }, function (props) { return props.theme.colors.pink500; }, function (props) {
@@ -39,20 +39,22 @@ var styles = {
39
39
  return props.isDisabled && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), function (props) { return props.theme.colors.gray300; });
40
40
  }),
41
41
  };
42
- export var ButtonWrapper = styled(Div)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 48px;\n ", "\n\n border: solid 1px black;\n border-radius: 24px;\n\n font-family: DM Sans;\n\n :focus {\n outline: none;\n }\n :hover {\n cursor: pointer;\n }\n\n ", "\n ", ";\n\n ", ";\n"], ["\n height: 48px;\n ", "\n\n border: solid 1px black;\n border-radius: 24px;\n\n font-family: DM Sans;\n\n :focus {\n outline: none;\n }\n :hover {\n cursor: pointer;\n }\n\n ", "\n ", ";\n\n ", ";\n"])), function (p) {
43
- return p.isSmall && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n height: 36px;\n "], ["\n height: 36px;\n "])));
42
+ var commonButtonStyle = css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 48px;\n ", "\n\n border: solid 1px black;\n border-radius: 24px;\n\n font-family: DM Sans;\n\n :focus {\n outline: none;\n }\n :hover {\n cursor: pointer;\n }\n\n ", "\n ", ";\n\n ", ";\n"], ["\n height: 48px;\n ", "\n\n border: solid 1px black;\n border-radius: 24px;\n\n font-family: DM Sans;\n\n :focus {\n outline: none;\n }\n :hover {\n cursor: pointer;\n }\n\n ", "\n ", ";\n\n ", ";\n"])), function (props) {
43
+ return props.isSmall && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n height: 36px;\n "], ["\n height: 36px;\n "])));
44
44
  }, function (props) {
45
45
  return props.isDisabled && css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n pointer-events: none;\n "], ["\n pointer-events: none;\n "])));
46
46
  }, function (props) {
47
47
  var c = props.theme.css;
48
48
  return [c.centered, c.buttonText];
49
49
  }, function (props) { return styles[props.variant || "primary"]; });
50
+ export var ButtonWrapper = styled(Div)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), commonButtonStyle);
51
+ export var ButtonElementWrapper = styled(HTMLButton)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), commonButtonStyle);
50
52
  export var Button = function (_a) {
51
- var _b = _a.onClick, onClick = _b === void 0 ? null : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.variant, variant = _d === void 0 ? "primary" : _d, _e = _a.isSmall, isSmall = _e === void 0 ? false : _e, children = _a.children, props = __rest(_a, ["onClick", "isDisabled", "variant", "isSmall", "children"]);
52
- return (_jsx(ButtonWrapper, __assign({ w100: true, isSmall: isSmall, onKeyDown: function (_a) {
53
- var code = _a.code;
54
- if (code === "Space" || (code === "Enter" && onClick))
55
- onClick();
56
- }, tabIndex: 0 }, __assign({ variant: variant, isDisabled: isDisabled, onClick: onClick }, props), { children: _jsx(_Fragment, { children: children }, void 0) }), void 0));
53
+ var _b = _a.onClick, onClick = _b === void 0 ? null : _b, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.variant, variant = _d === void 0 ? "primary" : _d, _e = _a.isSmall, isSmall = _e === void 0 ? false : _e, children = _a.children, _f = _a.isButtonElement, isButtonElement = _f === void 0 ? false : _f, props = __rest(_a, ["onClick", "isDisabled", "variant", "isSmall", "children", "isButtonElement"]);
54
+ return (_jsx(_Fragment, { children: isButtonElement ? (_jsx(ButtonElementWrapper, __assign({ w100: true, isSmall: isSmall, isDisabled: isDisabled, variant: variant, type: "submit" }, props, { children: children }))) : (_jsx(ButtonWrapper, __assign({ w100: true, isSmall: isSmall, onKeyDown: function (_a) {
55
+ var code = _a.code;
56
+ if (code === "Space" || (code === "Enter" && onClick))
57
+ onClick();
58
+ }, tabIndex: 0 }, __assign({ variant: variant, isDisabled: isDisabled, onClick: onClick }, props), { children: _jsx(_Fragment, { children: children }) }))) }));
57
59
  };
58
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
60
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;