This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import ReactDOM from "react-dom"; | |
import "./styles.css"; | |
import { useVirtual } from "../../../"; | |
function RowVirtualizerDynamic({ rows }) { | |
const parentRef = React.useRef(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useReducer, useRef, useCallback, useLayoutEffect } from 'react' | |
import _ from 'lodash' | |
import ResizeObserver from 'resize-observer-polyfill' | |
import { assertNever } from 'lib/misc/Assert' | |
type DOMRectKeys = keyof DOMRectReadOnly | |
interface State<T extends DOMRectKeys> { | |
keys: T[] | |
value: Pick<DOMRectReadOnly, T> | undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Used by Flavor to mark a type in a readable way. */ | |
export interface Flavoring<FlavorT> { | |
_type?: FlavorT; | |
} | |
/** Create a "flavored" version of a type. TypeScript will disallow mixing flavors, but will allow unflavored values of that type to be passed in where a flavored version is expected. This is a less restrictive form of branding. */ | |
export type Flavor<T, FlavorT> = T & Flavoring<FlavorT>; | |
/** Used by Brand to mark a type in a readable way. */ | |
export interface Branding<BrandT> { | |
_type: BrandT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# coding=utf-8 | |
# "DATASHEET": http://cl.ly/ekot | |
from __future__ import print_function | |
import serial, struct, sys, time | |
DEBUG = 1 | |
CMD_MODE = 2 | |
CMD_QUERY_DATA = 4 | |
CMD_DEVICE_ID = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# coding=utf-8 | |
# "DATASHEET": http://cl.ly/ekot | |
from __future__ import print_function | |
import serial, struct, sys, time | |
DEBUG = 1 | |
CMD_MODE = 2 | |
CMD_QUERY_DATA = 4 | |
CMD_DEVICE_ID = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {React} from 'lib/vendor/react'; | |
import _ from 'lib/vendor/lodash'; | |
import {withContentRect} from 'lib/vendor/react-measure/Measure'; | |
import {pure, compose} from 'lib/vendor/recompose'; | |
type ComponentType<P = {}> = React.ComponentClass<P> | React.StatelessComponent<P>; | |
export type Breakpoint = | |
| 'small' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { Component } from 'react'; | |
export default function HOCBaseRender<Props, State, ComponentState>( | |
Comp: new() => Component<Props & State, ComponentState>) { | |
return class HOCBase extends Component<Props, State> { | |
render() { | |
return <Comp {...this.props} {...this.state}/>; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import TimePicker from 'rc-time-picker'; | |
import _ from 'lodash'; | |
import 'rc-time-picker/assets/index.css'; | |
import './CustomTime.scss'; | |
function maybe(fn, value) { | |
if (_.isFunction(fn)) { | |
fn(value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {React} from 'lib/vendor/react'; | |
import _ from 'lib/vendor/lodash'; | |
import Tooltip from 'lib/ui/Tooltip/Tooltip'; | |
import hashCode from 'lib/algorithms/hashCode'; | |
const EmptyString = ''; | |
const WhiteSpace = ' '; | |
const Dots = '...'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import path from 'path'; | |
import webpack from 'webpack'; | |
import autoprefixer from 'autoprefixer'; | |
import CleanWebpackPlugin from 'clean-webpack-plugin'; | |
import CopyWebpackPlugin from 'copy-webpack-plugin'; | |
import ExtractTextPlugin from 'extract-text-webpack-plugin'; | |
import devPlugins from './devPlugins'; | |
import prodPlugins from './prodPlugins'; | |
const basePlugins = (isDev, projectRootDir, outPath, srcPath) => [ |
NewerOlder