@codeleap/mobile 3.1.1 → 3.2.1

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 (44) hide show
  1. package/package.json +5 -4
  2. package/src/components/ActionIcon/index.tsx +1 -1
  3. package/src/components/ActivityIndicator/index.tsx +13 -12
  4. package/src/components/Avatar/index.tsx +7 -7
  5. package/src/components/AvatarGroup/index.tsx +4 -6
  6. package/src/components/Badge/index.tsx +12 -12
  7. package/src/components/Button/index.tsx +2 -1
  8. package/src/components/DatePickerModal/index.tsx +4 -0
  9. package/src/components/DatePickerModal/types.ts +4 -1
  10. package/src/components/EmptyPlaceholder/index.tsx +3 -3
  11. package/src/components/FileInput/index.tsx +46 -16
  12. package/src/components/Icon/index.tsx +11 -12
  13. package/src/components/Image/index.tsx +17 -15
  14. package/src/components/ImageView/Spotlight.tsx +2 -2
  15. package/src/components/List/index.tsx +1 -1
  16. package/src/components/Modal/index.tsx +2 -2
  17. package/src/components/Navigation/constants.ts +19 -3
  18. package/src/components/Pager/index.tsx +7 -11
  19. package/src/components/RadioInput/index.tsx +1 -1
  20. package/src/components/RefreshControl/index.tsx +1 -1
  21. package/src/components/Scroll/index.tsx +7 -9
  22. package/src/components/Sections/index.tsx +8 -11
  23. package/src/components/SegmentedControl/Option.tsx +2 -2
  24. package/src/components/SegmentedControl/index.tsx +72 -33
  25. package/src/components/Select/index.tsx +2 -1
  26. package/src/components/Select/styles.ts +0 -1
  27. package/src/components/Select/types.ts +10 -4
  28. package/src/components/Slider/index.tsx +46 -50
  29. package/src/components/Switch/index.tsx +92 -98
  30. package/src/components/Text/index.tsx +8 -14
  31. package/src/components/TextInput/index.tsx +8 -2
  32. package/src/components/Touchable/index.tsx +13 -9
  33. package/src/components/View/index.tsx +17 -20
  34. package/src/components/components.ts +1 -1
  35. package/src/modules/reactNavigation.ts +1 -2
  36. package/src/modules/textInputMask.tsx +0 -6
  37. package/src/utils/theme.ts +1 -1
  38. package/src/modules/documentPicker.ts +0 -7
  39. package/src/modules/fastImage.ts +0 -2
  40. package/src/modules/imageCropPicker.d.ts +0 -497
  41. package/src/modules/index.d.ts +0 -682
  42. package/src/modules/rnDeviceInfo.ts +0 -6
  43. package/src/modules/types/documentPicker.d.ts +0 -215
  44. package/src/modules/types/fileTypes.ts +0 -138
@@ -1,215 +0,0 @@
1
- import { ModalPropsIOS } from 'react-native'
2
- import type { PlatformTypes, SupportedPlatforms } from './fileTypes'
3
-
4
- export declare type DocumentPickerResponse = {
5
- uri: string
6
- name: string
7
- copyError?: string
8
- fileCopyUri: string | null
9
- type: string | null
10
- size: number | null
11
- }
12
- export declare const types: Readonly<{
13
- readonly allFiles: '*/*'
14
- readonly audio: 'audio/*'
15
- readonly csv: 'text/csv'
16
- readonly doc: 'application/msword'
17
- readonly docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
18
- readonly images: 'image/*'
19
- readonly pdf: 'application/pdf'
20
- readonly plainText: 'text/plain'
21
- readonly ppt: 'application/vnd.ms-powerpoint'
22
- readonly pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
23
- readonly video: 'video/*'
24
- readonly xls: 'application/vnd.ms-excel'
25
- readonly xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
26
- readonly zip: 'application/zip'
27
- }> | Readonly<{
28
- readonly allFiles: 'public.item'
29
- readonly audio: 'public.audio'
30
- readonly csv: 'public.comma-separated-values-text'
31
- readonly doc: 'com.microsoft.word.doc'
32
- readonly docx: 'org.openxmlformats.wordprocessingml.document'
33
- readonly images: 'public.image'
34
- readonly pdf: 'com.adobe.pdf'
35
- readonly plainText: 'public.plain-text'
36
- readonly ppt: 'com.microsoft.powerpoint.ppt'
37
- readonly pptx: 'org.openxmlformats.presentationml.presentation'
38
- readonly video: 'public.movie'
39
- readonly xls: 'com.microsoft.excel.xls'
40
- readonly xlsx: 'org.openxmlformats.spreadsheetml.sheet'
41
- readonly zip: 'public.zip-archive'
42
- }> | Readonly<{
43
- readonly allFiles: '*'
44
- readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'
45
- readonly csv: '.csv'
46
- readonly doc: '.doc'
47
- readonly docx: '.docx'
48
- readonly images: '.jpeg .jpg .png'
49
- readonly pdf: '.pdf'
50
- readonly plainText: '.txt'
51
- readonly ppt: '.ppt'
52
- readonly pptx: '.pptx'
53
- readonly video: '.mp4'
54
- readonly xls: '.xls'
55
- readonly xlsx: '.xlsx'
56
- readonly zip: '.zip .gz'
57
- }>
58
- export declare type DirectoryPickerResponse = {
59
- uri: string
60
- }
61
- export declare type DocumentPickerOptions<OS extends SupportedPlatforms> = {
62
- type?: string | PlatformTypes[OS][keyof PlatformTypes[OS]] | Array<PlatformTypes[OS][keyof PlatformTypes[OS]] | string>
63
- mode?: 'import' | 'open'
64
- copyTo?: 'cachesDirectory' | 'documentDirectory'
65
- allowMultiSelection?: boolean
66
- } & Pick<ModalPropsIOS, 'presentationStyle'>
67
- export declare function pickDirectory<
68
- OS extends SupportedPlatforms>(params?: Pick<DocumentPickerOptions<OS>, 'presentationStyle'>): Promise<DirectoryPickerResponse | null>
69
- export declare function pickMultiple<OS extends SupportedPlatforms>(opts?: DocumentPickerOptions<OS>): Promise<DocumentPickerResponse[]>
70
- export declare function pickSingle<OS extends SupportedPlatforms>(opts?: DocumentPickerOptions<OS>): Promise<DocumentPickerResponse>
71
- export declare function pick<OS extends SupportedPlatforms>(opts?: DocumentPickerOptions<OS>): Promise<DocumentPickerResponse[]>
72
- export declare function releaseSecureAccess(uris: Array<string>): Promise<void>
73
- export declare type NativeModuleErrorShape = Error & {
74
- code?: string
75
- }
76
- export declare function isCancel(err: unknown): boolean
77
- export declare function isInProgress(err: unknown): boolean
78
-
79
- export type DocumentPicker = {
80
- isCancel: typeof isCancel
81
- releaseSecureAccess: typeof releaseSecureAccess
82
- pickDirectory: typeof pickDirectory
83
- pick: typeof pick
84
- pickMultiple: typeof pickMultiple
85
- pickSingle: typeof pickSingle
86
- types: Readonly<{
87
- readonly allFiles: '*/*'
88
- readonly audio: 'audio/*'
89
- readonly csv: 'text/csv'
90
- readonly doc: 'application/msword'
91
- readonly docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
92
- readonly images: 'image/*'
93
- readonly pdf: 'application/pdf'
94
- readonly plainText: 'text/plain'
95
- readonly ppt: 'application/vnd.ms-powerpoint'
96
- readonly pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
97
- readonly video: 'video/*'
98
- readonly xls: 'application/vnd.ms-excel'
99
- readonly xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
100
- readonly zip: 'application/zip'
101
- }> | Readonly<{
102
- readonly allFiles: 'public.item'
103
- readonly audio: 'public.audio'
104
- readonly csv: 'public.comma-separated-values-text'
105
- readonly doc: 'com.microsoft.word.doc'
106
- readonly docx: 'org.openxmlformats.wordprocessingml.document'
107
- readonly images: 'public.image'
108
- readonly pdf: 'com.adobe.pdf'
109
- readonly plainText: 'public.plain-text'
110
- readonly ppt: 'com.microsoft.powerpoint.ppt'
111
- readonly pptx: 'org.openxmlformats.presentationml.presentation'
112
- readonly video: 'public.movie'
113
- readonly xls: 'com.microsoft.excel.xls'
114
- readonly xlsx: 'org.openxmlformats.spreadsheetml.sheet'
115
- readonly zip: 'public.zip-archive'
116
- }> | Readonly<{
117
- readonly allFiles: '*'
118
- readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'
119
- readonly csv: '.csv'
120
- readonly doc: '.doc'
121
- readonly docx: '.docx'
122
- readonly images: '.jpeg .jpg .png'
123
- readonly pdf: '.pdf'
124
- readonly plainText: '.txt'
125
- readonly ppt: '.ppt'
126
- readonly pptx: '.pptx'
127
- readonly video: '.mp4'
128
- readonly xls: '.xls'
129
- readonly xlsx: '.xlsx'
130
- readonly zip: '.zip .gz'
131
- }>
132
- perPlatformTypes: {
133
- android: Readonly<{
134
- readonly allFiles: '*/*'
135
- readonly audio: 'audio/*'
136
- readonly csv: 'text/csv'
137
- readonly doc: 'application/msword'
138
- readonly docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
139
- readonly images: 'image/*'
140
- readonly pdf: 'application/pdf'
141
- readonly plainText: 'text/plain'
142
- readonly ppt: 'application/vnd.ms-powerpoint'
143
- readonly pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
144
- readonly video: 'video/*'
145
- readonly xls: 'application/vnd.ms-excel'
146
- readonly xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
147
- readonly zip: 'application/zip'
148
- }>
149
- ios: Readonly<{
150
- readonly allFiles: 'public.item'
151
- readonly audio: 'public.audio'
152
- readonly csv: 'public.comma-separated-values-text'
153
- readonly doc: 'com.microsoft.word.doc'
154
- readonly docx: 'org.openxmlformats.wordprocessingml.document'
155
- readonly images: 'public.image'
156
- readonly pdf: 'com.adobe.pdf'
157
- readonly plainText: 'public.plain-text'
158
- readonly ppt: 'com.microsoft.powerpoint.ppt'
159
- readonly pptx: 'org.openxmlformats.presentationml.presentation'
160
- readonly video: 'public.movie'
161
- readonly xls: 'com.microsoft.excel.xls'
162
- readonly xlsx: 'org.openxmlformats.spreadsheetml.sheet'
163
- readonly zip: 'public.zip-archive'
164
- }>
165
- windows: Readonly<{
166
- readonly allFiles: '*'
167
- readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'
168
- readonly csv: '.csv'
169
- readonly doc: '.doc'
170
- readonly docx: '.docx'
171
- readonly images: '.jpeg .jpg .png'
172
- readonly pdf: '.pdf'
173
- readonly plainText: '.txt'
174
- readonly ppt: '.ppt'
175
- readonly pptx: '.pptx'
176
- readonly video: '.mp4'
177
- readonly xls: '.xls'
178
- readonly xlsx: '.xlsx'
179
- readonly zip: '.zip .gz'
180
- }>
181
- macos: Readonly<{
182
- readonly allFiles: '*'
183
- readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'
184
- readonly csv: '.csv'
185
- readonly doc: '.doc'
186
- readonly docx: '.docx'
187
- readonly images: '.jpeg .jpg .png'
188
- readonly pdf: '.pdf'
189
- readonly plainText: '.txt'
190
- readonly ppt: '.ppt'
191
- readonly pptx: '.pptx'
192
- readonly video: '.mp4'
193
- readonly xls: '.xls'
194
- readonly xlsx: '.xlsx'
195
- readonly zip: '.zip .gz'
196
- }>
197
- web: Readonly<{
198
- readonly allFiles: '*'
199
- readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'
200
- readonly csv: '.csv'
201
- readonly doc: '.doc'
202
- readonly docx: '.docx'
203
- readonly images: '.jpeg .jpg .png'
204
- readonly pdf: '.pdf'
205
- readonly plainText: '.txt'
206
- readonly ppt: '.ppt'
207
- readonly pptx: '.pptx'
208
- readonly video: '.mp4'
209
- readonly xls: '.xls'
210
- readonly xlsx: '.xlsx'
211
- readonly zip: '.zip .gz'
212
- }>
213
- }
214
- }
215
-
@@ -1,138 +0,0 @@
1
- declare const mimeTypes: Readonly<{
2
- readonly allFiles: '*/*'
3
- readonly audio: 'audio/*'
4
- readonly csv: 'text/csv'
5
- readonly doc: 'application/msword'
6
- readonly docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
7
- readonly images: 'image/*'
8
- readonly pdf: 'application/pdf'
9
- readonly plainText: 'text/plain'
10
- readonly ppt: 'application/vnd.ms-powerpoint'
11
- readonly pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
12
- readonly video: 'video/*'
13
- readonly xls: 'application/vnd.ms-excel'
14
- readonly xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
15
- readonly zip: 'application/zip'
16
- }>
17
- declare const utis: Readonly<{
18
- readonly allFiles: 'public.item'
19
- readonly audio: 'public.audio'
20
- readonly csv: 'public.comma-separated-values-text'
21
- readonly doc: 'com.microsoft.word.doc'
22
- readonly docx: 'org.openxmlformats.wordprocessingml.document'
23
- readonly images: 'public.image'
24
- readonly pdf: 'com.adobe.pdf'
25
- readonly plainText: 'public.plain-text'
26
- readonly ppt: 'com.microsoft.powerpoint.ppt'
27
- readonly pptx: 'org.openxmlformats.presentationml.presentation'
28
- readonly video: 'public.movie'
29
- readonly xls: 'com.microsoft.excel.xls'
30
- readonly xlsx: 'org.openxmlformats.spreadsheetml.sheet'
31
- readonly zip: 'public.zip-archive'
32
- }>
33
- declare const extensions: Readonly<{
34
- readonly allFiles: '*'
35
- readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'
36
- readonly csv: '.csv'
37
- readonly doc: '.doc'
38
- readonly docx: '.docx'
39
- readonly images: '.jpeg .jpg .png'
40
- readonly pdf: '.pdf'
41
- readonly plainText: '.txt'
42
- readonly ppt: '.ppt'
43
- readonly pptx: '.pptx'
44
- readonly video: '.mp4'
45
- readonly xls: '.xls'
46
- readonly xlsx: '.xlsx'
47
- readonly zip: '.zip .gz'
48
- }>
49
- export declare type PlatformTypes = {
50
- android: typeof mimeTypes
51
- ios: typeof utis
52
- windows: typeof extensions
53
- }
54
- export declare type SupportedPlatforms = 'ios' | 'android' | 'windows'
55
- export declare const perPlatformTypes: {
56
- android: Readonly<{
57
- readonly allFiles: '*/*'
58
- readonly audio: 'audio/*'
59
- readonly csv: 'text/csv'
60
- readonly doc: 'application/msword'
61
- readonly docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
62
- readonly images: 'image/*'
63
- readonly pdf: 'application/pdf'
64
- readonly plainText: 'text/plain'
65
- readonly ppt: 'application/vnd.ms-powerpoint'
66
- readonly pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
67
- readonly video: 'video/*'
68
- readonly xls: 'application/vnd.ms-excel'
69
- readonly xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
70
- readonly zip: 'application/zip'
71
- }>
72
- ios: Readonly<{
73
- readonly allFiles: 'public.item'
74
- readonly audio: 'public.audio'
75
- readonly csv: 'public.comma-separated-values-text'
76
- readonly doc: 'com.microsoft.word.doc'
77
- readonly docx: 'org.openxmlformats.wordprocessingml.document'
78
- readonly images: 'public.image'
79
- readonly pdf: 'com.adobe.pdf'
80
- readonly plainText: 'public.plain-text'
81
- readonly ppt: 'com.microsoft.powerpoint.ppt'
82
- readonly pptx: 'org.openxmlformats.presentationml.presentation'
83
- readonly video: 'public.movie'
84
- readonly xls: 'com.microsoft.excel.xls'
85
- readonly xlsx: 'org.openxmlformats.spreadsheetml.sheet'
86
- readonly zip: 'public.zip-archive'
87
- }>
88
- windows: Readonly<{
89
- readonly allFiles: '*'
90
- readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'
91
- readonly csv: '.csv'
92
- readonly doc: '.doc'
93
- readonly docx: '.docx'
94
- readonly images: '.jpeg .jpg .png'
95
- readonly pdf: '.pdf'
96
- readonly plainText: '.txt'
97
- readonly ppt: '.ppt'
98
- readonly pptx: '.pptx'
99
- readonly video: '.mp4'
100
- readonly xls: '.xls'
101
- readonly xlsx: '.xlsx'
102
- readonly zip: '.zip .gz'
103
- }>
104
- macos: Readonly<{
105
- readonly allFiles: '*'
106
- readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'
107
- readonly csv: '.csv'
108
- readonly doc: '.doc'
109
- readonly docx: '.docx'
110
- readonly images: '.jpeg .jpg .png'
111
- readonly pdf: '.pdf'
112
- readonly plainText: '.txt'
113
- readonly ppt: '.ppt'
114
- readonly pptx: '.pptx'
115
- readonly video: '.mp4'
116
- readonly xls: '.xls'
117
- readonly xlsx: '.xlsx'
118
- readonly zip: '.zip .gz'
119
- }>
120
- web: Readonly<{
121
- readonly allFiles: '*'
122
- readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'
123
- readonly csv: '.csv'
124
- readonly doc: '.doc'
125
- readonly docx: '.docx'
126
- readonly images: '.jpeg .jpg .png'
127
- readonly pdf: '.pdf'
128
- readonly plainText: '.txt'
129
- readonly ppt: '.ppt'
130
- readonly pptx: '.pptx'
131
- readonly video: '.mp4'
132
- readonly xls: '.xls'
133
- readonly xlsx: '.xlsx'
134
- readonly zip: '.zip .gz'
135
- }>
136
- }
137
- export declare const typesAreEqual: true
138
- export {}