@codeleap/mobile 2.4.7 → 3.0.2
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 +264 -93
- 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,61 +0,0 @@
|
|
|
1
|
-
export declare type IconComposition = 'icon';
|
|
2
|
-
export declare const IconStyles: {
|
|
3
|
-
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
4
|
-
originalColor: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
5
|
-
white: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
6
|
-
primary: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
7
|
-
negative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
8
|
-
positive: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
9
|
-
small: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
10
|
-
medium: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
11
|
-
large: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
12
|
-
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
13
|
-
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
14
|
-
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
15
|
-
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
16
|
-
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
17
|
-
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
18
|
-
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
19
|
-
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
20
|
-
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
21
|
-
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
22
|
-
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
23
|
-
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
24
|
-
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
25
|
-
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
26
|
-
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
27
|
-
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
28
|
-
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
29
|
-
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
30
|
-
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
31
|
-
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
32
|
-
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
33
|
-
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
34
|
-
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
35
|
-
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
36
|
-
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
37
|
-
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
38
|
-
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
39
|
-
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
40
|
-
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
41
|
-
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
42
|
-
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
43
|
-
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
44
|
-
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
45
|
-
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
46
|
-
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
47
|
-
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
48
|
-
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
49
|
-
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
50
|
-
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
51
|
-
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
52
|
-
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
53
|
-
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
54
|
-
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
55
|
-
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
56
|
-
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
57
|
-
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
58
|
-
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
59
|
-
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
60
|
-
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<"icon", any>>;
|
|
61
|
-
};
|
|
@@ -1,49 +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.IconStyles = void 0;
|
|
15
|
-
var common_1 = require("@codeleap/common");
|
|
16
|
-
var createIconStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
-
var presets = (0, common_1.includePresets)(function (styles) { return createIconStyle(function () { return ({ icon: styles }); }); });
|
|
18
|
-
exports.IconStyles = __assign(__assign({}, presets), { default: createIconStyle(function (theme) { return ({
|
|
19
|
-
icon: {
|
|
20
|
-
color: theme.colors.icon,
|
|
21
|
-
},
|
|
22
|
-
}); }), originalColor: createIconStyle(function (theme) { return ({
|
|
23
|
-
icon: {
|
|
24
|
-
color: 'auto',
|
|
25
|
-
},
|
|
26
|
-
}); }), white: createIconStyle(function (theme) { return ({
|
|
27
|
-
icon: {
|
|
28
|
-
color: theme.colors.white,
|
|
29
|
-
},
|
|
30
|
-
}); }), primary: createIconStyle(function (theme) { return ({
|
|
31
|
-
icon: {
|
|
32
|
-
color: theme.colors.primary,
|
|
33
|
-
},
|
|
34
|
-
}); }), negative: createIconStyle(function (theme) { return ({
|
|
35
|
-
icon: {
|
|
36
|
-
color: theme.colors.negative,
|
|
37
|
-
},
|
|
38
|
-
}); }), positive: createIconStyle(function (theme) { return ({
|
|
39
|
-
icon: {
|
|
40
|
-
color: theme.colors.positive,
|
|
41
|
-
},
|
|
42
|
-
}); }), small: createIconStyle(function (theme) { return ({
|
|
43
|
-
icon: __assign({}, theme.sized(1)),
|
|
44
|
-
}); }), medium: createIconStyle(function (theme) { return ({
|
|
45
|
-
icon: __assign({}, theme.sized(2)),
|
|
46
|
-
}); }), large: createIconStyle(function (theme) { return ({
|
|
47
|
-
icon: __assign({}, theme.sized(3)),
|
|
48
|
-
}); }) });
|
|
49
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Icon/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA8E;AAI9E,IAAM,eAAe,GAAG,IAAA,oCAA2B,GAAmB,CAAA;AAEtE,IAAM,OAAO,GAAG,IAAA,uBAAc,EAAC,UAAC,MAAM,IAAK,OAAA,eAAe,CAAC,cAAM,OAAA,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAlB,CAAkB,CAAC,EAAzC,CAAyC,CAAC,CAAA;AAExE,QAAA,UAAU,yBAClB,OAAO,KAC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EAJiC,CAIjC,CAAC,EACH,KAAK,EAAE,eAAe,CAAC,UAAC,KAAK,IAAK,OAAA,CAAC;QACjC,IAAI,eACC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAClB;KACF,CAAC,EAJgC,CAIhC,CAAC,IACJ"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ComponentVariants, FormTypes } from '@codeleap/common';
|
|
3
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
4
|
-
import { Image as NativeImage, ImageStyle, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
5
|
-
import { FastImage } from '../../modules/fastImage';
|
|
6
|
-
import { ImageComposition, ImageStyles } from './styles';
|
|
7
|
-
import { LoadingOverlayProps } from '../LoadingOverlay';
|
|
8
|
-
import { StylesOf } from '../../types';
|
|
9
|
-
export * from './styles';
|
|
10
|
-
declare type NativeImageProps = ComponentPropsWithoutRef<typeof NativeImage>;
|
|
11
|
-
export declare type ImageProps = Omit<NativeImageProps, 'source' | 'style'> & {
|
|
12
|
-
variants?: ComponentVariants<typeof ImageStyles>['variants'];
|
|
13
|
-
fast?: boolean;
|
|
14
|
-
styles?: StylesOf<ImageComposition>;
|
|
15
|
-
style?: StyleProp<ImageStyle | TextStyle | ViewStyle>;
|
|
16
|
-
source: (NativeImageProps['source'] & {
|
|
17
|
-
priority?: keyof typeof FastImage.priority;
|
|
18
|
-
}) | FormTypes.AnyFile | string | number;
|
|
19
|
-
resizeMode?: keyof typeof FastImage.resizeMode;
|
|
20
|
-
spotlight?: string;
|
|
21
|
-
maintainAspectRatio?: boolean;
|
|
22
|
-
withLoadingOverlay?: boolean | React.FC<LoadingOverlayProps>;
|
|
23
|
-
};
|
|
24
|
-
export declare const ImageComponent: React.FC<ImageProps>;
|
|
25
|
-
export declare const Image: React.NamedExoticComponent<ImageProps>;
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
|
-
};
|
|
24
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
25
|
-
var t = {};
|
|
26
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
27
|
-
t[p] = s[p];
|
|
28
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
29
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
30
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
31
|
-
t[p[i]] = s[p[i]];
|
|
32
|
-
}
|
|
33
|
-
return t;
|
|
34
|
-
};
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Image = exports.ImageComponent = void 0;
|
|
37
|
-
var React = __importStar(require("react"));
|
|
38
|
-
var common_1 = require("@codeleap/common");
|
|
39
|
-
var react_native_1 = require("react-native");
|
|
40
|
-
var fastImage_1 = require("../../modules/fastImage");
|
|
41
|
-
var Spotlight_1 = require("../ImageView/Spotlight");
|
|
42
|
-
var Touchable_1 = require("../Touchable");
|
|
43
|
-
var utils_1 = require("../../utils");
|
|
44
|
-
var LoadingOverlay_1 = require("../LoadingOverlay");
|
|
45
|
-
__exportStar(require("./styles"), exports);
|
|
46
|
-
var ImageComponent = function (props) {
|
|
47
|
-
var variants = props.variants, style = props.style, _a = props.styles, componentStyleSheet = _a === void 0 ? {} : _a, _b = props.fast, fast = _b === void 0 ? true : _b, _c = props.spotlight, spotlight = _c === void 0 ? null : _c, _d = props.resizeMode, resizeMode = _d === void 0 ? 'contain' : _d, source = props.source, _e = props.withLoadingOverlay, withLoadingOverlay = _e === void 0 ? false : _e, _f = props.maintainAspectRatio, maintainAspectRatio = _f === void 0 ? true : _f, imageProps = __rest(props, ["variants", "style", "styles", "fast", "spotlight", "resizeMode", "source", "withLoadingOverlay", "maintainAspectRatio"]);
|
|
48
|
-
var variantStyles = (0, common_1.useDefaultComponentStyle)('u:Image', { variants: variants, styles: componentStyleSheet, transform: react_native_1.StyleSheet.flatten });
|
|
49
|
-
var _g = React.useState(false), loading = _g[0], setLoading = _g[1];
|
|
50
|
-
var styles = react_native_1.StyleSheet.flatten([variantStyles.wrapper, style]);
|
|
51
|
-
var imSource = source;
|
|
52
|
-
if ((0, utils_1.isFile)(imSource)) {
|
|
53
|
-
imSource = (0, utils_1.toMultipartFile)(imSource);
|
|
54
|
-
}
|
|
55
|
-
else if (common_1.TypeGuards.isString(source)) {
|
|
56
|
-
imSource = { uri: source };
|
|
57
|
-
}
|
|
58
|
-
var spotlightActions = (0, Spotlight_1.useImageSpotlight)(spotlight, props.source);
|
|
59
|
-
var Wrapper = !!spotlight ? Touchable_1.Touchable : function (_a) {
|
|
60
|
-
var children = _a.children;
|
|
61
|
-
return <>{children}</>;
|
|
62
|
-
};
|
|
63
|
-
var wrapperProps = {
|
|
64
|
-
onPress: spotlightActions.onImagePressed,
|
|
65
|
-
debugName: "Press spotlight image ".concat(props.source),
|
|
66
|
-
style: [variantStyles.touchable],
|
|
67
|
-
android_ripple: null,
|
|
68
|
-
};
|
|
69
|
-
var aspectRatioStyle = React.useMemo(function () {
|
|
70
|
-
if (!maintainAspectRatio || !imSource)
|
|
71
|
-
return null;
|
|
72
|
-
try {
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
var assetSource = react_native_1.Image.resolveAssetSource(imSource);
|
|
75
|
-
var aspectRatio = assetSource.width / assetSource.height;
|
|
76
|
-
if (Number.isNaN(aspectRatio)) {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
aspectRatio: aspectRatio,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
catch (e) {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
}, [maintainAspectRatio, imSource]);
|
|
87
|
-
var loadEndedEarly = React.useRef(false);
|
|
88
|
-
var loadProps = React.useRef({
|
|
89
|
-
onLoadStart: function () {
|
|
90
|
-
if (withLoadingOverlay) {
|
|
91
|
-
setTimeout(function () {
|
|
92
|
-
if (!loadEndedEarly.current) {
|
|
93
|
-
setLoading(true);
|
|
94
|
-
}
|
|
95
|
-
}, 60);
|
|
96
|
-
}
|
|
97
|
-
}, onLoadEnd: function () {
|
|
98
|
-
loadEndedEarly.current = true;
|
|
99
|
-
if (withLoadingOverlay)
|
|
100
|
-
setLoading(false);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
var Loading = common_1.TypeGuards.isFunction(withLoadingOverlay) ? withLoadingOverlay : LoadingOverlay_1.LoadingOverlay;
|
|
104
|
-
var showLoading = !!withLoadingOverlay;
|
|
105
|
-
var overlayStyle = React.useMemo(function () { return (0, common_1.getNestedStylesByKey)('overlay', variantStyles); }, [variantStyles]);
|
|
106
|
-
var loadingElement = React.useMemo(function () {
|
|
107
|
-
return showLoading ? (<Loading visible={loading} styles={overlayStyle}/>) : null;
|
|
108
|
-
}, [showLoading, loading]);
|
|
109
|
-
if (fast) {
|
|
110
|
-
return (<Wrapper {...wrapperProps}>
|
|
111
|
-
|
|
112
|
-
<fastImage_1.FastImage style={[aspectRatioStyle, styles]}
|
|
113
|
-
// @ts-ignore
|
|
114
|
-
tintColor={styles === null || styles === void 0 ? void 0 : styles.tintColor} source={imSource} resizeMode={fastImage_1.FastImage.resizeMode[resizeMode || 'contain']} {...loadProps.current} {...imageProps}/>
|
|
115
|
-
{loadingElement}
|
|
116
|
-
</Wrapper>);
|
|
117
|
-
}
|
|
118
|
-
return <Wrapper {...wrapperProps}>
|
|
119
|
-
<react_native_1.Image style={[aspectRatioStyle, styles]} resizeMode={resizeMode} source={imSource} {...imageProps} {...loadProps.current}/>
|
|
120
|
-
{loadingElement}
|
|
121
|
-
</Wrapper>;
|
|
122
|
-
};
|
|
123
|
-
exports.ImageComponent = ImageComponent;
|
|
124
|
-
function areEqual(prevProps, nextProps) {
|
|
125
|
-
var check = ['source', 'style', 'variants', 'resizeMode', 'fast'];
|
|
126
|
-
var res = (0, common_1.arePropsEqual)(prevProps, nextProps, { check: check });
|
|
127
|
-
return res;
|
|
128
|
-
}
|
|
129
|
-
exports.Image = React.memo(exports.ImageComponent, areEqual);
|
|
130
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Image/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CASyB;AAEzB,6CAOqB;AACrB,qDAAmD;AAKnD,oDAA0D;AAC1D,0CAAwC;AACxC,qCAAqD;AACrD,oDAAuE;AAEvE,2CAAwB;AAuBjB,IAAM,cAAc,GAAyB,UAAC,K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KACF;IACD,OAAO,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,CAC/B;IAAA,CAAC,oBAAW,CACV,KAAK,CAAC,CAAC,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAClC,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAK,UAAkB,CAAC,CAC1C,IAAI,SAAS,CAAC,OAAO,CAAC,EAExB;IAAA,CACE,cAAc,CAElB;EAAA,EAAE,OAAO,CAAC,CAAA;AACZ,CAAC,CAAA;AAhHY,QAAA,cAAc,kBAgH1B;AAED,SAAS,QAAQ,CAAC,SAAS,EAAE,SAAS;IACpC,IAAM,KAAK,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,CAAC,CAAA;IACnE,IAAM,GAAG,GAAG,IAAA,sBAAa,EAAC,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,OAAA,EAAE,CAAC,CAAA;IAC1D,OAAO,GAAG,CAAA;AACZ,CAAC;AAEY,QAAA,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,sBAAc,EAAE,QAAQ,CAAC,CAAA"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { LoadingOverlayComposition } from '../LoadingOverlay/styles';
|
|
2
|
-
export declare type ImageComposition = 'wrapper' | 'touchable' | `overlay${Capitalize<LoadingOverlayComposition>}`;
|
|
3
|
-
export declare const ImageStyles: {
|
|
4
|
-
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
5
|
-
round: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
6
|
-
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
7
|
-
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
8
|
-
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
9
|
-
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
10
|
-
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
11
|
-
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
12
|
-
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
13
|
-
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
14
|
-
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
15
|
-
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
16
|
-
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
17
|
-
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
18
|
-
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
19
|
-
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
20
|
-
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
21
|
-
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
22
|
-
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
23
|
-
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
24
|
-
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
25
|
-
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
26
|
-
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
27
|
-
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
28
|
-
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
29
|
-
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
30
|
-
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
31
|
-
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
32
|
-
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
33
|
-
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
34
|
-
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
35
|
-
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
36
|
-
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
37
|
-
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
38
|
-
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
39
|
-
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
40
|
-
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
41
|
-
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
42
|
-
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
43
|
-
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
44
|
-
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
45
|
-
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
46
|
-
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
47
|
-
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
48
|
-
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
49
|
-
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
50
|
-
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
51
|
-
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
52
|
-
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
53
|
-
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
54
|
-
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ImageComposition, any>>;
|
|
55
|
-
};
|
|
@@ -1,25 +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.ImageStyles = void 0;
|
|
15
|
-
var common_1 = require("@codeleap/common");
|
|
16
|
-
var createImageStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
-
var presets = (0, common_1.includePresets)(function (styles) { return createImageStyle(function () { return ({ wrapper: styles, touchable: styles }); }); });
|
|
18
|
-
exports.ImageStyles = __assign(__assign({}, presets), { default: createImageStyle(function () { return ({
|
|
19
|
-
wrapper: {},
|
|
20
|
-
}); }), round: createImageStyle(function () { return ({
|
|
21
|
-
wrapper: {
|
|
22
|
-
borderRadius: 100,
|
|
23
|
-
},
|
|
24
|
-
}); }) });
|
|
25
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Image/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA8E;AAI9E,IAAM,gBAAgB,GAAG,IAAA,oCAA2B,GAAoB,CAAA;AAExE,IAAM,OAAO,GAAG,IAAA,uBAAc,EAAC,UAAC,MAAM,IAAK,OAAA,gBAAgB,CAAC,cAAM,OAAA,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAxC,CAAwC,CAAC,EAAhE,CAAgE,CAC1G,CAAA;AAEY,QAAA,WAAW,yBACnB,OAAO,KACV,OAAO,EAAE,gBAAgB,CAAC,cAAM,OAAA,CAAC;QAC/B,OAAO,EAAE,EAAE;KACZ,CAAC,EAF8B,CAE9B,CAAC,EAEH,KAAK,EAAE,gBAAgB,CAAC,cAAM,OAAA,CAAC;QAC7B,OAAO,EAAE;YACP,YAAY,EAAE,GAAG;SAClB;KACF,CAAC,EAJ4B,CAI5B,CAAC,IACJ"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ImageSource } from 'react-native-image-viewing/dist/@types';
|
|
3
|
-
import { ImageProps } from '../Image';
|
|
4
|
-
declare type TImage = {
|
|
5
|
-
source: ImageSource;
|
|
6
|
-
created: number;
|
|
7
|
-
id: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const SpotlightProvider: React.FC<React.PropsWithChildren<any>>;
|
|
10
|
-
export declare function useSpotlight(name: string): {
|
|
11
|
-
images: TImage[];
|
|
12
|
-
currentIndex: number;
|
|
13
|
-
set(img: ImageSource, id?: string): string;
|
|
14
|
-
remove(id: string): void;
|
|
15
|
-
open(id: string): void;
|
|
16
|
-
close(): void;
|
|
17
|
-
clear(): void;
|
|
18
|
-
};
|
|
19
|
-
export declare const useImageSpotlight: (name: string | null, src: ImageProps['source']) => {
|
|
20
|
-
onImagePressed: () => void;
|
|
21
|
-
};
|
|
22
|
-
export declare const Spotlight: ({ name }: {
|
|
23
|
-
name: any;
|
|
24
|
-
}) => JSX.Element;
|
|
25
|
-
export {};
|
|
@@ -1,150 +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
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
-
if (mod && mod.__esModule) return mod;
|
|
27
|
-
var result = {};
|
|
28
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
-
__setModuleDefault(result, mod);
|
|
30
|
-
return result;
|
|
31
|
-
};
|
|
32
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
-
};
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Spotlight = exports.useImageSpotlight = exports.useSpotlight = exports.SpotlightProvider = void 0;
|
|
37
|
-
var react_1 = __importStar(require("react"));
|
|
38
|
-
var common_1 = require("@codeleap/common");
|
|
39
|
-
var react_native_uuid_1 = __importDefault(require("react-native-uuid"));
|
|
40
|
-
var component_1 = require("./component");
|
|
41
|
-
var SpotlightCtx = react_1.default.createContext({});
|
|
42
|
-
var SpotlightProvider = function (_a) {
|
|
43
|
-
var children = _a.children;
|
|
44
|
-
var _b = (0, react_1.useState)({}), spotlights = _b[0], setSpotlights = _b[1];
|
|
45
|
-
var _c = (0, react_1.useState)({}), indexes = _c[0], setIndexes = _c[1];
|
|
46
|
-
var ctxValue = {
|
|
47
|
-
spotlights: spotlights,
|
|
48
|
-
setSpotlights: setSpotlights,
|
|
49
|
-
indexes: indexes,
|
|
50
|
-
setIndexes: setIndexes,
|
|
51
|
-
};
|
|
52
|
-
return <SpotlightCtx.Provider value={ctxValue}>
|
|
53
|
-
{children}
|
|
54
|
-
</SpotlightCtx.Provider>;
|
|
55
|
-
};
|
|
56
|
-
exports.SpotlightProvider = SpotlightProvider;
|
|
57
|
-
function useSpotlight(name) {
|
|
58
|
-
var ctx = (0, react_1.useContext)(SpotlightCtx);
|
|
59
|
-
var imList = Object.values(ctx.spotlights[name] || {});
|
|
60
|
-
return {
|
|
61
|
-
images: imList,
|
|
62
|
-
currentIndex: ctx.indexes[name],
|
|
63
|
-
set: function (img, id) {
|
|
64
|
-
var newId = id || react_native_uuid_1.default.v4();
|
|
65
|
-
ctx.setSpotlights(function (prev) {
|
|
66
|
-
var _a;
|
|
67
|
-
var images = __assign({}, prev[name]);
|
|
68
|
-
if (id !== null) {
|
|
69
|
-
images[id] = __assign(__assign({}, images[id]), { source: img });
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
var now = Date.now();
|
|
73
|
-
images[newId] = {
|
|
74
|
-
created: now,
|
|
75
|
-
id: newId,
|
|
76
|
-
source: img,
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
return __assign(__assign({}, prev), (_a = {}, _a[name] = images, _a));
|
|
80
|
-
});
|
|
81
|
-
return newId;
|
|
82
|
-
},
|
|
83
|
-
remove: function (id) {
|
|
84
|
-
ctx.setSpotlights(function (prev) {
|
|
85
|
-
var _a;
|
|
86
|
-
var images = __assign({}, prev[name]);
|
|
87
|
-
delete images[id];
|
|
88
|
-
return __assign(__assign({}, prev), (_a = {}, _a[name] = images, _a));
|
|
89
|
-
});
|
|
90
|
-
},
|
|
91
|
-
open: function (id) {
|
|
92
|
-
var newIdx = imList.findIndex(function (x) { return x.id === id; });
|
|
93
|
-
ctx.setIndexes(function (prev) {
|
|
94
|
-
var _a;
|
|
95
|
-
return (__assign(__assign({}, prev), (_a = {}, _a[name] = newIdx, _a)));
|
|
96
|
-
});
|
|
97
|
-
},
|
|
98
|
-
close: function () {
|
|
99
|
-
ctx.setIndexes(function (prev) {
|
|
100
|
-
var _a;
|
|
101
|
-
return (__assign(__assign({}, prev), (_a = {}, _a[name] = undefined, _a)));
|
|
102
|
-
});
|
|
103
|
-
},
|
|
104
|
-
clear: function () {
|
|
105
|
-
ctx.setIndexes(function (prev) {
|
|
106
|
-
var _a;
|
|
107
|
-
return (__assign(__assign({}, prev), (_a = {}, _a[name] = undefined, _a)));
|
|
108
|
-
});
|
|
109
|
-
ctx.setSpotlights(function (prev) {
|
|
110
|
-
var _a;
|
|
111
|
-
return __assign(__assign({}, prev), (_a = {}, _a[name] = {}, _a));
|
|
112
|
-
});
|
|
113
|
-
},
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
exports.useSpotlight = useSpotlight;
|
|
117
|
-
var useImageSpotlight = function (name, src) {
|
|
118
|
-
var _a = (0, react_1.useState)(null), id = _a[0], setId = _a[1];
|
|
119
|
-
var spotlight = useSpotlight(name);
|
|
120
|
-
var imSource = common_1.TypeGuards.isString(src) ? { uri: src } : src;
|
|
121
|
-
var prevSource = (0, common_1.usePrevious)(imSource);
|
|
122
|
-
(0, common_1.onUpdate)(function () {
|
|
123
|
-
if (!name)
|
|
124
|
-
return;
|
|
125
|
-
if ((0, common_1.deepEqual)(prevSource, imSource))
|
|
126
|
-
return;
|
|
127
|
-
setId(spotlight.set(imSource, id));
|
|
128
|
-
}, [src, id]);
|
|
129
|
-
(0, common_1.useUnmount)(function () {
|
|
130
|
-
if (!name)
|
|
131
|
-
return;
|
|
132
|
-
spotlight.remove(id);
|
|
133
|
-
});
|
|
134
|
-
return {
|
|
135
|
-
onImagePressed: function () {
|
|
136
|
-
spotlight.open(id);
|
|
137
|
-
},
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
exports.useImageSpotlight = useImageSpotlight;
|
|
141
|
-
var Spotlight = function (_a) {
|
|
142
|
-
var name = _a.name;
|
|
143
|
-
var spotlight = useSpotlight(name);
|
|
144
|
-
(0, common_1.useUnmount)(function () {
|
|
145
|
-
spotlight.clear();
|
|
146
|
-
});
|
|
147
|
-
return <component_1.ImageView imageIndex={spotlight.currentIndex} images={spotlight.images.map(function (x) { return x.source; })} keyExtractor={function (_, index) { return index.toString(); }} onRequestClose={spotlight.close} visible={typeof spotlight.currentIndex !== 'undefined'}/>;
|
|
148
|
-
};
|
|
149
|
-
exports.Spotlight = Spotlight;
|
|
150
|
-
//# sourceMappingURL=Spotlight.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Spotlight.js","sourceRoot":"","sources":["../../../src/components/ImageView/Spotlight.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAmD;AACnD,2CAAuG;AAGvG,wEAAoC;AACpC,yCAAuC;AAoBvC,IAAM,YAAY,GAAG,eAAK,CAAC,aAAa,CAAC,EAAmB,CAAC,CAAA;AAEtD,IAAM,iBAAiB,GAA0C,UAAC,EAAY;QAAV,QAAQ,cAAA;IAC3E,IAAA,KAA8B,IAAA,gBAAQ,EAA8B,EAAE,CAAC,EAAtE,UAAU,QAAA,EAAE,aAAa,QAA6C,CAAA;IACvE,IAAA,KAAwB,IAAA,gBAAQ,EAA2B,EAAE,CAAC,EAA7D,OAAO,QAAA,EAAE,UAAU,QAA0C,CAAA;IACpE,IAAM,QAAQ,GAAiB;QAC7B,UAAU,YAAA;QACV,aAAa,eAAA;QACb,OAAO,SAAA;QACP,UAAU,YAAA;KACX,CAAA;IAED,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAC5C;IAAA,CAAC,QAAQ,CACX;EAAA,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;AAC1B,CAAC,CAAA;AAbY,QAAA,iBAAiB,qBAa7B;AAED,SAAgB,YAAY,CAAC,IAAY;IACvC,IAAM,GAAG,GAAG,IAAA,kBAAU,EAAC,YAAY,CAAC,CAAA;IAEpC,IAAM,MAAM,GACV,MAAM,CAAC,MAAM,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,EAAE,CAAC,CAAC,CAAA;IAEb,IAAA,mBAAU,EAAC;QACT,IAAI,CAAC,IAAI;YAAE,OAAM;QACjB,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,OAAO;QACL,cAAc,EAAE;YACd,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACpB,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AAtBY,QAAA,iBAAiB,qBAsB7B;AAEM,IAAM,SAAS,GAAG,UAAC,EAAQ;QAAN,IAAI,UAAA;IAC9B,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;IACpC,IAAA,mBAAU,EAAC;QACT,SAAS,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC,CAAC,CAAA;IACF,OAAO,CAAC,qBAAS,CACf,UAAU,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CACnC,MAAM,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,MAAM,EAAR,CAAQ,CAAC,CAAC,CAC5C,YAAY,CAAC,CAAC,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,KAAK,CAAC,QAAQ,EAAE,EAAhB,CAAgB,CAAC,CAC7C,cAAc,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAChC,OAAO,CAAC,CAAC,OAAO,SAAS,CAAC,YAAY,KAAK,WAAW,CAAC,EAEvD,CAAA;AACJ,CAAC,CAAA;AAbY,QAAA,SAAS,aAarB"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.ImageView = void 0;
|
|
26
|
-
var React = __importStar(require("react"));
|
|
27
|
-
var common_1 = require("@codeleap/common");
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
var react_native_image_viewing_1 = __importDefault(require("react-native-image-viewing"));
|
|
30
|
-
var react_native_1 = require("react-native");
|
|
31
|
-
var View_1 = require("../View");
|
|
32
|
-
var Text_1 = require("../Text");
|
|
33
|
-
var FooterComponent = function (_a) {
|
|
34
|
-
var imageIndex = _a.imageIndex, imagesLength = _a.imagesLength;
|
|
35
|
-
return (<View_1.View variants={['marginBottom:5', 'alignCenter']}>
|
|
36
|
-
<Text_1.Text text={imageIndex + 1 + '/' + imagesLength}/>
|
|
37
|
-
</View_1.View>);
|
|
38
|
-
};
|
|
39
|
-
var ImageView = function (props) {
|
|
40
|
-
(0, common_1.onUpdate)(function () {
|
|
41
|
-
react_native_1.StatusBar.setHidden(props.visible);
|
|
42
|
-
// StatusBar.setBarStyle(`${props.visible ? 'light' : 'dark'}-content`)
|
|
43
|
-
}, [props.visible]);
|
|
44
|
-
return (<react_native_image_viewing_1.default doubleTapToZoomEnabled={false} FooterComponent={function (_a) {
|
|
45
|
-
var imageIndex = _a.imageIndex;
|
|
46
|
-
return <FooterComponent imageIndex={imageIndex} imagesLength={props.images.length}/>;
|
|
47
|
-
}} presentationStyle={'overFullScreen'} {...props}/>);
|
|
48
|
-
};
|
|
49
|
-
exports.ImageView = ImageView;
|
|
50
|
-
//# sourceMappingURL=component.js.map
|