@arquimedes.co/eureka-forms 0.2.27 → 0.2.29

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.
@@ -6,8 +6,8 @@ export interface FileObj {
6
6
  postInfo?: any;
7
7
  }
8
8
  export interface UploadedFileObj {
9
- lblFile: string;
10
- name: string;
9
+ fileName: string;
10
+ S3Key: string;
11
11
  }
12
12
  declare function UploadStepComponent(props: FileUploadStepProps): JSX.Element;
13
13
  export default UploadStepComponent;
@@ -69,7 +69,7 @@ function FileUploadStep(_a) {
69
69
  var _c = useState(((_b = originalValues[step.id]) !== null && _b !== void 0 ? _b : []).map(function (file) {
70
70
  var _a;
71
71
  return ((_a = {
72
- file: new File([], file.lblFile),
72
+ file: new File([], file.fileName),
73
73
  loading: 'DONE',
74
74
  }) !== null && _a !== void 0 ? _a : []);
75
75
  })), files = _c[0], setFiles = _c[1];
@@ -141,9 +141,9 @@ function FileUploadStep(_a) {
141
141
  }
142
142
  }
143
143
  } }, void 0) }), void 0), !!errors[step.id] && (_jsx("div", __assign({ className: styles.errorMsg, style: { color: formStyle.errorColor } }, { children: "Este campo es obligatorio" }), void 0)), _jsx("div", __assign({ className: styles.filesContainer }, { children: files.map(function (file, index) { return (_jsx(FileComponent, { formStyle: formStyle, fileInfo: file, handleRemoveUploaded: function (fileToDelete) {
144
- var tempArray = uploadedFiles.filter(function (file) { return file.name !== fileToDelete.name; });
144
+ var tempArray = uploadedFiles.filter(function (file) { return file.S3Key !== fileToDelete.S3Key; });
145
145
  var tempFiles = files.filter(function (file) {
146
- return file.postInfo.name !== fileToDelete.name;
146
+ return file.postInfo.S3Key !== fileToDelete.S3Key;
147
147
  });
148
148
  setFiles(tempFiles);
149
149
  onChange(tempArray);
@@ -1,5 +1,5 @@
1
1
  export declare function getUploadUrls(files: Array<File>, domain?: string): Promise<Array<Record<string, any>>>;
2
2
  export declare function postFile(file: File, postInfo: Record<string, any>): Promise<{
3
- lblFile: string;
4
- name: string;
3
+ fileName: string;
4
+ S3Key: string;
5
5
  }>;
@@ -48,14 +48,14 @@ export function getUploadUrls(files, domain) {
48
48
  extension: file.name.split('.').pop(),
49
49
  }); });
50
50
  if (!domain) return [3 /*break*/, 2];
51
- return [4 /*yield*/, axiosInstance.post('/uploadfile', filesArray)];
51
+ return [4 /*yield*/, axios.post("https://" + domain + ".forms." + process.env.REACT_APP_DOMAIN + "/api/uploadfile", {
52
+ domain: domain,
53
+ files: filesArray,
54
+ })];
52
55
  case 1:
53
56
  response = _b.sent();
54
57
  return [3 /*break*/, 4];
55
- case 2: return [4 /*yield*/, axios.post("https://" + domain + ".forms." + process.env.REACT_APP_DOMAIN + "/api/uploadfile", {
56
- domain: domain,
57
- files: filesArray,
58
- })];
58
+ case 2: return [4 /*yield*/, axiosInstance.post('/uploadfile', filesArray)];
59
59
  case 3:
60
60
  response = _b.sent();
61
61
  _b.label = 4;
@@ -85,8 +85,8 @@ export function postFile(file, postInfo) {
85
85
  case 1:
86
86
  _a.sent();
87
87
  return [2 /*return*/, {
88
- lblFile: file.name,
89
- name: postInfo.name,
88
+ fileName: file.name,
89
+ S3Key: postInfo.S3Key,
90
90
  }];
91
91
  }
92
92
  });
@@ -82,6 +82,9 @@ var useOutlinedInputStyles = function (props) {
82
82
  '&$focused $notchedOutline': {
83
83
  borderColor: props.focusColor,
84
84
  },
85
+ '& .EF-MuiSelect-icon.Mui-disabled': {
86
+ color: props.outlineColor,
87
+ },
85
88
  borderRadius: 10,
86
89
  color: props.color,
87
90
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version": "0.2.27",
4
+ "version": "0.2.29",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",
@@ -74,5 +74,6 @@
74
74
  "main": "./dist/index.lib.js",
75
75
  "files": [
76
76
  "/dist"
77
- ]
77
+ ],
78
+ "proxy": "https://arquimedes.forms.eureka-test.click"
78
79
  }