<commit_before>export {default as AccordionItem} from './src/AccordionItem';
export {default as ActionButton} from './src/ActionButton';
export {default as ActivityItemDefault} from './src/ActivityItemDefault';
export {default as ActivityItemSelectComposite} from './src/ActivityItemSelectComposite';
export {default as ActivityItemSummaryComposite} from './src/ActivityItemSummaryComposite';
export {default as Avatar} from './src/Avatar';
export {default as avatarStyles} from './src/Avatar/styles.css';
export {default as AverageFootprintComparison} from './src/AverageFootprintComparison';
export {default as BackgroundLoader} from './src/BackgroundLoader';
export {default as Button} from './src/Button';
export {default as ButtonCircle} from './src/ButtonCircle';
export {default as ButtonCounter} from './src/ButtonCounter';
export {default as ButtonIcon} from './src/ButtonIcon';
export {default as ButtonIconRaised} from './src/ButtonIconRaised';
export {default as ButtonLoadMore} from './src/ButtonLoadMore';
export {default as ButtonMini} from './src/ButtonMini';
export {default as ButtonPlusMinus} from './src/ButtonPlusMinus';
export {default as ButtonRaised} from './src/ButtonRaised';
export {default as CalculatorFoodItem1} from './src/CalculatorFoodItem1';
export {default as CalculatorGeneralItem} from './src/CalculatorGeneralItem';
export {default as CalculatorLabel1} from './src/CalculatorLabel1';
export {default as CaptionTabMenu} from './src/CaptionTabMenu';
export {default as CarouselNavigator} from './src/CarouselNavigator';
export {default as CarouselStandard1} from './src/CarouselStandard1';
export {default as CategoryButtons} from './src/CategoryButtons';
export {default as ChallengeCardLabel1} from './src/ChallengeCardLabel1';
export {default as ChallengeCardLabel2} from './src/ChallengeCardLabel2';
export {default as ChallengeMeta4} from './src/ChallengeMeta4';
export {default as ChallengeMeta5} from './src/ChallengeMeta5';
export {default as ChallengeMeta7} from './src/ChallengeMeta7';
export {default as ChallengeSharePreview} from './src/ChallengeSharePreview';
export {default as Chart} from './src/Chart';
export {default as BarChart} from './src/Chart/BarChart';
export {default as BarChartChallenge} from './src/Chart/BarChartChallenge';
export {default as LineChart} from './src/Chart/LineChart';
export {default as CheckBox} from './src/CheckBox';
export {default as ConfirmationModal} from './src/ConfirmationModal';
export {default as Counter} from './src/Counter';
export {default as CounterInputGeneral} from './src/CounterInputGeneral';
export {default as CreateGoalActionItem} from './src/CreateGoalActionItem';
export {default as CreateGoalPanel1} from './src/CreateGoalPanel1';
export {default as CreateGoalPanel1Desktop} from './src/CreateGoalPanel1Desktop';
export {default as CreateGoalPanel4Mobile} from './src/CreateGoalPanel4Mobile';
export {default as CreateGoalValueInput} from './src/CreateGoalValueInput';
export {default as CreateGoalValueInput2} from './src/CreateGoalValueInput2';
export {default as EmailTag} from './src/EmailTag';
export {default as FeedbackTextInput} from './src/FeedbackTextInput';
export {default as FootprintAverage2} from './src/FootprintAverage2';
export {default as FootprintByCategoryPresentationDesktop} from './src/FootprintByCategoryPresentationDesktop';
export {default as FootprintCategoryEdit} from './src/FootprintCategoryEdit';
export {default as FootprintCategoryHeader} from './src/FootprintCategoryHeader';
export {default as GoalButtonBig} from './src/GoalButtonBig';
export {default as GoalButtonPopOverMenuItem} from './src/GoalButtonPopOverMenuItem';
export {default as GoalComposit1} from './src/GoalComposit1';
export {default as GoalCompositeProgressInfo} from './src/GoalCompositeProgressInfo';
export {default as GoalDeleteConfirmationModal} from './src/GoalDeleteConfirmationModal';
export {default as GoalDescriptionGeneral} from './src/GoalDescriptionGeneral';
export {default as GoalInfoNavigation} from './src/GoalInfoNavigation';
export {default as GoalMenuItem} from './src/GoalMenuItem';
export {default as GoalProgressBarGeneral} from './src/GoalProgressBarGeneral';
export {default as Header} from './src/Header';
export {default as HeaderCompositActivity} from './src/HeaderCompositActivity';
export {default as HeaderCompositUser} from './src/HeaderCompositUser';
export {default as Icon} from './src/Icon';
export {default as IconAvaWrapper} from './src/IconAvaWrapper';
export {default as IconCircularFrame} from './src/IconCircularFrame';
export {default as IconDropdown} from './src/IconDropdown';
export {default as IconImage} from './src/IconImage';
export {default as IconTabMenu} from './src/IconTabMenu';
export {default as ImageElement} from './src/ImageElement';
export {default as Input} from './src/Input';
export {default as InputLarge} from './src/InputLarge';
export {default as LabelDisplay} from './src/LabelDisplay';
export {default as LabelDouble} from './src/LabelDouble';
export {default as LabelExpandCollapse} from './src/LabelExpandCollapse';
export {default as LabelHorisontal} from './src/LabelHorisontal';
export {default as LabelLarge} from './src/LabelLarge';
export {default as LabelMini} from './src/LabelMini';
export {default as LabelNumber} from './src/LabelNumber';
export {default as LabelNumberDisplay} from './src/LabelNumberDisplay';
export {default as LabelNumberDisplay1} from './src/LabelNumberDisplay1';
export {default as LabelNumberDisplay2} from './src/LabelNumberDisplay2';
export {default as LabelPair} from './src/LabelPair';
export {default as LabelSmall} from './src/LabelSmall';
export {default as LabelStandard} from './src/LabelStandard';
export {default as LabelStatistics} from './src/LabelStatistics';
export {default as LabelTab} from './src/LabelTab';
export {default as LabelTitle} from './src/LabelTitle';
export {default as LabelTitle3} from './src/LabelTitle3';
export {default as LabelTitle4} from './src/LabelTitle4';
export {default as LeaderboardComposite7} from './src/LeaderboardComposite7';
export {default as LeaderboardHeader4} from './src/LeaderboardHeader4';
export {default as LeaderboardHeader5} from './src/LeaderboardHeader5';
export {default as LeaderboardLabelSet1} from './src/LeaderboardLabelSet1';
export {default as LeaderboardLabelSet2} from './src/LeaderboardLabelSet2';
export {default as ListComposite} from './src/ListComposite';
export {default as ListCompositeActivity} from './src/ListCompositeActivity';
export {default as ListCompositePerson} from './src/ListCompositePerson';
export {default as ListCompositeSavings} from './src/ListCompositeSavings';
export {default as ListCompositeSuggestionClose} from './src/ListCompositeSuggestionClose';
export {default as Loader} from './src/Loader';
export {default as LoaderImage} from './src/LoaderImage';
export {default as LoaderImagePlaceHolder} from './src/LoaderImagePlaceHolder';
export {default as LogAllButton} from './src/LogAllButton';
export {default as LogButton} from './src/LogButton';
export {default as MemberItem} from './src/MemberItem';
export {default as MainMenuItem2} from './src/MainMenuItem2';
export {default as MenuWrapper} from './src/MenuWrapper';
export {default as Modal} from './src/Modal';
export {default as ModalFullsize} from './src/ModalFullsize';
export {default as Notification1B} from './src/Notification1B';
export {default as Notification1C} from './src/Notification1C';
export {default as NotificationCounter} from './src/NotificationCounter';
export {default as NotificationItem} from './src/NotificationItem';
export {default as PeopleLabel} from './src/PeopleLabel';
export {default as PeoplePageTabMenu} from './src/PeoplePageTabMenu';
export {default as PersonItem1} from './src/PersonItem1';
export {default as PersonItem2} from './src/PersonItem2';
export {default as PieChart} from './src/PieChart';
export {default as PlaceholderElement1} from './src/PlaceholderElement1';
export {default as PopoverCalendar} from './src/PopoverCalendar';
export {default as PopoverMenu} from './src/PopoverMenu';
export {default as PopoverMenuAnchor2} from './src/PopoverMenuAnchor2';
export {default as PopoverMenuAnchor3} from './src/PopoverMenuAnchor3';
export {default as PopoverMenuAnchor4} from './src/PopoverMenuAnchor4';
export {default as PopoverMenuItem} from './src/PopoverMenuItem';
export {default as PopoverMenuItem3} from './src/PopoverMenuItem3';
export {default as PopoverMenuItem4} from './src/PopoverMenuItem4';
export {default as Popup} from './src/Popup';
export {default as ProfileMenuItem} from './src/ProfileMenuItem';
export {default as ProfilePageMeta} from './src/ProfilePageMeta';
export {default as ProfileSectionOverallStats} from './src/ProfileSectionOverallStats';
export {default as ProfileSectionPersonalGoal} from './src/ProfileSectionPersonalGoal';
export {default as ProgressBar} from './src/ProgressBar';
export {default as ProgressBarChallengeDates} from './src/ProgressBarChallengeDates';
export {default as ProgressbarLabeledPercentage} from './src/ProgressbarLabeledPercentage';
export {default as ProgressBarVertical} from './src/ProgressBarVertical';
export {default as ProgressBarVerticalFat} from './src/ProgressBarVerticalFat';
export {default as ProgressCircle} from './src/ProgressCircle';
export {default as RadioButton} from './src/RadioButton';
export {default as RemoveImage} from './src/RemoveImage';
export {default as ScrollContainer} from './src/ScrollContainer';
export {default as SearchFieldInput} from './src/SearchFieldInput';
export {default as SectionfooterBack} from './src/SectionfooterBack';
export {default as SectionFooterCancelLeft} from './src/SectionFooterCancelLeft';
export {default as SectionFooterCancelOK} from './src/SectionFooterCancelOK';
export {default as SectionFooterClose} from './src/SectionFooterClose';
export {default as SectionFooterNew} from './src/SectionFooterNew';
export {default as SectionFooterOK} from './src/SectionFooterOK';
export {default as SectionHeaderActivityModal} from './src/SectionHeaderActivityModal';
export {default as SectionHeaderAlternate} from './src/SectionHeaderAlternate';
export {default as SectionHeaderGeneral} from './src/SectionHeaderGeneral';
export {default as SectionHeaderSubsection} from './src/SectionHeaderSubsection';
export {default as SectionHeaderTitle} from './src/SectionHeaderTitle';
export {default as SettingsConfirmAccountDeleteModal2} from './src/SettingsConfirmAccountDeleteModal2';
export {default as SettingsItem} from './src/SettingsItem';
export {default as SettingsItemAppConnect} from './src/SettingsItemAppConnect';
export {default as SettingsItemBirthday} from './src/SettingsItemBirthday';
export {default as SettingsItemGender} from './src/SettingsItemGender';
export {default as SettingsItemLocation} from './src/SettingsItemLocation';
export {default as SettingsItemNotifications} from './src/SettingsItemNotifications';
export {default as SettingsPrivacyGeneral} from './src/SettingsPrivacyGeneral';
export {default as SettingsSectionApplications} from './src/SettingsSectionApplications';
export {default as SettingsSectionEmailNotification} from './src/SettingsSectionEmailNotification';
export {default as SettingsSectionOne} from './src/SettingsSectionOne';
export {default as SettingsSectionPersonal} from './src/SettingsSectionPersonal';
export {default as SettingsSectionPrivacy} from './src/SettingsSectionPrivacy';
export {default as SettingsSectionProfile} from './src/SettingsSectionProfile';
export {default as ShowActivitySubHeader} from './src/ShowActivitySubHeader';
export {default as SnackBarPanel1} from './src/SnackBarPanel1';
export {default as SnackBarPanel3} from './src/SnackBarPanel3';
export {default as SnackbarPanelTwoPointsCO2} from './src/SnackbarPanelTwoPointsCO2';
export {default as SnackBarWrapper} from './src/SnackBarWrapper';
export {default as SnackBarWrapperMobile} from './src/SnackBarWrapperMobile';
export {default as SocialConnect} from './src/SocialConnect';
export {default as SocialConnectComposit2} from './src/SocialConnectComposit2';
export {default as SocialConnectCompositeOne} from './src/SocialConnectCompositeOne';
export {default as Spacer} from './src/Spacer';
export {default as StatsCarousel1} from './src/StatsCarousel1';
export {default as SubcategoryList} from './src/SubcategoryList';
export {default as SwitchesToggleMenu} from './src/SwitchesToggleMenu';
export {default as SwitchToggleButton} from './src/SwitchToggleButton';
export {default as TeamHeader} from './src/TeamHeader';
export {default as TextArea} from './src/TextArea';
export {default as TextAreaLarge} from './src/TextAreaLarge';
export {default as TextImageElement} from './src/TextImageElement';
export {default as TextInputRegular} from './src/TextInputRegular';
export {default as TextLinkElement} from './src/TextLinkElement';
export {default as TextOnlyElement} from './src/TextOnlyElement';
export {default as TimeStamp} from './src/TimeStamp';
export {default as ToggleButtonWithLabel} from './src/ToggleButtonWithLabel';
export {default as Tooltip} from './src/Tooltip';
export {default as Typography} from './src/Typography';
export {default as ActivityBubbles} from './src/Visualizations/ActivityBubbles';
export {default as MapNorway} from './src/Visualizations/MapNorway';
export {default as Wrapper} from './src/Wrapper';
<commit_msg>export 3116<commit_after>export {default as AccordionItem} from './src/AccordionItem';
export {default as ActionButton} from './src/ActionButton';
export {default as ActivityItemDefault} from './src/ActivityItemDefault';
export {default as ActivityItemSelectComposite} from './src/ActivityItemSelectComposite';
export {default as ActivityItemSummaryComposite} from './src/ActivityItemSummaryComposite';
export {default as Avatar} from './src/Avatar';
export {default as avatarStyles} from './src/Avatar/styles.css';
export {default as AverageFootprintComparison} from './src/AverageFootprintComparison';
export {default as BackgroundLoader} from './src/BackgroundLoader';
export {default as Button} from './src/Button';
export {default as ButtonCircle} from './src/ButtonCircle';
export {default as ButtonCounter} from './src/ButtonCounter';
export {default as ButtonIcon} from './src/ButtonIcon';
export {default as ButtonIconRaised} from './src/ButtonIconRaised';
export {default as ButtonLoadMore} from './src/ButtonLoadMore';
export {default as ButtonMini} from './src/ButtonMini';
export {default as ButtonPlusMinus} from './src/ButtonPlusMinus';
export {default as ButtonRaised} from './src/ButtonRaised';
export {default as CalculatorFoodItem1} from './src/CalculatorFoodItem1';
export {default as CalculatorGeneralItem} from './src/CalculatorGeneralItem';
export {default as CalculatorLabel1} from './src/CalculatorLabel1';
export {default as CaptionTabMenu} from './src/CaptionTabMenu';
export {default as CarouselNavigator} from './src/CarouselNavigator';
export {default as CarouselStandard1} from './src/CarouselStandard1';
export {default as CategoryButtons} from './src/CategoryButtons';
export {default as ChallengeCardLabel1} from './src/ChallengeCardLabel1';
export {default as ChallengeCardLabel2} from './src/ChallengeCardLabel2';
export {default as ChallengeMeta4} from './src/ChallengeMeta4';
export {default as ChallengeMeta5} from './src/ChallengeMeta5';
export {default as ChallengeMeta7} from './src/ChallengeMeta7';
export {default as ChallengeSharePreview} from './src/ChallengeSharePreview';
export {default as Chart} from './src/Chart';
export {default as BarChart} from './src/Chart/BarChart';
export {default as BarChartChallenge} from './src/Chart/BarChartChallenge';
export {default as LineChart} from './src/Chart/LineChart';
export {default as CheckBox} from './src/CheckBox';
export {default as ConfirmationModal} from './src/ConfirmationModal';
export {default as Counter} from './src/Counter';
export {default as CounterInputGeneral} from './src/CounterInputGeneral';
export {default as CreateGoalActionItem} from './src/CreateGoalActionItem';
export {default as CreateGoalPanel1} from './src/CreateGoalPanel1';
export {default as CreateGoalPanel1Desktop} from './src/CreateGoalPanel1Desktop';
export {default as CreateGoalPanel4Mobile} from './src/CreateGoalPanel4Mobile';
export {default as CreateGoalValueInput} from './src/CreateGoalValueInput';
export {default as CreateGoalValueInput2} from './src/CreateGoalValueInput2';
export {default as EmailTag} from './src/EmailTag';
export {default as FeedbackTextInput} from './src/FeedbackTextInput';
export {default as FootprintAverage2} from './src/FootprintAverage2';
export {default as FootprintByCategoryPresentationDesktop} from './src/FootprintByCategoryPresentationDesktop';
export {default as FootprintCategoryEdit} from './src/FootprintCategoryEdit';
export {default as FootprintCategoryHeader} from './src/FootprintCategoryHeader';
export {default as GoalButtonBig} from './src/GoalButtonBig';
export {default as GoalButtonPopOverMenuItem} from './src/GoalButtonPopOverMenuItem';
export {default as GoalComposit1} from './src/GoalComposit1';
export {default as GoalCompositeProgressInfo} from './src/GoalCompositeProgressInfo';
export {default as GoalDeleteConfirmationModal} from './src/GoalDeleteConfirmationModal';
export {default as GoalDescriptionGeneral} from './src/GoalDescriptionGeneral';
export {default as GoalInfoNavigation} from './src/GoalInfoNavigation';
export {default as GoalMenuItem} from './src/GoalMenuItem';
export {default as GoalProgressBarGeneral} from './src/GoalProgressBarGeneral';
export {default as Header} from './src/Header';
export {default as HeaderCompositActivity} from './src/HeaderCompositActivity';
export {default as HeaderCompositUser} from './src/HeaderCompositUser';
export {default as Icon} from './src/Icon';
export {default as IconAvaWrapper} from './src/IconAvaWrapper';
export {default as IconCircularFrame} from './src/IconCircularFrame';
export {default as IconDropdown} from './src/IconDropdown';
export {default as IconImage} from './src/IconImage';
export {default as IconTabMenu} from './src/IconTabMenu';
export {default as ImageElement} from './src/ImageElement';
export {default as Input} from './src/Input';
export {default as InputLarge} from './src/InputLarge';
export {default as LabelDisplay} from './src/LabelDisplay';
export {default as LabelDouble} from './src/LabelDouble';
export {default as LabelExpandCollapse} from './src/LabelExpandCollapse';
export {default as LabelHorisontal} from './src/LabelHorisontal';
export {default as LabelLarge} from './src/LabelLarge';
export {default as LabelMini} from './src/LabelMini';
export {default as LabelNumber} from './src/LabelNumber';
export {default as LabelNumberDisplay} from './src/LabelNumberDisplay';
export {default as LabelNumberDisplay1} from './src/LabelNumberDisplay1';
export {default as LabelNumberDisplay2} from './src/LabelNumberDisplay2';
export {default as LabelPair} from './src/LabelPair';
export {default as LabelSmall} from './src/LabelSmall';
export {default as LabelStandard} from './src/LabelStandard';
export {default as LabelStatistics} from './src/LabelStatistics';
export {default as LabelTab} from './src/LabelTab';
export {default as LabelTitle} from './src/LabelTitle';
export {default as LabelTitle3} from './src/LabelTitle3';
export {default as LabelTitle4} from './src/LabelTitle4';
export {default as LeaderboardComposite7} from './src/LeaderboardComposite7';
export {default as LeaderboardHeader4} from './src/LeaderboardHeader4';
export {default as LeaderboardHeader5} from './src/LeaderboardHeader5';
export {default as LeaderboardLabelSet1} from './src/LeaderboardLabelSet1';
export {default as LeaderboardLabelSet2} from './src/LeaderboardLabelSet2';
export {default as ListComposite} from './src/ListComposite';
export {default as ListCompositeActivity} from './src/ListCompositeActivity';
export {default as ListCompositePerson} from './src/ListCompositePerson';
export {default as ListCompositeSavings} from './src/ListCompositeSavings';
export {default as ListCompositeSuggestionClose} from './src/ListCompositeSuggestionClose';
export {default as Loader} from './src/Loader';
export {default as LoaderImage} from './src/LoaderImage';
export {default as LoaderImagePlaceHolder} from './src/LoaderImagePlaceHolder';
export {default as LogAllButton} from './src/LogAllButton';
export {default as LogButton} from './src/LogButton';
export {default as MemberItem} from './src/MemberItem';
export {default as MainMenuItem2} from './src/MainMenuItem2';
export {default as MenuWrapper} from './src/MenuWrapper';
export {default as Modal} from './src/Modal';
export {default as ModalFullsize} from './src/ModalFullsize';
export {default as Notification1B} from './src/Notification1B';
export {default as Notification1C} from './src/Notification1C';
export {default as NotificationCounter} from './src/NotificationCounter';
export {default as NotificationItem} from './src/NotificationItem';
export {default as PeopleLabel} from './src/PeopleLabel';
export {default as PeoplePageTabMenu} from './src/PeoplePageTabMenu';
export {default as PersonItem1} from './src/PersonItem1';
export {default as PersonItem2} from './src/PersonItem2';
export {default as PieChart} from './src/PieChart';
export {default as PlaceholderElement1} from './src/PlaceholderElement1';
export {default as PopoverCalendar} from './src/PopoverCalendar';
export {default as PopoverMenu} from './src/PopoverMenu';
export {default as PopoverMenuAnchor2} from './src/PopoverMenuAnchor2';
export {default as PopoverMenuAnchor3} from './src/PopoverMenuAnchor3';
export {default as PopoverMenuAnchor4} from './src/PopoverMenuAnchor4';
export {default as PopoverMenuItem} from './src/PopoverMenuItem';
export {default as PopoverMenuItem3} from './src/PopoverMenuItem3';
export {default as PopoverMenuItem4} from './src/PopoverMenuItem4';
export {default as Popup} from './src/Popup';
export {default as ProfileMenuItem} from './src/ProfileMenuItem';
export {default as ProfilePageMeta} from './src/ProfilePageMeta';
export {default as ProfileSectionOverallStats} from './src/ProfileSectionOverallStats';
export {default as ProfileSectionPersonalGoal} from './src/ProfileSectionPersonalGoal';
export {default as ProgressBar} from './src/ProgressBar';
export {default as ProgressBarChallengeDates} from './src/ProgressBarChallengeDates';
export {default as ProgressbarLabeledPercentage} from './src/ProgressbarLabeledPercentage';
export {default as ProgressBarVertical} from './src/ProgressBarVertical';
export {default as ProgressBarVerticalFat} from './src/ProgressBarVerticalFat';
export {default as ProgressCircle} from './src/ProgressCircle';
export {default as ProgressCirclePercentage} from './src/ProgressCirclePercentage';
export {default as RadioButton} from './src/RadioButton';
export {default as RemoveImage} from './src/RemoveImage';
export {default as ScrollContainer} from './src/ScrollContainer';
export {default as SearchFieldInput} from './src/SearchFieldInput';
export {default as SectionfooterBack} from './src/SectionfooterBack';
export {default as SectionFooterCancelLeft} from './src/SectionFooterCancelLeft';
export {default as SectionFooterCancelOK} from './src/SectionFooterCancelOK';
export {default as SectionFooterClose} from './src/SectionFooterClose';
export {default as SectionFooterNew} from './src/SectionFooterNew';
export {default as SectionFooterOK} from './src/SectionFooterOK';
export {default as SectionHeaderActivityModal} from './src/SectionHeaderActivityModal';
export {default as SectionHeaderAlternate} from './src/SectionHeaderAlternate';
export {default as SectionHeaderGeneral} from './src/SectionHeaderGeneral';
export {default as SectionHeaderSubsection} from './src/SectionHeaderSubsection';
export {default as SectionHeaderTitle} from './src/SectionHeaderTitle';
export {default as SettingsConfirmAccountDeleteModal2} from './src/SettingsConfirmAccountDeleteModal2';
export {default as SettingsItem} from './src/SettingsItem';
export {default as SettingsItemAppConnect} from './src/SettingsItemAppConnect';
export {default as SettingsItemBirthday} from './src/SettingsItemBirthday';
export {default as SettingsItemGender} from './src/SettingsItemGender';
export {default as SettingsItemLocation} from './src/SettingsItemLocation';
export {default as SettingsItemNotifications} from './src/SettingsItemNotifications';
export {default as SettingsPrivacyGeneral} from './src/SettingsPrivacyGeneral';
export {default as SettingsSectionApplications} from './src/SettingsSectionApplications';
export {default as SettingsSectionEmailNotification} from './src/SettingsSectionEmailNotification';
export {default as SettingsSectionOne} from './src/SettingsSectionOne';
export {default as SettingsSectionPersonal} from './src/SettingsSectionPersonal';
export {default as SettingsSectionPrivacy} from './src/SettingsSectionPrivacy';
export {default as SettingsSectionProfile} from './src/SettingsSectionProfile';
export {default as ShowActivitySubHeader} from './src/ShowActivitySubHeader';
export {default as SnackBarPanel1} from './src/SnackBarPanel1';
export {default as SnackBarPanel3} from './src/SnackBarPanel3';
export {default as SnackbarPanelTwoPointsCO2} from './src/SnackbarPanelTwoPointsCO2';
export {default as SnackBarWrapper} from './src/SnackBarWrapper';
export {default as SnackBarWrapperMobile} from './src/SnackBarWrapperMobile';
export {default as SocialConnect} from './src/SocialConnect';
export {default as SocialConnectComposit2} from './src/SocialConnectComposit2';
export {default as SocialConnectCompositeOne} from './src/SocialConnectCompositeOne';
export {default as Spacer} from './src/Spacer';
export {default as StatsCarousel1} from './src/StatsCarousel1';
export {default as SubcategoryList} from './src/SubcategoryList';
export {default as SwitchesToggleMenu} from './src/SwitchesToggleMenu';
export {default as SwitchToggleButton} from './src/SwitchToggleButton';
export {default as TeamHeader} from './src/TeamHeader';
export {default as TextArea} from './src/TextArea';
export {default as TextAreaLarge} from './src/TextAreaLarge';
export {default as TextImageElement} from './src/TextImageElement';
export {default as TextInputRegular} from './src/TextInputRegular';
export {default as TextLinkElement} from './src/TextLinkElement';
export {default as TextOnlyElement} from './src/TextOnlyElement';
export {default as TimeStamp} from './src/TimeStamp';
export {default as ToggleButtonWithLabel} from './src/ToggleButtonWithLabel';
export {default as Tooltip} from './src/Tooltip';
export {default as Typography} from './src/Typography';
export {default as ActivityBubbles} from './src/Visualizations/ActivityBubbles';
export {default as MapNorway} from './src/Visualizations/MapNorway';
export {default as Wrapper} from './src/Wrapper';
<|endoftext|>


<commit_before>module.exports = {
  "rules": {
    "at-rule-empty-line-before": [ "always", {
      except: [ "blockless-group", "first-nested" ],
      ignore: ["after-comment"],
    } ],
    "block-closing-brace-newline-after": "always",
    "block-closing-brace-newline-before": "always-multi-line",
    "block-closing-brace-space-before": "always-single-line",
    "block-no-empty": true,
    "block-opening-brace-newline-after": "always-multi-line",
    "block-opening-brace-space-after": "always-single-line",
    "block-opening-brace-space-before": "always",
    "color-hex-case": "lower",
    "color-hex-length": "short",
    "color-no-invalid-hex": true,
    "comment-empty-line-before": [ "always", {
      except: ["first-nested"],
      ignore: ["stylelint-commands"],
    } ],
    "comment-whitespace-inside": "always",
    "declaration-bang-space-after": "never",
    "declaration-bang-space-before": "always",
    "declaration-block-no-duplicate-properties": true,
    "declaration-block-no-shorthand-property-overrides": true,
    "declaration-block-semicolon-newline-after": "always-multi-line",
    "declaration-block-semicolon-space-after": "always-single-line",
    "declaration-block-semicolon-space-before": "never",
    "declaration-block-single-line-max-declarations": 1,
    "declaration-block-trailing-semicolon": "always",
    "declaration-colon-newline-after": "always-multi-line",
    "declaration-colon-space-after": "always-single-line",
    "declaration-colon-space-before": "never",
    "font-family-name-quotes": "single-where-recommended",
    "function-calc-no-unspaced-operator": true,
    "function-comma-newline-after": "always-multi-line",
    "function-comma-space-after": "always-single-line",
    "function-comma-space-before": "never",
    "function-linear-gradient-no-nonstandard-direction": true,
    "function-parentheses-newline-inside": "always-multi-line",
    "function-parentheses-space-inside": "never-single-line",
    "function-url-quotes": "double",
    "function-whitespace-after": "always",
    "indentation": 2,
    "max-empty-lines": 2,
    "media-feature-colon-space-after": "always",
    "media-feature-colon-space-before": "never",
    "media-feature-no-missing-punctuation": true,
    "media-feature-range-operator-space-after": "always",
    "media-feature-range-operator-space-before": "always",
    "media-query-list-comma-newline-after": "always-multi-line",
    "media-query-list-comma-space-after": "always-single-line",
    "media-query-list-comma-space-before": "never",
    "media-query-parentheses-space-inside": "never",
    "no-eol-whitespace": true,
    "no-invalid-double-slash-comments": true,
    "no-missing-eof-newline": true,
    "number-leading-zero": "always",
    "number-no-trailing-zeros": true,
    "number-zero-length-no-unit": true,
    "rule-non-nested-empty-line-before": [ "always-multi-line", {
      ignore: ["after-comment"],
    } ],
    "selector-combinator-space-after": "always",
    "selector-combinator-space-before": "always",
    "selector-list-comma-newline-after": "always",
    "selector-list-comma-space-before": "never",
    "selector-pseudo-element-colon-notation": "single",
    "string-no-newline": true,
    "string-quotes": "single",
    "value-list-comma-newline-after": "always-multi-line",
    "value-list-comma-space-after": "always-single-line",
    "value-list-comma-space-before": "never",
  }
};
<commit_msg>remove function url quotes rule<commit_after>module.exports = {
  "rules": {
    "at-rule-empty-line-before": [ "always", {
      except: [ "blockless-group", "first-nested" ],
      ignore: ["after-comment"],
    } ],
    "block-closing-brace-newline-after": "always",
    "block-closing-brace-newline-before": "always-multi-line",
    "block-closing-brace-space-before": "always-single-line",
    "block-no-empty": true,
    "block-opening-brace-newline-after": "always-multi-line",
    "block-opening-brace-space-after": "always-single-line",
    "block-opening-brace-space-before": "always",
    "color-hex-case": "lower",
    "color-hex-length": "short",
    "color-no-invalid-hex": true,
    "comment-empty-line-before": [ "always", {
      except: ["first-nested"],
      ignore: ["stylelint-commands"],
    } ],
    "comment-whitespace-inside": "always",
    "declaration-bang-space-after": "never",
    "declaration-bang-space-before": "always",
    "declaration-block-no-duplicate-properties": true,
    "declaration-block-no-shorthand-property-overrides": true,
    "declaration-block-semicolon-newline-after": "always-multi-line",
    "declaration-block-semicolon-space-after": "always-single-line",
    "declaration-block-semicolon-space-before": "never",
    "declaration-block-single-line-max-declarations": 1,
    "declaration-block-trailing-semicolon": "always",
    "declaration-colon-newline-after": "always-multi-line",
    "declaration-colon-space-after": "always-single-line",
    "declaration-colon-space-before": "never",
    "font-family-name-quotes": "single-where-recommended",
    "function-calc-no-unspaced-operator": true,
    "function-comma-newline-after": "always-multi-line",
    "function-comma-space-after": "always-single-line",
    "function-comma-space-before": "never",
    "function-linear-gradient-no-nonstandard-direction": true,
    "function-parentheses-newline-inside": "always-multi-line",
    "function-parentheses-space-inside": "never-single-line",
    "function-whitespace-after": "always",
    "indentation": 2,
    "max-empty-lines": 2,
    "media-feature-colon-space-after": "always",
    "media-feature-colon-space-before": "never",
    "media-feature-no-missing-punctuation": true,
    "media-feature-range-operator-space-after": "always",
    "media-feature-range-operator-space-before": "always",
    "media-query-list-comma-newline-after": "always-multi-line",
    "media-query-list-comma-space-after": "always-single-line",
    "media-query-list-comma-space-before": "never",
    "media-query-parentheses-space-inside": "never",
    "no-eol-whitespace": true,
    "no-invalid-double-slash-comments": true,
    "no-missing-eof-newline": true,
    "number-leading-zero": "always",
    "number-no-trailing-zeros": true,
    "number-zero-length-no-unit": true,
    "rule-non-nested-empty-line-before": [ "always-multi-line", {
      ignore: ["after-comment"],
    } ],
    "selector-combinator-space-after": "always",
    "selector-combinator-space-before": "always",
    "selector-list-comma-newline-after": "always",
    "selector-list-comma-space-before": "never",
    "selector-pseudo-element-colon-notation": "single",
    "string-no-newline": true,
    "string-quotes": "single",
    "value-list-comma-newline-after": "always-multi-line",
    "value-list-comma-space-after": "always-single-line",
    "value-list-comma-space-before": "never",
  }
};
<|endoftext|>


<commit_before>'use strict';

var postcss = require('postcss')
var loop = require('simple-loop')

exports.name = 'postcss'
exports.inputFormats = ['postcss', 'css']
exports.outputFormat = 'css'

function sanitizePlugins(pluginsToLoad) {
  var plugins = []
  loop(pluginsToLoad, function (item, i) {
    var plugin = null
    switch (typeof i) {
      case 'number':
        if (typeof item == 'string') {
          plugin = require(item)
        }
        else {
          plugin = item
        }
        break
      case 'object':
        plugin = i
        break
      case 'string':
        plugin = require(i)(item)
        break
      default:
        plugin = i
        break
    }
    if (plugin) {
      plugins.push(plugin)
    }
  })
  return plugins
}

exports.render = function (str, options) {
  var plugins = sanitizePlugins(options.plugins || [])
  return postcss(plugins).process(str, options).css
}

exports.renderAsync = function (str, options) {
  return new Promise(function (resolve, reject) {
    var plugins = sanitizePlugins(options.plugins || [])
    postcss(plugins).process(str, options).then(function (result) {
      // TODO: Add result.map to "dependencies".
      resolve(result.css)
    }).catch(reject)
  })
}
<commit_msg>Simplify renderAsync<commit_after>'use strict';

var postcss = require('postcss')
var loop = require('simple-loop')

exports.name = 'postcss'
exports.inputFormats = ['postcss', 'css']
exports.outputFormat = 'css'

function sanitizePlugins(pluginsToLoad) {
  var plugins = []
  loop(pluginsToLoad, function (item, i) {
    var plugin = null
    switch (typeof i) {
      case 'number':
        if (typeof item == 'string') {
          plugin = require(item)
        }
        else {
          plugin = item
        }
        break
      case 'object':
        plugin = i
        break
      case 'string':
        plugin = require(i)(item)
        break
      default:
        plugin = i
        break
    }
    if (plugin) {
      plugins.push(plugin)
    }
  })
  return plugins
}

exports.render = function (str, options) {
  var plugins = sanitizePlugins(options.plugins || [])
  return postcss(plugins).process(str, options).css
}

exports.renderAsync = function (str, options) {
  var plugins = sanitizePlugins(options.plugins || [])
  return postcss(plugins).process(str, options).then(function (result) {
    // TODO: Add result.map to "dependencies".
    return result.css
  })
}
<|endoftext|>


<commit_before>/**
* @author Matt Crinklaw-Vogt
*/

var util = require("util");

var whitespaceReg = /\s+/g;

function AbstractOp() {}
AbstractOp.prototype = {
	matches: function(properties) {
		var propertyValue = properties[this.attr];
		if (propertyValue instanceof Array) {
			for (var i = 0; i < propertyValue.length; ++i) {
				if (this.__match(propertyValue[i]))
					return true;
			}
		} else {
			if (propertyValue instanceof Object) {
				var constructor = propertyValue.constructor;
				if (constructor.length === 1 && constructor.name !== "Object") {
					if (typeof propertyValue.compareTo === "function") {
						var myValue = new constructor(this.value);
						return propertyValue.compareTo(myValue) === 0;
					} else if (typeof propertyValue.equals === "function") {
						var myValue = new constructor(this.value);
						return propertyValue.equals(myValue);
					}
				}
			} else {
				return this.__match(propertyValue);
			}
		}

		return false;
	},

	canCompare: function(obj) {
		return typeof obj.equals === "function" || typeof obj.compareTo === "function";
	}
};

function ApproxOp() { this.type = "approx"; }
ApproxOp.prototype = Object.create(AbstractOp.prototype);
ApproxOp.prototype.__match = function(val) {
	if (val == null)
		return false;

	return val.toLowerCase().replace(whitespaceReg, "") ==
		this.value.toLowerCase().replace(whitespaceReg, ""); // More robust impl?
};

function LteOp() { this.type = "lte"; }
LteOp.prototype = Object.create(AbstractOp.prototype);
LteOp.prototype.__match = function(val) {
	return val <= this.value;
}

function GteOp() { this.type = "gte"; }
GteOp.prototype = Object.create(AbstractOp.prototype);
GteOp.prototype.__match = function(val) {
	return val >= this.value;
}

function EqualOp(attr, value) { this.type = "equal"; this.attr = attr; this.value = value; }
EqualOp.prototype = Object.create(AbstractOp.prototype);
EqualOp.prototype.__match = function(val) {
	return val == this.value;
}

var replaceReg = /[*]/g
function SubstrOp(attr, value) {
 	this.type = "substr";
 	this.attr = attr;
 	this.value = value;
 	this.value = this.value.replace(replaceReg, ".*");

 	this.value = new RegExp(this.value);
}

SubstrOp.prototype = Object.create(AbstractOp.prototype);
SubstrOp.prototype.__match = function(val) {
	if (val != null) {
		return this.value.exec(val) != null;
	} else {
		return false;
	}
}

function PresentOp() { this.type = "present"; }
PresentOp.prototype = {
	matches: function(properties) {
		// Is a null property a present property?
		return properties[this.attr] !== undefined;
	}
}

function EqualOrSubstrOp() { this.type = "equalOrSubstr"; }
EqualOrSubstrOp.prototype = {
	setValue: function(value) {
		for (var i = 0; i < value.length; ++i) {
			if (value[i] == "*" &&  (i == 0 || value[i-1] != "\\"))
				return new SubstrOp(this.attr, value);
		}

		return new EqualOp(this.attr, value);
	}
};

function FilterList() {
	this.filters = [];
}

FilterList.prototype = {
	push: function(filter) {
		this.filters.push(filter);
	},

	prepend: function(filter) {
		this.filters.unshift(filter);
	}
};

function LogicalAnd() { this.type = "and"; }
LogicalAnd.prototype = {
	matches: function(properties) {
		return this.args.filters[0].matches(properties) && this.args.filters[1].matches(properties);
	}
}

function LogicalOr() { this.type = "or"; }
LogicalOr.prototype = {
	matches: function(properties) {
		return this.args.filters[0].matches(properties) || this.args.filters[1].matches(properties);
	}
};

function LogicalNot() { this.type = "not"; }
LogicalNot.prototype = {
	matches: function(properties) {
		return !!!this.args.matches(properties);
	}
};

function Filter(comp) {
	this.comp = comp;
}

Filter.prototype = {
	matches: function(properties) {
		return this.comp.matches(properties);
	}
}

function createOperation(type) {
	switch (type) {
		case "gte":
			return new GteOp();
		case "lte":
			return new LteOp();
		case "approx":
			return new ApproxOp();
		case "present":
			return new PresentOp();
		case "equalOrSubstr":
			return new EqualOrSubstrOp();
		default:
			throw "Unkown operation: " + type;
	}
}

function createFilterList(filter) {
	var f = new FilterList();
	f.push(filter);
	return f;
}

function createFilter(comp) {
	//return new Filter(comp);
	return comp;
}

function createLogical(type) {
	switch (type) {
		case "not":
			return new LogicalNot();
		case "or":
			return new LogicalOr();
		case "and":
			return new LogicalAnd();
		default:
			throw "Unkown logical: " + type;
	}
}

// TODO: we need to make jison return stuff... instead of registering crap into globals...
var resultHolder = {};
function complete(filter) {
	resultHolder.result = filter;
}

exports.createOperation = createOperation;
exports.createFilterList = createFilterList;
exports.createLogical = createLogical;
exports.createFilter = createFilter;
exports.complete = complete;
exports.resultHolder = resultHolder;<commit_msg>Fixed the substring matching.<commit_after>/**
* @author Matt Crinklaw-Vogt
*/

var util = require("util");

var whitespaceReg = /\s+/g;

function AbstractOp() {}
AbstractOp.prototype = {
	matches: function(properties) {
		var propertyValue = properties[this.attr];
		if (propertyValue instanceof Array) {
			for (var i = 0; i < propertyValue.length; ++i) {
				if (this.__match(propertyValue[i]))
					return true;
			}
		} else {
			if (propertyValue instanceof Object) {
				var constructor = propertyValue.constructor;
				if (constructor.length === 1 && constructor.name !== "Object") {
					if (typeof propertyValue.compareTo === "function") {
						var myValue = new constructor(this.value);
						return propertyValue.compareTo(myValue) === 0;
					} else if (typeof propertyValue.equals === "function") {
						var myValue = new constructor(this.value);
						return propertyValue.equals(myValue);
					}
				}
			} else {
				return this.__match(propertyValue);
			}
		}

		return false;
	},

	canCompare: function(obj) {
		return typeof obj.equals === "function" || typeof obj.compareTo === "function";
	}
};

function ApproxOp() { this.type = "approx"; }
ApproxOp.prototype = Object.create(AbstractOp.prototype);
ApproxOp.prototype.__match = function(val) {
	if (val == null)
		return false;

	return val.toLowerCase().replace(whitespaceReg, "") ==
		this.value.toLowerCase().replace(whitespaceReg, ""); // More robust impl?
};

function LteOp() { this.type = "lte"; }
LteOp.prototype = Object.create(AbstractOp.prototype);
LteOp.prototype.__match = function(val) {
	return val <= this.value;
}

function GteOp() { this.type = "gte"; }
GteOp.prototype = Object.create(AbstractOp.prototype);
GteOp.prototype.__match = function(val) {
	return val >= this.value;
}

function EqualOp(attr, value) { this.type = "equal"; this.attr = attr; this.value = value; }
EqualOp.prototype = Object.create(AbstractOp.prototype);
EqualOp.prototype.__match = function(val) {
	return val == this.value;
}

var replaceReg = /[*]/g
function SubstrOp(attr, value) {
 	this.type = "substr";
 	this.attr = attr;
 	this.value = value;
 	this.components = value.split("*");
}

SubstrOp.prototype = Object.create(AbstractOp.prototype);
SubstrOp.prototype.__match = function(val) {
	if (val != null) {
		var lastIndexOf = 0;
		var remainingVal = val;
		var success = true;
		this.components.every(function(component) {
			var index = remainingVal.indexOf(component, lastIndexOf);
			if (index > -1) {
				lastIndexOf = index;
				return true;
			} else {
				success = false;
				return false;
			}
		}, this);
		return success;
	} else {
		return false;
	}
}

function PresentOp() { this.type = "present"; }
PresentOp.prototype = {
	matches: function(properties) {
		// Is a null property a present property?
		return properties[this.attr] !== undefined;
	}
}

function EqualOrSubstrOp() { this.type = "equalOrSubstr"; }
EqualOrSubstrOp.prototype = {
	setValue: function(value) {
		for (var i = 0; i < value.length; ++i) {
			if (value[i] == "*" &&  (i == 0 || value[i-1] != "\\"))
				return new SubstrOp(this.attr, value);
		}

		return new EqualOp(this.attr, value);
	}
};

function FilterList() {
	this.filters = [];
}

FilterList.prototype = {
	push: function(filter) {
		this.filters.push(filter);
	},

	prepend: function(filter) {
		this.filters.unshift(filter);
	}
};

function LogicalAnd() { this.type = "and"; }
LogicalAnd.prototype = {
	matches: function(properties) {
		return this.args.filters[0].matches(properties) && this.args.filters[1].matches(properties);
	}
}

function LogicalOr() { this.type = "or"; }
LogicalOr.prototype = {
	matches: function(properties) {
		return this.args.filters[0].matches(properties) || this.args.filters[1].matches(properties);
	}
};

function LogicalNot() { this.type = "not"; }
LogicalNot.prototype = {
	matches: function(properties) {
		return !!!this.args.matches(properties);
	}
};

function Filter(comp) {
	this.comp = comp;
}

Filter.prototype = {
	matches: function(properties) {
		return this.comp.matches(properties);
	}
}

function createOperation(type) {
	switch (type) {
		case "gte":
			return new GteOp();
		case "lte":
			return new LteOp();
		case "approx":
			return new ApproxOp();
		case "present":
			return new PresentOp();
		case "equalOrSubstr":
			return new EqualOrSubstrOp();
		default:
			throw "Unkown operation: " + type;
	}
}

function createFilterList(filter) {
	var f = new FilterList();
	f.push(filter);
	return f;
}

function createFilter(comp) {
	//return new Filter(comp);
	return comp;
}

function createLogical(type) {
	switch (type) {
		case "not":
			return new LogicalNot();
		case "or":
			return new LogicalOr();
		case "and":
			return new LogicalAnd();
		default:
			throw "Unkown logical: " + type;
	}
}

// TODO: we need to make jison return stuff... instead of registering crap into globals...
var resultHolder = {};
function complete(filter) {
	resultHolder.result = filter;
}

exports.createOperation = createOperation;
exports.createFilterList = createFilterList;
exports.createLogical = createLogical;
exports.createFilter = createFilter;
exports.complete = complete;
exports.resultHolder = resultHolder;<|endoftext|>


<commit_before>var through = require('through'),
    path = require('path'),
    browserify = require('browserify'),
    watchify = require('watchify'),
    chalk = require('chalk'),
    gutil = require('gulp-util'),
	PluginError = gutil.PluginError,
	File = gutil.File,
	_ = require('underscore'),
	source = require('vinyl-source-stream'),
	gulp = require('gulp'),
	endStreamFn;

// Log but with a prefix
function log() {
	// Combine arguments
	var args = [chalk.magenta('[gulp-browserify]')];
	var func_args = Array.prototype.slice.call(arguments);

	args.push.apply(args,func_args);

	return gutil.log.apply(this,args);
}

// Keep adding files until there are none left
function addFiles(file){
	if (file.isStream()) {
		return this.emit('error', new PluginError(
			'gulp-browserify',
			'Streaming not supported'
		));
	}

	if (!this._firstFile) this._firstFile = file;

	var files = this.files || [];

	files.push(file.path);
}

function endStream(files) {
	var me = this;

	console.log('files', files);

	if (files.length === 0) return this.emit('end');

	return endStreamFn();
}

function waitForStream(callback) {
	this.endStreamFn = callback;
}

// Main export function.. Call either using gulpBrowserify(app.js) or opts {
// filename: app.js }
// opts:
// filename: x
// maskFilenames: true
// .. any other browserify options
function __main(opts) {
	if (!opts) opts = {};

	// Accept single string format
	if(typeof(opts) !== 'object') {
		opts = {};
		opts.filename = filename;
	}

	// Default options..
	defaultFilename = 'bundle-';
	defaultFilename += Math.random().toString(36).substr(3,3);
	defaultFilename += String(new Date().getTime()).substr(4,3);
	defaultFilename += '.js';

	_.defaults(opts, {
		filename: defaultFilename,
		maskFilenames: true
	});

	var filename = opts.filename;

	var funcArgs = ['maskFilenames','filename','watch'];

	// Get an option list for browserify
	var browserifyOpts = {};
	Object.keys(opts).forEach(function(key) {
		value = opts[key];

		if(!_.contains(funcArgs,key)) {
			browserifyOpts[key] = value;
		}
	});

	var files = [];
	var firstFile = null;
	var browserifyFn;

	// Main browserify object
	if(!opts.watch) {
		browserifyFn = browserify;
	} else {
		browserifyFn = watchify;
	}

	var bundler = browserifyFn(browserifyOpts);

	// Error wrapping
	function newError(e) {
		return this.emit('error', e);
	}

	waitForStream(function() {
		console.log('test');
	});

	return through(addFiles, endStream);
}

module.exports = __main;<commit_msg>move functions<commit_after>var through = require('through'),
    path = require('path'),
    browserify = require('browserify'),
    watchify = require('watchify'),
    chalk = require('chalk'),
    gutil = require('gulp-util'),
	PluginError = gutil.PluginError,
	File = gutil.File,
	_ = require('underscore'),
	source = require('vinyl-source-stream'),
	gulp = require('gulp'),
	endStreamFn;

// Log but with a prefix
function log() {
	// Combine arguments
	var args = [chalk.magenta('[gulp-browserify]')];
	var func_args = Array.prototype.slice.call(arguments);

	args.push.apply(args,func_args);

	return gutil.log.apply(this,args);
}

// Keep adding files until there are none left
function addFiles(file){
	if (file.isStream()) {
		return this.emit('error', new PluginError(
			'gulp-browserify',
			'Streaming not supported'
		));
	}

	this._data = this._data || {};

	if (!this._data.firstFile) this._data.firstFile = file;

	if(!_.has(this._data,'files')) this._data.files = [];

	this._data.files.push(file.path);
}

function endStream(files) {
    files = this._data.files;
	if (files.length === 0) return this.emit('end');

	return endStreamFn.apply(this);
}

// Function that is called once endStream is called
function waitForStream(callback) {
	endStreamFn = callback;
}

// Build function, called from __main
function build(opts) {
	// Stream data
	var data = this._data;

	if (!opts) opts = {};

	// Accept single string format
	if(typeof(opts) !== 'object') {
		opts = {};
		opts.filename = filename;
	}

	// Default options..
	defaultFilename = 'bundle.js';

	_.defaults(opts, {
		filename: defaultFilename,
		maskFilenames: true
	});

	var filename = opts.filename;

	var funcArgs = ['maskFilenames','filename','watch'];

	// Get an option list for browserify
	var browserifyOpts = {};
	Object.keys(opts).forEach(function(key) {
		value = opts[key];

		if(!_.contains(funcArgs,key)) {
			browserifyOpts[key] = value;
		}
	});

	var files = [];
	var firstFile = null;
	var browserifyFn;

	// Main browserify object
	if(!opts.watch) {
		browserifyFn = browserify;
	} else {
		browserifyFn = watchify;
	}

	var bundler = browserifyFn(browserifyOpts);

	function newError(e) {
		return this.emit('error', e);
	}

	// Bubble up errors to stream
	bundler.on('error', newError);

	// Require each file that was found in the stream
	data.files.forEach(function(file,index) {
		var dirname = path.dirname(file);

		var requireOpts = {};

		bundler.add(file, requireOpts);
	});

	this.emit('prebundle', bundler);

	// Compile new bundle on change
	function rebundle(ids) {
		var start = new Date().getMilliseconds();

		var _return = bundler.bundle()
		.pipe(source(filename))
		.pipe(gulp.dest('/Users/pauldufour/Repositories/brit-frontend/public/js'));

		var end = new Date().getMilliseconds();
		var time = chalk.cyan((end-start) + 'ms');
		log('compiled in ' + time);

		return _return;
	}

	bundler.on('update', rebundle);

	return rebundle();

}

function __main(opts) {
	// Wait till all the files are there
	waitForStream(function() {
		build.call(this,opts);
	});

	return through(addFiles, endStream);
}

module.exports = __main;<|endoftext|>


<commit_before>'use strict'
const asana = require('asana')
const util = require('util')
const csvWriter = require('csv-write-stream')
const fs = require('fs')

// Using the API key for basic authentication. This is reasonable to get
// started with, but Oauth is more secure and provides more features.
let client = asana.Client.create().useBasicAuth(process.env.ASANA_API_KEY)

client.users.me()
  .then(function(user) {
    let userId = user.id
    console.log(`User ID: ${userId}`)
    // The user's "default" workspace is the first one in the list, though
    // any user can have multiple workspaces so you can't always assume this
    // is the one you want to work with.
    let workspaceId = user.workspaces[0].id
    console.log(`Workspace ID: ${workspaceId}`)
    return client.tasks.findAll({
      assignee: userId,
      workspace: workspaceId,
      completed_since: '2016-09-01T01:01:01.001Z',
      opt_fields: 'id,name,completed,completed_at,due_at,due_on,notes'
    })
  })
  .then(function(response) {
    return response.data;
  })
  .filter(function(task) {
    return task.completed_at !== '' && task.completed_at !== null
  })
  .then(function(list) {
    //Write entries to CSV File
    let writer = csvWriter()
    writer.pipe(fs.createWriteStream('Monthly Report.csv'))
    for (let task of list) {
      writer.write(task)
    }
    writer.end()
  })
<commit_msg>Remove util import<commit_after>'use strict'
const asana = require('asana')
const csvWriter = require('csv-write-stream')
const fs = require('fs')

// Using the API key for basic authentication. This is reasonable to get
// started with, but Oauth is more secure and provides more features.
let client = asana.Client.create().useBasicAuth(process.env.ASANA_API_KEY)

client.users.me()
  .then(function(user) {
    let userId = user.id
    console.log(`User ID: ${userId}`)
    // The user's "default" workspace is the first one in the list, though
    // any user can have multiple workspaces so you can't always assume this
    // is the one you want to work with.
    let workspaceId = user.workspaces[0].id
    console.log(`Workspace ID: ${workspaceId}`)
    return client.tasks.findAll({
      assignee: userId,
      workspace: workspaceId,
      completed_since: '2016-09-01T01:01:01.001Z',
      opt_fields: 'id,name,completed,completed_at,due_at,due_on,notes'
    })
  })
  .then(function(response) {
    return response.data;
  })
  .filter(function(task) {
    return task.completed_at !== '' && task.completed_at !== null
  })
  .then(function(list) {
    //Write entries to CSV File
    let writer = csvWriter()
    writer.pipe(fs.createWriteStream('Monthly Report.csv'))
    for (let task of list) {
      writer.write(task)
    }
    writer.end()
  })
<|endoftext|>


<commit_before>/**
 * Mixin for Custom Elements (Web Components) to handle/sync properties and attributes.
 *
 * MIT License
 * Copyright (c) 2018 Jason Sheppard
 *
 * See README.md for more information.
 * NPM: https://npmjs.org/package/ce-mixinprops
 * Github: https://github.com/Jashepp/customElements-mixinPropertiesAttributes
 */

const getConstructorTree = (topClass)=>{
	let protoTree = [], parentClass = null;
	while(true){
		parentClass = parentClass===null ? topClass : Object.getPrototypeOf(parentClass);
		if(!parentClass || !parentClass.constructor || parentClass.constructor===HTMLElement || parentClass.constructor===Function || parentClass.constructor===Object || parentClass.constructor===parentClass.constructor.constructor) break;
		protoTree.push(parentClass);
	}
	return protoTree;
}

const getProtoTree = (topClass)=>{
	let protoTree = [], parentClass = null;
	while(true){
		parentClass = parentClass===null ? topClass : Object.getPrototypeOf(parentClass);
		if(!parentClass || parentClass===HTMLElement || parentClass===Function || parentClass===Object || parentClass===parentClass.constructor) break;
		protoTree.push(parentClass);
	}
	return protoTree;
}

const buildProtoPropsConfig = (topClass,propertiesName,protoTree)=>{
	let propsConfig = {};
	for(let parentClass of [...protoTree].reverse()){
		if(parentClass.hasOwnProperty(propertiesName)) propsConfig = Object.assign(propsConfig,parentClass[propertiesName]);
	}
	return propsConfig;
};

const buildConstructorPropsConfig = (topClass,propertiesName,protoTree)=>{
	let propsConfig = {};
	for(let parentClass of [...protoTree].reverse()){
		if(parentClass.constructor.hasOwnProperty(propertiesName)) propsConfig = Object.assign(propsConfig,parentClass.constructor[propertiesName]);
	}
	return propsConfig;
};

const propsConfigWeakMap = WeakMap && new WeakMap();

/**
 * Mixin for Custom Elements (Web Components) to handle/sync properties and attributes.
 * @param HTMLElement base class to apply mixin to
 * @param String propertiesName Optional: 'static get' method name for configuration of properties. Default: 'properties'
 */
export const mixinPropertiesAttributes = (base,propertiesName='properties') => class mixinPropertiesAttributes extends base {

	static get observedAttributes() {
		let propsLower = [], propsConfig = buildProtoPropsConfig(this,propertiesName,getProtoTree(this));
		return Object.keys(propsConfig).filter(prop=>{
			if(propsConfig[prop].readOnly) return false;
			let type = propsConfig[prop].type;
			let safeAttributeType = type===String || type===Number || type===Boolean;
			let observe = 'reflectFromAttribute' in propsConfig[prop] ? !!propsConfig[prop].reflectFromAttribute : safeAttributeType;
			if(observe){
				let propLower = prop.toLowerCase();
				if(propLower!==prop) propsLower.push(propLower);
			}
			return observe;
		}).concat(propsLower,super.observedAttributes || []);
	}

	attributeChangedCallback(name,oldValue,newValue){
		if(super.attributeChangedCallback) super.attributeChangedCallback(name,oldValue,newValue);
		if(oldValue===newValue) return;
		let propsConfig = (propsConfigWeakMap && propsConfigWeakMap.get(this)) || buildConstructorPropsConfig(this,propertiesName,getConstructorTree(this));
		if(!(name in propsConfig)){
			let props = Object.keys(propsConfig);
			for(let i=0,l=props.length; i<l; i++){
				if(props[i].toLowerCase()===name){
					name = props[i];
					break;
				}
			}
		}
		if(name in propsConfig){
			let config = propsConfig[name], type = config.type;
			if(type===Boolean) newValue = newValue!==null;
			else if(type===Number) newValue = Number(newValue);
			else if(type===String) newValue = newValue===null ? '' : ''+newValue;
			else if('reflectFromAttribute' in config && typeof config.reflectFromAttribute==='function') newValue = config.reflectFromAttribute.apply(this,[newValue]);
			this[name] = newValue;
		}
	}

	constructor({ protectedProperties=[], propertyStore={}, onPropertySet, superArguments=[] }={}) {
		super(...superArguments);
		let element = this, topClass = Object.getPrototypeOf(this);
		let protoTree = getConstructorTree(topClass);
		let propsConfig = buildConstructorPropsConfig(topClass,propertiesName,protoTree);
		if(propsConfigWeakMap) propsConfigWeakMap.set(this,propsConfig);
		let propsLower = Object.keys(propsConfig).map(prop=>prop.toLowerCase());
		for(let i=0,l=propsLower.length; i<l; i++){
			if(propsLower.indexOf(propsLower[i])!==i) throw new Error(`Unable to setup property/attribute '${propsLower[i]}' on ${this.constructor.name}. It is a duplicate property (not case sensitive).`);
		}
		for(let name in propsConfig){
			if(protectedProperties.indexOf(name)!==-1) throw new Error(`Unable to setup property/attribute '${name}' on ${this.constructor.name}. It is a protected property.`);
			let config = Object.freeze(propsConfig[name]);
			if(config.overrideExisting!==true){
				let propExists = false, protoPath = [];
				for(let parentClass of protoTree){
					if(parentClass.constructor) protoPath.push(parentClass.constructor.name);
					if(parentClass.hasOwnProperty(name)){
						let descriptor = Object.getOwnPropertyDescriptor(parentClass,name);
						if(!descriptor || !descriptor.set || !descriptor.configurable || descriptor.get){
							propExists = true;
							break;
						}
					}
				}
				if(propExists) throw new Error(`Unable to setup property/attribute '${name}' on ${this.constructor.name}. It already exists on ${protoPath.join('=>')}.`);
			}
			if(config.readOnly){
				Object.defineProperty(element,name,{
					enumerable: true,
					configurable: true,
					writable: false,
					value: config.value
				});
				let reflectToAttribute = 'reflectToAttribute' in config && config.reflectToAttribute;
				if(reflectToAttribute && (!element.hasAttribute(name) || element.getAttribute(name)+''!==''+config.value)) element.setAttribute(name,''+config.value);
			}
			else {
				let hasObserver = 'observer' in config, isObserverString = hasObserver && typeof config.observer==='string';
				let isString = config.type===String, isNumber = config.type===Number, isBoolean = config.type===Boolean;
				let reflectToAttribute = 'reflectToAttribute' in config ? config.reflectToAttribute : (isString || isNumber || isBoolean);
				let reflectFromAttribute = 'reflectFromAttribute' in config ? config.reflectFromAttribute : (isString || isNumber || isBoolean);
				let transformToAttribute = !isString && !isNumber && !isBoolean && typeof reflectToAttribute==='function' ? reflectToAttribute : null;
				let transformFromAttribute = !isString && !isNumber && !isBoolean && typeof reflectFromAttribute==='function' ? reflectFromAttribute : null;
				reflectToAttribute = !!reflectToAttribute; reflectFromAttribute = !!reflectFromAttribute;
				let setDescriptors = [];
				for(let classObj of protoTree){
					let descriptor = Object.getOwnPropertyDescriptor(classObj,name);
					if(descriptor && descriptor.set && setDescriptors.indexOf(descriptor.set)===-1) setDescriptors.unshift(descriptor.set);
				}
				if(reflectToAttribute && reflectFromAttribute){
					if(isBoolean && config.value && !element.hasAttribute(name)) element.setAttribute(name,'');
					if(isString && config.value!==void 0 && !element.hasAttribute(name)) element.setAttribute(name,''+config.value);
					if(isNumber && config.value!==void 0 && config.value!==null && !element.hasAttribute(name)) element.setAttribute(name,Number(config.value));
					if(transformToAttribute){
						let transformedValue = transformToAttribute.apply(element,[config.value]);
						if(transformedValue===null) element.removeAttribute(name);
						else element.setAttribute(name,transformedValue);
					}
				}
				let eProp = new elementProperty({
					propertyStore, element, name, isBoolean, isNumber, isString, config, reflectFromAttribute, reflectToAttribute, transformFromAttribute, transformToAttribute, onPropertySet, hasObserver, isObserverString, setDescriptors
				});
				Object.defineProperty(element,name,eProp);
				if(reflectFromAttribute && config.value!==eProp.getValueFromAttribute()){
					Promise.resolve().then(()=>{
						if(!eProp.firstChangeEmitted) eProp.emitChange(config.value,eProp.get());
					});
				}
			}
		}
	}

};

class elementProperty {

	constructor(props){
		this.enumerable = true;
		this.configurable = true;
		this.props = props;
		this.get = this.get.bind(this);
		this.set = this.set.bind(this);
		this.firstChangeEmitted = false;
		this.transformingFromAttribute = false;
	}

	get(){
		let { propertyStore, name, config, reflectFromAttribute } = this.props;
		if(propertyStore.hasOwnProperty(name)) return propertyStore[name];
		if(reflectFromAttribute){
			let value = this.getValueFromAttribute();
			if(value!==void 0) return propertyStore[name] = value;
		}
		return config.value;
	}

	getValueFromAttribute(){
		let { element, name, isBoolean, isNumber, transformFromAttribute } = this.props;
		let hasAttribute = element.hasAttribute(name);
		if(isBoolean) return hasAttribute;
		if(hasAttribute && isNumber) return Number(element.getAttribute(name));
		if(transformFromAttribute){
			if(this.transformingFromAttribute) return;
			this.transformingFromAttribute = true;
			let transformedValue = transformFromAttribute.apply(element,[hasAttribute ? element.getAttribute(name) : null]);
			this.transformingFromAttribute = false;
			return transformedValue;
		}
		if(hasAttribute) return element.getAttribute(name);
	}

	set(newValue){
		let { propertyStore, element, name, reflectToAttribute, transformToAttribute, isBoolean, isNumber, isString } = this.props;
		if(isBoolean) newValue = !!newValue;
		else if(isNumber) newValue = newValue===void 0 ? 0 : Number(newValue);
		else if(isString) newValue = newValue===null || newValue===void 0 ? '' : ''+newValue;
		let oldValue = element[name];
		if(oldValue===newValue) return;
		propertyStore[name] = newValue;
		if(reflectToAttribute){
			if(isBoolean){
				let hasAttribute = element.hasAttribute(name);
				if(!newValue && hasAttribute) element.removeAttribute(name);
				if(newValue && !hasAttribute) element.setAttribute(name,'');
			}
			else if(transformToAttribute){
				let transformedValue = transformToAttribute.apply(element,[newValue]);
				if(transformedValue===null) element.removeAttribute(name);
				else element.setAttribute(name,transformedValue);
			}
			else element.setAttribute(name,newValue);
		}
		this.emitChange(oldValue,newValue);
	}

	emitChange(oldValue,newValue){
		let { element, name, config, onPropertySet, hasObserver, isObserverString, setDescriptors } = this.props;
		if(!this.firstChangeEmitted) this.firstChangeEmitted = true;
		if(onPropertySet || hasObserver || config.notify){
			let detailObj = new propertyChangeDetails(element,name,config,newValue,oldValue);
			if(onPropertySet) onPropertySet.apply(element,[detailObj]);
			if(hasObserver && isObserverString) element[config.observer].apply(element,[detailObj]);
			else if(hasObserver) config.observer.apply(element,[detailObj]);
			if(config.notify) element.dispatchEvent(new CustomEvent(name+'-changed',{ detail:detailObj, bubbles:false }));
		}
		for(let i=0,l=setDescriptors.length; i<l; i++) setDescriptors[i].apply(element,[newValue]);
	}

}

class propertyChangeDetails {

	constructor(element,name,config,newValue,oldValue){
		this.element = element;
		this.name = name;
		this.config = config;
		this.newValue = newValue;
		this.oldValue = oldValue;
	}

}
<commit_msg>Continue set if the property did not exist in the store before get call<commit_after>/**
 * Mixin for Custom Elements (Web Components) to handle/sync properties and attributes.
 *
 * MIT License
 * Copyright (c) 2018 Jason Sheppard
 *
 * See README.md for more information.
 * NPM: https://npmjs.org/package/ce-mixinprops
 * Github: https://github.com/Jashepp/customElements-mixinPropertiesAttributes
 */

const getConstructorTree = (topClass)=>{
	let protoTree = [], parentClass = null;
	while(true){
		parentClass = parentClass===null ? topClass : Object.getPrototypeOf(parentClass);
		if(!parentClass || !parentClass.constructor || parentClass.constructor===HTMLElement || parentClass.constructor===Function || parentClass.constructor===Object || parentClass.constructor===parentClass.constructor.constructor) break;
		protoTree.push(parentClass);
	}
	return protoTree;
}

const getProtoTree = (topClass)=>{
	let protoTree = [], parentClass = null;
	while(true){
		parentClass = parentClass===null ? topClass : Object.getPrototypeOf(parentClass);
		if(!parentClass || parentClass===HTMLElement || parentClass===Function || parentClass===Object || parentClass===parentClass.constructor) break;
		protoTree.push(parentClass);
	}
	return protoTree;
}

const buildProtoPropsConfig = (topClass,propertiesName,protoTree)=>{
	let propsConfig = {};
	for(let parentClass of [...protoTree].reverse()){
		if(parentClass.hasOwnProperty(propertiesName)) propsConfig = Object.assign(propsConfig,parentClass[propertiesName]);
	}
	return propsConfig;
};

const buildConstructorPropsConfig = (topClass,propertiesName,protoTree)=>{
	let propsConfig = {};
	for(let parentClass of [...protoTree].reverse()){
		if(parentClass.constructor.hasOwnProperty(propertiesName)) propsConfig = Object.assign(propsConfig,parentClass.constructor[propertiesName]);
	}
	return propsConfig;
};

const propsConfigWeakMap = WeakMap && new WeakMap();

/**
 * Mixin for Custom Elements (Web Components) to handle/sync properties and attributes.
 * @param HTMLElement base class to apply mixin to
 * @param String propertiesName Optional: 'static get' method name for configuration of properties. Default: 'properties'
 */
export const mixinPropertiesAttributes = (base,propertiesName='properties') => class mixinPropertiesAttributes extends base {

	static get observedAttributes() {
		let propsLower = [], propsConfig = buildProtoPropsConfig(this,propertiesName,getProtoTree(this));
		return Object.keys(propsConfig).filter(prop=>{
			if(propsConfig[prop].readOnly) return false;
			let type = propsConfig[prop].type;
			let safeAttributeType = type===String || type===Number || type===Boolean;
			let observe = 'reflectFromAttribute' in propsConfig[prop] ? !!propsConfig[prop].reflectFromAttribute : safeAttributeType;
			if(observe){
				let propLower = prop.toLowerCase();
				if(propLower!==prop) propsLower.push(propLower);
			}
			return observe;
		}).concat(propsLower,super.observedAttributes || []);
	}

	attributeChangedCallback(name,oldValue,newValue){
		if(super.attributeChangedCallback) super.attributeChangedCallback(name,oldValue,newValue);
		if(oldValue===newValue) return;
		let propsConfig = (propsConfigWeakMap && propsConfigWeakMap.get(this)) || buildConstructorPropsConfig(this,propertiesName,getConstructorTree(this));
		if(!(name in propsConfig)){
			let props = Object.keys(propsConfig);
			for(let i=0,l=props.length; i<l; i++){
				if(props[i].toLowerCase()===name){
					name = props[i];
					break;
				}
			}
		}
		if(name in propsConfig){
			let config = propsConfig[name], type = config.type;
			if(type===Boolean) newValue = newValue!==null;
			else if(type===Number) newValue = Number(newValue);
			else if(type===String) newValue = newValue===null ? '' : ''+newValue;
			else if('reflectFromAttribute' in config && typeof config.reflectFromAttribute==='function') newValue = config.reflectFromAttribute.apply(this,[newValue]);
			this[name] = newValue;
		}
	}

	constructor({ protectedProperties=[], propertyStore={}, onPropertySet, superArguments=[] }={}) {
		super(...superArguments);
		let element = this, topClass = Object.getPrototypeOf(this);
		let protoTree = getConstructorTree(topClass);
		let propsConfig = buildConstructorPropsConfig(topClass,propertiesName,protoTree);
		if(propsConfigWeakMap) propsConfigWeakMap.set(this,propsConfig);
		let propsLower = Object.keys(propsConfig).map(prop=>prop.toLowerCase());
		for(let i=0,l=propsLower.length; i<l; i++){
			if(propsLower.indexOf(propsLower[i])!==i) throw new Error(`Unable to setup property/attribute '${propsLower[i]}' on ${this.constructor.name}. It is a duplicate property (not case sensitive).`);
		}
		for(let name in propsConfig){
			if(protectedProperties.indexOf(name)!==-1) throw new Error(`Unable to setup property/attribute '${name}' on ${this.constructor.name}. It is a protected property.`);
			let config = Object.freeze(propsConfig[name]);
			if(config.overrideExisting!==true){
				let propExists = false, protoPath = [];
				for(let parentClass of protoTree){
					if(parentClass.constructor) protoPath.push(parentClass.constructor.name);
					if(parentClass.hasOwnProperty(name)){
						let descriptor = Object.getOwnPropertyDescriptor(parentClass,name);
						if(!descriptor || !descriptor.set || !descriptor.configurable || descriptor.get){
							propExists = true;
							break;
						}
					}
				}
				if(propExists) throw new Error(`Unable to setup property/attribute '${name}' on ${this.constructor.name}. It already exists on ${protoPath.join('=>')}.`);
			}
			if(config.readOnly){
				Object.defineProperty(element,name,{
					enumerable: true,
					configurable: true,
					writable: false,
					value: config.value
				});
				let reflectToAttribute = 'reflectToAttribute' in config && config.reflectToAttribute;
				if(reflectToAttribute && (!element.hasAttribute(name) || element.getAttribute(name)+''!==''+config.value)) element.setAttribute(name,''+config.value);
			}
			else {
				let hasObserver = 'observer' in config, isObserverString = hasObserver && typeof config.observer==='string';
				let isString = config.type===String, isNumber = config.type===Number, isBoolean = config.type===Boolean;
				let reflectToAttribute = 'reflectToAttribute' in config ? config.reflectToAttribute : (isString || isNumber || isBoolean);
				let reflectFromAttribute = 'reflectFromAttribute' in config ? config.reflectFromAttribute : (isString || isNumber || isBoolean);
				let transformToAttribute = !isString && !isNumber && !isBoolean && typeof reflectToAttribute==='function' ? reflectToAttribute : null;
				let transformFromAttribute = !isString && !isNumber && !isBoolean && typeof reflectFromAttribute==='function' ? reflectFromAttribute : null;
				reflectToAttribute = !!reflectToAttribute; reflectFromAttribute = !!reflectFromAttribute;
				let setDescriptors = [];
				for(let classObj of protoTree){
					let descriptor = Object.getOwnPropertyDescriptor(classObj,name);
					if(descriptor && descriptor.set && setDescriptors.indexOf(descriptor.set)===-1) setDescriptors.unshift(descriptor.set);
				}
				if(reflectToAttribute && reflectFromAttribute){
					if(isBoolean && config.value && !element.hasAttribute(name)) element.setAttribute(name,'');
					if(isString && config.value!==void 0 && !element.hasAttribute(name)) element.setAttribute(name,''+config.value);
					if(isNumber && config.value!==void 0 && config.value!==null && !element.hasAttribute(name)) element.setAttribute(name,Number(config.value));
					if(transformToAttribute){
						let transformedValue = transformToAttribute.apply(element,[config.value]);
						if(transformedValue===null) element.removeAttribute(name);
						else element.setAttribute(name,transformedValue);
					}
				}
				let eProp = new elementProperty({
					propertyStore, element, name, isBoolean, isNumber, isString, config, reflectFromAttribute, reflectToAttribute, transformFromAttribute, transformToAttribute, onPropertySet, hasObserver, isObserverString, setDescriptors
				});
				Object.defineProperty(element,name,eProp);
				if(reflectFromAttribute && config.value!==eProp.getValueFromAttribute()){
					Promise.resolve().then(()=>{
						if(!eProp.firstChangeEmitted) eProp.emitChange(config.value,eProp.get());
					});
				}
			}
		}
	}

};

class elementProperty {

	constructor(props){
		this.enumerable = true;
		this.configurable = true;
		this.props = props;
		this.get = this.get.bind(this);
		this.set = this.set.bind(this);
		this.firstChangeEmitted = false;
		this.transformingFromAttribute = false;
	}

	get(){
		let { propertyStore, name, config, reflectFromAttribute } = this.props;
		if(propertyStore.hasOwnProperty(name)) return propertyStore[name];
		if(reflectFromAttribute){
			let value = this.getValueFromAttribute();
			if(value!==void 0) return propertyStore[name] = value;
		}
		return config.value;
	}

	getValueFromAttribute(){
		let { element, name, isBoolean, isNumber, transformFromAttribute } = this.props;
		let hasAttribute = element.hasAttribute(name);
		if(isBoolean) return hasAttribute;
		if(hasAttribute && isNumber) return Number(element.getAttribute(name));
		if(transformFromAttribute){
			if(this.transformingFromAttribute) return;
			this.transformingFromAttribute = true;
			let transformedValue = transformFromAttribute.apply(element,[hasAttribute ? element.getAttribute(name) : null]);
			this.transformingFromAttribute = false;
			return transformedValue;
		}
		if(hasAttribute) return element.getAttribute(name);
	}

	set(newValue){
		let { propertyStore, element, name, reflectToAttribute, transformToAttribute, isBoolean, isNumber, isString } = this.props;
		if(isBoolean) newValue = !!newValue;
		else if(isNumber) newValue = newValue===void 0 ? 0 : Number(newValue);
		else if(isString) newValue = newValue===null || newValue===void 0 ? '' : ''+newValue;
		let inPropStore = name in propertyStore;
		let oldValue = element[name];
		if(oldValue===newValue && inPropStore) return;
		propertyStore[name] = newValue;
		if(reflectToAttribute){
			if(isBoolean){
				let hasAttribute = element.hasAttribute(name);
				if(!newValue && hasAttribute) element.removeAttribute(name);
				if(newValue && !hasAttribute) element.setAttribute(name,'');
			}
			else if(transformToAttribute){
				let transformedValue = transformToAttribute.apply(element,[newValue]);
				if(transformedValue===null) element.removeAttribute(name);
				else element.setAttribute(name,transformedValue);
			}
			else element.setAttribute(name,newValue);
		}
		this.emitChange(oldValue,newValue);
	}

	emitChange(oldValue,newValue){
		let { element, name, config, onPropertySet, hasObserver, isObserverString, setDescriptors } = this.props;
		if(!this.firstChangeEmitted) this.firstChangeEmitted = true;
		if(onPropertySet || hasObserver || config.notify){
			let detailObj = new propertyChangeDetails(element,name,config,newValue,oldValue);
			if(onPropertySet) onPropertySet.apply(element,[detailObj]);
			if(hasObserver && isObserverString) element[config.observer].apply(element,[detailObj]);
			else if(hasObserver) config.observer.apply(element,[detailObj]);
			if(config.notify) element.dispatchEvent(new CustomEvent(name+'-changed',{ detail:detailObj, bubbles:false }));
		}
		for(let i=0,l=setDescriptors.length; i<l; i++) setDescriptors[i].apply(element,[newValue]);
	}

}

class propertyChangeDetails {

	constructor(element,name,config,newValue,oldValue){
		this.element = element;
		this.name = name;
		this.config = config;
		this.newValue = newValue;
		this.oldValue = oldValue;
	}

}
<|endoftext|>


<commit_before>'use strict';
var React = require('react/addons');

module.exports = r;

// Export the React.DOM html tags
for (var tag in React.DOM) {
  if (React.DOM.hasOwnProperty(tag)) {
    r[tag] = createTagFn(tag);
  }
}

function r(component, properties, children) {
  properties = properties || {};

  // A properties object is optional so shift arguments if missing
  if (!children && isChildren(properties)) {
    children = properties;
    properties = {};
  }

  if (properties.isRendered === false) {
    // React skips the component rendering if render() returns null.
    return null;
  }

  processClasses(properties);

  var args = [component, properties];
  args = args.concat(children);

  return React.createElement.apply(React, args);
}

// Wraps the className property value with React classSet if it's an object.
function processClasses(properties) {
  var className = properties.className;

  if (className && typeof className === 'object') {
    properties.className = React.addons.classSet(className);
  }
}

function createTagFn(tag) {
  return function reactTag(properties, children) {
    return r(tag, properties, children);
  };
}

function isChildren(x) {
  return typeof x === 'string' || Array.isArray(x);
}
<commit_msg>More performant r-dom<commit_after>'use strict';
var React = require('react/addons');

module.exports = r;

// Export the React.DOM html tags
for (var tag in React.DOM) {
  if (React.DOM.hasOwnProperty(tag)) {
    r[tag] = createTagFn(tag);
  }
}

function r(component, properties, children) {
  properties = properties || {};

  // A properties object is optional so shift arguments if missing
  if (!children && isChildren(properties)) {
    children = properties;
    properties = {};
  }

  if (properties.isRendered === false) {
    // React skips the component rendering if render() returns null.
    return null;
  }

  processClasses(properties);

  // Set the children onto the properties to avoid warnings
  // and increase performance
  properties.children = children;

  return React.createElement(component, properties);
}

// Wraps the className property value with React classSet if it's an object.
function processClasses(properties) {
  var className = properties.className;

  if (className && typeof className === 'object') {
    properties.className = React.addons.classSet(className);
  }
}

function createTagFn(tag) {
  return function reactTag(properties, children) {
    return r(tag, properties, children);
  };
}

function isChildren(x) {
  return typeof x === 'string' || Array.isArray(x);
}
<|endoftext|>


<commit_before>var gulp = require('gulp');
var debug = require('gulp-debug');
var del = require('del');

var webserver = require('gulp-webserver');
var watch = require('gulp-watch');
var mainBowerFiles = require('main-bower-files');
var concat = require('gulp-concat');
var bower = require('gulp-bower');
var livereload = require('gulp-livereload');
var cachebreaker = require('gulp-cache-breaker');
var eslint = require('gulp-eslint');
var sass = require('gulp-sass');

module.exports = function(gulp) {

  var config = {
    build_dir: './build/',
    buildCss_dir: './build/styles',
    files: {
      js: {
        app: ['src/**/*.js', '!src/**/*.spec.js'],
        spec: 'src/**/*.spec.js',
        test: [
          'build/vendor-spec.js',
          'build/templates.js',
          'src/**/*.js',
          'src/**/*.spec.js'
        ]
      },
      static_assets: {
        app: [
          'src/assets/**/*'
        ]
      },
      static_files: {
        app: [
          'src/**/*.html',
          '!src/**/*.tpl.html',
          'src/**/*.json'
        ]
      },
      css : {
        app: 'src/**/*.scss'
      }
    }
  };

  gulp.task('webserver', ['angular-build', 'watch'], function() {
    gulp.src('build')
      .pipe(webserver({
        host: '0.0.0.0',
        port: 8000
      }));
  });

  gulp.task('angular-build', [
    'build-vendor', 'build-app-js', 'build-app-static-assets', 'build-app-static-files', 'build-app-sass'
    ], function() {

  });

  gulp.task('angular-build-spec', [
    'build-vendor-spec', 'build-app-js', 'build-app-static-assets', 'build-app-static-files', 'build-app-sass'
    ], function() {

  });

  gulp.task('watch', function() {
    watch(config.files.js.app, {
      verbose: true
    },
    function(vinyl) {
      buildApplicationJavascript();
    });

    watch(config.files.css.app, {
      verbose: true
    },
    function(vinyl) {
      buildApplicationCSS();
    });

    watch(config.files.static_assets.app, {
      verbose: true
    },
    function(vinyl) {
      buildApplicationStaticAssets();
    });

    watch(config.files.static_files.app, {
      verbose: true
    },
    function(vinyl) {
      buildApplicationStaticFiles();
    });

    livereload.listen({
      quiet: true
    });
  });

  function buildApplicationJavascript() {
    var stream = gulp.src(config.files.js.app)
      .pipe(eslint())
      .pipe(eslint.format())
      .pipe(concat('application.js'))
      .pipe(gulp.dest(config.build_dir))
      .pipe(livereload());
    return stream;
  }

  gulp.task('build-app-js', function() {
    return buildApplicationJavascript();
  });

  function buildApplicationStaticFiles () {
    var stream = gulp.src(config.files.static_files.app)
      .pipe(gulp.dest(config.build_dir))
      .pipe(cachebreaker(config.build_dir))
      .pipe(gulp.dest(config.build_dir))
      .pipe(livereload());
    return stream;
  }

  gulp.task('build-app-static-files', function() {
    return buildApplicationStaticFiles();
  });

  function buildApplicationStaticAssets () {
    var stream = gulp.src(config.files.static_assets.app)
      .pipe(gulp.dest(config.build_dir + 'assets/'))
      .pipe(livereload());
    return stream;
  }

  gulp.task('build-app-static-assets', function() {
    return buildApplicationStaticAssets();
  });

  function buildApplicationCSS() {
    var stream = gulp.src(config.files.css.app)
    .pipe(sass({ outputStyle: 'compressed' }))
    .pipe(gulp.dest(config.build_dir))
    .pipe(livereload());
    return stream;
  }

  gulp.task('build-app-sass', function() {
    return buildApplicationCSS();
  });

  gulp.task('build-vendor', function() {
    var stream = gulp.src(mainBowerFiles({filter: '**/*.js'}))
        .pipe(debug({title: 'Vendor Files (JS):'}))
        .pipe(concat('vendor.js'))
        .pipe(gulp.dest(config.build_dir))
        .pipe(livereload());
    return stream;
  });

  gulp.task('build-vendor-css', function() {
    var stream = gulp.src(mainBowerFiles({filter: '**/*.css'}))
        .pipe(debug({title: 'Vendor Files (CSS):'}))
        .pipe(concat('vendor.css'))
        .pipe(gulp.dest(config.buildCss_dir))
        .pipe(livereload());
    return stream;
  });

  gulp.task('build-vendor-spec', function() {
    var stream = gulp.src(mainBowerFiles({includeDev: true}))
      .pipe(debug({title: 'Vendor Files:'}))
      .pipe(concat('vendor-spec.js'))
      .pipe(gulp.dest(config.build_dir))
      .pipe(livereload());
    return stream;
  });

  gulp.task('bower', function() {
    bower();
  });

  gulp.task('clean', function(cb) {
    del([config.build_dir], cb);
  });

  return {
    livereload: livereload
  }
};
<commit_msg>adding vendor css to master<commit_after>var gulp = require('gulp');
var debug = require('gulp-debug');
var del = require('del');

var webserver = require('gulp-webserver');
var watch = require('gulp-watch');
var mainBowerFiles = require('main-bower-files');
var concat = require('gulp-concat');
var bower = require('gulp-bower');
var livereload = require('gulp-livereload');
var cachebreaker = require('gulp-cache-breaker');
var eslint = require('gulp-eslint');
var sass = require('gulp-sass');

module.exports = function(gulp) {

  var config = {
    build_dir: './build/',
    buildCss_dir: './build/styles',
    files: {
      js: {
        app: ['src/**/*.js', '!src/**/*.spec.js'],
        spec: 'src/**/*.spec.js',
        test: [
          'build/vendor-spec.js',
          'build/templates.js',
          'src/**/*.js',
          'src/**/*.spec.js'
        ]
      },
      static_assets: {
        app: [
          'src/assets/**/*'
        ]
      },
      static_files: {
        app: [
          'src/**/*.html',
          '!src/**/*.tpl.html',
          'src/**/*.json'
        ]
      },
      css : {
        app: 'src/**/*.scss'
      }
    }
  };

  gulp.task('webserver', ['angular-build', 'watch'], function() {
    gulp.src('build')
      .pipe(webserver({
        host: '0.0.0.0',
        port: 8000
      }));
  });

  gulp.task('angular-build', [
    'build-vendor', 'build-app-js', 'build-app-static-assets', 'build-app-static-files', 'build-app-sass', 'build-vendor-css'
    ], function() {

  });

  gulp.task('angular-build-spec', [
    'build-vendor-spec', 'build-app-js', 'build-app-static-assets', 'build-app-static-files', 'build-app-sass'
    ], function() {

  });

  gulp.task('watch', function() {
    watch(config.files.js.app, {
      verbose: true
    },
    function(vinyl) {
      buildApplicationJavascript();
    });

    watch(config.files.css.app, {
      verbose: true
    },
    function(vinyl) {
      buildApplicationCSS();
    });

    watch(config.files.static_assets.app, {
      verbose: true
    },
    function(vinyl) {
      buildApplicationStaticAssets();
    });

    watch(config.files.static_files.app, {
      verbose: true
    },
    function(vinyl) {
      buildApplicationStaticFiles();
    });

    livereload.listen({
      quiet: true
    });
  });

  function buildApplicationJavascript() {
    var stream = gulp.src(config.files.js.app)
      .pipe(eslint())
      .pipe(eslint.format())
      .pipe(concat('application.js'))
      .pipe(gulp.dest(config.build_dir))
      .pipe(livereload());
    return stream;
  }

  gulp.task('build-app-js', function() {
    return buildApplicationJavascript();
  });

  function buildApplicationStaticFiles () {
    var stream = gulp.src(config.files.static_files.app)
      .pipe(gulp.dest(config.build_dir))
      .pipe(cachebreaker(config.build_dir))
      .pipe(gulp.dest(config.build_dir))
      .pipe(livereload());
    return stream;
  }

  gulp.task('build-app-static-files', function() {
    return buildApplicationStaticFiles();
  });

  function buildApplicationStaticAssets () {
    var stream = gulp.src(config.files.static_assets.app)
      .pipe(gulp.dest(config.build_dir + 'assets/'))
      .pipe(livereload());
    return stream;
  }

  gulp.task('build-app-static-assets', function() {
    return buildApplicationStaticAssets();
  });

  function buildApplicationCSS() {
    var stream = gulp.src(config.files.css.app)
    .pipe(sass({ outputStyle: 'compressed' }))
    .pipe(gulp.dest(config.build_dir))
    .pipe(livereload());
    return stream;
  }

  gulp.task('build-app-sass', function() {
    return buildApplicationCSS();
  });

  gulp.task('build-vendor', function() {
    var stream = gulp.src(mainBowerFiles({filter: '**/*.js'}))
        .pipe(debug({title: 'Vendor Files (JS):'}))
        .pipe(concat('vendor.js'))
        .pipe(gulp.dest(config.build_dir))
        .pipe(livereload());
    return stream;
  });

  gulp.task('build-vendor-css', function() {
    var stream = gulp.src(mainBowerFiles({filter: '**/*.css'}))
        .pipe(debug({title: 'Vendor Files (CSS):'}))
        .pipe(concat('vendor.css'))
        .pipe(gulp.dest(config.buildCss_dir))
        .pipe(livereload());
    return stream;
  });

  gulp.task('build-vendor-spec', function() {
    var stream = gulp.src(mainBowerFiles({includeDev: true}))
      .pipe(debug({title: 'Vendor Files:'}))
      .pipe(concat('vendor-spec.js'))
      .pipe(gulp.dest(config.build_dir))
      .pipe(livereload());
    return stream;
  });

  gulp.task('bower', function() {
    bower();
  });

  gulp.task('clean', function(cb) {
    del([config.build_dir], cb);
  });

  return {
    livereload: livereload
  }
};
<|endoftext|>


<commit_before>var express = require('express'),
    cors = require('cors'),
    webcommand = require('webcommand'),
    parseUrl = require('webcommand').parseUrl,
    generateUrl = require('webcommand').generateUrl,
    stream = require('event-stream');
var request = require('request');

module.exports = createServer;

function createServer(cmdList){
    var webCommand = webcommand(cmdList);
    var app = express();
    app.use(cors());
    app.get('/getCommands', cors(), function(req,res) {
        res.json(webCommand.getCommandList());
    });

    app.post('/*', function(req,res){
        var wc = parseUrl(req.url),
            cStream= stream.through();
        cStream.on('error', function(err) {
            var ret = { error : err.name, message : err.message, stack : err.stack };
            if (err.name == 'COMMAND_NOT_ALLOWED') res.status(403, ret);
            else if (err.name == 'COMMAND_NOT_FOUND') res.status(501, ret);
            else if (err.name == 'COMMAND_EXITED_ABNORMALLY') res.status(400, ret);
            else res.status(500, ret);
        });
        if(wc.pipes){
            var curPipe = wc.pipes.shift(),
                purl = generateUrl({
                base : curPipe.base,
                cmd : curPipe.cmd,
                args : curPipe.args,
                pipes : wc.pipes
            });
            var iStream= stream.through();
            iStream.pipe(request.post(purl)).pipe(res);
            webCommand.webCommand(wc.cmd,wc.args, req, iStream, cStream);
        }
        else{
            webCommand.webCommand(wc.cmd,wc.args, req, res, cStream);
        }
    });
    return app;
}
<commit_msg>added error outputs<commit_after>var express = require('express'),
    cors = require('cors'),
    webcommand = require('webcommand'),
    parseUrl = require('webcommand').parseUrl,
    generateUrl = require('webcommand').generateUrl,
    stream = require('event-stream');
var request = require('request');

module.exports = createServer;

function createServer(cmdList){
    var webCommand = webcommand(cmdList);
    var app = express();
    app.use(cors());
    app.get('/getCommands', cors(), function(req,res) {
        res.json(webCommand.getCommandList());
    });

    app.post('/*', function(req,res){
        var wc = parseUrl(req.url),
            cStream= stream.through();
        cStream.on('error', function(err) {
            console.log('ERROR : ', err.name);
            console.log(err.message);
            var ret = { error : err.name, message : err.message, stack : err.stack };
            if (err.name == 'COMMAND_NOT_ALLOWED') res.status(403, ret);
            else if (err.name == 'COMMAND_NOT_FOUND') res.status(501, ret);
            else if (err.name == 'COMMAND_EXITED_ABNORMALLY') res.status(400, ret);
            else res.status(500, ret);
        });
        if(wc.pipes){
            var curPipe = wc.pipes.shift(),
                purl = generateUrl({
                base : curPipe.base,
                cmd : curPipe.cmd,
                args : curPipe.args,
                pipes : wc.pipes
            });
            var iStream= stream.through();
            iStream.pipe(require('through-logged')()).pipe(request.post(purl)).pipe(res);
            webCommand.webCommand(wc.cmd,wc.args, req, iStream, cStream);
        }
        else{
            webCommand.webCommand(wc.cmd,wc.args, req, res, cStream);
        }
    });
    return app;
}
<|endoftext|>