@formio/js 5.1.0-dev.6058.189ce78 → 5.1.0-dev.6060.19e3bfc
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 +2 -2
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +17 -17
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.form.js +13 -0
- package/lib/cjs/components/address/Address.js +13 -0
- package/lib/cjs/components/content/editForm/Content.edit.display.js +8 -0
- package/lib/cjs/components/currency/editForm/Currency.edit.display.js +12 -0
- package/lib/cjs/components/day/editForm/Day.edit.display.js +8 -0
- package/lib/cjs/components/email/editForm/Email.edit.display.js +12 -0
- package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
- package/lib/cjs/components/file/File.js +7 -2
- package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
- package/lib/cjs/components/html/editForm/HTML.edit.display.js +8 -0
- package/lib/cjs/components/number/editForm/Number.edit.display.js +12 -0
- package/lib/cjs/components/password/editForm/Password.edit.display.js +13 -1
- package/lib/cjs/components/phonenumber/PhoneNumber.form.js +9 -1
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
- package/lib/cjs/components/url/editForm/Url.edit.display.js +12 -0
- package/lib/cjs/components/well/editForm/Well.edit.display.js +8 -0
- package/lib/mjs/components/_classes/nested/NestedComponent.form.js +13 -0
- package/lib/mjs/components/address/Address.js +13 -0
- package/lib/mjs/components/content/editForm/Content.edit.display.js +8 -0
- package/lib/mjs/components/currency/editForm/Currency.edit.display.js +12 -0
- package/lib/mjs/components/day/editForm/Day.edit.display.js +8 -0
- package/lib/mjs/components/email/editForm/Email.edit.display.js +12 -0
- package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
- package/lib/mjs/components/file/File.js +7 -2
- package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
- package/lib/mjs/components/html/editForm/HTML.edit.display.js +8 -0
- package/lib/mjs/components/number/editForm/Number.edit.display.js +12 -0
- package/lib/mjs/components/password/editForm/Password.edit.display.js +13 -1
- package/lib/mjs/components/phonenumber/PhoneNumber.form.js +9 -1
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
- package/lib/mjs/components/url/editForm/Url.edit.display.js +12 -0
- package/lib/mjs/components/well/editForm/Well.edit.display.js +8 -0
- package/package.json +1 -1
@@ -11,6 +11,19 @@ const Components_1 = __importDefault(require("../../Components"));
|
|
11
11
|
*/
|
12
12
|
function default_1(...extend) {
|
13
13
|
return Components_1.default.baseEditForm([
|
14
|
+
{
|
15
|
+
key: 'display',
|
16
|
+
components: [
|
17
|
+
{
|
18
|
+
key: 'labelWidth',
|
19
|
+
ignore: true
|
20
|
+
},
|
21
|
+
{
|
22
|
+
key: 'labelMargin',
|
23
|
+
ignore: true
|
24
|
+
}
|
25
|
+
]
|
26
|
+
},
|
14
27
|
{
|
15
28
|
key: 'data',
|
16
29
|
ignore: true
|
@@ -115,6 +115,19 @@ class AddressComponent extends Container_1.default {
|
|
115
115
|
NestedComponent_1.default.prototype.addComponents.call(this, this.manualMode ? this.address : {});
|
116
116
|
}
|
117
117
|
Field_1.default.prototype.init.call(this);
|
118
|
+
// Added for backwards compatibility
|
119
|
+
if (this.component.providerOptions) {
|
120
|
+
const { params, url, queryProperty, responseProperty, displayValueProperty } = this.component.providerOptions;
|
121
|
+
const key = params === null || params === void 0 ? void 0 : params.key;
|
122
|
+
const autocompleteOptions = params === null || params === void 0 ? void 0 : params.autocompleteOptions;
|
123
|
+
delete this.component.providerOptions;
|
124
|
+
this.component.url = url;
|
125
|
+
this.component.queryProperty = queryProperty;
|
126
|
+
this.component.responseProperty = responseProperty;
|
127
|
+
this.component.displayValueProperty = displayValueProperty;
|
128
|
+
this.component.apiKey = key;
|
129
|
+
this.component.autocompleteOptions = autocompleteOptions;
|
130
|
+
}
|
118
131
|
let provider = this.component.provider;
|
119
132
|
const providerOptions = this.providerOptions;
|
120
133
|
const map = this.component.map;
|
@@ -9,6 +9,18 @@ exports.default = [
|
|
9
9
|
key: 'allowMultipleMasks',
|
10
10
|
ignore: true
|
11
11
|
},
|
12
|
+
{
|
13
|
+
key: 'inputMasks',
|
14
|
+
ignore: true
|
15
|
+
},
|
16
|
+
{
|
17
|
+
key: 'widget.type',
|
18
|
+
ignore: true
|
19
|
+
},
|
20
|
+
{
|
21
|
+
key: 'widget',
|
22
|
+
ignore: true
|
23
|
+
},
|
12
24
|
{
|
13
25
|
key: 'showWordCount',
|
14
26
|
ignore: true
|
@@ -9,6 +9,18 @@ exports.default = [
|
|
9
9
|
key: 'allowMultipleMasks',
|
10
10
|
ignore: true,
|
11
11
|
},
|
12
|
+
{
|
13
|
+
key: 'inputMasks',
|
14
|
+
ignore: true
|
15
|
+
},
|
16
|
+
{
|
17
|
+
key: 'widget.type',
|
18
|
+
ignore: true
|
19
|
+
},
|
20
|
+
{
|
21
|
+
key: 'widget',
|
22
|
+
ignore: true
|
23
|
+
},
|
12
24
|
{
|
13
25
|
key: 'showWordCount',
|
14
26
|
ignore: true
|
@@ -905,14 +905,17 @@ class FileComponent extends Field_1.default {
|
|
905
905
|
}
|
906
906
|
uploadFile(fileToSync) {
|
907
907
|
return __awaiter(this, void 0, void 0, function* () {
|
908
|
-
|
908
|
+
const filePromise = this.fileService.uploadFile(fileToSync.storage, fileToSync.file, fileToSync.name, fileToSync.dir,
|
909
909
|
// Progress callback
|
910
|
-
this.updateProgress.bind(this, fileToSync), fileToSync.url, fileToSync.options, fileToSync.fileKey, fileToSync.groupPermissions, fileToSync.groupResourceId, () => {
|
910
|
+
this.updateProgress.bind(this, fileToSync), fileToSync.url, fileToSync.options, fileToSync.fileKey, fileToSync.groupPermissions, fileToSync.groupResourceId, () => {
|
911
|
+
this.emit('fileUploadingStart', filePromise);
|
912
|
+
},
|
911
913
|
// Abort upload callback
|
912
914
|
(abort) => this.abortUploads.push({
|
913
915
|
id: fileToSync.id,
|
914
916
|
abort,
|
915
917
|
}), this.getMultipartOptions(fileToSync));
|
918
|
+
return yield filePromise;
|
916
919
|
});
|
917
920
|
}
|
918
921
|
upload() {
|
@@ -934,6 +937,7 @@ class FileComponent extends Field_1.default {
|
|
934
937
|
fileToSync.message = this.t('succefullyUploaded');
|
935
938
|
fileInfo.originalName = fileToSync.originalName;
|
936
939
|
fileInfo.hash = fileToSync.hash;
|
940
|
+
this.emit('fileUploadingEnd', Promise.resolve(fileInfo));
|
937
941
|
}
|
938
942
|
catch (response) {
|
939
943
|
fileToSync.status = 'error';
|
@@ -943,6 +947,7 @@ class FileComponent extends Field_1.default {
|
|
943
947
|
: response.type === 'abort'
|
944
948
|
? this.t('Request was aborted')
|
945
949
|
: response.toString();
|
950
|
+
this.emit('fileUploadingEnd', Promise.reject(response));
|
946
951
|
this.emit('fileUploadError', {
|
947
952
|
fileToSync,
|
948
953
|
response,
|
@@ -13,6 +13,18 @@ exports.default = [
|
|
13
13
|
key: 'allowMultipleMasks',
|
14
14
|
ignore: true
|
15
15
|
},
|
16
|
+
{
|
17
|
+
key: 'inputMasks',
|
18
|
+
ignore: true
|
19
|
+
},
|
20
|
+
{
|
21
|
+
key: 'widget.type',
|
22
|
+
ignore: true
|
23
|
+
},
|
24
|
+
{
|
25
|
+
key: 'widget',
|
26
|
+
ignore: true
|
27
|
+
},
|
16
28
|
{
|
17
29
|
key: 'showWordCount',
|
18
30
|
ignore: true,
|
@@ -14,10 +14,22 @@ exports.default = [
|
|
14
14
|
key: 'allowMultipleMasks',
|
15
15
|
ignore: true
|
16
16
|
},
|
17
|
+
{
|
18
|
+
key: 'inputMasks',
|
19
|
+
ignore: true
|
20
|
+
},
|
17
21
|
{
|
18
22
|
key: 'mask',
|
19
23
|
ignore: true
|
20
24
|
},
|
25
|
+
{
|
26
|
+
key: 'widget.type',
|
27
|
+
ignore: true
|
28
|
+
},
|
29
|
+
{
|
30
|
+
key: 'widget',
|
31
|
+
ignore: true
|
32
|
+
},
|
21
33
|
{
|
22
34
|
type: 'number',
|
23
35
|
input: true,
|
@@ -9,6 +9,18 @@ exports.default = [
|
|
9
9
|
key: 'allowMultipleMasks',
|
10
10
|
ignore: true
|
11
11
|
},
|
12
|
+
{
|
13
|
+
key: 'inputMasks',
|
14
|
+
ignore: true
|
15
|
+
},
|
16
|
+
{
|
17
|
+
key: 'widget.type',
|
18
|
+
ignore: true
|
19
|
+
},
|
20
|
+
{
|
21
|
+
key: 'widget',
|
22
|
+
ignore: true
|
23
|
+
},
|
12
24
|
{
|
13
25
|
key: 'showWordCount',
|
14
26
|
ignore: true,
|
@@ -6,6 +6,19 @@ import Components from '../../Components';
|
|
6
6
|
*/
|
7
7
|
export default function (...extend) {
|
8
8
|
return Components.baseEditForm([
|
9
|
+
{
|
10
|
+
key: 'display',
|
11
|
+
components: [
|
12
|
+
{
|
13
|
+
key: 'labelWidth',
|
14
|
+
ignore: true
|
15
|
+
},
|
16
|
+
{
|
17
|
+
key: 'labelMargin',
|
18
|
+
ignore: true
|
19
|
+
}
|
20
|
+
]
|
21
|
+
},
|
9
22
|
{
|
10
23
|
key: 'data',
|
11
24
|
ignore: true
|
@@ -112,6 +112,19 @@ export default class AddressComponent extends ContainerComponent {
|
|
112
112
|
NestedComponent.prototype.addComponents.call(this, this.manualMode ? this.address : {});
|
113
113
|
}
|
114
114
|
Field.prototype.init.call(this);
|
115
|
+
// Added for backwards compatibility
|
116
|
+
if (this.component.providerOptions) {
|
117
|
+
const { params, url, queryProperty, responseProperty, displayValueProperty } = this.component.providerOptions;
|
118
|
+
const key = params?.key;
|
119
|
+
const autocompleteOptions = params?.autocompleteOptions;
|
120
|
+
delete this.component.providerOptions;
|
121
|
+
this.component.url = url;
|
122
|
+
this.component.queryProperty = queryProperty;
|
123
|
+
this.component.responseProperty = responseProperty;
|
124
|
+
this.component.displayValueProperty = displayValueProperty;
|
125
|
+
this.component.apiKey = key;
|
126
|
+
this.component.autocompleteOptions = autocompleteOptions;
|
127
|
+
}
|
115
128
|
let provider = this.component.provider;
|
116
129
|
const providerOptions = this.providerOptions;
|
117
130
|
const map = this.component.map;
|
@@ -7,6 +7,18 @@ export default [
|
|
7
7
|
key: 'allowMultipleMasks',
|
8
8
|
ignore: true
|
9
9
|
},
|
10
|
+
{
|
11
|
+
key: 'inputMasks',
|
12
|
+
ignore: true
|
13
|
+
},
|
14
|
+
{
|
15
|
+
key: 'widget.type',
|
16
|
+
ignore: true
|
17
|
+
},
|
18
|
+
{
|
19
|
+
key: 'widget',
|
20
|
+
ignore: true
|
21
|
+
},
|
10
22
|
{
|
11
23
|
key: 'showWordCount',
|
12
24
|
ignore: true
|
@@ -7,6 +7,18 @@ export default [
|
|
7
7
|
key: 'allowMultipleMasks',
|
8
8
|
ignore: true,
|
9
9
|
},
|
10
|
+
{
|
11
|
+
key: 'inputMasks',
|
12
|
+
ignore: true
|
13
|
+
},
|
14
|
+
{
|
15
|
+
key: 'widget.type',
|
16
|
+
ignore: true
|
17
|
+
},
|
18
|
+
{
|
19
|
+
key: 'widget',
|
20
|
+
ignore: true
|
21
|
+
},
|
10
22
|
{
|
11
23
|
key: 'showWordCount',
|
12
24
|
ignore: true
|
@@ -903,14 +903,17 @@ export default class FileComponent extends Field {
|
|
903
903
|
} : false;
|
904
904
|
}
|
905
905
|
async uploadFile(fileToSync) {
|
906
|
-
|
906
|
+
const filePromise = this.fileService.uploadFile(fileToSync.storage, fileToSync.file, fileToSync.name, fileToSync.dir,
|
907
907
|
// Progress callback
|
908
|
-
this.updateProgress.bind(this, fileToSync), fileToSync.url, fileToSync.options, fileToSync.fileKey, fileToSync.groupPermissions, fileToSync.groupResourceId, () => {
|
908
|
+
this.updateProgress.bind(this, fileToSync), fileToSync.url, fileToSync.options, fileToSync.fileKey, fileToSync.groupPermissions, fileToSync.groupResourceId, () => {
|
909
|
+
this.emit('fileUploadingStart', filePromise);
|
910
|
+
},
|
909
911
|
// Abort upload callback
|
910
912
|
(abort) => this.abortUploads.push({
|
911
913
|
id: fileToSync.id,
|
912
914
|
abort,
|
913
915
|
}), this.getMultipartOptions(fileToSync));
|
916
|
+
return await filePromise;
|
914
917
|
}
|
915
918
|
async upload() {
|
916
919
|
if (!this.filesToSync.filesToUpload.length) {
|
@@ -930,6 +933,7 @@ export default class FileComponent extends Field {
|
|
930
933
|
fileToSync.message = this.t('succefullyUploaded');
|
931
934
|
fileInfo.originalName = fileToSync.originalName;
|
932
935
|
fileInfo.hash = fileToSync.hash;
|
936
|
+
this.emit('fileUploadingEnd', Promise.resolve(fileInfo));
|
933
937
|
}
|
934
938
|
catch (response) {
|
935
939
|
fileToSync.status = 'error';
|
@@ -939,6 +943,7 @@ export default class FileComponent extends Field {
|
|
939
943
|
: response.type === 'abort'
|
940
944
|
? this.t('Request was aborted')
|
941
945
|
: response.toString();
|
946
|
+
this.emit('fileUploadingEnd', Promise.reject(response));
|
942
947
|
this.emit('fileUploadError', {
|
943
948
|
fileToSync,
|
944
949
|
response,
|
@@ -11,6 +11,18 @@ export default [
|
|
11
11
|
key: 'allowMultipleMasks',
|
12
12
|
ignore: true
|
13
13
|
},
|
14
|
+
{
|
15
|
+
key: 'inputMasks',
|
16
|
+
ignore: true
|
17
|
+
},
|
18
|
+
{
|
19
|
+
key: 'widget.type',
|
20
|
+
ignore: true
|
21
|
+
},
|
22
|
+
{
|
23
|
+
key: 'widget',
|
24
|
+
ignore: true
|
25
|
+
},
|
14
26
|
{
|
15
27
|
key: 'showWordCount',
|
16
28
|
ignore: true,
|
@@ -9,10 +9,22 @@ export default [
|
|
9
9
|
key: 'allowMultipleMasks',
|
10
10
|
ignore: true
|
11
11
|
},
|
12
|
+
{
|
13
|
+
key: 'inputMasks',
|
14
|
+
ignore: true
|
15
|
+
},
|
12
16
|
{
|
13
17
|
key: 'mask',
|
14
18
|
ignore: true
|
15
19
|
},
|
20
|
+
{
|
21
|
+
key: 'widget.type',
|
22
|
+
ignore: true
|
23
|
+
},
|
24
|
+
{
|
25
|
+
key: 'widget',
|
26
|
+
ignore: true
|
27
|
+
},
|
16
28
|
{
|
17
29
|
type: 'number',
|
18
30
|
input: true,
|
@@ -7,6 +7,18 @@ export default [
|
|
7
7
|
key: 'allowMultipleMasks',
|
8
8
|
ignore: true
|
9
9
|
},
|
10
|
+
{
|
11
|
+
key: 'inputMasks',
|
12
|
+
ignore: true
|
13
|
+
},
|
14
|
+
{
|
15
|
+
key: 'widget.type',
|
16
|
+
ignore: true
|
17
|
+
},
|
18
|
+
{
|
19
|
+
key: 'widget',
|
20
|
+
ignore: true
|
21
|
+
},
|
10
22
|
{
|
11
23
|
key: 'showWordCount',
|
12
24
|
ignore: true,
|