repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
Krinkle/sauce-connect-action
src/wait.ts
import {watch} from 'fs' export async function wait(dir: string): Promise<unknown> { return new Promise((resolve, reject) => { const timeout = setTimeout(() => { watcher.close() reject( new Error( 'timeout: SC was not ready even after we wait 60 s...
Krinkle/sauce-connect-action
src/exec-and-return.ts
import {exec} from '@actions/exec' export async function execAndReturn( commandLine: string, args?: string[] ): Promise<string> { let output = '' await exec(commandLine, args, { listeners: { stdout: (data: Buffer) => { output += data.toString() } ...
Krinkle/sauce-connect-action
src/post.ts
import {getState, warning, setFailed} from '@actions/core' import {stopContainer} from './stop-container' async function run(): Promise<void> { const containerId = getState('containerId') if (!containerId) { warning( 'No state found. Assume that no container run in this workflow run.' ...
Krinkle/sauce-connect-action
src/stop-container.ts
import {info} from '@actions/core' import {exec} from '@actions/exec' import {execAndReturn} from './exec-and-return' export async function stopContainer(containerId: string): Promise<void> { info(`Trying to stop the docker container with ID ${containerId}...`) const running = ( await execA...
vinayakkulkarni/vite
src/types.ts
<reponame>vinayakkulkarni/vite<filename>src/types.ts import type { InlineConfig, SSROptions } from 'vite' import type { VueViteOptions } from 'vite-plugin-vue2' export interface Nuxt { options: any; resolver: any; hook: Function; callHook: Function; } export interface ViteOptions extends InlineConfig { /** ...
vinayakkulkarni/vite
src/utils/warmup.ts
<gh_stars>0 import type { ViteDevServer } from 'vite' export async function warmupViteServer (server: ViteDevServer, entries: string[]) { const warmedUrls = new Set<String>() const warmup = async (url: string) => { if (warmedUrls.has(url)) { return undefined } warmedUrls.add(url) await server.transfor...
vinayakkulkarni/vite
src/plugins/default-export.ts
<reponame>vinayakkulkarni/vite<filename>src/plugins/default-export.ts import type { Plugin } from 'vite' import { readFile } from 'fs-extra' // const PREFIX = 'defaultexport:' const PREFIX = 'defaultexport:' const hasPrefix = (id: string = '') => id.startsWith(PREFIX) const removePrefix = (id: string = '') => hasPrefi...
vinayakkulkarni/vite
src/css.ts
import createResolver from 'postcss-import-resolver' import defu from 'defu' import type { Nuxt, ViteOptions } from './types' // Ref: https://github.com/nuxt/nuxt.js/blob/dev/packages/webpack/src/utils/postcss.js export function resolveCSSOptions (nuxt: Nuxt): ViteOptions['css'] { const css: ViteOptions['css'] = { ...
vinayakkulkarni/vite
src/plugins/jsx.ts
<filename>src/plugins/jsx.ts import type { Plugin } from 'vite' const needsJsxProcessing = (id: string = '') => !id.includes('node_modules') && ['.vue', '.jsx', '.tsx'].some(extension => id.includes(extension)) export function jsxPlugin () { return <Plugin>{ name: 'nuxt:jsx', transform (code, id) { ...
vinayakkulkarni/vite
src/plugins/replace.ts
import type { Plugin } from 'vite' export function replace (replacements: Record<string, string>) { return <Plugin>{ name: 'nuxt:replace', transform (code) { Object.entries(replacements).forEach(([key, value]) => { const escapedKey = key.replace(/\./g, '\\.') code = code.replace(new Reg...
BigMoneyKirk/QR_Proto
src/app/components/main/main.component.ts
import { Component, OnInit } from '@angular/core'; import { ImageService } from 'src/app/services/image.service'; import { VCard } from "ngx-vcard"; @Component({ selector: 'app-main', templateUrl: './main.component.html', styleUrls: ['./main.component.scss'] }) export class MainComponent implements OnInit { ...
jayce-incognito/leapxpert-test-fe
src/module/Setting/features/SettingItem/SettingItem.styled.ts
import styled from 'styled-components'; export const Styled = styled.div` margin-bottom: 30px; .title { padding-bottom: 15px; } .toggle-item { display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .pointer { cu...
jayce-incognito/leapxpert-test-fe
src/components/Templates/index.ts
<filename>src/components/Templates/index.ts export { default } from './Templates'; export * from './Templates.actions'; export * from './Templates.constant'; export * from './Templates.interface'; export * from './Templates.reducer'; export * from './Templates.selector'; export * from './Templates.route';
jayce-incognito/leapxpert-test-fe
src/module/Setting/features/Network/index.ts
export { default } from './Network'; export * from './Network.route';
jayce-incognito/leapxpert-test-fe
src/components/Icons/FastFee.tsx
<gh_stars>0 import React from 'react'; import styled, { css } from 'styled-components'; import { COLORS, ITheme } from 'src/styles'; interface IProps { fast2x?: boolean; handleClick: () => any; } const Lightning = styled.button<{ selectFast: any }>` width: 56px; height: 30px; border-radius: 8px; ...
jayce-incognito/leapxpert-test-fe
src/components/Core/Tabs/Tabs.constant.ts
<reponame>jayce-incognito/leapxpert-test-fe<gh_stars>0 export const ACTION_CHANGE_TAB = `[tabs] Change active tab`;
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/Tooltip.wrapper.tsx
import React, { HTMLAttributes } from 'react'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { actionRemoveTooltip, actionShowTooltip } from './Tooltip.actions'; const Styled = styled.div``; const TooltipWrapper = (props: { text: string; id: string } & HTMLAttributes<HTMLDi...
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/Tooltip.enhance.tsx
<gh_stars>0 import React, { useEffect, useState } from 'react'; import { compose } from 'recompose'; import { useDispatch } from 'react-redux'; import useOutsideRef from 'src/hooks/useDetectClickOutside'; import { ITooltipProps } from './Tooltip.interface'; import { actionRemoveTooltip } from './Tooltip.actions'; /** ...
jayce-incognito/leapxpert-test-fe
src/components/Icons/ArrowDown.tsx
import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` width: 18px; height: 10px; `; const ArrowDownVector = React.memo((props: any) => { return ( <svg width={16} height={10}> <path d="M7.879 9.339c.22 0 .44...
jayce-incognito/leapxpert-test-fe
src/components/Templates/Templates.tsx
<gh_stars>0 import React from 'react'; import styled from 'styled-components'; const Styled = styled.div``; const Templates = () => { return <Styled />; }; export default React.memo(Templates);
jayce-incognito/leapxpert-test-fe
src/module/Setting/features/SettingItem/index.ts
<filename>src/module/Setting/features/SettingItem/index.ts<gh_stars>0 export { default } from './SettingItem'; export * from './SettingItem.interface';
jayce-incognito/leapxpert-test-fe
src/components/ReduxForm/validator.ts
import isEmpty from 'lodash/isEmpty'; const required = (value: any) => (isEmpty(value) ? 'Required' : undefined); const maxLength = (max: number, message?: string) => (value: string) => value && value.length > max ? message || `Must be ${max} characters or less` : undefined; const minLength = (min: number, messa...
jayce-incognito/leapxpert-test-fe
src/components/Core/Tabs/Tabs.reducer.ts
<reponame>jayce-incognito/leapxpert-test-fe import { IAction } from 'src/redux/interface'; import { ACTION_CHANGE_TAB } from './Tabs.constant'; import { ITabsReducer } from './Tabs.interface'; const initialState: ITabsReducer = { active: '', }; const reducer = (state = initialState, action: IAction) => { swit...
jayce-incognito/leapxpert-test-fe
src/components/Header/Header.headerApp.tsx
import React from 'react'; import styled from 'styled-components'; import { AppIcon, SettingIcon } from 'src/components/Icons'; interface IProps { customLeftHeader?: any; } const Styled = styled.div` &.header { margin-bottom: 30px; } `; const Header = (props: IProps & any) => { const { custom...
jayce-incognito/leapxpert-test-fe
src/components/Core/ToggleSwitch/ToggleSwitch.tsx
import React from 'react'; import { useSelector } from 'react-redux'; import { themeSelector } from 'src/module/Setting'; import { ITheme, IGlobalStyle } from 'src/styles'; import styled from 'styled-components'; interface IProps { toggleValue?: boolean; onToggle?: () => void; } const Styled = styled.div` ...
jayce-incognito/leapxpert-test-fe
src/components/Core/Tabs/Tabs.selector.ts
import { IRootState } from 'src/redux/interface'; import { createSelector } from 'reselect'; export const tabsSelector = createSelector( (state: IRootState) => state.tabs, (tabs) => tabs, ); export const activeTabSelector = createSelector(tabsSelector, (tabs) => tabs.active);
jayce-incognito/leapxpert-test-fe
src/components/Icons/Key.tsx
<gh_stars>0 import React, { useEffect, useRef } from 'react'; import styled from 'styled-components'; import { useDispatch, useSelector } from 'react-redux'; import { darkModeSelector, translateByFieldSelector } from 'src/module/Setting'; import { IGeneralLanguage } from 'src/i18n'; import { actionRemoveTooltip, action...
jayce-incognito/leapxpert-test-fe
src/module/Setting/features/SettingItem/SettingItem.interface.ts
export interface ISettingChildItem { desc?: string; toggle?: boolean; onClick?: () => void; link?: string; toggleValue?: boolean; } export interface ISettingItem { title: string; child?: ISettingChildItem[]; button?: boolean; onClick?: () => void; }
jayce-incognito/leapxpert-test-fe
src/components/Core/Checkbox/index.tsx
import React from 'react'; import styled from 'styled-components'; import PropTypes from 'prop-types'; import { COLORS } from 'src/styles'; interface IProps { onHandleChecked: () => any; label: string; checked: boolean; } const Styled = styled.div` & { flex-direction: row; align-items:...
jayce-incognito/leapxpert-test-fe
src/module/Home/Home.tsx
import React from 'react'; import styled from 'styled-components'; import { Todo } from 'src/module/Todo'; declare global { interface Window { ReactNativeWebView: any; } } const Styled = styled.div``; const Home = () => { return ( <Styled> <Todo /> </Styled> ); }; ...
jayce-incognito/leapxpert-test-fe
src/module/Todo/Todo.selector.ts
<gh_stars>0 import { createSelector } from 'reselect'; import { IRootState } from 'src/redux/interface'; import { TODO_MODE, TODO_STATUS } from './Todo.constant'; export const todoSelector = createSelector( (state: IRootState) => state.todo, (todo) => todo, ); export const listTodoSelector = createSelector(to...
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/Tooltip.selector.ts
import { createSelector } from 'reselect'; import { IRootState } from 'src/redux/interface'; import { ITooltipReducer } from './Tooltip.reducer'; export const tooltipSelector = createSelector( (state: IRootState) => state.tooltip, (tooltip: ITooltipReducer) => tooltip.data, );
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/Tooltip.reducer.ts
import { v4 } from 'uuid'; import { ACTION_SHOW_TOOLTIP, ACTION_REMOVE_TOOLTIP } from './Tooltip.constant'; export interface ITooltipReducer { data: Array<any>; } const initialState: ITooltipReducer = { data: [], }; const reducer = ( state = initialState, action: { type: string; paylo...
jayce-incognito/leapxpert-test-fe
src/components/ReduxForm/index.ts
export { default as validator } from './validator'; export { default as InputField } from './InputField';
jayce-incognito/leapxpert-test-fe
src/components/Core/ToggleSwitch/index.ts
<filename>src/components/Core/ToggleSwitch/index.ts export { default as ToggleSwitch } from './ToggleSwitch';
jayce-incognito/leapxpert-test-fe
src/module/Home/Home.selector.ts
<filename>src/module/Home/Home.selector.ts import { createSelector } from 'reselect'; export const templateSelector = createSelector( (state: any) => state.template, (template) => template, );
jayce-incognito/leapxpert-test-fe
src/module/Todo/index.ts
export { default as Todo } from './Todo'; export * from './Todo.actions'; export * from './Todo.constant'; export * from './Todo.interface'; export * from './Todo.reducer'; export * from './Todo.selector'; export * from './Todo.route';
jayce-incognito/leapxpert-test-fe
src/hooks/index.ts
<gh_stars>0 export { default as useDetectClickOutside } from './useDetectClickOutside'; export { default as useValidator } from './useValidator'; export * from './useFormValue';
jayce-incognito/leapxpert-test-fe
src/components/Templates/Templates.route.ts
import { lazy } from 'react'; import { IRouteProps } from 'src/module'; const templatesRoute: IRouteProps = { path: '/templates', exact: true, component: lazy(() => import('./Templates')), name: 'Templates', to: '/templates', }; export const route = templatesRoute.path; export default templatesRo...
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/TooltipContainer.tsx
import React from 'react'; import { useSelector } from 'react-redux'; import isEmpty from 'lodash/isEmpty'; import { themeSelector } from 'src/module/Setting'; import styled from 'styled-components'; import enhance from './TooltipContainer.enhance'; import { IProps } from './Tooltip.interface'; import Tooltip from './T...
jayce-incognito/leapxpert-test-fe
src/module/Todo/Todo.constant.ts
export const ACTION_ADD_TODO = `[Todo] Add todo`; export const ACTION_REMOVE_TODO = `[Todo] Remove todo`; export const ACTION_CHANGE_STATUS = `[Todo] Change status todo`; export const ACTION_TOGGLE_ALL_TODO = `[Todo] Toggle all todo`; export const ACTION_CHANGE_MODE = `[Todo] Change mode`; export const TODO_STATUS = { ...
jayce-incognito/leapxpert-test-fe
src/hooks/useFormValue.tsx
import trim from 'lodash/trim'; import { useSelector } from 'react-redux'; import { formValueSelector } from 'redux-form'; interface IProps { formName: string; field: string; } export const useFormValue = (props: IProps) => { const { formName, field } = props; const formValue = useSelector((state) => ...
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/TooltipContainer.enhance.tsx
<gh_stars>0 import React from 'react'; import { compose } from 'recompose'; import { useSelector } from 'react-redux'; import { IProps } from './Tooltip.interface'; import { tooltipSelector } from './Tooltip.selector'; const enhance = (WrappedComponent: React.FunctionComponent<IProps>) => (props: IProps) => { cons...
jayce-incognito/leapxpert-test-fe
src/utils/index.ts
<filename>src/utils/index.ts export const reloadApp = () => { if (typeof window !== 'undefined') { window.location.href = ''; } }; export const isJSONString = (json: any) => { let result = false; try { if (JSON.parse(json)) { result = true; } } catch { //...
jayce-incognito/leapxpert-test-fe
src/components/Header/Header.tsx
import React from 'react'; import styled from 'styled-components'; import { ArrowLeftIcon } from 'src/components/Icons'; import { useHistory } from 'react-router-dom'; const Styled = styled.div` &.header { margin-bottom: 30px; } `; const Header = () => { const history = useHistory(); const han...
jayce-incognito/leapxpert-test-fe
src/components/Icons/ArrowLeft.tsx
<gh_stars>0 import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` width: 9px; height: 100%; margin-right: 15px; `; const ArrowLeftVector = React.memo((props: any) => { return ( <svg width={9} height={16}> <path ...
jayce-incognito/leapxpert-test-fe
src/components/Icons/Eye.tsx
<reponame>jayce-incognito/leapxpert-test-fe import React from 'react'; import { ENVS } from 'src/configs'; import styled from 'styled-components'; interface IProps { toggle?: boolean; } const Styled = styled.button` width: 20px; height: 13px; `; const Eye = (props: IProps & React.ButtonHTMLAttributes<HTM...
jayce-incognito/leapxpert-test-fe
src/module/Setting/Setting.selector.ts
<reponame>jayce-incognito/leapxpert-test-fe import { createSelector } from 'reselect'; import { IRootState } from 'src/redux/interface'; import { isDev as isDevelop } from 'src/configs'; import { translateByLanguage } from 'src/i18n'; import result from 'lodash/result'; export const settingSelector = createSelector( ...
jayce-incognito/leapxpert-test-fe
src/module/Setting/features/Network/Network.route.ts
<gh_stars>0 import { lazy } from 'react'; import { IRouteProps } from 'src/module'; const networkRoute: IRouteProps = { path: '/network', exact: true, component: lazy(() => import('./Network')), name: 'Network', to: '/network', }; export const route = '/network'; export default networkRoute;
jayce-incognito/leapxpert-test-fe
src/components/ErrorBoundary/ErrorBoundary.tsx
import React from 'react'; interface IProps {} interface IState { hasError: boolean; error: any; } class ErrorBoundary extends React.Component<IProps, IState> { constructor(props: any) { super(props); this.state = { hasError: false, error: {} }; } static getDerivedStateFromError ...
jayce-incognito/leapxpert-test-fe
src/components/Core/Button/index.ts
<filename>src/components/Core/Button/index.ts export { default as Button } from './Button'; export { default as ButtonRemove } from './ButtonRemove';
jayce-incognito/leapxpert-test-fe
src/module/Setting/features/SettingItem/SettingItem.tsx
<reponame>jayce-incognito/leapxpert-test-fe import React, { SyntheticEvent } from 'react'; import { Link } from 'react-router-dom'; import { ToggleSwitch } from 'src/components/Core'; import { ISettingChildItem, ISettingItem } from './SettingItem.interface'; import { Styled } from './SettingItem.styled'; const ToggleI...
jayce-incognito/leapxpert-test-fe
src/module/Home/Home.constant.ts
export const ACTION_FETCHED = `[templates] Fetched data`;
jayce-incognito/leapxpert-test-fe
src/module/Todo/Todo.route.ts
import { lazy } from 'react'; import { IRouteProps } from 'src/module'; const todoRoute: IRouteProps = { path: '/todo', exact: true, component: lazy(() => import('./Todo')), name: 'Todo', to: '/todo', }; export const route = todoRoute.path; export default todoRoute;
jayce-incognito/leapxpert-test-fe
src/module/Todo/Todo.groupActions.tsx
<reponame>jayce-incognito/leapxpert-test-fe<filename>src/module/Todo/Todo.groupActions.tsx import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import styled from 'styled-components'; import { Button } from 'src/components/Core'; import { TODO_MODE } from './Todo.constant'; import { action...
jayce-incognito/leapxpert-test-fe
src/components/Icons/AddressBook.tsx
import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` width: 16px; height: 18px; `; const AddressBookVector = React.memo((props: any) => { return ( <svg width={16} height={18}> <path d="M7.976 8.848c2.127 0...
jayce-incognito/leapxpert-test-fe
src/components/Core/Button/ButtonRemove.tsx
<gh_stars>0 import React from 'react'; import styled from 'styled-components'; import { COLORS } from 'src/styles/colors'; import { ITheme } from 'src/styles'; interface IProps {} const Styled = styled.button` display: flex; justify-content: center; align-items: center; border-radius: 2px; height:...
jayce-incognito/leapxpert-test-fe
src/components/Icons/Close.tsx
import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` width: 11px; height: 11px; `; const CloseVector = React.memo((props: any) => { return ( <svg width={11} height={11} viewBox="0 0 11 11"> <path d="M10.52...
jayce-incognito/leapxpert-test-fe
src/module/Todo/Todo.actions.ts
<reponame>jayce-incognito/leapxpert-test-fe<filename>src/module/Todo/Todo.actions.ts<gh_stars>0 import { ITodo } from './Todo.interface'; import { ACTION_ADD_TODO, ACTION_REMOVE_TODO, ACTION_CHANGE_STATUS, ACTION_TOGGLE_ALL_TODO, TODO_STATUS, ACTION_CHANGE_MODE, } from './Todo.constant'; export...
jayce-incognito/leapxpert-test-fe
src/configs/index.ts
<reponame>jayce-incognito/leapxpert-test-fe export * from './configsEnvs';
jayce-incognito/leapxpert-test-fe
src/components/Icons/VerifiedToken.tsx
import React from 'react'; import { ENVS } from 'src/configs'; import styled from 'styled-components'; const Styled = styled.div` width: 14px; height: 14px; `; const VerifiedIcon = () => { return ( <Styled className="icon"> <img src={`${ENVS.REACT_APP_DOMAIN_URL}/images/icons/verified-...
jayce-incognito/leapxpert-test-fe
src/App.styled.ts
import styled from 'styled-components'; import { ITheme } from 'src/styles'; export const Styled = styled.div` .preload-container { } .lost-network { background-color: ${(props: { theme: ITheme }) => props.theme.body}; color: ${(props: { theme: ITheme }) => props.theme.text}; left: ...
jayce-incognito/leapxpert-test-fe
src/module/Setting/Setting.enhance.tsx
<reponame>jayce-incognito/leapxpert-test-fe import React from 'react'; import ErrorBoundary from 'src/components/ErrorBoundary'; import { useDispatch, useSelector } from 'react-redux'; import { translateByFieldSelector } from 'src/module/Setting'; import Header from 'src/components/Header'; import { ISettingLanguage } ...
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/Tooltip.interface.ts
<gh_stars>0 export interface IProps { tooltips: Array<any>; } export interface ITooltipProps { data: { timeout?: number; id: string; text: string; className?: any; ref?: any; width?: number; height?: number; margin?: number; }; tooltipPosi...
jayce-incognito/leapxpert-test-fe
src/components/Core/FillCheckBox/FillCheckBox.tsx
import React from 'react'; import styled from 'styled-components'; const Styled = styled.button` &.wrapper { display: flex; flex-direction: row; } .icon-checkbox { min-width: 18px; height: 18px; } .label { margin-left: 5px; text-align: left; } `; ...
jayce-incognito/leapxpert-test-fe
src/index.tsx
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; const rootEl = document.getElementById('root'); ReactDOM.render(<App />, rootEl); if (module.hot) { module.hot.accept(); }
jayce-incognito/leapxpert-test-fe
src/styles/index.ts
export * from './globalStyles'; export * from './colors'; export * from './fontSize';
jayce-incognito/leapxpert-test-fe
src/module/Todo/Todo.interface.ts
export interface IProps {} export interface ITodo { id: string; status: number; value: string; }
jayce-incognito/leapxpert-test-fe
src/styles/globalStyles.ts
<reponame>jayce-incognito/leapxpert-test-fe import { ENVS } from 'src/configs'; import { createGlobalStyle } from 'styled-components'; import { COLORS } from './colors'; import { FONT_SIZES } from './fontSize'; export interface ITheme { body: string; text: string; inverseBody: string; inverseText: stri...
jayce-incognito/leapxpert-test-fe
src/module/Setting/Setting.actions.ts
<reponame>jayce-incognito/leapxpert-test-fe<filename>src/module/Setting/Setting.actions.ts import { IServer } from 'src/services'; import { ACTION_FETCHED, ACTION_TOGGLE_HOME_CONFIGS, ACTION_TOGGLE_DECIMAL_DIGITS, ACTION_TOGGLE_DEV_MODE, ACTION_TOGGLE_MODE_SAVE_BURN_TX, ACTION_TOGGLE_MODE_SAVE_R...
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/Tooltip.actions.ts
<reponame>jayce-incognito/leapxpert-test-fe<filename>src/module/Tooltip/Tooltip.actions.ts import { ACTION_SHOW_TOOLTIP, ACTION_REMOVE_TOOLTIP } from './Tooltip.constant'; export const actionShowTooltip = ({ id = '', text, timeout = 2, ref, width = 200, height = 100, margin = 10, }: { i...
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/index.ts
export { default } from './Tooltip'; export * from './Tooltip.actions'; export * from './Tooltip.constant'; export * from './Tooltip.interface'; export * from './Tooltip.reducer'; export * from './Tooltip.selector'; export { default as TooltipContainer } from './TooltipContainer'; export { default as TooltipWrapper } f...
jayce-incognito/leapxpert-test-fe
src/module/Setting/Setting.interface.ts
<filename>src/module/Setting/Setting.interface.ts export interface ISettingLanguage { headerTitle: string; network: { title: string; }; dev: { title: string; homeConfigs: string; }; addressBook: { title: string; desc: string; }; keychain: { ...
jayce-incognito/leapxpert-test-fe
src/components/ReduxForm/InputField/index.ts
<filename>src/components/ReduxForm/InputField/index.ts export { default } from './InputField'; export * from './InputField'; export * from './InputField.constant';
jayce-incognito/leapxpert-test-fe
src/components/Icons/AppIcon.tsx
<filename>src/components/Icons/AppIcon.tsx import React from 'react'; import styled from 'styled-components'; import { ENVS } from 'src/configs'; const Styled = styled.img` width: 22px; height: 22px; border-radius: 50%; border: solid 0.5px; `; const AppIcon = (props: any) => { return <Styled src={...
jayce-incognito/leapxpert-test-fe
src/components/Icons/index.ts
export { default as SettingIcon } from './Setting'; export { default as QrCodeIcon } from './QrCode'; export { default as ArrowLeftIcon } from './ArrowLeft'; export { default as VerifiedIcon } from './VerifiedToken'; export { default as CopyIcon } from './Copy'; export { default as OpenLinkIcon } from './OpenLink'; exp...
jayce-incognito/leapxpert-test-fe
src/components/Core/Tabs/index.ts
<filename>src/components/Core/Tabs/index.ts export { default } from './Tabs'; export { default as Tab } from './Tabs.tab'; export * from './Tabs.interface'; export * from './Tabs.constant';
jayce-incognito/leapxpert-test-fe
src/components/Icons/Scan.tsx
import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` width: 17px; height: 17px; `; const ScanVector = React.memo((props: any) => { return ( <svg width={17} height={17}> <path d="M15.703 5.86c.508 0 .781-.2...
jayce-incognito/leapxpert-test-fe
src/components/Core/TextArea/TextArea.tsx
import React, { ChangeEvent, TextareaHTMLAttributes } from 'react'; import styled from 'styled-components'; import { COLORS } from 'src/styles'; interface IProps extends TextareaHTMLAttributes<HTMLTextAreaElement> { onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void; label?: string; borderless?: bool...
jayce-incognito/leapxpert-test-fe
src/hooks/useValidator.tsx
<reponame>jayce-incognito/leapxpert-test-fe import React from 'react'; interface IProps { validator: any[]; } const useValidator = (props: IProps) => { const { validator } = props; const [validate, setValidate] = React.useState<Array<any>>([]); React.useEffect(() => { setValidate([...validator...
jayce-incognito/leapxpert-test-fe
src/components/Icons/Loading.tsx
import React from 'react'; import { IGlobalStyle } from 'src/styles'; import styled from 'styled-components'; export interface ILoadingIconProps { width?: string; height?: string; center?: boolean; } const Styled: any = styled.div` position: relative; width: ${(props: ILoadingIconProps) => props.w...
jayce-incognito/leapxpert-test-fe
src/components/Icons/Refresh.tsx
<reponame>jayce-incognito/leapxpert-test-fe import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` width: 19px; height: 23px; `; const RefreshVector = React.memo((props: any) => { return ( <svg width={18} height={22}> <path...
jayce-incognito/leapxpert-test-fe
src/components/Icons/Info.tsx
import React from 'react'; import styled from 'styled-components'; import { COLORS } from 'src/styles'; interface IProps { isGreyIcon?: boolean; } const Styled = styled.button<{ isGreyIcon?: boolean }>` width: 16px; height: 16px; svg { path { fill: ${(props) => props?.isGreyIcon &&...
jayce-incognito/leapxpert-test-fe
src/components/Core/Tabs/Tabs.tsx
import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { themeSelector } from 'src/module/Setting'; import styled from 'styled-components'; import { actionChangeTab } from './Tabs.actions'; import { IPropsTabs } from './Tabs.interface'; import { activeTabSelector } from './Tabs.select...
jayce-incognito/leapxpert-test-fe
src/configs/configsEnvs.ts
import isEmpty from 'lodash/isEmpty'; interface IENVS { REACT_APP_MODE: string; REACT_APP_IS_DEV: boolean; REACT_APP_DOMAIN_URL: string; REACT_APP_TOGGLE_REDUX_LOGGER: string; } const defaultEnvs = { REACT_APP_MODE: 'development', REACT_APP_IS_DEV: 'true', REACT_APP_DOMAIN_URL: 'http://loc...
jayce-incognito/leapxpert-test-fe
src/components/Core/Tabs/Tabs.actions.ts
import { ACTION_CHANGE_TAB } from './Tabs.constant'; export const actionChangeTab = (payload: number | string) => ({ type: ACTION_CHANGE_TAB, payload, });
jayce-incognito/leapxpert-test-fe
src/components/Icons/Warning.tsx
import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` min-width: 18px; height: 18px; `; const WarningVector = React.memo((props: any) => { return ( <svg width="1em" height="1em" viewBox="0 0 16 15" {...props}> <path ...
jayce-incognito/leapxpert-test-fe
src/components/Core/Tabs/Tabs.tab.tsx
<reponame>jayce-incognito/leapxpert-test-fe import React, { HTMLAttributes } from 'react'; import { Button } from 'src/components/Core'; import { IPropsTab } from './Tabs.interface'; const Tab = (props: IPropsTab & HTMLAttributes<HTMLDivElement>) => { const { activeTab, label, onClickTab, tabID } = props; cons...
jayce-incognito/leapxpert-test-fe
src/components/Icons/ArrowUp.tsx
import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` width: 18px; height: 10px; `; const ArrowUpVector = React.memo((props: any) => { return ( <svg width={16} height={10}> <path d="M14.708 8.6c.457 0 .8-.3...
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/Tooltip.constant.ts
<reponame>jayce-incognito/leapxpert-test-fe export const ACTION_SHOW_TOOLTIP = '[tooltip] show tooltip'; export const ACTION_REMOVE_TOOLTIP = '[tooltip] remove tooltip';
jayce-incognito/leapxpert-test-fe
src/services/api.ts
<gh_stars>0 export const api = () => null;
jayce-incognito/leapxpert-test-fe
src/components/Core/TyniButton/index.tsx
import React from 'react'; import { useSelector } from 'react-redux'; import { themeSelector } from 'src/module/Setting'; import { COLORS, IGlobalStyle } from 'src/styles'; import styled from 'styled-components'; interface IProps { title: string; selected?: boolean; } const Styled = styled.button` backgrou...
jayce-incognito/leapxpert-test-fe
src/module/Todo/Todo.reducer.ts
import { ITodo } from './Todo.interface'; import { TODO_STATUS, ACTION_ADD_TODO, ACTION_REMOVE_TODO, ACTION_CHANGE_STATUS, ACTION_TOGGLE_ALL_TODO, TODO_MODE, ACTION_CHANGE_MODE, } from './Todo.constant'; export interface ITodoReducer { list: ITodo[]; mode: number; } const initialSt...
jayce-incognito/leapxpert-test-fe
src/module/Todo/Todo.tsx
/* eslint-disable jsx-a11y/no-autofocus */ import React from 'react'; import { v4 } from 'uuid'; import isEmpty from 'lodash/isEmpty'; import trim from 'lodash/trim'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { Input } from 'src/components/Core'; import { HeaderApp } from...
jayce-incognito/leapxpert-test-fe
src/module/Todo/Todo.styled.ts
<gh_stars>0 import styled from 'styled-components'; export const Styled = styled.div``;
jayce-incognito/leapxpert-test-fe
src/components/Core/Checkbox/Checkbox.tsx
<reponame>jayce-incognito/leapxpert-test-fe<filename>src/components/Core/Checkbox/Checkbox.tsx import React from 'react'; import styled from 'styled-components'; import PropTypes from 'prop-types'; import { IGlobalStyle } from 'src/styles'; interface IProps { onHandleChecked: () => any; label: string; chec...
jayce-incognito/leapxpert-test-fe
src/components/Icons/OpenLink.tsx
import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` width: 14px; height: 15px; `; const OpenLinkVector = React.memo((props: any) => { return ( <svg width={14} height={15}> <path d="M1.059 13.158a.74.74 0 ...
jayce-incognito/leapxpert-test-fe
src/module/Tooltip/Tooltip.tsx
<reponame>jayce-incognito/leapxpert-test-fe import React from 'react'; import styled from 'styled-components'; import isEmpty from 'lodash/isEmpty'; import { useSelector } from 'react-redux'; import { themeSelector } from 'src/module/Setting'; import { IGlobalStyle } from 'src/styles'; import enhance from './Tooltip.en...
jayce-incognito/leapxpert-test-fe
src/services/cache.ts
export const caches: any = {}; export const cache = (key: string, data: any, expiredTime: number) => { caches[key] = { data, expiredTime: new Date().getTime() + expiredTime, }; }; export function getCache(key: string) { const cacheData = caches[key]; if (cacheData && cacheData.expiredT...
jayce-incognito/leapxpert-test-fe
src/components/Icons/TrashBin.tsx
import React from 'react'; import styled from 'styled-components'; interface IProps {} const Styled = styled.button` min-width: 20px; height: 20px; `; const TrashVector = React.memo((props: any) => { return ( <svg width="1em" height="1em" viewBox="0 0 18 20" {...props}> <path ...