@aws-amplify/ui-react 1.2.26 → 1.2.54-legacy-ui.10
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 +224 -0
- package/dist/0.js.map +1 -1
- package/dist/1.js +656 -2000
- package/dist/1.js.map +1 -1
- package/dist/10.js +23 -681
- package/dist/10.js.map +1 -1
- package/dist/11.js +1157 -20
- package/dist/11.js.map +1 -1
- package/dist/12.js +61 -1087
- package/dist/12.js.map +1 -1
- package/dist/13.js +1146 -64
- package/dist/13.js.map +1 -1
- package/dist/14.js +34 -1163
- package/dist/14.js.map +1 -1
- package/dist/15.js +17 -37
- package/dist/15.js.map +1 -1
- package/dist/16.js +109 -13
- package/dist/16.js.map +1 -1
- package/dist/17.js +32 -67
- package/dist/17.js.map +1 -1
- package/dist/18.js +236 -46
- package/dist/18.js.map +1 -1
- package/dist/19.js +35 -224
- package/dist/19.js.map +1 -1
- package/dist/2.js +2190 -159
- package/dist/2.js.map +1 -1
- package/dist/20.js +28 -48
- package/dist/20.js.map +1 -1
- package/dist/21.js +46 -25
- package/dist/21.js.map +1 -1
- package/dist/22.js +22 -25
- package/dist/22.js.map +1 -1
- package/dist/23.js +254 -25
- package/dist/23.js.map +1 -1
- package/dist/24.js +62 -230
- package/dist/24.js.map +1 -1
- package/dist/25.js +28 -62
- package/dist/25.js.map +1 -1
- package/dist/26.js +349 -30
- package/dist/26.js.map +1 -1
- package/dist/27.js +24 -352
- package/dist/27.js.map +1 -1
- package/dist/28.js +25 -22
- package/dist/28.js.map +1 -1
- package/dist/29.js +483 -26
- package/dist/29.js.map +1 -1
- package/dist/3.js +2710 -1818
- package/dist/3.js.map +1 -1
- package/dist/30.js +1 -502
- package/dist/30.js.map +1 -1
- package/dist/31.js +1 -1
- package/dist/31.js.map +1 -1
- package/dist/32.js +12 -1
- package/dist/32.js.map +1 -1
- package/dist/4.js +361 -3669
- package/dist/4.js.map +1 -1
- package/dist/5.js +48 -242
- package/dist/5.js.map +1 -1
- package/dist/6.js +118 -74
- package/dist/6.js.map +1 -1
- package/dist/7.js +55 -99
- package/dist/7.js.map +1 -1
- package/dist/8.js +98 -46
- package/dist/8.js.map +1 -1
- package/dist/9.js +474 -412
- package/dist/9.js.map +1 -1
- package/dist/@aws-amplify/ui-react.js +50 -44
- package/dist/@aws-amplify/ui-react.js.map +1 -1
- package/dist/aws-amplify-react.min.js +2 -2
- package/dist/aws-amplify-react.min.js.map +1 -1
- package/dist/polyfills-core-js.js +5 -11
- package/dist/polyfills-core-js.js.map +1 -1
- package/dist/polyfills-css-shim.js.map +1 -1
- package/dist/polyfills-dom.js.map +1 -1
- package/package.json +3 -3
- package/dist/33.js +0 -13
- package/dist/33.js.map +0 -1
package/dist/11.js
CHANGED
|
@@ -1,40 +1,1177 @@
|
|
|
1
1
|
(this["webpackJsonpaws_amplify_react"] = this["webpackJsonpaws_amplify_react"] || []).push([[11],{
|
|
2
2
|
|
|
3
|
-
/***/ "../amplify-ui-components/dist/esm-es5/amplify-auth-
|
|
4
|
-
|
|
5
|
-
!*** ../amplify-ui-components/dist/esm-es5/amplify-auth-
|
|
6
|
-
|
|
7
|
-
/*! exports provided:
|
|
3
|
+
/***/ "../amplify-ui-components/dist/esm-es5/amplify-auth-fields_9.entry.js":
|
|
4
|
+
/*!****************************************************************************!*\
|
|
5
|
+
!*** ../amplify-ui-components/dist/esm-es5/amplify-auth-fields_9.entry.js ***!
|
|
6
|
+
\****************************************************************************/
|
|
7
|
+
/*! exports provided: amplify_auth_fields, amplify_code_field, amplify_country_dial_code, amplify_email_field, amplify_form_section, amplify_password_field, amplify_phone_field, amplify_select, amplify_username_field */
|
|
8
8
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9
9
|
|
|
10
10
|
"use strict";
|
|
11
11
|
__webpack_require__.r(__webpack_exports__);
|
|
12
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
12
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_auth_fields", function() { return AmplifyAuthFields; });
|
|
13
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_code_field", function() { return AmplifyCodeField; });
|
|
14
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_country_dial_code", function() { return AmplifyCountryDialCode; });
|
|
15
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_email_field", function() { return AmplifyEmailField; });
|
|
16
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_form_section", function() { return AmplifyFormSection; });
|
|
17
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_password_field", function() { return AmplifyPasswordField; });
|
|
18
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_phone_field", function() { return AmplifyPhoneField; });
|
|
19
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_select", function() { return AmplifySelect; });
|
|
20
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_username_field", function() { return AmplifyUsernameField; });
|
|
13
21
|
/* harmony import */ var _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-83f2275b.js */ "../amplify-ui-components/dist/esm-es5/index-83f2275b.js");
|
|
22
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
23
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
24
|
+
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
|
|
25
|
+
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_2__);
|
|
26
|
+
/* harmony import */ var _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Translations-108d469f.js */ "../amplify-ui-components/dist/esm-es5/Translations-108d469f.js");
|
|
27
|
+
/* harmony import */ var _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants-c8ecaa24.js */ "../amplify-ui-components/dist/esm-es5/constants-c8ecaa24.js");
|
|
14
28
|
|
|
15
29
|
|
|
16
|
-
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
var componentFieldMapping = {
|
|
34
|
+
username: function username(ff) {
|
|
35
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-username-field", {
|
|
36
|
+
label: ff.label,
|
|
37
|
+
placeholder: ff.placeholder,
|
|
38
|
+
required: ff.required,
|
|
39
|
+
handleInputChange: ff.handleInputChange,
|
|
40
|
+
value: ff.value,
|
|
41
|
+
inputProps: ff.inputProps,
|
|
42
|
+
disabled: ff.disabled,
|
|
43
|
+
hint: ff.hint
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
password: function password(ff) {
|
|
47
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-password-field", {
|
|
48
|
+
label: ff.label,
|
|
49
|
+
placeholder: ff.placeholder,
|
|
50
|
+
hint: ff.hint,
|
|
51
|
+
required: ff.required,
|
|
52
|
+
handleInputChange: ff.handleInputChange,
|
|
53
|
+
value: ff.value,
|
|
54
|
+
inputProps: ff.inputProps,
|
|
55
|
+
disabled: ff.disabled
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
email: function email(ff) {
|
|
59
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-email-field", {
|
|
60
|
+
label: ff.label,
|
|
61
|
+
placeholder: ff.placeholder,
|
|
62
|
+
required: ff.required,
|
|
63
|
+
handleInputChange: ff.handleInputChange,
|
|
64
|
+
value: ff.value,
|
|
65
|
+
inputProps: ff.inputProps,
|
|
66
|
+
disabled: ff.disabled,
|
|
67
|
+
hint: ff.hint
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
code: function code(ff) {
|
|
71
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-code-field", {
|
|
72
|
+
label: ff.label,
|
|
73
|
+
placeholder: ff.placeholder,
|
|
74
|
+
hint: ff.hint,
|
|
75
|
+
required: ff.required,
|
|
76
|
+
handleInputChange: ff.handleInputChange,
|
|
77
|
+
value: ff.value,
|
|
78
|
+
inputProps: Object.assign(Object.assign({}, ff.inputProps), {
|
|
79
|
+
min: '0'
|
|
80
|
+
}),
|
|
81
|
+
disabled: ff.disabled
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
// TODO: Will create a phone field component once the dial country code component is in
|
|
85
|
+
phone_number: function phone_number(ff) {
|
|
86
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-phone-field", {
|
|
87
|
+
label: ff.label,
|
|
88
|
+
placeholder: ff.placeholder,
|
|
89
|
+
required: ff.required,
|
|
90
|
+
handleInputChange: ff.handleInputChange,
|
|
91
|
+
value: ff.value,
|
|
92
|
+
inputProps: ff.inputProps,
|
|
93
|
+
disabled: ff.disabled,
|
|
94
|
+
dialCode: ff.dialCode,
|
|
95
|
+
hint: ff.hint
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
"default": function _default(ff) {
|
|
99
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
|
|
100
|
+
label: ff.label,
|
|
101
|
+
type: ff.type,
|
|
102
|
+
placeholder: ff.placeholder,
|
|
103
|
+
required: ff.required,
|
|
104
|
+
handleInputChange: ff.handleInputChange,
|
|
105
|
+
value: ff.value,
|
|
106
|
+
inputProps: ff.inputProps,
|
|
107
|
+
disabled: ff.disabled,
|
|
108
|
+
hint: ff.hint
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
var amplifyAuthFieldsCss = ".auth-fields{margin-bottom:2rem}";
|
|
113
|
+
|
|
114
|
+
var AmplifyAuthFields =
|
|
115
|
+
/** @class */
|
|
116
|
+
function () {
|
|
117
|
+
function AmplifyAuthFields(hostRef) {
|
|
118
|
+
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
AmplifyAuthFields.prototype.componentWillLoad = function () {
|
|
122
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
AmplifyAuthFields.prototype.constructFormFieldOptions = function (formFields) {
|
|
126
|
+
var content = [];
|
|
127
|
+
if (formFields === undefined) return '';
|
|
128
|
+
formFields.forEach(function (formField) {
|
|
129
|
+
if (typeof formField === 'string') {
|
|
130
|
+
content.push(componentFieldMapping[formField](formField));
|
|
131
|
+
} else if (Object.keys(componentFieldMapping).includes(formField.type)) {
|
|
132
|
+
content.push(componentFieldMapping[formField.type](formField));
|
|
133
|
+
} else {
|
|
134
|
+
content.push(componentFieldMapping['default'](formField));
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
return content;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
AmplifyAuthFields.prototype.render = function () {
|
|
141
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
|
142
|
+
"class": "auth-fields"
|
|
143
|
+
}, this.constructFormFieldOptions(this.formFields));
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
return AmplifyAuthFields;
|
|
147
|
+
}();
|
|
148
|
+
|
|
149
|
+
AmplifyAuthFields.style = amplifyAuthFieldsCss;
|
|
150
|
+
|
|
151
|
+
var AmplifyCodeField =
|
|
152
|
+
/** @class */
|
|
153
|
+
function () {
|
|
154
|
+
function AmplifyCodeField(hostRef) {
|
|
155
|
+
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
156
|
+
/** Based on the type of field e.g. sign in, sign up, forgot password, etc. */
|
|
157
|
+
|
|
158
|
+
this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["i"];
|
|
159
|
+
/** Used for the code label */
|
|
160
|
+
|
|
161
|
+
this.label = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].CODE_LABEL;
|
|
162
|
+
/** Used for the placeholder label */
|
|
163
|
+
|
|
164
|
+
this.placeholder = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].CODE_PLACEHOLDER;
|
|
165
|
+
/** The required flag in order to make an input required prior to submitting a form */
|
|
166
|
+
|
|
167
|
+
this.required = false;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
AmplifyCodeField.prototype.componentWillLoad = function () {
|
|
171
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
AmplifyCodeField.prototype.render = function () {
|
|
175
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
|
|
176
|
+
fieldId: this.fieldId,
|
|
177
|
+
label: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.label),
|
|
178
|
+
placeholder: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.placeholder),
|
|
179
|
+
type: "number",
|
|
180
|
+
hint: this.hint,
|
|
181
|
+
required: this.required,
|
|
182
|
+
handleInputChange: this.handleInputChange,
|
|
183
|
+
value: this.value,
|
|
184
|
+
inputProps: this.inputProps,
|
|
185
|
+
disabled: this.disabled
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
return AmplifyCodeField;
|
|
190
|
+
}();
|
|
191
|
+
|
|
192
|
+
var countryDialCodes = [{
|
|
193
|
+
label: '+1',
|
|
194
|
+
value: '+1'
|
|
195
|
+
}, {
|
|
196
|
+
label: '+7',
|
|
197
|
+
value: '+7'
|
|
198
|
+
}, {
|
|
199
|
+
label: '+20',
|
|
200
|
+
value: '+20'
|
|
201
|
+
}, {
|
|
202
|
+
label: '+27',
|
|
203
|
+
value: '+27'
|
|
204
|
+
}, {
|
|
205
|
+
label: '+30',
|
|
206
|
+
value: '+30'
|
|
207
|
+
}, {
|
|
208
|
+
label: '+31',
|
|
209
|
+
value: '+31'
|
|
210
|
+
}, {
|
|
211
|
+
label: '+32',
|
|
212
|
+
value: '+32'
|
|
213
|
+
}, {
|
|
214
|
+
label: '+33',
|
|
215
|
+
value: '+33'
|
|
216
|
+
}, {
|
|
217
|
+
label: '+34',
|
|
218
|
+
value: '+34'
|
|
219
|
+
}, {
|
|
220
|
+
label: '+36',
|
|
221
|
+
value: '+36'
|
|
222
|
+
}, {
|
|
223
|
+
label: '+39',
|
|
224
|
+
value: '+39'
|
|
225
|
+
}, {
|
|
226
|
+
label: '+40',
|
|
227
|
+
value: '+40'
|
|
228
|
+
}, {
|
|
229
|
+
label: '+41',
|
|
230
|
+
value: '+41'
|
|
231
|
+
}, {
|
|
232
|
+
label: '+43',
|
|
233
|
+
value: '+43'
|
|
234
|
+
}, {
|
|
235
|
+
label: '+44',
|
|
236
|
+
value: '+44'
|
|
237
|
+
}, {
|
|
238
|
+
label: '+45',
|
|
239
|
+
value: '+45'
|
|
240
|
+
}, {
|
|
241
|
+
label: '+46',
|
|
242
|
+
value: '+46'
|
|
243
|
+
}, {
|
|
244
|
+
label: '+47',
|
|
245
|
+
value: '+47'
|
|
246
|
+
}, {
|
|
247
|
+
label: '+48',
|
|
248
|
+
value: '+48'
|
|
249
|
+
}, {
|
|
250
|
+
label: '+49',
|
|
251
|
+
value: '+49'
|
|
252
|
+
}, {
|
|
253
|
+
label: '+51',
|
|
254
|
+
value: '+51'
|
|
255
|
+
}, {
|
|
256
|
+
label: '+52',
|
|
257
|
+
value: '+52'
|
|
258
|
+
}, {
|
|
259
|
+
label: '+53',
|
|
260
|
+
value: '+53'
|
|
261
|
+
}, {
|
|
262
|
+
label: '+54',
|
|
263
|
+
value: '+54'
|
|
264
|
+
}, {
|
|
265
|
+
label: '+55',
|
|
266
|
+
value: '+55'
|
|
267
|
+
}, {
|
|
268
|
+
label: '+56',
|
|
269
|
+
value: '+56'
|
|
270
|
+
}, {
|
|
271
|
+
label: '+57',
|
|
272
|
+
value: '+57'
|
|
273
|
+
}, {
|
|
274
|
+
label: '+58',
|
|
275
|
+
value: '+58'
|
|
276
|
+
}, {
|
|
277
|
+
label: '+60',
|
|
278
|
+
value: '+60'
|
|
279
|
+
}, {
|
|
280
|
+
label: '+61',
|
|
281
|
+
value: '+61'
|
|
282
|
+
}, {
|
|
283
|
+
label: '+62',
|
|
284
|
+
value: '+62'
|
|
285
|
+
}, {
|
|
286
|
+
label: '+63',
|
|
287
|
+
value: '+63'
|
|
288
|
+
}, {
|
|
289
|
+
label: '+64',
|
|
290
|
+
value: '+64'
|
|
291
|
+
}, {
|
|
292
|
+
label: '+65',
|
|
293
|
+
value: '+65'
|
|
294
|
+
}, {
|
|
295
|
+
label: '+66',
|
|
296
|
+
value: '+66'
|
|
297
|
+
}, {
|
|
298
|
+
label: '+81',
|
|
299
|
+
value: '+81'
|
|
300
|
+
}, {
|
|
301
|
+
label: '+82',
|
|
302
|
+
value: '+82'
|
|
303
|
+
}, {
|
|
304
|
+
label: '+84',
|
|
305
|
+
value: '+84'
|
|
306
|
+
}, {
|
|
307
|
+
label: '+86',
|
|
308
|
+
value: '+86'
|
|
309
|
+
}, {
|
|
310
|
+
label: '+90',
|
|
311
|
+
value: '+90'
|
|
312
|
+
}, {
|
|
313
|
+
label: '+91',
|
|
314
|
+
value: '+91'
|
|
315
|
+
}, {
|
|
316
|
+
label: '+92',
|
|
317
|
+
value: '+92'
|
|
318
|
+
}, {
|
|
319
|
+
label: '+93',
|
|
320
|
+
value: '+93'
|
|
321
|
+
}, {
|
|
322
|
+
label: '+94',
|
|
323
|
+
value: '+94'
|
|
324
|
+
}, {
|
|
325
|
+
label: '+95',
|
|
326
|
+
value: '+95'
|
|
327
|
+
}, {
|
|
328
|
+
label: '+98',
|
|
329
|
+
value: '+98'
|
|
330
|
+
}, {
|
|
331
|
+
label: '+212',
|
|
332
|
+
value: '+212'
|
|
333
|
+
}, {
|
|
334
|
+
label: '+213',
|
|
335
|
+
value: '+213'
|
|
336
|
+
}, {
|
|
337
|
+
label: '+216',
|
|
338
|
+
value: '+216'
|
|
339
|
+
}, {
|
|
340
|
+
label: '+218',
|
|
341
|
+
value: '+218'
|
|
342
|
+
}, {
|
|
343
|
+
label: '+220',
|
|
344
|
+
value: '+220'
|
|
345
|
+
}, {
|
|
346
|
+
label: '+221',
|
|
347
|
+
value: '+221'
|
|
348
|
+
}, {
|
|
349
|
+
label: '+222',
|
|
350
|
+
value: '+222'
|
|
351
|
+
}, {
|
|
352
|
+
label: '+223',
|
|
353
|
+
value: '+223'
|
|
354
|
+
}, {
|
|
355
|
+
label: '+224',
|
|
356
|
+
value: '+224'
|
|
357
|
+
}, {
|
|
358
|
+
label: '+225',
|
|
359
|
+
value: '+225'
|
|
360
|
+
}, {
|
|
361
|
+
label: '+226',
|
|
362
|
+
value: '+226'
|
|
363
|
+
}, {
|
|
364
|
+
label: '+227',
|
|
365
|
+
value: '+227'
|
|
366
|
+
}, {
|
|
367
|
+
label: '+228',
|
|
368
|
+
value: '+228'
|
|
369
|
+
}, {
|
|
370
|
+
label: '+229',
|
|
371
|
+
value: '+229'
|
|
372
|
+
}, {
|
|
373
|
+
label: '+230',
|
|
374
|
+
value: '+230'
|
|
375
|
+
}, {
|
|
376
|
+
label: '+231',
|
|
377
|
+
value: '+231'
|
|
378
|
+
}, {
|
|
379
|
+
label: '+232',
|
|
380
|
+
value: '+232'
|
|
381
|
+
}, {
|
|
382
|
+
label: '+233',
|
|
383
|
+
value: '+233'
|
|
384
|
+
}, {
|
|
385
|
+
label: '+234',
|
|
386
|
+
value: '+234'
|
|
387
|
+
}, {
|
|
388
|
+
label: '+235',
|
|
389
|
+
value: '+235'
|
|
390
|
+
}, {
|
|
391
|
+
label: '+236',
|
|
392
|
+
value: '+236'
|
|
393
|
+
}, {
|
|
394
|
+
label: '+237',
|
|
395
|
+
value: '+237'
|
|
396
|
+
}, {
|
|
397
|
+
label: '+238',
|
|
398
|
+
value: '+238'
|
|
399
|
+
}, {
|
|
400
|
+
label: '+239',
|
|
401
|
+
value: '+239'
|
|
402
|
+
}, {
|
|
403
|
+
label: '+240',
|
|
404
|
+
value: '+240'
|
|
405
|
+
}, {
|
|
406
|
+
label: '+241',
|
|
407
|
+
value: '+241'
|
|
408
|
+
}, {
|
|
409
|
+
label: '+242',
|
|
410
|
+
value: '+242'
|
|
411
|
+
}, {
|
|
412
|
+
label: '+243',
|
|
413
|
+
value: '+243'
|
|
414
|
+
}, {
|
|
415
|
+
label: '+244',
|
|
416
|
+
value: '+244'
|
|
417
|
+
}, {
|
|
418
|
+
label: '+245',
|
|
419
|
+
value: '+245'
|
|
420
|
+
}, {
|
|
421
|
+
label: '+246',
|
|
422
|
+
value: '+246'
|
|
423
|
+
}, {
|
|
424
|
+
label: '+248',
|
|
425
|
+
value: '+248'
|
|
426
|
+
}, {
|
|
427
|
+
label: '+249',
|
|
428
|
+
value: '+249'
|
|
429
|
+
}, {
|
|
430
|
+
label: '+250',
|
|
431
|
+
value: '+250'
|
|
432
|
+
}, {
|
|
433
|
+
label: '+251',
|
|
434
|
+
value: '+251'
|
|
435
|
+
}, {
|
|
436
|
+
label: '+252',
|
|
437
|
+
value: '+252'
|
|
438
|
+
}, {
|
|
439
|
+
label: '+253',
|
|
440
|
+
value: '+253'
|
|
441
|
+
}, {
|
|
442
|
+
label: '+254',
|
|
443
|
+
value: '+254'
|
|
444
|
+
}, {
|
|
445
|
+
label: '+255',
|
|
446
|
+
value: '+255'
|
|
447
|
+
}, {
|
|
448
|
+
label: '+256',
|
|
449
|
+
value: '+256'
|
|
450
|
+
}, {
|
|
451
|
+
label: '+257',
|
|
452
|
+
value: '+257'
|
|
453
|
+
}, {
|
|
454
|
+
label: '+258',
|
|
455
|
+
value: '+258'
|
|
456
|
+
}, {
|
|
457
|
+
label: '+260',
|
|
458
|
+
value: '+260'
|
|
459
|
+
}, {
|
|
460
|
+
label: '+261',
|
|
461
|
+
value: '+261'
|
|
462
|
+
}, {
|
|
463
|
+
label: '+262',
|
|
464
|
+
value: '+262'
|
|
465
|
+
}, {
|
|
466
|
+
label: '+263',
|
|
467
|
+
value: '+263'
|
|
468
|
+
}, {
|
|
469
|
+
label: '+264',
|
|
470
|
+
value: '+264'
|
|
471
|
+
}, {
|
|
472
|
+
label: '+265',
|
|
473
|
+
value: '+265'
|
|
474
|
+
}, {
|
|
475
|
+
label: '+266',
|
|
476
|
+
value: '+266'
|
|
477
|
+
}, {
|
|
478
|
+
label: '+267',
|
|
479
|
+
value: '+267'
|
|
480
|
+
}, {
|
|
481
|
+
label: '+268',
|
|
482
|
+
value: '+268'
|
|
483
|
+
}, {
|
|
484
|
+
label: '+269',
|
|
485
|
+
value: '+269'
|
|
486
|
+
}, {
|
|
487
|
+
label: '+290',
|
|
488
|
+
value: '+290'
|
|
489
|
+
}, {
|
|
490
|
+
label: '+291',
|
|
491
|
+
value: '+291'
|
|
492
|
+
}, {
|
|
493
|
+
label: '+297',
|
|
494
|
+
value: '+297'
|
|
495
|
+
}, {
|
|
496
|
+
label: '+298',
|
|
497
|
+
value: '+298'
|
|
498
|
+
}, {
|
|
499
|
+
label: '+299',
|
|
500
|
+
value: '+299'
|
|
501
|
+
}, {
|
|
502
|
+
label: '+345',
|
|
503
|
+
value: '+345'
|
|
504
|
+
}, {
|
|
505
|
+
label: '+350',
|
|
506
|
+
value: '+350'
|
|
507
|
+
}, {
|
|
508
|
+
label: '+351',
|
|
509
|
+
value: '+351'
|
|
510
|
+
}, {
|
|
511
|
+
label: '+352',
|
|
512
|
+
value: '+352'
|
|
513
|
+
}, {
|
|
514
|
+
label: '+353',
|
|
515
|
+
value: '+353'
|
|
516
|
+
}, {
|
|
517
|
+
label: '+354',
|
|
518
|
+
value: '+354'
|
|
519
|
+
}, {
|
|
520
|
+
label: '+355',
|
|
521
|
+
value: '+355'
|
|
522
|
+
}, {
|
|
523
|
+
label: '+356',
|
|
524
|
+
value: '+356'
|
|
525
|
+
}, {
|
|
526
|
+
label: '+357',
|
|
527
|
+
value: '+357'
|
|
528
|
+
}, {
|
|
529
|
+
label: '+358',
|
|
530
|
+
value: '+358'
|
|
531
|
+
}, {
|
|
532
|
+
label: '+359',
|
|
533
|
+
value: '+359'
|
|
534
|
+
}, {
|
|
535
|
+
label: '+370',
|
|
536
|
+
value: '+370'
|
|
537
|
+
}, {
|
|
538
|
+
label: '+371',
|
|
539
|
+
value: '+371'
|
|
540
|
+
}, {
|
|
541
|
+
label: '+372',
|
|
542
|
+
value: '+372'
|
|
543
|
+
}, {
|
|
544
|
+
label: '+373',
|
|
545
|
+
value: '+373'
|
|
546
|
+
}, {
|
|
547
|
+
label: '+374',
|
|
548
|
+
value: '+374'
|
|
549
|
+
}, {
|
|
550
|
+
label: '+375',
|
|
551
|
+
value: '+375'
|
|
552
|
+
}, {
|
|
553
|
+
label: '+376',
|
|
554
|
+
value: '+376'
|
|
555
|
+
}, {
|
|
556
|
+
label: '+377',
|
|
557
|
+
value: '+377'
|
|
558
|
+
}, {
|
|
559
|
+
label: '+378',
|
|
560
|
+
value: '+378'
|
|
561
|
+
}, {
|
|
562
|
+
label: '+379',
|
|
563
|
+
value: '+379'
|
|
564
|
+
}, {
|
|
565
|
+
label: '+380',
|
|
566
|
+
value: '+380'
|
|
567
|
+
}, {
|
|
568
|
+
label: '+381',
|
|
569
|
+
value: '+381'
|
|
570
|
+
}, {
|
|
571
|
+
label: '+382',
|
|
572
|
+
value: '+382'
|
|
573
|
+
}, {
|
|
574
|
+
label: '+385',
|
|
575
|
+
value: '+385'
|
|
576
|
+
}, {
|
|
577
|
+
label: '+386',
|
|
578
|
+
value: '+386'
|
|
579
|
+
}, {
|
|
580
|
+
label: '+387',
|
|
581
|
+
value: '+387'
|
|
582
|
+
}, {
|
|
583
|
+
label: '+389',
|
|
584
|
+
value: '+389'
|
|
585
|
+
}, {
|
|
586
|
+
label: '+420',
|
|
587
|
+
value: '+420'
|
|
588
|
+
}, {
|
|
589
|
+
label: '+421',
|
|
590
|
+
value: '+421'
|
|
591
|
+
}, {
|
|
592
|
+
label: '+423',
|
|
593
|
+
value: '+423'
|
|
594
|
+
}, {
|
|
595
|
+
label: '+500',
|
|
596
|
+
value: '+500'
|
|
597
|
+
}, {
|
|
598
|
+
label: '+501',
|
|
599
|
+
value: '+501'
|
|
600
|
+
}, {
|
|
601
|
+
label: '+502',
|
|
602
|
+
value: '+502'
|
|
603
|
+
}, {
|
|
604
|
+
label: '+503',
|
|
605
|
+
value: '+503'
|
|
606
|
+
}, {
|
|
607
|
+
label: '+504',
|
|
608
|
+
value: '+504'
|
|
609
|
+
}, {
|
|
610
|
+
label: '+505',
|
|
611
|
+
value: '+505'
|
|
612
|
+
}, {
|
|
613
|
+
label: '+506',
|
|
614
|
+
value: '+506'
|
|
615
|
+
}, {
|
|
616
|
+
label: '+507',
|
|
617
|
+
value: '+507'
|
|
618
|
+
}, {
|
|
619
|
+
label: '+508',
|
|
620
|
+
value: '+508'
|
|
621
|
+
}, {
|
|
622
|
+
label: '+509',
|
|
623
|
+
value: '+509'
|
|
624
|
+
}, {
|
|
625
|
+
label: '+537',
|
|
626
|
+
value: '+537'
|
|
627
|
+
}, {
|
|
628
|
+
label: '+590',
|
|
629
|
+
value: '+590'
|
|
630
|
+
}, {
|
|
631
|
+
label: '+591',
|
|
632
|
+
value: '+591'
|
|
633
|
+
}, {
|
|
634
|
+
label: '+593',
|
|
635
|
+
value: '+593'
|
|
636
|
+
}, {
|
|
637
|
+
label: '+594',
|
|
638
|
+
value: '+594'
|
|
639
|
+
}, {
|
|
640
|
+
label: '+595',
|
|
641
|
+
value: '+595'
|
|
642
|
+
}, {
|
|
643
|
+
label: '+596',
|
|
644
|
+
value: '+596'
|
|
645
|
+
}, {
|
|
646
|
+
label: '+597',
|
|
647
|
+
value: '+597'
|
|
648
|
+
}, {
|
|
649
|
+
label: '+598',
|
|
650
|
+
value: '+598'
|
|
651
|
+
}, {
|
|
652
|
+
label: '+599',
|
|
653
|
+
value: '+599'
|
|
654
|
+
}, {
|
|
655
|
+
label: '+670',
|
|
656
|
+
value: '+670'
|
|
657
|
+
}, {
|
|
658
|
+
label: '+672',
|
|
659
|
+
value: '+672'
|
|
660
|
+
}, {
|
|
661
|
+
label: '+673',
|
|
662
|
+
value: '+673'
|
|
663
|
+
}, {
|
|
664
|
+
label: '+674',
|
|
665
|
+
value: '+674'
|
|
666
|
+
}, {
|
|
667
|
+
label: '+675',
|
|
668
|
+
value: '+675'
|
|
669
|
+
}, {
|
|
670
|
+
label: '+676',
|
|
671
|
+
value: '+676'
|
|
672
|
+
}, {
|
|
673
|
+
label: '+677',
|
|
674
|
+
value: '+677'
|
|
675
|
+
}, {
|
|
676
|
+
label: '+678',
|
|
677
|
+
value: '+678'
|
|
678
|
+
}, {
|
|
679
|
+
label: '+679',
|
|
680
|
+
value: '+679'
|
|
681
|
+
}, {
|
|
682
|
+
label: '+680',
|
|
683
|
+
value: '+680'
|
|
684
|
+
}, {
|
|
685
|
+
label: '+681',
|
|
686
|
+
value: '+681'
|
|
687
|
+
}, {
|
|
688
|
+
label: '+682',
|
|
689
|
+
value: '+682'
|
|
690
|
+
}, {
|
|
691
|
+
label: '+683',
|
|
692
|
+
value: '+683'
|
|
693
|
+
}, {
|
|
694
|
+
label: '+685',
|
|
695
|
+
value: '+685'
|
|
696
|
+
}, {
|
|
697
|
+
label: '+686',
|
|
698
|
+
value: '+686'
|
|
699
|
+
}, {
|
|
700
|
+
label: '+687',
|
|
701
|
+
value: '+687'
|
|
702
|
+
}, {
|
|
703
|
+
label: '+688',
|
|
704
|
+
value: '+688'
|
|
705
|
+
}, {
|
|
706
|
+
label: '+689',
|
|
707
|
+
value: '+689'
|
|
708
|
+
}, {
|
|
709
|
+
label: '+690',
|
|
710
|
+
value: '+690'
|
|
711
|
+
}, {
|
|
712
|
+
label: '+691',
|
|
713
|
+
value: '+691'
|
|
714
|
+
}, {
|
|
715
|
+
label: '+692',
|
|
716
|
+
value: '+692'
|
|
717
|
+
}, {
|
|
718
|
+
label: '+850',
|
|
719
|
+
value: '+850'
|
|
720
|
+
}, {
|
|
721
|
+
label: '+852',
|
|
722
|
+
value: '+852'
|
|
723
|
+
}, {
|
|
724
|
+
label: '+853',
|
|
725
|
+
value: '+853'
|
|
726
|
+
}, {
|
|
727
|
+
label: '+855',
|
|
728
|
+
value: '+855'
|
|
729
|
+
}, {
|
|
730
|
+
label: '+856',
|
|
731
|
+
value: '+856'
|
|
732
|
+
}, {
|
|
733
|
+
label: '+872',
|
|
734
|
+
value: '+872'
|
|
735
|
+
}, {
|
|
736
|
+
label: '+880',
|
|
737
|
+
value: '+880'
|
|
738
|
+
}, {
|
|
739
|
+
label: '+886',
|
|
740
|
+
value: '+886'
|
|
741
|
+
}, {
|
|
742
|
+
label: '+960',
|
|
743
|
+
value: '+960'
|
|
744
|
+
}, {
|
|
745
|
+
label: '+961',
|
|
746
|
+
value: '+961'
|
|
747
|
+
}, {
|
|
748
|
+
label: '+962',
|
|
749
|
+
value: '+962'
|
|
750
|
+
}, {
|
|
751
|
+
label: '+963',
|
|
752
|
+
value: '+963'
|
|
753
|
+
}, {
|
|
754
|
+
label: '+964',
|
|
755
|
+
value: '+964'
|
|
756
|
+
}, {
|
|
757
|
+
label: '+965',
|
|
758
|
+
value: '+965'
|
|
759
|
+
}, {
|
|
760
|
+
label: '+966',
|
|
761
|
+
value: '+966'
|
|
762
|
+
}, {
|
|
763
|
+
label: '+967',
|
|
764
|
+
value: '+967'
|
|
765
|
+
}, {
|
|
766
|
+
label: '+968',
|
|
767
|
+
value: '+968'
|
|
768
|
+
}, {
|
|
769
|
+
label: '+970',
|
|
770
|
+
value: '+970'
|
|
771
|
+
}, {
|
|
772
|
+
label: '+971',
|
|
773
|
+
value: '+971'
|
|
774
|
+
}, {
|
|
775
|
+
label: '+972',
|
|
776
|
+
value: '+972'
|
|
777
|
+
}, {
|
|
778
|
+
label: '+973',
|
|
779
|
+
value: '+973'
|
|
780
|
+
}, {
|
|
781
|
+
label: '+974',
|
|
782
|
+
value: '+974'
|
|
783
|
+
}, {
|
|
784
|
+
label: '+975',
|
|
785
|
+
value: '+975'
|
|
786
|
+
}, {
|
|
787
|
+
label: '+976',
|
|
788
|
+
value: '+976'
|
|
789
|
+
}, {
|
|
790
|
+
label: '+977',
|
|
791
|
+
value: '+977'
|
|
792
|
+
}, {
|
|
793
|
+
label: '+992',
|
|
794
|
+
value: '+992'
|
|
795
|
+
}, {
|
|
796
|
+
label: '+993',
|
|
797
|
+
value: '+993'
|
|
798
|
+
}, {
|
|
799
|
+
label: '+994',
|
|
800
|
+
value: '+994'
|
|
801
|
+
}, {
|
|
802
|
+
label: '+995',
|
|
803
|
+
value: '+995'
|
|
804
|
+
}, {
|
|
805
|
+
label: '+996',
|
|
806
|
+
value: '+996'
|
|
807
|
+
}, {
|
|
808
|
+
label: '+998',
|
|
809
|
+
value: '+998'
|
|
810
|
+
}];
|
|
811
|
+
|
|
812
|
+
var AmplifyCountryDialCode =
|
|
813
|
+
/** @class */
|
|
814
|
+
function () {
|
|
815
|
+
function AmplifyCountryDialCode(hostRef) {
|
|
816
|
+
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
817
|
+
/** The ID of the field. Should match with its corresponding input's ID. */
|
|
818
|
+
|
|
819
|
+
this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["C"];
|
|
820
|
+
/** The options of the country dial code select input. */
|
|
821
|
+
|
|
822
|
+
this.options = countryDialCodes;
|
|
823
|
+
/** Default selected dial code */
|
|
824
|
+
|
|
825
|
+
this.dialCode = '+1';
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
AmplifyCountryDialCode.prototype.componentWillLoad = function () {
|
|
829
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
830
|
+
this.setSelectedDialCode();
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
AmplifyCountryDialCode.prototype.watchDialCodeHandler = function () {
|
|
834
|
+
this.setSelectedDialCode();
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
AmplifyCountryDialCode.prototype.setSelectedDialCode = function () {
|
|
838
|
+
if (typeof this.dialCode === 'number') {
|
|
839
|
+
this.selectedDialCode = "+" + this.dialCode;
|
|
840
|
+
} else {
|
|
841
|
+
this.selectedDialCode = this.dialCode;
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
AmplifyCountryDialCode.prototype.render = function () {
|
|
846
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-select", {
|
|
847
|
+
fieldId: this.fieldId,
|
|
848
|
+
options: this.options,
|
|
849
|
+
handleInputChange: this.handleInputChange,
|
|
850
|
+
selected: this.selectedDialCode
|
|
851
|
+
});
|
|
852
|
+
};
|
|
853
|
+
|
|
854
|
+
Object.defineProperty(AmplifyCountryDialCode, "watchers", {
|
|
855
|
+
get: function get() {
|
|
856
|
+
return {
|
|
857
|
+
"dialCode": ["watchDialCodeHandler"]
|
|
858
|
+
};
|
|
859
|
+
},
|
|
860
|
+
enumerable: false,
|
|
861
|
+
configurable: true
|
|
862
|
+
});
|
|
863
|
+
return AmplifyCountryDialCode;
|
|
864
|
+
}();
|
|
865
|
+
|
|
866
|
+
var AmplifyEmailField =
|
|
867
|
+
/** @class */
|
|
868
|
+
function () {
|
|
869
|
+
function AmplifyEmailField(hostRef) {
|
|
870
|
+
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
871
|
+
/** Based on the type of field e.g. sign in, sign up, forgot password, etc. */
|
|
872
|
+
|
|
873
|
+
this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["E"];
|
|
874
|
+
/** Used for the EMAIL label */
|
|
875
|
+
|
|
876
|
+
this.label = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].EMAIL_LABEL;
|
|
877
|
+
/** Used for the placeholder label */
|
|
878
|
+
|
|
879
|
+
this.placeholder = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].EMAIL_PLACEHOLDER;
|
|
880
|
+
/** The required flag in order to make an input required prior to submitting a form */
|
|
881
|
+
|
|
882
|
+
this.required = false;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
AmplifyEmailField.prototype.componentWillLoad = function () {
|
|
886
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
AmplifyEmailField.prototype.render = function () {
|
|
890
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
|
|
891
|
+
fieldId: this.fieldId,
|
|
892
|
+
label: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.label),
|
|
893
|
+
placeholder: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.placeholder),
|
|
894
|
+
type: "email",
|
|
895
|
+
name: "email",
|
|
896
|
+
required: this.required,
|
|
897
|
+
handleInputChange: this.handleInputChange,
|
|
898
|
+
value: this.value,
|
|
899
|
+
inputProps: this.inputProps,
|
|
900
|
+
disabled: this.disabled,
|
|
901
|
+
hint: this.hint
|
|
902
|
+
});
|
|
903
|
+
};
|
|
904
|
+
|
|
905
|
+
return AmplifyEmailField;
|
|
906
|
+
}();
|
|
907
|
+
|
|
908
|
+
var amplifyFormSectionCss = "amplify-form-section{--header-color:var(--amplify-secondary-color);--header-size:var(--amplify-text-md-sub);--subtitle-size:var(--amplify-grey);--subtitle-color:var(--amplify-grey);--footer-color:var(--amplify-grey);--footer-size:var(--amplify-text-sm);--font-family:var(--amplify-font-family);--font-weight:var(--amplify-font-weight)}.form-section-header{margin:1rem 0 1.5rem 0}.form-section-header .header{color:var(--header-color);font-size:var(--header-size);font-weight:700;margin-bottom:0.75rem}.form-section-header .subtitle{font-weight:400;font-size:var(--amplify-text-sm);color:var(--subtitle-color)}.form-section-footer{font-family:var(--font-family);font-weight:var(--font-weight);font-size:var(--footer-size);color:var(--footer-color);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around}@media (min-width: 672px){.form-section-footer{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:baseline;align-items:baseline}}.form-section-footer *+*{margin-top:15px}";
|
|
909
|
+
|
|
910
|
+
var AmplifyFormSection =
|
|
911
|
+
/** @class */
|
|
912
|
+
function () {
|
|
913
|
+
function AmplifyFormSection(hostRef) {
|
|
914
|
+
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
915
|
+
/** (Optional) Used as a the default value within the default footer slot */
|
|
916
|
+
|
|
917
|
+
this.submitButtonText = 'Submit';
|
|
918
|
+
/** String prefix for the data-test attributes in this component primarily used for testing purposes */
|
|
919
|
+
|
|
920
|
+
this.testDataPrefix = 'form-section';
|
|
921
|
+
/** Loading state for the form */
|
|
922
|
+
|
|
923
|
+
this.loading = false;
|
|
924
|
+
/** Secondary footer component or text */
|
|
925
|
+
|
|
926
|
+
this.secondaryFooterContent = null;
|
|
927
|
+
} // eslint-disable-next-line
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
AmplifyFormSection.prototype.handleFormSubmit = function (ev) {
|
|
931
|
+
this.handleSubmit(ev.detail);
|
|
932
|
+
};
|
|
933
|
+
|
|
934
|
+
AmplifyFormSection.prototype.componentWillLoad = function () {
|
|
935
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
AmplifyFormSection.prototype.render = function () {
|
|
939
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("form", {
|
|
940
|
+
onSubmit: this.handleSubmit
|
|
941
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-section", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
|
942
|
+
name: "amplify-form-section-header"
|
|
943
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
|
944
|
+
"class": "form-section-header"
|
|
945
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("h3", {
|
|
946
|
+
"class": "header",
|
|
947
|
+
"data-test": this.testDataPrefix + '-header-section'
|
|
948
|
+
}, this.headerText), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
|
949
|
+
"class": "subtitle"
|
|
950
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
|
951
|
+
name: "subtitle"
|
|
952
|
+
}))))), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
|
953
|
+
name: "amplify-form-section-footer"
|
|
954
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
|
955
|
+
"class": "form-section-footer"
|
|
956
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-button", {
|
|
957
|
+
type: "submit",
|
|
958
|
+
"data-test": this.testDataPrefix + '-' + this.testDataPrefix + '-button'
|
|
959
|
+
}, this.loading ? Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-loading-spinner", null) : Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", null, this.submitButtonText)), this.secondaryFooterContent)))));
|
|
960
|
+
};
|
|
961
|
+
|
|
962
|
+
return AmplifyFormSection;
|
|
963
|
+
}();
|
|
964
|
+
|
|
965
|
+
AmplifyFormSection.style = amplifyFormSectionCss;
|
|
966
|
+
|
|
967
|
+
var AmplifyPasswordField =
|
|
17
968
|
/** @class */
|
|
18
969
|
function () {
|
|
19
|
-
function
|
|
970
|
+
function AmplifyPasswordField(hostRef) {
|
|
20
971
|
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
972
|
+
/** Based on the type of field e.g. sign in, sign up, forgot password, etc. */
|
|
973
|
+
|
|
974
|
+
this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["j"];
|
|
975
|
+
/** Used for the password label */
|
|
976
|
+
|
|
977
|
+
this.label = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].PASSWORD_LABEL;
|
|
978
|
+
/** Used for the placeholder label */
|
|
979
|
+
|
|
980
|
+
this.placeholder = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].PASSWORD_PLACEHOLDER;
|
|
981
|
+
/** The required flag in order to make an input required prior to submitting a form */
|
|
982
|
+
|
|
983
|
+
this.required = false;
|
|
21
984
|
}
|
|
22
985
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
986
|
+
AmplifyPasswordField.prototype.componentWillLoad = function () {
|
|
987
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
AmplifyPasswordField.prototype.render = function () {
|
|
991
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
|
|
992
|
+
type: "password",
|
|
30
993
|
name: "password",
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
994
|
+
fieldId: this.fieldId,
|
|
995
|
+
label: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.label),
|
|
996
|
+
placeholder: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.placeholder),
|
|
997
|
+
hint: this.hint,
|
|
998
|
+
required: this.required,
|
|
999
|
+
handleInputChange: this.handleInputChange,
|
|
1000
|
+
value: this.value,
|
|
1001
|
+
inputProps: this.inputProps,
|
|
1002
|
+
disabled: this.disabled
|
|
1003
|
+
});
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
return AmplifyPasswordField;
|
|
1007
|
+
}();
|
|
1008
|
+
|
|
1009
|
+
var amplifyPhoneFieldCss = ".phone-field{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:start;align-items:flex-start;width:100%}.phone-field input{border-left:none;border-radius:0 3px 3px 0}";
|
|
1010
|
+
|
|
1011
|
+
var AmplifyPhoneField =
|
|
1012
|
+
/** @class */
|
|
1013
|
+
function () {
|
|
1014
|
+
function AmplifyPhoneField(hostRef) {
|
|
1015
|
+
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
1016
|
+
/** Based on the type of field e.g. sign in, sign up, forgot password, etc. */
|
|
1017
|
+
|
|
1018
|
+
this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["b"];
|
|
1019
|
+
/** Used for the Phone label */
|
|
1020
|
+
|
|
1021
|
+
this.label = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].PHONE_LABEL;
|
|
1022
|
+
/** Used for the placeholder label */
|
|
1023
|
+
|
|
1024
|
+
this.placeholder = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].PHONE_PLACEHOLDER;
|
|
1025
|
+
/** The required flag in order to make an input required prior to submitting a form */
|
|
1026
|
+
|
|
1027
|
+
this.required = false;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
AmplifyPhoneField.prototype.componentWillLoad = function () {
|
|
1031
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
1032
|
+
};
|
|
1033
|
+
|
|
1034
|
+
AmplifyPhoneField.prototype.render = function () {
|
|
1035
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
|
|
1036
|
+
label: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.label),
|
|
1037
|
+
hint: this.hint
|
|
1038
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
|
1039
|
+
"class": "phone-field",
|
|
1040
|
+
slot: "input"
|
|
1041
|
+
}, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-country-dial-code", {
|
|
1042
|
+
dialCode: this.dialCode,
|
|
1043
|
+
handleInputChange: this.handleInputChange
|
|
1044
|
+
}), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-input", {
|
|
1045
|
+
fieldId: this.fieldId,
|
|
1046
|
+
type: "tel",
|
|
1047
|
+
handleInputChange: this.handleInputChange,
|
|
1048
|
+
placeholder: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.placeholder),
|
|
1049
|
+
name: this.fieldId,
|
|
1050
|
+
value: this.value,
|
|
1051
|
+
inputProps: this.inputProps,
|
|
1052
|
+
disabled: this.disabled,
|
|
1053
|
+
required: this.required
|
|
1054
|
+
}))));
|
|
1055
|
+
};
|
|
1056
|
+
|
|
1057
|
+
return AmplifyPhoneField;
|
|
1058
|
+
}();
|
|
1059
|
+
|
|
1060
|
+
AmplifyPhoneField.style = amplifyPhoneFieldCss;
|
|
1061
|
+
var amplifySelectCss = ":host{--color:var(--amplify-secondary-color);--background-color:var(--amplify-secondary-contrast);--border-color:var(--amplify-light-grey);--border-focus:var(--amplify-primary-color);--background-image:linear-gradient(45deg, transparent 50%, gray 50%),\n \tlinear-gradient(135deg, gray 50%, transparent 50%),\n \tlinear-gradient(to right, #ccc, #ccc)}.select{padding:1rem 1.75rem 1rem 1rem;font-size:var(--amplify-text-sm);color:var(--color);background-color:var(--background-color);border:1px solid var(--border-color);border-radius:3px 0 0 3px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;-ms-flex-preferred-size:auto;flex-basis:auto;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0;height:3.125rem;background-image:var(--background-image);background-position:calc(100% - 1rem) calc(1em + 0.5rem), calc(100% - 0.7rem) calc(1em + 0.5rem), calc(100% - 2.5em) 0.5em;background-size:6px 5px, 6px 5px, 0px 1.5em;background-repeat:no-repeat}.select :focus{outline:none;border-color:var(--border-focus)}";
|
|
1062
|
+
var DEFAULT_SELECT_OPTION = [{
|
|
1063
|
+
label: '',
|
|
1064
|
+
value: 1
|
|
1065
|
+
}];
|
|
1066
|
+
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Logger"]('amplify-select');
|
|
1067
|
+
|
|
1068
|
+
var AmplifySelect =
|
|
1069
|
+
/** @class */
|
|
1070
|
+
function () {
|
|
1071
|
+
function AmplifySelect(hostRef) {
|
|
1072
|
+
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
1073
|
+
/** The options of the select input. Must be an Array of Objects with an Object shape of {label: string, value: string|number} */
|
|
1074
|
+
|
|
1075
|
+
this.options = DEFAULT_SELECT_OPTION;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
AmplifySelect.prototype.componentWillLoad = function () {
|
|
1079
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
1080
|
+
this.selectOptions = this.contructSelectOptions(this.options);
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1083
|
+
AmplifySelect.prototype.handleSelectOptionsChange = function () {
|
|
1084
|
+
this.selectOptions = this.contructSelectOptions(this.options);
|
|
1085
|
+
};
|
|
1086
|
+
|
|
1087
|
+
AmplifySelect.prototype.isSelectedOptionValid = function (selected) {
|
|
1088
|
+
if (selected && !this.options.some(function (option) {
|
|
1089
|
+
return option.value === selected;
|
|
1090
|
+
})) {
|
|
1091
|
+
logger.warn('Selected option does not exist in options values, falling back to initial option');
|
|
1092
|
+
return false;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
return true;
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1098
|
+
AmplifySelect.prototype.contructSelectOptions = function (opts) {
|
|
1099
|
+
var _this = this;
|
|
1100
|
+
|
|
1101
|
+
this.isSelectedOptionValid(this.selected);
|
|
1102
|
+
var content = [];
|
|
1103
|
+
opts.forEach(function (opt) {
|
|
1104
|
+
content.push(Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("option", {
|
|
1105
|
+
value: opt.value,
|
|
1106
|
+
selected: opt.value === _this.selected
|
|
1107
|
+
}, opt.label));
|
|
1108
|
+
});
|
|
1109
|
+
return content;
|
|
1110
|
+
};
|
|
1111
|
+
|
|
1112
|
+
AmplifySelect.prototype.render = function () {
|
|
1113
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("select", {
|
|
1114
|
+
name: this.fieldId,
|
|
1115
|
+
id: this.fieldId,
|
|
1116
|
+
"class": "select",
|
|
1117
|
+
onChange: this.handleInputChange
|
|
1118
|
+
}, this.selectOptions);
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
Object.defineProperty(AmplifySelect, "watchers", {
|
|
1122
|
+
get: function get() {
|
|
1123
|
+
return {
|
|
1124
|
+
"options": ["handleSelectOptionsChange"],
|
|
1125
|
+
"selected": ["handleSelectOptionsChange"]
|
|
1126
|
+
};
|
|
1127
|
+
},
|
|
1128
|
+
enumerable: false,
|
|
1129
|
+
configurable: true
|
|
1130
|
+
});
|
|
1131
|
+
return AmplifySelect;
|
|
1132
|
+
}();
|
|
1133
|
+
|
|
1134
|
+
AmplifySelect.style = amplifySelectCss;
|
|
1135
|
+
|
|
1136
|
+
var AmplifyUsernameField =
|
|
1137
|
+
/** @class */
|
|
1138
|
+
function () {
|
|
1139
|
+
function AmplifyUsernameField(hostRef) {
|
|
1140
|
+
Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
|
1141
|
+
/** Based on the type of field e.g. sign in, sign up, forgot password, etc. */
|
|
1142
|
+
|
|
1143
|
+
this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["k"];
|
|
1144
|
+
/** Used for the username label */
|
|
1145
|
+
|
|
1146
|
+
this.label = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].USERNAME_LABEL;
|
|
1147
|
+
/** Used for the placeholder label */
|
|
1148
|
+
|
|
1149
|
+
this.placeholder = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].USERNAME_PLACEHOLDER;
|
|
1150
|
+
/** The required flag in order to make an input required prior to submitting a form */
|
|
1151
|
+
|
|
1152
|
+
this.required = false;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
AmplifyUsernameField.prototype.componentWillLoad = function () {
|
|
1156
|
+
console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
AmplifyUsernameField.prototype.render = function () {
|
|
1160
|
+
return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
|
|
1161
|
+
name: "username",
|
|
1162
|
+
fieldId: this.fieldId,
|
|
1163
|
+
label: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.label),
|
|
1164
|
+
placeholder: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.placeholder),
|
|
1165
|
+
required: this.required,
|
|
1166
|
+
handleInputChange: this.handleInputChange,
|
|
1167
|
+
value: this.value,
|
|
1168
|
+
inputProps: this.inputProps,
|
|
1169
|
+
disabled: this.disabled,
|
|
1170
|
+
hint: this.hint
|
|
1171
|
+
});
|
|
35
1172
|
};
|
|
36
1173
|
|
|
37
|
-
return
|
|
1174
|
+
return AmplifyUsernameField;
|
|
38
1175
|
}();
|
|
39
1176
|
|
|
40
1177
|
|