@codeleap/mobile 4.1.0 → 4.2.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/dist/Registry.d.ts +7 -0
- package/dist/Registry.js +67 -0
- package/dist/Registry.js.map +1 -0
- package/dist/components/ActionIcon/index.d.ts +13 -0
- package/dist/components/ActionIcon/index.js +79 -0
- package/dist/components/ActionIcon/index.js.map +1 -0
- package/dist/components/ActionIcon/styles.d.ts +5 -0
- package/dist/components/ActionIcon/styles.js +3 -0
- package/dist/components/ActionIcon/styles.js.map +1 -0
- package/dist/components/ActionIcon/types.d.ts +11 -0
- package/dist/components/ActionIcon/types.js +3 -0
- package/dist/components/ActionIcon/types.js.map +1 -0
- package/dist/components/ActivityIndicator/index.d.ts +15 -0
- package/dist/components/ActivityIndicator/index.js +66 -0
- package/dist/components/ActivityIndicator/index.js.map +1 -0
- package/dist/components/ActivityIndicator/styles.d.ts +1 -0
- package/dist/components/ActivityIndicator/styles.js +3 -0
- package/dist/components/ActivityIndicator/styles.js.map +1 -0
- package/dist/components/ActivityIndicator/types.d.ts +9 -0
- package/dist/components/ActivityIndicator/types.js +3 -0
- package/dist/components/ActivityIndicator/types.js.map +1 -0
- package/dist/components/Autocomplete/index.d.ts +13 -0
- package/dist/components/Autocomplete/index.js +192 -0
- package/dist/components/Autocomplete/index.js.map +1 -0
- package/dist/components/Autocomplete/styles.d.ts +8 -0
- package/dist/components/Autocomplete/styles.js +3 -0
- package/dist/components/Autocomplete/styles.js.map +1 -0
- package/dist/components/Autocomplete/types.d.ts +58 -0
- package/dist/components/Autocomplete/types.js +3 -0
- package/dist/components/Autocomplete/types.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +13 -0
- package/dist/components/Avatar/index.js +112 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Avatar/styles.d.ts +2 -0
- package/dist/components/Avatar/styles.js +3 -0
- package/dist/components/Avatar/styles.js.map +1 -0
- package/dist/components/Avatar/types.d.ts +19 -0
- package/dist/components/Avatar/types.js +3 -0
- package/dist/components/Avatar/types.js.map +1 -0
- package/dist/components/AvatarGroup/index.d.ts +13 -0
- package/dist/components/AvatarGroup/index.js +79 -0
- package/dist/components/AvatarGroup/index.js.map +1 -0
- package/dist/components/AvatarGroup/styles.d.ts +3 -0
- package/dist/components/AvatarGroup/styles.js +3 -0
- package/dist/components/AvatarGroup/styles.js.map +1 -0
- package/dist/components/AvatarGroup/types.d.ts +9 -0
- package/dist/components/AvatarGroup/types.js +3 -0
- package/dist/components/AvatarGroup/types.js.map +1 -0
- package/dist/components/Backdrop/index.d.ts +13 -0
- package/dist/components/Backdrop/index.js +77 -0
- package/dist/components/Backdrop/index.js.map +1 -0
- package/dist/components/Backdrop/styles.d.ts +1 -0
- package/dist/components/Backdrop/styles.js +3 -0
- package/dist/components/Backdrop/styles.js.map +1 -0
- package/dist/components/Backdrop/types.d.ts +14 -0
- package/dist/components/Backdrop/types.js +3 -0
- package/dist/components/Backdrop/types.js.map +1 -0
- package/dist/components/Badge/index.d.ts +13 -0
- package/dist/components/Badge/index.js +109 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Badge/styles.d.ts +4 -0
- package/dist/components/Badge/styles.js +3 -0
- package/dist/components/Badge/styles.js.map +1 -0
- package/dist/components/Badge/types.d.ts +27 -0
- package/dist/components/Badge/types.js +3 -0
- package/dist/components/Badge/types.js.map +1 -0
- package/dist/components/Button/index.d.ts +5 -0
- package/dist/components/Button/index.js +123 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Button/styles.d.ts +12 -0
- package/dist/components/Button/styles.js +3 -0
- package/dist/components/Button/styles.js.map +1 -0
- package/dist/components/Button/types.d.ts +16 -0
- package/dist/components/Button/types.js +3 -0
- package/dist/components/Button/types.js.map +1 -0
- package/dist/components/Calendar/index.d.ts +19 -0
- package/dist/components/Calendar/index.js +82 -0
- package/dist/components/Calendar/index.js.map +1 -0
- package/dist/components/Calendar/types.d.ts +95 -0
- package/dist/components/Calendar/types.js +3 -0
- package/dist/components/Calendar/types.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +13 -0
- package/dist/components/Checkbox/index.js +120 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/Checkbox/styles.d.ts +7 -0
- package/dist/components/Checkbox/styles.js +3 -0
- package/dist/components/Checkbox/styles.js.map +1 -0
- package/dist/components/Checkbox/types.d.ts +10 -0
- package/dist/components/Checkbox/types.js +3 -0
- package/dist/components/Checkbox/types.js.map +1 -0
- package/dist/components/DatePickerModal/index.d.ts +13 -0
- package/dist/components/DatePickerModal/index.js +156 -0
- package/dist/components/DatePickerModal/index.js.map +1 -0
- package/dist/components/DatePickerModal/styles.d.ts +5 -0
- package/dist/components/DatePickerModal/styles.js +3 -0
- package/dist/components/DatePickerModal/styles.js.map +1 -0
- package/dist/components/DatePickerModal/types.d.ts +42 -0
- package/dist/components/DatePickerModal/types.js +3 -0
- package/dist/components/DatePickerModal/types.js.map +1 -0
- package/dist/components/EmptyPlaceholder/index.d.ts +13 -0
- package/dist/components/EmptyPlaceholder/index.js +87 -0
- package/dist/components/EmptyPlaceholder/index.js.map +1 -0
- package/dist/components/EmptyPlaceholder/styles.d.ts +2 -0
- package/dist/components/EmptyPlaceholder/styles.js +3 -0
- package/dist/components/EmptyPlaceholder/styles.js.map +1 -0
- package/dist/components/EmptyPlaceholder/types.d.ts +20 -0
- package/dist/components/EmptyPlaceholder/types.js +3 -0
- package/dist/components/EmptyPlaceholder/types.js.map +1 -0
- package/dist/components/FileInput/index.d.ts +9 -0
- package/dist/components/FileInput/index.js +218 -0
- package/dist/components/FileInput/index.js.map +1 -0
- package/dist/components/FileInput/types.d.ts +23 -0
- package/dist/components/FileInput/types.js +3 -0
- package/dist/components/FileInput/types.js.map +1 -0
- package/dist/components/Grid/index.d.ts +5 -0
- package/dist/components/Grid/index.js +110 -0
- package/dist/components/Grid/index.js.map +1 -0
- package/dist/components/Grid/styles.d.ts +2 -0
- package/dist/components/Grid/styles.js +3 -0
- package/dist/components/Grid/styles.js.map +1 -0
- package/dist/components/Grid/types.d.ts +15 -0
- package/dist/components/Grid/types.js +3 -0
- package/dist/components/Grid/types.js.map +1 -0
- package/dist/components/Icon/index.d.ts +7 -0
- package/dist/components/Icon/index.js +96 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Icon/styles.d.ts +2 -0
- package/dist/components/Icon/styles.js +3 -0
- package/dist/components/Icon/styles.js.map +1 -0
- package/dist/components/Icon/types.d.ts +12 -0
- package/dist/components/Icon/types.js +3 -0
- package/dist/components/Icon/types.js.map +1 -0
- package/dist/components/Image/index.d.ts +5 -0
- package/dist/components/Image/index.js +151 -0
- package/dist/components/Image/index.js.map +1 -0
- package/dist/components/Image/styles.d.ts +2 -0
- package/dist/components/Image/styles.js +3 -0
- package/dist/components/Image/styles.js.map +1 -0
- package/dist/components/Image/types.d.ts +16 -0
- package/dist/components/Image/types.js +3 -0
- package/dist/components/Image/types.js.map +1 -0
- package/dist/components/ImageView/Spotlight.d.ts +41 -0
- package/dist/components/ImageView/Spotlight.js +178 -0
- package/dist/components/ImageView/Spotlight.js.map +1 -0
- package/dist/components/ImageView/component.d.ts +5 -0
- package/dist/components/ImageView/component.js +18 -0
- package/dist/components/ImageView/component.js.map +1 -0
- package/dist/components/ImageView/index.d.ts +2 -0
- package/dist/components/ImageView/index.js +19 -0
- package/dist/components/ImageView/index.js.map +1 -0
- package/dist/components/InputBase/index.d.ts +11 -0
- package/dist/components/InputBase/index.js +110 -0
- package/dist/components/InputBase/index.js.map +1 -0
- package/dist/components/InputBase/styles.d.ts +20 -0
- package/dist/components/InputBase/styles.js +99 -0
- package/dist/components/InputBase/styles.js.map +1 -0
- package/dist/components/InputBase/types.d.ts +26 -0
- package/dist/components/InputBase/types.js +3 -0
- package/dist/components/InputBase/types.js.map +1 -0
- package/dist/components/InputBase/utils.d.ts +12 -0
- package/dist/components/InputBase/utils.js +41 -0
- package/dist/components/InputBase/utils.js.map +1 -0
- package/dist/components/List/index.d.ts +5 -0
- package/dist/components/List/index.js +104 -0
- package/dist/components/List/index.js.map +1 -0
- package/dist/components/List/styles.d.ts +5 -0
- package/dist/components/List/styles.js +3 -0
- package/dist/components/List/styles.js.map +1 -0
- package/dist/components/List/types.d.ts +36 -0
- package/dist/components/List/types.js +3 -0
- package/dist/components/List/types.js.map +1 -0
- package/dist/components/LoadingOverlay/index.d.ts +13 -0
- package/dist/components/LoadingOverlay/index.js +84 -0
- package/dist/components/LoadingOverlay/index.js.map +1 -0
- package/dist/components/LoadingOverlay/styles.d.ts +4 -0
- package/dist/components/LoadingOverlay/styles.js +3 -0
- package/dist/components/LoadingOverlay/styles.js.map +1 -0
- package/dist/components/LoadingOverlay/types.d.ts +8 -0
- package/dist/components/LoadingOverlay/types.js +3 -0
- package/dist/components/LoadingOverlay/types.js.map +1 -0
- package/dist/components/Modal/index.d.ts +14 -0
- package/dist/components/Modal/index.js +155 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/styles.d.ts +4 -0
- package/dist/components/Modal/styles.js +3 -0
- package/dist/components/Modal/styles.js.map +1 -0
- package/dist/components/Modal/types.d.ts +39 -0
- package/dist/components/Modal/types.js +3 -0
- package/dist/components/Modal/types.js.map +1 -0
- package/dist/components/Navigation/Navigation.d.ts +55 -0
- package/dist/components/Navigation/Navigation.js +84 -0
- package/dist/components/Navigation/Navigation.js.map +1 -0
- package/dist/components/Navigation/constants.d.ts +9 -0
- package/dist/components/Navigation/constants.js +12 -0
- package/dist/components/Navigation/constants.js.map +1 -0
- package/dist/components/Navigation/index.d.ts +3 -0
- package/dist/components/Navigation/index.js +20 -0
- package/dist/components/Navigation/index.js.map +1 -0
- package/dist/components/Navigation/types.d.ts +26 -0
- package/dist/components/Navigation/types.js +3 -0
- package/dist/components/Navigation/types.js.map +1 -0
- package/dist/components/Navigation/utils.d.ts +3 -0
- package/dist/components/Navigation/utils.js +69 -0
- package/dist/components/Navigation/utils.js.map +1 -0
- package/dist/components/NumberIncrement/index.d.ts +5 -0
- package/dist/components/NumberIncrement/index.js +263 -0
- package/dist/components/NumberIncrement/index.js.map +1 -0
- package/dist/components/NumberIncrement/styles.d.ts +4 -0
- package/dist/components/NumberIncrement/styles.js +3 -0
- package/dist/components/NumberIncrement/styles.js.map +1 -0
- package/dist/components/NumberIncrement/types.d.ts +34 -0
- package/dist/components/NumberIncrement/types.js +3 -0
- package/dist/components/NumberIncrement/types.js.map +1 -0
- package/dist/components/NumberIncrement/utils.d.ts +5 -0
- package/dist/components/NumberIncrement/utils.js +27 -0
- package/dist/components/NumberIncrement/utils.js.map +1 -0
- package/dist/components/Pager/PagerDots.d.ts +16 -0
- package/dist/components/Pager/PagerDots.js +58 -0
- package/dist/components/Pager/PagerDots.js.map +1 -0
- package/dist/components/Pager/index.d.ts +14 -0
- package/dist/components/Pager/index.js +127 -0
- package/dist/components/Pager/index.js.map +1 -0
- package/dist/components/Pager/styles.d.ts +4 -0
- package/dist/components/Pager/styles.js +3 -0
- package/dist/components/Pager/styles.js.map +1 -0
- package/dist/components/Pager/types.d.ts +25 -0
- package/dist/components/Pager/types.js +3 -0
- package/dist/components/Pager/types.js.map +1 -0
- package/dist/components/PaginationIndicator/index.d.ts +11 -0
- package/dist/components/PaginationIndicator/index.js +49 -0
- package/dist/components/PaginationIndicator/index.js.map +1 -0
- package/dist/components/PaginationIndicator/styles.d.ts +2 -0
- package/dist/components/PaginationIndicator/styles.js +3 -0
- package/dist/components/PaginationIndicator/styles.js.map +1 -0
- package/dist/components/PaginationIndicator/types.d.ts +10 -0
- package/dist/components/PaginationIndicator/types.js +3 -0
- package/dist/components/PaginationIndicator/types.js.map +1 -0
- package/dist/components/PlacesAutocomplete/index.d.ts +19 -0
- package/dist/components/PlacesAutocomplete/index.js +127 -0
- package/dist/components/PlacesAutocomplete/index.js.map +1 -0
- package/dist/components/PlacesAutocomplete/styles.d.ts +4 -0
- package/dist/components/PlacesAutocomplete/styles.js +3 -0
- package/dist/components/PlacesAutocomplete/styles.js.map +1 -0
- package/dist/components/PlacesAutocomplete/types.d.ts +41 -0
- package/dist/components/PlacesAutocomplete/types.js +3 -0
- package/dist/components/PlacesAutocomplete/types.js.map +1 -0
- package/dist/components/RadioInput/index.d.ts +13 -0
- package/dist/components/RadioInput/index.js +123 -0
- package/dist/components/RadioInput/index.js.map +1 -0
- package/dist/components/RadioInput/styles.d.ts +6 -0
- package/dist/components/RadioInput/styles.js +3 -0
- package/dist/components/RadioInput/styles.js.map +1 -0
- package/dist/components/RadioInput/types.d.ts +27 -0
- package/dist/components/RadioInput/types.js +3 -0
- package/dist/components/RadioInput/types.js.map +1 -0
- package/dist/components/RefreshControl/index.d.ts +13 -0
- package/dist/components/RefreshControl/index.js +67 -0
- package/dist/components/RefreshControl/index.js.map +1 -0
- package/dist/components/RefreshControl/styles.d.ts +1 -0
- package/dist/components/RefreshControl/styles.js +3 -0
- package/dist/components/RefreshControl/styles.js.map +1 -0
- package/dist/components/RefreshControl/types.d.ts +6 -0
- package/dist/components/RefreshControl/types.js +3 -0
- package/dist/components/RefreshControl/types.js.map +1 -0
- package/dist/components/Scroll/index.d.ts +5 -0
- package/dist/components/Scroll/index.js +108 -0
- package/dist/components/Scroll/index.js.map +1 -0
- package/dist/components/Scroll/styles.d.ts +1 -0
- package/dist/components/Scroll/styles.js +3 -0
- package/dist/components/Scroll/styles.js.map +1 -0
- package/dist/components/Scroll/types.d.ts +16 -0
- package/dist/components/Scroll/types.js +3 -0
- package/dist/components/Scroll/types.js.map +1 -0
- package/dist/components/SearchInput/index.d.ts +15 -0
- package/dist/components/SearchInput/index.js +93 -0
- package/dist/components/SearchInput/index.js.map +1 -0
- package/dist/components/Sections/index.d.ts +5 -0
- package/dist/components/Sections/index.js +118 -0
- package/dist/components/Sections/index.js.map +1 -0
- package/dist/components/Sections/styles.d.ts +1 -0
- package/dist/components/Sections/styles.js +3 -0
- package/dist/components/Sections/styles.js.map +1 -0
- package/dist/components/Sections/types.d.ts +34 -0
- package/dist/components/Sections/types.js +3 -0
- package/dist/components/Sections/types.js.map +1 -0
- package/dist/components/SegmentedControl/Option.d.ts +18 -0
- package/dist/components/SegmentedControl/Option.js +44 -0
- package/dist/components/SegmentedControl/Option.js.map +1 -0
- package/dist/components/SegmentedControl/index.d.ts +5 -0
- package/dist/components/SegmentedControl/index.js +174 -0
- package/dist/components/SegmentedControl/index.js.map +1 -0
- package/dist/components/SegmentedControl/styles.d.ts +8 -0
- package/dist/components/SegmentedControl/styles.js +3 -0
- package/dist/components/SegmentedControl/styles.js.map +1 -0
- package/dist/components/SegmentedControl/types.d.ts +34 -0
- package/dist/components/SegmentedControl/types.js +3 -0
- package/dist/components/SegmentedControl/types.js.map +1 -0
- package/dist/components/Select/index.d.ts +13 -0
- package/dist/components/Select/index.js +259 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Select/styles.d.ts +9 -0
- package/dist/components/Select/styles.js +3 -0
- package/dist/components/Select/styles.js.map +1 -0
- package/dist/components/Select/types.d.ts +77 -0
- package/dist/components/Select/types.js +3 -0
- package/dist/components/Select/types.js.map +1 -0
- package/dist/components/Slider/index.d.ts +13 -0
- package/dist/components/Slider/index.js +183 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Slider/styles.d.ts +11 -0
- package/dist/components/Slider/styles.js +3 -0
- package/dist/components/Slider/styles.js.map +1 -0
- package/dist/components/Slider/types.d.ts +22 -0
- package/dist/components/Slider/types.js +3 -0
- package/dist/components/Slider/types.js.map +1 -0
- package/dist/components/SortablePhotos/index.d.ts +13 -0
- package/dist/components/SortablePhotos/index.js +125 -0
- package/dist/components/SortablePhotos/index.js.map +1 -0
- package/dist/components/SortablePhotos/styles.d.ts +2 -0
- package/dist/components/SortablePhotos/styles.js +3 -0
- package/dist/components/SortablePhotos/styles.js.map +1 -0
- package/dist/components/SortablePhotos/types.d.ts +54 -0
- package/dist/components/SortablePhotos/types.js +3 -0
- package/dist/components/SortablePhotos/types.js.map +1 -0
- package/dist/components/SortablePhotos/useSortablePhotos.d.ts +21 -0
- package/dist/components/SortablePhotos/useSortablePhotos.js +192 -0
- package/dist/components/SortablePhotos/useSortablePhotos.js.map +1 -0
- package/dist/components/Switch/index.d.ts +13 -0
- package/dist/components/Switch/index.js +115 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Switch/styles.d.ts +7 -0
- package/dist/components/Switch/styles.js +3 -0
- package/dist/components/Switch/styles.js.map +1 -0
- package/dist/components/Switch/types.d.ts +9 -0
- package/dist/components/Switch/types.js +3 -0
- package/dist/components/Switch/types.js.map +1 -0
- package/dist/components/Text/index.d.ts +7 -0
- package/dist/components/Text/index.js +127 -0
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/Text/styles.d.ts +6 -0
- package/dist/components/Text/styles.js +3 -0
- package/dist/components/Text/styles.js.map +1 -0
- package/dist/components/Text/types.d.ts +16 -0
- package/dist/components/Text/types.js +3 -0
- package/dist/components/Text/types.js.map +1 -0
- package/dist/components/TextInput/index.d.ts +5 -0
- package/dist/components/TextInput/index.js +181 -0
- package/dist/components/TextInput/index.js.map +1 -0
- package/dist/components/TextInput/styles.d.ts +5 -0
- package/dist/components/TextInput/styles.js +3 -0
- package/dist/components/TextInput/styles.js.map +1 -0
- package/dist/components/TextInput/types.d.ts +21 -0
- package/dist/components/TextInput/types.js +3 -0
- package/dist/components/TextInput/types.js.map +1 -0
- package/dist/components/Touchable/index.d.ts +5 -0
- package/dist/components/Touchable/index.js +220 -0
- package/dist/components/Touchable/index.js.map +1 -0
- package/dist/components/Touchable/styles.d.ts +6 -0
- package/dist/components/Touchable/styles.js +3 -0
- package/dist/components/Touchable/styles.js.map +1 -0
- package/dist/components/Touchable/types.d.ts +25 -0
- package/dist/components/Touchable/types.js +3 -0
- package/dist/components/Touchable/types.js.map +1 -0
- package/dist/components/View/index.d.ts +15 -0
- package/dist/components/View/index.js +56 -0
- package/dist/components/View/index.js.map +1 -0
- package/dist/components/View/styles.d.ts +1 -0
- package/dist/components/View/styles.js +3 -0
- package/dist/components/View/styles.js.map +1 -0
- package/dist/components/View/types.d.ts +13 -0
- package/dist/components/View/types.js +3 -0
- package/dist/components/View/types.js.map +1 -0
- package/dist/components/components.d.ts +42 -0
- package/dist/components/components.js +59 -0
- package/dist/components/components.js.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +15 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/PressableRipple/index.d.ts +2 -0
- package/dist/modules/PressableRipple/index.js +9 -0
- package/dist/modules/PressableRipple/index.js.map +1 -0
- package/dist/modules/PressableRipple/ripple.d.ts +30 -0
- package/dist/modules/PressableRipple/ripple.js +213 -0
- package/dist/modules/PressableRipple/ripple.js.map +1 -0
- package/dist/modules/PressableRipple/styles.d.ts +19 -0
- package/dist/modules/PressableRipple/styles.js +29 -0
- package/dist/modules/PressableRipple/styles.js.map +1 -0
- package/dist/modules/PressableRipple/type.d.ts +12 -0
- package/dist/modules/PressableRipple/type.js +3 -0
- package/dist/modules/PressableRipple/type.js.map +1 -0
- package/dist/modules/reactNavigation.d.ts +21 -0
- package/dist/modules/reactNavigation.js +25 -0
- package/dist/modules/reactNavigation.js.map +1 -0
- package/dist/modules/textInputMask.d.ts +6 -0
- package/dist/modules/textInputMask.js +21 -0
- package/dist/modules/textInputMask.js.map +1 -0
- package/dist/modules/types/textInputMask.d.ts +7 -0
- package/dist/modules/types/textInputMask.js +3 -0
- package/dist/modules/types/textInputMask.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/utility.d.ts +16 -0
- package/dist/types/utility.js +3 -0
- package/dist/types/utility.js.map +1 -0
- package/dist/utils/KeyboardAware/context.d.ts +14 -0
- package/dist/utils/KeyboardAware/context.js +28 -0
- package/dist/utils/KeyboardAware/context.js.map +1 -0
- package/dist/utils/KeyboardAware/index.d.ts +3 -0
- package/dist/utils/KeyboardAware/index.js +20 -0
- package/dist/utils/KeyboardAware/index.js.map +1 -0
- package/dist/utils/KeyboardAware/keyboardHooks.d.ts +21 -0
- package/dist/utils/KeyboardAware/keyboardHooks.js +82 -0
- package/dist/utils/KeyboardAware/keyboardHooks.js.map +1 -0
- package/dist/utils/KeyboardAware/types.d.ts +1 -0
- package/dist/utils/KeyboardAware/types.js +7 -0
- package/dist/utils/KeyboardAware/types.js.map +1 -0
- package/dist/utils/ModalManager/components.d.ts +15 -0
- package/dist/utils/ModalManager/components.js +83 -0
- package/dist/utils/ModalManager/components.js.map +1 -0
- package/dist/utils/ModalManager/context.d.ts +48 -0
- package/dist/utils/ModalManager/context.js +184 -0
- package/dist/utils/ModalManager/context.js.map +1 -0
- package/dist/utils/ModalManager/index.d.ts +10 -0
- package/dist/utils/ModalManager/index.js +12 -0
- package/dist/utils/ModalManager/index.js.map +1 -0
- package/dist/utils/NotificationManager/index.d.ts +55 -0
- package/dist/utils/NotificationManager/index.js +304 -0
- package/dist/utils/NotificationManager/index.js.map +1 -0
- package/dist/utils/NotificationManager/types.d.ts +16 -0
- package/dist/utils/NotificationManager/types.js +3 -0
- package/dist/utils/NotificationManager/types.js.map +1 -0
- package/dist/utils/OSAlert.d.ts +32 -0
- package/dist/utils/OSAlert.js +143 -0
- package/dist/utils/OSAlert.js.map +1 -0
- package/dist/utils/PermissionManager/context.d.ts +53 -0
- package/dist/utils/PermissionManager/context.js +324 -0
- package/dist/utils/PermissionManager/context.js.map +1 -0
- package/dist/utils/PermissionManager/index.d.ts +4 -0
- package/dist/utils/PermissionManager/index.js +9 -0
- package/dist/utils/PermissionManager/index.js.map +1 -0
- package/dist/utils/PermissionManager/types.d.ts +16 -0
- package/dist/utils/PermissionManager/types.js +3 -0
- package/dist/utils/PermissionManager/types.js.map +1 -0
- package/dist/utils/StorageManager.d.ts +20 -0
- package/dist/utils/StorageManager.js +86 -0
- package/dist/utils/StorageManager.js.map +1 -0
- package/dist/utils/Subscription.d.ts +17 -0
- package/dist/utils/Subscription.js +72 -0
- package/dist/utils/Subscription.js.map +1 -0
- package/dist/utils/deprecated/notifications.d.ts +40 -0
- package/dist/utils/deprecated/notifications.js +274 -0
- package/dist/utils/deprecated/notifications.js.map +1 -0
- package/dist/utils/hooks.d.ts +68 -0
- package/dist/utils/hooks.js +228 -0
- package/dist/utils/hooks.js.map +1 -0
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/index.js +44 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/input.d.ts +35 -0
- package/dist/utils/input.js +49 -0
- package/dist/utils/input.js.map +1 -0
- package/dist/utils/locale.d.ts +1 -0
- package/dist/utils/locale.js +10 -0
- package/dist/utils/locale.js.map +1 -0
- package/dist/utils/misc.d.ts +12 -0
- package/dist/utils/misc.js +124 -0
- package/dist/utils/misc.js.map +1 -0
- package/dist/utils/theme.d.ts +23 -0
- package/dist/utils/theme.js +41 -0
- package/dist/utils/theme.js.map +1 -0
- package/dist/utils/useQueryListRefresh.d.ts +12 -0
- package/dist/utils/useQueryListRefresh.js +42 -0
- package/dist/utils/useQueryListRefresh.js.map +1 -0
- package/package.json +9 -10
- package/package.json.bak +53 -0
- package/src/components/Backdrop/index.tsx +16 -18
- package/src/components/Backdrop/types.ts +3 -0
- package/src/components/Badge/index.tsx +3 -3
- package/src/components/Image/index.tsx +1 -1
- package/src/components/Image/types.ts +1 -1
- package/src/components/Modal/index.tsx +28 -18
- package/src/components/Modal/types.ts +3 -0
- package/src/components/Pager/index.tsx +4 -4
- package/src/components/Pager/types.ts +2 -2
- package/src/components/PlacesAutocomplete/index.tsx +3 -1
- package/src/components/View/index.tsx +4 -0
- package/src/modules/PressableRipple/ripple.js +61 -61
- package/src/types/utility.ts +6 -3
- package/src/utils/StorageManager.ts +112 -0
- package/src/utils/hooks.ts +2 -51
- package/src/utils/index.ts +3 -1
- package/src/utils/theme.ts +13 -9
|
@@ -0,0 +1,274 @@
|
|
|
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 (g && (g = 0, op[0] && (_ = 0)), _) 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
|
+
/**
|
|
46
|
+
* Class responsible for the notification system
|
|
47
|
+
*
|
|
48
|
+
* @deprecated Use the most updated version
|
|
49
|
+
* @note check the documentation to make the migration
|
|
50
|
+
*/
|
|
51
|
+
var NotificationManager = /** @class */ (function () {
|
|
52
|
+
function NotificationManager(logger, autoHandleInitialNotification) {
|
|
53
|
+
if (logger === void 0) { logger = common_1.silentLogger; }
|
|
54
|
+
if (autoHandleInitialNotification === void 0) { autoHandleInitialNotification = true; }
|
|
55
|
+
this.logger = logger;
|
|
56
|
+
this.autoHandleInitialNotification = autoHandleInitialNotification;
|
|
57
|
+
this.stateChangeListeners = [];
|
|
58
|
+
this.messageListeners = [];
|
|
59
|
+
this._initialized = false;
|
|
60
|
+
this.unsubscribeFromMessage = null;
|
|
61
|
+
this.unsubscribeFromBackgroundMessage = null;
|
|
62
|
+
this.unsubscribeFromPress = null;
|
|
63
|
+
this._currentToken = null;
|
|
64
|
+
this._initialNoficationHandled = false;
|
|
65
|
+
}
|
|
66
|
+
NotificationManager.prototype.init = function () {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
+
var token_1, e_1;
|
|
69
|
+
var _this = this;
|
|
70
|
+
return __generator(this, function (_a) {
|
|
71
|
+
switch (_a.label) {
|
|
72
|
+
case 0:
|
|
73
|
+
// return
|
|
74
|
+
if (this.initialized)
|
|
75
|
+
return [2 /*return*/];
|
|
76
|
+
_a.label = 1;
|
|
77
|
+
case 1:
|
|
78
|
+
_a.trys.push([1, 4, , 5]);
|
|
79
|
+
return [4 /*yield*/, messaging().registerDeviceForRemoteMessages()
|
|
80
|
+
// logger.log('firebase registeted', '', MODULE)
|
|
81
|
+
];
|
|
82
|
+
case 2:
|
|
83
|
+
_a.sent();
|
|
84
|
+
return [4 /*yield*/, messaging().getToken()
|
|
85
|
+
// logger.log('init token', { token }, MODULE)
|
|
86
|
+
];
|
|
87
|
+
case 3:
|
|
88
|
+
token_1 = _a.sent();
|
|
89
|
+
// logger.log('init token', { token }, MODULE)
|
|
90
|
+
if (token_1) {
|
|
91
|
+
this.currentToken = token_1;
|
|
92
|
+
this.initialized = true;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.currentToken = null;
|
|
96
|
+
this.initialized = false;
|
|
97
|
+
}
|
|
98
|
+
messaging().onTokenRefresh(function (newToken) {
|
|
99
|
+
// logger.log('onTokenRefresh', { newToken }, MODULE)
|
|
100
|
+
if (token_1) {
|
|
101
|
+
_this.currentToken = newToken;
|
|
102
|
+
_this.initialized = true;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
_this.currentToken = null;
|
|
106
|
+
_this.initialized = false;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return [3 /*break*/, 5];
|
|
110
|
+
case 4:
|
|
111
|
+
e_1 = _a.sent();
|
|
112
|
+
this.logger.error('Failed to initialize notification services', e_1, MODULE);
|
|
113
|
+
return [3 /*break*/, 5];
|
|
114
|
+
case 5: return [2 /*return*/];
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
NotificationManager.prototype.deinit = function () {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
121
|
+
return __generator(this, function (_a) {
|
|
122
|
+
[
|
|
123
|
+
this.unsubscribeFromMessage,
|
|
124
|
+
this.unsubscribeFromBackgroundMessage,
|
|
125
|
+
this.unsubscribeFromPress,
|
|
126
|
+
].forEach(function (unsubscribe) {
|
|
127
|
+
if (unsubscribe) {
|
|
128
|
+
unsubscribe();
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
this.initialized = false;
|
|
132
|
+
return [2 /*return*/];
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
NotificationManager.prototype.handleNotification = function (args) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
138
|
+
var _i, _a, listener;
|
|
139
|
+
return __generator(this, function (_b) {
|
|
140
|
+
switch (_b.label) {
|
|
141
|
+
case 0:
|
|
142
|
+
_i = 0, _a = this.messageListeners;
|
|
143
|
+
_b.label = 1;
|
|
144
|
+
case 1:
|
|
145
|
+
if (!(_i < _a.length)) return [3 /*break*/, 4];
|
|
146
|
+
listener = _a[_i];
|
|
147
|
+
return [4 /*yield*/, listener(args.data, args.type)];
|
|
148
|
+
case 2:
|
|
149
|
+
_b.sent();
|
|
150
|
+
_b.label = 3;
|
|
151
|
+
case 3:
|
|
152
|
+
_i++;
|
|
153
|
+
return [3 /*break*/, 1];
|
|
154
|
+
case 4: return [2 /*return*/];
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
Object.defineProperty(NotificationManager.prototype, "currentToken", {
|
|
160
|
+
get: function () {
|
|
161
|
+
return this._currentToken;
|
|
162
|
+
},
|
|
163
|
+
set: function (token) {
|
|
164
|
+
this._currentToken = token;
|
|
165
|
+
this.triggerStateChange();
|
|
166
|
+
},
|
|
167
|
+
enumerable: false,
|
|
168
|
+
configurable: true
|
|
169
|
+
});
|
|
170
|
+
Object.defineProperty(NotificationManager.prototype, "initialized", {
|
|
171
|
+
get: function () {
|
|
172
|
+
return this._initialized;
|
|
173
|
+
},
|
|
174
|
+
set: function (to) {
|
|
175
|
+
var _this = this;
|
|
176
|
+
if (to) {
|
|
177
|
+
this.logger.info('Initialized', '', MODULE);
|
|
178
|
+
this.unsubscribeFromMessage = messaging().onMessage(function (msg) {
|
|
179
|
+
_this.handleNotification({
|
|
180
|
+
data: msg,
|
|
181
|
+
type: 'foreground',
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
this.unsubscribeFromBackgroundMessage = messaging().setBackgroundMessageHandler(function (msg) { return __awaiter(_this, void 0, void 0, function () {
|
|
185
|
+
return __generator(this, function (_a) {
|
|
186
|
+
this.handleNotification({
|
|
187
|
+
data: msg,
|
|
188
|
+
type: 'background',
|
|
189
|
+
});
|
|
190
|
+
return [2 /*return*/];
|
|
191
|
+
});
|
|
192
|
+
}); });
|
|
193
|
+
this.unsubscribeFromPress = messaging().onNotificationOpenedApp(function (msg) {
|
|
194
|
+
_this.logger.info('Notification press', msg, MODULE);
|
|
195
|
+
_this.handleNotification({
|
|
196
|
+
data: msg,
|
|
197
|
+
type: 'press',
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
if (!this._initialNoficationHandled && this.autoHandleInitialNotification) {
|
|
201
|
+
this.getInitialNotification().then(function (msg) {
|
|
202
|
+
if (!msg.data)
|
|
203
|
+
return;
|
|
204
|
+
_this.logger.info('Notification initial', msg, MODULE);
|
|
205
|
+
_this.handleNotification(msg).then(function () {
|
|
206
|
+
_this._initialNoficationHandled = true;
|
|
207
|
+
}).catch(function (e) {
|
|
208
|
+
_this._initialNoficationHandled = true;
|
|
209
|
+
_this.logger.error('Error handling initial notification', e, MODULE);
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
this.unsubscribeFromMessage = null;
|
|
216
|
+
this.unsubscribeFromBackgroundMessage = null;
|
|
217
|
+
this.unsubscribeFromPress = null;
|
|
218
|
+
this.logger.info('Deinitialized', '', MODULE);
|
|
219
|
+
}
|
|
220
|
+
this._initialized = to;
|
|
221
|
+
this.triggerStateChange();
|
|
222
|
+
},
|
|
223
|
+
enumerable: false,
|
|
224
|
+
configurable: true
|
|
225
|
+
});
|
|
226
|
+
NotificationManager.prototype.onNotification = function (handler) {
|
|
227
|
+
var _this = this;
|
|
228
|
+
var newLen = this.messageListeners.push(handler);
|
|
229
|
+
return function () {
|
|
230
|
+
_this.messageListeners.splice(newLen - 1, 1);
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
NotificationManager.prototype.triggerStateChange = function () {
|
|
234
|
+
var _this = this;
|
|
235
|
+
this.stateChangeListeners.forEach(function (l) {
|
|
236
|
+
l(_this._initialized, _this.currentToken);
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
NotificationManager.prototype.onStateChange = function (handler) {
|
|
240
|
+
var _this = this;
|
|
241
|
+
var newLen = this.stateChangeListeners.push(handler);
|
|
242
|
+
return function () {
|
|
243
|
+
_this.stateChangeListeners.splice(newLen - 1, 1);
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
NotificationManager.prototype.getInitialNotification = function () {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
248
|
+
var msg, e_2;
|
|
249
|
+
return __generator(this, function (_a) {
|
|
250
|
+
switch (_a.label) {
|
|
251
|
+
case 0:
|
|
252
|
+
_a.trys.push([0, 2, , 3]);
|
|
253
|
+
return [4 /*yield*/, messaging().getInitialNotification()];
|
|
254
|
+
case 1:
|
|
255
|
+
msg = _a.sent();
|
|
256
|
+
return [2 /*return*/, {
|
|
257
|
+
data: msg,
|
|
258
|
+
type: 'initial',
|
|
259
|
+
}];
|
|
260
|
+
case 2:
|
|
261
|
+
e_2 = _a.sent();
|
|
262
|
+
return [2 /*return*/, {
|
|
263
|
+
data: null,
|
|
264
|
+
type: 'initial',
|
|
265
|
+
}];
|
|
266
|
+
case 3: return [2 /*return*/];
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
};
|
|
271
|
+
return NotificationManager;
|
|
272
|
+
}());
|
|
273
|
+
exports.NotificationManager = NotificationManager;
|
|
274
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../../src/utils/deprecated/notifications.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6D;AAC7D,aAAa;AACb,8DAAmF;AAEnF,IAAM,SAAS,GAAG,oBAAQ,CAAC,SAAS,CAAA;AAEpC,IAAM,MAAM,GAAG,eAAe,CAAA;AAc9B;;;;;EAKE;AACF;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;0B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AAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,UAAA,CAAC;YACjC,CAAC,CAAC,KAAI,CAAC,YAAY,EAAE,KAAI,CAAC,YAAY,CAAC,CAAA;QACzC,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,2CAAa,GAAb,UAAc,OAAuC;QAArD,iBAOC;QANC,IAAM,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAEtD,OAAO;YACL,KAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;QACjD,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"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Animated, AppStateStatus, ViewStyle, ImageStyle, TextStyle, StyleProp } from 'react-native';
|
|
2
|
+
import { AnimatedStyleProp, EasingFn } from 'react-native-reanimated';
|
|
3
|
+
import { PressableRippleProps } from '../modules/PressableRipple/type';
|
|
4
|
+
export declare function useAnimateColor(value: string, opts?: Partial<Animated.TimingAnimationConfig>): Animated.AnimatedInterpolation<string | number>;
|
|
5
|
+
export declare function useAppState(filter?: AppStateStatus[]): {
|
|
6
|
+
appState: AppStateStatus;
|
|
7
|
+
};
|
|
8
|
+
type SelectProperties<T extends Record<string | number | symbol, any>, K extends keyof T> = {
|
|
9
|
+
[P in K]: T[K];
|
|
10
|
+
};
|
|
11
|
+
export declare function useStaticAnimationStyles<T extends Record<string | number | symbol, any>, K extends keyof T>(obj: T, keys: K[]): SelectProperties<T, K>;
|
|
12
|
+
type AnimatableProperties = 'scale' | 'scaleX' | 'scaleY' | 'translateX' | 'translateY' | 'opacity' | 'backgroundColor';
|
|
13
|
+
type VariantTransitionConfig = {
|
|
14
|
+
type: 'timing';
|
|
15
|
+
duration?: number;
|
|
16
|
+
easing?: EasingFn;
|
|
17
|
+
};
|
|
18
|
+
export type TransitionConfig = Partial<Record<AnimatableProperties, VariantTransitionConfig>> | VariantTransitionConfig;
|
|
19
|
+
type UseAnimatedVariantStylesConfig<T extends Record<string | number | symbol, any>, K extends keyof T> = {
|
|
20
|
+
variantStyles: T;
|
|
21
|
+
animatedProperties: K[];
|
|
22
|
+
updater: (states: SelectProperties<T, K>) => AnimatedStyleProp<ViewStyle | ImageStyle | TextStyle>;
|
|
23
|
+
transition?: TransitionConfig;
|
|
24
|
+
dependencies?: any[];
|
|
25
|
+
};
|
|
26
|
+
export declare function useAnimatedVariantStyles<T extends Record<string | number | symbol, any>, K extends keyof T>(config: UseAnimatedVariantStylesConfig<T, K>): {};
|
|
27
|
+
export type FeedbackConfig = {
|
|
28
|
+
type: 'opacity';
|
|
29
|
+
value?: number;
|
|
30
|
+
} | {
|
|
31
|
+
type: 'highlight';
|
|
32
|
+
color?: string;
|
|
33
|
+
brightness?: number;
|
|
34
|
+
shiftOpacity?: number;
|
|
35
|
+
} | {
|
|
36
|
+
type: 'styles';
|
|
37
|
+
styles: StyleProp<ViewStyle>;
|
|
38
|
+
} | {
|
|
39
|
+
type: 'none';
|
|
40
|
+
};
|
|
41
|
+
type RippleConfig = {
|
|
42
|
+
type: 'ripple';
|
|
43
|
+
config?: PressableRippleProps;
|
|
44
|
+
iosFallback?: FeedbackConfig;
|
|
45
|
+
};
|
|
46
|
+
export type TouchableFeedbackConfig = RippleConfig | FeedbackConfig;
|
|
47
|
+
export type TouchFeedbackConfig = {
|
|
48
|
+
type?: 'ripple' | 'opacity' | 'highlight' | 'styles' | 'none';
|
|
49
|
+
config?: PressableRippleProps;
|
|
50
|
+
iosFallback?: FeedbackConfig;
|
|
51
|
+
value?: number;
|
|
52
|
+
brightness?: number;
|
|
53
|
+
shiftOpacity?: number;
|
|
54
|
+
styles?: StyleProp<ViewStyle>;
|
|
55
|
+
};
|
|
56
|
+
export type UsePressableFeedbackConfig = {
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
feedbackConfig?: TouchableFeedbackConfig;
|
|
59
|
+
hightlightPropertyIn: 'backgroundColor' | 'borderColor' | 'color';
|
|
60
|
+
hightlightPropertyOut: 'backgroundColor' | 'borderColor' | 'color';
|
|
61
|
+
};
|
|
62
|
+
export declare function usePressableFeedback(styles: any, config: UsePressableFeedbackConfig): {
|
|
63
|
+
getFeedbackStyle: (pressed: boolean) => StyleProp<ViewStyle>;
|
|
64
|
+
rippleConfig: PressableRippleProps;
|
|
65
|
+
};
|
|
66
|
+
export declare function useBackButton(cb: () => boolean | void, deps?: any[]): void;
|
|
67
|
+
export declare function useKeyboardPaddingStyle(styles: ViewStyle[], enabled?: boolean): {};
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,228 @@
|
|
|
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.useKeyboardPaddingStyle = exports.useBackButton = exports.usePressableFeedback = exports.useAnimatedVariantStyles = exports.useStaticAnimationStyles = exports.useAppState = exports.useAnimateColor = void 0;
|
|
15
|
+
var common_1 = require("@codeleap/common");
|
|
16
|
+
var react_native_1 = require("react-native");
|
|
17
|
+
var react_native_reanimated_1 = require("react-native-reanimated");
|
|
18
|
+
var react_native_avoid_softinput_1 = require("react-native-avoid-softinput");
|
|
19
|
+
var react_1 = require("react");
|
|
20
|
+
var styles_1 = require("@codeleap/styles");
|
|
21
|
+
function useAnimateColor(value, opts) {
|
|
22
|
+
var iters = (0, common_1.useRef)(0);
|
|
23
|
+
var anim = (0, common_1.useState)(new react_native_1.Animated.Value(iters.current))[0];
|
|
24
|
+
var _prev = (0, common_1.usePrevious)(value);
|
|
25
|
+
var prev = _prev || value;
|
|
26
|
+
(0, common_1.onUpdate)(function () {
|
|
27
|
+
// if (value === prev) return
|
|
28
|
+
var animation = react_native_1.Animated.timing(anim, __assign(__assign({}, opts), { toValue: iters.current + 1, useNativeDriver: false }));
|
|
29
|
+
animation.start(function () {
|
|
30
|
+
iters.current += 1;
|
|
31
|
+
});
|
|
32
|
+
return function () {
|
|
33
|
+
animation.stop();
|
|
34
|
+
};
|
|
35
|
+
}, [value]);
|
|
36
|
+
var color = anim.interpolate({
|
|
37
|
+
outputRange: [prev, value],
|
|
38
|
+
inputRange: [iters.current, iters.current + 1],
|
|
39
|
+
});
|
|
40
|
+
return color;
|
|
41
|
+
}
|
|
42
|
+
exports.useAnimateColor = useAnimateColor;
|
|
43
|
+
function useAppState(filter) {
|
|
44
|
+
var _a = (0, common_1.useState)(function () { return react_native_1.AppState.currentState; }), appState = _a[0], setAppState = _a[1];
|
|
45
|
+
(0, common_1.onMount)(function () {
|
|
46
|
+
react_native_1.AppState.addEventListener('change', function (s) {
|
|
47
|
+
if (!filter || filter.includes(s)) {
|
|
48
|
+
setAppState(s);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
appState: appState,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
exports.useAppState = useAppState;
|
|
57
|
+
function useStaticAnimationStyles(obj, keys) {
|
|
58
|
+
var styles = (0, common_1.useRef)({});
|
|
59
|
+
if (Object.keys(styles.current).length === 0) {
|
|
60
|
+
var mappedStyles = keys.map(function (k) { return [k, __assign({}, obj[k])]; });
|
|
61
|
+
styles.current = Object.fromEntries(mappedStyles);
|
|
62
|
+
}
|
|
63
|
+
return styles.current;
|
|
64
|
+
}
|
|
65
|
+
exports.useStaticAnimationStyles = useStaticAnimationStyles;
|
|
66
|
+
var buildAnimatedStyle = function (property, value, currentStyle, applyFN) {
|
|
67
|
+
'worklet';
|
|
68
|
+
var _a;
|
|
69
|
+
if (applyFN === void 0) { applyFN = function (v) { return v; }; }
|
|
70
|
+
var newStyle = __assign({}, currentStyle);
|
|
71
|
+
switch (property) {
|
|
72
|
+
case 'opacity':
|
|
73
|
+
newStyle.opacity = applyFN(value);
|
|
74
|
+
break;
|
|
75
|
+
case 'backgroundColor':
|
|
76
|
+
newStyle.backgroundColor = applyFN(value);
|
|
77
|
+
break;
|
|
78
|
+
case 'scale':
|
|
79
|
+
case 'scaleX':
|
|
80
|
+
case 'scaleY':
|
|
81
|
+
case 'translateX':
|
|
82
|
+
case 'translateY':
|
|
83
|
+
if (!newStyle.transform) {
|
|
84
|
+
newStyle.transform = [];
|
|
85
|
+
}
|
|
86
|
+
newStyle.transform.push((_a = {},
|
|
87
|
+
_a[property] = applyFN(value),
|
|
88
|
+
_a));
|
|
89
|
+
default:
|
|
90
|
+
newStyle[property] = value;
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
return newStyle;
|
|
94
|
+
};
|
|
95
|
+
var transformProperties = function (properties, transition) {
|
|
96
|
+
'worklet';
|
|
97
|
+
var styles = {};
|
|
98
|
+
var _loop_1 = function (prop, value) {
|
|
99
|
+
var transitionConfig = transition[prop] || transition;
|
|
100
|
+
var _transitionConfig = __assign({ type: 'timing', duration: 100, easing: react_native_reanimated_1.Easing.linear }, transitionConfig);
|
|
101
|
+
var type = _transitionConfig.type, duration = _transitionConfig.duration, easing = _transitionConfig.easing;
|
|
102
|
+
var fn = function (v) { return v; };
|
|
103
|
+
switch (type) {
|
|
104
|
+
case 'timing':
|
|
105
|
+
fn = function (v) { return (0, react_native_reanimated_1.withTiming)(v, {
|
|
106
|
+
duration: duration,
|
|
107
|
+
easing: easing,
|
|
108
|
+
}); };
|
|
109
|
+
break;
|
|
110
|
+
default:
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
styles = buildAnimatedStyle(prop, value, styles, fn);
|
|
114
|
+
};
|
|
115
|
+
for (var _i = 0, _a = Object.entries(properties); _i < _a.length; _i++) {
|
|
116
|
+
var _b = _a[_i], prop = _b[0], value = _b[1];
|
|
117
|
+
_loop_1(prop, value);
|
|
118
|
+
}
|
|
119
|
+
return styles;
|
|
120
|
+
};
|
|
121
|
+
function useAnimatedVariantStyles(config) {
|
|
122
|
+
var animatedProperties = config.animatedProperties, updater = config.updater, variantStyles = config.variantStyles, _a = config.transition, transition = _a === void 0 ? {} : _a, _b = config.dependencies, dependencies = _b === void 0 ? [] : _b;
|
|
123
|
+
var _transition = (0, common_1.useRef)(null);
|
|
124
|
+
if (!_transition.current) {
|
|
125
|
+
_transition.current = JSON.parse(JSON.stringify(transition || {}));
|
|
126
|
+
}
|
|
127
|
+
var staticStyles = useStaticAnimationStyles(variantStyles, animatedProperties);
|
|
128
|
+
var animated = (0, react_native_reanimated_1.useAnimatedStyle)(function () {
|
|
129
|
+
var nextState = updater(staticStyles);
|
|
130
|
+
var formatted = transformProperties(nextState, _transition.current);
|
|
131
|
+
return formatted;
|
|
132
|
+
}, dependencies);
|
|
133
|
+
return animated;
|
|
134
|
+
}
|
|
135
|
+
exports.useAnimatedVariantStyles = useAnimatedVariantStyles;
|
|
136
|
+
function usePressableFeedback(styles, config) {
|
|
137
|
+
var disabled = config.disabled, feedbackConfig = config.feedbackConfig, _a = config.hightlightPropertyIn, hightlightPropertyIn = _a === void 0 ? 'backgroundColor' : _a, _b = config.hightlightPropertyOut, hightlightPropertyOut = _b === void 0 ? 'backgroundColor' : _b;
|
|
138
|
+
var _feedbackConfig = __assign({}, feedbackConfig);
|
|
139
|
+
var style;
|
|
140
|
+
if (common_1.TypeGuards.isObject(styles)) {
|
|
141
|
+
style = styles === null || styles === void 0 ? void 0 : styles[hightlightPropertyIn];
|
|
142
|
+
}
|
|
143
|
+
else if (common_1.TypeGuards.isArray(styles)) {
|
|
144
|
+
style = styles.reverse().find(function (s) { return s[hightlightPropertyIn]; });
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
style = react_native_1.StyleSheet.flatten(styles)[hightlightPropertyIn];
|
|
148
|
+
}
|
|
149
|
+
var disableFeedback = disabled;
|
|
150
|
+
var rippleEnabled = (_feedbackConfig === null || _feedbackConfig === void 0 ? void 0 : _feedbackConfig.type) === 'ripple' && !disableFeedback;
|
|
151
|
+
var rippleConfig = rippleEnabled ? _feedbackConfig === null || _feedbackConfig === void 0 ? void 0 : _feedbackConfig.config : null;
|
|
152
|
+
function getFeedbackStyle(pressed) {
|
|
153
|
+
var _a;
|
|
154
|
+
if (disableFeedback)
|
|
155
|
+
return {};
|
|
156
|
+
var feedbackConfig = __assign({}, _feedbackConfig);
|
|
157
|
+
if (rippleEnabled && feedbackConfig.type === 'ripple' && react_native_1.Platform.OS === 'ios' && !!(_feedbackConfig === null || _feedbackConfig === void 0 ? void 0 : _feedbackConfig.iosFallback)) {
|
|
158
|
+
feedbackConfig = feedbackConfig === null || feedbackConfig === void 0 ? void 0 : feedbackConfig.iosFallback;
|
|
159
|
+
}
|
|
160
|
+
switch (feedbackConfig.type) {
|
|
161
|
+
case 'highlight':
|
|
162
|
+
if (!pressed && hightlightPropertyIn !== hightlightPropertyOut)
|
|
163
|
+
return {};
|
|
164
|
+
var highlightColorDefault = style || '#0000';
|
|
165
|
+
if (pressed) {
|
|
166
|
+
if (feedbackConfig === null || feedbackConfig === void 0 ? void 0 : feedbackConfig.color) {
|
|
167
|
+
highlightColorDefault = feedbackConfig === null || feedbackConfig === void 0 ? void 0 : feedbackConfig.color;
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
var opacity = feedbackConfig === null || feedbackConfig === void 0 ? void 0 : feedbackConfig.shiftOpacity;
|
|
171
|
+
var brightness = feedbackConfig === null || feedbackConfig === void 0 ? void 0 : feedbackConfig.brightness;
|
|
172
|
+
if (!common_1.TypeGuards.isNumber(opacity)) {
|
|
173
|
+
opacity = 1;
|
|
174
|
+
}
|
|
175
|
+
if (!common_1.TypeGuards.isNumber(brightness)) {
|
|
176
|
+
brightness = 0;
|
|
177
|
+
}
|
|
178
|
+
highlightColorDefault = (0, common_1.shadeColor)(highlightColorDefault, brightness * 100, opacity);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return _a = {},
|
|
182
|
+
_a[hightlightPropertyOut] = highlightColorDefault,
|
|
183
|
+
_a;
|
|
184
|
+
break;
|
|
185
|
+
case 'opacity':
|
|
186
|
+
return {
|
|
187
|
+
opacity: pressed ? feedbackConfig === null || feedbackConfig === void 0 ? void 0 : feedbackConfig.value : 1,
|
|
188
|
+
};
|
|
189
|
+
case 'styles':
|
|
190
|
+
return pressed ? feedbackConfig === null || feedbackConfig === void 0 ? void 0 : feedbackConfig.styles : {};
|
|
191
|
+
case 'none':
|
|
192
|
+
return {};
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
getFeedbackStyle: getFeedbackStyle,
|
|
197
|
+
rippleConfig: rippleConfig,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
exports.usePressableFeedback = usePressableFeedback;
|
|
201
|
+
function useBackButton(cb, deps) {
|
|
202
|
+
if (deps === void 0) { deps = []; }
|
|
203
|
+
(0, common_1.onUpdate)(function () {
|
|
204
|
+
var subscription = react_native_1.BackHandler.addEventListener('hardwareBackPress', function () {
|
|
205
|
+
var stopBubbling = cb();
|
|
206
|
+
if (common_1.TypeGuards.isBoolean(stopBubbling)) {
|
|
207
|
+
return stopBubbling;
|
|
208
|
+
}
|
|
209
|
+
return false;
|
|
210
|
+
});
|
|
211
|
+
return function () {
|
|
212
|
+
subscription.remove();
|
|
213
|
+
};
|
|
214
|
+
}, deps);
|
|
215
|
+
}
|
|
216
|
+
exports.useBackButton = useBackButton;
|
|
217
|
+
function useKeyboardPaddingStyle(styles, enabled) {
|
|
218
|
+
if (enabled === void 0) { enabled = true; }
|
|
219
|
+
var _a = (0, react_native_avoid_softinput_1.useSoftInputState)(), isSoftInputShown = _a.isSoftInputShown, softInputHeight = _a.softInputHeight;
|
|
220
|
+
var propStyle = (0, react_1.useMemo)(function () {
|
|
221
|
+
return react_native_1.StyleSheet.flatten(styles);
|
|
222
|
+
}, styles);
|
|
223
|
+
var bottomPadding = propStyle && common_1.TypeGuards.isNumber(propStyle.paddingBottom) ? propStyle.paddingBottom : 0;
|
|
224
|
+
var totalPadding = softInputHeight + bottomPadding;
|
|
225
|
+
return isSoftInputShown && enabled ? (0, styles_1.mergeStyles)([propStyle, { paddingBottom: totalPadding }]) : propStyle;
|
|
226
|
+
}
|
|
227
|
+
exports.useKeyboardPaddingStyle = useKeyboardPaddingStyle;
|
|
228
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/utils/hooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA2G;AAC3G,6CAAiJ;AACjJ,mEAA2G;AAE3G,6EAAgE;AAChE,+BAA+B;AAC/B,2CAA8C;AAE9C,SAAgB,eAAe,CAAC,KAAa,EAAE,IAA8C;IAC3F,IAAM,KAAK,GAAG,IAAA,eAAM,EAAC,CAAC,CAAC,CAAA;IAChB,IAAA,IAAI,GAAI,IAAA,iBAAQ,EAAC,IAAI,uBAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAA/C,CAA+C;IAC1D,IAAM,KAAK,GAAG,IAAA,oBAAW,EAAC,KAAK,CAAC,CAAA;IAChC,IAAM,IAAI,GAA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AAO,KAAK,CAAA;QAEd,CAAC,CAAC,CAAA;QACF,OAAO;YACL,YAAY,CAAC,MAAM,EAAE,CAAA;QACvB,CAAC,CAAA;IACH,CAAC,EAAE,IAAI,CAAC,CAAA;AACV,CAAC;AAhBD,sCAgBC;AAED,SAAgB,uBAAuB,CAAC,MAAmB,EAAE,OAAc;IAAd,wBAAA,EAAA,cAAc;IACnE,IAAA,KAAwC,IAAA,gDAAiB,GAAE,EAAzD,gBAAgB,sBAAA,EAAE,eAAe,qBAAwB,CAAA;IAEjE,IAAM,SAAS,GAAG,IAAA,eAAO,EAAC;QACxB,OAAO,yBAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IACnC,CAAC,EAAE,MAAM,CAAC,CAAA;IAEV,IAAM,aAAa,GAAG,SAAS,IAAI,mBAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IAE7G,IAAM,YAAY,GAAG,eAAe,GAAG,aAAa,CAAA;IAEpD,OAAO,gBAAgB,IAAI,OAAO,CAAC,CAAC,CAAC,IAAA,oBAAW,EAAC,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AAC5G,CAAC;AAZD,0DAYC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './OSAlert';
|
|
2
|
+
export * from './hooks';
|
|
3
|
+
export * from './misc';
|
|
4
|
+
export * from './NotificationManager';
|
|
5
|
+
export * from './ModalManager';
|
|
6
|
+
import * as Permissions from './PermissionManager';
|
|
7
|
+
export { Permissions };
|
|
8
|
+
export * from './KeyboardAware';
|
|
9
|
+
export * from './input';
|
|
10
|
+
export * from './theme';
|
|
11
|
+
export * from './locale';
|
|
12
|
+
export * from './Subscription';
|
|
13
|
+
export * from './useQueryListRefresh';
|
|
14
|
+
export * from './StorageManager';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Permissions = void 0;
|
|
30
|
+
__exportStar(require("./OSAlert"), exports);
|
|
31
|
+
__exportStar(require("./hooks"), exports);
|
|
32
|
+
__exportStar(require("./misc"), exports);
|
|
33
|
+
__exportStar(require("./NotificationManager"), exports);
|
|
34
|
+
__exportStar(require("./ModalManager"), exports);
|
|
35
|
+
var Permissions = __importStar(require("./PermissionManager"));
|
|
36
|
+
exports.Permissions = Permissions;
|
|
37
|
+
__exportStar(require("./KeyboardAware"), exports);
|
|
38
|
+
__exportStar(require("./input"), exports);
|
|
39
|
+
__exportStar(require("./theme"), exports);
|
|
40
|
+
__exportStar(require("./locale"), exports);
|
|
41
|
+
__exportStar(require("./Subscription"), exports);
|
|
42
|
+
__exportStar(require("./useQueryListRefresh"), exports);
|
|
43
|
+
__exportStar(require("./StorageManager"), exports);
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,wDAAqC;AACrC,iDAA8B;AAC9B,+DAAkD;AAEzC,kCAAW;AACpB,kDAA+B;AAC/B,0CAAuB;AACvB,0CAAuB;AACvB,2CAAwB;AACxB,iDAA8B;AAC9B,wDAAqC;AAErC,mDAAgC"}
|