@aws-amplify/ui 5.5.2 → 5.5.4
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/accountSettings/utils.mjs +1 -0
- package/dist/esm/helpers/accountSettings/validator.mjs +1 -0
- package/dist/esm/helpers/authenticator/{actor.js → actor.mjs} +0 -0
- package/dist/esm/helpers/authenticator/constants.mjs +1 -0
- package/dist/esm/helpers/authenticator/context.mjs +1 -0
- package/dist/esm/helpers/authenticator/facade.mjs +1 -0
- package/dist/esm/helpers/authenticator/form.mjs +1 -0
- package/dist/esm/helpers/authenticator/formFields/defaults.mjs +1 -0
- package/dist/esm/helpers/authenticator/formFields/formFields.mjs +1 -0
- package/dist/esm/helpers/authenticator/formFields/util.mjs +1 -0
- package/dist/esm/helpers/authenticator/textUtil.mjs +1 -0
- package/dist/esm/helpers/authenticator/utils.mjs +1 -0
- package/dist/esm/helpers/storage/fileUploader/utils/uploader.mjs +1 -0
- package/dist/esm/helpers/{utils.js → utils.mjs} +0 -0
- package/dist/esm/i18n/{country-dial-codes.js → country-dial-codes.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{de.js → de.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{defaultTexts.js → defaultTexts.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{en.js → en.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{es.js → es.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{fr.js → fr.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{he.js → he.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{id.js → id.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{it.js → it.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{ja.js → ja.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{kr.js → kr.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{nl.js → nl.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{pl.js → pl.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{pt.js → pt.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{ru.js → ru.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{sv.js → sv.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{tr.js → tr.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{ua.js → ua.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/authenticator/{zh.js → zh.mjs} +0 -0
- package/dist/esm/i18n/dictionaries/index.mjs +1 -0
- package/dist/esm/i18n/translations.mjs +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/machines/authenticator/actions.mjs +1 -0
- package/dist/esm/machines/authenticator/actors/resetPassword.mjs +1 -0
- package/dist/esm/machines/authenticator/actors/signIn.mjs +1 -0
- package/dist/esm/machines/authenticator/actors/{signOut.js → signOut.mjs} +0 -0
- package/dist/esm/machines/authenticator/defaultServices.mjs +1 -0
- package/dist/esm/machines/authenticator/index.mjs +1 -0
- package/dist/esm/machines/authenticator/signUp.mjs +1 -0
- package/dist/esm/theme/{breakpoints.js → breakpoints.mjs} +0 -0
- package/dist/esm/theme/createTheme.mjs +1 -0
- package/dist/esm/theme/defaultDarkModeOverride.mjs +1 -0
- package/dist/esm/theme/defaultTheme.mjs +1 -0
- package/dist/esm/theme/tokens/{borderWidths.js → borderWidths.mjs} +0 -0
- package/dist/esm/theme/tokens/{colors.js → colors.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{alert.js → alert.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{authenticator.js → authenticator.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{autocomplete.js → autocomplete.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{badge.js → badge.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{button.js → button.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{card.js → card.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{checkbox.js → checkbox.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{checkboxField.js → checkboxField.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{collection.js → collection.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{copy.js → copy.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{dialCodeSelect.js → dialCodeSelect.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{divider.js → divider.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{expander.js → expander.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{field.js → field.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{fieldControl.js → fieldControl.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{fieldGroup.js → fieldGroup.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{fieldMessages.js → fieldMessages.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{fileUploader.js → fileUploader.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{flex.js → flex.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{heading.js → heading.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{highlightMatch.js → highlightMatch.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{icon.js → icon.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{image.js → image.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{inAppMessaging.js → inAppMessaging.mjs} +0 -0
- package/dist/esm/theme/tokens/components/index.mjs +1 -0
- package/dist/esm/theme/tokens/components/{link.js → link.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{loader.js → loader.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{menu.js → menu.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{pagination.js → pagination.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{passwordField.js → passwordField.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{phoneNumberField.js → phoneNumberField.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{placeholder.js → placeholder.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{radio.js → radio.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{radioGroup.js → radioGroup.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{rating.js → rating.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{searchField.js → searchField.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{select.js → select.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{selectField.js → selectField.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{sliderField.js → sliderField.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{stepperField.js → stepperField.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{switchField.js → switchField.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{table.js → table.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{tabs.js → tabs.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{text.js → text.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{textAreaField.js → textAreaField.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{textField.js → textField.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{toggleButton.js → toggleButton.mjs} +0 -0
- package/dist/esm/theme/tokens/components/{toggleButtonGroup.js → toggleButtonGroup.mjs} +0 -0
- package/dist/esm/theme/tokens/{fontSizes.js → fontSizes.mjs} +0 -0
- package/dist/esm/theme/tokens/{fontWeights.js → fontWeights.mjs} +0 -0
- package/dist/esm/theme/tokens/{fonts.js → fonts.mjs} +0 -0
- package/dist/esm/theme/tokens/index.mjs +1 -0
- package/dist/esm/theme/tokens/{lineHeights.js → lineHeights.mjs} +0 -0
- package/dist/esm/theme/tokens/{opacities.js → opacities.mjs} +0 -0
- package/dist/esm/theme/tokens/{outlineOffsets.js → outlineOffsets.mjs} +0 -0
- package/dist/esm/theme/tokens/{outlineWidths.js → outlineWidths.mjs} +0 -0
- package/dist/esm/theme/tokens/{radii.js → radii.mjs} +0 -0
- package/dist/esm/theme/tokens/{shadows.js → shadows.mjs} +0 -0
- package/dist/esm/theme/tokens/{space.js → space.mjs} +0 -0
- package/dist/esm/theme/tokens/{time.js → time.mjs} +0 -0
- package/dist/esm/theme/tokens/{transforms.js → transforms.mjs} +0 -0
- package/dist/esm/theme/utils.mjs +1 -0
- package/dist/esm/types/authenticator/attributes.mjs +1 -0
- package/dist/esm/types/authenticator/{user.js → user.mjs} +0 -0
- package/dist/esm/types/authenticator/utils.mjs +1 -0
- package/dist/esm/types/primitives/{componentClassName.js → componentClassName.mjs} +0 -0
- package/dist/esm/utils/index.mjs +1 -0
- package/dist/esm/validators/index.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/types/helpers/authenticator/context.d.ts +3 -0
- package/dist/types/helpers/authenticator/facade.d.ts +1 -0
- package/dist/types/helpers/authenticator/formFields/defaults.d.ts +2 -1
- package/dist/types/helpers/authenticator/formFields/formFields.d.ts +1 -2
- package/dist/types/helpers/authenticator/formFields/util.d.ts +0 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/machines/authenticator/actions.d.ts +1 -0
- package/dist/types/theme/breakpoints.d.ts +4 -9
- package/dist/types/theme/types.d.ts +1 -1
- package/dist/types/types/authenticator/attributes.d.ts +1 -0
- package/dist/types/types/authenticator/stateMachine/context.d.ts +2 -0
- package/dist/types/utils/index.d.ts +44 -0
- package/package.json +5 -4
- package/dist/esm/helpers/accountSettings/utils.js +0 -1
- package/dist/esm/helpers/accountSettings/validator.js +0 -1
- package/dist/esm/helpers/authenticator/constants.js +0 -1
- package/dist/esm/helpers/authenticator/context.js +0 -1
- package/dist/esm/helpers/authenticator/facade.js +0 -1
- package/dist/esm/helpers/authenticator/form.js +0 -1
- package/dist/esm/helpers/authenticator/formFields/defaults.js +0 -1
- package/dist/esm/helpers/authenticator/formFields/formFields.js +0 -1
- package/dist/esm/helpers/authenticator/formFields/util.js +0 -1
- package/dist/esm/helpers/authenticator/textUtil.js +0 -1
- package/dist/esm/helpers/authenticator/utils.js +0 -1
- package/dist/esm/helpers/storage/fileUploader/utils/uploader.js +0 -1
- package/dist/esm/i18n/dictionaries/index.js +0 -1
- package/dist/esm/i18n/translations.js +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/machines/authenticator/actions.js +0 -1
- package/dist/esm/machines/authenticator/actors/resetPassword.js +0 -1
- package/dist/esm/machines/authenticator/actors/signIn.js +0 -1
- package/dist/esm/machines/authenticator/defaultServices.js +0 -1
- package/dist/esm/machines/authenticator/index.js +0 -1
- package/dist/esm/machines/authenticator/signUp.js +0 -1
- package/dist/esm/theme/createTheme.js +0 -1
- package/dist/esm/theme/defaultDarkModeOverride.js +0 -1
- package/dist/esm/theme/defaultTheme.js +0 -1
- package/dist/esm/theme/tokens/components/index.js +0 -1
- package/dist/esm/theme/tokens/index.js +0 -1
- package/dist/esm/theme/utils.js +0 -1
- package/dist/esm/types/authenticator/attributes.js +0 -1
- package/dist/esm/types/authenticator/utils.js +0 -1
- package/dist/esm/validators/index.js +0 -1
|
@@ -16,6 +16,7 @@ interface AuthenticatorServiceContextFacade {
|
|
|
16
16
|
isPending: boolean;
|
|
17
17
|
route: AuthenticatorRoute;
|
|
18
18
|
socialProviders: SocialProvider[];
|
|
19
|
+
totpSecretCode: string | null;
|
|
19
20
|
unverifiedContactMethods: UnverifiedContactMethods;
|
|
20
21
|
user: AmplifyUser;
|
|
21
22
|
validationErrors: AuthenticatorValidationErrors;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { AuthMachineState, FormFields, FormFieldComponents } from '../../../types';
|
|
1
|
+
import { AuthMachineState, FormFields, FormFieldOptions, FormFieldComponents } from '../../../types';
|
|
2
|
+
export declare const getAliasDefaultFormField: (state: AuthMachineState) => FormFieldOptions;
|
|
2
3
|
/** Collect all the defaultFormFields getters */
|
|
3
4
|
export declare const defaultFormFieldsGetters: Record<FormFieldComponents, (state: AuthMachineState) => FormFields>;
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* current Authenticator / Zero Config configuration.
|
|
4
4
|
*/
|
|
5
5
|
import { AuthMachineState, FormFields, FormFieldComponents, FormFieldsArray } from '../../../types';
|
|
6
|
-
/** Gets the default formFields for given route/route */
|
|
7
6
|
export declare const getDefaultFormFields: (route: FormFieldComponents, state: AuthMachineState) => FormFields;
|
|
8
|
-
|
|
7
|
+
export declare const getCustomFormFields: (route: FormFieldComponents, state: AuthMachineState) => FormFields;
|
|
9
8
|
export declare const getFormFields: (route: FormFieldComponents, state: AuthMachineState) => FormFields;
|
|
10
9
|
export declare const removeOrderKeys: (formFields: FormFieldsArray) => FormFieldsArray;
|
|
11
10
|
/** Calls `getFormFields` above, then sorts it into an indexed array */
|
|
@@ -3,5 +3,3 @@ import { FormFields, FormFieldsArray } from '../../../types';
|
|
|
3
3
|
export declare const applyTranslation: (formFields: FormFields) => FormFields;
|
|
4
4
|
/** Sorts formFields according to their `order`. */
|
|
5
5
|
export declare const sortFormFields: (formFields: FormFields) => FormFieldsArray;
|
|
6
|
-
/** Applies defaultFormFields value into customFormFields */
|
|
7
|
-
export declare const applyDefaults: (defaultFormFields: FormFields, customFormFields?: FormFields) => FormFields;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export declare const clearValidationError: import("xstate").AssignAction<unknown
|
|
|
36
36
|
/**
|
|
37
37
|
* "set" actions
|
|
38
38
|
*/
|
|
39
|
+
export declare const setTotpSecretCode: import("xstate").AssignAction<unknown, AuthEvent>;
|
|
39
40
|
export declare const setChallengeName: import("xstate").AssignAction<unknown, AuthEvent>;
|
|
40
41
|
export declare const setRequiredAttributes: import("xstate").AssignAction<unknown, AuthEvent>;
|
|
41
42
|
export declare const setConfirmResetPasswordIntent: import("xstate").AssignAction<unknown, import("xstate").EventObject>;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
+
declare type BreakpointKey = 'base' | 'small' | 'medium' | 'large' | 'xl' | 'xxl';
|
|
1
2
|
export interface Breakpoints {
|
|
2
|
-
values:
|
|
3
|
-
|
|
4
|
-
small: number;
|
|
5
|
-
medium: number;
|
|
6
|
-
large: number;
|
|
7
|
-
xl: number;
|
|
8
|
-
xxl: number;
|
|
9
|
-
};
|
|
10
|
-
defaultBreakpoint: string;
|
|
3
|
+
values: Record<BreakpointKey, number>;
|
|
4
|
+
defaultBreakpoint: BreakpointKey;
|
|
11
5
|
}
|
|
12
6
|
export declare const breakpoints: Breakpoints;
|
|
7
|
+
export {};
|
|
@@ -109,7 +109,7 @@ export interface DefaultTheme extends Pick<Theme, 'name' | 'overrides'> {
|
|
|
109
109
|
* on the design tokens and all design tokens have added fields
|
|
110
110
|
* to be used in Javascript/Typescript.
|
|
111
111
|
*/
|
|
112
|
-
export interface WebTheme extends Pick<
|
|
112
|
+
export interface WebTheme extends Pick<DefaultTheme, 'breakpoints' | 'name' | 'overrides'> {
|
|
113
113
|
cssText: string;
|
|
114
114
|
tokens: WebTokens;
|
|
115
115
|
}
|
|
@@ -19,3 +19,4 @@ export declare type SocialProvider = 'amazon' | 'apple' | 'facebook' | 'google';
|
|
|
19
19
|
export declare const authFieldsWithDefaults: readonly ["username", "email", "phone_number", "birthdate", "email", "family_name", "given_name", "middle_name", "name", "nickname", "phone_number", "preferred_username", "profile", "website", "confirmation_code", "password", "confirm_password"];
|
|
20
20
|
/** Input fields that we provide default fields with */
|
|
21
21
|
export declare type AuthFieldsWithDefaults = typeof authFieldsWithDefaults[number];
|
|
22
|
+
export declare const isAuthFieldsWithDefaults: (field: string) => field is "birthdate" | "email" | "family_name" | "given_name" | "middle_name" | "name" | "nickname" | "phone_number" | "preferred_username" | "profile" | "website" | "username" | "password" | "confirm_password" | "confirmation_code";
|
|
@@ -69,6 +69,8 @@ interface BaseFormContext {
|
|
|
69
69
|
codeDeliveryDetails?: CodeDeliveryDetails;
|
|
70
70
|
/** Default country code for all phone number fields. */
|
|
71
71
|
country_code?: string;
|
|
72
|
+
/** TOTP secret code */
|
|
73
|
+
totpSecretCode?: string;
|
|
72
74
|
}
|
|
73
75
|
export interface SignInContext extends BaseFormContext {
|
|
74
76
|
loginMechanisms: Required<AuthContext>['config']['loginMechanisms'];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* We re-export any lodash imports to avoid appending .js extension across codebase
|
|
3
|
+
* The ultimate goal is have replacement implementation to remove the entire dependency
|
|
4
|
+
*/
|
|
5
|
+
export { default as isEqual } from 'lodash/isEqual.js';
|
|
6
|
+
export { default as isEmpty } from 'lodash/isEmpty.js';
|
|
7
|
+
export { default as debounce } from 'lodash/debounce.js';
|
|
8
|
+
export { default as isNil } from 'lodash/isNil.js';
|
|
9
|
+
export { default as includes } from 'lodash/includes.js';
|
|
10
|
+
export { default as get } from 'lodash/get.js';
|
|
11
|
+
export { default as pickBy } from 'lodash/pickBy.js';
|
|
12
|
+
export { default as has } from 'lodash/has.js';
|
|
13
|
+
export { default as kebabCase } from 'lodash/kebabCase.js';
|
|
14
|
+
export { default as merge } from 'lodash/merge.js';
|
|
15
|
+
/**
|
|
16
|
+
* Some libraries may not follow Node ES module spec and could be loaded as CommonJS modules,
|
|
17
|
+
* To ensure the interoperability between ESM and CJS, modules from those libraries have to be loaded via namespace import
|
|
18
|
+
* And sanitized by the function below because unlike ESM namespace, CJS namespace set `module.exports` object on the `default` key
|
|
19
|
+
* https://nodejs.org/api/esm.html#interoperability-with-commonjs
|
|
20
|
+
*/
|
|
21
|
+
export declare const sanitizeNamespaceImport: <T>(namespaceModule: T) => T;
|
|
22
|
+
/**
|
|
23
|
+
* Checks if `value` is an Object (non-primitive, non-array, non-function)
|
|
24
|
+
* Will return false for Arrays and functions
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* @param {unknown} value The value to check
|
|
28
|
+
* @returns {boolean} Returns `true` if `value` is an object, `false` otherwise
|
|
29
|
+
*/
|
|
30
|
+
export declare function isObject(value: unknown): value is object;
|
|
31
|
+
/**
|
|
32
|
+
* Checks if `value` is a string primitive or object
|
|
33
|
+
*
|
|
34
|
+
* @param {unknown} value The value to check
|
|
35
|
+
* @returns {boolean} Returns `true` if `value` is a string, `false` otherwise
|
|
36
|
+
*/
|
|
37
|
+
export declare function isString(value: unknown): value is string;
|
|
38
|
+
/**
|
|
39
|
+
* Checks if `value` is undefined
|
|
40
|
+
*
|
|
41
|
+
* @param {unknown} value The value to check
|
|
42
|
+
* @returns {boolean} Returns `true` if `value` is undefined, `false` otherwise
|
|
43
|
+
*/
|
|
44
|
+
export declare function isUndefined(value: unknown): value is undefined;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.4",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
-
"module": "dist/esm/index.
|
|
5
|
+
"module": "dist/esm/index.mjs",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"types": "./dist/types/index.d.ts",
|
|
9
|
-
"import": "./dist/esm/index.
|
|
9
|
+
"import": "./dist/esm/index.mjs",
|
|
10
10
|
"require": "./dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"./package.json": "./package.json",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"prebuild": "rimraf dist",
|
|
35
35
|
"build": "yarn build:css && yarn build:js",
|
|
36
|
-
"build:css": "
|
|
36
|
+
"build:css": "node -r esbuild-register ./scripts/generateCSS.ts",
|
|
37
37
|
"build:js": "rollup --config",
|
|
38
38
|
"build:dev:js": "tsup",
|
|
39
39
|
"clean": "rimraf dist node_modules",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"@types/webpack-env": "^1.16.2",
|
|
65
65
|
"@typescript-eslint/parser": "^5.20.0",
|
|
66
66
|
"autoprefixer": "^10.3.1",
|
|
67
|
+
"esbuild-register": "^3.4.2",
|
|
67
68
|
"fs-extra": "^10.0.0",
|
|
68
69
|
"glob": "^7.1.7",
|
|
69
70
|
"globcat": "^1.3.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as r}from"tslib";import{Auth as s}from"aws-amplify";import{getLogger as t}from"../utils.js";var u=t("Auth"),n=function(t){var n=t.user,o=t.currentPassword,a=t.newPassword;return e(void 0,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),u.debug("calling Auth.changePassword"),[4,s.changePassword(n,o,a)];case 1:return r.sent(),u.debug("Auth.changePassword was successful"),[2,Promise.resolve()];case 2:return e=r.sent(),u.debug("Auth.changePassword failed with error",e),[2,Promise.reject(e)];case 3:return[2]}}))}))},o=function(){return e(void 0,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),u.debug("calling Auth.deleteUser"),[4,s.deleteUser()];case 1:return r.sent(),u.debug("Auth.deleteUser was successful"),[2,Promise.resolve()];case 2:return e=r.sent(),u.debug("Auth.deleteUser failed with error",e),[2,Promise.reject(e)];case 3:return[2]}}))}))};export{n as changePassword,o as deleteUser};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__spreadArray as e}from"tslib";import{Amplify as t}from"aws-amplify";import"lodash/includes";import"../../types/authenticator/user.js";import"../../types/authenticator/attributes.js";import"../../types/primitives/componentClassName.js";import"../../i18n/translations.js";import{hasSpecialChars as r}from"../authenticator/utils.js";import"lodash/cloneDeep";var a=function(){var e=t.configure(),r=null==e?void 0:e.aws_cognito_password_protection_settings;if(!r)return null;var a=r.passwordPolicyCharacters,n=void 0===a?[]:a;return{minLength:r.passwordPolicyMinLength,needsLowerCase:n.includes("REQUIRES_LOWERCASE"),needsUpperCase:n.includes("REQUIRES_UPPERCASE"),needsNumber:n.includes("REQUIRES_NUMBERS"),needsSpecialChar:n.includes("REQUIRES_SYMBOLS")}},n=function(e){return{validationMode:"onTouched",validator:function(t){return t.length>=e},message:"Password must have at least ".concat(e," characters")}},s={validationMode:"onTouched",validator:function(e){return/[a-z]/.test(e)},message:"Password must have lower case letters"},o={validationMode:"onTouched",validator:function(e){return/[A-Z]/.test(e)},message:"Password must have upper case letters"},i={validationMode:"onTouched",validator:function(e){return/[0-9]/.test(e)},message:"Password must have numbers"},u={validationMode:"onTouched",validator:function(e){return r(e)},message:"Password must have special characters"},d=function(e){return{validationMode:"onTouched",validator:function(t){return e===t},message:"Your passwords must match"}},c=function(){var e=a();if(!e)return[];var t=[],r=e.minLength,d=e.needsLowerCase,c=e.needsUpperCase,l=e.needsNumber,p=e.needsSpecialChar;return r&&t.push(n(r)),d&&t.push(s),c&&t.push(o),l&&t.push(i),p&&t.push(u),t},l=function(e){return[d(e)]},p=function(e){var t=e.validationMode,r=e.eventType,a=e.hasBlurred;switch(t){case"onBlur":return"blur"===r;case"onChange":return"change"===r;case"onTouched":return"blur"===r||a}},h=function(t){var r=t.value,a=t.validators,n=t.eventType,s=t.hasBlurred;return r?a.reduce((function(t,a){var o=a.validator,i=a.validationMode,u=a.message;if(p({validationMode:i,eventType:n,hasBlurred:s}))return!o(r)?e(e([],t,!0),[u],!1):t}),[]):[]};export{l as getDefaultConfirmPasswordValidators,c as getDefaultPasswordValidators,n as getHasMinLength,d as getMatchesConfirmPassword,a as getPasswordRequirement,s as hasLowerCase,i as hasNumber,u as hasSpecialChar,o as hasUpperCase,h as runFieldValidators,p as shouldValidate};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{countryDialCodes as e}from"../../i18n/country-dial-codes.js";import"../../i18n/translations.js";var r={birthdate:{label:"Birthdate",placeholder:"Enter your Birthdate",type:"date",autocomplete:"bday",isRequired:!0},confirmation_code:{label:"Confirmation Code",placeholder:"Enter your Confirmation Code",type:"number",autocomplete:"one-time-code",isRequired:!0},confirm_password:{label:"Confirm Password",placeholder:"Please confirm your Password",type:"password",autocomplete:"new-password",isRequired:!0},email:{label:"Email",placeholder:"Enter your Email",type:"email",autocomplete:"username",isRequired:!0},family_name:{label:"Family Name",placeholder:"Enter your Family Name",type:"text",autocomplete:"family-name",isRequired:!0},given_name:{label:"Given Name",placeholder:"Enter your Given Name",type:"text",autocomplete:"given-name",isRequired:!0},middle_name:{label:"Middle Name",placeholder:"Enter your Middle Name",type:"text",autocomplete:"additional-name",isRequired:!0},name:{label:"Name",placeholder:"Enter your Name",type:"text",autocomplete:"name",isRequired:!0},nickname:{label:"Nickname",placeholder:"Enter your Nickname",type:"text",autocomplete:"tel",isRequired:!0},password:{label:"Password",placeholder:"Enter your Password",type:"password",autocomplete:"new-password",isRequired:!0},phone_number:{label:"Phone Number",placeholder:"Enter your Phone Number",type:"tel",autocomplete:"tel",dialCode:"+1",dialCodeList:e,isRequired:!0},preferred_username:{label:"Preferred Username",placeholder:"Enter your Preferred Username",type:"text",isRequired:!0},profile:{label:"Profile",placeholder:"Add your Profile",type:"url",autocomplete:"url",isRequired:!0},website:{label:"Website",placeholder:"Add your Website",type:"url",autocomplete:"url",isRequired:!0},username:{label:"Username",placeholder:"Enter your Username",type:"text",autocomplete:"username",isRequired:!0}},a=["^","$","*",".","[","]","{","}","(",")","?",'"',"!","@","#","%","&","/","\\",",",">","<","'",":",";","|","_","~","`","=","+","-"," "];export{a as ALLOWED_SPECIAL_CHARACTERS,r as defaultFormFieldOptions};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import i from"lodash/includes";import"../../types/authenticator/user.js";import{LoginMechanismArray as t}from"../../types/authenticator/attributes.js";import"../../types/primitives/componentClassName.js";var n=function(i){var t,n=null===(t=null==i?void 0:i.context.config)||void 0===t?void 0:t.loginMechanisms;return(null!=n?n:["username"])[0]},o=function(n){var o,r=(null===(o=n.config)||void 0===o?void 0:o.loginMechanisms).filter((function(n){return i(t,n)}));return{primaryAlias:r[0],secondaryAliases:r.slice(1)}};export{o as getConfiguredAliases,n as getPrimaryAlias};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{getActorContext as t,getActorState as r}from"./actor.js";var n=function(e){var t=function(t){return function(r){return e({type:t,data:r})}};return{initializeMachine:t("INIT"),resendCode:t("RESEND"),signOut:t("SIGN_OUT"),submitForm:t("SUBMIT"),updateForm:t("CHANGE"),updateBlur:t("BLUR"),toFederatedSignIn:t("FEDERATED_SIGN_IN"),toResetPassword:t("RESET_PASSWORD"),toSignIn:t("SIGN_IN"),toSignUp:t("SIGN_UP"),skipVerification:t("SKIP")}},i=function(e){var n,i,s,a,o,u=null!==(n=t(e))&&void 0!==n?n:{},c=u.codeDeliveryDetails,d=u.remoteError,l=u.unverifiedContactMethods,v=u.validationError,f=(null!==(s=null===(i=e.context)||void 0===i?void 0:i.config)&&void 0!==s?s:{}).socialProviders,m=null!==(a=null==u?void 0:u.user)&&void 0!==a?a:null===(o=e.context)||void 0===o?void 0:o.user,h=v&&Object.keys(v).length>0,g=r(e),p=e.hasTag("pending")||(null==g?void 0:g.hasTag("pending")),S=function(){switch(!0){case e.matches("idle"):return"idle";case e.matches("setup"):return"setup";case e.matches("signOut"):return"signOut";case e.matches("authenticated"):return"authenticated";case null==g?void 0:g.matches("confirmSignUp"):return"confirmSignUp";case null==g?void 0:g.matches("confirmSignIn"):return"confirmSignIn";case null==g?void 0:g.matches("setupTOTP"):return"setupTOTP";case null==g?void 0:g.matches("signIn"):return"signIn";case null==g?void 0:g.matches("signUp"):return"signUp";case null==g?void 0:g.matches("forceNewPassword"):return"forceNewPassword";case null==g?void 0:g.matches("resetPassword"):return"resetPassword";case null==g?void 0:g.matches("confirmResetPassword"):return"confirmResetPassword";case null==g?void 0:g.matches("verifyUser"):return"verifyUser";case null==g?void 0:g.matches("confirmVerifyUser"):return"confirmVerifyUser";case e.matches("signIn.runActor"):return"transition";default:return console.debug("Cannot infer `route` from Authenticator state:",e.value),null}}(),I=function(e){switch(e){case"idle":case"setup":return"configuring";case"authenticated":return"authenticated";default:return"unauthenticated"}}(S);return{authStatus:I,codeDeliveryDetails:c,error:d,hasValidationErrors:h,isPending:p,route:S,socialProviders:f,unverifiedContactMethods:l,user:m,validationErrors:v}},s=function(t){var r=t.send,s=t.state,a=n(r),o=i(s);return e(e({},a),o)};export{n as getSendEventAliases,i as getServiceContextFacade,s as getServiceFacade};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__spreadArray as r}from"tslib";import"../../types/authenticator/user.js";import{authFieldsWithDefaults as t}from"../../types/authenticator/attributes.js";import"../../types/primitives/componentClassName.js";var n=function(r){var t=new FormData(r.target);return Object.fromEntries(t)},e=function(t,n){var e=[];return t&&(e=Object.keys(t).reduce((function(r,n){var e;return r.push([n,null===(e=t[n])||void 0===e?void 0:e.order]),r}),[]).sort((function(r,t){return r[1]-t[1]})).filter((function(r){return void 0!==r[1]})).map((function(r){return r[0]}))),Array.from(new Set(r(r([],e,!0),n,!0)))},o=function(r){return t.includes(r)},i=function(r){return r?(t=r,Array.isArray(t)?r:[r]):null;var t};export{i as getErrors,n as getFormDataFromEvent,o as isAuthFieldWithDefaults,e as setFormOrder};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as o,__spreadArray as r}from"tslib";import{getActorState as e,getActorContext as n}from"../actor.js";import{defaultFormFieldOptions as t}from"../constants.js";import{getPrimaryAlias as a}from"../context.js";import{isAuthFieldWithDefaults as s}from"../form.js";var i=function(r,e){var a=n(r).country_code,s=t[e];return"tel"===s.type&&(s=o(o({},s),{dialCode:a})),s},c=function(r){var e=a(r);return o(o({},i(r,e)),{autocomplete:"username"})},d=function(r){return{confirmation_code:o(o({},i(r,"confirmation_code")),{label:"Code *",placeholder:"Code"})}},u={signIn:function(r){return{username:o({},c(r)),password:o(o({},i(r,"password")),{autocomplete:"current-password"})}},signUp:function(e){for(var n=e.context.config,t=n.loginMechanisms,d=n.signUpAttributes,u=a(e),f={},m=0,l=Array.from(new Set(r(r(r([],t,!0),["password","confirm_password"],!1),d,!0)));m<l.length;m++){var p=l[m];if(s(p)){var w=p===u?c(e):i(e,p);f[p]=o({},w)}else console.debug("Authenticator does not have a default implementation for ".concat(p,". Customize SignUp FormFields to add your own."))}return f},confirmSignUp:function(r){return{confirmation_code:o(o({},i(r,"confirmation_code")),{placeholder:"Enter your code"})}},confirmSignIn:d,forceNewPassword:function(n){for(var t=e(n).context.requiredAttributes,a={},c=0,d=Array.from(new Set(r(["password","confirm_password"],t,!0)));c<d.length;c++){var u=d[c];s(u)?a[u]=o({},i(n,u)):console.debug("Authenticator does not have a default implementation for ".concat(u,". Customize ForceNewPassword FormFields to add your own."))}return a},resetPassword:function(r){var e=a(r),n=t[e].label;return{username:o(o({},c(r)),{label:"Enter your ".concat(n.toLowerCase()),placeholder:"Enter your ".concat(n.toLowerCase())})}},confirmResetPassword:function(r){return o(o({},d(r)),{password:o(o({},i(r,"password")),{label:"New Password",placeholder:"New Password"}),confirm_password:o(o({},i(r,"confirm_password")),{label:"Confirm Password",placeholder:"Confirm Password"})})},confirmVerifyUser:d,setupTOTP:d};export{u as defaultFormFieldsGetters};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import{getActorState as o}from"../actor.js";import{defaultFormFieldsGetters as t}from"./defaults.js";import{applyTranslation as n,applyDefaults as i,sortFormFields as u}from"./util.js";var e=function(r,o){var i=(0,t[r])(o);return n(i)},f=function(r,t){var n,u,f=e(r,t),m=(null===(u=null===(n=o(t).context)||void 0===n?void 0:n.formFields)||void 0===u?void 0:u[r])||{},d=i(f,m);return delete d.QR,d},m=function(o){return o.map((function(o){return[o[0],r(r({},o[1]),{order:void 0})]}))},d=function(r,o){var t=f(r,o);return m(u(t))};export{e as getDefaultFormFields,f as getFormFields,d as getSortedFormFields,m as removeOrderKeys};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import e from"lodash/cloneDeep";import{translate as o}from"../../../i18n/translations.js";var t=function(e){for(var t=r({},e),n=0,i=Object.entries(e);n<i.length;n++){var l=i[n],c=l[0],u=l[1],a=u.label,f=u.placeholder;t[c]=r(r({},u),{label:a?o(a):void 0,placeholder:f?o(f):void 0})}return t},n=function(r){return Object.entries(r).sort((function(r,e){return(r[1].order||Number.MAX_VALUE)-(e[1].order||Number.MAX_VALUE)})).filter((function(r){return void 0!==r[1]}))},i=function(o,t){void 0===t&&(t={});var n=e(o);return Object.keys(t).forEach((function(e){n[e]=r(r({},n[e]),t[e])})),n};export{i as applyDefaults,t as applyTranslation,n as sortFormFields};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{translate as t,DefaultTexts as e}from"../../i18n/translations.js";var n={amazon:"Amazon",apple:"Apple",facebook:"Facebook",google:"Google"},r={getBackToSignInText:function(){return t(e.BACK_SIGN_IN)},getChangePasswordText:function(){return t(e.CHANGE_PASSWORD)},getChangingText:function(){return t(e.CHANGING_PASSWORD)},getConfirmText:function(){return t(e.CONFIRM)},getConfirmingText:function(){return t(e.CONFIRMING)},getCopyText:function(){return t(e.UPPERCASE_COPY)},getHidePasswordText:function(){return t(e.HIDE_PASSWORD)},getLoadingText:function(){return t(e.LOADING)},getOrText:function(){return t(e.OR)},getResendCodeText:function(){return t(e.RESEND_CODE)},getSendCodeText:function(){return t(e.SEND_CODE)},getSendingText:function(){return t(e.SENDING)},getShowPasswordText:function(){return t(e.SHOW_PASSWORD)},getSubmitText:function(){return t(e.SUBMIT)},getSubmittingText:function(){return t(e.SUBMITTING)},getSignInTabText:function(){return t(e.SIGN_IN_TAB)},getSignUpTabText:function(){return t(e.CREATE_ACCOUNT)},getForgotPasswordText:function(n){return t(n?e.FORGOT_PASSWORD:e.FORGOT_YOUR_PASSWORD)},getSigningInText:function(){return t(e.SIGNING_IN_BUTTON)},getSignInText:function(){return t(e.SIGN_IN_BUTTON)},getCreatingAccountText:function(){return t(e.CREATING_ACCOUNT)},getCreateAccountText:function(){return t(e.CREATE_ACCOUNT)},getDeliveryMessageText:function(n){var r=null!=n?n:{},o=r.DeliveryMedium,u=r.Destination,i="EMAIL"===o,c="SMS"===o,T=t(e.CODE_ARRIVAL);if(!i&&!c)return"".concat(t(e.CODE_SENT),". ").concat(T,".");var g=t(i?e.CODE_EMAILED:e.CODE_TEXTED);return"".concat(g," ").concat(u,". ").concat(T,".")},getDeliveryMethodText:function(n){var r=(null!=n?n:{}).DeliveryMedium,o="EMAIL"===r;return t(o||"SMS"!==r?o?e.WE_EMAILED:e.WE_TEXTED:e.WE_SENT_CODE)},getChallengeText:function(n){switch(n){case"SMS_MFA":return t(e.CONFIRM_SMS);case"SOFTWARE_TOKEN_MFA":return t(e.CONFIRM_TOTP);default:throw new Error("".concat(t("Unexpected challengeName encountered in ConfirmSignIn:")," ").concat(n))}},getResetYourPasswordText:function(){return t(e.RESET_PASSWORD)},getSetupTOTPText:function(){return t(e.SETUP_TOTP)},getSetupTOTPInstructionsText:function(){return t("Copy and paste the secret key below into an authenticator app and then enter the code in the text field below.")},getCopiedText:function(){return t("COPIED")},getSignInWithFederationText:function(e,r){return t("Sign ".concat("signIn"===e?"In":"Up"," with ").concat(n[r]))},getSkipText:function(){return t(e.SKIP)},getVerifyText:function(){return t(e.VERIFY)},getVerifyContactText:function(){return t(e.VERIFY_CONTACT)},getAccountRecoveryInfoText:function(){return t(e.VERIFY_HEADING)}};export{r as authenticatorTextUtil};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n,__assign as e}from"tslib";import{Hub as r}from"aws-amplify";import{appendToCognitoUserAgent as a}from"@aws-amplify/auth";import{waitFor as o}from"xstate/lib/waitFor";import{ALLOWED_SPECIAL_CHARACTERS as u}from"./constants.js";import{getActorState as c}from"./actor.js";var i=function(t){var n=t.packageName,e=t.version;a("".concat(n,"/").concat(e))},s=function(t){for(var n=t.trim().split(""),e=0;e<n.length;e++)e>0&&e<n.length-1&&(n[e]="*");return n.join("")},f=function(t){if(t.length<4)return t;for(var n=t.split(""),e=0;e<n.length-4;e++)n[e]="*";return n.join("")},l=function(e){return t(void 0,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,o(e,(function(t){return c(t).matches("autoSignIn")}))];case 1:case 2:return t.sent(),[3,3];case 3:return[2]}}))}))},h=function(e,r){return t(void 0,void 0,void 0,(function(){var t,a,o,u;return n(this,(function(n){switch(n.label){case 0:switch(t=r.send,a=r.getSnapshot(),e.payload.event){case"tokenRefresh":return[3,1];case"autoSignIn":return[3,2];case"autoSignIn_failure":return[3,5];case"signOut":case"tokenRefresh_failure":return[3,7]}return[3,8];case 1:return a.matches("authenticated.idle")&&t("TOKEN_REFRESH"),[3,9];case 2:return a.matches("authenticated")?[3,4]:[4,l(r)];case 3:n.sent(),(null==(o=c(r.getSnapshot()))?void 0:o.matches("autoSignIn"))&&t({type:"AUTO_SIGN_IN",data:e.payload.data}),n.label=4;case 4:return[3,9];case 5:return[4,l(r)];case 6:return n.sent(),(null==(u=c(r.getSnapshot()))?void 0:u.matches("autoSignIn"))&&t({type:"AUTO_SIGN_IN_FAILURE",data:e.payload.data}),[3,9];case 7:return a.matches("authenticated.idle")&&t("SIGN_OUT"),[3,9];case 8:return[3,9];case 9:return[2]}}))}))},d=function(t,n){return void 0===n&&(n=h),r.listen("auth",function(t,n){return function(e){n(e,t)}}(t,n),"authenticator-hub-handler")},m=function(t){return u.some((function(n){return t.includes(n)}))},p=function(t,n,e){return encodeURI("otpauth://totp/".concat(t,":").concat(n,"?secret=").concat(e,"&issuer=").concat(t))};function v(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return Object.entries(t).reduce((function(t,r){var a,o=r[0],u=r[1];return e(e({},t),((a={})[o]=n.includes(o)?u:null==u?void 0:u.trim(),a))}),{})}export{s as censorAllButFirstAndLast,f as censorPhoneNumber,i as configureComponent,h as defaultAuthHubHandler,p as getTotpCodeURL,m as hasSpecialChars,d as listenToAuthHub,v as trimValues};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest as e,__assign as r}from"tslib";import{Storage as t}from"aws-amplify";import{translate as a}from"../../../../i18n/translations.js";function l(a){var l=a.file,i=a.fileName,o=a.level,n=void 0===o?"private":o,s=a.progressCallback,p=a.errorCallback,c=a.completeCallback,u=a.isResumable,m=void 0!==u&&u,b=e(a,["file","fileName","level","progressCallback","errorCallback","completeCallback","isResumable"]),f=l.type||"binary/octet-stream";return!0===m?t.put(i,l,r({level:n,resumable:m,progressCallback:s,errorCallback:p,completeCallback:c,contentType:f},b)):t.put(i,l,r({level:n,resumable:!1,progressCallback:s,contentType:f},b)).then(c,p)}function i(e,r,t){void 0===r&&(r=!1),void 0===t&&(t=1);var a=r?1e3:1024;if(Math.abs(e)<a)return e+" B";var l=r?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],i=-1,o=Math.pow(10,t);do{e/=a,++i}while(Math.round(Math.abs(e)*o)/o>=a&&i<l.length-1);return e.toFixed(t)+" "+l[i]}var o=function(e,r){return e&&r.size>e?a("File size must be below ")+i(e,!0):null},n=function(e,r){return e.filter((function(e){var t=e.name||"",a=(e.type||"").toLowerCase(),l=a.replace(/\/.*$/,"");return r.some((function(e){var r=e.trim().toLowerCase();return"."===r.charAt(0)?t.toLowerCase().endsWith(r):r.endsWith("/*")?l===r.replace(/\/.*$/,""):a===r}))}))},s=function(e,r){var t=e.split(".").pop();return r.split(".").pop()===t};export{o as checkMaxSize,i as humanFileSize,s as isValidExtension,n as returnAcceptedFiles,l as uploadFile};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{deDict as r}from"./authenticator/de.js";import{enDict as a}from"./authenticator/en.js";import{esDict as i}from"./authenticator/es.js";import{frDict as o}from"./authenticator/fr.js";import{itDict as s}from"./authenticator/it.js";import{jaDict as m}from"./authenticator/ja.js";import{krDict as c}from"./authenticator/kr.js";import{nlDict as e}from"./authenticator/nl.js";import{plDict as p}from"./authenticator/pl.js";import{ptDict as u}from"./authenticator/pt.js";import{zhDict as f}from"./authenticator/zh.js";import{svDict as h}from"./authenticator/sv.js";import{idDict as n}from"./authenticator/id.js";import{trDict as j}from"./authenticator/tr.js";import{ruDict as D}from"./authenticator/ru.js";import{heDict as l}from"./authenticator/he.js";import{uaDict as d}from"./authenticator/ua.js";import{defaultTexts as v}from"./authenticator/defaultTexts.js";var x=t({},r),k=t({},a),z=t({},i),T=t({},o),b=t({},s),g=t({},m),q=t({},c),w=t({},e),y=t({},p),A=t({},u),B=t({},f),C=t({},h),E=t({},n),F=t({},j),G=t({},D),H=t({},l),I=t({},d),J=t({},v);export{x as deDict,J as defaultTexts,k as enDict,z as esDict,T as frDict,H as heDict,E as idDict,b as itDict,g as jaDict,q as krDict,w as nlDict,y as plDict,A as ptDict,G as ruDict,C as svDict,F as trDict,I as uaDict,B as zhDict};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import{I18n as t}from"aws-amplify";import{defaultTexts as i,deDict as e,enDict as n,esDict as o,frDict as a,idDict as f,itDict as m,jaDict as p,krDict as s,nlDict as u,plDict as d,ptDict as l,zhDict as c,svDict as v,trDict as g,ruDict as h,heDict as j,uaDict as x}from"./dictionaries/index.js";var b=r({},i);function k(r){return t.get(r)}function w(r){return t.get(r)!==r}var y={de:e,en:n,es:o,fr:a,id:f,it:m,ja:p,kr:s,nl:u,pl:d,pt:l,zh:c,sv:v,tr:g,ru:h,he:j,ua:x};export{b as DefaultTexts,w as hasTranslation,k as translate,y as translations};
|
package/dist/esm/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{getActorContext,getActorState}from"./helpers/authenticator/actor.js";export{getConfiguredAliases,getPrimaryAlias}from"./helpers/authenticator/context.js";export{getSendEventAliases,getServiceContextFacade,getServiceFacade}from"./helpers/authenticator/facade.js";export{ALLOWED_SPECIAL_CHARACTERS,defaultFormFieldOptions}from"./helpers/authenticator/constants.js";export{getErrors,getFormDataFromEvent,isAuthFieldWithDefaults,setFormOrder}from"./helpers/authenticator/form.js";export{censorAllButFirstAndLast,censorPhoneNumber,configureComponent,defaultAuthHubHandler,getTotpCodeURL,hasSpecialChars,listenToAuthHub,trimValues}from"./helpers/authenticator/utils.js";export{getDefaultFormFields,getFormFields,getSortedFormFields,removeOrderKeys}from"./helpers/authenticator/formFields/formFields.js";export{defaultFormFieldsGetters}from"./helpers/authenticator/formFields/defaults.js";export{applyDefaults,applyTranslation,sortFormFields}from"./helpers/authenticator/formFields/util.js";export{authenticatorTextUtil}from"./helpers/authenticator/textUtil.js";export{changePassword,deleteUser}from"./helpers/accountSettings/utils.js";export{getDefaultConfirmPasswordValidators,getDefaultPasswordValidators,runFieldValidators}from"./helpers/accountSettings/validator.js";export{checkMaxSize,humanFileSize,isValidExtension,returnAcceptedFiles,uploadFile}from"./helpers/storage/fileUploader/utils/uploader.js";export{getLogger}from"./helpers/utils.js";export{countryDialCodes}from"./i18n/country-dial-codes.js";export{DefaultTexts,hasTranslation,translate,translations}from"./i18n/translations.js";export{createAuthenticatorMachine}from"./machines/authenticator/index.js";export{createTheme}from"./theme/createTheme.js";export{defaultTheme}from"./theme/defaultTheme.js";export{defaultDarkModeOverride,reactNativeDarkTokens}from"./theme/defaultDarkModeOverride.js";export{reactNativeTokens}from"./theme/tokens/index.js";export{cssNameTransform,isDesignToken,setupTokens}from"./theme/utils.js";export{FederatedIdentityProviders,UnverifiedContactMethodType}from"./types/authenticator/user.js";export{isUnverifiedContactMethodType}from"./types/authenticator/utils.js";export{LoginMechanismArray,authFieldsWithDefaults,signUpFieldsWithDefault,signUpFieldsWithoutDefault}from"./types/authenticator/attributes.js";export{ComponentClassName}from"./types/primitives/componentClassName.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as r,__awaiter as e,__generator as t}from"tslib";import{Auth as n}from"aws-amplify";import{assign as o,stop as a}from"xstate/lib/actions";import"lodash/includes";import"../../types/authenticator/user.js";import"../../types/authenticator/attributes.js";import"../../types/primitives/componentClassName.js";import"../../i18n/translations.js";import{trimValues as u}from"../../helpers/authenticator/utils.js";import"lodash/cloneDeep";import"../../helpers/accountSettings/utils.js";var i=function(r){return a(r)},s=o({attributeToVerify:function(r){}}),c=o({challengeName:function(r){}}),l=o({requiredAttributes:function(r){}}),m=o({remoteError:function(r){return""}}),d=o({formValues:function(r){return{}}}),f=o({touched:function(r){return{}}}),v=o({unverifiedContactMethods:function(r){}}),p=o({username:function(r){}}),h=o({validationError:function(r){return{}}}),V=o({challengeName:function(r,e){var t;return null===(t=e.data)||void 0===t?void 0:t.challengeName}}),b=o({requiredAttributes:function(r,e){var t,n;return null===(n=null===(t=e.data)||void 0===t?void 0:t.challengeParam)||void 0===n?void 0:n.requiredAttributes}}),g=o({redirectIntent:function(r){return"confirmPasswordReset"}}),y=o({redirectIntent:function(r){return"confirmSignUp"}}),_=o({authAttributes:function(r,e){var t,n,o=r.loginMechanisms[0];return{username:null!==(t=r.formValues[o])&&void 0!==t?t:r.formValues.username,password:null===(n=r.formValues)||void 0===n?void 0:n.password}}}),w=o({validationError:function(r,e){return e.data}}),j=o({remoteError:function(r,e){var t;return"NoUserPoolError"===e.data.name?"Configuration error (see console) – please contact the administrator":(null===(t=e.data)||void 0===t?void 0:t.message)||e.data}}),A=o({unverifiedContactMethods:function(r,e){return e.data.unverified}}),D=o({user:function(r,e){return e.data.user||e.data}}),E=o({username:function(r,e){var t=r.formValues,n=t.username,o=t.country_code;return o&&(n="".concat(o).concat(n)),n}}),N=o({codeDeliveryDetails:function(r,e){return e.data.codeDeliveryDetails}}),C=o({authAttributes:function(r,e){return{username:r.formValues.username}}}),M=o({formValues:function(e,t){var n,o=t.data,a=o.name,u=o.value;return r(r({},e.formValues),((n={})[a]=u,n))}}),P=o({formValues:function(e,t){var n=r(r({},e.formValues),t.data);return u(n,"password")}}),q=o({touched:function(e,t){var n,o=t.data.name;return r(r({},e.touched),((n={})["".concat(o)]=!0,n))}}),x=function(r){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return e=r.username,[4,n.forgotPassword(e)];case 1:return[2,t.sent()]}}))}))},I=o({formValues:function(e,t){var n,o,a=e.loginMechanisms[0],u=void 0===a?"username":a;if(!e.formValues.phone_number&&"phone_number"!==u)return e.formValues;var i=e.formValues,s=e.country_code,c=i.phone_number?"phone_number":"username",l="".concat(null!==(o=i.country_code)&&void 0!==o?o:s).concat(i[c]).replace(/[^A-Z0-9+]/gi,""),m=r(r({},i),((n={})[c]=l,n));return delete m.country_code,m}});export{s as clearAttributeToVerify,c as clearChallengeName,m as clearError,d as clearFormValues,l as clearRequiredAttributes,f as clearTouched,v as clearUnverifiedContactMethods,p as clearUsername,h as clearValidationError,q as handleBlur,M as handleInput,P as handleSubmit,I as parsePhoneNumber,x as resendCode,V as setChallengeName,N as setCodeDeliveryDetails,g as setConfirmResetPasswordIntent,y as setConfirmSignUpIntent,_ as setCredentials,w as setFieldErrors,j as setRemoteError,b as setRequiredAttributes,A as setUnverifiedContactMethods,D as setUser,E as setUsername,C as setUsernameAuthAttributes,i as stopActor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as r}from"tslib";import{createMachine as t,sendUpdate as n}from"xstate";import{runValidators as s}from"../../../validators/index.js";import{clearError as o,clearFormValues as a,clearTouched as i,clearUsername as d,clearValidationError as l,handleInput as c,handleSubmit as u,handleBlur as m,resendCode as p,setFieldErrors as g,setRemoteError as v,setUsername as f}from"../actions.js";import{defaultServices as E}from"../defaultServices.js";function h(h){var w=h.services;return t({id:"resetPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{target:"confirmResetPassword",cond:"shouldAutoConfirmReset",actions:"resendCode"},{target:"resetPassword"}]},resetPassword:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:["pending"],entry:["sendUpdate","setUsername","clearError"],invoke:{src:"resetPassword",onDone:{target:"#resetPasswordActor.confirmResetPassword"},onError:{actions:["setRemoteError"],target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearUsername","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"resetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"confirmResetPassword",onDone:{actions:"clearUsername",target:"#resetPasswordActor.resolved"},onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final"}}},{actions:{clearError:o,clearFormValues:a,clearTouched:i,clearUsername:d,clearValidationError:l,handleInput:c,handleSubmit:u,handleBlur:m,resendCode:p,setFieldErrors:g,setRemoteError:v,setUsername:f,sendUpdate:n()},guards:{shouldAutoConfirmReset:function(e,r){return!(!e.intent||"confirmPasswordReset"!==e.intent)}},services:{resetPassword:function(t){return e(this,void 0,void 0,(function(){var e;return r(this,(function(r){return e=t.username,[2,w.handleForgotPassword(e)]}))}))},confirmResetPassword:function(t){return e(this,void 0,void 0,(function(){var e,n,s,o;return r(this,(function(r){return e=t.username,n=t.formValues,s=n.confirmation_code,o=n.password,[2,w.handleForgotPasswordSubmit({username:e,code:s,password:o})]}))}))},validateFields:function(t,n){return e(this,void 0,void 0,(function(){return r(this,(function(e){return[2,s(t.formValues,t.touched,t.passwordSettings,[E.validateFormPassword,E.validateConfirmPassword])]}))}))}}})}export{h as resetPasswordActor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t,__assign as r,__rest as n}from"tslib";import{Auth as i}from"aws-amplify";import o from"lodash/get";import s from"lodash/isEmpty";import{createMachine as a,sendUpdate as c}from"xstate";import{runValidators as d}from"../../../validators/index.js";import{clearAttributeToVerify as u,clearChallengeName as l,clearRequiredAttributes as g,clearError as f,clearFormValues as m,clearTouched as h,clearUnverifiedContactMethods as I,clearValidationError as p,handleInput as v,handleSubmit as A,handleBlur as U,parsePhoneNumber as S,setChallengeName as E,setConfirmResetPasswordIntent as b,setConfirmSignUpIntent as y,setRequiredAttributes as T,setCredentials as C,setFieldErrors as N,setRemoteError as w,setUnverifiedContactMethods as R,setUser as P,setUsernameAuthAttributes as V}from"../actions.js";import{defaultServices as _}from"../defaultServices.js";var F=["SMS_MFA","SOFTWARE_TOKEN_MFA"],k=function(e){return o(e,"data.challengeName")},O=function(e,t){return e===t},D=function(e){return F.includes(e)};function M(o){var F=o.services;return a({initial:"init",id:"signInActor",predictableActionArguments:!0,states:{init:{always:[{target:"autoSignIn.submit",cond:"shouldAutoSubmit"},{target:"autoSignIn",cond:"shouldAutoSignIn"},{target:"signIn"}]},signIn:{initial:"edit",exit:["clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:"federatedSignIn"}},federatedSignIn:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"federatedSignIn",onError:{actions:"setRemoteError"}}},submit:{tags:["pending"],entry:["parsePhoneNumber","clearError","sendUpdate"],invoke:{src:"signIn",onDone:[{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldForceChangePassword",actions:["setUser","setChallengeName","setRequiredAttributes"],target:"#signInActor.forceNewPassword"},{actions:"setUser",target:"verifying"}],onError:[{cond:"shouldRedirectToConfirmSignUp",actions:["setCredentials","setConfirmSignUpIntent"],target:"rejected"},{cond:"shouldRedirectToConfirmResetPassword",actions:["setUsernameAuthAttributes","setConfirmResetPasswordIntent"],target:"rejected"},{actions:"setRemoteError",target:"edit"}]}},verifying:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"checkVerifiedContact",onDone:[{cond:"shouldRequestVerification",target:"#signInActor.verifyUser",actions:"setUnverifiedContactMethods"},{target:"resolved"}],onError:{actions:"setRemoteError",target:"edit"}}},resolved:{always:"#signInActor.resolved"},rejected:{always:"#signInActor.rejected"}}},autoSignIn:{initial:"pending",states:{pending:{tags:["pending"],entry:["clearError","sendUpdate"],on:{AUTO_SIGN_IN:[{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldForceChangePassword",actions:["setUser","setChallengeName","setRequiredAttributes"],target:"#signInActor.forceNewPassword"},{actions:"setUser",target:"#signInActor.resolved"}],AUTO_SIGN_IN_FAILURE:{actions:"setRemoteError",target:"pending"}}},submit:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"signIn",onDone:[{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldForceChangePassword",actions:["setUser","setChallengeName","setRequiredAttributes"],target:"#signInActor.forceNewPassword"},{actions:"setUser",target:"#signInActor.resolved"}],onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resolved:{always:"#signInActor.resolved"},rejected:{always:"#signInActor.rejected"}}},confirmSignIn:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:["clearError","sendUpdate"],invoke:{src:"confirmSignIn",onDone:{target:"#signInActor.resolved",actions:["setUser","clearChallengeName","clearRequiredAttributes"]},onError:{target:"edit",actions:"setRemoteError"}}}}},forceNewPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"idle",entry:"clearError",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},pending:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"forceNewPassword",onDone:[{cond:"shouldConfirmSignIn",actions:["setUser","setChallengeName"],target:"#signInActor.confirmSignIn"},{cond:"shouldSetupTOTP",actions:["setUser","setChallengeName"],target:"#signInActor.setupTOTP"},{target:"resolved",actions:["setUser","setCredentials"]}],onError:{target:"idle",actions:"setRemoteError"}}},resolved:{type:"final",always:"#signInActor.resolved"}}}}},setupTOTP:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"verifyTotpToken",onDone:{actions:["clearChallengeName","clearRequiredAttributes"],target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},verifyUser:{initial:"edit",exit:["clearFormValues","clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#signInActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:"clearError",invoke:{src:"verifyUser",onDone:{target:"#signInActor.confirmVerifyUser"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUser:{initial:"edit",exit:["clearFormValues","clearError","clearUnverifiedContactMethods","clearAttributeToVerify","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#signInActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:["pending"],entry:"clearError",invoke:{src:"confirmVerifyUser",onDone:{target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:function(e){return{user:e.user}}},rejected:{type:"final",data:function(e,t){return{intent:e.redirectIntent,authAttributes:e.authAttributes}}}}},{actions:{clearAttributeToVerify:u,clearChallengeName:l,clearRequiredAttributes:g,clearError:f,clearFormValues:m,clearTouched:h,clearUnverifiedContactMethods:I,clearValidationError:p,handleInput:v,handleSubmit:A,handleBlur:U,parsePhoneNumber:S,setChallengeName:E,setConfirmResetPasswordIntent:b,setConfirmSignUpIntent:y,setRequiredAttributes:T,setCredentials:C,setFieldErrors:N,setRemoteError:w,setUnverifiedContactMethods:R,setUser:P,setUsernameAuthAttributes:V,sendUpdate:c()},guards:{shouldAutoSignIn:function(e){return"autoSignIn"===(null==e?void 0:e.intent)},shouldAutoSubmit:function(e){return"autoSignInSubmit"===(null==e?void 0:e.intent)},shouldConfirmSignIn:function(e,t){return D(k(t))},shouldForceChangePassword:function(e,t){return O(k(t),"NEW_PASSWORD_REQUIRED")},shouldRedirectToConfirmResetPassword:function(e,t){return"PasswordResetRequiredException"===t.data.code},shouldRedirectToConfirmSignUp:function(e,t){return"UserNotConfirmedException"===t.data.code},shouldRequestVerification:function(e,t){var r=t.data,n=r.unverified,i=r.verified;return s(i)&&!s(n)},shouldSetupTOTP:function(e,t){return O(k(t),"MFA_SETUP")}},services:{signIn:function(n){return e(this,void 0,void 0,(function(){var e,i,o,s,a,c,d;return t(this,(function(t){switch(t.label){case 0:return e=n.authAttributes,i=void 0===e?{}:e,o=n.formValues,s=void 0===o?{}:o,a=r(r({},i),s),c=a.username,d=a.password,[4,F.handleSignIn({username:c,password:d})];case 1:return[2,t.sent()]}}))}))},confirmSignIn:function(r){return e(this,void 0,void 0,(function(){var e,n,o,s;return t(this,(function(t){switch(t.label){case 0:return e=r.challengeName,n=r.user,o=r.formValues.confirmation_code,s=D(e)?e:void 0,[4,F.handleConfirmSignIn({user:n,code:o,mfaType:s})];case 1:return t.sent(),[4,i.currentAuthenticatedUser()];case 2:return[2,t.sent()]}}))}))},forceNewPassword:function(o){return e(this,void 0,void 0,(function(){var e,s,a,c,d,u,l,g,f;return t(this,(function(t){switch(t.label){case 0:e=o.user,s=o.formValues,a=s.password,s.confirm_password,c=s.phone_number,d=s.country_code,u=n(s,["password","confirm_password","phone_number","country_code"]),c&&(l="".concat(d).concat(c).replace(/[^A-Z0-9+]/gi,""),u=r(r({},u),{phone_number:l})),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.completeNewPassword(e,a,u)];case 2:return(g=t.sent()).challengeName?[2,g]:[2,i.currentAuthenticatedUser()];case 3:return f=t.sent(),[2,Promise.reject(f)];case 4:return[2]}}))}))},verifyTotpToken:function(r){return e(this,void 0,void 0,(function(){var e,n,o;return t(this,(function(t){return e=r.formValues,n=r.user,o=e.confirmation_code,[2,i.verifyTotpToken(n,o)]}))}))},federatedSignIn:function(r,n){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return e=n.data.provider,[4,i.federatedSignIn({provider:e})];case 1:return[2,t.sent()]}}))}))},checkVerifiedContact:function(r){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return e=r.user,[4,i.verifiedContact(e)];case 1:return[2,t.sent()]}}))}))},verifyUser:function(r){return e(this,void 0,void 0,(function(){var e,n;return t(this,(function(t){switch(t.label){case 0:return e=r.formValues.unverifiedAttr,[4,i.verifyCurrentUserAttribute(e)];case 1:return n=t.sent(),r.attributeToVerify=e,[2,n]}}))}))},confirmVerifyUser:function(r){return e(this,void 0,void 0,(function(){var e,n;return t(this,(function(t){switch(t.label){case 0:return e=r.attributeToVerify,n=r.formValues.confirmation_code,[4,i.verifyCurrentUserAttributeSubmit(e,n)];case 1:return[2,t.sent()]}}))}))},validateFields:function(r){return e(this,void 0,void 0,(function(){return t(this,(function(e){return[2,d(r.formValues,r.touched,r.passwordSettings,[_.validateFormPassword,_.validateConfirmPassword])]}))}))}}})}export{M as signInActor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n,__assign as r}from"tslib";import{Amplify as i,Auth as o}from"aws-amplify";import"lodash/includes";import"../../types/authenticator/user.js";import"../../types/authenticator/attributes.js";import"../../types/primitives/componentClassName.js";import"../../i18n/translations.js";import{hasSpecialChars as s}from"../../helpers/authenticator/utils.js";import"lodash/cloneDeep";import"../../helpers/accountSettings/utils.js";var e={getAmplifyConfig:function(){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,i.configure()]}))}))},getCurrentUser:function(){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.currentAuthenticatedUser()]}))}))},handleSignUp:function(i){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.signUp(r(r({},i),{autoSignIn:{enabled:!0}}))]}))}))},handleSignIn:function(r){var i=r.username,s=r.password;return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.signIn(i,s)]}))}))},handleConfirmSignIn:function(r){var i=r.user,s=r.code,e=r.mfaType;return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.confirmSignIn(i,s,e)]}))}))},handleConfirmSignUp:function(r){var i=r.username,s=r.code;return t(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,o.confirmSignUp(i,s)];case 1:return[2,t.sent()]}}))}))},handleForgotPasswordSubmit:function(r){var i=r.username,s=r.code,e=r.password;return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.forgotPasswordSubmit(i,s,e)]}))}))},handleForgotPassword:function(r){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,o.forgotPassword(r)]}))}))},validateCustomSignUp:function(r,i){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2]}))}))},validateFormPassword:function(r,i,o){return t(this,void 0,void 0,(function(){var t,e,u,a;return n(this,(function(n){return t=r.password,i.password&&o?(e=[],u=+(null==o?void 0:o.passwordPolicyMinLength),t.length<u&&e.push("Password must have at least ".concat(u," characters")),null==(a=null==o?void 0:o.passwordPolicyCharacters)||a.forEach((function(n){switch(n){case"REQUIRES_LOWERCASE":/[a-z]/.test(t)||e.push("Password must have lower case letters");break;case"REQUIRES_UPPERCASE":/[A-Z]/.test(t)||e.push("Password must have upper case letters");break;case"REQUIRES_NUMBERS":/[0-9]/.test(t)||e.push("Password must have numbers");break;case"REQUIRES_SYMBOLS":s(t)||e.push("Password must have special characters")}})),[2,0!==e.length?{password:e}:null]):[2,null]}))}))},validateConfirmPassword:function(r,i){return t(this,void 0,void 0,(function(){var t,o,s,e;return n(this,(function(n){return t=r.password,o=r.confirm_password,s=i.confirm_password,e=i.password,t||o?(t||o)&&t!==o&&(s&&e||(null==t?void 0:t.length)>=6&&(null==o?void 0:o.length)>=6)?[2,{confirm_password:"Your passwords must match"}]:[2]:[2,null]}))}))},validatePreferredUsername:function(r,i){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2]}))}))}};export{e as defaultServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t,__spreadArray as o,__rest as n}from"tslib";import{createMachine as i,forwardTo as r,assign as e,spawn as a}from"xstate";import{choose as s}from"xstate/lib/actions";import{stopActor as c}from"./actions.js";import{signInActor as u}from"./actors/signIn.js";import{signOutActor as d}from"./actors/signOut.js";import{resetPasswordActor as l}from"./actors/resetPassword.js";import{defaultServices as g}from"./defaultServices.js";import{createSignUpMachine as v}from"./signUp.js";function f(){return i({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:g,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"getCurrentUser",onDone:{actions:"setUser",target:"authenticated"},onError:{target:"setup"}}},setup:{initial:"waitConfig",states:{waitConfig:{on:{INIT:{actions:["configure","setHasSetup"],target:"applyConfig"}}},applyConfig:{invoke:{src:"getAmplifyConfig",onDone:{actions:"applyAmplifyConfig",target:"goToInitialState"}}},goToInitialState:{always:[{target:"#authenticator.signUp",cond:"isInitialStateSignUp"},{target:"#authenticator.resetPassword",cond:"isInitialStateResetPassword"},{target:"#authenticator.signIn"}]}}},signIn:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopSignInActor"}},on:{SIGN_UP:"signUp",RESET_PASSWORD:"resetPassword","done.invoke.signInActor":[{target:"signUp",actions:"setActorDoneData",cond:"shouldRedirectToSignUp"},{target:"resetPassword",actions:"setActorDoneData",cond:"shouldRedirectToResetPassword"},{target:"authenticated",actions:"setActorDoneData"}]}},signUp:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopSignUpActor"},autoSignIn:{invoke:{src:"getCurrentUser",onDone:"#authenticator.authenticated",onError:"#authenticator.setup.goToInitialState"}}},on:{SIGN_IN:"signIn","done.invoke.signUpActor":{target:"#authenticator.signIn",actions:"setActorDoneData",cond:"shouldAutoSignIn"}}},resetPassword:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnResetPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:"stopResetPasswordActor"}},on:{SIGN_IN:"signIn","done.invoke.resetPasswordActor":{target:"signIn",actions:"setActorDoneData"}}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:["stopSignOutActor","clearUser"]}},on:{"done.invoke.signOutActor":[{target:"setup",cond:"shouldSetup"},{target:"setup.goToInitialState"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}}},on:{CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},AUTO_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{forwardToActor:s([{cond:"hasActor",actions:r((function(t){return t.actorRef}))}]),setUser:e({user:function(t,o){return o.data}}),setActorDoneData:e({actorDoneData:function(o,n){var i,r;return{authAttributes:t({},null===(i=n.data)||void 0===i?void 0:i.authAttributes),intent:null===(r=n.data)||void 0===r?void 0:r.intent}},user:function(t,o){var n;return null===(n=o.data)||void 0===n?void 0:n.user}}),clearUser:e({user:void 0}),clearActorDoneData:e({actorDoneData:void 0}),applyAmplifyConfig:e({config:function(t,n){var i,r,e,a,s,c,u,d,l,g=null!==(r=null===(i=n.data.aws_cognito_username_attributes)||void 0===i?void 0:i.map((function(t){return t.toLowerCase()})))&&void 0!==r?r:[],v=null!==(a=null===(e=n.data.aws_cognito_verification_mechanisms)||void 0===e?void 0:e.map((function(t){return t.toLowerCase()})))&&void 0!==a?a:[],f=null!==(c=null===(s=n.data.aws_cognito_signup_attributes)||void 0===s?void 0:s.map((function(t){return t.toLowerCase()})))&&void 0!==c?c:[],A=null!==(d=null===(u=n.data.aws_cognito_social_providers)||void 0===u?void 0:u.map((function(t){return t.toLowerCase()})))&&void 0!==d?d:[],w=n.data.aws_cognito_password_protection_settings||{};0===g.length&&g.push("username");var S=t.config,m=S.loginMechanisms,h=S.signUpAttributes,D=S.socialProviders,I=S.initialState;return{loginMechanisms:null!=m?m:g,formFields:null!==(l=p(S.formFields))&&void 0!==l?l:{},passwordSettings:w,signUpAttributes:null!=h?h:Array.from(new Set(o(o([],v,!0),f,!0))),socialProviders:null!=D?D:A.sort(),initialState:I}}}),spawnSignInActor:e({actorRef:function(t,o){var n,i,r,e,s,c,d,l=t.services,g=u({services:l}).withContext({authAttributes:null!==(i=null===(n=t.actorDoneData)||void 0===n?void 0:n.authAttributes)&&void 0!==i?i:{},user:t.user,intent:null===(r=t.actorDoneData)||void 0===r?void 0:r.intent,country_code:"+1",formValues:{},touched:{},validationError:{},passwordSettings:null===(e=t.config)||void 0===e?void 0:e.passwordSettings,loginMechanisms:null===(s=t.config)||void 0===s?void 0:s.loginMechanisms,socialProviders:null===(c=t.config)||void 0===c?void 0:c.socialProviders,formFields:null===(d=t.config)||void 0===d?void 0:d.formFields});return a(g,{name:"signInActor"})}}),spawnSignUpActor:e({actorRef:function(t,o){var n,i,r,e,s,c,u,d=t.services,l=v({services:d}).withContext({authAttributes:null!==(i=null===(n=t.actorDoneData)||void 0===n?void 0:n.authAttributes)&&void 0!==i?i:{},country_code:"+1",intent:null===(r=t.actorDoneData)||void 0===r?void 0:r.intent,formValues:{},touched:{},validationError:{},loginMechanisms:null===(e=t.config)||void 0===e?void 0:e.loginMechanisms,socialProviders:null===(s=t.config)||void 0===s?void 0:s.socialProviders,formFields:null===(c=t.config)||void 0===c?void 0:c.formFields,passwordSettings:null===(u=t.config)||void 0===u?void 0:u.passwordSettings});return a(l,{name:"signUpActor"})}}),spawnResetPasswordActor:e({actorRef:function(t,o){var n,i,r,e,s,c=t.services,u=l({services:c}).withContext({formValues:{},touched:{},intent:null===(n=t.actorDoneData)||void 0===n?void 0:n.intent,username:null===(r=null===(i=t.actorDoneData)||void 0===i?void 0:i.authAttributes)||void 0===r?void 0:r.username,formFields:null===(e=t.config)||void 0===e?void 0:e.formFields,validationError:{},passwordSettings:null===(s=t.config)||void 0===s?void 0:s.passwordSettings});return a(u,{name:"resetPasswordActor"})}}),spawnSignOutActor:e({actorRef:function(t){var o=d.withContext({user:t.user});return a(o,{name:"signOutActor"})}}),stopSignInActor:c("signInActor"),stopSignUpActor:c("signUpActor"),stopResetPasswordActor:c("resetPasswordActor"),stopSignOutActor:c("signOutActor"),configure:e((function(o,i){var r=i.data,e=r.services,a=n(r,["services"]);return{services:t(t({},g),e),config:a}})),setHasSetup:e({hasSetup:!0})},guards:{isInitialStateSignUp:function(t){return"signUp"===t.config.initialState},isInitialStateResetPassword:function(t){return"resetPassword"===t.config.initialState},shouldRedirectToSignUp:function(t,o){var n;return"confirmSignUp"===(null===(n=o.data)||void 0===n?void 0:n.intent)},shouldRedirectToResetPassword:function(t,o){var n;return"confirmPasswordReset"===(null===(n=o.data)||void 0===n?void 0:n.intent)},shouldAutoSignIn:function(t,o){var n,i;return"autoSignIn"===(null===(n=o.data)||void 0===n?void 0:n.intent)||"autoSignInSubmit"===(null===(i=o.data)||void 0===i?void 0:i.intent)},shouldSetup:function(t){return!1===t.hasSetup},hasActor:function(t){return!!t.actorRef}},services:{getCurrentUser:function(t,o){return t.services.getCurrentUser()},getAmplifyConfig:function(t,o){return t.services.getAmplifyConfig()}}})}function p(t){return t&&Object.keys(t).forEach((function(o){Object.keys(t[o]).forEach((function(n){var i=t[o][n];i.required=i.isRequired}))})),t}export{f as createAuthenticatorMachine};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as n}from"tslib";import{Auth as t}from"aws-amplify";import r from"lodash/get";import i from"lodash/pickBy";import{createMachine as a,sendUpdate as s,assign as o}from"xstate";import{runValidators as d}from"../../validators/index.js";import{clearError as c,clearFormValues as u,clearTouched as l,clearValidationError as m,handleInput as p,handleSubmit as g,handleBlur as f,parsePhoneNumber as v,setCredentials as U,setFieldErrors as h,setRemoteError as S,setCodeDeliveryDetails as E,setUser as I}from"./actions.js";function y(y){var C=y.services;return a({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{target:"confirmSignUp",cond:"shouldInitConfirmSignUp"},{target:"signUp"}]},signUp:{type:"parallel",exit:["clearError","clearFormValues","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},FEDERATED_SIGN_IN:"federatedSignIn"}},federatedSignIn:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"federatedSignIn",onDone:"#signUpActor.resolved",onError:{actions:"setRemoteError"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},pending:{tags:["pending"],entry:["parsePhoneNumber","sendUpdate","clearError"],invoke:{src:"signUp",onDone:[{cond:"shouldSkipConfirm",target:"skipConfirm",actions:["setUser","setCredentials"]},{target:"resolved",actions:["setUser","setCredentials","setCodeDeliveryDetails"]}],onError:{target:"idle",actions:"setRemoteError"}}},skipConfirm:{always:{target:"#signUpActor.resolved",actions:"setAutoSignInIntent"}},resolved:{type:"final",always:"#signUpActor.confirmSignUp"}}}}},confirmSignUp:{initial:"edit",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"resend"}},resend:{tags:["pending"],entry:"sendUpdate",invoke:{src:"resendConfirmationCode",onDone:{target:"edit"},onError:[{target:"#signUpActor.resolved",actions:"setAutoSignInIntent",cond:"isUserAlreadyConfirmed"},{target:"edit",actions:"setRemoteError"}]}},submit:{tags:["pending"],entry:["sendUpdate","clearError"],invoke:{src:"confirmSignUp",onDone:{target:"#signUpActor.resolved",actions:"setAutoSignInIntent"},onError:{target:"edit",actions:"setRemoteError"}}}}},resolved:{type:"final",data:function(e,n){var t=e.authAttributes,i=t.username,a=t.password;return{user:r(n,"data.user")||e.user,authAttributes:{username:i,password:a},intent:e.intent}}}}},{guards:{isUserAlreadyConfirmed:function(e,n){return"User is already confirmed."===n.data.message},shouldInitConfirmSignUp:function(e){return e.intent&&"confirmSignUp"===e.intent},shouldSkipConfirm:function(e,n){return n.data.userConfirmed}},actions:{clearError:c,clearFormValues:u,clearTouched:l,clearValidationError:m,handleInput:p,handleSubmit:g,handleBlur:f,parsePhoneNumber:v,setCredentials:U,setFieldErrors:h,setRemoteError:S,setCodeDeliveryDetails:E,setUser:I,sendUpdate:s(),setAutoSignInIntent:o({intent:function(e){return"confirmSignUp"===(null==e?void 0:e.intent)?"autoSignInSubmit":"autoSignIn"}})},services:{confirmSignUp:function(t,i){return e(this,void 0,void 0,(function(){var e,i,a,s,o;return n(this,(function(n){switch(n.label){case 0:return e=t.user,i=t.authAttributes,a=t.formValues,s=a.confirmation_code,o=r(e,"username")||r(i,"username"),[4,C.handleConfirmSignUp({username:o,code:s})];case 1:return[2,n.sent()]}}))}))},resendConfirmationCode:function(i,a){return e(this,void 0,void 0,(function(){var e,a,s;return n(this,(function(n){return e=i.user,a=i.authAttributes,s=r(e,"username")||r(a,"username"),[2,t.resendSignUp(s)]}))}))},federatedSignIn:function(r,i){return e(this,void 0,void 0,(function(){var e;return n(this,(function(n){switch(n.label){case 0:return e=i.data.provider,[4,t.federatedSignIn({provider:e})];case 1:return[2,n.sent()]}}))}))},signUp:function(t,r){return e(this,void 0,void 0,(function(){var e,r,a,s,o,d,c;return n(this,(function(n){switch(n.label){case 0:return e=t.formValues,r=t.loginMechanisms,a=r[0],o=(s=e)[void 0===a?"username":a],d=s.password,c=i(e,(function(e,n){switch(n){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return n.startsWith("custom:")}})),[4,C.handleSignUp({username:o,password:d,attributes:c})];case 1:return[2,n.sent()]}}))}))},validateSignUp:function(t,r){return e(this,void 0,void 0,(function(){return n(this,(function(e){return[2,d(t.formValues,t.touched,t.passwordSettings,[C.validateFormPassword,C.validateConfirmPassword,C.validatePreferredUsername,C.validateCustomSignUp])]}))}))}}})}export{y as createSignUpMachine};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import t from"style-dictionary/lib/utils/deepExtend";import e from"style-dictionary/lib/utils/flattenProperties";import{defaultTheme as o}from"./defaultTheme.js";import{setupTokens as a,cssNameTransform as c,cssValue as r}from"./utils.js";var i=function(n){var t=n.token,e=n.path,o="--".concat(c({path:e})),a=t.value,i=r(t);return{name:o,original:a,path:e,value:i,toString:function(){return"var(".concat(o,")")}}};function m(c,r){void 0===r&&(r=o);var m=t([{},r,c]),s=a({tokens:m.tokens,setupToken:i}),l=m.breakpoints,p=m.name,d='[data-amplify-theme="'.concat(p,'"] {\n')+e(s).map((function(n){return"".concat(n.name,": ").concat(n.value,";")})).join("\n")+"\n}\n",u=[];return m.overrides&&(u=m.overrides.map((function(t){var o=a({tokens:t.tokens,setupToken:i}),c=e(o).map((function(n){return"".concat(n.name,": ").concat(n.value,";")})).join("\n");if("selector"in t&&(d+="\n".concat(t.selector," {\n").concat(c,"\n}\n")),"mediaQuery"in t&&(d+="\n@media (".concat(t.mediaQuery,') {\n [data-amplify-theme="').concat(p,'"] {\n ').concat(c,"\n }\n}\n")),"breakpoint"in t){var r=m.breakpoints.values[t.breakpoint];d+="\n@media (min-width: ".concat(r,'px) {\n [data-amplify-theme="').concat(p,'"] {\n ').concat(c,"\n }\n}\n")}return"colorMode"in t&&(d+="\n@media (prefers-color-scheme: ".concat(t.colorMode,') {\n [data-amplify-theme="').concat(p,'"][data-amplify-color-mode="system"] {\n').concat(c,"\n}\n }\n"),d+='\n[data-amplify-theme="'.concat(p,'"][data-amplify-color-mode="').concat(t.colorMode,'"] {\n').concat(c,"\n}\n")),n(n({},t),{tokens:o})}))),{tokens:s,breakpoints:l,name:p,cssText:d,overrides:u}}export{m as createTheme};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as o}from"tslib";import{tokens as r}from"./tokens/index.js";var l={colors:{red:{10:r.colors.red[100],20:r.colors.red[90],40:r.colors.red[80],80:r.colors.red[40],90:r.colors.red[20],100:r.colors.red[10]},orange:{10:r.colors.orange[100],20:r.colors.orange[90],40:r.colors.orange[80],80:r.colors.orange[40],90:r.colors.orange[20],100:r.colors.orange[10]},yellow:{10:r.colors.yellow[100],20:r.colors.yellow[90],40:r.colors.yellow[80],80:r.colors.yellow[40],90:r.colors.yellow[20],100:r.colors.yellow[10]},green:{10:r.colors.green[100],20:r.colors.green[90],40:r.colors.green[80],80:r.colors.green[40],90:r.colors.green[20],100:r.colors.green[10]},teal:{10:r.colors.teal[100],20:r.colors.teal[90],40:r.colors.teal[80],80:r.colors.teal[40],90:r.colors.teal[20],100:r.colors.teal[10]},blue:{10:r.colors.blue[100],20:r.colors.blue[90],40:r.colors.blue[80],80:r.colors.blue[40],90:r.colors.blue[20],100:r.colors.blue[10]},purple:{10:r.colors.purple[100],20:r.colors.purple[90],40:r.colors.purple[80],80:r.colors.purple[40],90:r.colors.purple[20],100:r.colors.purple[10]},pink:{10:r.colors.pink[100],20:r.colors.pink[90],40:r.colors.pink[80],80:r.colors.pink[40],90:r.colors.pink[20],100:r.colors.pink[10]},neutral:{10:r.colors.neutral[100],20:r.colors.neutral[90],40:r.colors.neutral[80],80:r.colors.neutral[40],90:r.colors.neutral[20],100:r.colors.neutral[10]},font:{primary:"{colors.white}",secondary:"{colors.neutral.100}",tertiary:"{colors.neutral.90}",inverse:"{colors.neutral.10}"},background:{primary:"{colors.neutral.10}",secondary:"{colors.neutral.20}",tertiary:"{colors.neutral.40}"},border:{primary:"{colors.neutral.60}",secondary:"{colors.neutral.40}",tertiary:"{colors.neutral.20}"},overlay:{10:"hsla(0, 0%, 100%, 0.1)",20:"hsla(0, 0%, 100%, 0.2)",30:"hsla(0, 0%, 100%, 0.3)",40:"hsla(0, 0%, 100%, 0.4)",50:"hsla(0, 0%, 100%, 0.5)",60:"hsla(0, 0%, 100%, 0.6)",70:"hsla(0, 0%, 100%, 0.7)",80:"hsla(0, 0%, 100%, 0.8)",90:"hsla(0, 0%, 100%, 0.9)"}}},e={colorMode:"dark",tokens:l},s=o({},l);export{e as defaultDarkModeOverride,s as reactNativeDarkTokens};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{tokens as e}from"./tokens/index.js";import{breakpoints as o}from"./breakpoints.js";var t={tokens:e,breakpoints:o,name:"default-theme"};export{t as defaultTheme};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{alert as o}from"./alert.js";import{autocomplete as r}from"./autocomplete.js";import{authenticator as i}from"./authenticator.js";import{badge as e}from"./badge.js";import{button as t}from"./button.js";import{card as m}from"./card.js";import{checkbox as p}from"./checkbox.js";import{checkboxfield as s}from"./checkboxField.js";import{collection as f}from"./collection.js";import{copy as l}from"./copy.js";import{dialcodeselect as d}from"./dialCodeSelect.js";import{divider as a}from"./divider.js";import{expander as j}from"./expander.js";import{field as c}from"./field.js";import{fieldcontrol as n}from"./fieldControl.js";import{fieldgroup as g}from"./fieldGroup.js";import{fieldmessages as h}from"./fieldMessages.js";import{fileuploader as u}from"./fileUploader.js";import{flex as b}from"./flex.js";import{heading as x}from"./heading.js";import{highlightmatch as F}from"./highlightMatch.js";import{icon as k}from"./icon.js";import{image as w}from"./image.js";import{inappmessaging as v}from"./inAppMessaging.js";import{link as y}from"./link.js";import{loader as G}from"./loader.js";import{menu as M}from"./menu.js";import{pagination as A}from"./pagination.js";import{passwordfield as B}from"./passwordField.js";import{phonenumberfield as C}from"./phoneNumberField.js";import{placeholder as N}from"./placeholder.js";import{radio as S}from"./radio.js";import{radiogroup as U}from"./radioGroup.js";import{rating as q}from"./rating.js";import{searchfield as z}from"./searchField.js";import{select as D}from"./select.js";import{selectfield as E}from"./selectField.js";import{sliderfield as H}from"./sliderField.js";import{stepperfield as I}from"./stepperField.js";import{switchfield as J}from"./switchField.js";import{table as K}from"./table.js";import{tabs as L}from"./tabs.js";import{text as O}from"./text.js";import{textareafield as P}from"./textAreaField.js";import{textfield as Q}from"./textField.js";import{togglebutton as R}from"./toggleButton.js";import{togglebuttongroup as T}from"./toggleButtonGroup.js";var V={alert:o,authenticator:i,autocomplete:r,badge:e,button:t,card:m,checkbox:p,checkboxfield:s,collection:f,copy:l,countrycodeselect:d,divider:a,expander:j,field:c,fieldcontrol:n,fieldgroup:g,fieldmessages:h,fileuploader:u,flex:b,heading:x,icon:k,highlightmatch:F,image:w,inappmessaging:v,link:y,loader:G,menu:M,pagination:A,passwordfield:B,phonenumberfield:C,placeholder:N,radio:S,radiogroup:U,rating:q,searchfield:z,select:D,selectfield:E,sliderfield:H,stepperfield:I,switchfield:J,table:K,tabs:L,text:O,textareafield:P,textfield:Q,togglebutton:R,togglebuttongroup:T};export{V as components};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{borderWidths as s}from"./borderWidths.js";import{colors as o}from"./colors.js";import{components as i}from"./components/index.js";import{fonts as r}from"./fonts.js";import{fontSizes as t}from"./fontSizes.js";import{fontWeights as m}from"./fontWeights.js";import{lineHeights as e}from"./lineHeights.js";import{opacities as x}from"./opacities.js";import{outlineOffsets as l}from"./outlineOffsets.js";import{outlineWidths as f}from"./outlineWidths.js";import{radii as p}from"./radii.js";import{shadows as a}from"./shadows.js";import{space as n}from"./space.js";import{time as d}from"./time.js";import{transforms as j}from"./transforms.js";var h={components:i,borderWidths:s,colors:o,fonts:r,fontSizes:t,fontWeights:m,lineHeights:e,opacities:x,outlineOffsets:l,outlineWidths:f,radii:p,shadows:a,space:n,time:d,transforms:j},c={colors:o,borderWidths:s,fontSizes:{xxs:t.xxs,xs:t.xs,small:t.small,medium:t.medium,large:t.large,xl:t.xl,xxl:t.xxl,xxxl:t.xxxl},fontWeights:m,opacities:x,space:{xxs:n.xxxs,xs:n.xs,small:n.small,medium:n.medium,large:n.large,xl:n.xl,xxl:n.xxl,xxxl:n.xxxl},radii:p,time:d};export{c as reactNativeTokens,h as tokens};
|
package/dist/esm/theme/utils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__spreadArray as r}from"tslib";import t from"lodash/has";import e from"lodash/isObject";import o from"lodash/isString";import n from"lodash/kebabCase";import a from"style-dictionary/lib/utils/references/usesReference";var i="amplify",u=["offsetX","offsetY","blurRadius","spreadRadius","color"];function f(r){if(!r)return"";if(a(r)){var t=r.replace(/\{|\}/g,"").replace(".value","").split(".");return"var(--".concat(p({path:t}),")")}return r}function s(r){var t=r.value;return o(t)?f(t):l(t)?u.map((function(e){return f(l(r)?r[e]:t[e])})).join(" "):t}function p(t){var e=t.path;return"".concat(n(r(["amplify"],void 0===e?[]:e,!0).join(" ")))}function c(r){return e(r)&&t(r,"value")}function l(r){return e(r)&&t(r,"offsetX")}function v(r){var o=r.tokens,n=r.path,a=void 0===n?[]:n,i=r.setupToken;if(t(o,"value"))return i({token:o,path:a});var u={};for(var f in o)if(t(o,f)){var s=o[f],p=e(s)?s:{value:s};u[f]=v({tokens:p,path:a.concat(f),setupToken:i})}return u}export{i as CSS_VARIABLE_PREFIX,p as cssNameTransform,s as cssValue,c as isDesignToken,l as isShadowToken,v as setupTokens};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__spreadArray as e}from"tslib";var r=["birthdate","email","family_name","given_name","middle_name","name","nickname","phone_number","preferred_username","profile","website"],a=["address","gender","locale","picture","updated_at","zoneinfo"],n=["username","email","phone_number"],m=e(e(e([],n,!0),r,!0),["confirmation_code","password","confirm_password"],!1);export{n as LoginMechanismArray,m as authFieldsWithDefaults,r as signUpFieldsWithDefault,a as signUpFieldsWithoutDefault};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{UnverifiedContactMethodType as r}from"./user.js";var n=function(n){return Object.values(r).findIndex((function(r){return r===n}))>=0};export{n as isUnverifiedContactMethodType};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as r,__generator as o,__spreadArray as e}from"tslib";import t from"lodash/isEmpty";import i from"lodash/merge";var n=function(n,s,m,a){return r(void 0,void 0,void 0,(function(){var r,l;return o(this,(function(o){switch(o.label){case 0:return[4,Promise.all(a.map((function(r){return r(n,s,m)})))];case 1:return r=o.sent(),l=i.apply(void 0,e([{}],r,!1)),t(l)?[2,Promise.resolve()]:[2,Promise.reject(l)]}}))}))};export{n as runValidators};
|