@formio/js 5.0.0-dev.5718.37a9ce7 → 5.0.0-dev.5720.5431de8
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/formio.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/Form.js +2 -0
- package/lib/cjs/WebformBuilder.js +0 -1
- package/lib/mjs/Form.js +2 -0
- package/lib/mjs/WebformBuilder.js +0 -1
- package/package.json +1 -1
package/lib/cjs/Form.js
CHANGED
|
@@ -31,6 +31,7 @@ const Formio_1 = require("./Formio");
|
|
|
31
31
|
const displays_1 = __importDefault(require("./displays"));
|
|
32
32
|
const templates_1 = __importDefault(require("./templates"));
|
|
33
33
|
const FormioUtils = __importStar(require("./utils/utils"));
|
|
34
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
34
35
|
class Form extends Element_1.default {
|
|
35
36
|
constructor(elementOrForm, formOrOptions, options = {}) {
|
|
36
37
|
let element, form, formOptions;
|
|
@@ -224,6 +225,7 @@ class Form extends Element_1.default {
|
|
|
224
225
|
this.instance = this.instance || this.create(form.display);
|
|
225
226
|
const options = this.getFormInitOptions(formParam, form);
|
|
226
227
|
this.instance.setUrl(formParam, options);
|
|
228
|
+
lodash_1.default.set(form, 'config.myApiUrl', options.project);
|
|
227
229
|
this.instance.nosubmit = false;
|
|
228
230
|
this._form = this.instance.form = form;
|
|
229
231
|
if (submission) {
|
|
@@ -1082,7 +1082,6 @@ class WebformBuilder extends Component_1.default {
|
|
|
1082
1082
|
lodash_1.default.pull(newComp.validators, 'required');
|
|
1083
1083
|
parentComponent.tabs[tabIndex].splice(index, 1, newComp);
|
|
1084
1084
|
newComp.checkValidity = () => true;
|
|
1085
|
-
newComp.checkComponentValidity = () => true;
|
|
1086
1085
|
newComp.build(defaultValueComponent.element);
|
|
1087
1086
|
}
|
|
1088
1087
|
}
|
package/lib/mjs/Form.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Formio } from './Formio';
|
|
|
3
3
|
import Displays from './displays';
|
|
4
4
|
import templates from './templates';
|
|
5
5
|
import * as FormioUtils from './utils/utils';
|
|
6
|
+
import _ from "lodash";
|
|
6
7
|
export default class Form extends Element {
|
|
7
8
|
/**
|
|
8
9
|
* Represents a JSON value.
|
|
@@ -293,6 +294,7 @@ export default class Form extends Element {
|
|
|
293
294
|
this.instance = this.instance || this.create(form.display);
|
|
294
295
|
const options = this.getFormInitOptions(formParam, form);
|
|
295
296
|
this.instance.setUrl(formParam, options);
|
|
297
|
+
_.set(form, 'config.myApiUrl', options.project);
|
|
296
298
|
this.instance.nosubmit = false;
|
|
297
299
|
this._form = this.instance.form = form;
|
|
298
300
|
if (submission) {
|
|
@@ -1066,7 +1066,6 @@ export default class WebformBuilder extends Component {
|
|
|
1066
1066
|
_.pull(newComp.validators, 'required');
|
|
1067
1067
|
parentComponent.tabs[tabIndex].splice(index, 1, newComp);
|
|
1068
1068
|
newComp.checkValidity = () => true;
|
|
1069
|
-
newComp.checkComponentValidity = () => true;
|
|
1070
1069
|
newComp.build(defaultValueComponent.element);
|
|
1071
1070
|
}
|
|
1072
1071
|
}
|