dromo-uploader-react 2.6.0 → 2.8.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 CHANGED
@@ -3,143 +3,116 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
3
3
  var React = require('react');
4
4
  var DromoUploader = _interopDefault(require('dromo-uploader-js'));
5
5
 
6
- function _inheritsLoose(subClass, superClass) {
7
- subClass.prototype = Object.create(superClass.prototype);
8
- subClass.prototype.constructor = subClass;
9
- subClass.__proto__ = superClass;
6
+ function _inheritsLoose(t, o) {
7
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
8
+ }
9
+ function _setPrototypeOf(t, e) {
10
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
11
+ return t.__proto__ = e, t;
12
+ }, _setPrototypeOf(t, e);
10
13
  }
11
14
 
12
15
  var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
13
- _inheritsLoose(DromoReactUploader, _React$Component);
14
-
15
16
  function DromoReactUploader(props) {
16
17
  var _this;
17
-
18
18
  _this = _React$Component.call(this, props) || this;
19
19
  _this.inlineRef = null;
20
-
21
20
  _this.init = function () {
22
21
  if ('fields' in _this.props && 'settings' in _this.props) {
23
22
  _this.dromo = new DromoUploader(_this.props.licenseKey, _this.props.fields, _this.props.settings, _this.props.user);
24
23
  } else if ('schemaId' in _this.props || 'schemaName' in _this.props) {
25
24
  var idOrName = 'schemaId' in _this.props ? _this.props.schemaId : _this.props.schemaName;
26
25
  _this.dromo = new DromoUploader(_this.props.licenseKey, idOrName);
27
-
28
26
  if ('developmentMode' in _this.props) {
29
27
  _this.dromo.setDevelopmentMode(_this.props.developmentMode);
30
28
  }
31
-
32
29
  if ('user' in _this.props) {
33
30
  _this.dromo.setUser(_this.props.user);
34
31
  }
35
-
36
32
  if ('headerRowOverride' in _this.props) {
37
33
  _this.dromo.setHeaderRowOverride(_this.props.headerRowOverride);
38
34
  }
39
35
  }
40
-
41
36
  if (_this.props.rowHooks) {
42
37
  _this.props.rowHooks.forEach(function (hook) {
43
38
  return _this.dromo.registerRowHook(hook);
44
39
  });
45
40
  }
46
-
47
41
  if (_this.props.bulkRowHooks) {
48
42
  _this.props.bulkRowHooks.forEach(function (hook) {
49
43
  return _this.dromo.registerBulkRowHook(hook);
50
44
  });
51
45
  }
52
-
53
46
  if (_this.props.columnHooks) {
54
47
  _this.props.columnHooks.forEach(function (hook) {
55
48
  _this.dromo.registerColumnHook(hook.fieldName, hook.callback);
56
49
  });
57
50
  }
58
-
59
51
  if (_this.props.rowDeleteHooks) {
60
52
  _this.props.rowDeleteHooks.forEach(function (hook) {
61
53
  return _this.dromo.registerRowDeleteHook(hook);
62
54
  });
63
55
  }
64
-
65
56
  if (_this.props.beforeFinish) {
66
57
  _this.dromo.beforeFinish(_this.props.beforeFinish);
67
58
  }
68
-
69
59
  if (_this.props.onResults) {
70
60
  _this.dromo.onResults(_this.props.onResults);
71
61
  }
72
-
73
62
  if (_this.props.onCancel) {
74
63
  _this.dromo.onCancel(_this.props.onCancel);
75
64
  }
76
-
77
65
  if (_this.props.stepHooks) {
78
66
  _this.props.stepHooks.forEach(function (hook) {
79
67
  _this.dromo.registerStepHook(hook.type, hook.callback);
80
68
  });
81
69
  }
82
-
83
70
  if (_this.props.fileParsers) {
84
71
  _this.props.fileParsers.forEach(function (parser) {
85
72
  _this.dromo.registerFileParser(parser);
86
73
  });
87
74
  }
88
75
  };
89
-
90
76
  _this.open = function () {
91
77
  _this.init();
92
-
93
78
  _this.dromo.open();
94
79
  };
95
-
96
80
  _this.initInline = function () {
97
81
  if (!_this.inlineRef) return;
98
-
99
82
  _this.init();
100
-
101
83
  _this.dromo.initInline(_this.inlineRef.current);
102
84
  };
103
-
104
85
  if (props.inline) {
105
86
  _this.inlineRef = React.createRef();
106
87
  }
107
-
108
88
  return _this;
109
89
  }
110
-
90
+ _inheritsLoose(DromoReactUploader, _React$Component);
111
91
  var _proto = DromoReactUploader.prototype;
112
-
113
92
  _proto.componentDidMount = function componentDidMount() {
114
93
  if (this.props.inline && this.inlineRef) {
115
94
  this.initInline();
116
95
  return;
117
96
  }
118
-
119
97
  if (this.props.open) this.open();
120
98
  };
121
-
122
99
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
123
100
  if (this.props.inline) {
124
101
  this.initInline();
125
102
  return;
126
103
  }
127
-
128
104
  if (!prevProps.open && this.props.open) {
129
105
  this.open();
130
106
  }
131
-
132
107
  if (prevProps.open && !this.props.open) {
133
108
  this.dromo.close();
134
109
  }
135
110
  };
136
-
137
111
  _proto.componentWillUnmount = function componentWillUnmount() {
138
112
  if (this.props.open && !this.props.inline) {
139
113
  this.dromo.close();
140
114
  }
141
115
  };
142
-
143
116
  _proto.render = function render() {
144
117
  if (this.props.inline) {
145
118
  return React.createElement("div", {
@@ -148,7 +121,6 @@ var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
148
121
  style: this.props.style
149
122
  });
150
123
  }
151
-
152
124
  if (this.props.children === undefined) return React.createElement(React.Fragment, null);
153
125
  return React.createElement("button", {
154
126
  style: this.props.style,
@@ -156,7 +128,6 @@ var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
156
128
  onClick: this.open
157
129
  }, this.props.children);
158
130
  };
159
-
160
131
  return DromoReactUploader;
161
132
  }(React.Component);
162
133
 
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,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,UAA7B,EAAyCI,QAAzC,CAAb;;AAEA,YAAI,qBAAqB,MAAKP,KAA9B,EAAqC;AACnC,gBAAKC,KAAL,CAAWS,kBAAX,CAA8B,MAAKV,KAAL,CAAWW,eAAzC;AACD;;AACD,YAAI,UAAU,MAAKX,KAAnB,EAA0B;AACxB,gBAAKC,KAAL,CAAWW,OAAX,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AX,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,mBAAA,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,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","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","_inheritsLoose","_proto","prototype","componentDidMount","componentDidUpdate","prevProps","close","componentWillUnmount","render","ref","className","style","children","undefined","onClick"],"mappings":";;;;;;;;;;;;;;IAqDqBA,kBAAmB,0BAAAC,gBAAA;EAItC,SAAAD,mBAAYE,KAAY;;IACtBC,KAAA,GAAAF,gBAAA,CAAAG,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,CAAKD,KAAK,IAAI,YAAY,IAAIC,KAAA,CAAKD,KAAK,EAAE;QACjE,IAAMS,QAAQ,GACZ,UAAU,IAAIR,KAAA,CAAKD,KAAK,GAAGC,KAAA,CAAKD,KAAK,CAACU,QAAQ,GAAGT,KAAA,CAAKD,KAAK,CAACW,UAAU;QAExEV,KAAA,CAAKE,KAAK,GAAG,IAAIC,aAAa,CAACH,KAAA,CAAKD,KAAK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SAAS;QACnBe,SAAS,EAAE,IAAI,CAACvD,KAAK,CAACuD,SAAS;QAC/BC,KAAK,EAAE,IAAI,CAACxD,KAAK,CAACwD;QAClB;;IAIN,IAAI,IAAI,CAACxD,KAAK,CAACyD,QAAQ,KAAKC,SAAS,EAAE,OAAOd,oBAACA,cAAc,OAAG;IAEhE,OACEA;MACEY,KAAK,EAAE,IAAI,CAACxD,KAAK,CAACwD,KAAK;MACvBD,SAAS,EAAE,IAAI,CAACvD,KAAK,CAACuD,SAAS;MAC/BI,OAAO,EAAE,IAAI,CAACpB;OAEb,IAAI,CAACvC,KAAK,CAACyD,QAAQ,CACb;GAEZ;EAAA,OAAA3D,kBAAA;AAAA,EApJ6C8C,eAAsB;;;;"}
@@ -1,143 +1,116 @@
1
1
  import { createElement, Fragment, createRef, Component } from 'react';
2
2
  import DromoUploader from 'dromo-uploader-js';
3
3
 
4
- function _inheritsLoose(subClass, superClass) {
5
- subClass.prototype = Object.create(superClass.prototype);
6
- subClass.prototype.constructor = subClass;
7
- subClass.__proto__ = superClass;
4
+ function _inheritsLoose(t, o) {
5
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
6
+ }
7
+ function _setPrototypeOf(t, e) {
8
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
9
+ return t.__proto__ = e, t;
10
+ }, _setPrototypeOf(t, e);
8
11
  }
9
12
 
10
13
  var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
11
- _inheritsLoose(DromoReactUploader, _React$Component);
12
-
13
14
  function DromoReactUploader(props) {
14
15
  var _this;
15
-
16
16
  _this = _React$Component.call(this, props) || this;
17
17
  _this.inlineRef = null;
18
-
19
18
  _this.init = function () {
20
19
  if ('fields' in _this.props && 'settings' in _this.props) {
21
20
  _this.dromo = new DromoUploader(_this.props.licenseKey, _this.props.fields, _this.props.settings, _this.props.user);
22
21
  } else if ('schemaId' in _this.props || 'schemaName' in _this.props) {
23
22
  var idOrName = 'schemaId' in _this.props ? _this.props.schemaId : _this.props.schemaName;
24
23
  _this.dromo = new DromoUploader(_this.props.licenseKey, idOrName);
25
-
26
24
  if ('developmentMode' in _this.props) {
27
25
  _this.dromo.setDevelopmentMode(_this.props.developmentMode);
28
26
  }
29
-
30
27
  if ('user' in _this.props) {
31
28
  _this.dromo.setUser(_this.props.user);
32
29
  }
33
-
34
30
  if ('headerRowOverride' in _this.props) {
35
31
  _this.dromo.setHeaderRowOverride(_this.props.headerRowOverride);
36
32
  }
37
33
  }
38
-
39
34
  if (_this.props.rowHooks) {
40
35
  _this.props.rowHooks.forEach(function (hook) {
41
36
  return _this.dromo.registerRowHook(hook);
42
37
  });
43
38
  }
44
-
45
39
  if (_this.props.bulkRowHooks) {
46
40
  _this.props.bulkRowHooks.forEach(function (hook) {
47
41
  return _this.dromo.registerBulkRowHook(hook);
48
42
  });
49
43
  }
50
-
51
44
  if (_this.props.columnHooks) {
52
45
  _this.props.columnHooks.forEach(function (hook) {
53
46
  _this.dromo.registerColumnHook(hook.fieldName, hook.callback);
54
47
  });
55
48
  }
56
-
57
49
  if (_this.props.rowDeleteHooks) {
58
50
  _this.props.rowDeleteHooks.forEach(function (hook) {
59
51
  return _this.dromo.registerRowDeleteHook(hook);
60
52
  });
61
53
  }
62
-
63
54
  if (_this.props.beforeFinish) {
64
55
  _this.dromo.beforeFinish(_this.props.beforeFinish);
65
56
  }
66
-
67
57
  if (_this.props.onResults) {
68
58
  _this.dromo.onResults(_this.props.onResults);
69
59
  }
70
-
71
60
  if (_this.props.onCancel) {
72
61
  _this.dromo.onCancel(_this.props.onCancel);
73
62
  }
74
-
75
63
  if (_this.props.stepHooks) {
76
64
  _this.props.stepHooks.forEach(function (hook) {
77
65
  _this.dromo.registerStepHook(hook.type, hook.callback);
78
66
  });
79
67
  }
80
-
81
68
  if (_this.props.fileParsers) {
82
69
  _this.props.fileParsers.forEach(function (parser) {
83
70
  _this.dromo.registerFileParser(parser);
84
71
  });
85
72
  }
86
73
  };
87
-
88
74
  _this.open = function () {
89
75
  _this.init();
90
-
91
76
  _this.dromo.open();
92
77
  };
93
-
94
78
  _this.initInline = function () {
95
79
  if (!_this.inlineRef) return;
96
-
97
80
  _this.init();
98
-
99
81
  _this.dromo.initInline(_this.inlineRef.current);
100
82
  };
101
-
102
83
  if (props.inline) {
103
84
  _this.inlineRef = createRef();
104
85
  }
105
-
106
86
  return _this;
107
87
  }
108
-
88
+ _inheritsLoose(DromoReactUploader, _React$Component);
109
89
  var _proto = DromoReactUploader.prototype;
110
-
111
90
  _proto.componentDidMount = function componentDidMount() {
112
91
  if (this.props.inline && this.inlineRef) {
113
92
  this.initInline();
114
93
  return;
115
94
  }
116
-
117
95
  if (this.props.open) this.open();
118
96
  };
119
-
120
97
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
121
98
  if (this.props.inline) {
122
99
  this.initInline();
123
100
  return;
124
101
  }
125
-
126
102
  if (!prevProps.open && this.props.open) {
127
103
  this.open();
128
104
  }
129
-
130
105
  if (prevProps.open && !this.props.open) {
131
106
  this.dromo.close();
132
107
  }
133
108
  };
134
-
135
109
  _proto.componentWillUnmount = function componentWillUnmount() {
136
110
  if (this.props.open && !this.props.inline) {
137
111
  this.dromo.close();
138
112
  }
139
113
  };
140
-
141
114
  _proto.render = function render() {
142
115
  if (this.props.inline) {
143
116
  return createElement("div", {
@@ -146,7 +119,6 @@ var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
146
119
  style: this.props.style
147
120
  });
148
121
  }
149
-
150
122
  if (this.props.children === undefined) return createElement(Fragment, null);
151
123
  return createElement("button", {
152
124
  style: this.props.style,
@@ -154,7 +126,6 @@ var DromoReactUploader = /*#__PURE__*/function (_React$Component) {
154
126
  onClick: this.open
155
127
  }, this.props.children);
156
128
  };
157
-
158
129
  return DromoReactUploader;
159
130
  }(Component);
160
131
 
@@ -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,GAA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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","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","_inheritsLoose","_proto","prototype","componentDidMount","componentDidUpdate","prevProps","close","componentWillUnmount","render","ref","className","style","children","undefined","onClick"],"mappings":";;;;;;;;;;;;IAqDqBA,kBAAmB,0BAAAC,gBAAA;EAItC,SAAAD,mBAAYE,KAAY;;IACtBC,KAAA,GAAAF,gBAAA,CAAAG,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,CA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AAK,CAACuC,IAAI,IAAI,CAAC,IAAI,CAACvC,KAAK,CAAC2C,MAAM,EAAE;MACzC,IAAI,CAACxC,KAAK,CAACgD,KAAK,EAAE;;GAErB;EAAAL,MAAA,CAEDO,MAAM,GAAN,SAAAA,MAAMA;IACJ,IAAI,IAAI,CAACrD,KAAK,CAAC2C,MAAM,EAAE;MACrB,OACEC;QACEU,GAAG,EAAE,IAAI,CAACd,SAAS;QACnBe,SAAS,EAAE,IAAI,CAACvD,KAAK,CAACuD,SAAS;QAC/BC,KAAK,EAAE,IAAI,CAACxD,KAAK,CAACwD;QAClB;;IAIN,IAAI,IAAI,CAACxD,KAAK,CAACyD,QAAQ,KAAKC,SAAS,EAAE,OAAOd,cAACA,QAAc,OAAG;IAEhE,OACEA;MACEY,KAAK,EAAE,IAAI,CAACxD,KAAK,CAACwD,KAAK;MACvBD,SAAS,EAAE,IAAI,CAACvD,KAAK,CAACuD,SAAS;MAC/BI,OAAO,EAAE,IAAI,CAACpB;OAEb,IAAI,CAACvC,KAAK,CAACyD,QAAQ,CACb;GAEZ;EAAA,OAAA3D,kBAAA;AAAA,EApJ6C8C,SAAsB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dromo-uploader-react",
3
- "version": "2.6.0",
3
+ "version": "2.8.0",
4
4
  "description": "Easy to use data (CSV, TSV, Excel) importer",
5
5
  "author": "ankitgoyal100",
6
6
  "license": "MIT",
@@ -34,33 +34,68 @@
34
34
  "@types/node": "^12.12.38",
35
35
  "@types/react": "^18.0.6",
36
36
  "@types/react-dom": "^18.0.6",
37
- "@typescript-eslint/eslint-plugin": "^2.26.0",
38
- "@typescript-eslint/parser": "^2.26.0",
37
+ "@typescript-eslint/eslint-plugin": "^8.56.1",
38
+ "@typescript-eslint/parser": "^8.56.1",
39
39
  "babel-eslint": "^10.0.3",
40
40
  "cross-env": "^7.0.2",
41
- "eslint": "^6.8.0",
41
+ "eslint": "^8.57.1",
42
42
  "eslint-config-prettier": "^6.7.0",
43
- "eslint-config-standard": "^14.1.0",
43
+ "eslint-config-standard": "^17.1.0",
44
44
  "eslint-config-standard-react": "^9.2.0",
45
- "eslint-plugin-import": "^2.18.2",
45
+ "eslint-plugin-import": "^2.32.0",
46
+ "eslint-plugin-n": "^16.6.2",
46
47
  "eslint-plugin-node": "^11.0.0",
47
48
  "eslint-plugin-prettier": "^3.1.1",
48
- "eslint-plugin-promise": "^4.2.1",
49
- "eslint-plugin-react": "^7.17.0",
49
+ "eslint-plugin-promise": "^6.6.0",
50
+ "eslint-plugin-react": "^7.37.5",
50
51
  "eslint-plugin-standard": "^4.0.1",
51
- "gh-pages": "^2.2.0",
52
+ "gh-pages": "^5.0.0",
52
53
  "microbundle-crl": "^0.13.10",
53
54
  "npm-run-all": "^4.1.5",
54
55
  "prettier": "^2.0.4",
55
56
  "react": "^18.2.0",
56
57
  "react-dom": "^18.2.0",
57
- "react-scripts": "^3.4.1",
58
- "typescript": "^3.7.5"
58
+ "react-scripts": "^5.0.1",
59
+ "typescript": "^4.9.5"
60
+ },
61
+ "overrides": {
62
+ "ansi-html": "^0.0.8",
63
+ "ansi-regex": "^5.0.1",
64
+ "async": "^2.6.4",
65
+ "body-parser": "^1.20.3",
66
+ "braces": "^3.0.3",
67
+ "browserify-sign": "^4.2.2",
68
+ "cross-spawn": "^7.0.5",
69
+ "decode-uri-component": "^0.2.1",
70
+ "dns-packet": "^1.3.2",
71
+ "follow-redirects": "^1.14.7",
72
+ "glob-parent": "^5.1.2",
73
+ "is-svg": "^4.3.0",
74
+ "json5": "^2.2.2",
75
+ "loader-utils@^1.0.0": "^1.4.2",
76
+ "loader-utils@^2.0.0": "^2.0.4",
77
+ "minimatch": "^3.0.5",
78
+ "minimist": "^1.2.8",
79
+ "node-forge": "^1.3.2",
80
+ "nth-check": "^2.0.1",
81
+ "path-to-regexp": "^0.1.12",
82
+ "qs": "^6.14.1",
83
+ "semver@^6.0.0": "^6.3.1",
84
+ "semver@^7.0.0": "^7.5.2",
85
+ "ssri@^6.0.0": "^6.0.2",
86
+ "ssri@^7.0.0": "^7.1.1",
87
+ "terser": "^4.8.1",
88
+ "tmpl": "^1.0.5",
89
+ "ws@^5.0.0": "^5.2.4",
90
+ "ws@^6.0.0": "^6.2.3",
91
+ "@babel/traverse": "^7.23.2",
92
+ "form-data": "^2.5.4",
93
+ "shell-quote": "^1.7.3"
59
94
  },
60
95
  "files": [
61
96
  "dist"
62
97
  ],
63
98
  "dependencies": {
64
- "dromo-uploader-js": "^2.6.0"
99
+ "dromo-uploader-js": "^2.8.0"
65
100
  }
66
101
  }