@boneframework/native-components 1.0.56 → 1.0.58
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/api/client.ts +7 -6
- package/api/notifications.ts +12 -0
- package/api/{ping.js → ping.ts} +9 -9
- package/api/users.ts +35 -0
- package/assets/animations/done.json +1 -0
- package/assets/animations/email.json +1 -0
- package/assets/animations/loader.json +1 -0
- package/assets/background.png +0 -0
- package/assets/logo.png +0 -0
- package/components/ActivityIndicator.tsx +2 -2
- package/components/{Animation.tsx → Animation.native.tsx} +3 -1
- package/components/Animation.web.tsx +24 -0
- package/components/ApiInterceptor.tsx +4 -3
- package/components/BoneNativeProvider.tsx +31 -0
- package/components/Button.tsx +26 -21
- package/components/Image.tsx +8 -2
- package/components/ImageInput.tsx +2 -1
- package/components/ListItemDeleteAction.tsx +12 -10
- package/components/ListItemFlipswitch.tsx +1 -2
- package/components/ListItemSwipable.tsx +3 -2
- package/components/OfflineNotice.tsx +17 -15
- package/components/Text.tsx +4 -4
- package/components/forms/FormImagePicker.tsx +36 -0
- package/contexts/api.ts +12 -0
- package/contexts/cache.ts +14 -0
- package/contexts/colors.ts +1 -1
- package/contexts/settings.ts +33 -0
- package/contexts/theme.ts +17 -15
- package/hooks/useColors.ts +1 -2
- package/hooks/useNotifications.web.ts +14 -0
- package/hooks/useSettings.ts +9 -0
- package/package.json +5 -2
- package/screens/ActivateUserScreen.tsx +3 -1
- package/screens/CheckEmailScreen.tsx +36 -32
- package/screens/EditProfileScreen.tsx +2 -3
- package/screens/MapScreen.web.tsx +33 -0
- package/screens/RegisterScreen.tsx +8 -4
- package/screens/ResendActivationlScreen.tsx +36 -31
- package/screens/SetPasswordScreen.tsx +6 -2
- package/screens/UploadScreen.tsx +3 -1
- package/screens/WelcomeScreen.tsx +13 -4
- package/api/notifications.js +0 -11
- package/api/users.js +0 -35
- package/components/ColorProvider.tsx +0 -14
- package/components/forms/FormImagePicker.js +0 -30
- /package/components/forms/{ErrorMessage.js → ErrorMessage.tsx} +0 -0
- /package/components/forms/{Form.js → Form.tsx} +0 -0
- /package/components/forms/{FormDateTimePicker.js → FormDateTimePicker.tsx} +0 -0
- /package/components/forms/{FormField.js → FormField.tsx} +0 -0
- /package/components/forms/{FormPicker.js → FormPicker.tsx} +0 -0
- /package/components/forms/{SubmitButton.js → SubmitButton.tsx} +0 -0
- /package/components/forms/{index.js → index.ts} +0 -0
- /package/hooks/{useNotifications.ts → useNotifications.native.ts} +0 -0
- /package/screens/{MapScreen.tsx → MapScreen.native.tsx} +0 -0
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {View} from "react-native";
|
|
3
|
-
import {useFormikContext} from "formik";
|
|
4
|
-
|
|
5
|
-
import ErrorMessage from './ErrorMessage'
|
|
6
|
-
import ImageInputList from '../ImageInputList'
|
|
7
|
-
|
|
8
|
-
function FormImagePicker({ name }) {
|
|
9
|
-
const {setFieldValue, touched, values, errors} = useFormikContext();
|
|
10
|
-
const imageUris = values[name]
|
|
11
|
-
const handleAdd = (uri) => {
|
|
12
|
-
setFieldValue(name, [...imageUris, uri])
|
|
13
|
-
};
|
|
14
|
-
const handleRemove = (uri) => {
|
|
15
|
-
setFieldValue(name, imageUris.filter(imageUri => imageUri !== uri))
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<View>
|
|
20
|
-
<ImageInputList
|
|
21
|
-
imageUris={imageUris}
|
|
22
|
-
onAddImage={handleAdd}
|
|
23
|
-
onRemoveImage={handleRemove}
|
|
24
|
-
/>
|
|
25
|
-
<ErrorMessage error={errors[name]} visible={touched[name]} />
|
|
26
|
-
</View>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default FormImagePicker;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|