fuse-importer 0.40.1-testing → 0.40.2-staging.2.1
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/README.md +26 -33
- package/lib/esm/index.d.ts +21 -2
- package/lib/esm/index.js +204 -93
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/types.d.ts +25 -9
- package/lib/esm/types.js.map +1 -1
- package/lib/main.js +1 -1
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<div>
|
|
2
2
|
<center>
|
|
3
|
-
<a href="https://fuse.
|
|
4
|
-
<img alt="
|
|
3
|
+
<a href="https://fuse.swovo.com/users/sign-up?utm_source=npmjs&utm_medium=Fuse+importer+logo&utm_campaign=NPM">
|
|
4
|
+
<img alt="Swovo Fuse" src="https://wp.swovo.com/wp-content/uploads/2026/08/swovo-fuse.png">
|
|
5
5
|
</a>
|
|
6
6
|
</center>
|
|
7
7
|
<br>
|
|
8
8
|
<br>
|
|
9
9
|
<p>
|
|
10
|
-
|
|
10
|
+
Swovo Fuse is a customizable and powerful CSV Importer that works with all front-end languages.
|
|
11
11
|
</p>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -47,40 +47,37 @@ yarn add fuse-importer
|
|
|
47
47
|
Install with CDN:
|
|
48
48
|
|
|
49
49
|
```html
|
|
50
|
-
<script
|
|
51
|
-
type="text/javascript"
|
|
52
|
-
src="https://unpkg.com/fuse-importer@latest.js"
|
|
53
|
-
></script>
|
|
50
|
+
<script type="text/javascript" src="https://unpkg.com/fuse-importer@latest.js"></script>
|
|
54
51
|
```
|
|
55
52
|
|
|
56
53
|
## Introduction
|
|
57
54
|
|
|
58
|
-
|
|
55
|
+
Swovo Fuse is our solution to the inevitable difficulties of getting customer data into your solution. We provide a white-labeled, customizable CSV and Spreadsheet import experience that is above all effective and flexible. Not only do we save you the time and effort of developing your own import solution, but we also ensure that setup and integration with your systems are a breeze.
|
|
59
56
|
|
|
60
|
-
To get started with our solution, you're going to need a free account and to create a template on our platform: [
|
|
57
|
+
To get started with our solution, you're going to need a free account and to create a template on our platform: [Swovo Fuse](https://fuse.swovo.com/users/sign-up?utm_source=npmjs&utm_medium=Swovo+Fuse+Get+Started&utm_campaign=NPM)
|
|
61
58
|
|
|
62
59
|
To use the importer you will need two keys:
|
|
63
60
|
|
|
64
61
|
- Your **Organization's API key**: You can find this at the top of the [Templates page](#create-your-first-template).
|
|
65
62
|
- Your **Importer's ID**: You can find this in the table on the [Templates page](#create-your-first-template).
|
|
66
63
|
|
|
67
|
-
For more information see our [full documentation.](https://fuse-docs.
|
|
64
|
+
For more information see our [full documentation.](https://fuse-docs.swovo.com?utm_source=npmjs&utm_medium=Fuse+importer+Full+Documentation&utm_campaign=NPM)
|
|
68
65
|
|
|
69
66
|
Check it out in action:
|
|
70
67
|
|
|
71
68
|
<div>
|
|
72
69
|
<center>
|
|
73
|
-
<img alt="Check it out in action" src="https://wp.
|
|
70
|
+
<img alt="Check it out in action" src="https://wp.swovo.com/wp-content/uploads/2022/07/ezgif-1-242e10926e.gif">
|
|
74
71
|
</center>
|
|
75
72
|
</div>
|
|
76
73
|
|
|
77
74
|
## Registration
|
|
78
75
|
|
|
79
|
-
If you don't have an account yet, you can go over the [Registration](https://fuse-docs.
|
|
76
|
+
If you don't have an account yet, you can go over the [Registration](https://fuse-docs.swovo.com/getting-started/registration?utm_source=npmjs&utm_medium=Registration&utm_campaign=NPM).
|
|
80
77
|
|
|
81
78
|
## Create Your First Importer
|
|
82
79
|
|
|
83
|
-
If you don’t have an Importer yet, you can go over [Create Your First Importer](https://fuse-docs.
|
|
80
|
+
If you don’t have an Importer yet, you can go over [Create Your First Importer](https://fuse-docs.swovo.com/getting-started/create-your-first-template?utm_source=npmjs&utm_medium=Create+Your+First+Template&utm_campaign=NPM). Importer represents the fields and validations that your own system accepts, also known as your data schema.
|
|
84
81
|
|
|
85
82
|
## Getting started
|
|
86
83
|
|
|
@@ -88,14 +85,14 @@ If you don’t have an Importer yet, you can go over [Create Your First Importer
|
|
|
88
85
|
<!DOCTYPE html>
|
|
89
86
|
<html>
|
|
90
87
|
<head>
|
|
91
|
-
<script
|
|
92
|
-
type="text/javascript"
|
|
93
|
-
src="https://unpkg.com/fuse-importer@latest"
|
|
94
|
-
></script>
|
|
88
|
+
<script type="text/javascript" src="https://unpkg.com/fuse-importer@latest"></script>
|
|
95
89
|
<script type="text/javascript">
|
|
96
90
|
const organizationApiKey = "YOUR ORGANIZATIONS API KEY";
|
|
97
91
|
const importerId = "YOUR IMPORTER ID";
|
|
98
|
-
const importer = new FuseImporter(
|
|
92
|
+
const importer = new FuseImporter({
|
|
93
|
+
apiToken: organizationApiKey,
|
|
94
|
+
templateSlug: importerId,
|
|
95
|
+
});
|
|
99
96
|
|
|
100
97
|
importer.onValidateRecord = async (record) => {
|
|
101
98
|
// return no frontend validation errors or warnings
|
|
@@ -111,13 +108,8 @@ If you don’t have an Importer yet, you can go over [Create Your First Importer
|
|
|
111
108
|
};
|
|
112
109
|
|
|
113
110
|
window.showFuseImporter = () => {
|
|
114
|
-
if (
|
|
115
|
-
|
|
116
|
-
importerId.indexOf("YOUR") !== -1
|
|
117
|
-
) {
|
|
118
|
-
window.confirm(
|
|
119
|
-
"You need to configure your organization api key and Importer id."
|
|
120
|
-
);
|
|
111
|
+
if (organizationApiKey.indexOf("YOUR") !== -1 || importerId.indexOf("YOUR") !== -1) {
|
|
112
|
+
window.confirm("You need to configure your organization api key and Importer id.");
|
|
121
113
|
return;
|
|
122
114
|
}
|
|
123
115
|
importer.show();
|
|
@@ -133,10 +125,10 @@ If you don’t have an Importer yet, you can go over [Create Your First Importer
|
|
|
133
125
|
|
|
134
126
|
## More Examples
|
|
135
127
|
|
|
136
|
-
- [Quickstart Examples](https://fuse-docs.
|
|
137
|
-
- [React.js](https://fuse-docs.
|
|
138
|
-
- [Angular](https://fuse-docs.
|
|
139
|
-
- [Vue.js](https://fuse-docs.
|
|
128
|
+
- [Quickstart Examples](https://fuse-docs.swovo.com/installation/quickstart-examples?utm_source=npmjs&utm_medium=More+Examples+Quickstart+Examples&utm_campaign=NPM)
|
|
129
|
+
- [React.js](https://fuse-docs.swovo.com/use-cases/react.js-csv-importer?utm_source=npmjs&utm_medium=More+Examples+React&utm_campaign=NPM)
|
|
130
|
+
- [Angular](https://fuse-docs.swovo.com/use-cases/angular-csv-importer?utm_source=npmjs&utm_medium=More+Examples+Angular&utm_campaign=NPM)
|
|
131
|
+
- [Vue.js](https://fuse-docs.swovo.com/use-cases/vue.js-csv-importer?utm_source=npmjs&utm_medium=More+Examples+Vue&utm_campaign=NPM)
|
|
140
132
|
|
|
141
133
|
## Usage
|
|
142
134
|
|
|
@@ -145,7 +137,10 @@ import FuseImporter from "fuse-importer";
|
|
|
145
137
|
|
|
146
138
|
const organizationApiKey = "YOUR ORGANIZATIONS API KEY";
|
|
147
139
|
const importerId = "YOUR IMPORTER ID";
|
|
148
|
-
const importer = new FuseImporter(
|
|
140
|
+
const importer = new FuseImporter({
|
|
141
|
+
apiToken: organizationApiKey,
|
|
142
|
+
templateSlug: importerId,
|
|
143
|
+
});
|
|
149
144
|
```
|
|
150
145
|
|
|
151
146
|
### FuseImporter Hooks
|
|
@@ -222,9 +217,7 @@ importer.formatRecord = async (record) => {
|
|
|
222
217
|
|
|
223
218
|
// capitalize first letter in first_name
|
|
224
219
|
if (typeof newRecord.first_name === "string") {
|
|
225
|
-
newRecord.first_name =
|
|
226
|
-
newRecord.first_name.charAt(0).toUpperCase() +
|
|
227
|
-
newRecord.first_name.slice(1);
|
|
220
|
+
newRecord.first_name = newRecord.first_name.charAt(0).toUpperCase() + newRecord.first_name.slice(1);
|
|
228
221
|
}
|
|
229
222
|
|
|
230
223
|
return newRecord;
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,26 +1,45 @@
|
|
|
1
|
-
import { ColumnRequiredProps, CustomAction, CustomActionTypes, FieldTypesAsUnion, FormatRecord, ImporterOptions, OnSubmit, OnValidateRecord, Record } from "./types";
|
|
1
|
+
import { ColumnRequiredProps, CustomAction, CustomActionTypes, CustomStyles, FieldTypesAsUnion, FormatRecord, GetSessionToken, ImporterOptions, OnSubmit, OnValidateRecord, Record } from "./types";
|
|
2
2
|
export declare const fuseImporterId = "fuse-importer-root";
|
|
3
3
|
export declare const FUSE_INIT = "fuse_init";
|
|
4
4
|
export declare const IFRAME_READY = "iframe_ready";
|
|
5
|
+
type FuseClientSideTokenParams = {
|
|
6
|
+
importer_slug: string;
|
|
7
|
+
api_key: string;
|
|
8
|
+
metadata?: any;
|
|
9
|
+
};
|
|
10
|
+
type GetSessionTokenFn = () => Promise<string>;
|
|
11
|
+
type GetFuseClientSideToken = (params: FuseClientSideTokenParams) => GetSessionTokenFn;
|
|
12
|
+
export declare const getFuseClientSideToken: GetFuseClientSideToken;
|
|
5
13
|
declare class FuseImporter {
|
|
6
14
|
apiToken: string;
|
|
15
|
+
sessionToken: string;
|
|
7
16
|
templateSlug: string;
|
|
8
17
|
options: ImporterOptions;
|
|
9
18
|
records: Record[];
|
|
19
|
+
customStyles?: CustomStyles;
|
|
20
|
+
constructor();
|
|
10
21
|
constructor(apiToken: string, templateSlug: string, options?: ImporterOptions);
|
|
22
|
+
constructor(params?: {
|
|
23
|
+
apiToken?: string;
|
|
24
|
+
templateSlug?: string;
|
|
25
|
+
options?: ImporterOptions;
|
|
26
|
+
});
|
|
11
27
|
private dynamicColumns;
|
|
12
28
|
private customActions;
|
|
13
29
|
private cleanupIframe;
|
|
14
30
|
formatRecord: FormatRecord;
|
|
15
31
|
onValidateRecord: OnValidateRecord;
|
|
16
32
|
onSubmit: OnSubmit;
|
|
33
|
+
getSessionToken: GetSessionToken;
|
|
17
34
|
onClose: () => void;
|
|
18
35
|
private windowScrollPosition;
|
|
19
36
|
close(): void;
|
|
20
|
-
mountFuseWebappIframe(): void
|
|
37
|
+
mountFuseWebappIframe(): Promise<void>;
|
|
21
38
|
show(): Promise<void>;
|
|
22
39
|
addColumn<T extends FieldTypesAsUnion>(columnData: ColumnRequiredProps<T>): void;
|
|
23
40
|
addCustomAction<T extends CustomActionTypes>(actions: CustomAction<T>[] | CustomAction<T>): void;
|
|
41
|
+
setCustomStyles(customStyles: CustomStyles): void;
|
|
42
|
+
static getFuseClientSideToken: GetFuseClientSideToken;
|
|
24
43
|
}
|
|
25
44
|
export * from "./types";
|
|
26
45
|
export default FuseImporter;
|
package/lib/esm/index.js
CHANGED
|
@@ -48,16 +48,60 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
export var fuseImporterId = "fuse-importer-root";
|
|
49
49
|
export var FUSE_INIT = "fuse_init";
|
|
50
50
|
export var IFRAME_READY = "iframe_ready";
|
|
51
|
-
var defaultImporterHost = "https://embed.
|
|
51
|
+
var defaultImporterHost = "https://embed-staging.swovo.com";
|
|
52
|
+
var isBrowser = typeof window !== "undefined";
|
|
52
53
|
var originalWarn = console.warn.bind(console.warn);
|
|
53
54
|
console.warn = function (msg) {
|
|
55
|
+
if (!msg)
|
|
56
|
+
return;
|
|
54
57
|
if (msg.includes("Over 200 classes were generated for component"))
|
|
55
58
|
return;
|
|
56
59
|
originalWarn(msg);
|
|
57
60
|
};
|
|
61
|
+
export var getFuseClientSideToken = function (_a) {
|
|
62
|
+
var importer_slug = _a.importer_slug, api_key = _a.api_key, _b = _a.metadata, metadata = _b === void 0 ? {} : _b;
|
|
63
|
+
var baseUrl = process.env.REACT_APP_CYPRESS === "true" ? "http://localhost:3000" : "https://staging-fuse-aws.swovo.com" || "https://staging-fuse-aws.swovo.com";
|
|
64
|
+
return function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
|
+
var response, data, error_1;
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
switch (_a.label) {
|
|
68
|
+
case 0:
|
|
69
|
+
_a.trys.push([0, 3, , 4]);
|
|
70
|
+
return [4 /*yield*/, fetch("".concat(baseUrl, "/api/v1/importer/sessions"), {
|
|
71
|
+
method: "POST",
|
|
72
|
+
headers: {
|
|
73
|
+
"Content-Type": "application/json",
|
|
74
|
+
},
|
|
75
|
+
body: JSON.stringify({
|
|
76
|
+
api_token: api_key,
|
|
77
|
+
importer_slug: importer_slug,
|
|
78
|
+
metadata: metadata,
|
|
79
|
+
}),
|
|
80
|
+
})];
|
|
81
|
+
case 1:
|
|
82
|
+
response = _a.sent();
|
|
83
|
+
if (!response.ok) {
|
|
84
|
+
throw new Error("HTTP error! status: ".concat(response.status));
|
|
85
|
+
}
|
|
86
|
+
return [4 /*yield*/, response.json()];
|
|
87
|
+
case 2:
|
|
88
|
+
data = _a.sent();
|
|
89
|
+
return [2 /*return*/, data.token];
|
|
90
|
+
case 3:
|
|
91
|
+
error_1 = _a.sent();
|
|
92
|
+
console.error("Failed to fetch session token:", error_1);
|
|
93
|
+
throw error_1;
|
|
94
|
+
case 4: return [2 /*return*/];
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}); };
|
|
98
|
+
};
|
|
99
|
+
if (typeof process === "undefined") {
|
|
100
|
+
var process_1 = { env: {} };
|
|
101
|
+
window.process = process_1;
|
|
102
|
+
}
|
|
58
103
|
var FuseImporter = /** @class */ (function () {
|
|
59
|
-
function FuseImporter(
|
|
60
|
-
if (options === void 0) { options = {}; }
|
|
104
|
+
function FuseImporter(arg1, arg2, arg3) {
|
|
61
105
|
this.dynamicColumns = [];
|
|
62
106
|
this.customActions = [];
|
|
63
107
|
this.cleanupIframe = null;
|
|
@@ -65,9 +109,29 @@ var FuseImporter = /** @class */ (function () {
|
|
|
65
109
|
x: 0,
|
|
66
110
|
y: 0,
|
|
67
111
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
112
|
+
var defaultOptions = {
|
|
113
|
+
env: "production",
|
|
114
|
+
zIndex: 1000,
|
|
115
|
+
batchValidationDelayMs: 500,
|
|
116
|
+
};
|
|
117
|
+
if (typeof arg1 === "string") {
|
|
118
|
+
this.apiToken = arg1;
|
|
119
|
+
this.templateSlug = arg2;
|
|
120
|
+
this.options = __assign(__assign({}, defaultOptions), arg3);
|
|
121
|
+
}
|
|
122
|
+
else if (typeof arg1 === "object" && arg1 !== null) {
|
|
123
|
+
this.apiToken = arg1.apiToken;
|
|
124
|
+
this.templateSlug = arg1.templateSlug;
|
|
125
|
+
this.options = __assign(__assign({}, defaultOptions), arg1.options);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
// No arguments provided
|
|
129
|
+
this.apiToken = undefined;
|
|
130
|
+
this.templateSlug = undefined;
|
|
131
|
+
this.options = defaultOptions;
|
|
132
|
+
}
|
|
133
|
+
if (!isBrowser)
|
|
134
|
+
return;
|
|
71
135
|
this.options.host = defaultImporterHost;
|
|
72
136
|
if (process.env.REACT_APP_IMPORTER_HOST) {
|
|
73
137
|
this.options.host = process.env.REACT_APP_IMPORTER_HOST;
|
|
@@ -75,9 +139,12 @@ var FuseImporter = /** @class */ (function () {
|
|
|
75
139
|
if (process.env.REACT_APP_CYPRESS) {
|
|
76
140
|
this.options.host = "http://localhost:3000/cypress-test/importer-embed";
|
|
77
141
|
}
|
|
142
|
+
this.sessionToken = undefined;
|
|
78
143
|
}
|
|
79
144
|
FuseImporter.prototype.close = function () {
|
|
80
145
|
var _a;
|
|
146
|
+
if (!isBrowser)
|
|
147
|
+
return;
|
|
81
148
|
(_a = this.onClose) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
82
149
|
if (this.cleanupIframe) {
|
|
83
150
|
this.cleanupIframe();
|
|
@@ -90,97 +157,136 @@ var FuseImporter = /** @class */ (function () {
|
|
|
90
157
|
window.scrollTo(this.windowScrollPosition.x, this.windowScrollPosition.y);
|
|
91
158
|
};
|
|
92
159
|
FuseImporter.prototype.mountFuseWebappIframe = function () {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
160
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
161
|
+
var iframe, spinner, _a, error_2, configureIframeActions, configureIframeInit;
|
|
162
|
+
var _this = this;
|
|
163
|
+
return __generator(this, function (_b) {
|
|
164
|
+
switch (_b.label) {
|
|
165
|
+
case 0:
|
|
166
|
+
if (!isBrowser)
|
|
167
|
+
return [2 /*return*/];
|
|
168
|
+
iframe = document.createElement("iframe");
|
|
169
|
+
iframe.setAttribute("id", fuseImporterId);
|
|
170
|
+
iframe.style.cssText = "border: none; width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 1000;";
|
|
171
|
+
iframe.setAttribute("allow", "clipboard-write");
|
|
172
|
+
iframe.src = "".concat(this.options.host);
|
|
173
|
+
spinner = document.createElement("div");
|
|
174
|
+
spinner.innerHTML = spinnerHTML;
|
|
175
|
+
document.body.appendChild(spinner);
|
|
176
|
+
if (!this.getSessionToken) return [3 /*break*/, 4];
|
|
177
|
+
_b.label = 1;
|
|
178
|
+
case 1:
|
|
179
|
+
_b.trys.push([1, 3, , 4]);
|
|
180
|
+
_a = this;
|
|
181
|
+
return [4 /*yield*/, this.getSessionToken()];
|
|
182
|
+
case 2:
|
|
183
|
+
_a.sessionToken = _b.sent();
|
|
184
|
+
return [3 /*break*/, 4];
|
|
185
|
+
case 3:
|
|
186
|
+
error_2 = _b.sent();
|
|
187
|
+
console.error("Failed to get session token", error_2);
|
|
188
|
+
return [3 /*break*/, 4];
|
|
189
|
+
case 4:
|
|
190
|
+
iframe.onload = function () {
|
|
191
|
+
spinner.remove();
|
|
192
|
+
};
|
|
193
|
+
configureIframeActions = function () {
|
|
194
|
+
var iframeMesageHandler = function (message) { return __awaiter(_this, void 0, void 0, function () {
|
|
195
|
+
var _a, type, id, payload, actions, response;
|
|
196
|
+
var _this = this;
|
|
197
|
+
var _b;
|
|
198
|
+
return __generator(this, function (_c) {
|
|
199
|
+
switch (_c.label) {
|
|
200
|
+
case 0:
|
|
201
|
+
_a = message.data, type = _a.type, id = _a.id, payload = _a.payload;
|
|
202
|
+
actions = {
|
|
203
|
+
onSubmit: this.onSubmit,
|
|
204
|
+
onValidateRecord: this.onValidateRecord,
|
|
205
|
+
formatRecord: this.formatRecord,
|
|
206
|
+
customAction: function (index, record) { return __awaiter(_this, void 0, void 0, function () {
|
|
207
|
+
return __generator(this, function (_a) {
|
|
208
|
+
switch (_a.label) {
|
|
209
|
+
case 0: return [4 /*yield*/, this.customActions[index].handler(record)];
|
|
210
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
}); },
|
|
214
|
+
onClose: function () {
|
|
215
|
+
window.removeEventListener("message", iframeMesageHandler, false);
|
|
216
|
+
_this.close();
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
if (!actions[type]) return [3 /*break*/, 2];
|
|
220
|
+
return [4 /*yield*/, actions[type].apply(actions, payload)];
|
|
221
|
+
case 1:
|
|
222
|
+
response = _c.sent();
|
|
223
|
+
(_b = iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) === null || _b === void 0 ? void 0 : _b.postMessage({ type: type, id: id, payload: response }, "*");
|
|
224
|
+
_c.label = 2;
|
|
225
|
+
case 2: return [2 /*return*/];
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}); };
|
|
229
|
+
window.addEventListener("message", iframeMesageHandler, false);
|
|
230
|
+
};
|
|
231
|
+
configureIframeInit = function () {
|
|
232
|
+
var iframeMesageHandler = function (message) { return __awaiter(_this, void 0, void 0, function () {
|
|
233
|
+
var type;
|
|
234
|
+
var _a, _b;
|
|
235
|
+
return __generator(this, function (_c) {
|
|
236
|
+
type = message.data.type;
|
|
237
|
+
if (type === IFRAME_READY) {
|
|
238
|
+
(_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
|
|
239
|
+
type: FUSE_INIT,
|
|
240
|
+
payload: {
|
|
241
|
+
sessionToken: this.sessionToken,
|
|
242
|
+
apiToken: this.apiToken,
|
|
243
|
+
templateSlug: this.templateSlug,
|
|
244
|
+
options: this.options,
|
|
245
|
+
dynamicColumns: this.dynamicColumns,
|
|
246
|
+
hasFormatRecord: this.formatRecord !== undefined,
|
|
247
|
+
hasOnValidateRecord: this.onValidateRecord !== undefined,
|
|
248
|
+
hasOnSubmit: this.onSubmit !== undefined,
|
|
249
|
+
customActions: (_b = this.customActions) === null || _b === void 0 ? void 0 : _b.map(function (ca) { return ({
|
|
250
|
+
name: ca.name,
|
|
251
|
+
actionType: ca.actionType,
|
|
252
|
+
}); }),
|
|
253
|
+
customStyles: this.customStyles,
|
|
254
|
+
},
|
|
255
|
+
}, "*");
|
|
256
|
+
}
|
|
257
|
+
return [2 /*return*/];
|
|
258
|
+
});
|
|
259
|
+
}); };
|
|
260
|
+
window.addEventListener("message", iframeMesageHandler, false);
|
|
261
|
+
};
|
|
262
|
+
configureIframeActions();
|
|
263
|
+
configureIframeInit();
|
|
264
|
+
document.body.appendChild(iframe);
|
|
265
|
+
return [2 /*return*/];
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
});
|
|
170
269
|
};
|
|
171
270
|
FuseImporter.prototype.show = function () {
|
|
172
271
|
return __awaiter(this, void 0, void 0, function () {
|
|
173
272
|
return __generator(this, function (_a) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
273
|
+
switch (_a.label) {
|
|
274
|
+
case 0:
|
|
275
|
+
if (!isBrowser)
|
|
276
|
+
return [2 /*return*/];
|
|
277
|
+
// saves the position of the page before the importer was opened
|
|
278
|
+
this.windowScrollPosition = {
|
|
279
|
+
x: window.scrollX,
|
|
280
|
+
y: window.scrollY,
|
|
281
|
+
};
|
|
282
|
+
// block the scroll when opening the importer
|
|
283
|
+
window.scrollTo(0, 0);
|
|
284
|
+
document.body.style.overflow = "hidden";
|
|
285
|
+
return [4 /*yield*/, this.mountFuseWebappIframe()];
|
|
286
|
+
case 1:
|
|
287
|
+
_a.sent();
|
|
288
|
+
return [2 /*return*/];
|
|
289
|
+
}
|
|
184
290
|
});
|
|
185
291
|
});
|
|
186
292
|
};
|
|
@@ -193,8 +299,13 @@ var FuseImporter = /** @class */ (function () {
|
|
|
193
299
|
actions = [actions];
|
|
194
300
|
(_a = this.customActions).push.apply(_a, actions);
|
|
195
301
|
};
|
|
302
|
+
FuseImporter.prototype.setCustomStyles = function (customStyles) {
|
|
303
|
+
this.customStyles = customStyles;
|
|
304
|
+
};
|
|
305
|
+
FuseImporter.getFuseClientSideToken = getFuseClientSideToken;
|
|
196
306
|
return FuseImporter;
|
|
197
307
|
}());
|
|
198
308
|
export * from "./types";
|
|
199
309
|
export default FuseImporter;
|
|
310
|
+
var spinnerHTML = "\n<div style=\"position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.6); z-index: 1050; display: flex; justify-content: center; align-items: center;\">\n <div style=\"width: 70px; display: flex; justify-content: space-between;\">\n <div style=\" margin: 0 5px 0 5px; width: 12px; height: 12px; background-color: #CAC4BF; border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; animation-delay: -0.32s;\"></div>\n <div style=\" margin: 0 5px 0 5px; width: 12px; height: 12px; background-color: #CAC4BF; border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; animation-delay: -0.16s;\"></div>\n <div style=\"margin: 0 5px 0 5px; width: 12px; height: 12px; background-color: #CAC4BF; border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both;\"></div>\n </div>\n</div>\n<style>\n @keyframes bounce {\n 0%, 80%, 100% { transform: scale(0); }\n 40% { transform: scale(1.0); }\n }\n</style>\n";
|
|
200
311
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAM,CAAC,IAAM,cAAc,GAAG,oBAAoB,CAAC;AACnD,MAAM,CAAC,IAAM,SAAS,GAAG,WAAW,CAAC;AACrC,MAAM,CAAC,IAAM,YAAY,GAAG,cAAc,CAAC;AAC3C,IAAM,mBAAmB,GAAG,iCAAiC,CAAC;AAE9D,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;AAChD,IAAM,YAAY,GAAG,OA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d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
declare const EnvironmentTypes: readonly ["local", "production", "staging"];
|
|
2
2
|
export type ImporterStylePreferences = {
|
|
3
|
-
id
|
|
4
|
-
background
|
|
5
|
-
highlight1
|
|
6
|
-
highlight2
|
|
7
|
-
primary_color
|
|
8
|
-
secondary_color
|
|
9
|
-
logo_url
|
|
3
|
+
id?: number;
|
|
4
|
+
background?: string;
|
|
5
|
+
highlight1?: string;
|
|
6
|
+
highlight2?: string;
|
|
7
|
+
primary_color?: string;
|
|
8
|
+
secondary_color?: string;
|
|
9
|
+
logo_url?: string;
|
|
10
|
+
};
|
|
11
|
+
export type CustomStyles = {
|
|
12
|
+
colors?: {
|
|
13
|
+
primaryColor?: string;
|
|
14
|
+
secondaryColor?: string;
|
|
15
|
+
borderColor?: string;
|
|
16
|
+
contentColor?: string;
|
|
17
|
+
backgroundColor?: string;
|
|
18
|
+
};
|
|
19
|
+
logoURL?: string;
|
|
10
20
|
};
|
|
11
21
|
export type EnvironmentType = typeof EnvironmentTypes[number];
|
|
12
22
|
export type SpreadsheetOptions = {
|
|
@@ -19,13 +29,13 @@ export type ImporterOptions = {
|
|
|
19
29
|
zIndex?: number;
|
|
20
30
|
env?: EnvironmentType;
|
|
21
31
|
previewMode?: boolean;
|
|
22
|
-
loadingComponent?: () => JSX.Element;
|
|
23
32
|
disableSubmitIfInvalid?: boolean;
|
|
24
33
|
records?: Record[];
|
|
25
34
|
language?: string;
|
|
26
35
|
host?: string;
|
|
27
36
|
modal?: boolean;
|
|
28
37
|
cypress?: boolean;
|
|
38
|
+
trackUploadedRecords?: boolean;
|
|
29
39
|
} & SpreadsheetOptions;
|
|
30
40
|
export declare enum FieldTypes {
|
|
31
41
|
boolean = "boolean",
|
|
@@ -85,6 +95,7 @@ export type CalculateColumnCount = (oldErrors: ValidationErrors, newErrors: Vali
|
|
|
85
95
|
export type TransformedObj = {
|
|
86
96
|
original: any;
|
|
87
97
|
transformed: any;
|
|
98
|
+
parsedDate?: Date;
|
|
88
99
|
};
|
|
89
100
|
export type TransformedRecord = {
|
|
90
101
|
[recordName: string]: TransformedObj;
|
|
@@ -95,6 +106,7 @@ export type AppResponse = {
|
|
|
95
106
|
message?: string;
|
|
96
107
|
};
|
|
97
108
|
export type OnSubmit = (reviewedData: Record[]) => Promise<AppResponse>;
|
|
109
|
+
export type GetSessionToken = () => Promise<string>;
|
|
98
110
|
export type ValidationOptionKeys = "pattern" | "max_length" | "min_length" | "length" | "min" | "max" | "less_than" | "before_date" | "greater_than" | "after_date";
|
|
99
111
|
export declare const validationTypesBase: readonly ["cannot_contain", "contain", "max_length", "min_length", "length_exactly", "unique_case_sensitive", "unique_case_insensitive", "regex", "integer", "less_than", "greater_than", "even", "odd", "float", "email", "url", "boolean", "before_date", "after_date"];
|
|
100
112
|
export declare const mutableValidationTypes: ("boolean" | "max_length" | "min_length" | "less_than" | "before_date" | "greater_than" | "after_date" | "cannot_contain" | "contain" | "length_exactly" | "unique_case_sensitive" | "unique_case_insensitive" | "regex" | "integer" | "even" | "odd" | "float" | "email" | "url")[];
|
|
@@ -124,6 +136,7 @@ export type TemplateHeader = {
|
|
|
124
136
|
required: boolean;
|
|
125
137
|
unique: boolean;
|
|
126
138
|
column_type: string;
|
|
139
|
+
description?: string;
|
|
127
140
|
internal_key: string;
|
|
128
141
|
values: string[];
|
|
129
142
|
pattern: string;
|
|
@@ -159,8 +172,9 @@ export type Integration = {
|
|
|
159
172
|
provider: string;
|
|
160
173
|
};
|
|
161
174
|
export type ColumnMapping = {
|
|
162
|
-
|
|
175
|
+
matched_column_names: string[];
|
|
163
176
|
template_column_name: string;
|
|
177
|
+
delimiter: string;
|
|
164
178
|
id?: number;
|
|
165
179
|
};
|
|
166
180
|
export type ValueMapping = {
|
|
@@ -180,6 +194,7 @@ export type TemplateInfo = {
|
|
|
180
194
|
export type Field = {
|
|
181
195
|
name: string;
|
|
182
196
|
label: string;
|
|
197
|
+
description?: string;
|
|
183
198
|
type: FieldTypes;
|
|
184
199
|
isRequired?: boolean;
|
|
185
200
|
options?: any;
|
|
@@ -191,6 +206,7 @@ export type ColumnRequiredProps<T extends FieldTypesAsUnion> = Partial<Pick<Temp
|
|
|
191
206
|
internal_key: string;
|
|
192
207
|
label: string;
|
|
193
208
|
column_type: T;
|
|
209
|
+
description?: string;
|
|
194
210
|
required: boolean;
|
|
195
211
|
validations?: ColumnValidations<T>[];
|
|
196
212
|
transformations?: ColumnTransformations<T>[];
|
package/lib/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,CAAU,CAAC;AA6CrE,MAAM,CAAN,IAAY,UAWX;AAXD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,mCAAqB,CAAA;IACrB,2BAAa,CAAA;AACf,CAAC,EAXW,UAAU,KAAV,UAAU,QAWrB;AA0FD,MAAM,CAAC,IAAM,mBAAmB,GAAG;IACjC,gBAAgB;IAChB,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,uBAAuB;IACvB,yBAAyB;IACzB,OAAO;IACP,SAAS;IACT,WAAW;IACX,cAAc;IACd,MAAM;IACN,KAAK;IACL,OAAO;IACP,OAAO;IACP,KAAK;IACL,SAAS;IACT,aAAa;IACb,YAAY;CACJ,CAAC;AAEX,MAAM,CAAC,IAAM,sBAAsB,qBAAO,mBAAmB,OAAC,CAAC;AAM/D,MAAM,CAAC,IAAM,uBAAuB,GAAG;IACrC,eAAe;IACf,YAAY;IACZ,WAAW;IACX,WAAW;IACX,iBAAiB;IACjB,YAAY;IACZ,QAAQ;IACR,oBAAoB;IACpB,OAAO;IACP,OAAO;IACP,SAAS;CACD,CAAC;AAEX,MAAM,CAAC,IAAM,0BAA0B,qBAAO,uBAAuB,OAAC,CAAC"}
|
package/lib/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var FuseImporter;(()=>{"use strict";var e={d:(n,a)=>{for(var _ in a)e.o(a,_)&&!e.o(n,_)&&Object.defineProperty(n,_,{enumerable:!0,get:a[_]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},n={};(()=>{e.d(n,{default:()=>t});var a,_=function(e,n,a){if(a||2===arguments.length)for(var _,s=0,r=n.length;s<r;s++)!_&&s in n||(_||(_=Array.prototype.slice.call(n,0,s)),_[s]=n[s]);return e.concat(_||Array.prototype.slice.call(n))};!function(e){e.boolean="boolean",e.integer="integer",e.float="float",e.string="string",e.email="email",e.enum="enum",e.url="url",e.date="date",e.datetime="datetime",e.time="time"}(a||(a={}));_([],["cannot_contain","contain","max_length","min_length","length_exactly","unique_case_sensitive","unique_case_insensitive","regex","integer","less_than","greater_than","even","odd","float","email","url","boolean","before_date","after_date"],!0),_([],["sentence_case","capitalize","uppercase","lowercase","trim_whitespace","autoformat","prefix","number_of_decimals","round","floor","ceiling"],!0);var s=function(){return s=Object.assign||function(e){for(var n,a=1,_=arguments.length;a<_;a++)for(var s in n=arguments[a])Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s]);return e},s.apply(this,arguments)},r=function(e,n,a,_){return new(a||(a=Promise))((function(s,r){function p(e){try{c(_.next(e))}catch(e){r(e)}}function i(e){try{c(_.throw(e))}catch(e){r(e)}}function c(e){var n;e.done?s(e.value):(n=e.value,n instanceof a?n:new a((function(e){e(n)}))).then(p,i)}c((_=_.apply(e,n||[])).next())}))},p=function(e,n){var a,_,s,r,p={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function i(i){return function(c){return function(i){if(a)throw new TypeError("Generator is already executing.");for(;r&&(r=0,i[0]&&(p=0)),p;)try{if(a=1,_&&(s=2&i[0]?_.return:i[0]?_.throw||((s=_.return)&&s.call(_),0):_.next)&&!(s=s.call(_,i[1])).done)return s;switch(_=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return p.label++,{value:i[1],done:!1};case 5:p.label++,_=i[1],i=[0];continue;case 7:i=p.ops.pop(),p.trys.pop();continue;default:if(!(s=p.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){p=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){p.label=i[1];break}if(6===i[0]&&p.label<s[1]){p.label=s[1],s=i;break}if(s&&p.label<s[2]){p.label=s[2],p.ops.push(i);break}s[2]&&p.ops.pop(),p.trys.pop();continue}i=n.call(e,p)}catch(e){i=[6,e],_=0}finally{a=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},i="fuse-importer-root",c=console.warn.bind(console.warn);console.warn=function(e){e.includes("Over 200 classes were generated for component")||c(e)};const t=function(){function e(e,n,a){void 0===a&&(a={}),this.dynamicColumns=[],this.customActions=[],this.cleanupIframe=null,this.windowScrollPosition={x:0,y:0},this.apiToken=e,this.templateSlug=n,this.options=s({env:"production",zIndex:1e3,batchValidationDelayMs:500},a),this.options.host="https://embed.flatirons.com",{NVM_INC:"/Users/barrazac/.nvm/versions/node/v16.20.1/include/node",MANPATH:"/Users/barrazac/.nvm/versions/node/v16.20.1/share/man:/opt/homebrew/share/man::",npm_package_devDependencies_prettier:"2.0.5",npm_package_dependencies_webpack_cli:"^5.1.4",rvm_use_flag:"",npm_package_scripts_cypress_test:"REACT_APP_CYPRESS=true TZ=America/New_York node_modules/cypress/bin/cypress run",rvm_bin_path:"/Users/barrazac/.rvm/bin",TERM_PROGRAM:"Apple_Terminal",NODE:"/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node",npm_package_scripts_watch_importer:"yarn workspace fuse-importer watch",INIT_CWD:"/Users/barrazac/Documents/workspaces/fl/fuse",rvm_ruby_alias:"",rvm_quiet_flag:"",NVM_CD_FLAGS:"-q",npm_package_dependencies_axios:"^0.21.4",npm_config_version_git_tag:"true",npm_package_devDependencies_typescript:"^4.3.2",npm_package_devDependencies_terser_webpack_plugin:"^5.1.2",rvm_gemstone_url:"",TERM:"xterm-256color",SHELL:"/bin/zsh",npm_package_devDependencies_smtp_tester:"2.0.1",npm_package_dependencies__rails_ujs:"^6.0.0",npm_package_devDependencies_jest:"^28.1.3",npm_package_dependencies__rails_activestorage:"^6.0.0",rvm_docs_type:"",HOMEBREW_REPOSITORY:"/opt/homebrew",TMPDIR:"/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/",npm_package_devDependencies_eslint_plugin_jest:"^24.1.3",npm_package_devDependencies_babel:"^6.23.0",npm_package_scripts_translate:"node ./scripts/translate.js",npm_package_scripts_lint:"yarn --cwd ui eslint --ext tsx,.js ./src",npm_config_init_license:"MIT",TERM_PROGRAM_VERSION:"453",npm_package_devDependencies_babel_core:"^6.26.3",npm_package_scripts_rails_e2e:"yarn rails:e2e:migrate && yarn rails:e2e:seed && yarn rails:e2e:server",npm_package_scripts_rails_e2e_seed:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e rails db:seed && SECRET_KEY_BASE=e2e RAILS_ENV=e2e bundle exec rake fuse:e2e",npm_package_dependencies__rails_webpacker:"5.4.3",npm_package_husky_hooks_pre_push:"bundle exec rspec && bundle exec rubocop",npm_package_scripts_dev:"webpack-dev-server --open --watch-files src",rvm_hook:"",TERM_SESSION_ID:"B30D3132-C74A-43A6-8218-4570D3443BEA",npm_package_scripts_heroku_postbuild:"yarn build && yarn deploy",npm_package_scripts_embed:"yarn workspace embed start",npm_package_devDependencies__types_cypress:"^1.1.3",npm_package_private:"false",npm_config_registry:"https://registry.yarnpkg.com",LC_ALL:"en_US.UTF-8",OBJC_DISABLE_INITIALIZE_FORK_SAFETY:"YES",npm_package_readmeFilename:"README.md",npm_package_dependencies_xlsx:"^0.18.5",NVM_DIR:"/Users/barrazac/.nvm",USER:"barrazac",npm_package_description:"Flatirons Fuse is a customizable and powerful CSV Importer that works with all front-end languages",npm_package_devDependencies_webpack:"^5.38.0",rvm_user_flag:"",rvm_gemstone_package_file:"",npm_package_devDependencies_webpack_cli:"^4.9.1",npm_package_devDependencies_dotenv:"^16.0.3",npm_package_scripts_build_esm:"tsc",npm_package_scripts_test_fuse_importer:"yarn workspace fuse-importer test",npm_package_scripts_deploy:"cp -a ui/webapp/build/. public/",npm_package_scripts_publish_importer:"yarn workspace fuse-importer publish",npm_package_browserslist_development_1:"last 1 firefox version",rvm_path:"/Users/barrazac/.rvm",npm_package_scripts_webapp:"yarn workspace webapp start",npm_package_devDependencies_webpack_dev_server:"^4.4.0",npm_package_browserslist_development_0:"last 1 chrome version",SSH_AUTH_SOCK:"/private/tmp/com.apple.launchd.0HeTkD1jGW/Listeners",npm_package_devDependencies_babel_loader:"^9.1.3",npm_package_scripts_build_webapp:"yarn workspace webapp build",npm_package_devDependencies__types_testing_library__jest_dom:"^5.14.5",__CF_USER_TEXT_ENCODING:"0x1F6:0x0:0x0",npm_package_devDependencies_eslint:"7.32.0",npm_package_devDependencies__types_jest:"^28.1.7",npm_package_browserslist_development_2:"last 1 safari version",rvm_proxy:"",npm_execpath:"/opt/homebrew/Cellar/yarn/1.22.19/libexec/bin/yarn.js",npm_package_devDependencies__typescript_eslint_eslint_plugin:"^4.5.0",npm_package_husky_hooks_pre_commit:"yarn --cwd ui pretty-quick --staged",rvm_ruby_file:"",npm_package_module:"./lib/esm/index.js",rvm_sticky_flag:"",npm_package_devDependencies_eslint_plugin_prettier:"^4.2.1",npm_package_scripts_build_importer:"yarn workspace fuse-importer build",rvm_silent_flag:"",rvm_prefix:"/Users/barrazac",npm_package_devDependencies__typescript_eslint_parser:"^4.5.0",rvm_ruby_make:"",PATH:"/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/yarn--1711647706482-0.7694833787153028:/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer/node_modules/.bin:/Users/barrazac/.config/yarn/link/node_modules/.bin:/Users/barrazac/.nvm/versions/node/v16.20.1/libexec/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node_modules/npm/bin/node-gyp-bin:/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/yarn--1711647706237-0.6400049987403442:/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer/node_modules/.bin:/Users/barrazac/.config/yarn/link/node_modules/.bin:/Users/barrazac/.nvm/versions/node/v16.20.1/libexec/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node_modules/npm/bin/node-gyp-bin:/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/yarn--1711647705807-0.041733996543643626:/Users/barrazac/Documents/workspaces/fl/fuse/node_modules/.bin:/Users/barrazac/.config/yarn/link/node_modules/.bin:/Users/barrazac/Documents/workspaces/fl/fuse/node_modules/.bin:/Users/barrazac/.nvm/versions/node/v16.20.1/libexec/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin:/usr/local/opt/scala/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/path/to/github/cli:/Users/barrazac/.rbenv/shims:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/barrazac/.rvm/bin",npm_config_argv:'{"remain":[],"cooked":["run","build:importer"],"original":["build:importer"]}',npm_package_scripts_lint_fix:"yarn --cwd ui eslint --fix",npm_package_dependencies_webpack:"^5.88.2",_:"/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer/node_modules/.bin/webpack",LaunchInstanceID:"C558FA89-B70C-4853-A1B4-CC1E364DF423",__CFBundleIdentifier:"com.apple.Terminal",npm_package_devDependencies_ts_jest:"^28.0.8",npm_package_browserslist_production_1:"not dead",PWD:"/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer",npm_package_devDependencies_cypress:"13.0.0",npm_package_browserslist_production_0:">0.2%",JAVA_HOME:"/Users/barrazac/Library/Java/JavaVirtualMachines/openjdk-20.0.1/Contents/Home",npm_package_devDependencies_eslint_plugin_testing_library:"^4.3.0",npm_package_scripts_test_watch:"yarn test --watch",npm_lifecycle_event:"build:umd",npm_package_browserslist_production_2:"not op_mini all",LANG:"en_US.UTF-8",rvm_system_flag:"",rvm_sdk:"",npm_package_name:"fuse-importer",npm_package_exclude_0:"src/*",npm_package_types:"./lib/esm/index.d.ts",npm_package_devDependencies_eslint_plugin_import:"^2.22.1",npm_package_scripts_watch_shared:"yarn workspace shared watch",npm_package_dependencies_body_parser:"^1.20.2",npm_package_exclude_1:"**/node_modules",npm_package_devDependencies__faker_js_faker:"^7.3.0",npm_package_scripts_build:"rm -rf lib && yarn build:umd && yarn build:esm",npm_package_scripts_start:"yarn watch:importer & yarn watch:shared & yarn webapp & yarn embed",npm_config_version_commit_hooks:"true",npm_package_devDependencies__types_actioncable:"^5.2.11",XPC_FLAGS:"0x0",npm_package_devDependencies_ts_loader:"^9.2.2",npm_package_resolutions_react_error_overlay:"6.0.9",npm_package_devDependencies_pretty_quick:"^3.1.3",npm_package_devDependencies_eslint_config_react_app:"^6.0.0",npm_package_scripts_rails_e2e_migrate:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e rails db:migrate",npm_config_bin_links:"true",NODE_ENV:"production",npm_package_engines_node:">=16.0.0",npm_config_wrap_output:"",npm_package_devDependencies_eslint_config_prettier:"^8.6.0",npm_package_scripts_pretty:"yarn --cwd ui pretty-quick",npm_package_scripts_build_shared:"yarn workspace shared build",npm_package_main:"./lib/main.js",XPC_SERVICE_NAME:"0",npm_package_version:"1.0.0-testing",npm_package_scripts_watch:"tsc -w",rvm_version:"1.29.12 (latest)",rvm_script_name:"",rvm_pretty_print_flag:"auto",HOME:"/Users/barrazac",SHLVL:"4",rvm_ruby_mode:"",npm_package_scripts_test:"jest",npm_package_devDependencies_prettier_eslint:"^11.0.0",npm_config_save_prefix:"^",npm_config_strict_ssl:"true",HOMEBREW_PREFIX:"/opt/homebrew",npm_package_devDependencies_husky:"^4.3.0",npm_package_scripts_rails_e2e_server:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e bundle exec rails s --port 3001",npm_package_scripts_build_embed:"yarn workspace embed build",npm_config_version_git_message:"v%s",LOGNAME:"barrazac",YARN_WRAP_OUTPUT:"false",npm_package_devDependencies_html_webpack_plugin:"^5.5.0",npm_package_scripts_test_coverage:"yarn test --coverage",PREFIX:"/opt/homebrew",rvm_alias_expanded:"",npm_lifecycle_script:"NODE_ENV=production webpack",npm_package_devDependencies_eslint_plugin_json:"^2.1.2",npm_package_devDependencies_cypress_real_events:"^1.11.0",LC_CTYPE:"UTF-8",npm_package_scripts_build_umd:"NODE_ENV=production webpack",QT_SCALE_FACTOR:"1.7",npm_package_devDependencies_jest_canvas_mock:"^2.5.2",NVM_BIN:"/Users/barrazac/.nvm/versions/node/v16.20.1/bin",rvm_nightly_flag:"",rvm_file_name:"",npm_config_version_git_sign:"",npm_config_ignore_scripts:"",npm_config_user_agent:"yarn/1.22.19 npm/? node/v16.20.1 darwin arm64",rvm_ruby_make_install:"",INFOPATH:"/opt/homebrew/share/info:",HOMEBREW_CELLAR:"/opt/homebrew/Cellar",npm_package_scripts_cypress_fuse:"REACT_APP_CYPRESS=true TZ=America/New_York node_modules/cypress/bin/cypress open -C fuse.cypress.config.js --e2e -b chrome",npm_package_devDependencies__types_node:"^12.x",rvm_niceness:"",rvm_delete_flag:"0",npm_package_dependencies_turbolinks:"^5.2.0",npm_package_workspaces_4:"./ui/qa-app",npm_package_devDependencies_jest_environment_jsdom:"^29.7.0",rvm_ruby_bits:"",npm_package_dependencies_express:"^4.18.2",npm_package_dependencies__rails_actioncable:"^6.0.0",npm_package_files_0:"lib",rvm_recommended_ruby:"rvm install ruby-3.1.2",rvm_bin_flag:"",npm_package_workspaces_2:"./ui/shared",npm_config_init_version:"1.0.0",npm_config_ignore_optional:"",rvm_only_path_flag:"",SECURITYSESSIONID:"186b2",npm_package_workspaces_3:"./ui/embed",npm_package_scripts_cypress_fuse_importer:"REACT_APP_CYPRESS=true TZ=America/New_York node_modules/cypress/bin/cypress open -C fuse-importer.cypress.config.js --e2e -b chrome",npm_package_scripts_test_webapp:"yarn workspace webapp test",npm_package_workspaces_0:"./ui/webapp",npm_node_execpath:"/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node",npm_package_devDependencies_eslint_plugin_react:"^7.21.5",npm_package_scripts_sidekiq_e2e:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e bundle exec sidekiq -e e2e -C config/sidekiq.yml",npm_package_workspaces_1:"./ui/fuse-importer",npm_config_version_tag_prefix:"v",npm_package_devDependencies__testing_library_jest_dom:"^5.16.5"}.REACT_APP_IMPORTER_HOST&&(this.options.host={NVM_INC:"/Users/barrazac/.nvm/versions/node/v16.20.1/include/node",MANPATH:"/Users/barrazac/.nvm/versions/node/v16.20.1/share/man:/opt/homebrew/share/man::",npm_package_devDependencies_prettier:"2.0.5",npm_package_dependencies_webpack_cli:"^5.1.4",rvm_use_flag:"",npm_package_scripts_cypress_test:"REACT_APP_CYPRESS=true TZ=America/New_York node_modules/cypress/bin/cypress run",rvm_bin_path:"/Users/barrazac/.rvm/bin",TERM_PROGRAM:"Apple_Terminal",NODE:"/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node",npm_package_scripts_watch_importer:"yarn workspace fuse-importer watch",INIT_CWD:"/Users/barrazac/Documents/workspaces/fl/fuse",rvm_ruby_alias:"",rvm_quiet_flag:"",NVM_CD_FLAGS:"-q",npm_package_dependencies_axios:"^0.21.4",npm_config_version_git_tag:"true",npm_package_devDependencies_typescript:"^4.3.2",npm_package_devDependencies_terser_webpack_plugin:"^5.1.2",rvm_gemstone_url:"",TERM:"xterm-256color",SHELL:"/bin/zsh",npm_package_devDependencies_smtp_tester:"2.0.1",npm_package_dependencies__rails_ujs:"^6.0.0",npm_package_devDependencies_jest:"^28.1.3",npm_package_dependencies__rails_activestorage:"^6.0.0",rvm_docs_type:"",HOMEBREW_REPOSITORY:"/opt/homebrew",TMPDIR:"/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/",npm_package_devDependencies_eslint_plugin_jest:"^24.1.3",npm_package_devDependencies_babel:"^6.23.0",npm_package_scripts_translate:"node ./scripts/translate.js",npm_package_scripts_lint:"yarn --cwd ui eslint --ext tsx,.js ./src",npm_config_init_license:"MIT",TERM_PROGRAM_VERSION:"453",npm_package_devDependencies_babel_core:"^6.26.3",npm_package_scripts_rails_e2e:"yarn rails:e2e:migrate && yarn rails:e2e:seed && yarn rails:e2e:server",npm_package_scripts_rails_e2e_seed:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e rails db:seed && SECRET_KEY_BASE=e2e RAILS_ENV=e2e bundle exec rake fuse:e2e",npm_package_dependencies__rails_webpacker:"5.4.3",npm_package_husky_hooks_pre_push:"bundle exec rspec && bundle exec rubocop",npm_package_scripts_dev:"webpack-dev-server --open --watch-files src",rvm_hook:"",TERM_SESSION_ID:"B30D3132-C74A-43A6-8218-4570D3443BEA",npm_package_scripts_heroku_postbuild:"yarn build && yarn deploy",npm_package_scripts_embed:"yarn workspace embed start",npm_package_devDependencies__types_cypress:"^1.1.3",npm_package_private:"false",npm_config_registry:"https://registry.yarnpkg.com",LC_ALL:"en_US.UTF-8",OBJC_DISABLE_INITIALIZE_FORK_SAFETY:"YES",npm_package_readmeFilename:"README.md",npm_package_dependencies_xlsx:"^0.18.5",NVM_DIR:"/Users/barrazac/.nvm",USER:"barrazac",npm_package_description:"Flatirons Fuse is a customizable and powerful CSV Importer that works with all front-end languages",npm_package_devDependencies_webpack:"^5.38.0",rvm_user_flag:"",rvm_gemstone_package_file:"",npm_package_devDependencies_webpack_cli:"^4.9.1",npm_package_devDependencies_dotenv:"^16.0.3",npm_package_scripts_build_esm:"tsc",npm_package_scripts_test_fuse_importer:"yarn workspace fuse-importer test",npm_package_scripts_deploy:"cp -a ui/webapp/build/. public/",npm_package_scripts_publish_importer:"yarn workspace fuse-importer publish",npm_package_browserslist_development_1:"last 1 firefox version",rvm_path:"/Users/barrazac/.rvm",npm_package_scripts_webapp:"yarn workspace webapp start",npm_package_devDependencies_webpack_dev_server:"^4.4.0",npm_package_browserslist_development_0:"last 1 chrome version",SSH_AUTH_SOCK:"/private/tmp/com.apple.launchd.0HeTkD1jGW/Listeners",npm_package_devDependencies_babel_loader:"^9.1.3",npm_package_scripts_build_webapp:"yarn workspace webapp build",npm_package_devDependencies__types_testing_library__jest_dom:"^5.14.5",__CF_USER_TEXT_ENCODING:"0x1F6:0x0:0x0",npm_package_devDependencies_eslint:"7.32.0",npm_package_devDependencies__types_jest:"^28.1.7",npm_package_browserslist_development_2:"last 1 safari version",rvm_proxy:"",npm_execpath:"/opt/homebrew/Cellar/yarn/1.22.19/libexec/bin/yarn.js",npm_package_devDependencies__typescript_eslint_eslint_plugin:"^4.5.0",npm_package_husky_hooks_pre_commit:"yarn --cwd ui pretty-quick --staged",rvm_ruby_file:"",npm_package_module:"./lib/esm/index.js",rvm_sticky_flag:"",npm_package_devDependencies_eslint_plugin_prettier:"^4.2.1",npm_package_scripts_build_importer:"yarn workspace fuse-importer build",rvm_silent_flag:"",rvm_prefix:"/Users/barrazac",npm_package_devDependencies__typescript_eslint_parser:"^4.5.0",rvm_ruby_make:"",PATH:"/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/yarn--1711647706482-0.7694833787153028:/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer/node_modules/.bin:/Users/barrazac/.config/yarn/link/node_modules/.bin:/Users/barrazac/.nvm/versions/node/v16.20.1/libexec/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node_modules/npm/bin/node-gyp-bin:/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/yarn--1711647706237-0.6400049987403442:/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer/node_modules/.bin:/Users/barrazac/.config/yarn/link/node_modules/.bin:/Users/barrazac/.nvm/versions/node/v16.20.1/libexec/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node_modules/npm/bin/node-gyp-bin:/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/yarn--1711647705807-0.041733996543643626:/Users/barrazac/Documents/workspaces/fl/fuse/node_modules/.bin:/Users/barrazac/.config/yarn/link/node_modules/.bin:/Users/barrazac/Documents/workspaces/fl/fuse/node_modules/.bin:/Users/barrazac/.nvm/versions/node/v16.20.1/libexec/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin:/usr/local/opt/scala/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/path/to/github/cli:/Users/barrazac/.rbenv/shims:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/barrazac/.rvm/bin",npm_config_argv:'{"remain":[],"cooked":["run","build:importer"],"original":["build:importer"]}',npm_package_scripts_lint_fix:"yarn --cwd ui eslint --fix",npm_package_dependencies_webpack:"^5.88.2",_:"/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer/node_modules/.bin/webpack",LaunchInstanceID:"C558FA89-B70C-4853-A1B4-CC1E364DF423",__CFBundleIdentifier:"com.apple.Terminal",npm_package_devDependencies_ts_jest:"^28.0.8",npm_package_browserslist_production_1:"not dead",PWD:"/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer",npm_package_devDependencies_cypress:"13.0.0",npm_package_browserslist_production_0:">0.2%",JAVA_HOME:"/Users/barrazac/Library/Java/JavaVirtualMachines/openjdk-20.0.1/Contents/Home",npm_package_devDependencies_eslint_plugin_testing_library:"^4.3.0",npm_package_scripts_test_watch:"yarn test --watch",npm_lifecycle_event:"build:umd",npm_package_browserslist_production_2:"not op_mini all",LANG:"en_US.UTF-8",rvm_system_flag:"",rvm_sdk:"",npm_package_name:"fuse-importer",npm_package_exclude_0:"src/*",npm_package_types:"./lib/esm/index.d.ts",npm_package_devDependencies_eslint_plugin_import:"^2.22.1",npm_package_scripts_watch_shared:"yarn workspace shared watch",npm_package_dependencies_body_parser:"^1.20.2",npm_package_exclude_1:"**/node_modules",npm_package_devDependencies__faker_js_faker:"^7.3.0",npm_package_scripts_build:"rm -rf lib && yarn build:umd && yarn build:esm",npm_package_scripts_start:"yarn watch:importer & yarn watch:shared & yarn webapp & yarn embed",npm_config_version_commit_hooks:"true",npm_package_devDependencies__types_actioncable:"^5.2.11",XPC_FLAGS:"0x0",npm_package_devDependencies_ts_loader:"^9.2.2",npm_package_resolutions_react_error_overlay:"6.0.9",npm_package_devDependencies_pretty_quick:"^3.1.3",npm_package_devDependencies_eslint_config_react_app:"^6.0.0",npm_package_scripts_rails_e2e_migrate:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e rails db:migrate",npm_config_bin_links:"true",NODE_ENV:"production",npm_package_engines_node:">=16.0.0",npm_config_wrap_output:"",npm_package_devDependencies_eslint_config_prettier:"^8.6.0",npm_package_scripts_pretty:"yarn --cwd ui pretty-quick",npm_package_scripts_build_shared:"yarn workspace shared build",npm_package_main:"./lib/main.js",XPC_SERVICE_NAME:"0",npm_package_version:"1.0.0-testing",npm_package_scripts_watch:"tsc -w",rvm_version:"1.29.12 (latest)",rvm_script_name:"",rvm_pretty_print_flag:"auto",HOME:"/Users/barrazac",SHLVL:"4",rvm_ruby_mode:"",npm_package_scripts_test:"jest",npm_package_devDependencies_prettier_eslint:"^11.0.0",npm_config_save_prefix:"^",npm_config_strict_ssl:"true",HOMEBREW_PREFIX:"/opt/homebrew",npm_package_devDependencies_husky:"^4.3.0",npm_package_scripts_rails_e2e_server:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e bundle exec rails s --port 3001",npm_package_scripts_build_embed:"yarn workspace embed build",npm_config_version_git_message:"v%s",LOGNAME:"barrazac",YARN_WRAP_OUTPUT:"false",npm_package_devDependencies_html_webpack_plugin:"^5.5.0",npm_package_scripts_test_coverage:"yarn test --coverage",PREFIX:"/opt/homebrew",rvm_alias_expanded:"",npm_lifecycle_script:"NODE_ENV=production webpack",npm_package_devDependencies_eslint_plugin_json:"^2.1.2",npm_package_devDependencies_cypress_real_events:"^1.11.0",LC_CTYPE:"UTF-8",npm_package_scripts_build_umd:"NODE_ENV=production webpack",QT_SCALE_FACTOR:"1.7",npm_package_devDependencies_jest_canvas_mock:"^2.5.2",NVM_BIN:"/Users/barrazac/.nvm/versions/node/v16.20.1/bin",rvm_nightly_flag:"",rvm_file_name:"",npm_config_version_git_sign:"",npm_config_ignore_scripts:"",npm_config_user_agent:"yarn/1.22.19 npm/? node/v16.20.1 darwin arm64",rvm_ruby_make_install:"",INFOPATH:"/opt/homebrew/share/info:",HOMEBREW_CELLAR:"/opt/homebrew/Cellar",npm_package_scripts_cypress_fuse:"REACT_APP_CYPRESS=true TZ=America/New_York node_modules/cypress/bin/cypress open -C fuse.cypress.config.js --e2e -b chrome",npm_package_devDependencies__types_node:"^12.x",rvm_niceness:"",rvm_delete_flag:"0",npm_package_dependencies_turbolinks:"^5.2.0",npm_package_workspaces_4:"./ui/qa-app",npm_package_devDependencies_jest_environment_jsdom:"^29.7.0",rvm_ruby_bits:"",npm_package_dependencies_express:"^4.18.2",npm_package_dependencies__rails_actioncable:"^6.0.0",npm_package_files_0:"lib",rvm_recommended_ruby:"rvm install ruby-3.1.2",rvm_bin_flag:"",npm_package_workspaces_2:"./ui/shared",npm_config_init_version:"1.0.0",npm_config_ignore_optional:"",rvm_only_path_flag:"",SECURITYSESSIONID:"186b2",npm_package_workspaces_3:"./ui/embed",npm_package_scripts_cypress_fuse_importer:"REACT_APP_CYPRESS=true TZ=America/New_York node_modules/cypress/bin/cypress open -C fuse-importer.cypress.config.js --e2e -b chrome",npm_package_scripts_test_webapp:"yarn workspace webapp test",npm_package_workspaces_0:"./ui/webapp",npm_node_execpath:"/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node",npm_package_devDependencies_eslint_plugin_react:"^7.21.5",npm_package_scripts_sidekiq_e2e:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e bundle exec sidekiq -e e2e -C config/sidekiq.yml",npm_package_workspaces_1:"./ui/fuse-importer",npm_config_version_tag_prefix:"v",npm_package_devDependencies__testing_library_jest_dom:"^5.16.5"}.REACT_APP_IMPORTER_HOST),{NVM_INC:"/Users/barrazac/.nvm/versions/node/v16.20.1/include/node",MANPATH:"/Users/barrazac/.nvm/versions/node/v16.20.1/share/man:/opt/homebrew/share/man::",npm_package_devDependencies_prettier:"2.0.5",npm_package_dependencies_webpack_cli:"^5.1.4",rvm_use_flag:"",npm_package_scripts_cypress_test:"REACT_APP_CYPRESS=true TZ=America/New_York node_modules/cypress/bin/cypress run",rvm_bin_path:"/Users/barrazac/.rvm/bin",TERM_PROGRAM:"Apple_Terminal",NODE:"/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node",npm_package_scripts_watch_importer:"yarn workspace fuse-importer watch",INIT_CWD:"/Users/barrazac/Documents/workspaces/fl/fuse",rvm_ruby_alias:"",rvm_quiet_flag:"",NVM_CD_FLAGS:"-q",npm_package_dependencies_axios:"^0.21.4",npm_config_version_git_tag:"true",npm_package_devDependencies_typescript:"^4.3.2",npm_package_devDependencies_terser_webpack_plugin:"^5.1.2",rvm_gemstone_url:"",TERM:"xterm-256color",SHELL:"/bin/zsh",npm_package_devDependencies_smtp_tester:"2.0.1",npm_package_dependencies__rails_ujs:"^6.0.0",npm_package_devDependencies_jest:"^28.1.3",npm_package_dependencies__rails_activestorage:"^6.0.0",rvm_docs_type:"",HOMEBREW_REPOSITORY:"/opt/homebrew",TMPDIR:"/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/",npm_package_devDependencies_eslint_plugin_jest:"^24.1.3",npm_package_devDependencies_babel:"^6.23.0",npm_package_scripts_translate:"node ./scripts/translate.js",npm_package_scripts_lint:"yarn --cwd ui eslint --ext tsx,.js ./src",npm_config_init_license:"MIT",TERM_PROGRAM_VERSION:"453",npm_package_devDependencies_babel_core:"^6.26.3",npm_package_scripts_rails_e2e:"yarn rails:e2e:migrate && yarn rails:e2e:seed && yarn rails:e2e:server",npm_package_scripts_rails_e2e_seed:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e rails db:seed && SECRET_KEY_BASE=e2e RAILS_ENV=e2e bundle exec rake fuse:e2e",npm_package_dependencies__rails_webpacker:"5.4.3",npm_package_husky_hooks_pre_push:"bundle exec rspec && bundle exec rubocop",npm_package_scripts_dev:"webpack-dev-server --open --watch-files src",rvm_hook:"",TERM_SESSION_ID:"B30D3132-C74A-43A6-8218-4570D3443BEA",npm_package_scripts_heroku_postbuild:"yarn build && yarn deploy",npm_package_scripts_embed:"yarn workspace embed start",npm_package_devDependencies__types_cypress:"^1.1.3",npm_package_private:"false",npm_config_registry:"https://registry.yarnpkg.com",LC_ALL:"en_US.UTF-8",OBJC_DISABLE_INITIALIZE_FORK_SAFETY:"YES",npm_package_readmeFilename:"README.md",npm_package_dependencies_xlsx:"^0.18.5",NVM_DIR:"/Users/barrazac/.nvm",USER:"barrazac",npm_package_description:"Flatirons Fuse is a customizable and powerful CSV Importer that works with all front-end languages",npm_package_devDependencies_webpack:"^5.38.0",rvm_user_flag:"",rvm_gemstone_package_file:"",npm_package_devDependencies_webpack_cli:"^4.9.1",npm_package_devDependencies_dotenv:"^16.0.3",npm_package_scripts_build_esm:"tsc",npm_package_scripts_test_fuse_importer:"yarn workspace fuse-importer test",npm_package_scripts_deploy:"cp -a ui/webapp/build/. public/",npm_package_scripts_publish_importer:"yarn workspace fuse-importer publish",npm_package_browserslist_development_1:"last 1 firefox version",rvm_path:"/Users/barrazac/.rvm",npm_package_scripts_webapp:"yarn workspace webapp start",npm_package_devDependencies_webpack_dev_server:"^4.4.0",npm_package_browserslist_development_0:"last 1 chrome version",SSH_AUTH_SOCK:"/private/tmp/com.apple.launchd.0HeTkD1jGW/Listeners",npm_package_devDependencies_babel_loader:"^9.1.3",npm_package_scripts_build_webapp:"yarn workspace webapp build",npm_package_devDependencies__types_testing_library__jest_dom:"^5.14.5",__CF_USER_TEXT_ENCODING:"0x1F6:0x0:0x0",npm_package_devDependencies_eslint:"7.32.0",npm_package_devDependencies__types_jest:"^28.1.7",npm_package_browserslist_development_2:"last 1 safari version",rvm_proxy:"",npm_execpath:"/opt/homebrew/Cellar/yarn/1.22.19/libexec/bin/yarn.js",npm_package_devDependencies__typescript_eslint_eslint_plugin:"^4.5.0",npm_package_husky_hooks_pre_commit:"yarn --cwd ui pretty-quick --staged",rvm_ruby_file:"",npm_package_module:"./lib/esm/index.js",rvm_sticky_flag:"",npm_package_devDependencies_eslint_plugin_prettier:"^4.2.1",npm_package_scripts_build_importer:"yarn workspace fuse-importer build",rvm_silent_flag:"",rvm_prefix:"/Users/barrazac",npm_package_devDependencies__typescript_eslint_parser:"^4.5.0",rvm_ruby_make:"",PATH:"/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/yarn--1711647706482-0.7694833787153028:/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer/node_modules/.bin:/Users/barrazac/.config/yarn/link/node_modules/.bin:/Users/barrazac/.nvm/versions/node/v16.20.1/libexec/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node_modules/npm/bin/node-gyp-bin:/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/yarn--1711647706237-0.6400049987403442:/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer/node_modules/.bin:/Users/barrazac/.config/yarn/link/node_modules/.bin:/Users/barrazac/.nvm/versions/node/v16.20.1/libexec/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node_modules/npm/bin/node-gyp-bin:/var/folders/fs/n2wp1wtn6f9g18p78bl9b5940000gp/T/yarn--1711647705807-0.041733996543643626:/Users/barrazac/Documents/workspaces/fl/fuse/node_modules/.bin:/Users/barrazac/.config/yarn/link/node_modules/.bin:/Users/barrazac/Documents/workspaces/fl/fuse/node_modules/.bin:/Users/barrazac/.nvm/versions/node/v16.20.1/libexec/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/lib/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node_modules/npm/bin/node-gyp-bin:/Users/barrazac/.nvm/versions/node/v16.20.1/bin:/usr/local/opt/scala/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/path/to/github/cli:/Users/barrazac/.rbenv/shims:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/barrazac/.rvm/bin",npm_config_argv:'{"remain":[],"cooked":["run","build:importer"],"original":["build:importer"]}',npm_package_scripts_lint_fix:"yarn --cwd ui eslint --fix",npm_package_dependencies_webpack:"^5.88.2",_:"/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer/node_modules/.bin/webpack",LaunchInstanceID:"C558FA89-B70C-4853-A1B4-CC1E364DF423",__CFBundleIdentifier:"com.apple.Terminal",npm_package_devDependencies_ts_jest:"^28.0.8",npm_package_browserslist_production_1:"not dead",PWD:"/Users/barrazac/Documents/workspaces/fl/fuse/ui/fuse-importer",npm_package_devDependencies_cypress:"13.0.0",npm_package_browserslist_production_0:">0.2%",JAVA_HOME:"/Users/barrazac/Library/Java/JavaVirtualMachines/openjdk-20.0.1/Contents/Home",npm_package_devDependencies_eslint_plugin_testing_library:"^4.3.0",npm_package_scripts_test_watch:"yarn test --watch",npm_lifecycle_event:"build:umd",npm_package_browserslist_production_2:"not op_mini all",LANG:"en_US.UTF-8",rvm_system_flag:"",rvm_sdk:"",npm_package_name:"fuse-importer",npm_package_exclude_0:"src/*",npm_package_types:"./lib/esm/index.d.ts",npm_package_devDependencies_eslint_plugin_import:"^2.22.1",npm_package_scripts_watch_shared:"yarn workspace shared watch",npm_package_dependencies_body_parser:"^1.20.2",npm_package_exclude_1:"**/node_modules",npm_package_devDependencies__faker_js_faker:"^7.3.0",npm_package_scripts_build:"rm -rf lib && yarn build:umd && yarn build:esm",npm_package_scripts_start:"yarn watch:importer & yarn watch:shared & yarn webapp & yarn embed",npm_config_version_commit_hooks:"true",npm_package_devDependencies__types_actioncable:"^5.2.11",XPC_FLAGS:"0x0",npm_package_devDependencies_ts_loader:"^9.2.2",npm_package_resolutions_react_error_overlay:"6.0.9",npm_package_devDependencies_pretty_quick:"^3.1.3",npm_package_devDependencies_eslint_config_react_app:"^6.0.0",npm_package_scripts_rails_e2e_migrate:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e rails db:migrate",npm_config_bin_links:"true",NODE_ENV:"production",npm_package_engines_node:">=16.0.0",npm_config_wrap_output:"",npm_package_devDependencies_eslint_config_prettier:"^8.6.0",npm_package_scripts_pretty:"yarn --cwd ui pretty-quick",npm_package_scripts_build_shared:"yarn workspace shared build",npm_package_main:"./lib/main.js",XPC_SERVICE_NAME:"0",npm_package_version:"1.0.0-testing",npm_package_scripts_watch:"tsc -w",rvm_version:"1.29.12 (latest)",rvm_script_name:"",rvm_pretty_print_flag:"auto",HOME:"/Users/barrazac",SHLVL:"4",rvm_ruby_mode:"",npm_package_scripts_test:"jest",npm_package_devDependencies_prettier_eslint:"^11.0.0",npm_config_save_prefix:"^",npm_config_strict_ssl:"true",HOMEBREW_PREFIX:"/opt/homebrew",npm_package_devDependencies_husky:"^4.3.0",npm_package_scripts_rails_e2e_server:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e bundle exec rails s --port 3001",npm_package_scripts_build_embed:"yarn workspace embed build",npm_config_version_git_message:"v%s",LOGNAME:"barrazac",YARN_WRAP_OUTPUT:"false",npm_package_devDependencies_html_webpack_plugin:"^5.5.0",npm_package_scripts_test_coverage:"yarn test --coverage",PREFIX:"/opt/homebrew",rvm_alias_expanded:"",npm_lifecycle_script:"NODE_ENV=production webpack",npm_package_devDependencies_eslint_plugin_json:"^2.1.2",npm_package_devDependencies_cypress_real_events:"^1.11.0",LC_CTYPE:"UTF-8",npm_package_scripts_build_umd:"NODE_ENV=production webpack",QT_SCALE_FACTOR:"1.7",npm_package_devDependencies_jest_canvas_mock:"^2.5.2",NVM_BIN:"/Users/barrazac/.nvm/versions/node/v16.20.1/bin",rvm_nightly_flag:"",rvm_file_name:"",npm_config_version_git_sign:"",npm_config_ignore_scripts:"",npm_config_user_agent:"yarn/1.22.19 npm/? node/v16.20.1 darwin arm64",rvm_ruby_make_install:"",INFOPATH:"/opt/homebrew/share/info:",HOMEBREW_CELLAR:"/opt/homebrew/Cellar",npm_package_scripts_cypress_fuse:"REACT_APP_CYPRESS=true TZ=America/New_York node_modules/cypress/bin/cypress open -C fuse.cypress.config.js --e2e -b chrome",npm_package_devDependencies__types_node:"^12.x",rvm_niceness:"",rvm_delete_flag:"0",npm_package_dependencies_turbolinks:"^5.2.0",npm_package_workspaces_4:"./ui/qa-app",npm_package_devDependencies_jest_environment_jsdom:"^29.7.0",rvm_ruby_bits:"",npm_package_dependencies_express:"^4.18.2",npm_package_dependencies__rails_actioncable:"^6.0.0",npm_package_files_0:"lib",rvm_recommended_ruby:"rvm install ruby-3.1.2",rvm_bin_flag:"",npm_package_workspaces_2:"./ui/shared",npm_config_init_version:"1.0.0",npm_config_ignore_optional:"",rvm_only_path_flag:"",SECURITYSESSIONID:"186b2",npm_package_workspaces_3:"./ui/embed",npm_package_scripts_cypress_fuse_importer:"REACT_APP_CYPRESS=true TZ=America/New_York node_modules/cypress/bin/cypress open -C fuse-importer.cypress.config.js --e2e -b chrome",npm_package_scripts_test_webapp:"yarn workspace webapp test",npm_package_workspaces_0:"./ui/webapp",npm_node_execpath:"/Users/barrazac/.nvm/versions/node/v16.20.1/bin/node",npm_package_devDependencies_eslint_plugin_react:"^7.21.5",npm_package_scripts_sidekiq_e2e:"SECRET_KEY_BASE=e2e RAILS_ENV=e2e bundle exec sidekiq -e e2e -C config/sidekiq.yml",npm_package_workspaces_1:"./ui/fuse-importer",npm_config_version_tag_prefix:"v",npm_package_devDependencies__testing_library_jest_dom:"^5.16.5"}.REACT_APP_CYPRESS&&(this.options.host="http://localhost:3000/cypress-test/importer-embed")}return e.prototype.close=function(){var e;null===(e=this.onClose)||void 0===e||e.call(this),this.cleanupIframe&&(this.cleanupIframe(),this.cleanupIframe=null);var n=document.getElementById(i);document.body.removeChild(n),document.body.style.overflow="auto",window.scrollTo(this.windowScrollPosition.x,this.windowScrollPosition.y)},e.prototype.mountFuseWebappIframe=function(){var e=this,n=document.createElement("iframe");n.setAttribute("id",i),n.style.cssText="border: none; width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 1000;",n.setAttribute("allow","clipboard-write"),n.src="".concat(this.options.host);var a;a=function(_){return r(e,void 0,void 0,(function(){var e,s,i,c,t,o,m,d=this;return p(this,(function(l){switch(l.label){case 0:return e=_.data,s=e.type,i=e.id,c=e.payload,t={onSubmit:this.onSubmit,onValidateRecord:this.onValidateRecord,formatRecord:this.formatRecord,customAction:function(e,n){return r(d,void 0,void 0,(function(){return p(this,(function(a){switch(a.label){case 0:return[4,this.customActions[e].handler(n)];case 1:return[2,a.sent()]}}))}))},onClose:function(){window.removeEventListener("message",a,!1),d.close()}},t[s]?[4,t[s].apply(t,c)]:[3,2];case 1:o=l.sent(),null===(m=null==n?void 0:n.contentWindow)||void 0===m||m.postMessage({type:s,id:i,payload:o},"*"),l.label=2;case 2:return[2]}}))}))},window.addEventListener("message",a,!1),window.addEventListener("message",(function(a){return r(e,void 0,void 0,(function(){var e,_;return p(this,(function(s){return"iframe_ready"===a.data.type&&(null===(e=null==n?void 0:n.contentWindow)||void 0===e||e.postMessage({type:"fuse_init",payload:{apiToken:this.apiToken,templateSlug:this.templateSlug,options:this.options,dynamicColumns:this.dynamicColumns,hasFormatRecord:void 0!==this.formatRecord,hasOnValidateRecord:void 0!==this.onValidateRecord,hasOnSubmit:void 0!==this.onSubmit,customActions:null===(_=this.customActions)||void 0===_?void 0:_.map((function(e){return{name:e.name,actionType:e.actionType}}))}},"*")),[2]}))}))}),!1),document.body.appendChild(n)},e.prototype.show=function(){return r(this,void 0,void 0,(function(){return p(this,(function(e){return this.windowScrollPosition={x:window.scrollX,y:window.scrollY},window.scrollTo(0,0),document.body.style.overflow="hidden",this.mountFuseWebappIframe(),[2]}))}))},e.prototype.addColumn=function(e){this.dynamicColumns.push(e)},e.prototype.addCustomAction=function(e){var n;Array.isArray(e)||(e=[e]),(n=this.customActions).push.apply(n,e)},e}()})(),FuseImporter=n.default})();
|
|
1
|
+
var FuseImporter;(()=>{"use strict";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};(()=>{t.d(e,{default:()=>d});var n,o=function(t,e,n){if(n||2===arguments.length)for(var o,i=0,s=e.length;i<s;i++)!o&&i in e||(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))};!function(t){t.boolean="boolean",t.integer="integer",t.float="float",t.string="string",t.email="email",t.enum="enum",t.url="url",t.date="date",t.datetime="datetime",t.time="time"}(n||(n={}));o([],["cannot_contain","contain","max_length","min_length","length_exactly","unique_case_sensitive","unique_case_insensitive","regex","integer","less_than","greater_than","even","odd","float","email","url","boolean","before_date","after_date"],!0),o([],["sentence_case","capitalize","uppercase","lowercase","trim_whitespace","autoformat","prefix","number_of_decimals","round","floor","ceiling"],!0);var i=function(){return i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)},s=function(t,e,n,o){return new(n||(n=Promise))((function(i,s){function r(t){try{c(o.next(t))}catch(t){s(t)}}function a(t){try{c(o.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,a)}c((o=o.apply(t,e||[])).next())}))},r=function(t,e){var n,o,i,s,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(r=0)),r;)try{if(n=1,o&&(i=2&a[0]?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(i=r.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(6===a[0]&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(t){a=[6,t],o=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},a="fuse-importer-root",c="undefined"!=typeof window,l=console.warn.bind(console.warn);console.warn=function(t){t&&(t.includes("Over 200 classes were generated for component")||l(t))};var u=function(t){var e=t.importer_slug,n=t.api_key,o=t.metadata,i=void 0===o?{}:o,a="true"==={NODE_ENV:"production"}.REACT_APP_CYPRESS?"http://localhost:3000":"https://staging-fuse-aws.swovo.com";return function(){return s(void 0,void 0,void 0,(function(){var t,o;return r(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,fetch("".concat(a,"/api/v1/importer/sessions"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_token:n,importer_slug:e,metadata:i})})];case 1:if(!(t=s.sent()).ok)throw new Error("HTTP error! status: ".concat(t.status));return[4,t.json()];case 2:return[2,s.sent().token];case 3:throw o=s.sent(),console.error("Failed to fetch session token:",o),o;case 4:return[2]}}))}))}};if("undefined"==typeof process){window.process={env:{}}}const d=function(){function t(t,e,n){this.dynamicColumns=[],this.customActions=[],this.cleanupIframe=null,this.windowScrollPosition={x:0,y:0};var o={env:"production",zIndex:1e3,batchValidationDelayMs:500};"string"==typeof t?(this.apiToken=t,this.templateSlug=e,this.options=i(i({},o),n)):"object"==typeof t&&null!==t?(this.apiToken=t.apiToken,this.templateSlug=t.templateSlug,this.options=i(i({},o),t.options)):(this.apiToken=void 0,this.templateSlug=void 0,this.options=o),c&&(this.options.host="https://embed-staging.swovo.com",{NODE_ENV:"production"}.REACT_APP_IMPORTER_HOST&&(this.options.host={NODE_ENV:"production"}.REACT_APP_IMPORTER_HOST),{NODE_ENV:"production"}.REACT_APP_CYPRESS&&(this.options.host="http://localhost:3000/cypress-test/importer-embed"),this.sessionToken=void 0)}return t.prototype.close=function(){var t;if(c){null===(t=this.onClose)||void 0===t||t.call(this),this.cleanupIframe&&(this.cleanupIframe(),this.cleanupIframe=null);var e=document.getElementById(a);document.body.removeChild(e),document.body.style.overflow="auto",window.scrollTo(this.windowScrollPosition.x,this.windowScrollPosition.y)}},t.prototype.mountFuseWebappIframe=function(){return s(this,void 0,void 0,(function(){var t,e,n,o,i,l,u=this;return r(this,(function(d){switch(d.label){case 0:if(!c)return[2];if((t=document.createElement("iframe")).setAttribute("id",a),t.style.cssText="border: none; width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 1000;",t.setAttribute("allow","clipboard-write"),t.src="".concat(this.options.host),(e=document.createElement("div")).innerHTML=p,document.body.appendChild(e),!this.getSessionToken)return[3,4];d.label=1;case 1:return d.trys.push([1,3,,4]),n=this,[4,this.getSessionToken()];case 2:return n.sessionToken=d.sent(),[3,4];case 3:return o=d.sent(),console.error("Failed to get session token",o),[3,4];case 4:return t.onload=function(){e.remove()},i=function(){var e=function(n){return s(u,void 0,void 0,(function(){var o,i,a,c,l,u,d,p=this;return r(this,(function(h){switch(h.label){case 0:return o=n.data,i=o.type,a=o.id,c=o.payload,l={onSubmit:this.onSubmit,onValidateRecord:this.onValidateRecord,formatRecord:this.formatRecord,customAction:function(t,e){return s(p,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,this.customActions[t].handler(e)];case 1:return[2,n.sent()]}}))}))},onClose:function(){window.removeEventListener("message",e,!1),p.close()}},l[i]?[4,l[i].apply(l,c)]:[3,2];case 1:u=h.sent(),null===(d=null==t?void 0:t.contentWindow)||void 0===d||d.postMessage({type:i,id:a,payload:u},"*"),h.label=2;case 2:return[2]}}))}))};window.addEventListener("message",e,!1)},l=function(){window.addEventListener("message",(function(e){return s(u,void 0,void 0,(function(){var n,o;return r(this,(function(i){return"iframe_ready"===e.data.type&&(null===(n=null==t?void 0:t.contentWindow)||void 0===n||n.postMessage({type:"fuse_init",payload:{sessionToken:this.sessionToken,apiToken:this.apiToken,templateSlug:this.templateSlug,options:this.options,dynamicColumns:this.dynamicColumns,hasFormatRecord:void 0!==this.formatRecord,hasOnValidateRecord:void 0!==this.onValidateRecord,hasOnSubmit:void 0!==this.onSubmit,customActions:null===(o=this.customActions)||void 0===o?void 0:o.map((function(t){return{name:t.name,actionType:t.actionType}})),customStyles:this.customStyles}},"*")),[2]}))}))}),!1)},i(),l(),document.body.appendChild(t),[2]}}))}))},t.prototype.show=function(){return s(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return c?(this.windowScrollPosition={x:window.scrollX,y:window.scrollY},window.scrollTo(0,0),document.body.style.overflow="hidden",[4,this.mountFuseWebappIframe()]):[2];case 1:return t.sent(),[2]}}))}))},t.prototype.addColumn=function(t){this.dynamicColumns.push(t)},t.prototype.addCustomAction=function(t){var e;Array.isArray(t)||(t=[t]),(e=this.customActions).push.apply(e,t)},t.prototype.setCustomStyles=function(t){this.customStyles=t},t.getFuseClientSideToken=u,t}();var p='\n<div style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.6); z-index: 1050; display: flex; justify-content: center; align-items: center;">\n <div style="width: 70px; display: flex; justify-content: space-between;">\n <div style=" margin: 0 5px 0 5px; width: 12px; height: 12px; background-color: #CAC4BF; border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; animation-delay: -0.32s;"></div>\n <div style=" margin: 0 5px 0 5px; width: 12px; height: 12px; background-color: #CAC4BF; border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; animation-delay: -0.16s;"></div>\n <div style="margin: 0 5px 0 5px; width: 12px; height: 12px; background-color: #CAC4BF; border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both;"></div>\n </div>\n</div>\n<style>\n @keyframes bounce {\n 0%, 80%, 100% { transform: scale(0); }\n 40% { transform: scale(1.0); }\n }\n</style>\n'})(),FuseImporter=e.default})();
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fuse-importer",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.40.1
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "0.40.2-staging.2.1",
|
|
5
|
+
"description": "Swovo Fuse is a customizable and powerful CSV Importer that works with all front-end languages",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/swovohq/fuse.git",
|
|
9
|
+
"directory": "ui/fuse-importer"
|
|
10
|
+
},
|
|
6
11
|
"browserslist": {
|
|
7
12
|
"production": [
|
|
8
13
|
">0.2%",
|
|
@@ -32,7 +37,6 @@
|
|
|
32
37
|
"main": "./lib/main.js",
|
|
33
38
|
"module": "./lib/esm/index.js",
|
|
34
39
|
"types": "./lib/esm/index.d.ts",
|
|
35
|
-
"dependencies": {},
|
|
36
40
|
"devDependencies": {
|
|
37
41
|
"@testing-library/jest-dom": "^5.16.5",
|
|
38
42
|
"@types/actioncable": "^5.2.11",
|
|
@@ -43,14 +47,14 @@
|
|
|
43
47
|
"html-webpack-plugin": "^5.5.0",
|
|
44
48
|
"jest": "^28.1.3",
|
|
45
49
|
"jest-canvas-mock": "^2.5.2",
|
|
46
|
-
"jest-environment-jsdom": "^
|
|
50
|
+
"jest-environment-jsdom": "^30.2.0",
|
|
47
51
|
"terser-webpack-plugin": "^5.1.2",
|
|
48
52
|
"ts-jest": "^28.0.8",
|
|
49
53
|
"ts-loader": "^9.2.2",
|
|
50
54
|
"typescript": "^4.3.2",
|
|
51
55
|
"webpack": "^5.38.0",
|
|
52
56
|
"webpack-cli": "^4.9.1",
|
|
53
|
-
"webpack-dev-server": "^
|
|
57
|
+
"webpack-dev-server": "^5.2.1"
|
|
54
58
|
},
|
|
55
59
|
"files": [
|
|
56
60
|
"lib"
|