@codeleap/mobile 2.4.7 → 3.1.1
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/mobile-packages.code-workspace +27 -0
- package/package.json +25 -33
- package/src/components/ActionIcon/index.tsx +16 -6
- package/src/components/ActionIcon/styles.ts +3 -90
- package/src/components/ActivityIndicator/index.tsx +28 -9
- package/src/components/ActivityIndicator/styles.ts +2 -59
- package/src/components/Autocomplete/index.tsx +235 -0
- package/src/components/Autocomplete/styles.ts +18 -0
- package/src/components/Autocomplete/types.ts +75 -0
- package/src/components/Avatar/index.tsx +126 -0
- package/src/components/Avatar/styles.ts +22 -0
- package/src/components/AvatarGroup/index.tsx +76 -0
- package/src/components/AvatarGroup/styles.ts +11 -0
- package/src/components/Backdrop/index.tsx +14 -13
- package/src/components/Backdrop/styles.ts +3 -24
- package/src/components/Badge/index.tsx +134 -0
- package/src/components/Badge/styles.ts +14 -0
- package/src/components/Button/index.tsx +39 -49
- package/src/components/Button/styles.ts +6 -107
- package/src/components/Calendar/index.tsx +3 -3
- package/src/components/Calendar/style.ts +2 -31
- package/src/components/Checkbox/index.tsx +137 -74
- package/src/components/Checkbox/styles.ts +13 -73
- package/src/components/ContentView/index.tsx +2 -2
- package/src/components/ContentView/styles.ts +1 -17
- package/src/components/DatePickerModal/index.tsx +240 -0
- package/src/components/DatePickerModal/styles.ts +15 -0
- package/src/components/DatePickerModal/types.ts +55 -0
- package/src/components/Drawer/index.tsx +2 -2
- package/src/components/Drawer/styles.ts +4 -39
- package/src/components/EmptyPlaceholder/index.tsx +3 -3
- package/src/components/EmptyPlaceholder/styles.ts +2 -47
- package/src/components/FileInput/styles.ts +1 -8
- package/src/components/Grid/index.tsx +76 -72
- package/src/components/Grid/styles.ts +4 -7
- package/src/components/Icon/index.tsx +46 -8
- package/src/components/Icon/styles.ts +3 -51
- package/src/components/Image/index.tsx +18 -22
- package/src/components/Image/styles.ts +1 -14
- package/src/components/ImageView/Spotlight.tsx +4 -2
- package/src/components/ImageView/component.tsx +0 -3
- package/src/components/InputBase/index.tsx +101 -0
- package/src/components/InputBase/styles.ts +135 -0
- package/src/components/InputBase/types.ts +28 -0
- package/src/components/InputBase/utils.ts +42 -0
- package/src/components/InputLabel/index.tsx +3 -3
- package/src/components/InputLabel/styles.ts +2 -14
- package/src/components/List/PaginationIndicator.tsx +4 -21
- package/src/components/List/index.tsx +84 -46
- package/src/components/List/styles.ts +8 -20
- package/src/components/LoadingOverlay/index.tsx +45 -45
- package/src/components/LoadingOverlay/styles.ts +5 -27
- package/src/components/Modal/index.tsx +56 -32
- package/src/components/Modal/styles.ts +3 -114
- package/src/components/NumberIncrement/index.tsx +318 -0
- package/src/components/NumberIncrement/styles.ts +14 -0
- package/src/components/NumberIncrement/types.ts +44 -0
- package/src/components/NumberIncrement/utils.ts +27 -0
- package/src/components/Pager/index.tsx +120 -67
- package/src/components/Pager/styles.ts +2 -69
- package/src/components/RadioInput/index.tsx +145 -68
- package/src/components/RadioInput/styles.ts +8 -61
- package/src/components/RefreshControl/index.tsx +28 -0
- package/src/components/RefreshControl/styles.ts +7 -0
- package/src/components/Scroll/index.tsx +22 -37
- package/src/components/Scroll/styles.ts +2 -16
- package/src/components/Sections/index.tsx +116 -54
- package/src/components/Sections/styles.ts +7 -0
- package/src/components/SegmentedControl/Option.tsx +51 -0
- package/src/components/SegmentedControl/index.tsx +51 -67
- package/src/components/SegmentedControl/styles.ts +7 -63
- package/src/components/Select/index.tsx +268 -95
- package/src/components/Select/styles.ts +11 -131
- package/src/components/Select/types.ts +47 -11
- package/src/components/Slider/index.tsx +151 -94
- package/src/components/Slider/styles.ts +7 -72
- package/src/components/Slider/types.ts +18 -20
- package/src/components/Switch/index.tsx +115 -63
- package/src/components/Switch/styles.ts +13 -30
- package/src/components/Text/index.tsx +14 -31
- package/src/components/Text/styles.ts +2 -41
- package/src/components/TextInput/index.tsx +237 -259
- package/src/components/TextInput/styles.ts +6 -120
- package/src/components/Touchable/index.tsx +74 -27
- package/src/components/Touchable/styles.ts +1 -12
- package/src/components/View/index.tsx +11 -26
- package/src/components/View/styles.ts +1 -17
- package/src/components/components.ts +9 -5
- package/src/components/defaultStyles.ts +74 -61
- package/src/index.ts +0 -1
- package/src/modules/PressableRipple/index.ts +5 -0
- package/src/modules/PressableRipple/ripple.js +258 -0
- package/src/modules/PressableRipple/styles.js +22 -0
- package/src/modules/PressableRipple/type.ts +17 -0
- package/src/modules/textInputMask.tsx +13 -0
- package/src/types/index.ts +5 -0
- package/src/types/utility.ts +2 -2
- package/src/utils/KeyboardAware/index.ts +0 -13
- package/src/utils/KeyboardAware/keyboardHooks.ts +69 -79
- package/src/utils/hooks.ts +63 -36
- package/src/utils/index.ts +1 -0
- package/src/utils/locale.ts +7 -0
- package/src/utils/theme.ts +1 -21
- package/dist/components/ActionIcon/index.d.ts +0 -13
- package/dist/components/ActionIcon/index.js +0 -51
- package/dist/components/ActionIcon/index.js.map +0 -1
- package/dist/components/ActionIcon/styles.d.ts +0 -65
- package/dist/components/ActionIcon/styles.js +0 -61
- package/dist/components/ActionIcon/styles.js.map +0 -1
- package/dist/components/ActivityIndicator/index.d.ts +0 -15
- package/dist/components/ActivityIndicator/index.js +0 -55
- package/dist/components/ActivityIndicator/index.js.map +0 -1
- package/dist/components/ActivityIndicator/styles.d.ts +0 -59
- package/dist/components/ActivityIndicator/styles.js +0 -52
- package/dist/components/ActivityIndicator/styles.js.map +0 -1
- package/dist/components/Animated.d.ts +0 -15
- package/dist/components/Animated.js +0 -55
- package/dist/components/Animated.js.map +0 -1
- package/dist/components/AutoComplete/index.d.ts +0 -34
- package/dist/components/AutoComplete/index.js +0 -126
- package/dist/components/AutoComplete/index.js.map +0 -1
- package/dist/components/AutoComplete/styles.d.ts +0 -57
- package/dist/components/AutoComplete/styles.js +0 -89
- package/dist/components/AutoComplete/styles.js.map +0 -1
- package/dist/components/Backdrop/index.d.ts +0 -14
- package/dist/components/Backdrop/index.js +0 -59
- package/dist/components/Backdrop/index.js.map +0 -1
- package/dist/components/Backdrop/styles.d.ts +0 -53
- package/dist/components/Backdrop/styles.js +0 -28
- package/dist/components/Backdrop/styles.js.map +0 -1
- package/dist/components/Button/index.d.ts +0 -246
- package/dist/components/Button/index.js +0 -115
- package/dist/components/Button/index.js.map +0 -1
- package/dist/components/Button/styles.d.ts +0 -65
- package/dist/components/Button/styles.js +0 -61
- package/dist/components/Button/styles.js.map +0 -1
- package/dist/components/Calendar/index.d.ts +0 -15
- package/dist/components/Calendar/index.js +0 -76
- package/dist/components/Calendar/index.js.map +0 -1
- package/dist/components/Calendar/style.d.ts +0 -4
- package/dist/components/Calendar/style.js +0 -36
- package/dist/components/Calendar/style.js.map +0 -1
- package/dist/components/Calendar/types.d.ts +0 -95
- package/dist/components/Calendar/types.js +0 -3
- package/dist/components/Calendar/types.js.map +0 -1
- package/dist/components/Checkbox/index.d.ts +0 -15
- package/dist/components/Checkbox/index.js +0 -81
- package/dist/components/Checkbox/index.js.map +0 -1
- package/dist/components/Checkbox/styles.d.ts +0 -56
- package/dist/components/Checkbox/styles.js +0 -53
- package/dist/components/Checkbox/styles.js.map +0 -1
- package/dist/components/ContentView/index.d.ts +0 -12
- package/dist/components/ContentView/index.js +0 -62
- package/dist/components/ContentView/index.js.map +0 -1
- package/dist/components/ContentView/styles.d.ts +0 -53
- package/dist/components/ContentView/styles.js +0 -26
- package/dist/components/ContentView/styles.js.map +0 -1
- package/dist/components/Drawer/index.d.ts +0 -7
- package/dist/components/Drawer/index.js +0 -66
- package/dist/components/Drawer/index.js.map +0 -1
- package/dist/components/Drawer/styles.d.ts +0 -56
- package/dist/components/Drawer/styles.js +0 -39
- package/dist/components/Drawer/styles.js.map +0 -1
- package/dist/components/EmptyPlaceholder/index.d.ts +0 -25
- package/dist/components/EmptyPlaceholder/index.js +0 -88
- package/dist/components/EmptyPlaceholder/index.js.map +0 -1
- package/dist/components/EmptyPlaceholder/styles.d.ts +0 -55
- package/dist/components/EmptyPlaceholder/styles.js +0 -30
- package/dist/components/EmptyPlaceholder/styles.js.map +0 -1
- package/dist/components/FileInput/index.d.ts +0 -24
- package/dist/components/FileInput/index.js +0 -179
- package/dist/components/FileInput/index.js.map +0 -1
- package/dist/components/FileInput/styles.d.ts +0 -53
- package/dist/components/FileInput/styles.js +0 -19
- package/dist/components/FileInput/styles.js.map +0 -1
- package/dist/components/Grid/index.d.ts +0 -32
- package/dist/components/Grid/index.js +0 -80
- package/dist/components/Grid/index.js.map +0 -1
- package/dist/components/Grid/styles.d.ts +0 -54
- package/dist/components/Grid/styles.js +0 -19
- package/dist/components/Grid/styles.js.map +0 -1
- package/dist/components/Icon/index.d.ts +0 -14
- package/dist/components/Icon/index.js +0 -75
- package/dist/components/Icon/index.js.map +0 -1
- package/dist/components/Icon/styles.d.ts +0 -61
- package/dist/components/Icon/styles.js +0 -49
- package/dist/components/Icon/styles.js.map +0 -1
- package/dist/components/Image/index.d.ts +0 -25
- package/dist/components/Image/index.js +0 -130
- package/dist/components/Image/index.js.map +0 -1
- package/dist/components/Image/styles.d.ts +0 -55
- package/dist/components/Image/styles.js +0 -25
- package/dist/components/Image/styles.js.map +0 -1
- package/dist/components/ImageView/Spotlight.d.ts +0 -25
- package/dist/components/ImageView/Spotlight.js +0 -150
- package/dist/components/ImageView/Spotlight.js.map +0 -1
- package/dist/components/ImageView/component.d.ts +0 -5
- package/dist/components/ImageView/component.js +0 -50
- package/dist/components/ImageView/component.js.map +0 -1
- package/dist/components/ImageView/index.d.ts +0 -2
- package/dist/components/ImageView/index.js +0 -15
- package/dist/components/ImageView/index.js.map +0 -1
- package/dist/components/InputLabel/index.d.ts +0 -12
- package/dist/components/InputLabel/index.js +0 -58
- package/dist/components/InputLabel/index.js.map +0 -1
- package/dist/components/InputLabel/styles.d.ts +0 -4
- package/dist/components/InputLabel/styles.js +0 -26
- package/dist/components/InputLabel/styles.js.map +0 -1
- package/dist/components/List/PaginationIndicator.d.ts +0 -67
- package/dist/components/List/PaginationIndicator.js +0 -51
- package/dist/components/List/PaginationIndicator.js.map +0 -1
- package/dist/components/List/index.d.ts +0 -31
- package/dist/components/List/index.js +0 -77
- package/dist/components/List/index.js.map +0 -1
- package/dist/components/List/styles.d.ts +0 -54
- package/dist/components/List/styles.js +0 -28
- package/dist/components/List/styles.js.map +0 -1
- package/dist/components/LoadingOverlay/index.d.ts +0 -11
- package/dist/components/LoadingOverlay/index.js +0 -60
- package/dist/components/LoadingOverlay/index.js.map +0 -1
- package/dist/components/LoadingOverlay/styles.d.ts +0 -7
- package/dist/components/LoadingOverlay/styles.js +0 -34
- package/dist/components/LoadingOverlay/styles.js.map +0 -1
- package/dist/components/Modal/index.d.ts +0 -43
- package/dist/components/Modal/index.js +0 -147
- package/dist/components/Modal/index.js.map +0 -1
- package/dist/components/Modal/styles.d.ts +0 -58
- package/dist/components/Modal/styles.js +0 -74
- package/dist/components/Modal/styles.js.map +0 -1
- package/dist/components/MultiSelect/index.d.ts +0 -6
- package/dist/components/MultiSelect/index.js +0 -119
- package/dist/components/MultiSelect/index.js.map +0 -1
- package/dist/components/MultiSelect/styles.d.ts +0 -7
- package/dist/components/MultiSelect/styles.js +0 -84
- package/dist/components/MultiSelect/styles.js.map +0 -1
- package/dist/components/MultiSelect/types.d.ts +0 -43
- package/dist/components/MultiSelect/types.js +0 -3
- package/dist/components/MultiSelect/types.js.map +0 -1
- package/dist/components/Navigation/Navigation.d.ts +0 -3
- package/dist/components/Navigation/Navigation.js +0 -80
- package/dist/components/Navigation/Navigation.js.map +0 -1
- package/dist/components/Navigation/constants.d.ts +0 -5
- package/dist/components/Navigation/constants.js +0 -11
- 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 -16
- 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 -8
- 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 -69
- package/dist/components/Navigation/utils.js.map +0 -1
- package/dist/components/Pager/index.d.ts +0 -26
- package/dist/components/Pager/index.js +0 -84
- package/dist/components/Pager/index.js.map +0 -1
- package/dist/components/Pager/styles.d.ts +0 -87
- package/dist/components/Pager/styles.js +0 -72
- package/dist/components/Pager/styles.js.map +0 -1
- package/dist/components/RadioInput/index.d.ts +0 -27
- package/dist/components/RadioInput/index.js +0 -72
- package/dist/components/RadioInput/index.js.map +0 -1
- package/dist/components/RadioInput/styles.d.ts +0 -58
- package/dist/components/RadioInput/styles.js +0 -50
- package/dist/components/RadioInput/styles.js.map +0 -1
- package/dist/components/Scroll/index.d.ts +0 -124
- package/dist/components/Scroll/index.js +0 -97
- package/dist/components/Scroll/index.js.map +0 -1
- package/dist/components/Scroll/styles.d.ts +0 -53
- package/dist/components/Scroll/styles.js +0 -26
- package/dist/components/Scroll/styles.js.map +0 -1
- package/dist/components/Sections/index.d.ts +0 -115
- package/dist/components/Sections/index.js +0 -76
- package/dist/components/Sections/index.js.map +0 -1
- package/dist/components/SegmentedControl/index.d.ts +0 -52
- package/dist/components/SegmentedControl/index.js +0 -131
- package/dist/components/SegmentedControl/index.js.map +0 -1
- package/dist/components/SegmentedControl/styles.d.ts +0 -60
- package/dist/components/SegmentedControl/styles.js +0 -43
- package/dist/components/SegmentedControl/styles.js.map +0 -1
- package/dist/components/Select/index.d.ts +0 -16
- package/dist/components/Select/index.js +0 -122
- package/dist/components/Select/index.js.map +0 -1
- package/dist/components/Select/styles.d.ts +0 -60
- package/dist/components/Select/styles.js +0 -83
- package/dist/components/Select/styles.js.map +0 -1
- package/dist/components/Select/types.d.ts +0 -43
- package/dist/components/Select/types.js +0 -3
- package/dist/components/Select/types.js.map +0 -1
- package/dist/components/Slider/Mark.d.ts +0 -3
- package/dist/components/Slider/Mark.js +0 -32
- package/dist/components/Slider/Mark.js.map +0 -1
- package/dist/components/Slider/Thumb.d.ts +0 -7
- package/dist/components/Slider/Thumb.js +0 -30
- package/dist/components/Slider/Thumb.js.map +0 -1
- package/dist/components/Slider/index.d.ts +0 -4
- package/dist/components/Slider/index.js +0 -99
- package/dist/components/Slider/index.js.map +0 -1
- package/dist/components/Slider/styles.d.ts +0 -54
- package/dist/components/Slider/styles.js +0 -61
- package/dist/components/Slider/styles.js.map +0 -1
- package/dist/components/Slider/types.d.ts +0 -26
- package/dist/components/Slider/types.js +0 -3
- package/dist/components/Slider/types.js.map +0 -1
- package/dist/components/Switch/index.d.ts +0 -14
- package/dist/components/Switch/index.js +0 -81
- package/dist/components/Switch/index.js.map +0 -1
- package/dist/components/Switch/styles.d.ts +0 -55
- package/dist/components/Switch/styles.js +0 -34
- package/dist/components/Switch/styles.js.map +0 -1
- package/dist/components/Text/index.d.ts +0 -25
- package/dist/components/Text/index.js +0 -121
- package/dist/components/Text/index.js.map +0 -1
- package/dist/components/Text/styles.d.ts +0 -70
- package/dist/components/Text/styles.js +0 -34
- package/dist/components/Text/styles.js.map +0 -1
- package/dist/components/TextInput/index.d.ts +0 -181
- package/dist/components/TextInput/index.js +0 -213
- package/dist/components/TextInput/index.js.map +0 -1
- package/dist/components/TextInput/styles.d.ts +0 -63
- package/dist/components/TextInput/styles.js +0 -65
- package/dist/components/TextInput/styles.js.map +0 -1
- package/dist/components/Touchable/index.d.ts +0 -22
- package/dist/components/Touchable/index.js +0 -165
- package/dist/components/Touchable/index.js.map +0 -1
- package/dist/components/Touchable/styles.d.ts +0 -58
- package/dist/components/Touchable/styles.js +0 -24
- package/dist/components/Touchable/styles.js.map +0 -1
- package/dist/components/View/index.d.ts +0 -25
- package/dist/components/View/index.js +0 -107
- package/dist/components/View/index.js.map +0 -1
- package/dist/components/View/styles.d.ts +0 -54
- package/dist/components/View/styles.js +0 -29
- package/dist/components/View/styles.js.map +0 -1
- package/dist/components/components.d.ts +0 -37
- package/dist/components/components.js +0 -50
- package/dist/components/components.js.map +0 -1
- package/dist/components/defaultStyles.d.ts +0 -1468
- package/dist/components/defaultStyles.js +0 -67
- package/dist/components/defaultStyles.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -39
- package/dist/index.js.map +0 -1
- package/dist/modules/documentPicker.d.ts +0 -3
- package/dist/modules/documentPicker.js +0 -12
- package/dist/modules/documentPicker.js.map +0 -1
- package/dist/modules/fastImage.d.ts +0 -1
- package/dist/modules/fastImage.js +0 -10
- package/dist/modules/fastImage.js.map +0 -1
- package/dist/modules/reactNavigation.d.ts +0 -5
- package/dist/modules/reactNavigation.js +0 -26
- package/dist/modules/reactNavigation.js.map +0 -1
- package/dist/modules/rnDeviceInfo.d.ts +0 -2
- package/dist/modules/rnDeviceInfo.js +0 -10
- package/dist/modules/rnDeviceInfo.js.map +0 -1
- package/dist/modules/textInputMask.d.ts +0 -10
- package/dist/modules/textInputMask.js +0 -19
- package/dist/modules/textInputMask.js.map +0 -1
- package/dist/modules/types/fileTypes.d.ts +0 -138
- package/dist/modules/types/fileTypes.js +0 -3
- package/dist/modules/types/fileTypes.js.map +0 -1
- package/dist/modules/types/textInputMask.d.ts +0 -7
- package/dist/modules/types/textInputMask.js +0 -3
- package/dist/modules/types/textInputMask.js.map +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js +0 -14
- package/dist/types/index.js.map +0 -1
- package/dist/types/utility.d.ts +0 -14
- package/dist/types/utility.js +0 -3
- package/dist/types/utility.js.map +0 -1
- package/dist/utils/KeyboardAware/context.d.ts +0 -13
- package/dist/utils/KeyboardAware/context.js +0 -63
- package/dist/utils/KeyboardAware/context.js.map +0 -1
- package/dist/utils/KeyboardAware/index.d.ts +0 -8
- package/dist/utils/KeyboardAware/index.js +0 -29
- package/dist/utils/KeyboardAware/index.js.map +0 -1
- package/dist/utils/KeyboardAware/keyboardHooks.d.ts +0 -26
- package/dist/utils/KeyboardAware/keyboardHooks.js +0 -87
- package/dist/utils/KeyboardAware/keyboardHooks.js.map +0 -1
- package/dist/utils/KeyboardAware/lib/KeyboardAwareFlatList.d.ts +0 -3
- package/dist/utils/KeyboardAware/lib/KeyboardAwareFlatList.js +0 -9
- package/dist/utils/KeyboardAware/lib/KeyboardAwareFlatList.js.map +0 -1
- package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.d.ts +0 -67
- package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.js +0 -439
- package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.js.map +0 -1
- package/dist/utils/KeyboardAware/lib/KeyboardAwareInterface.d.ts +0 -7
- package/dist/utils/KeyboardAware/lib/KeyboardAwareInterface.js +0 -4
- package/dist/utils/KeyboardAware/lib/KeyboardAwareInterface.js.map +0 -1
- package/dist/utils/KeyboardAware/lib/KeyboardAwareScrollView.d.ts +0 -3
- package/dist/utils/KeyboardAware/lib/KeyboardAwareScrollView.js +0 -10
- package/dist/utils/KeyboardAware/lib/KeyboardAwareScrollView.js.map +0 -1
- package/dist/utils/KeyboardAware/lib/KeyboardAwareSectionList.d.ts +0 -3
- package/dist/utils/KeyboardAware/lib/KeyboardAwareSectionList.js +0 -10
- package/dist/utils/KeyboardAware/lib/KeyboardAwareSectionList.js.map +0 -1
- package/dist/utils/KeyboardAware/types.d.ts +0 -1
- package/dist/utils/KeyboardAware/types.js +0 -7
- package/dist/utils/KeyboardAware/types.js.map +0 -1
- package/dist/utils/ModalManager/components.d.ts +0 -20
- package/dist/utils/ModalManager/components.js +0 -114
- package/dist/utils/ModalManager/components.js.map +0 -1
- package/dist/utils/ModalManager/context.d.ts +0 -48
- package/dist/utils/ModalManager/context.js +0 -201
- package/dist/utils/ModalManager/context.js.map +0 -1
- package/dist/utils/ModalManager/index.d.ts +0 -11
- package/dist/utils/ModalManager/index.js +0 -13
- package/dist/utils/ModalManager/index.js.map +0 -1
- package/dist/utils/OSAlert.d.ts +0 -32
- package/dist/utils/OSAlert.js +0 -143
- package/dist/utils/OSAlert.js.map +0 -1
- package/dist/utils/PermissionManager/context.d.ts +0 -53
- package/dist/utils/PermissionManager/context.js +0 -320
- package/dist/utils/PermissionManager/context.js.map +0 -1
- package/dist/utils/PermissionManager/index.d.ts +0 -4
- package/dist/utils/PermissionManager/index.js +0 -9
- package/dist/utils/PermissionManager/index.js.map +0 -1
- package/dist/utils/PermissionManager/types.d.ts +0 -13
- package/dist/utils/PermissionManager/types.js +0 -3
- package/dist/utils/PermissionManager/types.js.map +0 -1
- package/dist/utils/hooks.d.ts +0 -61
- package/dist/utils/hooks.js +0 -233
- package/dist/utils/hooks.js.map +0 -1
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/index.js +0 -36
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/input.d.ts +0 -35
- package/dist/utils/input.js +0 -49
- package/dist/utils/input.js.map +0 -1
- package/dist/utils/misc.d.ts +0 -6
- package/dist/utils/misc.js +0 -87
- package/dist/utils/misc.js.map +0 -1
- package/dist/utils/notifications.d.ts +0 -34
- package/dist/utils/notifications.js +0 -268
- package/dist/utils/notifications.js.map +0 -1
- package/dist/utils/theme.d.ts +0 -42
- package/dist/utils/theme.js +0 -50
- package/dist/utils/theme.js.map +0 -1
- package/src/components/Animated.tsx +0 -34
- package/src/components/AutoComplete/index.tsx +0 -167
- package/src/components/AutoComplete/styles.ts +0 -150
- package/src/components/MultiSelect/index.tsx +0 -148
- package/src/components/MultiSelect/styles.ts +0 -131
- package/src/components/MultiSelect/types.ts +0 -51
- package/src/components/Slider/Mark.tsx +0 -46
- package/src/components/Slider/Thumb.tsx +0 -29
- package/src/modules/textInputMask.ts +0 -11
- package/src/utils/KeyboardAware/lib/KeyboardAwareFlatList.ts +0 -4
- package/src/utils/KeyboardAware/lib/KeyboardAwareHOC.tsx +0 -592
- package/src/utils/KeyboardAware/lib/KeyboardAwareInterface.ts +0 -13
- package/src/utils/KeyboardAware/lib/KeyboardAwareScrollView.ts +0 -6
- package/src/utils/KeyboardAware/lib/KeyboardAwareSectionList.ts +0 -6
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.NotificationManager = void 0;
|
|
40
|
-
var common_1 = require("@codeleap/common");
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
var messaging_1 = require("@react-native-firebase/messaging");
|
|
43
|
-
var messaging = messaging_1.firebase.messaging;
|
|
44
|
-
var MODULE = 'Notifications';
|
|
45
|
-
var NotificationManager = /** @class */ (function () {
|
|
46
|
-
function NotificationManager(logger, autoHandleInitialNotification) {
|
|
47
|
-
if (logger === void 0) { logger = common_1.silentLogger; }
|
|
48
|
-
if (autoHandleInitialNotification === void 0) { autoHandleInitialNotification = true; }
|
|
49
|
-
this.logger = logger;
|
|
50
|
-
this.autoHandleInitialNotification = autoHandleInitialNotification;
|
|
51
|
-
this.stateChangeListeners = [];
|
|
52
|
-
this.messageListeners = [];
|
|
53
|
-
this._initialized = false;
|
|
54
|
-
this.unsubscribeFromMessage = null;
|
|
55
|
-
this.unsubscribeFromBackgroundMessage = null;
|
|
56
|
-
this.unsubscribeFromPress = null;
|
|
57
|
-
this._currentToken = null;
|
|
58
|
-
this._initialNoficationHandled = false;
|
|
59
|
-
}
|
|
60
|
-
NotificationManager.prototype.init = function () {
|
|
61
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
62
|
-
var token_1, e_1;
|
|
63
|
-
var _this = this;
|
|
64
|
-
return __generator(this, function (_a) {
|
|
65
|
-
switch (_a.label) {
|
|
66
|
-
case 0:
|
|
67
|
-
// return
|
|
68
|
-
if (this.initialized)
|
|
69
|
-
return [2 /*return*/];
|
|
70
|
-
_a.label = 1;
|
|
71
|
-
case 1:
|
|
72
|
-
_a.trys.push([1, 4, , 5]);
|
|
73
|
-
return [4 /*yield*/, messaging().registerDeviceForRemoteMessages()
|
|
74
|
-
// logger.log('firebase registeted', '', MODULE)
|
|
75
|
-
];
|
|
76
|
-
case 2:
|
|
77
|
-
_a.sent();
|
|
78
|
-
return [4 /*yield*/, messaging().getToken()
|
|
79
|
-
// logger.log('init token', { token }, MODULE)
|
|
80
|
-
];
|
|
81
|
-
case 3:
|
|
82
|
-
token_1 = _a.sent();
|
|
83
|
-
// logger.log('init token', { token }, MODULE)
|
|
84
|
-
if (token_1) {
|
|
85
|
-
this.currentToken = token_1;
|
|
86
|
-
this.initialized = true;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
this.currentToken = null;
|
|
90
|
-
this.initialized = false;
|
|
91
|
-
}
|
|
92
|
-
messaging().onTokenRefresh(function (newToken) {
|
|
93
|
-
// logger.log('onTokenRefresh', { newToken }, MODULE)
|
|
94
|
-
if (token_1) {
|
|
95
|
-
_this.currentToken = newToken;
|
|
96
|
-
_this.initialized = true;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
_this.currentToken = null;
|
|
100
|
-
_this.initialized = false;
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
return [3 /*break*/, 5];
|
|
104
|
-
case 4:
|
|
105
|
-
e_1 = _a.sent();
|
|
106
|
-
this.logger.error('Failed to initialize notification services', e_1, MODULE);
|
|
107
|
-
return [3 /*break*/, 5];
|
|
108
|
-
case 5: return [2 /*return*/];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
NotificationManager.prototype.deinit = function () {
|
|
114
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
115
|
-
return __generator(this, function (_a) {
|
|
116
|
-
[
|
|
117
|
-
this.unsubscribeFromMessage,
|
|
118
|
-
this.unsubscribeFromBackgroundMessage,
|
|
119
|
-
this.unsubscribeFromPress,
|
|
120
|
-
].forEach(function (unsubscribe) {
|
|
121
|
-
if (unsubscribe) {
|
|
122
|
-
unsubscribe();
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
this.initialized = false;
|
|
126
|
-
return [2 /*return*/];
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
NotificationManager.prototype.handleNotification = function (args) {
|
|
131
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
132
|
-
var _i, _a, listener;
|
|
133
|
-
return __generator(this, function (_b) {
|
|
134
|
-
switch (_b.label) {
|
|
135
|
-
case 0:
|
|
136
|
-
_i = 0, _a = this.messageListeners;
|
|
137
|
-
_b.label = 1;
|
|
138
|
-
case 1:
|
|
139
|
-
if (!(_i < _a.length)) return [3 /*break*/, 4];
|
|
140
|
-
listener = _a[_i];
|
|
141
|
-
return [4 /*yield*/, listener(args.data, args.type)];
|
|
142
|
-
case 2:
|
|
143
|
-
_b.sent();
|
|
144
|
-
_b.label = 3;
|
|
145
|
-
case 3:
|
|
146
|
-
_i++;
|
|
147
|
-
return [3 /*break*/, 1];
|
|
148
|
-
case 4: return [2 /*return*/];
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
};
|
|
153
|
-
Object.defineProperty(NotificationManager.prototype, "currentToken", {
|
|
154
|
-
get: function () {
|
|
155
|
-
return this._currentToken;
|
|
156
|
-
},
|
|
157
|
-
set: function (token) {
|
|
158
|
-
this._currentToken = token;
|
|
159
|
-
this.triggerStateChange();
|
|
160
|
-
},
|
|
161
|
-
enumerable: false,
|
|
162
|
-
configurable: true
|
|
163
|
-
});
|
|
164
|
-
Object.defineProperty(NotificationManager.prototype, "initialized", {
|
|
165
|
-
get: function () {
|
|
166
|
-
return this._initialized;
|
|
167
|
-
},
|
|
168
|
-
set: function (to) {
|
|
169
|
-
var _this = this;
|
|
170
|
-
if (to) {
|
|
171
|
-
this.logger.info('Initialized', '', MODULE);
|
|
172
|
-
this.unsubscribeFromMessage = messaging().onMessage(function (msg) {
|
|
173
|
-
_this.handleNotification({
|
|
174
|
-
data: msg,
|
|
175
|
-
type: 'foreground',
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
this.unsubscribeFromBackgroundMessage = messaging().setBackgroundMessageHandler(function (msg) { return __awaiter(_this, void 0, void 0, function () {
|
|
179
|
-
return __generator(this, function (_a) {
|
|
180
|
-
this.handleNotification({
|
|
181
|
-
data: msg,
|
|
182
|
-
type: 'background',
|
|
183
|
-
});
|
|
184
|
-
return [2 /*return*/];
|
|
185
|
-
});
|
|
186
|
-
}); });
|
|
187
|
-
this.unsubscribeFromPress = messaging().onNotificationOpenedApp(function (msg) {
|
|
188
|
-
_this.logger.info('Notification press', msg, MODULE);
|
|
189
|
-
_this.handleNotification({
|
|
190
|
-
data: msg,
|
|
191
|
-
type: 'press',
|
|
192
|
-
});
|
|
193
|
-
});
|
|
194
|
-
if (!this._initialNoficationHandled && this.autoHandleInitialNotification) {
|
|
195
|
-
this.getInitialNotification().then(function (msg) {
|
|
196
|
-
if (!msg.data)
|
|
197
|
-
return;
|
|
198
|
-
_this.logger.info('Notification initial', msg, MODULE);
|
|
199
|
-
_this.handleNotification(msg).then(function () {
|
|
200
|
-
_this._initialNoficationHandled = true;
|
|
201
|
-
}).catch(function (e) {
|
|
202
|
-
_this._initialNoficationHandled = true;
|
|
203
|
-
_this.logger.error('Error handling initial notification', e, MODULE);
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
else {
|
|
209
|
-
this.unsubscribeFromMessage = null;
|
|
210
|
-
this.unsubscribeFromBackgroundMessage = null;
|
|
211
|
-
this.unsubscribeFromPress = null;
|
|
212
|
-
this.logger.info('Deinitialized', '', MODULE);
|
|
213
|
-
}
|
|
214
|
-
this._initialized = to;
|
|
215
|
-
this.triggerStateChange();
|
|
216
|
-
},
|
|
217
|
-
enumerable: false,
|
|
218
|
-
configurable: true
|
|
219
|
-
});
|
|
220
|
-
NotificationManager.prototype.onNotification = function (handler) {
|
|
221
|
-
var _this = this;
|
|
222
|
-
var newLen = this.messageListeners.push(handler);
|
|
223
|
-
return function () {
|
|
224
|
-
_this.messageListeners.splice(newLen - 1);
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
NotificationManager.prototype.triggerStateChange = function () {
|
|
228
|
-
var _this = this;
|
|
229
|
-
this.stateChangeListeners.forEach(function (l) {
|
|
230
|
-
l(_this._initialized, _this.currentToken);
|
|
231
|
-
});
|
|
232
|
-
};
|
|
233
|
-
NotificationManager.prototype.onStateChange = function (handler) {
|
|
234
|
-
var _this = this;
|
|
235
|
-
var newLen = this.stateChangeListeners.push(handler);
|
|
236
|
-
return function () {
|
|
237
|
-
_this.stateChangeListeners.splice(newLen - 1);
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
NotificationManager.prototype.getInitialNotification = function () {
|
|
241
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
242
|
-
var msg, e_2;
|
|
243
|
-
return __generator(this, function (_a) {
|
|
244
|
-
switch (_a.label) {
|
|
245
|
-
case 0:
|
|
246
|
-
_a.trys.push([0, 2, , 3]);
|
|
247
|
-
return [4 /*yield*/, messaging().getInitialNotification()];
|
|
248
|
-
case 1:
|
|
249
|
-
msg = _a.sent();
|
|
250
|
-
return [2 /*return*/, {
|
|
251
|
-
data: msg,
|
|
252
|
-
type: 'initial',
|
|
253
|
-
}];
|
|
254
|
-
case 2:
|
|
255
|
-
e_2 = _a.sent();
|
|
256
|
-
return [2 /*return*/, {
|
|
257
|
-
data: null,
|
|
258
|
-
type: 'initial',
|
|
259
|
-
}];
|
|
260
|
-
case 3: return [2 /*return*/];
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
});
|
|
264
|
-
};
|
|
265
|
-
return NotificationManager;
|
|
266
|
-
}());
|
|
267
|
-
exports.NotificationManager = NotificationManager;
|
|
268
|
-
//# sourceMappingURL=notifications.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/utils/notifications.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6D;AAC7D,aAAa;AACb,8DAAmF;AAEnF,IAAM,SAAS,GAAG,oBAAQ,CAAC,SAAS,CAAA;AAEpC,IAAM,MAAM,GAAG,eAAe,CAAA;AAa9B;IAkBI,6BAAoB,MAAqB,EAAS,6BAAoC;QAAlE,uBAAA,EAAA,SAAS,qBAAY;QAAS,8CAAA,EAAA,oCAAoC;QAAlE,WAAM,GAAN,MAAM,CAAe;QAAS,kCAA6B,GAA7B,6BAA6B,CAAO;QAhBtF,yBAAoB,GAAqC,EAAE,CAAA;QAE3D,qBAAgB,GAAyB,EAAE,CAAA;QAE3C,iBAAY,GAAG,KAAK,CAAA;QAEpB,2BAAsB,GAAG,IAAI,CAAA;QAE7B,qCAAgC,GAAG,IAAI,CAAA;QAEvC,yBAAoB,GAAG,IAAI,CAAA;QAE3B,kBAAa,GAAG,IAAI,CAAA;QAEpB,8BAAyB,GAAG,KAAK,CAAA;IAGjC,CAAC;IAEK,kCAAI,GAAV;;;;;;;wBACE,SAAS;wBACT,IAAI,IAAI,CAAC,WAAW;4BAAE,sBAAM;;;;wBAI1B,qBAAM,SAAS,EAAE,CAAC,+BAA+B,EAAE;4BACnD,gDAAgD;0BADG;;wBAAnD,SAAmD,CAAA;wBAGrC,qBAAM,SAAS,EAAE,CAAC,QAAQ,EAAE;4BAC1C,8CAA8C;0BADJ;;wBAApC,UAAQ,SAA4B;wBAC1C,8CAA8C;wBAE9C,IAAI,OAAK,EAAE;4BACT,IAAI,CAAC,YAAY,GAAG,OAAK,CAAA;4BAEzB,IAAI,CAAC,WA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AoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAEtD,OAAO;YACL,KAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAC9C,CAAC,CAAA;IAEH,CAAC;IAEK,oDAAsB,GAA5B;;;;;;;wBAGgB,qBAAM,SAAS,EAAE,CAAC,sBAAsB,EAAE,EAAA;;wBAAhD,GAAG,GAAG,SAA0C;wBACtD,sBAAO;gCACL,IAAI,EAAE,GAAc;gCACpB,IAAI,EAAE,SAAS;6BAChB,EAAA;;;wBAGD,sBAAO;gCACL,IAAI,EAAE,IAAI;gCACV,IAAI,EAAE,SAAS;6BAChB,EAAA;;;;;KAEJ;IACL,0BAAC;AAAD,CAAC,AAzLD,IAyLC;AAzLY,kDAAmB"}
|
package/dist/utils/theme.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
declare type AppValues = {
|
|
2
|
-
headerHeight: number;
|
|
3
|
-
tabBarHeight: number;
|
|
4
|
-
};
|
|
5
|
-
export declare function getMobileThemeValues(initialWindowMetrics: any, values: AppValues): {
|
|
6
|
-
pixel: number;
|
|
7
|
-
hasNotch: any;
|
|
8
|
-
hasIsland: any;
|
|
9
|
-
prefersConstantNavigationBar: boolean;
|
|
10
|
-
safeAreaTop: number;
|
|
11
|
-
safeAreaBottom: number;
|
|
12
|
-
keyboardVerticalOffset: number;
|
|
13
|
-
headerHeight: number;
|
|
14
|
-
tabBarHeight: any;
|
|
15
|
-
bottomNavHeight: any;
|
|
16
|
-
window: {
|
|
17
|
-
height: number;
|
|
18
|
-
width: number;
|
|
19
|
-
};
|
|
20
|
-
transitions: {
|
|
21
|
-
modal: {
|
|
22
|
-
duration: number;
|
|
23
|
-
type: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
buttons: {
|
|
27
|
-
small: {
|
|
28
|
-
height: number;
|
|
29
|
-
};
|
|
30
|
-
default: {
|
|
31
|
-
height: number;
|
|
32
|
-
};
|
|
33
|
-
large: {
|
|
34
|
-
height: number;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
width: number;
|
|
38
|
-
height: number;
|
|
39
|
-
scale: number;
|
|
40
|
-
fontScale: number;
|
|
41
|
-
};
|
|
42
|
-
export {};
|
package/dist/utils/theme.js
DELETED
|
@@ -1,50 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.getMobileThemeValues = void 0;
|
|
15
|
-
var react_native_1 = require("react-native");
|
|
16
|
-
var rnDeviceInfo_1 = require("../modules/rnDeviceInfo");
|
|
17
|
-
function getMobileThemeValues(initialWindowMetrics, values) {
|
|
18
|
-
var _a;
|
|
19
|
-
var screenDimensions = react_native_1.Dimensions.get('screen');
|
|
20
|
-
var hasNotch = rnDeviceInfo_1.DeviceInfo.hasNotch();
|
|
21
|
-
var hasIsland = rnDeviceInfo_1.DeviceInfo.hasDynamicIsland();
|
|
22
|
-
var bottomNavHeight = react_native_1.Platform.OS === 'android' ? (_a = initialWindowMetrics === null || initialWindowMetrics === void 0 ? void 0 : initialWindowMetrics.insets) === null || _a === void 0 ? void 0 : _a.bottom : 0;
|
|
23
|
-
var prefersConstantNavigationBar = bottomNavHeight > 0;
|
|
24
|
-
var safeAreaTop = react_native_1.Platform.OS === 'ios' ? (hasNotch ? 34 + (hasIsland ? 12 : 0) : 20) : react_native_1.StatusBar.currentHeight;
|
|
25
|
-
var safeAreaBottom = (hasNotch && !prefersConstantNavigationBar ? 20 : 0);
|
|
26
|
-
return __assign(__assign({}, screenDimensions), { pixel: react_native_1.StyleSheet.hairlineWidth, hasNotch: hasNotch, hasIsland: hasIsland, prefersConstantNavigationBar: prefersConstantNavigationBar, safeAreaTop: safeAreaTop, safeAreaBottom: safeAreaBottom, keyboardVerticalOffset: react_native_1.Platform.OS === 'ios' ? 57 : 47, get headerHeight() { return values.headerHeight + safeAreaTop; },
|
|
27
|
-
get tabBarHeight() { return values.tabBarHeight + (prefersConstantNavigationBar ? 0 : this.safeAreaBottom); }, bottomNavHeight: bottomNavHeight, get window() {
|
|
28
|
-
return {
|
|
29
|
-
height: screenDimensions.height - (bottomNavHeight + safeAreaTop),
|
|
30
|
-
width: screenDimensions.width,
|
|
31
|
-
};
|
|
32
|
-
}, transitions: {
|
|
33
|
-
modal: {
|
|
34
|
-
duration: 100,
|
|
35
|
-
type: 'timing',
|
|
36
|
-
},
|
|
37
|
-
}, buttons: {
|
|
38
|
-
small: {
|
|
39
|
-
height: 40,
|
|
40
|
-
},
|
|
41
|
-
default: {
|
|
42
|
-
height: 50,
|
|
43
|
-
},
|
|
44
|
-
large: {
|
|
45
|
-
height: 60,
|
|
46
|
-
},
|
|
47
|
-
} });
|
|
48
|
-
}
|
|
49
|
-
exports.getMobileThemeValues = getMobileThemeValues;
|
|
50
|
-
//# sourceMappingURL=theme.js.map
|
package/dist/utils/theme.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,6CAA0E;AAC1E,wDAAkD;AAOlD,SAAgB,oBAAoB,CAAC,oBAAoB,EAAE,MAAiB;;IAC1E,IAAM,gBAAgB,GAAG,yBAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAEjD,IAAM,QAAQ,GAAG,yBAAU,CAAC,QAAQ,EAAE,CAAA;IACtC,IAAM,SAAS,GAAG,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AG,WAAW,CAAC;gBACjE,KAAK,EAAE,gBAAgB,CAAC,KAAK;aAC9B,CAAA;QACH,CAAC,EACD,WAAW,EAAE;YACX,KAAK,EAAE;gBACL,QAAQ,EAAE,GAAG;gBACb,IAAI,EAAE,QAAQ;aACf;SACF,EACD,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,MAAM,EAAE,EAAE;aACX;YACD,OAAO,EAAE;gBACP,MAAM,EAAE,EAAE;aACX;YACD,KAAK,EAAE;gBACL,MAAM,EAAE,EAAE;aACX;SACF,IACF;AACH,CAAC;AAjDD,oDAiDC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { onUpdate } from '@codeleap/common'
|
|
2
|
-
import React, { useRef } from 'react'
|
|
3
|
-
|
|
4
|
-
import posed from 'react-native-pose'
|
|
5
|
-
import { Touchable } from './Touchable'
|
|
6
|
-
import { View } from './View'
|
|
7
|
-
const Components = {
|
|
8
|
-
Touchable,
|
|
9
|
-
View,
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const PosedComponents = Object.fromEntries(
|
|
13
|
-
Object.entries(Components).map(([key, Render]) => [key, posed(Render)]),
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
type AnimatedComponents = typeof Components
|
|
17
|
-
type CP = keyof AnimatedComponents
|
|
18
|
-
|
|
19
|
-
type AnimatedProps<T extends CP, CFG = Record<string, any>> = {
|
|
20
|
-
component: T
|
|
21
|
-
config: CFG
|
|
22
|
-
pose: keyof CFG
|
|
23
|
-
initialPose?: keyof CFG
|
|
24
|
-
} & Omit<Parameters<AnimatedComponents[T]>[0], 'component'>
|
|
25
|
-
|
|
26
|
-
export const Animated = <T extends CP, CFG = any>({
|
|
27
|
-
config,
|
|
28
|
-
component,
|
|
29
|
-
...props
|
|
30
|
-
}: AnimatedProps<T, CFG>) => {
|
|
31
|
-
const Component = useRef(PosedComponents[component](config)).current
|
|
32
|
-
|
|
33
|
-
return <Component withParent={false} {...props} />
|
|
34
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { ComponentVariants,
|
|
3
|
-
FormTypes,
|
|
4
|
-
getNestedStylesByKey,
|
|
5
|
-
IconPlaceholder,
|
|
6
|
-
onUpdate,
|
|
7
|
-
PropsOf,
|
|
8
|
-
ReactStateProps,
|
|
9
|
-
TypeGuards,
|
|
10
|
-
useDebounce,
|
|
11
|
-
useDefaultComponentStyle,
|
|
12
|
-
useMemo,
|
|
13
|
-
useState,
|
|
14
|
-
} from '@codeleap/common'
|
|
15
|
-
import { ModalHeaderProps } from '../Modal'
|
|
16
|
-
import { TextInput, TextInputProps } from '../TextInput'
|
|
17
|
-
import { View, ViewProps } from '../View'
|
|
18
|
-
import { CustomSelectProps, Select } from '../Select'
|
|
19
|
-
import { AutoCompleteStyles, AutoCompleteComposition } from './styles'
|
|
20
|
-
import { StylesOf } from '../../types'
|
|
21
|
-
import { StyleSheet } from 'react-native'
|
|
22
|
-
import { Text } from '../Text'
|
|
23
|
-
import { Button } from '../Button'
|
|
24
|
-
|
|
25
|
-
export type AutoCompleteHeaderProps = ReactStateProps<'search', string> &
|
|
26
|
-
Omit<PropsOf<typeof View>, 'style'|'styles'|'variants'>
|
|
27
|
-
& {
|
|
28
|
-
label: FormTypes.Label
|
|
29
|
-
searchInputProps?: Partial<TextInputProps>
|
|
30
|
-
styles: ModalHeaderProps['styles'] & { searchInput?: TextInputProps['styles']; titleWrapper?:ViewProps['style']}
|
|
31
|
-
debugName: string
|
|
32
|
-
icon?: IconPlaceholder
|
|
33
|
-
toggle: ModalHeaderProps['toggle']
|
|
34
|
-
description?: React.ReactElement
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const AutoCompleteHeader:React.FC<AutoCompleteHeaderProps> = (props) => {
|
|
38
|
-
const { search, setSearch, icon = 'search', description = null, debugName, label, styles, toggle, searchInputProps, ...viewProps } = props
|
|
39
|
-
|
|
40
|
-
return <View style={[styles.wrapper]} {...viewProps}>
|
|
41
|
-
<View style={styles.titleWrapper}>
|
|
42
|
-
<Text style={styles.title} text={label}/>
|
|
43
|
-
<Button
|
|
44
|
-
icon={'close' as IconPlaceholder}
|
|
45
|
-
debugName={`Close Autocomplete ${debugName} button`}
|
|
46
|
-
onPress={toggle} variants={['icon']}
|
|
47
|
-
styles={styles.closeButton}/>
|
|
48
|
-
</View>
|
|
49
|
-
{
|
|
50
|
-
description
|
|
51
|
-
}
|
|
52
|
-
<TextInput subtitle={() => null} leftIcon={{
|
|
53
|
-
icon: icon as IconPlaceholder,
|
|
54
|
-
}} debugName={`AutoComplete ${debugName} search input`} value={search} onChangeText={setSearch} styles={styles.searchInput} {...searchInputProps}/>
|
|
55
|
-
</View>
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type AutoCompleteOption<T> = CustomSelectProps<T>['options'][number] & {searchTerm?: string}
|
|
59
|
-
|
|
60
|
-
export type AutoCompleteProps<
|
|
61
|
-
T,
|
|
62
|
-
Base extends CustomSelectProps<T> = CustomSelectProps<T>
|
|
63
|
-
> = Omit<Base, 'options'| 'variants' | 'styles'> & {
|
|
64
|
-
options: AutoCompleteOption<T>[]
|
|
65
|
-
caseSensitive?: boolean
|
|
66
|
-
debounce?: number
|
|
67
|
-
headerProps?: Partial<AutoCompleteHeaderProps>
|
|
68
|
-
styles?: StylesOf<AutoCompleteComposition>
|
|
69
|
-
filterFn?: (search?: string, option?:AutoCompleteOption<T>) => boolean
|
|
70
|
-
} & ComponentVariants<typeof AutoCompleteStyles>
|
|
71
|
-
|
|
72
|
-
export const AutoComplete = <T extends string|number = string>(props: AutoCompleteProps<T>) => {
|
|
73
|
-
const {
|
|
74
|
-
options,
|
|
75
|
-
caseSensitive = false,
|
|
76
|
-
debounce = 200,
|
|
77
|
-
filterFn,
|
|
78
|
-
headerProps = {},
|
|
79
|
-
variants,
|
|
80
|
-
styles,
|
|
81
|
-
...selectProps
|
|
82
|
-
} = props
|
|
83
|
-
|
|
84
|
-
const [search, setSearch] = useState('')
|
|
85
|
-
const [debouncedSearch, resetDebounce] = useDebounce(search, debounce)
|
|
86
|
-
const [filteredOptions, setFilteredOptions] = useState(options)
|
|
87
|
-
|
|
88
|
-
const [loading, setLoading] = useState(false)
|
|
89
|
-
const variantStyles = useDefaultComponentStyle<'u:AutoComplete', typeof AutoCompleteStyles>('u:AutoComplete', {
|
|
90
|
-
variants,
|
|
91
|
-
transform: StyleSheet.flatten,
|
|
92
|
-
styles,
|
|
93
|
-
})
|
|
94
|
-
const serialVariants = JSON.stringify(variantStyles)
|
|
95
|
-
const { searchInputStyles, closeButtonStyles } = useMemo(() => ({
|
|
96
|
-
searchInputStyles: getNestedStylesByKey('searchInput', variantStyles),
|
|
97
|
-
closeButtonStyles: getNestedStylesByKey('closeButton', variantStyles),
|
|
98
|
-
|
|
99
|
-
}), [serialVariants])
|
|
100
|
-
|
|
101
|
-
onUpdate(() => {
|
|
102
|
-
setLoading(true)
|
|
103
|
-
let persist = true
|
|
104
|
-
setTimeout(() => {
|
|
105
|
-
|
|
106
|
-
const newOpts = options.filter((option) => {
|
|
107
|
-
if (filterFn) {
|
|
108
|
-
return filterFn(debouncedSearch, option)
|
|
109
|
-
}
|
|
110
|
-
const { label, searchTerm, value } = option
|
|
111
|
-
let term = searchTerm || (TypeGuards.isString(label) ? label : value.toString())
|
|
112
|
-
|
|
113
|
-
if (!caseSensitive) {
|
|
114
|
-
term = term.toLowerCase()
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return term.includes(debouncedSearch.toLowerCase())
|
|
118
|
-
})
|
|
119
|
-
if (persist) {
|
|
120
|
-
setFilteredOptions(newOpts)
|
|
121
|
-
setTimeout(() => {
|
|
122
|
-
if (persist) {
|
|
123
|
-
setLoading(false)
|
|
124
|
-
}
|
|
125
|
-
}, debounce * 1.5)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
})
|
|
129
|
-
return () => {
|
|
130
|
-
persist = false
|
|
131
|
-
resetDebounce()
|
|
132
|
-
}
|
|
133
|
-
}, [debouncedSearch, caseSensitive, options.length, filterFn])
|
|
134
|
-
return <Select
|
|
135
|
-
styles={variantStyles}
|
|
136
|
-
options={ loading ? [] : filteredOptions}
|
|
137
|
-
header={
|
|
138
|
-
<AutoCompleteHeader
|
|
139
|
-
debugName={selectProps.debugName}
|
|
140
|
-
label={selectProps.label}
|
|
141
|
-
search={search}
|
|
142
|
-
setSearch={setSearch}
|
|
143
|
-
toggle={selectProps.toggle}
|
|
144
|
-
styles={{
|
|
145
|
-
wrapper: variantStyles.header,
|
|
146
|
-
closeButton: closeButtonStyles,
|
|
147
|
-
title: variantStyles.title,
|
|
148
|
-
searchInput: searchInputStyles,
|
|
149
|
-
titleWrapper: variantStyles.titleWrapper,
|
|
150
|
-
}}
|
|
151
|
-
|
|
152
|
-
{...headerProps}
|
|
153
|
-
/>
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
{...selectProps}
|
|
157
|
-
listProps={{
|
|
158
|
-
...selectProps?.listProps,
|
|
159
|
-
placeholder: {
|
|
160
|
-
loading,
|
|
161
|
-
...selectProps?.listProps?.placeholder,
|
|
162
|
-
},
|
|
163
|
-
}}
|
|
164
|
-
/>
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
export * from './styles'
|