@formio/js 5.0.0-dev.5641.3b5157b → 5.0.0-dev.5641.706b225
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/Changelog.md +1 -0
- package/dist/formio.builder.css +8 -8
- package/dist/formio.builder.min.css +1 -1
- package/dist/formio.form.css +8 -8
- package/dist/formio.form.js +2 -2
- package/dist/formio.form.min.css +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.css +8 -8
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.css +1 -1
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/file/File.js +1 -2
- package/lib/cjs/components/form/Form.js +4 -4
- package/lib/mjs/components/file/File.js +1 -2
- package/lib/mjs/components/form/Form.js +2 -2
- package/package.json +1 -1
|
@@ -652,8 +652,7 @@ class FileComponent extends Field_1.default {
|
|
|
652
652
|
// Check if file with the same name is being uploaded
|
|
653
653
|
const fileWithSameNameUploading = this.filesToSync.filesToUpload
|
|
654
654
|
.some(fileToSync => { var _a; return ((_a = fileToSync.file) === null || _a === void 0 ? void 0 : _a.name) === file.name; });
|
|
655
|
-
const fileWithSameNameUploaded = this.dataValue
|
|
656
|
-
.some(fileStatus => fileStatus.originalName === file.name);
|
|
655
|
+
const fileWithSameNameUploaded = lodash_1.default.some(this.dataValue, fileStatus => fileStatus.originalName === file.name);
|
|
657
656
|
return fileWithSameNameUploaded || fileWithSameNameUploading
|
|
658
657
|
? {
|
|
659
658
|
status: 'error',
|
|
@@ -433,7 +433,7 @@ class FormComponent extends Component_1.default {
|
|
|
433
433
|
* @returns {Promise} - The promise that resolves when the subform is loaded.
|
|
434
434
|
*/
|
|
435
435
|
loadSubForm(fromAttach) {
|
|
436
|
-
var _a, _b, _c;
|
|
436
|
+
var _a, _b, _c, _d, _e;
|
|
437
437
|
if (this.builderMode || this.isHidden() || (this.isSubFormLazyLoad() && !fromAttach)) {
|
|
438
438
|
return Promise.resolve();
|
|
439
439
|
}
|
|
@@ -447,7 +447,7 @@ class FormComponent extends Component_1.default {
|
|
|
447
447
|
}
|
|
448
448
|
else if (this.formSrc) {
|
|
449
449
|
this.subFormLoading = true;
|
|
450
|
-
const options = ((_b = this.root
|
|
450
|
+
const options = ((_c = (_b = this.root) === null || _b === void 0 ? void 0 : _b.formio) === null || _c === void 0 ? void 0 : _c.base) && ((_e = (_d = this.root) === null || _d === void 0 ? void 0 : _d.formio) === null || _e === void 0 ? void 0 : _e.projectUrl)
|
|
451
451
|
? {
|
|
452
452
|
base: this.root.formio.base,
|
|
453
453
|
project: this.root.formio.projectUrl,
|
|
@@ -628,7 +628,7 @@ class FormComponent extends Component_1.default {
|
|
|
628
628
|
return changed;
|
|
629
629
|
}
|
|
630
630
|
setSubFormValue(submission, flags) {
|
|
631
|
-
var _a, _b;
|
|
631
|
+
var _a, _b, _c, _d;
|
|
632
632
|
const shouldLoadSubmissionById = submission
|
|
633
633
|
&& submission._id
|
|
634
634
|
&& this.subForm.formio
|
|
@@ -637,7 +637,7 @@ class FormComponent extends Component_1.default {
|
|
|
637
637
|
if (shouldLoadSubmissionById || shouldLoadDraftById) {
|
|
638
638
|
const formId = submission.form || this.formObj.form || this.component.form;
|
|
639
639
|
const submissionUrl = `${this.subForm.formio.formsUrl}/${formId}/submission/${submission._id || this.subForm.submission._id}`;
|
|
640
|
-
const options = ((_a = this.root
|
|
640
|
+
const options = ((_b = (_a = this.root) === null || _a === void 0 ? void 0 : _a.formio) === null || _b === void 0 ? void 0 : _b.base) && ((_d = (_c = this.root) === null || _c === void 0 ? void 0 : _c.formio) === null || _d === void 0 ? void 0 : _d.projectUrl)
|
|
641
641
|
? {
|
|
642
642
|
base: this.root.formio.base,
|
|
643
643
|
project: this.root.formio.projectUrl,
|
|
@@ -649,8 +649,7 @@ export default class FileComponent extends Field {
|
|
|
649
649
|
// Check if file with the same name is being uploaded
|
|
650
650
|
const fileWithSameNameUploading = this.filesToSync.filesToUpload
|
|
651
651
|
.some(fileToSync => fileToSync.file?.name === file.name);
|
|
652
|
-
const fileWithSameNameUploaded = this.dataValue
|
|
653
|
-
.some(fileStatus => fileStatus.originalName === file.name);
|
|
652
|
+
const fileWithSameNameUploaded = _.some(this.dataValue, fileStatus => fileStatus.originalName === file.name);
|
|
654
653
|
return fileWithSameNameUploaded || fileWithSameNameUploading
|
|
655
654
|
? {
|
|
656
655
|
status: 'error',
|
|
@@ -442,7 +442,7 @@ export default class FormComponent extends Component {
|
|
|
442
442
|
}
|
|
443
443
|
else if (this.formSrc) {
|
|
444
444
|
this.subFormLoading = true;
|
|
445
|
-
const options = this.root
|
|
445
|
+
const options = this.root?.formio?.base && this.root?.formio?.projectUrl
|
|
446
446
|
? {
|
|
447
447
|
base: this.root.formio.base,
|
|
448
448
|
project: this.root.formio.projectUrl,
|
|
@@ -627,7 +627,7 @@ export default class FormComponent extends Component {
|
|
|
627
627
|
if (shouldLoadSubmissionById || shouldLoadDraftById) {
|
|
628
628
|
const formId = submission.form || this.formObj.form || this.component.form;
|
|
629
629
|
const submissionUrl = `${this.subForm.formio.formsUrl}/${formId}/submission/${submission._id || this.subForm.submission._id}`;
|
|
630
|
-
const options = this.root
|
|
630
|
+
const options = this.root?.formio?.base && this.root?.formio?.projectUrl
|
|
631
631
|
? {
|
|
632
632
|
base: this.root.formio.base,
|
|
633
633
|
project: this.root.formio.projectUrl,
|