Skip to content

Commit

Permalink
feat(core): ⚡ new utility function added
Browse files Browse the repository at this point in the history
copy to clipboard - new utility function added

Ref #84
  • Loading branch information
techoneel committed Aug 21, 2024
1 parent 861f293 commit c3085be
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 156 deletions.
176 changes: 20 additions & 156 deletions package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ import NativeLinearProgress from "./nativeComponents/feedback/NativeLinearProgre
import NativeSkeleton from "./nativeComponents/feedback/NativeSkeleton";
import NativeSnackbar from "./nativeComponents/feedback/NativeSnackbar";
import {
NativeDomRoutes,
NativeDomRoute,
NativeDomNavigate,
nativeUseNavigate,
NativeDomRoute,
NativeDomRoutes,
nativeOpenUrl,
nativeUseLocation,
nativeUseNavigate,
nativeUseParams,
nativeUseSearchParams,
nativeOpenUrl
nativeUseSearchParams
} from "./nativeComponents/helper/routerHelper";
import { nativeStorage } from "./nativeComponents/helper/storeHelper";
import NativeGoogleButton from "./nativeComponents/inputs/custom/NativeGoogleButton";
Expand Down Expand Up @@ -149,166 +149,30 @@ import NativeModal from "./nativeComponents/utils/NativeModal";
import NativePopover from "./nativeComponents/utils/NativePopover";
import NativeCssBaseline from "./theme/NativeCssBaseline";
import NativeThemeProvider from "./theme/NativeThemeProvider";
import { native_copyToClipboard } from "./utils/app.utils.js";
import { useNetworkStatus } from "./utils/network.utils.js";

export {
DevNativeDataTable,
/**
* DEVICE UTIL(s)
*/
getNativeDeviceDetails,
getNativeDeviceDetails, getNativeMenuItem, native_copyToClipboard /*Utils - App*/, NativeAccordion, NativeAccordionDetail, NativeAccordionSummary, NativeAlert,
NativeAlertTitle, NativeAppBar, NativeAppContainer, NativeAppDiv, NativeAutocomplete, NativeAvatar, NativeAvatarGroup, NativeBackdrop, NativeBadge, NativeBox, NativeButton, NativeCard, NativeCardActionArea, NativeCardActions, NativeCardContent, NativeCardHeader,
NativeCardMedia, NativeCheckbox, NativeChip, NativeCircularProgress, NativeClickAwayListner, NativeCollapse, NativeConfirmPassword, NativeConfirmPasswordField, NativeContainedButton, NativeContainer, NativeCssBaseline,
//Native Tabs
NativeCustomTabs, NativeDataTableDetailsPaneContainer, NativeDataTableToolbar,
NativeDataTableToolPopover, NativeDatepicker, NativeDateRangepicker, NativeDateTimePicker, NativeDateTimeRangePicker, NativeDialog, NativeDivider, NativeDomNavigate, NativeDomRoute, NativeDomRoutes, NativeDrawer, NativeFab, NativeFade, NativeFilePicker, nativeFilterOptions, NativeFlatList, NativeFormContainer, NativeFormControl, NativeFormErrorText, NativeFormHelperText, NativeGoogleButton, NativeGrid, NativeH,
NativeH1, NativeH2, NativeH3, NativeH4, NativeH5,
NativeH6, NativeIcon, NativeIconButton, NativeImage, NativeImageBackground, NativeImagePicker, NativeInput, NativeInputAdornment, NativeInputLabel, NativeInputPassword, NativeJSONEditor, NativeJSONInput, NativeLabel, NativeLinearProgress, NativeLink, NativeList, NativeListItem, NativeListItemButton, NativeListItemIcon, NativeListItemText, NativeMedicineSelector, NativeMenuItem, NativeMenuList, NativeModal, NativeMultiTimeRangePicker, NativeNavigation, nativeOpenUrl, NativeOtpInput, NativeOutlinedButton, NativePageContainer, NativePaper, NativePhone, NativePopover, NativeRating, NativeReactSelectInput, NativeRichTextEditor, NativeRightDrawer, NativeScrollTop, NativeSection, NativeSelect, NativeSkeleton, NativeSnackbar,
// NativeGridItem,
NativeSpan, NativeSpeechToText, NativeStack, nativeStorage, NativeSwitch, NativeTab,
NativeTabHead, NativeTable, NativeTableBody, NativeTableBodyCell, NativeTableCell, NativeTableContainer, NativeTableFooter, NativeTableHead, NativeTableHeadCell, NativeTableHeadRow, NativeTablePagination, NativeTableRow, NativeTableSortLabel, NativeTabPanel, NativeTabs, NativeTextarea, NativeTextButton, NativeTextField, NativeThemeProvider, NativeTimePicker, NativeTimeRangePicker, NativeToolbar, NativeTooltip, NativeTypography, NativeTypographyBody1, NativeTypographyBody2, NativeTypographyButton, NativeTypographyCaption, NativeTypographyOverline, NativeTypographySubtitle1, NativeTypographySubtitle2, nativeUseLocation, nativeUseNavigate, nativeUseParams, nativeUseScrollTrigger,
/**
* NATIVE EXPORTS
*/
nativeUseSearchParams,
NativeDialog,
NativeGoogleButton,
NativeNavigation,
NativeModal,
NativePopover,
NativeFade,
NativeGrid,
// NativeGridItem,
NativeSpan,
NativeBox,
//Native Tabs
NativeCustomTabs,
NativeContainer,
NativeSection,
NativeAppDiv,
NativeList,
NativeStack,
NativeListItem,
NativeImageBackground,
NativeLinearProgress,
NativeBackdrop,
NativeSnackbar,
NativeCircularProgress,
NativeAlert,
NativeAlertTitle,
NativeSkeleton,
NativeAccordion,
NativeAccordionSummary,
NativeAccordionDetail,
NativeAppBar,
NativeDrawer,
NativeCard,
NativeRightDrawer,
NativePaper,
NativeToolbar,
NativeCardActions,
NativeCardHeader,
NativeCardMedia,
NativeCardActionArea,
NativeCardContent,
NativeMenuItem,
NativeTab,
NativeTabHead,
NativeMenuList,
NativeTabs,
NativeTabPanel,
NativeScrollTop,
NativeLink,
NativeListItemIcon,
NativeTablePagination,
NativeTableSortLabel,
NativeTable,
NativeTooltip,
NativeIcon,
NativeTableFooter,
NativeBadge,
NativeTableBodyCell,
NativeTableHeadCell,
NativeTableContainer,
NativeTableCell,
NativeTableHead,
NativeTableBody,
NativeTableRow,
NativeImage,
NativeH3,
NativeH,
NativeH1,
NativeH4,
NativeH2,
NativeH5,
NativeH6,
NativeChip,
NativeTypography,
NativeDivider,
NativeAvatar,
NativeTypographyCaption,
NativeTypographyButton,
NativeLabel,
NativeTypographySubtitle2,
NativeTypographyOverline,
NativeTypographyBody2,
NativeTypographyBody1,
NativeTypographySubtitle1,
NativeListItemText,
NativeTimePicker,
NativeConfirmPasswordField,
NativeInput,
NativeTextField,
NativeInputPassword,
NativePhone,
NativeJSONInput,
NativeJSONEditor,
NativeSelect,
NativeTextarea,
NativeSwitch,
NativeFilePicker,
NativeFab,
NativeDateTimeRangePicker,
NativeInputAdornment,
NativeListItemButton,
NativeFormHelperText,
NativeRichTextEditor,
NativeDateTimePicker,
NativeOtpInput,
NativeMultiTimeRangePicker,
NativeAutocomplete,
NativeImagePicker,
NativeIconButton,
NativeDateRangepicker,
NativeOutlinedButton,
NativeTextButton,
NativeConfirmPassword,
NativeContainedButton,
NativeTimeRangePicker,
NativeInputLabel,
NativeFormErrorText,
NativeDatepicker,
NativeFormControl,
NativeFormContainer,
NativeButton,
NativeCheckbox,
DevNativeDataTable,
getNativeMenuItem,
NativeDomRoutes,
NativeDomRoute,
NativeDomNavigate,
nativeUseNavigate,
nativeUseLocation,
nativeUseParams,
nativeFilterOptions,
nativeUseScrollTrigger,
NativeThemeProvider,
NativeCssBaseline,
NativeCollapse,
nativeStorage,
NativeTableHeadRow,
NativeFlatList,
NativeMedicineSelector,
NativeReactSelectInput,
NativeAppContainer,
NativePageContainer,
NativeDataTableToolbar,
NativeDataTableToolPopover,
NativeDataTableDetailsPaneContainer,
nativeOpenUrl,
NativeSpeechToText,
NativeRating,
NativeAvatarGroup,
// Network status custom hook
useNetworkStatus,
NativeClickAwayListner
useNetworkStatus
};

14 changes: 14 additions & 0 deletions package/utils/app.utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Clipboard from "@react-native-clipboard/clipboard";

/**
* Copy text to clipboard
*
* @todo need to handle error cases
*
* @param {*} text
* @returns boolean
*/
export async function native_copyToClipboard(text) {
Clipboard.setString(text);
return true;
}

0 comments on commit c3085be

Please sign in to comment.