fuse-importer 0.1.7-testing → 0.2.0-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.
- package/lib/esm/Importer/ImporterWithContext.js +11 -9
- package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcher/index.js +3 -3
- package/lib/esm/Importer/PreviewFirstTime.js +1 -1
- package/lib/esm/Importer/PreviewModeBanner.js +2 -2
- package/lib/esm/Importer/Review/AppResponseModal.js +2 -2
- package/lib/esm/Importer/Review/ReviewContextProvider.d.ts +2 -2
- package/lib/esm/Importer/Review/ReviewContextProvider.js +6 -6
- package/lib/esm/Importer/Stepper/StepperSubmitModal.js +21 -4
- package/lib/esm/Importer/Stepper/index.js +35 -20
- package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterSectionHeader/index.js +1 -1
- package/lib/esm/Importer/WarningsBanner.d.ts +3 -0
- package/lib/esm/Importer/WarningsBanner.js +42 -0
- package/lib/esm/Importer/common/Spreadsheet/DuplicateDataContextProvider/index.d.ts +5 -4
- package/lib/esm/Importer/common/Spreadsheet/DuplicateDataContextProvider/index.js +104 -50
- package/lib/esm/Importer/common/Spreadsheet/FilteredDataContextProvider/index.d.ts +1 -0
- package/lib/esm/Importer/common/Spreadsheet/FilteredDataContextProvider/index.js +6 -1
- package/lib/esm/Importer/common/Spreadsheet/KeyboardEventContextProvider/index.d.ts +7 -0
- package/lib/esm/Importer/common/Spreadsheet/KeyboardEventContextProvider/index.js +73 -0
- package/lib/esm/Importer/common/Spreadsheet/SearchContextProvider/index.d.ts +15 -0
- package/lib/esm/Importer/common/Spreadsheet/SearchContextProvider/index.js +43 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/hashCalculators.d.ts +3 -2
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/hashCalculators.js +40 -26
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/index.d.ts +2 -1
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/index.js +2 -1
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useBatchProcessing.d.ts +2 -2
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useBatchProcessing.js +13 -4
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useCellSelection.d.ts +24 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useCellSelection.js +207 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useDataSetManipulation.d.ts +4 -0
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useDataSetManipulation.js +118 -12
- package/lib/esm/Importer/common/Spreadsheet/UndoRedoContextProvider/index.d.ts +16 -0
- package/lib/esm/Importer/common/Spreadsheet/UndoRedoContextProvider/index.js +104 -0
- package/lib/esm/Importer/common/Spreadsheet/ValidationContextProvider/index.d.ts +1 -1
- package/lib/esm/Importer/common/Spreadsheet/ValidationContextProvider/index.js +39 -14
- package/lib/esm/Importer/common/Spreadsheet/common/index.d.ts +1 -1
- package/lib/esm/Importer/common/Spreadsheet/common/index.js +13 -5
- package/lib/esm/Importer/common/Spreadsheet/components/FindAndReplace/index.d.ts +6 -0
- package/lib/esm/Importer/common/Spreadsheet/components/FindAndReplace/index.js +94 -0
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetData/CellContextProvider.d.ts +23 -0
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetData/CellContextProvider.js +128 -0
- package/lib/esm/Importer/common/Spreadsheet/components/{SpreadsheetData.d.ts → SpreadsheetData/index.d.ts} +1 -1
- package/lib/esm/Importer/common/Spreadsheet/components/{SpreadsheetData.js → SpreadsheetData/index.js} +19 -18
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowCheckboxes.js +7 -7
- package/lib/esm/Importer/common/Spreadsheet/components/fields/SpeadsheetAutocomplete.js +3 -4
- package/lib/esm/Importer/common/Spreadsheet/components/fields/SpreadsheetInput.js +8 -8
- package/lib/esm/Importer/common/Spreadsheet/components/fields/index.d.ts +11 -0
- package/lib/esm/Importer/common/Spreadsheet/components/fields/index.js +26 -18
- package/lib/esm/Importer/common/Spreadsheet/transformation/index.d.ts +1 -2
- package/lib/esm/Importer/common/Spreadsheet/transformation/index.js +4 -8
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators/dateTimeAutoformatUtils.d.ts +5 -0
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators/dateTimeAutoformatUtils.js +231 -0
- package/lib/esm/Importer/common/Spreadsheet/transformation/{transformators.d.ts → transformators/index.d.ts} +6 -6
- package/lib/esm/Importer/common/Spreadsheet/transformation/{transformators.js → transformators/index.js} +24 -45
- package/lib/esm/Importer/common/Spreadsheet/validation/validators.d.ts +1 -1
- package/lib/esm/Importer/common/Spreadsheet/validation/validators.js +2 -0
- package/lib/esm/Importer/common/theme.d.ts +1 -0
- package/lib/esm/Importer/contexts/ImporterContextProvider.d.ts +8 -1
- package/lib/esm/Importer/contexts/ImporterContextProvider.js +18 -5
- package/lib/esm/Importer/data/index.d.ts +0 -1
- package/lib/esm/Importer/data/index.js +0 -37
- package/lib/esm/Importer/hooks/useSubmitToServer.d.ts +1 -1
- package/lib/esm/Importer/hooks/useSubmitToServer.js +55 -9
- package/lib/esm/common/CircleSpinner.d.ts +1 -0
- package/lib/esm/common/CircleSpinner.js +13 -0
- package/lib/esm/common/FileUploadDropzone/ImporterDropzone.js +56 -21
- package/lib/esm/common/Table/TableActions/CustomActions/CustomActions.js +28 -23
- package/lib/esm/common/Table/TableActions/FilterByErrors/FilterByErrors.js +3 -3
- package/lib/esm/common/Table/TableActions/RowFilters.js +3 -3
- package/lib/esm/common/Table/TableActions/SearchRows.js +25 -25
- package/lib/esm/common/Table/TableActions/TableActions.js +7 -4
- package/lib/esm/common/Table/TableActions/TableActions.styles.js +2 -2
- package/lib/esm/common/Table/TableActions/TransformedRecordsCount.js +3 -3
- package/lib/esm/common/Table/TableActions/icons.d.ts +1 -0
- package/lib/esm/common/Table/TableActions/icons.js +1 -0
- package/lib/esm/common/Table/TableActions/useFindAndReplace.d.ts +5 -0
- package/lib/esm/common/Table/TableActions/useFindAndReplace.js +45 -0
- package/lib/esm/common/Table/TableView/TableRows/TableRow.js +1 -1
- package/lib/esm/common/Table/TableView/index.d.ts +1 -1
- package/lib/esm/common/Table/TableView/index.js +2 -2
- package/lib/esm/common/Table/TableView/types.d.ts +1 -0
- package/lib/esm/common/Toast.d.ts +42 -3
- package/lib/esm/common/Toast.js +56 -19
- package/lib/esm/common/datePatterns.d.ts +0 -1
- package/lib/esm/common/datePatterns.js +0 -10
- package/lib/esm/common/icons/index.d.ts +3 -0
- package/lib/esm/common/icons/index.js +5 -2
- package/lib/esm/common/inputs/Autocomplete.js +2 -2
- package/lib/esm/common/inputs/Checkbox.d.ts +2 -1
- package/lib/esm/common/inputs/Checkbox.js +9 -7
- package/lib/esm/common/inputs/TextInput.d.ts +1 -0
- package/lib/esm/common/inputs/TextInput.js +10 -2
- package/lib/esm/index.js +1 -1
- package/lib/esm/locales/de.d.ts +10 -0
- package/lib/esm/locales/de.js +10 -0
- package/lib/esm/locales/en.d.ts +23 -0
- package/lib/esm/locales/en.js +23 -0
- package/lib/esm/locales/es.d.ts +10 -0
- package/lib/esm/locales/es.js +10 -0
- package/lib/esm/locales/fr.d.ts +10 -0
- package/lib/esm/locales/fr.js +10 -0
- package/lib/esm/styled/theme/colorPalette.d.ts +2 -0
- package/lib/esm/styled/theme/colorPalette.js +1 -0
- package/lib/esm/styled/theme/index.d.ts +1 -0
- package/lib/esm/types.d.ts +1 -0
- package/lib/main.js +6 -6
- package/package.json +1 -1
- package/lib/esm/Importer/TrialModeBanner.d.ts +0 -1
- package/lib/esm/Importer/TrialModeBanner.js +0 -22
|
@@ -51,7 +51,7 @@ export var TableRow = function (_a) {
|
|
|
51
51
|
var isLastColumn = indexJ === columns.length - 1;
|
|
52
52
|
return (_jsx(Cell, __assign({ row: row, onClick: onRowClick && !column.preventRowClick
|
|
53
53
|
? function () { return onRowClick(row); }
|
|
54
|
-
: null, isLast: isLastColumn, className: isLastColumn ? "last-column" : "", w: columnWidthPercentage }, { children: Content ? (_jsx(Content, __assign({}, row, { columnWidth: columnWidthPercentage, rowIndex: indexI }))) : (_jsx(Div, __assign({ truncateText: true }, { children: row[column.dataAccessor] || "-" }))) }), resolvedKey));
|
|
54
|
+
: null, isLast: isLastColumn, className: isLastColumn ? "last-column" : "", w: columnWidthPercentage }, { children: Content ? (_jsx(Content, __assign({}, row, { columnWidth: columnWidthPercentage, colIndex: indexJ, rowIndex: indexI }))) : (_jsx(Div, __assign({ truncateText: true }, { children: row[column.dataAccessor] || "-" }))) }), resolvedKey));
|
|
55
55
|
}) })));
|
|
56
56
|
};
|
|
57
57
|
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -8,4 +8,4 @@ type TableViewWrapperProps = {
|
|
|
8
8
|
checkboxColumnWidth?: number;
|
|
9
9
|
};
|
|
10
10
|
export declare const TableViewWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../../../styled/utils").CSSProps & TableViewWrapperProps, never>;
|
|
11
|
-
export declare const TableView: React.MemoExoticComponent<({ data, dataRefIds, columns, pageSize, onRowClick, sortBy, isLoading, setSortBy, rowWidthScalingFactor, tableHeadersHeight, rowHeight, h, onTableScroll, getItemKey, isDraggable, checkboxColumnWidth, isFiltering, ...props }: TableViewProps) => JSX.Element>;
|
|
11
|
+
export declare const TableView: React.MemoExoticComponent<({ data, dataRefIds, columns, pageSize, onRowClick, sortBy, isLoading, setSortBy, rowWidthScalingFactor, tableHeadersHeight, rowHeight, h, onTableScroll, getItemKey, isDraggable, checkboxColumnWidth, isFiltering, shouldHideTable, ...props }: TableViewProps) => JSX.Element>;
|
|
@@ -66,7 +66,7 @@ var buildGridStyles = function (rowWidthScalingFactor) {
|
|
|
66
66
|
return gridStyles;
|
|
67
67
|
};
|
|
68
68
|
export var TableView = React.memo(function (_a) {
|
|
69
|
-
var _b = _a.data, data = _b === void 0 ? null : _b, _c = _a.dataRefIds, dataRefIds = _c === void 0 ? null : _c, columns = _a.columns, pageSize = _a.pageSize, _d = _a.onRowClick, onRowClick = _d === void 0 ? null : _d, _e = _a.sortBy, sortBy = _e === void 0 ? { field: null, direction: null } : _e, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.setSortBy, setSortBy = _g === void 0 ? null : _g, _h = _a.rowWidthScalingFactor, rowWidthScalingFactor = _h === void 0 ? 1 : _h, _j = _a.tableHeadersHeight, tableHeadersHeight = _j === void 0 ? defaultTableHeaderHeightPx : _j, _k = _a.rowHeight, rowHeight = _k === void 0 ? defaultTableRowHeightPx : _k, _l = _a.h, h = _l === void 0 ? 500 : _l, _m = _a.onTableScroll, onTableScroll = _m === void 0 ? null : _m, _o = _a.getItemKey, getItemKey = _o === void 0 ? null : _o, _p = _a.isDraggable, isDraggable = _p === void 0 ? false : _p, checkboxColumnWidth = _a.checkboxColumnWidth, _q = _a.isFiltering, isFiltering = _q === void 0 ? false : _q, props = __rest(_a, ["data", "dataRefIds", "columns", "pageSize", "onRowClick", "sortBy", "isLoading", "setSortBy", "rowWidthScalingFactor", "tableHeadersHeight", "rowHeight", "h", "onTableScroll", "getItemKey", "isDraggable", "checkboxColumnWidth", "isFiltering"]);
|
|
69
|
+
var _b = _a.data, data = _b === void 0 ? null : _b, _c = _a.dataRefIds, dataRefIds = _c === void 0 ? null : _c, columns = _a.columns, pageSize = _a.pageSize, _d = _a.onRowClick, onRowClick = _d === void 0 ? null : _d, _e = _a.sortBy, sortBy = _e === void 0 ? { field: null, direction: null } : _e, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.setSortBy, setSortBy = _g === void 0 ? null : _g, _h = _a.rowWidthScalingFactor, rowWidthScalingFactor = _h === void 0 ? 1 : _h, _j = _a.tableHeadersHeight, tableHeadersHeight = _j === void 0 ? defaultTableHeaderHeightPx : _j, _k = _a.rowHeight, rowHeight = _k === void 0 ? defaultTableRowHeightPx : _k, _l = _a.h, h = _l === void 0 ? 500 : _l, _m = _a.onTableScroll, onTableScroll = _m === void 0 ? null : _m, _o = _a.getItemKey, getItemKey = _o === void 0 ? null : _o, _p = _a.isDraggable, isDraggable = _p === void 0 ? false : _p, checkboxColumnWidth = _a.checkboxColumnWidth, _q = _a.isFiltering, isFiltering = _q === void 0 ? false : _q, _r = _a.shouldHideTable, shouldHideTable = _r === void 0 ? false : _r, props = __rest(_a, ["data", "dataRefIds", "columns", "pageSize", "onRowClick", "sortBy", "isLoading", "setSortBy", "rowWidthScalingFactor", "tableHeadersHeight", "rowHeight", "h", "onTableScroll", "getItemKey", "isDraggable", "checkboxColumnWidth", "isFiltering", "shouldHideTable"]);
|
|
70
70
|
var headerContainerRef = useRef();
|
|
71
71
|
var rowCount = dataRefIds ? dataRefIds.ids.length : data.length;
|
|
72
72
|
var onScroll = function (_a) {
|
|
@@ -106,7 +106,7 @@ export var TableView = React.memo(function (_a) {
|
|
|
106
106
|
width: autosizerWidth,
|
|
107
107
|
columnCount: 1,
|
|
108
108
|
onScroll: onScroll,
|
|
109
|
-
columnWidth: rowWidth,
|
|
109
|
+
columnWidth: shouldHideTable ? 0 : rowWidth,
|
|
110
110
|
height: autosizerHeight - tableHeadersHeight,
|
|
111
111
|
rowHeight: rowHeight,
|
|
112
112
|
rowCount: rowCount,
|
|
@@ -1,4 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
import { ToastOptions } from "react-hot-toast";
|
|
3
|
+
type ToastProps = {
|
|
4
|
+
zIndex?: number;
|
|
5
|
+
toastStyle?: CSSProperties;
|
|
6
|
+
};
|
|
7
|
+
type ToastTypes = keyof typeof toastTypeStyles;
|
|
8
|
+
export declare const addToast: (msg: JSX.Element | string, type?: ToastTypes, toastOptions?: ToastOptions) => void;
|
|
9
|
+
export declare const addLoadingToast: (msg: JSX.Element | string, helperMsg: JSX.Element | string, toastOptions?: ToastOptions, minW?: number) => void;
|
|
10
|
+
declare const toastTypeStyles: {
|
|
11
|
+
error: {
|
|
12
|
+
color: string;
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
icon: JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
warning: {
|
|
17
|
+
color: string;
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
icon: JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
success: {
|
|
22
|
+
color: string;
|
|
23
|
+
backgroundColor: string;
|
|
24
|
+
icon: JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
information: {
|
|
27
|
+
color: string;
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
icon: JSX.Element;
|
|
30
|
+
};
|
|
31
|
+
notification: {
|
|
32
|
+
color: string;
|
|
33
|
+
backgroundColor: string;
|
|
34
|
+
icon: JSX.Element;
|
|
35
|
+
};
|
|
36
|
+
loadingNotification: {
|
|
37
|
+
color: string;
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
icon: JSX.Element;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
declare const Toast: ({ zIndex, toastStyle }: ToastProps) => JSX.Element;
|
|
4
43
|
export { Toast };
|
package/lib/esm/common/Toast.js
CHANGED
|
@@ -16,19 +16,38 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
import toast, { ToastBar, Toaster, } from "react-hot-toast";
|
|
18
18
|
import styled from "styled-components";
|
|
19
|
-
import { defaultCheckIcon, greenCheckIcon, redXIcon } from "./icons";
|
|
20
19
|
import { colors } from "../styled/theme/colorPalette";
|
|
21
20
|
import { Div } from "../styled/utils";
|
|
21
|
+
import { CircleSpinner } from "./CircleSpinner";
|
|
22
|
+
import { greenCheckIcon, infoIcon, notificationCheckIcon, redXIcon, warningIcon, } from "./icons";
|
|
22
23
|
var defaultDuration = 5000;
|
|
23
24
|
var defaultPosition = "bottom-right";
|
|
24
25
|
var toastBorderRadius = 4;
|
|
25
26
|
var toastMaxWidth = "85%";
|
|
27
|
+
var LoadingNotifToastContainer = styled(Div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n gap: 16px;\n justify-content: space-between;\n"], ["\n align-items: center;\n display: flex;\n gap: 16px;\n justify-content: space-between;\n"])));
|
|
28
|
+
var genToastOptions = function (type, toastOptions) {
|
|
29
|
+
var stylingByType = toastTypeStyles[type];
|
|
30
|
+
var _toastOptions = __assign({ duration: defaultDuration, position: defaultPosition, style: {
|
|
31
|
+
background: stylingByType.backgroundColor,
|
|
32
|
+
color: stylingByType.color,
|
|
33
|
+
}, icon: stylingByType.icon }, toastOptions);
|
|
34
|
+
return _toastOptions;
|
|
35
|
+
};
|
|
26
36
|
export var addToast = function (msg, type, toastOptions) {
|
|
27
|
-
if (type === void 0) { type = "
|
|
37
|
+
if (type === void 0) { type = "notification"; }
|
|
38
|
+
if (toastOptions === void 0) { toastOptions = {}; }
|
|
39
|
+
var _toastOptions = genToastOptions(type, toastOptions);
|
|
40
|
+
toast(msg, _toastOptions);
|
|
41
|
+
};
|
|
42
|
+
export var addLoadingToast = function (msg, helperMsg, toastOptions, minW) {
|
|
28
43
|
if (toastOptions === void 0) { toastOptions = {}; }
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
|
|
44
|
+
if (minW === void 0) { minW = 320; }
|
|
45
|
+
var _toastOptions = genToastOptions("loadingNotification", toastOptions);
|
|
46
|
+
var message = msg;
|
|
47
|
+
if (msg && helperMsg) {
|
|
48
|
+
message = (_jsxs(LoadingNotifToastContainer, __assign({ minw: minW }, { children: [_jsx("span", { children: msg }), " ", _jsx("span", { children: helperMsg })] })));
|
|
49
|
+
}
|
|
50
|
+
toast(message, _toastOptions);
|
|
32
51
|
};
|
|
33
52
|
var toastContainerCss = {
|
|
34
53
|
padding: 0,
|
|
@@ -38,33 +57,51 @@ var toastContainerCss = {
|
|
|
38
57
|
maxWidth: toastMaxWidth,
|
|
39
58
|
};
|
|
40
59
|
var toastTypeStyles = {
|
|
60
|
+
error: {
|
|
61
|
+
color: colors.black,
|
|
62
|
+
backgroundColor: colors.red250,
|
|
63
|
+
icon: redXIcon,
|
|
64
|
+
},
|
|
65
|
+
warning: {
|
|
66
|
+
color: colors.black,
|
|
67
|
+
backgroundColor: colors.orange1100,
|
|
68
|
+
icon: warningIcon,
|
|
69
|
+
},
|
|
41
70
|
success: {
|
|
42
|
-
backgroundColor: colors.blue50,
|
|
43
71
|
color: colors.text,
|
|
72
|
+
backgroundColor: colors.blue50,
|
|
44
73
|
icon: greenCheckIcon,
|
|
45
74
|
},
|
|
46
|
-
|
|
47
|
-
color: colors.
|
|
48
|
-
backgroundColor: colors.
|
|
49
|
-
icon:
|
|
75
|
+
information: {
|
|
76
|
+
color: colors.black,
|
|
77
|
+
backgroundColor: colors.blue100,
|
|
78
|
+
icon: infoIcon,
|
|
50
79
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
icon:
|
|
80
|
+
notification: {
|
|
81
|
+
color: colors.white,
|
|
82
|
+
backgroundColor: colors.black,
|
|
83
|
+
icon: notificationCheckIcon,
|
|
84
|
+
},
|
|
85
|
+
loadingNotification: {
|
|
86
|
+
color: colors.white,
|
|
87
|
+
backgroundColor: colors.black,
|
|
88
|
+
icon: _jsx(CircleSpinner, {}),
|
|
55
89
|
},
|
|
56
90
|
};
|
|
57
|
-
var ToastWrapper = styled(Div)(
|
|
58
|
-
var IconWrapper = styled(Div)(
|
|
59
|
-
var Toast = function () {
|
|
91
|
+
var ToastWrapper = styled(Div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 10px;\n box-shadow: 0px 2px 8px 1px rgba(0, 0, 0, 0.1);\n border-radius: ", "px;\n ", ";\n"], ["\n padding: 10px;\n box-shadow: 0px 2px 8px 1px rgba(0, 0, 0, 0.1);\n border-radius: ", "px;\n ", ";\n"])), toastBorderRadius, function (p) { return p.theme.css.alignCenter; });
|
|
92
|
+
var IconWrapper = styled(Div)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-right: 10px;\n"], ["\n margin-right: 10px;\n"])));
|
|
93
|
+
var Toast = function (_a) {
|
|
94
|
+
var zIndex = _a.zIndex, toastStyle = _a.toastStyle;
|
|
60
95
|
return (_jsx(Toaster, __assign({ toastOptions: {
|
|
61
96
|
style: toastContainerCss,
|
|
97
|
+
}, containerStyle: {
|
|
98
|
+
zIndex: zIndex,
|
|
62
99
|
} }, { children: function (t) { return (_jsx(ToastBar, __assign({ toast: t }, { children: function (_a) {
|
|
63
100
|
var message = _a.message, hotToastIcon = _a.icon;
|
|
64
101
|
var _b = toastTypeStyles[t.type] || {}, icon = _b.icon, color = _b.color, backgroundColor = _b.backgroundColor;
|
|
65
|
-
return (_jsxs(ToastWrapper, __assign({ c: color, bg: backgroundColor }, { children: [_jsx(IconWrapper, __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 }))] })));
|
|
102
|
+
return (_jsxs(ToastWrapper, __assign({ c: color, bg: backgroundColor, style: toastStyle }, { children: [_jsx(IconWrapper, __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 }))] })));
|
|
66
103
|
} }))); } })));
|
|
67
104
|
};
|
|
68
105
|
export { Toast };
|
|
69
106
|
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" })] })));
|
|
70
|
-
var templateObject_1, templateObject_2;
|
|
107
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
-
if (ar || !(i in from)) {
|
|
4
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
-
ar[i] = from[i];
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
-
};
|
|
10
1
|
export var datePatterns = [
|
|
11
2
|
{
|
|
12
3
|
value: "MM/dd/yyyy",
|
|
@@ -334,4 +325,3 @@ export var allowedPatterns = {
|
|
|
334
325
|
datetime: dateTimePatterns,
|
|
335
326
|
time: timePatterns,
|
|
336
327
|
};
|
|
337
|
-
export var allowedPatternValues = __spreadArray(__spreadArray(__spreadArray([], datePatterns, true), dateTimePatterns, true), timePatterns, true).map(function (pattern) { return pattern.value; });
|
|
@@ -3,6 +3,9 @@ export declare const closeIconCondensed: JSX.Element;
|
|
|
3
3
|
export declare const checkIcon: JSX.Element;
|
|
4
4
|
export declare const greenCheckIcon: JSX.Element;
|
|
5
5
|
export declare const redXIcon: JSX.Element;
|
|
6
|
+
export declare const warningIcon: JSX.Element;
|
|
7
|
+
export declare const infoIcon: JSX.Element;
|
|
8
|
+
export declare const notificationCheckIcon: JSX.Element;
|
|
6
9
|
export declare const defaultCheckIcon: JSX.Element;
|
|
7
10
|
export declare const WhiteCheckIcon: () => JSX.Element;
|
|
8
11
|
export declare const chevronLeftIcon: JSX.Element;
|
|
@@ -14,8 +14,11 @@ import { useTheme } from "styled-components";
|
|
|
14
14
|
export var closeIcon = (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M6 6.00003L18.7742 18.7742", stroke: "black", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M6 18.7742L18.7742 6.00001", stroke: "black", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] })));
|
|
15
15
|
export var closeIconCondensed = (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M6 6.00003L18.7742 18.7742", stroke: "#333333", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M6 18.7742L18.7742 6.00001", stroke: "#333333", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] })));
|
|
16
16
|
export var checkIcon = (_jsx("svg", __assign({ width: "12", height: "10", viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M1.37805 5.80142L3.94469 8.28708L10.6827 1.52003", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })));
|
|
17
|
-
export var greenCheckIcon = (_jsx("svg", __assign({ width: "
|
|
18
|
-
export var redXIcon = (
|
|
17
|
+
export var greenCheckIcon = (_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 23ZM9.70711 11.2426C9.31658 10.8521 8.68342 10.8521 8.29289 11.2426C7.90237 11.6331 7.90237 12.2663 8.29289 12.6568L10.4142 14.7781L11.1213 15.4852L11.8284 14.7781L16.0711 10.5355C16.4616 10.145 16.4616 9.5118 16.0711 9.12128C15.6805 8.73076 15.0474 8.73076 14.6569 9.12128L11.1213 12.6568L9.70711 11.2426Z", fill: "#025F40" }) })));
|
|
18
|
+
export var redXIcon = (_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 23ZM8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071Z", fill: "#5C1008" }) })));
|
|
19
|
+
export var warningIcon = (_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: "#78430D" }) })));
|
|
20
|
+
export var infoIcon = (_jsx("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M12 17.5C12.3117 17.5 12.5729 17.3946 12.7837 17.1838C12.9946 16.9729 13.1 16.7117 13.1 16.4V12C13.1 11.6883 12.9946 11.4271 12.7837 11.2163C12.5729 11.0054 12.3117 10.9 12 10.9C11.6883 10.9 11.4271 11.0054 11.2163 11.2163C11.0054 11.4271 10.9 11.6883 10.9 12V16.4C10.9 16.7117 11.0054 16.9729 11.2163 17.1838C11.4271 17.3946 11.6883 17.5 12 17.5ZM12 8.7C12.3117 8.7 12.5729 8.59458 12.7837 8.38375C12.9946 8.17292 13.1 7.91167 13.1 7.6C13.1 7.28833 12.9946 7.02708 12.7837 6.81625C12.5729 6.60542 12.3117 6.5 12 6.5C11.6883 6.5 11.4271 6.60542 11.2163 6.81625C11.0054 7.02708 10.9 7.28833 10.9 7.6C10.9 7.91167 11.0054 8.17292 11.2163 8.38375C11.4271 8.59458 11.6883 8.7 12 8.7ZM12 23C10.4783 23 9.04833 22.7113 7.71 22.1337C6.37167 21.5562 5.2075 20.7725 4.2175 19.7825C3.2275 18.7925 2.44375 17.6283 1.86625 16.29C1.28875 14.9517 1 13.5217 1 12C1 10.4783 1.28875 9.04833 1.86625 7.71C2.44375 6.37167 3.2275 5.2075 4.2175 4.2175C5.2075 3.2275 6.37167 2.44375 7.71 1.86625C9.04833 1.28875 10.4783 1 12 1C13.5217 1 14.9517 1.28875 16.29 1.86625C17.6283 2.44375 18.7925 3.2275 19.7825 4.2175C20.7725 5.2075 21.5562 6.37167 22.1337 7.71C22.7113 9.04833 23 10.4783 23 12C23 13.5217 22.7113 14.9517 22.1337 16.29C21.5562 17.6283 20.7725 18.7925 19.7825 19.7825C18.7925 20.7725 17.6283 21.5562 16.29 22.1337C14.9517 22.7113 13.5217 23 12 23Z", fill: "#025B5B" }) })));
|
|
21
|
+
export var notificationCheckIcon = (_jsx("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M4 12.3137L9.65685 17.9706L20.9706 6.65687", stroke: "white", "stroke-width": "2", "stroke-linecap": "round" }) })));
|
|
19
22
|
export var defaultCheckIcon = (_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: "currentColor", strokeWidth: "2" }), _jsx("path", { d: "M9 11.9497L11.1213 14.071L15.364 9.82839", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] })));
|
|
20
23
|
export var WhiteCheckIcon = function () {
|
|
21
24
|
var theme = useTheme();
|
|
@@ -56,7 +56,7 @@ var Autocomplete = function (_a) {
|
|
|
56
56
|
var _k = useState(false), isTyping = _k[0], setIsTyping = _k[1];
|
|
57
57
|
var t = useTranslation().t;
|
|
58
58
|
useEffect(function () {
|
|
59
|
-
if (value)
|
|
59
|
+
if (value !== null && value !== undefined)
|
|
60
60
|
setText(selectedLabel);
|
|
61
61
|
else
|
|
62
62
|
setText("");
|
|
@@ -83,7 +83,7 @@ var Autocomplete = function (_a) {
|
|
|
83
83
|
})
|
|
84
84
|
: options;
|
|
85
85
|
}, [updatedText, text, options]);
|
|
86
|
-
var inputIconUI = text ? (_jsx(ClearIcon, __assign({ clickable: true, dim: 24, centered: true, id: id ? "".concat(id, "-clear") : null, onClick: function (evt) {
|
|
86
|
+
var inputIconUI = text ? (_jsx(ClearIcon, __assign({ clickable: true, dim: 24, centered: true, "data-cy": "clear-icon", id: id ? "".concat(id, "-clear") : null, onClick: function (evt) {
|
|
87
87
|
evt.preventDefault();
|
|
88
88
|
evt.stopPropagation();
|
|
89
89
|
onChange(undefined);
|
|
@@ -6,6 +6,7 @@ type Props = {
|
|
|
6
6
|
onChange?: (isChecked: boolean) => void;
|
|
7
7
|
onShiftKeyPressed?: () => void;
|
|
8
8
|
isDisabled?: boolean;
|
|
9
|
+
label?: string;
|
|
9
10
|
} & DivCSSProps;
|
|
10
|
-
declare const Checkbox: ({ isChecked, isIndeterminate, icon, onChange, onShiftKeyPressed, isDisabled, ...props }: Props) => JSX.Element;
|
|
11
|
+
declare const Checkbox: ({ isChecked, isIndeterminate, icon, onChange, onShiftKeyPressed, isDisabled, label, ...props }: Props) => JSX.Element;
|
|
11
12
|
export { Checkbox };
|
|
@@ -24,17 +24,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
}
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
28
|
import styled, { css } from "styled-components";
|
|
29
29
|
import { Div } from "../../styled/utils";
|
|
30
|
-
var Container = styled.div(
|
|
31
|
-
|
|
30
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n gap: 8px;\n cursor: pointer;\n"], ["\n display: flex;\n gap: 8px;\n cursor: pointer;\n"])));
|
|
31
|
+
var IconContainer = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 20px;\n width: 20px;\n border-radius: 4px;\n border: 1px solid ", ";\n background-color: ", ";\n ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n\n ", "\n"], ["\n height: 20px;\n width: 20px;\n border-radius: 4px;\n border: 1px solid ", ";\n background-color: ", ";\n ", ";\n\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n\n ", "\n"])), function (props) { return props.theme.colors.gray400; }, function (props) { return props.theme.colors.white; }, function (props) {
|
|
32
|
+
return (props.isChecked || props.isIndeterminate) && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: 1px solid white;\n background-color: ", ";\n "], ["\n border: 1px solid white;\n background-color: ", ";\n "])), props.theme.colors.pink500);
|
|
32
33
|
}, function (_a) {
|
|
33
34
|
var isDisabled = _a.isDisabled;
|
|
34
|
-
return isDisabled && css(
|
|
35
|
+
return isDisabled && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n opacity: 0.6;\n\n :hover {\n cursor: not-allowed;\n }\n "], ["\n opacity: 0.6;\n\n :hover {\n cursor: not-allowed;\n }\n "])));
|
|
35
36
|
});
|
|
37
|
+
var Label = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-size: 14px;\n line-height: 20px;\n"], ["\n font-size: 14px;\n line-height: 20px;\n"])));
|
|
36
38
|
var Checkbox = function (_a) {
|
|
37
|
-
var isChecked = _a.isChecked, isIndeterminate = _a.isIndeterminate, _b = _a.icon, icon = _b === void 0 ? null : _b, onChange = _a.onChange, onShiftKeyPressed = _a.onShiftKeyPressed, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, props = __rest(_a, ["isChecked", "isIndeterminate", "icon", "onChange", "onShiftKeyPressed", "isDisabled"]);
|
|
39
|
+
var isChecked = _a.isChecked, isIndeterminate = _a.isIndeterminate, _b = _a.icon, icon = _b === void 0 ? null : _b, onChange = _a.onChange, onShiftKeyPressed = _a.onShiftKeyPressed, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.label, label = _d === void 0 ? null : _d, props = __rest(_a, ["isChecked", "isIndeterminate", "icon", "onChange", "onShiftKeyPressed", "isDisabled", "label"]);
|
|
38
40
|
var handleOnChange = function (event) {
|
|
39
41
|
if (!onChange)
|
|
40
42
|
return;
|
|
@@ -45,9 +47,9 @@ var Checkbox = function (_a) {
|
|
|
45
47
|
var newValue = !isChecked || isIndeterminate;
|
|
46
48
|
onChange(newValue);
|
|
47
49
|
};
|
|
48
|
-
return (
|
|
50
|
+
return (_jsxs(Container, __assign({ "data-test-id": "checkbox", onClick: handleOnChange }, { children: [_jsx(IconContainer, __assign({}, __assign({ isChecked: isChecked, isDisabled: isDisabled, isIndeterminate: isIndeterminate }, props), { children: isIndeterminate ? (_jsx(IndeterminateIcon, {})) : (_jsx(Div, __assign({ centered: true }, { children: isChecked && (icon || checkIcon) }))) })), label && _jsx(Label, { children: label })] })));
|
|
49
51
|
};
|
|
50
52
|
var checkIcon = (_jsx("svg", __assign({ width: "14", height: "10", viewBox: "0 0 14 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M1.10254 4.74355L5.2051 8.84612L12.8974 1.15381", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })));
|
|
51
53
|
var IndeterminateIcon = function () { return (_jsx("svg", __assign({ width: "14", height: "2", viewBox: "0 0 14 2", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M1 1H13", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }) }))); };
|
|
52
54
|
export { Checkbox };
|
|
53
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
55
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DivCSSProps } from "../../styled/utils";
|
|
3
|
+
export declare const handleInputPaste: (event: any) => void;
|
|
3
4
|
export declare const HTMLInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
|
|
4
5
|
padding?: string;
|
|
5
6
|
}, never>;
|
|
@@ -31,6 +31,14 @@ import { FormInputLabel } from "..";
|
|
|
31
31
|
import { useDebounce } from "../../hooks";
|
|
32
32
|
import { Div } from "../../styled/utils";
|
|
33
33
|
import Tooltip from "./tooltip";
|
|
34
|
+
export var handleInputPaste = function (event) {
|
|
35
|
+
var clipboardData = event.clipboardData;
|
|
36
|
+
var pastedData = clipboardData.getData("text");
|
|
37
|
+
if (pastedData.includes("\t") || pastedData.includes("\n")) {
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
event.stopPropagation();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
34
42
|
export var HTMLInput = styled.input(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n\n padding: ", ";\n height: 68px;\n margin: 0px;\n box-shadow: none;\n\n outline: none;\n\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: 8px;\n width: 100%;\n\n ::-webkit-outer-spin-button,\n ::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n /* Firefox */\n -moz-appearance: textfield;\n\n ", ";\n\n ::placeholder {\n color: ", ";\n }\n\n :focus {\n border: 2px solid ", ";\n\n /* 3d at the end adds .24 opacity (using 8 digit hex)*/\n box-shadow: 0px 0px 8px ", "3d;\n }\n\n :hover {\n box-shadow: none;\n background: transparent;\n }\n\n ", "\n ", "\n"], ["\n position: relative;\n\n padding: ", ";\n height: 68px;\n margin: 0px;\n box-shadow: none;\n\n outline: none;\n\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: 8px;\n width: 100%;\n\n ::-webkit-outer-spin-button,\n ::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n /* Firefox */\n -moz-appearance: textfield;\n\n ", ";\n\n ::placeholder {\n color: ", ";\n }\n\n :focus {\n border: 2px solid ", ";\n\n /* 3d at the end adds .24 opacity (using 8 digit hex)*/\n box-shadow: 0px 0px 8px ", "3d;\n }\n\n :hover {\n box-shadow: none;\n background: transparent;\n }\n\n ", "\n ", "\n"])), function (_a) {
|
|
35
43
|
var padding = _a.padding;
|
|
36
44
|
return (padding ? padding : "20px 16px");
|
|
@@ -53,7 +61,7 @@ var TextInput = function (_a) {
|
|
|
53
61
|
: isPasswordField || icon
|
|
54
62
|
? "20px 35px 20px 16px"
|
|
55
63
|
: null;
|
|
56
|
-
return (_jsxs(Div, __assign({ w100: true }, props, { children: [showLabel ? (_jsx(FormInputLabel, __assign({ isDisabled: isDisabled, mb: 8, htmlFor: id, h: 20 }, { children: _jsxs(Div, __assign({ dflex: true }, { children: [_jsx(Div, __assign({ centered: true }, { children: label })), labelTooltip ? _jsx(Tooltip, { ml: 4, tooltip: labelTooltip }) : null] })) }))) : null, _jsxs(Div, __assign({ pRelative: true }, { children: [_jsx(HTMLInput, __assign({}, {
|
|
64
|
+
return (_jsxs(Div, __assign({ w100: true }, props, { children: [showLabel ? (_jsx(FormInputLabel, __assign({ isDisabled: isDisabled, mb: 8, htmlFor: id, h: 20 }, { children: _jsxs(Div, __assign({ dflex: true }, { children: [_jsx(Div, __assign({ centered: true }, { children: label })), labelTooltip ? _jsx(Tooltip, { ml: 4, tooltip: labelTooltip }) : null] })) }))) : null, _jsxs(Div, __assign({ pRelative: true }, { children: [_jsx(HTMLInput, __assign({ "data-cy": "html-input" }, {
|
|
57
65
|
placeholder: placeholder,
|
|
58
66
|
isDisabled: isDisabled,
|
|
59
67
|
onFocus: onFocus,
|
|
@@ -63,7 +71,7 @@ var TextInput = function (_a) {
|
|
|
63
71
|
id: id,
|
|
64
72
|
padding: padding,
|
|
65
73
|
name: name,
|
|
66
|
-
}, { autoComplete: "off", type: isPasswordVisible ? "text" : type, value: _value || "", onChange: function (_a) {
|
|
74
|
+
}, { onPaste: handleInputPaste, autoComplete: "off", type: isPasswordVisible ? "text" : type, value: _value || "", onChange: function (_a) {
|
|
67
75
|
var value = _a.target.value;
|
|
68
76
|
return set_Value(value);
|
|
69
77
|
}, ref: setInputRef, onBlur: function () {
|
package/lib/esm/index.js
CHANGED
|
@@ -99,7 +99,7 @@ var FuseImporter = /** @class */ (function () {
|
|
|
99
99
|
case 0: return [4 /*yield*/, this.configureI18n()];
|
|
100
100
|
case 1:
|
|
101
101
|
_a.sent();
|
|
102
|
-
isRunningTest =
|
|
102
|
+
isRunningTest = this.options.cypress === true || process.env.REACT_APP_CYPRESS;
|
|
103
103
|
if (isRunningTest) {
|
|
104
104
|
this.renderImporterComponent();
|
|
105
105
|
i18n.reloadResources();
|
package/lib/esm/locales/de.d.ts
CHANGED
|
@@ -129,5 +129,15 @@ declare const _default: {
|
|
|
129
129
|
title: string;
|
|
130
130
|
};
|
|
131
131
|
};
|
|
132
|
+
warnings_banner: {
|
|
133
|
+
trial_mode: {
|
|
134
|
+
info_text: string;
|
|
135
|
+
button_text: string;
|
|
136
|
+
};
|
|
137
|
+
invalid_submit_fn: {
|
|
138
|
+
info_text: string;
|
|
139
|
+
button_text: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
132
142
|
};
|
|
133
143
|
export default _default;
|
package/lib/esm/locales/de.js
CHANGED
|
@@ -130,4 +130,14 @@ export default {
|
|
|
130
130
|
title: "Sie sind derzeit im Vorschau-Modus.",
|
|
131
131
|
},
|
|
132
132
|
},
|
|
133
|
+
warnings_banner: {
|
|
134
|
+
trial_mode: {
|
|
135
|
+
info_text: "Dieses Konto befindet sich im Testmodus. Importe sind auf 100 Datensätze beschränkt.",
|
|
136
|
+
button_text: "Plan auswählen",
|
|
137
|
+
},
|
|
138
|
+
invalid_submit_fn: {
|
|
139
|
+
info_text: "Senden ist deaktiviert. Schalten Sie den Inkognito-Modus aus oder fügen Sie einen onSubmit-Hook hinzu, um das Senden zu aktivieren.",
|
|
140
|
+
button_text: "Wie geht das?",
|
|
141
|
+
},
|
|
142
|
+
},
|
|
133
143
|
};
|
package/lib/esm/locales/en.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ declare const _default: {
|
|
|
63
63
|
search_rows: {
|
|
64
64
|
tooltip: string;
|
|
65
65
|
placeholder: string;
|
|
66
|
+
number_of_results: string;
|
|
66
67
|
};
|
|
67
68
|
filter_by_errors: {
|
|
68
69
|
search_or_select: string;
|
|
@@ -106,6 +107,18 @@ declare const _default: {
|
|
|
106
107
|
continue: string;
|
|
107
108
|
submit: string;
|
|
108
109
|
};
|
|
110
|
+
find_and_replace_modal: {
|
|
111
|
+
cancel: string;
|
|
112
|
+
description: string;
|
|
113
|
+
find: string;
|
|
114
|
+
no_records_found: string;
|
|
115
|
+
records_replaced: string;
|
|
116
|
+
replace_with: string;
|
|
117
|
+
submit: string;
|
|
118
|
+
title: string;
|
|
119
|
+
use_case_sensitive: string;
|
|
120
|
+
use_regex: string;
|
|
121
|
+
};
|
|
109
122
|
unmatched_headers_modal: {
|
|
110
123
|
title: string;
|
|
111
124
|
description_singular: string;
|
|
@@ -128,6 +141,16 @@ declare const _default: {
|
|
|
128
141
|
preview_mode_banner: {
|
|
129
142
|
title: string;
|
|
130
143
|
};
|
|
144
|
+
warnings_banner: {
|
|
145
|
+
trial_mode: {
|
|
146
|
+
info_text: string;
|
|
147
|
+
button_text: string;
|
|
148
|
+
};
|
|
149
|
+
invalid_submit_fn: {
|
|
150
|
+
info_text: string;
|
|
151
|
+
button_text: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
131
154
|
};
|
|
132
155
|
};
|
|
133
156
|
export default _default;
|
package/lib/esm/locales/en.js
CHANGED
|
@@ -64,6 +64,7 @@ export default {
|
|
|
64
64
|
search_rows: {
|
|
65
65
|
tooltip: "Search something",
|
|
66
66
|
placeholder: "Search something...",
|
|
67
|
+
number_of_results: "{{length}} results",
|
|
67
68
|
},
|
|
68
69
|
filter_by_errors: {
|
|
69
70
|
search_or_select: "Search or select",
|
|
@@ -107,6 +108,18 @@ export default {
|
|
|
107
108
|
continue: "Continue",
|
|
108
109
|
submit: "Submit",
|
|
109
110
|
},
|
|
111
|
+
find_and_replace_modal: {
|
|
112
|
+
cancel: "Cancel",
|
|
113
|
+
description: "Enter the text you want to find and replace.",
|
|
114
|
+
find: "Find",
|
|
115
|
+
no_records_found: "Text could not be found in any cells.",
|
|
116
|
+
records_replaced: "{{length}} row(s) have been updated.",
|
|
117
|
+
replace_with: "Replace With",
|
|
118
|
+
submit: "Find and Replace",
|
|
119
|
+
title: "Find & Replace",
|
|
120
|
+
use_case_sensitive: "Use case sensitive matching",
|
|
121
|
+
use_regex: "Use regular expression matching",
|
|
122
|
+
},
|
|
110
123
|
unmatched_headers_modal: {
|
|
111
124
|
title: "Unmatched Column Headers",
|
|
112
125
|
description_singular: "There is {{count}} unmatched column headers. You will have to fill these out manually if you proceed.",
|
|
@@ -129,5 +142,15 @@ export default {
|
|
|
129
142
|
preview_mode_banner: {
|
|
130
143
|
title: "You’re currently in Preview mode.",
|
|
131
144
|
},
|
|
145
|
+
warnings_banner: {
|
|
146
|
+
trial_mode: {
|
|
147
|
+
info_text: "This account is in trial mode. Imports are limited to 100 records.",
|
|
148
|
+
button_text: "Select plan",
|
|
149
|
+
},
|
|
150
|
+
invalid_submit_fn: {
|
|
151
|
+
info_text: "Submit is disabled. Turn off Incognito Mode or add an onSubmit hook to enable submit.",
|
|
152
|
+
button_text: "How to do it?",
|
|
153
|
+
},
|
|
154
|
+
},
|
|
132
155
|
},
|
|
133
156
|
};
|
package/lib/esm/locales/es.d.ts
CHANGED
|
@@ -128,6 +128,16 @@ declare const _default: {
|
|
|
128
128
|
preview_mode_banner: {
|
|
129
129
|
title: string;
|
|
130
130
|
};
|
|
131
|
+
warnings_banner: {
|
|
132
|
+
trial_mode: {
|
|
133
|
+
info_text: string;
|
|
134
|
+
button_text: string;
|
|
135
|
+
};
|
|
136
|
+
invalid_submit_fn: {
|
|
137
|
+
info_text: string;
|
|
138
|
+
button_text: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
131
141
|
};
|
|
132
142
|
};
|
|
133
143
|
export default _default;
|
package/lib/esm/locales/es.js
CHANGED
|
@@ -129,5 +129,15 @@ export default {
|
|
|
129
129
|
preview_mode_banner: {
|
|
130
130
|
title: "Actualmente estás en modo de vista previa.",
|
|
131
131
|
},
|
|
132
|
+
warnings_banner: {
|
|
133
|
+
trial_mode: {
|
|
134
|
+
info_text: "Esta cuenta está en modo de prueba. Las importaciones están limitadas a 100 registros.",
|
|
135
|
+
button_text: "Seleccionar plan",
|
|
136
|
+
},
|
|
137
|
+
invalid_submit_fn: {
|
|
138
|
+
info_text: "Enviar está desactivado. Desactive el modo incógnito o agregue un hook onSubmit para habilitar el envío.",
|
|
139
|
+
button_text: "¿Cómo hacerlo?",
|
|
140
|
+
},
|
|
141
|
+
},
|
|
132
142
|
},
|
|
133
143
|
};
|
package/lib/esm/locales/fr.d.ts
CHANGED
|
@@ -128,6 +128,16 @@ declare const _default: {
|
|
|
128
128
|
preview_mode_banner: {
|
|
129
129
|
title: string;
|
|
130
130
|
};
|
|
131
|
+
warnings_banner: {
|
|
132
|
+
trial_mode: {
|
|
133
|
+
info_text: string;
|
|
134
|
+
button_text: string;
|
|
135
|
+
};
|
|
136
|
+
invalid_submit_fn: {
|
|
137
|
+
info_text: string;
|
|
138
|
+
button_text: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
131
141
|
};
|
|
132
142
|
};
|
|
133
143
|
export default _default;
|
package/lib/esm/locales/fr.js
CHANGED
|
@@ -129,5 +129,15 @@ export default {
|
|
|
129
129
|
preview_mode_banner: {
|
|
130
130
|
title: "Vous êtes actuellement en mode Aperçu.",
|
|
131
131
|
},
|
|
132
|
+
warnings_banner: {
|
|
133
|
+
trial_mode: {
|
|
134
|
+
info_text: "Ce compte est en mode d'essai. Les imports sont limités à 100 enregistrements.",
|
|
135
|
+
button_text: "Sélectionner un plan",
|
|
136
|
+
},
|
|
137
|
+
invalid_submit_fn: {
|
|
138
|
+
info_text: "L'envoi est désactivé. Désactivez le mode incognito ou ajoutez un hook onSubmit pour activer l'envoi.",
|
|
139
|
+
button_text: "Comment faire ?",
|
|
140
|
+
},
|
|
141
|
+
},
|
|
132
142
|
},
|
|
133
143
|
};
|
|
@@ -12,6 +12,7 @@ export declare const colorPalette: {
|
|
|
12
12
|
red50: string;
|
|
13
13
|
red100: string;
|
|
14
14
|
red200: string;
|
|
15
|
+
red250: string;
|
|
15
16
|
red300: string;
|
|
16
17
|
red400: string;
|
|
17
18
|
red500: string;
|
|
@@ -116,6 +117,7 @@ export declare const colors: {
|
|
|
116
117
|
red50: string;
|
|
117
118
|
red100: string;
|
|
118
119
|
red200: string;
|
|
120
|
+
red250: string;
|
|
119
121
|
red300: string;
|
|
120
122
|
red400: string;
|
|
121
123
|
red500: string;
|