@codeleap/mobile 1.9.13 → 1.9.16
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/components/FileInput.d.ts +4 -3
- package/dist/components/FileInput.js +29 -14
- package/dist/components/FileInput.js.map +1 -1
- package/dist/components/TextInput.d.ts +130 -1
- package/dist/components/TextInput.js +2 -3
- package/dist/components/TextInput.js.map +1 -1
- package/dist/modules/textInputMask.d.ts +11 -1
- package/package.json +1 -1
- package/src/components/FileInput.tsx +33 -15
- package/src/components/TextInput.tsx +1 -1
|
@@ -23,8 +23,9 @@ export declare type FileInputProps = {
|
|
|
23
23
|
alertProps?: Parameters<typeof OSAlert.ask>[0];
|
|
24
24
|
pickerOptions?: Partial<Options>;
|
|
25
25
|
required?: boolean;
|
|
26
|
-
onOpenCamera?: () => Promise<void>;
|
|
27
|
-
|
|
26
|
+
onOpenCamera?: (resolve: (() => void)) => Promise<void>;
|
|
27
|
+
onOpenFileSystem?: (resolve: (() => void)) => Promise<void>;
|
|
28
|
+
onOpenGallery?: (resolve: (() => void)) => Promise<void>;
|
|
28
29
|
onError?: (error: any) => void;
|
|
29
30
|
};
|
|
30
|
-
export declare const FileInput: React.ForwardRefExoticComponent<Pick<FileInputProps, "label" | "variants" | "styles" | "onError" | "placeholder" | "type" | "
|
|
31
|
+
export declare const FileInput: React.ForwardRefExoticComponent<Pick<FileInputProps, "label" | "variants" | "styles" | "onError" | "placeholder" | "type" | "options" | "required" | "buttonProps" | "iconName" | "mode" | "onFileSelect" | "alertProps" | "pickerOptions" | "onOpenCamera" | "onOpenFileSystem" | "onOpenGallery"> & React.RefAttributes<FileInputRef>>;
|
|
@@ -100,14 +100,9 @@ function parsePickerData(data) {
|
|
|
100
100
|
preview: data.path,
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
var emptyPromise = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
104
|
-
return __generator(this, function (_a) {
|
|
105
|
-
return [2 /*return*/];
|
|
106
|
-
});
|
|
107
|
-
}); };
|
|
108
103
|
exports.FileInput = (0, react_1.forwardRef)(function (fileInputProps, ref) {
|
|
109
|
-
var _a = fileInputProps.mode, mode = _a === void 0 ? 'hidden' : _a, onFileSelect = fileInputProps.onFileSelect, iconName = fileInputProps.iconName, styles = fileInputProps.styles, label = fileInputProps.label, variants = fileInputProps.variants, options = fileInputProps.options, _b = fileInputProps.type, type = _b === void 0 ? 'image' : _b, alertProps = fileInputProps.alertProps, _c = fileInputProps.placeholder, placeholder = _c === void 0 ? 'Select a file' : _c, pickerOptions = fileInputProps.pickerOptions, required = fileInputProps.required, buttonProps = fileInputProps.buttonProps, _d = fileInputProps.onOpenCamera, onOpenCamera = _d === void 0 ?
|
|
110
|
-
var
|
|
104
|
+
var _a = fileInputProps.mode, mode = _a === void 0 ? 'hidden' : _a, onFileSelect = fileInputProps.onFileSelect, iconName = fileInputProps.iconName, styles = fileInputProps.styles, label = fileInputProps.label, variants = fileInputProps.variants, options = fileInputProps.options, _b = fileInputProps.type, type = _b === void 0 ? 'image' : _b, alertProps = fileInputProps.alertProps, _c = fileInputProps.placeholder, placeholder = _c === void 0 ? 'Select a file' : _c, pickerOptions = fileInputProps.pickerOptions, required = fileInputProps.required, buttonProps = fileInputProps.buttonProps, _d = fileInputProps.onOpenCamera, onOpenCamera = _d === void 0 ? null : _d, _e = fileInputProps.onOpenGallery, onOpenGallery = _e === void 0 ? null : _e, _f = fileInputProps.onOpenFileSystem, onOpenFileSystem = _f === void 0 ? null : _f, onError = fileInputProps.onError;
|
|
105
|
+
var _g = react_1.default.useState(null), file = _g[0], setFile = _g[1];
|
|
111
106
|
var logger = (0, common_1.useCodeleapContext)().logger;
|
|
112
107
|
function openFileSystem() {
|
|
113
108
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -162,26 +157,46 @@ exports.FileInput = (0, react_1.forwardRef)(function (fileInputProps, ref) {
|
|
|
162
157
|
parsePickerData(data),
|
|
163
158
|
]);
|
|
164
159
|
};
|
|
160
|
+
var onPress = function (open, options) {
|
|
161
|
+
if (open == 'fs') {
|
|
162
|
+
openFileSystem();
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
var call = open === 'camera' ? 'openCamera' : 'openPicker';
|
|
166
|
+
documentPicker_1.ImageCropPicker[call](__assign(__assign({}, mergedOptions), (options || {}))).then(handlePickerResolution);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
165
169
|
var openFilePicker = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
166
170
|
var _a, _b;
|
|
167
171
|
return __generator(this, function (_c) {
|
|
168
172
|
if (type === 'image') {
|
|
169
173
|
OSAlert_1.default.ask(__assign(__assign({ title: 'Change Image', body: 'Do you want to take a new picture or select an existing one?' }, alertProps), { options: [
|
|
170
174
|
__assign({ text: ((_b = (_a = alertProps === null || alertProps === void 0 ? void 0 : alertProps.options) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.text) || 'Camera', onPress: function () {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
175
|
+
if (onOpenCamera) {
|
|
176
|
+
onOpenCamera(function () { return onPress('camera'); });
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
onPress('camera');
|
|
180
|
+
}
|
|
174
181
|
} }, alertProps === null || alertProps === void 0 ? void 0 : alertProps.options[1]),
|
|
175
182
|
__assign({ text: 'Library', onPress: function () {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
183
|
+
if (onOpenGallery) {
|
|
184
|
+
onOpenGallery(function () { return onPress('library'); });
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
onPress('library');
|
|
188
|
+
}
|
|
179
189
|
} }, alertProps === null || alertProps === void 0 ? void 0 : alertProps.options[2]),
|
|
180
190
|
__assign({ text: 'Cancel', style: 'cancel', onPress: function () { } }, alertProps === null || alertProps === void 0 ? void 0 : alertProps.options[0]),
|
|
181
191
|
] }));
|
|
182
192
|
}
|
|
183
193
|
else {
|
|
184
|
-
|
|
194
|
+
if (onOpenFileSystem) {
|
|
195
|
+
onOpenFileSystem(function () { return onPress('fs'); });
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
onPress('fs');
|
|
199
|
+
}
|
|
185
200
|
}
|
|
186
201
|
return [2 /*return*/];
|
|
187
202
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../src/components/FileInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8D;AAC9D,4DAA2E;AAC3E,2CASyB;AAEzB,mCAA8C;AAC9C,+BAA6B;AAC7B,yCAAwC;AACxC,6DAAsC;
|
|
1
|
+
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../src/components/FileInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8D;AAC9D,4DAA2E;AAC3E,2CASyB;AAEzB,mCAA8C;AAC9C,+BAA6B;AAC7B,yCAAwC;AACxC,6DAAsC;AA6BtC,IAAM,cAAc,GAAG;IACrB,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,IAAI;CACf,CAAA;AAED,SAAS,eAAe,CAAC,IAAQ;IAE/B,IAAM,YAAY,GAAG,IAAA,0BAAiB,EAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACjD,IAAM,CAAC,GAA2B;QAChC,IAAI,EAAE,YAAY,CAAC,IAAI;QACvB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,GAAG,EAAE,IAAI,CAAC,IAAI;QACd,WAAW,EAAE,IAAI,CAAC,IAAI;KACvB,CAAA;IAED,O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WAAW,CAAC,EAEpB;MAAA,EAAE,WAAI,CAAC,CACR,CAAA;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAC,CAAA"}
|
|
@@ -33,7 +33,136 @@ export declare type TextInputProps = Partial<TextInputMaskProps> & ComponentVari
|
|
|
33
33
|
onChangeMask?: TextInputMaskProps['onChangeText'];
|
|
34
34
|
required?: boolean;
|
|
35
35
|
};
|
|
36
|
-
export declare const TextInput: React.ForwardRefExoticComponent<
|
|
36
|
+
export declare const TextInput: React.ForwardRefExoticComponent<Partial<TextInputMaskProps> & ComponentVariants<{
|
|
37
|
+
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
38
|
+
line: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
39
|
+
box: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
40
|
+
pill: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
41
|
+
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
42
|
+
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
43
|
+
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
44
|
+
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
45
|
+
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
46
|
+
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
47
|
+
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
48
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
49
|
+
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
50
|
+
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
51
|
+
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
52
|
+
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
53
|
+
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
54
|
+
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
55
|
+
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
56
|
+
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
57
|
+
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
58
|
+
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
59
|
+
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
60
|
+
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
61
|
+
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
62
|
+
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
63
|
+
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
64
|
+
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
65
|
+
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
66
|
+
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
67
|
+
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
68
|
+
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
69
|
+
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
70
|
+
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
71
|
+
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
72
|
+
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
73
|
+
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
74
|
+
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
75
|
+
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
76
|
+
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
77
|
+
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
78
|
+
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
79
|
+
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
80
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
81
|
+
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
82
|
+
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
83
|
+
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
84
|
+
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
85
|
+
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
86
|
+
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
87
|
+
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
88
|
+
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
89
|
+
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
90
|
+
}, import("@codeleap/common").EnhancedTheme<any>, import("@codeleap/common").VariantProp<{
|
|
91
|
+
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
92
|
+
line: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
93
|
+
box: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
94
|
+
pill: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
95
|
+
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
96
|
+
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
97
|
+
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
98
|
+
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
99
|
+
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
100
|
+
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
101
|
+
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
102
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
103
|
+
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
104
|
+
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
105
|
+
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
106
|
+
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
107
|
+
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
108
|
+
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
109
|
+
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
110
|
+
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
111
|
+
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
112
|
+
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
113
|
+
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
114
|
+
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
115
|
+
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
116
|
+
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
117
|
+
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
118
|
+
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
119
|
+
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
120
|
+
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
121
|
+
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
122
|
+
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
123
|
+
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
124
|
+
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
125
|
+
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
126
|
+
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
127
|
+
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
128
|
+
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
129
|
+
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
130
|
+
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
131
|
+
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
132
|
+
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
133
|
+
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
134
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
135
|
+
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
136
|
+
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
137
|
+
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
138
|
+
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
139
|
+
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
140
|
+
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
141
|
+
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
142
|
+
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
143
|
+
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
144
|
+
}>> & Omit<import("react-native").TextInputProps, "value"> & {
|
|
145
|
+
multiline?: boolean;
|
|
146
|
+
onChangeText?: (text: string) => void;
|
|
147
|
+
disabled?: boolean;
|
|
148
|
+
edited?: boolean;
|
|
149
|
+
type?: string;
|
|
150
|
+
label?: React.ReactNode;
|
|
151
|
+
debugName: string;
|
|
152
|
+
leftIcon?: IconProp;
|
|
153
|
+
rightIcon?: IconProp;
|
|
154
|
+
styles?: StylesOf<TextInputComposition>;
|
|
155
|
+
validate?: FormTypes.ValidatorFunctionWithoutForm | string;
|
|
156
|
+
value?: string;
|
|
157
|
+
password?: boolean;
|
|
158
|
+
visibilityToggle?: boolean;
|
|
159
|
+
touchableWrapper?: boolean;
|
|
160
|
+
onPress?: () => void;
|
|
161
|
+
masking?: FormTypes.TextField['masking'];
|
|
162
|
+
innerWrapperProps?: TouchableProps | ViewProps;
|
|
163
|
+
onChangeMask?: TextInputMaskProps['onChangeText'];
|
|
164
|
+
required?: boolean;
|
|
165
|
+
} & React.RefAttributes<NativeTextInput>>;
|
|
37
166
|
export declare const FormError: ({ message, ...props }: {
|
|
38
167
|
[x: string]: any;
|
|
39
168
|
message: any;
|
|
@@ -123,9 +123,8 @@ exports.TextInput = (0, react_1.forwardRef)(function (rawprops, inputRef) {
|
|
|
123
123
|
<exports.InputLabel label={label} style={getStyles('label')} asteriskStyle={getStyles('requiredAsterisk')} wrapperStyle={getStyles('labelWrapper')} required={required}/>
|
|
124
124
|
<View_1.View style={getStyles('innerWrapper')} {...innerWrapperProps}>
|
|
125
125
|
<exports.InputIcon {...leftIcon} style={leftIconStyle} wrapperStyle={buttonIconWrapperStyle}/>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
ref={input} secureTextEntry={password && !textIsVisible} onChange={function (e) { return masking ? onChange === null || onChange === void 0 ? void 0 : onChange(e) : handleChange(e); }} value={value} editable={disabled} onFocus={handleFocus} onBlur={handleBlur} placeholderTextColor={(_a = react_native_1.StyleSheet.flatten(getStyles('placeholder'))) === null || _a === void 0 ? void 0 : _a.color} selectionColor={(_b = react_native_1.StyleSheet.flatten(getStyles('selection'))) === null || _b === void 0 ? void 0 : _b.color} includeRawValueInChangeText={true} {...props} {...(masking ? { onChangeText: handleMaskChange, type: masking === null || masking === void 0 ? void 0 : masking.type } : {})} style={getStyles('textField')}/>
|
|
126
|
+
{/* @ts-ignore */}
|
|
127
|
+
<InputElement ref={input} secureTextEntry={password && !textIsVisible} onChange={function (e) { return masking ? onChange === null || onChange === void 0 ? void 0 : onChange(e) : handleChange(e); }} value={value} editable={disabled} onFocus={handleFocus} onBlur={handleBlur} placeholderTextColor={(_a = react_native_1.StyleSheet.flatten(getStyles('placeholder'))) === null || _a === void 0 ? void 0 : _a.color} selectionColor={(_b = react_native_1.StyleSheet.flatten(getStyles('selection'))) === null || _b === void 0 ? void 0 : _b.color} includeRawValueInChangeText={true} {...props} {...(masking ? { onChangeText: handleMaskChange, type: masking === null || masking === void 0 ? void 0 : masking.type } : {})} style={getStyles('textField')}/>
|
|
129
128
|
{visibilityToggle ?
|
|
130
129
|
<exports.InputIcon name={(textIsVisible ? 'input-visiblity:visible' : 'input-visiblity:hidden')} action={function () { return setTextVisible(); }} style={rightIconStyle} wrapperStyle={buttonIconWrapperStyle}/>
|
|
131
130
|
:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../src/components/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CASyB;AACzB,+BAAmG;AACnG,+BAA6B;AAC7B,+BAAwC;AAExC,+BAA6B;AAC7B,6CAAuH;AACvH,yCAAuD;AACvD,0DAA0D;AAkC7C,QAAA,SAAS,GAAG,IAAA,kBAAU,EAAkC,UAAC,QAAQ,EAAE,QAAQ;;IAEpF,IAAA,QAAQ,GAuBN,QAAQ,SAvBF,EACR,IAAI,GAsBF,QAAQ,KAtBN,EACJ,KAAK,GAqBH,QAAQ,MArBL,EACL,YAAY,GAoBV,QAAQ,aApBE,EAC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AAO,IAAI,CAAA;IAEvB,QAAQ,OAAO,KAAK,EAAE;QACpB,KAAK,QAAQ;YACX,OAAO,CAAC,WAAI,CAAC,KAAK,CAAC,CAAE,YAAY,IAAI,WAAW,CAAC,YAAY,CAAC,CAC5D;QAAA,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EACrD;QAAA,CAAC,QAAQ,IAAI,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,aAAa,IAAI,WAAW,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAG,CACzF;MAAA,EAAE,WAAI,CAAC,CAAA;QACT,KAAK,QAAQ;YACX,OAAO,KAAK,CAAA;QACd;YACE,OAAO,IAAI,CAAA;KACd;AACH,CAAC,CAAA;AAlBY,QAAA,UAAU,cAkBtB"}
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const MaskedTextInput: import("react").ForwardRefExoticComponent<
|
|
2
|
+
export declare const MaskedTextInput: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
masking: {
|
|
4
|
+
type?: any;
|
|
5
|
+
saveFormatted?: boolean;
|
|
6
|
+
} & {
|
|
7
|
+
type: import("react-native-masked-text").TextInputMaskTypeProp;
|
|
8
|
+
};
|
|
9
|
+
onChangeText?: (maskedText: string, unmaskedText: string) => any;
|
|
10
|
+
} & import("react-native").TextInputProps & import("react-native-masked-text").TextInputMaskProps & {
|
|
11
|
+
ref?: any;
|
|
12
|
+
}>;
|
package/package.json
CHANGED
|
@@ -37,8 +37,9 @@ export type FileInputProps = {
|
|
|
37
37
|
alertProps?: Parameters<typeof OSAlert.ask>[0]
|
|
38
38
|
pickerOptions?: Partial<Options>
|
|
39
39
|
required?: boolean
|
|
40
|
-
onOpenCamera?: () => Promise<void>
|
|
41
|
-
|
|
40
|
+
onOpenCamera?: (resolve: (() => void)) => Promise<void>
|
|
41
|
+
onOpenFileSystem?: (resolve: (() => void)) => Promise<void>
|
|
42
|
+
onOpenGallery?: (resolve: (() => void)) => Promise<void>
|
|
42
43
|
onError?: (error: any) => void
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -65,10 +66,6 @@ function parsePickerData(data:any):MobileInputFile {
|
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
const emptyPromise = async () => {
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
|
|
72
69
|
export const FileInput = forwardRef<
|
|
73
70
|
FileInputRef,
|
|
74
71
|
FileInputProps
|
|
@@ -87,8 +84,9 @@ export const FileInput = forwardRef<
|
|
|
87
84
|
pickerOptions,
|
|
88
85
|
required,
|
|
89
86
|
buttonProps,
|
|
90
|
-
onOpenCamera =
|
|
91
|
-
onOpenGallery =
|
|
87
|
+
onOpenCamera = null,
|
|
88
|
+
onOpenGallery = null,
|
|
89
|
+
onOpenFileSystem = null,
|
|
92
90
|
onError,
|
|
93
91
|
} = fileInputProps
|
|
94
92
|
|
|
@@ -140,7 +138,16 @@ export const FileInput = forwardRef<
|
|
|
140
138
|
parsePickerData(data),
|
|
141
139
|
])
|
|
142
140
|
}
|
|
141
|
+
const onPress = (open?: 'camera' | 'library' | 'fs', options?: Options) => {
|
|
142
|
+
if (open == 'fs') {
|
|
143
|
+
openFileSystem()
|
|
144
|
+
} else {
|
|
145
|
+
const call = open === 'camera' ? 'openCamera' : 'openPicker'
|
|
146
|
+
ImageCropPicker[call]({ ...mergedOptions, ...(options || {}) }).then(handlePickerResolution)
|
|
143
147
|
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
}
|
|
144
151
|
const openFilePicker = async () => {
|
|
145
152
|
if (type === 'image') {
|
|
146
153
|
OSAlert.ask({
|
|
@@ -151,18 +158,24 @@ export const FileInput = forwardRef<
|
|
|
151
158
|
{
|
|
152
159
|
text: alertProps?.options?.[0]?.text || 'Camera',
|
|
153
160
|
onPress: () => {
|
|
154
|
-
onOpenCamera
|
|
155
|
-
|
|
156
|
-
}
|
|
161
|
+
if (onOpenCamera) {
|
|
162
|
+
onOpenCamera(() => onPress('camera'))
|
|
163
|
+
} else {
|
|
164
|
+
onPress('camera')
|
|
165
|
+
}
|
|
166
|
+
|
|
157
167
|
},
|
|
158
168
|
...alertProps?.options[1],
|
|
159
169
|
},
|
|
160
170
|
{
|
|
161
171
|
text: 'Library',
|
|
162
172
|
onPress: () => {
|
|
163
|
-
onOpenGallery
|
|
164
|
-
|
|
165
|
-
}
|
|
173
|
+
if (onOpenGallery) {
|
|
174
|
+
onOpenGallery(() => onPress('library'))
|
|
175
|
+
} else {
|
|
176
|
+
onPress('library')
|
|
177
|
+
}
|
|
178
|
+
|
|
166
179
|
},
|
|
167
180
|
...alertProps?.options[2],
|
|
168
181
|
},
|
|
@@ -176,7 +189,12 @@ export const FileInput = forwardRef<
|
|
|
176
189
|
],
|
|
177
190
|
})
|
|
178
191
|
} else {
|
|
179
|
-
|
|
192
|
+
if (onOpenFileSystem) {
|
|
193
|
+
onOpenFileSystem(() => onPress('fs'))
|
|
194
|
+
} else {
|
|
195
|
+
|
|
196
|
+
onPress('fs')
|
|
197
|
+
}
|
|
180
198
|
}
|
|
181
199
|
|
|
182
200
|
}
|
|
@@ -176,8 +176,8 @@ export const TextInput = forwardRef<NativeTextInput, TextInputProps>((rawprops,
|
|
|
176
176
|
/>
|
|
177
177
|
<View style={getStyles('innerWrapper')} {...innerWrapperProps}>
|
|
178
178
|
<InputIcon {...leftIcon} style={leftIconStyle} wrapperStyle={buttonIconWrapperStyle} />
|
|
179
|
+
{/* @ts-ignore */}
|
|
179
180
|
<InputElement
|
|
180
|
-
/* @ts-ignore */
|
|
181
181
|
ref={input}
|
|
182
182
|
secureTextEntry={password && !textIsVisible}
|
|
183
183
|
onChange={(e) => masking ? onChange?.(e) : handleChange(e)}
|