path
stringlengths 5
195
| repo_name
stringlengths 5
79
| content
stringlengths 25
1.01M
|
---|---|---|
docs/app/Examples/modules/Accordion/Variations/AccordionExampleExclusive.js | aabustamante/Semantic-UI-React | import _ from 'lodash'
import faker from 'faker'
import React from 'react'
import { Accordion } from 'semantic-ui-react'
const panels = _.times(3, () => ({
title: faker.lorem.sentence(),
content: faker.lorem.paragraphs(),
}))
const AccordionExampleExclusive = () => (
<Accordion panels={panels} exclusive={false} fluid />
)
export default AccordionExampleExclusive
|
node_modules/react-bootstrap/es/CarouselCaption.js | C0deSamurai/muzjiks | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import classNames from 'classnames';
import React from 'react';
import elementType from 'react-prop-types/lib/elementType';
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
var propTypes = {
componentClass: elementType
};
var defaultProps = {
componentClass: 'div'
};
var CarouselCaption = function (_React$Component) {
_inherits(CarouselCaption, _React$Component);
function CarouselCaption() {
_classCallCheck(this, CarouselCaption);
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
CarouselCaption.prototype.render = function render() {
var _props = this.props,
Component = _props.componentClass,
className = _props.className,
props = _objectWithoutProperties(_props, ['componentClass', 'className']);
var _splitBsProps = splitBsProps(props),
bsProps = _splitBsProps[0],
elementProps = _splitBsProps[1];
var classes = getClassSet(bsProps);
return React.createElement(Component, _extends({}, elementProps, {
className: classNames(className, classes)
}));
};
return CarouselCaption;
}(React.Component);
CarouselCaption.propTypes = propTypes;
CarouselCaption.defaultProps = defaultProps;
export default bsClass('carousel-caption', CarouselCaption); |
docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupBasicColored.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleGroupBasicColored = () => (
<Button.Group>
<Button basic color='red'>One</Button>
<Button basic color='green'>Two</Button>
<Button basic color='blue'>Three</Button>
</Button.Group>
)
export default ButtonExampleGroupBasicColored
|
src/pages/reading/book.js | joefraley/ratticusscript | 'use strict'
import React from 'react'
import { createMarkup } from '../../utilities'
// Get a string of x many stars.
export const numberToStars = number => Array.from('🌟'.repeat(number)).join('')
/**
* For more on the <details> and <summary> elements,
* see: http://www.w3schools.com/tags/tag_summary.asp
*
* For more on the <time> element,
* see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time
*/
export const Book = ({ props }) => {
const title = props.title.split(': ')[0]
const subtitle = props.title.split(': ')[1]
return <div>
<h2>{ title }</h2>
{ subtitle ? <h3>{ subtitle }</h3> : null }
<h4>{ props.author }</h4>
{
<details>
<summary>Review</summary>
<p>
<span>Started: <time>{ props.started || '--' }</time></span>
<span> | Finished: <time>{ props.finished || '--' }</time></span>
</p>
<p className="rating">Rating: { numberToStars(parseInt(props.rating)) || '--' }</p>
<p dangerouslySetInnerHTML={ createMarkup(props.review || '') }></p>
</details>
}
</div>
}
|
src/svg-icons/device/sd-storage.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSdStorage = (props) => (
<SvgIcon {...props}>
<path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"/>
</SvgIcon>
);
DeviceSdStorage = pure(DeviceSdStorage);
DeviceSdStorage.displayName = 'DeviceSdStorage';
DeviceSdStorage.muiName = 'SvgIcon';
export default DeviceSdStorage;
|
dev/web/www/js/components/common/component/render-fields.js | zajacmarekcom/letswrite | import React from 'react'
import {FormGroup, ControlLabel, FormControl, Checkbox, HelpBlock} from 'react-bootstrap'
const FormInput = ({input, label, type, meta: {touched, error}}) => (
<FormGroup validationState={error ? "error" : null}>
<ControlLabel>{label}</ControlLabel>
<FormControl type={type} {...input} placeholder={label} />
{touched && error && <HelpBlock>{error}</HelpBlock>}
</FormGroup>
)
const FormTextarea = ({input, label, meta: {touched, error}}) => (
<FormGroup validationState={error ? "error" : null}>
<ControlLabel>{label}</ControlLabel>
<FormControl {...input} componentClass="textarea" placeholder={label} />
{touched && error && <HelpBlock>{error}</HelpBlock>}
</FormGroup>
)
const FormCheckbox = ({input, label, type, meta: {touched, error}}) => (
<div>
<ControlLabel>{label}</ControlLabel>
<Checkbox {...input} placeholder={label} />
{touched && error && <HelpBlock>{error}</HelpBlock>}
</div>
)
export {FormInput, FormTextarea, FormCheckbox} |
src/components/styledHeader.js | davosolo/davosolo.github.io | import React from 'react'
import Link from 'gatsby-link'
import styled from 'styled-components'
import hamburger from './../themes/noun_hamburger.svg'
const HeaderContainer = styled.nav`
/** Flexbox container */
display: flex;
flex-direction: row;
justify-content: space-between;
/** Mobile first */
width: 100%;
height: 3rem;
padding: 0.30rem 0.5rem;
top: 0px;
/** Desktop */
@media only screen and (min-width: 768px) {
width: 100%;
padding: 0.40rem 1.0875rem;
top: 0px;
}
border-bottom: 1px dotted ${props => props.theme.dark};
background: ${props => props.theme.light};
opacity: 0.5;
position: sticky;
`
const Menu = styled.ul`
list-style: none;
margin-top: 0.5rem;
`
const MenuItem = styled.li`
display: inline-block;
margin-right: 0.5rem;
font-family: ${props => props.theme.font};
@media only screen and (min-width: 768px) {
margin-right: 1rem;
font-size: 1.2rem;
}
`
const Title = styled.h1`
margin: 0;
display: inline;
font-family: ${props => props.theme.font};
letter-spacing: -4px;
`
const Logo = styled.a`
color: ${props => props.theme.dark};
font-family: ${props => props.theme.font};
text-decoration: none;
`
const StyledHeaderLink = styled.a`
color: ${props => props.theme.dark};
display: inline-block;
margin-right: 0.5rem;
font-family: ${props => props.theme.font};
text-decoration: none;
@media only screen and (min-width: 768px) {
margin-right: 1rem;
font-size: 1.2rem;
}
`
const Burger = styled.img`
display: flex;
src: url(${props => hamburger});
width: 16px;
height: 16px:
`
export { HeaderContainer, Menu, MenuItem, Title, Logo, Burger, StyledHeaderLink } |
react/features/participants-pane/components/web/ParticipantActionEllipsis.js | jitsi/jitsi-meet | // @flow
import { makeStyles } from '@material-ui/styles';
import React from 'react';
import { QuickActionButton } from '../../../base/components';
import { Icon, IconHorizontalPoints } from '../../../base/icons';
type Props = {
/**
* Label used for accessibility.
*/
accessibilityLabel: string,
/**
* Click handler function.
*/
onClick: Function
}
const useStyles = makeStyles(() => {
return {
button: {
padding: '6px'
}
};
});
const ParticipantActionEllipsis = ({ accessibilityLabel, onClick }: Props) => {
const styles = useStyles();
return (
<QuickActionButton
accessibilityLabel = { accessibilityLabel }
className = { styles.button }
onClick = { onClick }>
<Icon src = { IconHorizontalPoints } />
</QuickActionButton>
);
};
export default ParticipantActionEllipsis;
|
examples/listen/App.js | sskyy/redux-task | 'use strict'
import React from 'react'
import {Message,Input, Indicator} from './components'
const App = React.createClass({
render(){
return <div>
<Input />
<Message />
<Indicator />
</div>
}
})
export default App
|
src/svg-icons/image/timer-off.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTimerOff = (props) => (
<SvgIcon {...props}>
<path d="M19.04 4.55l-1.42 1.42C16.07 4.74 14.12 4 12 4c-1.83 0-3.53.55-4.95 1.48l1.46 1.46C9.53 6.35 10.73 6 12 6c3.87 0 7 3.13 7 7 0 1.27-.35 2.47-.94 3.49l1.45 1.45C20.45 16.53 21 14.83 21 13c0-2.12-.74-4.07-1.97-5.61l1.42-1.42-1.41-1.42zM15 1H9v2h6V1zm-4 8.44l2 2V8h-2v1.44zM3.02 4L1.75 5.27 4.5 8.03C3.55 9.45 3 11.16 3 13c0 4.97 4.02 9 9 9 1.84 0 3.55-.55 4.98-1.5l2.5 2.5 1.27-1.27-7.71-7.71L3.02 4zM12 20c-3.87 0-7-3.13-7-7 0-1.28.35-2.48.95-3.52l9.56 9.56c-1.03.61-2.23.96-3.51.96z"/>
</SvgIcon>
);
ImageTimerOff = pure(ImageTimerOff);
ImageTimerOff.displayName = 'ImageTimerOff';
ImageTimerOff.muiName = 'SvgIcon';
export default ImageTimerOff;
|
client/modules/App/__tests__/Components/Header.spec.js | caleb272/PollIt | import React from 'react';
import test from 'ava';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import { FormattedMessage } from 'react-intl';
import { Header } from '../../components/Header/Header';
import { intl } from '../../../../util/react-intl-test-helper';
const intlProp = { ...intl, enabledLanguages: ['en', 'fr'] };
test('renders the header properly', t => {
const router = {
isActive: sinon.stub().returns(true),
};
const wrapper = shallow(
<Header switchLanguage={() => {}} intl={intlProp} toggleAddPost={() => {}} />,
{
context: {
router,
intl,
},
}
);
t.truthy(wrapper.find('Link').first().containsMatchingElement(<FormattedMessage id="siteTitle" />));
t.is(wrapper.find('a').length, 1);
});
test('doesn\'t add post in pages other than home', t => {
const router = {
isActive: sinon.stub().returns(false),
};
const wrapper = shallow(
<Header switchLanguage={() => {}} intl={intlProp} toggleAddPost={() => {}} />,
{
context: {
router,
intl,
},
}
);
t.is(wrapper.find('a').length, 0);
});
test('toggleAddPost called properly', t => {
const router = {
isActive: sinon.stub().returns(true),
};
const toggleAddPost = sinon.spy();
const wrapper = shallow(
<Header switchLanguage={() => {}} intl={intlProp} toggleAddPost={toggleAddPost} />,
{
context: {
router,
intl,
},
}
);
wrapper.find('a').first().simulate('click');
t.truthy(toggleAddPost.calledOnce);
});
|
data/event.js | uclaacm/website | /* eslint-disable jsx-a11y/accessible-emoji */
/* eslint-disable max-len */
import React from 'react';
const events = [{
id: 1,
title: 'CS Welcome Day',
allDay: false,
start: new Date(2021, 8, 21, 16),
end: new Date(2021, 8, 21, 17, 30),
location: 'Engineering IV Patio',
description: 'Come out to CS Welcome Day next Tuesday (9/21) from 4:00pm-5:30pm PT at the Engineering IV Patio where you’ll learn tips and tricks to navigate CS at UCLA from a panel of current CS students! You’ll be able to ask any burning questions at a live Q&A and will also be able to meet and interact with other CS students, student leaders, and even faculty! We welcome any student interested in computer science to attend, regardless of year, background, and major! Visit our webpage to learn more about our panelists and the event.',
links: [{
text: 'Event Website',
href: 'https://www.cs.ucla.edu/cs-welcome-day/',
ext: true,
}],
},
{
id: 2,
title: 'ACM Fall GM',
allDay: false,
start: new Date(2021, 8, 27, 18),
end: new Date(2021, 8, 27, 19, 30),
location: 'Court of Sciences',
description: <>
<p>
ACM at UCLA is happy to present our Fall General Meeting on Monday, September 27th at 6 PM PT at the Court of Sciences! 🔥
</p>
<p>
ACM is the largest Computer Science student organization on campus and comprises of eight different committees: AI, Cyber, Design, Hack, ICPC, Studio, Teach LA, and ACM-W. 👩💻👨💻 With each committee focusing on a unique topic in technology, we are sure you will discover your passion and grow your skills through our numerous workshops, projects, and initiatives held each quarter.
</p>
</>,
image: '/images/events/f21-fall-gm.png',
alt: 'a banner that says "ACM at UCLA: Fall GM, Monday, September 27th from 6-8 PM in the Court of Sciences". Features graphical elements representing each of ACM\'s committees: ACM Hack, ACM W, ACM AI, ACM ICPC, ACM Cyber, ACM Studio, ACM Teach LA, and ACM Design.',
links: [{
text: 'Event Website',
href: '/gm/f21',
ext: false,
}],
},
{
id: 8,
title: 'Ludum Dare 49 Kickoff',
allDay: false,
start: 1633122000000,
end: 1633147200000,
location: 'ENG VI 289',
committee: 'studio',
description: 'Ludum Dare is a game jam that happens roughly every 6 months. During each 48 to 72 hour long event, groups (and ambitious individuals) including programmers, artists, and musicians collaborate to create a video game fitting the theme. For team formation, we are mixing people based on skill level and skill set so that everyone has the opportunity to create awesome games! You can fill out the team registration form to be placed on a team. Of course, you are also welcome to form your own team or work solo.',
links: [{
text: 'Facebook Event',
href: 'https://www.instagram.com/p/CUMMOt4LCuf/?utm_source=ig_web_copy_link',
ext: true,
},{
text: 'Team Registration Form',
href: 'https://forms.gle/hPqmdadSaC5siDfi7',
ext: true,
}],
},
{
id: 9,
title: 'Negotiation Workshop',
allDay: false,
start: 1633050000000,
end: 1633055400000,
location: 'TBD',
committee: 'w',
description: 'The link between negotiations and job offers, career success, and gender equity is obvious. Less obvious is what constitutes negotiation and how to do it well.\n\nJoin UCLA ACM-W for an exciting opportunity to learn negotiation skills and strategies from expert, Megan Karsh, on Sept 30 from 6-7:30pm. Megan will host a fun and interactive workshop about the importance of negotiation skills to career success, fundamental negotiation skills, and whether & how to negotiate job offers.',
links: [],
},
{
id: 10,
title: 'ACM Hack Fall General Meeting',
allDay: false,
start: 1632967200000,
end: 1632970800000,
location: 'Perloff 1102',
committee: 'hack',
description: "Does building projects and exploring software development sound exciting to you? Do you want to learn how to make the next Instagram or Facebook?\nCome out to ACM Hack’s Fall GM next Wednesday to meet our wonderful team and learn more about what we do, what events we'll be putting on this upcoming quarter, and how you can get involved!",
links: [{
text: 'Facebook Event',
href: 'https://www.facebook.com/events/388070826205600',
ext: true,
}],
},
{
id: 11,
title: 'ACM Design Fall General Meeting',
allDay: false,
start: 1633046400000,
end: 1633050000000,
location: '2763 Boelter Hall',
committee: 'design',
description: 'Interested in UX/UI design, product design, graphic design, 3D design and more? Or maybe you are into the creative side of web development? Here at ACM Design, we strive to bridge the gap between design and computer science. If any of this sounds exciting, stop by ACM Design’s general meeting where we will introduce you to a talented team of innovators and tell you about the work that we do! Students of all majors and experience levels are welcome.',
links: [{
text: 'Facebook Event',
href: 'https://www.facebook.com/events/640773946888497',
ext: true,
}],
},
{
id: 13,
title: 'ACM Teach LA Fall General Meeting',
allDay: false,
start: 1632880800000,
end: 1632884400000,
location: 'Rolfe Hall - Room 1200',
committee: 'teach-la',
description: "Interested in empowering students in the LA area with computer science (and joining one of the coolest clubs on campus)? You've come to the right place!\n\nTo learn more about getting involved with teaching and curriculum or becoming part of our dev team (absolutely NO EXPERIENCE REQUIRED), come on down to the Teach LA Fall General Meeting! (Snacks will be provided...)",
links: [{
text: 'Facebook Event',
href: 'https://fb.me/e/e6XsAmyBP',
ext: true,
}],
},
{
id: 14,
title: 'ACM AI Fall General Meeting',
allDay: false,
start: 1633136400000,
end: 1633140000000,
location: 'Kinsey Pavilion 1240B',
committee: 'ai',
description: "Interested in Artificial Intelligence or Machine Learning? Come out to ACM AI's General Meeting to learn about our events and initiatives! ACM AI welcomes UCLA students of all backgrounds, majors, and years. No application or prior experience in AI is required to attend our events.",
links: [{
text: 'Facebook Event',
href: 'https://fb.me/e/1qZLwT2vV',
ext: true,
}],
},
{
id: 15,
title: 'ACM Cyber Fall General Meeting',
allDay: false,
start: 1633395600000,
end: 1633402800000,
location: 'Franz Hall 2258A',
committee: 'cyber',
description: "Thinking of building an aimbot to get you out of bronze? 🙈\nInterested in learning about how hackers get their hands on private [UC] 👀 information?\nThen ACM Cyber is just for you!! 😍\n\nCome out to Cyber's Fall General Meeting on Monday, October 4th, at Franz Hall 2258A to learn more about what we do, meet our officers, make friends, and participate in a fun ✨Disney-themed✨ cyber activity! No prior experience necessary! *note* bring your ID card + a mask + your laptop to solve some cool challenges 👀! ~See you there~",
links: [{
text: 'Facebook Event',
href: 'https://fb.me/e/RvlzR1Ns',
ext: true,
}, {
text: 'RSVP Form',
href: 'https://docs.google.com/forms/d/e/1FAIpQLSf-IeHo_-cxk97Jp_Jb7-cyOm5v2Ih3h05Yi1UrLxizV1G0Fg/viewform',
ext: true,
}],
},
{
id: 16,
title: 'ACM ICPC Fall General Meeting ',
allDay: false,
start: 1633053600000,
end: 1633057200000,
location: 'Boelter Hall Room 4760',
committee: 'icpc',
description: "Do you love the feeling of solving quantitative problems in creative ways? New to algorithms and excited to learn more? Trying to level up your tech interview skills? Do you just like hummingbirds or Marvel movies? Our Fall General Meeting will outline our committee's activities for the quarter, as well as provide a chance for students to meet our officers. In addition, we will run a fun brainteaser to introduce attendees to the kind of problem-solving we enjoy!",
links: [{
text: 'Facebook Event',
href: 'https://www.facebook.com/groups/ucla.icpc/permalink/4123554867773867/',
ext: true,
}],
},
{
id: 17,
title: 'ACM ICPC Team Kickoff',
allDay: false,
start: 1633201200000,
end: 1633212000000,
location: 'Engineering VI 289',
committee: 'icpc',
description: 'do you enjoy coding 💻 and solving challenging problems 😎? do you want to become an ABSOLUTE UNIT (™) at✨ competitive programming? 🥵💦 if so, UCLA ICPC is the right place for you! 🍻🥂🍷🥃🍾 make the alpha move 🤑🤪 (jk) and come to ICPC Team Kickoff on Saturday, October 2, from 12-3PM in Engineering VI 289! or else ⛓😩😤😡 (no prior experience necessary! 🤠)',
links: [{
text: 'Facebook Event',
href: 'https://fb.me/e/1J0GaCQZ2',
ext: true,
}],
},
{
id: 18,
title: 'ACM W Fall General Meeting',
allDay: false,
start: 1632963600000,
end: 1632967200000,
location: 'Engineering VI 134',
committee: 'w',
description: "Welcome back everyone! We're so excited to be back on campus and hope you're all ready for another amazing year with ACM-W✨ Come join us for our Fall General Meeting on September 29 to learn more about what ACM-W has planned for the year and to meet the officers. We're all looking forward to meeting you 💚",
links: [{
text: 'Facebook Event',
href: 'https://fb.me/e/3JAwOkrvR',
ext: true,
}],
},
// WEEK 2
{id: 101,title: 'Meet the Company: Human Capital',allDay: false,start: 1633395600000,end: 1633399200000,location: 'https://ucla.zoom.us/j/91835413451',committee: 'board',description: 'We’re bringing back the Meet the Company series! 💙\n\nWelcome to our first event featuring Human Capital, an engineering talent agency for founders and engineers. As a company, they bridge the gap between promising engineers in need of career mentorship and start up companies with fewer recruitment resources. Human Capital believes that great engineers build great companies, and as a result, those companies can then become training grounds for a new generation of entrepreneurial engineers.\n\nCome hear about their unique mission, career coaching process, and investing strategies on October 4, 2021 from 6 to 7 PM PDT, and make sure to RSVP with our form 🤩',links: [{text: 'Facebook Event',href: 'https://fb.me/e/2sJQj107Y',ext: true},{text: 'RSVP Form', href: 'https://forms.gle/AraRS4uFqkjVyv437', ext: true}]},{id: 102,title: 'Breaking into Tech as a Non-CS Major | Michelle from ACM W',allDay: false,start: 1633564800000,end: 1633568400000,location: '2763 Boelter Hall',committee: 'board',description: 'Interested in tech but not a CS major? Welcome to our first event of ACM’s Breaking into Tech as a Non-CS Major series for the 2021 - 2022 school year where we highlight current members of ACM navigating the tech world without a formal technical background.\n\nThis week we have Michelle Kim from ACM W to talk about her story as an English major in a CS dominated space.',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/601350427714979/?ref=newsfeed',ext: true}]},{id: 105,title: 'Studio Fall GM',allDay: false,start: 1633572000000,end: 1633579200000,location: 'Eng VI - 134',committee: 'studio',description: "We'll be having our Studio Fall GM October 6, 7:00 - 9:00 PM in Eng VI 134. This is a great opportunity to meet our officers and socialize with others interested in game development, learn specifics about our timeline, and how to get involved. Please RSVP if you plan on attending since we do have limited room capacity--hope to see you there!",links: [{text: 'Instagram Post',href: 'https://www.instagram.com/p/CUaeVluvnkq/',ext: true}, {text: 'RSVP Form', href: 'https://docs.google.com/forms/d/e/1FAIpQLSfo5e0_IiDXoA8Em74lkrr-X-O8ud6Mk8JmnF7Yc-e6uNtFSg/viewform?usp=sf_link', ext: true}]},{id: 106,title: 'ACM Design | UXLA #1: Intro to UI/UX',allDay: false,start: 1633651200000,end: 1633654800000,location: 'Boelter Hall Room 2763',committee: 'design',description: '🎉 HELLO, DESIGN FRIENDS! Thank you for a packed ACM Design GM, and without further ado, welcome to our FIRST 🍾 design workshop in person - our first UXLA series workshop, 🔶 Intro to UI/UX 🔶 at Boelter 2763 from 5-6PM. Remember to bring your Bruincard 💳 and mask 😷!\n\nEver thought about how well (or badly) things we use every day are designed for us? Curious about the world of user experience but not sure where to start? Wanna start recruiting ASAP? Don’t worry 💪 we got you! In this workshop, we’ll be going over your 🎁 starter pack for being a UXer - what a good user experience means, the kinds of roles that exist and what they do, and the design thinking approach at the 💗 heart of everything we do. Let’s GO!!! 🔥🔥',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1cOoyG4sa',ext: true}]},{id: 107,title: 'ACM Hack | Hackschool #1: Intro to HTML/CSS',allDay: false,start: 1633572000000,end: 1633579200000,location: 'Perloff 1102',committee: 'hack',description: 'If you want to learn web dev and get the tools to build your own personal project, hop on board our 💜 beginner friendly 💜 workshop series! At our first Hackschool workshop this Wednesday, we’ll be going over the fundamentals of HTML and CSS! 🎉 We’ll teach you everything you need to know, so no prior experience is required :) Everyone is welcome to come but make sure you RSVP and bring your bruin card! The workshop will be held on Wednesday October 6th 7-9 PM in Perloff 1102. We hope to see you there! ',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1vzEKgyVM',ext: true}]},{id: 108,title: 'ACM ICPC | SoCal Regionals Tryout #1',allDay: false,start: 1633806000000,end: 1633816800000,location: 'Eng VI - 289',committee: 'icpc',description: '',links: []},{id: 109,title: 'ACM ICPC | Beginner Track',allDay: false,start: 1633568400000,end: 1633575600000,location: 'Kerckhoff State Room',committee: 'icpc',description: 'Quick!! 🙊 How do you find the shortest path from your dorm to the lecture hall? Not sure? Come to ACM ICPC at UCLA’s Beginner Track this Wednesday @ 6 to learn that and much, much more!!!\n\nIn Beginner’s Track, our popular introduction to the world of competitive programming, we’ll be exploring beginner friendly topics and algorithms in competitive programming 🌱 We will walk you through everything you need to know to go from earthbound n00b to galaxy brained red coder Chad, guaranteed 😳🧠 absolutely no experience required!!!\n\nJoin us this Wednesday from 6-8 in the Kerchoff State Room for a warm welcome to competitive programming and to solve some fun ad-hoc problems! :)',links: []},
// RECUR
{id: 20,title: 'ACM Teach LA Curriculum Meetings',allDay: false,start: 1633485600000,end: 1633489200000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 21,title: 'ACM Teach LA Curriculum Meetings',allDay: false,start: 1634090400000,end: 1634094000000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 22,title: 'ACM Teach LA Curriculum Meetings',allDay: false,start: 1634695200000,end: 1634698800000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 23,title: 'ACM Teach LA Curriculum Meetings',allDay: false,start: 1635300000000,end: 1635303600000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 24,title: 'ACM Teach LA Curriculum Meetings',allDay: false,start: 1635904800000,end: 1635908400000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 25,title: 'ACM Teach LA Curriculum Meetings',allDay: false,start: 1636513200000,end: 1636516800000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 26,title: 'ACM Teach LA Curriculum Meetings',allDay: false,start: 1637118000000,end: 1637121600000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 27,title: 'ACM Teach LA Curriculum Meetings',allDay: false,start: 1637722800000,end: 1637726400000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},
{id: 20,title: 'ACM Teach LA Dev Team Meetings',allDay: false,start: 1633482000000,end: 1633485600000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 21,title: 'ACM Teach LA Dev Team Meetings',allDay: false,start: 1634086800000,end: 1634090400000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 22,title: 'ACM Teach LA Dev Team Meetings',allDay: false,start: 1634691600000,end: 1634695200000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 23,title: 'ACM Teach LA Dev Team Meetings',allDay: false,start: 1635296400000,end: 1635300000000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 24,title: 'ACM Teach LA Dev Team Meetings',allDay: false,start: 1635901200000,end: 1635904800000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 25,title: 'ACM Teach LA Dev Team Meetings',allDay: false,start: 1636509600000,end: 1636513200000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 26,title: 'ACM Teach LA Dev Team Meetings',allDay: false,start: 1637114400000,end: 1637118000000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},{id: 27,title: 'ACM Teach LA Dev Team Meetings',allDay: false,start: 1637719200000,end: 1637722800000,location: 'Mathematical Sciences Building - Room 5203',committee: 'teach-la',description: '',links: []},
{id: 20,title: 'ACM AI Beginner Track Workshops',allDay: false,start: 1633741200000,end: 1633748400000,location: 'Kinsey Pavilion 1240B',committee: 'ai',description: "Heard a lot about AI in the news lately? Always been curious about exploring machine learning but didn’t know where to start? The Beginner Track has you covered! We'll be starting from the ground-up and exploring the core concepts of ML, including the theory and implementation of fundamental models. The workshops will include both concept-based learning as well as guided a mini-project with useful ML libraries . By the end of the series you will have a firm foundation in the fundamentals of ML and understand some of the common techniques at the heart of AI and data science! No prior experience required!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/388424459452807',ext: true}]},{id: 21,title: 'ACM AI Beginner Track Workshops',allDay: false,start: 1634346000000,end: 1634353200000,location: 'Kinsey Pavilion 1240B',committee: 'ai',description: "Heard a lot about AI in the news lately? Always been curious about exploring machine learning but didn’t know where to start? The Beginner Track has you covered! We'll be starting from the ground-up and exploring the core concepts of ML, including the theory and implementation of fundamental models. The workshops will include both concept-based learning as well as guided a mini-project with useful ML libraries . By the end of the series you will have a firm foundation in the fundamentals of ML and understand some of the common techniques at the heart of AI and data science! No prior experience required!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/388424459452807',ext: true}]},{id: 22,title: 'ACM AI Beginner Track Workshops',allDay: false,start: 1634950800000,end: 1634958000000,location: 'Kinsey Pavilion 1240B',committee: 'ai',description: "Heard a lot about AI in the news lately? Always been curious about exploring machine learning but didn’t know where to start? The Beginner Track has you covered! We'll be starting from the ground-up and exploring the core concepts of ML, including the theory and implementation of fundamental models. The workshops will include both concept-based learning as well as guided a mini-project with useful ML libraries . By the end of the series you will have a firm foundation in the fundamentals of ML and understand some of the common techniques at the heart of AI and data science! No prior experience required!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/388424459452807',ext: true}]},
{id: 20,title: 'ACM AI Advanced Track Workshops',allDay: false,start: 1633482000000,end: 1633489200000,location: 'Engineering VI 289',committee: 'ai',description: 'Want to take the next step in your journey with AI? Look no further than ACM AI’s Advanced Track offering for Fall 2022. This quarter-long workshop covers everything from logistic regression to convolutional neural networks. Working alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/2981152132202759',ext: true}]},{id: 21,title: 'ACM AI Advanced Track Workshops',allDay: false,start: 1634086800000,end: 1634094000000,location: 'Engineering VI 289',committee: 'ai',description: 'Want to take the next step in your journey with AI? Look no further than ACM AI’s Advanced Track offering for Fall 2022. This quarter-long workshop covers everything from logistic regression to convolutional neural networks. Working alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/2981152132202759',ext: true}]},{id: 22,title: 'ACM AI Advanced Track Workshops',allDay: false,start: 1634691600000,end: 1634698800000,location: 'Engineering VI 289',committee: 'ai',description: 'Want to take the next step in your journey with AI? Look no further than ACM AI’s Advanced Track offering for Fall 2022. This quarter-long workshop covers everything from logistic regression to convolutional neural networks. Working alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/2981152132202759',ext: true}]},{id: 23,title: 'ACM AI Advanced Track Workshops',allDay: false,start: 1635296400000,end: 1635303600000,location: 'Engineering VI 289',committee: 'ai',description: 'Want to take the next step in your journey with AI? Look no further than ACM AI’s Advanced Track offering for Fall 2022. This quarter-long workshop covers everything from logistic regression to convolutional neural networks. Working alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/2981152132202759',ext: true}]},{id: 24,title: 'ACM AI Advanced Track Workshops',allDay: false,start: 1635901200000,end: 1635908400000,location: 'Engineering VI 289',committee: 'ai',description: 'Want to take the next step in your journey with AI? Look no further than ACM AI’s Advanced Track offering for Fall 2022. This quarter-long workshop covers everything from logistic regression to convolutional neural networks. Working alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/2981152132202759',ext: true}]},{id: 25,title: 'ACM AI Advanced Track Workshops',allDay: false,start: 1636509600000,end: 1636516800000,location: 'Engineering VI 289',committee: 'ai',description: 'Want to take the next step in your journey with AI? Look no further than ACM AI’s Advanced Track offering for Fall 2022. This quarter-long workshop covers everything from logistic regression to convolutional neural networks. Working alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/2981152132202759',ext: true}]},{id: 26,title: 'ACM AI Advanced Track Workshops',allDay: false,start: 1637114400000,end: 1637121600000,location: 'Engineering VI 289',committee: 'ai',description: 'Want to take the next step in your journey with AI? Look no further than ACM AI’s Advanced Track offering for Fall 2022. This quarter-long workshop covers everything from logistic regression to convolutional neural networks. Working alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/2981152132202759',ext: true}]},{id: 27,title: 'ACM AI Advanced Track Workshops',allDay: false,start: 1637719200000,end: 1637726400000,location: 'Engineering VI 289',committee: 'ai',description: 'Want to take the next step in your journey with AI? Look no further than ACM AI’s Advanced Track offering for Fall 2022. This quarter-long workshop covers everything from logistic regression to convolutional neural networks. Working alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/2981152132202759',ext: true}]},
{id: 20,title: 'ACM Impact: Careers Workshop Series',allDay: false,start: 1633395600000,end: 1633399200000,location: 'https://ucla.zoom.us/j/96653581209',committee: 'board',description: 'Wondering how to harness your tech powers for good? Come out to learn about careers in social impact tech, tech in the nonprofit space, civic tech, environmental tech, and more!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/622886719081419',ext: true}, {text: 'Zoom Link', href: 'https://ucla.zoom.us/j/96653581209', ext: true}]},
// w3
{id: 100,title: 'Computer Science Career Fair',allDay: false,start: 1634140800000,end: 1634162400000,location: 'Highre',committee: 'board',description: 'The UCLA Computer Science Department, in collaboration with ACM and UPE, is hosting the Computer Science Career Fair on Wednesday, October 13th. Come speak about opportunities with our industry affiliates and startups, including Stripe, Northrop Grumman, and Duffl!\n\nThis event will be held virtually on Highre. You will receive your time slot confirmation, overview of event, and link to the event through email by Sunday, October 10th 11:59 PM PT. First come first serve! Spots are limited.\n\nThe sessions for the event are as follows:\n1. 9:00AM -11:00AM PT (open to all with preference for international students in different time zones)\n2. 11:00AM - 1:00PM PT (open to all UPE honors students only)\n3. 1:00PM - 3:00 PM PT (open to all)\n\n\n\nDeadline to register: Saturday, October 9th at 11:59 PM PT.\n\nAllowed Majors: CS, CSE, and CE only',links: [{text: 'Facebook Event',href: 'https://fb.me/e/HKFQM8J6',ext: true}, {text: 'RSVP Form', href: 'https://tinyurl.com/cscareerfair2021', ext: true}]},{id: 101,title: 'Tech in the Park',allDay: false,start: 1634338800000,end: 1634346000000,location: 'Sunset Recreation Center',committee: 'board',description: 'Wanna break from Week 3 😌? Then come hang out with ACM, UPE, and exploretech.la on Friday October 15th for Tech in the Park 🌳! From 4-6 PM at Sunset Rec, we will be hosting our new social event where you can come out and enjoy activities like football 🏈, volleyball 🏐, spikeball, and painting 🎨! Here you will have the chance to wind down from the week while also getting to know members from all three CS organizations🤪!\n\nPlease RSVP if you are interested in socializing and meeting new people at Tech in the Park! 🤩 ',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1WMw8I3NU',ext: true}, {text: 'RSVP Here', href: 'https://forms.gle/QSswbF8TEiC99j8B8', ext: true}]},{id: 102,title: 'Meet the Company: Deloitte',allDay: false,start: 1634000400000,end: 1634005800000,location: 'https://ucla.zoom.us/j/93393420709',committee: 'board',description: "Tune in for Meet the Company: Deloitte, the second event in our affiliate series! 👀\n\nInterested in consulting and technology? Deloitte is a leading consulting firm with offices worldwide. Providing a large range of services across multiple industries, Deloitte presents a wide variety of work for prospective applicants to choose from. With opportunities to experience work in different settings and with different clients, monotony isn't a concern for a Deloitte employee 🥰\nPlease RSVP!\n\nCome hear about how to navigate Deloitte with a technical degree and the personal journeys of some of their employees on October 11, 2021 from 6 to 7:30 PM PDT!",links: [{text: 'Facebook Event',href: 'https://fb.me/e/2yJvYGWzW',ext: true}, {text: 'RSVP', href: 'https://tinyurl.com/ACMMeettheCompany2021', ext: true}]},{id: 103,title: 'Demystifying AI',allDay: false,start: 1634173200000,end: 1634176800000,location: 'Engineering IV Faraday Room 67-124',committee: 'ai',description: 'Interested in Artificial Intelligence, but not sure what it is or where to start? Not to worry, we got you covered! Come out to ACM AI’s Demystifying AI on Wednesday, October 16 from 6-7 PM PDT at Engineering IV Faraday Room 67-124.\n\nGet a high-level introduction on what AI is 🧠, debunk some popular AI myths 🤖, explore AI ethics with interactive Mario Kart 🚗 and Among Us 🚀 themed activities, and more! You’ll be able to meet others just as interested in AI as you and even have the chance to win some prizes 👀\n\nEverybody is welcome no matter your year, major, background, or experience (absolutely none needed)! See you there :) ',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/933027177622129',ext: true}]},{id: 104,title: 'Cyber Academy: Intro to Web Hacking',allDay: false,start: 1634000400000,end: 1634007600000,location: 'Boelter Hall 9436 and on Zoom!',committee: 'cyber',description: 'CCLE is down again? I wonder why? Whether you are an impulsive online shopper, chat on Discord, pay your credit cards, or simply want CCLE to work, these web applications are handling your data. Come to Cyber’s first Fall workshop to learn the basics of web hacking in preparation for our future workshops.',links: [{text: 'Facebook Event',href: 'https://fb.me/e/2Ej3pnrbG',ext: true}, {text: 'Zoom Link', href: 'https://ucla.zoom.us/j/96092075831?pwd=K0U5Q1VJUW1OV2M2U3Nnd291Z1dyUT09', ext: true}]},{id: 105,title: 'UXLA #2: User Research',allDay: false,start: 1634256000000,end: 1634259600000,location: 'Room: Boelter Hall 2760',committee: 'design',description: "Come out for ACM Design's second UI/UX Workshop: User Research 🔎 !\n\nLearn about building a user flow map 🔄, user testing 🧪, user personas 👤, and much more! Don't worry if you have not attended the previous workshop, we still encourage you to come visit! Everyone is welcome 🧡\n\nDue to COVID-19, please wear a MASK and bring your BRUIN CARD to sign in!",links: [{text: 'Facebook Event',href: 'https://fb.me/e/14SI1unYS',ext: true}]},{id: 106,title: 'ACM ICPC | SoCal Regionals Tryout #2',allDay: false,start: 1634497200000,end: 1634508000000,location: 'Eng VI - 289',committee: 'icpc',description: 'Always dreamed of making it to the Olympics of Programming Competitions? 👀 Waiting for the opportunity to represent UCLA at the ICPC World Finals? Look no further, for official tryouts are here! 🎉\n\nOur first tryout took place this Saturday October 9, but we still have a second tryout coming up where we will select 7 more people for the team! Every UCLA student is welcome to participate, regardless of year, major, or prior competitive programming experience 🙂\n\nFor more details about the tryout, as well as results from the last tryout, see the link below.',links: [{text: 'Tryout Information', href: 'https://tinyurl.com/ucla-icpc-tryouts-2021', ext: true}]},{id: 107,title: 'ACM ICPC | Beginner Track',allDay: false,start: 1634173200000,end: 1634180400000,location: 'location TBD / Zoom link will be provided closer to event',committee: 'icpc',description: 'Quick!! 🙊 How do you find the shortest path from your dorm to the lecture hall? Not sure? Come to ACM ICPC at UCLA’s Beginner Track this Wednesday @ 6 to learn that and much, much more!!!\n\nIn Beginner’s Track, our popular introduction to the world of competitive programming, we’ll be exploring beginner friendly topics and algorithms in competitive programming 🌱 We will walk you through everything you need to know to go from earthbound n00b to galaxy brained red coder Chad, guaranteed 😳🧠 absolutely no experience required!!!\n\nJoin us this Wednesday from 6-8 (location TBD!) to learn a few fancy array techniques, and some things about strings! :)',links: []},{id: 108,title: 'CS Transfer Welcome Event',allDay: false,start: 1634601600000,end: 1634605200000,location: 'Boelter 2763 (ACM/UPE Clubhouse)',committee: 'board',description: "We're so excited to welcome our new incoming transfer class this year! ACM and UPE are co-hosting a CS Transfer Welcome Event, targeted towards incoming computer science (and related major) transfers. We'll do a quick lightning round of discussions on internship recruiting, getting involved with student organizations, navigating tricky upper-division CS classes, and just meeting people! After that, we'll have opportunities for you to meet CS transfers who've gone through it all, and members of different CS orgs on campus. And, we'll have some cookies :) ",links: [{text: 'Facebook Event',href: 'https://fb.me/e/1XG6oUruw',ext: true}]},{id: 110,title: 'ACM Hack | Hackschool #2: Intro to JavaScript',allDay: false,start: 1634176800000,end: 1634184000000,location: 'Perloff 1102',committee: 'hack',description: 'Do you want to build dynamic and amazing web projects? Look no further, Hackschool is back with Session 2: Intro to JavaScript 🎉In this workshop, we’ll be teaching you all there is to know about basic JavaScript. Aside from syntax, we will also be going over some programming basics! 🤩Mark your calendars, we’ll see you on Wednesday at 7 PM in Perloff 1102! As always no experience is required, and make sure you RSVP!\n\nIf you missed our first session, you can check out the attached links!✨',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1KOlFRumY',ext: true}, {text: 'Session 1 Slides', href: 'http://links.uclaacm.com/hackschool21-s1-slides', ext: true}, {text: 'Session 1 README', href: 'http://links.uclaacm.com/hackschool21-s1', ext: true}]},
// w4
{id: 100,title: 'ACM-W Undergrad Mentorship Kick-Off',allDay: false,start: 1634691600000,end: 1634695200000,location: 'Engineering VI 289',committee: 'w',description: "Involved in ACM-W's Undergraduate Mentorship Program? Come out for a night of introductions as you can meet your mentors and mingle with fellow mentees! It will be a huge blast making new friends and getting to know other people with similar interests. (P.S. We will be serving free food, so you won't want to miss out!)",links: [{text: 'Facebook Event',href: 'https://fb.me/e/1abxjQlPv',ext: true}]},{id: 101,title: 'ACM Impact: Careers Workshop Series',allDay: false,start: 1634605200000,end: 1634608800000,location: 'Zoom - check Facebook for link',committee: 'board',description: 'Interested in using your tech skills to drive positive change? Come out to ACM Impact’s next careers workshop! We’ve partnered with the awesome team at Nova to talk about how they use tech to develop solutions for nonprofit organizations. This will be a virtual event at 6pm on Monday, 10/18. The Zoom link will be posted on Facebook 30 minutes before the start!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/622886725748085/',ext: true}]},{id: 102,title: 'Meet the Company: Facebook',allDay: false,start: 1634769000000,end: 1634774400000,location: 'https://ucla.zoom.us/j/91498464135',committee: 'board',description: 'The next installment in our series is Meet the Company: Facebook! 💙✨\r\nFacebook almost needs no introduction: one of the largest tech companies in the world with the biggest social platforms, its umbrella also covers Oculus VR, Ciphy, and Instagram.\r\nHeadquartered in Menlo Park, Facebook is no stranger to extensive internship programmes and UCLA students🧚♂️ Come by to learn more about company culture, interviewing tips, and insider experiences on Wednesday, October 20, 2021, from 3:30 to 5 PM PDT!\r\nRSVP to book your spot at our event! Link will be released by email to the people who filled out the form 🤩',links: [{text: 'Facebook Event',href: 'https://fb.me/e/2bKr0MGrE',ext: true}, {text: 'RSVP', href: 'https://forms.gle/2EyEUSWJx2Q8KQAX7', ext: true}]},{id: 103,title: 'ACM Hack | Hackschool #3: Intro to React',allDay: false,start: 1634781600000,end: 1634788800000,location: 'Perloff 1102',committee: 'hack',description: "This week on Hackschool we're getting to a heavily requested topic: React! React is a powerful Javascript framework used for building beautiful user interfaces and it is pervasive in the industry. Companies like Facebook, Amazon, Instagram, and more use React throughout many of their products! Come get a glimpse of why it's so popular in our Intro to React workshop this week! As always the workshop will be held in Perloff 1102 on Wednesday from 7-9 PM and make sure to RSVP 💜",links: [{text: 'RSVP', href: 'http://links.uclaacm.com/hackschool21-s3-rsvp', ext: true}, {text: 'Facebook Event',href: 'https://fb.me/e/18T2DTn4a',ext: true}, {text: 'Session 2 Slides', href: 'http://links.uclaacm.com/hackschool21-s2-slides', ext: true}, {text: 'Session 2 README', href: 'http://links.uclaacm.com/hackschool21-s2', ext: true}]},{id: 104,title: 'ACM Hack | Passion Talks: Blockchain',allDay: false,start: 1634864400000,end: 1634871600000,location: 'Dodd 121',committee: 'hack',description: 'Would you like to blockchainge your life 🤯?\r\nIf so, come to our first installment of Passion Talks™️ where Jason Huan will give us the deets on ⛓blockchain, ฿ cryptocurrency ฿, and much more! Jason is UCLA’s resident expert on all things to do with decentralized finance 🏦🙅♀️🚫. He is a cofounder of Blockchain at UCLA 🎓and has also co-founded the first fractional-algorithmic stablecoin Frax 📈!\r\nThe talk will cover topics from decentralized exchange and P2P lending all the way to the wizardry 🧙♂️that is stablecoins. If these words mean nothing to you, don’t worry – this talk will change that! Everyday, it’s looking more and more like blockchain and decentralized finance are the future, so come on by and find out what the craze is all about!',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1KSnnBSvC',ext: true}]},{id: 106,title: 'ACM Studio | Creative Track | Sprite Sheets & Tilemaps',allDay: false,start: 1634608800000,end: 1634616000000,location: 'Zoom link: https://ucla.zoom.us/j/94661432392',committee: 'studio',description: "Come learn about Sprite Sheets and Tilemaps in Unity! We'll be going over best practices for making art assets as easy as possible for programmers to implement, and how to process and use Sprite Sheets and Tilemaps in Unity. You can find more details and a walkthrough in our Github repo: https://github.com/uclaacm/studio-creative-tutorials-f21",links: [{text: 'Instagram Post',href: 'https://www.instagram.com/p/CU57x2mPTa5/',ext: true}, {text: 'Zoom Link', href: 'https://ucla.zoom.us/j/94661432392', ext: true}]},{id: 107,title: 'ACM Studio | Beginner Track | Roll a Ball Pt. 2',allDay: false,start: 1634695200000,end: 1634702400000,location: 'Engineering IV Faraday Room 67-124',committee: 'studio',description: "Join us for ✨Roll a Ball Part II✨, where we'll be going over more Unity fundamentals, such as how to implement basic UI, scene management, a scoring system and more! If you missed last week's tutorial, don't worry you can find out what you missed by watching our video or step-by-step walkthrough over on our GitHub!",links: [{text: 'Instagram Post',href: 'https://www.instagram.com/p/CU_L-wKv3Y6/',ext: true}, {text: 'GitHub Repo', href: 'https://tinyurl.com/roll-a-ball-pt1-repo', ext: true}]},{id: 108,title: 'ACM Studio | Advanced Track | Programming Essentials',allDay: false,start: 1634781600000,end: 1634788800000,location: 'Engineering IV Faraday Room 67-124',committee: 'studio',description: "This week in the Advanced Track we're covering best practices and essential features of Unity and C# to make programming your games easier and better! You can find more details and a walkthrough in our Github repo!",links: [{text: 'Instagram Post',href: 'https://www.instagram.com/p/CVJbfNfvx4S/',ext: true}, {text: 'GitHub Repo', href: 'https://github.com/uclaacm/studio-advanced-tutorials-f21', ext: true}]},
// w4.5 regen (AI beginner track, impact blog, icpc interview)
{id: 21,title: 'ACM AI Beginner Track Workshops',allDay: false,start: 1635213600000,end: 1635220800000,location: 'Young CS76',committee: 'ai',description: "Heard a lot about AI in the news lately? Always been curious about exploring machine learning but didn’t know where to start? The Beginner Track has you covered! We'll be starting from the ground-up and exploring the core concepts of ML, including the theory and implementation of fundamental models. The workshops will include both concept-based learning as well as guided a mini-project with useful ML libraries . By the end of the series you will have a firm foundation in the fundamentals of ML and understand some of the common techniques at the heart of AI and data science! No prior experience required!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/388424459452807',ext: true}]},{id: 22,title: 'ACM AI Beginner Track Workshops',allDay: false,start: 1635818400000,end: 1635825600000,location: 'Young CS76',committee: 'ai',description: "Heard a lot about AI in the news lately? Always been curious about exploring machine learning but didn’t know where to start? The Beginner Track has you covered! We'll be starting from the ground-up and exploring the core concepts of ML, including the theory and implementation of fundamental models. The workshops will include both concept-based learning as well as guided a mini-project with useful ML libraries . By the end of the series you will have a firm foundation in the fundamentals of ML and understand some of the common techniques at the heart of AI and data science! No prior experience required!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/388424459452807',ext: true}]},{id: 23,title: 'ACM AI Beginner Track Workshops',allDay: false,start: 1636426800000,end: 1636434000000,location: 'Young CS76',committee: 'ai',description: "Heard a lot about AI in the news lately? Always been curious about exploring machine learning but didn’t know where to start? The Beginner Track has you covered! We'll be starting from the ground-up and exploring the core concepts of ML, including the theory and implementation of fundamental models. The workshops will include both concept-based learning as well as guided a mini-project with useful ML libraries . By the end of the series you will have a firm foundation in the fundamentals of ML and understand some of the common techniques at the heart of AI and data science! No prior experience required!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/388424459452807',ext: true}]},{id: 24,title: 'ACM AI Beginner Track Workshops',allDay: false,start: 1637031600000,end: 1637038800000,location: 'Young CS76',committee: 'ai',description: "Heard a lot about AI in the news lately? Always been curious about exploring machine learning but didn’t know where to start? The Beginner Track has you covered! We'll be starting from the ground-up and exploring the core concepts of ML, including the theory and implementation of fundamental models. The workshops will include both concept-based learning as well as guided a mini-project with useful ML libraries . By the end of the series you will have a firm foundation in the fundamentals of ML and understand some of the common techniques at the heart of AI and data science! No prior experience required!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/388424459452807',ext: true}]},{id: 25,title: 'ACM AI Beginner Track Workshops',allDay: false,start: 1637636400000,end: 1637643600000,location: 'Young CS76',committee: 'ai',description: "Heard a lot about AI in the news lately? Always been curious about exploring machine learning but didn’t know where to start? The Beginner Track has you covered! We'll be starting from the ground-up and exploring the core concepts of ML, including the theory and implementation of fundamental models. The workshops will include both concept-based learning as well as guided a mini-project with useful ML libraries . By the end of the series you will have a firm foundation in the fundamentals of ML and understand some of the common techniques at the heart of AI and data science! No prior experience required!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/388424459452807',ext: true}]},{id: 26,title: 'ACM AI Beginner Track Workshops',allDay: false,start: 1638241200000,end: 1638248400000,location: 'Young CS76',committee: 'ai',description: "Heard a lot about AI in the news lately? Always been curious about exploring machine learning but didn’t know where to start? The Beginner Track has you covered! We'll be starting from the ground-up and exploring the core concepts of ML, including the theory and implementation of fundamental models. The workshops will include both concept-based learning as well as guided a mini-project with useful ML libraries . By the end of the series you will have a firm foundation in the fundamentals of ML and understand some of the common techniques at the heart of AI and data science! No prior experience required!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/388424459452807',ext: true}]},
{id: 27,title: 'ACM Impact Blog Office Hours',allDay: false,start: 1634160600000,end: 1634164200000,location: 'https://ucla.zoom.us/j/96602298075',committee: 'board',description: "Want to rant about a tech issue you're passionate about? Want to tell us about a tech + social good project you created? Write for ACM Impact's blog! Tell us about ANYTHING tech + society related, like CA Prop 22, Big Tech regulation, or Amazon's treatment of workers! Check out this link to learn more about how you can get involved!",links: []},{id: 28,title: 'ACM Impact Blog Office Hours',allDay: false,start: 1634765400000,end: 1634769000000,location: 'https://ucla.zoom.us/j/96602298075',committee: 'board',description: "Want to rant about a tech issue you're passionate about? Want to tell us about a tech + social good project you created? Write for ACM Impact's blog! Tell us about ANYTHING tech + society related, like CA Prop 22, Big Tech regulation, or Amazon's treatment of workers! Check out this link to learn more about how you can get involved!",links: []},{id: 29,title: 'ACM Impact Blog Office Hours',allDay: false,start: 1635370200000,end: 1635373800000,location: 'https://ucla.zoom.us/j/96602298075',committee: 'board',description: "Want to rant about a tech issue you're passionate about? Want to tell us about a tech + social good project you created? Write for ACM Impact's blog! Tell us about ANYTHING tech + society related, like CA Prop 22, Big Tech regulation, or Amazon's treatment of workers! Check out this link to learn more about how you can get involved!",links: []},{id: 30,title: 'ACM Impact Blog Office Hours',allDay: false,start: 1635975000000,end: 1635978600000,location: 'https://ucla.zoom.us/j/96602298075',committee: 'board',description: "Want to rant about a tech issue you're passionate about? Want to tell us about a tech + social good project you created? Write for ACM Impact's blog! Tell us about ANYTHING tech + society related, like CA Prop 22, Big Tech regulation, or Amazon's treatment of workers! Check out this link to learn more about how you can get involved!",links: []},{id: 31,title: 'ACM Impact Blog Office Hours',allDay: false,start: 1636583400000,end: 1636587000000,location: 'https://ucla.zoom.us/j/96602298075',committee: 'board',description: "Want to rant about a tech issue you're passionate about? Want to tell us about a tech + social good project you created? Write for ACM Impact's blog! Tell us about ANYTHING tech + society related, like CA Prop 22, Big Tech regulation, or Amazon's treatment of workers! Check out this link to learn more about how you can get involved!",links: []},{id: 32,title: 'ACM Impact Blog Office Hours',allDay: false,start: 1637188200000,end: 1637191800000,location: 'https://ucla.zoom.us/j/96602298075',committee: 'board',description: "Want to rant about a tech issue you're passionate about? Want to tell us about a tech + social good project you created? Write for ACM Impact's blog! Tell us about ANYTHING tech + society related, like CA Prop 22, Big Tech regulation, or Amazon's treatment of workers! Check out this link to learn more about how you can get involved!",links: []},{id: 33,title: 'ACM Impact Blog Office Hours',allDay: false,start: 1637793000000,end: 1637796600000,location: 'https://ucla.zoom.us/j/96602298075',committee: 'board',description: "Want to rant about a tech issue you're passionate about? Want to tell us about a tech + social good project you created? Write for ACM Impact's blog! Tell us about ANYTHING tech + society related, like CA Prop 22, Big Tech regulation, or Amazon's treatment of workers! Check out this link to learn more about how you can get involved!",links: []},
{id: 34,title: 'ACM ICPC Interview Track Sessions',allDay: false,start: 1633654800000,end: 1633662000000,location: 'Boelter 2760',committee: 'icpc',description: 'Worried about your upcoming coding interview? Don’t worry, we got you covered! ACM ICPC is hosting a crash course that’ll give you the data structure and algorithm knowledge you’ll need to ace your next technical interview. Come through to hone your skills and get a head start on your CS career!',links: []},{id: 35,title: 'ACM ICPC Interview Track Sessions',allDay: false,start: 1634259600000,end: 1634266800000,location: 'Boelter 2760',committee: 'icpc',description: 'Worried about your upcoming coding interview? Don’t worry, we got you covered! ACM ICPC is hosting a crash course that’ll give you the data structure and algorithm knowledge you’ll need to ace your next technical interview. Come through to hone your skills and get a head start on your CS career!',links: []},{id: 36,title: 'ACM ICPC Interview Track Sessions',allDay: false,start: 1634864400000,end: 1634871600000,location: 'Boelter 2760',committee: 'icpc',description: 'Worried about your upcoming coding interview? Don’t worry, we got you covered! ACM ICPC is hosting a crash course that’ll give you the data structure and algorithm knowledge you’ll need to ace your next technical interview. Come through to hone your skills and get a head start on your CS career!',links: []},{id: 37,title: 'ACM ICPC Interview Track Sessions',allDay: false,start: 1635469200000,end: 1635476400000,location: 'Boelter 2760',committee: 'icpc',description: 'Worried about your upcoming coding interview? Don’t worry, we got you covered! ACM ICPC is hosting a crash course that’ll give you the data structure and algorithm knowledge you’ll need to ace your next technical interview. Come through to hone your skills and get a head start on your CS career!',links: []},{id: 38,title: 'ACM ICPC Interview Track Sessions',allDay: false,start: 1636074000000,end: 1636081200000,location: 'Boelter 2760',committee: 'icpc',description: 'Worried about your upcoming coding interview? Don’t worry, we got you covered! ACM ICPC is hosting a crash course that’ll give you the data structure and algorithm knowledge you’ll need to ace your next technical interview. Come through to hone your skills and get a head start on your CS career!',links: []},
// week 5
{id: 100,title: 'Meet the Company: Green Hills Software',allDay: false,start: 1635382800000,end: 1635388200000,location: 'MAXWELL ROOM (Room 57-124 ENGR IV)',committee: 'board',description: 'We’re back in-person!\n\nOur Meet the Company in-person event with Green Hills Software is happening this Wednesday, October 27, 2021, from 6 to 7:30 PM PT at the MAXWELL ROOM (Room 57-124 ENGR IV)!\n\nGreen Hills Software is the world leader in embedded safety and security. With the Internet of Things as a major trend in the coming years, the work they do in embedded end-to-end security is of great relevance. Holding stakes in multiple fields from aerospace and defense to medical and telecom, Green Hills offers the ability to apply your technical skills in a variety of settings for information safety\n\nRSVP to come learn about the specialized software Green Hills builds and how they achieved success in information safety!\n*Event will be following COVID-19 guidelines and all participants must be wearing masks* ',links: [{text: 'Facebook Event',href: 'https://fb.me/e/28hQFYCQA',ext: true}, {text: 'RSVP', href: 'https://forms.gle/7Fg2EhpmAf1yZRVSA', ext: true}]},{id: 101,title: 'ACM W Alumni Mentorship Kickoff',allDay: false,start: 1635382800000,end: 1635386400000,location: 'https://ucla.zoom.us/j/97721046447',committee: 'w',description: 'Welcome mentors and mentees to our ACM W Alumni Mentorship Kickoff! This will be your first chance to meet your mentors and mentees. It will be a great time so come prepared to meet some amazing people 🙂',links: [{text: 'Facebook Event',href: 'https://fb.me/e/UKItzxfg',ext: true}, {text: 'Zoom Link', href: 'https://ucla.zoom.us/j/97721046447', ext: true}]},{id: 102,title: 'ACM Internship Information Event',allDay: false,start: 1635206400000,end: 1635210000000,location: 'https://tinyurl.com/intern2021info',committee: 'board',description: 'Do you have questions about the ACM Internship Application Program/Process? Come to our Internship Info Event and get your questions about the Internship Program and Application answered by current ACM officers. ',links: [{text: 'Facebook Event',href: 'https://fb.me/e/2GA7ITa1Z',ext: true}, {text: 'Zoom Link', href: 'https://tinyurl.com/intern2021info', ext: true}]},{id: 103,title: 'ACM Hack | Hackschool #4: Props and Layout',allDay: false,start: 1635386400000,end: 1635393600000,location: 'Perloff 1102',committee: 'hack',description: "We know you love React, so this week on Hackschool we're diving even deeper into it with a workshop on props and layout! After this week, you'll be able to make beautiful, reusable React components! We'll also be uncovering some more fun CSS properties which we KNOW you'll love, so come on out to this week's Hackschool :) As always we'll be in Perloff 1102 this Wednesday from 7-9 and don't forget to RSVP! 💜\n\nIf you missed our first session, you can check it out here!✨\n",links: [{text: 'Facebook Event',href: 'https://fb.me/e/18T2DTn4a',ext: true}, {text: 'RSVP', href: 'http://links.uclaacm.com/hackschool21-s4-rsvp', ext: true} , {text: 'Session 3 Slides', href: 'http://links.uclaacm.com/hackschool21-s3-slides', ext: true}, {text: 'Session 3 README', href: 'http://links.uclaacm.com/hackschool21-s3', ext: true}]},{id: 105,title: 'ACM Design | UXLA #3: Ideation',allDay: false,start: 1635465600000,end: 1635469200000,location: 'Kinsey Pavilion 1200B',committee: 'design',description: "Welcome back to our UXLA series - the third installment has arrived, and it's all about one of our favorite parts of the design process - ideation! 💡\n\nThis workshop isn't just about creating ideas for design - it gets right to the core of how innovation works, and how we can be more ✨ creative ✨ with our problem-solving. Come join us this week to learn how a problem statement leads us to viable product ideas 📝 , to ideate both on paper and virtually 💻, and to create a low fidelity mockup of a product 📦 !\n\nRemember to bring your BRUINCARD, a MASK and your SYMPTOM MONITORING SURVEY!",links: [{text: 'Facebook Event',href: 'https://fb.me/e/1kFgnXnYn',ext: true}]},{id: 106,title: 'ACM ICPC | Beginner Track',allDay: false,start: 1635382800000,end: 1635390000000,location: 'Boelter 3400',committee: 'icpc',description: 'Quick!! 🙊 How do you find the shortest path from your dorm to the lecture hall? Not sure? Come to ACM ICPC at UCLA’s Beginner Track this Wednesday @ 6 to learn that and much, much more!!!\n\nIn Beginner’s Track, our popular introduction to the world of competitive programming, we’ll be exploring beginner friendly topics and algorithms in competitive programming 🌱 We will walk you through everything you need to know to go from earthbound n00b to galaxy brained red coder Chad, guaranteed 😳🧠 absolutely no experience required!!!\n\nJoin us this Wednesday from 6-8 in Boelter 3400 to learn some super spicy 🔥 stuff about sorting! :)',links: []},{id: 107,title: 'Computer Science Town Hall | Fall 2021',allDay: false,start: 1636597800000,end: 1636605000000,location: 'Mong Auditorium and Online',committee: 'board',description: "Ask questions and get your voice heard! The Fall 2021 Computer Science Town Hall is your opportunity to voice your concerns directly to professors and staff in the CS Department. In past years, we've been able to advocate for changes in the school, including 35L and engineering ethics reform, improving tech breadth/sci-tech electives, and hiring professors with a focus on diversity and inclusion.\nThe event will be hybrid, with an in-person focus in Mong Auditorium (Engineering VI) and an online version livestreamed with a Q&A. Learn more, RSVP, and fill out pre-event surveys on the website page!",links: [{text: 'Facebook Event',href: 'https://fb.me/e/2F2a31mIu',ext: true}, {text: 'Website', href: '/town-hall/f21'}]},
// week 6
{id: 100,title: 'AI Research Panel',allDay: false,start: 1635987600000,end: 1635993000000,location: 'Young Hall Room CS76',committee: 'ai',description: 'Interested in Artificial Intelligence research but not sure where to start? Want to join an AI lab, but not sure how? Or debating whether AI research is even the right path for you? Not to worry, we got you covered! Check out ACM AI’s Research Panel on Wednesday, November 3 from 6-7:30 PM PDT at Young Hall Room CS76.\n\nCome out to see what AI research looks like at UCLA and learn how you can get involved! You’ll be able to ask any questions you have and even mingle with professors, grad students, and undergraduates working in all sorts of areas including computer vision 👀, biomedicine 🧬, language processing 🗣️, and more!\n\nAll majors and backgrounds are welcome, no artificial intelligence or computer science experience is necessary to come! See you there :))\n\n*Bruin card and symptom monitoring survey confirmation are required for entry.',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/894375184526273',ext: true}]},{id: 101,title: 'Cyber Academy: XSS and CSRF',allDay: false,start: 1635814800000,end: 1635822000000,location: 'Boelter Hall 9436 and Zoom',committee: 'cyber',description: 'Come learn about Extra Small Spaghetti and Surfing the Sea with us! Wait no, that’s wrong. Let’s try again. Come learn about Cross-Site Scripting and Cross-Site Request Forgery with us! We’ll teach you about how malicious code can be injected into both web pages and your browser, how you can protect yourself against it, but most importantly, how you can conduct your own XSS and CSRF attacks.',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1r6w629eE',ext: true}, {text: 'Zoom', href: 'https://ucla.zoom.us/j/96092075831?pwd=K0U5Q1VJUW1OV2M2U3Nnd291Z1dyUT09'}]},{id: 102,title: 'ACM Studio | Creative Track | Audio & Sound Design',allDay: false,start: 1635818400000,end: 1635825600000,location: 'Zoom',committee: 'studio',description: "Come learn about Audio and Sound Design in Unity at Studio's Creative Track this Monday! Learn how to make proximity-based audio, change audio based on terrain, and the basics of adding audio effects and audio engineering with just the few clicks of a button! You can find more details and a walkthrough in our GitHub repo!",links: [{text: 'Instagram Post',href: 'https://www.instagram.com/p/CU57x2mPTa5/',ext: true}, {text: 'GitHub Repo', href: 'https://github.com/uclaacm/studio-creative-tutorials-f21/tree/main/Audio%20%26%20Sound%20Design', ext: true}, {text: 'Zoom Link', href: 'https://ucla.zoom.us/j/99684783298?pwd=Ykh2NlJCTDdoRGYxZzg2Z2xVWU1RZz09', ext: true}]},{id: 103,title: 'ACM Studio | Beginner Track | 2D Platformer Pt 2',allDay: false,start: 1635904800000,end: 1635912000000,location: 'Engineering IV Faraday Room 67-124',committee: 'studio',description: "Come to Part II of our 2D Platformer workshop! Feel free to install the completed project from Part I to catch up if you couldn't make it last week! This week, we'll be learning about enemy AI, platformer mechanics, and level design. You can find more details and a walkthrough in our Github repo.",links: [{text: 'Facebook Event',href: 'https://www.instagram.com/p/CU_L-wKv3Y6/',ext: true}, {text: 'GitHub Repo', href: 'https://github.com/uclaacm/studio-beginner-tutorials-f21', ext: true}]},{id: 104,title: 'ACM Studio | Advanced Track | Yarnspinner',allDay: false,start: 1635991200000,end: 1635998400000,location: 'Engineering IV Faraday Room 67-124',committee: 'studio',description: 'Learn about YarnSpinner, an in-game dialogue framework that allows u to program dialog portions of your game in the way of your choice. The tutorial will cover the basic integration of Yarn into Unity, command system, and how to create a functioning dialog system with them. Sample code and details in this repo.',links: [{text: 'Facebook Event',href: 'https://www.instagram.com/p/CVJbfNfvx4S/',ext: true}, {text: 'GitHub Repo', href: 'https://github.com/uclaacm/studio-advanced-tutorials-f21/tree/main/YarnSpinner'}]},{id: 105,title: 'ACM Impact: Careers Workshop Series',allDay: false,start: 1635814800000,end: 1635818400000,location: 'Zoom - check Facebook for link',committee: 'board',description: "What do a Machine Learning Engineer at The Trevor Project and a User Researcher at Code for America have in common? They're both going to be speakers at ACM Impact's next workshop! Catch both of them plus a Software Engineer at the Chan Zuckerberg Initiative and a Product Manager at Terrafuse AI at ACM Impact's careers panel at 6pm on Monday, 11/1. The Zoom link will be posted on Facebook 30 minutes before the start!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/622886725748085/',ext: true}]},{id: 106,title: 'ACM Design | Intro to Figma',allDay: false,start: 1636070400000,end: 1636074000000,location: 'Kinsey Pavilion 1200B',committee: 'design',description: 'Y’all have been asking, and we delivered - we’re having a 🎨 FIGMA WORKSHOP 🎨 to give you a crash course into the best design tool we know!\n\nIntro to Figma will have you ready to design UI in a jiffy - learning how to work with layers, edit shapes and text, and assemble entire designs using all the helpful tools Figma has to offer. Come out this Thursday from 5-6PM at Kinsey 1200B to grow! As always, don’t forget the BRUINCARD, MASK and SYMPTOM MONITORING SURVEY 😊',links: [{text: 'Facebook Event',href: 'https://fb.me/e/29bjyfqIV',ext: true}]},
// w7
{id: 100,title: 'ACM Hack | Scraping UCLA at Scale',allDay: false,start: 1636426800000,end: 1636434000000,location: 'Zoom',committee: 'hack',description: "With class enrollment right around the corner ⏰, there’s no better time for this special one-off event, where Hack alum Timothy Gu and UCLA graduate Nathan Smith 🎓 talk all about web scraping at scale through a case study of their web app, Hotseat! 🔥\n\nHotseat 🌶️🪑 helps you with your class schedule by providing real-time stats 📈 and predictions 🔮 for when classes fill up, among many other features. At the core of Hotseat's functionality is web scraping 🕸️, which is used to collect all the historical data needed from the UCLA registrar 💾. Tim and Nathan have learned tons about how to provide this service in a scalable way ⚖️ to millions of users, and want to share this knowledge with you! 📚 This virtual event is happening ONE TIME ONLY, so be sure to join us Nov. 8 @ 7 PM!\n\n ",links: [{text: 'Facebook Event',href: 'https://fb.me/e/62TWNqDZs',ext: true}, {text: 'Hotseat Website', href: 'https://hotseat.io/', ext: true}, {text: 'Zoom Link', href: 'https://ucla.zoom.us/j/93858581122?pwd=L3VDK0o5UjJNN2dSZTN0Y0xLclpQUT09&fbclid=IwAR05Q9LbKEVHOqH8pS8r82d5KG3Ww16470ZbSBfdhbMoG3uw4VZfRj9w7es', ext: true}]},{id: 101,title: 'ACM Hack | Passion Talks: Web Accessibility',allDay: false,start: 1636513200000,end: 1636520400000,location: 'Royce 190',committee: 'hack',description: 'Do you want to make your next website accessible to everyone? Who wouldn’t! 😌 \n\nIf you come to the second 2️⃣ installment of Passion Talks™️, you can learn all about how websites can be more usable 💪 and inclusive toward a broader audience 👥🗣! Our very own, Omer Demirkan will be breaking down the cryptic❓texts of web accessibility standards, as well as the different sensory aids 👂👁️👄👁️👂 you can add to websites so that anyone can peruse them comfortably. Come on by to learn about web accessibility so you can add the final oomph 😳 to your website that’ll get the clicks through the roof 🏠! \n\nPlease RSVP!',links: [{text: 'Facebook Event',href: 'https://fb.me/e/2C6aZg6VV',ext: true}, {text: 'RSVP', href: 'http://links.uclaacm.com/passiontalksf21-webaccessibility-rsvp', ext: true}]},{id: 102,title: "ACM Hack | Hackschool #6: Asynchronous Programming and Web API's",allDay: false,start: 1636599600000,end: 1636606800000,location: 'Perloff 1102',committee: 'hack',description: "The past few weeks on Hackschool we've been covering React in depth, but this week we'll be taking a breather to talk about Asynchronous Programming! Asynchronous programming is a powerful and common programming technique used in web development and beyond, and is an essential tool for your coding arsenal! So if that sound exciting to come on out this week! As always we'll be in Perloff 1102 this Wednesday from 7-9 and don't forget to RSVP 💜\n\nIf you missed our last session, you can check it out here!✨",links: [{text: 'RSVP', href: 'https://forms.gle/3G2DBwYEXm39D3XX7', ext: true}, {text: 'Facebook Event',href: 'https://fb.me/e/18T2DTn4a',ext: true}, {text: 'Session 5 Slides', href: 'http://links.uclaacm.com/hackschool21-s5-slides', ext: true}, {text: 'Session 5 README', href: 'http://links.uclaacm.com/hackschool21-s5', ext: true}]},{id: 103,title: 'Studio Collab: Aimbot + Cheat Engine',allDay: false,start: 1636599600000,end: 1636606800000,location: 'Engr IV 67-124',committee: 'cyber',description: 'Psst 🤫. Wanna learn how to do hackity hack 🤭 of games 🎮?? Then come out to ACM Cyber and Studio’s Fall collab workshop on Aimbot 😵 and using Cheat Engine 🤯🤯! We’ll teach you the fundamentals 📝 of game hacking, the tools 🛠 you’ll need to use, and run 🏃♂️💨 through some cool demos 👬👭👫 of how it all works (featuring games that Studio made!). No prior experience is necessary 👶! Be ready to leave with a huger brain 💪🧠 , and a radiant 🔥💥✨🌟 aura knowing you can now assert your dominance 😤 on your friends 🤔 with your hacc skills 👹.\n\nNote: If you want to follow along, be sure to download these before the workshop:\nVisual Studio (Install .NET Framework for C# development, Use .NET 4.0 Framework)\nCheat Engine\n\nOther tools we’ll use:\ndnSpy\nmono injector\n',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/467305528024898/',ext: true}]},{id: 104,title: 'ACM ICPC | Beginner Track',allDay: false,start: 1636596000000,end: 1636603200000,location: 'Boelter 3400',committee: 'icpc',description: 'Quick!! 🙊 How do you find the shortest path from your dorm to the lecture hall? Not sure? Come to ACM ICPC at UCLA’s Beginner Track this Wednesday @ 6 to learn that and much, much more!!!\n\nIn Beginner’s Track, our popular introduction to the world of competitive programming, we’ll be exploring beginner friendly topics and algorithms in competitive programming 🌱 We will walk you through everything you need to know to go from earthbound n00b to galaxy brained red coder Chad, guaranteed 😳🧠 absolutely no experience required!!!\n\nJoin us this Wednesday from 6-8 in Boelter 3400 to become enlightened by ~*Dynamic Programming*~, a most mysterious and powerful CP technique! :)',links: []},
// w8
{id: 100,title: 'ACM W x Meta Networking Night',allDay: false,start: 1637022600000,end: 1637026200000,location: 'Zoom',committee: 'w',description: "Want to meet some of the faces of Meta? Come out for the ACM W x Meta Networking Night where you can meet some of Meta's brightest stars! We will have guest speakers Shameiz Rangwala from Instagram, Ryan Peterman from Facebook, and Maurene Jiang from Oculus! Come prepared with questions to ask them about anything you are curious about. RSVP and ask questions!",links: [{text: 'RSVP', href: 'https://bit.ly/3C3z0FL', ext: true}, {text: 'Facebook Event',href: 'https://fb.me/e/1iXalSfHj',ext: true}, {text: 'Zoom Link', href: 'https://ucla.zoom.us/j/96144195803', ext: true}]},{id: 101,title: 'ACM Hack | Hackschool #7: Life Cycle',allDay: false,start: 1637204400000,end: 1637211600000,location: 'Perloff 1102',committee: 'hack',description: "This year's Hackschool is nearing the end of its Life Cycle :( but don't be sad because our workshop this week will be covering just that! We'll be jumping into Life Cycle in React and covering a new React hook: useEffect. After learning all the fundamentals of React, we can now move into some of these more ~advanced~ concepts that can really make your app interesting. We hope to see you in Perloff 1102 this Wednesday from 7-9! (don't forget to RSVP) 💜\n\nIf you missed our last session, you can check it out here!✨",links: [{text: 'RSVP', href: 'http://links.uclaacm.com/hackschool21-s7-rsvp', ext: true}, {text: 'Facebook Event',href: 'https://fb.me/e/18T2DTn4a',ext: true}, {text: 'Session 6 Slides', href: 'http://links.uclaacm.com/hackschool21-s6-slides', ext: true}, {text: 'Session 6 README', href: 'http://links.uclaacm.com/hackschool21-s6', ext: true}]},{id: 103,title: 'ACM Impact: Open Source Careers',allDay: false,start: 1637114400000,end: 1637118000000,location: 'Zoom link on FB page',committee: 'board',description: "Come out to Impact's FINAL installment of our Careers in Social Impact Technology workshop! This workshop is about careers in open source technology. Come out to talk to the G.O.A.T. himself, Professor Eggert, and G.O.A.T. in the making, UCLA student Bryan Pan, about their experiences in open source and how you can turn that into your career! Keep in mind that this week it's on a TUESDAY!!!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/622886712414753',ext: true}]},{id: 104,title: 'ACM Studio | Beginner Track | First Person Shooter Part 1',allDay: false,start: 1637118000000,end: 1637125200000,location: 'Engineering IV Faraday Room 67-125',committee: 'studio',description: 'You’ve learned a lot about 2D games over the past two tutorials, but now we’re jumping back into three dimensions with the first of two tutorials on first-person shooters! This Tuesday, we’ll go over how to smoothly move and animate a character in 3D space, as well as how to use Unity’s Cinemachine tool to implement classic FPS camera mechanics!',links: [{text: 'Instagram Post',href: 'https://www.instagram.com/p/CVJbfNfvx4S/',ext: true}]},{id: 105,title: 'ACM Studio | Advanced Track | Netcode',allDay: false,start: 1637204400000,end: 1637211600000,location: 'Engineering IV Faraday Room 67-124',committee: 'studio',description: 'Interested in building a multiplayer game but don’t know where to start? Join Studio this Wednesday to learn about some of the basic theory and netcode that forms the foundation of many small-scale multiplayer applications created in Unity!',links: [{text: 'Instagram Post',href: 'https://www.instagram.com/p/CVJbfNfvx4S/',ext: true}]},{id: 106,title: 'ACM Studio | Creative Track | 2D/3D Animation',allDay: false,start: 1637031600000,end: 1637038800000,location: 'Zoom link on IG page',committee: 'studio',description: "Learn the basics of 2D/3D Animation! This includes skeleton rigging, Unity's animation state machine, inverse kinematics, animation transitioning, and more!",links: [{text: 'Instagram Post',href: 'https://www.instagram.com/p/CU_L-wKv3Y6/',ext: true}]},{id: 107,title: 'ACM Hack | Passion Talks: Music Technology',allDay: false,start: 1637287200000,end: 1637294400000,location: 'Kaplan Hall A65',committee: 'hack',description: 'Do you like jazz 🐝? Have you ever had a deep-rooted 🌲and all-consuming desire to understand the inner workings of modern music 🎶technology?\n\nIf so, come on over to the third installment of 💜Passion Talks 💜where you can learn all about the exciting world of music technology! ACM’s Ben Hankin will be giving us a thorough rundown of all the latest and greatest technology used in modern music making 🪕 and how it really works. He’ll be talking about the different music tech applications 🎤, the API’s used in the process 👩💻, and even about the companies involved in the music scene right now 🏚! After listening to this talk, you’ll be 100% certified to pull up to the studio and cook 👩🍳 up some straight fire🔥.\n\nCheck out some past projects that Ben has worked on his website!',links: [{text: 'RSVP', href: 'http://links.uclaacm.com/passiontalksf21-musictech-rsvp', ext: true}, {text: 'Ben\'s website', href: 'https://benh4627.github.io/', ext: true}, {text: 'Facebook Event',href: 'https://fb.me/e/1bTnvYtol',ext: true}]},{id: 108,title: 'ACM Impact: Tech Ethics Fireside Chat with Prof. Villasenor',allDay: false,start: 1637110800000,end: 1637114400000,location: 'Engineering 6 Room 289',committee: 'board',description: 'Machine learning! Cybersecurity! Social Media! M E T A. How do we deal with issues that permeate through society? We don’t know, but we hope our speaker does. Join us and UCLA’s very own tech policy expert Professor Villasenor next Tuesday, 11/16 from 5-6pm for an open discussion about how we can collectively begin to tackle some of the most prevailing issues of our time.\n\nJohn Villasenor is a professor of electrical engineering, law, public policy, and management at UCLA, and is the faculty director of the UCLA Institute for Technology, Law, and Policy. He is also a nonresident senior fellow at the Brookings Institution and a member of the Council on Foreign Relations. Villasenor’s work addresses the intersection of technology, law, and policy.',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/207764888056067/',ext: true}]},{id: 109,title: 'ACM ICPC | Beginner Track',allDay: false,start: 1637200800000,end: 1637208000000,location: 'Boelter 3400',committee: 'icpc',description: 'Cheetos and chewy bars and chips ahoy, oh my! Come to ACM ICPC at UCLA’s Beginner Track this Wednesday @ 6 for the snacks, and stay for the graph theory ;)\n\nIn Beginner’s Track, our popular introduction to the world of competitive programming, we’ll be exploring beginner friendly topics and algorithms in competitive programming 🌱 We will walk you through everything you need to know to go from earthbound n00b to galaxy brained red coder Chad, guaranteed 😳🧠 absolutely no experience required!!!\n\nJoin us this Wednesday from 6-8 in Boelter 3400 for a lesson in Graph Theory, a fun and essential paradigm for your CP toolkit! :)',links: []},
// week 9
{id: 101,title: 'Alumni Panel: Tips and Tricks for Recruiting',allDay: false,start: 1637632800000,end: 1637636400000,location: 'Zoom',committee: 'board',description: 'Wondering how to snag your dream internship / job? Interested in working in big tech? You’ve come to the right place!\r\nNext Monday we’ll be joined by alumni working at ✨Amazon, Salesforce, Redfin, and Stripe✨ who will be talking about their career journeys and giving tips to current students on mastering the recruiting process. Register now to lock in your spot! 🤩',links: [{text: 'Register', href: 'https://ucla.zoom.us/meeting/register/tJUqd-qqrTMuHtKfL26wIf0kUSQ-TxwWhA6y', ext: true}]},{id: 102,title: 'ACM Studio | Beginner Track | First Person Shooter Part 2',allDay: false,start: 1637722800000,end: 1637730000000,location: 'Engineering IV Faraday Room 67-124',committee: 'studio',description: "This Tuesday, we’ll be finishing up part two of our FPS tutorials series. Specifically, we'll go over how to implement shooting mechanics with raycasting and introduce you to Unity's particle system to set up some awesome effects!\r\nDon't worry if you missed part one, since we have a package which you can download to pick up where we left off last week!",links: [{text: 'Instagram Post',href: 'https://www.instagram.com/p/CU_L-wKv3Y6/',ext: true}]},{id: 103,title: 'ACM Studio | Creative Track | Effectors and Joints',allDay: false,start: 1637636400000,end: 1637643600000,location: 'Zoom',committee: 'studio',description: "Want to learn how to make conveyors, rivers, force fields, and trap doors with just a few clicks of a button? What about springs and breakable walls, in both 2D and 3D? Come learn all of that (and more!) at this week's creative tutorial!\r\nAs always, a package will be linked on the Discord to download!\r\n",links: [{text: 'Zoom', href: 'https://ucla.zoom.us/j/99684783298?pwd=Ykh2NlJCTDdoRGYxZzg2Z2xVWU1RZz09', ext: true}, {text: 'Facebook Event',href: 'https://www.instagram.com/p/CU57x2mPTa5/',ext: true}]},
// WINTER 2022
//week 2
{id: 100,title: 'Studio Winter General Meeting 2021',allDay: false,start: 1641870000000,end: 1641877200000,location: 'https://ucla.zoom.us/j/92213893127',committee: 'studio',description: "Are you interested in making games 🎮? If so, come to ACM Game Studio's winter GM on January 10th 7-9pm PST on Zoom to hear about upcoming events (tutorials, guest speakers, and more!). We're also super excited to announce our annual program, ✨ Students Run Studios ✨, in which students develop indie games over the course of two quarters. We'll be pitching all the 12 games we'll be developing and you'll have the opportunity to hear from every team lead. Anyone with a desire to make games is welcome to participate in SRS — regardless of your current experience level or what skill set you have (be it programming, art, music or anything else). We are very beginner friendly so even if you don't have much experience, please sign up — you will have a lot of fun while learning a lot through the process.",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/445949347125772',ext: true}]},
{id: 101,title: 'ICPC Winter GM',allDay: false,start: 1641870000000,end: 1641871800000,location: 'Zoom',committee: 'icpc',description: 'This winter ICPC is hosting more events then we ever have. Come out to learn more about our offerings, get your questions answered, and make your voice heard!',links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/91529021066?pwd=cmp6QUdObU1UZy93ZENaVm9EaXV0QT09', ext: 'true'}]},
{id: 103,title: 'Beginner Track ++',allDay: false,start: 1642039200000,end: 1642046400000,location: 'https://ucla.zoom.us/j/97210316561',committee: 'icpc',description: 'The winter may be cold and lonely, but we’ve got algorithms to keep you warm! <33\r\n\r\nAre you completely new to competitive programming? Maybe you attended Beginner Track last quarter and are hungry for more? Or perhaps you’re just a wandering problem-solving enthusiast looking for a place to rest your weary bones? Have no fear, no matter who you are, ACM ICPC’s Beginner Track ++ is here for you! As the continuation of our popular Fall workshop, Beginner Track ++ is here to nurture and deepen your knowledge of competitive programming. No prior experience required! This quarter, we have an exciting lineup of topics: Ad-Hoc, Graph Theory, Dynamic Programming, and Bit-Masking. \r\n\r\nCome to our first workshop of the quarter this Wednesday @ 6 for a warm welcome and some brain-tickling ad-hoc problems! :)',links: []},
{id: 104,title: 'Hack Sprint Mobile Development Series',allDay: false,start: 1642039200000,end: 1642046400000,location: 'Zoom',committee: 'hack',description: 'On your mark 🏁. Get set. GOOOO! 🏃ACM Hack’s Hack Sprint is coming up fast! 🚨 Join us Wednesday, January 12th from 6-8 PM PST as we launch into the world of iOS mobile development 📱with beginner-friendly workshops in Swift. 🕊 Our first workshop will introduce you to Swift basics 🧑🏫and history, and throughout the quarter, we will (Swift-ly) teach you everything you need to know to develop your very own iOS app and publish it on the App Store 📈. Hope to see you there! 💜',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1EKKZMJjs',ext: true}, {text: 'Zoom Link', href: 'https://ucla.zoom.us/j/93761587241?pwd=aWlsV3FxRzl6clVhRDQ0RHF4dmN6dz09', ext: 'true'}]},
{id: 105,title: 'CS32 Interview Track',allDay: false,start: 1642125600000,end: 1642132800000,location: 'Zoom',committee: 'icpc',description: "Wanna learn how to ace your technical interviews? Come to ICPC's Winter Interview Workshop, where we'll be going over data structures and algorithms to prep for your next coding interview! Get ready to become BOOSTED(™) 🤠😎 with some s l i c c problem-solving skills, so you'll nail those interview problems real q u i c c. This quarter we'll be focusing on how to express ideas, simplify problems, and all the technical topics you'll need to pass those interviews!",links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/91829572673?pwd=SG5ROHpXYWM4S0pXTUkrby9MbnhHZz09', ext: 'true'}]},
{id: 106,title: 'ACM AI Beginner Track Workshop',allDay: false,start: 1642125600000,end: 1642132800000,location: '',committee: 'ai',description: 'Interested in AI but don’t know where to start? Want to learn about how machine learning (ML) models work and how to code them yourself? Join us for ACM AI’s Beginner Track Series Thursdays 6 - 8pm starting January 13th! The Beginner Track delves into the core fundamentals of ML. Most workshops will not only have interactive activities that’ll help you understand ML theory, but also have coding walkthroughs designed to help you put that theory to practice . By the time the track ends, you’ll have a solid grasp of how ML models work on a conceptual level and be able to program some models on your own! We hope to see you there!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/1958197451020087',ext: true}]},
{id: 107,title: 'Studio Alumni Panel',allDay: false,start: 1642213800000,end: 1642219200000,location: ' https://ucla.zoom.us/j/99889626466',committee: 'studio',description: "Curious about what it's like working as a game designer or programmer 🕹? Want to know what it was like developing Minecraft RTX ⛏? What about stop-motion 🎞️ and puppet work for Netflix & Hulu? Or how about cutting-edge development in computer graphics and AR technologies 👓? If so, please join us as we welcome back our Studio alumni officers for panel on Friday, January 14th 6:30 - 8:00 PM PST on Zoom to learn about some of the projects they've been working after college and ask them any questions you may have! ",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/215935663980092?ref=newsfeed',ext: true}]},
{id: 108,title: 'ACM Impact Fireside Chat',allDay: false,start: 1642208400000,end: 1642212000000,location: 'Zoom link will be posted on Facebook event 30 minutes before the event!',committee: 'board',description: "Kent Wong is the director of the UCLA Labor Center and has previously moderated discussions about the gig economy and advocated for a fairer compensation structure for gig workers.\r\nIn this fireside chat we will be posing some important questions about corporations that make use of gig workers (eg. Lyft, Doordash, Uber, Airbnb, TaskRabbit), and other questions about work in the tech industry. If you're confused about the labor market and don't see where you think you'd fit in todays economy, come out to ACM Impact’s fireside chat to get a better idea about the future of work!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/650563502740863/',ext: true}]},
{id: 21,title: 'ACM AI Advanced Track Workshop',allDay: false,start: 1641866400000,end: 1641873600000,location: 'https://ucla.zoom.us/j/4330112741',committee: 'ai',description: 'Come out to ACM AI’s Advanced Track Workshops this quarter Mondays 6 - 8pm starting January 10th! While the beginner track is focused on classical AI techniques like linear regression, the Advanced Workshop is concentrated on the theory and application of neural networks. Alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/606250730635412',ext: true}]},{id: 23,title: 'ACM AI Advanced Track Workshop',allDay: false,start: 1643076000000,end: 1643083200000,location: 'https://ucla.zoom.us/j/4330112741',committee: 'ai',description: 'Come out to ACM AI’s Advanced Track Workshops this quarter Mondays 6 - 8pm starting January 10th! While the beginner track is focused on classical AI techniques like linear regression, the Advanced Workshop is concentrated on the theory and application of neural networks. Alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/606250730635412',ext: true}]},{id: 24,title: 'ACM AI Advanced Track Workshop',allDay: false,start: 1643680800000,end: 1643688000000,location: 'https://ucla.zoom.us/j/4330112741',committee: 'ai',description: 'Come out to ACM AI’s Advanced Track Workshops this quarter Mondays 6 - 8pm starting January 10th! While the beginner track is focused on classical AI techniques like linear regression, the Advanced Workshop is concentrated on the theory and application of neural networks. Alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/606250730635412',ext: true}]},{id: 25,title: 'ACM AI Advanced Track Workshop',allDay: false,start: 1644285600000,end: 1644292800000,location: 'https://ucla.zoom.us/j/4330112741',committee: 'ai',description: 'Come out to ACM AI’s Advanced Track Workshops this quarter Mondays 6 - 8pm starting January 10th! While the beginner track is focused on classical AI techniques like linear regression, the Advanced Workshop is concentrated on the theory and application of neural networks. Alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/606250730635412',ext: true}]},{id: 26,title: 'ACM AI Advanced Track Workshop',allDay: false,start: 1644890400000,end: 1644897600000,location: 'https://ucla.zoom.us/j/4330112741',committee: 'ai',description: 'Come out to ACM AI’s Advanced Track Workshops this quarter Mondays 6 - 8pm starting January 10th! While the beginner track is focused on classical AI techniques like linear regression, the Advanced Workshop is concentrated on the theory and application of neural networks. Alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/606250730635412',ext: true}]},
{id: 28,title: 'ACM AI Advanced Track Workshop',allDay: false,start: 1646100000000,end: 1646107200000,location: 'https://ucla.zoom.us/j/4330112741',committee: 'ai',description: 'Come out to ACM AI’s Advanced Track Workshops this quarter Mondays 6 - 8pm starting January 10th! While the beginner track is focused on classical AI techniques like linear regression, the Advanced Workshop is concentrated on the theory and application of neural networks. Alongside your peers, you’ll be spending ample time on both machine learning theory and hands-on projects – all aiming to equip you with the necessary knowledge to integrate in your personal projects. You will also have the opportunity to apply your skills from the get go through ACM AI’s very own Projects initiative. Basic programming and prior ML experience are preferred but regardless of where you stand, don’t hesitate to stop by!',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/606250730635412',ext: true}]},
//week 3
{id: 100,title: 'Build an RPG: Combat',allDay: false,start: 1642561200000,end: 1642568400000,location: 'Zoom',committee: 'studio',description: "Want to learn how to make Pokémon 👀? Beginner track is back this quarter and we'll be having a crash course introduction to Unity. This week, we'll be implementing a turn-based combat system ⚔️ . Even if you've already attended tutorials last quarter, we'll be covering new topics and connecting all the tutorials in this track to create the framework for an ✨ RPG. ✨ ",links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/93198710813', ext: true}, {text: 'Facebook Event',href: 'https://fb.me/e/1CN570QoU',ext: true}]},
{id: 102,title: 'Advanced Track',allDay: false,start: 1642644000000,end: 1642651200000,location: 'Zoom',committee: 'icpc',description: "In ICPC's Advanced Track, we submerge and dive deep into the world of algorithms and data structures, tackling ones often found in harder competitive programming problems. ICPC competitors, competitive programming fanatics, and anyone interested in expanding their programming brain are wholeheartedly invited to come and explore these awesome algorithmic wonders with us.\r\n\r\nCome to our first workshop of the quarter this Wednesday at 6:00 for an exciting kickoff with algorithms solving the famous problem of finding the shortest path!",links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/3616763997', ext: true}]},
{id: 103,title: 'Beginner Track++',allDay: false,start: 1642644000000,end: 1642651200000,location: 'Zoom',committee: 'icpc',description: "Oh no! Gotta get back to school, but you can’t find the *shortest path* from your hometown to UCLA’s campus? Never fear! At this week's Intro to Graph Theory workshop, we’re covering one of the most important topics in competitive programming: graphs! We’ll work on problems like this and so much more, so come on out, this Wednesday @ 6 :)",links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/97210316561', ext: true}]},
{id: 104,title: 'Hack Sprint Mobile Development Series',allDay: false,start: 1642644000000,end: 1642651200000,location: 'Zoom',committee: 'hack',description: <>And we’re off to the races! 🎉 🎉 ACM Hack is back with heat 2 of Hack Sprint, our beginner-friendly iOS mobile development workshop! 🚨 Join us Wednesday, January 19th from 6-8 PM PST as we hurdle straight into teaching Swift! 🕊 Last time, we covered Swift basics and history. This session, we’ll tell you everything you need to know about the Swift fundamentals, so you can create your own iOS app in no time! Race ya there! 💜 <br/> Missed our last session? <br/> Check out the recording: <a href="https://youtu.be/swXXKGc5A58">https://youtu.be/swXXKGc5A58</a> <br/> Here’s our comprehensive README: <a href="http://links.uclaacm.com/hacksprint22-s1">http://links.uclaacm.com/hacksprint22-s1</a></>,links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/93761587241?pwd=aWlsV3FxRzl6clVhRDQ0RHF4dmN6dz09', ext: true}, {text: 'Facebook Event',href: 'https://fb.me/e/1BpXrJohW',ext: true}]},
{id: 105,title: 'Creative Tutorial: Game Design',allDay: false,start: 1642647600000,end: 1642654800000,location: 'Zoom',committee: 'studio',description: "Ever wanted to learn more about video game design (including what it even is)? What about how to apply your ideas and what to keep in mind to excel as a game designer? Learn all of that and more at Studio's Game Design Tutorial! Not only will you get valuable insight into the ways a game designer might think and design, there will also be case studies and popular interview questions to get you thinking about the intricacies of game design.",links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/99684783298?pwd=Ykh2NlJCTDdoRGYxZzg2Z2xVWU1RZz09', ext: true}, {text: 'Facebook Event',href: 'https://www.facebook.com/events/263085649289238/',ext: true}]},
{id: 106,title: 'CS32 Interview Track',allDay: false,start: 1642730400000,end: 1642737600000,location: 'Zoom',committee: 'icpc',description: "Wanna learn how to ace your technical interviews? Come to ICPC's Winter Interview Workshop, where we'll be going over data structures and algorithms to prep for your next coding interview! Get ready to become BOOSTED(™) 🤠😎 with some s l i c c problem-solving skills, so you'll nail those interview problems real q u i c c. This week we’ll focus on basic data structures (arrays, vectors, linked lists, hashmaps) to build the fundamentals of solving advanced interview questions. ",links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/91829572673?pwd=SG5ROHpXYWM4S0pXTUkrby9MbnhHZz09', ext: true}]},
{id: 107,title: 'Cyber Academy | Network Packet Capture',allDay: false,start: 1642730400000,end: 1642737600000,location: 'Zoom',committee: 'cyber',description: 'Now you know all about files and data on your computer, but what if you want to do something more interesting, like playing a video game with your friends, or watching the latest acm cyber workshop on youtube? (Not because you missed it, of course, but because it was so awesome and you just need to see it again). All of this happens over networks--usually THE INTERNET 🌈🤩 (*oooh aaah*). Join us this week to learn how your information and activities propagate through networks, what kinds of things make a network unsecure, and what kinds of things you can do to protect your data on the wild-wild-web. We’ll be doing a demo to show how private information can be captured over an unsecured network, so you won’t want to miss this one!\r\n\r\nIMPORTANT: make sure you have wireshark downloaded before the workshop!\r\nhttps://www.wireshark.org/#download',links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/95081428653?pwd=am9rb2JuK25LVmFMT3NxaHJyV3J6Zz09', ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/SP0MErK0 ',ext: true}]},
{id: 108,title: 'UCLA x UCSD Game Jam',allDay: true,start: 1642816800000,end: 1643076000000,location: 'Discord',committee: 'studio',description: "ACM Studio is incredibly excited to announce our first cross-campus game jam, in collaboration with VGDC from UCSD! This game jam will start on Friday, January 21st at 6:00PM PST and end Monday, January 24th at 6:00PM PST. While the game jam is 72 hours, we still encourage you to join even if you can't commit to the full time period! 👾 This game jam will be held on the UCLA x UCSD game jam server, which you can find in our linktree. You can also find the signup form there! We hope to see you join us 🎮 ✨ ",links: [{text: 'Discord Server', href: 'https://discord.gg/RKzTCxhTv3', ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/1whfpHA6X',ext: true}]},
{id: 109,title: 'Tech Ethics: Tech + Environment',allDay: false,start: 1642813200000,end: 1642816800000,location: 'Zoom',committee: 'board',description: 'ACM Impact’s first Tech Ethics workshop for this week will be looking at ways in which the media we consume affects the environment. Often, we tend to decouple the realm of ideas from physical space, this workshop / discussion will be looking to disprove that idea. Ever wondered the environmental consequences of switching from 1080p to 4K on that last YouTube video you watched? We will be looking at ways in which data centers are destroying the world, and how collecting an increasingly greater amount of data is not ecologically sustainable along with some reasonable solutions!',links: [{text: 'Zoom Link', href: 'tinyurl.com/impact-ethics-series', ext: true},{text: 'Facebook Event',href: 'https://www.facebook.com/events/603940534005083/',ext: true}]},
{id: 21,title: 'ACM Teach LA Dev Team Meeting',allDay: false,start: 1006308000000,end: 1006311600000,location: 'https://tinyurl.com/tla-dev-w22',committee: 'teach-la',description: "Are you an aspiring developer? Do you want to make CS education more accessible? If so, join us for Teach LA's weekly Dev Team Meetings. You'll have the opportunity to gain hands-on web development experience by working on our editor/static site or help create learning labs to teach kids various CS topics! No experience is required (in fact, we would love to train you)! :)",links: []},{id: 22,title: 'ACM Teach LA Dev Team Meeting',allDay: false,start: 1642557600000,end: 1642561200000,location: 'https://tinyurl.com/tla-dev-w22',committee: 'teach-la',description: "Are you an aspiring developer? Do you want to make CS education more accessible? If so, join us for Teach LA's weekly Dev Team Meetings. You'll have the opportunity to gain hands-on web development experience by working on our editor/static site or help create learning labs to teach kids various CS topics! No experience is required (in fact, we would love to train you)! :)",links: []},{id: 23,title: 'ACM Teach LA Dev Team Meeting',allDay: false,start: 1643162400000,end: 1643166000000,location: 'https://tinyurl.com/tla-dev-w22',committee: 'teach-la',description: "Are you an aspiring developer? Do you want to make CS education more accessible? If so, join us for Teach LA's weekly Dev Team Meetings. You'll have the opportunity to gain hands-on web development experience by working on our editor/static site or help create learning labs to teach kids various CS topics! No experience is required (in fact, we would love to train you)! :)",links: []},{id: 24,title: 'ACM Teach LA Dev Team Meeting',allDay: false,start: 1643767200000,end: 1643770800000,location: 'https://tinyurl.com/tla-dev-w22',committee: 'teach-la',description: "Are you an aspiring developer? Do you want to make CS education more accessible? If so, join us for Teach LA's weekly Dev Team Meetings. You'll have the opportunity to gain hands-on web development experience by working on our editor/static site or help create learning labs to teach kids various CS topics! No experience is required (in fact, we would love to train you)! :)",links: []},{id: 25,title: 'ACM Teach LA Dev Team Meeting',allDay: false,start: 1644372000000,end: 1644375600000,location: 'https://tinyurl.com/tla-dev-w22',committee: 'teach-la',description: "Are you an aspiring developer? Do you want to make CS education more accessible? If so, join us for Teach LA's weekly Dev Team Meetings. You'll have the opportunity to gain hands-on web development experience by working on our editor/static site or help create learning labs to teach kids various CS topics! No experience is required (in fact, we would love to train you)! :)",links: []},{id: 26,title: 'ACM Teach LA Dev Team Meeting',allDay: false,start: 1644976800000,end: 1644980400000,location: 'https://tinyurl.com/tla-dev-w22',committee: 'teach-la',description: "Are you an aspiring developer? Do you want to make CS education more accessible? If so, join us for Teach LA's weekly Dev Team Meetings. You'll have the opportunity to gain hands-on web development experience by working on our editor/static site or help create learning labs to teach kids various CS topics! No experience is required (in fact, we would love to train you)! :)",links: []},{id: 27,title: 'ACM Teach LA Dev Team Meeting',allDay: false,start: 1645581600000,end: 1645585200000,location: 'https://tinyurl.com/tla-dev-w22',committee: 'teach-la',description: "Are you an aspiring developer? Do you want to make CS education more accessible? If so, join us for Teach LA's weekly Dev Team Meetings. You'll have the opportunity to gain hands-on web development experience by working on our editor/static site or help create learning labs to teach kids various CS topics! No experience is required (in fact, we would love to train you)! :)",links: []},{id: 28,title: 'ACM Teach LA Dev Team Meeting',allDay: false,start: 1646186400000,end: 1646190000000,location: 'https://tinyurl.com/tla-dev-w22',committee: 'teach-la',description: "Are you an aspiring developer? Do you want to make CS education more accessible? If so, join us for Teach LA's weekly Dev Team Meetings. You'll have the opportunity to gain hands-on web development experience by working on our editor/static site or help create learning labs to teach kids various CS topics! No experience is required (in fact, we would love to train you)! :)",links: []},{id: 29,title: 'ACM Teach LA Curriculum Meeting',allDay: false,start: 1006311600000,end: 1006315200000,location: 'https://tinyurl.com/tla-curriculum-w22',committee: 'teach-la',description: "Do you like teaching? Are you interested in making CS education more accessible? If so, join us for Teach LA's weekly curriculum meetings, where you'll get a chance to learn more about pedagogy, develop curriculum, and become an instructor for one of the many courses we teach!",links: []},{id: 30,title: 'ACM Teach LA Curriculum Meeting',allDay: false,start: 1642561200000,end: 1642564800000,location: 'https://tinyurl.com/tla-curriculum-w22',committee: 'teach-la',description: "Do you like teaching? Are you interested in making CS education more accessible? If so, join us for Teach LA's weekly curriculum meetings, where you'll get a chance to learn more about pedagogy, develop curriculum, and become an instructor for one of the many courses we teach!",links: []},{id: 31,title: 'ACM Teach LA Curriculum Meeting',allDay: false,start: 1643166000000,end: 1643169600000,location: 'https://tinyurl.com/tla-curriculum-w22',committee: 'teach-la',description: "Do you like teaching? Are you interested in making CS education more accessible? If so, join us for Teach LA's weekly curriculum meetings, where you'll get a chance to learn more about pedagogy, develop curriculum, and become an instructor for one of the many courses we teach!",links: []},{id: 32,title: 'ACM Teach LA Curriculum Meeting',allDay: false,start: 1643770800000,end: 1643774400000,location: 'https://tinyurl.com/tla-curriculum-w22',committee: 'teach-la',description: "Do you like teaching? Are you interested in making CS education more accessible? If so, join us for Teach LA's weekly curriculum meetings, where you'll get a chance to learn more about pedagogy, develop curriculum, and become an instructor for one of the many courses we teach!",links: []},{id: 33,title: 'ACM Teach LA Curriculum Meeting',allDay: false,start: 1644375600000,end: 1644379200000,location: 'https://tinyurl.com/tla-curriculum-w22',committee: 'teach-la',description: "Do you like teaching? Are you interested in making CS education more accessible? If so, join us for Teach LA's weekly curriculum meetings, where you'll get a chance to learn more about pedagogy, develop curriculum, and become an instructor for one of the many courses we teach!",links: []},{id: 34,title: 'ACM Teach LA Curriculum Meeting',allDay: false,start: 1644980400000,end: 1644984000000,location: 'https://tinyurl.com/tla-curriculum-w22',committee: 'teach-la',description: "Do you like teaching? Are you interested in making CS education more accessible? If so, join us for Teach LA's weekly curriculum meetings, where you'll get a chance to learn more about pedagogy, develop curriculum, and become an instructor for one of the many courses we teach!",links: []},{id: 35,title: 'ACM Teach LA Curriculum Meeting',allDay: false,start: 1645585200000,end: 1645588800000,location: 'https://tinyurl.com/tla-curriculum-w22',committee: 'teach-la',description: "Do you like teaching? Are you interested in making CS education more accessible? If so, join us for Teach LA's weekly curriculum meetings, where you'll get a chance to learn more about pedagogy, develop curriculum, and become an instructor for one of the many courses we teach!",links: []},{id: 36,title: 'ACM Teach LA Curriculum Meeting',allDay: false,start: 1646190000000,end: 1646193600000,location: 'https://tinyurl.com/tla-curriculum-w22',committee: 'teach-la',description: "Do you like teaching? Are you interested in making CS education more accessible? If so, join us for Teach LA's weekly curriculum meetings, where you'll get a chance to learn more about pedagogy, develop curriculum, and become an instructor for one of the many courses we teach!",links: []},
// week 4
{id: 101,title: 'Build an RPG: Overworld',allDay: false,start: 1643166000000,end: 1643173200000,location: 'Zoom',committee: 'studio',description: "Want to learn how to make Pokémon 👀? This week, we'll be creating a top-down character controller that will allow you to talk to NPCs and encounter wild Pokémon🍃. We'll also be connecting last-week's battle system ⚔️ with the overworld 🌎, but don't worry if you missed last week, we have a package you can download on our GitHub to get caught up! Even if you've already attended tutorials last quarter, we'll be covering new topics and connecting all the tutorials in this track to create the framework for an ✨ RPG. ✨ ",links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/97596929153', ext: true}, {text: 'Facebook Event',href: 'https://fb.me/e/1CN570QoU',ext: true}]},
{id: 102,title: 'Advanced Track',allDay: false,start: 1643248800000,end: 1643256000000,location: 'Zoom',committee: 'icpc',description: "In ICPC's Advanced Track, we submerge and dive deep into the world of algorithms and data structures, tackling ones often found in harder competitive programming problems. ICPC competitors, competitive programming fanatics, and anyone interested in expanding their programming brain are wholeheartedly invited to come and explore these awesome algorithmic wonders with us.\n\nCome to our second workshop of the quarter this Wednesday at 6:00 to learn about complex string algorithms every competitive programmer needs to know!",links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/3616763997', ext: true}, {text: 'Facebook Event',href: 'https://fb.me/e/4QVOk38pd',ext: true}]},
{id: 103,title: 'ACM-W Internet Scavenger Hunt',allDay: false,start: 1643248800000,end: 1643254200000,location: 'Zoom',committee: 'w',description: 'Ready to channel your inner detective 🕵️ Join ACM-W for our first ever Internet Scavenger Hunt, where we scour the world wide web and use those handy CS skills to help you find some of the most elusive webpages on the Internet for awesome prizes 🏆 Some example treasures that we’ll be looking for include:\nA Github page that has been active for the last three days 🖥️\nA URL with 3 consecutive numbers 🔢\nA Wikipedia page with less than 50 occurrences of the word “the” 🌐\n',links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/93342296948', ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/49jGXQW8z',ext: true}]},
{id: 104,title: 'Hack Sprint Mobile Development Series',allDay: false,start: 1643248800000,end: 1643256000000,location: 'Zoom',committee: 'hack',description: <>With Week 4 coming up fast, we’re hurtling 🏃♀️ around the corner to session 3 of Hack Sprint, our beginner-friendly iOS mobile development workshop! What better way to have fun 🤸♀️ as we jump into midterm season than learning about mobile app development in Swift! 🚨 Join us Wednesday, January 26th from 6-8 PM PST as talk about views 🔍, view modifiers, states, and bindings! Off you pop, and see you there! 💜<br/><br/>Missed our last session?<br/>Check out the recording: <a href="https://youtu.be/ayzYEj6OZFA">https://youtu.be/ayzYEj6OZFA</a> <br/>Here’s our comprehensive README: <a href="http://links.uclaacm.com/hacksprint22-s2">http://links.uclaacm.com/hacksprint22-s2</a></>,links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/93761587241?pwd=aWlsV3FxRzl6clVhRDQ0RHF4dmN6dz09', ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/1FvZyUmkT',ext: true}]},
{id: 105,title: 'Advanced Tutorial: Random Dungeon Generation',allDay: false,start: 1643252400000,end: 1643259600000,location: 'Zoom',committee: 'studio',description: "Interested in creating infinitely replayable games? Random Dungeon Generation is a core feature of many roguelikes like The Binding of Isaac and Moonlighter. In this tutorial, we'll be covering everything you need to implement a random dungeon generation algorithm from coding the dungeon crawler, to managing scenes, and finally to top-down camera movement.",links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/92138796419', ext: true}]},
{id: 106,title: 'CS32 Interview Track',allDay: false,start: 1643335200000,end: 1643342400000,location: 'Zoom',committee: 'icpc',description: "Hi queue-ties 🦖Wanna learn how to ace your technical interviews? Come to ICPC's Winter Interview Workshop, where we'll be going over data structures and algorithms to prep for your next coding interview! Get ready to become BOOSTED(™) 🤠😎 with some s l i c c problem-solving skills, so you'll nail those interview problems real q u i c c. This week we'll be focusing on 👾stacks and queues👾So make sure to comethru!",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/91829572673?pwd=SG5ROHpXYWM4S0pXTUkrby9MbnhHZz09',ext: true}]},
{id: 107,title: 'Cyber Academy | Memory Analysis',allDay: false,start: 1643335200000,end: 1643342400000,location: 'Zoom',committee: 'cyber',description: "Your memory is chock-full of information: names, faces, passwords, and embarrassing memories. Likewise, computers have similar information in their memory: text files, images, account details, and even your browser history 🤭. There's so much going on in a computer's metaphorical brain, and you can extract it with a little know-how! Attend Cyber's memory forensics workshop this Thursday to learn all about analyzing memory dumps and uncovering their obscured secrets.",links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/95081428653?pwd=am9rb2JuK25LVmFMT3NxaHJyV3J6Zz09', ext: true},{text: 'Facebook Event',href: 'https://www.facebook.com/events/288937773115413/',ext: true}]},
{id: 108,title: 'Fireside Chat w/ Professor Karen McKinnon',allDay: false,start: 1643425200000,end: 1643428800000,location: 'Zoom',committee: 'board',description: 'Are you worried about the effects of climate change, or want to educate yourself? 🧐 Are you interested in advocating for environmental justice? 🌳🌱Join us in a fireside chat this Thursday 7-8 with Professor Karen McKinnon, climate scientist and statistician, to learn more about her research and how YOU can do your part in climate change as a student interested in tech! 🥳💫 See you at tinyurl.com/impact-fireside-chat, be there or be square ❌',links: [{text: 'Zoom Link', href: 'https://ucla.zoom.us/j/98755847523', ext: true},{text: 'Facebook Event',href: 'https://www.facebook.com/events/992353958127688/',ext: true}]},
// week 5
{id: 100,title: 'Build an RPG: Inventory',allDay: false,start: 1643772600000,end: 1643779800000,location: 'Zoom',committee: 'studio',description: "Want to learn how to make Pokémon 👀? This week, we'll be creating an inventory system for you to store potions, pokeballs, and all that jazz 👜. Even if you've already attended tutorials last quarter, we'll be covering new topics and connecting all the tutorials in this track to create the framework for an ✨ RPG. ✨ Don't worry if you have not attended the past tutorials! You can find all the packages you need on github.",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/98566049793',ext: true},{text: 'Facebook Event',href: 'https://www.facebook.com/events/454938049440248',ext: true}]},
{id: 102,title: 'Advanced Track',allDay: false,start: 1643853600000,end: 1643860800000,location: 'Zoom',committee: 'icpc',description: "In ICPC's Advanced Track, we submerge and dive deep into the world of algorithms and data structures, tackling ones often found in harder competitive programming problems. ICPC competitors, competitive programming fanatics, and anyone interested in expanding their programming brain are wholeheartedly invited to come and explore these awesome algorithmic wonders with us.\n\nCome to our workshop this Wednesday at 6:00 for minimum spanning and all sorts of other tree algorithms!",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/3616763997',ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/4QVOk38pd',ext: true}]},
{id: 103,title: 'Beginner Track++',allDay: false,start: 1643853600000,end: 1643860800000,location: 'Zoom',committee: 'icpc',description: "BT++ is back (in-person!) with all the graph theory you can handle, this Wednesday @ 6! We'll be taking all of the concepts we learned last week, like BFS/DFS and the shortest path algorithm, and applying them in novel ways to come up with some crazy cool algorithms and solve some exciting new problems. Some come on down, becuase you're not gonna wanna miss it!",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/97210316561',ext: true}]},
{id: 104,title: 'AI Labs: Modern Applications of AI',allDay: false,start: 1643853600000,end: 1643857200000,location: '2760 Boelter Hall and Zoom',committee: 'ai',description: 'Curious about artificial intelligence but not sure where to start? Look no further than AI Labs: Modern Applications of AI, a workshop hosted by UCLA ACM AI on Wednesday, February 2 from 6 -7 PM at Engineering IV Maxwell Room 57-124! An online option will also be available through Zoom.\n\nCome find out why you shouldn’t believe everything you hear from your favorite celebrities 🤷♀️, how Netflix always knows exactly what you’re in the mood to binge-watch 📺, and why your machine learning models might need a little positive reinforcement too 🏅\n\nThis workshop will be a friendly beginner’s guide to AI and some of the ways it can be applied to fields outside of computer science. Everybody is welcome no matter your year, major, background, or experience (absolutely none needed)! See you there 🙂\n\n*Bruin card and symptom monitoring survey confirmation are required for entry.\n\nGraphic made by Daniel Dai.',links: [{text: 'Zoom Link',href: 'In-Person: Engineering IV Maxwell Room 57-124, Zoom: https://ucla.zoom.us/j/92812904150?pwd=QTFhRXF5ZmhUZG1Eb1VTbDI4WnlCZz09\nhttps://ucla.zoom.us/j/92812904150?pwd=QTFhRXF5ZmhUZG1Eb1VTbDI4WnlCZz09',ext: true},{text: 'Facebook Event',href: 'https://www.facebook.com/events/1584703548574057',ext: true}]},
{id: 105,title: 'Hack Sprint Mobile Development Series',allDay: false,start: 1643853600000,end: 1643860800000,location: 'Zoom',committee: 'hack',description: <>Week 5 is here and with it, the return of Hack Sprint!!! 🎉 🎉 Session 4 of our beginner-friendly iOS mobile development workshop is racing 🏃♀️ towards us, so be ready to join us in our relay race to learn everything you need to make your own iOS app 📱. 🚨 Join us Wednesday, February 2nd from 6-8 PM PST as we long jump into advanced views. Don’t know what those are? Come to session 4 and we’ll tell you all about navigation views, observable objects, protocols and more! 💜<br/><br/>Missed our last session?<br/>Check out the recording: <a href="https://youtu.be/qlHPOjy2lBs">https://youtu.be/qlHPOjy2lBs</a><br/>Here’s our comprehensive README: <a href="http://links.uclaacm.com/hacksprint22-s3">http://links.uclaacm.com/hacksprint22-s3</a></>,links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/93761587241?pwd=aWlsV3FxRzl6clVhRDQ0RHF4dmN6dz09',ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/3aBBJOKZx',ext: true}]},
{id: 107,title: 'CS32 Interview Track',allDay: false,start: 1643940000000,end: 1643947200000,location: 'Zoom',committee: 'icpc',description: "This week for ICPC's interview track we'll be holding open office hours for anyone who wants to do a mock interview or ask any questions! There won't be a presentation this week but feel free to stop by if you just want to chill!",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/91829572673?pwd=SG5ROHpXYWM4S0pXTUkrby9MbnhHZz09',ext: true}]},
{id: 108,title: 'Tech Ethics Series: Crypto',allDay: false,start: 1644022800000,end: 1644026400000,location: 'Zoom',committee: 'board',description: "Are you an aspiring crypto investor raring to decentralize finance 🔥🏦🔥? Have you been hearing way too much about NFTs and bitcoin and are wondering what all the fuss is about 🤨? Do you know these coins impact much more than just your pocket 👀? If so, join ACM Impact this Friday (1/4) from 5-6pm to learn about the ethics of cryptocurrency, from blockchain ⬛️⛓😤 to climate change 🌿🌡🥵! Zoom over to tinyurl.com/impact-ethics-series or we're headed to the moon w/o you 😭🚀🌝",links: [{text: 'Zoom Link', href: 'http://tinyurl.com/impact-ethics-series', ext: true}, {text: 'Facebook Event',href: 'https://www.facebook.com/events/362189072011265/',ext: true}]},
// week 6
{id: 100,title: 'Santa Monica Used Bookstore Run',allDay: false,start: 1644357600000,end: 1644368400000,location: 'Santa Monica (meet at Gayley & Le Conte)',committee: 'board',description: "Destress with some ~ retail therapy ~ and come to Santa Monica with the rest of ACM! Our main stop will be Book Monster, a used bookstore with a big (and cheap) collection! We'll also walk around the Promenade. Transportation will be via (free) public transit and/or cars; if you're interested, you can show up and/or RSVP to the Discord Event!",links: [{text: 'Discord Event',href: 'https://discord.com/events/702801010426511373/934957423876259930',ext: true}]},
{id: 101,title: 'Transfer Alumni Panel',allDay: false,start: 1644368400000,end: 1644372000000,location: 'Zoom',committee: 'board',description: 'Are you a transfer interested in working in tech ?? Whether you want to pursue a Master’s, work in UX/UI, or software engineering , we’ve got you covered! Come talk to our amazing panelists for some tips/tricks on navigating your transfer experience.\nEric is an alumni who majored in CS and has interned at Facebook X3 🥵. He transferred from UCSD, and was involved in UPE at UCLA. He’s now pursuing a masters at Cornell.\nLily is a recent graduate who transferred UCSC working at Tinder for UX/UI, and our last guest is a software engineer at…guess you’ll have to come to find out 😏\nCome next Tuesday (2/8) from 5-6 pm on zoom!!',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1tUx10HUT',ext: true}]},
{id: 102,title: 'Advanced Track',allDay: false,start: 1644458400000,end: 1644465600000,location: 'Zoom',committee: 'icpc',description: "In ICPC's Advanced Track, we submerge and dive deep into the world of algorithms and data structures, tackling ones often found in harder competitive programming problems. ICPC competitors, competitive programming fanatics, and anyone interested in expanding their programming brain are wholeheartedly invited to come and explore these awesome algorithmic wonders with us.\n\nThis Wednesday at 6:00, we'll be hosting a workshop about segment trees, a powerful tool to tackle all sorts of problems with. We hope you can make it!",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/3616763997',ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/4QVOk38pd',ext: true}]},
{id: 103,title: 'Beginner Track++',allDay: false,start: 1644458400000,end: 1644465600000,location: 'Zoom',committee: 'icpc',description: 'If masks keep us safe out in the world, imagine what they can do for your code! 👀🦠 A bit mask might not protect your code from bugs, but it can make it lighter, faster, and easier to work with! Beginner Track has never covered this powerful tool before 🙊 so come to this ~*super beginner friendly*~ workshop to learn the never before shared secrets of the bit mask!',links: [{text: 'Zoom Link',href: 'In-Person: 2760 Boelter Hall, Zoom: https://ucla.zoom.us/j/97210316561',ext: true}]},
{id: 104,title: 'CS32 Interview Track',allDay: false,start: 1644544800000,end: 1644552000000,location: 'Zoom',committee: 'icpc',description: "Wanna learn how to ace your technical interviews? Come to ICPC's Winter Interview Workshop, where we'll be going over data structures and algorithms to prep for your next coding interview! Get ready to become BOOSTED(™) 🤠😎 with some s l i c c problem-solving skills, so you'll nail those interview problems real q u i c c. This week we’ll focus on recursion and dynamic programming, and solving some of the most complicated problems from interviews.",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/91829572673?pwd=SG5ROHpXYWM4S0pXTUkrby9MbnhHZz09',ext: true}]},
{id: 105,title: 'Cyber Academy | Smart Contracts',allDay: false,start: 1644544800000,end: 1644552000000,location: 'Young Hall 4216 and Zoom',committee: 'cyber',description: 'Crypto currencies are everywhere these days, but have you ever wondered how they work? Join our workshop to find out about how smart contracts automate the exchange of crypto currencies! By the end, you might even learn enough to make the next 🐶 Dogecoin!\n\nNote: This meeting will be held in person (WOO) so if you plan on attending, please wear a mask and bring your ID + completed symptom monitoring survery! Otherwise, hope to see you on Zoom! ',links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/95081428653?pwd=am9rb2JuK25LVmFMT3NxaHJyV3J6Zz09',ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/2ahAFrgz9',ext: true}]},
{id: 107,title: 'Hack Sprint Mobile Development Series',allDay: false,start: 1644458400000,end: 1644465600000,location: 'Zoom',committee: 'hack',description: <>🎉 Session 5 of Hack Sprint is here, and with it comes the start of our 400m sprint to the finish line 🏁! Join us at this week’s beginner-friendly iOS mobile development workshop as we pole vault into data and networking. We’ll talk about URLSession and 🔥Firebase🔥, and get you ready and steady to make your own iOS app this quarter. 🚨 Join us Wednesday, February 9th from 6-8 PM PST! Hope to see you there! 💜<br/><br/>Missed our last session?<br/>Check out the recording:<a href="https://youtu.be/s_MPo0ISL-4">https://youtu.be/s_MPo0ISL-4</a><br/>Here’s our comprehensive README: <a href="http://links.uclaacm.com/hacksprint22-s4">http://links.uclaacm.com/hacksprint22-s4</a></>,links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/93761587241?pwd=aWlsV3FxRzl6clVhRDQ0RHF4dmN6dz09',ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/1BmNFqil6',ext: true}]},
// week 7
{id: 100,title: 'Advanced Track',allDay: false,start: 1645063200000,end: 1645070400000,location: 'Zoom',committee: 'icpc',description: "In ICPC's Advanced Track, we submerge and dive deep into the world of algorithms and data structures, tackling ones often found in harder competitive programming problems. ICPC competitors, competitive programming fanatics, and anyone interested in expanding their programming brain are wholeheartedly invited to come and explore these awesome algorithmic wonders with us.\n\nWe invite you to come to our last workshop of the quarter this Wednesday at 6:00 to learn about the exciting world of maximum flow (and minimum cut) problems!",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/3616763997',ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/4QVOk38pd',ext: true}]},
{id: 101,title: 'CS32 Interview Track',allDay: false,start: 1644544800000,end: 1644552000000,location: 'Zoom',committee: 'icpc',description: "Want to ace your technical interviews? Come to ICPC's Winter Interview Workshop! This week, we'll focus on trees and graphs, covering useful techniques for this extremely common class of problems.\n\nGet ready to become BOOSTED(™) 🤠😎 with some s l i c c problem-solving skills, so you'll nail those interview problems real q u i c c.",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/91829572673?pwd=SG5ROHpXYWM4S0pXTUkrby9MbnhHZz09',ext: true}]},
{id: 102,title: 'Beginner Track++',allDay: false,start: 1645063200000,end: 1645070400000,location: 'Engineering VI, Room 472 and Zoom',committee: 'icpc',description: 'Join us in worshipping our lord and savior, Dynamic Programming, this Wednesday @ 6! 😌🙏 This extremely powerful technique will allow you to turn exponential solutions linear with a wave of your hand, and solve problems that may currently have you mystified...! Intrigued? You should be! Can’t wait to see you there :)',links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/97210316561',ext: true}]},
{id: 103,title: 'ACM-W Undergraduate Menttorship Reboot',allDay: false,start: 1645149600000,end: 1645153200000,location: 'Math Science Building, RM 5117',committee: 'w',description: "Welcome back to campus friends 🏫 Come join us for our amazing Undergraduate Mentorship Reboot, where we will be talking about topics ranging from diversity in tech 💻, finding internships/research 🐱💻, and imposter syndrome followed by a Q&A panel. We're excited to see you all there 🤩",links: [{text: 'Facebook Event',href: 'https://fb.me/e/1nY6gSI6u',ext: true}]},
{id: 104,title: 'Cyber Academy | Steganography',allDay: false,start: 1645149600000,end: 1645156800000,location: 'Young Hall 4216 and Zoom',committee: 'cyber',description: 'We’ve all heard the saying “a picture is worth a thousand words”, but did you know that a picture could actually contain a top secret message? Come to our Steganography workshop to learn how you, too, can hide your messages in plain sight within an image, audio file, or even a physical object!\n\nNote: This meeting will be held in person (WOO) so if you plan on attending, please wear a mask and bring your ID + completed symptom monitoring survery! Otherwise, hope to see you on Zoom! ',links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/95081428653?pwd=am9rb2JuK25LVmFMT3NxaHJyV3J6Zz09',ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/1w0Omv01e ',ext: true}]},
{id: 105,title: 'Guest Speaker (Carey Nachenberg)',allDay: false,start: 1645066800000,end: 1645070400000,location: 'Engineering VI 289 and Zoom',committee: 'cyber',description: 'Have you heard of cybersecurity but have no idea what it really is? Are you interested in learning what a security engineer does (and why it’s where all the money’s at 🤑)? Or maybe, do you just love Carey 😍? Come out to our Industry Talk featuring our very own Professor Carey Nachenberg as he shares with us his experiences in cybersecurity 🔓 and his role at companies like Symantec 😎 and Google’s Chronicle 😳. You don’t want to miss it 🔥!',links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/98818892523?pwd=MVVuVXNTQm5YenJPdGl5RE5rVXR1QT09 ',ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/1qfxVJjMt',ext: true}]},
{id: 106,title: 'Explore: Tech & Society - Digital Citizenship',allDay: false,start: 1645146000000,end: 1645149600000,location: 'Boelter 2763 (the ACM Clubhouse)',committee: 'board',description: 'Do civil rights and liberties exist in a digital landscape? Are we considered citizens of the Internet? If so, are the rules and liberties of “digital citizenship” necessary? Whose responsibility is it to regulate digital platforms so our "rights" are not violated? Discuss these questions (and get some free food! 🍪) at the first of three Explore: Tech & Society discussions on Thursday, February 17th from 5:00 - 6:00 at Boelter 2763 (the ACM Clubhouse)! ✨',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1ppTpxsTg',ext: true}]},
{id: 107,title: 'Hack Sprint Mobile Development Series',allDay: false,start: 1645063200000,end: 1645070400000,location: 'Boelter 2760',committee: 'hack',description: <>It's Valentine's Day, so… will you be our 💜 Valentine 💜?<br/>We'd love to ‘sprint’ more time with you at Session 6 of Hack Sprint 🏃, ACM Hack's beginner-friendly iOS mobile development workshop! This week, Eugene Lo, our very own Hack president and creator of the Detox session jingle (for you folks who took CS 32 with Nachenberg) will be giving a mini-talk 🎤 about uploading your iOS app to the app store. Additionally, this session will have dedicated work time for you to start building your own iOS app📱!!! 🚨<br/>Join this Wednesday, February 16th from 6-8 PM PST at Boelter 2760 just in Valen-time for Hack Sprint! Don't forget to fill out the RSVP form! We'd ‘relay’ love to see you there! 💜<br/>RSVP: <a href="https://forms.gle/WiotyMA5cV3vehMv6">https://forms.gle/WiotyMA5cV3vehMv6</a><br/>Missed our last session?<br/>Check out the recording: <a href="https://youtu.be/g8YQ9iSOvwo">https://youtu.be/g8YQ9iSOvwo</a><br/>Here's our comprehensive README: <a href="http://links.uclaacm.com/hacksprint22-s5">http://links.uclaacm.com/hacksprint22-s5</a></>,links: [{text: 'Facebook Event',href: 'https://fb.me/e/1ypLcKhsG',ext: true}]},
{id: 109,title: 'ACM Explore Quantum Workshop Series',allDay: false,start: 1645066800000,end: 1645074000000,location: 'ACM Clubhouse (Boelter 2763) and Zoom',committee: 'board',description: <>Checkout ACM's beginner-friendly Qu-Bites 💫Quantum Computing 💫Workshop Series! Probe the field of quantum computing with a 💼mini-project💼, learn about quantum phenomena and gates, and come out for 🍪food🍪 Wednesday!<br/><br/>ACM Moonshots presents ACM Explore, a new initiative covering underexplored topics in CS! This quarter, our topic is Quantum Computing! We'll be going over the mathematical and physics background during the workshops, so anyone is welcome regardless of background! During this workshop series, we will cover quantum gates, the applications of quantum computing, and building your first quantum circuit and algorithm!<br/><br/>Come out to our second workshop on Wednesday 2/16 at 7pm in Boelter 2763 (ACM clubhouse) or on Zoom to learn more! Free food will be provided for attendees!<br/><br/>Missed our last workshop? Here's the recording: <a href="https://tinyurl.com/acm-qc-1">https://tinyurl.com/acm-qc-1</a></>,links: [{text: 'Zoom Link', href: 'https://tinyurl.com/acm-qc-zoom', ext: true},{text: 'Facebook Event',href: 'https://www.facebook.com/events/428022309108485/',ext: true}]},
{id: 110,title: 'Tech Ethics Series: Data Ethics',allDay: false,start: 1645232400000,end: 1645236000000,location: 'ACM Clubhouse (Boelter 2763) and Zoom',committee: 'board',description: 'Are you looking to break into data science and wonder what being a data scientist entails? ⁉️From algorithmic bias 😵 to data privacy 🤳, come to the ACM Clubhouse (Boelter 2763) or zoom in this Friday 2/18 from 5-6PM for a beginner-friendly workshop on data ethics 🤩 See you there!',links: [{text: 'Zoom Link', href: 'http://tinyurl.com/impact-ethics-series', ext: true}]},
{id: 111,title: 'Cyber x ICPC Puzzle Hunt',allDay: false,start: 1645151400000,end: 1645160400000,location: 'EVI 289',committee: 'icpc-cyber',description: <>The long awaited, ACM Cyber and ICPC collaboration event is here! Take a break from solving your daily WORDLE, and come out to try your hand at some riddles and brain teasers created by your favorite ACM officers. This year all the puzzles are Club Penguin themed. Get ready for some nostalgia because these problems have puffles, secret missions, card dojo and more. Whether you are a practiced puzzle solver, die hard club penguin fan, or someone just looking to make their Week 7 Thursday more fun, come on out to Puzzle Hunt!! Did we mention prizes up to $90?!<br/><br/>To get an idea of what kind of puzzles you will see at Puzzle Hunt, help Captain Rockhopper find a locker combination in this puzzle: <a href="https://icpc.uclaacm.com/puzzlehunt">https://icpc.uclaacm.com/puzzlehunt</a>. Submit your answers and get a chance to win an Amazon gift card! Too easy? Come out on Thursday to solve more challenging and interesting problems. Make sure to RSVP on <a href="https://forms.gle/n4VsBwi9LnQURo5A8">https://forms.gle/n4VsBwi9LnQURo5A8</a><br/><br/>P.S. There is no CS knowledge or coding experience needed for these problems. We wrote these problems on Google Docs :)</>,links: [{text: 'RSVP Link', href: 'https://forms.gle/n4VsBwi9LnQURo5A8', ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/6cqZTe8EU',ext: true}]},
// week 8
{id: 100,title: 'Beginner Track++',allDay: false,start: 1645063200000,end: 1645070400000,location: 'Engineering VI, Room 472 and Zoom',committee: 'icpc',description: 'Join us in worshipping our lord and savior, Dynamic Programming, this Wednesday @ 6! 😌🙏 This extremely powerful technique will allow you to turn exponential solutions linear with a wave of your hand, and solve problems that may currently have you mystified...! Intrigued? You should be! Can’t wait to see you there :)',links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/97210316561',ext: true}]},
{id: 101,title: 'CS32 Interview Track',allDay: false,start: 1645754400000,end: 1645761600000,location: 'Zoom',committee: 'icpc',description: "This week for ICPC's interview track we'll be holding open office hours for anyone who wants to do a mock interview or ask any questions! There won't be a presentation this week but feel free to stop by if you just want to chill!",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/91829572673?pwd=SG5ROHpXYWM4S0pXTUkrby9MbnhHZz09',ext: true}]},
{id: 102,title: 'Build an RPG: Shop',allDay: false,start: 1645585200000,end: 1645589700000,location: 'Zoom',committee: 'studio',description: <>Want to learn how to make Pokémon 👀? This week, we'll be creating a shop so that you can use coins to buy whatever you want - weapons, potions, etc.! Even if you've already attended tutorials last quarter, we'll be covering new topics and connecting all the tutorials in this track to create the framework for an ✨ RPG. ✨ Don't worry if you have not attended the past tutorials! You can find all the packages you need on Github (<a href="https://github.com/uclaacm/studio-beginner-tutorials">https://github.com/uclaacm/studio-beginner-tutorials</a>).</>,links: [{text: 'Zoom Link', href: 'https://zoom.us/j/99049255714?pwd=WjhNWno3MS9YZ3kreG51UmR4VFkyUT09', ext: true}]},
{id: 103,title: 'Testing in Unity',allDay: false,start: 1645671600000,end: 1645676100000,location: 'Zoom',committee: 'studio',description: "You've done it. You've just finished implementing that last enemy behavior script that you've been at for the past 5 hours. It's 3 AM and your head is throbbing from all the vector math Brackeys walked you through. But it's all over now. With a sigh of relief, you sit back and click the play button to watch all of your hard work in action. Unity pauses for a second... and then BOOM! your screen is engulfed in red as your console log gets absolutely obliterated by nullref exceptions. Your heart sinks as you realize you're gonna be at your desk for another 5 hours.\n\nYes, that's happened to all of us before. Testing regularly and thoroughly is the key to avoiding unfortunate surprises at the last minute and for tracking down slippery bugs that can take ages to locate otherwise. Join us this Wednesday from 7:00 - 8:15 PM PST at the zoom link provided to learn about how Unity's unit testing framework can be used to keep your games in check all throughout the development process!",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/92719137254',ext: true}]},
{id: 104,title: 'Industry Speaker: Tim Ford',allDay: false,start: 1645754400000,end: 1645765200000,location: 'Engineering VI 289',committee: 'studio',description: "Curious about AAA game development? Please join us on Feb. 24, 6:00-9:00 PM PST in ENG VI 289 to hear from UCLA alumnus TIM FORD who was a Lead Programmer for Blizzard Entertainment's multiplayer shooter Overwatch and oversaw a team of engineers responsible for game simulation, animation, UI, and AI, while working on all aspects of gameplay code. Before joining Blizzard in 2009, he was also a Lead Animation and AI Programmer for EA's Medal of Honor series. We understand that 3 hours is a large time commitment, but you are welcome to attend any part of the event!\n6:00 - 7:00 PM - Presentation on Tim's introduction to game development, time at UCLA, advice for getting into the games industry\n7:00 - 8:00 PM - Q&A\n8:00 - 9:00 PM - Open showcase for any developers/teams to share their games with Tim!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/651917402721714',ext: true}]},
{id: 105,title: 'coronAvIrus',allDay: false,start: 1645668000000,end: 1645673400000,location: 'Dodd Hall Room 170',committee: 'ai',description: 'Tired of hearing about coronavirus? Well how about coronAvIrus!? If you’re interested in learning about AI in the context of COVID-19, look no further than coronAvIrus, a panel hosted by UCLA ACM AI in collaboration with Professor Quanquan Gu on Wednesday, February 23 from 6-7:30 PM at Dodd Hall Room 170! Professor Gu and his team will be discussing their work at UCLA’s Statistical Machine Learning Lab so come out to ask questions and to learn about how it’s like working in a lab!\n\nWe’ll be diving deeper into how AI has helped in developing preventative and tracking methods 💉, what we’ve learned AI can and can’t do in the context of pandemics 🦠, and more 🤭!\n\nEverybody is welcome to join no matter your year, major, background or experience (absolutely none needed)! See you there :)\n\n*Bruin card and symptom monitoring survey confirmation are required for entry.',links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/666703241148818',ext: true}]},
{id: 106,title: 'CTF After Dark Kickoff',allDay: false,start: 1645754400000,end: 1645761600000,location: 'Young Hall 4216',committee: 'cyber',description: 'BEep beep? Boop boop BeeP Bop?\nYou’ve been training 🏋️all quarter (¼) long for this. You’ve been walking from your bed 😴to your computer 💻 to Young Hall ⛪️ for this 🥵. You’re tired 😣. Mom’s spaghetti 🍝. But you don’t care 🙅🙅♀️🙅♂️. Your megamind brain 🧠 is ready for anything that comes your way. You, my dear friend 🦌, are an absolute unit.\nBeep! Boop Beep Boop!\nCome play our 🚩 Capture the Flag (CTF) 🚩competition on Forensics 🕵️♀️👨💻 and FLEX 💪 off all that you’ve learned from our workshops this Winter ❄️. Winners 🏅will be rewarded 👀.\nCTF AD kickoff 🦵 🚫🔛 is this Thursday, February 24 in Young Hall 4216, and the competition will last till the following Thursday! ~ Come come ~, and as Abraham Lincoln 🎩 would say, “Be there or be square 🟨.”',links: [{text: 'Facebook Event',href: 'https://fb.me/e/38P6BedjG',ext: true}]},
{id: 107,title: 'Explore: Tech & Society - Fireside Chat with Apurva Panse',allDay: false,start: 1645750800000,end: 1645754400000,location: 'Zoom',committee: 'board',description: "Interested in working in working at Google or going to law school? Apurva Panse successfully pursued both! Come ask her questions about working in tech, pursuing law with a background in tech, and more at our fireside chat! 🔥\n\nApurva is a first-year student at NYU Law and is interested in protecting civil rights in the digital age. She graduated from UCLA in 2018 with an undergraduate degree in computer science. At UCLA, she was involved in ACM, Camp Kesem, and was the head learning assistant for Smallberg's intro computer science courses. Prior to starting law school, Apurva worked for several years at Google and YouTube. \n",links: [{text: 'Zoom Link', href: 'https://bit.ly/explorefiresidechat', ext: true}]},
{id: 108,title: 'Hack Sprint Mobile Development Series',allDay: false,start: 1645668000000,end: 1645675200000,location: 'Boelter 2760',committee: 'hack',description: <>We're racing towards the finish line, so join us for one final sprint 🏃 at ACM Hack's Hack Sprint. 🚨This Wednesday, February 23 from 6-8 PM PST at Boelter 2760 we'll be having a special guest speaker! Kevin Tan, a full-time iOS developer 👨🏻💻 for a startup called Raya (and former ACM president), will be giving a talk 🎤 about what it's like being an iOS developer, what it entails, and how he developed the skills necessary for the job both inside and outside of the classroom. Afterwards, you can hang out and chill or join our work session for people who are working on building their very own iOS app📱!!! Don't forget to fill out the RSVP form! We look forward to seeing you! 💜<br/><br/>RSVP: <a href="http://links.uclaacm.com/hacksprint22-s7-rsvp">http://links.uclaacm.com/hacksprint22-s7-rsvp</a></>,links: [{text: 'Facebook Event',href: 'https://fb.me/e/1xictx2Yn',ext: true}]},
// week 9
{id: 101,title: 'Explore: Tech & Society - Digital Privacy Discussion with Philosophy Club',allDay: false,start: 1646186400000,end: 1646190000000,location: 'Dodd 399',committee: 'board',description: 'What should tech companies be able to do with our data? How trustworthy are our favorite services? Who’s responsibility is it to regulate digital platforms? Discuss these questions and more at our collaboration with the Undergraduate Philosophy Club! ✨',links: []},
{id: 102,title: 'CS32 Interview Track',allDay: false,start: 1646359200000,end: 1646366400000,location: 'Zoom',committee: 'icpc',description: "This week we'll be holding a contest! We'll be providing problems based on topics from previous workshops. The top 3 winners will be eligible to win prizes!",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/91829572673?pwd=SG5ROHpXYWM4S0pXTUkrby9MbnhHZz09',ext: true}]},
{id: 103,title: 'Students Run Studios Winter Showcase',allDay: false,start: 1646535600000,end: 1646542800000,location: 'Hybrid on Discord and TBD physical location',committee: 'studio',description: "We're one quarter into Studio's flagship program Students Run Studios (SRS), in which teams of students develop indie games! At this showcase, we'll celebrate the progress of our twelve teams this year, and you'll have the opportunity to ask individual teams more questions about their development process in person and also in the Discord server. We will have questions about each game, and for each correct answer you submit, you earn a raffle ticket for a $10 Amazon gift card.",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/1423025621477688',ext: true}]},
{id: 104,title: 'Hack Sprint Mobile Development Series',allDay: false,start: 1646272800000,end: 1646280000000,location: 'Boelter 2760',committee: 'hack',description: <>This is it, you made it to the end! 🏁 Congrats!! 🎉 🎉 Join us this Wednesday, March 2 from 6-8PM PST at Boelter 2760 for a 🍕pizza party🍕! Hang out and chill at the end of the quarter and see what people have been working on during the quarter with our Hack Sprint Project Showcase. Be inspired by cool apps, cool people, and even cooler food 🙃. As always, please remember to fill out our RSVP form, and we can't wait to see you all there! 💜<br/><br/>RSVP: <a href="http://links.uclaacm.com/hacksprint22-s8-rsvp">http://links.uclaacm.com/hacksprint22-s8-rsvp</a></>,links: [{text: 'Facebook Event',href: 'https://fb.me/e/5mbh1ckHu',ext: true}]},
{id: 105,title: 'ACM-W ConScience: Women in the Tech Industry',allDay: false,start: 1646272800000,end: 1646276400000,location: 'Ackerman Union 2410',committee: 'w',description: "Hey hey hey! Come out for ACM-W's second installment of conScience for the quarter! Join us this Wednesday as we learn about the current state and recent history of women in the tech industry! We'll be discussing topics like: \r\n- What women have contributed to the tech world 🌐\r\n- Important women currently involved in tech 🖥️\r\nWe hope to see you there as we discuss this fascinating topic 💗",links: [{text: 'Facebook Event',href: 'https://fb.me/e/1ClT3RDtK',ext: true}]},
{id: 106,title: 'Engineering & CS Luncheon with the Venture Accelerator at UCLA Anderson',allDay: false,start: 1646940600000,end: 1646944200000,location: 'UCLA Anderson School of Management North Terrace',committee: 'board',description: 'Are you interested in entrepreneurship? Do you want to work with companies out of Anderson? Or, do you just want some FREE FOOD? Join us for a free Engineering & CS x Anderson lunch and network with some startup founders and VCs! To attend, you must RSVP on the Eventbrite!',links: [{text: 'Eventbrite',href: 'https://www.eventbrite.com/e/engineering-cs-luncheon-with-the-venture-accelerator-at-ucla-anderson-tickets-277775151957',ext: true}]},
{id: 101,title: 'ACM Game Night',allDay: false,start: 1646535600000,end: 1646542800000,location: ' Sunset Village Learning Center',committee: 'board',description: " Tired after midterms? 😭 Feeling burnt out after CS 32 Project 3? ☠️ Is school just NOT IT right now?\r\nMaybe you’ve been thinking about making new friends…🧑🏻Trying to find that one study buddy that becomes something more than a buddy🙋♀️🙋♀️🙋♀️?!?!? Hopefully, even find the one…\r\nIf so, join us for ACM Game Night at Sunset Village Learning Center 🌅 on Saturday, March 5, 2022, from 7-9PM PST. You can engage in board games, play with the Switch, watch TV, play poker, and more!\r\nThere will also be 🍪🍪🍪INSOMNIA COOKIES🍪🍪🍪for everyone attending. Come chat, interact with others, and make some new friends!\r\nSee you there!!\r\n(It's located @ Delta Terrace next to Cafe 1919 & the Housing Mail Center)",links: [{text: 'Facebook Event',href: ' https://fb.me/e/6ApmQxTbc',ext: true}]},
{id: 102,title: 'Studio Game Night Social',allDay: false,start: 1649556000000,end: 1649561400000,location: 'Engineering VI 289',committee: 'studio',description: 'Studio Game Night is back! Join Studio this Friday from 7:00 - 9:00 PM at Engineering VI 289 for some chill vibes. Meet up with your fellow SRS team members or meet new people apart of the Studio community. There will be snacks and board games, so come through for a fun break from school before midterms! 🤩',links: []},
// Week 3 S22
{id: 100,title: 'Cyber Academy: Reverse Engineering and Dynamic Analysis',allDay: false,start: 1649898000000,end: 1649905200000,location: 'Bunche Hall 3211 (zoom link TBA in Cyber Discord)',committee: 'cyber',description: 'Want to learn about examining computer memory during program execution? Need help with your CS projects? Come to our workshop this week to learn all about dynamic analysis! Whether you want to learn the fundamentals or already know a bit and are just looking for tips and tricks to make your life easier, we can help!',links: [{text: 'Facebook Event',href: 'none',ext: true}]},
{id: 101,title: 'Hot Tech Tour ',allDay: false,start: 1649898000000,end: 1649905200000,location: 'Boelter 9436',committee: 'hack',description: "For the first time ever, ACM Hack is putting on a 🔥 LIT 🔥 new workshop/competition series called Hot Tech Tour! Throughout the quarter, we'll introduce several technologies such as Git and Svelte, show you the ropes, and then pit you against each other in our fast paced competition sessions! If you're interested in cool technologies that go beyond what you'll learn in class and challenging puzzles that will test your new knowledge, then come on out to Hot Tech Tour Wednesdays 6-8 PM in Boelter 9436. Our first session will be Wednesday, April 13th and it will cover Git, VS Code, and the Shell. See you there!",links: [{text: 'Facebook Event',href: 'https://fb.me/e/2ZUSMdlHj',ext: true}]},
{id: 102,title: 'Beginner Track++ Workshop #1',allDay: false,start: 1649898000000,end: 1649905200000,location: 'Kerckhoff Hall Meeting Room 133',committee: 'icpc',description: 'Get your engines revving and your wheels rolling, because ICPC is zooming into another quarter of exhilarating competitive programming workshops! Get your feet wet in the vast realm of competitive coding with our Beginner Track++ workshop series on Wednesdays at 6pm in Kerckhoff Hall Meeting Room 133. This week we will be kicking off with an introductory workshop chalk-full of coding tips, problem-solving strategies, and mind-bending practice problems that are sure to get you psyched for competitive programming. Be there or be to the power of two! (Intended for people with roughly CS31 or CS32 experience)',links: [{text: 'Facebook Event',href: 'none',ext: true}]},
{id: 103,title: 'Interview Track Workshop #2',allDay: false,start: 1649984400000,end: 1649991600000,location: 'Engineering VI Room 289',committee: 'icpc',description: "Wanna learn how to ace your technical interviews? 👀 Come to ICPC's Spring Interview Workshop, where we'll be going over 🦖 data structures, algorithm, and proper coding techniques 🦖 to prep for your next coding interview! Regardless of whether you already have an internship or not, this workshop will be very useful for the 🔅current 🔅 AND ⚠️ upcoming application season ⚠️ too (because some applications start ridiculously early in this field ) 🥴😩. This workshop will cover algorithms for graphs 📈 and trees 🌲 , such as BFS/DFS, and practice problems in related topics. We will also be holding the first mock interviews 👩🏻💼👨🏻💻 of the quarter at the end of the workshop! The workshop is held at Engineering VI 289 on Thursday (4/14) at 6PM. We can’t wait to see you there!! 🥳🤩",links: [{text: 'Facebook Event',href: 'none',ext: true}]},
{id: 105,title: 'Spring Officer Applications',allDay: false,start: 1650005940000,end: 1650005940000,location: 'Application Form',committee: 'board',description: 'Spring has sprung and so have ACM Spring Officer Applications! Some ACM Committees are looking for officers this Spring so apply if you would like to be an ACM Officer! You will join a community of kind and dedicated students that are passionate about Computer Science. Applications are due this Thursday (April 14, 2022). All experience levels are welcome!',links: [{text: 'Application Form', href: 'https://forms.gle/SRkRD8G6xhXoqzSc9', ext: true},{text: 'Facebook Event',href: 'https://fb.me/e/2mSVKmVdW',ext: true}]},
// Week 4 S22
{id: 100,title: 'Mini Game Jam',allDay: false,start: 1650420000000,end: 1650427200000,location: 'MS 5127',committee: 'studio',description: "Interested in adding your own touch to games but don't have that much time on your hands or have little experience building games? Then ACM Studio's first ever Mini Game Jam on Tuesday April 19th at MS 5127 is perfect for you! We'll work in small teams on understanding and adding new features to a game which was previously submitted in a Game Jam. You'll have the freedom to implement any features you'd like while having others around you to help work through any issues you may come across. Depending on your level of interest, some things you could experiment with are adding new movement mechanics, animation events, post-processing effects, and enemy or map generation. No experience is necessary!",links: [{text: 'Facebook Event',href: 'N/A',ext: true}]},
{id: 101,title: 'Beginner Track++ Workshop #2',allDay: false,start: 1650506400000,end: 1650513600000,location: 'ACM Clubhouse',committee: 'icpc',description: 'Get your engines revving and your wheels rolling, because ICPC is zooming into another quarter of exhilarating competitive programming workshops! Get your feet wet in the vast realm of competitive coding with our Beginner Track++ workshop series on Wednesdays at 6pm in Kerckhoff Hall Meeting Room 133. This week we will be continuing on from our intro/ad hoc workshop and into the wild world of graph theory... Be ready for hidden graph definitions, feral graph search algorithms, and some rare graphical coding problems! Be there or be to the power of two! (Intended for people with roughly CS31 or CS32 experience)',links: [{text: 'Facebook Event',href: 'none',ext: true}]},
{id: 102,title: 'Cyber Academy: Buffer Overflow and Binary Exploitstion',allDay: false,start: 1650502800000,end: 1650510000000,location: 'Bunche 3211 and Zoom',committee: 'cyber',description: 'Ever wanted to be able to modify a program to arbitrarily execute your own code? Well you’re in luck! Come to our workshop on buffer overflow and binary exploitation in week 4 to learn more about how to take advantage of the stack using non-arbitrated input.',links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/94178019377',ext: true}]},
{id: 103,title: 'Hot Tech Tour:',allDay: false,start: 1650502800000,end: 1650510000000,location: 'Boelter 9436',committee: 'hack',description: 'This week Hack is back with another session of HOT TECH TOUR, but this time with a twist :0 This Wednesday from 6-8pm in Boelter 9436, we will be putting you head to head with other workshop attendees to see how much you learned last week! There will be fun puzzles that involve scripting and the shell, so make sure to study up! And of course, there will be food 👺.\r\nDon’t forget to RSVP!\r\nSee you there!\r\n',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1J7bXudPj',ext: true}, {text: 'RSVP Link', href: 'http://links.uclaacm.com/HotTechTour-s2-RSVP', ext: true}]},
{id: 104,title: 'Video Game Music with Robby Good',allDay: false,start: 1650592800000,end: 1650600000000,location: 'Boelter 5422',committee: 'studio',description: 'Come chat with Robby, a 4th year music composition and percussion performance major, about what kinds of thought processes and considerations go into making video game music, such as genre, mood, and more! Bring your questions about video game scenarios and situations that would need music or sound design. :)',links: []},
{id: 105,title: 'Interview Track Office Hours',allDay: false,start: 1650589200000,end: 1650596400000,location: 'Zoom',committee: 'icpc',description: "Wanna learn how to ace your technical interviews? 👀 Come to ICPC's Spring Interview Workshop, where we'll be going over 🦖 data structures, algorithm, and proper coding techniques 🦖 to prep for your next coding interview! This week we will be holding office hours to answer any questions you may have about previous workshops, or in general! We will be online, Thursday (4/21) at 6PM. We can’t wait to see you there!! 🥳🤩",links: [{text: 'Zoom Link',href: 'https://ucla.zoom.us/j/94219232675',ext: true}]},
{id: 106,title: 'Movie Night',allDay: false,start: 1650679200000,end: 1650686400000,location: 'Engineering VI 289',committee: 'studio',description: "Want to find some inner peace to cope with the onslaught of midterms? Looking for the secret ingredient to acing all your midterms? Come to Studio's Movie Night from 7-9 PM this Friday, April 22 tentatively at Eng VI 289! We'll be watching Kung Fu Panda ",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/groups/uclaacmstudio/posts/4976379645783901/',ext: true}]},
{id: 108,title: 'HackSpace: Project Liftoff',allDay: false,start: 1650589200000,end: 1650596400000,location: 'Math Sciences 6229',committee: 'hack',description: "📡Hailing all HackSpace teams! This is mission control—your operations are a go! Welcome to the second session of HackSpace! So far, we have focussed on helping you condense your nebulous 🌌 app ideas into concentrated brilliance. Now, we’re gonna get you, your team, and your project on the path to going supernova 🌠 with a dedicated work session with full access to our entire team of mentors and some team-building games 🎮. So maybe midterm season’s getting you down, but sa-turn 🪐 your frowns upside down, cus we’ve got Diddy Riese cookies 🍪 that you’ll undoubtedly gravitate towards and some truly astronomical vibes! 🔭 🚨🚨Come out and join us this Thursday April 21 from 6-8 PM at Mathematical Sciences 6229. It’ll be all ☀️sun☀️ and games!! Missed last week's session? Get caught up with the session slides",links: [{text: 'Facebook Event',href: 'https://fb.me/e/1gBQwyAA4',ext: true}, {text: 'Session Slides', href: 'http://links.uclaacm.com/session-2', ext: true}]},
// Week 5 S22
{id: 100,title: 'Beginner Track++ Workshop #3',allDay: false,start: 1651111200000,end: 1651118400000,location: 'ACM Clubhouse (Across from Boelter 2760)',committee: 'icpc',description: 'Get your engines revving and your wheels rolling, because ICPC is zooming into another quarter of exhilarating competitive programming workshops! Get your feet wet in the vast realm of competitive coding with our Beginner Track++ workshop series on Wednesdays at 7pm in the ACM Clubhouse across from Boelter 2760. This week we will be continuing with our two-part graph theory crash course with our Advanced Graph Theory Workshop. Come to learn more about graph traversal algorithms, trees, cycle detection, and topological sorting! Be there or be to the power of two! (Intended for people with roughly CS31 or CS32 experience)',links: [{text: 'Facebook Event',href: 'https://fb.me/e/1NaX8aoxN',ext: true}]},
{id: 101,title: 'Interview Track Workshop #3',allDay: false,start: 1651194000000,end: 1651201200000,location: 'Engineering VI Room 289',committee: 'icpc',description: "Wanna learn how to ace your technical interviews? 👀 Come to ICPC's Spring Interview Workshop, where we'll be going over 🦖 data structures, algorithm, and proper coding techniques 🦖 to prep for your next coding interview! This weeks workshop will cover the applications of binary search and binary search trees! The workshop is held at Engineering VI 289 on Thursday (4/28) at 6PM. We can’t wait to see you there!! 🥳🤩",links: [{text: 'Facebook Event',href: 'https://fb.me/e/1KEarFAfu',ext: true}]},
{id: 102,title: 'Advanced Track: Collaborative Coding',allDay: false,start: 1651197600000,end: 1651204800000,location: 'Boelter 5422',committee: 'studio',description: "In the industry, you're rarely ever going to be building games alone. Come join us this Thursday to learn about some of the tools and techniques for coding in parallel with other developers and then apply it all in a 4-day mini project with your peers!",links: [{text: 'Facebook Event',href: 'https://www.facebook.com/events/338378608300208',ext: true}]},
];
export default events;
|
packages/cf-component-radio/example/basic/component.js | koddsson/cf-ui | import React from 'react';
import { Radio, RadioUnstyled, RadioTheme, RadioGroup } from '../../src/index';
import { applyTheme } from 'cf-style-container';
const RadioGroupItem = applyTheme(RadioUnstyled, RadioTheme, () => ({
cursor: 'initial'
}));
class RadioComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
radioValue: 'option1'
};
this.onRadioChange = this.onRadioChange.bind(this);
}
onRadioChange(val) {
this.setState({
radioValue: val
});
}
render() {
return (
<div>
<p>
You can create them individually with <code>Radio</code>
</p>
<Radio
label="Option 1"
name="radio-option-1"
value="option1"
checked={this.state.radioValue === 'option1'}
onChange={this.onRadioChange}
/>
<Radio
label="Option 2"
name="radio-option-2"
value="option2"
checked={this.state.radioValue === 'option2'}
onChange={this.onRadioChange}
/>
<p>
Or as a group with <code>RadioGroup</code>
</p>
<RadioGroup value={this.state.radioValue} onChange={this.onRadioChange}>
<RadioGroupItem
label="Option 1"
name="group-option-1"
value="option1"
/>
<RadioGroupItem
label="Option 2"
name="group-option-2"
value="option2"
/>
</RadioGroup>
<p>
You can also disable a label by passing <code>false</code> explicitly
</p>
<Radio
label={false}
name="radio-option-1-no-label"
value="option1"
checked={this.state.radioValue === 'option1'}
onChange={this.onRadioChange}
/>
</div>
);
}
}
export default RadioComponent;
|
lib/ui/src/modules/ui/components/layout/index.js | rhalff/storybook | import { localStorage, window } from 'global';
import PropTypes from 'prop-types';
import React from 'react';
import SplitPane from 'react-split-pane';
import throttle from 'lodash.throttle';
import USplit from './usplit';
import Dimensions from './dimensions';
const rootStyle = {
height: '100vh',
backgroundColor: '#F7F7F7',
};
const storiesPanelStyle = (showStoriesPanel, storiesPanelOnTop) => ({
width: '100%',
display: showStoriesPanel ? 'flex' : 'none',
flexDirection: storiesPanelOnTop ? 'column' : 'row',
alignItems: 'stretch',
paddingRight: storiesPanelOnTop ? 10 : 0,
});
const addonPanelStyle = (showAddonPanel, addonPanelInRight) => ({
display: showAddonPanel ? 'flex' : 'none',
flexDirection: addonPanelInRight ? 'row' : 'column',
alignItems: 'stretch',
position: 'absolute',
width: '100%',
height: '100%',
padding: addonPanelInRight ? '5px 10px 10px 0' : '0px 10px 10px 0',
boxSizing: 'border-box',
});
const resizerCursor = isVert => (isVert ? 'col-resize' : 'row-resize');
const storiesResizerStyle = (showStoriesPanel, storiesPanelOnTop) => ({
cursor: showStoriesPanel ? resizerCursor(!storiesPanelOnTop) : undefined,
height: storiesPanelOnTop ? 10 : 'auto',
width: storiesPanelOnTop ? '100%' : 10,
zIndex: 1,
});
const addonResizerStyle = (showAddonPanel, addonPanelInRight) => ({
cursor: showAddonPanel ? resizerCursor(addonPanelInRight) : undefined,
height: addonPanelInRight ? '100%' : 10,
width: addonPanelInRight ? 10 : '100%',
zIndex: 1,
});
const contentPanelStyle = (addonPanelInRight, storiesPanelOnTop) => ({
position: 'absolute',
boxSizing: 'border-box',
width: '100%',
height: '100%',
padding: addonPanelInRight ? '10px 2px 10px 0' : '10px 10px 2px 0',
paddingTop: storiesPanelOnTop ? 0 : 10,
});
const normalPreviewStyle = {
width: '100%',
height: '100%',
backgroundColor: '#FFF',
border: '1px solid #ECECEC',
borderRadius: 4,
};
const fullScreenPreviewStyle = {
position: 'fixed',
left: '0px',
right: '0px',
top: '0px',
zIndex: 1,
backgroundColor: '#FFF',
height: '100%',
width: '100%',
border: 0,
margin: 0,
padding: 0,
WebkitOverflowScrolling: 'touch',
};
const overlayStyle = isDragging => ({
display: isDragging ? 'block' : 'none',
position: 'absolute',
top: '0px',
right: '0px',
bottom: '0px',
left: '0px',
});
const previewPaneStyle = {
overflow: 'auto',
};
const defaultSizes = {
addonPanel: {
down: 200,
right: 400,
},
storiesPanel: {
left: 250,
top: 400,
},
};
const saveSizes = sizes => {
try {
localStorage.setItem('panelSizes', JSON.stringify(sizes));
return true;
} catch (e) {
return false;
}
};
const getSavedSizes = sizes => {
try {
const panelSizes = localStorage.getItem('panelSizes');
if (panelSizes) {
return JSON.parse(panelSizes);
}
saveSizes(sizes);
return sizes;
} catch (e) {
saveSizes(sizes);
return sizes;
}
};
class Layout extends React.Component {
constructor(props) {
super(props);
this.layerSizes = getSavedSizes(defaultSizes);
this.state = {
previewPanelDimensions: {
height: 0,
width: 0,
},
isDragging: false,
};
this.throttledUpdatePreviewPanelState = throttle(this.updatePrevewPanelState.bind(this), 200);
this.throttledSaveSizes = throttle(this.saveSizes, 25);
this.onDragStart = this.onDragStart.bind(this);
this.onDragEnd = this.onDragEnd.bind(this);
}
componentDidMount() {
window.addEventListener('resize', this.throttledUpdatePreviewPanelState);
}
componentWillUnmount() {
window.removeEventListener('resize', this.throttledUpdatePreviewPanelState);
}
onDragStart() {
this.setState({ isDragging: true });
}
onDragEnd() {
this.setState({ isDragging: false });
}
onResize(pane, mode, size) {
this.throttledSaveSizes(pane, mode, size);
this.throttledUpdatePreviewPanelState();
}
saveSizes(pane, mode, size) {
this.layerSizes[pane][mode] = size;
saveSizes(this.layerSizes);
}
updatePrevewPanelState() {
const { clientWidth, clientHeight } = this.previewPanelRef;
this.setState({
previewPanelDimensions: {
width: clientWidth,
height: clientHeight,
},
});
}
render() {
const {
goFullScreen,
showStoriesPanel,
showAddonPanel,
addonPanelInRight,
addonPanel,
storiesPanel,
preview,
} = this.props;
const { previewPanelDimensions } = this.state;
const storiesPanelOnTop = false;
let previewStyle = normalPreviewStyle;
if (goFullScreen) {
previewStyle = fullScreenPreviewStyle;
}
const sizes = getSavedSizes(this.layerSizes);
const storiesPanelDefaultSize = !storiesPanelOnTop
? sizes.storiesPanel.left
: sizes.storiesPanel.top;
const addonPanelDefaultSize = !addonPanelInRight
? sizes.addonPanel.down
: sizes.addonPanel.right;
const addonSplit = addonPanelInRight ? 'vertical' : 'horizontal';
const storiesSplit = storiesPanelOnTop ? 'horizontal' : 'vertical';
return (
<div style={rootStyle}>
<SplitPane
split={storiesSplit}
allowResize={showStoriesPanel}
minSize={150}
maxSize={-400}
size={showStoriesPanel ? storiesPanelDefaultSize : 1}
defaultSize={storiesPanelDefaultSize}
resizerStyle={storiesResizerStyle(showStoriesPanel, storiesPanelOnTop)}
onDragStarted={this.onDragStart}
onDragFinished={this.onDragEnd}
onChange={size => this.onResize('storiesPanel', storiesPanelOnTop ? 'top' : 'left', size)}
>
<div style={storiesPanelStyle(showStoriesPanel, storiesPanelOnTop)}>
<div style={{ flexGrow: 1, height: '100%', width: '100%' }}>{storiesPanel()}</div>
<USplit shift={5} split={storiesSplit} />
</div>
<SplitPane
split={addonSplit}
allowResize={showAddonPanel}
primary="second"
minSize={addonPanelInRight ? 200 : 100}
maxSize={-200}
size={showAddonPanel ? addonPanelDefaultSize : 1}
defaultSize={addonPanelDefaultSize}
resizerStyle={addonResizerStyle(showAddonPanel, addonPanelInRight)}
onDragStarted={this.onDragStart}
onDragFinished={this.onDragEnd}
onChange={size =>
this.onResize('addonPanel', addonPanelInRight ? 'right' : 'down', size)
}
pane1Style={previewPaneStyle}
>
<div style={contentPanelStyle(addonPanelInRight, storiesPanelOnTop)}>
{/*
When resizing panels, the drag event breaks if the cursor
moves over the iframe. Show an overlay div over iframe
at drag start and hide it when the drag ends.
*/}
<div style={overlayStyle(this.state.isDragging)} />
<div
style={previewStyle}
ref={ref => {
this.previewPanelRef = ref;
}}
>
{preview()}
</div>
<Dimensions {...previewPanelDimensions} />
</div>
<div style={addonPanelStyle(showAddonPanel, addonPanelInRight)}>
<USplit shift={-5} split={addonSplit} />
{addonPanel()}
</div>
</SplitPane>
</SplitPane>
</div>
);
}
}
Layout.propTypes = {
showStoriesPanel: PropTypes.bool.isRequired,
showAddonPanel: PropTypes.bool.isRequired,
goFullScreen: PropTypes.bool.isRequired,
storiesPanel: PropTypes.func.isRequired,
preview: PropTypes.func.isRequired,
addonPanel: PropTypes.func.isRequired,
addonPanelInRight: PropTypes.bool.isRequired,
};
export default Layout;
|
packages/shared/forks/Scheduler.umd.js | TheBlasfem/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import React from 'react';
const ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
const {
unstable_cancelCallback,
unstable_now,
unstable_scheduleCallback,
unstable_shouldYield,
unstable_requestPaint,
unstable_getFirstCallbackNode,
unstable_runWithPriority,
unstable_next,
unstable_continueExecution,
unstable_pauseExecution,
unstable_getCurrentPriorityLevel,
unstable_ImmediatePriority,
unstable_UserBlockingPriority,
unstable_NormalPriority,
unstable_LowPriority,
unstable_IdlePriority,
unstable_forceFrameRate,
// this doesn't actually exist on the scheduler, but it *does*
// on scheduler/unstable_mock, which we'll need inside act().
unstable_flushAllWithoutAsserting,
} = ReactInternals.Scheduler;
export {
unstable_cancelCallback,
unstable_now,
unstable_scheduleCallback,
unstable_shouldYield,
unstable_requestPaint,
unstable_getFirstCallbackNode,
unstable_runWithPriority,
unstable_next,
unstable_continueExecution,
unstable_pauseExecution,
unstable_getCurrentPriorityLevel,
unstable_ImmediatePriority,
unstable_UserBlockingPriority,
unstable_NormalPriority,
unstable_LowPriority,
unstable_IdlePriority,
unstable_forceFrameRate,
unstable_flushAllWithoutAsserting,
};
|
blueocean-material-icons/src/js/components/svg-icons/av/subtitles.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const AvSubtitles = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z"/>
</SvgIcon>
);
AvSubtitles.displayName = 'AvSubtitles';
AvSubtitles.muiName = 'SvgIcon';
export default AvSubtitles;
|
clients/libs/webpage/src/lib/ux/tell-a-friend-base/whatsapp-share-button.js | nossas/bonde-client | import PropTypes from 'prop-types'
import React from 'react'
import { FormattedMessage } from 'react-intl'
import classnames from 'classnames'
import { isMobile } from 'react-device-detect'
const WhatsAppShareButton = ({ whatsappText }) => {
const baseUrl = isMobile ? 'whatsapp://' : 'https://api.whatsapp.com/'
return (
<a
className={classnames('btn white h3 p3 col-12 caps h5 rounded border-box')}
href={`${baseUrl}send?text=${encodeURIComponent(whatsappText)}`}
style={{ backgroundColor: '#4CEC68', color: '#fff' }}
>
<FormattedMessage
id='share.components--whatsapp-share-button.text'
defaultMessage='Compartilhar no WhatsApp'
/>
</a>
)
}
WhatsAppShareButton.propTypes = {
whatsappText: PropTypes.string
}
export default WhatsAppShareButton
|
node_modules/antd/es/table/util.js | prodigalyijun/demo-by-antd | import _toConsumableArray from 'babel-runtime/helpers/toConsumableArray';
import React from 'react';
import assign from 'object-assign';
import ColumnGroup from './ColumnGroup';
export function flatArray() {
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var childrenName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'children';
var result = [];
var loop = function loop(array) {
array.forEach(function (item) {
var newItem = assign({}, item);
delete newItem[childrenName];
result.push(newItem);
if (item[childrenName] && item[childrenName].length > 0) {
loop(item[childrenName]);
}
});
};
loop(data);
return result;
}
export function treeMap(tree, mapper) {
var childrenName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'children';
return tree.map(function (node, index) {
var extra = {};
if (node[childrenName]) {
extra[childrenName] = treeMap(node[childrenName], mapper, childrenName);
}
return assign({}, mapper(node, index), extra);
});
}
export function flatFilter(tree, callback) {
return tree.reduce(function (acc, node) {
if (callback(node)) {
acc.push(node);
}
if (node.children) {
var children = flatFilter(node.children, callback);
acc.push.apply(acc, _toConsumableArray(children));
}
return acc;
}, []);
}
export function normalizeColumns(elements) {
var columns = [];
React.Children.forEach(elements, function (element) {
if (!React.isValidElement(element)) {
return;
}
var column = assign({}, element.props);
if (element.key) {
column.key = element.key;
}
if (element.type === ColumnGroup) {
column.children = normalizeColumns(column.children);
}
columns.push(column);
});
return columns;
} |
src/WebRoot/Scripts/components/App.js | Techbot/RockPaperScissorsReactRedux | // React component
import React from 'react';
import Player from './Player.js';
import Machine from './Machine.js';
// React component
var Counter = React.createClass( {
render(){
const { value,
value2,
totalScore,
machine_rocks,
machine_papers,
machine_scissors,
machineChoice,
onCompareStates,
onIncreaseClick,
data,
player_rocks,
player_papers,
player_scissors
} = this.props;
return (
<span>
<div id = "player" className="col-lg-4">
<span>Player:{value}</span>
</div>
<button onClick={onIncreaseClick}>Increase</button>
<div id = "computer" className="col-lg-4">
<span>Computer:{value2}</span>
</div>
<span>Score:{totalScore}</span>
<button onClick={onCompareStates}>Submit</button>
<Player player_rocks={player_rocks} player_papers={player_papers} player_scissors={player_scissors}/>
<Machine machine_rocks={machine_rocks} machine_papers={machine_papers} machine_scissors={machine_scissors}/>
</span>
);
}
});
export default Counter; |
node_modules/react-bootstrap/es/CarouselItem.js | skinsshark/skinsshark.github.io | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import classNames from 'classnames';
import React from 'react';
import ReactDOM from 'react-dom';
import TransitionEvents from './utils/TransitionEvents';
// TODO: This should use a timeout instead of TransitionEvents, or else just
// not wait until transition end to trigger continuing animations.
var propTypes = {
direction: React.PropTypes.oneOf(['prev', 'next']),
onAnimateOutEnd: React.PropTypes.func,
active: React.PropTypes.bool,
animateIn: React.PropTypes.bool,
animateOut: React.PropTypes.bool,
index: React.PropTypes.number
};
var defaultProps = {
active: false,
animateIn: false,
animateOut: false
};
var CarouselItem = function (_React$Component) {
_inherits(CarouselItem, _React$Component);
function CarouselItem(props, context) {
_classCallCheck(this, CarouselItem);
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));
_this.handleAnimateOutEnd = _this.handleAnimateOutEnd.bind(_this);
_this.state = {
direction: null
};
_this.isUnmounted = false;
return _this;
}
CarouselItem.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
if (this.props.active !== nextProps.active) {
this.setState({ direction: null });
}
};
CarouselItem.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
var _this2 = this;
var active = this.props.active;
var prevActive = prevProps.active;
if (!active && prevActive) {
TransitionEvents.addEndEventListener(ReactDOM.findDOMNode(this), this.handleAnimateOutEnd);
}
if (active !== prevActive) {
setTimeout(function () {
return _this2.startAnimation();
}, 20);
}
};
CarouselItem.prototype.componentWillUnmount = function componentWillUnmount() {
this.isUnmounted = true;
};
CarouselItem.prototype.handleAnimateOutEnd = function handleAnimateOutEnd() {
if (this.isUnmounted) {
return;
}
if (this.props.onAnimateOutEnd) {
this.props.onAnimateOutEnd(this.props.index);
}
};
CarouselItem.prototype.startAnimation = function startAnimation() {
if (this.isUnmounted) {
return;
}
this.setState({
direction: this.props.direction === 'prev' ? 'right' : 'left'
});
};
CarouselItem.prototype.render = function render() {
var _props = this.props;
var direction = _props.direction;
var active = _props.active;
var animateIn = _props.animateIn;
var animateOut = _props.animateOut;
var className = _props.className;
var props = _objectWithoutProperties(_props, ['direction', 'active', 'animateIn', 'animateOut', 'className']);
delete props.onAnimateOutEnd;
delete props.index;
var classes = {
item: true,
active: active && !animateIn || animateOut
};
if (direction && active && animateIn) {
classes[direction] = true;
}
if (this.state.direction && (animateIn || animateOut)) {
classes[this.state.direction] = true;
}
return React.createElement('div', _extends({}, props, {
className: classNames(className, classes)
}));
};
return CarouselItem;
}(React.Component);
CarouselItem.propTypes = propTypes;
CarouselItem.defaultProps = defaultProps;
export default CarouselItem; |
src/routes/contact/Contact.js | quyetvv/react-starter-kit | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-types';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './Contact.css';
class Contact extends React.Component {
static propTypes = {
title: PropTypes.string.isRequired,
};
render() {
return (
<div className={s.root}>
<div className={s.container}>
<h1>{this.props.title}</h1>
<p>...</p>
</div>
</div>
);
}
}
export default withStyles(s)(Contact);
|
node_modules/react-bootstrap/es/Jumbotron.js | ASIX-ALS/asix-final-project-frontend | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import classNames from 'classnames';
import elementType from 'react-prop-types/lib/elementType';
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
var propTypes = {
componentClass: elementType
};
var defaultProps = {
componentClass: 'div'
};
var Jumbotron = function (_React$Component) {
_inherits(Jumbotron, _React$Component);
function Jumbotron() {
_classCallCheck(this, Jumbotron);
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
Jumbotron.prototype.render = function render() {
var _props = this.props,
Component = _props.componentClass,
className = _props.className,
props = _objectWithoutProperties(_props, ['componentClass', 'className']);
var _splitBsProps = splitBsProps(props),
bsProps = _splitBsProps[0],
elementProps = _splitBsProps[1];
var classes = getClassSet(bsProps);
return React.createElement(Component, _extends({}, elementProps, {
className: classNames(className, classes)
}));
};
return Jumbotron;
}(React.Component);
Jumbotron.propTypes = propTypes;
Jumbotron.defaultProps = defaultProps;
export default bsClass('jumbotron', Jumbotron); |
src/components/dropdown/Dropdown.js | ipfs-shipyard/peerpad | import React from 'react'
import PropTypes from 'prop-types'
import Overlay from './Overlay'
import Menu from './Menu'
/*
* Dropdown & DropdownMenu
*
* Usage:
* <Dropdown>
* <button onClick={() => this.setState({open: true})}>Fire!</button>
* <DropdownMenu width={200} open={this.state.open}>
* <div>Option 1</div>
* <div>Option 2</div>
* </DropdownMenu>
* </Dropdown>
*/
export const Dropdown = ({children, className}) => (
<div className={`dib ${className || ''}`}>
{children}
</div>
)
// `open` is used to show and hide the menu
// `top` is used to move the menu and arrow down.
const Container = ({open, top = 0, children}) => (
<div style={{
display: open ? null : 'none',
position: 'relative',
top
}} data-id='dropdown-menu'>
{children}
</div>
)
// An arrow tip that appears at the top middle of the dropdown menu
const MenuArrowUp = ({height = 12, align = 'center', marginLeft = 'auto', marginRight = 'auto'}) => {
const side = Math.round(Math.sqrt(2) * height)
return (
<div style={{
zIndex: 600,
position: 'absolute',
height: `${height}px`,
top: `-${height}px`,
textAlign: align,
overflow: 'hidden',
width: '30px',
right: 0
}}>
<div style={{
display: 'inline-block',
position: 'relative',
width: `${side}px`,
height: `${side}px`,
transform: `translate(0, ${height / 2}px) rotate(45deg)`,
borderRadius: '2px 0 0 0',
background: 'white',
left: marginLeft,
right: marginRight,
boxShadow: '0px 1px 10px 0px rgba(0,0,0,0.20)'
}} />
</div>
)
}
// An arrow tip that appears at the bottom middle of the dropdown menu
const MenuArrowDown = ({height = 12, align = 'center', marginLeft = 'auto', marginRight = 'auto'}) => {
const side = Math.round(Math.sqrt(2) * height)
return (
<div style={{
zIndex: 600,
width: '100%',
height: `${height + 5}px`,
textAlign: align,
overflow: 'hidden'
}}>
<div style={{
display: 'inline-block',
position: 'relative',
width: `${side}px`,
height: `${side}px`,
transform: `translate(0, ${height / 2}px) rotate(45deg)`,
borderRadius: '2px 0 0 0',
background: 'white',
boxShadow: '0px 1px 10px 0px rgba(0,0,0,0.20)',
top: `-${height + 2}px`,
left: marginLeft,
right: marginRight,
zIndex: 601
}} />
</div>
)
}
// `width` forces the width of the Menu.
// width is required to make other calculaitons possible.
// `left` is the pixels from the left edge of the trigger element...
// centered by default.
// `left={0}` would make the left of the menu inline with the left of the
// trigger element.
const MenuPosition = ({width, left = `calc(50% - ${width / 2}px)`, children}) => (
<div style={{
position: 'absolute',
width: `${width}px`,
right: 0
}}>
{children}
</div>
)
export const DropdownMenu = ({open, width, left, top = 0, arrowHeight = 12, arrowPosition = 'top', arrowAlign, arrowMarginLeft, arrowMarginRight, onDismiss, children}) => {
return (
<Container open={open} top={top + arrowHeight}>
<Overlay onClick={onDismiss} />
<MenuPosition width={width} left={left}>
{arrowPosition === 'top' && <MenuArrowUp height={arrowHeight} align={arrowAlign} marginLeft={arrowMarginLeft} marginRight={arrowMarginRight} />}
<Menu>
{children}
</Menu>
{arrowPosition === 'bottom' && <MenuArrowDown height={arrowHeight} align={arrowAlign} marginLeft={arrowMarginLeft} marginRight={arrowMarginRight} />}
</MenuPosition>
</Container>
)
}
DropdownMenu.propTypes = {
open: PropTypes.bool.isRequired,
width: PropTypes.number.isRequired,
left: PropTypes.number,
top: PropTypes.number,
arrowHeight: PropTypes.number,
arrowAlign: PropTypes.oneOf(['left', 'center', 'right']),
arrowMarginTop: PropTypes.number,
arrowMarginBottom: PropTypes.number,
onDismiss: PropTypes.func,
children: PropTypes.node
}
|
src/svg-icons/device/gps-off.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceGpsOff = (props) => (
<SvgIcon {...props}>
<path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06c-1.13.12-2.19.46-3.16.97l1.5 1.5C10.16 5.19 11.06 5 12 5c3.87 0 7 3.13 7 7 0 .94-.19 1.84-.52 2.65l1.5 1.5c.5-.96.84-2.02.97-3.15H23v-2h-2.06zM3 4.27l2.04 2.04C3.97 7.62 3.25 9.23 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c1.77-.2 3.38-.91 4.69-1.98L19.73 21 21 19.73 4.27 3 3 4.27zm13.27 13.27C15.09 18.45 13.61 19 12 19c-3.87 0-7-3.13-7-7 0-1.61.55-3.09 1.46-4.27l9.81 9.81z"/>
</SvgIcon>
);
DeviceGpsOff = pure(DeviceGpsOff);
DeviceGpsOff.displayName = 'DeviceGpsOff';
DeviceGpsOff.muiName = 'SvgIcon';
export default DeviceGpsOff;
|
pootle/static/js/shared/components/FormValueInput.js | phlax/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
import AutosizeTextarea from './AutosizeTextarea';
const FormValueInput = React.createClass({
propTypes: {
handleChange: React.PropTypes.func.isRequired,
autosize: React.PropTypes.bool,
type: React.PropTypes.string,
value: React.PropTypes.string,
},
getDefaultProps() {
return {
autosize: true,
};
},
handleChange(e) {
this.props.handleChange(e.target.name, e.target.value);
},
render() {
if (this.props.type === 'textarea') {
if (this.props.autosize) {
return (
<AutosizeTextarea
onChange={this.handleChange}
{...this.props}
/>
);
}
return (
<textarea
onChange={this.handleChange}
{...this.props}
/>
);
}
return <input onChange={this.handleChange} {...this.props} />;
},
});
export default FormValueInput;
|
docs/src/sections/NavbarSection.js | HPate-Riptide/react-bootstrap | import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
import ReactPlayground from '../ReactPlayground';
import Samples from '../Samples';
export default function NavbarSection() {
return (
<div className="bs-docs-section">
<h2 className="page-header">
<Anchor id="navbars">Navbars</Anchor> <small>Navbar</small>
</h2>
<p>Navbars are responsive meta components that serve as navigation headers for your application or site.</p>
<p>
They also support all the different Bootstrap classes as properties. Just camelCase
the css class and remove navbar from it.
</p>
<p>
For example <code>navbar-fixed-top</code> becomes the property <code>fixedTop</code>.
The different properties are <code>fixedTop</code>, <code>fixedBottom</code>, <code>staticTop</code>
, <code>inverse</code>, and <code>fluid</code>.
</p>
<p>
You can also align elements to the right by specifying the <code>pullRight</code> prop on
the <code>Nav</code>, and other sub-components.
</p>
<h3><Anchor id="navbars-basic">Navbar Basic Example</Anchor></h3>
<ReactPlayground codeText={Samples.NavbarBasic} />
<div className="bs-callout bs-callout-info">
<h4>Additional Import Options</h4>
<p>
The Navbar Header, Toggle, Brand, and Collapse components are available as static properties
on the <code>{"<Navbar/>"}</code> component but you can also import them directly from
the <code>/lib</code> directory
like: <code>{'require("react-bootstrap/lib/NavbarHeader")'}</code>.
</p>
</div>
<h3><Anchor id="navbars-mobile-friendly">Responsive Navbars</Anchor></h3>
<p>
To have a mobile friendly Navbar, Add a <code>Navbar.Toggle</code> to your Header and wrap your
Navs in a <code>Navbar.Collapse</code> component. The <code>Navbar</code> will automatically wire
the toggle and collapse together!
</p>
<p>
Set the <code>defaultExpanded</code> prop to make the Navbar start expanded. Set <code>collapseOnSelect</code> to make the Navbar collapse automatically when the user selects an item. You can also finely control the collapsing behavior by using the <code>expanded</code> and <code>onToggle</code> props.
</p>
<ReactPlayground codeText={Samples.NavbarCollapsible} />
<h3><Anchor id="navbars-form">Forms</Anchor></h3>
<p>
Use the <code>Navbar.Form</code> convenience component to apply proper margins and alignment to
form components.
</p>
<ReactPlayground codeText={Samples.NavbarForm} />
<h3><Anchor id="navbars-text-link">Text and Non-nav links</Anchor></h3>
<p>
Loose text and links can be wraped in the convenience
components: <code>Navbar.Link</code> and <code>Navbar.Text</code>
</p>
<ReactPlayground codeText={Samples.NavbarTextLink} />
<h3><Anchor id="navbar-props">Props</Anchor></h3>
<h4><Anchor id="navs-props-navbar">Navbar</Anchor></h4>
<PropTable component="Navbar"/>
<h4><Anchor id="navs-props-navbar-toggle">Navbar.Toggle</Anchor></h4>
<PropTable component="NavbarToggle"/>
</div>
);
}
|
examples/js/advance/demo.js | echaouchna/react-bootstrap-tab | /* eslint max-len: 0 */
import React from 'react';
import EditTypeTable from './edit-type-table';
import DataInsertTypeTable from './insert-type-table';
import AutoRowKeyTable from './auto-rowkey-table';
import ValidatorTable from './validator-table';
import HideOnInsertTable from './hide-on-insert-table';
import DisableToastrTable from './disable-toastr-table';
import renderLinks from '../utils';
import { Col, Panel } from 'react-bootstrap';
class Demo extends React.Component {
render() {
return (
<Col md={ 8 } mdOffset={ 1 }>
<Panel header={ 'Cell Edit Type Example(text, textarea, select, checkbox, datetime)' }>
{ renderLinks('advance/edit-type-table.js') }
<EditTypeTable/>
</Panel>
<Panel header={ 'Data Insert Type Example(text, textarea, select, checkbox)' }>
{ renderLinks('advance/insert-type-table.js') }
<DataInsertTypeTable/>
</Panel>
<Panel header={ 'Hide column on Insert Modal)' }>
{ renderLinks('advance/hide-on-insert-table.js') }
<h5>This example hide the Job Name field in insert modal</h5>
<HideOnInsertTable/>
</Panel>
<Panel header={ 'Auto RowKey on Data Insert Example' }>
{ renderLinks('advance/auto-rowkey-table.js') }
<AutoRowKeyTable/>
</Panel>
<Panel header={ 'Data Validator Example(Job Name length must great 10 char)' }>
{ renderLinks('advance/validator-table.js') }
<ValidatorTable/>
</Panel>
<Panel header={ 'Custom Display Validating Message' }>
{ renderLinks('advance/disable-toastr-table.js') }
<DisableToastrTable/>
</Panel>
</Col>
);
}
}
export default Demo;
|
client2/src/components/Video/components/video_detail.js | ibulmer/Board | import React, { Component } from 'react';
import Youtube from 'react-youtube';
export default class VideoDetail extends Component {
constructor(props){
super(props)
this.state={
player: null
}
this.setPlayer = this.setPlayer.bind(this);
this.sendPlayData = this.sendPlayData.bind(this);
this.playVideo = this.playVideo.bind(this);
this.sendPauseData = this.sendPauseData.bind(this);
this.pauseVideo = this.pauseVideo.bind(this);
}
componentDidMount() {
this.socket = io();
this.socket.on('playVideo', function (data) {
this.setState({term: data.term});
}.bind(this));
this.socket.on('recievePlay', this.playVideo);
this.socket.on('recievePause', this.pauseVideo);
}
setPlayer(event) {
this.setState({
player: event.target,
});
}
sendPlayData() {
this.socket.emit('sendPlay');
}
playVideo(){
this.state.player.playVideo();
}
sendPauseData() {
this.socket.emit('sendPause');
}
pauseVideo () {
this.state.player.pauseVideo();
}
render() {
if(!this.props.video){
return (
<img className="loading-styles" src="./media/spinner.gif" />
)
}
return (
<div className="video-detail col-md-12 animated slideInUp">
<div className="embed-responsive embed-responsive-16by9">
<Youtube
videoId={this.props.video.id.videoId}
onReady={this.setPlayer}
onPlay={this.sendPlayData}
onPause={this.sendPauseData}
/>
</div>
</div>
);
}
};
|
components/form/Input.js | resource-watch/resource-watch | import React from 'react';
import PropTypes from 'prop-types';
import FormElement from './FormElement';
class Input extends FormElement {
/**
* UI EVENTS
* - triggerChange
*/
triggerChange(e) {
this.setState({ value: e.currentTarget.value }, () => {
// Trigger validation
this.triggerValidate();
// Publish the new value to the form
if (this.props.onChange) this.props.onChange(this.state.value);
});
}
render() {
const { properties } = this.props;
return (
<input
{...properties}
value={this.state.value}
id={`input-${properties.name}`}
onChange={this.triggerChange}
/>
);
}
}
Input.propTypes = {
properties: PropTypes.object.isRequired,
validations: PropTypes.array,
onChange: PropTypes.func,
};
export default Input;
|
.archive-react/client/index.js | KyleKing/PiAlarm | import './styles/index.css'
import App from './App'
import React from 'react'
import ReactDOM from 'react-dom'
ReactDOM.render( <App />, document.getElementById( 'root' ) )
// import Alarms from './Alarms'
// import Auth from './Auth'
// Auth( 'SecretPass' ).then( () => {
// ReactDOM.render( <Alarms />, document.getElementById( 'root' ) )
// } )
|
local-cli/templates/HelloNavigation/components/ListItem.js | adamjmcgrath/react-native | 'use strict';
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
TouchableHighlight,
TouchableNativeFeedback,
View,
} from 'react-native';
/**
* Renders the right type of Touchable for the list item, based on platform.
*/
const Touchable = ({onPress, children}) => {
const child = React.Children.only(children);
if (Platform.OS === 'android') {
return (
<TouchableNativeFeedback onPress={onPress}>
{child}
</TouchableNativeFeedback>
);
} else {
return (
<TouchableHighlight onPress={onPress} underlayColor="#ddd">
{child}
</TouchableHighlight>
);
}
}
const ListItem = ({label, onPress}) => (
<Touchable onPress={onPress}>
<View style={styles.item}>
<Text style={styles.label}>{label}</Text>
</View>
</Touchable>
);
const styles = StyleSheet.create({
item: {
height: 48,
justifyContent: 'center',
paddingLeft: 12,
borderBottomWidth: StyleSheet.hairlineWidth,
borderBottomColor: '#ddd',
},
label: {
fontSize: 16,
}
});
export default ListItem;
|
pkg/interface/groups/src/js/components/lib/welcome.js | jfranklin9000/urbit | import React, { Component } from 'react';
export class Welcome extends Component {
constructor() {
super();
this.state = {
show: true
}
this.disableWelcome = this.disableWelcome.bind(this);
}
disableWelcome() {
this.setState({ show: false });
localStorage.setItem("urbit-groups:wasWelcomed", JSON.stringify(true));
}
render() {
let wasWelcomed = localStorage.getItem("urbit-groups:wasWelcomed");
if (wasWelcomed === null) {
localStorage.setItem("urbit-groups:wasWelcomed", JSON.stringify(false));
return wasWelcomed = false;
} else {
wasWelcomed = JSON.parse(wasWelcomed);
}
let contacts = !!this.props.contacts ? this.props.contacts : {};
return ((!wasWelcomed && this.state.show) && (contacts.length !== 0)) ? (
<div className="ma4 pa2 bg-welcome-green bg-gray1-d white-d">
<p className="f8 lh-copy">Each Group is a list of other Urbit IDs that share some set of modules: chats, links and notebooks.</p>
<p className="f8 pt2 dib pointer bb"
onClick={(() => this.disableWelcome())}>
Close this
</p>
</div>
) : <div />
}
}
export default Welcome
|
src/components/Booking/controls/DateRange.js | friasdesign/hotel-app--front-end | import React from 'react'
import InputText from './InputText'
import {required, dateFormatIsValid} from '../validators'
// TODO: Try with react-datepicker
const DateRange = (props) => {
return(
<div className="w-100 ma0 flex justify-between">
<InputText
{...props.check_in}
inputId={props.fromId}
labelId={props.fromLabelId}
labelText={props.fromLabel}
type="date"
validate={[required, dateFormatIsValid]}
/>
<InputText
{...props.check_out}
inputId={props.toId}
labelId={props.toLabelId}
labelText={props.toLabel}
type="date"
validate={[required, dateFormatIsValid]}
/>
</div>
)
}
export default DateRange
|
docs/src/pages/components/slider/DiscreteSlider.js | lgollut/material-ui | import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/core/Slider';
const useStyles = makeStyles({
root: {
width: 300,
},
});
function valuetext(value) {
return `${value}°C`;
}
export default function DiscreteSlider() {
const classes = useStyles();
return (
<div className={classes.root}>
<Typography id="discrete-slider" gutterBottom>
Temperature
</Typography>
<Slider
defaultValue={30}
getAriaValueText={valuetext}
aria-labelledby="discrete-slider"
valueLabelDisplay="auto"
step={10}
marks
min={10}
max={110}
/>
<Typography id="discrete-slider" gutterBottom>
Disabled
</Typography>
<Slider
defaultValue={30}
getAriaValueText={valuetext}
aria-labelledby="discrete-slider"
valueLabelDisplay="auto"
step={10}
marks
min={10}
max={110}
disabled
/>
</div>
);
}
|
src/NavLink.js | reactstrap/reactstrap | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
const propTypes = {
tag: tagPropType,
innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
disabled: PropTypes.bool,
active: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object,
onClick: PropTypes.func,
href: PropTypes.any,
};
const defaultProps = {
tag: 'a',
};
class NavLink extends React.Component {
constructor(props) {
super(props);
this.onClick = this.onClick.bind(this);
}
onClick(e) {
if (this.props.disabled) {
e.preventDefault();
return;
}
if (this.props.href === '#') {
e.preventDefault();
}
if (this.props.onClick) {
this.props.onClick(e);
}
}
render() {
let {
className,
cssModule,
active,
tag: Tag,
innerRef,
...attributes
} = this.props;
const classes = mapToCssModules(classNames(
className,
'nav-link',
{
disabled: attributes.disabled,
active: active
}
), cssModule);
return (
<Tag {...attributes} ref={innerRef} onClick={this.onClick} className={classes} />
);
}
}
NavLink.propTypes = propTypes;
NavLink.defaultProps = defaultProps;
export default NavLink;
|
time-app/src/DiceRoller.js | jongsoojong/timelement | import React, { Component } from 'react';
class DiceRoller extends Component{
constructor (props){
super(props);
this.state = {rollResult : 0}
}
d20 () {
var d20Result = Math.floor(Math.random() * 20+1);
this.setState({rollResult : d20Result});
};
d12 () {
var d12Result = Math.floor(Math.random() * 12+1);
this.setState({rollResult : d12Result});
}
d10 () {
var d10Result = Math.floor(Math.random() * 10+1);
this.setState({rollResult : d10Result});
}
d8 () {
var d8Result = Math.floor(Math.random() * 8+1);
this.setState({rollResult : d8Result});
};
d6() {
var d6Result = Math.floor(Math.random() * 6+1);
this.setState({rollResult : d6Result});
}
d4() {
var d4Result = Math.floor(Math.random() * 4+1);
this.setState({rollResult : d4Result});
}
componentDidMount() {
}
componentWillUnmount() {
}
render() {
return(
<div>
<h1>Le Excellent Dice Roller</h1>
<p> {this.state.rollResult}</p>
<button type="button" onClick={this.d20.bind(this)}>D20</button>
<button type="button" onClick={this.d12.bind(this)}>D12</button>
<button type="button" onClick={this.d10.bind(this)}>D10</button>
<button type="button" onClick={this.d8.bind(this)}>D8</button>
<button type="button" onClick={this.d6.bind(this)}>D6</button>
<button type="button" onClick={this.d4.bind(this)}>D4</button>
</div>
)
}
}
export default DiceRoller; |
src/main.js | modernserf/hashtags-for-humans | import 'babel/polyfill';
import 'whatwg-fetch';
import 'css/reset.css';
import 'css/style.css';
import {data as rawData, tags} from 'make-data';
import React from 'react';
import Main from 'views/Main';
class GameBoard {
constructor (params) {
this.people = params.people;
this.width = params.width;
this.height = params.height;
}
static create (people) {
return new GameBoard({
people: people.map((p) => Person.create(p)),
width: 6,
height: 4
});
}
get rows () {
return this.people.reduce((coll,p,i) => {
// start new row
if (i % this.width === 0) {
coll.push([p]);
} else {
// add to last row
coll[coll.length - 1].push(p);
}
return coll;
},[]);
}
query (q) {
return this.people.filter((p) => p.query(q));
}
}
class Person {
constructor (params) {
for (let p of ['name','picture','tags','row','col']) {
this[p] = params[p];
}
}
static create (params) {
return new Person({
name: params.name,
picture: params.picture,
tags: new Set(params.tags),
row: params.row,
col: params.col
});
}
// greenspun's 10th law
query (q) {
return quereval(this, q);
}
}
const id = (x) => x;
function and (...items) {
if (!items.length) { return false; }
return items.every(id);
}
function or (...items) {
if (!items.length) { return true; }
return items.some(id);
}
function not (...items) {
if (!items.length) { return true; }
return !items.some(id);
}
const quereval = (env, x) => {
if (!x || x.length === 0) {
return false;
}
// lol i guess this is a lisp-2
const fns = {
and, or, not
};
if (Array.isArray(x)) {
const [head, ...tail] = x;
return fns[head].apply(null, tail.map((t) => quereval(env, t)));
} else {
return env.tags.has(x);
}
};
const data = GameBoard.create(rawData);
const domLoaded = new Promise((resolve) => {
if (document.readyState === "complete") {
resolve();
} else {
window.addEventListener('DOMContentLoaded',resolve);
}
});
Promise.all([domLoaded]).then(() => {
React.render(
React.createFactory(Main)({
data: data,
tags: tags
}),
document.getElementById('app')
);
});
|
src/components/common/requireAuth.js | AleksandrRogachev94/chat-vote-go-frontend | import React from 'react'
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
import { browserHistory } from 'react-router'
import { addFlashMessage } from '../../actions/flashMessages'
import { getIsAuthenticated } from '../../reducers/index'
export default function(ComposedComponent) {
class Authenticate extends React.Component {
componentWillMount() {
if(!this.props.isAuthenticated) {
this.props.addFlashMessage({
type: 'error',
text: 'You need to login to access this page'
})
browserHistory.push('/login')
}
}
componentWillUpdate(nextProps) {
if(!nextProps.isAuthenticated) {
browserHistory.push('/')
}
}
render() {
if(this.props.isAuthenticated) {
return (<ComposedComponent {...this.props} />)
} else {
return (<p>Redirecting...</p>)
}
}
}
Authenticate.propTypes = {
isAuthenticated: PropTypes.bool.isRequired,
addFlashMessage: PropTypes.func.isRequired
}
const mapStateToProps = (state) => ({
isAuthenticated: getIsAuthenticated(state)
})
return connect(mapStateToProps, { addFlashMessage })(Authenticate)
}
|
src/component/homePage/component.js | Platane/january | import React from 'react'
import style from './style.css'
import { HorizontalPostList } from '../horizontalPostList'
import { VerticalPostList } from '../verticalPostList'
import type { Post as Post_type } from '../../../type'
import { primaryTags } from '../../reducer/selectedTag'
import { memoize } from '../../util/memoize'
export type Props = {
selectedTag: string,
posts: Array<Post_type>,
goToPost: () => *,
selectTag: (tag: string) => *,
loadMorePosts: (tag: string) => *,
device: 'palm' | 'desktop',
}
const createSelectTagHandler = memoize((selectTag, tag) => () =>
selectTag && selectTag(tag)
)
const createLoadMorePostsHandler = memoize((loadMorePosts, tag) => () =>
loadMorePosts && loadMorePosts(tag)
)
export const HomePage = ({
posts,
loadMorePosts,
selectedTag,
goToPost,
selectTag,
device,
}: Props) => (
<div className={style.container}>
{!selectedTag && (
<div className={style.section}>
<div
className={style.sectionLabel}
onClick={createSelectTagHandler(selectTag, 'world')}
>
World
</div>
<HorizontalPostList
goToPost={goToPost}
loadMorePosts={createLoadMorePostsHandler(
loadMorePosts,
'world'
)}
posts={posts.filter(({ tags }) => tags.includes('world'))}
/>
</div>
)}
{!selectedTag && (
<div className={style.section}>
<div
className={style.sectionLabel}
onClick={createSelectTagHandler(selectTag, 'essential')}
>
Essentials
</div>
<HorizontalPostList
goToPost={goToPost}
loadMorePosts={createLoadMorePostsHandler(
loadMorePosts,
'essential'
)}
posts={posts.filter(({ tags }) =>
tags.includes('essential')
)}
/>
</div>
)}
<div className={style.section}>
<div
className={style.sectionLabel}
onClick={
!selectedTag && createSelectTagHandler(selectTag, 'update')
}
>
{selectedTag ? (
(primaryTags.includes(selectedTag) ? '' : '#') + selectedTag
) : (
'updates'
)}
</div>
<VerticalPostList
goToPost={goToPost}
loadMorePosts={createLoadMorePostsHandler(
loadMorePosts,
primaryTags.includes(selectedTag || 'update')
? selectedTag || 'update'
: 'all'
)}
posts={posts.filter(({ tags }) =>
tags.includes(selectedTag || 'update')
)}
/>
</div>
</div>
)
|
data-browser-ui/public/app/components/tableComponents/td/listComponents/dateTimeList.js | CloudBoost/cloudboost | import React from 'react';
import ReactDOM from 'react-dom';
import DatePicker from 'material-ui/DatePicker';
import TimePicker from 'material-ui/TimePicker';
class DateTimeListComponent extends React.Component {
constructor(){
super()
this.state = {
}
}
deleteValue(){
this.props.removeFromElementData(this.props.index)
}
openInput(which){
this.refs[which].openDialog()
}
viewChangeDate(e,data){
let date = new Date(this.props.data)
date.setDate(data.getDate())
date.setFullYear(data.getFullYear())
date.setMonth(data.getMonth())
this.props.updateElementData(date,this.props.index)
}
dateFormat(date){
return new Date(date).toISOString().slice(0,10).replace(/-/g,"/") + ", " + new Date(date).getHours()+":"+new Date(date).getMinutes()
}
componentDidMount(){
}
render() {
let data = this.props.data
let currentDate = this.props.data ? new Date(this.props.data) : new Date()
return (
<div className="textlistinputcontainer">
<span className='fl datetimevaluelsist'>{ this.dateFormat(this.props.data) }</span>
<i className="fa fa-times trashlistinputdate" aria-hidden="true" onClick={ this.deleteValue.bind(this) }></i>
<i className="fa fa-calendar dateml" aria-hidden="true" onClick={this.openInput.bind(this,'InputDate')}></i>
<DatePicker id="date" ref="InputDate" className='pofixedvishide' onChange={this.viewChangeDate.bind(this)} value={currentDate} style={{zIndex:3000}} container="inline"/>
</div>
);
}
}
export default DateTimeListComponent; |
src/Button/FloatingButton.js | skystebnicki/chamel | import React from 'react';
import PropTypes from 'prop-types';
import Button from './Button';
/**
* Functional component for any floating action button
*
* @param props
* @returns {ReactDOM}
* @constructor
*/
const FloatingButton = props => {
return (
<Button type={'floating'} {...props}>
{props.children}
</Button>
);
};
/**
* Set accepted properties
*/
FloatingButton.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
disabled: PropTypes.bool,
href: PropTypes.string,
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
inverse: PropTypes.bool,
label: PropTypes.string,
onMouseLeave: PropTypes.func,
onMouseUp: PropTypes.func,
onTap: PropTypes.func,
};
/**
* Set property defaults
*/
FloatingButton.defaultProps = {
className: '',
};
/**
* An alternate theme may be passed down by a provider
*/
FloatingButton.contextTypes = {
chamelTheme: PropTypes.object,
};
export default FloatingButton;
|
src/svg-icons/image/dehaze.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageDehaze = (props) => (
<SvgIcon {...props}>
<path d="M2 15.5v2h20v-2H2zm0-5v2h20v-2H2zm0-5v2h20v-2H2z"/>
</SvgIcon>
);
ImageDehaze = pure(ImageDehaze);
ImageDehaze.displayName = 'ImageDehaze';
ImageDehaze.muiName = 'SvgIcon';
export default ImageDehaze;
|
src/svg-icons/device/dvr.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceDvr = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12zm-2-9H8v2h11V8zm0 4H8v2h11v-2zM7 8H5v2h2V8zm0 4H5v2h2v-2z"/>
</SvgIcon>
);
DeviceDvr = pure(DeviceDvr);
DeviceDvr.displayName = 'DeviceDvr';
DeviceDvr.muiName = 'SvgIcon';
export default DeviceDvr;
|
src/applications/caregivers/definitions/UIDefinitions/veteranUI.js | department-of-veterans-affairs/vets-website | import React from 'react';
import {
FacilityInfo,
PleaseSelectVAFacility,
} from 'applications/caregivers/components/AdditionalInfo';
import { createUSAStateLabels } from 'platform/forms-system/src/js/helpers';
import { states } from 'platform/forms/address';
import get from 'platform/utilities/data/get';
import { veteranFields } from '../constants';
import {
medicalCenterLabels,
medicalCentersByState,
facilityNameMaxLength,
} from 'applications/caregivers/helpers';
const emptyFacilityList = [];
const stateLabels = createUSAStateLabels(states);
// veteran UI
export const vetInputLabel = 'Veteran\u2019s';
export const previousTreatmentFacilityUI = {
'ui:title': ' ',
'ui:order': ['name', 'type'],
'ui:description': (
<div>
<h3 className="vads-u-font-size--h4">Recent medical care</h3>
<p>
Please enter the name of the medical facility where the Veteran
<strong className="vads-u-margin-left--0p5">
last received medical treatment.
</strong>
</p>
</div>
),
name: {
'ui:required': formData => !!formData.veteranLastTreatmentFacility.type,
'ui:validations': [
{
validator: (errors, fieldData, formData) => {
facilityNameMaxLength(errors, formData);
},
},
],
'ui:title': 'Name of medical facility',
},
type: {
'ui:required': formData => !!formData.veteranLastTreatmentFacility.name,
'ui:title': 'Was this a hospital or clinic?',
'ui:options': {
labels: {
hospital: 'Hospital',
clinic: 'Clinic',
},
},
},
};
// TODO: naming super confusing need to update
export const preferredFacilityView = {
'ui:description': PleaseSelectVAFacility(),
veteranFacilityState: {
'ui:title': 'State',
'ui:options': {
labels: stateLabels,
},
},
plannedClinic: {
'ui:title': 'VA medical center',
'ui:options': {
labels: medicalCenterLabels,
updateSchema: form => {
const state = get(
`${[veteranFields.preferredFacilityView]}.${[
veteranFields.preferredFacilityStateView,
]}`,
form,
);
if (state) {
return {
enum: medicalCentersByState[state] || emptyFacilityList,
};
}
return {
enum: emptyFacilityList,
};
},
},
},
};
// TODO: naming super confusing need to update
export const veteranPreferredFacility = {
'ui:title': ' ',
'ui:widget': FacilityInfo,
};
|
src/scenes/home/signup/signup.js | NestorSegura/operationcode_frontend | import React, { Component } from 'react';
import axios from 'axios';
import _ from 'lodash';
import PropTypes from 'prop-types';
import * as CookieHelpers from 'shared/utils/cookieHelper';
import Form from 'shared/components/form/form';
import FormEmail from 'shared/components/form/formEmail/formEmail';
import FormZipCode from 'shared/components/form/formZipCode/formZipCode';
import FormPassword from 'shared/components/form/formPassword/formPassword';
import FormButton from 'shared/components/form/formButton/formButton';
import FormInput from 'shared/components/form/formInput/formInput';
import Section from 'shared/components/section/section';
import config from 'config/environment';
import styles from './signup.css';
class SignUp extends Component {
constructor(props) {
super(props);
this.state = {
email: '',
emailValid: false,
error: false,
isValid: true,
isLoading: false,
mentor: false,
password: '',
passwordConfirm: '',
passwordValid: false,
success: false,
zip: '',
zipValid: false
};
}
onFirstNameChange = (value) => {
this.setState({ firstName: value });
};
onLastNameChange = (value) => {
this.setState({ lastName: value });
};
onIdentifierStatusChange = (value) => {
this.setState({ identifier: value });
};
onEmailChange = (value, valid) => {
this.setState({ email: value.toLowerCase(), emailValid: valid });
};
onZipChange = (value, valid) => {
this.setState({ zip: value, zipValid: valid });
};
onPasswordChange = (value, valid) => {
this.setState({ password: value, passwordValid: valid });
};
onConfirmPasswordChange = (value, valid) => {
this.setState({ passwordConfirm: value, passwordConfirmValid: valid });
};
validatePasswordConfirm = value => value === this.state.password;
handleOnClick = (e) => {
e.preventDefault();
this.setState({ isLoading: true });
if (this.isFormValid()) {
const { email, zip, password, firstName, lastName, identifier } = this.state;
axios
.post(`${config.backendUrl}/users`, {
user: {
first_name: firstName,
last_name: lastName,
email,
zip,
password,
identifier
}
})
.then(({ data }) => {
window.location = '/signup-info';
CookieHelpers.setUserAuthCookie(data);
this.setState({ isLoading: false });
})
.catch((error) => {
const data = _.get(error, 'response.data');
let errorMessage = '';
if (data) {
/* eslint-disable */
Object.keys(data).forEach(key => {
if (data && data.hasOwnProperty(key)) {
errorMessage += ` ${key}: ${data[key][0]} `;
}
});
/* eslint-enable */
}
this.props.sendNotification(
'error',
'Error',
'Please try registering again. Contact one of our staff if this problem persists.'
);
this.setState({ error: errorMessage, isLoading: false });
});
} else {
this.setState({ error: 'Missing required field(s)', isLoading: false });
this.emailRef.inputRef.revalidate();
this.firstNameRef.revalidate();
this.lastNameRef.revalidate();
this.zipRef.inputRef.revalidate();
this.passwordRef.inputRef.revalidate();
this.passwordConfirmRef.inputRef.revalidate();
}
};
isFormValid = () =>
this.state.emailValid &&
this.state.zipValid &&
this.state.passwordValid &&
this.state.passwordConfirmValid;
render() {
return (
<Section className={styles.signup} title="Join Operation Code">
<Form className={styles.signupForm}>
<span>
Are you ready to deploy your future? Our community supports active duty and veterans
transitioning into the tech industry, but spouses, family members, tech professionals,
volunteers and sponsors are also welcome. Join Operation Code today and launch your
career in tech. Once you complete the form below, you’ll be invited to join our
team on Slack. Make sure you stop in and say hi!
</span>
<FormEmail
id="email"
placeholder="Email (Required)"
onChange={this.onEmailChange}
ref={(child) => {
this.emailRef = child;
}}
/>
<FormInput
id="firstName"
placeholder="First Name (Required)"
onChange={this.onFirstNameChange}
ref={(child) => {
this.firstNameRef = child;
}}
/>
<FormInput
id="lastName"
placeholder="Last Name (Required)"
onChange={this.onLastNameChange}
ref={(child) => {
this.lastNameRef = child;
}}
/>
<FormZipCode
id="zip"
placeholder="Zip Code (Required)"
onChange={this.onZipChange}
ref={(child) => {
this.zipRef = child;
}}
/>
<FormPassword
id="password"
placeholder="Password (Required)"
onChange={this.onPasswordChange}
validationRegex={/^(?=.*[A-Z]).{6,}$/}
validationErrorMessage="Must be 6 characters long and include a capitalized letter"
ref={(child) => {
this.passwordRef = child;
}}
/>
<FormPassword
id="passwordConfirm"
placeholder="Confirm Password (Required)"
onChange={this.onConfirmPasswordChange}
validateFunc={this.validatePasswordConfirm}
validationErrorMessage="Passwords must match"
ref={(child) => {
this.passwordConfirmRef = child;
}}
/>
{this.state.error && (
<ul className={styles.errorList}>
There was an error joining Operation Code:
<li className={styles.errorMessage}>{this.state.error}</li>
</ul>
)}
{this.state.isLoading ? (
<FormButton className={styles.joinButton} text="Loading..." disabled theme="grey" />
) : (
<FormButton
className={styles.joinButton}
text="Join"
onClick={this.handleOnClick}
theme="red"
/>
)}
</Form>
</Section>
);
}
}
SignUp.propTypes = {
sendNotification: PropTypes.func.isRequired
};
export default SignUp;
|
src/forms/output/GraphHolder.js | knod/cliff-effects-1 | import React, { Component } from 'react';
import { Message } from 'semantic-ui-react';
// CUSTOM COMPONENTS
import { GraphTimeButtons } from './GraphTimeButtons';
/** Keeps track of time interval currently requested
* (weekly/monthly/yearly) and, if needed, shows
* 'no graph' message. */
class GraphHolder extends Component {
constructor (props) {
super(props);
this.state = { activeID: `Monthly` };
}
onClick = (evnt) => {
let id = evnt.target.id;
this.setState({ activeID: id });
};
render () {
const { activeID } = this.state,
{ Graph, client, translations } = this.props,
{ current } = client,
// The ids later used to access all program-specific data and functions
// Only active programs are added
activePrograms = [ ...current.benefits ];
if (activePrograms.length === 0) {
return <Message className={ `graph-holder` }>{ translations.i_noBenefitsSelected }</Message>;
}
return (
<div className={ `graph-holder` }>
<GraphTimeButtons
activeID = { activeID }
onClick = { this.onClick } />
<Graph
className = { `client-graph` }
client = { client }
timescale = { activeID }
activePrograms = { activePrograms }
translations = { translations } />
</div>
);
}; // Ends render()
}; // Ends <GraphHolder>
export { GraphHolder };
|
test/e2e/prerender/pages/blog/[post]/[comment].js | zeit/next.js | import React from 'react'
import Link from 'next/link'
export async function getStaticPaths() {
return {
paths: [
'/blog/post-1/comment-1',
{ params: { post: 'post-2', comment: 'comment-2' } },
],
fallback: true,
}
}
export async function getStaticProps({ params }) {
return {
props: {
post: params.post,
comment: params.comment,
time: new Date().getTime(),
},
revalidate: 2,
}
}
export default ({ post, comment, time }) => {
// we're in a loading state
if (!post) {
return <p>loading...</p>
}
return (
<>
<p>Post: {post}</p>
<p>Comment: {comment}</p>
<span>time: {time}</span>
<Link href="/">
<a id="home">to home</a>
</Link>
</>
)
}
|
src/containers/weather_list.js | neosepulveda/react-redux-weather-forecast | import React, { Component } from 'react';
import { connect } from 'react-redux';
import Chart from '../components/chart';
import GoogleMap from '../components/google_map';
class WeatherList extends Component {
renderWeather(cityData) {
const city = cityData.city;
const list = cityData.list;
const { lon, lat } = city.coord;
const temps = list.map(weather => weather.main.temp);
const pressures = list.map(weather => weather.main.pressure);
const humidities = list.map(weather => weather.main.humidity);
return(
<tr key={city.id}>
<td><GoogleMap lon={lon} lat={lat} /></td>
<td><Chart data={temps} color="blue" units="K" /></td>
<td><Chart data={pressures} color="black" units="hPa" /></td>
<td><Chart data={humidities} color="green" units="%" /></td>
</tr>
);
}
render() {
return(
<table className="table table-hover">
<thead>
<tr>
<th>City</th>
<th>Temperature (K)</th>
<th>Pressure (hPa)</th>
<th>Humidity (%)</th>
</tr>
</thead>
<tbody>
{this.props.weather.map(this.renderWeather)}
</tbody>
</table>
);
}
}
function mapStateToProps({ weather }) {
return { weather }; //equal to { weather: state.weather } but using fancy ES6 syntax
}
export default connect(mapStateToProps)(WeatherList);
|
node_modules/react-slick/src/mixins/helpers.js | maty21/statistisc | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import {getTrackCSS, getTrackLeft, getTrackAnimateCSS} from './trackHelper';
import assign from 'object-assign';
var helpers = {
initialize: function (props) {
const slickList = ReactDOM.findDOMNode(this.list);
var slideCount = React.Children.count(props.children);
var listWidth = this.getWidth(slickList);
var trackWidth = this.getWidth(ReactDOM.findDOMNode(this.track));
var slideWidth;
if (!props.vertical) {
var centerPaddingAdj = props.centerMode && (parseInt(props.centerPadding) * 2);
slideWidth = (this.getWidth(ReactDOM.findDOMNode(this)) - centerPaddingAdj)/props.slidesToShow;
} else {
slideWidth = this.getWidth(ReactDOM.findDOMNode(this));
}
const slideHeight = this.getHeight(slickList.querySelector('[data-index="0"]'));
const listHeight = slideHeight * props.slidesToShow;
var currentSlide = props.rtl ? slideCount - 1 - props.initialSlide : props.initialSlide;
this.setState({
slideCount,
slideWidth,
listWidth,
trackWidth,
currentSlide,
slideHeight,
listHeight,
}, function () {
var targetLeft = getTrackLeft(assign({
slideIndex: this.state.currentSlide,
trackRef: this.track
}, props, this.state));
// getCSS function needs previously set state
var trackStyle = getTrackCSS(assign({left: targetLeft}, props, this.state));
this.setState({trackStyle: trackStyle});
this.autoPlay(); // once we're set up, trigger the initial autoplay.
});
},
update: function (props) {
const slickList = ReactDOM.findDOMNode(this.list);
// This method has mostly same code as initialize method.
// Refactor it
var slideCount = React.Children.count(props.children);
var listWidth = this.getWidth(slickList);
var trackWidth = this.getWidth(ReactDOM.findDOMNode(this.track));
var slideWidth;
if (!props.vertical) {
var centerPaddingAdj = props.centerMode && (parseInt(props.centerPadding) * 2);
slideWidth = (this.getWidth(ReactDOM.findDOMNode(this)) - centerPaddingAdj)/props.slidesToShow;
} else {
slideWidth = this.getWidth(ReactDOM.findDOMNode(this));
}
const slideHeight = this.getHeight(slickList.querySelector('[data-index="0"]'));
const listHeight = slideHeight * props.slidesToShow;
// pause slider if autoplay is set to false
if(props.autoplay) {
this.pause();
} else {
this.autoPlay();
}
this.setState({
slideCount,
slideWidth,
listWidth,
trackWidth,
slideHeight,
listHeight,
}, function () {
var targetLeft = getTrackLeft(assign({
slideIndex: this.state.currentSlide,
trackRef: this.track
}, props, this.state));
// getCSS function needs previously set state
var trackStyle = getTrackCSS(assign({left: targetLeft}, props, this.state));
this.setState({trackStyle: trackStyle});
});
},
getWidth: function getWidth(elem) {
return elem.getBoundingClientRect().width || elem.offsetWidth || 0;
},
getHeight(elem) {
return elem.getBoundingClientRect().height || elem.offsetHeight || 0;
},
adaptHeight: function () {
if (this.props.adaptiveHeight) {
var selector = '[data-index="' + this.state.currentSlide +'"]';
if (this.list) {
var slickList = ReactDOM.findDOMNode(this.list);
slickList.style.height = slickList.querySelector(selector).offsetHeight + 'px';
}
}
},
canGoNext: function (opts){
var canGo = true;
if (!opts.infinite) {
if (opts.centerMode) {
// check if current slide is last slide
if (opts.currentSlide >= (opts.slideCount - 1)) {
canGo = false;
}
} else {
// check if all slides are shown in slider
if (opts.slideCount <= opts.slidesToShow ||
opts.currentSlide >= (opts.slideCount - opts.slidesToShow)) {
canGo = false;
}
}
}
return canGo;
},
slideHandler: function (index) {
// Functionality of animateSlide and postSlide is merged into this function
// console.log('slideHandler', index);
var targetSlide, currentSlide;
var targetLeft, currentLeft;
var callback;
if (this.props.waitForAnimate && this.state.animating) {
return;
}
if (this.props.fade) {
currentSlide = this.state.currentSlide;
// Don't change slide if it's not infite and current slide is the first or last slide.
if(this.props.infinite === false &&
(index < 0 || index >= this.state.slideCount)) {
return;
}
// Shifting targetSlide back into the range
if (index < 0) {
targetSlide = index + this.state.slideCount;
} else if (index >= this.state.slideCount) {
targetSlide = index - this.state.slideCount;
} else {
targetSlide = index;
}
if (this.props.lazyLoad && this.state.lazyLoadedList.indexOf(targetSlide) < 0) {
this.setState({
lazyLoadedList: this.state.lazyLoadedList.concat(targetSlide)
});
}
callback = () => {
this.setState({
animating: false
});
if (this.props.afterChange) {
this.props.afterChange(targetSlide);
}
delete this.animationEndCallback;
};
this.setState({
animating: true,
currentSlide: targetSlide
}, function () {
this.animationEndCallback = setTimeout(callback, this.props.speed);
});
if (this.props.beforeChange) {
this.props.beforeChange(this.state.currentSlide, targetSlide);
}
this.autoPlay();
return;
}
targetSlide = index;
if (targetSlide < 0) {
if(this.props.infinite === false) {
currentSlide = 0;
} else if (this.state.slideCount % this.props.slidesToScroll !== 0) {
currentSlide = this.state.slideCount - (this.state.slideCount % this.props.slidesToScroll);
} else {
currentSlide = this.state.slideCount + targetSlide;
}
} else if (targetSlide >= this.state.slideCount) {
if(this.props.infinite === false) {
currentSlide = this.state.slideCount - this.props.slidesToShow;
} else if (this.state.slideCount % this.props.slidesToScroll !== 0) {
currentSlide = 0;
} else {
currentSlide = targetSlide - this.state.slideCount;
}
} else {
currentSlide = targetSlide;
}
targetLeft = getTrackLeft(assign({
slideIndex: targetSlide,
trackRef: this.track
}, this.props, this.state));
currentLeft = getTrackLeft(assign({
slideIndex: currentSlide,
trackRef: this.track
}, this.props, this.state));
if (this.props.infinite === false) {
targetLeft = currentLeft;
}
if (this.props.beforeChange) {
this.props.beforeChange(this.state.currentSlide, currentSlide);
}
if (this.props.lazyLoad) {
var loaded = true;
var slidesToLoad = [];
for (var i = targetSlide; i < targetSlide + this.props.slidesToShow; i++ ) {
loaded = loaded && (this.state.lazyLoadedList.indexOf(i) >= 0);
if (!loaded) {
slidesToLoad.push(i);
}
}
if (!loaded) {
this.setState({
lazyLoadedList: this.state.lazyLoadedList.concat(slidesToLoad)
});
}
}
// Slide Transition happens here.
// animated transition happens to target Slide and
// non - animated transition happens to current Slide
// If CSS transitions are false, directly go the current slide.
if (this.props.useCSS === false) {
this.setState({
currentSlide: currentSlide,
trackStyle: getTrackCSS(assign({left: currentLeft}, this.props, this.state))
}, function () {
if (this.props.afterChange) {
this.props.afterChange(currentSlide);
}
});
} else {
var nextStateChanges = {
animating: false,
currentSlide: currentSlide,
trackStyle: getTrackCSS(assign({left: currentLeft}, this.props, this.state)),
swipeLeft: null
};
callback = () => {
this.setState(nextStateChanges);
if (this.props.afterChange) {
this.props.afterChange(currentSlide);
}
delete this.animationEndCallback;
};
this.setState({
animating: true,
currentSlide: currentSlide,
trackStyle: getTrackAnimateCSS(assign({left: targetLeft}, this.props, this.state))
}, function () {
this.animationEndCallback = setTimeout(callback, this.props.speed);
});
}
this.autoPlay();
},
swipeDirection: function (touchObject) {
var xDist, yDist, r, swipeAngle;
xDist = touchObject.startX - touchObject.curX;
yDist = touchObject.startY - touchObject.curY;
r = Math.atan2(yDist, xDist);
swipeAngle = Math.round(r * 180 / Math.PI);
if (swipeAngle < 0) {
swipeAngle = 360 - Math.abs(swipeAngle);
}
if ((swipeAngle <= 45) && (swipeAngle >= 0) || (swipeAngle <= 360) && (swipeAngle >= 315)) {
return (this.props.rtl === false ? 'left' : 'right');
}
if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
return (this.props.rtl === false ? 'right' : 'left');
}
if (this.props.verticalSwiping === true) {
if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
return 'down';
} else {
return 'up';
}
}
return 'vertical';
},
play: function(){
var nextIndex;
if (!this.state.mounted) {
return false
}
if (this.props.rtl) {
nextIndex = this.state.currentSlide - this.props.slidesToScroll;
} else {
if (this.canGoNext(Object.assign({}, this.props,this.state))) {
nextIndex = this.state.currentSlide + this.props.slidesToScroll;
} else {
return false;
}
}
this.slideHandler(nextIndex);
},
autoPlay: function () {
if (this.state.autoPlayTimer) {
clearTimeout(this.state.autoPlayTimer);
}
if (this.props.autoplay) {
this.setState({
autoPlayTimer: setTimeout(this.play, this.props.autoplaySpeed)
});
}
},
pause: function () {
if (this.state.autoPlayTimer) {
clearTimeout(this.state.autoPlayTimer);
this.setState({
autoPlayTimer: null
});
}
}
};
export default helpers;
|
src/components/add_details.js | emertola/eform-findings-tool | import React, { Component } from 'react';
import _ from 'lodash';
import PropTypes from 'prop-types';
// import components
import DisplayDetails from './display_details';
import AddFindings from './add_findings';
export default class AddDetails extends Component {
constructor(props) {
super(props);
this.state = {
title: 'Enter a title',
score: 100.00,
findings: [],
showScore: false,
count: 0
}
this.handleTitleChange = this.handleTitleChange.bind(this);
this.handleUpdateFindings = this.handleUpdateFindings.bind(this);
this.handleRemoveFinding = this.handleRemoveFinding.bind(this);
this.handleScoreHideShow = this.handleScoreHideShow.bind(this);
}
handleTitleChange(e) {
this.setState({ title: e.target.value });
}
handleUpdateFindings(data, add) {
const newFindings = {
id: Date.now(),
type: data.type,
content: data.content
}
this.setState((prevState) => ({
findings: prevState.findings.concat(newFindings)
}))
let {score, count} = this.state;
score = _.subtract(score, data.type);
count = _.add(count, add);
this.setState({
score: score,
count: count
})
}
handleRemoveFinding(findingID, type) {
let {findings, score, count} = this.state;
findings = findings.filter(function(el) {
return el.id != findingID
})
this.setState((prevState) => ({ findings }));
score = _.add(score, type);
this.setState({ score: score })
count = _.subtract(count, 1);
this.setState({
count: count
})
if(count < 1) {
this.setState({
showScore: false
})
}
}
handleScoreHideShow() {
this.setState({
showScore: true
})
}
render() {
const {title, score, findings, showScore} = this.state;
return (
<div className="row">
<div className="form-group col-sm-4">
<label htmlFor="title">Title</label>
<input type="text" className="form-control" id="title" placeholder="Enter title" onChange={this.handleTitleChange} value={title} /> <br />
<AddFindings
onFormSubmit={this.handleUpdateFindings}
handleScoreHideShow={this.handleScoreHideShow} />
</div>
<div className="col-sm-4">
<DisplayDetails
onTitleChange={title}
score={score}
findings={findings}
onRemoveFinding={this.handleRemoveFinding}
hideShowScore={showScore} />
</div>
</div>
)
}
}
|
src/containers/Rush/index.js | bobrown101/phi-tau | import React from 'react';
// import {Link} from 'react-router';
// import Header from '../../components/Header.js';
import Section from '../../components/Section.js';
// import AngledDivider from './AngledDivider.js';
import CursiveHeader from '../../components/CursiveHeader.js';
// import CenteredContainer from '../../components/CenteredContainer.js';
const Rush = () => {
return (
<div>
<Section >
{/*<AngledDivider/>*/}
<CursiveHeader>Rush Fall 16</CursiveHeader>
<img className="animated fadeInUp delay05" src={require('../../images/rush-banner.jpg')} />
</Section>
</div>
);
};
export default Rush;
|
apps/marketplace/components/Header/Mobile/CommonMobileLinks.js | AusDTO/dto-digitalmarketplace-frontend | import React from 'react'
const CommonMobileLinks = () => (
<React.Fragment>
<div className="au-marketplace-header_mobile-link">
<a href="/2/opportunities">Opportunities</a>
</div>
<div className="au-marketplace-header_mobile-link">
<a href="/search/sellers">Seller Catalogue</a>
</div>
<div className="au-marketplace-header_mobile-link">
<a href="/2/insights">Insights</a>
</div>
<div className="au-marketplace-header_mobile-link">
<a href="https://marketplace1.zendesk.com/hc/en-gb">Support</a>
</div>
<div className="au-marketplace-header_mobile-link">
<a href="/contact-us">Contact</a>
</div>
</React.Fragment>
)
export default CommonMobileLinks
|
src/components/ReplOutputString.js | antonyr/Mancy | import React from 'react';
import ReplConstants from '../constants/ReplConstants';
export default class ReplOutputString extends React.Component {
constructor(props) {
super(props);
this.state = {
collapse: true
};
const str = this.props.str;
let len = str.length;
let limit = this.props.limit || ReplConstants.OUTPUT_TRUNCATE_LENGTH;
this.collapsable = len > limit - 1;
if(this.collapsable) {
this.prefix = str.slice(0, limit/2);
this.suffix = str.slice(Math.max(limit/2, len - (limit/2)));
}
this.onToggleCollapse = this.onToggleCollapse.bind(this);
}
onToggleCollapse() {
this.setState({
collapse: !this.state.collapse
});
}
render() {
return (
<span className='repl-string-fold'>
{
this.collapsable
? this.state.collapse
? <span className='repl-string'>
<i className='fa fa-play' onClick={this.onToggleCollapse}></i>
<span className='string ellipsis'>'{this.prefix}</span>
<span className='string'>{this.suffix}'</span>
</span>
: <span className='repl-string'>
<i className='fa fa-play fa-rotate-90' onClick={this.onToggleCollapse}></i>
<span className='string'>'{this.props.str}'</span>
</span>
: <span className='repl-string'>
<span className='string'>'{this.props.str}'</span>
</span>
}
</span>
);
}
}
|
src/routes/Map/components/MapControls.js | hassaanz/MaterialDeFuel | import React from 'react'
import PropTypes from 'prop-types'
import { RadioButton, RadioButtonGroup } from 'material-ui/RadioButton'
import Paper from 'material-ui/Paper'
import { List, ListItem } from 'material-ui/List'
import Subheader from 'material-ui/Subheader'
import ContentSave from 'material-ui/svg-icons/content/save'
import MapsMyLocation from 'material-ui/svg-icons/maps/my-location'
import TextField from 'material-ui/TextField'
import RaisedButton from 'material-ui/RaisedButton'
import FontIcon from 'material-ui/FontIcon'
import { blue200 } from 'material-ui/styles/colors'
const style = {
height: '100%',
width: '100%',
display: 'inline-block',
}
const radioStyles = {
block: {
maxWidth: 250,
fontSize: 12,
marginLeft: '5px',
},
radioButton: {
marginBottom: 16,
},
inputField: {
marginLeft: '10px',
fontSize: 12,
},
searchBut: {
display: 'block',
}
}
class MapControls extends React.Component {
constructor (props) {
super(props)
this.handleSearch = this.handleSearch.bind(this)
this.isSearchable = this.isSearchable.bind(this)
}
handleSearch () {
const {
findStationsPostCode,
findStationsPoint
} = this.props
if (this.props.searchOpt === 'zip') {
findStationsPostCode(this.props.zipSearch)
} else if (this.props.searchOpt === 'position') {
const {
lat,
lng
} = this.props.activePos
console.log('sending request to find stations by point:', { lat, lng })
findStationsPoint({ lat, lng })
}
}
isSearchable () {
const { searchOpt, zipSearch, activePos } = this.props
if (searchOpt === 'zip') {
return zipSearch !== ''
} else if (searchOpt === 'position') {
if (activePos) {
return (activePos.lat !== '' || activePos.lng !== '')
}
return false
}
}
render () {
return (
<Paper style={style} zDepth={1}>
<Paper zDepth={2}>
<Subheader>Search</Subheader>
<RadioButtonGroup
className='row'
style={radioStyles.block}
name='searchType'
onChange={this.props.onSearchOptChange}
defaultSelected={this.props.searchOpt}>
<RadioButton className='col-md-6' style={radioStyles.radioButton} value='position' label='Position' />
<RadioButton className='col-md-6' style={radioStyles.radioButton} value='zip' label='Zipcode' />
</RadioButtonGroup>
{
this.props.searchOpt === 'zip'
? <TextField
hintText='Enter ZipCode'
type='number'
value={this.props.zipSearch || ''}
style={radioStyles.inputField}
onChange={this.props.setZipSearch} />
: <div>
<TextField
hintText='Enter Longitude'
type='number'
style={radioStyles.inputField}
value={this.props.activePos ? this.props.activePos.lng : ''}
/>
<TextField
hintText='Enter Latitude'
type='number'
style={radioStyles.inputField}
value={this.props.activePos ? this.props.activePos.lat : ''}
/>
</div>
}
<RaisedButton
style={radioStyles.searchBut}
icon={<FontIcon className='mdi mdi-magnify' />}
label='search'
backgroundColor={blue200}
onTouchTap={this.handleSearch}
disabled={!this.isSearchable()}
/>
</Paper>
<Paper zDepth={2} style={{ marginTop: '10px' }}>
<List>
<Subheader>Actions</Subheader>
<ListItem primaryText='Snapshot' leftIcon={<ContentSave />} />
<ListItem
primaryText='Current Position'
leftIcon={<MapsMyLocation />}
onTouchTap={this.props.centerToPosition} />
</List>
</Paper>
</Paper>
)
}
}
MapControls.propTypes = {
centerToPosition: PropTypes.func.isRequired,
onSearchOptChange: PropTypes.func.isRequired,
findStationsPostCode: PropTypes.func.isRequired,
findStationsPoint: PropTypes.func.isRequired,
setMapZoom: PropTypes.func.isRequired,
setMapDefault: PropTypes.func.isRequired,
setMapCenter: PropTypes.func.isRequired,
activePos: PropTypes.object,
userPos: PropTypes.object,
zipSearch: PropTypes.string,
searchOpt: PropTypes.string,
setZipSearch: PropTypes.func.isRequired,
}
export default MapControls
|
src/components/Icons/index.js | marlass/marlass.github.io | import React from 'react'
const Icons = props => (
<React.Fragment>
{props.dribbble && (
<a
className="footer-icon"
href={`https://dribbble.com/${props.dribbble}`}
>
<i className="svg-icon dribbble"></i>
</a>
)}
{props.email && (
<a className="footer-icon" href={`mailto:${props.email}`}>
<i className="svg-icon email"></i>
</a>
)}
{props.facebook && (
<a
className="footer-icon"
href={`https://www.facebook.com/${props.facebook}`}
>
<i className="svg-icon facebook"></i>
</a>
)}
{props.flickr && (
<a
className="footer-icon"
href={`https://www.flickr.com/${props.flickr}`}
>
<i className="svg-icon flickr"></i>
</a>
)}
{props.github && (
<a className="footer-icon" href={`https://github.com/${props.github}`}>
<i className="svg-icon github"></i>
</a>
)}
{props.instagram && (
<a
className="footer-icon"
href={`https://instagram.com/${props.instagram}`}
>
<i className="svg-icon instagram"></i>
</a>
)}
{props.linkedin && (
<a
className="footer-icon"
href={`https://www.linkedin.com/in/${props.linkedin}`}
>
<i className="svg-icon linkedin"></i>
</a>
)}
{props.pinterest && (
<a
className="footer-icon"
href={`https://www.pinterest.com/${props.pinterest}`}
>
<i className="svg-icon pinterest"></i>
</a>
)}
<a className="footer-icon" href="/feed.xml">
<i className="svg-icon rss"></i>
</a>
{props.twitter && (
<a
className="footer-icon"
href={`https://www.twitter.com/${props.twitter}`}
>
<i className="svg-icon twitter"></i>
</a>
)}
{props.stackoverflow && (
<a
className="footer-icon"
href={`http://stackoverflow.com/${props.stackoverflow}`}
>
<i className="svg-icon stackoverflow"></i>
</a>
)}
{props.youtube && (
<a className="footer-icon" href={`https://youtube.com/${props.youtube}`}>
<i className="svg-icon youtube"></i>
</a>
)}
{props.googleplus && (
<a
className="footer-icon"
href={`https://plus.google.com/${props.googleplus}`}
>
<i className="svg-icon googleplus"></i>
</a>
)}
</React.Fragment>
)
export default Icons
|
src/components/App.js | CurtisMBSmith/web-frontend-proto | import React from 'react';
import TaskBox from '../containers/TaskBox';
import TaskForm from '../containers/TaskForm';
import UserBox from '../containers/UserBox';
import SideBar from '../containers/SideBar';
import { createTask } from '../actions';
const App = (logged_in) => {
return (
<div>
<SideBar />
<div className="main-panel" >
<UserBox />
<TaskForm onSubmit={createTask} />
<TaskBox />
</div>
</div>
)};
export default App; |
src/components/common/Modals.js | cherishstand/dva-quickstart | import React from 'react';
import { Modal, Button } from 'antd-mobile';
const Alert = Modal.alert;
const Modals = ({ children }) => {
return (
<div onClick={ () => Alert('保存', '确认保存当前操作???', [
{ text: '取消' },
{ text: '确认', style: { fontWeight: 'bold' } },
]) }>{children}</div>
)
}
export default Modals;
|
src/svg-icons/hardware/toys.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareToys = (props) => (
<SvgIcon {...props}>
<path d="M12 12c0-3 2.5-5.5 5.5-5.5S23 9 23 12H12zm0 0c0 3-2.5 5.5-5.5 5.5S1 15 1 12h11zm0 0c-3 0-5.5-2.5-5.5-5.5S9 1 12 1v11zm0 0c3 0 5.5 2.5 5.5 5.5S15 23 12 23V12z"/>
</SvgIcon>
);
HardwareToys = pure(HardwareToys);
HardwareToys.displayName = 'HardwareToys';
HardwareToys.muiName = 'SvgIcon';
export default HardwareToys;
|
src/svg-icons/device/signal-cellular-connected-no-internet-4-bar.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellularConnectedNoInternet4Bar = (props) => (
<SvgIcon {...props}>
<path d="M20 18h2v-8h-2v8zm0 4h2v-2h-2v2zM2 22h16V8h4V2L2 22z"/>
</SvgIcon>
);
DeviceSignalCellularConnectedNoInternet4Bar = pure(DeviceSignalCellularConnectedNoInternet4Bar);
DeviceSignalCellularConnectedNoInternet4Bar.displayName = 'DeviceSignalCellularConnectedNoInternet4Bar';
DeviceSignalCellularConnectedNoInternet4Bar.muiName = 'SvgIcon';
export default DeviceSignalCellularConnectedNoInternet4Bar;
|
web/static/js/components/preview_button.js | bittersweet/notifilter | import React from 'react';
var PreviewButton = React.createClass({
togglePreview: function(event) {
event.preventDefault();
const { isPreviewing, actions } = this.props;
if (isPreviewing) {
actions.updatePreviewing(false);
} else {
actions.getPreview();
}
},
decrementOffset: function(event) {
event.preventDefault();
const { isPreviewing, actions } = this.props;
actions.updatePreviewOffset(-1);
if (isPreviewing) {
actions.getPreview();
}
},
incrementOffset: function(event) {
event.preventDefault();
const { isPreviewing, actions } = this.props;
actions.updatePreviewOffset(1);
if (isPreviewing) {
actions.getPreview();
}
},
render: function() {
const { isPreviewing, previewOffset } = this.props;
var text;
var offsetButtons;
if (isPreviewing) {
var nextButton;
var previousButton;
nextButton = <a onClick={this.incrementOffset} className="preview-next">Next ❯</a>
if (previewOffset > 0) {
previousButton = <a onClick={this.decrementOffset} className="preview-previous">❮ Previous</a>
}
offsetButtons = [previousButton, nextButton]
text = 'Write';
} else {
offsetButtons = null;
text = 'Preview';
}
return (
<div className="preview_buttons">
<a onClick={this.togglePreview} className="preview-button">{text}</a>
{offsetButtons}
</div>
);
}
});
module.exports = PreviewButton;
|
components/ripple/Ripple.js | KerenChandran/react-toolbox | import React from 'react';
import ReactDOM from 'react-dom';
import ClassNames from 'classnames';
import style from './style';
import events from '../utils/events';
import prefixer from '../utils/prefixer';
const defaults = {
centered: false,
className: '',
spread: 2
};
const Ripple = (options = {}) => {
const {
centered: defaultCentered,
className: defaultClassName,
spread: defaultSpread,
...props
} = {...defaults, ...options};
return ComposedComponent => {
return class RippledComponent extends React.Component {
static propTypes = {
children: React.PropTypes.any,
disabled: React.PropTypes.bool,
onRippleEnded: React.PropTypes.func,
ripple: React.PropTypes.bool,
rippleCentered: React.PropTypes.bool,
rippleClassName: React.PropTypes.string,
rippleSpread: React.PropTypes.number
};
static defaultProps = {
disabled: false,
ripple: true,
rippleCentered: defaultCentered,
rippleClassName: defaultClassName,
rippleSpread: defaultSpread
};
state = {
active: false,
left: null,
restarting: false,
top: null,
width: null
};
componentDidMount () {
if (this.props.onRippleEnded) {
events.addEventListenerOnTransitionEnded(this.refs.ripple, (evt) => {
if (evt.propertyName === 'transform') this.props.onRippleEnded(evt);
});
}
}
componentWillUnmount () {
if (this.props.onRippleEnded) {
events.removeEventListenerOnTransitionEnded(this.refs.ripple);
}
}
handleEnd = () => {
document.removeEventListener(this.touch ? 'touchend' : 'mouseup', this.handleEnd);
this.setState({active: false});
};
start = ({pageX, pageY}, touch = false) => {
if (!this._isTouchRippleReceivingMouseEvent(touch)) {
this.touch = touch;
document.addEventListener(this.touch ? 'touchend' : 'mouseup', this.handleEnd);
const {top, left, width} = this._getDescriptor(pageX, pageY);
this.setState({active: false, restarting: true, top, left, width}, () => {
this.refs.ripple.offsetWidth; //eslint-disable-line no-unused-expressions
this.setState({active: true, restarting: false});
});
}
};
_isTouchRippleReceivingMouseEvent (touch) {
return this.touch && !touch;
}
_getDescriptor (pageX, pageY) {
const {left, top, height, width} = ReactDOM.findDOMNode(this).getBoundingClientRect();
const {rippleCentered: centered, rippleSpread: spread} = this.props;
return {
left: centered ? 0 : pageX - left - width / 2 - window.scrollX,
top: centered ? 0 : pageY - top - height / 2 - window.scrollY,
width: width * spread
};
}
handleMouseDown = (event) => {
if (!this.props.disabled) this.start(event);
if (this.props.onMouseDown) this.props.onMouseDown(event);
};
render () {
if (!this.props.ripple) {
return <ComposedComponent {...this.props} />;
} else {
const {
children,
ripple, //eslint-disable-line no-unused-vars
rippleClassName: className,
rippleCentered: centered, //eslint-disable-line no-unused-vars
rippleSpread: spread, //eslint-disable-line no-unused-vars
...other
} = this.props;
const rippleClassName = ClassNames(style.normal, {
[style.active]: this.state.active,
[style.restarting]: this.state.restarting
}, className);
const { left, top, width } = this.state;
const scale = this.state.restarting ? 0 : 1;
const rippleStyle = prefixer({
transform: `translate3d(${-width / 2 + left}px, ${-width / 2 + top}px, 0) scale(${scale})`
}, {width, height: width});
return (
<ComposedComponent {...other} onMouseDown={this.handleMouseDown}>
{children ? children : null}
<span data-react-toolbox='ripple' className={style.wrapper} {...props}>
<span ref='ripple' role='ripple' className={rippleClassName} style={rippleStyle} />
</span>
</ComposedComponent>
);
}
}
};
};
};
export default Ripple;
|
src/components/laravel/plain-wordmark/LaravelPlainWordmark.js | fpoumian/react-devicon | import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './LaravelPlainWordmark.svg'
/** LaravelPlainWordmark */
function LaravelPlainWordmark({ width, height, className }) {
return (
<SVGDeviconInline
className={'LaravelPlainWordmark' + ' ' + className}
iconSVG={iconSVG}
width={width}
height={height}
/>
)
}
LaravelPlainWordmark.propTypes = {
className: PropTypes.string,
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
}
export default LaravelPlainWordmark
|
examples/huge-apps/routes/Grades/components/Grades.js | mozillo/react-router | import React from 'react'
class Grades extends React.Component {
render() {
return (
<div>
<h2>Grades</h2>
</div>
)
}
}
export default Grades
|
website/src/pages/versions.js | kassens/relay | /**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
/* eslint-disable lint/no-value-import */
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import {useLatestVersion, useVersions} from '@theme/hooks/useDocs';
import Layout from '@theme/Layout';
import React from 'react';
/* eslint-enable lint/no-value-import */
function Version() {
const {siteConfig} = useDocusaurusContext();
const versions = useVersions();
const latestVersion = useLatestVersion();
const currentVersion = versions.find((version) => version.name === 'current');
const pastVersions = versions.filter(
(version) =>
version !== latestVersion.name && version !== currentVersion.name,
);
const repoUrl = `https://github.com/${siteConfig.organizationName}/${siteConfig.projectName}`;
return (
<Layout
title="Versions"
description="Relay Versions page listing all documented site versions">
<main className="container margin-vert--lg">
<h1>Relay documentation versions</h1>
{latestVersion && (
<div className="margin-bottom--lg">
<h3 id="next">Current version (Stable)</h3>
<p>
Here you can find the documentation for current released version.
</p>
<table>
<tbody>
<tr>
<th>{latestVersion.label}</th>
<td>
<Link to={latestVersion.path}>Documentation</Link>
</td>
<td>
<a href={`${repoUrl}/releases/tag/v${latestVersion.name}`}>
Release Notes
</a>
</td>
</tr>
</tbody>
</table>
</div>
)}
{currentVersion !== latestVersion && (
<div className="margin-bottom--lg">
<h3 id="latest">Next version (Unreleased)</h3>
<p>
Here you can find the documentation for work-in-process unreleased
version.
</p>
<table>
<tbody>
<tr>
<th>{currentVersion.label}</th>
<td>
<Link to={currentVersion.path}>Documentation</Link>
</td>
</tr>
</tbody>
</table>
</div>
)}
{pastVersions.length > 0 && (
<div className="margin-bottom--lg">
<h3 id="archive">Past versions</h3>
<p>
Here you can find documentation for previous versions of Relay.
</p>
<table>
<tbody>
{pastVersions.map((version) => (
<tr key={version.name}>
<th>{version.label}</th>
<td>
<Link to={version.path}>Documentation</Link>
</td>
<td>
{version.name.startsWith('v') ? (
<a href={`${repoUrl}/releases/tag/${version.name}`}>
Release Notes
</a>
) : null}
</td>
</tr>
))}
</tbody>
</table>
</div>
)}
</main>
</Layout>
);
}
export default Version;
|
src/svg-icons/editor/format-bold.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatBold = (props) => (
<SvgIcon {...props}>
<path d="M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"/>
</SvgIcon>
);
EditorFormatBold = pure(EditorFormatBold);
EditorFormatBold.displayName = 'EditorFormatBold';
EditorFormatBold.muiName = 'SvgIcon';
export default EditorFormatBold;
|
src/components/photoshop/Photoshop.js | JunisphereSystemsAG/react-color | 'use strict' /* @flow */
import React from 'react'
import ReactCSS from 'reactcss'
import shallowCompare from 'react-addons-shallow-compare'
import { ColorWrap, Saturation, Hue } from '../common'
import PhotoshopFields from './PhotoshopFields'
import PhotoshopPointerCircle from './PhotoshopPointerCircle'
import PhotoshopPointer from './PhotoshopPointer'
export class Photoshop extends ReactCSS.Component {
shouldComponentUpdate = shallowCompare.bind(this, this, arguments[0], arguments[1]);
constructor(props: any) {
super()
this.state = {
currentColor: props.hex,
}
}
classes(): any {
return {
'default': {
picker: {
background: '#DCDCDC',
borderRadius: '4px',
boxShadow: '0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)',
boxSizing: 'initial',
width: '513px',
},
head: {
backgroundImage: 'linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)',
borderBottom: '1px solid #B1B1B1',
boxShadow: 'inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)',
height: '23px',
lineHeight: '24px',
borderRadius: '4px 4px 0 0',
fontSize: '13px',
color: '#4D4D4D',
textAlign: 'center',
},
body: {
padding: '15px 15px 0',
display: 'flex',
},
saturation: {
width: '256px',
height: '256px',
position: 'relative',
border: '2px solid #B3B3B3',
borderBottom: '2px solid #F0F0F0',
overflow: 'hidden',
},
hue: {
position: 'relative',
height: '256px',
width: '19px',
marginLeft: '10px',
border: '2px solid #B3B3B3',
borderBottom: '2px solid #F0F0F0',
},
Hue: {
direction: 'vertical',
},
controls: {
width: '180px',
marginLeft: '10px',
},
top: {
display: 'flex',
},
previews: {
width: '60px',
},
swatches: {
border: '1px solid #B3B3B3',
borderBottom: '1px solid #F0F0F0',
marginBottom: '2px',
marginTop: '1px',
},
new: {
height: '34px',
background: 'rgb(' + this.props.rgb.r + ', ' + this.props.rgb.g + ', ' + this.props.rgb.b + ')',
boxShadow: 'inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000',
},
current: {
height: '34px',
background: '#' + this.state.currentColor,
boxShadow: 'inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000',
},
label: {
fontSize: '14px',
color: '#000',
textAlign: 'center',
},
actions: {
flex: '1',
marginLeft: '20px',
},
button: {
backgroundImage: 'linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)',
border: '1px solid #878787',
borderRadius: '2px',
height: '20px',
boxShadow: '0 1px 0 0 #EAEAEA',
fontSize: '14px',
color: '#000',
lineHeight: '20px',
textAlign: 'center',
marginBottom: '10px',
},
acceptButton: {
Extend: 'button',
boxShadow: '0 0 0 1px #878787',
},
},
}
}
handleChange = (data: any) => {
this.props.onChange(data)
}
handleAccept = () => {
this.props.onAccept && this.props.onAccept()
}
handleCancel = () => {
this.props.onCancel && this.props.onCancel()
}
render(): any {
var header
if (this.props.header) {
header = <div is="head">
{ this.props.header }
</div>
}
return (
<div is="picker">
{ header }
<div is="body" className="flexbox-fix">
<div is="saturation">
<Saturation is="Saturation" {...this.props} pointer={ PhotoshopPointerCircle } onChange={ this.handleChange }/>
</div>
<div is="hue">
<Hue is="Hue" {...this.props} pointer={ PhotoshopPointer } onChange={ this.handleChange } />
</div>
<div is="controls">
<div is="top" className="flexbox-fix">
<div is="previews">
<div is="label">new</div>
<div is="swatches">
<div is="new" />
<div is="current" />
</div>
<div is="label">current</div>
</div>
<div is="actions">
<div is="acceptButton" ref="accept" onClick={ this.handleAccept }>OK</div>
<div is="button" ref="cancel" onClick={ this.handleCancel }>Cancel</div>
<PhotoshopFields {...this.props} />
</div>
</div>
</div>
</div>
</div>
)
}
}
Photoshop.defaultProps = {
header: 'Color Picker',
}
export default ColorWrap(Photoshop)
|
docs/app/Examples/views/Feed/Variations/SizeLarge.js | jamiehill/stardust | import React from 'react'
import { Feed } from 'stardust'
const { Content, Event, Extra, Label, Like, Meta, Summary, User } = Feed
const SizeLarge = () => {
return (
<Feed size='large'>
<Event>
<Label image='http://semantic-ui.com/images/avatar/small/elliot.jpg' />
<Content>
<Summary date='1 Hour Ago'>
<User>Elliot Fu</User> added you as a friend
</Summary>
<Meta>
<Like icon='like'>4 Likes</Like>
</Meta>
</Content>
</Event>
<Event>
<Label icon='pencil' />
<Content>
<Summary date='3 days ago'>
You submitted a new post to the page
</Summary>
<Extra text>
I'm having a BBQ this weekend. Come by around 4pm if you can.
</Extra>
<Meta>
<Like>11 Likes</Like>
</Meta>
</Content>
</Event>
<Event>
<Label image='http://semantic-ui.com/images/avatar/small/helen.jpg' />
<Content date='4 days ago'>
<Summary>
<a>Helen Troy</a> added <a>2 new illustrations</a>
</Summary>
<Extra images>
<a><img src='http://semantic-ui.com/images/wireframe/image.png' /></a>
<a><img src='http://semantic-ui.com/images/wireframe/image.png' /></a>
</Extra>
<Meta like='1 Like' />
</Content>
</Event>
</Feed>
)
}
export default SizeLarge
|
src/views/user-create.js | dreitagebart/crispyScrum | import _ from 'lodash'
import React from 'react'
import { connect } from 'react-redux'
import { userCreate, notify } from '../actions'
import { Icon, Upload, Modal, InputNumber, Form, Input, Button, Row, Col, Switch } from 'antd'
import * as constants from '../constants'
const FormItem = Form.Item
@connect((store, props) => {
return store
})
class WrappedUser extends React.Component {
constructor (props) {
super(props)
this.state = {
previewVisible: false,
previewImage: '',
avatar: []
}
}
render () {
const { getFieldDecorator } = this.props.form
const formItemLayout = {
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 12 }
}
}
const tailFormItemLayout = {
wrapperCol: {
xs: {
span: 24,
offset: 0
},
sm: {
span: 20,
offset: 12
}
}
}
const { previewVisible, previewImage, avatar } = this.state
const uploadButton = (
<div>
<Icon type='plus' />
<div className='ant-upload-text'>Upload</div>
</div>
)
return (
<div>
<Row class='item'>
<Col span={20}>
<h1 class='header-line'><Icon type={constants.ICONS.user} /> CREATE NEW USER</h1>
</Col>
</Row>
<Row>
<Col span={12}>
<Form onSubmit={this._handleSubmit}>
<FormItem colon={false} label='Username' hasFeedback {...formItemLayout}>
<Row>
<Col>
{getFieldDecorator('user', {
rules: [{
required: true,
message: 'Please input your username'
}]
})(<Input />)}
</Col>
</Row>
</FormItem>
<FormItem colon={false} label='First name' hasFeedback {...formItemLayout}>
<Row>
<Col>
{getFieldDecorator('first', {
rules: [{
required: true,
message: 'Please input your first name'
}]
})(<Input />)}
</Col>
</Row>
</FormItem>
<FormItem colon={false} label='Last name' hasFeedback {...formItemLayout}>
<Row>
<Col>
{getFieldDecorator('last', {
rules: [{
required: true,
message: 'Please input your last name'
}]
})(<Input />)}
</Col>
</Row>
</FormItem>
<FormItem colon={false} label='eMail' hasFeedback {...formItemLayout}>
<Row>
<Col>
{getFieldDecorator('mail', {
rules: [{
type: 'email',
required: true,
message: 'Please input your eMail'
}]
})(<Input />)}
</Col>
</Row>
</FormItem>
<FormItem colon={false} label='Administrator' {...formItemLayout}>
<Row>
<Col>
{getFieldDecorator('isAdmin')(<Switch />)}
</Col>
</Row>
</FormItem>
<FormItem colon={false} label='Interests' {...formItemLayout}>
<Row>
<Col>
{getFieldDecorator('interests', {
rules: [{
required: false,
message: 'Please input your first name'
}]
})(<Input />)}
</Col>
</Row>
</FormItem>
<FormItem colon={false} label='Description' {...formItemLayout}>
<Row>
<Col>
{getFieldDecorator('descr', {
rules: [{
required: false,
message: 'Please input your description'
}]
})(<Input placeholder='Tell me something about the user...' type='textarea' />)}
</Col>
</Row>
</FormItem>
<FormItem colon={false} label='Date of birth' labelCol={{ xs: { span: 24 }, sm: { span: 6 } }} wrapperCol={{ xs: { span: 24 }, sm: { span: 14 } }}>
<Row>
<Col span={24}>
{getFieldDecorator('bornDay')(<InputNumber placeholder='dd' min={1} max={31} />)}
{getFieldDecorator('bornMonth')(<InputNumber placeholder='mm' min={1} max={12} />)}
{getFieldDecorator('bornYear')(<InputNumber placeholder='yyyy' min={1950} max={2015} />)}
</Col>
</Row>
</FormItem>
<FormItem {...tailFormItemLayout}>
<Button type='primary' htmlType='submit' size='large'>create</Button>
</FormItem>
</Form>
</Col>
<Col span={12}>
<Upload
action='//jsonplaceholder.typicode.com/posts/'
listType='picture-card'
fileList={avatar}
onPreview={this._handlePreview}
onChange={this._handleUpload}
>
{avatar.length >= 3 ? null : uploadButton}
</Upload>
<Modal visible={previewVisible} footer={null} onCancel={this._handlePreviewCancel}>
<img alt='example' style={{ width: '100%' }} src={previewImage} />
</Modal>
</Col>
</Row>
</div>
)
}
_handleUpload = ({ fileList }) => {
debugger
this.setState({ avatar: fileList })
}
_handlePreviewCancel = () => this.setState({ previewVisible: false })
_handlePreview = (file) => {
this.setState({
previewImage: file.url || file.thumbUrl,
previewVisible: true
})
}
_handleSubmit = e => {
let born
let avatar
e.preventDefault()
this.props.form.validateFields((error, values) => {
if (error) return
const { mail, user, first, last, descr, interests, isAdmin, bornDay, bornMonth, bornYear } = values
debugger
if (bornDay && bornMonth && bornYear) born = new Date(bornYear, bornMonth, bornDay)
if (this.state.avatar.length) {
avatar = this.state.avatar[0].thumbUrl
}
const userPost = {
mail,
user,
first,
last,
descr,
interests,
isAdmin,
born,
avatar
}
this.props.dispatch(userCreate(userPost))
this.props.dispatch(notify({
type: constants.MESSAGE.success,
title: 'User successfully created'
}))
})
}
}
export const UserCreate = Form.create()(WrappedUser)
|
src/routes/index.js | mikeyshing88/MUN | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import App from '../components/App';
// Child routes
import home from './home';
import contact from './contact';
import login from './login';
import register from './register';
import content from './content';
import error from './error';
export default {
path: '/',
children: [
home,
contact,
login,
register,
content,
error,
],
async action({ next, render, context }) {
const component = await next();
if (component === undefined) return component;
return render(
<App context={context}>{component}</App>
);
},
};
|
web/react360/src/components/locs/Hero/HeroLogo.js | JamesMillercus/Portfolio-Website | /*eslint max-len: ["error", { "code": 800 }]*/
import React from 'react';
import { connect } from 'react-redux';
import {
StyleSheet,
View,
Image,
asset,
NativeModules,
VrButton
} from 'react-360';
import LoadingBar from './../LoadingBar/LoadingBar';
import { fetchHeroHover, fetchLoadingContent } from './../../../actions';
class HeroLogo extends React.Component {
componentDidUpdate() {
const { webMode, heroHover, centerLogoIconName, fetchLoadingContent } = this.props;
if (webMode === 'mobile-webvr') {
if (heroHover === centerLogoIconName) fetchLoadingContent(heroHover);
else if (heroHover === '') fetchLoadingContent('');
}
}
heroImageStyle() {
const { heroText } = this.props;
if (heroText === 'scrolled') return styles.heroImage;
return styles.unscrolledHeroImage;
}
heroImage() {
const { heroText, logoImage, heroHover, centerLogoIconName, logoImageScrolled } = this.props;
if (heroText === 'scrolled') {
if (heroHover === centerLogoIconName) return asset(logoImageScrolled);
return asset(logoImage);
}
return asset('heroLogo.png');
}
heroLogoStyle() {
const { heroText } = this.props;
if (heroText === 'scrolled') return styles.heroLogo;
return styles.unscrolledHeroLogo;
}
heroLogoShadowStyle() {
const { heroText } = this.props;
if (heroText === 'scrolled') return styles.heroLogoShadow;
}
modeCheck(webMode) {
if (webMode === 'web' || webMode === 'webvr') this.openLink();
}
openLink() {
const { centerHref } = this.props;
NativeModules.LinkingManager.openURL(centerHref);
}
render() {
const { fetchHeroHover, centerLogoIconName, webMode, centerHref } = this.props;
return (
<View>
<View style={this.heroLogoShadowStyle()} />
<View style={this.heroLogoStyle()}>
<LoadingBar
content={'Opening link'}
marginTop={-70}
marginLeft={-15}
marginBottom={10}
width={200}
id={centerLogoIconName}
url={centerHref}
position={'relative'}
page={null}
/>
<Image source={this.heroImage()} style={this.heroImageStyle()} />
</View>
<VrButton
onEnter={() => fetchHeroHover(centerLogoIconName)}
onExit={() => fetchHeroHover('')}
onClick={() => this.modeCheck(webMode)}
style={styles.heroLogoHitBox}
/>
</View>
);
}
}
const mapStateToProps = ({ heroText, heroHover, webMode }) => ({ heroText, heroHover, webMode });
export default connect(mapStateToProps, { fetchHeroHover, fetchLoadingContent })(HeroLogo);
const styles = StyleSheet.create({
heroLogo: {
marginTop: 70,
marginLeft: 267,
borderRadius: 200 / 2,
width: 160,
height: 160,
backgroundColor: '#008f9c',
position: 'absolute',
overflow: 'hidden',
},
heroLogoHitBox: {
marginTop: 70,
marginLeft: 267,
borderRadius: 200 / 2,
width: 160,
height: 160,
position: 'absolute',
},
unscrolledHeroLogo: {
marginTop: 85,
marginLeft: 282,
borderRadius: 200 / 2,
width: 140,
height: 140,
backgroundColor: '#7d7d7d',
position: 'absolute',
overflow: 'hidden',
},
heroLogoShadow: {
marginTop: 72,
marginLeft: 279,
borderRadius: 200 / 2,
width: 160,
height: 160,
backgroundColor: '#000',
position: 'absolute'
},
heroImage: {
width: 100,
height: 100,
marginTop: 30,
marginLeft: 30,
position: 'absolute'
},
unscrolledHeroImage: {
width: 90,
height: 80,
marginTop: 28,
marginLeft: 27,
position: 'absolute'
}
});
|
modules/experimental/AsyncProps.js | besarthoxhaj/react-router | import React from 'react';
import invariant from 'invariant';
var { func, array, shape, object } = React.PropTypes;
var contextTypes = {
asyncProps: shape({
reloadComponent: func,
propsArray: array,
componentsArray: array
})
};
var _serverPropsArray = null;
function setServerPropsArray(array) {
invariant(!_serverPropsArray, 'You cannot call AsyncProps.hydrate more than once');
_serverPropsArray = array;
}
export function _clearCacheForTesting() {
_serverPropsArray = null;
}
function hydrate(routerState, cb) {
var { components, params } = routerState;
var flatComponents = filterAndFlattenComponents(components);
loadAsyncProps(flatComponents, params, cb);
}
function eachComponents(components, iterator) {
for (var i = 0, l = components.length; i < l; i++) {
if (typeof components[i] === 'object') {
for (var key in components[i]) {
iterator(components[i][key], i, key);
}
} else {
iterator(components[i], i);
}
}
}
function filterAndFlattenComponents(components) {
var flattened = [];
eachComponents(components, function(Component) {
if (Component.loadProps)
flattened.push(Component);
});
return flattened;
}
function loadAsyncProps(components, params, cb) {
var propsArray = [];
var componentsArray = [];
var canceled = false;
var needToLoadCounter = components.length;
components.forEach(function(Component, index) {
Component.loadProps(params, function(error, props) {
needToLoadCounter--;
propsArray[index] = props;
componentsArray[index] = Component;
maybeFinish();
});
});
function maybeFinish() {
if (canceled === false && needToLoadCounter === 0)
cb(null, {propsArray, componentsArray});
}
return {
cancel () {
canceled = true;
}
};
}
function getPropsForComponent(Component, componentsArray, propsArray) {
var index = componentsArray.indexOf(Component);
return propsArray[index];
}
function mergeAsyncProps(current, changes) {
for (var i = 0, l = changes.propsArray.length; i < l; i++) {
let Component = changes.componentsArray[i];
let position = current.componentsArray.indexOf(Component);
let isNew = position === -1;
if (isNew) {
current.propsArray.push(changes.propsArray[i]);
current.componentsArray.push(changes.componentsArray[i]);
} else {
current.propsArray[position] = changes.propsArray[i];
}
}
}
function arrayDiff(previous, next) {
var diff = [];
for (var i = 0, l = next.length; i < l; i++)
if (previous.indexOf(next[i]) === -1)
diff.push(next[i]);
return diff;
}
function shallowEqual(a, b) {
var key;
var ka = 0;
var kb = 0;
for (key in a) {
if (a.hasOwnProperty(key) && a[key] !== b[key])
return false;
ka++;
}
for (key in b)
if (b.hasOwnProperty(key))
kb++;
return ka === kb;
}
var RouteComponentWrapper = React.createClass({
contextTypes: contextTypes,
// this is here to meet the case of reloading the props when a component's params change,
// the place we know that is here, but the problem is we get occasional waterfall loads
// when clicking links quickly at the same route, AsyncProps doesn't know to load the next
// props until the previous finishes rendering.
//
// if we could tell that a component needs its props reloaded in AsyncProps instead of here
// (by the arrayDiff stuff in componentWillReceiveProps) then we wouldn't need this code at
// all, and we coudl get rid of the terrible forceUpdate hack as well. I'm just not sure
// right now if we can know to reload a pivot transition.
componentWillReceiveProps(nextProps, context) {
var paramsChanged = !shallowEqual(
this.props.routerState.routeParams,
nextProps.routerState.routeParams
);
if (paramsChanged) {
this.reloadProps(nextProps.routerState.routeParams);
}
},
reloadProps(params) {
this.context.asyncProps.reloadComponent(
this.props.Component,
params || this.props.routerState.routeParams,
this
);
},
render() {
var { Component, routerState } = this.props;
var { componentsArray, propsArray, loading } = this.context.asyncProps;
var asyncProps = getPropsForComponent(Component, componentsArray, propsArray);
return <Component {...routerState} {...asyncProps} loading={loading} reloadAsyncProps={this.reloadProps} />;
}
});
var AsyncProps = React.createClass({
statics: {
hydrate: hydrate,
rehydrate: setServerPropsArray,
createElement(Component, state) {
return typeof Component.loadProps === 'function' ?
<RouteComponentWrapper Component={Component} routerState={state}/> :
<Component {...state}/>;
}
},
childContextTypes: contextTypes,
getChildContext() {
return {
asyncProps: Object.assign({
reloadComponent: this.reloadComponent,
loading: this.state.previousProps !== null
}, this.state.asyncProps),
};
},
getInitialState() {
return {
asyncProps: {
propsArray: _serverPropsArray,
componentsArray: _serverPropsArray ? filterAndFlattenComponents(this.props.components) : null,
},
previousProps: null
};
},
componentDidMount() {
var initialLoad = this.state.asyncProps.propsArray === null;
if (initialLoad) {
hydrate(this.props, (err, asyncProps) => {
this.setState({ asyncProps });
});
}
},
componentWillReceiveProps(nextProps) {
var routerTransitioned = nextProps.location !== this.props.location;
if (!routerTransitioned)
return;
var oldComponents = this.props.components;
var newComponents = nextProps.components;
var components = arrayDiff(
filterAndFlattenComponents(oldComponents),
filterAndFlattenComponents(newComponents)
);
if (components.length === 0)
return;
this.loadAsyncProps(components, nextProps.params);
},
beforeLoad(cb) {
this.setState({
previousProps: this.props
}, cb);
},
afterLoad(err, asyncProps, cb) {
this.inflightLoader = null;
mergeAsyncProps(this.state.asyncProps, asyncProps);
this.setState({
previousProps: null,
asyncProps: this.state.asyncProps
}, cb);
},
loadAsyncProps(components, params, cb) {
if (this.inflightLoader) {
this.inflightLoader.cancel();
}
this.beforeLoad(() => {
this.inflightLoader = loadAsyncProps(components, params, (err, asyncProps) => {
this.afterLoad(err, asyncProps, cb);
});
});
},
reloadComponent(Component, params, instance) {
this.loadAsyncProps([Component], params, () => {
// gotta fix this hack ... change in context doesn't cause the
// RouteComponentWrappers to rerender (first one will because
// of cloneElement)
if (instance.isMounted())
instance.forceUpdate();
});
},
render() {
var { route } = this.props;
var { asyncProps, previousProps } = this.state;
var initialLoad = asyncProps.propsArray === null;
if (initialLoad)
return route.renderInitialLoad ? route.renderInitialLoad() : null;
else if (previousProps)
return React.cloneElement(previousProps.children, { loading: true });
else
return this.props.children;
}
});
export default AsyncProps;
|
frontWeb/main/react/react-router/basic/dev/authExample.js | skycolor/study | import React from 'react'
import {
BrowserRouter as Router,
Route,
Link,
Redirect,
withRouter
} from 'react-router-dom'
////////////////////////////////////////////////////////////
// 1. Click the public page
// 2. Click the protected page
// 3. Log in
// 4. Click the back button, note the URL each time
const AuthExample = () => (
<Router>
<div>
<AuthButton/>
<ul>
<li><Link to="/public">Public Page</Link></li>
<li><Link to="/protected">Protected Page</Link></li>
</ul>
<Route path="/public" component={Public}/>
<Route path="/login" component={Login}/>
<PrivateRoute path="/protected" component={Protected}/>
</div>
</Router>
)
const fakeAuth = {
isAuthenticated: false,
authenticate(cb) {
this.isAuthenticated = true
setTimeout(cb, 100) // fake async
},
signout(cb) {
this.isAuthenticated = false
setTimeout(cb, 100)
}
}
const AuthButton = withRouter(({ history }) => (
fakeAuth.isAuthenticated ? (
<p>
Welcome! <button onClick={() => {
fakeAuth.signout(() => history.push('/'))
}}>Sign out</button>
</p>
) : (
<p>You are not logged in.</p>
)
))
const PrivateRoute = ({ component: Component}) => (
<Route render={props => (
fakeAuth.isAuthenticated ? (
<Component {...props}/>
) : (
<Redirect to={{
pathname: '/login',
state: { from: props.location }
}}/>
)
)}/>
)
const Public = () => <h3>Public</h3>
const Protected = () => <h3>Protected</h3>
class Login extends React.Component {
render() {
const { from } = this.props.location.state || { from: { pathname: '/' } }
const { redirectToReferrer } = this.state
if (redirectToReferrer) {
return (
<Redirect to={from}/>
)
}
return (
<div>
<p>You must log in to view the page at {from.pathname}</p>
<button onClick={this.login}>Log in</button>
</div>
)
}
}
export default AuthExample |
index.ios.js | Andrey11/golfmanager | 'use strict';
import * as FirebaseKeys from './config/firebaseKeys';
import * as Firebase from 'firebase';
import * as NavBar from './src/navigation/navigationBar';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Navigator,
Image
} from 'react-native';
import AuthControl from './src/scenes/authControl';
import styles from './src/styles/basestyles.js';
const firebaseApp = Firebase.initializeApp(FirebaseKeys.getFirebaseConfig());
class golfmanager extends Component {
/**
* ROUTE DEFINITION:
* {
* component: <COMPONENT_NAME>
* sceneType: <DEFAULT | UP_SWIPE | DOWN_SWIPE>
* showLeftNavButton: <true | false>
* showRightNavButton: <true | false>
* navHeaderTitle: <String>
* sceneBackgroundImage: <require('path_to_image')>
* passProps: {
* custom properties to pass to the component
* }
* }
*/
render() {
return (
<Navigator
initialRoute={{
component: AuthControl,
sceneType: 'DEFAULT',
passProps: {
navHeaderTitle: '',
leftButton: false,
rightButton: false
}
}}
configureScene={(route) => {
if (route && route.passProps) {
if (route.passProps.sceneType === 'UP_SWIPE') {
return Navigator.SceneConfigs.VerticalUpSwipeJump;
} else if (route.passProps.sceneType === 'DOWN_SWIPE') {
return Navigator.SceneConfigs.VerticalDownSwipeJump;
}
// DEFAULT
return Navigator.SceneConfigs.PushFromRight;
}
}}
renderScene={(route, navigator) => {
let bgImageSource = route.sceneBackgroundImage || require('./src/images/golf_bg_1.jpg');
return (
<Image style={styles.background_image} source={bgImageSource}>
<route.component navigator={navigator} firebaseApp={firebaseApp} {...route.passProps} />
</Image>
);
}}
navigationBar={
<Navigator.NavigationBar style={styles.navBar} routeMapper={NavBar.navigationBarRouteMapper} />
}
/>
);
}
}
AppRegistry.registerComponent('golfmanager', () => golfmanager);
|
docs/src/app/DeviceList.js | mit-cml/iot-website-source | // -*- mode: javascript; js-indent-level: 2; -*-
import React from 'react';
require('./table.css');
const deviceList = [
{
title: 'Bluetooth low energy',
img: 'assets/tutorials/bluetooth_logo.png',
link: '#/bluetoothle/bluetoothleintro',
description: 'Bluetooth Low Energy, also referred to as Bluetooth LE or simply BLE, is a new protocol similar to classic Bluetooth except that it is designed to consume less power while maintaining comparable functionality.',
aixUrl: '/assets/resources/edu.mit.appinventor.ble.aix',
}, {
title: 'Arduino 101',
img: 'assets/howtos/arduino_101.png',
link: '#/arduino101/arduino101intro',
description: 'The Arduino 101 is a version of the popular Arduino platform based on the Intel® Curie™ chipset. It has the same form factor as many other Arduino but supports built-in Bluetooth® low energy.',
aixUrl: '/assets/resources/edu.mit.appinventor.iot.arduino101.aix',
}, {
title: 'BBC micro:bit',
img: 'assets/howtos/microbit_back.png',
link: '#/microbit/microbitintro',
description: "The micro:bit is a computing platform from the BBC. It is an open platform for developing all manner of projects and is programmable by many different editors, including a blocks editor provided by Microsoft. Learn more about the micro:bit at the Micro:bit Educational Foundation's website.",
aixUrl: '/assets/resources/SimpleMicrobit.aix',
},
{
title: 'Lego EV3 robot',
img: 'assets/howtos/LegoEV3.png',
link: '#/legoev3/legoev3intro',
description: "Lego Mindstorms EV3 is the third generation robotics kit in Lego's Mindstorms product line. Lego EV3 can interact with App Inventor through Bluetooth and Wi-Fi(need additional Wi-Fi dongle).",
},
{
title: 'LinkIt Smart 7688/7688 Duo',
img: 'assets/howtos/LinkIt_7688duo.png',
link: '#/linkit/linkit7688',
description: "The LinkIt Smart 7688 Duo development board uses MT7688AN as its MPU, complemented by an ATmega32U4 MCU. In addition to application development in Python, Node.js and native C for MT7688AN, applications for the MCU can be developed using the Arduino IDE. LinkIt Smart 7688/7688 Duo can interact with App Inventor through Wi-Fi.",
},
{
title: 'LinkIt 7697',
img: 'assets/howtos/LinkIt_7697.png',
link: '#/linkit/linkit7697',
description: "LinkIt 7697 is an Arduino-compatible dev board of the LinkIt IoT platform with onboard Bluetooth Low energy and W-fi ommunication. It provides hardware development kits (HDKs) for user to develop prototypes of IoT devices. LinkIt 7697 can interact with App Inventor through Bluetooth Low energy and Wi-Fi.",
aixUrl: '/assets/resources/edu.mit.appinventor.iot.mt7697.aix',
},
{
title: 'MIT App Inventor Codi Bot',
img: 'assets/howtos/codibot1.jpg',
link: '#/codibot/codibotintro',
description: "The MIT App Inventor Codi Bot is a hands-on IoT kit. Our adorable mascot can be controlled via App Inventor through Bluetooth communication. This educational kit is easy to use and guides users through the whole process of development, from building a robot to programming it.",
},
];
const DeviceList = () => (
<div className="app-list">
<table>
<thead>
<tr>
<th>Device</th>
<th>Description</th>
<th>Extension</th>
</tr>
</thead>
<tbody>
{deviceList.map((app) => (
<tr key={app.link}>
<td style={{textAlign: 'center'}}><a style={{textDecoration: 'none'}} href={app.link}><img src={app.img} alt={app.title} style={{width: '100%', minWidth: '40px', maxWidth: '320px'}} /></a></td>
<td><a style={{display: 'block', textDecoration: 'none', color: 'black'}} href={app.link}><strong>{app.title}</strong><br />{app.description}</a></td>
<td>{app.aixUrl && <a href={app.aixUrl}>Download</a>}</td>
</tr>
))}
</tbody>
</table>
</div>
);
export default DeviceList;
|
react/Icon/Icon.demo.js | seekinternational/seek-asia-style-guide | import React from 'react';
import Icon from './Icon';
import IconPack from './Icon.path';
import PropTypes from 'prop-types';
import * as sketch from './Icon.sketch';
import { PageBlock } from 'seek-asia-style-guide/react';
const IconContainer = ({ component: DemoComponent, componentProps }) => {
return (
<PageBlock style={'width: 100%;'}>
<DemoComponent {...componentProps} />
</PageBlock>
);
};
IconContainer.propTypes = {
component: PropTypes.func,
componentProps: PropTypes.object
};
const getSvgPaths = IconPack.map(obj => {
const rObj = {
label: obj.label,
groupBy: obj.category,
transformProps: props => ({
...props,
type: obj.name
})
};
return rObj;
});
export default {
route: '/icon',
title: 'Icon',
component: Icon,
sketch,
initialProps: {
type: 'language'
},
options: [
{
label: 'Type',
type: 'radio',
states: getSvgPaths
},
{
label: 'Size',
type: 'radio',
states: [
{
label: 'Size unset',
transformProps: props => props
},
{
label: 'Small',
transformProps: props => ({
...props,
size: 'small'
})
},
{
label: 'Normal',
transformProps: props => ({
...props,
size: 'normal'
})
},
{
label: 'Large',
transformProps: props => ({
...props,
size: 'large'
})
}
]
},
{
label: 'Line height',
type: 'radio',
states: [
{
label: 'Line height',
transformProps: props => props
},
{
label: 'Conversational',
transformProps: props => ({
...props,
lineHeight: 'conversational'
})
},
{
label: 'Intimate',
transformProps: props => ({
...props,
lineHeight: 'intimate'
})
},
{
label: 'Loud',
transformProps: props => ({
...props,
lineHeight: 'loud'
})
},
{
label: 'Screaming',
transformProps: props => ({
...props,
lineHeight: 'screaming'
})
},
{
label: 'Shouting',
transformProps: props => ({
...props,
lineHeight: 'shouting'
})
},
{
label: 'Waving',
transformProps: props => ({
...props,
lineHeight: 'waving'
})
},
{
label: 'Whispering',
transformProps: props => ({
...props,
lineHeight: 'whispering'
})
},
{
label: 'Whistling',
transformProps: props => ({
...props,
lineHeight: 'whistling'
})
},
{
label: 'Yelling',
transformProps: props => ({
...props,
lineHeight: 'yelling'
})
}
]
},
{
label: 'Rotate',
type: 'radio',
states: [
{
label: 'No rotation',
transformProps: props => props
},
{
label: '90 degree',
transformProps: props => ({
...props,
rotation: '90deg'
})
},
{
label: '180 degree',
transformProps: props => ({
...props,
rotation: '180deg'
})
},
{
label: '-90 degree',
transformProps: props => ({
...props,
rotation: '-90deg'
})
},
{
label: '-180 degree',
transformProps: props => ({
...props,
rotation: '-180deg'
})
},
{
label: 'reset (animated)',
transformProps: props => ({
...props,
smoothRotate: true,
rotation: 'reset'
})
},
{
label: '90 deg (animated)',
transformProps: props => ({
...props,
smoothRotate: true,
rotation: '90deg'
})
},
{
label: '180 deg (animated)',
transformProps: props => ({
...props,
smoothRotate: true,
rotation: '180deg'
})
},
{
label: '-90 deg (animated)',
transformProps: props => ({
...props,
smoothRotate: true,
rotation: '-90deg'
})
},
{
label: '-180 deg (animated)',
transformProps: props => ({
...props,
smoothRotate: true,
rotation: '-180deg'
})
}
]
},
{
label: 'One time animation',
type: 'radio',
states: [
{
label: 'One time animation',
transformProps: props => props
},
{
label: 'Bounce',
transformProps: props => ({
...props,
animation: 'bounce'
})
},
{
label: 'Pop in',
transformProps: props => ({
...props,
animation: 'popIn'
})
}
]
}
]
};
|
docs/src/NavMain.js | deerawan/react-bootstrap | import React from 'react';
import { Link } from 'react-router';
import Navbar from '../../src/Navbar';
import Nav from '../../src/Nav';
const NAV_LINKS = {
'introduction': {
link: 'introduction',
title: 'Introduction'
},
'getting-started': {
link: 'getting-started',
title: 'Getting started'
},
'components': {
link: 'components',
title: 'Components'
},
'support': {
link: 'support',
title: 'Support'
}
};
const NavMain = React.createClass({
propTypes: {
activePage: React.PropTypes.string
},
render() {
let brand = <Link to="home" className="navbar-brand">React-Bootstrap</Link>;
let links = Object.keys(NAV_LINKS).map(this.renderNavItem).concat([
<li key="github-link">
<a href="https://github.com/react-bootstrap/react-bootstrap" target="_blank">GitHub</a>
</li>
]);
return (
<Navbar componentClass="header" brand={brand} staticTop className="bs-docs-nav" role="banner" toggleNavKey={0}>
<Nav className="bs-navbar-collapse" role="navigation" eventKey={0} id="top">
{links}
</Nav>
</Navbar>
);
},
renderNavItem(linkName) {
let link = NAV_LINKS[linkName];
return (
<li className={this.props.activePage === linkName ? 'active' : null} key={linkName}>
<Link to={link.link}>{link.title}</Link>
</li>
);
}
});
export default NavMain;
|
src/components/HowItWorks/HowItWorks.js | moje-skoly/app-reloaded | import React, { Component } from 'react';
import { Grid, Row, Col } from 'react-bootstrap';
import './HowItWorks.less';
export default class HowItWorks extends Component {
render() {
return (
<div className="howItWorks">
<div className="white">
<div className="homepageSection">
<Grid>
<Row>
<Col xs={12}>
<h2>Jak to funguje</h2>
</Col>
</Row>
<Row>
<Col sm={4}>
<div className="item">
<p className="imgWrapper">
<img
src={require('../../theme/images/globus.svg')}
alt="Lokalita"
/>
</p>
<div className="bubble">
<h3>Lokalita</h3>
<p>
Vyberte si lokalitu, ve které hledáte školu pro své dítě. Typicky stačí zadat město nebo část města.
</p>
</div>
</div>
</Col>
<Col sm={4}>
<div className="item">
<p className="imgWrapper">
<img
src={require('../../theme/images/trychtir.svg')}
alt="Řazení podle filtrů"
/>
</p>
<div className="bubble">
<h3>Řazení podle filtrů</h3>
<p>
Upřesněte výsledky svého hledání pomocí podrobného filtru. Výsledky nejvíce odpovídající zadaným hodnotám budou řazeny nejvýše.
</p>
</div>
</div>
</Col>
<Col sm={4}>
<div className="item">
<p className="imgWrapper">
<img
src={require('../../theme/images/stupne.svg')}
alt="Porovnání škol"
/>
</p>
<div className="bubble">
<h3>Porovnání škol</h3>
<p>
V přehledném zobrazení si porovnejte profil jednotlivých škol mezi sebou.
</p>
</div>
</div>
</Col>
</Row>
</Grid>
</div>
</div>
<div className="gray">
<div className="homepageSection">
<Grid>
<Row>
<Col sm={4}>
<div className="item">
<p className="imgWrapper">
<img
src={require('../../theme/images/lopatka.svg')}
alt="Mateřská školka"
/>
</p>
<div className="grayBubble">
<h3>Otevřená data</h3>
<p>
Data o školách jsou agregována z otevřených zdrojů od veřejných institucí jako je Ministerstvo školství, mládeže a tělovýchovy a Česká školní inspekce.
</p>
</div>
</div>
</Col>
<Col sm={4}>
<div className="item">
<p className="imgWrapper">
<img
src={require('../../theme/images/brasna.svg')}
alt="Základní škola"
/>
</p>
<div className="grayBubble">
<h3>Tvrdá fakta</h3>
<p>
Zprostředkováváme přehledně faktické informace z ověřených zdrojů, abyste mohli udělat racionální, informované rozhodnutí při výběru školy.
</p>
</div>
</div>
</Col>
<Col sm={4}>
<div className="item">
<p className="imgWrapper">
<img
src={require('../../theme/images/skateboard.svg')}
alt="Střední škola"
/>
</p>
<div className="grayBubble">
<h3>Školy jsou pestré</h3>
<p>
Při výběru školy je dobré vzít úvahu více faktorů. Školní program, nabízené kroužky, družina, počet žáků ve třídě, to vše může hrát větši roli, než se zdá.
</p>
</div>
</div>
</Col>
</Row>
</Grid>
</div>
</div>
</div>
);
}
}
|
src/components/Empty/Empty.js | Landish/react-spectre-css | import React from 'react';
import { string } from 'prop-types';
import classNames from 'classnames';
import Icon from '../Icon/Icon';
const Empty = ({ icon, title, description, children, ...rest }) => {
return (
<div className={classNames('empty')} {...rest}>
{icon &&
<div className={classNames('empty-icon')}>
<Icon name={icon} />
</div>}
{title &&
<h4 className={classNames('empty-title')}>
{title}
</h4>}
{description &&
<p className={classNames('empty-subtitle')}>
{description}
</p>}
<div className={classNames('empty-action')}>
{children}
</div>
</div>
);
};
/**
* Empty property types.
*/
Empty.propTypes = {
/**
* Icon of the empty state
*/
icon: string,
/**
* Title of the empty state
*/
title: string,
/**
* Description of the empty state
*/
description: string
};
/**
* Empty default properties.
*/
Empty.defaultProps = {
icon: '',
title: '',
description: ''
};
export default Empty;
|
src/index.js | YehongYou/react-blog | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import {BrowserRouter, Route, Switch} from 'react-router-dom';
// BrowserBrouter object interact history lib. route is real core in react-router
import promise from 'redux-promise';
import reducers from './reducers';
import PostsIndex from './components/posts_index';
import PostsNew from './components/posts_new';
import PostsShow from './components/posts_show';
const createStoreWithMiddleware = applyMiddleware(promise)(createStore);
//url match the path=>show component
ReactDOM.render(
<Provider store={createStoreWithMiddleware(reducers)}>
<BrowserRouter>
<div>
<Switch>
<Route path="/posts/new" component={PostsNew} />
<Route path="/posts/:id" component={PostsShow} />
<Route path="/" component={PostsIndex} />
</Switch>
</div>
</BrowserRouter>
</Provider>
, document.querySelector('.container'));
|
app/jsx/gradezilla/default_gradebook/components/SubmissionCommentListItem.js | venturehive/canvas-lms | /*
* Copyright (C) 2017 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { bool, func } from 'prop-types';
import I18n from 'i18n!gradebook';
import Avatar from 'instructure-ui/lib/components/Avatar';
import Button from 'instructure-ui/lib/components/Button';
import Link from 'instructure-ui/lib/components/Link';
import IconEditLine from 'instructure-icons/lib/Line/IconEditLine';
import IconTrashLine from 'instructure-icons/lib/Line/IconTrashLine';
import Typography from 'instructure-ui/lib/components/Typography';
import DateHelper from 'jsx/shared/helpers/dateHelper';
import TextHelper from 'compiled/str/TextHelper';
import CommentPropTypes from 'jsx/gradezilla/default_gradebook/propTypes/CommentPropTypes';
import SubmissionCommentUpdateForm from 'jsx/gradezilla/default_gradebook/components/SubmissionCommentUpdateForm';
function submissionCommentDate (date) {
return DateHelper.formatDatetimeForDisplay(date, 'short');
}
export default class SubmissionCommentListItem extends React.Component {
static propTypes = {
...CommentPropTypes,
editing: bool.isRequired,
last: bool.isRequired,
cancelCommenting: func.isRequired,
currentUserIsAuthor: bool.isRequired,
deleteSubmissionComment: func.isRequired,
editSubmissionComment: func.isRequired,
updateSubmissionComment: func.isRequired,
processing: bool.isRequired,
setProcessing: func.isRequired
};
componentDidUpdate (prevProps) {
if (prevProps.editing && !this.props.editing) {
this.editButton.focus();
}
}
handleDeleteComment = () => {
const message = I18n.t('Are you sure you want to delete this comment?');
if (confirm(message)) {
this.props.deleteSubmissionComment(this.props.id);
}
}
handleEditComment = () => {
this.props.editSubmissionComment(this.props.id);
}
bindEditButton = (ref) => {
this.editButton = ref;
}
commentBody () {
if (this.props.editing) {
return (
<SubmissionCommentUpdateForm
cancelCommenting={this.props.cancelCommenting}
comment={this.props.comment}
id={this.props.id}
processing={this.props.processing}
setProcessing={this.props.setProcessing}
updateSubmissionComment={this.props.updateSubmissionComment}
/>
);
}
return (
<div>
<Typography size="small" lineHeight="condensed">
<p style={{ margin: '0 0 0.75rem' }}>{this.props.comment}</p>
</Typography>
</div>
);
}
commentTimestamp () {
const date = submissionCommentDate(this.props.editedAt || this.props.createdAt);
return this.props.editedAt ? I18n.t('(Edited) %{date}', { date }) : date;
}
render () {
return (
<div>
<div style={{ display: 'flex', justifyContent: 'space-between', margin: '0 0 0.75rem' }}>
<div style={{ display: 'flex' }}>
<Link href={this.props.authorUrl}>
<Avatar
size="small"
name={this.props.author}
alt={I18n.t('Avatar for %{author}', { author: this.props.author })}
src={this.props.authorAvatarUrl}
margin="0 x-small 0 0"
/>
</Link>
<div>
<div style={{ margin: '0 0 0 0.375rem' }}>
<Typography weight="bold" size="small" lineHeight="fit">
<Link href={this.props.authorUrl}>{TextHelper.truncateText(this.props.author, { max: 22 })}</Link>
</Typography>
</div>
<div style={{ margin: '0 0 0 0.375rem' }}>
<Typography size="small" lineHeight="fit">
{this.commentTimestamp()}
</Typography>
</div>
</div>
</div>
<div style={{minWidth: '60px'}}>
{
this.props.currentUserIsAuthor &&
<Button
size="small"
variant="icon"
onClick={this.handleEditComment}
buttonRef={this.bindEditButton}
>
<IconEditLine title={I18n.t('Edit Comment: %{comment}', { comment: this.props.comment })}/>
</Button>
}
<span style={{ float: 'right' }}>
<Button size="small" variant="icon" onClick={this.handleDeleteComment}>
<IconTrashLine title={I18n.t('Delete Comment: %{comment}', { comment: this.props.comment })}/>
</Button>
</span>
</div>
</div>
{ this.commentBody() }
{ !this.props.last && <hr style={{ margin: '1rem 0', borderTop: 'dashed 0.063rem' }} /> }
</div>
);
}
}
|
src/index.js | AmiableAnteater/wohnzimmerlicht | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
src/stories/index.js | ernestofreyreg/react-calendar-month | import React from 'react';
import { storiesOf } from '@kadira/storybook';
import Month from '../index';
import '../styles.css';
import './stories.css';
const STORY_WITH_STYLES = `// Styles
.MyMonth { background-color: #ddd; color: black; }
.MyMonth .Week .Day > .Day__number { font-size: 20px; color: #aaa; bottom: 4px; top: auto; }
.MyMonth .Week .EmptyCell { background-color: white; }
// JS
<Month month={2} year={2016} className="MyMonth"/>
`;
const STORY_WITH_DATA = `// Styles
.MyMonthWithData .Week .Day > .Day__number {
background-color: #ccc; font-size: 10px;
color: #fff; bottom: 4px; top: auto; border-radius: 10px; }
.MyMonthWithData .Week .Day.today { background-color: rgba(46, 175, 60, 0.25); }
.DayData {
margin: 3px; background-color: #0b97c4;
color: white; border-radius: 10px; line-height: 19px;
font-size: 12px; text-align: center; }
// JS
const data = {
1: {component: <DayData>Jane</DayData>},
3: {component: <DayData>Jon</DayData>},
7: {component: <DayData>Max</DayData>},
8: {component: <DayData>Lorraine</DayData>},
9: {component: <DayData>Patrick</DayData>, className: 'today'},
12: {component: <DayData>Sam</DayData>},
20: {component: <DayData>Vera</DayData>},
23: {component: <DayData>Loise</DayData>}
};
<Month month={2} year={2016} className="MyMonthWithData" data={data}/>
`;
function createMarkup(s) { return { __html: s }; }
class StoryWithCodeExample extends React.Component {
static propTypes = {
codeExample: React.PropTypes.string.isRequired,
children: React.PropTypes.element.isRequired,
};
render() {
return (
<div className="story">
<div className="code-example">
<pre>
<code dangerouslySetInnerHTML={createMarkup(this.props.codeExample)} />
</pre>
</div>
<div className="component-example">
{this.props.children}
</div>
</div>
);
}
}
const MONTH_NAMES = [
'January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December',
];
const singleMonth = storiesOf('Single Month 2016', module);
MONTH_NAMES.forEach((monthName, i) => {
singleMonth.add(`${monthName}/2016`, () => (
<StoryWithCodeExample codeExample={`<Month month={${i + 1}} year={2016}/>`}>
<Month month={i + 1} year={2016} />
</StoryWithCodeExample>
));
});
storiesOf('2 Months at once', module)
.add('January - February / 2016', () => (
<div style={{ display: 'flex', flexDirection: 'row', width: '100%' }}>
<div style={{ display: 'inline-flex', flexGrow: 8, flexDirection: 'column' }}>
<Month month={1} year={2016} />
</div>
<div style={{ display: 'inline-flex', flexGrow: 1 }}></div>
<div style={{ display: 'inline-flex', flexGrow: 8, flexDirection: 'column' }}>
<Month month={2} year={2016} />
</div>
</div>
));
storiesOf('CSS Styling', module)
.add('January/2016', () => (
<StoryWithCodeExample codeExample={STORY_WITH_STYLES}>
<Month month={2} year={2016} className="MyMonth" />
</StoryWithCodeExample>
));
class DayData extends React.Component {
static propTypes = {
children: React.PropTypes.element.isRequired,
};
render() {
return (<div className="DayData">{this.props.children}</div>);
}
}
storiesOf('With Data', module)
.add('February/2016', () => {
const data = {
1: { component: <DayData>Jane</DayData> },
3: { component: <DayData>Jon</DayData> },
7: { component: <DayData>Max</DayData> },
8: { component: <DayData>Lorraine</DayData> },
9: { component: <DayData>Patrick</DayData>, className: 'today' },
12: { component: <DayData>Sam</DayData> },
20: { component: <DayData>Vera</DayData> },
23: { component: <DayData>Loise</DayData> },
};
return (
<StoryWithCodeExample codeExample={STORY_WITH_DATA}>
<Month month={2} year={2016} className="MyMonthWithData" data={data} />
</StoryWithCodeExample>
);
});
|
src/components/auth/require_auth.js | donpinkus/boilerplate-single-server | import React, { Component } from 'react';
import { connect } from 'react-redux';
/*
If the user is not authd, then it will redirect them to "/".
If at anytime auth changes, they get redirected.
*/
export default function(ComposedComponent) {
class Authentication extends Component {
static contextTypes = {
router: React.PropTypes.object
}
componentWillMount() {
if (!this.props.authenticated) {
this.context.router.push('/');
}
}
componentWillUpdate(nextProps) {
if (!nextProps.authenticated) {
this.context.router.push('/');
}
}
render() {
return <ComposedComponent {...this.props} />
}
}
function mapStateToProps(state) {
return { authenticated: state.auth.authenticated };
}
return connect(mapStateToProps)(Authentication);
}
|
src/scenes/home/resetPassword/resetPassword.js | NestorSegura/operationcode_frontend | import React, { Component } from 'react';
import Section from 'shared/components/section/section';
import SignUpLink from 'shared/components/signUpLink/signUpLink';
import RequestToken from './requestToken/requestToken';
import SetPassword from './setPassword/setPassword';
import styles from './resetPassword.css';
const queryString = require('query-string');
class ResetPassword extends Component {
state = {
resetPasswordToken: null
};
componentDidMount = () => {
const parsed = queryString.parse(window.location.search);
this.setState({ resetPasswordToken: parsed.reset_password_token });
};
render() {
return (
<Section className={styles.resetPassword} title="Reset Password">
{this.state.resetPasswordToken ? (
<SetPassword resetPasswordToken={this.state.resetPasswordToken} />
) : (
<RequestToken />
)}
<SignUpLink />
</Section>
);
}
}
export default ResetPassword;
|
public/js/components/comments/CommentList.react.js | MadushikaPerera/Coupley | import React from 'react';
import CommentAction from '../../actions/ActivityFeed/CommentAction';
import Comment from './Comment.react';
import CommentStore from '../../stores/CommentStore';
import List from 'material-ui/lib/lists/list';
import ListItem from 'material-ui/lib/lists/list-item';
var CommentList = React.createClass({
getInitialState: function () {
return {
data: CommentStore.getCommentsData()
}
},
componentDidMount: function () {
CommentStore.addChangeListener(this._onChange);
CommentAction.getcomments();
},
_onChange: function () {
this.setState({data: CommentStore.getCommentsData()});
},
_renderSearchItem: function () {
console.log(this.state.data);
return this.state.data.map((comment) => {
return (<Comment key={comment.id} cid={comment.id} fname={comment.firstname} comment_txt={comment.comment_txt} />);
});
},
render: function () {
return (
<div>
{this._renderSearchItem()}
</div>
);
}
});
export default CommentList; |
lib/components/intro.js | tombenke/react-ui-archetype | import React from 'react';
import { Jumbotron, Button } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
import Header from './header';
var config = require('../../config.json');
class Intro extends React.Component {
render() {
return (
<div>
<Header brand={config.appname} navItems={[
{to: "items", label: "Items"},
{to: "help", label: "Help"}
]} />
<main role="main" className="container">
<Jumbotron className="text-center">
<h1>{config.brand}</h1>
<p>v1.0.0</p>
<p><LinkContainer to="/items"><Button bsSize="large" bsStyle="primary" href="/items">Items</Button></LinkContainer></p>
<p><LinkContainer to="/help"><Button bsSize="large" bsStyle="primary">Help</Button></LinkContainer></p>
</Jumbotron>
</main>
</div>
)
}
}
module.exports = Intro
|
src/Resume/Experience.js | bogdanpetru/resume | import React from 'react';
import parseText from '../utils/parseText';
/**
* TODO calculate duration
*/
const Experience = ({
company,
startDate,
endDate,
summary
}) => <div className="experience">
<header className="experience__header">
<h3>
{company}
</h3>
<div className="experience-date">
<span className="date experience__start-date">{startDate}</span> - <span className="date experience__end-date">{endDate}</span>
</div>
</header>
<div className="summary" children={parseText(summary)} />
</div>
export default Experience |
src/lib/components/to-js.js | sgillespie/beer-math | import React from 'react';
import curry from 'ramda/src/curry';
import map from 'ramda/src/map';
import { Iterable } from 'immutable';
const toJs = curry((WrappedComponent, props) => {
const propsJs = map(
prop => (Iterable.isIterable(prop) ? prop.toJS() : prop),
props);
return (
<WrappedComponent {...propsJs} />
);
});
export default toJs;
|
client/components/menu/banks.js | jankeromnes/kresus | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { get } from '../../store';
import BankListItemComponent from './bank';
const BankListComponent = props => {
let { currentAccessId, currentAccountId } = props;
let banks = props.accesses.map(access => {
let isActive = currentAccessId === access.id;
return (
<BankListItemComponent
key={ access.id }
access={ access }
active={ isActive }
location={ props.location }
currentAccountId={ currentAccountId }
/>
);
});
return (
<div className="banks sidebar-list">
<ul className="bank-details">{ banks }</ul>
</div>
);
};
BankListComponent.propTypes = {
// The list of bank accesses
accesses: PropTypes.array.isRequired,
// The id of the current access
currentAccessId: PropTypes.string.isRequired,
// The location object containing the current path.
// Needed to rerender the accounts links on route change
location: PropTypes.object.isRequired
};
const Export = connect((state, oldProps) => {
let access = get.accessByAccountId(state, oldProps.currentAccountId);
let currentAccessId = access !== null ? access.id : '';
return {
accesses: get.accesses(state),
currentAccessId
};
})(BankListComponent);
export default Export;
|
src/components/Error.js | Nfinley/Showcase-Playlist-Generator | import React, { Component } from 'react';
/**
* Our error page
* Displays the error
*/
export default class Error extends Component {
render() {
// injected via react-router
const { errorMsg } = this.props.params;
return (
<div className="error">
<h2>Sorry An Error Occured Please go back to the home page</h2>
<p>{errorMsg}</p>
</div>
);
}
}
|
React Native/Demos/MenuList/index.android.js | AngryLi/ResourceSummary | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class MenuList extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit index.android.js
</Text>
<Text style={styles.instructions}>
Shake or press menu button for dev menu
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('MenuList', () => MenuList);
|
src/app/search/searchResults/searchResultsUtils.js | cityofasheville/simplicity2 | import React from 'react';
import gql from 'graphql-tag';
import { IM_SHIELD3, IM_OFFICE, IM_ROAD, IM_USER, IM_USERS, IM_LOCATION, IM_HOME2, IM_QUESTION, IM_GOOGLE, IM_SEARCH } from '../../../shared/iconConstants';
import Icon from '../../../shared/Icon';
export const searchQuery = gql`
query searchQuery($searchString: String!, $searchContexts: [String]) {
search(searchString: $searchString, searchContexts: $searchContexts) {
type
results {
type
... on AddressResult {
civic_address_id
address
zipcode
is_in_city
}
... on PropertyResult {
pinnum
address
city
zipcode
}
... on StreetResult {
full_street_name
zip_code
centerline_ids
}
... on NeighborhoodResult {
name
nbhd_id
}
... on OwnerResult {
ownerName: name
pinnums
}
... on PlaceResult {
type
placeName: name
id
place_id
address
types
}
}
}
}
`;
export const getResultType = (type) => {
switch (type) {
case 'address':
case 'civicAddressId':
return 'address';
case 'property':
case 'pin':
return 'property';
default:
return type;
}
};
export const getEntities = (selected) => {
const entityTypes = selected.split(',');
const entities = [
{ label: 'Addresses', type: 'address', checked: true },
{ label: 'Properties', type: 'property', checked: true },
{ label: 'Neighborhoods', type: 'neighborhood', checked: true },
{ label: 'Streets', type: 'street', checked: true },
{ label: 'Owners', type: 'owner', checked: true },
// { label: 'Permits', type: 'permit', checked: true },
// { label: 'Google places', type: 'google', checked: true },
];
// return all if none
if (selected === undefined || selected === 'undefined' || selected.length === 0) {
return entities;
}
for (let entity of entities) {
if (entityTypes.indexOf(entity.type) === -1) {
entity.checked = false;
}
}
return entities;
};
export const getEntitiesToSearch = (entities) => {
const entitiesToSearch = [];
for (let entity of entities) {
if (entity.checked) {
if (entity.type === 'address') {
entitiesToSearch.push('address');
entitiesToSearch.push('civicAddressId');
} else if (entity.type === 'property') {
entitiesToSearch.push('pin');
entitiesToSearch.push('property');
} else if (entity.type === 'neighborhood') {
entitiesToSearch.push('neighborhood');
} else if (entity.type === 'street') {
entitiesToSearch.push('street');
} else if (entity.type === 'owner') {
entitiesToSearch.push('owner');
// } else if (entity.type === 'permit') {
// entitiesToSearch.push('permit');
} else if (entity.type === 'google') {
entitiesToSearch.push('place');
}
}
}
return entitiesToSearch;
};
export const getLink = (type, id, search, entities, label, originalSearch) => {
switch (type) {
case 'address':
if (originalSearch) {
return `/address?search=${originalSearch}&placeSearch=${search}&id=${id}&entities=${entities}&entity=address`;
}
return `/address?search=${search}&id=${id}&entities=${entities}&entity=address`;
case 'property':
return `/property?search=${search}&id=${id}&entities=${entities}&entity=property`;
case 'street':
return `/street?search=${search}&id=${id}&entities=${entities}&label=${label}&entity=street`;
case 'neighborhood':
return `/neighborhood?search=${search}&id=${id}&entities=${entities}&label=${label}&entity=neighborhood`;
case 'permit':
return `/development/detail?search=${search}&id=${id}&entities=${entities}&entity=permit`;
case 'crime':
return `/crime/detail?search=${search}&id=${id}&entities=${entities}&entity=crime`;
case 'owner':
return `/owner?search=${search}&id=${id}&entities=${entities}&entity=owner&view=list`;
case 'place':
return `/search/googlePlaceMatches?search=${search}&placeSearch=${id}&entities=${entities}`;
default:
return '/';
}
};
export const getPlural = (type) => {
switch (type) {
case 'address':
return 'Addresses';
case 'property':
return 'Properties';
case 'owner':
return 'Owners';
default:
return [type.charAt(0).toUpperCase(), type.slice(1), 's'].join('');
}
};
export const formatSearchResults = (search) => {
const formattedResults = [];
for (let context of search) {
if (context !== null && context.results.length > 0) {
formattedResults.push(
{
label: getResultType(context.results[0].type),
results: context.results.map((result) => {
switch (result.type) {
case 'address':
case 'civicAddressId':
return {
label: [result.address, result.zipcode].join(', '),
type: 'address',
id: result.civic_address_id,
inCity: result.is_in_city,
};
case 'property':
case 'pin':
return {
label: [[result.pinnum, ' -- '].join(''), result.address, ', ', result.zipcode].join(''),
type: 'property',
id: result.pinnum,
};
case 'street':
return {
label: result.zip_code === null ? result.full_street_name : [result.full_street_name, result.zip_code].join(', '),
type: 'street',
id: result.centerline_ids.join(','),
};
case 'neighborhood':
return {
label: result.name,
type: 'neighborhood',
id: result.nbhd_id,
};
case 'owner':
return {
label: result.ownerName,
type: 'owner',
id: result.pinnums.join(','),
};
case 'place':
return {
label: result.address,
type: 'place',
id: result.address,
place_name: result.placeName,
place_id: result.place_id,
};
default:
return result;
}
}),
});
}
}
return formattedResults;
};
export const getIcon = (type) => {
switch (type) {
case 'address':
return (<span style={{ marginRight: '5px' }}><Icon path={IM_LOCATION} size={26} /></span>);
case 'property':
return (<span style={{ marginRight: '5px' }}><Icon path={IM_HOME2} size={26} /></span>);
case 'street':
return (<span style={{ marginRight: '5px' }}><Icon path={IM_ROAD} size={26} /></span>);
case 'neighborhood':
return (<span style={{ marginRight: '5px' }}><Icon path={IM_USERS} size={26} /></span>);
case 'permit':
return (<span style={{ marginRight: '5px' }}><Icon path={IM_OFFICE} size={26} /></span>);
case 'crime':
return (<span style={{ marginRight: '5px' }}><Icon path={IM_SHIELD3} size={26} /></span>);
case 'owner':
return (<span style={{ marginRight: '5px' }}><Icon path={IM_USER} size={26} /></span>);
case 'place':
return (<span style={{ marginRight: '5px' }}><Icon path={IM_GOOGLE} size={26} /></span>);
case 'search':
return (<span style={{ marginRight: '5px' }}><Icon path={IM_SEARCH} size={26} /></span>);
default:
return (<span style={{ marginRight: '5px' }}><Icon path={IM_QUESTION} size={26} /></span>);
}
};
|
src/icons/Pricetag.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class Pricetag extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<path d="M471,261.4L471,261.4C471,261.4,471,261.4,471,261.4L260.9,49.8c0,0,0,0,0,0l-1.5-1.5c0,0-0.4,0-0.4,0
c-8.3-7.9-17.9-12-29.9-12.3v0l-99.7-3.7l-4.4-0.2c-11.2,0.2-22.2,4.5-30.7,13.1L45.1,94.3c-9,9-13.1,20.9-13.1,32.7c0,0,0,0,0,0.1
l0.3,4.2l6.7,97.3c0,0.1,0,0.2,0,0.2v1.9c0,0,0,0,0,0c1,8.7,4.5,17.3,10.4,24.4l5.5,5.4l206.3,208.8l3.1,3.1
c11.9,10.5,30,10,41.3-1.4l165.4-166.6C482.8,292.6,483,273.3,471,261.4z M144,192c-26.5,0-48-21.5-48-48s21.5-48,48-48
s48,21.5,48,48S170.5,192,144,192z"></path>
</g>
</g>;
} return <IconBase>
<g>
<path d="M471,261.4L471,261.4C471,261.4,471,261.4,471,261.4L260.9,49.8c0,0,0,0,0,0l-1.5-1.5c0,0-0.4,0-0.4,0
c-8.3-7.9-17.9-12-29.9-12.3v0l-99.7-3.7l-4.4-0.2c-11.2,0.2-22.2,4.5-30.7,13.1L45.1,94.3c-9,9-13.1,20.9-13.1,32.7c0,0,0,0,0,0.1
l0.3,4.2l6.7,97.3c0,0.1,0,0.2,0,0.2v1.9c0,0,0,0,0,0c1,8.7,4.5,17.3,10.4,24.4l5.5,5.4l206.3,208.8l3.1,3.1
c11.9,10.5,30,10,41.3-1.4l165.4-166.6C482.8,292.6,483,273.3,471,261.4z M144,192c-26.5,0-48-21.5-48-48s21.5-48,48-48
s48,21.5,48,48S170.5,192,144,192z"></path>
</g>
</IconBase>;
}
};Pricetag.defaultProps = {bare: false} |
js/src/Requests/requests.js | destenson/ethcore--parity | // Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import ReactDOM from 'react-dom';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { hideRequest } from '@parity/shared/lib/redux/providers/requestsActions';
import MethodDecoding from '@parity/ui/lib/MethodDecoding';
import IdentityIcon from '@parity/ui/lib/IdentityIcon';
import Progress from '@parity/ui/lib/Progress';
import ScrollableText from '@parity/ui/lib/ScrollableText';
import ShortenedHash from '@parity/ui/lib/ShortenedHash';
import styles from './requests.css';
const ERROR_STATE = 'ERROR_STATE';
const DONE_STATE = 'DONE_STATE';
const WAITING_STATE = 'WAITING_STATE';
class Requests extends Component {
static propTypes = {
requests: PropTypes.object.isRequired,
onHideRequest: PropTypes.func.isRequired
};
state = {
extras: {}
};
render () {
const { requests } = this.props;
const { extras } = this.state;
return (
<div className={ styles.requests }>
{
Object
.values(requests)
.map((request) => this.renderRequest(request, extras[request.requestId]))
}
</div>
);
}
renderRequest (request, extras = {}) {
const { show, transaction } = request;
if (!transaction) {
return null;
}
const state = this.getTransactionState(request);
const displayedTransaction = { ...transaction };
// Don't show gas and gasPrice
delete displayedTransaction.gas;
delete displayedTransaction.gasPrice;
const requestClasses = [ styles.request ];
const statusClasses = [ styles.status ];
const requestStyle = {};
const handleHideRequest = () => {
this.handleHideRequest(request.requestId);
};
if (state.type === ERROR_STATE) {
statusClasses.push(styles.error);
}
if (!show) {
requestClasses.push(styles.hide);
}
// Set the Request height (for animation) if found
if (extras.height) {
requestStyle.height = extras.height;
}
return (
<div
className={ requestClasses.join(' ') }
key={ request.requestId }
ref={ `request_${request.requestId}` }
onClick={ handleHideRequest }
style={ requestStyle }
>
<div className={ statusClasses.join(' ') }>
{ this.renderStatus(request) }
</div>
{
state.type === ERROR_STATE
? null
: (
<Progress
className={ styles.progress }
max={ 6 }
isDeterminate={ state.type !== WAITING_STATE }
value={
state.type === DONE_STATE
? +request.blockHeight
: 6
}
/>
)
}
<div className={ styles.container }>
<div
className={ styles.identity }
title={ transaction.from }
>
<IdentityIcon
address={ transaction.from }
inline
center
className={ styles.icon }
/>
</div>
<MethodDecoding
address={ transaction.from }
compact
historic={ state.type === DONE_STATE }
transaction={ displayedTransaction }
/>
</div>
</div>
);
}
renderStatus (request) {
const { error, transactionHash, transactionReceipt } = request;
if (error) {
return (
<div
className={ styles.inline }
title={ error.message }
>
<FormattedMessage
id='requests.status.error'
defaultMessage='An error occured:'
/>
<div className={ styles.fill }>
<ScrollableText
text={ error.text || error.message || error.toString() }
/>
</div>
</div>
);
}
if (transactionReceipt) {
return (
<FormattedMessage
id='requests.status.transactionMined'
defaultMessage='Transaction mined at block #{blockNumber} ({blockHeight} confirmations)'
values={ {
blockHeight: (+request.blockHeight || 0).toString(),
blockNumber: +transactionReceipt.blockNumber
} }
/>
);
}
if (transactionHash) {
return (
<div className={ styles.inline }>
<FormattedMessage
id='requests.status.transactionSent'
defaultMessage='Transaction sent to network with hash'
/>
<div className={ [ styles.fill, styles.hash ].join(' ') }>
<ShortenedHash data={ transactionHash } />
</div>
</div>
);
}
return (
<FormattedMessage
id='requests.status.waitingForSigner'
defaultMessage='Waiting for authorization in the Parity Signer'
/>
);
}
getTransactionState (request) {
const { error, transactionReceipt } = request;
if (error) {
return { type: ERROR_STATE };
}
if (transactionReceipt) {
return { type: DONE_STATE };
}
return { type: WAITING_STATE };
}
handleHideRequest = (requestId) => {
const requestElement = ReactDOM.findDOMNode(this.refs[`request_${requestId}`]);
// Try to get the request element height, to have a nice transition effect
if (requestElement) {
const { height } = requestElement.getBoundingClientRect();
const prevExtras = this.state.extras;
const nextExtras = {
...prevExtras,
[ requestId ]: {
...prevExtras[requestId],
height
}
};
return this.setState({ extras: nextExtras }, () => {
return this.props.onHideRequest(requestId);
});
}
return this.props.onHideRequest(requestId);
}
}
const mapStateToProps = (state) => {
const { requests } = state;
return { requests };
};
function mapDispatchToProps (dispatch) {
return bindActionCreators({
onHideRequest: hideRequest
}, dispatch);
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(Requests);
|
cra-ua-aware-code-splitting/src/App.js | GoogleChromeLabs/adaptive-loading | /*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import Product from './components/Product';
import './App.css';
import phone from './assets/images/phone.jpg';
const App = () => {
return (
<div className='App'>
<header className='App-header'>
<Product
imageUrl={phone}
width='100%' />
</header>
</div>
);
};
export default App;
|
.storybook/config.js | Neitsch/ASE4156 | import {configure} from '@storybook/react';
import {addDecorator} from '@storybook/react';
import {withKnobs, number, text,} from '@storybook/addon-knobs';
import React from 'react';
import i18nEn from '../web/i18n/en';
import {I18nextProvider} from 'react-i18next';
const i18nDecorator = children => <I18nextProvider i18n={i18nEn}>{children()}</I18nextProvider>;
addDecorator(withKnobs)
addDecorator(i18nDecorator)
function loadStories() {
require('../stories');
require('../web/js/components/stories.jsx');
}
configure(loadStories, module);
|
fields/types/password/PasswordFilter.js | sendyhalim/keystone | import React from 'react';
import { SegmentedControl } from '../../../admin/client/App/elemental';
const EXISTS_OPTIONS = [
{ label: 'Is Set', value: true },
{ label: 'Is NOT Set', value: false },
];
function getDefaultValue () {
return {
exists: true,
};
}
var PasswordFilter = React.createClass({
propTypes: {
filter: React.PropTypes.shape({
exists: React.PropTypes.oneOf(EXISTS_OPTIONS.map(i => i.value)),
}),
},
statics: {
getDefaultValue: getDefaultValue,
},
getDefaultProps () {
return {
filter: getDefaultValue(),
};
},
toggleExists (value) {
this.props.onChange({ exists: value });
},
render () {
const { filter } = this.props;
return (
<SegmentedControl
equalWidthSegments
onChange={this.toggleExists}
options={EXISTS_OPTIONS}
value={filter.exists}
/>
);
},
});
module.exports = PasswordFilter;
|
client/src/components/search/searchBar/NoHitsSuggestion.js | jonathanihm/freeCodeCamp | import React from 'react';
import PropTypes from 'prop-types';
const NoHitsSuggestion = ({ title }) => {
return (
<div className={'no-hits-footer fcc_suggestion_item'} role='region'>
<span className='hit-name'>{title}</span>
</div>
);
};
NoHitsSuggestion.propTypes = {
handleMouseEnter: PropTypes.func.isRequired,
handleMouseLeave: PropTypes.func.isRequired,
title: PropTypes.string
};
export default NoHitsSuggestion;
|
Js/Skeleton/Components/Navigation/index.js | Webiny/Webiny | import React from 'react';
import _ from 'lodash';
import Webiny from 'webiny';
class Navigation extends Webiny.Ui.Component {
constructor(props) {
super(props);
this.state = {
user: null,
highlight: null,
display: window.outerWidth > 768 ? 'desktop' : 'mobile'
};
this.checkDisplayInterval = null;
this.offRouteChanged = _.noop;
this.bindMethods('onClick');
}
componentDidMount() {
super.componentDidMount();
// Navigation is rendered based on user roles so we need to watch for changes
this.watch('User', user => {
this.setState({user});
});
this.watch('Navigation', nav => {
this.setState({highlight: _.get(nav, 'highlight')});
});
this.offRouteChanged = Webiny.Router.onRouteChanged(event => {
this.setState({route: event.route.name});
});
this.checkDisplayInterval = setInterval(() => {
this.setState({display: window.outerWidth > 768 ? 'desktop' : 'mobile'});
}, 500);
}
componentWillUnmount() {
super.componentWillUnmount();
this.offRouteChanged();
clearInterval(this.checkDisplayInterval);
}
shouldComponentUpdate(nextProps, nextState) {
return !_.isEqual(this.state, nextState);
}
onClick(menu) {
if (menu.props.apps.includes(this.state.highlight)) {
Webiny.Model.set(['Navigation', 'highlight'], null);
}
}
}
Navigation.defaultProps = {
renderer() {
const {Desktop, Mobile} = this.props;
const props = {
onClick: this.onClick,
highlight: this.state.highlight
};
if (this.state.display === 'mobile') {
return <Mobile {...props}/>
}
return <Desktop {...props}/>
}
};
export default Webiny.createComponent(Navigation, {
modules: ['Link', {
Desktop: 'Webiny/Skeleton/Navigation/Desktop',
Mobile: 'Webiny/Skeleton/Navigation/Mobile'
}]
});
|
src/encoded/static/components/doc.js | ENCODE-DCC/encoded | import React from 'react';
import PropTypes from 'prop-types';
import _ from 'underscore';
import url from 'url';
import { Panel, PanelHeading } from '../libs/ui/panel';
import { collapseIcon } from '../libs/svg-icons';
import { FetchedData, Param } from './fetched';
import * as globals from './globals';
import { Attachment } from './image';
const EXCERPT_LENGTH = 80; // Maximum number of characters in an excerpt
// To add more @types for document panels, see the bottom of this file.
// <DocumentsPanel> displays groups of documents within a panel. Each group gets its own title and shows
// one subpanel for each document within that group. The @type of each document must contain 'Document'
// somewhere.
//
// <DocumentsPanel> property: documentsList
//
// This object is mostly an array of arrays. The inner arrays holds the list of documents of one type,
// while the outer array holds all the types of arrays along with their section label. Literally though,
// documentList is an array of objects, including the array of documents and the label to display above
// those documents within the panel.
//
// [
// {
// label: 'document label',
// documents: array of document objects
// },
// {
// ...next one...
// }
// ]
export const DocumentsPanel = (props) => {
// Filter documentSpecs to just those that have actual documents in them.
const documentSpecsMapped = props.documentSpecs.length > 0 && _.compact(props.documentSpecs.map((documentSpecs) => (
documentSpecs.documents.length > 0 ? documentSpecs : null
)));
// Concatenate all documents, and map their UUIDs to corresponding labels
let allDocs = [];
const docLabelMap = {};
documentSpecsMapped.forEach((spec) => {
spec.documents.forEach((doc) => {
docLabelMap[doc.uuid] = spec.label;
});
allDocs = allDocs.concat(spec.documents);
});
// Sort documents by attachment download name.
const sortedDocs = globals.sortDocs(allDocs);
if (documentSpecsMapped.length > 0) {
return (
<Panel>
<PanelHeading>
<h4>{props.title ? <span>{props.title}</span> : <span>Documents</span>}</h4>
</PanelHeading>
<div className="document-list">
{sortedDocs.map((doc) => {
const PanelView = globals.panelViews.lookup(doc);
return <PanelView key={doc['@id']} label={docLabelMap[doc.uuid]} context={doc} />;
})}
</div>
</Panel>
);
}
return null;
};
DocumentsPanel.propTypes = {
documentSpecs: PropTypes.array.isRequired, // List of document arrays and their titles
title: PropTypes.string, // Title of the document panel
};
DocumentsPanel.defaultProps = {
title: '',
};
// Called when a GET request for all the documents associated with a dataset returns with the
// array of matching documents.
const DocumentsPanelRenderer = (props) => {
const documents = props.documentSearch['@graph'];
if (documents && documents.length > 0) {
return <DocumentsPanel documentSpecs={[{ documents }]} title={props.title} />;
}
return null;
};
DocumentsPanelRenderer.propTypes = {
documentSearch: PropTypes.object, // Search result object; this uses its @graph to get the documents,
title: PropTypes.string, // Title of document panel
};
DocumentsPanelRenderer.defaultProps = {
documentSearch: null,
title: '',
};
// Perform a GET request on the array of document @ids passed in the `documents` property, and
// display the resulting documents in a documents panel.
export const DocumentsPanelReq = (props) => {
const { documents } = props;
if (documents && documents.length > 0) {
return (
<FetchedData>
<Param name="documentSearch" url={`/search/?type=Item&${documents.map((docAtId) => `@id=${docAtId}`).join('&')}`} />
<DocumentsPanelRenderer title={props.title} />
</FetchedData>
);
}
return null;
};
DocumentsPanelReq.propTypes = {
documents: PropTypes.array.isRequired, // Array of document @ids to request and render
title: PropTypes.string, // Title of document panel
};
DocumentsPanelReq.defaultProps = {
title: '',
};
export const DocumentsSubpanels = (props) => {
const { documentSpec } = props;
return (
<div className="document-list">
{documentSpec.documents.map((doc) => {
const PanelView = globals.panelViews.lookup(doc);
return <PanelView key={doc['@id']} label={documentSpec.label} context={doc} />;
})}
</div>
);
};
DocumentsSubpanels.propTypes = {
documentSpec: PropTypes.object.isRequired, // List of document arrays and their titles
};
// Display a single document within a <DocumentPanel>. This routine requires that you register display components for each
// of the five major parts of a single document panel. See globals.js for a guide to the parts.
export class Document extends React.Component {
constructor() {
super();
this.state = {
panelOpen: false,
};
// Bind non-React methods to this.
this.handleClick = this.handleClick.bind(this);
}
// Clicking the Lab bar inverts visible state of the popover
handleClick(e) {
e.preventDefault();
e.stopPropagation();
// Tell parent (App component) about new popover state
// Pass it this component's React unique node ID
this.setState((prevState) => ({
panelOpen: !prevState.panelOpen,
}));
}
render() {
const { context } = this.props;
// Set up rendering components
const DocumentHeaderView = globals.documentViews.header.lookup(context);
const DocumentCaptionView = globals.documentViews.caption.lookup(context);
const DocumentPreviewView = globals.documentViews.preview.lookup(context);
const DocumentFileView = globals.documentViews.file.lookup(context);
const DocumentDetailView = globals.documentViews.detail.lookup(context);
return (
<Panel addClasses={globals.itemClass(context, 'document-list__document')}>
<DocumentHeaderView doc={context} label={this.props.label} />
<div className="document__intro">
<DocumentCaptionView doc={context} />
<DocumentPreviewView doc={context} />
</div>
<DocumentFileView doc={context} detailOpen={this.state.panelOpen} detailSwitch={this.handleClick} />
<DocumentDetailView doc={context} detailOpen={this.state.panelOpen} id={context['@id']} />
</Panel>
);
}
}
Document.propTypes = {
context: PropTypes.object.isRequired, // Document context object to render
label: PropTypes.string, // Extra label to add to document type in header
};
Document.defaultProps = {
label: '',
};
// Document header component -- default
export const DocumentHeader = (props) => {
const { doc, label } = props;
return (
<div className="document__header">
{doc.document_type} {label ? <span>{label}</span> : null}
</div>
);
};
DocumentHeader.propTypes = {
doc: PropTypes.object.isRequired, // Document object to render
label: PropTypes.string, // Extra label to add to document type in header
};
DocumentHeader.defaultProps = {
label: '',
};
// Document caption component -- default
export const DocumentCaption = (props) => {
const { doc } = props;
const caption = doc.description;
let excerpt;
if (caption && caption.length > EXCERPT_LENGTH) {
excerpt = globals.truncateString(caption, EXCERPT_LENGTH);
}
return (
<div className="document__caption">
{excerpt || caption ?
<div data-test="caption">
<strong>{excerpt ? 'Description excerpt: ' : 'Description: '}</strong>
{excerpt ? <span>{excerpt}</span> : <span>{caption}</span>}
</div>
: <em>No description</em>}
</div>
);
};
DocumentCaption.propTypes = {
doc: PropTypes.object.isRequired, // Document object to render
};
// Document preview component -- default
export const DocumentPreview = (props) => (
<figure className="document__preview">
<Attachment context={props.doc} attachment={props.doc.attachment} className="characterization" />
</figure>
);
DocumentPreview.propTypes = {
doc: PropTypes.object.isRequired, // Document object to render
};
// Document file component -- default
export const DocumentFile = (props) => {
const { doc, detailOpen, detailSwitch } = props;
if (doc.attachment && doc.attachment.href && doc.attachment.download) {
const attachmentHref = url.resolve(doc['@id'], doc.attachment.href);
const dlFileTitle = `Download file ${doc.attachment.download}`;
return (
<div className="document__file">
<div className="document__file-name">
<i className="icon icon-download document__file-name-icon" />
<a data-bypass="true" className="document__file-name-link" title={dlFileTitle} href={attachmentHref} download={doc.attachment.download}>
{doc.attachment.download}
</a>
</div>
{detailSwitch ?
<button type="button" data-trigger onClick={detailSwitch} className="document__file-detail-switch">
{collapseIcon(!detailOpen)}
</button>
: null}
</div>
);
}
return (
<div className="dl-bar">
<em>Document not available</em>
</div>
);
};
DocumentFile.propTypes = {
doc: PropTypes.object.isRequired, // Document object to render
detailOpen: PropTypes.bool.isRequired, // True if detail panel is visible
detailSwitch: PropTypes.func.isRequired, // Parent component function to call when detail switch clicked
};
// Document detail component -- default
const DocumentDetail = (props) => {
const { doc } = props;
const keyClass = `document__detail${props.detailOpen ? ' active' : ''}`;
const excerpt = doc.description && doc.description.length > EXCERPT_LENGTH;
return (
<div className={keyClass}>
<dl className="key-value-doc" id={`panel-${props.id}`} aria-labelledby={`tab-${props.id}`} role="tabpanel">
{excerpt ?
<div data-test="caption">
<dt>Description</dt>
<dd>{doc.description}</dd>
</div>
: null}
{doc.submitted_by && doc.submitted_by.title ?
<div data-test="submitted-by">
<dt>Submitted by</dt>
<dd>{doc.submitted_by.title}</dd>
</div>
: null}
<div data-test="lab">
<dt>Lab</dt>
<dd>{doc.lab.title}</dd>
</div>
{doc.award && doc.award.name ?
<div data-test="award">
<dt>Grant</dt>
<dd><a href={doc.award['@id']}>{doc.award.name}</a></dd>
</div>
: null}
</dl>
</div>
);
};
DocumentDetail.propTypes = {
doc: PropTypes.object.isRequired, // Document object to render
detailOpen: PropTypes.bool, // True if detail panel is visible
id: PropTypes.string, // Unique key for identification
};
DocumentDetail.defaultProps = {
detailOpen: false,
id: '',
};
// Register document @types so they display in the standard document panel
globals.panelViews.register(Document, 'Document');
// Register document header rendering components
globals.documentViews.header.register(DocumentHeader, 'Document');
// Register document caption rendering components
globals.documentViews.caption.register(DocumentCaption, 'Document');
// Register document preview rendering components
globals.documentViews.preview.register(DocumentPreview, 'Document');
// Register document file rendering components
globals.documentViews.file.register(DocumentFile, 'Document');
// Register document detail rendering components
globals.documentViews.detail.register(DocumentDetail, 'Document');
const QCAttachmentCaption = (props) => (
<div className="document__caption">
<div data-test="caption">
<strong>Attachment: </strong>
{props.title}
</div>
</div>
);
QCAttachmentCaption.propTypes = {
title: PropTypes.string.isRequired, // Title to display for attachment
};
const QCAttachmentPreview = (props) => {
const { context, attachment } = props;
return (
<figure className="document__preview">
<Attachment context={context} attachment={attachment} className="characterization" />
</figure>
);
};
QCAttachmentPreview.propTypes = {
context: PropTypes.object.isRequired, // QC metric object that owns the attachment to render
attachment: PropTypes.object.isRequired, // Attachment to render
};
// Display a panel for attachments that aren't a part of an associated document
export const AttachmentPanel = (props) => {
const { context, attachment, title } = props;
// Set up rendering components.
const DocumentCaptionView = globals.documentViews.caption.lookup(context);
const DocumentPreviewView = globals.documentViews.preview.lookup(context);
// Determine the attachment area CSS classes based on whether they're displayed in a modal
// or not.
return (
<section className="attachment-list__panel">
<Panel addClasses={globals.itemClass(context, 'attachment')}>
<div className="document__intro document__intro--attachment-only">
<DocumentCaptionView title={title} />
<DocumentPreviewView context={context} attachment={attachment} />
</div>
</Panel>
</section>
);
};
AttachmentPanel.propTypes = {
context: PropTypes.object.isRequired, // Object that owns the attachment; needed for attachment path
attachment: PropTypes.object.isRequired, // Attachment being rendered
title: PropTypes.string, // Title to display in the caption area
};
AttachmentPanel.defaultProps = {
title: '',
};
// Register document caption rendering components
globals.documentViews.caption.register(QCAttachmentCaption, 'QualityMetric');
// Register document preview rendering components
globals.documentViews.preview.register(QCAttachmentPreview, 'QualityMetric');
// Display a list of document links within a characterization.
export const CharacterizationDocuments = (props) => {
const docs = props.docs.filter((doc) => !!doc);
return (
<dd>
{docs.map((doc) => {
if (doc && doc.attachment) {
const attachmentHref = url.resolve(doc['@id'], doc.attachment.href);
const docName = (doc.aliases && doc.aliases.length > 0) ? doc.aliases[0] :
((doc.attachment && doc.attachment.download) ? doc.attachment.download : '');
return (
<div className="multi-dd dl-link" key={doc['@id']}>
<i className="icon icon-download" />
<a data-bypass="true" href={attachmentHref} download={doc.attachment.download}>
{docName}
</a>
</div>
);
}
return null;
})}
</dd>
);
};
CharacterizationDocuments.propTypes = {
docs: PropTypes.array.isRequired, // Array of documents to display within characterization details panel
};
/**
* Display an antibody characterization object.
*/
const DocumentObject = ({ context }) => {
const documentSpecs = [
{ documents: [context] },
];
return <DocumentsPanel title="Documents" documentSpecs={documentSpecs} />;
};
DocumentObject.propTypes = {
/** Document object */
context: PropTypes.object.isRequired,
};
globals.contentViews.register(DocumentObject, 'Document');
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.