@formio/js 5.0.0-dev.5746.d82b0b1 → 5.0.0-dev.5748.cd8883d
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.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +1 -1
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/file/File.d.ts +1 -1
- package/lib/cjs/components/file/File.js +6 -1
- package/lib/mjs/components/file/File.d.ts +1 -1
- package/lib/mjs/components/file/File.js +6 -1
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ export default class FileComponent extends Field {
|
|
|
33
33
|
get dataReady(): Promise<any>;
|
|
34
34
|
loadImage(fileInfo: any): any;
|
|
35
35
|
get emptyValue(): never[];
|
|
36
|
-
getValueAsString(value: any): any;
|
|
36
|
+
getValueAsString(value: any, options: any): any;
|
|
37
37
|
get defaultValue(): any[];
|
|
38
38
|
get hasTypes(): any;
|
|
39
39
|
_fileBrowseHidden: any;
|
|
@@ -114,7 +114,12 @@ class FileComponent extends Field_1.default {
|
|
|
114
114
|
get emptyValue() {
|
|
115
115
|
return [];
|
|
116
116
|
}
|
|
117
|
-
getValueAsString(value) {
|
|
117
|
+
getValueAsString(value, options) {
|
|
118
|
+
if ((options === null || options === void 0 ? void 0 : options.review) && !this.component.uploadOnly) {
|
|
119
|
+
return lodash_1.default.map(value, (val, index) => {
|
|
120
|
+
return `<a href="${val.url || '#'}" target="_blank" data-path='${this.path}' data-fileindex='${index}'>${val.originalName}</a>`;
|
|
121
|
+
}).join(', ');
|
|
122
|
+
}
|
|
118
123
|
if (lodash_1.default.isArray(value)) {
|
|
119
124
|
return lodash_1.default.map(value, 'originalName').join(', ');
|
|
120
125
|
}
|
|
@@ -33,7 +33,7 @@ export default class FileComponent extends Field {
|
|
|
33
33
|
get dataReady(): Promise<any>;
|
|
34
34
|
loadImage(fileInfo: any): any;
|
|
35
35
|
get emptyValue(): never[];
|
|
36
|
-
getValueAsString(value: any): any;
|
|
36
|
+
getValueAsString(value: any, options: any): any;
|
|
37
37
|
get defaultValue(): any[];
|
|
38
38
|
get hasTypes(): any;
|
|
39
39
|
_fileBrowseHidden: any;
|
|
@@ -103,7 +103,12 @@ export default class FileComponent extends Field {
|
|
|
103
103
|
get emptyValue() {
|
|
104
104
|
return [];
|
|
105
105
|
}
|
|
106
|
-
getValueAsString(value) {
|
|
106
|
+
getValueAsString(value, options) {
|
|
107
|
+
if (options?.review && !this.component.uploadOnly) {
|
|
108
|
+
return _.map(value, (val, index) => {
|
|
109
|
+
return `<a href="${val.url || '#'}" target="_blank" data-path='${this.path}' data-fileindex='${index}'>${val.originalName}</a>`;
|
|
110
|
+
}).join(', ');
|
|
111
|
+
}
|
|
107
112
|
if (_.isArray(value)) {
|
|
108
113
|
return _.map(value, 'originalName').join(', ');
|
|
109
114
|
}
|