@arquimedes.co/eureka-forms 0.2.26-test → 0.2.28-test

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.
@@ -133,7 +133,7 @@ function ColumnForm(_a) {
133
133
  return (_jsxs("div", __assign({ className: styles.container, style: { color: formStyle.textColor } }, { children: [loading && _jsx("div", { className: styles.curtain }, void 0), showConfirmation !== undefined && (_jsx(ConfirmationDialog, { formStyle: formStyle, confirmation: showConfirmation, onClose: function () {
134
134
  reload();
135
135
  setShowConfirmation(undefined);
136
- } }, void 0)), sections.map(function (idSection, index) { return (_jsx(SectionComponent, { form: form, postview: postview, clearErrors: clearErrors, widthStats: widthStats, control: control, getValues: getValues, originalValues: originalValues, errors: errors, index: index, setSections: setSections, section: form.sections[idSection], formStyle: formStyle, customSteps: customSteps }, index)); }), form.terms &&
136
+ } }, void 0)), sections.map(function (idSection, index) { return (_jsx(SectionComponent, { form: form, domain: domain, postview: postview, clearErrors: clearErrors, widthStats: widthStats, control: control, getValues: getValues, originalValues: originalValues, errors: errors, index: index, setSections: setSections, section: form.sections[idSection], formStyle: formStyle, customSteps: customSteps }, index)); }), form.terms &&
137
137
  !internal &&
138
138
  form.terms.map(function (term, index) { return (_jsx(TermComponent, { setValue: setValue, postview: postview, tempError: tempError, term: term, control: control, errors: errors, form: form, formStyle: formStyle }, index)); }), !postview && (_jsx("div", __assign({ className: styles.submitBtnContainer }, { children: _jsxs("button", __assign({ "data-testid": "login__submit", className: styles.submitBtn, onClick: function () {
139
139
  onSubmit();
@@ -65,7 +65,7 @@ import { getUploadUrls } from '../../../../controllers/FileService';
65
65
  import FileComponent from './FileComponent/FileComponent';
66
66
  function FileUploadStep(_a) {
67
67
  var _b;
68
- var step = _a.step, errors = _a.errors, postview = _a.postview, onChange = _a.onChange, formStyle = _a.formStyle, clearErrors = _a.clearErrors, originalValues = _a.originalValues;
68
+ var step = _a.step, errors = _a.errors, postview = _a.postview, onChange = _a.onChange, formStyle = _a.formStyle, domain = _a.domain, clearErrors = _a.clearErrors, originalValues = _a.originalValues;
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 = {
@@ -106,7 +106,7 @@ function FileUploadStep(_a) {
106
106
  _a.label = 2;
107
107
  case 2:
108
108
  _a.trys.push([2, 4, , 5]);
109
- return [4 /*yield*/, getUploadUrls(pFiles)];
109
+ return [4 /*yield*/, getUploadUrls(pFiles, domain)];
110
110
  case 3:
111
111
  fileLinks_1 = _a.sent();
112
112
  setFiles(__spreadArray(__spreadArray([], currentFiles, true), pFiles.map(function (file, index) {
@@ -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;
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.26-test",
4
+ "version": "0.2.28-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",