@formio/js 5.1.0-dev.6050.f1c0fbe → 5.1.0-dev.6053.1bce8e0
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 +140 -6
- package/dist/formio.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +3 -3
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/address/Address.d.ts +0 -8
- package/lib/cjs/components/address/Address.js +8 -18
- package/lib/cjs/components/address/editForm/Address.edit.provider.js +8 -8
- package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +74 -116
- package/lib/cjs/components/select/editForm/Select.edit.data.js +0 -36
- package/lib/mjs/components/address/Address.d.ts +0 -8
- package/lib/mjs/components/address/Address.js +8 -18
- package/lib/mjs/components/address/editForm/Address.edit.provider.js +8 -8
- package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +74 -116
- package/lib/mjs/components/select/editForm/Select.edit.data.js +0 -36
- package/package.json +1 -1
@@ -43,14 +43,6 @@ 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
|
-
};
|
54
46
|
get removeValueIcon(): any;
|
55
47
|
get searchInput(): any;
|
56
48
|
get addRowButton(): any;
|
@@ -26,6 +26,7 @@ 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: {},
|
29
30
|
manualModeViewString: '',
|
30
31
|
hideLabel: false,
|
31
32
|
disableClearIcon: false,
|
@@ -115,20 +116,20 @@ class AddressComponent extends Container_1.default {
|
|
115
116
|
NestedComponent_1.default.prototype.addComponents.call(this, this.manualMode ? this.address : {});
|
116
117
|
}
|
117
118
|
Field_1.default.prototype.init.call(this);
|
118
|
-
let provider = this.component.provider;
|
119
|
-
const providerOptions = this.providerOptions;
|
120
|
-
const map = this.component.map;
|
121
119
|
if (!this.builderMode) {
|
122
|
-
if (provider) {
|
120
|
+
if (this.component.provider) {
|
121
|
+
const { provider, providerOptions, } = this.component;
|
123
122
|
if (lodash_1.default.get(providerOptions, 'params.subscriptionKey')) {
|
124
123
|
lodash_1.default.set(providerOptions, "params['subscription-key']", lodash_1.default.get(providerOptions, 'params.subscriptionKey'));
|
125
124
|
lodash_1.default.unset(providerOptions, 'params.subscriptionKey');
|
126
125
|
}
|
127
126
|
this.provider = this.initializeProvider(provider, providerOptions);
|
128
127
|
}
|
129
|
-
else if (map) {
|
128
|
+
else if (this.component.map) {
|
130
129
|
// Fallback to legacy version where Google Maps was the only provider.
|
131
|
-
|
130
|
+
this.component.provider = GoogleAddressProvider_1.GoogleAddressProvider.name;
|
131
|
+
this.component.providerOptions = this.component.providerOptions || {};
|
132
|
+
const { map, provider, providerOptions, } = this.component;
|
132
133
|
const { key, region, } = map;
|
133
134
|
if (key) {
|
134
135
|
lodash_1.default.set(providerOptions, 'params.key', key);
|
@@ -261,16 +262,6 @@ class AddressComponent extends Container_1.default {
|
|
261
262
|
? (this.refs[AddressComponent.modeSwitcherRef] || null)
|
262
263
|
: null;
|
263
264
|
}
|
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
|
-
}
|
274
265
|
get removeValueIcon() {
|
275
266
|
return this.refs
|
276
267
|
? (this.refs[AddressComponent.removeValueIconRef] || null)
|
@@ -384,8 +375,7 @@ class AddressComponent extends Container_1.default {
|
|
384
375
|
const result = ((this.builderMode || this.manualMode) ? super.attach : Field_1.default.prototype.attach).call(this, element);
|
385
376
|
if (!this.builderMode) {
|
386
377
|
if (!this.provider && this.component.provider) {
|
387
|
-
const provider = this.component
|
388
|
-
const providerOptions = this.providerOptions;
|
378
|
+
const { provider, providerOptions, } = this.component;
|
389
379
|
this.provider = this.initializeProvider(provider, providerOptions);
|
390
380
|
}
|
391
381
|
}
|
@@ -31,7 +31,7 @@ exports.default = [
|
|
31
31
|
{
|
32
32
|
type: 'textfield',
|
33
33
|
input: true,
|
34
|
-
key: "subscriptionKey",
|
34
|
+
key: "providerOptions.params.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: 'url',
|
49
|
+
key: 'providerOptions.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: 'queryProperty',
|
64
|
+
key: 'providerOptions.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: 'responseProperty',
|
77
|
+
key: 'providerOptions.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: 'displayValueProperty',
|
89
|
+
key: 'providerOptions.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: 'params',
|
101
|
+
key: 'providerOptions.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: 'providerOptions.params.key',
|
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: 'autocompleteOptions',
|
131
|
+
key: 'providerOptions.params.autocompleteOptions',
|
132
132
|
label: 'Provider options',
|
133
133
|
placeholder: 'Enter provider options as JSON object',
|
134
134
|
defaultValue: {},
|
@@ -9,100 +9,16 @@ declare const _default: ({
|
|
9
9
|
custom?: undefined;
|
10
10
|
};
|
11
11
|
type?: undefined;
|
12
|
+
as?: undefined;
|
13
|
+
editor?: undefined;
|
12
14
|
weight?: undefined;
|
13
15
|
input?: undefined;
|
14
16
|
label?: undefined;
|
15
17
|
tooltip?: undefined;
|
16
|
-
conditional?: undefined;
|
17
|
-
as?: undefined;
|
18
|
-
editor?: undefined;
|
19
|
-
defaultValue?: undefined;
|
20
18
|
description?: undefined;
|
19
|
+
conditional?: undefined;
|
21
20
|
reorder?: undefined;
|
22
|
-
components?: undefined;
|
23
|
-
dataSrc?: undefined;
|
24
|
-
authenticate?: undefined;
|
25
|
-
template?: undefined;
|
26
|
-
valueProperty?: undefined;
|
27
|
-
clearOnHide?: undefined;
|
28
|
-
lazyLoad?: undefined;
|
29
|
-
skipMerge?: undefined;
|
30
|
-
refreshOn?: undefined;
|
31
|
-
onSetItems?: undefined;
|
32
|
-
onChange?: undefined;
|
33
|
-
placeholder?: undefined;
|
34
|
-
validate?: undefined;
|
35
|
-
delimiter?: undefined;
|
36
|
-
requireDecimal?: undefined;
|
37
|
-
encrypted?: undefined;
|
38
|
-
rows?: undefined;
|
39
|
-
mask?: undefined;
|
40
|
-
tableView?: undefined;
|
41
|
-
alwaysEnabled?: undefined;
|
42
|
-
} | {
|
43
|
-
type: string;
|
44
|
-
weight: number;
|
45
|
-
input: boolean;
|
46
|
-
key: string;
|
47
|
-
label: string;
|
48
|
-
tooltip: string;
|
49
|
-
conditional: {
|
50
|
-
json: {
|
51
|
-
'===': (string | {
|
52
|
-
var: string;
|
53
|
-
})[];
|
54
|
-
and?: undefined;
|
55
|
-
in?: undefined;
|
56
|
-
};
|
57
|
-
};
|
58
|
-
data?: undefined;
|
59
|
-
as?: undefined;
|
60
|
-
editor?: undefined;
|
61
21
|
defaultValue?: undefined;
|
62
|
-
description?: undefined;
|
63
|
-
reorder?: undefined;
|
64
|
-
components?: undefined;
|
65
|
-
dataSrc?: undefined;
|
66
|
-
authenticate?: undefined;
|
67
|
-
template?: undefined;
|
68
|
-
valueProperty?: undefined;
|
69
|
-
clearOnHide?: undefined;
|
70
|
-
lazyLoad?: undefined;
|
71
|
-
skipMerge?: undefined;
|
72
|
-
refreshOn?: undefined;
|
73
|
-
onSetItems?: undefined;
|
74
|
-
onChange?: undefined;
|
75
|
-
placeholder?: undefined;
|
76
|
-
validate?: undefined;
|
77
|
-
delimiter?: undefined;
|
78
|
-
requireDecimal?: undefined;
|
79
|
-
encrypted?: undefined;
|
80
|
-
rows?: undefined;
|
81
|
-
mask?: undefined;
|
82
|
-
tableView?: undefined;
|
83
|
-
alwaysEnabled?: undefined;
|
84
|
-
} | {
|
85
|
-
type: string;
|
86
|
-
as: string;
|
87
|
-
editor: string;
|
88
|
-
weight: number;
|
89
|
-
input: boolean;
|
90
|
-
key: string;
|
91
|
-
label: string;
|
92
|
-
tooltip: string;
|
93
|
-
defaultValue: {};
|
94
|
-
conditional: {
|
95
|
-
json: {
|
96
|
-
'===': (string | {
|
97
|
-
var: string;
|
98
|
-
})[];
|
99
|
-
and?: undefined;
|
100
|
-
in?: undefined;
|
101
|
-
};
|
102
|
-
};
|
103
|
-
data?: undefined;
|
104
|
-
description?: undefined;
|
105
|
-
reorder?: undefined;
|
106
22
|
components?: undefined;
|
107
23
|
dataSrc?: undefined;
|
108
24
|
authenticate?: undefined;
|
@@ -143,8 +59,8 @@ declare const _default: ({
|
|
143
59
|
};
|
144
60
|
};
|
145
61
|
data?: undefined;
|
146
|
-
defaultValue?: undefined;
|
147
62
|
reorder?: undefined;
|
63
|
+
defaultValue?: undefined;
|
148
64
|
components?: undefined;
|
149
65
|
dataSrc?: undefined;
|
150
66
|
authenticate?: undefined;
|
@@ -192,9 +108,9 @@ declare const _default: ({
|
|
192
108
|
data?: undefined;
|
193
109
|
as?: undefined;
|
194
110
|
editor?: undefined;
|
195
|
-
defaultValue?: undefined;
|
196
111
|
description?: undefined;
|
197
112
|
reorder?: undefined;
|
113
|
+
defaultValue?: undefined;
|
198
114
|
components?: undefined;
|
199
115
|
dataSrc?: undefined;
|
200
116
|
authenticate?: undefined;
|
@@ -303,9 +219,9 @@ declare const _default: ({
|
|
303
219
|
};
|
304
220
|
as?: undefined;
|
305
221
|
editor?: undefined;
|
306
|
-
defaultValue?: undefined;
|
307
222
|
description?: undefined;
|
308
223
|
reorder?: undefined;
|
224
|
+
defaultValue?: undefined;
|
309
225
|
components?: undefined;
|
310
226
|
skipMerge?: undefined;
|
311
227
|
refreshOn?: undefined;
|
@@ -340,8 +256,8 @@ declare const _default: ({
|
|
340
256
|
data?: undefined;
|
341
257
|
as?: undefined;
|
342
258
|
editor?: undefined;
|
343
|
-
defaultValue?: undefined;
|
344
259
|
reorder?: undefined;
|
260
|
+
defaultValue?: undefined;
|
345
261
|
components?: undefined;
|
346
262
|
dataSrc?: undefined;
|
347
263
|
authenticate?: undefined;
|
@@ -411,9 +327,9 @@ declare const _default: ({
|
|
411
327
|
};
|
412
328
|
as?: undefined;
|
413
329
|
editor?: undefined;
|
414
|
-
defaultValue?: undefined;
|
415
330
|
description?: undefined;
|
416
331
|
reorder?: undefined;
|
332
|
+
defaultValue?: undefined;
|
417
333
|
components?: undefined;
|
418
334
|
authenticate?: undefined;
|
419
335
|
placeholder?: undefined;
|
@@ -443,12 +359,12 @@ declare const _default: ({
|
|
443
359
|
url?: undefined;
|
444
360
|
custom?: undefined;
|
445
361
|
};
|
446
|
-
conditional?: undefined;
|
447
362
|
as?: undefined;
|
448
363
|
editor?: undefined;
|
449
|
-
defaultValue?: undefined;
|
450
364
|
description?: undefined;
|
365
|
+
conditional?: undefined;
|
451
366
|
reorder?: undefined;
|
367
|
+
defaultValue?: undefined;
|
452
368
|
components?: undefined;
|
453
369
|
authenticate?: undefined;
|
454
370
|
valueProperty?: undefined;
|
@@ -475,12 +391,53 @@ declare const _default: ({
|
|
475
391
|
placeholder: string;
|
476
392
|
tooltip: string;
|
477
393
|
data?: undefined;
|
478
|
-
conditional?: undefined;
|
479
394
|
as?: undefined;
|
480
395
|
editor?: undefined;
|
396
|
+
description?: undefined;
|
397
|
+
conditional?: undefined;
|
398
|
+
reorder?: undefined;
|
481
399
|
defaultValue?: undefined;
|
400
|
+
components?: undefined;
|
401
|
+
dataSrc?: undefined;
|
402
|
+
authenticate?: undefined;
|
403
|
+
template?: undefined;
|
404
|
+
valueProperty?: undefined;
|
405
|
+
clearOnHide?: undefined;
|
406
|
+
lazyLoad?: undefined;
|
407
|
+
skipMerge?: undefined;
|
408
|
+
refreshOn?: undefined;
|
409
|
+
onSetItems?: undefined;
|
410
|
+
onChange?: undefined;
|
411
|
+
validate?: undefined;
|
412
|
+
delimiter?: undefined;
|
413
|
+
requireDecimal?: undefined;
|
414
|
+
encrypted?: undefined;
|
415
|
+
rows?: undefined;
|
416
|
+
mask?: undefined;
|
417
|
+
tableView?: undefined;
|
418
|
+
alwaysEnabled?: undefined;
|
419
|
+
} | {
|
420
|
+
type: string;
|
421
|
+
input: boolean;
|
422
|
+
key: string;
|
423
|
+
label: string;
|
424
|
+
tooltip: string;
|
425
|
+
weight: number;
|
426
|
+
conditional: {
|
427
|
+
json: {
|
428
|
+
'===': (string | {
|
429
|
+
var: string;
|
430
|
+
})[];
|
431
|
+
and?: undefined;
|
432
|
+
in?: undefined;
|
433
|
+
};
|
434
|
+
};
|
435
|
+
data?: undefined;
|
436
|
+
as?: undefined;
|
437
|
+
editor?: undefined;
|
482
438
|
description?: undefined;
|
483
439
|
reorder?: undefined;
|
440
|
+
defaultValue?: undefined;
|
484
441
|
components?: undefined;
|
485
442
|
dataSrc?: undefined;
|
486
443
|
authenticate?: undefined;
|
@@ -492,6 +449,7 @@ declare const _default: ({
|
|
492
449
|
refreshOn?: undefined;
|
493
450
|
onSetItems?: undefined;
|
494
451
|
onChange?: undefined;
|
452
|
+
placeholder?: undefined;
|
495
453
|
validate?: undefined;
|
496
454
|
delimiter?: undefined;
|
497
455
|
requireDecimal?: undefined;
|
@@ -520,8 +478,8 @@ declare const _default: ({
|
|
520
478
|
data?: undefined;
|
521
479
|
as?: undefined;
|
522
480
|
editor?: undefined;
|
523
|
-
defaultValue?: undefined;
|
524
481
|
reorder?: undefined;
|
482
|
+
defaultValue?: undefined;
|
525
483
|
components?: undefined;
|
526
484
|
dataSrc?: undefined;
|
527
485
|
authenticate?: undefined;
|
@@ -668,8 +626,8 @@ declare const _default: ({
|
|
668
626
|
data?: undefined;
|
669
627
|
as?: undefined;
|
670
628
|
editor?: undefined;
|
671
|
-
defaultValue?: undefined;
|
672
629
|
reorder?: undefined;
|
630
|
+
defaultValue?: undefined;
|
673
631
|
components?: undefined;
|
674
632
|
dataSrc?: undefined;
|
675
633
|
authenticate?: undefined;
|
@@ -710,9 +668,9 @@ declare const _default: ({
|
|
710
668
|
};
|
711
669
|
data?: undefined;
|
712
670
|
as?: undefined;
|
713
|
-
defaultValue?: undefined;
|
714
671
|
description?: undefined;
|
715
672
|
reorder?: undefined;
|
673
|
+
defaultValue?: undefined;
|
716
674
|
components?: undefined;
|
717
675
|
dataSrc?: undefined;
|
718
676
|
authenticate?: undefined;
|
@@ -759,9 +717,9 @@ declare const _default: ({
|
|
759
717
|
};
|
760
718
|
as?: undefined;
|
761
719
|
editor?: undefined;
|
762
|
-
defaultValue?: undefined;
|
763
720
|
description?: undefined;
|
764
721
|
reorder?: undefined;
|
722
|
+
defaultValue?: undefined;
|
765
723
|
components?: undefined;
|
766
724
|
authenticate?: undefined;
|
767
725
|
template?: undefined;
|
@@ -831,10 +789,10 @@ declare const _default: ({
|
|
831
789
|
defaultValue: boolean;
|
832
790
|
tooltip: string;
|
833
791
|
data?: undefined;
|
834
|
-
conditional?: undefined;
|
835
792
|
as?: undefined;
|
836
793
|
editor?: undefined;
|
837
794
|
description?: undefined;
|
795
|
+
conditional?: undefined;
|
838
796
|
reorder?: undefined;
|
839
797
|
components?: undefined;
|
840
798
|
dataSrc?: undefined;
|
@@ -927,10 +885,10 @@ declare const _default: ({
|
|
927
885
|
weight: number;
|
928
886
|
tooltip: string;
|
929
887
|
data?: undefined;
|
930
|
-
conditional?: undefined;
|
931
888
|
as?: undefined;
|
932
889
|
editor?: undefined;
|
933
890
|
description?: undefined;
|
891
|
+
conditional?: undefined;
|
934
892
|
reorder?: undefined;
|
935
893
|
components?: undefined;
|
936
894
|
dataSrc?: undefined;
|
@@ -973,9 +931,9 @@ declare const _default: ({
|
|
973
931
|
data?: undefined;
|
974
932
|
as?: undefined;
|
975
933
|
editor?: undefined;
|
976
|
-
defaultValue?: undefined;
|
977
934
|
description?: undefined;
|
978
935
|
reorder?: undefined;
|
936
|
+
defaultValue?: undefined;
|
979
937
|
components?: undefined;
|
980
938
|
dataSrc?: undefined;
|
981
939
|
authenticate?: undefined;
|
@@ -1003,12 +961,12 @@ declare const _default: ({
|
|
1003
961
|
label: string;
|
1004
962
|
tooltip: string;
|
1005
963
|
data?: undefined;
|
1006
|
-
conditional?: undefined;
|
1007
964
|
as?: undefined;
|
1008
965
|
editor?: undefined;
|
1009
|
-
defaultValue?: undefined;
|
1010
966
|
description?: undefined;
|
967
|
+
conditional?: undefined;
|
1011
968
|
reorder?: undefined;
|
969
|
+
defaultValue?: undefined;
|
1012
970
|
components?: undefined;
|
1013
971
|
dataSrc?: undefined;
|
1014
972
|
authenticate?: undefined;
|
@@ -1040,8 +998,8 @@ declare const _default: ({
|
|
1040
998
|
tooltip: string;
|
1041
999
|
defaultValue: {};
|
1042
1000
|
data?: undefined;
|
1043
|
-
conditional?: undefined;
|
1044
1001
|
description?: undefined;
|
1002
|
+
conditional?: undefined;
|
1045
1003
|
reorder?: undefined;
|
1046
1004
|
components?: undefined;
|
1047
1005
|
dataSrc?: undefined;
|
@@ -1069,16 +1027,16 @@ declare const _default: ({
|
|
1069
1027
|
onChange(context: any): void;
|
1070
1028
|
data?: undefined;
|
1071
1029
|
type?: undefined;
|
1030
|
+
as?: undefined;
|
1031
|
+
editor?: undefined;
|
1072
1032
|
weight?: undefined;
|
1073
1033
|
input?: undefined;
|
1074
1034
|
label?: undefined;
|
1075
1035
|
tooltip?: undefined;
|
1076
|
-
conditional?: undefined;
|
1077
|
-
as?: undefined;
|
1078
|
-
editor?: undefined;
|
1079
|
-
defaultValue?: undefined;
|
1080
1036
|
description?: undefined;
|
1037
|
+
conditional?: undefined;
|
1081
1038
|
reorder?: undefined;
|
1039
|
+
defaultValue?: undefined;
|
1082
1040
|
components?: undefined;
|
1083
1041
|
dataSrc?: undefined;
|
1084
1042
|
authenticate?: undefined;
|
@@ -1150,15 +1108,15 @@ declare const _default: ({
|
|
1150
1108
|
};
|
1151
1109
|
};
|
1152
1110
|
data?: undefined;
|
1111
|
+
as?: undefined;
|
1112
|
+
editor?: undefined;
|
1153
1113
|
weight?: undefined;
|
1154
1114
|
input?: undefined;
|
1155
1115
|
label?: undefined;
|
1156
1116
|
tooltip?: undefined;
|
1157
|
-
as?: undefined;
|
1158
|
-
editor?: undefined;
|
1159
|
-
defaultValue?: undefined;
|
1160
1117
|
description?: undefined;
|
1161
1118
|
reorder?: undefined;
|
1119
|
+
defaultValue?: undefined;
|
1162
1120
|
components?: undefined;
|
1163
1121
|
dataSrc?: undefined;
|
1164
1122
|
authenticate?: undefined;
|
@@ -1184,16 +1142,16 @@ declare const _default: ({
|
|
1184
1142
|
onChange(context: any): void;
|
1185
1143
|
data?: undefined;
|
1186
1144
|
type?: undefined;
|
1145
|
+
as?: undefined;
|
1146
|
+
editor?: undefined;
|
1187
1147
|
weight?: undefined;
|
1188
1148
|
input?: undefined;
|
1189
1149
|
label?: undefined;
|
1190
1150
|
tooltip?: undefined;
|
1191
|
-
conditional?: undefined;
|
1192
|
-
as?: undefined;
|
1193
|
-
editor?: undefined;
|
1194
|
-
defaultValue?: undefined;
|
1195
1151
|
description?: undefined;
|
1152
|
+
conditional?: undefined;
|
1196
1153
|
reorder?: undefined;
|
1154
|
+
defaultValue?: undefined;
|
1197
1155
|
components?: undefined;
|
1198
1156
|
dataSrc?: undefined;
|
1199
1157
|
authenticate?: undefined;
|
@@ -62,42 +62,6 @@ exports.default = [
|
|
62
62
|
],
|
63
63
|
},
|
64
64
|
},
|
65
|
-
{
|
66
|
-
type: 'textfield',
|
67
|
-
weight: 10,
|
68
|
-
input: true,
|
69
|
-
key: 'indexeddb.database',
|
70
|
-
label: 'Database name',
|
71
|
-
tooltip: 'The name of the indexeddb database.',
|
72
|
-
conditional: {
|
73
|
-
json: { '===': [{ var: 'data.dataSrc' }, 'indexeddb'] },
|
74
|
-
},
|
75
|
-
},
|
76
|
-
{
|
77
|
-
type: 'textfield',
|
78
|
-
input: true,
|
79
|
-
key: 'indexeddb.table',
|
80
|
-
label: 'Table name',
|
81
|
-
weight: 16,
|
82
|
-
tooltip: 'The name of table in the indexeddb database.',
|
83
|
-
conditional: {
|
84
|
-
json: { '===': [{ var: 'data.dataSrc' }, 'indexeddb'] },
|
85
|
-
}
|
86
|
-
},
|
87
|
-
{
|
88
|
-
type: 'textarea',
|
89
|
-
as: 'json',
|
90
|
-
editor: 'ace',
|
91
|
-
weight: 18,
|
92
|
-
input: true,
|
93
|
-
key: 'indexeddb.filter',
|
94
|
-
label: 'Row Filter',
|
95
|
-
tooltip: 'Filter table items that match the object.',
|
96
|
-
defaultValue: {},
|
97
|
-
conditional: {
|
98
|
-
json: { '===': [{ var: 'data.dataSrc' }, 'indexeddb'] },
|
99
|
-
},
|
100
|
-
},
|
101
65
|
{
|
102
66
|
type: 'textarea',
|
103
67
|
as: 'json',
|
@@ -43,14 +43,6 @@ 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
|
-
};
|
54
46
|
get removeValueIcon(): any;
|
55
47
|
get searchInput(): any;
|
56
48
|
get addRowButton(): any;
|
@@ -20,6 +20,7 @@ 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: {},
|
23
24
|
manualModeViewString: '',
|
24
25
|
hideLabel: false,
|
25
26
|
disableClearIcon: false,
|
@@ -112,20 +113,20 @@ export default class AddressComponent extends ContainerComponent {
|
|
112
113
|
NestedComponent.prototype.addComponents.call(this, this.manualMode ? this.address : {});
|
113
114
|
}
|
114
115
|
Field.prototype.init.call(this);
|
115
|
-
let provider = this.component.provider;
|
116
|
-
const providerOptions = this.providerOptions;
|
117
|
-
const map = this.component.map;
|
118
116
|
if (!this.builderMode) {
|
119
|
-
if (provider) {
|
117
|
+
if (this.component.provider) {
|
118
|
+
const { provider, providerOptions, } = this.component;
|
120
119
|
if (_.get(providerOptions, 'params.subscriptionKey')) {
|
121
120
|
_.set(providerOptions, "params['subscription-key']", _.get(providerOptions, 'params.subscriptionKey'));
|
122
121
|
_.unset(providerOptions, 'params.subscriptionKey');
|
123
122
|
}
|
124
123
|
this.provider = this.initializeProvider(provider, providerOptions);
|
125
124
|
}
|
126
|
-
else if (map) {
|
125
|
+
else if (this.component.map) {
|
127
126
|
// Fallback to legacy version where Google Maps was the only provider.
|
128
|
-
|
127
|
+
this.component.provider = GoogleAddressProvider.name;
|
128
|
+
this.component.providerOptions = this.component.providerOptions || {};
|
129
|
+
const { map, provider, providerOptions, } = this.component;
|
129
130
|
const { key, region, } = map;
|
130
131
|
if (key) {
|
131
132
|
_.set(providerOptions, 'params.key', key);
|
@@ -257,16 +258,6 @@ export default class AddressComponent extends ContainerComponent {
|
|
257
258
|
? (this.refs[AddressComponent.modeSwitcherRef] || null)
|
258
259
|
: null;
|
259
260
|
}
|
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
|
-
}
|
270
261
|
get removeValueIcon() {
|
271
262
|
return this.refs
|
272
263
|
? (this.refs[AddressComponent.removeValueIconRef] || null)
|
@@ -380,8 +371,7 @@ export default class AddressComponent extends ContainerComponent {
|
|
380
371
|
const result = ((this.builderMode || this.manualMode) ? super.attach : Field.prototype.attach).call(this, element);
|
381
372
|
if (!this.builderMode) {
|
382
373
|
if (!this.provider && this.component.provider) {
|
383
|
-
const provider = this.component
|
384
|
-
const providerOptions = this.providerOptions;
|
374
|
+
const { provider, providerOptions, } = this.component;
|
385
375
|
this.provider = this.initializeProvider(provider, providerOptions);
|
386
376
|
}
|
387
377
|
}
|