@aws-amplify/ui 6.2.0 → 6.3.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/types/primitives/componentClassName.mjs +19 -0
- package/dist/esm/utils/setUserAgent/constants.mjs +6 -2
- package/dist/esm/utils/setUserAgent/setUserAgent.mjs +8 -1
- package/dist/index.js +30 -0
- package/dist/types/theme/components/fileUploader.d.ts +20 -0
- package/dist/types/types/primitives/componentClassName.d.ts +19 -0
- package/dist/types/utils/setUserAgent/constants.d.ts +1 -0
- package/dist/types/utils/setUserAgent/setUserAgent.d.ts +1 -1
- package/package.json +1 -1
|
@@ -59,6 +59,25 @@ const ComponentClassName = {
|
|
|
59
59
|
FieldGroupFieldWrapper: 'amplify-field-group__field-wrapper',
|
|
60
60
|
Fieldset: 'amplify-fieldset',
|
|
61
61
|
FieldsetLegend: 'amplify-fieldset__legend',
|
|
62
|
+
FileUploader: 'amplify-fileuploader',
|
|
63
|
+
FileUploaderDropZone: 'amplify-fileuploader__dropzone',
|
|
64
|
+
FileUploaderDropZoneIcon: 'amplify-fileuploader__dropzone__icon',
|
|
65
|
+
FileUploaderDropZoneText: 'amplify-fileuploader__dropzone__text',
|
|
66
|
+
FileUploaderFilePicker: 'amplify-fileuploader__file__picker',
|
|
67
|
+
FileUploaderFile: 'amplify-fileuploader__file',
|
|
68
|
+
FileUploaderFileWrapper: 'amplify-fileuploader__file__wrapper',
|
|
69
|
+
FileUploaderFileList: 'amplify-fileuploader__file__list',
|
|
70
|
+
FileUploaderFileName: 'amplify-fileuploader__file__name',
|
|
71
|
+
FileUploaderFileSize: 'amplify-fileuploader__file__size',
|
|
72
|
+
FileUploaderFileInfo: 'amplify-fileuploader__file__info',
|
|
73
|
+
FileUploaderFileImage: 'amplify-fileuploader__file__image',
|
|
74
|
+
FileUploaderFileMain: 'amplify-fileuploader__file__main',
|
|
75
|
+
FileUploaderFileStatus: 'amplify-fileuploader__file__status',
|
|
76
|
+
FileUploaderLoader: 'amplify-fileuploader__loader',
|
|
77
|
+
FileUploaderPreviewer: 'amplify-fileuploader__previewer',
|
|
78
|
+
FileUploaderPreviewerText: 'amplify-fileuploader__previewer__text',
|
|
79
|
+
FileUploaderPreviewerActions: 'amplify-fileuploader__previewer__actions',
|
|
80
|
+
FileUploaderPreviewerFooter: 'amplify-fileuploader__previewer__footer',
|
|
62
81
|
Flex: 'amplify-flex',
|
|
63
82
|
Grid: 'amplify-grid',
|
|
64
83
|
Heading: 'amplify-heading',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthAction, Category, InAppMessagingAction, GeoAction
|
|
1
|
+
import { AuthAction, Category, StorageAction, InAppMessagingAction, GeoAction } from '@aws-amplify/core/internals/utils';
|
|
2
2
|
|
|
3
3
|
const ACCOUNT_SETTINGS_INPUT_BASE = {
|
|
4
4
|
apis: [AuthAction.DeleteUser, AuthAction.UpdatePassword],
|
|
@@ -19,6 +19,10 @@ const AUTHENTICATOR_INPUT_BASE = {
|
|
|
19
19
|
],
|
|
20
20
|
category: Category.Auth,
|
|
21
21
|
};
|
|
22
|
+
const FILE_UPLOADER_BASE_INPUT = {
|
|
23
|
+
apis: [StorageAction.UploadData],
|
|
24
|
+
category: Category.Storage,
|
|
25
|
+
};
|
|
22
26
|
const IN_APP_MESSAGING_INPUT_BASE = {
|
|
23
27
|
apis: [InAppMessagingAction.NotifyMessageInteraction],
|
|
24
28
|
category: Category.InAppMessaging,
|
|
@@ -40,4 +44,4 @@ const STORAGE_MANAGER_INPUT_BASE = {
|
|
|
40
44
|
category: Category.Storage,
|
|
41
45
|
};
|
|
42
46
|
|
|
43
|
-
export { ACCOUNT_SETTINGS_INPUT_BASE, AUTHENTICATOR_INPUT_BASE, IN_APP_MESSAGING_INPUT_BASE, LOCATION_SEARCH_INPUT_BASE, MAP_VIEW_INPUT_BASE, STORAGE_MANAGER_INPUT_BASE };
|
|
47
|
+
export { ACCOUNT_SETTINGS_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 };
|
|
@@ -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, ACCOUNT_SETTINGS_INPUT_BASE, AUTHENTICATOR_INPUT_BASE } from './constants.mjs';
|
|
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 } from './constants.mjs';
|
|
3
3
|
import { noop } from '../utils.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -30,6 +30,13 @@ const setUserAgent = ({ componentName, packageName, version, }) => {
|
|
|
30
30
|
});
|
|
31
31
|
break;
|
|
32
32
|
}
|
|
33
|
+
case 'FileUploader': {
|
|
34
|
+
setCustomUserAgent({
|
|
35
|
+
...FILE_UPLOADER_BASE_INPUT,
|
|
36
|
+
additionalDetails: [[componentName], packageData],
|
|
37
|
+
});
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
33
40
|
case 'InAppMessaging': {
|
|
34
41
|
setCustomUserAgent({
|
|
35
42
|
...IN_APP_MESSAGING_INPUT_BASE,
|
package/dist/index.js
CHANGED
|
@@ -55,6 +55,10 @@ const AUTHENTICATOR_INPUT_BASE = {
|
|
|
55
55
|
],
|
|
56
56
|
category: utils.Category.Auth,
|
|
57
57
|
};
|
|
58
|
+
const FILE_UPLOADER_BASE_INPUT = {
|
|
59
|
+
apis: [utils.StorageAction.UploadData],
|
|
60
|
+
category: utils.Category.Storage,
|
|
61
|
+
};
|
|
58
62
|
const IN_APP_MESSAGING_INPUT_BASE = {
|
|
59
63
|
apis: [utils.InAppMessagingAction.NotifyMessageInteraction],
|
|
60
64
|
category: utils.Category.InAppMessaging,
|
|
@@ -350,6 +354,13 @@ const setUserAgent = ({ componentName, packageName, version, }) => {
|
|
|
350
354
|
});
|
|
351
355
|
break;
|
|
352
356
|
}
|
|
357
|
+
case 'FileUploader': {
|
|
358
|
+
utils.setCustomUserAgent({
|
|
359
|
+
...FILE_UPLOADER_BASE_INPUT,
|
|
360
|
+
additionalDetails: [[componentName], packageData],
|
|
361
|
+
});
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
353
364
|
case 'InAppMessaging': {
|
|
354
365
|
utils.setCustomUserAgent({
|
|
355
366
|
...IN_APP_MESSAGING_INPUT_BASE,
|
|
@@ -2899,6 +2910,25 @@ const ComponentClassName = {
|
|
|
2899
2910
|
FieldGroupFieldWrapper: 'amplify-field-group__field-wrapper',
|
|
2900
2911
|
Fieldset: 'amplify-fieldset',
|
|
2901
2912
|
FieldsetLegend: 'amplify-fieldset__legend',
|
|
2913
|
+
FileUploader: 'amplify-fileuploader',
|
|
2914
|
+
FileUploaderDropZone: 'amplify-fileuploader__dropzone',
|
|
2915
|
+
FileUploaderDropZoneIcon: 'amplify-fileuploader__dropzone__icon',
|
|
2916
|
+
FileUploaderDropZoneText: 'amplify-fileuploader__dropzone__text',
|
|
2917
|
+
FileUploaderFilePicker: 'amplify-fileuploader__file__picker',
|
|
2918
|
+
FileUploaderFile: 'amplify-fileuploader__file',
|
|
2919
|
+
FileUploaderFileWrapper: 'amplify-fileuploader__file__wrapper',
|
|
2920
|
+
FileUploaderFileList: 'amplify-fileuploader__file__list',
|
|
2921
|
+
FileUploaderFileName: 'amplify-fileuploader__file__name',
|
|
2922
|
+
FileUploaderFileSize: 'amplify-fileuploader__file__size',
|
|
2923
|
+
FileUploaderFileInfo: 'amplify-fileuploader__file__info',
|
|
2924
|
+
FileUploaderFileImage: 'amplify-fileuploader__file__image',
|
|
2925
|
+
FileUploaderFileMain: 'amplify-fileuploader__file__main',
|
|
2926
|
+
FileUploaderFileStatus: 'amplify-fileuploader__file__status',
|
|
2927
|
+
FileUploaderLoader: 'amplify-fileuploader__loader',
|
|
2928
|
+
FileUploaderPreviewer: 'amplify-fileuploader__previewer',
|
|
2929
|
+
FileUploaderPreviewerText: 'amplify-fileuploader__previewer__text',
|
|
2930
|
+
FileUploaderPreviewerActions: 'amplify-fileuploader__previewer__actions',
|
|
2931
|
+
FileUploaderPreviewerFooter: 'amplify-fileuploader__previewer__footer',
|
|
2902
2932
|
Flex: 'amplify-flex',
|
|
2903
2933
|
Grid: 'amplify-grid',
|
|
2904
2934
|
Heading: 'amplify-heading',
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Modifiers, ComponentStyles, Elements, ColorTheme } from './utils';
|
|
2
|
+
export type FileUploaderTheme<Required extends boolean = false> = ComponentStyles & Modifiers<ColorTheme, Required> & Elements<{
|
|
3
|
+
dropzone?: ComponentStyles & Modifiers<'active' | 'small', Required>;
|
|
4
|
+
dropzone__icon?: ComponentStyles;
|
|
5
|
+
dropzone__text?: ComponentStyles;
|
|
6
|
+
file?: ComponentStyles;
|
|
7
|
+
file__picker?: ComponentStyles;
|
|
8
|
+
file__wrapper?: ComponentStyles;
|
|
9
|
+
file__name?: ComponentStyles;
|
|
10
|
+
file__size?: ComponentStyles;
|
|
11
|
+
file__list?: ComponentStyles;
|
|
12
|
+
file__main?: ComponentStyles;
|
|
13
|
+
file__image?: ComponentStyles;
|
|
14
|
+
file__status?: ComponentStyles & Modifiers<'error' | 'success', Required>;
|
|
15
|
+
loader?: ComponentStyles;
|
|
16
|
+
previewer?: ComponentStyles;
|
|
17
|
+
previewer__text?: ComponentStyles;
|
|
18
|
+
previewer__footer?: ComponentStyles;
|
|
19
|
+
previewer__actions?: ComponentStyles;
|
|
20
|
+
}, Required>;
|
|
@@ -59,6 +59,25 @@ export declare const ComponentClassName: {
|
|
|
59
59
|
readonly FieldGroupFieldWrapper: "amplify-field-group__field-wrapper";
|
|
60
60
|
readonly Fieldset: "amplify-fieldset";
|
|
61
61
|
readonly FieldsetLegend: "amplify-fieldset__legend";
|
|
62
|
+
readonly FileUploader: "amplify-fileuploader";
|
|
63
|
+
readonly FileUploaderDropZone: "amplify-fileuploader__dropzone";
|
|
64
|
+
readonly FileUploaderDropZoneIcon: "amplify-fileuploader__dropzone__icon";
|
|
65
|
+
readonly FileUploaderDropZoneText: "amplify-fileuploader__dropzone__text";
|
|
66
|
+
readonly FileUploaderFilePicker: "amplify-fileuploader__file__picker";
|
|
67
|
+
readonly FileUploaderFile: "amplify-fileuploader__file";
|
|
68
|
+
readonly FileUploaderFileWrapper: "amplify-fileuploader__file__wrapper";
|
|
69
|
+
readonly FileUploaderFileList: "amplify-fileuploader__file__list";
|
|
70
|
+
readonly FileUploaderFileName: "amplify-fileuploader__file__name";
|
|
71
|
+
readonly FileUploaderFileSize: "amplify-fileuploader__file__size";
|
|
72
|
+
readonly FileUploaderFileInfo: "amplify-fileuploader__file__info";
|
|
73
|
+
readonly FileUploaderFileImage: "amplify-fileuploader__file__image";
|
|
74
|
+
readonly FileUploaderFileMain: "amplify-fileuploader__file__main";
|
|
75
|
+
readonly FileUploaderFileStatus: "amplify-fileuploader__file__status";
|
|
76
|
+
readonly FileUploaderLoader: "amplify-fileuploader__loader";
|
|
77
|
+
readonly FileUploaderPreviewer: "amplify-fileuploader__previewer";
|
|
78
|
+
readonly FileUploaderPreviewerText: "amplify-fileuploader__previewer__text";
|
|
79
|
+
readonly FileUploaderPreviewerActions: "amplify-fileuploader__previewer__actions";
|
|
80
|
+
readonly FileUploaderPreviewerFooter: "amplify-fileuploader__previewer__footer";
|
|
62
81
|
readonly Flex: "amplify-flex";
|
|
63
82
|
readonly Grid: "amplify-grid";
|
|
64
83
|
readonly Heading: "amplify-heading";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AuthUserAgentInput, GeoUserAgentInput, InAppMessagingUserAgentInput, StorageUserAgentInput } from '@aws-amplify/core/internals/utils';
|
|
2
2
|
export declare const ACCOUNT_SETTINGS_INPUT_BASE: Omit<AuthUserAgentInput, 'additionalDetails'>;
|
|
3
3
|
export declare const AUTHENTICATOR_INPUT_BASE: Omit<AuthUserAgentInput, 'additionalDetails'>;
|
|
4
|
+
export declare const FILE_UPLOADER_BASE_INPUT: Omit<StorageUserAgentInput, 'additionalDetails'>;
|
|
4
5
|
export declare const IN_APP_MESSAGING_INPUT_BASE: Omit<InAppMessagingUserAgentInput, 'additionalDetails'>;
|
|
5
6
|
export declare const LOCATION_SEARCH_INPUT_BASE: Omit<GeoUserAgentInput, 'additionalDetails'>;
|
|
6
7
|
export declare const MAP_VIEW_INPUT_BASE: Omit<GeoUserAgentInput, 'additionalDetails'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type PackageName = 'angular' | 'react' | 'react-auth' | 'react-geo' | 'react-liveness' | 'react-native' | 'react-native-auth' | 'react-notifications' | 'react-storage' | 'vue';
|
|
2
|
-
export type ComponentName = 'Authenticator' | 'ChangePassword' | 'DeleteUser' | 'FaceLivenessDetector' | 'InAppMessaging' | 'LocationSearch' | 'MapView' | 'StorageManager' | 'StorageImage';
|
|
2
|
+
export type ComponentName = 'Authenticator' | 'ChangePassword' | 'DeleteUser' | 'FaceLivenessDetector' | 'FileUploader' | 'InAppMessaging' | 'LocationSearch' | 'MapView' | 'StorageManager' | 'StorageImage';
|
|
3
3
|
export type Version = `${string}.${string}.${string}`;
|
|
4
4
|
export interface SetUserAgentOptions {
|
|
5
5
|
componentName: ComponentName;
|