fuse-importer 0.0.8-testing → 0.1.1-testing

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 (165) hide show
  1. package/lib/esm/Importer/ImporterWithContext.js +63 -0
  2. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcher/index.js +68 -0
  3. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcher/tableColumns.js +58 -0
  4. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcherContext.js +21 -0
  5. package/lib/esm/Importer/Matcher/EnumFieldsMatchers/index.js +23 -0
  6. package/lib/esm/Importer/Matcher/HeaderMatcher/index.js +61 -0
  7. package/lib/esm/Importer/Matcher/HeaderMatcher/tableColumns.js +55 -0
  8. package/lib/esm/Importer/Matcher/common/icons/index.js +14 -0
  9. package/lib/esm/Importer/Matcher/common/index.js +39 -0
  10. package/lib/esm/Importer/Matcher/common/types.js +9 -0
  11. package/lib/esm/Importer/Matcher/index.js +22 -0
  12. package/lib/esm/Importer/PreviewFirstTime.js +81 -0
  13. package/lib/esm/Importer/PreviewModeBanner.js +19 -0
  14. package/lib/esm/Importer/Review/AppResponseModal.js +35 -0
  15. package/lib/esm/Importer/Review/ReviewContextProvider.js +318 -0
  16. package/lib/esm/Importer/Review/ReviewWithContext.js +33 -0
  17. package/lib/esm/Importer/Review/index.js +4 -0
  18. package/lib/esm/Importer/Stepper/ConfirmCloseModal.js +24 -0
  19. package/lib/esm/Importer/Stepper/Step.js +19 -0
  20. package/lib/esm/Importer/Stepper/StepIndex.js +27 -0
  21. package/lib/esm/Importer/Stepper/StepperSubmitModal.js +24 -0
  22. package/lib/esm/Importer/Stepper/UnmatchedHeadersModal.js +31 -0
  23. package/lib/esm/Importer/Stepper/common/getEnumFieldValueMatchingsInitialValue.js +33 -0
  24. package/lib/esm/Importer/Stepper/common/icons.js +18 -0
  25. package/lib/esm/Importer/Stepper/index.js +118 -0
  26. package/lib/esm/Importer/TrialModeBanner.js +22 -0
  27. package/lib/esm/Importer/Uploader/DragAndDropImporter/DragAndDropImporter.styles.js +11 -0
  28. package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterDropzone.js +123 -0
  29. package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterSectionHeader/ImporterSectionHeader.styles.js +11 -0
  30. package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterSectionHeader/index.js +44 -0
  31. package/lib/esm/Importer/Uploader/DragAndDropImporter/backgrounds.js +14 -0
  32. package/lib/esm/Importer/Uploader/DragAndDropImporter/index.js +45 -0
  33. package/lib/esm/Importer/Uploader/HeaderButtons.js +28 -0
  34. package/lib/esm/Importer/Uploader/HeadersPreview.js +44 -0
  35. package/lib/esm/Importer/Uploader/UploaderContextProvider.js +27 -0
  36. package/lib/esm/Importer/Uploader/index.js +13 -0
  37. package/lib/esm/Importer/common/AppLoading.js +24 -0
  38. package/lib/esm/Importer/common/Footer.js +17 -0
  39. package/lib/esm/Importer/common/FuseApi.js +48 -0
  40. package/lib/esm/Importer/common/GlobalStyle.js +7 -0
  41. package/lib/esm/Importer/common/ImporterFonts.js +5 -0
  42. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/filterMethods.js +56 -0
  43. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/index.js +176 -0
  44. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useSpreadsheetFilter.js +45 -0
  45. package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/utils.js +14 -0
  46. package/lib/esm/Importer/common/Spreadsheet/common/index.js +63 -0
  47. package/lib/esm/Importer/common/Spreadsheet/common/types.js +5 -0
  48. package/lib/esm/Importer/common/Spreadsheet/components/FieldHeader.js +66 -0
  49. package/lib/esm/Importer/common/Spreadsheet/components/GlobalStyle.js +9 -0
  50. package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetData.js +110 -0
  51. package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowCheckboxes.js +186 -0
  52. package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowNumbers.js +55 -0
  53. package/lib/esm/Importer/common/Spreadsheet/components/ValidationProgress.js +19 -0
  54. package/lib/esm/Importer/common/Spreadsheet/components/fields/SpeadsheetAutocomplete.js +43 -0
  55. package/lib/esm/Importer/common/Spreadsheet/components/fields/SpreadsheetInput.js +74 -0
  56. package/lib/esm/Importer/common/Spreadsheet/components/fields/index.d.ts +2 -1
  57. package/lib/esm/Importer/common/Spreadsheet/components/fields/index.js +114 -0
  58. package/lib/esm/Importer/common/Spreadsheet/components/fields/utils.d.ts +11 -0
  59. package/lib/esm/Importer/common/Spreadsheet/components/fields/utils.js +29 -0
  60. package/lib/esm/Importer/common/Spreadsheet/components/inputs/Boolean.js +18 -0
  61. package/lib/esm/Importer/common/Spreadsheet/components/inputs/EmailInput.js +14 -0
  62. package/lib/esm/Importer/common/Spreadsheet/components/inputs/EnumInput.js +30 -0
  63. package/lib/esm/Importer/common/Spreadsheet/components/inputs/FloatInput.js +16 -0
  64. package/lib/esm/Importer/common/Spreadsheet/components/inputs/IntegerInput.js +16 -0
  65. package/lib/esm/Importer/common/Spreadsheet/components/inputs/StringInput.js +14 -0
  66. package/lib/esm/Importer/common/Spreadsheet/components/inputs/index.d.ts +1 -0
  67. package/lib/esm/Importer/common/Spreadsheet/components/inputs/index.js +20 -0
  68. package/lib/esm/Importer/common/Spreadsheet/hooks.js +245 -0
  69. package/lib/esm/Importer/common/Spreadsheet/index.js +119 -0
  70. package/lib/esm/Importer/common/Spreadsheet/styles.js +16 -0
  71. package/lib/esm/Importer/common/Spreadsheet/transformation/index.js +47 -0
  72. package/lib/esm/Importer/common/Spreadsheet/transformation/transformators.js +236 -0
  73. package/lib/esm/Importer/common/Spreadsheet/validation/index.js +202 -0
  74. package/lib/esm/Importer/common/Spreadsheet/validation/validators.js +181 -0
  75. package/lib/esm/Importer/common/icons/index.js +18 -0
  76. package/lib/esm/Importer/common/index.js +13 -0
  77. package/lib/esm/Importer/common/theme.js +19 -0
  78. package/lib/esm/Importer/common/utils.js +100 -0
  79. package/lib/esm/Importer/contexts/ImporterContextProvider.js +247 -0
  80. package/lib/esm/Importer/data/index.js +172 -0
  81. package/lib/esm/Importer/index.js +28 -0
  82. package/lib/esm/api/index.js +93 -0
  83. package/lib/esm/api/responseHandlers.js +49 -0
  84. package/lib/esm/common/AppLoadingContextProvider/AppLoadingUI.js +26 -0
  85. package/lib/esm/common/AppLoadingContextProvider/index.js +25 -0
  86. package/lib/esm/common/ConfirmationModal.js +19 -0
  87. package/lib/esm/common/Modal.js +31 -0
  88. package/lib/esm/common/Spinner.js +41 -0
  89. package/lib/esm/common/Table/Pagination/icons.js +42 -0
  90. package/lib/esm/common/Table/Pagination/index.js +32 -0
  91. package/lib/esm/common/Table/TableActions/DeleteSelectedRows.js +50 -0
  92. package/lib/esm/common/Table/TableActions/ExportData.js +23 -0
  93. package/lib/esm/common/Table/TableActions/FilterByErrors/FilterByErrors.js +47 -0
  94. package/lib/esm/common/Table/TableActions/FilterByErrors/FilterByErrors.styles.js +24 -0
  95. package/lib/esm/common/Table/TableActions/FilterByErrors/functions.js +35 -0
  96. package/lib/esm/common/Table/TableActions/FilterByErrors/index.js +1 -0
  97. package/lib/esm/common/Table/TableActions/RowFilters.js +42 -0
  98. package/lib/esm/common/Table/TableActions/SearchRows.js +72 -0
  99. package/lib/esm/common/Table/TableActions/TableActions.js +35 -0
  100. package/lib/esm/common/Table/TableActions/TableActions.styles.js +18 -0
  101. package/lib/esm/common/Table/TableActions/TransformedRecordsCount.js +83 -0
  102. package/lib/esm/common/Table/TableActions/common.js +1 -0
  103. package/lib/esm/common/Table/TableActions/hooks.js +41 -0
  104. package/lib/esm/common/Table/TableActions/icons.js +17 -0
  105. package/lib/esm/common/Table/TableActions/index.js +1 -0
  106. package/lib/esm/common/Table/TableDataProvider.js +127 -0
  107. package/lib/esm/common/Table/TableView/TableHeaders.js +69 -0
  108. package/lib/esm/common/Table/TableView/TableRows/TableRow.js +57 -0
  109. package/lib/esm/common/Table/TableView/TableRows/index.js +48 -0
  110. package/lib/esm/common/Table/TableView/common/index.js +37 -0
  111. package/lib/esm/common/Table/TableView/index.js +132 -0
  112. package/lib/esm/common/Table/TableView/types.js +1 -0
  113. package/lib/esm/common/Table/icons.js +15 -0
  114. package/lib/esm/common/Table/index.js +140 -0
  115. package/lib/esm/common/Table/useReorderRows.js +83 -0
  116. package/lib/esm/common/Toast.js +69 -0
  117. package/lib/esm/common/TooltipProvider.js +57 -0
  118. package/lib/esm/common/buttons.js +97 -0
  119. package/lib/esm/common/columnsTransformations.js +94 -0
  120. package/lib/esm/common/columnsValidations.d.ts +1 -27
  121. package/lib/esm/common/columnsValidations.js +401 -0
  122. package/lib/esm/common/datePatterns.d.ts +26 -0
  123. package/lib/esm/common/datePatterns.js +327 -0
  124. package/lib/esm/common/icons/index.js +30 -0
  125. package/lib/esm/common/index.d.ts +1 -0
  126. package/lib/esm/common/index.js +46 -0
  127. package/lib/esm/common/inputs/Autocomplete.js +110 -0
  128. package/lib/esm/common/inputs/Checkbox.js +53 -0
  129. package/lib/esm/common/inputs/SelectMenu.js +74 -0
  130. package/lib/esm/common/inputs/TextInput.js +89 -0
  131. package/lib/esm/common/inputs/index.js +5 -0
  132. package/lib/esm/common/inputs/tooltip.js +38 -0
  133. package/lib/esm/common/logo.js +13 -0
  134. package/lib/esm/hooks/index.d.ts +1 -0
  135. package/lib/esm/hooks/index.js +16 -0
  136. package/lib/esm/index.js +218 -0
  137. package/lib/esm/locales/de.js +126 -0
  138. package/lib/esm/locales/en.js +126 -0
  139. package/lib/esm/locales/es.js +126 -0
  140. package/lib/esm/locales/fr.js +126 -0
  141. package/lib/esm/locales/index.js +4 -0
  142. package/lib/esm/styled/fontsURL.js +27 -0
  143. package/lib/esm/styled/index.js +3 -0
  144. package/lib/esm/styled/theme/animations.js +9 -0
  145. package/lib/esm/styled/theme/colorPalette.js +109 -0
  146. package/lib/esm/styled/theme/debugCss.js +16 -0
  147. package/lib/esm/styled/theme/dimensionsCss.js +20 -0
  148. package/lib/esm/styled/theme/fontCss.js +17 -0
  149. package/lib/esm/styled/theme/globalCss.js +26 -0
  150. package/lib/esm/styled/theme/index.js +33 -0
  151. package/lib/esm/styled/theme/layoutCss.js +26 -0
  152. package/lib/esm/styled/theme/mediaQueries.js +4 -0
  153. package/lib/esm/styled/theme/positionCss.js +27 -0
  154. package/lib/esm/styled/theme/textCss.js +18 -0
  155. package/lib/esm/styled/theme/textStyles.js +27 -0
  156. package/lib/esm/styled/themeType.js +6 -0
  157. package/lib/esm/styled/utils.js +17 -0
  158. package/lib/esm/types.d.ts +7 -6
  159. package/lib/esm/types.js +65 -0
  160. package/lib/esm/utils/hooks/useWindowSize.js +23 -0
  161. package/lib/esm/utils/hooks.js +1 -0
  162. package/lib/esm/utils/index.d.ts +1 -0
  163. package/lib/esm/utils/index.js +41 -0
  164. package/lib/main.js +6 -6
  165. package/package.json +1 -1
@@ -0,0 +1,236 @@
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
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
+ if (ar || !(i in from)) {
15
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
+ ar[i] = from[i];
17
+ }
18
+ }
19
+ return to.concat(ar || Array.prototype.slice.call(from));
20
+ };
21
+ import { DateTime } from "luxon";
22
+ import { datePatterns, dateTimePatterns, timePatterns, } from "../../../../common/datePatterns";
23
+ var isTransformationNeeded = function (fieldValue, transformedValue) { return ({
24
+ transformationWasNeeded: fieldValue !== transformedValue,
25
+ original: fieldValue,
26
+ transformed: fieldValue === transformedValue ? null : transformedValue,
27
+ }); };
28
+ var isNotANumber = function (fieldValue) {
29
+ return fieldValue === null || fieldValue === undefined || isNaN(fieldValue);
30
+ };
31
+ var isNotAString = function (fieldValue) {
32
+ return !fieldValue || typeof fieldValue !== "string" || fieldValue.trim() === "";
33
+ };
34
+ var stringFieldTransformations = {
35
+ sentence_case: function (fieldValue) {
36
+ var _a, _b;
37
+ if (isNotAString(fieldValue))
38
+ return {
39
+ transformationWasNeeded: false,
40
+ original: fieldValue,
41
+ transformed: null,
42
+ };
43
+ var transformedValue = ((_b = (_a = fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.toLowerCase()) === null || _a === void 0 ? void 0 : _a.charAt(0)) === null || _b === void 0 ? void 0 : _b.toUpperCase()) +
44
+ (fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.slice(1).toLowerCase());
45
+ return isTransformationNeeded(fieldValue, transformedValue);
46
+ },
47
+ capitalize: function (fieldValue) {
48
+ if (isNotAString(fieldValue)) {
49
+ return {
50
+ transformationWasNeeded: false,
51
+ original: fieldValue,
52
+ transformed: null,
53
+ };
54
+ }
55
+ var transformedValue = fieldValue
56
+ .split(" ")
57
+ .map(function (word) { return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(); })
58
+ .join(" ");
59
+ return isTransformationNeeded(fieldValue, transformedValue);
60
+ },
61
+ uppercase: function (fieldValue) {
62
+ if (isNotAString(fieldValue))
63
+ return {
64
+ transformationWasNeeded: false,
65
+ original: fieldValue,
66
+ transformed: null,
67
+ };
68
+ var transformedValue = fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.toUpperCase();
69
+ return isTransformationNeeded(fieldValue, transformedValue);
70
+ },
71
+ lowercase: function (fieldValue) {
72
+ if (isNotAString(fieldValue))
73
+ return {
74
+ transformationWasNeeded: false,
75
+ original: fieldValue,
76
+ transformed: null,
77
+ };
78
+ var transformedValue = fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.toLowerCase();
79
+ return isTransformationNeeded(fieldValue, transformedValue);
80
+ },
81
+ trim_whitespace: function (fieldValue) {
82
+ if (typeof fieldValue !== "string")
83
+ return {
84
+ transformationWasNeeded: false,
85
+ original: fieldValue,
86
+ transformed: null,
87
+ };
88
+ var transformedValue = fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.trim();
89
+ return isTransformationNeeded(fieldValue, transformedValue);
90
+ },
91
+ };
92
+ var parseDate = function (date) {
93
+ if (!date)
94
+ return null;
95
+ var allPatterns = __spreadArray(__spreadArray(__spreadArray([], datePatterns, true), dateTimePatterns, true), timePatterns, true);
96
+ var possibleFormats = allPatterns.map(function (date) { return date.value; });
97
+ for (var i = 0; i < possibleFormats.length; i++) {
98
+ var format = possibleFormats[i];
99
+ try {
100
+ var currentDate = DateTime.fromFormat(date, format, { zone: "utc" });
101
+ if (currentDate.isValid) {
102
+ return currentDate;
103
+ }
104
+ }
105
+ catch (error) {
106
+ return null;
107
+ }
108
+ }
109
+ return null;
110
+ };
111
+ var datesDateTimesAndTimesTransformations = {
112
+ autoformat: function (fieldValue, _, fieldOptions) {
113
+ var cleanFieldValue = fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.replace(/"/g, "");
114
+ var normalizedFieldValue = cleanFieldValue === null || cleanFieldValue === void 0 ? void 0 : cleanFieldValue.replace(/-/g, "/");
115
+ var isUnixTimestamp = /^\d+$/.test(normalizedFieldValue);
116
+ var luxonDate = isUnixTimestamp
117
+ ? DateTime.fromSeconds(Number(normalizedFieldValue))
118
+ : parseDate(normalizedFieldValue);
119
+ var pattern = fieldOptions === null || fieldOptions === void 0 ? void 0 : fieldOptions.pattern;
120
+ var defaultObj = {
121
+ transformationWasNeeded: false,
122
+ original: fieldValue,
123
+ transformed: null,
124
+ };
125
+ if (!fieldValue || !pattern || !luxonDate || isNaN(luxonDate.toSeconds())) {
126
+ return defaultObj;
127
+ }
128
+ if (!luxonDate.isValid) {
129
+ return defaultObj;
130
+ }
131
+ var transformedValue = luxonDate.toFormat(pattern);
132
+ return {
133
+ transformationWasNeeded: fieldValue !== transformedValue,
134
+ original: fieldValue,
135
+ transformed: transformedValue,
136
+ };
137
+ },
138
+ };
139
+ var urlTransformations = {
140
+ prefix: function (fieldValue, transformation) {
141
+ var _a;
142
+ var prefixValue = (_a = transformation === null || transformation === void 0 ? void 0 : transformation.options) === null || _a === void 0 ? void 0 : _a.prefix;
143
+ var fieldValueHasPrefix = fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.startsWith(prefixValue);
144
+ if (isNotAString(prefixValue) ||
145
+ isNotAString(fieldValue) ||
146
+ fieldValueHasPrefix)
147
+ return {
148
+ transformationWasNeeded: false,
149
+ original: fieldValue,
150
+ transformed: null,
151
+ };
152
+ var transformedValue = "".concat(prefixValue).concat(fieldValue);
153
+ return isTransformationNeeded(fieldValue, transformedValue);
154
+ },
155
+ };
156
+ var floatTransformations = {
157
+ number_of_decimals: function (fieldValue, transformation) {
158
+ var _a;
159
+ var numberOfDecimalsValue = Number((_a = transformation === null || transformation === void 0 ? void 0 : transformation.options) === null || _a === void 0 ? void 0 : _a.number_of_decimals);
160
+ if (isNotANumber(numberOfDecimalsValue) || isNotANumber(fieldValue)) {
161
+ return {
162
+ transformationWasNeeded: false,
163
+ original: fieldValue,
164
+ transformed: null,
165
+ };
166
+ }
167
+ var transformedValue = parseFloat(Number(fieldValue).toFixed(numberOfDecimalsValue));
168
+ return isTransformationNeeded(fieldValue, transformedValue);
169
+ },
170
+ };
171
+ var integerTransformations = {
172
+ round: function (fieldValue) {
173
+ if (fieldValue === "" || isNotANumber(fieldValue)) {
174
+ return {
175
+ transformationWasNeeded: false,
176
+ original: fieldValue,
177
+ transformed: null,
178
+ };
179
+ }
180
+ var typeofFieldValue = typeof fieldValue;
181
+ var roundedValue = Math.round(fieldValue);
182
+ var valueWithCorrectType = typeofFieldValue === "string" ? "".concat(roundedValue) : roundedValue;
183
+ return isTransformationNeeded(fieldValue, valueWithCorrectType);
184
+ },
185
+ floor: function (fieldValue) {
186
+ if (fieldValue === "" || isNotANumber(fieldValue)) {
187
+ return {
188
+ transformationWasNeeded: false,
189
+ original: fieldValue,
190
+ transformed: null,
191
+ };
192
+ }
193
+ var typeofFieldValue = typeof fieldValue;
194
+ var flooredValue = Math.floor(fieldValue);
195
+ var valueWithCorrectType = typeofFieldValue === "string" ? "".concat(flooredValue) : flooredValue;
196
+ return isTransformationNeeded(fieldValue, valueWithCorrectType);
197
+ },
198
+ ceiling: function (fieldValue) {
199
+ if (fieldValue === "" || isNotANumber(fieldValue)) {
200
+ return {
201
+ transformationWasNeeded: false,
202
+ original: fieldValue,
203
+ transformed: null,
204
+ };
205
+ }
206
+ var typeofFieldValue = typeof fieldValue;
207
+ var ceilingValue = Math.ceil(fieldValue);
208
+ var valueWithCorrectType = typeofFieldValue === "string" ? "".concat(ceilingValue) : ceilingValue;
209
+ return isTransformationNeeded(fieldValue, valueWithCorrectType);
210
+ },
211
+ };
212
+ var enumTransformations = {
213
+ autodetect: function (fieldValue, _, fieldOptions) {
214
+ var options = fieldOptions.options.map(function (option) {
215
+ return option.toLowerCase();
216
+ });
217
+ if (!fieldValue || options.length === 0)
218
+ return {
219
+ transformationWasNeeded: false,
220
+ original: fieldValue,
221
+ transformed: null,
222
+ };
223
+ var parsedRecord = String(fieldValue).toLowerCase();
224
+ var trueOptionIndex = options.findIndex(function (option) { return option === "true" || option === "1"; });
225
+ var falseOptionIndex = options.findIndex(function (option) { return option === "false" || option === "0"; });
226
+ if (trueOptionIndex !== -1 && falseOptionIndex !== -1) {
227
+ var transformedValue_1 = parsedRecord === options[trueOptionIndex]
228
+ ? fieldOptions.options[trueOptionIndex]
229
+ : fieldOptions.options[falseOptionIndex];
230
+ return isTransformationNeeded(fieldValue, transformedValue_1);
231
+ }
232
+ var transformedValue = fieldOptions.options[0];
233
+ return isTransformationNeeded(fieldValue, transformedValue);
234
+ },
235
+ };
236
+ export var fieldTransformations = __assign(__assign(__assign(__assign(__assign(__assign({}, stringFieldTransformations), datesDateTimesAndTimesTransformations), urlTransformations), floatTransformations), integerTransformations), enumTransformations);
@@ -0,0 +1,202 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
49
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
50
+ if (ar || !(i in from)) {
51
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
52
+ ar[i] = from[i];
53
+ }
54
+ }
55
+ return to.concat(ar || Array.prototype.slice.call(from));
56
+ };
57
+ import { ignoreNullOrUndefinedKeyValues, isEmpty, isNullOrUndefined, isRecordEmpty, } from "../common";
58
+ import { fieldValidations } from "./validators";
59
+ var datePatternTypes = ["date", "datetime", "time"];
60
+ function safeCallOnValidateRecord(_a) {
61
+ var onValidateRecord = _a.onValidateRecord, record = _a.record;
62
+ return __awaiter(this, void 0, void 0, function () {
63
+ var result, isNewVersion, mappedResult, errors, warnings, error_1;
64
+ return __generator(this, function (_b) {
65
+ switch (_b.label) {
66
+ case 0:
67
+ _b.trys.push([0, 2, , 3]);
68
+ return [4 /*yield*/, onValidateRecord(record)];
69
+ case 1:
70
+ result = _b.sent();
71
+ isNewVersion = "errors" in result || "warnings" in result;
72
+ mappedResult = isNewVersion
73
+ ? result
74
+ : result;
75
+ errors = isNewVersion
76
+ ? mappedResult.errors
77
+ : mappedResult;
78
+ warnings = isNewVersion
79
+ ? mappedResult.warnings
80
+ : mappedResult;
81
+ return [2 /*return*/, { errors: errors || {}, warnings: warnings || {} }];
82
+ case 2:
83
+ error_1 = _b.sent();
84
+ console.warn("onValidateRecord hook failed with error: ".concat(error_1));
85
+ return [2 /*return*/, { errors: {}, warnings: {} }];
86
+ case 3: return [2 /*return*/];
87
+ }
88
+ });
89
+ });
90
+ }
91
+ function safeCallValidator(_a) {
92
+ var field = _a.field, record = _a.record, validator = _a.validator, validatorFunction = _a.validatorFunction, data = _a.data;
93
+ try {
94
+ return validatorFunction(field, record[field.name], validator, data);
95
+ }
96
+ catch (e) {
97
+ console.error("Validator ".concat(validator === null || validator === void 0 ? void 0 : validator.validation_type, " for field ").concat(JSON.stringify(field), " and value ").concat(record[field.name], " failed."), e);
98
+ return "".concat(e);
99
+ }
100
+ }
101
+ function mergeErrorsAndWarnings(currentErrors, errors) {
102
+ return __assign(__assign({}, currentErrors), { errors: __assign(__assign({}, (currentErrors.errors || {})), errors), warnings: __assign({}, (currentErrors.warnings || {})) });
103
+ }
104
+ function runValidatorsFor(_a) {
105
+ var record = _a.record, data = _a.data, validators = _a.validators;
106
+ return validators.reduce(function (currentErrors, _a) {
107
+ var field = _a.field, validators = _a.validators;
108
+ var errors = {};
109
+ if (!field.isRequired && isEmpty(record[field.name])) {
110
+ return mergeErrorsAndWarnings(currentErrors, errors);
111
+ }
112
+ for (var index = 0; index < validators.length; index++) {
113
+ var _b = validators[index], validator = _b.validator, validatorFunction = _b.validatorFunction;
114
+ var error = safeCallValidator({
115
+ field: field,
116
+ record: record,
117
+ validator: validator,
118
+ data: data,
119
+ validatorFunction: validatorFunction,
120
+ });
121
+ if (error) {
122
+ errors[field.name] = error;
123
+ break;
124
+ }
125
+ }
126
+ return mergeErrorsAndWarnings(currentErrors, errors);
127
+ }, {});
128
+ }
129
+ export function selectValidatorsFor(fields) {
130
+ return fields.map(function (field) {
131
+ var _a, _b;
132
+ var defaultValidators = [];
133
+ if (field.isRequired) {
134
+ defaultValidators.push({
135
+ validator: null,
136
+ validatorFunction: fieldValidations.required,
137
+ });
138
+ }
139
+ if (datePatternTypes.includes(field.type)) {
140
+ defaultValidators.push({
141
+ validator: null,
142
+ validatorFunction: fieldValidations.date_pattern,
143
+ });
144
+ }
145
+ var configuredValidators = (_b = (_a = field.validations) === null || _a === void 0 ? void 0 : _a.map(function (validator) {
146
+ var validatorFunction = fieldValidations[validator.validation_type];
147
+ if (!validatorFunction) {
148
+ throw new Error("Validator ".concat(validator.validation_type, " not implemented."));
149
+ }
150
+ return {
151
+ validator: validator,
152
+ validatorFunction: validatorFunction,
153
+ };
154
+ })) !== null && _b !== void 0 ? _b : [];
155
+ return {
156
+ field: field,
157
+ validators: __spreadArray(__spreadArray([], defaultValidators, true), configuredValidators, true),
158
+ };
159
+ });
160
+ }
161
+ export function validateRecord(_a) {
162
+ var _b, _c;
163
+ var record = _a.record, fields = _a.fields, data = _a.data, onValidateRecord = _a.onValidateRecord, validatorsCache = _a.validatorsCache;
164
+ return __awaiter(this, void 0, void 0, function () {
165
+ var isTouched, backendErrors, hasBackendErrors, validators, _d, validatorErrors, validatorWarnings, errors, warnings, _e, onValidateRecordErrors, onValidateRecordWarnings;
166
+ return __generator(this, function (_f) {
167
+ switch (_f.label) {
168
+ case 0:
169
+ if (isRecordEmpty(record, fields)) {
170
+ //TODO: Check this logic because this can skip the validation of touched rows because all fields are empty
171
+ return [2 /*return*/, { errors: {}, warnings: {} }];
172
+ }
173
+ isTouched = (_b = record._meta) === null || _b === void 0 ? void 0 : _b.touched;
174
+ backendErrors = ((_c = record._meta) === null || _c === void 0 ? void 0 : _c.backendErrors) || {};
175
+ hasBackendErrors = Object.keys(backendErrors).length > 0;
176
+ if (!isTouched && hasBackendErrors) {
177
+ return [2 /*return*/, { errors: backendErrors, warnings: {} }];
178
+ }
179
+ validators = validatorsCache !== null && validatorsCache !== void 0 ? validatorsCache : selectValidatorsFor(fields);
180
+ _d = runValidatorsFor({
181
+ record: record,
182
+ data: data,
183
+ validators: validators,
184
+ }), validatorErrors = _d.errors, validatorWarnings = _d.warnings;
185
+ errors = ignoreNullOrUndefinedKeyValues(validatorErrors);
186
+ warnings = ignoreNullOrUndefinedKeyValues(validatorWarnings);
187
+ if (!!isNullOrUndefined(onValidateRecord)) return [3 /*break*/, 2];
188
+ return [4 /*yield*/, safeCallOnValidateRecord({
189
+ onValidateRecord: onValidateRecord,
190
+ record: record,
191
+ })];
192
+ case 1:
193
+ _e = _f.sent(), onValidateRecordErrors = _e.errors, onValidateRecordWarnings = _e.warnings;
194
+ return [2 /*return*/, {
195
+ errors: __assign(__assign({}, errors), onValidateRecordErrors),
196
+ warnings: __assign(__assign({}, warnings), onValidateRecordWarnings),
197
+ }];
198
+ case 2: return [2 /*return*/, { errors: errors, warnings: warnings }];
199
+ }
200
+ });
201
+ });
202
+ }
@@ -0,0 +1,181 @@
1
+ import { DateTime } from "luxon";
2
+ import { isBoolean, isEmail, isEmpty, isEven, isFloat, isInteger, isNullOrUndefined, isUrl, } from "../common";
3
+ export var fieldValidations = {
4
+ email: function (field, fieldValue, validator) {
5
+ var _a;
6
+ if (!isNullOrUndefined(fieldValue) && !isEmail(fieldValue)) {
7
+ return (_a = validator.message) !== null && _a !== void 0 ? _a : "".concat(field.label, " is not a valid email");
8
+ }
9
+ },
10
+ url: function (field, fieldValue, validator) {
11
+ var _a;
12
+ if (!isNullOrUndefined(fieldValue) && !isUrl(fieldValue)) {
13
+ return (_a = validator.message) !== null && _a !== void 0 ? _a : "".concat(field.label, " is not a valid url");
14
+ }
15
+ },
16
+ integer: function (field, fieldValue, validator) {
17
+ var _a;
18
+ if (!isNullOrUndefined(fieldValue) && !isInteger(fieldValue)) {
19
+ return (_a = validator.message) !== null && _a !== void 0 ? _a : "".concat(field.label, " is not a valid integer");
20
+ }
21
+ },
22
+ float: function (field, fieldValue, validator) {
23
+ var _a;
24
+ if (!isNullOrUndefined(fieldValue) && !isFloat(fieldValue)) {
25
+ return (_a = validator.message) !== null && _a !== void 0 ? _a : "".concat(field.label, " is not a valid float");
26
+ }
27
+ },
28
+ cannot_contain: function (field, fieldValue, validator) {
29
+ var _a, _b;
30
+ var pattern = (_a = validator === null || validator === void 0 ? void 0 : validator.options) === null || _a === void 0 ? void 0 : _a.pattern;
31
+ if (!isNullOrUndefined(fieldValue) &&
32
+ !isNullOrUndefined(pattern) &&
33
+ "".concat(fieldValue).includes(pattern)) {
34
+ return (_b = validator.message) !== null && _b !== void 0 ? _b : "".concat(field.label, " cannot contain ").concat(pattern);
35
+ }
36
+ },
37
+ contain: function (field, fieldValue, validator) {
38
+ var _a, _b;
39
+ var pattern = (_a = validator === null || validator === void 0 ? void 0 : validator.options) === null || _a === void 0 ? void 0 : _a.pattern;
40
+ if (!isNullOrUndefined(fieldValue) &&
41
+ !isNullOrUndefined(pattern) &&
42
+ !"".concat(fieldValue).includes(pattern)) {
43
+ return (_b = validator.message) !== null && _b !== void 0 ? _b : "".concat(field.label, " must contain ").concat(pattern);
44
+ }
45
+ },
46
+ max_length: function (field, fieldValue, validator) {
47
+ var _a, _b;
48
+ var max_length = (_a = validator === null || validator === void 0 ? void 0 : validator.options) === null || _a === void 0 ? void 0 : _a.max_length;
49
+ if (!isNullOrUndefined(fieldValue) &&
50
+ !isNullOrUndefined(max_length) &&
51
+ "".concat(fieldValue).length > parseInt(max_length, 10)) {
52
+ return ((_b = validator.message) !== null && _b !== void 0 ? _b : "".concat(field.label, " must have at most ").concat(max_length, " characters"));
53
+ }
54
+ },
55
+ min_length: function (field, fieldValue, validator) {
56
+ var _a, _b;
57
+ var min_length = (_a = validator === null || validator === void 0 ? void 0 : validator.options) === null || _a === void 0 ? void 0 : _a.min_length;
58
+ if (!isNullOrUndefined(fieldValue) &&
59
+ !isNullOrUndefined(min_length) &&
60
+ "".concat(fieldValue).length < parseInt(min_length, 10)) {
61
+ return ((_b = validator.message) !== null && _b !== void 0 ? _b : "".concat(field.label, " must have at least ").concat(min_length, " characters"));
62
+ }
63
+ },
64
+ length_exactly: function (field, fieldValue, validator) {
65
+ var _a, _b;
66
+ var length_exactly = (_a = validator === null || validator === void 0 ? void 0 : validator.options) === null || _a === void 0 ? void 0 : _a.length;
67
+ if (!isNullOrUndefined(fieldValue) &&
68
+ !isNullOrUndefined(length_exactly) &&
69
+ "".concat(fieldValue).length !== parseInt(length_exactly, 10)) {
70
+ return ((_b = validator.message) !== null && _b !== void 0 ? _b : "".concat(field.label, " must have exactly ").concat(length_exactly, " characters"));
71
+ }
72
+ },
73
+ boolean: function (field, fieldValue, validator) {
74
+ var _a;
75
+ if (!isNullOrUndefined(fieldValue) && !isBoolean(fieldValue)) {
76
+ return (_a = validator.message) !== null && _a !== void 0 ? _a : "".concat(field.label, " is not a valid boolean");
77
+ }
78
+ },
79
+ required: function (field, fieldValue) {
80
+ if (field.isRequired && isEmpty(fieldValue)) {
81
+ return "".concat(field.label, " is required");
82
+ }
83
+ },
84
+ date_pattern: function (field, fieldValue) {
85
+ if (!isNullOrUndefined(field.pattern) &&
86
+ !isNullOrUndefined(fieldValue) &&
87
+ !DateTime.fromFormat(fieldValue, field.pattern).isValid) {
88
+ var randomDate = DateTime.fromISO("1990-01-15T14:35:55.150");
89
+ var transformedValue = randomDate === null || randomDate === void 0 ? void 0 : randomDate.toFormat(field.pattern);
90
+ var defaultMessage = "".concat(field.label, " must match the pattern ").concat(field.pattern);
91
+ return transformedValue
92
+ ? "Must be formatted as \"".concat(field.pattern, "\" (e.g. ").concat(transformedValue, ")")
93
+ : defaultMessage;
94
+ }
95
+ },
96
+ unique_case_sensitive: function (field, fieldValue, validator, data) {
97
+ var _a;
98
+ if (!isNullOrUndefined(fieldValue) && !isNullOrUndefined(data)) {
99
+ var isDuplicated = data.filter(function (d) { return d[field.name] === fieldValue; }).length > 1;
100
+ var message = (_a = validator.message) !== null && _a !== void 0 ? _a : "".concat(field.label, " must be unique case sensitive");
101
+ return isDuplicated ? message : undefined;
102
+ }
103
+ },
104
+ unique_case_insensitive: function (field, fieldValue, validator, data) {
105
+ var _a;
106
+ if (!isNullOrUndefined(fieldValue) && !isNullOrUndefined(data)) {
107
+ var isDuplicated = data.filter(function (d) { var _a; return ((_a = d[field.name]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === fieldValue.toLowerCase(); }).length > 1;
108
+ var message = (_a = validator.message) !== null && _a !== void 0 ? _a : "".concat(field.label, " must be unique case insensitive");
109
+ return isDuplicated ? message : undefined;
110
+ }
111
+ },
112
+ regex: function (field, fieldValue, validator) {
113
+ var _a, _b;
114
+ var pattern = (_a = validator === null || validator === void 0 ? void 0 : validator.options) === null || _a === void 0 ? void 0 : _a.pattern;
115
+ if (!isNullOrUndefined(fieldValue) && !isNullOrUndefined(pattern)) {
116
+ var isValid = new RegExp(pattern, "g").test(fieldValue);
117
+ var message = (_b = validator.message) !== null && _b !== void 0 ? _b : "".concat(field.label, " is invalid");
118
+ return isValid ? undefined : message;
119
+ }
120
+ },
121
+ less_than: function (field, fieldValue, validator) {
122
+ var _a, _b;
123
+ var max = (_a = validator === null || validator === void 0 ? void 0 : validator.options) === null || _a === void 0 ? void 0 : _a.max;
124
+ if (!isNullOrUndefined(fieldValue) &&
125
+ !isNullOrUndefined(max) &&
126
+ fieldValue >= max) {
127
+ return (_b = validator.message) !== null && _b !== void 0 ? _b : "".concat(field.label, " must be lower than ").concat(max);
128
+ }
129
+ },
130
+ greater_than: function (field, fieldValue, validator) {
131
+ var _a, _b;
132
+ var min = (_a = validator === null || validator === void 0 ? void 0 : validator.options) === null || _a === void 0 ? void 0 : _a.min;
133
+ if (!isNullOrUndefined(fieldValue) &&
134
+ !isNullOrUndefined(min) &&
135
+ fieldValue <= min) {
136
+ return (_b = validator.message) !== null && _b !== void 0 ? _b : "".concat(field.label, " must be greater than ").concat(min);
137
+ }
138
+ },
139
+ even: function (field, fieldValue, validator) {
140
+ var _a;
141
+ if (!isNullOrUndefined(fieldValue) && !isEven(fieldValue)) {
142
+ return (_a = validator.message) !== null && _a !== void 0 ? _a : "".concat(field.label, " must be even");
143
+ }
144
+ },
145
+ odd: function (field, fieldValue, validator) {
146
+ var _a;
147
+ if (!isNullOrUndefined(fieldValue) && isEven(fieldValue)) {
148
+ return (_a = validator.message) !== null && _a !== void 0 ? _a : "".concat(field.label, " must be odd");
149
+ }
150
+ },
151
+ after_date: function (field, fieldValue, validator) {
152
+ var _a, _b;
153
+ var min = (_a = validator === null || validator === void 0 ? void 0 : validator.options) === null || _a === void 0 ? void 0 : _a.min;
154
+ if (!isNullOrUndefined(fieldValue) &&
155
+ !isNullOrUndefined(field.pattern) &&
156
+ !isNullOrUndefined(min)) {
157
+ var date = DateTime.fromFormat(fieldValue, field.pattern, {
158
+ zone: "utc",
159
+ }).startOf("day");
160
+ var minDate = DateTime.fromISO(min, { zone: "utc" }).startOf("day");
161
+ var isValid = date > minDate;
162
+ var message = (_b = validator.message) !== null && _b !== void 0 ? _b : "".concat(field.label, " must be greater than ").concat(minDate.toFormat(field.pattern));
163
+ return isValid ? undefined : message;
164
+ }
165
+ },
166
+ before_date: function (field, fieldValue, validator) {
167
+ var _a, _b;
168
+ var max = (_a = validator === null || validator === void 0 ? void 0 : validator.options) === null || _a === void 0 ? void 0 : _a.max;
169
+ if (!isNullOrUndefined(fieldValue) &&
170
+ !isNullOrUndefined(field.pattern) &&
171
+ !isNullOrUndefined(max)) {
172
+ var date = DateTime.fromFormat(fieldValue, field.pattern, {
173
+ zone: "utc",
174
+ }).startOf("day");
175
+ var maxDate = DateTime.fromISO(max, { zone: "utc" }).startOf("day");
176
+ var isValid = date < maxDate;
177
+ var message = (_b = validator.message) !== null && _b !== void 0 ? _b : "".concat(field.label, " must be lower than ").concat(maxDate.toFormat(field.pattern));
178
+ return isValid ? undefined : message;
179
+ }
180
+ },
181
+ };
@@ -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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ export var fileExtensionIcon = (_jsxs("svg", __assign({ width: "36", height: "44", viewBox: "0 0 36 44", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M33 43.0001H3C1.89543 43.0001 1 42.1046 1 41.0001V3.00006C1 1.89549 1.89543 1.00006 3 1.00006H16.655C19.0148 1.00006 21.2542 2.04193 22.7743 3.84697L33.1193 16.1317C34.3339 17.5741 35 19.3991 35 21.2848V41.0001C35 42.1046 34.1046 43.0001 33 43.0001Z", fill: "#C2CEEC", stroke: "#333333", strokeWidth: "2" }), _jsx("path", { d: "M33 43.0004H3C1.89543 43.0004 1 42.105 1 41.0004V3.0004C1 1.89583 1.89543 1.0004 3 1.0004H16.8421C18.499 1.0004 19.8421 2.34354 19.8421 4.0004V14.5004C19.8421 15.8811 20.9614 17.0004 22.3421 17.0004H32C33.6569 17.0004 35 18.3435 35 20.0004V41.0004C35 42.105 34.1046 43.0004 33 43.0004Z", fill: "white", stroke: "#333333", strokeWidth: "2" })] })));
14
+ export var closeIconWithCircle = (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("circle", { cx: "12", cy: "12", r: "11", stroke: "#989898", strokeWidth: "2" }), _jsx("path", { d: "M9 9L15 15", stroke: "#989898", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M9 15L15 9", stroke: "#989898", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] })));
15
+ export var errorIcon = (_jsxs("svg", __assign({ width: "76", height: "64", viewBox: "0 0 76 64", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M38 3.95611L72.0101 62H3.98992L38 3.95611Z", stroke: "black", strokeWidth: "4" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M40.5 26.5C40.5 25.1193 39.3807 24 38 24C36.6193 24 35.5 25.1193 35.5 26.5V39.8333C35.5 41.214 36.6193 42.3333 38 42.3333C39.3807 42.3333 40.5 41.214 40.5 39.8333V26.5ZM40.5 50.5C40.5 49.1193 39.3807 48 38 48C36.6193 48 35.5 49.1193 35.5 50.5V51.8333C35.5 53.214 36.6193 54.3333 38 54.3333C39.3807 54.3333 40.5 53.214 40.5 51.8333V50.5Z", fill: "black" })] })));
16
+ export var logoIcon = (_jsxs("svg", __assign({ width: "222", height: "22", viewBox: "0 0 222 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M3.47895 15V6.6H6.41895C7.07495 6.6 7.61895 6.712 8.05095 6.936C8.48295 7.152 8.80295 7.452 9.01095 7.836C9.22695 8.212 9.33495 8.64 9.33495 9.12C9.33495 9.576 9.23095 9.996 9.02295 10.38C8.82295 10.756 8.50695 11.056 8.07495 11.28C7.64295 11.504 7.09095 11.616 6.41895 11.616H4.75095V15H3.47895ZM4.75095 10.572H6.35895C6.95895 10.572 7.38695 10.444 7.64295 10.188C7.90695 9.924 8.03895 9.568 8.03895 9.12C8.03895 8.656 7.90695 8.296 7.64295 8.04C7.38695 7.776 6.95895 7.644 6.35895 7.644H4.75095V10.572ZM13.0001 15.144C12.4321 15.144 11.9201 15.016 11.4641 14.76C11.0161 14.496 10.6601 14.132 10.3961 13.668C10.1321 13.196 10.0001 12.648 10.0001 12.024C10.0001 11.4 10.1321 10.856 10.3961 10.392C10.6681 9.92 11.0321 9.556 11.4881 9.3C11.9441 9.036 12.4521 8.904 13.0121 8.904C13.5801 8.904 14.0881 9.036 14.5361 9.3C14.9921 9.556 15.3521 9.92 15.6161 10.392C15.8881 10.856 16.0241 11.4 16.0241 12.024C16.0241 12.648 15.8881 13.196 15.6161 13.668C15.3521 14.132 14.9921 14.496 14.5361 14.76C14.0801 15.016 13.5681 15.144 13.0001 15.144ZM13.0001 14.052C13.3041 14.052 13.5841 13.976 13.8401 13.824C14.1041 13.672 14.3161 13.448 14.4761 13.152C14.6361 12.848 14.7161 12.472 14.7161 12.024C14.7161 11.576 14.6361 11.204 14.4761 10.908C14.3241 10.604 14.1161 10.376 13.8521 10.224C13.5961 10.072 13.3161 9.996 13.0121 9.996C12.7081 9.996 12.4241 10.072 12.1601 10.224C11.9041 10.376 11.6961 10.604 11.5361 10.908C11.3761 11.204 11.2961 11.576 11.2961 12.024C11.2961 12.472 11.3761 12.848 11.5361 13.152C11.6961 13.448 11.9041 13.672 12.1601 13.824C12.4161 13.976 12.6961 14.052 13.0001 14.052ZM18.365 15L16.613 9.048H17.885L19.037 13.536L20.333 9.048H21.749L23.045 13.536L24.197 9.048H25.469L23.717 15H22.409L21.041 10.32L19.673 15H18.365ZM29.0782 15.144C28.4942 15.144 27.9742 15.016 27.5182 14.76C27.0702 14.496 26.7182 14.132 26.4622 13.668C26.2062 13.204 26.0782 12.664 26.0782 12.048C26.0782 11.424 26.2022 10.876 26.4502 10.404C26.7062 9.932 27.0582 9.564 27.5062 9.3C27.9622 9.036 28.4902 8.904 29.0902 8.904C29.6742 8.904 30.1822 9.036 30.6142 9.3C31.0462 9.556 31.3822 9.9 31.6222 10.332C31.8622 10.764 31.9822 11.24 31.9822 11.76C31.9822 11.84 31.9782 11.928 31.9702 12.024C31.9702 12.112 31.9662 12.212 31.9582 12.324H27.3262C27.3662 12.9 27.5542 13.34 27.8902 13.644C28.2342 13.94 28.6302 14.088 29.0782 14.088C29.4382 14.088 29.7382 14.008 29.9782 13.848C30.2262 13.68 30.4102 13.456 30.5302 13.176H31.8022C31.6422 13.736 31.3222 14.204 30.8422 14.58C30.3702 14.956 29.7822 15.144 29.0782 15.144ZM29.0782 9.948C28.6542 9.948 28.2782 10.076 27.9502 10.332C27.6222 10.58 27.4222 10.956 27.3502 11.46H30.7102C30.6862 10.996 30.5222 10.628 30.2182 10.356C29.9142 10.084 29.5342 9.948 29.0782 9.948ZM33.302 15V9.048H34.442L34.55 10.176C34.758 9.784 35.046 9.476 35.414 9.252C35.79 9.02 36.242 8.904 36.77 8.904V10.236H36.422C36.07 10.236 35.754 10.296 35.474 10.416C35.202 10.528 34.982 10.724 34.814 11.004C34.654 11.276 34.574 11.656 34.574 12.144V15H33.302ZM40.4806 15.144C39.8966 15.144 39.3766 15.016 38.9206 14.76C38.4726 14.496 38.1206 14.132 37.8646 13.668C37.6086 13.204 37.4806 12.664 37.4806 12.048C37.4806 11.424 37.6046 10.876 37.8526 10.404C38.1086 9.932 38.4606 9.564 38.9086 9.3C39.3646 9.036 39.8926 8.904 40.4926 8.904C41.0766 8.904 41.5846 9.036 42.0166 9.3C42.4486 9.556 42.7846 9.9 43.0246 10.332C43.2646 10.764 43.3846 11.24 43.3846 11.76C43.3846 11.84 43.3806 11.928 43.3726 12.024C43.3726 12.112 43.3686 12.212 43.3606 12.324H38.7286C38.7686 12.9 38.9566 13.34 39.2926 13.644C39.6366 13.94 40.0326 14.088 40.4806 14.088C40.8406 14.088 41.1406 14.008 41.3806 13.848C41.6286 13.68 41.8126 13.456 41.9326 13.176H43.2046C43.0446 13.736 42.7246 14.204 42.2446 14.58C41.7726 14.956 41.1846 15.144 40.4806 15.144ZM40.4806 9.948C40.0566 9.948 39.6806 10.076 39.3526 10.332C39.0246 10.58 38.8246 10.956 38.7526 11.46H42.1126C42.0886 10.996 41.9246 10.628 41.6206 10.356C41.3166 10.084 40.9366 9.948 40.4806 9.948ZM47.4164 15.144C46.8404 15.144 46.3324 15.008 45.8924 14.736C45.4524 14.464 45.1084 14.092 44.8604 13.62C44.6124 13.148 44.4884 12.612 44.4884 12.012C44.4884 11.412 44.6124 10.88 44.8604 10.416C45.1084 9.944 45.4524 9.576 45.8924 9.312C46.3404 9.04 46.8524 8.904 47.4284 8.904C47.9004 8.904 48.3124 8.996 48.6644 9.18C49.0244 9.364 49.3044 9.624 49.5044 9.96V6.36H50.7764V15H49.6364L49.5044 14.076C49.3124 14.356 49.0484 14.604 48.7124 14.82C48.3764 15.036 47.9444 15.144 47.4164 15.144ZM47.6444 14.04C48.1884 14.04 48.6324 13.852 48.9764 13.476C49.3284 13.1 49.5044 12.616 49.5044 12.024C49.5044 11.424 49.3284 10.94 48.9764 10.572C48.6324 10.196 48.1884 10.008 47.6444 10.008C47.1004 10.008 46.6524 10.196 46.3004 10.572C45.9484 10.94 45.7724 11.424 45.7724 12.024C45.7724 12.416 45.8524 12.764 46.0124 13.068C46.1724 13.372 46.3924 13.612 46.6724 13.788C46.9604 13.956 47.2844 14.04 47.6444 14.04ZM58.7516 15.144C58.2876 15.144 57.8756 15.052 57.5156 14.868C57.1636 14.684 56.8836 14.424 56.6756 14.088L56.5436 15H55.4036V6.36H56.6756V9.972C56.8676 9.692 57.1316 9.444 57.4676 9.228C57.8036 9.012 58.2356 8.904 58.7636 8.904C59.3396 8.904 59.8476 9.04 60.2876 9.312C60.7276 9.584 61.0716 9.956 61.3196 10.428C61.5756 10.9 61.7036 11.436 61.7036 12.036C61.7036 12.636 61.5756 13.172 61.3196 13.644C61.0716 14.108 60.7276 14.476 60.2876 14.748C59.8476 15.012 59.3356 15.144 58.7516 15.144ZM58.5356 14.04C59.0796 14.04 59.5276 13.856 59.8796 13.488C60.2316 13.112 60.4076 12.624 60.4076 12.024C60.4076 11.632 60.3276 11.284 60.1676 10.98C60.0076 10.676 59.7876 10.44 59.5076 10.272C59.2276 10.096 58.9036 10.008 58.5356 10.008C57.9916 10.008 57.5436 10.196 57.1916 10.572C56.8476 10.948 56.6756 11.432 56.6756 12.024C56.6756 12.624 56.8476 13.112 57.1916 13.488C57.5436 13.856 57.9916 14.04 58.5356 14.04ZM63.2715 17.64L64.6995 14.508H64.3515L61.9995 9.048H63.3795L65.2035 13.452L67.1115 9.048H68.4555L64.6155 17.64H63.2715Z", fill: "#7F7F7F" }), _jsx("path", { d: "M78.5716 19L87.8742 19C88.1922 19 88.4912 18.8488 88.6796 18.5927L93.8355 11.5863C94.0926 11.2368 94.0951 10.7614 93.8416 10.4093L88.507 3L78.1581 18.2188C77.9324 18.5508 78.1702 19 78.5716 19Z", fill: "#FD395E" }), _jsx("path", { d: "M78.1581 3.78122L83.067 11L88.507 3.00006L78.5716 3.00006C78.1702 3.00006 77.9324 3.44926 78.1581 3.78122Z", fill: "url(#paint0_linear_1540_41227)" }), _jsx("path", { d: "M85.3068 3.00006L83.0668 11L88.5068 3.00006L85.3068 3.00006Z", fill: "#8A0E25" }), _jsx("path", { d: "M101.421 14.6799H103.759V11.1474H107.141V9.48804H103.759V7.56465H107.292V5.90525H101.421V14.6799Z", fill: "#1C1C1C" }), _jsx("path", { d: "M109.978 14.6799H115.937V12.9451H112.316V5.90525H109.978V14.6799Z", fill: "#1C1C1C" }), _jsx("path", { d: "M117.755 14.6799H120.131L120.823 12.8068H124.116L124.77 14.6799H127.335L123.953 5.90525H121.087L117.755 14.6799ZM123.563 11.1474H121.363L122.495 7.7155H122.52L123.563 11.1474Z", fill: "#1C1C1C" }), _jsx("path", { d: "M130.414 14.6799H132.752V7.64007H134.914V5.90525H128.252V7.64007H130.414V14.6799Z", fill: "#1C1C1C" }), _jsx("path", { d: "M137.512 14.6799H139.851V5.90525H137.512V14.6799Z", fill: "#1C1C1C" }), _jsx("path", { d: "M143.044 14.6799H145.382V11.2103H145.872C146.74 11.2103 147.041 11.5874 147.519 13.096L148.022 14.6799H150.461L149.606 12.2914C149.166 11.2229 149.115 10.5566 148.361 10.3555V10.3303C149.493 10.0663 150.046 9.2869 150.046 8.11778C150.046 6.60924 148.776 5.90525 147.217 5.90525H143.044V14.6799ZM145.382 7.56465H145.998C146.89 7.56465 147.708 7.7155 147.708 8.53263C147.708 9.52575 146.752 9.5509 145.998 9.5509H145.382V7.56465Z", fill: "#1C1C1C" }), _jsx("path", { d: "M152.673 10.2926C152.673 13.0834 154.207 14.8308 157.073 14.8308C159.939 14.8308 161.473 13.0834 161.473 10.2926C161.473 7.47665 159.964 5.75439 157.073 5.75439C154.182 5.75439 152.673 7.47665 152.673 10.2926ZM155.087 10.2926C155.087 8.77148 155.652 7.48922 157.073 7.48922C158.493 7.48922 159.059 8.77148 159.059 10.2926C159.059 11.7383 158.493 13.096 157.073 13.096C155.652 13.096 155.087 11.7383 155.087 10.2926Z", fill: "#1C1C1C" }), _jsx("path", { d: "M164.331 14.6799H166.48L166.405 8.68348H166.43L169.497 14.6799H172.401V5.90525H170.264L170.302 11.864H170.277L167.31 5.90525H164.331V14.6799Z", fill: "#1C1C1C" }), _jsx("path", { d: "M175.41 14.4537C176.189 14.7051 177.207 14.8308 178.025 14.8308C179.973 14.8308 181.884 14.2148 181.884 11.9394C181.884 8.77148 177.735 9.72689 177.735 8.30635C177.735 7.53951 178.716 7.48922 179.307 7.48922C179.973 7.48922 180.652 7.61493 181.255 7.8915L181.406 6.08125C180.815 5.88011 179.986 5.75439 179.143 5.75439C177.383 5.75439 175.322 6.33267 175.322 8.44463C175.322 11.6377 179.47 10.6069 179.47 12.2411C179.47 12.9451 178.766 13.096 178.025 13.096C177.057 13.096 176.214 12.8446 175.611 12.5177L175.41 14.4537Z", fill: "#1C1C1C" }), _jsx("path", { d: "M184.781 14.6799H187.119V11.1474H190.501V9.48804H187.119V7.56465H190.652V5.90525H184.781V14.6799Z", fill: "#FD395E" }), _jsx("path", { d: "M200.906 5.90525H198.568V10.9589C198.568 12.1154 198.253 13.096 197.059 13.096C195.865 13.096 195.551 12.1154 195.551 10.9589V5.90525H193.212V11.3486C193.212 13.7497 194.771 14.8308 197.059 14.8308C199.347 14.8308 200.906 13.7497 200.906 11.3486V5.90525Z", fill: "#FD395E" }), _jsx("path", { d: "M203.743 14.4537C204.522 14.7051 205.541 14.8308 206.358 14.8308C208.306 14.8308 210.217 14.2148 210.217 11.9394C210.217 8.77148 206.069 9.72689 206.069 8.30635C206.069 7.53951 207.049 7.48922 207.64 7.48922C208.306 7.48922 208.985 7.61493 209.589 7.8915L209.739 6.08125C209.149 5.88011 208.319 5.75439 207.477 5.75439C205.717 5.75439 203.655 6.33267 203.655 8.44463C203.655 11.6377 207.803 10.6069 207.803 12.2411C207.803 12.9451 207.099 13.096 206.358 13.096C205.39 13.096 204.547 12.8446 203.944 12.5177L203.743 14.4537Z", fill: "#FD395E" }), _jsx("path", { d: "M213.05 14.6799H219.373V13.0205H215.388V11.0343H219.021V9.3749H215.388V7.56465H219.235V5.90525H213.05V14.6799Z", fill: "#FD395E" }), _jsx("defs", { children: _jsxs("linearGradient", __assign({ id: "paint0_linear_1540_41227", x1: "76.5", y1: "3.00006", x2: "88.7401", y2: "7.14128", gradientUnits: "userSpaceOnUse" }, { children: [_jsx("stop", { offset: "0.03125", stopColor: "#CA405A", stopOpacity: "0.958429" }), _jsx("stop", { offset: "1", stopColor: "#A2243B" })] })) })] })));
17
+ export var exclamationPointIcon = (_jsx("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM12 6C12.5523 6 13 6.44772 13 7V12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12V7C11 6.44772 11.4477 6 12 6ZM12 15C12.5523 15 13 15.4477 13 16V16.5C13 17.0523 12.5523 17.5 12 17.5C11.4477 17.5 11 17.0523 11 16.5V16C11 15.4477 11.4477 15 12 15Z", fill: "#FF9A34" }) })));
18
+ export var infoIcon = (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("circle", { cx: "14", cy: "2.5", r: "2.5", fill: "#0EBEBE" }), _jsx("path", { d: "M15.5075 8H6L5 10.5L10 11L6.57474 18.9354C6.57474 18.9354 6.40657 20.1663 6.57474 20.9247C6.76276 21.7725 6.97074 22.2838 7.56727 22.9139C8.6672 24.0757 9.95115 24.1037 11.5374 23.9085C14.2577 23.5737 17 19.5 17 19.5L15.5075 17.9408C15.5075 17.9408 13.5223 19.93 12.5298 19.93C11.5373 19.93 11.5374 18.9354 11.5374 18.9354L15.5075 8Z", fill: "#0EBEBE" })] })));