@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.
Files changed (54) hide show
  1. package/api/client.ts +7 -6
  2. package/api/notifications.ts +12 -0
  3. package/api/{ping.js → ping.ts} +9 -9
  4. package/api/users.ts +35 -0
  5. package/assets/animations/done.json +1 -0
  6. package/assets/animations/email.json +1 -0
  7. package/assets/animations/loader.json +1 -0
  8. package/assets/background.png +0 -0
  9. package/assets/logo.png +0 -0
  10. package/components/ActivityIndicator.tsx +2 -2
  11. package/components/{Animation.tsx → Animation.native.tsx} +3 -1
  12. package/components/Animation.web.tsx +24 -0
  13. package/components/ApiInterceptor.tsx +4 -3
  14. package/components/BoneNativeProvider.tsx +31 -0
  15. package/components/Button.tsx +26 -21
  16. package/components/Image.tsx +8 -2
  17. package/components/ImageInput.tsx +2 -1
  18. package/components/ListItemDeleteAction.tsx +12 -10
  19. package/components/ListItemFlipswitch.tsx +1 -2
  20. package/components/ListItemSwipable.tsx +3 -2
  21. package/components/OfflineNotice.tsx +17 -15
  22. package/components/Text.tsx +4 -4
  23. package/components/forms/FormImagePicker.tsx +36 -0
  24. package/contexts/api.ts +12 -0
  25. package/contexts/cache.ts +14 -0
  26. package/contexts/colors.ts +1 -1
  27. package/contexts/settings.ts +33 -0
  28. package/contexts/theme.ts +17 -15
  29. package/hooks/useColors.ts +1 -2
  30. package/hooks/useNotifications.web.ts +14 -0
  31. package/hooks/useSettings.ts +9 -0
  32. package/package.json +5 -2
  33. package/screens/ActivateUserScreen.tsx +3 -1
  34. package/screens/CheckEmailScreen.tsx +36 -32
  35. package/screens/EditProfileScreen.tsx +2 -3
  36. package/screens/MapScreen.web.tsx +33 -0
  37. package/screens/RegisterScreen.tsx +8 -4
  38. package/screens/ResendActivationlScreen.tsx +36 -31
  39. package/screens/SetPasswordScreen.tsx +6 -2
  40. package/screens/UploadScreen.tsx +3 -1
  41. package/screens/WelcomeScreen.tsx +13 -4
  42. package/api/notifications.js +0 -11
  43. package/api/users.js +0 -35
  44. package/components/ColorProvider.tsx +0 -14
  45. package/components/forms/FormImagePicker.js +0 -30
  46. /package/components/forms/{ErrorMessage.js → ErrorMessage.tsx} +0 -0
  47. /package/components/forms/{Form.js → Form.tsx} +0 -0
  48. /package/components/forms/{FormDateTimePicker.js → FormDateTimePicker.tsx} +0 -0
  49. /package/components/forms/{FormField.js → FormField.tsx} +0 -0
  50. /package/components/forms/{FormPicker.js → FormPicker.tsx} +0 -0
  51. /package/components/forms/{SubmitButton.js → SubmitButton.tsx} +0 -0
  52. /package/components/forms/{index.js → index.ts} +0 -0
  53. /package/hooks/{useNotifications.ts → useNotifications.native.ts} +0 -0
  54. /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