fuse-importer 0.0.7-testing → 0.0.8-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/common/Spreadsheet/components/inputs/index.d.ts +0 -1
- package/lib/esm/common/columnsValidations.d.ts +1 -1
- package/lib/esm/hooks/index.d.ts +0 -1
- package/lib/esm/types.d.ts +2 -2
- package/lib/main.js +18 -18
- package/package.json +2 -3
- package/lib/esm/Importer/ImporterWithContext.js +0 -63
- package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcher/index.js +0 -68
- package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcher/tableColumns.js +0 -58
- package/lib/esm/Importer/Matcher/EnumFieldsMatchers/EnumFieldMatcherContext.js +0 -21
- package/lib/esm/Importer/Matcher/EnumFieldsMatchers/index.js +0 -23
- package/lib/esm/Importer/Matcher/HeaderMatcher/index.js +0 -61
- package/lib/esm/Importer/Matcher/HeaderMatcher/tableColumns.js +0 -55
- package/lib/esm/Importer/Matcher/common/icons/index.js +0 -14
- package/lib/esm/Importer/Matcher/common/index.js +0 -39
- package/lib/esm/Importer/Matcher/common/types.js +0 -9
- package/lib/esm/Importer/Matcher/index.js +0 -22
- package/lib/esm/Importer/PreviewFirstTime.js +0 -81
- package/lib/esm/Importer/PreviewModeBanner.js +0 -19
- package/lib/esm/Importer/Review/AppResponseModal.js +0 -35
- package/lib/esm/Importer/Review/ReviewContextProvider.js +0 -315
- package/lib/esm/Importer/Review/ReviewWithContext.js +0 -33
- package/lib/esm/Importer/Review/index.js +0 -4
- package/lib/esm/Importer/Stepper/ConfirmCloseModal.js +0 -24
- package/lib/esm/Importer/Stepper/Step.js +0 -19
- package/lib/esm/Importer/Stepper/StepIndex.js +0 -27
- package/lib/esm/Importer/Stepper/StepperSubmitModal.js +0 -24
- package/lib/esm/Importer/Stepper/UnmatchedHeadersModal.js +0 -31
- package/lib/esm/Importer/Stepper/common/getEnumFieldValueMatchingsInitialValue.js +0 -33
- package/lib/esm/Importer/Stepper/common/icons.js +0 -18
- package/lib/esm/Importer/Stepper/index.js +0 -118
- package/lib/esm/Importer/TrialModeBanner.js +0 -22
- package/lib/esm/Importer/Uploader/DragAndDropImporter/DragAndDropImporter.styles.js +0 -11
- package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterDropzone.js +0 -123
- package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterSectionHeader/ImporterSectionHeader.styles.js +0 -11
- package/lib/esm/Importer/Uploader/DragAndDropImporter/ImporterSectionHeader/index.js +0 -44
- package/lib/esm/Importer/Uploader/DragAndDropImporter/backgrounds.js +0 -14
- package/lib/esm/Importer/Uploader/DragAndDropImporter/index.js +0 -45
- package/lib/esm/Importer/Uploader/HeaderButtons.js +0 -28
- package/lib/esm/Importer/Uploader/HeadersPreview.js +0 -44
- package/lib/esm/Importer/Uploader/UploaderContextProvider.js +0 -27
- package/lib/esm/Importer/Uploader/index.js +0 -13
- package/lib/esm/Importer/common/AppLoading.js +0 -24
- package/lib/esm/Importer/common/Footer.js +0 -17
- package/lib/esm/Importer/common/FuseApi.js +0 -48
- package/lib/esm/Importer/common/GlobalStyle.js +0 -7
- package/lib/esm/Importer/common/ImporterFonts.js +0 -5
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/filterMethods.js +0 -56
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/index.js +0 -176
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/useSpreadsheetFilter.js +0 -45
- package/lib/esm/Importer/common/Spreadsheet/SpreadsheetContextProvider/utils.js +0 -14
- package/lib/esm/Importer/common/Spreadsheet/common/index.js +0 -63
- package/lib/esm/Importer/common/Spreadsheet/common/types.js +0 -5
- package/lib/esm/Importer/common/Spreadsheet/components/FieldHeader.js +0 -66
- package/lib/esm/Importer/common/Spreadsheet/components/GlobalStyle.js +0 -9
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetData.js +0 -110
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowCheckboxes.js +0 -186
- package/lib/esm/Importer/common/Spreadsheet/components/SpreadsheetRowNumbers.js +0 -55
- package/lib/esm/Importer/common/Spreadsheet/components/ValidationProgress.js +0 -19
- package/lib/esm/Importer/common/Spreadsheet/components/fields/SpeadsheetAutocomplete.js +0 -43
- package/lib/esm/Importer/common/Spreadsheet/components/fields/SpreadsheetInput.js +0 -70
- package/lib/esm/Importer/common/Spreadsheet/components/fields/index.js +0 -108
- package/lib/esm/Importer/common/Spreadsheet/components/inputs/Boolean.js +0 -18
- package/lib/esm/Importer/common/Spreadsheet/components/inputs/EmailInput.js +0 -14
- package/lib/esm/Importer/common/Spreadsheet/components/inputs/EnumInput.js +0 -30
- package/lib/esm/Importer/common/Spreadsheet/components/inputs/FloatInput.js +0 -16
- package/lib/esm/Importer/common/Spreadsheet/components/inputs/IntegerInput.js +0 -16
- package/lib/esm/Importer/common/Spreadsheet/components/inputs/StringInput.js +0 -14
- package/lib/esm/Importer/common/Spreadsheet/components/inputs/index.js +0 -20
- package/lib/esm/Importer/common/Spreadsheet/hooks.js +0 -245
- package/lib/esm/Importer/common/Spreadsheet/index.js +0 -119
- package/lib/esm/Importer/common/Spreadsheet/styles.js +0 -16
- package/lib/esm/Importer/common/Spreadsheet/transformation/index.js +0 -47
- package/lib/esm/Importer/common/Spreadsheet/transformation/transformators.js +0 -204
- package/lib/esm/Importer/common/Spreadsheet/validation/index.js +0 -202
- package/lib/esm/Importer/common/Spreadsheet/validation/validators.js +0 -181
- package/lib/esm/Importer/common/icons/index.js +0 -18
- package/lib/esm/Importer/common/index.js +0 -13
- package/lib/esm/Importer/common/theme.js +0 -19
- package/lib/esm/Importer/common/utils.js +0 -100
- package/lib/esm/Importer/contexts/ImporterContextProvider.js +0 -247
- package/lib/esm/Importer/data/index.js +0 -152
- package/lib/esm/Importer/index.js +0 -28
- package/lib/esm/api/index.js +0 -93
- package/lib/esm/api/responseHandlers.js +0 -49
- package/lib/esm/common/AppLoadingContextProvider/AppLoadingUI.js +0 -26
- package/lib/esm/common/AppLoadingContextProvider/index.js +0 -25
- package/lib/esm/common/ConfirmationModal.js +0 -19
- package/lib/esm/common/Modal.js +0 -31
- package/lib/esm/common/Spinner.js +0 -41
- package/lib/esm/common/Table/Pagination/icons.js +0 -42
- package/lib/esm/common/Table/Pagination/index.js +0 -32
- package/lib/esm/common/Table/TableActions/DeleteSelectedRows.js +0 -50
- package/lib/esm/common/Table/TableActions/ExportData.js +0 -23
- package/lib/esm/common/Table/TableActions/FilterByErrors/FilterByErrors.js +0 -47
- package/lib/esm/common/Table/TableActions/FilterByErrors/FilterByErrors.styles.js +0 -24
- package/lib/esm/common/Table/TableActions/FilterByErrors/functions.js +0 -35
- package/lib/esm/common/Table/TableActions/FilterByErrors/index.js +0 -1
- package/lib/esm/common/Table/TableActions/RowFilters.js +0 -42
- package/lib/esm/common/Table/TableActions/SearchRows.js +0 -72
- package/lib/esm/common/Table/TableActions/TableActions.js +0 -35
- package/lib/esm/common/Table/TableActions/TableActions.styles.js +0 -18
- package/lib/esm/common/Table/TableActions/TransformedRecordsCount.js +0 -71
- package/lib/esm/common/Table/TableActions/common.js +0 -1
- package/lib/esm/common/Table/TableActions/hooks.js +0 -41
- package/lib/esm/common/Table/TableActions/icons.js +0 -17
- package/lib/esm/common/Table/TableActions/index.js +0 -1
- package/lib/esm/common/Table/TableDataProvider.js +0 -127
- package/lib/esm/common/Table/TableView/CustomScrollbar.d.ts +0 -2
- package/lib/esm/common/Table/TableView/CustomScrollbar.js +0 -34
- package/lib/esm/common/Table/TableView/TableHeaders.js +0 -69
- package/lib/esm/common/Table/TableView/TableRows/TableRow.js +0 -57
- package/lib/esm/common/Table/TableView/TableRows/index.js +0 -48
- package/lib/esm/common/Table/TableView/common/index.js +0 -37
- package/lib/esm/common/Table/TableView/index.js +0 -132
- package/lib/esm/common/Table/TableView/types.js +0 -1
- package/lib/esm/common/Table/icons.js +0 -15
- package/lib/esm/common/Table/index.js +0 -140
- package/lib/esm/common/Table/useReorderRows.js +0 -83
- package/lib/esm/common/Toast.js +0 -69
- package/lib/esm/common/TooltipProvider.js +0 -57
- package/lib/esm/common/buttons.js +0 -97
- package/lib/esm/common/columnsTransformations.js +0 -94
- package/lib/esm/common/columnsValidations.js +0 -687
- package/lib/esm/common/icons/index.js +0 -30
- package/lib/esm/common/index.js +0 -45
- package/lib/esm/common/inputs/Autocomplete.js +0 -110
- package/lib/esm/common/inputs/Checkbox.js +0 -53
- package/lib/esm/common/inputs/SelectMenu.js +0 -67
- package/lib/esm/common/inputs/TextInput.js +0 -89
- package/lib/esm/common/inputs/index.js +0 -5
- package/lib/esm/common/inputs/tooltip.js +0 -38
- package/lib/esm/common/logo.js +0 -13
- package/lib/esm/hooks/index.js +0 -16
- package/lib/esm/index.js +0 -218
- package/lib/esm/locales/de.js +0 -126
- package/lib/esm/locales/en.js +0 -126
- package/lib/esm/locales/es.js +0 -126
- package/lib/esm/locales/fr.js +0 -126
- package/lib/esm/locales/index.js +0 -4
- package/lib/esm/styled/fontsURL.js +0 -27
- package/lib/esm/styled/index.js +0 -3
- package/lib/esm/styled/theme/animations.js +0 -9
- package/lib/esm/styled/theme/colorPalette.js +0 -109
- package/lib/esm/styled/theme/debugCss.js +0 -16
- package/lib/esm/styled/theme/dimensionsCss.js +0 -20
- package/lib/esm/styled/theme/fontCss.js +0 -17
- package/lib/esm/styled/theme/globalCss.js +0 -26
- package/lib/esm/styled/theme/index.js +0 -33
- package/lib/esm/styled/theme/layoutCss.js +0 -26
- package/lib/esm/styled/theme/mediaQueries.js +0 -4
- package/lib/esm/styled/theme/positionCss.js +0 -27
- package/lib/esm/styled/theme/textCss.js +0 -18
- package/lib/esm/styled/theme/textStyles.js +0 -27
- package/lib/esm/styled/themeType.js +0 -6
- package/lib/esm/styled/utils.js +0 -17
- package/lib/esm/types.js +0 -65
- package/lib/esm/utils/hooks/useWindowSize.js +0 -23
- package/lib/esm/utils/hooks.js +0 -1
- package/lib/esm/utils/index.js +0 -37
package/lib/esm/index.js
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
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 { jsx as _jsx } from "react/jsx-runtime";
|
|
58
|
-
import ReactDOM from "react-dom";
|
|
59
|
-
import { Importer } from "./Importer";
|
|
60
|
-
import { fuseImporterId, validateColumn } from "./common";
|
|
61
|
-
import i18n from "i18next";
|
|
62
|
-
import { initReactI18next } from "react-i18next";
|
|
63
|
-
import * as locales from "./locales";
|
|
64
|
-
import { StyleSheetManager } from "styled-components";
|
|
65
|
-
import { fontsURL } from "./styled/fontsURL";
|
|
66
|
-
import { addLinkToHead, getDefaultValidations } from "./utils";
|
|
67
|
-
var FuseImporter = /** @class */ (function () {
|
|
68
|
-
function FuseImporter(apiToken, templateSlug, options) {
|
|
69
|
-
if (options === void 0) { options = {}; }
|
|
70
|
-
this.dynamicColumns = [];
|
|
71
|
-
this.cleanupIframe = null;
|
|
72
|
-
this.windowScrollPosition = {
|
|
73
|
-
x: 0,
|
|
74
|
-
y: 0,
|
|
75
|
-
};
|
|
76
|
-
this.apiToken = apiToken;
|
|
77
|
-
this.templateSlug = templateSlug;
|
|
78
|
-
this.options = __assign({ env: "production", zIndex: 1000, batchValidationDelayMs: 500 }, options);
|
|
79
|
-
}
|
|
80
|
-
FuseImporter.prototype.close = function () {
|
|
81
|
-
var _a;
|
|
82
|
-
(_a = this.onClose) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
83
|
-
if (this.cleanupIframe) {
|
|
84
|
-
this.cleanupIframe();
|
|
85
|
-
this.cleanupIframe = null;
|
|
86
|
-
}
|
|
87
|
-
var iframe = document.getElementById(fuseImporterId);
|
|
88
|
-
document.body.removeChild(iframe);
|
|
89
|
-
// allow the scroll when the importer is closed
|
|
90
|
-
document.body.style.overflow = "auto";
|
|
91
|
-
window.scrollTo(this.windowScrollPosition.x, this.windowScrollPosition.y);
|
|
92
|
-
};
|
|
93
|
-
FuseImporter.prototype.show = function () {
|
|
94
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
95
|
-
var isRunningTest, iframe, importerComponent;
|
|
96
|
-
return __generator(this, function (_a) {
|
|
97
|
-
switch (_a.label) {
|
|
98
|
-
case 0: return [4 /*yield*/, this.configureI18n()];
|
|
99
|
-
case 1:
|
|
100
|
-
_a.sent();
|
|
101
|
-
isRunningTest = typeof (window === null || window === void 0 ? void 0 : window.Cypress) !== "undefined";
|
|
102
|
-
if (isRunningTest) {
|
|
103
|
-
this.renderImporterComponent();
|
|
104
|
-
i18n.reloadResources();
|
|
105
|
-
return [2 /*return*/];
|
|
106
|
-
}
|
|
107
|
-
iframe = this.createIframe();
|
|
108
|
-
importerComponent = this.createImporterComponent();
|
|
109
|
-
// saves the position of the page before the importer was opened
|
|
110
|
-
this.windowScrollPosition = {
|
|
111
|
-
x: window.scrollX,
|
|
112
|
-
y: window.scrollY,
|
|
113
|
-
};
|
|
114
|
-
// block the scroll when opening the importer
|
|
115
|
-
window.scrollTo(0, 0);
|
|
116
|
-
document.body.style.overflow = "hidden";
|
|
117
|
-
this.configureIframe(iframe, importerComponent);
|
|
118
|
-
return [2 /*return*/];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
FuseImporter.prototype.addColumn = function (columnData) {
|
|
124
|
-
var column_type = columnData.column_type, internal_key = columnData.internal_key, label = columnData.label, required = columnData.required, pattern = columnData.pattern, position = columnData.position, transformations = columnData.transformations, unique = columnData.unique, validations = columnData.validations, values = columnData.values;
|
|
125
|
-
validateColumn(columnData);
|
|
126
|
-
var treatedValidations = __spreadArray(__spreadArray([], getDefaultValidations(column_type), true), (validations || []), true);
|
|
127
|
-
var treatedTransformations = transformations !== null && transformations !== void 0 ? transformations : [];
|
|
128
|
-
var column = {
|
|
129
|
-
column_type: column_type,
|
|
130
|
-
internal_key: internal_key,
|
|
131
|
-
label: label,
|
|
132
|
-
required: required,
|
|
133
|
-
pattern: pattern || null,
|
|
134
|
-
position: position || null,
|
|
135
|
-
unique: unique || false,
|
|
136
|
-
values: column_type === "enum" ? values || [] : [],
|
|
137
|
-
validations: treatedValidations,
|
|
138
|
-
transformations: treatedTransformations,
|
|
139
|
-
};
|
|
140
|
-
this.dynamicColumns.push(column);
|
|
141
|
-
};
|
|
142
|
-
FuseImporter.prototype.renderImporterComponent = function () {
|
|
143
|
-
var importerDiv = this.createDivComponent();
|
|
144
|
-
var importerComponent = this.createImporterComponent();
|
|
145
|
-
ReactDOM.render(importerComponent, importerDiv);
|
|
146
|
-
};
|
|
147
|
-
FuseImporter.prototype.createDivComponent = function () {
|
|
148
|
-
var div = document.createElement("div");
|
|
149
|
-
div.setAttribute("id", fuseImporterId);
|
|
150
|
-
document.body.appendChild(div);
|
|
151
|
-
return div;
|
|
152
|
-
};
|
|
153
|
-
FuseImporter.prototype.createIframe = function () {
|
|
154
|
-
var iframe = document.createElement("iframe");
|
|
155
|
-
iframe.setAttribute("id", fuseImporterId);
|
|
156
|
-
iframe.style.cssText =
|
|
157
|
-
"border: none; width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 1000;";
|
|
158
|
-
document.body.appendChild(iframe);
|
|
159
|
-
return iframe;
|
|
160
|
-
};
|
|
161
|
-
FuseImporter.prototype.createImporterComponent = function () {
|
|
162
|
-
var _this = this;
|
|
163
|
-
return (_jsx(Importer, { apiToken: this.apiToken, templateSlug: this.templateSlug, options: this.options, formatRecord: this.formatRecord, onValidateRecord: this.onValidateRecord, onSubmit: this.onSubmit, onClose: function () {
|
|
164
|
-
_this.close();
|
|
165
|
-
}, dynamicColumns: this.dynamicColumns }));
|
|
166
|
-
};
|
|
167
|
-
FuseImporter.prototype.configureIframe = function (iframe, importerComponent) {
|
|
168
|
-
var onLoadCallback = function () {
|
|
169
|
-
var iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
|
|
170
|
-
iframeDocument.body.style.margin = "0";
|
|
171
|
-
iframeDocument.body.style.padding = "0";
|
|
172
|
-
var head = iframeDocument.getElementsByTagName("head")[0];
|
|
173
|
-
for (var _i = 0, fontsURL_1 = fontsURL; _i < fontsURL_1.length; _i++) {
|
|
174
|
-
var link = fontsURL_1[_i];
|
|
175
|
-
addLinkToHead(iframeDocument, head, link.href, link.rel, link.crossOrigin);
|
|
176
|
-
}
|
|
177
|
-
ReactDOM.render(_jsx(StyleSheetManager, __assign({ target: iframeDocument.head }, { children: importerComponent })), iframeDocument.body);
|
|
178
|
-
i18n.reloadResources();
|
|
179
|
-
iframe.removeEventListener("load", onLoadCallback);
|
|
180
|
-
};
|
|
181
|
-
iframe.addEventListener("load", onLoadCallback);
|
|
182
|
-
iframe.src = "about:blank";
|
|
183
|
-
var cleanup = function () {
|
|
184
|
-
iframe.removeEventListener("load", onLoadCallback);
|
|
185
|
-
};
|
|
186
|
-
this.cleanupIframe = cleanup;
|
|
187
|
-
return cleanup;
|
|
188
|
-
};
|
|
189
|
-
FuseImporter.prototype.configureI18n = function () {
|
|
190
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
191
|
-
var browserLanguage, language;
|
|
192
|
-
return __generator(this, function (_a) {
|
|
193
|
-
switch (_a.label) {
|
|
194
|
-
case 0:
|
|
195
|
-
browserLanguage = navigator.language.split("-")[0];
|
|
196
|
-
language = this.options.language || browserLanguage || "en";
|
|
197
|
-
return [4 /*yield*/, i18n.use(initReactI18next).init({
|
|
198
|
-
lng: language,
|
|
199
|
-
fallbackLng: "en",
|
|
200
|
-
resources: __assign({}, locales),
|
|
201
|
-
})];
|
|
202
|
-
case 1:
|
|
203
|
-
_a.sent();
|
|
204
|
-
return [2 /*return*/];
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
|
-
return FuseImporter;
|
|
210
|
-
}());
|
|
211
|
-
export default FuseImporter;
|
|
212
|
-
export * from "./api";
|
|
213
|
-
export * from "./common";
|
|
214
|
-
export * from "./hooks";
|
|
215
|
-
export * from "./Importer";
|
|
216
|
-
export * from "./styled";
|
|
217
|
-
export * from "./utils";
|
|
218
|
-
export * from "./types";
|
package/lib/esm/locales/de.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
-
export default {
|
|
3
|
-
preview: {
|
|
4
|
-
title: "Sie sind dabei, Ihren Importer zu Vorschauen.",
|
|
5
|
-
description: "Laden Sie unsere Beispiel-CSV herunter, um Ihren Importer auszuprobieren. Wir haben es zufällig generiert, damit Sie sehen können, wie Fuse die Daten transformiert.",
|
|
6
|
-
download: "CSV herunterladen",
|
|
7
|
-
note: {
|
|
8
|
-
title: "Hinweis:",
|
|
9
|
-
description: "Dieser Bildschirm wird nicht mehr existieren, sobald Sie den Importer auf Ihrer Website installiert haben.",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
upload: {
|
|
13
|
-
headers_preview: {
|
|
14
|
-
title: "Wählen Sie eine Kopfzeile aus",
|
|
15
|
-
description: "Die Datei muss Spaltenüberschriften enthalten, um fortzufahren.",
|
|
16
|
-
cancel: "Nein, Datei erneut hochladen",
|
|
17
|
-
continue: "Ja, Weiter",
|
|
18
|
-
},
|
|
19
|
-
error: {
|
|
20
|
-
title: "Irgendetwas ist falsch",
|
|
21
|
-
},
|
|
22
|
-
header: {
|
|
23
|
-
title: "Stellen Sie sicher, dass Ihr Dokument Daten enthält, die ähnlich sind wie diese:",
|
|
24
|
-
required_headers: "Erforderliche Überschriften",
|
|
25
|
-
optional_headers: "Optionale Überschriften",
|
|
26
|
-
},
|
|
27
|
-
title: "Laden Sie eine Datei hoch, um Ihre Daten zu importieren",
|
|
28
|
-
description: "\n Laden Sie eine beliebige .csv, .xls, .xlsx-Tabellenkalkulationsdatei\n mit einem beliebigen Satz von Spalten hoch, solange es einen Datensatz pro Zeile enth\u00E4lt.\n ",
|
|
29
|
-
loading: {
|
|
30
|
-
title: "Hochladen...",
|
|
31
|
-
},
|
|
32
|
-
dropzone: {
|
|
33
|
-
title: "Ziehen & lassen Sie Ihre Datei hier",
|
|
34
|
-
description: "oder",
|
|
35
|
-
button: "Dateien durchsuchen",
|
|
36
|
-
enter_data_manually: "Daten manuell eingeben",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
match: {
|
|
40
|
-
title: "Passen Sie Ihre Spalten unseren an",
|
|
41
|
-
description: "Wir konnten {{numberOfMatchedHeaders}} von {{totalNumberOfHeaders}} Spalten korrekt zuordnen!",
|
|
42
|
-
enum_description: "\n Unser System akzeptiert nur bestimmte Werte f\u00FCr einige Spalten. Unten k\u00F6nnen\n Sie die Werte aus Ihrer Tabelle den Werten zuordnen, die wir akzeptieren.\n ",
|
|
43
|
-
columns: {
|
|
44
|
-
your_columns: "Ihre Spalten",
|
|
45
|
-
our_columns: "Unsere Spalten",
|
|
46
|
-
status: "Status",
|
|
47
|
-
placeholder: "Wählen Sie eine Option aus...",
|
|
48
|
-
values_for_the_column: "Werte für die {{column}}-Spalte",
|
|
49
|
-
matched: "Zugeordnet",
|
|
50
|
-
unmatched: "Nicht zugeordnet",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
review: {
|
|
54
|
-
title: "Überprüfen und Senden",
|
|
55
|
-
manual_importer_title: "Daten Eingeben und Senden",
|
|
56
|
-
export: "Exportieren",
|
|
57
|
-
description: "Einige Zellen im Dokument können Fehler im Format oder fehlende Informationen aufweisen. Bitte überprüfen Sie diese, um fortzufahren.",
|
|
58
|
-
table_actions: {
|
|
59
|
-
filters_by_rows: {
|
|
60
|
-
all_rows: "Alle Zeilen",
|
|
61
|
-
valid_rows: "Gültige Zeilen",
|
|
62
|
-
invalid_rows: "Ungültige Zeilen",
|
|
63
|
-
},
|
|
64
|
-
search_rows: {
|
|
65
|
-
tooltip: "Etwas suchen",
|
|
66
|
-
placeholder: "Etwas suchen...",
|
|
67
|
-
},
|
|
68
|
-
filter_by_errors: {
|
|
69
|
-
search_or_select: "Suchen oder auswählen",
|
|
70
|
-
filter_by_errors: "Nach Fehlern filtern",
|
|
71
|
-
},
|
|
72
|
-
delete_rows: {
|
|
73
|
-
confirmation_modal: "Möchtest du wirklich {{length}} Zeile löschen",
|
|
74
|
-
modal_title: "Ausgewählte Zeile löschen",
|
|
75
|
-
yes_delete: "Ja, löschen",
|
|
76
|
-
select_rows: "Wählen Sie Zeilen zum Löschen aus",
|
|
77
|
-
delete_row: "Zeile löschen",
|
|
78
|
-
},
|
|
79
|
-
export_your_data: {
|
|
80
|
-
tooltip: "Exportiere deine Daten",
|
|
81
|
-
},
|
|
82
|
-
transformed_records: {
|
|
83
|
-
auto_corrections_done: "automatische Korrekturen durchgeführt",
|
|
84
|
-
example: "Beispiel",
|
|
85
|
-
auto_corrections_amount: "Wir haben {{amount}} Probleme automatisch korrigiert.",
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
general: {
|
|
90
|
-
autocomplete: {
|
|
91
|
-
placeholder: "Wählen Sie eine Option aus...",
|
|
92
|
-
},
|
|
93
|
-
steps: {
|
|
94
|
-
upload: "Hochladen",
|
|
95
|
-
match: "Zuordnen",
|
|
96
|
-
review: "Überprüfen",
|
|
97
|
-
},
|
|
98
|
-
stepper: {
|
|
99
|
-
go_back: "Zurück gehen",
|
|
100
|
-
continue: "Weiter",
|
|
101
|
-
submit: "Einreichen",
|
|
102
|
-
},
|
|
103
|
-
unmatched_headers_modal: {
|
|
104
|
-
title: "Nicht zugeordnete Spaltenüberschriften",
|
|
105
|
-
description_singular: "Es gibt {{count}} nicht zugeordnete Spaltenüberschriften. Sie müssen diese manuell ausfüllen, wenn Sie fortfahren.",
|
|
106
|
-
description_plural: "Es gibt {{count}} nicht zugeordnete Spaltenüberschriften. Sie müssen diese manuell ausfüllen, wenn Sie fortfahren.",
|
|
107
|
-
assign_headers: "Überschriften zuordnen",
|
|
108
|
-
skip: "Überspringen",
|
|
109
|
-
},
|
|
110
|
-
submit_modal: {
|
|
111
|
-
title: "Bereit zum Einreichen?",
|
|
112
|
-
description: "Wir haben in Ihrer Datei nichts falsches gefunden. Sie können loslegen!",
|
|
113
|
-
submit: "Ja, einreichen",
|
|
114
|
-
cancel: "Zurück gehen",
|
|
115
|
-
},
|
|
116
|
-
confirm_close_modal: {
|
|
117
|
-
title: "Sind Sie sicher?",
|
|
118
|
-
description: "Das Schließen des Importers wird alle Änderungen verlieren.",
|
|
119
|
-
close: "Schließen",
|
|
120
|
-
cancel: "Abbrechen",
|
|
121
|
-
},
|
|
122
|
-
preview_mode_banner: {
|
|
123
|
-
title: "Sie sind derzeit im Vorschau-Modus.",
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
};
|
package/lib/esm/locales/en.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
-
export default {
|
|
3
|
-
preview: {
|
|
4
|
-
title: "You're about to preview your importer.",
|
|
5
|
-
description: "Download our example CSV to try out your importer. We have randomly generated it so you can see how Fuse transforms the data..",
|
|
6
|
-
download: "Download CSV",
|
|
7
|
-
note: {
|
|
8
|
-
title: "Note:",
|
|
9
|
-
description: "This screen will not exist once you install the importer on your website.",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
upload: {
|
|
13
|
-
headers_preview: {
|
|
14
|
-
title: "Select a Header Row",
|
|
15
|
-
description: "File must contain column headers to proceed.",
|
|
16
|
-
cancel: "Re-upload file",
|
|
17
|
-
continue: "Continue",
|
|
18
|
-
},
|
|
19
|
-
error: {
|
|
20
|
-
title: "Something’s wrong",
|
|
21
|
-
},
|
|
22
|
-
header: {
|
|
23
|
-
title: "Make sure your document contains data similar to this:",
|
|
24
|
-
required_headers: "Required Headers",
|
|
25
|
-
optional_headers: "Optional Headers",
|
|
26
|
-
},
|
|
27
|
-
title: "Upload a File to Import your Data",
|
|
28
|
-
description: "\n Upload any .csv, .xls, .xlsx file with any set of\n columns as long as it has one record per row.\n ",
|
|
29
|
-
loading: {
|
|
30
|
-
title: "Uploading...",
|
|
31
|
-
},
|
|
32
|
-
dropzone: {
|
|
33
|
-
title: "Drag & drop your file here",
|
|
34
|
-
description: "or",
|
|
35
|
-
button: "Browse Files",
|
|
36
|
-
enter_data_manually: "Enter data manually",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
match: {
|
|
40
|
-
title: "Match Your Columns with Ours",
|
|
41
|
-
description: "We were able to match {{numberOfMatchedHeaders}} of {{totalNumberOfHeaders}} columns correctly!",
|
|
42
|
-
enum_description: "\n Our system only accepts certain values for some columns. Below you can\n match the values from your spreadsheet to the values we accept.\n ",
|
|
43
|
-
columns: {
|
|
44
|
-
your_columns: "Your Columns",
|
|
45
|
-
our_columns: "Our Columns",
|
|
46
|
-
status: "Status",
|
|
47
|
-
placeholder: "Select an option...",
|
|
48
|
-
values_for_the_column: "Values for the {{column}} Column",
|
|
49
|
-
matched: "Matched",
|
|
50
|
-
unmatched: "Unmatched",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
review: {
|
|
54
|
-
title: "Review & Submit",
|
|
55
|
-
manual_importer_title: "Enter Data & Submit",
|
|
56
|
-
export: "Export",
|
|
57
|
-
description: "Some cells in the document might have errors in format or missing information. Please review these to continue.",
|
|
58
|
-
table_actions: {
|
|
59
|
-
filters_by_rows: {
|
|
60
|
-
all_rows: "All Rows",
|
|
61
|
-
valid_rows: "Valid Rows",
|
|
62
|
-
invalid_rows: "Invalid Rows",
|
|
63
|
-
},
|
|
64
|
-
search_rows: {
|
|
65
|
-
tooltip: "Search something",
|
|
66
|
-
placeholder: "Search something...",
|
|
67
|
-
},
|
|
68
|
-
filter_by_errors: {
|
|
69
|
-
search_or_select: "Search or select",
|
|
70
|
-
filter_by_errors: "Filter by errors",
|
|
71
|
-
},
|
|
72
|
-
delete_rows: {
|
|
73
|
-
confirmation_modal: "Are you sure you want to delete {{length}} row",
|
|
74
|
-
modal_title: "Delete Selected Row",
|
|
75
|
-
yes_delete: "Yes, delete",
|
|
76
|
-
select_rows: "Select rows to delete",
|
|
77
|
-
delete_row: "Delete Row",
|
|
78
|
-
},
|
|
79
|
-
export_your_data: {
|
|
80
|
-
tooltip: "Export your data",
|
|
81
|
-
},
|
|
82
|
-
transformed_records: {
|
|
83
|
-
auto_corrections_done: "auto-corrections done",
|
|
84
|
-
example: "Example",
|
|
85
|
-
auto_corrections_amount: "We have auto-corrected {{amount}} issues.",
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
general: {
|
|
90
|
-
autocomplete: {
|
|
91
|
-
placeholder: "Select an option...",
|
|
92
|
-
},
|
|
93
|
-
steps: {
|
|
94
|
-
upload: "Upload",
|
|
95
|
-
match: "Match",
|
|
96
|
-
review: "Review",
|
|
97
|
-
},
|
|
98
|
-
stepper: {
|
|
99
|
-
go_back: "Go back",
|
|
100
|
-
continue: "Continue",
|
|
101
|
-
submit: "Submit",
|
|
102
|
-
},
|
|
103
|
-
unmatched_headers_modal: {
|
|
104
|
-
title: "Unmatched Column Headers",
|
|
105
|
-
description_singular: "There is {{count}} unmatched column headers. You will have to fill these out manually if you proceed.",
|
|
106
|
-
description_plural: "There are {{count}} unmatched column headers. You will have to fill these out manually if you proceed.",
|
|
107
|
-
assign_headers: "Assign Headers",
|
|
108
|
-
skip: "Skip",
|
|
109
|
-
},
|
|
110
|
-
submit_modal: {
|
|
111
|
-
title: "Ready to submit?",
|
|
112
|
-
description: "We didn't find anything wrong with your file. You're good to go!",
|
|
113
|
-
submit: "Yes, submit",
|
|
114
|
-
cancel: "Go back",
|
|
115
|
-
},
|
|
116
|
-
confirm_close_modal: {
|
|
117
|
-
title: "Are you sure?",
|
|
118
|
-
description: "Closing the importer will lose any changes.",
|
|
119
|
-
close: "Close",
|
|
120
|
-
cancel: "Cancel",
|
|
121
|
-
},
|
|
122
|
-
preview_mode_banner: {
|
|
123
|
-
title: "You’re currently in Preview mode.",
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
};
|
package/lib/esm/locales/es.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
-
export default {
|
|
3
|
-
preview: {
|
|
4
|
-
title: "Estás a punto de previsualizar tu importador.",
|
|
5
|
-
description: "Descarga nuestro ejemplo CSV para probar tu importador. Lo hemos generado aleatoriamente para que veas cómo Fuse transforma los datos.",
|
|
6
|
-
download: "Descargar CSV",
|
|
7
|
-
note: {
|
|
8
|
-
title: "Nota:",
|
|
9
|
-
description: "Esta pantalla no existirá una vez que instales el importador en tu sitio web.",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
upload: {
|
|
13
|
-
headers_preview: {
|
|
14
|
-
title: "Seleccione una fila de encabezado",
|
|
15
|
-
description: "El archivo debe contener encabezados de columna para continuar.",
|
|
16
|
-
cancel: "No, vuelva a cargar el archivo",
|
|
17
|
-
continue: "Sí, continuar",
|
|
18
|
-
},
|
|
19
|
-
error: {
|
|
20
|
-
title: "Algo está mal",
|
|
21
|
-
},
|
|
22
|
-
header: {
|
|
23
|
-
title: "Asegúrate de que tu documento contenga datos similares a estos:",
|
|
24
|
-
required_headers: "Encabezados requeridos",
|
|
25
|
-
optional_headers: "Encabezados opcionales",
|
|
26
|
-
},
|
|
27
|
-
title: "Cargue un archivo para importar sus datos",
|
|
28
|
-
description: "\n Cargue cualquier archivo de hoja de c\u00E1lculo .csv, .xls, .xlsx con cualquier conjunto de\n columnas siempre y cuando tenga un registro por fila.\n ",
|
|
29
|
-
loading: {
|
|
30
|
-
title: "Cargando...",
|
|
31
|
-
},
|
|
32
|
-
dropzone: {
|
|
33
|
-
title: "Arrastra y suelta tu archivo aquí",
|
|
34
|
-
description: "o",
|
|
35
|
-
button: "Examinar archivos",
|
|
36
|
-
enter_data_manually: "Ingresar datos manualmente",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
match: {
|
|
40
|
-
title: "Empareja tus columnas con las nuestras",
|
|
41
|
-
description: "¡Fue posible emparejar {{numberOfMatchedHeaders}} de {{totalNumberOfHeaders}} columnas correctamente!",
|
|
42
|
-
enum_description: "\n Nuestro sistema solo acepta ciertos valores para algunas columnas. A continuaci\u00F3n, puede\n emparejar los valores de su hoja de c\u00E1lculo con los valores que aceptamos.\n ",
|
|
43
|
-
columns: {
|
|
44
|
-
your_columns: "Tus columnas",
|
|
45
|
-
our_columns: "Nuestras columnas",
|
|
46
|
-
status: "Estado",
|
|
47
|
-
placeholder: "Seleccione una opción...",
|
|
48
|
-
values_for_the_column: "Valores para la columna {{column}}",
|
|
49
|
-
matched: "Emparejado",
|
|
50
|
-
unmatched: "No emparejado",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
review: {
|
|
54
|
-
title: "Revisar y Enviar",
|
|
55
|
-
manual_importer_title: "Ingresar Datos y Enviar",
|
|
56
|
-
export: "Exportar",
|
|
57
|
-
description: "Algunas celdas en el documento pueden tener errores en el formato o información faltante. Por favor revise esto para continuar.",
|
|
58
|
-
table_actions: {
|
|
59
|
-
filters_by_rows: {
|
|
60
|
-
all_rows: "Todas las Filas",
|
|
61
|
-
valid_rows: "Filas Válidas",
|
|
62
|
-
invalid_rows: "Filas Inválidas",
|
|
63
|
-
},
|
|
64
|
-
search_rows: {
|
|
65
|
-
tooltip: "Buscar algo",
|
|
66
|
-
placeholder: "Buscar algo...",
|
|
67
|
-
},
|
|
68
|
-
filter_by_errors: {
|
|
69
|
-
search_or_select: "Buscar o seleccionar",
|
|
70
|
-
filter_by_errors: "Filtrar por errores",
|
|
71
|
-
},
|
|
72
|
-
delete_rows: {
|
|
73
|
-
confirmation_modal: "¿Seguro que quieres eliminar {{length}} fila",
|
|
74
|
-
modal_title: "Eliminar la fila seleccionada",
|
|
75
|
-
yes_delete: "Sí, eliminar",
|
|
76
|
-
select_rows: "Seleccione las filas a eliminar",
|
|
77
|
-
delete_row: "Eliminar fila",
|
|
78
|
-
},
|
|
79
|
-
export_your_data: {
|
|
80
|
-
tooltip: "Exporta tus datos",
|
|
81
|
-
},
|
|
82
|
-
transformed_records: {
|
|
83
|
-
auto_corrections_done: "correcciones automáticas realizadas",
|
|
84
|
-
example: "Ejemplo",
|
|
85
|
-
auto_corrections_amount: "Hemos corregido automáticamente {{amount}} problemas.",
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
general: {
|
|
90
|
-
autocomplete: {
|
|
91
|
-
placeholder: "Seleccione una opción...",
|
|
92
|
-
},
|
|
93
|
-
steps: {
|
|
94
|
-
upload: "Subir",
|
|
95
|
-
match: "Emparejar",
|
|
96
|
-
review: "Revisión",
|
|
97
|
-
},
|
|
98
|
-
stepper: {
|
|
99
|
-
go_back: "Volver",
|
|
100
|
-
continue: "Continuar",
|
|
101
|
-
submit: "Enviar",
|
|
102
|
-
},
|
|
103
|
-
unmatched_headers_modal: {
|
|
104
|
-
title: "Encabezados de columna no emparejados",
|
|
105
|
-
description_singular: "Hay {{count}} encabezados de columna no emparejados. Tendrás que completar estos manualmente si procedes.",
|
|
106
|
-
description_plural: "Hay {{count}} encabezados de columna no emparejados. Tendrás que completar estos manualmente si procedes.",
|
|
107
|
-
assign_headers: "Asignar encabezados",
|
|
108
|
-
skip: "Saltar",
|
|
109
|
-
},
|
|
110
|
-
submit_modal: {
|
|
111
|
-
title: "¿Listo para enviar?",
|
|
112
|
-
description: "No encontramos nada mal con tu archivo. ¡Estás listo para irte!",
|
|
113
|
-
submit: "Sí, enviar",
|
|
114
|
-
cancel: "Volver",
|
|
115
|
-
},
|
|
116
|
-
confirm_close_modal: {
|
|
117
|
-
title: "¿Estás seguro?",
|
|
118
|
-
description: "Cerrar el importador hará que se pierdan todos los cambios.",
|
|
119
|
-
close: "Cerrar",
|
|
120
|
-
cancel: "Cancelar",
|
|
121
|
-
},
|
|
122
|
-
preview_mode_banner: {
|
|
123
|
-
title: "Actualmente estás en modo de vista previa.",
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
};
|