@aws-amplify/ui 6.7.1 → 6.8.0
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/dictionaries/authenticator/zh.mjs +2 -0
- package/dist/esm/theme/defaultDarkModeOverride.mjs +5 -0
- package/dist/esm/utils/setUserAgent/constants.mjs +13 -1
- package/dist/esm/utils/setUserAgent/setUserAgent.mjs +8 -1
- package/dist/esm/utils/utils.mjs +2 -0
- package/dist/index.js +28 -0
- package/dist/types/utils/setUserAgent/constants.d.ts +1 -0
- package/dist/types/utils/setUserAgent/setUserAgent.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +2 -0
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ const zhDict = {
|
|
|
18
18
|
Email: '邮箱',
|
|
19
19
|
'Enter your code': '输入验证码',
|
|
20
20
|
'Enter your Email': '输入电子邮件',
|
|
21
|
+
'Enter your Password': '输入密码',
|
|
21
22
|
'Enter your phone number': '输入电话号码',
|
|
22
23
|
'Enter your username': '输入用户名',
|
|
23
24
|
'Forgot your password?': '忘记密码了?',
|
|
@@ -28,6 +29,7 @@ const zhDict = {
|
|
|
28
29
|
or: '或者',
|
|
29
30
|
Password: '密码',
|
|
30
31
|
'Phone Number': '电话',
|
|
32
|
+
'Please confirm your Password': '请再次输入密码',
|
|
31
33
|
'Resend Code': '重发验证码',
|
|
32
34
|
'Reset your password': '重置密码',
|
|
33
35
|
'Reset your Password': '重置密码',
|
|
@@ -99,6 +99,11 @@ const darkModeTokens = {
|
|
|
99
99
|
secondary: '{colors.neutral.40}',
|
|
100
100
|
tertiary: '{colors.neutral.20}',
|
|
101
101
|
},
|
|
102
|
+
shadow: {
|
|
103
|
+
primary: { value: 'hsla(100, 100%, 100%, 0.25)' },
|
|
104
|
+
secondary: { value: 'hsla(100, 100%, 100%, 0.15)' },
|
|
105
|
+
tertiary: { value: 'hsla(100, 100%, 100%, 0.05)' },
|
|
106
|
+
},
|
|
102
107
|
overlay: {
|
|
103
108
|
5: 'hsla(0, 0%, 100%, 0.05)',
|
|
104
109
|
10: 'hsla(0, 0%, 100%, 0.1)',
|
|
@@ -55,5 +55,17 @@ const STORAGE_MANAGER_INPUT_BASE = {
|
|
|
55
55
|
apis: [StorageAction.UploadData],
|
|
56
56
|
category: Category.Storage,
|
|
57
57
|
};
|
|
58
|
+
const STORAGE_BROWSER_INPUT_BASE = {
|
|
59
|
+
apis: [
|
|
60
|
+
StorageAction.UploadData,
|
|
61
|
+
StorageAction.Copy,
|
|
62
|
+
StorageAction.GetUrl,
|
|
63
|
+
StorageAction.List,
|
|
64
|
+
StorageAction.Remove,
|
|
65
|
+
StorageAction.GetDataAccess,
|
|
66
|
+
StorageAction.ListCallerAccessGrants,
|
|
67
|
+
],
|
|
68
|
+
category: Category.Storage,
|
|
69
|
+
};
|
|
58
70
|
|
|
59
|
-
export { ACCOUNT_SETTINGS_INPUT_BASE, AI_INPUT_BASE, AUTHENTICATOR_INPUT_BASE, FILE_UPLOADER_BASE_INPUT, IN_APP_MESSAGING_INPUT_BASE, LOCATION_SEARCH_INPUT_BASE, MAP_VIEW_INPUT_BASE, STORAGE_MANAGER_INPUT_BASE };
|
|
71
|
+
export { ACCOUNT_SETTINGS_INPUT_BASE, AI_INPUT_BASE, AUTHENTICATOR_INPUT_BASE, FILE_UPLOADER_BASE_INPUT, IN_APP_MESSAGING_INPUT_BASE, LOCATION_SEARCH_INPUT_BASE, MAP_VIEW_INPUT_BASE, STORAGE_BROWSER_INPUT_BASE, STORAGE_MANAGER_INPUT_BASE };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setCustomUserAgent } from '@aws-amplify/core/internals/utils';
|
|
2
|
-
import { STORAGE_MANAGER_INPUT_BASE, MAP_VIEW_INPUT_BASE, LOCATION_SEARCH_INPUT_BASE, IN_APP_MESSAGING_INPUT_BASE, FILE_UPLOADER_BASE_INPUT, ACCOUNT_SETTINGS_INPUT_BASE, AUTHENTICATOR_INPUT_BASE, AI_INPUT_BASE } from './constants.mjs';
|
|
2
|
+
import { STORAGE_BROWSER_INPUT_BASE, STORAGE_MANAGER_INPUT_BASE, MAP_VIEW_INPUT_BASE, LOCATION_SEARCH_INPUT_BASE, IN_APP_MESSAGING_INPUT_BASE, FILE_UPLOADER_BASE_INPUT, ACCOUNT_SETTINGS_INPUT_BASE, AUTHENTICATOR_INPUT_BASE, AI_INPUT_BASE } from './constants.mjs';
|
|
3
3
|
import { noop } from '../utils.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -72,6 +72,13 @@ const setUserAgent = ({ componentName, packageName, version, }) => {
|
|
|
72
72
|
});
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
|
+
case 'StorageBrowser': {
|
|
76
|
+
setCustomUserAgent({
|
|
77
|
+
...STORAGE_BROWSER_INPUT_BASE,
|
|
78
|
+
additionalDetails: [[componentName], packageData],
|
|
79
|
+
});
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
75
82
|
}
|
|
76
83
|
return noop;
|
|
77
84
|
};
|
package/dist/esm/utils/utils.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @deprecated - will be removed in a future major version
|
|
3
|
+
*
|
|
2
4
|
* Some libraries may not follow Node ES module spec and could be loaded as CommonJS modules,
|
|
3
5
|
* To ensure the interoperability between ESM and CJS, modules from those libraries have to be loaded via namespace import
|
|
4
6
|
* And sanitized by the function below because unlike ESM namespace, CJS namespace set `module.exports` object on the `default` key
|
package/dist/index.js
CHANGED
|
@@ -91,8 +91,22 @@ const STORAGE_MANAGER_INPUT_BASE = {
|
|
|
91
91
|
apis: [utils.StorageAction.UploadData],
|
|
92
92
|
category: utils.Category.Storage,
|
|
93
93
|
};
|
|
94
|
+
const STORAGE_BROWSER_INPUT_BASE = {
|
|
95
|
+
apis: [
|
|
96
|
+
utils.StorageAction.UploadData,
|
|
97
|
+
utils.StorageAction.Copy,
|
|
98
|
+
utils.StorageAction.GetUrl,
|
|
99
|
+
utils.StorageAction.List,
|
|
100
|
+
utils.StorageAction.Remove,
|
|
101
|
+
utils.StorageAction.GetDataAccess,
|
|
102
|
+
utils.StorageAction.ListCallerAccessGrants,
|
|
103
|
+
],
|
|
104
|
+
category: utils.Category.Storage,
|
|
105
|
+
};
|
|
94
106
|
|
|
95
107
|
/**
|
|
108
|
+
* @deprecated - will be removed in a future major version
|
|
109
|
+
*
|
|
96
110
|
* Some libraries may not follow Node ES module spec and could be loaded as CommonJS modules,
|
|
97
111
|
* To ensure the interoperability between ESM and CJS, modules from those libraries have to be loaded via namespace import
|
|
98
112
|
* And sanitized by the function below because unlike ESM namespace, CJS namespace set `module.exports` object on the `default` key
|
|
@@ -416,6 +430,13 @@ const setUserAgent = ({ componentName, packageName, version, }) => {
|
|
|
416
430
|
});
|
|
417
431
|
break;
|
|
418
432
|
}
|
|
433
|
+
case 'StorageBrowser': {
|
|
434
|
+
utils.setCustomUserAgent({
|
|
435
|
+
...STORAGE_BROWSER_INPUT_BASE,
|
|
436
|
+
additionalDetails: [[componentName], packageData],
|
|
437
|
+
});
|
|
438
|
+
break;
|
|
439
|
+
}
|
|
419
440
|
}
|
|
420
441
|
return noop;
|
|
421
442
|
};
|
|
@@ -1795,6 +1816,7 @@ const zhDict$1 = {
|
|
|
1795
1816
|
Email: '邮箱',
|
|
1796
1817
|
'Enter your code': '输入验证码',
|
|
1797
1818
|
'Enter your Email': '输入电子邮件',
|
|
1819
|
+
'Enter your Password': '输入密码',
|
|
1798
1820
|
'Enter your phone number': '输入电话号码',
|
|
1799
1821
|
'Enter your username': '输入用户名',
|
|
1800
1822
|
'Forgot your password?': '忘记密码了?',
|
|
@@ -1805,6 +1827,7 @@ const zhDict$1 = {
|
|
|
1805
1827
|
or: '或者',
|
|
1806
1828
|
Password: '密码',
|
|
1807
1829
|
'Phone Number': '电话',
|
|
1830
|
+
'Please confirm your Password': '请再次输入密码',
|
|
1808
1831
|
'Resend Code': '重发验证码',
|
|
1809
1832
|
'Reset your password': '重置密码',
|
|
1810
1833
|
'Reset your Password': '重置密码',
|
|
@@ -9430,6 +9453,11 @@ const darkModeTokens = {
|
|
|
9430
9453
|
secondary: '{colors.neutral.40}',
|
|
9431
9454
|
tertiary: '{colors.neutral.20}',
|
|
9432
9455
|
},
|
|
9456
|
+
shadow: {
|
|
9457
|
+
primary: { value: 'hsla(100, 100%, 100%, 0.25)' },
|
|
9458
|
+
secondary: { value: 'hsla(100, 100%, 100%, 0.15)' },
|
|
9459
|
+
tertiary: { value: 'hsla(100, 100%, 100%, 0.05)' },
|
|
9460
|
+
},
|
|
9433
9461
|
overlay: {
|
|
9434
9462
|
5: 'hsla(0, 0%, 100%, 0.05)',
|
|
9435
9463
|
10: 'hsla(0, 0%, 100%, 0.1)',
|
|
@@ -7,3 +7,4 @@ export declare const IN_APP_MESSAGING_INPUT_BASE: Omit<InAppMessagingUserAgentIn
|
|
|
7
7
|
export declare const LOCATION_SEARCH_INPUT_BASE: Omit<GeoUserAgentInput, 'additionalDetails'>;
|
|
8
8
|
export declare const MAP_VIEW_INPUT_BASE: Omit<GeoUserAgentInput, 'additionalDetails'>;
|
|
9
9
|
export declare const STORAGE_MANAGER_INPUT_BASE: Omit<StorageUserAgentInput, 'additionalDetails'>;
|
|
10
|
+
export declare const STORAGE_BROWSER_INPUT_BASE: Omit<StorageUserAgentInput, 'additionalDetails'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type PackageName = 'angular' | 'react' | 'react-ai' | 'react-auth' | 'react-geo' | 'react-liveness' | 'react-native' | 'react-native-auth' | 'react-notifications' | 'react-storage' | 'vue';
|
|
2
|
-
export type ComponentName = 'AIConversation' | 'Authenticator' | 'ChangePassword' | 'DeleteUser' | 'FaceLivenessDetector' | 'FileUploader' | 'InAppMessaging' | 'LocationSearch' | 'MapView' | 'StorageManager' | 'StorageImage';
|
|
2
|
+
export type ComponentName = 'AIConversation' | 'Authenticator' | 'ChangePassword' | 'DeleteUser' | 'FaceLivenessDetector' | 'FileUploader' | 'InAppMessaging' | 'LocationSearch' | 'MapView' | 'StorageBrowser' | 'StorageManager' | 'StorageImage';
|
|
3
3
|
export type Version = `${string}.${string}.${string}`;
|
|
4
4
|
export interface SetUserAgentOptions {
|
|
5
5
|
componentName: ComponentName;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Modifiers } from '../types';
|
|
2
2
|
/**
|
|
3
|
+
* @deprecated - will be removed in a future major version
|
|
4
|
+
*
|
|
3
5
|
* Some libraries may not follow Node ES module spec and could be loaded as CommonJS modules,
|
|
4
6
|
* To ensure the interoperability between ESM and CJS, modules from those libraries have to be loaded via namespace import
|
|
5
7
|
* And sanitized by the function below because unlike ESM namespace, CJS namespace set `module.exports` object on the `default` key
|