@formio/js 5.1.0-dev.6054.a33ccd9 → 5.1.0-dev.6056.ba6432d
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 +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.d.ts +8 -0
- package/lib/cjs/components/address/Address.js +18 -8
- package/lib/cjs/components/address/editForm/Address.edit.provider.js +8 -8
- 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/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.d.ts +8 -0
- package/lib/mjs/components/address/Address.js +18 -8
- package/lib/mjs/components/address/editForm/Address.edit.provider.js +8 -8
- 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/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
|
@@ -43,6 +43,14 @@ export default class AddressComponent extends ContainerComponent {
|
|
43
43
|
isValueInLegacyFormat(value: any): any;
|
44
44
|
normalizeValue(value: any): any;
|
45
45
|
get modeSwitcher(): any;
|
46
|
+
get providerOptions(): {
|
47
|
+
params: any;
|
48
|
+
url: any;
|
49
|
+
queryProperty: any;
|
50
|
+
responseProperty: any;
|
51
|
+
displayValueProperty: any;
|
52
|
+
autocompleteOptions: any;
|
53
|
+
};
|
46
54
|
get removeValueIcon(): any;
|
47
55
|
get searchInput(): any;
|
48
56
|
get addRowButton(): any;
|
@@ -26,7 +26,6 @@ class AddressComponent extends Container_1.default {
|
|
26
26
|
key: 'address',
|
27
27
|
switchToManualModeLabel: 'Can\'t find address? Switch to manual mode.',
|
28
28
|
provider: '',
|
29
|
-
providerOptions: {},
|
30
29
|
manualModeViewString: '',
|
31
30
|
hideLabel: false,
|
32
31
|
disableClearIcon: false,
|
@@ -116,20 +115,20 @@ class AddressComponent extends Container_1.default {
|
|
116
115
|
NestedComponent_1.default.prototype.addComponents.call(this, this.manualMode ? this.address : {});
|
117
116
|
}
|
118
117
|
Field_1.default.prototype.init.call(this);
|
118
|
+
let provider = this.component.provider;
|
119
|
+
const providerOptions = this.providerOptions;
|
120
|
+
const map = this.component.map;
|
119
121
|
if (!this.builderMode) {
|
120
|
-
if (
|
121
|
-
const { provider, providerOptions, } = this.component;
|
122
|
+
if (provider) {
|
122
123
|
if (lodash_1.default.get(providerOptions, 'params.subscriptionKey')) {
|
123
124
|
lodash_1.default.set(providerOptions, "params['subscription-key']", lodash_1.default.get(providerOptions, 'params.subscriptionKey'));
|
124
125
|
lodash_1.default.unset(providerOptions, 'params.subscriptionKey');
|
125
126
|
}
|
126
127
|
this.provider = this.initializeProvider(provider, providerOptions);
|
127
128
|
}
|
128
|
-
else if (
|
129
|
+
else if (map) {
|
129
130
|
// Fallback to legacy version where Google Maps was the only provider.
|
130
|
-
this.component.provider = GoogleAddressProvider_1.GoogleAddressProvider.name;
|
131
|
-
this.component.providerOptions = this.component.providerOptions || {};
|
132
|
-
const { map, provider, providerOptions, } = this.component;
|
131
|
+
provider = this.component.provider = GoogleAddressProvider_1.GoogleAddressProvider.name;
|
133
132
|
const { key, region, } = map;
|
134
133
|
if (key) {
|
135
134
|
lodash_1.default.set(providerOptions, 'params.key', key);
|
@@ -262,6 +261,16 @@ class AddressComponent extends Container_1.default {
|
|
262
261
|
? (this.refs[AddressComponent.modeSwitcherRef] || null)
|
263
262
|
: null;
|
264
263
|
}
|
264
|
+
get providerOptions() {
|
265
|
+
return {
|
266
|
+
params: Object.assign({ subscriptionKey: this.component.subscriptionKey, key: this.component.apiKey }, this.component.params),
|
267
|
+
url: this.component.url,
|
268
|
+
queryProperty: this.component.queryProperty,
|
269
|
+
responseProperty: this.component.responseProperty,
|
270
|
+
displayValueProperty: this.component.displayValueProperty,
|
271
|
+
autocompleteOptions: this.component.autocompleteOptions
|
272
|
+
};
|
273
|
+
}
|
265
274
|
get removeValueIcon() {
|
266
275
|
return this.refs
|
267
276
|
? (this.refs[AddressComponent.removeValueIconRef] || null)
|
@@ -375,7 +384,8 @@ class AddressComponent extends Container_1.default {
|
|
375
384
|
const result = ((this.builderMode || this.manualMode) ? super.attach : Field_1.default.prototype.attach).call(this, element);
|
376
385
|
if (!this.builderMode) {
|
377
386
|
if (!this.provider && this.component.provider) {
|
378
|
-
const
|
387
|
+
const provider = this.component.provider;
|
388
|
+
const providerOptions = this.providerOptions;
|
379
389
|
this.provider = this.initializeProvider(provider, providerOptions);
|
380
390
|
}
|
381
391
|
}
|
@@ -31,7 +31,7 @@ exports.default = [
|
|
31
31
|
{
|
32
32
|
type: 'textfield',
|
33
33
|
input: true,
|
34
|
-
key: "
|
34
|
+
key: "subscriptionKey",
|
35
35
|
label: 'Subscription Key',
|
36
36
|
placeholder: 'Enter Subscription Key',
|
37
37
|
weight: 10,
|
@@ -46,7 +46,7 @@ exports.default = [
|
|
46
46
|
{
|
47
47
|
type: 'textfield',
|
48
48
|
input: true,
|
49
|
-
key: '
|
49
|
+
key: 'url',
|
50
50
|
label: 'Url',
|
51
51
|
placeholder: 'Enter Url',
|
52
52
|
weight: 10,
|
@@ -61,7 +61,7 @@ exports.default = [
|
|
61
61
|
{
|
62
62
|
type: 'textfield',
|
63
63
|
input: true,
|
64
|
-
key: '
|
64
|
+
key: 'queryProperty',
|
65
65
|
label: 'Query Property',
|
66
66
|
defaultValue: 'query',
|
67
67
|
placeholder: 'Enter Query Property',
|
@@ -74,7 +74,7 @@ exports.default = [
|
|
74
74
|
{
|
75
75
|
type: 'textfield',
|
76
76
|
input: true,
|
77
|
-
key: '
|
77
|
+
key: 'responseProperty',
|
78
78
|
label: 'Response Property',
|
79
79
|
placeholder: 'Enter Response Property',
|
80
80
|
weight: 30,
|
@@ -86,7 +86,7 @@ exports.default = [
|
|
86
86
|
{
|
87
87
|
type: 'textfield',
|
88
88
|
input: true,
|
89
|
-
key: '
|
89
|
+
key: 'displayValueProperty',
|
90
90
|
label: 'Display Value Property',
|
91
91
|
placeholder: 'Display Value Property',
|
92
92
|
weight: 40,
|
@@ -98,7 +98,7 @@ exports.default = [
|
|
98
98
|
{
|
99
99
|
type: 'textarea',
|
100
100
|
input: true,
|
101
|
-
key: '
|
101
|
+
key: 'params',
|
102
102
|
label: 'Params',
|
103
103
|
placeholder: '{ ... }',
|
104
104
|
weight: 50,
|
@@ -113,7 +113,7 @@ exports.default = [
|
|
113
113
|
{
|
114
114
|
type: 'textfield',
|
115
115
|
input: true,
|
116
|
-
key: '
|
116
|
+
key: 'apiKey',
|
117
117
|
label: 'API Key',
|
118
118
|
placeholder: 'Enter API Key',
|
119
119
|
weight: 10,
|
@@ -128,7 +128,7 @@ exports.default = [
|
|
128
128
|
{
|
129
129
|
type: 'textarea',
|
130
130
|
input: true,
|
131
|
-
key: '
|
131
|
+
key: 'autocompleteOptions',
|
132
132
|
label: 'Provider options',
|
133
133
|
placeholder: 'Enter provider options as JSON object',
|
134
134
|
defaultValue: {},
|
@@ -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
|
@@ -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
|
@@ -43,6 +43,14 @@ export default class AddressComponent extends ContainerComponent {
|
|
43
43
|
isValueInLegacyFormat(value: any): any;
|
44
44
|
normalizeValue(value: any): any;
|
45
45
|
get modeSwitcher(): any;
|
46
|
+
get providerOptions(): {
|
47
|
+
params: any;
|
48
|
+
url: any;
|
49
|
+
queryProperty: any;
|
50
|
+
responseProperty: any;
|
51
|
+
displayValueProperty: any;
|
52
|
+
autocompleteOptions: any;
|
53
|
+
};
|
46
54
|
get removeValueIcon(): any;
|
47
55
|
get searchInput(): any;
|
48
56
|
get addRowButton(): any;
|
@@ -20,7 +20,6 @@ export default class AddressComponent extends ContainerComponent {
|
|
20
20
|
key: 'address',
|
21
21
|
switchToManualModeLabel: 'Can\'t find address? Switch to manual mode.',
|
22
22
|
provider: '',
|
23
|
-
providerOptions: {},
|
24
23
|
manualModeViewString: '',
|
25
24
|
hideLabel: false,
|
26
25
|
disableClearIcon: false,
|
@@ -113,20 +112,20 @@ export default class AddressComponent extends ContainerComponent {
|
|
113
112
|
NestedComponent.prototype.addComponents.call(this, this.manualMode ? this.address : {});
|
114
113
|
}
|
115
114
|
Field.prototype.init.call(this);
|
115
|
+
let provider = this.component.provider;
|
116
|
+
const providerOptions = this.providerOptions;
|
117
|
+
const map = this.component.map;
|
116
118
|
if (!this.builderMode) {
|
117
|
-
if (
|
118
|
-
const { provider, providerOptions, } = this.component;
|
119
|
+
if (provider) {
|
119
120
|
if (_.get(providerOptions, 'params.subscriptionKey')) {
|
120
121
|
_.set(providerOptions, "params['subscription-key']", _.get(providerOptions, 'params.subscriptionKey'));
|
121
122
|
_.unset(providerOptions, 'params.subscriptionKey');
|
122
123
|
}
|
123
124
|
this.provider = this.initializeProvider(provider, providerOptions);
|
124
125
|
}
|
125
|
-
else if (
|
126
|
+
else if (map) {
|
126
127
|
// Fallback to legacy version where Google Maps was the only provider.
|
127
|
-
this.component.provider = GoogleAddressProvider.name;
|
128
|
-
this.component.providerOptions = this.component.providerOptions || {};
|
129
|
-
const { map, provider, providerOptions, } = this.component;
|
128
|
+
provider = this.component.provider = GoogleAddressProvider.name;
|
130
129
|
const { key, region, } = map;
|
131
130
|
if (key) {
|
132
131
|
_.set(providerOptions, 'params.key', key);
|
@@ -258,6 +257,16 @@ export default class AddressComponent extends ContainerComponent {
|
|
258
257
|
? (this.refs[AddressComponent.modeSwitcherRef] || null)
|
259
258
|
: null;
|
260
259
|
}
|
260
|
+
get providerOptions() {
|
261
|
+
return {
|
262
|
+
params: { subscriptionKey: this.component.subscriptionKey, key: this.component.apiKey, ...this.component.params },
|
263
|
+
url: this.component.url,
|
264
|
+
queryProperty: this.component.queryProperty,
|
265
|
+
responseProperty: this.component.responseProperty,
|
266
|
+
displayValueProperty: this.component.displayValueProperty,
|
267
|
+
autocompleteOptions: this.component.autocompleteOptions
|
268
|
+
};
|
269
|
+
}
|
261
270
|
get removeValueIcon() {
|
262
271
|
return this.refs
|
263
272
|
? (this.refs[AddressComponent.removeValueIconRef] || null)
|
@@ -371,7 +380,8 @@ export default class AddressComponent extends ContainerComponent {
|
|
371
380
|
const result = ((this.builderMode || this.manualMode) ? super.attach : Field.prototype.attach).call(this, element);
|
372
381
|
if (!this.builderMode) {
|
373
382
|
if (!this.provider && this.component.provider) {
|
374
|
-
const
|
383
|
+
const provider = this.component.provider;
|
384
|
+
const providerOptions = this.providerOptions;
|
375
385
|
this.provider = this.initializeProvider(provider, providerOptions);
|
376
386
|
}
|
377
387
|
}
|
@@ -26,7 +26,7 @@ export default [
|
|
26
26
|
{
|
27
27
|
type: 'textfield',
|
28
28
|
input: true,
|
29
|
-
key: "
|
29
|
+
key: "subscriptionKey",
|
30
30
|
label: 'Subscription Key',
|
31
31
|
placeholder: 'Enter Subscription Key',
|
32
32
|
weight: 10,
|
@@ -41,7 +41,7 @@ export default [
|
|
41
41
|
{
|
42
42
|
type: 'textfield',
|
43
43
|
input: true,
|
44
|
-
key: '
|
44
|
+
key: 'url',
|
45
45
|
label: 'Url',
|
46
46
|
placeholder: 'Enter Url',
|
47
47
|
weight: 10,
|
@@ -56,7 +56,7 @@ export default [
|
|
56
56
|
{
|
57
57
|
type: 'textfield',
|
58
58
|
input: true,
|
59
|
-
key: '
|
59
|
+
key: 'queryProperty',
|
60
60
|
label: 'Query Property',
|
61
61
|
defaultValue: 'query',
|
62
62
|
placeholder: 'Enter Query Property',
|
@@ -69,7 +69,7 @@ export default [
|
|
69
69
|
{
|
70
70
|
type: 'textfield',
|
71
71
|
input: true,
|
72
|
-
key: '
|
72
|
+
key: 'responseProperty',
|
73
73
|
label: 'Response Property',
|
74
74
|
placeholder: 'Enter Response Property',
|
75
75
|
weight: 30,
|
@@ -81,7 +81,7 @@ export default [
|
|
81
81
|
{
|
82
82
|
type: 'textfield',
|
83
83
|
input: true,
|
84
|
-
key: '
|
84
|
+
key: 'displayValueProperty',
|
85
85
|
label: 'Display Value Property',
|
86
86
|
placeholder: 'Display Value Property',
|
87
87
|
weight: 40,
|
@@ -93,7 +93,7 @@ export default [
|
|
93
93
|
{
|
94
94
|
type: 'textarea',
|
95
95
|
input: true,
|
96
|
-
key: '
|
96
|
+
key: 'params',
|
97
97
|
label: 'Params',
|
98
98
|
placeholder: '{ ... }',
|
99
99
|
weight: 50,
|
@@ -108,7 +108,7 @@ export default [
|
|
108
108
|
{
|
109
109
|
type: 'textfield',
|
110
110
|
input: true,
|
111
|
-
key: '
|
111
|
+
key: 'apiKey',
|
112
112
|
label: 'API Key',
|
113
113
|
placeholder: 'Enter API Key',
|
114
114
|
weight: 10,
|
@@ -123,7 +123,7 @@ export default [
|
|
123
123
|
{
|
124
124
|
type: 'textarea',
|
125
125
|
input: true,
|
126
|
-
key: '
|
126
|
+
key: 'autocompleteOptions',
|
127
127
|
label: 'Provider options',
|
128
128
|
placeholder: 'Enter provider options as JSON object',
|
129
129
|
defaultValue: {},
|
@@ -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
|