@aws-amplify/ui 6.6.1 → 6.6.2
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/esm/helpers/authenticator/formFields/defaults.mjs +4 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/machines/authenticator/defaultServices.mjs +2 -2
- package/dist/esm/utils/utils.mjs +1 -10
- package/dist/index.js +10 -18
- package/dist/types/machines/authenticator/defaultServices.d.ts +2 -2
- package/dist/types/theme/components/buttonGroup.d.ts +2 -1
- package/dist/types/theme/components/checkboxField.d.ts +2 -1
- package/dist/types/theme/components/selectField.d.ts +2 -1
- package/dist/types/utils/utils.d.ts +0 -7
- package/package.json +2 -2
|
@@ -25,7 +25,7 @@ const getAliasDefaultFormField = (state) => {
|
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
/** Reusable confirmation code form fields. */
|
|
28
|
-
const getConfirmationCodeFormFields = (
|
|
28
|
+
const getConfirmationCodeFormFields = (_) => ({
|
|
29
29
|
confirmation_code: {
|
|
30
30
|
...getDefaultFormField('confirmation_code'),
|
|
31
31
|
label: 'Code *',
|
|
@@ -61,12 +61,13 @@ const getSignUpFormFields = (state) => {
|
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
63
|
// There's a `custom:*` attribute or one we don't already have an implementation for
|
|
64
|
+
// eslint-disable-next-line no-console
|
|
64
65
|
console.debug(`Authenticator does not have a default implementation for ${fieldName}. Customize SignUp FormFields to add your own.`);
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
return formField;
|
|
68
69
|
};
|
|
69
|
-
const getConfirmSignUpFormFields = (
|
|
70
|
+
const getConfirmSignUpFormFields = (_) => ({
|
|
70
71
|
confirmation_code: {
|
|
71
72
|
...getDefaultFormField('confirmation_code'),
|
|
72
73
|
placeholder: 'Enter your code',
|
|
@@ -111,6 +112,7 @@ const getForceNewPasswordFormFields = (state) => {
|
|
|
111
112
|
}
|
|
112
113
|
else {
|
|
113
114
|
// There's a `custom:*` attribute or one we don't already have an implementation for
|
|
115
|
+
// eslint-disable-next-line no-console
|
|
114
116
|
console.debug(`Authenticator does not have a default implementation for ${fieldName}. Customize ForceNewPassword FormFields to add your own.`);
|
|
115
117
|
}
|
|
116
118
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -28,6 +28,6 @@ export { isUnverifiedContactMethodType } from './types/authenticator/utils.mjs';
|
|
|
28
28
|
export { LoginMechanismArray, authFieldsWithDefaults, isAuthFieldsWithDefaults, signUpFieldsWithDefault, signUpFieldsWithoutDefault } from './types/authenticator/attributes.mjs';
|
|
29
29
|
export { ComponentClassName } from './types/primitives/componentClassName.mjs';
|
|
30
30
|
export { setUserAgent } from './utils/setUserAgent/setUserAgent.mjs';
|
|
31
|
-
export { areEmptyArrays, areEmptyObjects, capitalize, classNameModifier, classNameModifierByFlag, groupLog, has, isEmpty, isEmptyObject, isFunction, isMap, isNil, isObject, isSet, isString,
|
|
31
|
+
export { areEmptyArrays, areEmptyObjects, capitalize, classNameModifier, classNameModifierByFlag, groupLog, has, isEmpty, isEmptyObject, isFunction, isMap, isNil, isObject, isSet, isString, isUndefined, noop, sanitizeNamespaceImport, splitObject, templateJoin } from './utils/utils.mjs';
|
|
32
32
|
export { classNames } from './utils/classNames.mjs';
|
|
33
33
|
export { humanFileSize } from './utils/humanFileSize.mjs';
|
|
@@ -55,7 +55,7 @@ const defaultServices = {
|
|
|
55
55
|
handleForgotPasswordSubmit: confirmResetPassword,
|
|
56
56
|
handleForgotPassword: resetPassword,
|
|
57
57
|
// Validation hooks for overriding
|
|
58
|
-
async validateCustomSignUp(
|
|
58
|
+
async validateCustomSignUp(_, __) { },
|
|
59
59
|
async validateFormPassword(formData, touchData, passwordSettings) {
|
|
60
60
|
const { password } = formData;
|
|
61
61
|
const { password: touched_password } = touchData;
|
|
@@ -105,7 +105,7 @@ const defaultServices = {
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
|
-
async validatePreferredUsername(
|
|
108
|
+
async validatePreferredUsername(_, __) { },
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
export { defaultServices };
|
package/dist/esm/utils/utils.mjs
CHANGED
|
@@ -173,15 +173,6 @@ const classNameModifier = (base, modifier) => {
|
|
|
173
173
|
const classNameModifierByFlag = (base, modifier, flag) => {
|
|
174
174
|
return flag ? `${base}--${modifier}` : '';
|
|
175
175
|
};
|
|
176
|
-
/**
|
|
177
|
-
* `isFunction` but types the param with its function signature
|
|
178
|
-
*
|
|
179
|
-
* @param {unknown} value param to check
|
|
180
|
-
* @returns {boolean} whether `value` is a function
|
|
181
|
-
*/
|
|
182
|
-
function isTypedFunction(value) {
|
|
183
|
-
return isFunction(value);
|
|
184
|
-
}
|
|
185
176
|
/**
|
|
186
177
|
* Similar to `Array.join`, with an optional callback/template param
|
|
187
178
|
* for formatting returned string values
|
|
@@ -244,4 +235,4 @@ function splitObject(obj, predicate) {
|
|
|
244
235
|
return [left, right];
|
|
245
236
|
}
|
|
246
237
|
|
|
247
|
-
export { areEmptyArrays, areEmptyObjects, capitalize, classNameModifier, classNameModifierByFlag, groupLog, has, isEmpty, isEmptyObject, isFunction, isMap, isNil, isObject, isSet, isString,
|
|
238
|
+
export { areEmptyArrays, areEmptyObjects, capitalize, classNameModifier, classNameModifierByFlag, groupLog, has, isEmpty, isEmptyObject, isFunction, isMap, isNil, isObject, isSet, isString, isUndefined, noop, sanitizeNamespaceImport, splitObject, templateJoin };
|
package/dist/index.js
CHANGED
|
@@ -11,11 +11,11 @@ var pickBy = require('lodash/pickBy.js');
|
|
|
11
11
|
var merge = require('lodash/merge.js');
|
|
12
12
|
var kebabCase = require('lodash/kebabCase.js');
|
|
13
13
|
|
|
14
|
-
function
|
|
14
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
|
|
16
|
-
var pickBy__default = /*#__PURE__*/
|
|
17
|
-
var merge__default = /*#__PURE__*/
|
|
18
|
-
var kebabCase__default = /*#__PURE__*/
|
|
16
|
+
var pickBy__default = /*#__PURE__*/_interopDefault(pickBy);
|
|
17
|
+
var merge__default = /*#__PURE__*/_interopDefault(merge);
|
|
18
|
+
var kebabCase__default = /*#__PURE__*/_interopDefault(kebabCase);
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* This file contains helpers that lets you easily access current actor's state
|
|
@@ -255,15 +255,6 @@ const classNameModifier = (base, modifier) => {
|
|
|
255
255
|
const classNameModifierByFlag = (base, modifier, flag) => {
|
|
256
256
|
return flag ? `${base}--${modifier}` : '';
|
|
257
257
|
};
|
|
258
|
-
/**
|
|
259
|
-
* `isFunction` but types the param with its function signature
|
|
260
|
-
*
|
|
261
|
-
* @param {unknown} value param to check
|
|
262
|
-
* @returns {boolean} whether `value` is a function
|
|
263
|
-
*/
|
|
264
|
-
function isTypedFunction(value) {
|
|
265
|
-
return isFunction(value);
|
|
266
|
-
}
|
|
267
258
|
/**
|
|
268
259
|
* Similar to `Array.join`, with an optional callback/template param
|
|
269
260
|
* for formatting returned string values
|
|
@@ -3225,7 +3216,7 @@ const getAliasDefaultFormField = (state) => {
|
|
|
3225
3216
|
};
|
|
3226
3217
|
};
|
|
3227
3218
|
/** Reusable confirmation code form fields. */
|
|
3228
|
-
const getConfirmationCodeFormFields = (
|
|
3219
|
+
const getConfirmationCodeFormFields = (_) => ({
|
|
3229
3220
|
confirmation_code: {
|
|
3230
3221
|
...getDefaultFormField('confirmation_code'),
|
|
3231
3222
|
label: 'Code *',
|
|
@@ -3261,12 +3252,13 @@ const getSignUpFormFields = (state) => {
|
|
|
3261
3252
|
}
|
|
3262
3253
|
else {
|
|
3263
3254
|
// There's a `custom:*` attribute or one we don't already have an implementation for
|
|
3255
|
+
// eslint-disable-next-line no-console
|
|
3264
3256
|
console.debug(`Authenticator does not have a default implementation for ${fieldName}. Customize SignUp FormFields to add your own.`);
|
|
3265
3257
|
}
|
|
3266
3258
|
}
|
|
3267
3259
|
return formField;
|
|
3268
3260
|
};
|
|
3269
|
-
const getConfirmSignUpFormFields = (
|
|
3261
|
+
const getConfirmSignUpFormFields = (_) => ({
|
|
3270
3262
|
confirmation_code: {
|
|
3271
3263
|
...getDefaultFormField('confirmation_code'),
|
|
3272
3264
|
placeholder: 'Enter your code',
|
|
@@ -3311,6 +3303,7 @@ const getForceNewPasswordFormFields = (state) => {
|
|
|
3311
3303
|
}
|
|
3312
3304
|
else {
|
|
3313
3305
|
// There's a `custom:*` attribute or one we don't already have an implementation for
|
|
3306
|
+
// eslint-disable-next-line no-console
|
|
3314
3307
|
console.debug(`Authenticator does not have a default implementation for ${fieldName}. Customize ForceNewPassword FormFields to add your own.`);
|
|
3315
3308
|
}
|
|
3316
3309
|
}
|
|
@@ -4005,7 +3998,7 @@ const defaultServices = {
|
|
|
4005
3998
|
handleForgotPasswordSubmit: auth.confirmResetPassword,
|
|
4006
3999
|
handleForgotPassword: auth.resetPassword,
|
|
4007
4000
|
// Validation hooks for overriding
|
|
4008
|
-
async validateCustomSignUp(
|
|
4001
|
+
async validateCustomSignUp(_, __) { },
|
|
4009
4002
|
async validateFormPassword(formData, touchData, passwordSettings) {
|
|
4010
4003
|
const { password } = formData;
|
|
4011
4004
|
const { password: touched_password } = touchData;
|
|
@@ -4055,7 +4048,7 @@ const defaultServices = {
|
|
|
4055
4048
|
};
|
|
4056
4049
|
}
|
|
4057
4050
|
},
|
|
4058
|
-
async validatePreferredUsername(
|
|
4051
|
+
async validatePreferredUsername(_, __) { },
|
|
4059
4052
|
};
|
|
4060
4053
|
|
|
4061
4054
|
function forgotPasswordActor({ services, }) {
|
|
@@ -9261,7 +9254,6 @@ exports.isNil = isNil;
|
|
|
9261
9254
|
exports.isObject = isObject;
|
|
9262
9255
|
exports.isSet = isSet;
|
|
9263
9256
|
exports.isString = isString;
|
|
9264
|
-
exports.isTypedFunction = isTypedFunction;
|
|
9265
9257
|
exports.isUndefined = isUndefined;
|
|
9266
9258
|
exports.isUnverifiedContactMethodType = isUnverifiedContactMethodType;
|
|
9267
9259
|
exports.isValidEmail = isValidEmail;
|
|
@@ -204,8 +204,8 @@ export declare const defaultServices: {
|
|
|
204
204
|
handleConfirmSignUp: typeof confirmSignUp;
|
|
205
205
|
handleForgotPasswordSubmit: typeof confirmResetPassword;
|
|
206
206
|
handleForgotPassword: typeof resetPassword;
|
|
207
|
-
validateCustomSignUp(
|
|
207
|
+
validateCustomSignUp(_: AuthFormData, __: AuthTouchData): Promise<ValidatorResult>;
|
|
208
208
|
validateFormPassword(formData: AuthFormData, touchData: AuthTouchData, passwordSettings: PasswordSettings): Promise<ValidatorResult>;
|
|
209
209
|
validateConfirmPassword(formData: AuthFormData, touchData: AuthTouchData): Promise<ValidatorResult>;
|
|
210
|
-
validatePreferredUsername(
|
|
210
|
+
validatePreferredUsername(_: AuthFormData, __: AuthTouchData): Promise<ValidatorResult>;
|
|
211
211
|
};
|
|
@@ -117,13 +117,6 @@ export declare const classNameModifier: (base: string, modifier?: Modifiers) =>
|
|
|
117
117
|
* @returns the modified class name or empty string
|
|
118
118
|
*/
|
|
119
119
|
export declare const classNameModifierByFlag: (base: string, modifier: Modifiers, flag?: boolean) => string;
|
|
120
|
-
/**
|
|
121
|
-
* `isFunction` but types the param with its function signature
|
|
122
|
-
*
|
|
123
|
-
* @param {unknown} value param to check
|
|
124
|
-
* @returns {boolean} whether `value` is a function
|
|
125
|
-
*/
|
|
126
|
-
export declare function isTypedFunction<T extends (...args: any[]) => any>(value: unknown): value is T;
|
|
127
120
|
/**
|
|
128
121
|
* Similar to `Array.join`, with an optional callback/template param
|
|
129
122
|
* for formatting returned string values
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"tslib": "^2.5.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@aws-amplify/core": "
|
|
52
|
+
"@aws-amplify/core": "*",
|
|
53
53
|
"aws-amplify": "^6.6.0",
|
|
54
54
|
"xstate": "^4.33.6"
|
|
55
55
|
},
|