@aws-amplify/ui 6.10.0 → 6.10.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/i18n/translations.mjs +1 -1
- package/dist/esm/machines/authenticator/actors/signIn.mjs +1 -1
- package/dist/esm/machines/authenticator/actors/signUp.mjs +1 -1
- package/dist/esm/machines/authenticator/actors/verifyUserAttributes.mjs +1 -1
- package/dist/esm/machines/authenticator/defaultServices.mjs +1 -1
- package/dist/esm/machines/authenticator/guards.mjs +5 -1
- package/dist/esm/machines/authenticator/index.mjs +1 -1
- package/dist/esm/theme/createTheme/constants.mjs +0 -2
- package/dist/esm/theme/createTheme/createTheme.mjs +1 -1
- package/dist/esm/theme/createTheme/utils.mjs +1 -1
- package/dist/esm/utils/setUserAgent/constants.mjs +1 -1
- package/dist/esm/utils/utils.mjs +1 -1
- package/dist/index.js +6 -4
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { I18n } from 'aws-amplify/utils';
|
|
2
|
-
import { defaultTexts,
|
|
2
|
+
import { defaultTexts, thDict, uaDict, heDict, ruDict, trDict, svDict, zhDict, ptDict, plDict, nlDict, nbDict, krDict, jaDict, itDict, idDict, frDict, esDict, enDict, deDict } from './dictionaries/index.mjs';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMachine, sendUpdate } from 'xstate';
|
|
2
|
-
import {
|
|
2
|
+
import { signInWithRedirect, confirmSignIn, resetPassword, fetchUserAttributes } from 'aws-amplify/auth';
|
|
3
3
|
import { runValidators } from '../../../validators/index.mjs';
|
|
4
4
|
import ACTIONS from '../actions.mjs';
|
|
5
5
|
import { defaultServices } from '../defaultServices.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMachine, sendUpdate } from 'xstate';
|
|
2
|
-
import {
|
|
2
|
+
import { signInWithRedirect, fetchUserAttributes, autoSignIn } from 'aws-amplify/auth';
|
|
3
3
|
import { getSignUpInput } from '../utils.mjs';
|
|
4
4
|
import { runValidators } from '../../../validators/index.mjs';
|
|
5
5
|
import ACTIONS from '../actions.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMachine, sendUpdate } from 'xstate';
|
|
2
|
-
import {
|
|
2
|
+
import { confirmUserAttribute, sendUserAttributeVerificationCode } from 'aws-amplify/auth';
|
|
3
3
|
import { runValidators } from '../../../validators/index.mjs';
|
|
4
4
|
import ACTIONS from '../actions.mjs';
|
|
5
5
|
import { defaultServices } from '../defaultServices.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Amplify } from 'aws-amplify';
|
|
2
|
-
import {
|
|
2
|
+
import { resendSignUpCode, resetPassword, confirmResetPassword, confirmSignUp, confirmSignIn, signUp, signIn, getCurrentUser } from 'aws-amplify/auth';
|
|
3
3
|
import '@aws-amplify/core/internals/utils';
|
|
4
4
|
import 'aws-amplify/utils';
|
|
5
5
|
import '../../utils/setUserAgent/constants.mjs';
|
|
@@ -31,7 +31,11 @@ const shouldConfirmResetPassword = ({ step }) => step === 'CONFIRM_RESET_PASSWOR
|
|
|
31
31
|
const shouldConfirmSignUp = ({ step }) => step === 'CONFIRM_SIGN_UP';
|
|
32
32
|
// miscellaneous guards
|
|
33
33
|
const shouldVerifyAttribute = (_, { data }) => {
|
|
34
|
-
const { phone_number_verified, email_verified } = data;
|
|
34
|
+
const { email, phone_number, phone_number_verified, email_verified } = data;
|
|
35
|
+
// if neither email nor phone_number exist
|
|
36
|
+
// there is nothing to verify
|
|
37
|
+
if (!email && !phone_number)
|
|
38
|
+
return false;
|
|
35
39
|
// email/phone_verified is returned as a string
|
|
36
40
|
const emailNotVerified = email_verified === undefined || email_verified === 'false';
|
|
37
41
|
const phoneNotVerified = phone_number_verified === undefined || phone_number_verified === 'false';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { actions, createMachine, assign, spawn, forwardTo } from 'xstate';
|
|
2
2
|
import '@aws-amplify/core/internals/utils';
|
|
3
3
|
import '../../utils/setUserAgent/constants.mjs';
|
|
4
4
|
import { isEmptyObject } from '../../utils/utils.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultTheme } from '../defaultTheme.mjs';
|
|
2
|
-
import { deepExtend, setupTokens,
|
|
2
|
+
import { deepExtend, setupTokens, flattenProperties, setupToken } from './utils.mjs';
|
|
3
3
|
import { createComponentCSS } from './createComponentCSS.mjs';
|
|
4
4
|
import '@aws-amplify/core/internals/utils';
|
|
5
5
|
import '../../utils/setUserAgent/constants.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import kebabCase from 'lodash/kebabCase.js';
|
|
2
2
|
import '@aws-amplify/core/internals/utils';
|
|
3
3
|
import '../../utils/setUserAgent/constants.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { has, isObject, isString } from '../../utils/utils.mjs';
|
|
5
5
|
import { usesReference } from '../../utils/references.mjs';
|
|
6
6
|
|
|
7
7
|
const CSS_VARIABLE_PREFIX = 'amplify';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AiAction, Category, AuthAction, StorageAction, InAppMessagingAction, GeoAction } from '@aws-amplify/core/internals/utils';
|
|
2
2
|
|
|
3
3
|
const AI_INPUT_BASE = {
|
|
4
4
|
category: Category.AI,
|
package/dist/esm/utils/utils.mjs
CHANGED
|
@@ -184,7 +184,7 @@ const classNameModifierByFlag = (base, modifier, flag) => {
|
|
|
184
184
|
* @returns formatted string array
|
|
185
185
|
*/
|
|
186
186
|
function templateJoin(values, template) {
|
|
187
|
-
return values.reduce((acc, curr) => `${acc}${isString(curr) ? template(curr) : ''}`, '');
|
|
187
|
+
return values.reduce((acc, curr, index) => `${acc}${isString(curr) ? template(curr, index, values) : ''}`, '');
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
190
190
|
* A function that does nothing
|
package/dist/index.js
CHANGED
|
@@ -290,7 +290,7 @@ const classNameModifierByFlag = (base, modifier, flag) => {
|
|
|
290
290
|
* @returns formatted string array
|
|
291
291
|
*/
|
|
292
292
|
function templateJoin(values, template) {
|
|
293
|
-
return values.reduce((acc, curr) => `${acc}${isString(curr) ? template(curr) : ''}`, '');
|
|
293
|
+
return values.reduce((acc, curr, index) => `${acc}${isString(curr) ? template(curr, index, values) : ''}`, '');
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* A function that does nothing
|
|
@@ -506,8 +506,6 @@ function humanFileSize(bytes, si = false, dp = 1) {
|
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
const OPTIONS = {
|
|
509
|
-
openingCharacter: '{',
|
|
510
|
-
closingCharacter: '}',
|
|
511
509
|
separator: '.',
|
|
512
510
|
};
|
|
513
511
|
const REFERENCE_REGEX = /\{([^}]+)\}/g;
|
|
@@ -4259,7 +4257,11 @@ const shouldConfirmResetPassword = ({ step }) => step === 'CONFIRM_RESET_PASSWOR
|
|
|
4259
4257
|
const shouldConfirmSignUp = ({ step }) => step === 'CONFIRM_SIGN_UP';
|
|
4260
4258
|
// miscellaneous guards
|
|
4261
4259
|
const shouldVerifyAttribute = (_, { data }) => {
|
|
4262
|
-
const { phone_number_verified, email_verified } = data;
|
|
4260
|
+
const { email, phone_number, phone_number_verified, email_verified } = data;
|
|
4261
|
+
// if neither email nor phone_number exist
|
|
4262
|
+
// there is nothing to verify
|
|
4263
|
+
if (!email && !phone_number)
|
|
4264
|
+
return false;
|
|
4263
4265
|
// email/phone_verified is returned as a string
|
|
4264
4266
|
const emailNotVerified = email_verified === undefined || email_verified === 'false';
|
|
4265
4267
|
const phoneNotVerified = phone_number_verified === undefined || phone_number_verified === 'false';
|
|
@@ -127,7 +127,7 @@ export declare const classNameModifierByFlag: (base: string, modifier: Modifiers
|
|
|
127
127
|
* @param {(value: string) => string} template callback format param
|
|
128
128
|
* @returns formatted string array
|
|
129
129
|
*/
|
|
130
|
-
export declare function templateJoin(values: string[], template: (value: string) => string): string;
|
|
130
|
+
export declare function templateJoin(values: string[], template: (value: string, index: number, values: string[]) => string): string;
|
|
131
131
|
/**
|
|
132
132
|
* A function that does nothing
|
|
133
133
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@aws-amplify/core": "*",
|
|
53
|
-
"aws-amplify": "^6.
|
|
53
|
+
"aws-amplify": "^6.14.3",
|
|
54
54
|
"xstate": "^4.33.6"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|