@aws-amplify/ui-react 4.3.8 → 4.3.9
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/{utils-80566d75.js → constants-cedcff37.js} +1 -1
- package/dist/esm/components/AccountSettings/ChangePassword/ChangePassword.mjs +1 -1
- package/dist/esm/components/AccountSettings/DeleteUser/DeleteUser.mjs +1 -1
- package/dist/esm/components/Authenticator/Authenticator.mjs +1 -1
- package/dist/esm/components/Storage/FileUploader/FileUploader.mjs +1 -1
- package/dist/esm/components/Storage/FileUploader/UploadPreviewer/index.mjs +1 -1
- package/dist/esm/components/Storage/FileUploader/UploadTracker/UploadMessage.mjs +1 -1
- package/dist/esm/components/Storage/FileUploader/UploadTracker/index.mjs +1 -1
- package/dist/esm/components/Storage/FileUploader/hooks/useFileUploader/useFileUploader.mjs +1 -1
- package/dist/esm/components/Storage/FileUploader/types.mjs +1 -0
- package/dist/esm/helpers/constants.mjs +1 -1
- package/dist/esm/hooks/useComposeRefsCallback.mjs +1 -1
- package/dist/esm/primitives/Alert/Alert.mjs +1 -1
- package/dist/esm/primitives/Autocomplete/Autocomplete.mjs +1 -1
- package/dist/esm/primitives/Autocomplete/useAutocomplete.mjs +1 -1
- package/dist/esm/primitives/Checkbox/useCheckbox.mjs +1 -1
- package/dist/esm/primitives/Collection/Collection.mjs +1 -1
- package/dist/esm/primitives/Field/FieldClearButton.mjs +1 -1
- package/dist/esm/primitives/SearchField/SearchFieldButton.mjs +1 -1
- package/dist/esm/primitives/SearchField/useSearchField.mjs +1 -1
- package/dist/esm/primitives/SliderField/SliderField.mjs +1 -1
- package/dist/esm/primitives/StepperField/useStepper.mjs +1 -1
- package/dist/esm/primitives/SwitchField/useSwitch.mjs +1 -1
- package/dist/esm/primitives/ToggleButton/useToggleButton.mjs +1 -1
- package/dist/esm/primitives/ToggleButtonGroup/useToggleButtonGroup.mjs +1 -1
- package/dist/esm/primitives/shared/utils.mjs +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/types/components/Geo/LocationSearch/index.d.ts +1 -1
- package/dist/types/components/Geo/types/maplibre-gl-geocoder.d.ts +171 -0
- package/dist/types/components/Storage/FileUploader/types.d.ts +9 -1
- package/dist/types/primitives/shared/utils.d.ts +0 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
export declare type LocationSearchProps = {
|
|
2
|
+
/**
|
|
3
|
+
* A bounding box given as an array in the format `[minX, minY, maxX, maxY]`.
|
|
4
|
+
* Search results will be limited to the bounding box.
|
|
5
|
+
*/
|
|
6
|
+
bbox?: number[];
|
|
7
|
+
/**
|
|
8
|
+
* Default: false
|
|
9
|
+
* If `true`, the LocationSearch control will clear it's contents and blur when user presses the escape key.
|
|
10
|
+
*/
|
|
11
|
+
clearAndBlurOnEsc?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Default: false
|
|
14
|
+
* If `true`, the LocationSearch control will clear its value when the input blurs.
|
|
15
|
+
*/
|
|
16
|
+
clearOnBlur?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Default: false
|
|
19
|
+
* If `true`, the LocationSearch control will collapse until hovered or in focus.
|
|
20
|
+
*/
|
|
21
|
+
collapsed?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* a comma separated list of country codes to limit results to specified country or countries.
|
|
24
|
+
*/
|
|
25
|
+
countries?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Default: 200
|
|
28
|
+
* Sets the amount of time, in milliseconds, to wait before querying the server when a user types into the LocationSearch
|
|
29
|
+
* input box. This parameter may be useful for reducing the total number of API calls made for a single query.
|
|
30
|
+
*/
|
|
31
|
+
debounceSearch?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Default: true
|
|
34
|
+
* Allow Maplibre to collect anonymous usage statistics from the plugin.
|
|
35
|
+
*/
|
|
36
|
+
enableEventLogging?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* A function accepting the query string, current features list, and LocationSearch options which performs geocoding to
|
|
39
|
+
* supplement results from the Maplibre Geocoding API. Expected to return a Promise which resolves to an Array of
|
|
40
|
+
* GeoJSON Features in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format.
|
|
41
|
+
*/
|
|
42
|
+
externalGeocoder?: Function;
|
|
43
|
+
/**
|
|
44
|
+
* Default: true
|
|
45
|
+
* If `false`, animating the map to a selected result is disabled. If `true`, animating the map will use the default
|
|
46
|
+
* animation parameters. If an object, it will be passed as `options` to the map [`flyTo`](https://maplibre.org/maplibre-gl-js-docs/api/map/#map#flyto)
|
|
47
|
+
* or [`fitBounds`](https://maplibre.org/maplibre-gl-js-docs/api/map/#map#fitbounds) method providing control over the animation of the transition.
|
|
48
|
+
*/
|
|
49
|
+
flyTo?: boolean | object;
|
|
50
|
+
/**
|
|
51
|
+
* A function which accepts a Feature in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format to filter out
|
|
52
|
+
* results from the Geocoding API response before they are included in the suggestions list. Return `true` to keep the item, `false` otherwise.
|
|
53
|
+
*/
|
|
54
|
+
filter?: Function;
|
|
55
|
+
/**
|
|
56
|
+
* A function that specifies how the selected result should be rendered in the search bar. This function should accept a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) object as input and return a string.
|
|
57
|
+
* HTML tags in the output string will not be rendered. Defaults to `(item) => item.place_name`.
|
|
58
|
+
*/
|
|
59
|
+
getItemValue?: Function;
|
|
60
|
+
/**
|
|
61
|
+
* Specify the language to use for response text and query result weighting. Options are IETF language tags comprised
|
|
62
|
+
* of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than
|
|
63
|
+
* one value can also be specified, separated by commas. Defaults to the browser's language settings.
|
|
64
|
+
*/
|
|
65
|
+
language?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Default: 5
|
|
68
|
+
* Maximum number of results to show.
|
|
69
|
+
*/
|
|
70
|
+
limit?: number;
|
|
71
|
+
/**
|
|
72
|
+
* A function accepting the query string which performs local geocoding to supplement results from the Maplibre
|
|
73
|
+
* Geocoding API. Expected to return an Array of GeoJSON Features in the [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) format.
|
|
74
|
+
*/
|
|
75
|
+
localGeocoder?: Function;
|
|
76
|
+
/**
|
|
77
|
+
* Default: false
|
|
78
|
+
* If `true`, indicates that the `localGeocoder` results should be the only ones returned to the user. If `false`,
|
|
79
|
+
* indicates that the `localGeocoder` results should be combined with those from the Maplibre API with the `localGeocoder` results ranked higher.
|
|
80
|
+
*/
|
|
81
|
+
localGeocoderOnly?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Default: { color: '#4668F2' }
|
|
84
|
+
* If `true`, a [Marker](https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker) will be added to the map at the location of the user-selected
|
|
85
|
+
* result using a default set of Marker options. If the value is an object, the marker will be constructed using these
|
|
86
|
+
* options. If `false`, no marker will be added to the map. Requires that `options.maplibregl` also be set (which it is by default).
|
|
87
|
+
*/
|
|
88
|
+
marker?: boolean | object;
|
|
89
|
+
/**
|
|
90
|
+
* Default: 2
|
|
91
|
+
* Minimum number of characters to enter before results are shown.
|
|
92
|
+
*/
|
|
93
|
+
minLength?: number;
|
|
94
|
+
/**
|
|
95
|
+
* Default: 'Search'
|
|
96
|
+
* Override the default placeholder attribute value.
|
|
97
|
+
*/
|
|
98
|
+
placeholder?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Default: true
|
|
101
|
+
* If `true`, a [Popup](https://maplibre.org/maplibre-gl-js-docs/api/markers/#popup) will be added to the map when clicking on a marker using a default set of popup options.
|
|
102
|
+
* If the value is an object, the popup will be constructed using these options. If `false`, no popup will be added to the map.
|
|
103
|
+
* Requires that `options.maplibregl` also be set (which it is by default).
|
|
104
|
+
*/
|
|
105
|
+
popup?: boolean | object;
|
|
106
|
+
/**
|
|
107
|
+
* A function that specifies how the results should be rendered in the popup menu. This function should accept a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) object as input and return a string.
|
|
108
|
+
* Any HTML in the returned string will be rendered.
|
|
109
|
+
*/
|
|
110
|
+
popupRender?: Function;
|
|
111
|
+
/**
|
|
112
|
+
* Default: 'top-right'
|
|
113
|
+
* Position the LocationSearch will be rendered on the map. Only relevant when `<LocationSearch>` is used with a map.
|
|
114
|
+
*/
|
|
115
|
+
position?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
116
|
+
/**
|
|
117
|
+
* A geographical point given as an object with `latitude` and `longitude`
|
|
118
|
+
* properties. Search results closer to this point will be given
|
|
119
|
+
* higher priority. Defaults to map viewport if rendered as a map control.
|
|
120
|
+
*/
|
|
121
|
+
proximity?: {
|
|
122
|
+
latitude: number;
|
|
123
|
+
longitude: number;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* A function that specifies how the results should be rendered in the dropdown menu. This function should accepts a single [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md)
|
|
127
|
+
* object as input and return a string. Any HTML in the returned string will be rendered.
|
|
128
|
+
*/
|
|
129
|
+
render?: Function;
|
|
130
|
+
/**
|
|
131
|
+
* Default: false
|
|
132
|
+
* If `true`, enable reverse geocoding mode. In reverse geocoding, search input is expected to be coordinates in the
|
|
133
|
+
* form `lat, lon`, with suggestions being the reverse geocodes.
|
|
134
|
+
*/
|
|
135
|
+
reverseGeocoder?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Default: 'distance'
|
|
138
|
+
* Set the factors that are used to sort nearby results.
|
|
139
|
+
*/
|
|
140
|
+
reverseMode?: 'distance' | 'score';
|
|
141
|
+
/**
|
|
142
|
+
* Default: { color: '#4668F2' }
|
|
143
|
+
* If `true`, [Markers](https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker) will be added to the map at the location the top results for the query.
|
|
144
|
+
* If the value is an object, the marker will be constructed using these options. If `false`, no marker will be added to the map.
|
|
145
|
+
* Requires that `options.maplibregl` also be set (which it is by default).
|
|
146
|
+
*/
|
|
147
|
+
showResultMarkers?: boolean | object;
|
|
148
|
+
/**
|
|
149
|
+
* Default: true
|
|
150
|
+
* If `false`, indicates that search will only occur on enter key press. If `true`, indicates that the LocationSearch will
|
|
151
|
+
* search on the input box being updated above the minLength option.
|
|
152
|
+
*/
|
|
153
|
+
showResultsWhileTyping?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Default: true
|
|
156
|
+
* If `true`, the LocationSearch proximity will automatically update based on the map view.
|
|
157
|
+
*/
|
|
158
|
+
trackProximity?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* A comma separated list of types that filter results to match those specified. See https://docs.mapbox.com/api/search/#data-types
|
|
161
|
+
* for available types. If reverseGeocode is enabled, you should specify one type. If you configure more than one type, the first
|
|
162
|
+
* type will be used.
|
|
163
|
+
*/
|
|
164
|
+
types?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Default: 16
|
|
167
|
+
* On geocoded result, what zoom level should the map animate to when a `bbox` isn't found in the response.
|
|
168
|
+
* If a `bbox` is found the map will fit to the `bbox`.
|
|
169
|
+
*/
|
|
170
|
+
zoom?: number;
|
|
171
|
+
};
|
|
@@ -64,7 +64,15 @@ export interface FileStatus extends Partial<FileStateProps> {
|
|
|
64
64
|
file?: File;
|
|
65
65
|
}
|
|
66
66
|
export declare type FileStatuses = FileStatus[];
|
|
67
|
-
export declare
|
|
67
|
+
export declare enum FileState {
|
|
68
|
+
PAUSED = "paused",
|
|
69
|
+
SUCCESS = "success",
|
|
70
|
+
ERROR = "error",
|
|
71
|
+
LOADING = "loading",
|
|
72
|
+
RESUME = "resume",
|
|
73
|
+
EDITING = "editing",
|
|
74
|
+
INIT = "init"
|
|
75
|
+
}
|
|
68
76
|
export interface FileStateProps {
|
|
69
77
|
fileState: FileState;
|
|
70
78
|
errorMessage: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentClassName, WebTheme } from '@aws-amplify/ui';
|
|
2
2
|
export declare const strHasLength: (str: unknown) => str is string;
|
|
3
|
-
export declare const isFunction: (fn: unknown) => fn is Function;
|
|
4
3
|
export declare const isEmptyString: (value: unknown) => boolean;
|
|
5
4
|
export declare const isNullOrEmptyString: (value: unknown) => boolean;
|
|
6
5
|
/**
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.3.
|
|
1
|
+
export declare const VERSION = "4.3.9";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"size": "yarn run size-limit"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@aws-amplify/ui": "5.5.
|
|
53
|
-
"@aws-amplify/ui-react-core": "2.1.
|
|
52
|
+
"@aws-amplify/ui": "5.5.6",
|
|
53
|
+
"@aws-amplify/ui-react-core": "2.1.14",
|
|
54
54
|
"@radix-ui/react-accordion": "1.0.0",
|
|
55
55
|
"@radix-ui/react-direction": "1.0.0",
|
|
56
56
|
"@radix-ui/react-dropdown-menu": "1.0.0",
|