dromo-uploader-react 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +0 -32
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +0 -32
- package/dist/index.modern.js.map +1 -1
- package/package.json +37 -3
package/dist/index.js
CHANGED
|
@@ -11,135 +11,105 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
11
11
|
|
|
12
12
|
var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
|
|
13
13
|
_inheritsLoose(DromoReactUploader, _React$Component);
|
|
14
|
-
|
|
15
14
|
function DromoReactUploader(props) {
|
|
16
15
|
var _this;
|
|
17
|
-
|
|
18
16
|
_this = _React$Component.call(this, props) || this;
|
|
19
17
|
_this.inlineRef = null;
|
|
20
|
-
|
|
21
18
|
_this.init = function () {
|
|
22
19
|
if ('fields' in _this.props && 'settings' in _this.props) {
|
|
23
20
|
_this.dromo = new DromoUploader(_this.props.licenseKey, _this.props.fields, _this.props.settings, _this.props.user);
|
|
24
21
|
} else if ('schemaId' in _this.props || 'schemaName' in _this.props) {
|
|
25
22
|
var idOrName = 'schemaId' in _this.props ? _this.props.schemaId : _this.props.schemaName;
|
|
26
23
|
_this.dromo = new DromoUploader(_this.props.licenseKey, idOrName);
|
|
27
|
-
|
|
28
24
|
if ('developmentMode' in _this.props) {
|
|
29
25
|
_this.dromo.setDevelopmentMode(_this.props.developmentMode);
|
|
30
26
|
}
|
|
31
|
-
|
|
32
27
|
if ('user' in _this.props) {
|
|
33
28
|
_this.dromo.setUser(_this.props.user);
|
|
34
29
|
}
|
|
35
|
-
|
|
36
30
|
if ('headerRowOverride' in _this.props) {
|
|
37
31
|
_this.dromo.setHeaderRowOverride(_this.props.headerRowOverride);
|
|
38
32
|
}
|
|
39
33
|
}
|
|
40
|
-
|
|
41
34
|
if (_this.props.rowHooks) {
|
|
42
35
|
_this.props.rowHooks.forEach(function (hook) {
|
|
43
36
|
return _this.dromo.registerRowHook(hook);
|
|
44
37
|
});
|
|
45
38
|
}
|
|
46
|
-
|
|
47
39
|
if (_this.props.bulkRowHooks) {
|
|
48
40
|
_this.props.bulkRowHooks.forEach(function (hook) {
|
|
49
41
|
return _this.dromo.registerBulkRowHook(hook);
|
|
50
42
|
});
|
|
51
43
|
}
|
|
52
|
-
|
|
53
44
|
if (_this.props.columnHooks) {
|
|
54
45
|
_this.props.columnHooks.forEach(function (hook) {
|
|
55
46
|
_this.dromo.registerColumnHook(hook.fieldName, hook.callback);
|
|
56
47
|
});
|
|
57
48
|
}
|
|
58
|
-
|
|
59
49
|
if (_this.props.rowDeleteHooks) {
|
|
60
50
|
_this.props.rowDeleteHooks.forEach(function (hook) {
|
|
61
51
|
return _this.dromo.registerRowDeleteHook(hook);
|
|
62
52
|
});
|
|
63
53
|
}
|
|
64
|
-
|
|
65
54
|
if (_this.props.beforeFinish) {
|
|
66
55
|
_this.dromo.beforeFinish(_this.props.beforeFinish);
|
|
67
56
|
}
|
|
68
|
-
|
|
69
57
|
if (_this.props.onResults) {
|
|
70
58
|
_this.dromo.onResults(_this.props.onResults);
|
|
71
59
|
}
|
|
72
|
-
|
|
73
60
|
if (_this.props.onCancel) {
|
|
74
61
|
_this.dromo.onCancel(_this.props.onCancel);
|
|
75
62
|
}
|
|
76
|
-
|
|
77
63
|
if (_this.props.stepHooks) {
|
|
78
64
|
_this.props.stepHooks.forEach(function (hook) {
|
|
79
65
|
_this.dromo.registerStepHook(hook.type, hook.callback);
|
|
80
66
|
});
|
|
81
67
|
}
|
|
82
|
-
|
|
83
68
|
if (_this.props.fileParsers) {
|
|
84
69
|
_this.props.fileParsers.forEach(function (parser) {
|
|
85
70
|
_this.dromo.registerFileParser(parser);
|
|
86
71
|
});
|
|
87
72
|
}
|
|
88
73
|
};
|
|
89
|
-
|
|
90
74
|
_this.open = function () {
|
|
91
75
|
_this.init();
|
|
92
|
-
|
|
93
76
|
_this.dromo.open();
|
|
94
77
|
};
|
|
95
|
-
|
|
96
78
|
_this.initInline = function () {
|
|
97
79
|
if (!_this.inlineRef) return;
|
|
98
|
-
|
|
99
80
|
_this.init();
|
|
100
|
-
|
|
101
81
|
_this.dromo.initInline(_this.inlineRef.current);
|
|
102
82
|
};
|
|
103
|
-
|
|
104
83
|
if (props.inline) {
|
|
105
84
|
_this.inlineRef = React.createRef();
|
|
106
85
|
}
|
|
107
|
-
|
|
108
86
|
return _this;
|
|
109
87
|
}
|
|
110
|
-
|
|
111
88
|
var _proto = DromoReactUploader.prototype;
|
|
112
|
-
|
|
113
89
|
_proto.componentDidMount = function componentDidMount() {
|
|
114
90
|
if (this.props.inline && this.inlineRef) {
|
|
115
91
|
this.initInline();
|
|
116
92
|
return;
|
|
117
93
|
}
|
|
118
|
-
|
|
119
94
|
if (this.props.open) this.open();
|
|
120
95
|
};
|
|
121
|
-
|
|
122
96
|
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
123
97
|
if (this.props.inline) {
|
|
124
98
|
this.initInline();
|
|
125
99
|
return;
|
|
126
100
|
}
|
|
127
|
-
|
|
128
101
|
if (!prevProps.open && this.props.open) {
|
|
129
102
|
this.open();
|
|
130
103
|
}
|
|
131
|
-
|
|
132
104
|
if (prevProps.open && !this.props.open) {
|
|
133
105
|
this.dromo.close();
|
|
134
106
|
}
|
|
135
107
|
};
|
|
136
|
-
|
|
137
108
|
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
138
109
|
if (this.props.open && !this.props.inline) {
|
|
139
110
|
this.dromo.close();
|
|
140
111
|
}
|
|
141
112
|
};
|
|
142
|
-
|
|
143
113
|
_proto.render = function render() {
|
|
144
114
|
if (this.props.inline) {
|
|
145
115
|
return React.createElement("div", {
|
|
@@ -148,7 +118,6 @@ var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
|
|
|
148
118
|
style: this.props.style
|
|
149
119
|
});
|
|
150
120
|
}
|
|
151
|
-
|
|
152
121
|
if (this.props.children === undefined) return React.createElement(React.Fragment, null);
|
|
153
122
|
return React.createElement("button", {
|
|
154
123
|
style: this.props.style,
|
|
@@ -156,7 +125,6 @@ var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
|
|
|
156
125
|
onClick: this.open
|
|
157
126
|
}, this.props.children);
|
|
158
127
|
};
|
|
159
|
-
|
|
160
128
|
return DromoReactUploader;
|
|
161
129
|
}(React.Component);
|
|
162
130
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nimport DromoUploader, {\n IColumnHookInput,\n IColumnHookOutput,\n IColumnHook,\n IDeveloperField,\n IValidatorField,\n IDeveloperSettings,\n IRowHookInput,\n IRowHookOutput,\n IRowHook,\n IDeveloperStyleOverrides,\n IUser,\n IResultMetadata,\n IStepHook,\n IRowDeleteHook,\n IBeforeFinishCallback,\n IBulkRowHook,\n IImporterOptions,\n IParseFileCallback\n} from 'dromo-uploader-js'\n\ntype VerboseRequiredProps = {\n user: IUser\n fields: IDeveloperField[]\n licenseKey: string\n settings: IDeveloperSettings\n}\n\ntype SavedSchemaProps = {\n licenseKey: string\n} & ({ schemaName: string } | { schemaId: string }) &\n IImporterOptions\n\ntype CommonProps = {\n style?: React.CSSProperties\n className?: string\n rowHooks?: IRowHook[]\n bulkRowHooks?: IBulkRowHook[]\n rowDeleteHooks?: IRowDeleteHook[]\n columnHooks?: IColumnHook[]\n stepHooks?: IStepHook[]\n fileParsers?: { extensions: string[]; parseFile: IParseFileCallback }[]\n beforeFinish?: IBeforeFinishCallback\n onResults?: (data: any, metadata: IResultMetadata) => void\n onCancel?: () => void\n children?: React.ReactNode\n open?: boolean\n inline?: boolean\n}\n\ntype Props = (VerboseRequiredProps | SavedSchemaProps) & CommonProps\n\nexport default class DromoReactUploader extends React.Component<Props> {\n dromo: any\n inlineRef: React.RefObject<HTMLDivElement> | null = null\n\n constructor(props: Props) {\n super(props)\n\n if (props.inline) {\n this.inlineRef = React.createRef()\n }\n }\n\n init = () => {\n if ('fields' in this.props && 'settings' in this.props) {\n this.dromo = new DromoUploader(\n this.props.licenseKey,\n this.props.fields,\n this.props.settings,\n this.props.user\n )\n } else if ('schemaId' in this.props || 'schemaName' in this.props) {\n const idOrName =\n 'schemaId' in this.props ? this.props.schemaId : this.props.schemaName\n\n this.dromo = new DromoUploader(this.props.licenseKey, idOrName)\n\n if ('developmentMode' in this.props) {\n this.dromo.setDevelopmentMode(this.props.developmentMode)\n }\n if ('user' in this.props) {\n this.dromo.setUser(this.props.user)\n }\n if ('headerRowOverride' in this.props) {\n this.dromo.setHeaderRowOverride(this.props.headerRowOverride)\n }\n }\n\n if (this.props.rowHooks) {\n this.props.rowHooks.forEach((hook) => this.dromo.registerRowHook(hook))\n }\n\n if (this.props.bulkRowHooks) {\n this.props.bulkRowHooks.forEach((hook) =>\n this.dromo.registerBulkRowHook(hook)\n )\n }\n\n if (this.props.columnHooks) {\n this.props.columnHooks.forEach((hook) => {\n this.dromo.registerColumnHook(hook.fieldName, hook.callback)\n })\n }\n\n if (this.props.rowDeleteHooks) {\n this.props.rowDeleteHooks.forEach((hook) => {\n return this.dromo.registerRowDeleteHook(hook)\n })\n }\n\n if (this.props.beforeFinish) {\n this.dromo.beforeFinish(this.props.beforeFinish)\n }\n\n if (this.props.onResults) {\n this.dromo.onResults(this.props.onResults)\n }\n\n if (this.props.onCancel) {\n this.dromo.onCancel(this.props.onCancel)\n }\n\n if (this.props.stepHooks) {\n this.props.stepHooks.forEach((hook) => {\n this.dromo.registerStepHook(hook.type, hook.callback)\n })\n }\n\n if (this.props.fileParsers) {\n this.props.fileParsers.forEach((parser) => {\n this.dromo.registerFileParser(parser)\n })\n }\n }\n\n open = () => {\n this.init()\n this.dromo.open()\n }\n\n initInline = () => {\n if (!this.inlineRef) return\n\n this.init()\n this.dromo.initInline(this.inlineRef.current)\n }\n\n componentDidMount() {\n if (this.props.inline && this.inlineRef) {\n this.initInline()\n return\n }\n\n if (this.props.open) this.open()\n }\n\n componentDidUpdate(prevProps: Props) {\n if (this.props.inline) {\n this.initInline()\n return\n }\n\n if (!prevProps.open && this.props.open) {\n this.open()\n }\n\n if (prevProps.open && !this.props.open) {\n this.dromo.close()\n }\n }\n\n componentWillUnmount() {\n if (this.props.open && !this.props.inline) {\n this.dromo.close()\n }\n }\n\n render() {\n if (this.props.inline) {\n return (\n <div\n ref={this.inlineRef}\n className={this.props.className}\n style={this.props.style}\n />\n )\n }\n\n if (this.props.children === undefined) return <React.Fragment />\n\n return (\n <button\n style={this.props.style}\n className={this.props.className}\n onClick={this.open}\n >\n {this.props.children}\n </button>\n )\n }\n}\n\nexport {\n IDeveloperField,\n IDeveloperSettings,\n IUser,\n IColumnHookInput,\n IColumnHookOutput,\n IColumnHook,\n IRowHookInput,\n IRowHookOutput,\n IRowHook,\n IValidatorField,\n IDeveloperStyleOverrides,\n IResultMetadata,\n IStepHook,\n IRowDeleteHook,\n IBeforeFinishCallback,\n IBulkRowHook,\n IImporterOptions,\n IParseFileCallback\n}\n"],"names":["DromoReactUploader","props","dromo","DromoUploader","licenseKey","fields","settings","user","idOrName","schemaId","schemaName","setDevelopmentMode","developmentMode","setUser","setHeaderRowOverride","headerRowOverride","rowHooks","forEach","hook","registerRowHook","bulkRowHooks","registerBulkRowHook","columnHooks","registerColumnHook","fieldName","callback","rowDeleteHooks","registerRowDeleteHook","beforeFinish","onResults","onCancel","stepHooks","registerStepHook","type","fileParsers","parser","registerFileParser","init","open","inlineRef","initInline","current","inline","React","componentDidMount","componentDidUpdate","prevProps","close","componentWillUnmount","render","ref","className","style","children","undefined","onClick"],"mappings":";;;;;;;;;;;IAqDqBA;;;AAInB,8BAAYC,KAAZ;;;AACE,wCAAMA,KAAN;AAHF,mBAAA,GAAoD,IAApD;;AAUA,cAAA,GAAO;AACL,UAAI,YAAY,MAAKA,KAAjB,IAA0B,cAAc,MAAKA,KAAjD,EAAwD;AACtD,cAAKC,KAAL,GAAa,IAAIC,aAAJ,C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AAWoD,QAAX,KAAwBC,SAA5B,EAAuC,OAAOX,mBAAA,CAACA,cAAD,MAAA,CAAP;AAEvC,WACEA,mBAAA,SAAA;AACES,MAAAA,KAAK,EAAE,KAAKnD,KAAL,CAAWmD;AAClBD,MAAAA,SAAS,EAAE,KAAKlD,KAAL,CAAWkD;AACtBI,MAAAA,OAAO,EAAE,KAAKjB;KAHhB,EAKG,KAAKrC,KAAL,CAAWoD,QALd,CADF;AASD;;;EApJ6CV;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nimport DromoUploader, {\n IColumnHookInput,\n IColumnHookOutput,\n IColumnHook,\n IDeveloperField,\n IValidatorField,\n IDeveloperSettings,\n IRowHookInput,\n IRowHookOutput,\n IRowHook,\n IDeveloperStyleOverrides,\n IUser,\n IResultMetadata,\n IStepHook,\n IRowDeleteHook,\n IBeforeFinishCallback,\n IBulkRowHook,\n IImporterOptions,\n IParseFileCallback\n} from 'dromo-uploader-js'\n\ntype VerboseRequiredProps = {\n user: IUser\n fields: IDeveloperField[]\n licenseKey: string\n settings: IDeveloperSettings\n}\n\ntype SavedSchemaProps = {\n licenseKey: string\n} & ({ schemaName: string } | { schemaId: string }) &\n IImporterOptions\n\ntype CommonProps = {\n style?: React.CSSProperties\n className?: string\n rowHooks?: IRowHook[]\n bulkRowHooks?: IBulkRowHook[]\n rowDeleteHooks?: IRowDeleteHook[]\n columnHooks?: IColumnHook[]\n stepHooks?: IStepHook[]\n fileParsers?: { extensions: string[]; parseFile: IParseFileCallback }[]\n beforeFinish?: IBeforeFinishCallback\n onResults?: (data: any, metadata: IResultMetadata) => void\n onCancel?: () => void\n children?: React.ReactNode\n open?: boolean\n inline?: boolean\n}\n\ntype Props = (VerboseRequiredProps | SavedSchemaProps) & CommonProps\n\nexport default class DromoReactUploader extends React.Component<Props> {\n dromo: any\n inlineRef: React.RefObject<HTMLDivElement> | null = null\n\n constructor(props: Props) {\n super(props)\n\n if (props.inline) {\n this.inlineRef = React.createRef()\n }\n }\n\n init = () => {\n if ('fields' in this.props && 'settings' in this.props) {\n this.dromo = new DromoUploader(\n this.props.licenseKey,\n this.props.fields,\n this.props.settings,\n this.props.user\n )\n } else if ('schemaId' in this.props || 'schemaName' in this.props) {\n const idOrName =\n 'schemaId' in this.props ? this.props.schemaId : this.props.schemaName\n\n this.dromo = new DromoUploader(this.props.licenseKey, idOrName)\n\n if ('developmentMode' in this.props) {\n this.dromo.setDevelopmentMode(this.props.developmentMode)\n }\n if ('user' in this.props) {\n this.dromo.setUser(this.props.user)\n }\n if ('headerRowOverride' in this.props) {\n this.dromo.setHeaderRowOverride(this.props.headerRowOverride)\n }\n }\n\n if (this.props.rowHooks) {\n this.props.rowHooks.forEach((hook) => this.dromo.registerRowHook(hook))\n }\n\n if (this.props.bulkRowHooks) {\n this.props.bulkRowHooks.forEach((hook) =>\n this.dromo.registerBulkRowHook(hook)\n )\n }\n\n if (this.props.columnHooks) {\n this.props.columnHooks.forEach((hook) => {\n this.dromo.registerColumnHook(hook.fieldName, hook.callback)\n })\n }\n\n if (this.props.rowDeleteHooks) {\n this.props.rowDeleteHooks.forEach((hook) => {\n return this.dromo.registerRowDeleteHook(hook)\n })\n }\n\n if (this.props.beforeFinish) {\n this.dromo.beforeFinish(this.props.beforeFinish)\n }\n\n if (this.props.onResults) {\n this.dromo.onResults(this.props.onResults)\n }\n\n if (this.props.onCancel) {\n this.dromo.onCancel(this.props.onCancel)\n }\n\n if (this.props.stepHooks) {\n this.props.stepHooks.forEach((hook) => {\n this.dromo.registerStepHook(hook.type, hook.callback)\n })\n }\n\n if (this.props.fileParsers) {\n this.props.fileParsers.forEach((parser) => {\n this.dromo.registerFileParser(parser)\n })\n }\n }\n\n open = () => {\n this.init()\n this.dromo.open()\n }\n\n initInline = () => {\n if (!this.inlineRef) return\n\n this.init()\n this.dromo.initInline(this.inlineRef.current)\n }\n\n componentDidMount() {\n if (this.props.inline && this.inlineRef) {\n this.initInline()\n return\n }\n\n if (this.props.open) this.open()\n }\n\n componentDidUpdate(prevProps: Props) {\n if (this.props.inline) {\n this.initInline()\n return\n }\n\n if (!prevProps.open && this.props.open) {\n this.open()\n }\n\n if (prevProps.open && !this.props.open) {\n this.dromo.close()\n }\n }\n\n componentWillUnmount() {\n if (this.props.open && !this.props.inline) {\n this.dromo.close()\n }\n }\n\n render() {\n if (this.props.inline) {\n return (\n <div\n ref={this.inlineRef}\n className={this.props.className}\n style={this.props.style}\n />\n )\n }\n\n if (this.props.children === undefined) return <React.Fragment />\n\n return (\n <button\n style={this.props.style}\n className={this.props.className}\n onClick={this.open}\n >\n {this.props.children}\n </button>\n )\n }\n}\n\nexport {\n IDeveloperField,\n IDeveloperSettings,\n IUser,\n IColumnHookInput,\n IColumnHookOutput,\n IColumnHook,\n IRowHookInput,\n IRowHookOutput,\n IRowHook,\n IValidatorField,\n IDeveloperStyleOverrides,\n IResultMetadata,\n IStepHook,\n IRowDeleteHook,\n IBeforeFinishCallback,\n IBulkRowHook,\n IImporterOptions,\n IParseFileCallback\n}\n"],"names":["DromoReactUploader","_React$Component","_inheritsLoose","props","_this","call","dromo","DromoUploader","licenseKey","fields","settings","user","idOrName","schemaId","schemaName","setDevelopmentMode","developmentMode","setUser","setHeaderRowOverride","headerRowOverride","rowHooks","forEach","hook","registerRowHook","bulkRowHooks","registerBulkRowHook","columnHooks","registerColumnHook","fieldName","callback","rowDeleteHooks","registerRowDeleteHook","beforeFinish","onResults","onCancel","stepHooks","registerStepHook","type","fileParsers","parser","registerFileParser","init","open","inlineRef","initInline","current","inline","React","_proto","prototype","componentDidMount","componentDidUpdate","prevProps","close","componentWillUnmount","render","ref","className","style","children","undefined","onClick"],"mappings":";;;;;;;;;;;IAqDqBA,kBAAmB,0BAAAC,gBAAA;EAAAC,cAAA,CAAAF,kBAAA,EAAAC,gBAAA;EAItC,SAAAD,mBAAYG,KAAY;;IACtBC,KAAA,GAAAH,gBAAA,CAAAI,IAAA,OAAMF,KAAK,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,UAAU,EAAE;MACjB;;IAGF,IAAI,CAACQ,SAAS,CAACV,IAAI,IAAI,IAAI,CAACvC,KAAK,CAACuC,IAAI,EAAE;MACtC,IAAI,CAACA,IAAI,EAAE;;IAGb,IAAIU,SAAS,CAACV,IAAI,IAAI,CAAC,IAAI,CAACvC,KAAK,CAACuC,IAAI,EAAE;MACtC,IAAI,CAACpC,KAAK,CAAC+C,KAAK,EAAE;;GAErB;EAAAL,MAAA,CAEDM,oBAAoB,GAApB,SAAAA;IACE,IAAI,IAAI,CAACnD,KAAK,CAACuC,IAAI,IAAI,CAAC,IAAI,CAACvC,KAAK,CAAC2C,MAAM,EAAE;MACzC,IAAI,CAACxC,KAAK,CAAC+C,KAAK,EAAE;;GAErB;EAAAL,MAAA,CAEDO,MAAM,GAAN,SAAAA;IACE,IAAI,IAAI,CAACpD,KAAK,CAAC2C,MAAM,EAAE;MACrB,OACEC;QACES,GAAG,EAAE,IAAI,CAACb,SAAS;QACnBc,SAAS,EAAE,IAAI,CAACtD,KAAK,CAACsD,SAAS;QAC/BC,KAAK,EAAE,IAAI,CAACvD,KAAK,CAACuD;QAClB;;IAIN,IAAI,IAAI,CAACvD,KAAK,CAACwD,QAAQ,KAAKC,SAAS,EAAE,OAAOb,oBAACA,cAAc,OAAG;IAEhE,OACEA;MACEW,KAAK,EAAE,IAAI,CAACvD,KAAK,CAACuD,KAAK;MACvBD,SAAS,EAAE,IAAI,CAACtD,KAAK,CAACsD,SAAS;MAC/BI,OAAO,EAAE,IAAI,CAACnB;OAEb,IAAI,CAACvC,KAAK,CAACwD,QAAQ,CACb;GAEZ;EAAA,OAAA3D,kBAAA;AAAA,EApJ6C+C,eAAsB;;;;"}
|
package/dist/index.modern.js
CHANGED
|
@@ -9,135 +9,105 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
9
9
|
|
|
10
10
|
var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
|
|
11
11
|
_inheritsLoose(DromoReactUploader, _React$Component);
|
|
12
|
-
|
|
13
12
|
function DromoReactUploader(props) {
|
|
14
13
|
var _this;
|
|
15
|
-
|
|
16
14
|
_this = _React$Component.call(this, props) || this;
|
|
17
15
|
_this.inlineRef = null;
|
|
18
|
-
|
|
19
16
|
_this.init = function () {
|
|
20
17
|
if ('fields' in _this.props && 'settings' in _this.props) {
|
|
21
18
|
_this.dromo = new DromoUploader(_this.props.licenseKey, _this.props.fields, _this.props.settings, _this.props.user);
|
|
22
19
|
} else if ('schemaId' in _this.props || 'schemaName' in _this.props) {
|
|
23
20
|
var idOrName = 'schemaId' in _this.props ? _this.props.schemaId : _this.props.schemaName;
|
|
24
21
|
_this.dromo = new DromoUploader(_this.props.licenseKey, idOrName);
|
|
25
|
-
|
|
26
22
|
if ('developmentMode' in _this.props) {
|
|
27
23
|
_this.dromo.setDevelopmentMode(_this.props.developmentMode);
|
|
28
24
|
}
|
|
29
|
-
|
|
30
25
|
if ('user' in _this.props) {
|
|
31
26
|
_this.dromo.setUser(_this.props.user);
|
|
32
27
|
}
|
|
33
|
-
|
|
34
28
|
if ('headerRowOverride' in _this.props) {
|
|
35
29
|
_this.dromo.setHeaderRowOverride(_this.props.headerRowOverride);
|
|
36
30
|
}
|
|
37
31
|
}
|
|
38
|
-
|
|
39
32
|
if (_this.props.rowHooks) {
|
|
40
33
|
_this.props.rowHooks.forEach(function (hook) {
|
|
41
34
|
return _this.dromo.registerRowHook(hook);
|
|
42
35
|
});
|
|
43
36
|
}
|
|
44
|
-
|
|
45
37
|
if (_this.props.bulkRowHooks) {
|
|
46
38
|
_this.props.bulkRowHooks.forEach(function (hook) {
|
|
47
39
|
return _this.dromo.registerBulkRowHook(hook);
|
|
48
40
|
});
|
|
49
41
|
}
|
|
50
|
-
|
|
51
42
|
if (_this.props.columnHooks) {
|
|
52
43
|
_this.props.columnHooks.forEach(function (hook) {
|
|
53
44
|
_this.dromo.registerColumnHook(hook.fieldName, hook.callback);
|
|
54
45
|
});
|
|
55
46
|
}
|
|
56
|
-
|
|
57
47
|
if (_this.props.rowDeleteHooks) {
|
|
58
48
|
_this.props.rowDeleteHooks.forEach(function (hook) {
|
|
59
49
|
return _this.dromo.registerRowDeleteHook(hook);
|
|
60
50
|
});
|
|
61
51
|
}
|
|
62
|
-
|
|
63
52
|
if (_this.props.beforeFinish) {
|
|
64
53
|
_this.dromo.beforeFinish(_this.props.beforeFinish);
|
|
65
54
|
}
|
|
66
|
-
|
|
67
55
|
if (_this.props.onResults) {
|
|
68
56
|
_this.dromo.onResults(_this.props.onResults);
|
|
69
57
|
}
|
|
70
|
-
|
|
71
58
|
if (_this.props.onCancel) {
|
|
72
59
|
_this.dromo.onCancel(_this.props.onCancel);
|
|
73
60
|
}
|
|
74
|
-
|
|
75
61
|
if (_this.props.stepHooks) {
|
|
76
62
|
_this.props.stepHooks.forEach(function (hook) {
|
|
77
63
|
_this.dromo.registerStepHook(hook.type, hook.callback);
|
|
78
64
|
});
|
|
79
65
|
}
|
|
80
|
-
|
|
81
66
|
if (_this.props.fileParsers) {
|
|
82
67
|
_this.props.fileParsers.forEach(function (parser) {
|
|
83
68
|
_this.dromo.registerFileParser(parser);
|
|
84
69
|
});
|
|
85
70
|
}
|
|
86
71
|
};
|
|
87
|
-
|
|
88
72
|
_this.open = function () {
|
|
89
73
|
_this.init();
|
|
90
|
-
|
|
91
74
|
_this.dromo.open();
|
|
92
75
|
};
|
|
93
|
-
|
|
94
76
|
_this.initInline = function () {
|
|
95
77
|
if (!_this.inlineRef) return;
|
|
96
|
-
|
|
97
78
|
_this.init();
|
|
98
|
-
|
|
99
79
|
_this.dromo.initInline(_this.inlineRef.current);
|
|
100
80
|
};
|
|
101
|
-
|
|
102
81
|
if (props.inline) {
|
|
103
82
|
_this.inlineRef = createRef();
|
|
104
83
|
}
|
|
105
|
-
|
|
106
84
|
return _this;
|
|
107
85
|
}
|
|
108
|
-
|
|
109
86
|
var _proto = DromoReactUploader.prototype;
|
|
110
|
-
|
|
111
87
|
_proto.componentDidMount = function componentDidMount() {
|
|
112
88
|
if (this.props.inline && this.inlineRef) {
|
|
113
89
|
this.initInline();
|
|
114
90
|
return;
|
|
115
91
|
}
|
|
116
|
-
|
|
117
92
|
if (this.props.open) this.open();
|
|
118
93
|
};
|
|
119
|
-
|
|
120
94
|
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
121
95
|
if (this.props.inline) {
|
|
122
96
|
this.initInline();
|
|
123
97
|
return;
|
|
124
98
|
}
|
|
125
|
-
|
|
126
99
|
if (!prevProps.open && this.props.open) {
|
|
127
100
|
this.open();
|
|
128
101
|
}
|
|
129
|
-
|
|
130
102
|
if (prevProps.open && !this.props.open) {
|
|
131
103
|
this.dromo.close();
|
|
132
104
|
}
|
|
133
105
|
};
|
|
134
|
-
|
|
135
106
|
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
136
107
|
if (this.props.open && !this.props.inline) {
|
|
137
108
|
this.dromo.close();
|
|
138
109
|
}
|
|
139
110
|
};
|
|
140
|
-
|
|
141
111
|
_proto.render = function render() {
|
|
142
112
|
if (this.props.inline) {
|
|
143
113
|
return createElement("div", {
|
|
@@ -146,7 +116,6 @@ var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
|
|
|
146
116
|
style: this.props.style
|
|
147
117
|
});
|
|
148
118
|
}
|
|
149
|
-
|
|
150
119
|
if (this.props.children === undefined) return createElement(Fragment, null);
|
|
151
120
|
return createElement("button", {
|
|
152
121
|
style: this.props.style,
|
|
@@ -154,7 +123,6 @@ var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
|
|
|
154
123
|
onClick: this.open
|
|
155
124
|
}, this.props.children);
|
|
156
125
|
};
|
|
157
|
-
|
|
158
126
|
return DromoReactUploader;
|
|
159
127
|
}(Component);
|
|
160
128
|
|
package/dist/index.modern.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.modern.js","sources":["../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nimport DromoUploader, {\n IColumnHookInput,\n IColumnHookOutput,\n IColumnHook,\n IDeveloperField,\n IValidatorField,\n IDeveloperSettings,\n IRowHookInput,\n IRowHookOutput,\n IRowHook,\n IDeveloperStyleOverrides,\n IUser,\n IResultMetadata,\n IStepHook,\n IRowDeleteHook,\n IBeforeFinishCallback,\n IBulkRowHook,\n IImporterOptions,\n IParseFileCallback\n} from 'dromo-uploader-js'\n\ntype VerboseRequiredProps = {\n user: IUser\n fields: IDeveloperField[]\n licenseKey: string\n settings: IDeveloperSettings\n}\n\ntype SavedSchemaProps = {\n licenseKey: string\n} & ({ schemaName: string } | { schemaId: string }) &\n IImporterOptions\n\ntype CommonProps = {\n style?: React.CSSProperties\n className?: string\n rowHooks?: IRowHook[]\n bulkRowHooks?: IBulkRowHook[]\n rowDeleteHooks?: IRowDeleteHook[]\n columnHooks?: IColumnHook[]\n stepHooks?: IStepHook[]\n fileParsers?: { extensions: string[]; parseFile: IParseFileCallback }[]\n beforeFinish?: IBeforeFinishCallback\n onResults?: (data: any, metadata: IResultMetadata) => void\n onCancel?: () => void\n children?: React.ReactNode\n open?: boolean\n inline?: boolean\n}\n\ntype Props = (VerboseRequiredProps | SavedSchemaProps) & CommonProps\n\nexport default class DromoReactUploader extends React.Component<Props> {\n dromo: any\n inlineRef: React.RefObject<HTMLDivElement> | null = null\n\n constructor(props: Props) {\n super(props)\n\n if (props.inline) {\n this.inlineRef = React.createRef()\n }\n }\n\n init = () => {\n if ('fields' in this.props && 'settings' in this.props) {\n this.dromo = new DromoUploader(\n this.props.licenseKey,\n this.props.fields,\n this.props.settings,\n this.props.user\n )\n } else if ('schemaId' in this.props || 'schemaName' in this.props) {\n const idOrName =\n 'schemaId' in this.props ? this.props.schemaId : this.props.schemaName\n\n this.dromo = new DromoUploader(this.props.licenseKey, idOrName)\n\n if ('developmentMode' in this.props) {\n this.dromo.setDevelopmentMode(this.props.developmentMode)\n }\n if ('user' in this.props) {\n this.dromo.setUser(this.props.user)\n }\n if ('headerRowOverride' in this.props) {\n this.dromo.setHeaderRowOverride(this.props.headerRowOverride)\n }\n }\n\n if (this.props.rowHooks) {\n this.props.rowHooks.forEach((hook) => this.dromo.registerRowHook(hook))\n }\n\n if (this.props.bulkRowHooks) {\n this.props.bulkRowHooks.forEach((hook) =>\n this.dromo.registerBulkRowHook(hook)\n )\n }\n\n if (this.props.columnHooks) {\n this.props.columnHooks.forEach((hook) => {\n this.dromo.registerColumnHook(hook.fieldName, hook.callback)\n })\n }\n\n if (this.props.rowDeleteHooks) {\n this.props.rowDeleteHooks.forEach((hook) => {\n return this.dromo.registerRowDeleteHook(hook)\n })\n }\n\n if (this.props.beforeFinish) {\n this.dromo.beforeFinish(this.props.beforeFinish)\n }\n\n if (this.props.onResults) {\n this.dromo.onResults(this.props.onResults)\n }\n\n if (this.props.onCancel) {\n this.dromo.onCancel(this.props.onCancel)\n }\n\n if (this.props.stepHooks) {\n this.props.stepHooks.forEach((hook) => {\n this.dromo.registerStepHook(hook.type, hook.callback)\n })\n }\n\n if (this.props.fileParsers) {\n this.props.fileParsers.forEach((parser) => {\n this.dromo.registerFileParser(parser)\n })\n }\n }\n\n open = () => {\n this.init()\n this.dromo.open()\n }\n\n initInline = () => {\n if (!this.inlineRef) return\n\n this.init()\n this.dromo.initInline(this.inlineRef.current)\n }\n\n componentDidMount() {\n if (this.props.inline && this.inlineRef) {\n this.initInline()\n return\n }\n\n if (this.props.open) this.open()\n }\n\n componentDidUpdate(prevProps: Props) {\n if (this.props.inline) {\n this.initInline()\n return\n }\n\n if (!prevProps.open && this.props.open) {\n this.open()\n }\n\n if (prevProps.open && !this.props.open) {\n this.dromo.close()\n }\n }\n\n componentWillUnmount() {\n if (this.props.open && !this.props.inline) {\n this.dromo.close()\n }\n }\n\n render() {\n if (this.props.inline) {\n return (\n <div\n ref={this.inlineRef}\n className={this.props.className}\n style={this.props.style}\n />\n )\n }\n\n if (this.props.children === undefined) return <React.Fragment />\n\n return (\n <button\n style={this.props.style}\n className={this.props.className}\n onClick={this.open}\n >\n {this.props.children}\n </button>\n )\n }\n}\n\nexport {\n IDeveloperField,\n IDeveloperSettings,\n IUser,\n IColumnHookInput,\n IColumnHookOutput,\n IColumnHook,\n IRowHookInput,\n IRowHookOutput,\n IRowHook,\n IValidatorField,\n IDeveloperStyleOverrides,\n IResultMetadata,\n IStepHook,\n IRowDeleteHook,\n IBeforeFinishCallback,\n IBulkRowHook,\n IImporterOptions,\n IParseFileCallback\n}\n"],"names":["DromoReactUploader","props","dromo","DromoUploader","licenseKey","fields","settings","user","idOrName","schemaId","schemaName","setDevelopmentMode","developmentMode","setUser","setHeaderRowOverride","headerRowOverride","rowHooks","forEach","hook","registerRowHook","bulkRowHooks","registerBulkRowHook","columnHooks","registerColumnHook","fieldName","callback","rowDeleteHooks","registerRowDeleteHook","beforeFinish","onResults","onCancel","stepHooks","registerStepHook","type","fileParsers","parser","registerFileParser","init","open","inlineRef","initInline","current","inline","React","componentDidMount","componentDidUpdate","prevProps","close","componentWillUnmount","render","ref","className","style","children","undefined","onClick"],"mappings":";;;;;;;;;IAqDqBA;;;AAInB,8BAAYC,KAAZ;;;AACE,wCAAMA,KAAN;AAHF,mBAAA,GAAoD,IAApD;;AAUA,cAAA,GAAO;AACL,UAAI,YAAY,MAAKA,KAAjB,IAA0B,cAAc,MAAKA,KAAjD,EAAwD;AACtD,cAAKC,KAAL,GAAa,IAAIC,aAAJ,CACX,MAAKF,KAAL,CAAWG,UADA,EAEX,MAAKH,KAAL,CAAWI,MAFA,EAGX,MAAKJ,KAAL,CAAWK,QAHA,EAIX,MAAKL,KAAL,CAAWM,IAJA,CAAb;AAMD,OAPD,MAOO,IAAI,cAAc,MAAKN,KAAnB,IAA4B,gBAAgB,MAAKA,KAArD,EAA4D;AACjE,YAAMO,QAAQ,GACZ,cAAc,MAAKP,KAAnB,GAA2B,MAAKA,KAAL,CAAWQ,QAAtC,GAAiD,MAAKR,KAAL,CAAWS,UAD9D;AAGA,cAAKR,KAAL,GAAa,IAAIC,aAAJ,CAAkB,MAAKF,KAAL,CAAWG,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L;AACA;AACD;;AAED,QAAI,KAAKvC,KAAL,CAAWqC,IAAf,EAAqB,KAAKA,IAAL;AACtB;;SAEDO,qBAAA,4BAAmBC,SAAnB;AACE,QAAI,KAAK7C,KAAL,CAAWyC,MAAf,EAAuB;AACrB,WAAKF,UAAL;AACA;AACD;;AAED,QAAI,CAACM,SAAS,CAACR,IAAX,IAAmB,KAAKrC,KAAL,CAAWqC,IAAlC,EAAwC;AACtC,WAAKA,IAAL;AACD;;AAED,QAAIQ,SAAS,CAACR,IAAV,IAAkB,CAAC,KAAKrC,KAAL,CAAWqC,IAAlC,EAAwC;AACtC,WAAKpC,KAAL,CAAW6C,KAAX;AACD;AACF;;SAEDC,uBAAA;AACE,QAAI,KAAK/C,KAAL,CAAWqC,IAAX,IAAmB,CAAC,KAAKrC,KAAL,CAAWyC,MAAnC,EAA2C;AACzC,WAAKxC,KAAL,CAAW6C,KAAX;AACD;AACF;;SAEDE,SAAA;AACE,QAAI,KAAKhD,KAAL,CAAWyC,MAAf,EAAuB;AACrB,aACEC,aAAA,MAAA;AACEO,QAAAA,GAAG,EAAE,KAAKX;AACVY,QAAAA,SAAS,EAAE,KAAKlD,KAAL,CAAWkD;AACtBC,QAAAA,KAAK,EAAE,KAAKnD,KAAL,CAAWmD;OAHpB,CADF;AAOD;;AAED,QAAI,KAAKnD,KAAL,CAAWoD,QAAX,KAAwBC,SAA5B,EAAuC,OAAOX,aAAA,CAACA,QAAD,MAAA,CAAP;AAEvC,WACEA,aAAA,SAAA;AACES,MAAAA,KAAK,EAAE,KAAKnD,KAAL,CAAWmD;AAClBD,MAAAA,SAAS,EAAE,KAAKlD,KAAL,CAAWkD;AACtBI,MAAAA,OAAO,EAAE,KAAKjB;KAHhB,EAKG,KAAKrC,KAAL,CAAWoD,QALd,CADF;AASD;;;EApJ6CV;;;;"}
|
|
1
|
+
{"version":3,"file":"index.modern.js","sources":["../src/index.tsx"],"sourcesContent":["import * as React from 'react'\nimport DromoUploader, {\n IColumnHookInput,\n IColumnHookOutput,\n IColumnHook,\n IDeveloperField,\n IValidatorField,\n IDeveloperSettings,\n IRowHookInput,\n IRowHookOutput,\n IRowHook,\n IDeveloperStyleOverrides,\n IUser,\n IResultMetadata,\n IStepHook,\n IRowDeleteHook,\n IBeforeFinishCallback,\n IBulkRowHook,\n IImporterOptions,\n IParseFileCallback\n} from 'dromo-uploader-js'\n\ntype VerboseRequiredProps = {\n user: IUser\n fields: IDeveloperField[]\n licenseKey: string\n settings: IDeveloperSettings\n}\n\ntype SavedSchemaProps = {\n licenseKey: string\n} & ({ schemaName: string } | { schemaId: string }) &\n IImporterOptions\n\ntype CommonProps = {\n style?: React.CSSProperties\n className?: string\n rowHooks?: IRowHook[]\n bulkRowHooks?: IBulkRowHook[]\n rowDeleteHooks?: IRowDeleteHook[]\n columnHooks?: IColumnHook[]\n stepHooks?: IStepHook[]\n fileParsers?: { extensions: string[]; parseFile: IParseFileCallback }[]\n beforeFinish?: IBeforeFinishCallback\n onResults?: (data: any, metadata: IResultMetadata) => void\n onCancel?: () => void\n children?: React.ReactNode\n open?: boolean\n inline?: boolean\n}\n\ntype Props = (VerboseRequiredProps | SavedSchemaProps) & CommonProps\n\nexport default class DromoReactUploader extends React.Component<Props> {\n dromo: any\n inlineRef: React.RefObject<HTMLDivElement> | null = null\n\n constructor(props: Props) {\n super(props)\n\n if (props.inline) {\n this.inlineRef = React.createRef()\n }\n }\n\n init = () => {\n if ('fields' in this.props && 'settings' in this.props) {\n this.dromo = new DromoUploader(\n this.props.licenseKey,\n this.props.fields,\n this.props.settings,\n this.props.user\n )\n } else if ('schemaId' in this.props || 'schemaName' in this.props) {\n const idOrName =\n 'schemaId' in this.props ? this.props.schemaId : this.props.schemaName\n\n this.dromo = new DromoUploader(this.props.licenseKey, idOrName)\n\n if ('developmentMode' in this.props) {\n this.dromo.setDevelopmentMode(this.props.developmentMode)\n }\n if ('user' in this.props) {\n this.dromo.setUser(this.props.user)\n }\n if ('headerRowOverride' in this.props) {\n this.dromo.setHeaderRowOverride(this.props.headerRowOverride)\n }\n }\n\n if (this.props.rowHooks) {\n this.props.rowHooks.forEach((hook) => this.dromo.registerRowHook(hook))\n }\n\n if (this.props.bulkRowHooks) {\n this.props.bulkRowHooks.forEach((hook) =>\n this.dromo.registerBulkRowHook(hook)\n )\n }\n\n if (this.props.columnHooks) {\n this.props.columnHooks.forEach((hook) => {\n this.dromo.registerColumnHook(hook.fieldName, hook.callback)\n })\n }\n\n if (this.props.rowDeleteHooks) {\n this.props.rowDeleteHooks.forEach((hook) => {\n return this.dromo.registerRowDeleteHook(hook)\n })\n }\n\n if (this.props.beforeFinish) {\n this.dromo.beforeFinish(this.props.beforeFinish)\n }\n\n if (this.props.onResults) {\n this.dromo.onResults(this.props.onResults)\n }\n\n if (this.props.onCancel) {\n this.dromo.onCancel(this.props.onCancel)\n }\n\n if (this.props.stepHooks) {\n this.props.stepHooks.forEach((hook) => {\n this.dromo.registerStepHook(hook.type, hook.callback)\n })\n }\n\n if (this.props.fileParsers) {\n this.props.fileParsers.forEach((parser) => {\n this.dromo.registerFileParser(parser)\n })\n }\n }\n\n open = () => {\n this.init()\n this.dromo.open()\n }\n\n initInline = () => {\n if (!this.inlineRef) return\n\n this.init()\n this.dromo.initInline(this.inlineRef.current)\n }\n\n componentDidMount() {\n if (this.props.inline && this.inlineRef) {\n this.initInline()\n return\n }\n\n if (this.props.open) this.open()\n }\n\n componentDidUpdate(prevProps: Props) {\n if (this.props.inline) {\n this.initInline()\n return\n }\n\n if (!prevProps.open && this.props.open) {\n this.open()\n }\n\n if (prevProps.open && !this.props.open) {\n this.dromo.close()\n }\n }\n\n componentWillUnmount() {\n if (this.props.open && !this.props.inline) {\n this.dromo.close()\n }\n }\n\n render() {\n if (this.props.inline) {\n return (\n <div\n ref={this.inlineRef}\n className={this.props.className}\n style={this.props.style}\n />\n )\n }\n\n if (this.props.children === undefined) return <React.Fragment />\n\n return (\n <button\n style={this.props.style}\n className={this.props.className}\n onClick={this.open}\n >\n {this.props.children}\n </button>\n )\n }\n}\n\nexport {\n IDeveloperField,\n IDeveloperSettings,\n IUser,\n IColumnHookInput,\n IColumnHookOutput,\n IColumnHook,\n IRowHookInput,\n IRowHookOutput,\n IRowHook,\n IValidatorField,\n IDeveloperStyleOverrides,\n IResultMetadata,\n IStepHook,\n IRowDeleteHook,\n IBeforeFinishCallback,\n IBulkRowHook,\n IImporterOptions,\n IParseFileCallback\n}\n"],"names":["DromoReactUploader","_React$Component","_inheritsLoose","props","_this","call","dromo","DromoUploader","licenseKey","fields","settings","user","idOrName","schemaId","schemaName","setDevelopmentMode","developmentMode","setUser","setHeaderRowOverride","headerRowOverride","rowHooks","forEach","hook","registerRowHook","bulkRowHooks","registerBulkRowHook","columnHooks","registerColumnHook","fieldName","callback","rowDeleteHooks","registerRowDeleteHook","beforeFinish","onResults","onCancel","stepHooks","registerStepHook","type","fileParsers","parser","registerFileParser","init","open","inlineRef","initInline","current","inline","React","_proto","prototype","componentDidMount","componentDidUpdate","prevProps","close","componentWillUnmount","render","ref","className","style","children","undefined","onClick"],"mappings":";;;;;;;;;IAqDqBA,kBAAmB,0BAAAC,gBAAA;EAAAC,cAAA,CAAAF,kBAAA,EAAAC,gBAAA;EAItC,SAAAD,mBAAYG,KAAY;;IACtBC,KAAA,GAAAH,gBAAA,CAAAI,IAAA,OAAMF,KAAK,CAAC;IAHdC,KAAA,UAAS,GAA2C,IAAI;IAUxDA,KAAA,KAAI,GAAG;MACL,IAAI,QAAQ,IAAIA,KAAA,CAAKD,KAAK,IAAI,UAAU,IAAIC,KAAA,CAAKD,KAAK,EAAE;QACtDC,KAAA,CAAKE,KAAK,GAAG,IAAIC,aAAa,CAC5BH,KAAA,CAAKD,KAAK,CAACK,UAAU,EACrBJ,KAAA,CAAKD,KAAK,CAACM,MAAM,EACjBL,KAAA,CAAKD,KAAK,CAACO,QAAQ,EACnBN,KAAA,CAAKD,KAAK,CAACQ,IAAI,CAChB;OACF,MAAM,IAAI,UAAU,IAAIP,KAAA,C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AE;MACzC,IAAI,CAACxC,KAAK,CAAC+C,KAAK,EAAE;;GAErB;EAAAL,MAAA,CAEDO,MAAM,GAAN,SAAAA;IACE,IAAI,IAAI,CAACpD,KAAK,CAAC2C,MAAM,EAAE;MACrB,OACEC;QACES,GAAG,EAAE,IAAI,CAACb,SAAS;QACnBc,SAAS,EAAE,IAAI,CAACtD,KAAK,CAACsD,SAAS;QAC/BC,KAAK,EAAE,IAAI,CAACvD,KAAK,CAACuD;QAClB;;IAIN,IAAI,IAAI,CAACvD,KAAK,CAACwD,QAAQ,KAAKC,SAAS,EAAE,OAAOb,cAACA,QAAc,OAAG;IAEhE,OACEA;MACEW,KAAK,EAAE,IAAI,CAACvD,KAAK,CAACuD,KAAK;MACvBD,SAAS,EAAE,IAAI,CAACtD,KAAK,CAACsD,SAAS;MAC/BI,OAAO,EAAE,IAAI,CAACnB;OAEb,IAAI,CAACvC,KAAK,CAACwD,QAAQ,CACb;GAEZ;EAAA,OAAA3D,kBAAA;AAAA,EApJ6C+C,SAAsB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dromo-uploader-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Easy to use data (CSV, TSV, Excel) importer",
|
|
5
5
|
"author": "ankitgoyal100",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"eslint-plugin-promise": "^4.2.1",
|
|
49
49
|
"eslint-plugin-react": "^7.17.0",
|
|
50
50
|
"eslint-plugin-standard": "^4.0.1",
|
|
51
|
-
"gh-pages": "^
|
|
51
|
+
"gh-pages": "^5.0.0",
|
|
52
52
|
"microbundle-crl": "^0.13.10",
|
|
53
53
|
"npm-run-all": "^4.1.5",
|
|
54
54
|
"prettier": "^2.0.4",
|
|
@@ -57,10 +57,44 @@
|
|
|
57
57
|
"react-scripts": "^3.4.1",
|
|
58
58
|
"typescript": "^3.7.5"
|
|
59
59
|
},
|
|
60
|
+
"overrides": {
|
|
61
|
+
"ansi-html": "^0.0.8",
|
|
62
|
+
"ansi-regex": "^5.0.1",
|
|
63
|
+
"async": "^2.6.4",
|
|
64
|
+
"body-parser": "^1.20.3",
|
|
65
|
+
"braces": "^3.0.3",
|
|
66
|
+
"browserify-sign": "^4.2.2",
|
|
67
|
+
"cross-spawn": "^7.0.5",
|
|
68
|
+
"decode-uri-component": "^0.2.1",
|
|
69
|
+
"dns-packet": "^1.3.2",
|
|
70
|
+
"follow-redirects": "^1.14.7",
|
|
71
|
+
"glob-parent": "^5.1.2",
|
|
72
|
+
"is-svg": "^4.3.0",
|
|
73
|
+
"json5": "^2.2.2",
|
|
74
|
+
"loader-utils@^1.0.0": "^1.4.2",
|
|
75
|
+
"loader-utils@^2.0.0": "^2.0.4",
|
|
76
|
+
"minimatch": "^3.0.5",
|
|
77
|
+
"minimist": "^1.2.8",
|
|
78
|
+
"node-forge": "^1.3.2",
|
|
79
|
+
"nth-check": "^2.0.1",
|
|
80
|
+
"path-to-regexp": "^0.1.12",
|
|
81
|
+
"qs": "^6.14.1",
|
|
82
|
+
"semver@^6.0.0": "^6.3.1",
|
|
83
|
+
"semver@^7.0.0": "^7.5.2",
|
|
84
|
+
"ssri@^6.0.0": "^6.0.2",
|
|
85
|
+
"ssri@^7.0.0": "^7.1.1",
|
|
86
|
+
"terser": "^4.8.1",
|
|
87
|
+
"tmpl": "^1.0.5",
|
|
88
|
+
"ws@^5.0.0": "^5.2.4",
|
|
89
|
+
"ws@^6.0.0": "^6.2.3",
|
|
90
|
+
"@babel/traverse": "^7.23.2",
|
|
91
|
+
"form-data": "^2.5.4",
|
|
92
|
+
"shell-quote": "^1.7.3"
|
|
93
|
+
},
|
|
60
94
|
"files": [
|
|
61
95
|
"dist"
|
|
62
96
|
],
|
|
63
97
|
"dependencies": {
|
|
64
|
-
"dromo-uploader-js": "^2.
|
|
98
|
+
"dromo-uploader-js": "^2.7.0"
|
|
65
99
|
}
|
|
66
100
|
}
|