@codeleap/mobile 4.3.8 → 5.0.0
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/Autocomplete/index.js.map +1 -1
- package/dist/components/Autocomplete/types.d.ts +9 -10
- package/dist/components/Backdrop/index.js.map +1 -1
- package/dist/components/Checkbox/index.js +13 -9
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Checkbox/types.d.ts +5 -2
- package/dist/components/DatePickerModal/index.js +18 -11
- package/dist/components/DatePickerModal/index.js.map +1 -1
- package/dist/components/DatePickerModal/types.d.ts +12 -9
- package/dist/components/FileInput/types.d.ts +3 -4
- package/dist/components/Grid/index.js.map +1 -1
- package/dist/components/Image/types.d.ts +2 -5
- package/dist/components/InputBase/index.d.ts +2 -6
- package/dist/components/InputBase/index.js +9 -5
- package/dist/components/InputBase/index.js.map +1 -1
- package/dist/components/InputBase/types.d.ts +2 -0
- package/dist/components/InputBase/useInputBase.d.ts +24 -0
- package/dist/components/InputBase/useInputBase.js +46 -0
- package/dist/components/InputBase/useInputBase.js.map +1 -0
- package/dist/components/InputBase/useInputBasePartialStyles.d.ts +2 -0
- package/dist/components/InputBase/useInputBasePartialStyles.js +30 -0
- package/dist/components/InputBase/useInputBasePartialStyles.js.map +1 -0
- package/dist/components/InputBase/utils.js +16 -16
- package/dist/components/InputBase/utils.js.map +1 -1
- package/dist/components/List/index.js +1 -1
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/Modal/index.js +4 -14
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/NumberIncrement/index.js +21 -132
- package/dist/components/NumberIncrement/index.js.map +1 -1
- package/dist/components/NumberIncrement/types.d.ts +7 -5
- package/dist/components/NumberIncrement/useNumberIncrement.d.ts +55 -0
- package/dist/components/NumberIncrement/useNumberIncrement.js +107 -0
- package/dist/components/NumberIncrement/useNumberIncrement.js.map +1 -0
- package/dist/components/RadioInput/index.d.ts +1 -1
- package/dist/components/RadioInput/index.js +20 -41
- package/dist/components/RadioInput/index.js.map +1 -1
- package/dist/components/RadioInput/types.d.ts +11 -9
- package/dist/components/Scroll/index.js +25 -28
- package/dist/components/Scroll/index.js.map +1 -1
- package/dist/components/Scroll/types.d.ts +4 -4
- package/dist/components/Sections/index.js +1 -1
- package/dist/components/Sections/index.js.map +1 -1
- package/dist/components/SegmentedControl/index.js +6 -4
- package/dist/components/SegmentedControl/index.js.map +1 -1
- package/dist/components/SegmentedControl/types.d.ts +4 -3
- package/dist/components/Select/index.js +10 -6
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/types.d.ts +19 -18
- package/dist/components/Slider/index.js +22 -57
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Slider/types.d.ts +8 -5
- package/dist/components/SortablePhotos/index.js +17 -18
- package/dist/components/SortablePhotos/index.js.map +1 -1
- package/dist/components/SortablePhotos/types.d.ts +5 -15
- package/dist/components/SortablePhotos/useSortablePhotos.d.ts +11 -8
- package/dist/components/SortablePhotos/useSortablePhotos.js +18 -11
- package/dist/components/SortablePhotos/useSortablePhotos.js.map +1 -1
- package/dist/components/Switch/index.js +13 -9
- package/dist/components/Switch/index.js.map +1 -1
- package/dist/components/Switch/types.d.ts +5 -2
- package/dist/components/TextInput/index.js +26 -70
- package/dist/components/TextInput/index.js.map +1 -1
- package/dist/components/TextInput/types.d.ts +8 -6
- package/dist/components/TextInput/useTextInput.d.ts +54 -0
- package/dist/components/TextInput/useTextInput.js +59 -0
- package/dist/components/TextInput/useTextInput.js.map +1 -0
- package/dist/components/Touchable/index.js +4 -3
- package/dist/components/Touchable/index.js.map +1 -1
- package/dist/components/View/index.d.ts +7 -12
- package/dist/components/View/index.js +9 -7
- package/dist/components/View/index.js.map +1 -1
- package/dist/components/View/types.d.ts +6 -6
- package/dist/components/components.d.ts +0 -2
- package/dist/components/components.js +0 -2
- package/dist/components/components.js.map +1 -1
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/index.js +3 -10
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useKeyboardController.d.ts +6 -0
- package/dist/hooks/useKeyboardController.js +19 -0
- package/dist/hooks/useKeyboardController.js.map +1 -0
- package/dist/hooks/useStatusBar.d.ts +6 -0
- package/dist/hooks/useStatusBar.js +15 -0
- package/dist/hooks/useStatusBar.js.map +1 -0
- package/dist/hooks/useStylesFor.d.ts +2 -0
- package/dist/hooks/useStylesFor.js +11 -0
- package/dist/hooks/useStylesFor.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/backgroundTimer.d.ts +3 -0
- package/dist/modules/backgroundTimer.js +31 -0
- package/dist/modules/backgroundTimer.js.map +1 -0
- package/dist/modules/index.d.ts +3 -0
- package/dist/modules/index.js +3 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/reactNavigation.d.ts +8 -21
- package/dist/modules/reactNavigation.js +38 -12
- package/dist/modules/reactNavigation.js.map +1 -1
- package/dist/modules/scroll.d.ts +18 -0
- package/dist/modules/scroll.js +57 -0
- package/dist/modules/scroll.js.map +1 -0
- package/dist/modules/types/textInputMask.d.ts +6 -2
- package/dist/utils/KeyboardAware/context.js +2 -6
- package/dist/utils/KeyboardAware/context.js.map +1 -1
- package/dist/utils/KeyboardAware/index.d.ts +0 -1
- package/dist/utils/KeyboardAware/index.js +0 -1
- package/dist/utils/KeyboardAware/index.js.map +1 -1
- package/dist/utils/ModalManager/context.js +2 -2
- package/dist/utils/ModalManager/context.js.map +1 -1
- package/dist/utils/hooks.js +4 -4
- package/dist/utils/hooks.js.map +1 -1
- package/dist/utils/locale.d.ts +1 -1
- package/dist/utils/locale.js +10 -5
- package/dist/utils/locale.js.map +1 -1
- package/dist/utils/theme.d.ts +1 -0
- package/dist/utils/theme.js +4 -2
- package/dist/utils/theme.js.map +1 -1
- package/package.json +32 -36
- package/package.json.bak +17 -20
- package/src/components/Autocomplete/index.tsx +2 -3
- package/src/components/Autocomplete/types.ts +9 -10
- package/src/components/Backdrop/index.tsx +0 -1
- package/src/components/Checkbox/index.tsx +23 -9
- package/src/components/Checkbox/types.ts +5 -2
- package/src/components/DatePickerModal/index.tsx +27 -18
- package/src/components/DatePickerModal/types.ts +12 -9
- package/src/components/FileInput/types.ts +3 -4
- package/src/components/Grid/index.tsx +3 -3
- package/src/components/Image/types.ts +3 -6
- package/src/components/InputBase/index.tsx +13 -7
- package/src/components/InputBase/types.ts +2 -0
- package/src/components/InputBase/useInputBase.ts +60 -0
- package/src/components/InputBase/useInputBasePartialStyles.ts +38 -0
- package/src/components/InputBase/utils.ts +17 -17
- package/src/components/List/index.tsx +0 -1
- package/src/components/Modal/index.tsx +4 -15
- package/src/components/NumberIncrement/index.tsx +52 -160
- package/src/components/NumberIncrement/types.ts +7 -5
- package/src/components/NumberIncrement/useNumberIncrement.ts +152 -0
- package/src/components/RadioInput/index.tsx +37 -53
- package/src/components/RadioInput/types.ts +11 -9
- package/src/components/Scroll/index.tsx +44 -45
- package/src/components/Scroll/types.ts +4 -4
- package/src/components/Sections/index.tsx +0 -1
- package/src/components/SegmentedControl/index.tsx +8 -6
- package/src/components/SegmentedControl/types.ts +4 -3
- package/src/components/Select/index.tsx +32 -24
- package/src/components/Select/types.ts +19 -18
- package/src/components/Slider/index.tsx +35 -64
- package/src/components/Slider/types.ts +8 -5
- package/src/components/SortablePhotos/index.tsx +31 -47
- package/src/components/SortablePhotos/types.ts +6 -15
- package/src/components/SortablePhotos/useSortablePhotos.ts +28 -22
- package/src/components/Switch/index.tsx +23 -9
- package/src/components/Switch/types.ts +5 -2
- package/src/components/TextInput/index.tsx +55 -89
- package/src/components/TextInput/types.ts +9 -7
- package/src/components/TextInput/useTextInput.ts +88 -0
- package/src/components/Touchable/index.tsx +5 -1
- package/src/components/View/index.tsx +19 -12
- package/src/components/View/types.ts +7 -6
- package/src/components/components.ts +0 -2
- package/src/hooks/index.ts +3 -13
- package/src/hooks/useKeyboardController.ts +28 -0
- package/src/hooks/useStatusBar.ts +21 -0
- package/src/hooks/useStylesFor.ts +13 -0
- package/src/index.ts +3 -1
- package/src/modules/backgroundTimer.ts +39 -0
- package/src/modules/index.ts +3 -0
- package/src/modules/reactNavigation.ts +64 -14
- package/src/modules/scroll.tsx +89 -0
- package/src/modules/types/textInputMask.ts +8 -4
- package/src/types/index.ts +1 -0
- package/src/utils/KeyboardAware/context.tsx +2 -6
- package/src/utils/KeyboardAware/index.ts +1 -1
- package/src/utils/ModalManager/context.tsx +2 -2
- package/src/utils/hooks.ts +4 -4
- package/src/utils/locale.ts +13 -5
- package/src/utils/theme.ts +6 -2
- package/dist/components/Navigation/Navigation.d.ts +0 -55
- package/dist/components/Navigation/Navigation.js +0 -41
- package/dist/components/Navigation/Navigation.js.map +0 -1
- package/dist/components/Navigation/constants.d.ts +0 -9
- package/dist/components/Navigation/constants.js +0 -9
- package/dist/components/Navigation/constants.js.map +0 -1
- package/dist/components/Navigation/index.d.ts +0 -3
- package/dist/components/Navigation/index.js +0 -4
- package/dist/components/Navigation/index.js.map +0 -1
- package/dist/components/Navigation/types.d.ts +0 -26
- package/dist/components/Navigation/types.js +0 -2
- package/dist/components/Navigation/types.js.map +0 -1
- package/dist/components/Navigation/utils.d.ts +0 -3
- package/dist/components/Navigation/utils.js +0 -34
- package/dist/components/Navigation/utils.js.map +0 -1
- package/dist/components/NumberIncrement/utils.d.ts +0 -5
- package/dist/components/NumberIncrement/utils.js +0 -23
- package/dist/components/NumberIncrement/utils.js.map +0 -1
- package/dist/utils/KeyboardAware/types.d.ts +0 -1
- package/dist/utils/KeyboardAware/types.js +0 -6
- package/dist/utils/KeyboardAware/types.js.map +0 -1
- package/src/components/Navigation/Navigation.tsx +0 -55
- package/src/components/Navigation/constants.ts +0 -24
- package/src/components/Navigation/index.tsx +0 -3
- package/src/components/Navigation/types.ts +0 -28
- package/src/components/Navigation/utils.tsx +0 -57
- package/src/components/NumberIncrement/utils.ts +0 -27
- package/src/utils/KeyboardAware/types.ts +0 -159
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation.js","sourceRoot":"","sources":["../../../src/components/Navigation/Navigation.tsx"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,UAAU,GACX,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,CAAC,MAAM,UAAU,GAAG,CAA0B,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAsB,EAAE,EAAE;IACpG,MAAM,mBAAmB,GAAG,UAAU,CAAC,IAAI,CAAmB,CAAA;IAE9D,0EAA0E;IAE1E,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,CAC9C;IAAA,CACE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,EAAE;YAClD,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;YAEjD,IAAI,WAAW,GAAG;gBAChB,IAAI;aACqB,CAAA;YAE3B,IAAI,UAAU,EAAE;gBACd,WAAW,CAAC,SAAS,GAAG,OAAO,CAAA;gBAC/B,mGAAmG;aACpG;iBAAM;gBACL,WAAW,CAAC,SAAS,GAAG,OAAO,EAAE,SAAS,EAAE,OAAO,IAAI,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,OAAO,CAAA;gBAC7F,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBACjC,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;gBAExF,WAAW,GAAG;oBACZ,GAAG,WAAW;oBACd,OAAO,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;wBACzB,KAAK;wBACL,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE;wBACjE,OAAO,EAAE,OAAO,EAAE,IAAI;wBACtB,iBAAiB,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;wBAC7G,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;qBAC7F,CAAC;iBACH,CAAA;gBACD,sHAAsH;aACvH;YAED,OAAO;YACL,aAAa;YACb,CAAC,mBAAmB,CAAC,MAAM,CACzB,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,WAAW,CAAC,EAChB,CACH,CAAA;QACH,CAAC,CAAC,CAEN;EAAA,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAA;AAClC,CAAC,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createDrawerNavigator } from '@react-navigation/drawer';
|
|
2
|
-
import { createStackNavigator } from '@react-navigation/stack';
|
|
3
|
-
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
4
|
-
export const Navigators = {
|
|
5
|
-
Drawer: createDrawerNavigator(),
|
|
6
|
-
Stack: createStackNavigator(),
|
|
7
|
-
Tab: createBottomTabNavigator(),
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Navigation/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAE9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAgBxE,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC,MAAM,EAAE,qBAAqB,EAAE;IAC/B,KAAK,EAAE,oBAAoB,EAAE;IAC7B,GAAG,EAAE,wBAAwB,EAAE;CAChC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Navigation/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AppIcon } from '@codeleap/styles';
|
|
3
|
-
import { Navigators } from './constants';
|
|
4
|
-
export type TNavigators = typeof Navigators;
|
|
5
|
-
export type NavigatorType = keyof TNavigators;
|
|
6
|
-
export type PropTypes = {
|
|
7
|
-
[P in NavigatorType]: {
|
|
8
|
-
Screen: Omit<React.ComponentPropsWithRef<TNavigators[P]['Screen']>, 'children' | 'name'>;
|
|
9
|
-
Navigator: Omit<React.ComponentPropsWithRef<TNavigators[P]['Navigator']>, 'children' | 'name'>;
|
|
10
|
-
Group: Omit<React.ComponentPropsWithRef<TNavigators[P]['Group']>, 'children' | 'name'>;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export type SceneComponent<K extends NavigatorType> = PropTypes[K]['Screen'];
|
|
14
|
-
export type SceneOptions<K extends NavigatorType> = {
|
|
15
|
-
icon?: AppIcon;
|
|
16
|
-
default?: SceneComponent<K>;
|
|
17
|
-
} & PropTypes[K]['Screen'];
|
|
18
|
-
export type Scene<K extends NavigatorType> = SceneComponent<K> | SceneOptions<K>;
|
|
19
|
-
export type Scenes<K extends NavigatorType> = {
|
|
20
|
-
[x: string]: Scene<K>;
|
|
21
|
-
};
|
|
22
|
-
export type SceneProps = any;
|
|
23
|
-
export type NavigationProps<T extends NavigatorType> = {
|
|
24
|
-
type: T;
|
|
25
|
-
scenes: Scenes<T>;
|
|
26
|
-
} & PropTypes[T]['Navigator'];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Navigation/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Navigation } from './Navigation';
|
|
3
|
-
export function createAppNavigation(Scenes) {
|
|
4
|
-
const AllScenes = Object.entries(Scenes).reduce((allScenes, [moduleName, content]) => {
|
|
5
|
-
const subScenes = [];
|
|
6
|
-
for (const [name, sceneContent] of Object.entries(content.scenes)) {
|
|
7
|
-
subScenes.push([`${moduleName}.${name}`, sceneContent]);
|
|
8
|
-
}
|
|
9
|
-
return [
|
|
10
|
-
...allScenes,
|
|
11
|
-
...subScenes,
|
|
12
|
-
];
|
|
13
|
-
}, []);
|
|
14
|
-
const AppScenes = Object.fromEntries(AllScenes);
|
|
15
|
-
const SCENES_RESULT = Object.fromEntries(Object.entries(Scenes)
|
|
16
|
-
.map(([S, { _ig_scenes, exclude, type, navigationProps, ...otherProps }]) => {
|
|
17
|
-
let filterScenes = null;
|
|
18
|
-
if (exclude) {
|
|
19
|
-
filterScenes = Object.fromEntries(AllScenes.filter(([path]) => !exclude.some(param => path.startsWith(param))));
|
|
20
|
-
}
|
|
21
|
-
const Component = () => <Navigation type={type || 'Stack'} scenes={filterScenes || AppScenes} screenOptions={{
|
|
22
|
-
headerShown: false,
|
|
23
|
-
...navigationProps?.screenOptions,
|
|
24
|
-
}} {...navigationProps}/>;
|
|
25
|
-
// console.log('SCENES_RESULT create', { _ig_scenes, exclude, type, navigationProps, otherProps })
|
|
26
|
-
return [S, {
|
|
27
|
-
...otherProps,
|
|
28
|
-
component: Component,
|
|
29
|
-
}];
|
|
30
|
-
}));
|
|
31
|
-
// console.log('SCENES_RESULT', SCENES_RESULT)
|
|
32
|
-
return SCENES_RESULT;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/Navigation/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,UAAU,mBAAmB,CAAC,MAAU;IAE5C,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAM,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,EAAE;QAExF,MAAM,SAAS,GAAG,EAAE,CAAA;QAEpB,KAAK,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YACjE,SAAS,CAAC,IAAI,CACZ,CAAC,GAAG,UAAU,IAAI,IAAI,EAAE,EAAE,YAAY,CAAC,CACxC,CAAA;SACF;QAED,OAAO;YACL,GAAG,SAAS;YACZ,GAAG,SAAS;SACb,CAAA;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IAE/C,MAAM,aAAa,GAAG,MAAM,CAAC,WAAW,CACtC,MAAM,CAAC,OAAO,CAAM,MAAM,CAAC;SACxB,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;QAC1E,IAAI,YAAY,GAAG,IAAI,CAAA;QAEvB,IAAI,OAAO,EAAE;YACX,YAAY,GAAG,MAAM,CAAC,WAAW,CAC/B,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAC7E,CAAA;SACF;QAED,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CAAC,UAAU,CACjC,IAAI,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC,CACtB,MAAM,CAAC,CAAC,YAAY,IAAI,SAAS,CAAC,CAClC,aAAa,CAAC,CAAC;gBACb,WAAW,EAAE,KAAK;gBAClB,GAAG,eAAe,EAAE,aAAa;aAClC,CAAC,CACF,IAAI,eAAe,CAAC,EACpB,CAAA;QACF,kGAAkG;QAElG,OAAO,CAAC,CAAC,EAAE;gBACT,GAAG,UAAU;gBACb,SAAS,EAAE,SAAS;aACrB,CAAC,CAAA;IACJ,CAAC,CAAC,CACL,CAAA;IAED,8CAA8C;IAE9C,OAAO,aAAa,CAAA;AACtB,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useState, useCallback } from 'react';
|
|
2
|
-
const initialState = {
|
|
3
|
-
message: '',
|
|
4
|
-
isValid: true,
|
|
5
|
-
};
|
|
6
|
-
export const useActionValidate = (validator) => {
|
|
7
|
-
const [error, setError] = useState(initialState);
|
|
8
|
-
const validate = useCallback((value) => {
|
|
9
|
-
if (!validator)
|
|
10
|
-
return;
|
|
11
|
-
const { valid, message } = validator(value, {});
|
|
12
|
-
setError({
|
|
13
|
-
isValid: valid,
|
|
14
|
-
message: message,
|
|
15
|
-
});
|
|
16
|
-
}, [validator]);
|
|
17
|
-
return {
|
|
18
|
-
onAction: validate,
|
|
19
|
-
message: error?.message,
|
|
20
|
-
isValid: error?.isValid
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/NumberIncrement/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAE7C,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,IAAI;CACd,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAc,EAAE,EAAE;IAClD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAA;IAEhD,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,KAAa,EAAE,EAAE;QAC7C,IAAI,CAAC,SAAS;YAAE,OAAM;QAEtB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAE/C,QAAQ,CAAC;YACP,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,OAAO;SACjB,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAA;IAEf,OAAO;QACL,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,KAAK,EAAE,OAAO;QACvB,OAAO,EAAE,KAAK,EAAE,OAAO;KACxB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Type definitions for react-native-keyboard-aware-scroll-view
|
|
2
|
-
// Project: https://github.com/APSL/react-native-keyboard-aware-scroll-view
|
|
3
|
-
// Definitions by: Kyle Roach <https://github.com/iRoachie>
|
|
4
|
-
// TypeScript Version: 2.3.2
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/utils/KeyboardAware/types.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,2EAA2E;AAC3E,2DAA2D;AAC3D,4BAA4B"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import {
|
|
4
|
-
TypeGuards,
|
|
5
|
-
} from '@codeleap/types'
|
|
6
|
-
import { Icon } from '../Icon'
|
|
7
|
-
import { NavigationProps, NavigatorType, PropTypes, TNavigators } from './types'
|
|
8
|
-
import { Navigators } from './constants'
|
|
9
|
-
|
|
10
|
-
export const Navigation = <T extends NavigatorType>({ type, scenes, ...props }: NavigationProps<T>) => {
|
|
11
|
-
const NavigationComponent = Navigators[type] as TNavigators[T]
|
|
12
|
-
|
|
13
|
-
// console.log('render Navigation', { type, scenes, props, defaultProps })
|
|
14
|
-
|
|
15
|
-
return <NavigationComponent.Navigator {...props}>
|
|
16
|
-
{
|
|
17
|
-
Object.entries(scenes).map(([name, content], idx) => {
|
|
18
|
-
const isFunction = TypeGuards.isFunction(content)
|
|
19
|
-
|
|
20
|
-
let screenProps = {
|
|
21
|
-
name,
|
|
22
|
-
} as PropTypes[T]['Screen']
|
|
23
|
-
|
|
24
|
-
if (isFunction) {
|
|
25
|
-
screenProps.component = content
|
|
26
|
-
// console.log('Render NavigationScreen', { scenes, screenProps, content, isFunction }, 'PACKAGES')
|
|
27
|
-
} else {
|
|
28
|
-
screenProps.component = content?.component?.default || content?.component || content?.default
|
|
29
|
-
const nameParts = name.split('.')
|
|
30
|
-
const title = content?.title || nameParts[nameParts.length - 1] || name.replace('.', '')
|
|
31
|
-
|
|
32
|
-
screenProps = {
|
|
33
|
-
...screenProps,
|
|
34
|
-
options: (optionProps) => ({
|
|
35
|
-
title,
|
|
36
|
-
tabBarIcon: (style) => <Icon name={content?.icon} style={style}/>,
|
|
37
|
-
tabIcon: content?.icon,
|
|
38
|
-
tabBarIconFocused: content?.iconFocused ? (style) => <Icon name={content?.iconFocused} style={style}/> : null,
|
|
39
|
-
...(TypeGuards.isFunction(content.options) ? content.options(optionProps) : content.options),
|
|
40
|
-
}),
|
|
41
|
-
}
|
|
42
|
-
// console.log('Render NavigationScreen loop', { scenes, screenProps, content, title, isFunction, props }, 'PACKAGES')
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
<NavigationComponent.Screen
|
|
48
|
-
key={idx}
|
|
49
|
-
{...screenProps}
|
|
50
|
-
/>
|
|
51
|
-
)
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
</NavigationComponent.Navigator>
|
|
55
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createDrawerNavigator } from '@react-navigation/drawer'
|
|
2
|
-
import { createStackNavigator } from '@react-navigation/stack'
|
|
3
|
-
import type { TypedNavigator } from '@react-navigation/core'
|
|
4
|
-
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
|
|
5
|
-
|
|
6
|
-
type X = TypedNavigator<
|
|
7
|
-
any,
|
|
8
|
-
any,
|
|
9
|
-
any,
|
|
10
|
-
any,
|
|
11
|
-
any
|
|
12
|
-
>
|
|
13
|
-
|
|
14
|
-
type INavigators = {
|
|
15
|
-
Drawer: X
|
|
16
|
-
Stack: X
|
|
17
|
-
Tab: X
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const Navigators:INavigators = {
|
|
21
|
-
Drawer: createDrawerNavigator(),
|
|
22
|
-
Stack: createStackNavigator(),
|
|
23
|
-
Tab: createBottomTabNavigator(),
|
|
24
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { AppIcon } from '@codeleap/styles'
|
|
2
|
-
import { Navigators } from './constants'
|
|
3
|
-
|
|
4
|
-
export type TNavigators = typeof Navigators
|
|
5
|
-
export type NavigatorType = keyof TNavigators
|
|
6
|
-
|
|
7
|
-
export type PropTypes = {
|
|
8
|
-
[P in NavigatorType] : {
|
|
9
|
-
Screen: Omit<React.ComponentPropsWithRef<TNavigators[P]['Screen']>, 'children'|'name'>
|
|
10
|
-
Navigator: Omit<React.ComponentPropsWithRef<TNavigators[P]['Navigator']>, 'children'|'name'>
|
|
11
|
-
Group: Omit<React.ComponentPropsWithRef<TNavigators[P]['Group']>, 'children'|'name'>
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export type SceneComponent<K extends NavigatorType> = PropTypes[K]['Screen']
|
|
15
|
-
export type SceneOptions<K extends NavigatorType> =
|
|
16
|
-
{ icon?: AppIcon; default?:SceneComponent<K> } & PropTypes[K]['Screen']
|
|
17
|
-
export type Scene<K extends NavigatorType> = SceneComponent<K> | SceneOptions<K>
|
|
18
|
-
|
|
19
|
-
export type Scenes<K extends NavigatorType> = {
|
|
20
|
-
[x:string] : Scene<K>
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type SceneProps = any
|
|
24
|
-
|
|
25
|
-
export type NavigationProps<T extends NavigatorType> = {
|
|
26
|
-
type: T
|
|
27
|
-
scenes: Scenes<T>
|
|
28
|
-
} & PropTypes[T]['Navigator']
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Navigation } from './Navigation'
|
|
3
|
-
|
|
4
|
-
export function createAppNavigation(Scenes:any) {
|
|
5
|
-
|
|
6
|
-
const AllScenes = Object.entries<any>(Scenes).reduce((allScenes, [moduleName, content]) => {
|
|
7
|
-
|
|
8
|
-
const subScenes = []
|
|
9
|
-
|
|
10
|
-
for (const [name, sceneContent] of Object.entries(content.scenes)) {
|
|
11
|
-
subScenes.push(
|
|
12
|
-
[`${moduleName}.${name}`, sceneContent],
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return [
|
|
17
|
-
...allScenes,
|
|
18
|
-
...subScenes,
|
|
19
|
-
]
|
|
20
|
-
}, [])
|
|
21
|
-
|
|
22
|
-
const AppScenes = Object.fromEntries(AllScenes)
|
|
23
|
-
|
|
24
|
-
const SCENES_RESULT = Object.fromEntries(
|
|
25
|
-
Object.entries<any>(Scenes)
|
|
26
|
-
.map(([S, { _ig_scenes, exclude, type, navigationProps, ...otherProps }]) => {
|
|
27
|
-
let filterScenes = null
|
|
28
|
-
|
|
29
|
-
if (exclude) {
|
|
30
|
-
filterScenes = Object.fromEntries(
|
|
31
|
-
AllScenes.filter(([path]) => !exclude.some(param => path.startsWith(param))),
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const Component = () => <Navigation
|
|
36
|
-
type={type || 'Stack'}
|
|
37
|
-
scenes={filterScenes || AppScenes}
|
|
38
|
-
screenOptions={{
|
|
39
|
-
headerShown: false,
|
|
40
|
-
...navigationProps?.screenOptions,
|
|
41
|
-
}}
|
|
42
|
-
{...navigationProps}
|
|
43
|
-
/>
|
|
44
|
-
// console.log('SCENES_RESULT create', { _ig_scenes, exclude, type, navigationProps, otherProps })
|
|
45
|
-
|
|
46
|
-
return [S, {
|
|
47
|
-
...otherProps,
|
|
48
|
-
component: Component,
|
|
49
|
-
}]
|
|
50
|
-
}),
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
// console.log('SCENES_RESULT', SCENES_RESULT)
|
|
54
|
-
|
|
55
|
-
return SCENES_RESULT
|
|
56
|
-
}
|
|
57
|
-
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useState, useCallback } from 'react'
|
|
2
|
-
|
|
3
|
-
const initialState = {
|
|
4
|
-
message: '',
|
|
5
|
-
isValid: true,
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const useActionValidate = (validator: any) => {
|
|
9
|
-
const [error, setError] = useState(initialState)
|
|
10
|
-
|
|
11
|
-
const validate = useCallback((value: number) => {
|
|
12
|
-
if (!validator) return
|
|
13
|
-
|
|
14
|
-
const { valid, message } = validator(value, {})
|
|
15
|
-
|
|
16
|
-
setError({
|
|
17
|
-
isValid: valid,
|
|
18
|
-
message: message,
|
|
19
|
-
})
|
|
20
|
-
}, [validator])
|
|
21
|
-
|
|
22
|
-
return {
|
|
23
|
-
onAction: validate,
|
|
24
|
-
message: error?.message,
|
|
25
|
-
isValid: error?.isValid
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
// Type definitions for react-native-keyboard-aware-scroll-view
|
|
2
|
-
// Project: https://github.com/APSL/react-native-keyboard-aware-scroll-view
|
|
3
|
-
// Definitions by: Kyle Roach <https://github.com/iRoachie>
|
|
4
|
-
// TypeScript Version: 2.3.2
|
|
5
|
-
|
|
6
|
-
import * as React from 'react'
|
|
7
|
-
import {
|
|
8
|
-
ScrollViewProps,
|
|
9
|
-
FlatListProps,
|
|
10
|
-
SectionListProps,
|
|
11
|
-
} from 'react-native'
|
|
12
|
-
|
|
13
|
-
interface KeyboardAwareProps {
|
|
14
|
-
/**
|
|
15
|
-
* Catches the reference of the component.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @type {function}
|
|
19
|
-
* @memberof KeyboardAwareProps
|
|
20
|
-
*/
|
|
21
|
-
innerRef?: (ref: JSX.Element) => void
|
|
22
|
-
/**
|
|
23
|
-
* Adds an extra offset that represents the TabBarIOS height.
|
|
24
|
-
*
|
|
25
|
-
* Default is false
|
|
26
|
-
* @type {boolean}
|
|
27
|
-
* @memberof KeyboardAwareProps
|
|
28
|
-
*/
|
|
29
|
-
viewIsInsideTabBar?: boolean
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Coordinates that will be used to reset the scroll when the keyboard hides.
|
|
33
|
-
*
|
|
34
|
-
* @type {{
|
|
35
|
-
* x: number,
|
|
36
|
-
* y: number
|
|
37
|
-
* }}
|
|
38
|
-
* @memberof KeyboardAwareProps
|
|
39
|
-
*/
|
|
40
|
-
resetScrollToCoords?: {
|
|
41
|
-
x: number
|
|
42
|
-
y: number
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Lets the user enable or disable automatic resetScrollToCoords
|
|
47
|
-
*
|
|
48
|
-
* @type {boolean}
|
|
49
|
-
* @memberof KeyboardAwareProps
|
|
50
|
-
*/
|
|
51
|
-
enableResetScrollToCoords?: boolean
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* When focus in TextInput will scroll the position
|
|
55
|
-
*
|
|
56
|
-
* Default is true
|
|
57
|
-
*
|
|
58
|
-
* @type {boolean}
|
|
59
|
-
* @memberof KeyboardAwareProps
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
enableAutomaticScroll?: boolean
|
|
63
|
-
/**
|
|
64
|
-
* Enables keyboard aware settings for Android
|
|
65
|
-
*
|
|
66
|
-
* Default is false
|
|
67
|
-
*
|
|
68
|
-
* @type {boolean}
|
|
69
|
-
* @memberof KeyboardAwareProps
|
|
70
|
-
*/
|
|
71
|
-
enableOnAndroid?: boolean
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Adds an extra offset when focusing the TextInputs.
|
|
75
|
-
*
|
|
76
|
-
* Default is 75
|
|
77
|
-
* @type {number}
|
|
78
|
-
* @memberof KeyboardAwareProps
|
|
79
|
-
*/
|
|
80
|
-
extraHeight?: number
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Adds an extra offset to the keyboard.
|
|
84
|
-
* Useful if you want to stick elements above the keyboard.
|
|
85
|
-
*
|
|
86
|
-
* Default is 0
|
|
87
|
-
*
|
|
88
|
-
* @type {number}
|
|
89
|
-
* @memberof KeyboardAwareProps
|
|
90
|
-
*/
|
|
91
|
-
extraScrollHeight?: number
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Sets the delay time before scrolling to new position
|
|
95
|
-
*
|
|
96
|
-
* Default is 250
|
|
97
|
-
*
|
|
98
|
-
* @type {number}
|
|
99
|
-
* @memberof KeyboardAwareProps
|
|
100
|
-
*/
|
|
101
|
-
keyboardOpeningTime?: number
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Callback when the keyboard will show.
|
|
105
|
-
*
|
|
106
|
-
* @param frames Information about the keyboard frame and animation.
|
|
107
|
-
*/
|
|
108
|
-
onKeyboardWillShow?: (frames: Object) => void
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Callback when the keyboard did show.
|
|
112
|
-
*
|
|
113
|
-
* @param frames Information about the keyboard frame and animation.
|
|
114
|
-
*/
|
|
115
|
-
onKeyboardDidShow?: (frames: Object) => void
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Callback when the keyboard will hide.
|
|
119
|
-
*
|
|
120
|
-
* @param frames Information about the keyboard frame and animation.
|
|
121
|
-
*/
|
|
122
|
-
onKeyboardWillHide?: (frames: Object) => void
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Callback when the keyboard did hide.
|
|
126
|
-
*
|
|
127
|
-
* @param frames Information about the keyboard frame and animation.
|
|
128
|
-
*/
|
|
129
|
-
onKeyboardDidHide?: (frames: Object) => void
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Callback when the keyboard frame will change.
|
|
133
|
-
*
|
|
134
|
-
* @param frames Information about the keyboard frame and animation.
|
|
135
|
-
*/
|
|
136
|
-
onKeyboardWillChangeFrame?: (frames: Object) => void
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Callback when the keyboard frame did change.
|
|
140
|
-
*
|
|
141
|
-
* @param frames Information about the keyboard frame and animation.
|
|
142
|
-
*/
|
|
143
|
-
onKeyboardDidChangeFrame?: (frames: Object) => void
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
interface KeyboardAwareScrollViewProps
|
|
147
|
-
extends KeyboardAwareProps,
|
|
148
|
-
ScrollViewProps {}
|
|
149
|
-
interface KeyboardAwareFlatListProps<ItemT>
|
|
150
|
-
extends KeyboardAwareProps,
|
|
151
|
-
FlatListProps<ItemT> {}
|
|
152
|
-
interface KeyboardAwareSectionListProps<ItemT>
|
|
153
|
-
extends KeyboardAwareProps,
|
|
154
|
-
SectionListProps<ItemT> {}
|
|
155
|
-
|
|
156
|
-
interface KeyboardAwareState {
|
|
157
|
-
keyboardSpace: number
|
|
158
|
-
}
|
|
159
|
-
|