@codeleap/mobile 2.3.26 → 2.3.27
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/ActionIcon/index.js +1 -5
- package/dist/components/ActionIcon/index.js.map +1 -1
- package/dist/components/ActivityIndicator/index.js +1 -5
- package/dist/components/ActivityIndicator/index.js.map +1 -1
- package/dist/components/Animated.d.ts +1 -110
- package/dist/components/Animated.js +1 -5
- package/dist/components/Animated.js.map +1 -1
- package/dist/components/AutoComplete/index.js +1 -5
- package/dist/components/AutoComplete/index.js.map +1 -1
- package/dist/components/Backdrop/index.d.ts +3 -3
- package/dist/components/Backdrop/index.js +2 -6
- package/dist/components/Backdrop/index.js.map +1 -1
- package/dist/components/Button/index.d.ts +4 -4
- package/dist/components/Button/index.js +1 -5
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Calendar/index.js +1 -5
- package/dist/components/Calendar/index.js.map +1 -1
- package/dist/components/Checkbox/index.js +1 -5
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/ContentView/index.js +1 -5
- package/dist/components/ContentView/index.js.map +1 -1
- package/dist/components/Drawer/index.js +1 -5
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/EmptyPlaceholder/index.js +1 -5
- package/dist/components/EmptyPlaceholder/index.js.map +1 -1
- package/dist/components/FileInput/index.js +1 -5
- package/dist/components/FileInput/index.js.map +1 -1
- package/dist/components/Grid/index.js +1 -5
- package/dist/components/Grid/index.js.map +1 -1
- package/dist/components/Icon/index.js +1 -5
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Image/index.js +1 -5
- package/dist/components/Image/index.js.map +1 -1
- package/dist/components/ImageView/Spotlight.d.ts +1 -1
- package/dist/components/ImageView/Spotlight.js +1 -5
- package/dist/components/ImageView/Spotlight.js.map +1 -1
- package/dist/components/ImageView/component.js +1 -5
- package/dist/components/ImageView/component.js.map +1 -1
- package/dist/components/ImageView/index.js +1 -5
- package/dist/components/ImageView/index.js.map +1 -1
- package/dist/components/InputLabel/index.js +1 -5
- package/dist/components/InputLabel/index.js.map +1 -1
- package/dist/components/List/index.js +1 -5
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/Modal/index.js +1 -5
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/MultiSelect/index.js +1 -5
- package/dist/components/MultiSelect/index.js.map +1 -1
- package/dist/components/Navigation/Navigation.js +1 -5
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/Navigation/index.js +1 -5
- package/dist/components/Navigation/index.js.map +1 -1
- package/dist/components/Pager/index.js +1 -5
- package/dist/components/Pager/index.js.map +1 -1
- package/dist/components/RadioInput/index.js +1 -5
- package/dist/components/RadioInput/index.js.map +1 -1
- package/dist/components/Scroll/index.d.ts +105 -1
- package/dist/components/Scroll/index.js +2 -6
- package/dist/components/Scroll/index.js.map +1 -1
- package/dist/components/Sections/index.d.ts +105 -1
- package/dist/components/Sections/index.js +1 -5
- package/dist/components/Sections/index.js.map +1 -1
- package/dist/components/SegmentedControl/index.js +1 -5
- package/dist/components/SegmentedControl/index.js.map +1 -1
- package/dist/components/Select/index.js +1 -5
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Slider/index.js +1 -5
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Switch/index.js +1 -5
- package/dist/components/Switch/index.js.map +1 -1
- package/dist/components/Text/index.js +1 -5
- package/dist/components/Text/index.js.map +1 -1
- package/dist/components/TextInput/index.js +1 -5
- package/dist/components/TextInput/index.js.map +1 -1
- package/dist/components/Touchable/index.d.ts +2 -2
- package/dist/components/Touchable/index.js +1 -5
- package/dist/components/Touchable/index.js.map +1 -1
- package/dist/components/View/index.d.ts +7 -116
- package/dist/components/View/index.js +2 -8
- package/dist/components/View/index.js.map +1 -1
- package/dist/components/components.d.ts +0 -2
- package/dist/components/components.js +1 -20
- package/dist/components/components.js.map +1 -1
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/modules/textInputMask.js +1 -5
- package/dist/modules/textInputMask.js.map +1 -1
- package/dist/types/index.js +1 -5
- package/dist/types/index.js.map +1 -1
- package/dist/types/utility.d.ts +8 -2
- package/dist/utils/KeyboardAware/index.js +1 -5
- package/dist/utils/KeyboardAware/index.js.map +1 -1
- package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.js +0 -12
- package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.js.map +1 -1
- package/dist/utils/ModalManager/components.js +1 -5
- package/dist/utils/ModalManager/components.js.map +1 -1
- package/dist/utils/ModalManager/context.js +1 -5
- package/dist/utils/ModalManager/context.js.map +1 -1
- package/dist/utils/OSAlert.js.map +1 -1
- package/dist/utils/PermissionManager/context.js +4 -8
- package/dist/utils/PermissionManager/context.js.map +1 -1
- package/dist/utils/index.js +1 -5
- package/dist/utils/index.js.map +1 -1
- package/package.json +9 -8
- package/src/components/Backdrop/index.tsx +5 -3
- package/src/components/Grid/index.tsx +4 -3
- package/src/components/ImageView/Spotlight.tsx +1 -1
- package/src/components/Pager/index.tsx +1 -0
- package/src/components/Scroll/index.tsx +1 -1
- package/src/components/SegmentedControl/index.tsx +1 -0
- package/src/components/Text/index.tsx +1 -0
- package/src/components/Touchable/index.tsx +17 -15
- package/src/components/View/index.tsx +16 -13
- package/src/components/components.ts +1 -4
- package/src/types/utility.ts +12 -5
- package/src/utils/KeyboardAware/lib/KeyboardAwareHOC.tsx +3 -29
- package/src/utils/PermissionManager/context.tsx +3 -4
- package/CodeLeap-Mobile-Packages.code-workspace +0 -8
- package/dist/components/legacy/Modal/index.d.ts +0 -28
- package/dist/components/legacy/Modal/index.js +0 -114
- package/dist/components/legacy/Modal/index.js.map +0 -1
- package/dist/components/legacy/Modal/styles.d.ts +0 -64
- package/dist/components/legacy/Modal/styles.js +0 -60
- package/dist/components/legacy/Modal/styles.js.map +0 -1
- package/dist/components/legacy/Pager/index.d.ts +0 -20
- package/dist/components/legacy/Pager/index.js +0 -168
- package/dist/components/legacy/Pager/index.js.map +0 -1
- package/dist/components/legacy/Pager/styles.d.ts +0 -54
- package/dist/components/legacy/Pager/styles.js +0 -44
- package/dist/components/legacy/Pager/styles.js.map +0 -1
- package/dist/components/legacy/index.d.ts +0 -2
- package/dist/components/legacy/index.js +0 -19
- package/dist/components/legacy/index.js.map +0 -1
- package/src/components/legacy/Modal/index.tsx +0 -163
- package/src/components/legacy/Modal/styles.ts +0 -125
- package/src/components/legacy/Pager/index.tsx +0 -242
- package/src/components/legacy/Pager/styles.ts +0 -51
- package/src/components/legacy/index.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/utils/PermissionManager/context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/utils/PermissionManager/context.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAmD;AACnD,mDAAyD;AACzD,2CAA6H;AAC7H,6CAAgD;AAUhD,IAAM,iBAAiB,GAAG,eAAK,CAAC,aAAa,CAAC,EAAwB,CAAC,CAAA;AAQvE,SAAS,WAAW,CAAC,KAAwB;IAC3C,IAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,UAAC,EAAM;YAAL,CAAC,QAAA,EAAE,CAAC,QAAA;QAAM,OAAA,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC;IAAb,CAAa,CAAC,CAAA;IACrE,OAAO,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;AACrC,CAAC;AAED,SAAgB,QAAQ,CAAC,EAAiE;QAA/D,QAAQ,cAAA,EAAE,cAAc,oBAAA,EAAE,WAAW,iBAAA;IAExD,IAAA,KAAoB,IAAA,gBAAQ,EAAC,cAAM,OAAA,WAAW,CAAC,cAAc,CAAC,MAA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BACxB,mBAAmB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;yBACtC;wBACD,wBAAK;;wBAIL,sBAAO,CAAC,YAAY,EAAE,CAAA;wBACtB,wBAAK;;;;;KAGV;IAED,SAAS,MAAM;QACb,mBAAmB,EAAE,CAAA;IACvB,CAAC;IAED,OAAO;QACL,OAAO,SAAA;QACP,MAAM,QAAA;QACN,OAAO,SAAA;QACP,cAAc,gBAAA;QACd,UAAU,eACL,UAAU,CAEd;QACD,YAAY,cAAA;QACZ,MAAM,QAAA;KACP,CAAA;AACH,CAAC;AAlFD,gDAkFC;AAgBD,SAAgB,0BAA0B,CAIxC,aAAgD;IAEhD,IAAM,eAAe,GAAG,sBAA+E,CAAA;IACvG,IAAM,mBAAmB,GAAG,kBAA4F,CAAA;IAExH,OAAO;QACL,cAAc,EAAE,eAAe;QAC/B,kBAAkB,EAAE,mBAAmB;KAExC,CAAA;AACH,CAAC;AAdD,gEAcC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,kDAA+B;AAC/B,iDAA8B;AAC9B,+DAAkD;AAEzC,kCAAW;AACpB,kDAA+B;AAC/B,0CAAuB;AACvB,0CAAuB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codeleap/mobile",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.27",
|
|
4
4
|
"main": "src/index.ts",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@codeleap/config": "*",
|
|
13
|
-
"@types/react-native": "
|
|
14
|
-
"@types/react-window": "
|
|
15
|
-
"moti": "
|
|
16
|
-
"
|
|
13
|
+
"@types/react-native": "0.66.15",
|
|
14
|
+
"@types/react-window": "1.8.5",
|
|
15
|
+
"moti": "0.18.0",
|
|
16
|
+
"@codeleap/common": "*",
|
|
17
|
+
"typescript": "4.5.4"
|
|
17
18
|
},
|
|
18
19
|
"scripts": {
|
|
19
20
|
"build": "tsc --build",
|
|
@@ -28,8 +29,8 @@
|
|
|
28
29
|
"@react-navigation/native-stack": "^6.2.5",
|
|
29
30
|
"@react-navigation/stack": "^6.1.1",
|
|
30
31
|
"moti": "^0.18.0",
|
|
31
|
-
"react": "
|
|
32
|
-
"react-native": "
|
|
32
|
+
"react": "17.0.2",
|
|
33
|
+
"react-native": "0.66.4",
|
|
33
34
|
"react-native-animatable": "^1.3.3",
|
|
34
35
|
"react-native-calendars": "*",
|
|
35
36
|
"react-native-fast-image": "^8.5.11",
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
40
41
|
"react-native-text-input-mask": "3.1.4",
|
|
41
42
|
"@react-native-community/async-storage": "*",
|
|
42
|
-
"react-native-device-info": "
|
|
43
|
+
"react-native-device-info": "10.3.0"
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
46
|
"@gorhom/portal": "^1.0.13",
|
|
@@ -10,12 +10,14 @@ import { useStaticAnimationStyles } from '../../utils'
|
|
|
10
10
|
import { BackdropComposition, BackdropStyles } from './styles'
|
|
11
11
|
|
|
12
12
|
export * from './styles'
|
|
13
|
-
export type BackdropProps =
|
|
13
|
+
export type BackdropProps = React.PropsWithChildren<
|
|
14
|
+
|
|
15
|
+
PropsOf<typeof Touchable> & {
|
|
14
16
|
visible: boolean
|
|
15
17
|
wrapperProps?: PropsOf<typeof View>
|
|
16
18
|
variants?: ComponentVariants<typeof BackdropStyles>['variants']
|
|
17
19
|
styles?: StylesOf<BackdropComposition>
|
|
18
|
-
}
|
|
20
|
+
}>
|
|
19
21
|
|
|
20
22
|
export const Backdrop = (backdropProps:BackdropProps) => {
|
|
21
23
|
const { variants = [], styles = {}, visible, children, wrapperProps = {}, ...props } = backdropProps
|
|
@@ -39,7 +41,7 @@ export const Backdrop = (backdropProps:BackdropProps) => {
|
|
|
39
41
|
|
|
40
42
|
return <View pointerEvents={visible ? 'auto' : 'none' } animated style={variantStyles.wrapper} state={animation} {...wrapperProps}>
|
|
41
43
|
{
|
|
42
|
-
props?.onPress ?
|
|
44
|
+
!!props?.onPress ?
|
|
43
45
|
<Touchable style={variantStyles.touchable} {...props} noFeedback android_ripple={null}/>
|
|
44
46
|
: null
|
|
45
47
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from '@codeleap/common'
|
|
7
7
|
|
|
8
8
|
import { FlatGrid, FlatGridProps, GridRenderItemInfo } from 'react-native-super-grid'
|
|
9
|
-
import { RefreshControl, StyleSheet, RefreshControlProps } from 'react-native'
|
|
9
|
+
import { RefreshControl, StyleSheet, RefreshControlProps, ScrollView } from 'react-native'
|
|
10
10
|
import { View, ViewProps } from '../View'
|
|
11
11
|
import { EmptyPlaceholder, EmptyPlaceholderProps } from '../EmptyPlaceholder'
|
|
12
12
|
import { GridComposition, GridStyles } from './styles'
|
|
@@ -26,6 +26,7 @@ export type ReplaceFlatGridProps<P, T> = Omit<P, DataboundFlatGridPropsTypes> &
|
|
|
26
26
|
) => { length: number; offset: number; index: number })
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
|
|
29
30
|
export * from './styles'
|
|
30
31
|
|
|
31
32
|
export type GridProps<
|
|
@@ -41,7 +42,7 @@ export type GridProps<
|
|
|
41
42
|
refreshControlProps?: Partial<RefreshControlProps>
|
|
42
43
|
} & ComponentVariants<typeof GridStyles>
|
|
43
44
|
|
|
44
|
-
const GridCP = forwardRef<
|
|
45
|
+
const GridCP = forwardRef<ScrollView, GridProps>(
|
|
45
46
|
(flatGridProps, ref) => {
|
|
46
47
|
const {
|
|
47
48
|
variants = [],
|
|
@@ -79,7 +80,7 @@ const GridCP = forwardRef<FlatGrid, GridProps>(
|
|
|
79
80
|
const _gridProps = {
|
|
80
81
|
style: [variantStyles.wrapper, style],
|
|
81
82
|
contentContainerStyle: variantStyles.content,
|
|
82
|
-
ref: ref
|
|
83
|
+
ref: ref ,
|
|
83
84
|
ItemSeparatorComponent: separator,
|
|
84
85
|
refreshControl:
|
|
85
86
|
!!onRefresh && (
|
|
@@ -25,7 +25,7 @@ type TSpotlightCtx = {
|
|
|
25
25
|
|
|
26
26
|
const SpotlightCtx = React.createContext({} as TSpotlightCtx)
|
|
27
27
|
|
|
28
|
-
export const SpotlightProvider:React.FC = ({ children }) => {
|
|
28
|
+
export const SpotlightProvider:React.FC<React.PropsWithChildren<any>> = ({ children }) => {
|
|
29
29
|
const [spotlights, setSpotlights] = useState<TSpotlightCtx['spotlights']>({})
|
|
30
30
|
const [indexes, setIndexes] = useState<TSpotlightCtx['indexes']>({})
|
|
31
31
|
const ctxValue:TSpotlightCtx = {
|
|
@@ -109,7 +109,7 @@ export const Scroll = forwardRef<ScrollView, ScrollProps>(
|
|
|
109
109
|
...keyboardAware,
|
|
110
110
|
|
|
111
111
|
})
|
|
112
|
-
const Component = animated ? MotiScrollView : ScrollView
|
|
112
|
+
const Component = (animated ? MotiScrollView : ScrollView ) as unknown as typeof ScrollView
|
|
113
113
|
|
|
114
114
|
return (
|
|
115
115
|
<Component
|
|
@@ -10,6 +10,7 @@ import { Text, TextProps } from '../Text'
|
|
|
10
10
|
import { KeyboardAwareScrollViewTypes } from '../../modules'
|
|
11
11
|
import { View } from '../View'
|
|
12
12
|
import { InputLabel } from '../InputLabel'
|
|
13
|
+
|
|
13
14
|
export * from './styles'
|
|
14
15
|
export type SegmentedControlRef =KeyboardAwareScrollViewTypes.KeyboardAwareScrollView & {
|
|
15
16
|
scrollTo: (index: number) => void
|
|
@@ -89,6 +89,7 @@ export const Text = forwardRef<NativeText, TextProps>((textProps, ref) => {
|
|
|
89
89
|
onPress: pressDisabled ? null : _onPress,
|
|
90
90
|
} : {}
|
|
91
91
|
|
|
92
|
+
|
|
92
93
|
return <Component {...props}
|
|
93
94
|
onPressIn={handlePress(true)} onPressOut={handlePress(false)}
|
|
94
95
|
style={[styles, colorStyle, feedbackStyle, !!onPress && pressDisabled ? variantStyles['text:disabled'] : null]}
|
|
@@ -17,22 +17,24 @@ import { TouchableComposition, TouchableStyles } from './styles'
|
|
|
17
17
|
import { StylesOf } from '../../types'
|
|
18
18
|
import { View } from '../View'
|
|
19
19
|
import { usePressableFeedback } from '../../utils'
|
|
20
|
-
export type TouchableProps =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
export type TouchableProps = React.PropsWithChildren<
|
|
21
|
+
Omit<
|
|
22
|
+
ComponentPropsWithoutRef<typeof Pressable>,
|
|
23
|
+
'onPress'|'children'
|
|
24
|
+
> & {
|
|
25
|
+
variants?: ComponentVariants<typeof TouchableStyles>['variants']
|
|
26
|
+
component?: any
|
|
27
|
+
ref?: React.Ref<RNView>
|
|
28
|
+
debugName: string
|
|
29
|
+
activeOpacity?: number
|
|
30
|
+
debugComponent?: string
|
|
31
|
+
onPress?: AnyFunction
|
|
32
|
+
noFeedback?: boolean
|
|
33
|
+
debounce?: number
|
|
34
|
+
leadingDebounce?: boolean
|
|
35
|
+
styles?: StylesOf<TouchableComposition>
|
|
35
36
|
} & BaseViewProps
|
|
37
|
+
>
|
|
36
38
|
export * from './styles'
|
|
37
39
|
|
|
38
40
|
export const Touchable: React.FC<TouchableProps> = forwardRef<
|
|
@@ -12,18 +12,26 @@ import {
|
|
|
12
12
|
import { View as NativeView } from 'react-native'
|
|
13
13
|
import { MotiView, MotiProps } from 'moti'
|
|
14
14
|
import { GetKeyboardAwarePropsOptions, useKeyboardAwareView } from '../../utils'
|
|
15
|
+
import {TransitionConfig} from '../../types'
|
|
15
16
|
|
|
16
17
|
export * from './styles'
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
ComponentVariants<typeof ViewStyles> & {
|
|
20
|
-
ref?: any
|
|
21
|
-
component?: any
|
|
22
|
-
animated?: boolean
|
|
23
|
-
keyboardAware?: GetKeyboardAwarePropsOptions
|
|
24
|
-
} & BaseViewProps
|
|
19
|
+
type MotiViewProps = Omit< Partial<MotiProps>, 'transition'|'children'>
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
type NativeViewProps =Omit<ComponentPropsWithoutRef<typeof NativeView>, 'children'>
|
|
22
|
+
|
|
23
|
+
export type ViewProps = React.PropsWithChildren<{
|
|
24
|
+
ref?: any
|
|
25
|
+
component?: any
|
|
26
|
+
animated?: boolean
|
|
27
|
+
keyboardAware?: GetKeyboardAwarePropsOptions
|
|
28
|
+
transition?: Partial<TransitionConfig>
|
|
29
|
+
} &
|
|
30
|
+
NativeViewProps & ComponentVariants<typeof ViewStyles> & BaseViewProps & MotiViewProps
|
|
31
|
+
>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export const View: React.FC<ViewProps> = forwardRef<NativeView,ViewProps>((viewProps, ref) => {
|
|
27
35
|
const {
|
|
28
36
|
responsiveVariants = {},
|
|
29
37
|
variants = [],
|
|
@@ -60,11 +68,6 @@ export const View: React.FC<ViewProps & Partial<MotiProps>> = forwardRef<NativeV
|
|
|
60
68
|
)
|
|
61
69
|
})
|
|
62
70
|
|
|
63
|
-
export const AnimatedView = Animatable.createAnimatableComponent(
|
|
64
|
-
View,
|
|
65
|
-
) as unknown as React.ForwardRefExoticComponent<
|
|
66
|
-
{ transition?: any; animation?: any } & ViewProps
|
|
67
|
-
>
|
|
68
71
|
|
|
69
72
|
type GapProps = ViewProps & {
|
|
70
73
|
value: number
|
package/src/types/utility.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react'
|
|
1
2
|
import { StyleProp } from 'react-native'
|
|
2
3
|
import { EasingFunction } from 'react-native-animatable'
|
|
3
4
|
|
|
4
5
|
export type StylesOf<C extends string> = Partial<Record<C, StyleProp<any>>>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
type TransitionBase = {
|
|
7
|
+
easing?: EasingFunction
|
|
8
|
+
type?: string
|
|
9
|
+
duration?: number
|
|
10
|
+
}
|
|
11
|
+
export type TransitionConfig = TransitionBase | {
|
|
12
|
+
[p: string] : TransitionBase
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export type ChildrenProp = ReactNode | ReactNode[] | undefined
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* @flow */
|
|
3
3
|
|
|
4
4
|
import React from 'react'
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
import {
|
|
7
7
|
Keyboard,
|
|
8
8
|
Platform,
|
|
@@ -45,13 +45,7 @@ const supportedKeyboardEvents: KeyboardEventName[] = [
|
|
|
45
45
|
'keyboardDidChangeFrame',
|
|
46
46
|
]
|
|
47
47
|
const keyboardEventToCallbackName = (eventName: string) => 'on' + eventName[0].toUpperCase() + eventName.substring(1)
|
|
48
|
-
|
|
49
|
-
(acc: Object, eventName: string) => ({
|
|
50
|
-
...acc,
|
|
51
|
-
[keyboardEventToCallbackName(eventName)]: PropTypes.func,
|
|
52
|
-
}),
|
|
53
|
-
{},
|
|
54
|
-
)
|
|
48
|
+
|
|
55
49
|
const keyboardAwareHOCTypeEvents = supportedKeyboardEvents.reduce(
|
|
56
50
|
(acc: Object, eventName: string) => ({
|
|
57
51
|
...acc,
|
|
@@ -181,27 +175,7 @@ class KeyboardAwareScrollable extends React.Component<KeyboardAwareHOCProps, Key
|
|
|
181
175
|
|
|
182
176
|
static displayName = `KeyboardAware`
|
|
183
177
|
|
|
184
|
-
|
|
185
|
-
viewIsInsideTabBar: PropTypes.bool,
|
|
186
|
-
resetScrollToCoords: PropTypes.shape({
|
|
187
|
-
x: PropTypes.number.isRequired,
|
|
188
|
-
y: PropTypes.number.isRequired,
|
|
189
|
-
}),
|
|
190
|
-
enableResetScrollToCoords: PropTypes.bool,
|
|
191
|
-
enableAutomaticScroll: PropTypes.bool,
|
|
192
|
-
extraHeight: PropTypes.number,
|
|
193
|
-
extraScrollHeight: PropTypes.number,
|
|
194
|
-
keyboardOpeningTime: PropTypes.number,
|
|
195
|
-
onScroll: PropTypes.oneOfType([
|
|
196
|
-
PropTypes.func, // Normal listener
|
|
197
|
-
PropTypes.object, // Animated.event listener
|
|
198
|
-
]),
|
|
199
|
-
update: PropTypes.func,
|
|
200
|
-
contentContainerStyle: PropTypes.any,
|
|
201
|
-
enableOnAndroid: PropTypes.bool,
|
|
202
|
-
innerRef: PropTypes.func,
|
|
203
|
-
...keyboardEventPropTypes,
|
|
204
|
-
}
|
|
178
|
+
|
|
205
179
|
|
|
206
180
|
// HOC options are used to init default props, so that these options can be overriden with component props
|
|
207
181
|
static defaultProps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useContext, useState } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { useModalContext } from '../ModalManager/context'
|
|
3
3
|
import { deepEqual, onMount, onUpdate, PermissionManager, PermissionTypes, useDebounce, usePrevious } from '@codeleap/common'
|
|
4
4
|
import { AppState, Linking } from 'react-native'
|
|
5
5
|
import { PermissionConfig, PermissionModalsConfig } from './types'
|
|
@@ -84,7 +84,7 @@ export type UsePermissions<
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
export const usePermissions:UsePermissions<any> = () => {
|
|
87
|
-
const modalCtx =
|
|
87
|
+
const modalCtx = useModalContext()
|
|
88
88
|
const permissionCtx = useContext(PermissionContext)
|
|
89
89
|
|
|
90
90
|
function askPermission(name: string, onResolve?: (status: PermissionTypes.PermissionStatus, modalName?: string) => any) {
|
|
@@ -202,7 +202,7 @@ export const usePermissions:UsePermissions<any> = () => {
|
|
|
202
202
|
export function usePermissionModal(permissionName: string) {
|
|
203
203
|
|
|
204
204
|
const modalId = `permissions.${permissionName}`
|
|
205
|
-
const modals =
|
|
205
|
+
const modals = useModalContext()
|
|
206
206
|
const permissionCtx = usePermissions()
|
|
207
207
|
const modalState = modals.state[modalId]
|
|
208
208
|
|
|
@@ -280,7 +280,6 @@ export function usePermissionModal(permissionName: string) {
|
|
|
280
280
|
},
|
|
281
281
|
currentState,
|
|
282
282
|
config,
|
|
283
|
-
|
|
284
283
|
}
|
|
285
284
|
}
|
|
286
285
|
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ViewProps } from '../../View';
|
|
3
|
-
import { ButtonProps } from '../../Button';
|
|
4
|
-
import { ComponentVariants, IconPlaceholder } from '@codeleap/common';
|
|
5
|
-
import { MobileModalComposition, MobileModalStyles } from './styles';
|
|
6
|
-
import { StylesOf } from '../../../types/utility';
|
|
7
|
-
import { GetKeyboardAwarePropsOptions } from '../../../utils';
|
|
8
|
-
export * from './styles';
|
|
9
|
-
export declare type ModalProps = Omit<ViewProps, 'variants' | 'styles'> & {
|
|
10
|
-
variants?: ComponentVariants<typeof MobileModalStyles>['variants'];
|
|
11
|
-
styles?: StylesOf<MobileModalComposition>;
|
|
12
|
-
dismissOnBackdrop?: boolean;
|
|
13
|
-
buttonProps?: ButtonProps;
|
|
14
|
-
accessible?: boolean;
|
|
15
|
-
showClose?: boolean;
|
|
16
|
-
closable?: boolean;
|
|
17
|
-
footer?: React.ReactNode;
|
|
18
|
-
title?: React.ReactNode;
|
|
19
|
-
debugName?: string;
|
|
20
|
-
closeIconName?: IconPlaceholder;
|
|
21
|
-
visible: boolean;
|
|
22
|
-
toggle?: () => void;
|
|
23
|
-
zIndex?: number;
|
|
24
|
-
scroll?: boolean;
|
|
25
|
-
keyboardAware?: GetKeyboardAwarePropsOptions;
|
|
26
|
-
};
|
|
27
|
-
export declare const Modal: React.FC<ModalProps>;
|
|
28
|
-
export default Modal;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
37
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
38
|
-
};
|
|
39
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
40
|
-
var t = {};
|
|
41
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
42
|
-
t[p] = s[p];
|
|
43
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
44
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
45
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
46
|
-
t[p[i]] = s[p[i]];
|
|
47
|
-
}
|
|
48
|
-
return t;
|
|
49
|
-
};
|
|
50
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
exports.Modal = void 0;
|
|
52
|
-
var React = __importStar(require("react"));
|
|
53
|
-
var View_1 = require("../../View");
|
|
54
|
-
var Button_1 = require("../../Button");
|
|
55
|
-
var Scroll_1 = require("../../Scroll");
|
|
56
|
-
var common_1 = require("@codeleap/common");
|
|
57
|
-
var react_native_1 = require("react-native");
|
|
58
|
-
var Touchable_1 = require("../../Touchable");
|
|
59
|
-
var Text_1 = require("../../Text");
|
|
60
|
-
var Animated_1 = require("../../Animated");
|
|
61
|
-
__exportStar(require("./styles"), exports);
|
|
62
|
-
var Modal = function (modalProps) {
|
|
63
|
-
var _a = modalProps.variants, variants = _a === void 0 ? [] : _a, _b = modalProps.styles, styles = _b === void 0 ? {} : _b, visible = modalProps.visible, showClose = modalProps.showClose, _c = modalProps.closable, closable = _c === void 0 ? true : _c, title = modalProps.title, footer = modalProps.footer, children = modalProps.children, _d = modalProps.toggle, toggle = _d === void 0 ? function () { return null; } : _d, _e = modalProps.dismissOnBackdrop, dismissOnBackdrop = _e === void 0 ? true : _e, _f = modalProps.closeIconName, closeIconName = _f === void 0 ? 'close' : _f, debugName = modalProps.debugName, _g = modalProps.scroll, scroll = _g === void 0 ? true : _g, keyboardAware = modalProps.keyboardAware, _h = modalProps.zIndex, zIndex = _h === void 0 ? null : _h, props = __rest(modalProps, ["variants", "styles", "visible", "showClose", "closable", "title", "footer", "children", "toggle", "dismissOnBackdrop", "closeIconName", "debugName", "scroll", "keyboardAware", "zIndex"]);
|
|
64
|
-
var variantStyles = (0, common_1.useDefaultComponentStyle)('Modal', {
|
|
65
|
-
variants: variants,
|
|
66
|
-
transform: react_native_1.StyleSheet.flatten,
|
|
67
|
-
styles: styles,
|
|
68
|
-
});
|
|
69
|
-
function getStyles(key) {
|
|
70
|
-
var s = [
|
|
71
|
-
variantStyles[key],
|
|
72
|
-
styles[key],
|
|
73
|
-
visible ? variantStyles[key + ':visible'] : {},
|
|
74
|
-
visible ? styles[key + ':visible'] : {},
|
|
75
|
-
];
|
|
76
|
-
return s;
|
|
77
|
-
}
|
|
78
|
-
var buttonStyles = React.useMemo(function () {
|
|
79
|
-
var buttonEntries = {};
|
|
80
|
-
for (var _i = 0, _a = Object.entries(variantStyles); _i < _a.length; _i++) {
|
|
81
|
-
var _b = _a[_i], key = _b[0], style = _b[1];
|
|
82
|
-
if (key.startsWith('closeButton')) {
|
|
83
|
-
buttonEntries[(0, common_1.capitalize)(key.replace('closeButton', ''), true)] = style;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return buttonEntries;
|
|
87
|
-
}, [variantStyles]);
|
|
88
|
-
var boxAnimation = {
|
|
89
|
-
hidden: __assign(__assign({}, variantStyles['box:pose']), styles['box:pose']),
|
|
90
|
-
visible: __assign(__assign({}, variantStyles['box:pose:visible']), styles['box:pose:visible']),
|
|
91
|
-
};
|
|
92
|
-
var wrapperStyle = react_native_1.StyleSheet.flatten(getStyles('wrapper'));
|
|
93
|
-
return (<View_1.View style={[wrapperStyle, { zIndex: typeof zIndex === 'number' ? zIndex : wrapperStyle === null || wrapperStyle === void 0 ? void 0 : wrapperStyle.zIndex }]} pointerEvents={visible ? 'auto' : 'none'}>
|
|
94
|
-
<View_1.AnimatedView style={getStyles('overlay')} transition={'opacity'}/>
|
|
95
|
-
<Scroll_1.Scroll style={getStyles('innerWrapper')} contentContainerStyle={getStyles('innerWrapperScroll')} scrollEnabled={scroll} keyboardAware={keyboardAware}>
|
|
96
|
-
{dismissOnBackdrop && (<Touchable_1.Touchable debugName={"".concat(debugName, " modal backdrop")} activeOpacity={1} onPress={function () { return toggle(); }} style={getStyles('touchableBackdrop')}/>)}
|
|
97
|
-
<Animated_1.Animated component='View' config={boxAnimation} pose={visible ? 'visible' : 'hidden'} style={getStyles('box')}>
|
|
98
|
-
{(title || showClose) && (<View_1.View style={getStyles('header')}>
|
|
99
|
-
{typeof title === 'string' ? (<Text_1.Text text={title} style={getStyles('title')}/>) : (title)}
|
|
100
|
-
|
|
101
|
-
{showClose && closable && (<Button_1.Button debugName={"".concat(debugName, " modal close button")} icon={closeIconName} variants={['icon']} onPress={toggle} styles={buttonStyles}/>)}
|
|
102
|
-
</View_1.View>)}
|
|
103
|
-
|
|
104
|
-
<View_1.View style={getStyles('body')}>{children}</View_1.View>
|
|
105
|
-
{footer && (<View_1.View style={getStyles('footer')}>
|
|
106
|
-
{typeof footer === 'string' ? <Text_1.Text text={footer}/> : footer}
|
|
107
|
-
</View_1.View>)}
|
|
108
|
-
</Animated_1.Animated>
|
|
109
|
-
</Scroll_1.Scroll>
|
|
110
|
-
</View_1.View>);
|
|
111
|
-
};
|
|
112
|
-
exports.Modal = Modal;
|
|
113
|
-
exports.default = exports.Modal;
|
|
114
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/legacy/Modal/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,mCAA0D;AAC1D,uCAAkD;AAClD,uCAAqC;AACrC,2CAKyB;AAMzB,6CAAyC;AAGzC,6CAA2C;AAC3C,mCAAiC;AACjC,2CAAyC;AAGzC,2CAAwB;AAqBjB,IAAM,KAAK,GAAyB,UAAC,UAAU;IAElD,IAAA,KAgBE,UAAU,SAhBC,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAeE,UAAU,OAfD,EAAX,MAAM,mBAAG,EAAE,KAAA,EACX,OAAO,GAcL,UAAU,QAdL,EACP,SAAS,GAaP,UAAU,UAbH,EACT,KAYE,UAAU,SAZG,EAAf,QAAQ,mBAAG,IAAI,KAAA,EACf,KAAK,GAWH,UAAU,MAXP,EACL,MAAM,GAUJ,UAAU,OAVN,EACN,QAAQ,GASN,UAAU,SATJ,EACR,KAQE,UAAU,OARO,EAAnB,MAAM,mBAAG,cAAM,OAAA,IAAI,EAAJ,CAAI,KAAA,EACnB,KAOE,UAAU,kBAPY,EAAxB,iBAAiB,mBAAG,IAAI,KAAA,EACxB,KAME,UAAU,cANW,EAAvB,aAAa,mBAAG,OAAO,KAAA,EACvB,SAAS,GAKP,UAAU,UALH,EACT,KAIE,UAAU,OAJC,EAAb,MAAM,mBAAG,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