@codeleap/mobile 5.0.9 → 5.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/components/Autocomplete/types.d.ts +1 -2
  2. package/dist/components/Backdrop/index.js +2 -2
  3. package/dist/components/Backdrop/index.js.map +1 -1
  4. package/dist/components/DatePickerModal/index.js +2 -3
  5. package/dist/components/DatePickerModal/index.js.map +1 -1
  6. package/dist/components/Modal/index.d.ts +0 -1
  7. package/dist/components/Modal/index.js +25 -41
  8. package/dist/components/Modal/index.js.map +1 -1
  9. package/dist/components/Modal/styles.d.ts +1 -1
  10. package/dist/components/Modal/types.d.ts +1 -2
  11. package/dist/components/Pager/PagerItem.d.ts +7 -0
  12. package/dist/components/Pager/PagerItem.js +12 -0
  13. package/dist/components/Pager/PagerItem.js.map +1 -0
  14. package/dist/components/Pager/index.js +34 -25
  15. package/dist/components/Pager/index.js.map +1 -1
  16. package/dist/components/Pager/types.d.ts +2 -3
  17. package/dist/components/Select/index.js +4 -5
  18. package/dist/components/Select/index.js.map +1 -1
  19. package/dist/components/Select/types.d.ts +1 -2
  20. package/dist/components/SortablePhotos/useSortablePhotos.js +2 -6
  21. package/dist/components/SortablePhotos/useSortablePhotos.js.map +1 -1
  22. package/dist/deprecated/index.d.ts +1 -0
  23. package/dist/deprecated/index.js +2 -0
  24. package/dist/deprecated/index.js.map +1 -1
  25. package/dist/{utils/ModalManager/context.js → deprecated/modals/Context.js} +3 -6
  26. package/dist/deprecated/modals/Context.js.map +1 -0
  27. package/dist/{utils/ModalManager → deprecated/modals}/components.js +1 -1
  28. package/dist/deprecated/modals/components.js.map +1 -0
  29. package/dist/{utils/ModalManager → deprecated/modals}/index.d.ts +1 -1
  30. package/dist/{utils/ModalManager → deprecated/modals}/index.js +1 -1
  31. package/dist/deprecated/modals/index.js.map +1 -0
  32. package/dist/deprecated/permissions/Context.js +1 -1
  33. package/dist/deprecated/permissions/Context.js.map +1 -1
  34. package/dist/index.d.ts +1 -2
  35. package/dist/index.js +1 -2
  36. package/dist/index.js.map +1 -1
  37. package/dist/types/utility.d.ts +8 -0
  38. package/dist/utils/index.d.ts +0 -2
  39. package/dist/utils/index.js +0 -2
  40. package/dist/utils/index.js.map +1 -1
  41. package/package.json +27 -25
  42. package/package.json.bak +14 -12
  43. package/src/components/Autocomplete/types.ts +1 -2
  44. package/src/components/Backdrop/index.tsx +2 -2
  45. package/src/components/DatePickerModal/index.tsx +2 -3
  46. package/src/components/Modal/index.tsx +77 -96
  47. package/src/components/Modal/styles.ts +0 -1
  48. package/src/components/Modal/types.ts +1 -2
  49. package/src/components/Pager/PagerItem.tsx +20 -0
  50. package/src/components/Pager/index.tsx +57 -32
  51. package/src/components/Pager/types.ts +2 -3
  52. package/src/components/Select/index.tsx +4 -4
  53. package/src/components/Select/types.ts +1 -2
  54. package/src/components/SortablePhotos/useSortablePhotos.ts +2 -7
  55. package/src/deprecated/index.ts +2 -1
  56. package/src/{utils/ModalManager/context.tsx → deprecated/modals/Context.tsx} +9 -11
  57. package/src/{utils/ModalManager → deprecated/modals}/components.tsx +5 -5
  58. package/src/{utils/ModalManager → deprecated/modals}/index.ts +2 -2
  59. package/src/deprecated/permissions/Context.tsx +1 -1
  60. package/src/index.ts +1 -2
  61. package/src/types/utility.ts +8 -0
  62. package/src/utils/index.ts +0 -2
  63. package/dist/utils/KeyboardAware/context.d.ts +0 -14
  64. package/dist/utils/KeyboardAware/context.js +0 -15
  65. package/dist/utils/KeyboardAware/context.js.map +0 -1
  66. package/dist/utils/KeyboardAware/index.d.ts +0 -2
  67. package/dist/utils/KeyboardAware/index.js +0 -3
  68. package/dist/utils/KeyboardAware/index.js.map +0 -1
  69. package/dist/utils/KeyboardAware/keyboardHooks.d.ts +0 -21
  70. package/dist/utils/KeyboardAware/keyboardHooks.js +0 -77
  71. package/dist/utils/KeyboardAware/keyboardHooks.js.map +0 -1
  72. package/dist/utils/ModalManager/components.js.map +0 -1
  73. package/dist/utils/ModalManager/context.js.map +0 -1
  74. package/dist/utils/ModalManager/index.js.map +0 -1
  75. package/src/utils/KeyboardAware/context.tsx +0 -21
  76. package/src/utils/KeyboardAware/index.ts +0 -4
  77. package/src/utils/KeyboardAware/keyboardHooks.ts +0 -110
  78. /package/dist/{utils/ModalManager/context.d.ts → deprecated/modals/Context.d.ts} +0 -0
  79. /package/dist/{utils/ModalManager → deprecated/modals}/components.d.ts +0 -0
@@ -0,0 +1,20 @@
1
+ import { memoBy } from '@codeleap/utils'
2
+ import { PageProps } from './types'
3
+ import { TypeGuards } from '@codeleap/types'
4
+
5
+ type PagerItemComponentProps = PageProps<any> & {
6
+ renderItem: (props: any) => JSX.Element
7
+ }
8
+
9
+ function PagerItemComponent(props: PagerItemComponentProps) {
10
+ const { item, renderItem: RenderItem, ...info } = props
11
+
12
+ if (TypeGuards.isFunction(item)) {
13
+ const ItemComponent = item
14
+ return <ItemComponent {...info} />
15
+ }
16
+
17
+ return <RenderItem {...info} item={item} />
18
+ }
19
+
20
+ export const PagerItem = memoBy(PagerItemComponent, ['renderItem', 'item'])
@@ -1,22 +1,22 @@
1
- import React, { useCallback, useRef, useState } from 'react'
1
+ import React, { useCallback, useEffect, useRef, useState } from 'react'
2
2
  import { ReduceMotion } from 'react-native-reanimated'
3
3
  import Carousel, { ICarouselInstance } from 'react-native-reanimated-carousel'
4
4
  import { CarouselRenderItemInfo, TCarouselProps } from 'react-native-reanimated-carousel/lib/typescript/types'
5
5
  import { Dimensions, LayoutChangeEvent } from 'react-native'
6
- import { TypeGuards } from '@codeleap/types'
7
- import { onUpdate, useConditionalState } from '@codeleap/hooks'
6
+ import { useConditionalState } from '@codeleap/hooks'
8
7
  import { AnyRecord, IJSX, StyledComponentProps, useNestedStylesByKey } from '@codeleap/styles'
9
8
  import { useStylesFor } from '../../hooks'
10
9
  import { MobileStyleRegistry } from '../../Registry'
11
10
  import { View } from '../View'
12
11
  import { PageProps, PagerProps } from './types'
13
12
  import { PagerDots } from './PagerDots'
13
+ import { PagerItem } from './PagerItem'
14
14
 
15
15
  export * from './styles'
16
16
  export * from './types'
17
17
  export * from './PagerDots'
18
18
 
19
- const window = Dimensions.get('window')
19
+ const window = Dimensions.get('screen')
20
20
 
21
21
  export function Pager<T>(props: PagerProps<T>) {
22
22
  const {
@@ -26,73 +26,95 @@ export function Pager<T>(props: PagerProps<T>) {
26
26
  initialPage,
27
27
  style,
28
28
  showDots,
29
- renderItem: RenderItem,
29
+ renderItem,
30
30
  footer,
31
31
  width: carouselWidth,
32
32
  height: carouselHeight,
33
33
  autoCalculateFooterHeight,
34
+ removeFixedHeight,
35
+ removeFixedWidth,
34
36
  ...rest
35
37
  } = {
36
38
  ...Pager.defaultProps,
37
39
  ...props,
38
40
  }
39
41
 
40
- const [currentPage, setCurrentPage] = useConditionalState(page, onChangePage, { initialValue: initialPage })
41
42
  const carouselRef = useRef<ICarouselInstance>(null)
43
+
44
+ const [currentPage, setCurrentPage] = useConditionalState(page, onChangePage, { initialValue: initialPage })
42
45
  const [footerHeight, setFooterHeight] = useState(0)
46
+ const [loaded, setLoaded] = useState(!showDots && !footer ? true : false)
43
47
 
44
48
  const styles = useStylesFor(Pager.styleRegistryName, style)
45
49
  const dotStyles = useNestedStylesByKey('dot', styles)
46
50
 
47
- onUpdate(() => {
48
- carouselRef.current?.scrollTo({ index: currentPage, animated: true })
51
+ useEffect(() => {
52
+ if (carouselRef.current?.getCurrentIndex?.() !== currentPage) {
53
+ carouselRef.current?.scrollTo?.({ index: currentPage, animated: true })
54
+ }
49
55
  }, [currentPage])
50
56
 
51
- const renderItem = useCallback(({ item, index, animationValue }: CarouselRenderItemInfo<any>) => {
52
- const itemProps: Omit<PageProps<T>, 'item'> = {
57
+ const getItemInfo = useCallback((index: number) => {
58
+ const info: Omit<PageProps<T>, 'item' | 'animationValue'> = {
53
59
  isFirst: index === 0,
54
60
  isLast: index === pages?.length - 1,
55
61
  isOnly: pages?.length === 1,
56
- isActive: index === currentPage,
57
- isNext: index === currentPage + 1,
58
- isPrevious: index === currentPage - 1,
59
62
  index,
60
- animationValue,
61
63
  }
62
64
 
63
- if (TypeGuards.isFunction(item)) {
64
- const ItemComponent = item
65
- return <ItemComponent {...itemProps} />
66
- }
65
+ return info
66
+ }, [])
67
+
68
+ const customRenderItem = useCallback(({ item, index, animationValue }: CarouselRenderItemInfo<any>) => {
69
+ const info = getItemInfo(index)
67
70
 
68
- return <RenderItem {...itemProps} item={item} />
69
- }, [RenderItem, pages?.length, currentPage])
71
+ return (
72
+ <PagerItem
73
+ {...info}
74
+ renderItem={renderItem}
75
+ item={item}
76
+ animationValue={animationValue}
77
+ />
78
+ )
79
+ }, [renderItem, getItemInfo])
80
+
81
+ const onFooterLayout = useCallback((event: LayoutChangeEvent) => {
82
+ setFooterHeight(event.nativeEvent.layout.height)
83
+ setTimeout(() => setLoaded(true), 0)
84
+ }, [])
85
+
86
+ const width = carouselWidth - removeFixedWidth
87
+ const height = carouselHeight - ((autoCalculateFooterHeight ? footerHeight : 0) + removeFixedHeight)
70
88
 
71
89
  return (
72
- <View style={styles.wrapper}>
90
+ <View style={[{ width, opacity: !loaded ? 0 : 1 }, styles.wrapper]}>
73
91
  <Carousel
74
92
  data={pages}
93
+ autoPlay={false}
94
+ loop={false}
95
+ overscrollEnabled={false}
96
+ pagingEnabled={false}
97
+ ref={carouselRef}
98
+ defaultIndex={initialPage}
99
+ onSnapToItem={setCurrentPage}
100
+ maxScrollDistancePerSwipe={carouselWidth}
101
+ minScrollDistancePerSwipe={carouselWidth * 0.1}
102
+ width={width}
103
+ height={height}
104
+ renderItem={customRenderItem}
75
105
  withAnimation={{
76
106
  type: 'timing',
77
107
  config: {
78
108
  reduceMotion: ReduceMotion.Never,
79
109
  },
80
110
  }}
81
- autoPlay={false}
82
- ref={carouselRef}
83
- loop={false}
84
- defaultIndex={initialPage}
85
- onSnapToItem={setCurrentPage}
86
- maxScrollDistancePerSwipe={carouselWidth}
87
- width={carouselWidth}
88
- height={carouselHeight - (autoCalculateFooterHeight ? footerHeight : 0)}
89
- renderItem={renderItem}
90
111
  {...rest as TCarouselProps<T>}
91
112
  style={styles.carousel}
92
113
  />
93
114
 
94
- <View onLayout={(event: LayoutChangeEvent) => setFooterHeight(event.nativeEvent.layout.height)} style={styles.footerWrapper}>
95
- {/* {footer} */}
115
+ <View onLayout={onFooterLayout} style={styles.footerWrapper}>
116
+ {footer}
117
+
96
118
  {showDots ? (
97
119
  <PagerDots currentPage={currentPage} pages={pages} setCurrentPage={setCurrentPage} styles={dotStyles} />
98
120
  ) : null}
@@ -115,6 +137,9 @@ Pager.defaultProps = {
115
137
  showDots: true,
116
138
  autoCalculateFooterHeight: true,
117
139
  initialPage: 0,
140
+ footer: null,
141
+ removeFixedHeight: 0,
142
+ removeFixedWidth: 0,
118
143
  } as Partial<PagerProps<unknown>>
119
144
 
120
145
  MobileStyleRegistry.registerComponent(Pager)
@@ -7,11 +7,8 @@ import { CarouselRenderItemInfo } from 'react-native-reanimated-carousel/lib/typ
7
7
  export type PageProps<T> = CarouselRenderItemInfo<T> & {
8
8
  isLast: boolean
9
9
  isFirst: boolean
10
- isActive: boolean
11
10
  isOnly: boolean
12
- isNext: boolean
13
11
  index: number
14
- isPrevious: boolean
15
12
  }
16
13
 
17
14
  export type PagerProps<T> = Partial<Omit<TCarouselProps<T>, 'data' | 'renderItem'>> & {
@@ -24,4 +21,6 @@ export type PagerProps<T> = Partial<Omit<TCarouselProps<T>, 'data' | 'renderItem
24
21
  showDots?: boolean
25
22
  footer?: ReactNode
26
23
  autoCalculateFooterHeight?: boolean
24
+ removeFixedHeight?: number
25
+ removeFixedWidth?: number
27
26
  }
@@ -11,10 +11,9 @@ import React, { useCallback, useMemo } from 'react'
11
11
  import { List } from '../List'
12
12
  import { TextInput } from '../TextInput'
13
13
  import { SelectProps, ValueBoundSelectProps } from './types'
14
- import { ModalManager } from '../../utils'
15
14
  import { Button } from '../Button'
16
15
  import { AnyRecord, AppIcon, IJSX, StyledComponentProps, useCompositionStyles } from '@codeleap/styles'
17
- import Modal from '../Modal'
16
+ import { Modal } from '../Modal'
18
17
  import { MobileStyleRegistry } from '../../Registry'
19
18
  import { SearchInput } from '../SearchInput'
20
19
  import { useStylesFor } from '../../hooks'
@@ -62,6 +61,7 @@ const OuterInput: ValueBoundSelectProps<any, boolean>['outerInputComponent'] = (
62
61
 
63
62
  return <TextInput
64
63
  value={TypeGuards.isString(currentValueLabel) ? currentValueLabel : null}
64
+ onValueChange={() => currentValueLabel}
65
65
  rightIcon={clearIcon}
66
66
  onPress={disabled ? null : () => toggle()}
67
67
  disabled={disabled}
@@ -317,7 +317,7 @@ export const Select = <T extends string | number = string, Multi extends boolean
317
317
  ) : null
318
318
  }
319
319
 
320
- <ModalManager.Modal
320
+ <Modal
321
321
  title={label}
322
322
  description={description}
323
323
  {...modalProps}
@@ -343,7 +343,7 @@ export const Select = <T extends string | number = string, Multi extends boolean
343
343
  loading,
344
344
  }}
345
345
  />
346
- </ModalManager.Modal>
346
+ </Modal>
347
347
  </>
348
348
  }
349
349
 
@@ -1,7 +1,6 @@
1
1
  import { Option, Options, PropsOf } from '@codeleap/types'
2
2
  import { AppIcon, StyledProp } from '@codeleap/styles'
3
- import { StylesOf } from '../../types/utility'
4
- import { GetKeyboardAwarePropsOptions } from '../../utils'
3
+ import { GetKeyboardAwarePropsOptions, StylesOf } from '../../types/utility'
5
4
  import { ActionIconProps } from '../ActionIcon'
6
5
  import { Icon } from '../Icon'
7
6
  import { FlatListProps } from '../List'
@@ -1,10 +1,8 @@
1
- import { CreateOSAlert } from '@codeleap/modals'
1
+ import { alert } from '@codeleap/modals'
2
2
  import { useEffect, useMemo, useState } from '@codeleap/hooks'
3
3
  import { FileInputImageSource, useFileInput } from '../FileInput'
4
4
  import { SortablePhoto, SortablePhotosProps, WithId } from './types'
5
5
 
6
- const SortableAlert = CreateOSAlert()
7
-
8
6
  export const useSortablePhotos = <T extends SortablePhoto>(props: SortablePhotosProps<T>) => {
9
7
  const {
10
8
  onChangePhotos,
@@ -145,7 +143,7 @@ export const useSortablePhotos = <T extends SortablePhoto>(props: SortablePhotos
145
143
  }
146
144
 
147
145
  const handlePressPhoto = (photo: T, order: number) => {
148
- SortableAlert.custom({
146
+ alert.ask({
149
147
  title: modalTitle,
150
148
  body: modalBody,
151
149
  options: [
@@ -153,9 +151,6 @@ export const useSortablePhotos = <T extends SortablePhoto>(props: SortablePhotos
153
151
  { text: modalCameraText, onPress: () => handleOpenPicker('camera', photo, order) },
154
152
  !!photo?.filename && { text: modalDeleteText, onPress: () => handleDeletePhoto(photo, order) },
155
153
  ],
156
- // @ts-expect-error
157
- closable: true,
158
- isRow: false,
159
154
  })
160
155
 
161
156
  onPressPhoto?.(data, photo, order)
@@ -1 +1,2 @@
1
- export * as Permissions from './permissions'
1
+ export * as Permissions from './permissions'
2
+ export * as Modals from './permissions'
@@ -2,7 +2,6 @@ import React from 'react'
2
2
  import { AnyFunction, TypeGuards } from '@codeleap/types'
3
3
  import { onUpdate, useState } from '@codeleap/hooks'
4
4
  import { PortalProvider } from '@gorhom/portal'
5
- import { KeyboardProvider } from '../KeyboardAware'
6
5
 
7
6
  export type AppModalProps = {
8
7
  visible: boolean
@@ -38,7 +37,7 @@ export function Provider({ children }) {
38
37
  return !!modals[name]?.visible
39
38
  }
40
39
 
41
- const toggleModal:TModalContext['toggleModal'] = (name, set?: boolean, props?: any) => {
40
+ const toggleModal: TModalContext['toggleModal'] = (name, set?: boolean, props?: any) => {
42
41
  const visible = isVisible(name)
43
42
 
44
43
  const newVisible = typeof set === 'boolean' ? set : !visible
@@ -58,7 +57,7 @@ export function Provider({ children }) {
58
57
  })
59
58
  }
60
59
 
61
- const setModal:TModalContext['setModal'] = (name, to) => {
60
+ const setModal: TModalContext['setModal'] = (name, to) => {
62
61
 
63
62
  setModals((current) => ({
64
63
  ...current,
@@ -72,7 +71,7 @@ export function Provider({ children }) {
72
71
 
73
72
  // const codeleapCtx = useCodeleapContext()
74
73
  const defaultDuration = 300
75
- const transition:TModalContext['transition'] = (from, to, options) => {
74
+ const transition: TModalContext['transition'] = (from, to, options) => {
76
75
  return new Promise((resolve) => {
77
76
  setTimeout(() => {
78
77
 
@@ -80,7 +79,7 @@ export function Provider({ children }) {
80
79
  toggleModal(to, true, options?.props)
81
80
  return
82
81
  }
83
- const _options:ModalTransitionOptions = {
82
+ const _options: ModalTransitionOptions = {
84
83
  duration: defaultDuration,
85
84
  ...options,
86
85
  }
@@ -137,7 +136,7 @@ export function Provider({ children }) {
137
136
  setModals(newModals)
138
137
  }
139
138
 
140
- return <KeyboardProvider>
139
+ return (
141
140
  <ModalContext.Provider value={{
142
141
  state: modals,
143
142
  toggleModal,
@@ -155,8 +154,7 @@ export function Provider({ children }) {
155
154
  {children}
156
155
  </PortalProvider>
157
156
  </ModalContext.Provider>
158
- </KeyboardProvider>
159
-
157
+ )
160
158
  }
161
159
 
162
160
  export function useModalContext() {
@@ -175,9 +173,9 @@ export type UseModalSequenceOptions = {
175
173
 
176
174
  export function useModalSequence(ids: string[], options?: UseModalSequenceOptions) {
177
175
 
178
- const _options:UseModalSequenceOptions = {
176
+ const _options: UseModalSequenceOptions = {
179
177
  closeLastOnFinish: true,
180
- onFinish: () => {},
178
+ onFinish: () => { },
181
179
  resetOnFinish: false,
182
180
  waitForLastToCloseBeforeCallingFinish: true,
183
181
  ...options,
@@ -231,7 +229,7 @@ export function useModalSequence(ids: string[], options?: UseModalSequenceOption
231
229
  }
232
230
 
233
231
  function goto(idxOrId: string | number, props?: any) {
234
- let newId:string = null
232
+ let newId: string = null
235
233
  if (TypeGuards.isString(idxOrId)) {
236
234
  newId = idxOrId
237
235
 
@@ -1,19 +1,19 @@
1
1
  import React from 'react'
2
2
  import { usePrevious, onMount, onUpdate } from '@codeleap/hooks'
3
3
  import { PropsOf } from '@codeleap/types'
4
- import { useModalContext } from './context'
4
+ import { useModalContext } from './Context'
5
5
  import { Portal } from '@gorhom/portal'
6
6
  import { Modal as _Modal } from '../../components/Modal'
7
7
 
8
8
  type UseManagedModalArgs = {
9
9
  id?: string
10
- initialVisible ?: boolean
10
+ initialVisible?: boolean
11
11
  parent?: string
12
12
  visible?: boolean
13
13
  toggle?: PropsOf<typeof _Modal>['toggle']
14
14
  }
15
15
 
16
- function useManagedModal(props:UseManagedModalArgs) {
16
+ function useManagedModal(props: UseManagedModalArgs) {
17
17
  const {
18
18
  initialVisible = false,
19
19
  parent,
@@ -61,7 +61,7 @@ export type ManagedModalProps<T = PropsOf<typeof _Modal>> = Omit<T, 'visible' |
61
61
  absolute?: boolean
62
62
 
63
63
  }
64
- export const Modal:React.FC<ManagedModalProps> = ({
64
+ export const Modal: React.FC<ManagedModalProps> = ({
65
65
  children,
66
66
  absolute = true,
67
67
  ...props
@@ -81,4 +81,4 @@ export const Modal:React.FC<ManagedModalProps> = ({
81
81
  }
82
82
 
83
83
  return content
84
- }
84
+ }
@@ -1,4 +1,4 @@
1
- import { useModalContext, useModalSequence, Provider } from './context'
1
+ import { useModalContext, useModalSequence, Provider } from './Context'
2
2
  import { Modal, ManagedModalProps } from './components'
3
3
 
4
4
  export const ModalManager = {
@@ -10,4 +10,4 @@ export const ModalManager = {
10
10
 
11
11
  export type {
12
12
  ManagedModalProps,
13
- }
13
+ }
@@ -1,10 +1,10 @@
1
1
  import React, { useContext, useState } from 'react'
2
- import { useModalContext } from '../../utils/ModalManager/context'
3
2
  import { onMount, onUpdate, useDebounce, usePrevious } from '@codeleap/hooks'
4
3
  import { deepEqual } from '@codeleap/utils'
5
4
  import { AppState, Linking } from 'react-native'
6
5
  import { PermissionConfig, PermissionModalsConfig } from './types'
7
6
  import { PermissionManager, PermissionTypes } from './package'
7
+ import { useModalContext } from '../modals/Context'
8
8
 
9
9
  type TPermissionContext = {
10
10
  state: Record<string, PermissionTypes.PermissionStatus>
package/src/index.ts CHANGED
@@ -6,8 +6,7 @@ export * from './deprecated'
6
6
 
7
7
  export { Linking } from 'react-native'
8
8
  import uuid from 'react-native-uuid'
9
- import * as RNKeyboardAwareScrollView from './utils/KeyboardAware'
10
- export { uuid, RNKeyboardAwareScrollView }
9
+ export { uuid }
11
10
  export { MobileStyleRegistry } from './Registry'
12
11
 
13
12
  import './modules/formConfig'
@@ -17,3 +17,11 @@ export type ChildrenProp = ReactNode | ReactNode[] | undefined
17
17
  export type ReanimatedExitingAnimation = (values: ExitAnimationsValues) => LayoutAnimation
18
18
  export type ReanimatedEnteringAnimation = (values: EntryAnimationsValues) => LayoutAnimation
19
19
 
20
+ export type GetKeyboardAwarePropsOptions = {
21
+ baseStyleProp?: 'style' | 'contentContainerStyle'
22
+ adapt?: 'height' | 'maxHeight' | 'paddingBottom' | 'marginBottom' | 'bottom'
23
+ enabled?: boolean
24
+ animated?: boolean
25
+ transition?: TransitionConfig
26
+ enableOnAndroid?: boolean
27
+ }
@@ -2,8 +2,6 @@ export * from './OSAlert'
2
2
  export * from './hooks'
3
3
  export * from './misc'
4
4
  export * from './NotificationManager'
5
- export * from './ModalManager'
6
- export * from './KeyboardAware'
7
5
  export * from './input'
8
6
  export * from './theme'
9
7
  export * from './locale'
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- type TKeyboardCtx = {
3
- isVisible: boolean;
4
- height: number;
5
- };
6
- /**
7
- *
8
- * @deprecated useKeyboard does not need to be wrapped in a provider
9
- */
10
- export declare const KeyboardProvider: ({ children }: {
11
- children: any;
12
- }) => JSX.Element;
13
- export declare const useKeyboard: () => TKeyboardCtx;
14
- export {};
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { useKeyboardController } from '../../hooks';
3
- /**
4
- *
5
- * @deprecated useKeyboard does not need to be wrapped in a provider
6
- */
7
- export const KeyboardProvider = ({ children }) => {
8
- return <>
9
- {children}
10
- </>;
11
- };
12
- export const useKeyboard = () => {
13
- return useKeyboardController();
14
- };
15
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/utils/KeyboardAware/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAOnD;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC/C,OAAO,EACL;IAAA,CAAC,QAAQ,CACX;EAAA,GAAG,CAAA;AACL,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,GAAiB,EAAE;IAC5C,OAAO,qBAAqB,EAAE,CAAA;AAChC,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './keyboardHooks';
2
- export * from './context';
@@ -1,3 +0,0 @@
1
- export * from './keyboardHooks';
2
- export * from './context';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/KeyboardAware/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA"}
@@ -1,21 +0,0 @@
1
- import { TransitionConfig } from '../../types';
2
- export type GetKeyboardAwarePropsOptions = {
3
- baseStyleProp?: 'style' | 'contentContainerStyle';
4
- adapt?: 'height' | 'maxHeight' | 'paddingBottom' | 'marginBottom' | 'bottom';
5
- enabled?: boolean;
6
- animated?: boolean;
7
- transition?: TransitionConfig;
8
- enableOnAndroid?: boolean;
9
- };
10
- type UseKeyboardAwareViewParams = {
11
- debugName?: string;
12
- styles?: any;
13
- } & GetKeyboardAwarePropsOptions;
14
- export declare const useKeyboardAwareView: (params?: UseKeyboardAwareViewParams) => {
15
- keyboard: {
16
- isVisible: boolean;
17
- height: number;
18
- };
19
- style: any;
20
- };
21
- export {};
@@ -1,77 +0,0 @@
1
- import { TypeGuards } from '@codeleap/types';
2
- import { Platform, StyleSheet, Dimensions, Easing } from 'react-native';
3
- import { useKeyboard } from './context';
4
- export const useKeyboardAwareView = (params) => {
5
- const keyboard = useKeyboard();
6
- const options = params || {};
7
- const _options = {
8
- adapt: 'maxHeight',
9
- baseStyleProp: 'style',
10
- enabled: true,
11
- enableOnAndroid: false,
12
- animated: false,
13
- ...options,
14
- transition: {
15
- easing: Easing.linear,
16
- duration: 200,
17
- type: 'timing',
18
- },
19
- };
20
- if (!_options.enabled || (Platform.OS === 'android' && !_options.enableOnAndroid)) {
21
- return {
22
- keyboard,
23
- style: params?.styles,
24
- };
25
- }
26
- const baseStyle = StyleSheet.flatten(params.styles || {});
27
- let baseValue = baseStyle[_options.adapt];
28
- if (TypeGuards.isNil(baseValue)) {
29
- baseValue = 0;
30
- }
31
- let valid = true;
32
- const warnOnNotNumber = () => {
33
- if (!TypeGuards.isNil(baseValue) && !TypeGuards.isNumber(baseValue)) {
34
- valid = false;
35
- const debugStr = params?.debugName ? 'at ' + params?.debugName + ' ' : '';
36
- console.log(debugStr);
37
- }
38
- };
39
- let newStyleProp = {
40
- ...baseStyle,
41
- };
42
- switch (_options.adapt) {
43
- case 'height':
44
- warnOnNotNumber();
45
- const baseHeight = baseValue || 0;
46
- newStyleProp.height = baseHeight - keyboard.height;
47
- break;
48
- case 'maxHeight':
49
- warnOnNotNumber();
50
- const baseMaxHeight = baseValue || Dimensions.get('window').height;
51
- newStyleProp.maxHeight = baseMaxHeight - keyboard.height;
52
- break;
53
- case 'paddingBottom':
54
- warnOnNotNumber();
55
- const basePaddingBottom = baseValue || 0;
56
- newStyleProp.paddingBottom = basePaddingBottom + keyboard.height;
57
- break;
58
- case 'marginBottom':
59
- warnOnNotNumber();
60
- const baseMarginBottom = baseValue || 0;
61
- newStyleProp.marginBottom = baseMarginBottom + keyboard.height;
62
- break;
63
- case 'bottom':
64
- warnOnNotNumber();
65
- const baseBottom = baseValue || 0;
66
- newStyleProp.bottom = baseBottom + keyboard.height;
67
- break;
68
- }
69
- if (!valid) {
70
- newStyleProp = params.styles;
71
- }
72
- return {
73
- keyboard,
74
- style: newStyleProp,
75
- };
76
- };
77
- //# sourceMappingURL=keyboardHooks.js.map
@@ -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