@codeleap/mobile 1.9.19 → 1.9.22
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/package.json
CHANGED
|
@@ -19,7 +19,7 @@ import { Options } from 'react-native-image-crop-picker'
|
|
|
19
19
|
import { DocumentPickerOptions } from '../modules/types/documentPicker'
|
|
20
20
|
|
|
21
21
|
export type FileInputRef = {
|
|
22
|
-
openFilePicker: () => void
|
|
22
|
+
openFilePicker: (string?: 'camera' | 'library') => void
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export type FileInputProps = {
|
|
@@ -146,7 +146,7 @@ export const FileInput = forwardRef<
|
|
|
146
146
|
ImageCropPicker[call]({ ...mergedOptions, ...(options || {}) }).then(handlePickerResolution)
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
const openFilePicker = async (imageSource) => {
|
|
149
|
+
const openFilePicker = async (imageSource = null) => {
|
|
150
150
|
if (type === 'image') {
|
|
151
151
|
if (imageSource === 'camera') {
|
|
152
152
|
onPress('camera')
|
|
@@ -115,7 +115,11 @@ export const TextInput = forwardRef<NativeTextInput, TextInputProps>((rawprops,
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
useImperativeHandle(inputRef, () => ({ ...input.current, focus: () => {
|
|
118
|
-
|
|
118
|
+
if (masking) {
|
|
119
|
+
input.current?._inputElement?.focus()
|
|
120
|
+
} else {
|
|
121
|
+
input.current?.focus?.()
|
|
122
|
+
}
|
|
119
123
|
}, isTextInput: true }))
|
|
120
124
|
|
|
121
125
|
const { showError, error } = useValidate(value, validate)
|
|
@@ -189,7 +193,9 @@ export const TextInput = forwardRef<NativeTextInput, TextInputProps>((rawprops,
|
|
|
189
193
|
selectionColor={StyleSheet.flatten(getStyles('selection'))?.color}
|
|
190
194
|
includeRawValueInChangeText={true}
|
|
191
195
|
{...props}
|
|
192
|
-
{...(masking ? { onChangeText: handleMaskChange, type: masking?.type
|
|
196
|
+
{...(masking ? { onChangeText: handleMaskChange, type: masking?.type, refInput: (inputRef) => {
|
|
197
|
+
input.current = inputRef
|
|
198
|
+
} } : {})}
|
|
193
199
|
style={getStyles('textField')}
|
|
194
200
|
/>
|
|
195
201
|
{
|
|
@@ -41,13 +41,11 @@ export const Touchable: React.FC<TouchableProps> = forwardRef<
|
|
|
41
41
|
variants,
|
|
42
42
|
})
|
|
43
43
|
|
|
44
|
-
const { logger
|
|
44
|
+
const { logger } = useCodeleapContext()
|
|
45
45
|
const press = () => {
|
|
46
46
|
if (!onPress) { throw { message: 'No onPress passed to touchable', touchableProps } }
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
activeLogger.log(
|
|
48
|
+
logger.log(
|
|
51
49
|
`<${debugComponent || 'Touchable'}/> pressed`,
|
|
52
50
|
debugName || variants,
|
|
53
51
|
'User interaction',
|