@formio/js 5.0.0-dev.5654.e25521b → 5.0.0-dev.5655.a31d680
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 +4 -4
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +4 -4
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/lib/cjs/components/_classes/input/Input.js +6 -4
- package/lib/cjs/providers/address/GoogleAddressProvider.js +1 -1
- package/lib/cjs/translations/en.d.ts +2 -0
- package/lib/cjs/translations/en.js +3 -1
- package/lib/cjs/utils/ChoicesWrapper.d.ts +1 -1
- package/lib/cjs/utils/ChoicesWrapper.js +2 -13
- package/lib/mjs/components/_classes/input/Input.js +6 -4
- package/lib/mjs/providers/address/GoogleAddressProvider.js +1 -1
- package/lib/mjs/translations/en.d.ts +2 -0
- package/lib/mjs/translations/en.js +3 -1
- package/lib/mjs/utils/ChoicesWrapper.d.ts +1 -1
- package/lib/mjs/utils/ChoicesWrapper.js +2 -13
- package/package.json +1 -1
|
@@ -151,13 +151,15 @@ class Input extends Multivalue_1.default {
|
|
|
151
151
|
else {
|
|
152
152
|
this.addClass(element, 'text-danger');
|
|
153
153
|
}
|
|
154
|
-
this.setContent(element, this.t(`
|
|
155
|
-
remaining: remaining
|
|
154
|
+
this.setContent(element, this.t(`typeRemaining`, {
|
|
155
|
+
remaining: remaining,
|
|
156
|
+
type: type
|
|
156
157
|
}));
|
|
157
158
|
}
|
|
158
159
|
else {
|
|
159
|
-
this.setContent(element, this.t(`
|
|
160
|
-
count: count
|
|
160
|
+
this.setContent(element, this.t(`typeCount`, {
|
|
161
|
+
count: count,
|
|
162
|
+
type: type
|
|
161
163
|
}));
|
|
162
164
|
}
|
|
163
165
|
}
|
|
@@ -55,7 +55,7 @@ class GoogleAddressProvider extends AddressProvider_1.AddressProvider {
|
|
|
55
55
|
var _a;
|
|
56
56
|
super(options);
|
|
57
57
|
this.setAutocompleteOptions();
|
|
58
|
-
let src = 'https://maps.googleapis.com/maps/api/js?v=quarterly&libraries=places&callback=googleMapsCallback';
|
|
58
|
+
let src = 'https://maps.googleapis.com/maps/api/js?v=quarterly&libraries=places&loading=async&callback=googleMapsCallback';
|
|
59
59
|
if ((_a = options.params) === null || _a === void 0 ? void 0 : _a.key) {
|
|
60
60
|
src += `&key=${options.params.key}`;
|
|
61
61
|
}
|
|
@@ -73,5 +73,7 @@ exports.default = {
|
|
|
73
73
|
submitButtonAriaLabel: 'Submit Form button. Click to submit the form',
|
|
74
74
|
reCaptchaTokenValidationError: 'ReCAPTCHA: Token validation error',
|
|
75
75
|
reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission',
|
|
76
|
-
apiKey: 'API Key is not unique: {{key}}'
|
|
76
|
+
apiKey: 'API Key is not unique: {{key}}',
|
|
77
|
+
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
|
78
|
+
typeCount: '{{ count }} {{ type }}'
|
|
77
79
|
};
|
|
@@ -24,7 +24,7 @@ declare class ChoicesWrapper extends Choices {
|
|
|
24
24
|
_onEnterKey(args: any): void;
|
|
25
25
|
_onDirectionKey(...args: any[]): void;
|
|
26
26
|
timeout: NodeJS.Timeout | undefined;
|
|
27
|
-
_selectHighlightedChoice(): void;
|
|
27
|
+
_selectHighlightedChoice(activeItems: any): void;
|
|
28
28
|
_onKeyDown(event: any): void;
|
|
29
29
|
onSelectValue({ event, activeItems, hasActiveDropdown }: {
|
|
30
30
|
event: any;
|
|
@@ -105,21 +105,10 @@ class ChoicesWrapper extends choices_js_1.default {
|
|
|
105
105
|
this._selectHighlightedChoice(activeItems);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
_selectHighlightedChoice() {
|
|
108
|
+
_selectHighlightedChoice(activeItems) {
|
|
109
109
|
const highlightedChoice = this.dropdown.getChild(`.${this.config.classNames.highlightedState}`);
|
|
110
110
|
if (highlightedChoice) {
|
|
111
|
-
|
|
112
|
-
const choice = id && this._store.getChoiceById(id);
|
|
113
|
-
this._addItem({
|
|
114
|
-
value: choice.value,
|
|
115
|
-
label: choice.label,
|
|
116
|
-
choiceId: choice.id,
|
|
117
|
-
groupId: choice.groupId,
|
|
118
|
-
customProperties: choice.customProperties,
|
|
119
|
-
placeholder: choice.placeholder,
|
|
120
|
-
keyCode: choice.keyCode
|
|
121
|
-
});
|
|
122
|
-
this._triggerChange(choice.value);
|
|
111
|
+
this._handleChoiceAction(activeItems, highlightedChoice);
|
|
123
112
|
}
|
|
124
113
|
event.preventDefault();
|
|
125
114
|
}
|
|
@@ -146,13 +146,15 @@ export default class Input extends Multivalue {
|
|
|
146
146
|
else {
|
|
147
147
|
this.addClass(element, 'text-danger');
|
|
148
148
|
}
|
|
149
|
-
this.setContent(element, this.t(`
|
|
150
|
-
remaining: remaining
|
|
149
|
+
this.setContent(element, this.t(`typeRemaining`, {
|
|
150
|
+
remaining: remaining,
|
|
151
|
+
type: type
|
|
151
152
|
}));
|
|
152
153
|
}
|
|
153
154
|
else {
|
|
154
|
-
this.setContent(element, this.t(`
|
|
155
|
-
count: count
|
|
155
|
+
this.setContent(element, this.t(`typeCount`, {
|
|
156
|
+
count: count,
|
|
157
|
+
type: type
|
|
156
158
|
}));
|
|
157
159
|
}
|
|
158
160
|
}
|
|
@@ -48,7 +48,7 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
|
48
48
|
constructor(options = {}) {
|
|
49
49
|
super(options);
|
|
50
50
|
this.setAutocompleteOptions();
|
|
51
|
-
let src = 'https://maps.googleapis.com/maps/api/js?v=quarterly&libraries=places&callback=googleMapsCallback';
|
|
51
|
+
let src = 'https://maps.googleapis.com/maps/api/js?v=quarterly&libraries=places&loading=async&callback=googleMapsCallback';
|
|
52
52
|
if (options.params?.key) {
|
|
53
53
|
src += `&key=${options.params.key}`;
|
|
54
54
|
}
|
|
@@ -71,5 +71,7 @@ export default {
|
|
|
71
71
|
submitButtonAriaLabel: 'Submit Form button. Click to submit the form',
|
|
72
72
|
reCaptchaTokenValidationError: 'ReCAPTCHA: Token validation error',
|
|
73
73
|
reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission',
|
|
74
|
-
apiKey: 'API Key is not unique: {{key}}'
|
|
74
|
+
apiKey: 'API Key is not unique: {{key}}',
|
|
75
|
+
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
|
76
|
+
typeCount: '{{ count }} {{ type }}'
|
|
75
77
|
};
|
|
@@ -24,7 +24,7 @@ declare class ChoicesWrapper extends Choices {
|
|
|
24
24
|
_onEnterKey(args: any): void;
|
|
25
25
|
_onDirectionKey(...args: any[]): void;
|
|
26
26
|
timeout: NodeJS.Timeout | undefined;
|
|
27
|
-
_selectHighlightedChoice(): void;
|
|
27
|
+
_selectHighlightedChoice(activeItems: any): void;
|
|
28
28
|
_onKeyDown(event: any): void;
|
|
29
29
|
onSelectValue({ event, activeItems, hasActiveDropdown }: {
|
|
30
30
|
event: any;
|
|
@@ -99,21 +99,10 @@ class ChoicesWrapper extends Choices {
|
|
|
99
99
|
this._selectHighlightedChoice(activeItems);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
_selectHighlightedChoice() {
|
|
102
|
+
_selectHighlightedChoice(activeItems) {
|
|
103
103
|
const highlightedChoice = this.dropdown.getChild(`.${this.config.classNames.highlightedState}`);
|
|
104
104
|
if (highlightedChoice) {
|
|
105
|
-
|
|
106
|
-
const choice = id && this._store.getChoiceById(id);
|
|
107
|
-
this._addItem({
|
|
108
|
-
value: choice.value,
|
|
109
|
-
label: choice.label,
|
|
110
|
-
choiceId: choice.id,
|
|
111
|
-
groupId: choice.groupId,
|
|
112
|
-
customProperties: choice.customProperties,
|
|
113
|
-
placeholder: choice.placeholder,
|
|
114
|
-
keyCode: choice.keyCode
|
|
115
|
-
});
|
|
116
|
-
this._triggerChange(choice.value);
|
|
105
|
+
this._handleChoiceAction(activeItems, highlightedChoice);
|
|
117
106
|
}
|
|
118
107
|
event.preventDefault();
|
|
119
108
|
}
|