conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
=======
postcss: function (webpack) {
return [
precss,
autoprefixer,
];
},
>>>>>>> |
<<<<<<<
// if it's overlay player controls should not be disabled
if( adSlot.type !== 'overlay' ) {
_this.embedPlayer.triggerHelper("onDisableInterfaceComponents");
}
=======
var excludedComponents = [];
// playPauseBtn won't be disabled if enableControlsDuringAd set to true
if ( mw.getConfig('enableControlsDuringAd') ) {
excludedComponents = ['playPauseBtn'];
}
_this.embedPlayer.triggerHelper( "onDisableInterfaceComponents", [excludedComponents] );
>>>>>>>
// if it's overlay player controls should not be disabled
if( adSlot.type !== 'overlay' ) {
_this.embedPlayer.triggerHelper("onDisableInterfaceComponents");
}
var excludedComponents = [];
// playPauseBtn won't be disabled if enableControlsDuringAd set to true
if ( mw.getConfig('enableControlsDuringAd') ) {
excludedComponents = ['playPauseBtn'];
}
_this.embedPlayer.triggerHelper( "onDisableInterfaceComponents", [excludedComponents] ); |
<<<<<<<
firstPlayRequestTime: null,
=======
onPlayStatus: false,
>>>>>>>
onPlayStatus: false,
firstPlayRequestTime: null,
<<<<<<<
_this.currentBitRate = -1;
_this.currentflavorId = -1;
_this.dvr = false;
_this.monitorViewEvents = true;
=======
_this.onPlayStatus = false;
>>>>>>>
_this.currentBitRate = -1;
_this.currentflavorId = -1;
_this.dvr = false;
_this.monitorViewEvents = true;
_this.onPlayStatus = false; |
<<<<<<<
const { keyword } = parse(window.location.search.substr(1));
return dispatch(
replace(`/salon?keyword=${keyword}&page=${page - 1}&more=true`)
);
=======
const keyword = parse(window.location.search.substr(1)).keyword;
return dispatch(replace(`/salon?keyword=${keyword}&page=${page - 1}&more=true`));
>>>>>>>
const { keyword } = parse(window.location.search.substr(1));
return dispatch(replace(`/salon?keyword=${keyword}&page=${page - 1}&more=true`));
<<<<<<<
const { keyword } = parse(window.location.search.substr(1));
return dispatch(
replace(`/salon?keyword=${keyword}&page=${page + 1}&more=true`)
);
=======
const keyword = parse(window.location.search.substr(1)).keyword;
return dispatch(replace(`/salon?keyword=${keyword}&page=${page + 1}&more=true`));
>>>>>>>
const { keyword } = parse(window.location.search.substr(1));
return dispatch(replace(`/salon?keyword=${keyword}&page=${page + 1}&more=true`)); |
<<<<<<<
// trigger another onplay
=======
>>>>>>>
// trigger another onplay
<<<<<<<
// Setup a sequence timeline set:
var sequenceProxy = {};
// Get the sequence ad set
_this.embedPlayer.triggerHelper( 'AdSupport_' + slotType, [ sequenceProxy ] );
=======
// Setup a sequence timeline set:
var sequenceProxy = _this.getSequenceProxy( slotType );
>>>>>>>
// Setup a sequence timeline set:
var sequenceProxy = _this.getSequenceProxy( slotType ); |
<<<<<<<
if (this.seeking){
this.log("Play while seeking, will play after seek!");
this.stopAfterSeek = false;
return false;
}
if (this.currentState == "end") {
// prevent getting another clipdone event on replay
this.seek(0.01, false);
}
=======
>>>>>>>
if (this.seeking){
this.log("Play while seeking, will play after seek!");
this.stopAfterSeek = false;
return false;
} |
<<<<<<<
var processUrl = context_path+"/login";
=======
var updateInfoUrl = context_path+"/uniauth/userinfo";
var verifyProcessUrl = context_path+"/uniauth/verification";
// define constant
var showSuccessTag = "success";
var showFailTag = "fail";
>>>>>>>
var updateInfoUrl = context_path+"/uniauth/userinfo";
var verifyProcessUrl = context_path+"/uniauth/verification";
// define constant
var showSuccessTag = "success";
var showFailTag = "fail";
<<<<<<<
//修改编辑信息相关按钮的状态
window.change_edit_btn_state = function(show_edit){
if(show_edit){
//显示编辑框
$('.common-wizard .form-group input[type="text"]').removeAttr("disabled");
//显示确定和取消按钮
$('.common-wizard .form-group .myedit').removeClass('hiddenbtn');
$('.common-wizard .form-group .mynoedit').addClass('hiddenbtn');
=======
// ready show update email modal
var to_update_email = function(){
$('#update_email_captcha').val('');
$('#update_email_warninfo').val('');
$('#modal-new-email').modal('show');
}
// get email verify code
var update_email_get_captcha = function(){
if (!update_email_new_email_check()) {
$('#update_email_warninfo').html($.i18n.prop('frontpage.userinfo.edit.update.invalid.email'));
return;
}
var data = {
identity : $('#update_email_new_email').val()
};
$.ajax({
type : "POST",
url : verifyProcessUrl+'/send',
data : data,
dataType : 'json',
success : function(data) {
if(data.info) {
$('#update_email_warninfo').html(data.info[0].msg);
} else {
// success
var count_btn = $('#get_email_captcha');
countBtn(count_btn, function(new_label){
count_btn.html(new_label)
},function(){
return count_btn.html();
}, 120);
}
},error: function(jqXHR, textStatus, errorMsg){
logOperation.error(errorMsg);
}
});
}
// confirm
var update_email_to_check_verifycode = function () {
// check verification
var data = {
identity : $('#update_email_new_email').val(),
verifyCode: $('#update_email_captcha').val()
};
$.ajax({
type : "POST",
url : verifyProcessUrl+'/verify',
data : data,
dataType : 'json',
success : function(data) {
if(data.info) {
$('#update_email_warninfo').html(data.info[0].msg);
} else {
// success, submit update
update_email_confirm();
}
},error: function(jqXHR, textStatus, errorMsg){
logOperation.error(errorMsg);
}
});
}
// update email confirm
var update_email_confirm = function() {
var data = {
email: $('#update_email_new_email').val()
};
$.ajax({
type : "POST",
url : updateInfoUrl+'/email',
data : data,
dataType : 'json',
success : function(data) {
if(data.info) {
$('#update_email_warninfo').html(data.info[0].msg);
} else {
// success
$('#modal-new-email').modal('hide');
$('#email_label').html($('#update_email_new_email').val());
infonotice(showSuccessTag, $.i18n.prop('frontpage.userinfo.edit.update.email.success'));
autoLogout();
}
},error: function(jqXHR, textStatus, errorMsg){
logOperation.error(errorMsg);
}
});
}
// update phone
function isPhoneNumber(number){
var filter = /^((13[0-9])|(15[^4])|(18[0-9])|(17[0-8])|(147))\d{8}$/;
return filter.test(number);
}
var update_phone_new_phone_check = function(){
var new_phone = $('#update_phone_new_phone').val();
if (isPhoneNumber(new_phone)) {
$('#update_phone_btn_confirm').removeAttr("disabled","disabled");
return true;
} else {
$('#update_phone_btn_confirm').attr("disabled","disabled");
return false;
}
}
var update_phone_verify_btn_process = function(){
var verifyCode = $('#update_phone_captcha').val();
var stepbtn = $('#update_phone_btn_confirm');
if(verifyCode && update_phone_new_phone_check()) {
stepbtn.removeAttr("disabled","disabled");
>>>>>>>
// ready show update email modal
var to_update_email = function(){
$('#update_email_captcha').val('');
$('#update_email_warninfo').val('');
$('#modal-new-email').modal('show');
}
// get email verify code
var update_email_get_captcha = function(){
if (!update_email_new_email_check()) {
$('#update_email_warninfo').html($.i18n.prop('frontpage.userinfo.edit.update.invalid.email'));
return;
}
var data = {
identity : $('#update_email_new_email').val()
};
$.ajax({
type : "POST",
url : verifyProcessUrl+'/send',
data : data,
dataType : 'json',
success : function(data) {
if(data.info) {
$('#update_email_warninfo').html(data.info[0].msg);
} else {
// success
var count_btn = $('#get_email_captcha');
countBtn(count_btn, function(new_label){
count_btn.html(new_label)
},function(){
return count_btn.html();
}, 120);
}
},error: function(jqXHR, textStatus, errorMsg){
logOperation.error(errorMsg);
}
});
}
// confirm
var update_email_to_check_verifycode = function () {
// check verification
var data = {
identity : $('#update_email_new_email').val(),
verifyCode: $('#update_email_captcha').val()
};
$.ajax({
type : "POST",
url : verifyProcessUrl+'/verify',
data : data,
dataType : 'json',
success : function(data) {
if(data.info) {
$('#update_email_warninfo').html(data.info[0].msg);
} else {
// success, submit update
update_email_confirm();
}
},error: function(jqXHR, textStatus, errorMsg){
logOperation.error(errorMsg);
}
});
}
// update email confirm
var update_email_confirm = function() {
var data = {
email: $('#update_email_new_email').val()
};
$.ajax({
type : "POST",
url : updateInfoUrl+'/email',
data : data,
dataType : 'json',
success : function(data) {
if(data.info) {
$('#update_email_warninfo').html(data.info[0].msg);
} else {
// success
$('#modal-new-email').modal('hide');
$('#email_label').html($('#update_email_new_email').val());
infonotice(showSuccessTag, $.i18n.prop('frontpage.userinfo.edit.update.email.success'));
autoLogout();
}
},error: function(jqXHR, textStatus, errorMsg){
logOperation.error(errorMsg);
}
});
}
// update phone
function isPhoneNumber(number){
var filter = /^((13[0-9])|(15[^4])|(18[0-9])|(17[0-8])|(147))\d{8}$/;
return filter.test(number);
}
var update_phone_new_phone_check = function(){
var new_phone = $('#update_phone_new_phone').val();
if (isPhoneNumber(new_phone)) {
return true;
} else {
return false;
}
}
var update_phone_verify_btn_process = function(){
var verifyCode = $('#update_phone_captcha').val();
var stepbtn = $('#update_phone_btn_confirm');
if(verifyCode && update_phone_new_phone_check()) {
stepbtn.removeAttr("disabled","disabled");
<<<<<<<
//用于控制展示提示框的展示 闭包
var notice_div_state_info = {
// 1 没显示 2 显示
show_state : "1",
//当前显示的提示级别
current_warn_class : '',
//信息长度管理相关class
info_length_class : '',
//定义常量 少量信息的字符串长度
bg_info_length:9,
//定义提示信息显示的时长 毫秒
notice_show_milles : 2000,
//设置settimeout返回的handle
notice_settimeout_handle : '',
//函数 是否在显示
isShowState : function() {
if(this.show_state == '1'){
return false;
}
return true;
},
setShowState : function(isshow, warn_class, length_class) {
this.current_warn_class = warn_class;
this.info_length_class = length_class;
if(isshow){
this.show_state = '2';
} else {
//清空样式
this.show_state = '1';
}
}
};
//进行settimeout的显示处理 所有的setTimeout都走这里
window.process_notice_div_handle = function(){
var currentTimeout = notice_div_state_info.notice_settimeout_handle;
//有一个事件 先取消掉
if(currentTimeout){
clearTimeout(currentTimeout);
}
//重新设置显示事件
var newTimeoutHandle = setTimeout("window.infonotice_close()", notice_div_state_info.notice_show_milles);
//重新赋值
notice_div_state_info.notice_settimeout_handle = newTimeoutHandle;
}
=======
>>>>>>> |
<<<<<<<
function onSyncComplete(projectInfo, awsDetails, backendProject, enabledFeatures, syncToDevFlag, callback){
updateAWSExportFile(projectInfo, awsDetails, ()=>{
console.log('contents in #current-backend-info/ is synchronized with the latest in the aws cloud')
if(syncToDevFlag > 1){
syncAllToDev(projectInfo, backendProject, enabledFeatures)
if(callback){
callback()
=======
function onSyncComplete(projectInfo, backendProject, enabledFeatures, syncToDevFlag, callback){
if(!syncToDevFlag){
syncToDevFlag = 0
}
console.log('contents in #current-backend-info/ is synchronized with the latest in the aws cloud')
if(syncToDevFlag > 1){
syncAllToDev(projectInfo, backendProject, enabledFeatures)
if(callback){
callback()
}
}else if(syncToDevFlag == 1){
syncOnlySpecToDev(projectInfo, backendProject, enabledFeatures)
if(callback){
callback()
}
}else if(syncToDevFlag == 0){
let message = 'sync corresponding contents in backend/ with #current-backend-info/'
inquirer.prompt([
{
type: 'confirm',
name: 'syncToDevBackend',
message: message,
default: false
}
]).then(function (answers) {
if(answers.syncToDevBackend){
syncAllToDev(projectInfo, backendProject, enabledFeatures)
>>>>>>>
function onSyncComplete(projectInfo, awsDetails, backendProject, enabledFeatures, syncToDevFlag, callback){
updateAWSExportFile(projectInfo, awsDetails, ()=>{
console.log('contents in #current-backend-info/ is synchronized with the latest in the aws cloud')
if(!syncToDevFlag){
syncToDevFlag = 0
}
if(syncToDevFlag > 1){
syncAllToDev(projectInfo, backendProject, enabledFeatures)
if(callback){
callback() |
<<<<<<<
var sanitizationRegexes = [[/\s/, "_"], [/[&+()]/, "-"], [/[=?!'"{}\[\]#<>%]/, ""]]
$.cms = {
sanitizeFileName: function(s) {
var split = s.split(/\/|\\/)
s = split[split.length-1]
$.each(sanitizationRegexes, function(i,e){
var r = new RegExp(e[0].source, 'g')
s = s.replace(r, e[1])
})
return s;
},
slug: function(s) {
return $.trim(s.toLowerCase().replace(/[^a-zA-Z0-9_\s]+/g, '')).replace(/\ +/g, '-')
},
showNotice: function(msg) {
$('#message').removeClass('error').addClass('notice').html(msg).parent().show().animate({opacity: 1.0}, 3000).fadeOut("normal")
},
showError: function(msg) {
$('#message').removeClass('notice').addClass('error').html(msg).parent().show().animate({opacity: 1.0}, 3000).fadeOut("normal")
},
attachEventHandlers: function(context) {
$('a.button', context).click(function(){if($(this).hasClass('disabled')) return false;});
$('a.http_post, a.http_put, a.http_delete', context).click(function() {
if($(this).hasClass('disabled')) return false;
if($(this).hasClass('confirm_with_title') ? confirm(this.title) : true) {
// Create the form
var f = document.createElement('form')
f.style.display = 'none'
this.parentNode.appendChild(f)
f.method = "POST"
f.action = this.href
$(f).attr('target', $(this).attr('target'))
//Create the _method hidden input
var m = document.createElement('input')
var http_method = $(this).attr('class').match(/http_([^ ]*)/)[1]
$(m).attr('type', 'hidden').attr('name', '_method').attr('value', http_method)
f.appendChild(m)
//Create the authenticity_token hidden input
if($.cms.authenticity_token && $.cms.authenticity_token != '') {
var m = document.createElement('input')
$(m).attr('type', 'hidden').attr('name', 'authenticity_token').attr('value', $.cms.authenticity_token)
f.appendChild(m)
}
f.submit()
=======
var sanitizationRegexes = [
[/\s/, "_"],
[/[&+()]/, "-"],
[/[=?!'"{}\[\]#<>%]/, ""]
]
$.cms = {
sanitizeFileName: function(s) {
var split = s.split(/\/|\\/)
s = split[split.length - 1]
$.each(sanitizationRegexes, function(i, e) {
var r = new RegExp(e[0].source, 'g')
s = s.replace(r, e[1])
})
return s;
},
slug: function(s) {
return $.trim(s.toLowerCase().replace(/\W+/g, ' ')).replace(/\ +/g, '-')
},
showNotice: function(msg) {
$('#message').removeClass('error').addClass('notice').html(msg).parent().show().animate({opacity: 1.0}, 3000).fadeOut("normal")
},
showError: function(msg) {
$('#message').removeClass('notice').addClass('error').html(msg).parent().show().animate({opacity: 1.0}, 3000).fadeOut("normal")
},
attachEventHandlers: function(context) {
$('a.button', context).click(function() {
if ($(this).hasClass('disabled')) return false;
});
$('a.http_post, a.http_put, a.http_delete', context).click(function() {
if ($(this).hasClass('disabled')) return false;
if ($(this).hasClass('confirm_with_title') ? confirm(this.title) : true) {
// Create the form
var f = document.createElement('form')
f.style.display = 'none'
this.parentNode.appendChild(f)
f.method = "POST"
f.action = this.href
$(f).attr('target', $(this).attr('target'))
//Create the _method hidden input
var m = document.createElement('input')
var http_method = $(this).attr('class').match(/http_([^ ]*)/)[1]
$(m).attr('type', 'hidden').attr('name', '_method').attr('value', http_method)
f.appendChild(m)
//Create the authenticity_token hidden input
if ($.cms.authenticity_token && $.cms.authenticity_token != '') {
var m = document.createElement('input')
$(m).attr('type', 'hidden').attr('name', 'authenticity_token').attr('value', $.cms.authenticity_token)
f.appendChild(m)
}
f.submit()
}
return false
})
>>>>>>>
var sanitizationRegexes = [
[/\s/, "_"],
[/[&+()]/, "-"],
[/[=?!'"{}\[\]#<>%]/, ""]
]
$.cms = {
sanitizeFileName: function(s) {
var split = s.split(/\/|\\/)
s = split[split.length - 1]
$.each(sanitizationRegexes, function(i, e) {
var r = new RegExp(e[0].source, 'g')
s = s.replace(r, e[1])
})
return s;
},
slug: function(s) {
return $.trim(s.toLowerCase().replace(/[^a-zA-Z0-9_\s]+/g, '')).replace(/\ +/g, '-')
},
showNotice: function(msg) {
$('#message').removeClass('error').addClass('notice').html(msg).parent().show().animate({opacity: 1.0}, 3000).fadeOut("normal")
},
showError: function(msg) {
$('#message').removeClass('notice').addClass('error').html(msg).parent().show().animate({opacity: 1.0}, 3000).fadeOut("normal")
},
attachEventHandlers: function(context) {
$('a.button', context).click(function() {
if ($(this).hasClass('disabled')) return false;
});
$('a.http_post, a.http_put, a.http_delete', context).click(function() {
if ($(this).hasClass('disabled')) return false;
if ($(this).hasClass('confirm_with_title') ? confirm(this.title) : true) {
// Create the form
var f = document.createElement('form')
f.style.display = 'none'
this.parentNode.appendChild(f)
f.method = "POST"
f.action = this.href
$(f).attr('target', $(this).attr('target'))
//Create the _method hidden input
var m = document.createElement('input')
var http_method = $(this).attr('class').match(/http_([^ ]*)/)[1]
$(m).attr('type', 'hidden').attr('name', '_method').attr('value', http_method)
f.appendChild(m)
//Create the authenticity_token hidden input
if ($.cms.authenticity_token && $.cms.authenticity_token != '') {
var m = document.createElement('input')
$(m).attr('type', 'hidden').attr('name', 'authenticity_token').attr('value', $.cms.authenticity_token)
f.appendChild(m)
}
f.submit()
}
return false
}) |
<<<<<<<
/* ng-infinite-scroll - v1.0.0 - 2014-03-27 */
=======
/* ng-infinite-scroll - v1.0.0 - 2013-10-22 */
>>>>>>>
/* ng-infinite-scroll - v1.0.0 - 2014-03-27 */
<<<<<<<
var containerBottom, elementBottom, remaining, shouldScroll;
if (container === $window) {
containerBottom = container.height() + container.scrollTop();
elementBottom = elem.offset().top + elem.height();
} else {
containerBottom = container.height();
elementBottom = elem.offset().top - container.offset().top + elem.height();
}
remaining = elementBottom - containerBottom;
shouldScroll = remaining <= container.height() * scrollDistance;
=======
var elementBottom, remaining, shouldScroll, windowBottom;
windowBottom = $window.height() + $window.scrollTop();
elementBottom = elem.offset().top + elem.height();
remaining = elementBottom - windowBottom;
shouldScroll = remaining <= $window.height() * scrollDistance + 1;
>>>>>>>
var containerBottom, elementBottom, remaining, shouldScroll;
if (container === $window) {
containerBottom = container.height() + container.scrollTop();
elementBottom = elem.offset().top + elem.height();
} else {
containerBottom = container.height();
elementBottom = elem.offset().top - container.offset().top + elem.height();
}
remaining = elementBottom - containerBottom;
shouldScroll = remaining <= container.height() * scrollDistance + 1; |
<<<<<<<
const Container = styled.div`
display: flex;
flex-direction: column;
flex: 1 0 20%;
margin: 1rem;
min-width: 280px;
max-width: 23%;
@media (max-width: 1280px) {
max-width: 31%;
}
@media (max-width: ${(props) => props.theme.breakpoints.l}) {
max-width: 46%;
}
@media (max-width: ${(props) => props.theme.breakpoints.m}) {
max-width: 100%;
}
box-shadow: 0px 14px 66px rgba(0, 0, 0, 0.07);
border-radius: 4px;
background: ${(props) => props.theme.colors.searchBackground};
&:hover {
transition: transform 0.1s;
transform: scale(1.02);
}
`
const Card = styled.div`
width: 100%;
=======
const Card = styled(Link)`
>>>>>>>
const Container = styled.div`
display: flex;
flex-direction: column;
flex: 1 0 20%;
margin: 1rem;
min-width: 280px;
max-width: 23%;
@media (max-width: 1280px) {
max-width: 31%;
}
@media (max-width: ${(props) => props.theme.breakpoints.l}) {
max-width: 46%;
}
@media (max-width: ${(props) => props.theme.breakpoints.m}) {
max-width: 100%;
}
box-shadow: 0px 14px 66px rgba(0, 0, 0, 0.07);
border-radius: 4px;
background: ${(props) => props.theme.colors.searchBackground};
&:hover {
transition: transform 0.1s;
transform: scale(1.02);
}
`
const Card = styled.div`
width: 100%;
<<<<<<<
const SubjectContainer = styled.div`
margin-top: 1.25rem;
`
const SubjectPill = styled.div`
text-align: center;
padding: 0 0.5rem;
margin: 0 0.75rem 0.5rem 0;
color: ${(props) => props.theme.colors.black300};
float: left;
background: ${({ theme, subject }) => {
switch (subject) {
case "Solidity":
return theme.colors.tagYellow
case "Vyper":
return theme.colors.tagBlue
case "web3":
return theme.colors.tagTurqouise
case "JavaScript":
return theme.colors.tagRed
case "TypeScript":
return theme.colors.tagBlue
case "Go":
return theme.colors.tagTurqouise
case "Python":
return theme.colors.tagMint
case "Rust":
return theme.colors.tagOrange
case "C#":
return theme.colors.tagBlue
case "Java":
return theme.colors.tagPink
default:
return theme.colors.tagGray
}
}};
font-size: ${(props) => props.theme.fontSizes.xs};
border: 1px solid ${(props) => props.theme.colors.lightBorder};
border-radius: 4px;
`
const StyledButtonLink = styled(ButtonLink)`
margin: 1rem;
`
=======
const Children = styled.div`
margin-top: 1rem;
`
>>>>>>>
const SubjectContainer = styled.div`
margin-top: 1.25rem;
`
const SubjectPill = styled.div`
text-align: center;
padding: 0 0.5rem;
margin: 0 0.75rem 0.5rem 0;
color: ${(props) => props.theme.colors.black300};
float: left;
background: ${({ theme, subject }) => {
switch (subject) {
case "Solidity":
return theme.colors.tagYellow
case "Vyper":
return theme.colors.tagBlue
case "web3":
return theme.colors.tagTurqouise
case "JavaScript":
return theme.colors.tagRed
case "TypeScript":
return theme.colors.tagBlue
case "Go":
return theme.colors.tagTurqouise
case "Python":
return theme.colors.tagMint
case "Rust":
return theme.colors.tagOrange
case "C#":
return theme.colors.tagBlue
case "Java":
return theme.colors.tagPink
default:
return theme.colors.tagGray
}
}};
font-size: ${(props) => props.theme.fontSizes.xs};
border: 1px solid ${(props) => props.theme.colors.lightBorder};
border-radius: 4px;
`
const StyledButtonLink = styled(ButtonLink)`
margin: 1rem;
`
const Children = styled.div`
margin-top: 1rem;
`
<<<<<<<
<Container>
<Card>
<ImageWrapper background={background}>
<Image fixed={image} alt={`${name} logo`} />
</ImageWrapper>
<Content className="hover">
{gitHubRepo && <GitStars gitHubRepo={gitHubRepo} />}
<Title gitHidden={!gitHubRepo}>{name}</Title>
<Description>{description}</Description>
{children}
<SubjectContainer>
{subjects &&
subjects.map((subject, idx) => (
<SubjectPill key={idx} subject={subject}>
{subject}
</SubjectPill>
))}
{gitHubRepo &&
gitHubRepo.languages.nodes.map(({ name }, idx) => (
<SubjectPill key={idx} subject={name}>
{name.toUpperCase()}
</SubjectPill>
))}
</SubjectContainer>
</Content>
<StyledButtonLink to={url} hideArrow={true}>
Open {name}
</StyledButtonLink>
</Card>
</Container>
=======
<Card to={url} hideArrow={true}>
<ImageWrapper background={background}>
<Image fixed={image} alt={`${name} logo`} />
</ImageWrapper>
<Content>
<div>
<Title>{name}</Title>
<Description>{description}</Description>
</div>
{children && <Children>{children}</Children>}
</Content>
</Card>
>>>>>>>
<Container>
<Card>
<ImageWrapper background={background}>
<Image fixed={image} alt={`${name} logo`} />
</ImageWrapper>
<Content className="hover">
{gitHubRepo && <GitStars gitHubRepo={gitHubRepo} />}
<div>
<Title gitHidden={!gitHubRepo}>{name}</Title>
<Description>{description}</Description>
</div>
{children && <Children>{children}</Children>}
<SubjectContainer>
{subjects &&
subjects.map((subject, idx) => (
<SubjectPill key={idx} subject={subject}>
{subject}
</SubjectPill>
))}
{gitHubRepo &&
gitHubRepo.languages.nodes.map(({ name }, idx) => (
<SubjectPill key={idx} subject={name}>
{name.toUpperCase()}
</SubjectPill>
))}
</SubjectContainer>
</Content>
<StyledButtonLink to={url} hideArrow={true}>
Open {name}
</StyledButtonLink>
</Card>
</Container> |
<<<<<<<
}) => (
<StyledCard className={className}>
<Image fluid={image} alt={alt} maxImageWidth={maxImageWidth} />
<Content>
<h2>{title}</h2>
<Description>{description}</Description>
{children}
</Content>
</StyledCard>
)
=======
}) => {
return (
<StyledCard className={className}>
<Image fluid={image} alt={alt} maxImageWidth={maxImageWidth} />
<Content>
<H2>{title}</H2>
<Description>{description}</Description>
{children}
</Content>
</StyledCard>
)
}
>>>>>>>
}) => (
<StyledCard className={className}>
<Image fluid={image} alt={alt} maxImageWidth={maxImageWidth} />
<Content>
<H2>{title}</H2>
<Description>{description}</Description>
{children}
</Content>
</StyledCard>
) |
<<<<<<<
<FullWidthContainer>
<h2 id="explore">
=======
<FullWidthContainer ref={explore}>
<H2 id="explore">
>>>>>>>
<FullWidthContainer ref={explore}>
<h2 id="explore"> |
<<<<<<<
DocLink,
=======
ExpandableCard,
CardContainer,
>>>>>>>
DocLink,
ExpandableCard,
CardContainer, |
<<<<<<<
if (req.hostname == 'pew-tube.herokuapp.com') {
return res.redirect(`https://pew.tube${req.path}`);
}
=======
if (req.hostname == 'nodetube-1.herokuapp.com') {
return res.redirect('https://nodetube.live' + req.path);
};
>>>>>>>
if (req.hostname == 'nodetube-1.herokuapp.com') {
return res.redirect('https://nodetube.live' + req.path);
} |
<<<<<<<
this.options[0] = path.join(this.sourceDir, this.options[0]);
}
this.log = fs.createWriteStream(this.logFile, { flags: 'a+', encoding: 'utf8', mode: '0666' });
// If we should log stdout, open a file buffer
if (this.outFile) {
this.stdout = fs.createWriteStream(this.outFile, { flags: 'a+', encoding: 'utf8', mode: '0666' });
}
// If we should log stderr, open a file buffer
if (this.errFile) {
this.stderr = fs.createWriteStream(this.errFile, { flags: 'a+', encoding: 'utf8', mode: '0666' });
=======
this.args[0] = path.join(this.sourceDir, this.args[0]);
>>>>>>>
this.args[0] = path.join(this.sourceDir, this.args[0]);
<<<<<<<
// Hook all stream data and process it
function listenTo(stream) {
function ldata(data) {
self.log.write(data);
if (!self.silent && !self[stream]) {
//
// If we haven't been silenced, and we don't have a file stream
// to output to write to the process stdout stream
//
process.stdout.write(data);
}
else if (self[stream]) {
//
// If we have been given an output file for the stream, write to it
//
self[stream].write(data);
}
self.emit(stream, data);
}
child[stream].on('data', ldata);
child.on('exit', function () {
child[stream].removeListener('data', ldata);
});
}
// Listen to stdout and stderr
listenTo('stdout');
listenTo('stderr');
=======
>>>>>>>
<<<<<<<
//
// If had to write to an stdout file, close it
//
if (self.stdout) {
self.stdout.end();
}
//
// If had to write to an stderr file, close it
//
if (self.stderr) {
self.stderr.end();
}
self.log.end();
=======
>>>>>>> |
<<<<<<<
if(process.env.SHOW_LOG_LOCATION == 'true' || 1 == 2){
/** Code to find errant console logs **/
['log', 'warn', 'error'].forEach(function(method) {
var old = console[method];
console[method] = function() {
var stack = (new Error()).stack.split(/\n/);
// Chrome includes a single "Error" line, FF doesn't.
if (stack[0].indexOf('Error') === 0) {
stack = stack.slice(1);
}
var args = [].slice.apply(arguments).concat([stack[1].trim()]);
return old.apply(console, args);
};
});
}
=======
>>>>>>>
<<<<<<<
// console.log(err);
// console.log(err.code);
console.log('Uncaught Exception: ', err);
=======
console.log(`Uncaught Exception: `, err);
>>>>>>>
console.log('Uncaught Exception: ', err);
<<<<<<<
// require('./lib/deleteUsers');
=======
>>>>>>>
<<<<<<<
// TODO: where is this being used?
app.use((req, res, next) => {
if (process.env.NODE_ENV == 'production') {
res.locals.linkPrepend = 'https://pew.tube';
} else {
res.locals.linkPrepend = '';
}
next();
});
// not being used currently
function nocache(req, res, next) {
res.header('Cache-Control', 'private, no-cache, no-store, must-revalidate');
res.header('Expires', '-1');
res.header('Pragma', 'no-cache');
next();
}
=======
>>>>>>>
<<<<<<<
/** META TRACKER **/
=======
/** META TAGS FOR SOCIAL **/
>>>>>>>
/** META TAGS FOR SOCIAL **/
<<<<<<<
=======
>>>>>>>
<<<<<<<
// console.log(req.siteVisitor.ip);
//
// console.log(req.siteVisitor.blocked);
=======
>>>>>>>
<<<<<<<
// TODO: not sure what this code achieves
=======
/** Setting up returnTo path for user login **/
>>>>>>>
/** Setting up returnTo path for user login **/
<<<<<<<
let ngrokOptions = {
addr: portNumber
};
=======
console.log(`Access NodeTube on the public web via ${url}. This link will be changed if you restart the app, to
use Ngrok with a permanent subdomain please purchase a token and update the settings in .env.private (see runNgrok function in app.js)`);
}
>>>>>>>
console.log(`Access NodeTube on the public web via ${url}. This link will be changed if you restart the app, to
use Ngrok with a permanent subdomain please purchase a token and update the settings in .env.private (see runNgrok function in app.js)`);
<<<<<<<
const url = await ngrok.connect(ngrokOptions);
console.log(url);
// const api = ngrok.getApi();
// const tunnels = JSON.parse(await api.get('api/tunnels'));
//
//
// console.log(tunnels.tunnels[0]);
//
// const publicUrlAsHttp = tunnels.tunnels[0].public_url;
//
console.log(`Access NodeTube on the public web via ${url}. This link will be changed if you restart the app, to
use Ngrok with a permanent subdomain please purchase a token and update the settings in .env.private (see runNgrok function in app.js)`);
}
=======
/** FOR FINDING ERRANT LOGS **/
if(process.env.SHOW_LOG_LOCATION == 'true' || 1 == 2){
/** Code to find errant console logs **/
['log', 'warn', 'error'].forEach(function(method) {
var old = console[method];
console[method] = function() {
var stack = (new Error()).stack.split(/\n/);
// Chrome includes a single "Error" line, FF doesn't.
if (stack[0].indexOf('Error') === 0) {
stack = stack.slice(1);
}
var args = [].slice.apply(arguments).concat([stack[1].trim()]);
return old.apply(console, args);
};
});
}
}
>>>>>>>
/** FOR FINDING ERRANT LOGS **/
if(process.env.SHOW_LOG_LOCATION == 'true' || 1 == 2){
/** Code to find errant console logs **/
['log', 'warn', 'error'].forEach(function(method) {
var old = console[method];
console[method] = function() {
var stack = (new Error()).stack.split(/\n/);
// Chrome includes a single "Error" line, FF doesn't.
if (stack[0].indexOf('Error') === 0) {
stack = stack.slice(1);
}
var args = [].slice.apply(arguments).concat([stack[1].trim()]);
return old.apply(console, args);
};
});
}
} |
<<<<<<<
import { Header, ActionBar, PageContent } from 'modules/layout/components';
import { Pagination, Table } from 'modules/common/components';
=======
import { Wrapper } from 'modules/layout/components';
import { Pagination, Table, ShowData } from 'modules/common/components';
import Sidebar from '../../Sidebar';
>>>>>>>
import { Header, ActionBar, PageContent } from 'modules/layout/components';
import { Pagination, Table, ShowData } from 'modules/common/components';
<<<<<<<
>
{content}
</PageContent>
];
=======
content={
<ShowData
data={content}
loading={loading}
count={totalCount}
emptyText="There is no data."
emptyIcon="ios-copy"
/>
}
/>
);
>>>>>>>
>
<ShowData
data={content}
loading={loading}
count={totalCount}
emptyText="There is no data."
emptyIcon="ios-copy"
/>
</PageContent>
]; |
<<<<<<<
import React from 'react';
import PropTypes from 'prop-types';
import { Button } from 'react-bootstrap';
=======
import React, { PropTypes, Component } from 'react';
import { Button, Collapse } from 'react-bootstrap';
>>>>>>>
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Button, Collapse } from 'react-bootstrap'; |
<<<<<<<
const { stage } = this.props;
=======
const { stage, deals, saveDeal, removeDeal } = this.props;
>>>>>>>
const { stage, saveDeal } = this.props;
<<<<<<<
<DealAddForm stageId={stage._id} saveDeal={this.props.saveDeal} />
=======
<DealForm
stageId={stage._id}
length={deals.length}
saveDeal={saveDeal}
removeDeal={removeDeal}
/>
>>>>>>>
<DealAddForm stageId={stage._id} saveDeal={saveDeal} /> |
<<<<<<<
import DealRoutes from './deals/routes';
=======
import PropertiesRoutes from './properties/routes';
>>>>>>>
import DealRoutes from './deals/routes';
import PropertiesRoutes from './properties/routes';
<<<<<<<
<ProfileRoutes key="ProfileRoutes" />,
<DealRoutes key="DealRoutes" />
=======
<ProfileRoutes key="ProfileRoutes" />,
<PropertiesRoutes key="PropertiesRoutes" />
>>>>>>>
<ProfileRoutes key="ProfileRoutes" />,
<DealRoutes key="DealRoutes" />,
<PropertiesRoutes key="PropertiesRoutes" /> |
<<<<<<<
export { Inbox, FilterButton, LeftSidebar, RespondBox };
=======
export { Inbox, RespondBox, ResponseTemplate };
>>>>>>>
export { Inbox, FilterButton, LeftSidebar, RespondBox, ResponseTemplate }; |
<<<<<<<
content={
<ShowData
data={this.renderContent()}
loading={loading}
count={totalCount}
emptyText="There is no data."
emptyIcon="ios-copy"
/>
}
/>
);
=======
transparent={false}
>
<DataWithLoader
data={this.renderContent()}
loading={loading}
count={totalCount}
emptyText="There is no data."
emptyImage="/images/robots/robot-05.svg"
/>
</PageContent>
];
>>>>>>>
transparent={false}
content={
<DataWithLoader
data={this.renderContent()}
loading={loading}
count={totalCount}
emptyText="There is no data."
emptyImage="/images/robots/robot-05.svg"
/>
}
/>
); |
<<<<<<<
const emptyContent = (
<EmptyState text="There is no engage message." size="full" icon="email" />
);
const mainContent = (
<div>
<Table whiteSpace="nowrap" hover bordered>
<thead>
<tr>
<th />
<th>Title</th>
<th>From</th>
<th>Status</th>
<th>Total</th>
<th>Sent</th>
<th>Failed</th>
<th>Type</th>
<th>Created date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{messages.map(message => (
<MessageListRow
toggleBulk={toggleBulk}
refetch={refetch}
key={message._id}
message={message}
/>
))}
</tbody>
</Table>
<Pagination count={totalCount} />
</div>
=======
const content = (
<Table whiteSpace="nowrap" hover bordered>
<thead>
<tr>
<th />
<th>Title</th>
<th>From</th>
<th>Status</th>
<th>Total</th>
<th>Sent</th>
<th>Failed</th>
<th>Type</th>
<th>Created date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{messages.map(message => (
<MessageListRow
toggleBulk={toggleBulk}
refetch={refetch}
key={message._id}
message={message}
/>
))}
</tbody>
</Table>
>>>>>>>
const emptyContent = (
<EmptyState text="There is no engage message." size="full" icon="email" />
);
const mainContent = (
<div>
<Table whiteSpace="nowrap" hover bordered>
<thead>
<tr>
<th />
<th>Title</th>
<th>From</th>
<th>Status</th>
<th>Total</th>
<th>Sent</th>
<th>Failed</th>
<th>Type</th>
<th>Created date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{messages.map(message => (
<MessageListRow
toggleBulk={toggleBulk}
refetch={refetch}
key={message._id}
message={message}
/>
))}
</tbody>
</Table>
<Pagination count={totalCount} />
</div>
<<<<<<<
content={content()}
=======
footer={<Pagination count={totalCount} />}
content={content}
>>>>>>>
footer={<Pagination count={totalCount} />}
content={content()} |
<<<<<<<
import Button from '../src/components/Button';
import Label from '../src/components/Tag';
import Icon from '../src/components/Icon';
import 'ionicons/css/ionicons.min.css';
=======
import Typography from "./Typography";
import Button from "../src/components/Button";
>>>>>>>
import Button from '../src/components/Button';
import Label from '../src/components/Tag';
import Icon from '../src/components/Icon';
import 'ionicons/css/ionicons.min.css';
import Typography from "./Typography"; |
<<<<<<<
<div className="text">
<a href="#" className="first-line">
{first}
</a>
<div className="second-line">
{second}
</div>
=======
<div className="text">
<a href={url ? url : '#'} className="first-line">{first}</a>
<div className="second-line">{second}</div>
>>>>>>>
<div className="text">
<a href={url ? url : '#'} className="first-line">
{first}
</a>
<div className="second-line">
{second}
</div> |
<<<<<<<
<PipelineName onClick={this.toggleForm}>
{pipeline.name} <Icon icon="ios-arrow-down" />
=======
<PipelineName onClick={toggleForm}>
{currentPipeline.name} <Icon icon="downarrow" size={10} />
>>>>>>>
<PipelineName onClick={this.toggleForm}>
{pipeline.name} <Icon icon="downarrow" size={10} /> |
<<<<<<<
DealEditForm,
DealAddForm,
ItemCounter,
=======
DealForm,
Items,
>>>>>>>
DealEditForm,
DealAddForm,
Items, |
<<<<<<<
queryParams,
insights: volumePieChartQuery.insights,
trend: data.trend,
brands: brandsQuery.brands,
=======
insights: volumePieChartQuery.insights || [],
trend: data.trend || [],
brands: brandsQuery.brands || [],
>>>>>>>
queryParams,
insights: volumePieChartQuery.insights || [],
trend: data.trend || [],
brands: brandsQuery.brands || [], |
<<<<<<<
import { FormGroup, FormControl, Button, Col, Grid } from 'react-bootstrap';
import { Alert } from 'modules/common/utils';
import { AuthContent, AuthDescription, AuthBox } from '../styles';
=======
import { FormGroup, FormControl } from 'react-bootstrap';
import { Button } from 'modules/common/components';
>>>>>>>
import { FormGroup, FormControl, Col, Grid } from 'react-bootstrap';
import { Button } from 'modules/common/components';
import { Alert } from 'modules/common/utils';
import { AuthContent, AuthDescription, AuthBox } from '../styles';
<<<<<<<
<AuthContent className="auth-content">
<Grid>
<Col md={7}>
<AuthDescription>
<img src="/images/logo.png" alt="erxes" />
<h1>Customer engagement. Redefined.</h1>
<p>
erxes is an AI meets open source messaging platform for sales
and marketing teams.
</p>
<a href="http://erxes.io/">« Go to home page</a>
</AuthDescription>
</Col>
<Col md={5}>
<AuthBox>
<h2>Set your new password</h2>
<form onSubmit={this.handleSubmit}>
<FormGroup>
<FormControl
type="password"
placeholder="new password"
required
onChange={this.handlePasswordChange}
/>
</FormGroup>
<Button type="submit" block>
Change password
</Button>
</form>
</AuthBox>
</Col>
</Grid>
</AuthContent>
=======
<div className="auth-box">
<h2>Set your new password</h2>
<form onSubmit={this.handleSubmit}>
<FormGroup>
<FormControl
type="password"
placeholder="new password"
required
onChange={this.handlePasswordChange}
/>
</FormGroup>
<Button type="submit" block>
Change password
</Button>
</form>
</div>
>>>>>>>
<AuthContent className="auth-content">
<Grid>
<Col md={7}>
<AuthDescription>
<img src="/images/logo.png" alt="erxes" />
<h1>Customer engagement. Redefined.</h1>
<p>
erxes is an AI meets open source messaging platform for sales
and marketing teams.
</p>
<a href="http://erxes.io/">« Go to home page</a>
</AuthDescription>
</Col>
<Col md={5}>
<AuthBox>
<h2>Set your new password</h2>
<form onSubmit={this.handleSubmit}>
<FormGroup>
<FormControl
type="password"
placeholder="new password"
required
onChange={this.handlePasswordChange}
/>
</FormGroup>
<Button type="submit" block>
Change password
</Button>
</form>
</AuthBox>
</Col>
</Grid>
</AuthContent> |
<<<<<<<
import { FormControl, ControlLabel } from './Form';
import TextDivider from './TextDivider';
=======
import CountsByTag from './CountsByTag';
>>>>>>>
import { FormControl, ControlLabel } from './Form';
import TextDivider from './TextDivider';
import CountsByTag from './CountsByTag'; |
<<<<<<<
const providers = ['discord', 'facebook', 'github', 'google', 'microsoft', 'twitter']; // To remove a provider from the list just delete it from this array...
=======
const providers = ['discord', 'facebook', 'github', 'google', 'twitch', 'twitter']; // To remove a provider from the list just delete it from this array...
>>>>>>>
const providers = ['discord', 'facebook', 'github', 'google', 'microsoft', 'twitch', 'twitter']; // To remove a provider from the list just delete it from this array... |
<<<<<<<
self._updateXAxisLabel(xLabel);self._updateYAxisLabel(yLabel);_bars.attr({width:function width(d,i){return self.barWidth;}}).transition().attr({y:function y(d,i){ // get current positions of bars which will use for bar transition animations.
if(!isCombinedOpts){c_Pos.push({x:this.getAttribute('x'),y:self.yScale(parseFloat(d[dOption]))});}else {c_Pos.push({x:this.getAttribute('x'),y:self.yScale(data[i])});}return c_Pos[i].y;},height:function height(d,i){if(!isCombinedOpts)return self.chartHeight-self.yScale(parseFloat(d[dOption]));else return self.chartHeight-self.yScale(parseFloat(data[i]));},fill:function fill(d,i){return colorObj.bar[colorSet];}}).each('end',function(d,i){ // When the last bar is transited, resolve to the next animation.
=======
self._updateXAxisLabel(xLabel);self._updateYAxisLabel(yLabel);_bars.attr({width:function width(d,i){return self.barWidth;}}).transition().attr({y:function y(d,i){console.log(d[dOption]); // get current positions of bars which will use for bar transition animations.
if(!isCombinedOpts){c_Pos.push({x:this.getAttribute('x'),y:self.yScale(parseFloat(d[dOption]))});}else {c_Pos.push({x:this.getAttribute('x'),y:self.yScale(data[i])});}return c_Pos[i].y;},height:function height(d,i){if(!isCombinedOpts)return self.chartHeight-self.yScale(parseFloat(d[dOption]));else return self.chartHeight-self.yScale(parseFloat(data[i]));},fill:function fill(d,i){ // console.log(colorObj.bar[cOption]);
// return cOption ? colorObj.bar[cOption] : colorObj.bar[dOption]
return colorObj.bar[colorSet];}}).each('end',function(d,i){ // When the last bar is transited, resolve to the next animation.
>>>>>>>
self._updateXAxisLabel(xLabel);self._updateYAxisLabel(yLabel);_bars.attr({width:function width(d,i){return self.barWidth;}}).transition().attr({y:function y(d,i){console.log(d[dOption]); // get current positions of bars which will use for bar transition animations.
if(!isCombinedOpts){c_Pos.push({x:this.getAttribute('x'),y:self.yScale(parseFloat(d[dOption]))});}else {c_Pos.push({x:this.getAttribute('x'),y:self.yScale(data[i])});}return c_Pos[i].y;},height:function height(d,i){if(!isCombinedOpts)return self.chartHeight-self.yScale(parseFloat(d[dOption]));else return self.chartHeight-self.yScale(parseFloat(data[i]));},fill:function fill(d,i){return colorObj.bar[colorSet];}}).each('end',function(d,i){ // When the last bar is transited, resolve to the next animation. |
<<<<<<<
this.dom.style[sjs.tproperty + "-origin"] = "0 0";
this.dom.style[sjs.tproperty] = "scale(" + x + "," + y + ")";
=======
this.dom.style[sjs.tproperty+"Origin"] = "0 0";
this.dom.style[sjs.tproperty] = "scale("+x+","+y+")";
>>>>>>>
this.dom.style[sjs.tproperty+"Origin"] = "0 0";
this.dom.style[sjs.tproperty] = "scale(" + x + "," + y + ")";
<<<<<<<
if (this._dirty.transform) {
style[sjs.tproperty + '-origin'] = this.xTransformOrigin + " " + this.yTransformOrigin;
=======
if(this._dirty.transform) {
style[sjs.tproperty+'Origin'] = this.xTransformOrigin + " " + this.yTransformOrigin;
}
if(this._dirty.backgroundRepeat) {
style.backgroundRepeat = this.backgroundRepeat;
>>>>>>>
if(this._dirty.transform) {
style[sjs.tproperty + 'Origin'] = this.xTransformOrigin + " " + this.yTransformOrigin;
}
if(this._dirty.backgroundRepeat) {
style.backgroundRepeat = this.backgroundRepeat; |
<<<<<<<
this.firstReq = true
=======
this.publicEncKey = null
>>>>>>>
this.firstReq = true
this.publicEncKey = null |
<<<<<<<
//= require lib/debug
=======
//= require bootstrap.min
>>>>>>>
//= require lib/debug
//= require bootstrap.min |
<<<<<<<
=======
var OtherPager = React.createClass({
getDefaultProps: function(){
return{
"maxPage": 0,
"nextText": "",
"previousText": "",
"currentPage": 0,
}
},
pageChange: function(event){
this.props.setPage(parseInt(event.target.getAttribute("data-value")));
},
render: function(){
var previous = "";
var next = "";
if(this.props.currentPage > 0){
previous = <span onClick={this.props.previous} className="previous"><i className="glyphicon glyphicon-arrow-left"></i>{this.props.previousText}</span>
}
if(this.props.currentPage != (this.props.maxPage -1)){
next = <span onClick={this.props.next} className="next">{this.props.nextText}<i className="glyphicon glyphicon-arrow-right"></i></span>
}
var options = [];
var startIndex = Math.max(this.props.currentPage - 5, 0);
var endIndex = Math.min(startIndex + 11, this.props.maxPage);
if (this.props.maxPage >= 11 && (endIndex - startIndex) <= 10) {
startIndex = endIndex - 11;
}
for(var i = startIndex; i < endIndex ; i++){
var selected = this.props.currentPage == i ? "current-page-selected" : "";
options.push(<button className={selected} data-value={i} onClick={this.pageChange}>{i + 1}</button>);
}
return (
<div className="row custom-pager">
<div className="col-xs-4">{previous}</div>
<div className="col-xs-4 center pages">
{options}
</div>
<div className="col-xs-4 right">{next}</div>
</div>
)
}
});
>>>>>>>
var OtherPager = React.createClass({
getDefaultProps: function(){
return{
"maxPage": 0,
"nextText": "",
"previousText": "",
"currentPage": 0,
}
},
pageChange: function(event){
this.props.setPage(parseInt(event.target.getAttribute("data-value")));
},
render: function(){
var previous = "";
var next = "";
if(this.props.currentPage > 0){
previous = <span onClick={this.props.previous} className="previous"><i className="glyphicon glyphicon-arrow-left"></i>{this.props.previousText}</span>
}
if(this.props.currentPage != (this.props.maxPage -1)){
next = <span onClick={this.props.next} className="next">{this.props.nextText}<i className="glyphicon glyphicon-arrow-right"></i></span>
}
var options = [];
var startIndex = Math.max(this.props.currentPage - 5, 0);
var endIndex = Math.min(startIndex + 11, this.props.maxPage);
if (this.props.maxPage >= 11 && (endIndex - startIndex) <= 10) {
startIndex = endIndex - 11;
}
for(var i = startIndex; i < endIndex ; i++){
var selected = this.props.currentPage == i ? "current-page-selected" : "";
options.push(<button className={selected} data-value={i} onClick={this.pageChange}>{i + 1}</button>);
}
return (
<div className="row custom-pager">
<div className="col-xs-4">{previous}</div>
<div className="col-xs-4 center pages">
{options}
</div>
<div className="col-xs-4 right">{next}</div>
</div>
)
}
});
<<<<<<<
<Griddle results={fakeData} columnMetadata={columnMeta} customFormatClassName="row" useCustomFormat="true" showFilter="true" tableClassName="table" customFormat={OtherComponent} showSettings="true" allowToggleCustom="true" />, document.getElementById('customdata')
);
=======
<Griddle results={fakeData} customFormatClassName="row" useCustomFormat="true" showFilter="true" tableClassName="table" customFormat={OtherComponent} showSettings="true" allowToggleCustom="true" />, document.getElementById('customdata')
);
React.renderComponent(
<Griddle results={fakeData} customFormatClassName="row" useCustomFormat="true" useCustomPager="true" showFilter="true" tableClassName="table" customFormat={OtherComponent} customPager={OtherPager} showSettings="true" allowToggleCustom="true" />, document.getElementById('customdatacustompager')
);
>>>>>>>
<Griddle results={fakeData} columnMetadata={columnMeta} customFormatClassName="row" useCustomFormat="true" showFilter="true" tableClassName="table" customFormat={OtherComponent} showSettings="true" allowToggleCustom="true" />, document.getElementById('customdata')
);
React.renderComponent(
<Griddle results={fakeData} customFormatClassName="row" useCustomFormat="true" useCustomPager="true" showFilter="true" tableClassName="table" customFormat={OtherComponent} customPager={OtherPager} showSettings="true" allowToggleCustom="true" />, document.getElementById('customdatacustompager')
); |
<<<<<<<
sortColumn: this.props.initialSort,
sortAscending: this.props.initialSortAscending,
=======
sortColumn: this.props.initialSort,
sortAscending: true,
>>>>>>>
sortColumn: this.props.initialSort,
sortAscending: this.props.initialSortAscending,
<<<<<<<
return (React.createElement("tr", null, React.createElement("td", {colSpan: Object.keys(that.props.data).length - that.props.metadataColumns.length, className: "griddle-parent"},
React.createElement(Griddle, {results: [row], tableClassName: that.props.tableClassName, showTableHeading: false, showPager: false, columnMetadata: that.props.columnMetadata})
=======
return (React.createElement("tr", null, React.createElement("td", {colSpan: Object.keys(that.props.data).length - that.props.metadataColumns.length, className: "griddle-parent"},
React.createElement(Griddle, {results: [row], tableClassName: "table", showTableHeading: false, showPager: false, columnMetadata: that.props.columnMetadata})
>>>>>>>
return (React.createElement("tr", null, React.createElement("td", {colSpan: Object.keys(that.props.data).length - that.props.metadataColumns.length, className: "griddle-parent"},
Griddle({results: [row], tableClassName: "table", showTableHeading: false, showPager: false, columnMetadata: that.props.columnMetadata})
React.createElement(Griddle, {results: [row], tableClassName: "table", showTableHeading: false, showPager: false, columnMetadata: that.props.columnMetadata})
React.createElement(Griddle, {results: [row], tableClassName: that.props.tableClassName, showTableHeading: false, showPager: false, columnMetadata: that.props.columnMetadata}) |
<<<<<<<
import { Switch, Route } from 'react-router-dom'
=======
import Helmet from 'react-helmet'
>>>>>>>
import { Switch, Route } from 'react-router-dom'
import Helmet from 'react-helmet' |
<<<<<<<
//initialize global var for data obj from data.js
let data = require('./data').data;
// data = require('./../data').data;
=======
>>>>>>>
<<<<<<<
chrome.kill();
endUserInteraction(data);
=======
// chrome.kill();
endUserInteraction();
>>>>>>>
// chrome.kill();
endUserInteraction();
<<<<<<<
// data = require('./src/index.js').data;
console.log("data yay!", data);
=======
for (var key in data) {
log(chalk.white('On ' + key + ' of ' + data[key] + ' rerendered the following components:'));
if (data[key] !== null && typeof data[key] === "object") {
// Recurse into children
componentRerenders(data[key]);
}
}
>>>>>>>
// data = require('./src/index.js').data;
console.log("data yay!", data);
for (var key in data) {
log(chalk.white('On ' + key + ' of ' + data[key] + ' rerendered the following components:'));
if (data[key] !== null && typeof data[key] === "object") {
// Recurse into children
componentRerenders(data[key]);
}
} |
<<<<<<<
let data = require('./data').data;
//runs on start of reactopt
function startReactopt() {
log(chalk.bgCyan.bold('Reactopt is running - Interact with your app and then type/enter "end"'));
log('');
const loading = chalkAnimation.radar('----------------------------------------------------------------------');
loading.start();
}
// when user 'ends' interaction, execute this code
function endUserInteraction() {
//execute functions to test/print other logic
printLine();
printRerenders();
printLine();
versionOfReact();
printLine();
productionMode();
}
function printRerenders() {
let events = Object.keys(data);
if (events.length !== 0) {
let components;
printHeading('Unnecessary Component Re-rendering');
printFail('There are components that unnecessarily re-rendered, and the events that triggered them:');
log('');
//print events and components rerendered for each
for (let x = 0; x < events.length; x += 1) {
components = Object.keys(data[events[x]]);
log(chalk.underline(events[x]), chalk.reset.white(' : ' + components) );
}
printSuggestion("Consider implementing 'shouldComponentUpdate' to prevent re-rendering when \nthe states or props of a component don't change.");
} else {
printPass('Your version of React is the most current and quickest.');
}
}
function printHeading(string) {
log(chalk.black.bgWhite.dim(string));
log('');
}
function printPass(string) {
log(chalk.cyan.bold(string));
}
function printFail(string) {
log(chalk.magenta.bold(string));
}
function printSuggestion(string) {
log(chalk.gray(string));
}
function printLine() {
log('');
log(chalk.gray('------------------------------------------------------'));
log('');
}
startReactopt(); // runs on npm run reactopt
setTimeout(endUserInteraction,2000); // faking end of user interaction for testing
// fake tests
function versionOfReact() {
//scrape for version
let version = '16';
printHeading('Version of React');
if (version === '16') {
printPass('Your version of React is the most current and quickest.');
} else {
printFail('Your version of React is out of date and slower than newer versions');
printSuggestion('Consider upgrading to React v 16, which has the fastest production speed.');
}
}
function productionMode() {
//scrape for version
let processChecks = true;
printHeading('Rendering in Production/Development Mode');
if (processChecks === false) {
printPass('Your version of React is the most current and quickest.');
} else {
printFail('Your code contains unneccesary process.env.NODE_ENV checks.');
printSuggestion('These checks are useful but can slow down your application. \n Be sure these are removed when application is put into production.');
}
}
=======
//start chrome-launcher to allow user to interact with React app
chromeLauncher.launch({
startingUrl: 'http://localhost:3000',
}).then((chrome) => {
rl.on('line', (line) => {
if (line === 'exit') {
chrome.kill();
}
});
});
module.export = reactopt;
>>>>>>>
//start chrome-launcher to allow user to interact with React app
chromeLauncher.launch({
startingUrl: 'http://localhost:3000',
}).then((chrome) => {
rl.on('line', (line) => {
if (line === 'exit') {
chrome.kill();
}
});
});
let data = require('./data').data;
//runs on start of reactopt
function startReactopt() {
log(chalk.bgCyan.bold('Reactopt is running - Interact with your app and then type/enter "end"'));
log('');
const loading = chalkAnimation.radar('----------------------------------------------------------------------');
loading.start();
}
// when user 'ends' interaction, execute this code
function endUserInteraction() {
//execute functions to test/print other logic
printLine();
printRerenders();
printLine();
versionOfReact();
printLine();
productionMode();
}
function printRerenders() {
let events = Object.keys(data);
if (events.length !== 0) {
let components;
printHeading('Unnecessary Component Re-rendering');
printFail('There are components that unnecessarily re-rendered, and the events that triggered them:');
log('');
//print events and components rerendered for each
for (let x = 0; x < events.length; x += 1) {
components = Object.keys(data[events[x]]);
log(chalk.underline(events[x]), chalk.reset.white(' : ' + components) );
}
printSuggestion("Consider implementing 'shouldComponentUpdate' to prevent re-rendering when \nthe states or props of a component don't change.");
} else {
printPass('Your version of React is the most current and quickest.');
}
}
function printHeading(string) {
log(chalk.black.bgWhite.dim(string));
log('');
}
function printPass(string) {
log(chalk.cyan.bold(string));
}
function printFail(string) {
log(chalk.magenta.bold(string));
}
function printSuggestion(string) {
log(chalk.gray(string));
}
function printLine() {
log('');
log(chalk.gray('------------------------------------------------------'));
log('');
}
startReactopt(); // runs on npm run reactopt
setTimeout(endUserInteraction,2000); // faking end of user interaction for testing
// fake tests
function versionOfReact() {
//scrape for version
let version = '16';
printHeading('Version of React');
if (version === '16') {
printPass('Your version of React is the most current and quickest.');
} else {
printFail('Your version of React is out of date and slower than newer versions');
printSuggestion('Consider upgrading to React v 16, which has the fastest production speed.');
}
}
function productionMode() {
//scrape for version
let processChecks = true;
printHeading('Rendering in Production/Development Mode');
if (processChecks === false) {
printPass('Your version of React is the most current and quickest.');
} else {
printFail('Your code contains unneccesary process.env.NODE_ENV checks.');
printSuggestion('These checks are useful but can slow down your application. \n Be sure these are removed when application is put into production.');
}
}
module.export = reactopt; |
<<<<<<<
addAsync(values.slice(0), callback);
return;
=======
addAsync(values, callback)
return
>>>>>>>
addAsync(values.slice(0), callback)
return |
<<<<<<<
deviceConnected: false,
nodeConnected: false,
accountsRequested: false,
accountsRetrieved: false
=======
deviceConnected: false,
nodeConnected: false,
accountsRetrieved: false,
accountInfoRetrieved: false
>>>>>>>
deviceConnected: false,
nodeConnected: false,
accountsRequested: false,
accountsRetrieved: false
<<<<<<<
export default function states(state = initialState, action) {
switch (action.type) {
case types.APP_LEDGER_CONNECTION_STATUS: {
return Object.assign({}, state, {
deviceConnected: action.deviceConnected
});
}
case types.DEVICE_CONNECTING:
case types.DEVICE_DISCONNECTED: {
return Object.assign({}, state, {
deviceConnected: false
});
}
case types.CREATE_CONNECTION_SUCCESS: {
return Object.assign({}, state, {
nodeConnected: true
});
}
case types.CREATE_CONNECTION_REQUEST:
case types.CREATE_CONNECTION_FAILURE: {
return Object.assign({}, state, {
nodeConnected: false
});
}
case types.GET_ACCOUNTS_SUCCESS: {
return Object.assign({}, state, {
accountsRetrieved: true
});
}
case types.GET_ACCOUNTS_REQUEST: {
return Object.assign({}, state, {
accountsRequested: true
});
}
case types.GET_ACCOUNTS_FAILURE: {
return Object.assign({}, state, {
accountsRetrieved: false
});
}
=======
export default function state(state = initialState, action){
switch (action.type) {
case types.APP_LEDGER_CONNECTION_STATUS: {
return Object.assign({}, state, {
deviceConnected: action.deviceConnected
});
}
case types.DEVICE_CONNECTING:
case types.DEVICE_DISCONNECTED: {
return Object.assign({}, state, {
deviceConnected: false
});
}
case types.CREATE_CONNECTION_SUCCESS: {
return Object.assign({}, state, {
nodeConnected: true
});
}
case types.CREATE_CONNECTION_PENDING:
case types.CREATE_CONNECTION_FAILURE: {
return Object.assign({}, state, {
nodeConnected: false
});
}
case types.GET_ACCOUNTS_SUCCESS: {
return Object.assign({}, state, {
accountsRetrieved: true
});
}
case types.GET_ACCOUNTS_REQUEST:
case types.GET_ACCOUNTS_FAILURE: {
return Object.assign({}, state, {
accountsRetrieved: false
});
}
case types.GET_ACCOUNT_SUCCESS: {
return Object.assign({}, state, {
accountInfoRetrieved: true
});
}
case types.GET_ACCOUNT_REQUEST:
case types.GET_ACCOUNT_FAILURE: {
return Object.assign({}, state, {
accountInfoRetrieved: false
});
}
>>>>>>>
export default function states(state = initialState, action) {
switch (action.type) {
case types.APP_LEDGER_CONNECTION_STATUS: {
return Object.assign({}, state, {
deviceConnected: action.deviceConnected
});
}
case types.DEVICE_CONNECTING:
case types.DEVICE_DISCONNECTED: {
return Object.assign({}, state, {
deviceConnected: false
});
}
case types.CREATE_CONNECTION_SUCCESS: {
return Object.assign({}, state, {
nodeConnected: true
});
}
case types.CREATE_CONNECTION_REQUEST:
case types.CREATE_CONNECTION_FAILURE: {
return Object.assign({}, state, {
nodeConnected: false
});
}
case types.GET_ACCOUNTS_SUCCESS: {
return Object.assign({}, state, {
accountsRetrieved: true
});
}
case types.GET_ACCOUNTS_REQUEST: {
return Object.assign({}, state, {
accountsRequested: true
});
}
case types.GET_ACCOUNTS_FAILURE: {
return Object.assign({}, state, {
accountsRetrieved: false
});
}
case types.GET_ACCOUNT_SUCCESS: {
return Object.assign({}, state, {
accountInfoRetrieved: true
});
}
case types.GET_ACCOUNT_REQUEST:
case types.GET_ACCOUNT_FAILURE: {
return Object.assign({}, state, {
accountInfoRetrieved: false
});
} |
<<<<<<<
import { Icon, Label, Table, Segment } from 'semantic-ui-react';
=======
import { render } from 'react-dom';
import { Container, Grid, Icon, Label, List, Table, Segment, Modal, Button, Input } from 'semantic-ui-react';
>>>>>>>
import { Label, Table, Segment, Modal, Button, Input } from 'semantic-ui-react'; |
<<<<<<<
=======
this.cell_info_area = null;
this.cell_upstream_deps = null;
this.cell_downstream_deps = null;
>>>>>>>
<<<<<<<
//set input field icon to success if cell is executed
=======
>>>>>>> |
<<<<<<<
"base/js/namespace",
'./df-notebook/depview.js',
'./df-notebook/dfgraph.js',
'./df-notebook/toolbar.js',
'./df-notebook/codecell.js',
'./df-notebook/completer.js',
'./df-notebook/kernel.js',
'./df-notebook/notebook.js',
'./df-notebook/outputarea.js',
=======
"base/js/namespace",
"require",
'./df-notebook/depview.js',
'./df-notebook/dfgraph.js',
'./df-notebook/codecell.js',
'./df-notebook/completer.js',
'./df-notebook/kernel.js',
'./df-notebook/notebook.js',
'./df-notebook/outputarea.js'
>>>>>>>
"base/js/namespace",
"require",
'./df-notebook/depview.js',
'./df-notebook/dfgraph.js',
'./df-notebook/toolbar.js',
'./df-notebook/codecell.js',
'./df-notebook/completer.js',
'./df-notebook/kernel.js',
'./df-notebook/notebook.js',
'./df-notebook/outputarea.js',
<<<<<<<
function($, Jupyter, depview, dfgraph, df_toolbar) {
=======
function($, Jupyter, require, depview, dfgraph) {
>>>>>>>
function($, Jupyter, require, depview, dfgraph, df_toolbar) {
<<<<<<<
// load the toolbar
df_toolbar.register(nb);
=======
>>>>>>>
// load the toolbar
df_toolbar.register(nb);
<<<<<<<
// nb.events.on('preset_activated.CellToolbar', function(event, data) {
// if (data.name === 'Dataflow') {
// df_toolbar.update_overflows();
// }
// });
var depdiv = depview.create_dep_div();
=======
>>>>>>> |
<<<<<<<
// the kernel was already created, but $.proxy settings will
// reference old handlers so relink _handle_input_message
// needed to get execute_input messages
var k = nb.session.kernel;
k.register_iopub_handler('execute_input', $.proxy(k._handle_input_message, k));
Jupyter._dfkernel_loaded = true;
=======
// the kernel was already created, but $.proxy settings will
// reference old handlers so relink _handle_input_message
// needed to get execute_input messages
var k = nb.kernel;
k.register_iopub_handler('execute_input', $.proxy(k._handle_input_message, k));
>>>>>>>
// the kernel was already created, but $.proxy settings will
// reference old handlers so relink _handle_input_message
// needed to get execute_input messages
var k = nb.kernel;
k.register_iopub_handler('execute_input', $.proxy(k._handle_input_message, k));
Jupyter._dfkernel_loaded = true; |
<<<<<<<
queryBuider = __webpack_require__(8);
=======
queryBuider = __webpack_require__(11);
>>>>>>>
queryBuider = __webpack_require__(9);
<<<<<<<
/* 8 */
=======
/* 11 */
>>>>>>>
/* 9 */
<<<<<<<
/* 9 */
=======
/* 12 */
>>>>>>>
/* 10 */
<<<<<<<
/* 10 */
/***/ function(module, exports, __webpack_require__) {
;(function () {
var object = true ? exports : this; // #8: web workers
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
function InvalidCharacterError(message) {
this.message = message;
}
InvalidCharacterError.prototype = new Error;
InvalidCharacterError.prototype.name = 'InvalidCharacterError';
// encoder
// [https://gist.github.com/999166] by [https://github.com/nignag]
object.btoa || (
object.btoa = function (input) {
var str = String(input);
for (
// initialize result and counter
var block, charCode, idx = 0, map = chars, output = '';
// if the next str index does not exist:
// change the mapping table to "="
// check if d has no fractional digits
str.charAt(idx | 0) || (map = '=', idx % 1);
// "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
output += map.charAt(63 & block >> 8 - idx % 1 * 8)
) {
charCode = str.charCodeAt(idx += 3/4);
if (charCode > 0xFF) {
throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");
}
block = block << 8 | charCode;
}
return output;
});
// decoder
// [https://gist.github.com/1020396] by [https://github.com/atk]
object.atob || (
object.atob = function (input) {
var str = String(input).replace(/=+$/, '');
if (str.length % 4 == 1) {
throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded.");
}
for (
// initialize result and counters
var bc = 0, bs, buffer, idx = 0, output = '';
// get next character
buffer = str.charAt(idx++);
// character found in table? initialize bit storage and add its ascii value;
~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,
// and if not first of each 4 characters,
// convert the first 8 bits to one ascii character
bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0
) {
// try to find character in table (0-63, not found => -1)
buffer = chars.indexOf(buffer);
}
return output;
});
}());
/***/ },
/* 11 */
=======
/* 13 */
/***/ function(module, exports, __webpack_require__) {
;(function () {
var object = true ? exports : this; // #8: web workers
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
function InvalidCharacterError(message) {
this.message = message;
}
InvalidCharacterError.prototype = new Error;
InvalidCharacterError.prototype.name = 'InvalidCharacterError';
// encoder
// [https://gist.github.com/999166] by [https://github.com/nignag]
object.btoa || (
object.btoa = function (input) {
var str = String(input);
for (
// initialize result and counter
var block, charCode, idx = 0, map = chars, output = '';
// if the next str index does not exist:
// change the mapping table to "="
// check if d has no fractional digits
str.charAt(idx | 0) || (map = '=', idx % 1);
// "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
output += map.charAt(63 & block >> 8 - idx % 1 * 8)
) {
charCode = str.charCodeAt(idx += 3/4);
if (charCode > 0xFF) {
throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");
}
block = block << 8 | charCode;
}
return output;
});
// decoder
// [https://gist.github.com/1020396] by [https://github.com/atk]
object.atob || (
object.atob = function (input) {
var str = String(input).replace(/=+$/, '');
if (str.length % 4 == 1) {
throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded.");
}
for (
// initialize result and counters
var bc = 0, bs, buffer, idx = 0, output = '';
// get next character
buffer = str.charAt(idx++);
// character found in table? initialize bit storage and add its ascii value;
~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,
// and if not first of each 4 characters,
// convert the first 8 bits to one ascii character
bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0
) {
// try to find character in table (0-63, not found => -1)
buffer = chars.indexOf(buffer);
}
return output;
});
}());
/***/ },
/* 14 */
>>>>>>>
/* 11 */
/***/ function(module, exports, __webpack_require__) {
;(function () {
var object = true ? exports : this; // #8: web workers
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
function InvalidCharacterError(message) {
this.message = message;
}
InvalidCharacterError.prototype = new Error;
InvalidCharacterError.prototype.name = 'InvalidCharacterError';
// encoder
// [https://gist.github.com/999166] by [https://github.com/nignag]
object.btoa || (
object.btoa = function (input) {
var str = String(input);
for (
// initialize result and counter
var block, charCode, idx = 0, map = chars, output = '';
// if the next str index does not exist:
// change the mapping table to "="
// check if d has no fractional digits
str.charAt(idx | 0) || (map = '=', idx % 1);
// "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
output += map.charAt(63 & block >> 8 - idx % 1 * 8)
) {
charCode = str.charCodeAt(idx += 3/4);
if (charCode > 0xFF) {
throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");
}
block = block << 8 | charCode;
}
return output;
});
// decoder
// [https://gist.github.com/1020396] by [https://github.com/atk]
object.atob || (
object.atob = function (input) {
var str = String(input).replace(/=+$/, '');
if (str.length % 4 == 1) {
throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded.");
}
for (
// initialize result and counters
var bc = 0, bs, buffer, idx = 0, output = '';
// get next character
buffer = str.charAt(idx++);
// character found in table? initialize bit storage and add its ascii value;
~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,
// and if not first of each 4 characters,
// convert the first 8 bits to one ascii character
bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0
) {
// try to find character in table (0-63, not found => -1)
buffer = chars.indexOf(buffer);
}
return output;
});
}());
/***/ },
/* 12 */
<<<<<<<
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(12)(module)))
/***/ },
/* 12 */
=======
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15)(module)))
/***/ },
/* 15 */
>>>>>>>
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(13)(module)))
/***/ },
/* 13 */ |
<<<<<<<
value: 0
},
lookupShapes: {
type: "i",
value: 0
},
=======
value: textures.overlay
},
transparency: {
type: "f",
value: 1.0
}
>>>>>>>
value: 0
},
lookupShapes: {
type: "i",
value: 0
},
transparency: {
type: "f",
value: 1.0
} |
<<<<<<<
constructor(props) {
super(props)
}
handleCopy = () => {
const container = document.createElement("textarea")
const { enableClipboard, variable, namespace } = this.props
container.innerHTML = JSON.stringify(variable.value, null, " ")
document.body.appendChild(container)
container.select()
document.execCommand("copy")
document.body.removeChild(container)
this.copiedTimer = setTimeout(() => {
this.setState({
copied: false
})
}, 5500)
this.setState({ copied: true }, () => {
if (typeof enableClipboard !== "function") {
return
}
enableClipboard({
src: variable.value,
namespace: namespace,
name: namespace[namespace.length - 1]
})
})
}
getCopyComponent = () => {
const { src, size, theme } = this.props
const { editMode } = this.state
let style = Theme(theme, "copy-to-clipboard").style
let display = "inline"
if (editMode) {
display = "none"
}
return (
<span class="copy-to-clipboard-container">
<span
style={{
...style,
display: display
}}
onClick={this.handleCopy}
>
{this.getClippyIcon()}
</span>
</span>
)
}
getClippyIcon = () => {
const { theme } = this.props
if (this.state.copied) {
return (
<span>
<Clippy class="copy-icon" {...Theme(theme, "copy-icon")} />
<span {...Theme(theme, "copy-icon-copied")}>✔</span>
</span>
)
}
return <Clippy class="copy-icon" {...Theme(theme, "copy-icon")} />
}
=======
>>>>>>>
handleCopy = () => {
const container = document.createElement("textarea")
const { enableClipboard, variable, namespace } = this.props
container.innerHTML = JSON.stringify(variable.value, null, " ")
document.body.appendChild(container)
container.select()
document.execCommand("copy")
document.body.removeChild(container)
this.copiedTimer = setTimeout(() => {
this.setState({
copied: false
})
}, 5500)
this.setState({ copied: true }, () => {
if (typeof enableClipboard !== "function") {
return
}
enableClipboard({
src: variable.value,
namespace: namespace,
name: namespace[namespace.length - 1]
})
})
}
getCopyComponent = () => {
const { src, size, theme } = this.props
const { editMode } = this.state
let style = Theme(theme, "copy-to-clipboard").style
let display = "inline"
if (editMode) {
display = "none"
}
return (
<span class="copy-to-clipboard-container">
<span
style={{
...style,
display: display
}}
onClick={this.handleCopy}
>
{this.getClippyIcon()}
</span>
</span>
)
}
getClippyIcon = () => {
const { theme } = this.props
if (this.state.copied) {
return (
<span>
<Clippy class="copy-icon" {...Theme(theme, "copy-icon")} />
<span {...Theme(theme, "copy-icon-copied")}>✔</span>
</span>
)
}
return <Clippy class="copy-icon" {...Theme(theme, "copy-icon")} />
} |
<<<<<<<
'wrap_transform.js',
=======
'helpers.js',
>>>>>>>
'wrap_transform.js',
'helpers.js', |
<<<<<<<
var bundle_opts = { no_minify: !new_argv.production, symlink_dev_bundle: true };
require(path.join(__dirname, 'run.js')).run(app_dir, bundle_opts, new_argv.port);
=======
var bundle_opts = { no_minify: !new_argv.production, symlink_dev_bundle: true,
debug: new_argv.debug, debug_brk: new_argv.debug_brk};
require('./run.js').run(app_dir, bundle_opts, new_argv.port);
>>>>>>>
var bundle_opts = { no_minify: !new_argv.production, symlink_dev_bundle: true,
debug: new_argv.debug, debug_brk: new_argv.debug_brk};
require(path.join(__dirname, 'run.js')).run(app_dir, bundle_opts, new_argv.port); |
<<<<<<<
};
=======
}
// Like Perl's quotemeta: quotes all regexp metacharacters. See
// https://github.com/substack/quotemeta/blob/master/index.js
exports.quotemeta = function (str) {
return String(str).replace(/(\W)/g, '\\$1');
};
>>>>>>>
};
// Like Perl's quotemeta: quotes all regexp metacharacters. See
// https://github.com/substack/quotemeta/blob/master/index.js
exports.quotemeta = function (str) {
return String(str).replace(/(\W)/g, '\\$1');
}; |
<<<<<<<
]);
testAsyncMulti('mongo-livedata - empty documents, ' + idGeneration, [
function (test, expect) {
var collectionName = Meteor.uuid();
if (Meteor.isClient) {
Meteor.call('createInsecureCollection', collectionName);
Meteor.subscribe('c-' + collectionName);
}
var coll = new Meteor.Collection(collectionName, collectionOptions);
var docId;
coll.insert({}, expect(function (err, id) {
test.isFalse(err);
test.isTrue(id);
docId = id;
var cursor = coll.find();
test.equal(cursor.count(), 1);
}));
}
]);
testAsyncMulti('mongo-livedata - document with a date, ' + idGeneration, [
function (test, expect) {
var collectionName = Meteor.uuid();
if (Meteor.isClient) {
Meteor.call('createInsecureCollection', collectionName, collectionOptions);
Meteor.subscribe('c-' + collectionName);
}
var coll = new Meteor.Collection(collectionName, collectionOptions);
var docId;
coll.insert({d: new Date(1356152390004)}, expect(function (err, id) {
test.isFalse(err);
test.isTrue(id);
docId = id;
var cursor = coll.find();
test.equal(cursor.count(), 1);
test.equal(coll.findOne().d.getFullYear(), 2012);
}));
}
]);
testAsyncMulti('mongo-livedata - document with binary data, ' + idGeneration, [
function (test, expect) {
var bin = EJSON._base64Decode(
"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyBy" +
"ZWFzb24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJv" +
"bSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhl" +
"IG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdo" +
"dCBpbiB0aGUgY29udGludWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdl" +
"bmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRoZSBzaG9y" +
"dCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=");
var collectionName = Meteor.uuid();
if (Meteor.isClient) {
Meteor.call('createInsecureCollection', collectionName, collectionOptions);
Meteor.subscribe('c-' + collectionName);
}
var coll = new Meteor.Collection(collectionName, collectionOptions);
var docId;
coll.insert({b: bin}, expect(function (err, id) {
test.isFalse(err);
test.isTrue(id);
docId = id;
var cursor = coll.find();
test.equal(cursor.count(), 1);
var inColl = coll.findOne();
test.isTrue(EJSON.isBinary(inColl.b));
test.equal(inColl.b, bin);
}));
}
]);
});
})();
=======
]);
testAsyncMulti('mongo-livedata - specified _id', [
function (test, expect) {
var collectionName = Meteor.uuid();
if (Meteor.isClient) {
Meteor.call('createInsecureCollection', collectionName);
Meteor.subscribe('c-' + collectionName);
}
var expectError = expect(function (err) {
test.isTrue(err);
var doc = coll.findOne();
test.equal(doc.name, "foo");
});
var coll = new Meteor.Collection(collectionName);
coll.insert({_id: "foo", name: "foo"}, expect(function (err1, id) {
test.equal(id, "foo");
var doc = coll.findOne();
test.equal(doc._id, "foo");
Meteor._suppress_log(1);
coll.insert({_id: "foo", name: "bar"}, expectError);
}));
}
]);
>>>>>>>
]);
testAsyncMulti('mongo-livedata - empty documents, ' + idGeneration, [
function (test, expect) {
var collectionName = Meteor.uuid();
if (Meteor.isClient) {
Meteor.call('createInsecureCollection', collectionName);
Meteor.subscribe('c-' + collectionName);
}
var coll = new Meteor.Collection(collectionName, collectionOptions);
var docId;
coll.insert({}, expect(function (err, id) {
test.isFalse(err);
test.isTrue(id);
docId = id;
var cursor = coll.find();
test.equal(cursor.count(), 1);
}));
}
]);
testAsyncMulti('mongo-livedata - document with a date, ' + idGeneration, [
function (test, expect) {
var collectionName = Meteor.uuid();
if (Meteor.isClient) {
Meteor.call('createInsecureCollection', collectionName, collectionOptions);
Meteor.subscribe('c-' + collectionName);
}
var coll = new Meteor.Collection(collectionName, collectionOptions);
var docId;
coll.insert({d: new Date(1356152390004)}, expect(function (err, id) {
test.isFalse(err);
test.isTrue(id);
docId = id;
var cursor = coll.find();
test.equal(cursor.count(), 1);
test.equal(coll.findOne().d.getFullYear(), 2012);
}));
}
]);
testAsyncMulti('mongo-livedata - document with binary data, ' + idGeneration, [
function (test, expect) {
var bin = EJSON._base64Decode(
"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyBy" +
"ZWFzb24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJv" +
"bSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhl" +
"IG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdo" +
"dCBpbiB0aGUgY29udGludWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdl" +
"bmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRoZSBzaG9y" +
"dCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=");
var collectionName = Meteor.uuid();
if (Meteor.isClient) {
Meteor.call('createInsecureCollection', collectionName, collectionOptions);
Meteor.subscribe('c-' + collectionName);
}
var coll = new Meteor.Collection(collectionName, collectionOptions);
var docId;
coll.insert({b: bin}, expect(function (err, id) {
test.isFalse(err);
test.isTrue(id);
docId = id;
var cursor = coll.find();
test.equal(cursor.count(), 1);
var inColl = coll.findOne();
test.isTrue(EJSON.isBinary(inColl.b));
test.equal(inColl.b, bin);
}));
}
]);
});
testAsyncMulti('mongo-livedata - specified _id', [
function (test, expect) {
var collectionName = Meteor.uuid();
if (Meteor.isClient) {
Meteor.call('createInsecureCollection', collectionName);
Meteor.subscribe('c-' + collectionName);
}
var expectError = expect(function (err) {
test.isTrue(err);
var doc = coll.findOne();
test.equal(doc.name, "foo");
});
var coll = new Meteor.Collection(collectionName);
coll.insert({_id: "foo", name: "foo"}, expect(function (err1, id) {
test.equal(id, "foo");
var doc = coll.findOne();
test.equal(doc._id, "foo");
Meteor._suppress_log(1);
coll.insert({_id: "foo", name: "bar"}, expectError);
}));
}
]);
})(); |
<<<<<<<
Oauth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken),
{
width: 470,
height: 420
}
);
});
=======
OAuth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken),
{
width: 470,
height: 420
}
);
>>>>>>>
OAuth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken),
{
width: 470,
height: 420
}
);
}); |
<<<<<<<
api.use(['blaze', 'templating', 'spacebars',
'livedata', 'deps'], 'client');
=======
api.use(['ui', 'templating', 'spacebars',
'livedata', 'tracker'], 'client');
>>>>>>>
api.use(['blaze', 'templating', 'spacebars',
'livedata', 'tracker'], 'client'); |
<<<<<<<
var runLog = require('./run-log.js').runLog;
var packageClient = require('./package-client.js');
var utils = require('./utils.js');
var httpHelpers = require('./http-helpers.js');
var archinfo = require('./archinfo.js');
var tropohouse = require('./tropohouse.js');
var packages = require('./packages.js');
=======
var runLog = require('./run-log.js');
>>>>>>>
var runLog = require('./run-log.js');
var packageClient = require('./package-client.js');
var utils = require('./utils.js');
var httpHelpers = require('./http-helpers.js');
var archinfo = require('./archinfo.js');
var tropohouse = require('./tropohouse.js');
var packages = require('./packages.js'); |
<<<<<<<
OAuth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken)
);
});
=======
Oauth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken)
);
>>>>>>>
OAuth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken)
); |
<<<<<<<
var reload_key = "Server-" + url;
Meteor._reload.on_migrate(reload_key, function (retry) {
=======
// Setup auto-reload persistence.
Meteor._reload.onMigrate(function (retry) {
>>>>>>>
// Setup auto-reload persistence.
Meteor._reload.onMigrate(function (retry) {
<<<<<<<
=======
return [true];
>>>>>>>
<<<<<<<
var old_outstanding_methods = self.outstanding_methods;
var old_outstanding_wait_method = self.outstanding_wait_method;
var old_blocked_methods = self.blocked_methods;
self.outstanding_methods = [];
self.outstanding_wait_method = null;
self.blocked_methods = [];
self.onReconnect();
if (self.outstanding_wait_method) {
// self.onReconnect() caused us to wait on a method. Add all old
// methods to blocked_methods, and we don't need to send any
// additional methods
self.blocked_methods = self.blocked_methods.concat(
old_outstanding_methods);
if (old_outstanding_wait_method) {
self.blocked_methods.push(_.extend(
old_outstanding_wait_method, {wait: true}));
}
self.blocked_methods = self.blocked_methods.concat(
old_blocked_methods);
} else {
// self.onReconnect() did not cause us to wait on a method. Add
// as many methods as we can to outstanding_methods and send
// them
_.each(old_outstanding_methods, function(method) {
self.outstanding_methods.push(method);
self.stream.send(JSON.stringify(method.msg));
});
self.outstanding_wait_method = old_outstanding_wait_method;
if (self.outstanding_wait_method)
self.stream.send(JSON.stringify(self.outstanding_wait_method.msg));
self.blocked_methods = old_blocked_methods;
}
},
_readyToMigrate: function() {
var self = this;
return self.outstanding_methods.length === 0 &&
!self.outstanding_wait_method &&
self.blocked_methods.length === 0;
=======
return self.outstanding_methods.length === 0;
>>>>>>>
var old_outstanding_methods = self.outstanding_methods;
var old_outstanding_wait_method = self.outstanding_wait_method;
var old_blocked_methods = self.blocked_methods;
self.outstanding_methods = [];
self.outstanding_wait_method = null;
self.blocked_methods = [];
self.onReconnect();
if (self.outstanding_wait_method) {
// self.onReconnect() caused us to wait on a method. Add all old
// methods to blocked_methods, and we don't need to send any
// additional methods
self.blocked_methods = self.blocked_methods.concat(
old_outstanding_methods);
if (old_outstanding_wait_method) {
self.blocked_methods.push(_.extend(
old_outstanding_wait_method, {wait: true}));
}
self.blocked_methods = self.blocked_methods.concat(
old_blocked_methods);
} else {
// self.onReconnect() did not cause us to wait on a method. Add
// as many methods as we can to outstanding_methods and send
// them
_.each(old_outstanding_methods, function(method) {
self.outstanding_methods.push(method);
self.stream.send(JSON.stringify(method.msg));
});
self.outstanding_wait_method = old_outstanding_wait_method;
if (self.outstanding_wait_method)
self.stream.send(JSON.stringify(self.outstanding_wait_method.msg));
self.blocked_methods = old_blocked_methods;
}
},
_readyToMigrate: function() {
var self = this;
return self.outstanding_methods.length === 0 &&
!self.outstanding_wait_method &&
self.blocked_methods.length === 0; |
<<<<<<<
var serverCatalog = require('./catalog.js').serverCatalog;
=======
var stats = require('./stats.js');
>>>>>>>
var serverCatalog = require('./catalog.js').serverCatalog;
var stats = require('./stats.js'); |
<<<<<<<
exports.updateServerPackageData = function (dataStore, options) {
=======
exports.updateServerPackageData = function (cachedServerData, options) {
var results;
buildmessage.capture({ title: 'Updating package catalog' }, function () {
results = _updateServerPackageData(cachedServerData, options);
});
return results;
};
_updateServerPackageData = function (cachedServerData, options) {
>>>>>>>
exports.updateServerPackageData = function (dataStore, options) {
var results;
buildmessage.capture({ title: 'Updating package catalog' }, function () {
results = _updateServerPackageData(dataStore, options);
});
return results;
};
_updateServerPackageData = function (dataStore, options) {
<<<<<<<
var syncToken = dataStore.getSyncToken() || {};
=======
var syncToken = cachedServerData.syncToken;
if (!start) {
start = syncToken.packages;
state.end = Date.now() - start;
}
// XXX: Is packages the best progress indicator?
state.current = syncToken.packages - start;
buildmessage.reportProgress(state);
>>>>>>>
var syncToken = dataStore.getSyncToken() || {};
if (!start) {
start = syncToken.packages;
state.end = Date.now() - start;
}
// XXX: Is packages the best progress indicator?
state.current = syncToken.packages - start;
buildmessage.reportProgress(state);
<<<<<<<
=======
state.done = true;
buildmessage.reportProgress(state);
ret.data = cachedServerData;
>>>>>>>
state.done = true;
buildmessage.reportProgress(state);
ret.data = cachedServerData; |
<<<<<<<
// @export Random
Random = {};
=======
>>>>>>> |
<<<<<<<
Spacebars = {};
Spacebars.include2 = function (templateOrFunction, dataFunc, contentFunc, elseFunc) {
var template = Spacebars.call(templateOrFunction);
if (! (template instanceof Blaze.Component))
throw new Error("Expected template, found: " + template);
return new template.constructor(dataFunc, contentFunc, elseFunc);
};
=======
>>>>>>>
Spacebars.include2 = function (templateOrFunction, dataFunc, contentFunc, elseFunc) {
var template = Spacebars.call(templateOrFunction);
if (! (template instanceof Blaze.Component))
throw new Error("Expected template, found: " + template);
return new template.constructor(dataFunc, contentFunc, elseFunc);
}; |
<<<<<<<
Tinytest.add("ui - render - isolate GC", function (test) {
=======
// IE strips malformed styles like "bar::d" from the `style`
// attribute. We detect this to adjust expectations for the StyleHandler
// test below.
var malformedStylesAllowed = function () {
var div = document.createElement("div");
div.setAttribute("style", "bar::d;");
return (div.getAttribute("style") === "bar::d;");
};
Tinytest.add("ui - render - closure GC", function (test) {
>>>>>>>
// IE strips malformed styles like "bar::d" from the `style`
// attribute. We detect this to adjust expectations for the StyleHandler
// test below.
var malformedStylesAllowed = function () {
var div = document.createElement("div");
div.setAttribute("style", "bar::d;");
return (div.getAttribute("style") === "bar::d;");
};
Tinytest.add("ui - render - isolate GC", function (test) {
<<<<<<<
=======
Tinytest.add("ui - UI.insert fails on jQuery objects", function (test) {
var tmpl = UI.Component.extend({
render: function () {
return SPAN();
}
});
test.throws(function () {
UI.insert(UI.render(tmpl), $('body'));
}, /'parentElement' must be a DOM node/);
test.throws(function () {
UI.insert(UI.render(tmpl), document.body, $('body'));
}, /'nextNode' must be a DOM node/);
});
Tinytest.add("ui - UI.getDataContext", function (test) {
var div = document.createElement("DIV");
var tmpl = UI.Component.extend({
render: function () {
return SPAN();
}
});
UI.insert(UI.renderWithData(tmpl, {foo: "bar"}), div);
var span = $(div).children('SPAN')[0];
test.isTrue(span);
test.equal(UI.getElementData(span), {foo: "bar"});
});
>>>>>>>
Tinytest.add("ui - UI.insert fails on jQuery objects", function (test) {
var tmpl = UI.Component.extend({
render: function () {
return SPAN();
}
});
test.throws(function () {
UI.insert(UI.render(tmpl), $('body'));
}, /'parentElement' must be a DOM node/);
test.throws(function () {
UI.insert(UI.render(tmpl), document.body, $('body'));
}, /'nextNode' must be a DOM node/);
});
Tinytest.add("ui - UI.getDataContext", function (test) {
var div = document.createElement("DIV");
var tmpl = UI.Component.extend({
render: function () {
return SPAN();
}
});
UI.insert(UI.renderWithData(tmpl, {foo: "bar"}), div);
var span = $(div).children('SPAN')[0];
test.isTrue(span);
test.equal(UI.getElementData(span), {foo: "bar"});
}); |
<<<<<<<
// api.add_files(['template.js']);
=======
api.add_files(['template.js']);
api.add_files(['render.js']); // xcxc filename?
>>>>>>>
api.add_files(['render.js']); |
<<<<<<<
// XXX this code is very similar to unipackage.saveToPath.
=======
>>>>>>> |
<<<<<<<
expect(metas.dxTestWidget.properties).toEqual([
{ name: 'testTemplate', type: 'any', collection: false },
{ name: 'testProperty', type: 'any', collection: false }
=======
expect(metas[0].properties).toEqual([
{ name: 'testTemplate', type: 'any' },
{ name: 'testProperty', type: 'any' }
>>>>>>>
expect(metas.dxTestWidget.properties).toEqual([
{ name: 'testTemplate', type: 'any' },
{ name: 'testProperty', type: 'any' }
<<<<<<<
expect(metas.dxCollectionWidget.properties).toEqual([
{ name: 'collectionProperty', type: 'any', collection: true }
=======
expect(metas[2].properties).toEqual([
{ name: 'collectionProperty', type: 'any', isCollection: true },
{ name: 'dataSourceProperty', type: 'any', isCollection: true }
>>>>>>>
expect(metas.dxCollectionWidget.properties).toEqual([
{ name: 'collectionProperty', type: 'any', isCollection: true },
{ name: 'dataSourceProperty', type: 'any', isCollection: true } |
<<<<<<<
var c = Deps.autorun(function viewAutorun(c) {
return Blaze._withCurrentView(_inViewScope || self, function () {
=======
var c = Tracker.autorun(function viewAutorun(c) {
return Blaze.withCurrentView(_inViewScope || self, function () {
>>>>>>>
var c = Tracker.autorun(function viewAutorun(c) {
return Blaze._withCurrentView(_inViewScope || self, function () {
<<<<<<<
Blaze._withCurrentView(view, function () {
Deps.nonreactive(function fireCallbacks() {
=======
Blaze.withCurrentView(view, function () {
Tracker.nonreactive(function fireCallbacks() {
>>>>>>>
Blaze._withCurrentView(view, function () {
Tracker.nonreactive(function fireCallbacks() {
<<<<<<<
Blaze._materializeView = function (view, parentView) {
Blaze._createView(view, parentView);
=======
var domrange;
var needsRenderedCallback = false;
var scheduleRenderedCallback = function () {
if (needsRenderedCallback && ! view.isDestroyed &&
view._callbacks.rendered && view._callbacks.rendered.length) {
Tracker.afterFlush(function callRendered() {
if (needsRenderedCallback && ! view.isDestroyed) {
needsRenderedCallback = false;
Blaze._fireCallbacks(view, 'rendered');
}
});
}
};
>>>>>>>
Blaze._materializeView = function (view, parentView) {
Blaze._createView(view, parentView);
<<<<<<<
Deps.nonreactive(function doMaterialize() {
var materializer = new Blaze._DOMMaterializer({parentView: view});
=======
Tracker.nonreactive(function doMaterialize() {
var materializer = new Blaze.DOMMaterializer({parentView: view});
>>>>>>>
Tracker.nonreactive(function doMaterialize() {
var materializer = new Blaze._DOMMaterializer({parentView: view});
<<<<<<<
if (Deps.active) {
Deps.onInvalidate(function () {
Blaze._destroyView(view);
=======
if (Tracker.active) {
Tracker.onInvalidate(function () {
Blaze.destroyView(view);
>>>>>>>
if (Tracker.active) {
Tracker.onInvalidate(function () {
Blaze._destroyView(view); |
<<<<<<<
api.use('observe-sequence');
=======
api.use('templating');
>>>>>>>
api.use('observe-sequence');
api.use('templating'); |
<<<<<<<
// XXX HACK: If a sockjs connection, save off the URL. This is
// temporary and will go away in the near future.
self._socketUrl = socket.url;
// The `ConnectionHandle` for this session, passed to
// `Meteor.server.onConnection` callbacks.
=======
// This object is the public interface to the session. In the public
// API, it is called the `connection` object. Internally we call it
// a `connectionHandle` to avoid ambiguity.
>>>>>>>
// XXX HACK: If a sockjs connection, save off the URL. This is
// temporary and will go away in the near future.
self._socketUrl = socket.url;
// This object is the public interface to the session. In the public
// API, it is called the `connection` object. Internally we call it
// a `connectionHandle` to avoid ambiguity. |
<<<<<<<
var buildInfoJson = {
builtBy: compiler.BUILT_BY,
buildDependencies: { },
pluginDependencies: self.pluginWatchSet.toJSON(),
pluginProviderPackages: self.pluginProviderPackageDirs,
source: options.buildOfPath || undefined,
buildTimeDirectDependencies: buildTimeDirectDeps,
buildTimePluginDependencies: buildTimePluginDeps,
cordovaDependencies: self.cordovaDependencies
};
=======
buildInfoJson = {
builtBy: compiler.BUILT_BY,
buildDependencies: { },
pluginDependencies: self.pluginWatchSet.toJSON(),
pluginProviderPackages: self.pluginProviderPackageDirs,
source: options.buildOfPath || undefined,
buildTimeDirectDependencies: buildTimeDirectDeps,
buildTimePluginDependencies: buildTimePluginDeps
};
}
>>>>>>>
buildInfoJson = {
builtBy: compiler.BUILT_BY,
buildDependencies: { },
pluginDependencies: self.pluginWatchSet.toJSON(),
pluginProviderPackages: self.pluginProviderPackageDirs,
source: options.buildOfPath || undefined,
buildTimeDirectDependencies: buildTimeDirectDeps,
buildTimePluginDependencies: buildTimePluginDeps,
cordovaDependencies: self.cordovaDependencies
};
} |
<<<<<<<
Oauth.registerService("meteor-developer", 2, null, function (query) {
=======
MeteorDeveloperAccounts = {};
OAuth.registerService("meteor-developer", 2, null, function (query) {
>>>>>>>
OAuth.registerService("meteor-developer", 2, null, function (query) { |
<<<<<<<
// Trims whitespace & other filler characters of a line in a project file.
var trimLine = function (line) {
var match = line.match(/^([^#]*)#/);
if (match)
line = match[1];
line = line.replace(/^\s+|\s+$/g, ''); // leading/trailing whitespace
return line;
};
// Given a set of lines, each of the form "foo@bar", return an object of form
// {foo: "bar", bar: null}. If there is "bar", value of the corresponding key is
// null.
=======
// Given a set of lines, each of the form "foo@bar", return an array of form
// [{packageName: foo, versionConstraint: bar}]. If there is bar,
// versionConstraint is null.
>>>>>>>
// Given a set of lines, each of the form "foo@bar", return an object of form
// {foo: "bar", bar: null}. If there is "bar", value of the corresponding key is
// null.
// Trims whitespace & other filler characters of a line in a project file.
var trimLine = function (line) {
var match = line.match(/^([^#]*)#/);
if (match)
line = match[1];
line = line.replace(/^\s+|\s+$/g, ''); // leading/trailing whitespace
return line;
};
// Given a set of lines, each of the form "foo@bar", return an array of form
// [{packageName: foo, versionConstraint: bar}]. If there is bar,
// versionConstraint is null. |
<<<<<<<
Deps.flush();
=======
Meteor.flush();
});
Tinytest.add('templating - each falsy Issue #801', function (test) {
//Minor test for issue #801
Template.test_template_issue801.values = function() { return [1,2,null,undefined]; };
var frag = Meteor.render(Template.test_template_issue801);
test.equal(canonicalizeHtml(DomUtils.fragmentToHtml(frag)), "12null");
>>>>>>>
Deps.flush();
});
Tinytest.add('templating - each falsy Issue #801', function (test) {
//Minor test for issue #801
Template.test_template_issue801.values = function() { return [1,2,null,undefined]; };
var frag = Meteor.render(Template.test_template_issue801);
test.equal(canonicalizeHtml(DomUtils.fragmentToHtml(frag)), "12null"); |
<<<<<<<
message: 'Unknown option found: abc. Allowed keys: acorn, acornInjectPlugins, cache, context, experimentalCodeSplitting, experimentalDynamicImport, input, legacy, moduleContext, onwarn, perf, plugins, preferConst, preserveSymlinks, treeshake, watch, entry, external, amd, banner, dir, exports, extend, file, footer, format, freeze, globals, indent, interop, intro, legacy, name, namespaceToStringTag, noConflict, outro, paths, sourcemap, sourcemapFile, strict, pureExternalModules'
=======
message: 'Unknown option found: abc. Allowed keys: input, legacy, treeshake, acorn, acornInjectPlugins, context, moduleContext, plugins, onwarn, watch, cache, preferConst, experimentalDynamicImport, experimentalCodeSplitting, preserveSymlinks, experimentalPreserveModules, entry, external, extend, amd, banner, footer, intro, format, outro, sourcemap, sourcemapFile, name, globals, interop, legacy, freeze, indent, strict, noConflict, paths, exports, file, dir, pureExternalModules'
>>>>>>>
message: 'Unknown option found: abc. Allowed keys: acorn, acornInjectPlugins, cache, context, experimentalCodeSplitting, experimentalDynamicImport, experimentalPreserveModules, input, legacy, moduleContext, onwarn, perf, plugins, preferConst, preserveSymlinks, treeshake, watch, entry, external, amd, banner, dir, exports, extend, file, footer, format, freeze, globals, indent, interop, intro, legacy, name, namespaceToStringTag, noConflict, outro, paths, sourcemap, sourcemapFile, strict, pureExternalModules' |
<<<<<<<
// Special case on reserved package namespaces, such as 'cordova'
var filteredPackages = cordova.filterPackages(options.args);
var cordovaPlugins = filteredPackages.plugins;
// Update the plugins list
project.removeCordovaPlugins(cordovaPlugins);
_.each(cordovaPlugins, function (plugin) {
process.stdout.write("removed cordova plugin " + plugin + "\n");
});
var args = filteredPackages.rest;
if (_.isEmpty(args))
return 0;
// Refresh the catalog, checking the remote package data on the
// server. Technically, we don't need to do this, since it is unlikely that
// new data will change our constraint solver decisions. But as a user, I
// would expect this command to update the local catalog.
// XXX what if we're offline?
refreshOfficialCatalogOrDie();
=======
// As user may expect this to update the catalog, but we con't actually need
// to, and it takes frustratingly long.
// refreshOfficialCatalogOrDie();
>>>>>>>
// Special case on reserved package namespaces, such as 'cordova'
var filteredPackages = cordova.filterPackages(options.args);
var cordovaPlugins = filteredPackages.plugins;
// Update the plugins list
project.removeCordovaPlugins(cordovaPlugins);
_.each(cordovaPlugins, function (plugin) {
process.stdout.write("removed cordova plugin " + plugin + "\n");
});
var args = filteredPackages.rest;
if (_.isEmpty(args))
return 0;
// As user may expect this to update the catalog, but we con't actually need
// to, and it takes frustratingly long.
// refreshOfficialCatalogOrDie(); |
<<<<<<<
// Special case on reserved package namespaces, such as 'cordova'
var cordovaPlugins;
try {
var filteredPackages = cordova.filterPackages(options.args);
cordovaPlugins = filteredPackages.plugins;
_.each(cordovaPlugins, function (plugin) {
cordova.checkIsValidPlugin(plugin);
});
} catch (err) {
process.stderr.write(err.message + '\n');
return 1;
}
var oldPlugins = project.getCordovaPlugins();
var pluginsDict = {};
_.each(cordovaPlugins, function (s) {
var splt = s.split('@');
if (splt.length !== 2)
throw new Error(s + ': exact version or tarball url is required');
pluginsDict[splt[0]] = splt[1];
});
project.addCordovaPlugins(pluginsDict);
_.each(cordovaPlugins, function (plugin) {
process.stdout.write("added cordova plugin " + plugin + "\n");
});
var args = filteredPackages.rest;
if (_.isEmpty(args))
return 0;
=======
// For every package name specified, add it to our list of package
// constraints. Don't run the constraint solver until you have added all of
// them -- add should be an atomic operation regardless of the package
// order. Even though the package file should specify versions of its inputs,
// we don't specify these constraints until we get them back from the
// constraint solver.
//
// In the interests of failing fast, we do this check before refreshing the
// catalog, touching the project, etc, since these parsings are purely
// syntactic.
var constraints = _.map(options.args, function (packageReq) {
try {
return utils.parseConstraint(packageReq);
} catch (e) {
if (!e.versionParserError)
throw e;
console.log("Error: " + e.message);
throw new main.ExitWithCode(1);
}
});
>>>>>>>
// Special case on reserved package namespaces, such as 'cordova'
var cordovaPlugins;
try {
var filteredPackages = cordova.filterPackages(options.args);
cordovaPlugins = filteredPackages.plugins;
_.each(cordovaPlugins, function (plugin) {
cordova.checkIsValidPlugin(plugin);
});
} catch (err) {
process.stderr.write(err.message + '\n');
return 1;
}
var oldPlugins = project.getCordovaPlugins();
var pluginsDict = {};
_.each(cordovaPlugins, function (s) {
var splt = s.split('@');
if (splt.length !== 2)
throw new Error(s + ': exact version or tarball url is required');
pluginsDict[splt[0]] = splt[1];
});
project.addCordovaPlugins(pluginsDict);
_.each(cordovaPlugins, function (plugin) {
process.stdout.write("added cordova plugin " + plugin + "\n");
});
var args = filteredPackages.rest;
if (_.isEmpty(args))
return 0;
// For every package name specified, add it to our list of package
// constraints. Don't run the constraint solver until you have added all of
// them -- add should be an atomic operation regardless of the package
// order. Even though the package file should specify versions of its inputs,
// we don't specify these constraints until we get them back from the
// constraint solver.
//
// In the interests of failing fast, we do this check before refreshing the
// catalog, touching the project, etc, since these parsings are purely
// syntactic.
var constraints = _.map(options.args, function (packageReq) {
try {
return utils.parseConstraint(packageReq);
} catch (e) {
if (!e.versionParserError)
throw e;
console.log("Error: " + e.message);
throw new main.ExitWithCode(1);
}
});
<<<<<<<
// For every package name specified, add it to our list of package
// constraints. Don't run the constraint solver until you have added all of
// them -- add should be an atomic operation regardless of the package
// order. Even though the package file should specify versions of its inputs,
// we don't specify these constraints until we get them back from the
// constraint solver.
var constraints = _.map(args, function (packageReq) {
return utils.parseConstraint(packageReq);
});
=======
>>>>>>>
// For every package name specified, add it to our list of package
// constraints. Don't run the constraint solver until you have added all of
// them -- add should be an atomic operation regardless of the package
// order. Even though the package file should specify versions of its inputs,
// we don't specify these constraints until we get them back from the
// constraint solver.
var constraints = _.map(args, function (packageReq) {
return utils.parseConstraint(packageReq);
}); |
<<<<<<<
var oldValue = self.keys[key];
if (value === oldValue)
=======
if (typeof value !== 'string' &&
typeof value !== 'number' &&
typeof value !== 'boolean' &&
value !== null && value !== undefined)
throw new Error("Session.set: value can't be an object");
var old_value = self.keys[key];
if (value === old_value)
>>>>>>>
if (typeof value !== 'string' &&
typeof value !== 'number' &&
typeof value !== 'boolean' &&
value !== null && value !== undefined)
throw new Error("Session.set: value can't be an object");
var oldValue = self.keys[key];
if (value === oldValue) |
<<<<<<<
// Get all local packages available. Returns a map from the package name to the
// version record for that package.
var getLocalPackages = function () {
var ret = {};
buildmessage.assertInCapture();
var names = catalog.complete.getAllPackageNames();
_.each(names, function (name) {
if (catalog.complete.isLocalPackage(name)) {
ret[name] = catalog.complete.getLatestVersion(name);
}
});
return ret;
};
var parseHostPort = function (str) {
// XXX factor this out into a {type: host/port}?
var portMatch = str.match(/^(?:(.+):)?([0-9]+)$/);
if (!portMatch) {
throw new Error(
"run: --port (-p) must be a number or be of the form 'host:port' where\n" +
"port is a number. Try 'meteor help run' for help.\n");
}
var host = portMatch[1] || 'localhost';
var port = parseInt(portMatch[2]);
return {
host: host,
port: port
};
};
=======
>>>>>>>
var parseHostPort = function (str) {
// XXX factor this out into a {type: host/port}?
var portMatch = str.match(/^(?:(.+):)?([0-9]+)$/);
if (!portMatch) {
throw new Error(
"run: --port (-p) must be a number or be of the form 'host:port' where\n" +
"port is a number. Try 'meteor help run' for help.\n");
}
var host = portMatch[1] || 'localhost';
var port = parseInt(portMatch[2]);
return {
host: host,
port: port
};
};
<<<<<<<
var localPackageNames = [];
if (packages.length === 0) {
// Only test local packages if no package is specified.
// XXX should this use the new getLocalPackageNames?
var packageList = commandsPackages.doOrDie(function () {
return getLocalPackages();
});
if (! packageList) {
// Couldn't load the package list, probably because some package
// has a parse error. Bail out -- this kind of sucks; we would
// like to find a way to get reloading.
throw new Error("No packages to test");
}
testPackages = _.keys(packageList);
=======
if (options.args.length === 0) {
// Test all local packages if no package is specified.
testPackages = catalog.complete.getLocalPackageNames();
>>>>>>>
var localPackageNames = [];
if (packages.length === 0) {
// Test all local packages if no package is specified.
// XXX should this use the new getLocalPackageNames?
var packageList = commandsPackages.doOrDie(function () {
return getLocalPackages();
});
if (! packageList) {
// Couldn't load the package list, probably because some package
// has a parse error. Bail out -- this kind of sucks; we would
// like to find a way to get reloading.
throw new Error("No packages to test");
}
testPackages = catalog.complete.getLocalPackageNames(); |
<<<<<<<
api.use('accounts-urls', ['client', 'server']);
api.use('deps', 'client');
api.use('check', 'server');
api.use('random', ['client', 'server']);
=======
api.use('accounts-urls', 'client');
api.use('service-configuration', ['client', 'server']);
>>>>>>>
api.use('accounts-urls', ['client', 'server']);
api.use('deps', 'client');
api.use('check', 'server');
api.use('random', ['client', 'server']);
api.use('service-configuration', ['client', 'server']); |
<<<<<<<
version: '1.0.0'
});
Cordova.depends({
'org.apache.cordova.file': '1.2.0',
'org.apache.cordova.file-transfer': '0.4.4'
=======
version: '1.0.2'
>>>>>>>
version: '1.0.2'
});
Cordova.depends({
'org.apache.cordova.file': '1.2.0',
'org.apache.cordova.file-transfer': '0.4.4' |
<<<<<<<
api.export('SpacebarsCompiler');
api.use('spacebars');
api.imply('spacebars');
=======
api.use('spacebars-common');
api.imply('spacebars-common');
>>>>>>>
api.export('SpacebarsCompiler');
api.use('spacebars-common');
api.imply('spacebars-common'); |
<<<<<<<
var renderToDiv = function (comp, optData) {
var div = document.createElement("DIV");
if (optData == null) {
Blaze.renderComponent(comp, div);
} else {
var constructor =
(typeof comp === 'function' ? comp : comp.constructor);
Blaze.render(function () {
return Blaze.With(optData, function () {
return new constructor;
});
}).attach(div);
}
return div;
};
=======
>>>>>>>
<<<<<<<
);
// This test makes sure that Blaze correctly finds the controller
// heirarchy surrounding an element that itself doesn't have a
// controller.
Tinytest.add(
"spacebars-tests - template_tests - data context in event handlers on elements inside {{#if}}",
function (test) {
var tmpl = Template.spacebars_test_data_context_for_event_handler_in_if;
var data = null;
tmpl.events({
'click span': function () {
console.log('clicked!');
data = this;
}
});
var div = renderToDiv(tmpl);
document.body.appendChild(div);
clickIt(div.querySelector('span'));
test.equal(data, {foo: "bar"});
document.body.removeChild(div);
});
=======
);
// https://github.com/meteor/meteor/issues/2156
Tinytest.add(
"spacebars - template - each with inserts inside autorun",
function (test) {
var tmpl = Template.spacebars_test_each_with_autorun_insert;
var coll = new Meteor.Collection(null);
var rv = new ReactiveVar;
tmpl.items = function () {
return coll.find();
};
var div = renderToDiv(tmpl);
Deps.autorun(function () {
if (rv.get()) {
coll.insert({ name: rv.get() });
}
});
rv.set("foo1");
Deps.flush();
var firstId = coll.findOne()._id;
rv.set("foo2");
Deps.flush();
test.equal(canonicalizeHtml(div.innerHTML), "foo1 foo2");
coll.update(firstId, { $set: { name: "foo3" } });
Deps.flush();
test.equal(canonicalizeHtml(div.innerHTML), "foo3 foo2");
}
);
Tinytest.add(
"spacebars - ui hooks",
function (test) {
var tmpl = Template.spacebars_test_ui_hooks;
var rv = new ReactiveVar([]);
tmpl.items = function () {
return rv.get();
};
var div = renderToDiv(tmpl);
var hooks = [];
var container = div.querySelector(".test-ui-hooks");
// Before we attach the ui hooks, put two items in the DOM.
var origVal = [{ _id: 'foo1' }, { _id: 'foo2' }];
rv.set(origVal);
Deps.flush();
container._uihooks = {
insertElement: function (n, next) {
hooks.push("insert");
// check that the element hasn't actually been added yet
test.isTrue(n.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE);
test.isFalse(n.parentNode.parentNode);
},
removeElement: function (n) {
hooks.push("remove");
// check that the element hasn't actually been removed yet
test.isTrue(n.parentNode === container);
},
moveElement: function (n, next) {
hooks.push("move");
// check that the element hasn't actually been moved yet
test.isFalse(n.nextNode === next);
}
};
var testDomUnchanged = function () {
var items = div.getElementsByClassName("item");
test.equal(items.length, 2);
test.equal(items[0].innerHTML, "foo1");
test.equal(items[1].innerHTML, "foo2");
};
var newVal = _.clone(origVal);
newVal.push({ _id: 'foo3' });
rv.set(newVal);
Deps.flush();
test.equal(hooks, ['insert']);
testDomUnchanged();
newVal.reverse();
rv.set(newVal);
Deps.flush();
test.equal(hooks, ['insert', 'move']);
testDomUnchanged();
newVal = [origVal[0]];
rv.set(newVal);
Deps.flush();
test.equal(hooks, ['insert', 'move', 'remove']);
testDomUnchanged();
}
);
Tinytest.add(
"spacebars - access template instance from helper",
function (test) {
// Set a property on the template instance; check that it's still
// there from a helper.
var tmpl = Template.spacebars_test_template_instance_helper;
var value = Random.id();
var instanceFromHelper;
tmpl.created = function () {
this.value = value;
};
tmpl.foo = function () {
instanceFromHelper = UI._templateInstance();
};
var div = renderToDiv(tmpl);
test.equal(instanceFromHelper.value, value);
}
);
Tinytest.add(
"spacebars - access template instance from helper, " +
"template instance is kept up-to-date",
function (test) {
var tmpl = Template.spacebars_test_template_instance_helper;
var rv = new ReactiveVar("");
var instanceFromHelper;
tmpl.foo = function () {
instanceFromHelper = UI._templateInstance();
return rv.get();
};
var div = renderToDiv(tmpl);
rv.set("first");
Deps.flush();
// `nextSibling` because the first node is an empty text node.
test.equal($(instanceFromHelper.firstNode.nextSibling).text(), "first");
rv.set("second");
Deps.flush();
test.equal($(instanceFromHelper.firstNode.nextSibling).text(), "second");
// UI._templateInstance() should throw when called from not within a
// helper.
test.throws(function () {
UI._templateInstance();
});
}
);
>>>>>>>
);
// This test makes sure that Blaze correctly finds the controller
// heirarchy surrounding an element that itself doesn't have a
// controller.
Tinytest.add(
"spacebars-tests - template_tests - data context in event handlers on elements inside {{#if}}",
function (test) {
var tmpl = Template.spacebars_test_data_context_for_event_handler_in_if;
var data = null;
tmpl.events({
'click span': function () {
console.log('clicked!');
data = this;
}
});
var div = renderToDiv(tmpl);
document.body.appendChild(div);
clickIt(div.querySelector('span'));
test.equal(data, {foo: "bar"});
document.body.removeChild(div);
});
// https://github.com/meteor/meteor/issues/2156
Tinytest.add(
"spacebars - template - each with inserts inside autorun",
function (test) {
var tmpl = Template.spacebars_test_each_with_autorun_insert;
var coll = new Meteor.Collection(null);
var rv = new ReactiveVar;
tmpl.items = function () {
return coll.find();
};
var div = renderToDiv(tmpl);
Deps.autorun(function () {
if (rv.get()) {
coll.insert({ name: rv.get() });
}
});
rv.set("foo1");
Deps.flush();
var firstId = coll.findOne()._id;
rv.set("foo2");
Deps.flush();
test.equal(canonicalizeHtml(div.innerHTML), "foo1 foo2");
coll.update(firstId, { $set: { name: "foo3" } });
Deps.flush();
test.equal(canonicalizeHtml(div.innerHTML), "foo3 foo2");
}
);
Tinytest.add(
"spacebars - ui hooks",
function (test) {
var tmpl = Template.spacebars_test_ui_hooks;
var rv = new ReactiveVar([]);
tmpl.items = function () {
return rv.get();
};
var div = renderToDiv(tmpl);
var hooks = [];
var container = div.querySelector(".test-ui-hooks");
// Before we attach the ui hooks, put two items in the DOM.
var origVal = [{ _id: 'foo1' }, { _id: 'foo2' }];
rv.set(origVal);
Deps.flush();
container._uihooks = {
insertElement: function (n, next) {
hooks.push("insert");
// check that the element hasn't actually been added yet
test.isTrue(n.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE);
test.isFalse(n.parentNode.parentNode);
},
removeElement: function (n) {
hooks.push("remove");
// check that the element hasn't actually been removed yet
test.isTrue(n.parentNode === container);
},
moveElement: function (n, next) {
hooks.push("move");
// check that the element hasn't actually been moved yet
test.isFalse(n.nextNode === next);
}
};
var testDomUnchanged = function () {
var items = div.getElementsByClassName("item");
test.equal(items.length, 2);
test.equal(items[0].innerHTML, "foo1");
test.equal(items[1].innerHTML, "foo2");
};
var newVal = _.clone(origVal);
newVal.push({ _id: 'foo3' });
rv.set(newVal);
Deps.flush();
test.equal(hooks, ['insert']);
testDomUnchanged();
newVal.reverse();
rv.set(newVal);
Deps.flush();
test.equal(hooks, ['insert', 'move']);
testDomUnchanged();
newVal = [origVal[0]];
rv.set(newVal);
Deps.flush();
test.equal(hooks, ['insert', 'move', 'remove']);
testDomUnchanged();
}
);
Tinytest.add(
"spacebars - access template instance from helper",
function (test) {
// Set a property on the template instance; check that it's still
// there from a helper.
var tmpl = Template.spacebars_test_template_instance_helper;
var value = Random.id();
var instanceFromHelper;
tmpl.created = function () {
this.value = value;
};
tmpl.foo = function () {
instanceFromHelper = UI._templateInstance();
};
var div = renderToDiv(tmpl);
test.equal(instanceFromHelper.value, value);
}
);
Tinytest.add(
"spacebars - access template instance from helper, " +
"template instance is kept up-to-date",
function (test) {
var tmpl = Template.spacebars_test_template_instance_helper;
var rv = new ReactiveVar("");
var instanceFromHelper;
tmpl.foo = function () {
instanceFromHelper = UI._templateInstance();
return rv.get();
};
var div = renderToDiv(tmpl);
rv.set("first");
Deps.flush();
// `nextSibling` because the first node is an empty text node.
test.equal($(instanceFromHelper.firstNode.nextSibling).text(), "first");
rv.set("second");
Deps.flush();
test.equal($(instanceFromHelper.firstNode.nextSibling).text(), "second");
// UI._templateInstance() should throw when called from not within a
// helper.
test.throws(function () {
UI._templateInstance();
});
}
); |
<<<<<<<
exports.handlePackageServerConnectionError(err);
ret.data = null;
=======
self.handlePackageServerConnectionError(err);
ret.connectionFailed = true;
>>>>>>>
exports.handlePackageServerConnectionError(err);
ret.connectionFailed = true; |
<<<<<<<
let file = options.sourceMapFile || options.dest;
if ( file ) file = resolve( typeof process !== 'undefined' ? process.cwd() : '', file );
map = magicString.generateMap({
includeContent: true,
file
// TODO
});
=======
const file = options.sourceMapFile || options.dest;
map = magicString.generateMap({ file, includeContent: true });
if ( this.transformers.length || this.bundleTransformers.length ) {
map = collapseSourcemaps( map, usedModules, bundleSourcemapChain );
}
>>>>>>>
let file = options.sourceMapFile || options.dest;
if ( file ) file = resolve( typeof process !== 'undefined' ? process.cwd() : '', file );
map = magicString.generateMap({ file, includeContent: true });
if ( this.transformers.length || this.bundleTransformers.length ) {
map = collapseSourcemaps( map, usedModules, bundleSourcemapChain );
} |
<<<<<<<
Oauth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken)
);
});
=======
OAuth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken)
);
>>>>>>>
OAuth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken)
);
}); |
<<<<<<<
};
exports.isUrlWithSha = function (x) {
// For now, just support http/https, which is at least less restrictive than
// the old "github only" rule.
return /^https?:\/\/.*[0-9a-f]{40}/.test(x);
};
// If there is a version that isn't exact, throws an Error with a
// human-readable message that is suitable for showing to the user.
// dependencies may be falsey or empty.
exports.ensureOnlyExactVersions = function (dependencies) {
_.each(dependencies, function (version, name) {
// We want a given version of a smart package (package.js +
// .npm/npm-shrinkwrap.json) to pin down its dependencies precisely, so we
// don't want anything too vague. For now, we support semvers and urls that
// name a specific commit by SHA.
if (!semver.valid(version) && ! exports.isUrlWithSha(version))
throw new Error(
"Must declare exact version of dependency: " +
name + '@' + version);
});
};
exports.execFileSync = function (file, args, opts) {
var future = new Future;
var child_process = require('child_process');
var eachline = require('eachline');
if (opts && opts.pipeOutput) {
var p = child_process.spawn(file, args, opts);
eachline(p.stdout, fiberHelpers.bindEnvironment(function (line) {
process.stdout.write(line + '\n');
}));
eachline(p.stderr, fiberHelpers.bindEnvironment(function (line) {
process.stderr.write(line + '\n');
}));
p.on('exit', function (code) {
future.return(code);
});
return {
success: !future.wait(),
stdout: "",
stderr: ""
};
}
child_process.execFile(file, args, opts, function (err, stdout, stderr) {
future.return({
success: ! err,
stdout: stdout,
stderr: stderr
});
});
return future.wait();
};
exports.execFileAsync = function (file, args, opts) {
var child_process = require('child_process');
var eachline = require('eachline');
var p = child_process.spawn(file, args, opts);
var mapper = opts.lineMapper || _.identity;
var logOutput = fiberHelpers.bindEnvironment(function (line) {
if (opts.verbose) {
line = mapper(line);
console.log(line);
}
});
eachline(p.stdout, logOutput);
eachline(p.stderr, logOutput);
return p;
};
=======
};
// Patience: a way to make slow operations a little more bearable.
//
// It's frustrating when you write code that takes a while, either because it
// uses a lot of CPU or because it uses a lot of network/IO. There are two
// issues:
// - It would be nice to apologize/explain to users that an operation is
// taking a while... but not to spam them with the message when the
// operation is fast. This is true no matter which kind of slowness we
/// have.
// - In Node, consuming lots of CPU without yielding is especially bad.
// Other IO/network tasks will stall, and you can't even kill the process!
//
// Patience is a class to help alleviate the pain of long waits. When you're
// going to run a long operation, create a Patience object; when it's done (make
// sure to use try/finally!), stop() it.
//
// Within any code that may burn CPU for too long, call
// `utils.Patience.nudge()`. (This is a singleton method, not a method on your
// particular patience.) If there are any active Patience objects and it's been
// a while since your last yield, your Fiber will sleep momentarily. (So the
// caller has to be OK with yielding --- it has to be in a Fiber and it can't be
// anything that depends for correctness on not yielding!)
//
// In addition, for each Patience, you can specify a message (a string to print
// or a function to call) and a timeout for when that gets called. We use two
// strategies to try to call it: a standard JavaScript timeout, and as a backup
// in case we're getting CPU-starved, we also check during each nudge. The
// message will not be printed after the Patience is stopped, which prevents you
// from apologizing to users about operations that don't end up being slow.
exports.Patience = function (options) {
var self = this;
self._id = nextPatienceId++;
ACTIVE_PATIENCES[self._id] = self;
self._whenMessage = null;
self._message = null;
self._messageTimeout = null;
var now = +(new Date);
if (options.messageAfterMs) {
if (!options.message)
throw Error("missing message!");
if (typeof(options.message) !== 'string' &&
typeof(options.message) !== 'function') {
throw Error("message must be string or function");
}
self._message = options.message;
self._whenMessage = now + options.messageAfterMs;
self._messageTimeout = setTimeout(function () {
self._messageTimeout = null;
self._printMessage();
}, options.messageAfterMs);
}
// If this is the first patience we made, the next yield time is
// YIELD_EVERY_MS from now.
if (_.size(ACTIVE_PATIENCES) === 1) {
nextYield = now + YIELD_EVERY_MS;
}
};
var nextYield = null;
var YIELD_EVERY_MS = 150;
var ACTIVE_PATIENCES = {};
var nextPatienceId = 1;
exports.Patience.nudge = function () {
// Is it time to yield?
if (!_.isEmpty(ACTIVE_PATIENCES) &&
+(new Date) >= nextYield) {
nextYield = +(new Date) + YIELD_EVERY_MS;
utils.sleepMs(1);
}
// save a copy, in case it gets updated
var patienceIds = _.keys(ACTIVE_PATIENCES);
_.each(patienceIds, function (id) {
if (_.has(ACTIVE_PATIENCES, id)) {
ACTIVE_PATIENCES[id]._maybePrintMessage();
}
});
};
_.extend(exports.Patience.prototype, {
stop: function () {
var self = this;
delete ACTIVE_PATIENCES[self._id];
if (_.isEmpty(ACTIVE_PATIENCES)) {
nextYield = null;
}
self._clearMessageTimeout();
},
_maybePrintMessage: function () {
var self = this;
var now = +(new Date);
// Is it time to print a message?
if (self._whenMessage && +(new Date) >= self._whenMessage) {
self._printMessage();
}
},
_printMessage: function () {
var self = this;
// Did the timeout just fire, but we already printed the message due to a
// nudge while CPU-bound? We're done. (This shouldn't happen since we clear
// the timeout, but just in case...)
if (self._message === null)
return;
self._clearMessageTimeout();
// Pull out message, in case it's a function and it yields.
var message = self._message;
self._message = null;
if (typeof (message) === 'function') {
message();
} else {
console.log(message);
}
},
_clearMessageTimeout: function () {
var self = this;
if (self._messageTimeout) {
clearTimeout(self._messageTimeout);
self._messageTimeout = null;
}
self._whenMessage = null;
}
});
>>>>>>>
};
exports.isUrlWithSha = function (x) {
// For now, just support http/https, which is at least less restrictive than
// the old "github only" rule.
return /^https?:\/\/.*[0-9a-f]{40}/.test(x);
};
// If there is a version that isn't exact, throws an Error with a
// human-readable message that is suitable for showing to the user.
// dependencies may be falsey or empty.
exports.ensureOnlyExactVersions = function (dependencies) {
_.each(dependencies, function (version, name) {
// We want a given version of a smart package (package.js +
// .npm/npm-shrinkwrap.json) to pin down its dependencies precisely, so we
// don't want anything too vague. For now, we support semvers and urls that
// name a specific commit by SHA.
if (!semver.valid(version) && ! exports.isUrlWithSha(version))
throw new Error(
"Must declare exact version of dependency: " +
name + '@' + version);
});
};
exports.execFileSync = function (file, args, opts) {
var future = new Future;
var child_process = require('child_process');
var eachline = require('eachline');
if (opts && opts.pipeOutput) {
var p = child_process.spawn(file, args, opts);
eachline(p.stdout, fiberHelpers.bindEnvironment(function (line) {
process.stdout.write(line + '\n');
}));
eachline(p.stderr, fiberHelpers.bindEnvironment(function (line) {
process.stderr.write(line + '\n');
}));
p.on('exit', function (code) {
future.return(code);
});
return {
success: !future.wait(),
stdout: "",
stderr: ""
};
}
child_process.execFile(file, args, opts, function (err, stdout, stderr) {
future.return({
success: ! err,
stdout: stdout,
stderr: stderr
});
});
return future.wait();
};
exports.execFileAsync = function (file, args, opts) {
var child_process = require('child_process');
var eachline = require('eachline');
var p = child_process.spawn(file, args, opts);
var mapper = opts.lineMapper || _.identity;
var logOutput = fiberHelpers.bindEnvironment(function (line) {
if (opts.verbose) {
line = mapper(line);
console.log(line);
}
});
eachline(p.stdout, logOutput);
eachline(p.stderr, logOutput);
return p;
};
// Patience: a way to make slow operations a little more bearable.
//
// It's frustrating when you write code that takes a while, either because it
// uses a lot of CPU or because it uses a lot of network/IO. There are two
// issues:
// - It would be nice to apologize/explain to users that an operation is
// taking a while... but not to spam them with the message when the
// operation is fast. This is true no matter which kind of slowness we
/// have.
// - In Node, consuming lots of CPU without yielding is especially bad.
// Other IO/network tasks will stall, and you can't even kill the process!
//
// Patience is a class to help alleviate the pain of long waits. When you're
// going to run a long operation, create a Patience object; when it's done (make
// sure to use try/finally!), stop() it.
//
// Within any code that may burn CPU for too long, call
// `utils.Patience.nudge()`. (This is a singleton method, not a method on your
// particular patience.) If there are any active Patience objects and it's been
// a while since your last yield, your Fiber will sleep momentarily. (So the
// caller has to be OK with yielding --- it has to be in a Fiber and it can't be
// anything that depends for correctness on not yielding!)
//
// In addition, for each Patience, you can specify a message (a string to print
// or a function to call) and a timeout for when that gets called. We use two
// strategies to try to call it: a standard JavaScript timeout, and as a backup
// in case we're getting CPU-starved, we also check during each nudge. The
// message will not be printed after the Patience is stopped, which prevents you
// from apologizing to users about operations that don't end up being slow.
exports.Patience = function (options) {
var self = this;
self._id = nextPatienceId++;
ACTIVE_PATIENCES[self._id] = self;
self._whenMessage = null;
self._message = null;
self._messageTimeout = null;
var now = +(new Date);
if (options.messageAfterMs) {
if (!options.message)
throw Error("missing message!");
if (typeof(options.message) !== 'string' &&
typeof(options.message) !== 'function') {
throw Error("message must be string or function");
}
self._message = options.message;
self._whenMessage = now + options.messageAfterMs;
self._messageTimeout = setTimeout(function () {
self._messageTimeout = null;
self._printMessage();
}, options.messageAfterMs);
}
// If this is the first patience we made, the next yield time is
// YIELD_EVERY_MS from now.
if (_.size(ACTIVE_PATIENCES) === 1) {
nextYield = now + YIELD_EVERY_MS;
}
};
var nextYield = null;
var YIELD_EVERY_MS = 150;
var ACTIVE_PATIENCES = {};
var nextPatienceId = 1;
exports.Patience.nudge = function () {
// Is it time to yield?
if (!_.isEmpty(ACTIVE_PATIENCES) &&
+(new Date) >= nextYield) {
nextYield = +(new Date) + YIELD_EVERY_MS;
utils.sleepMs(1);
}
// save a copy, in case it gets updated
var patienceIds = _.keys(ACTIVE_PATIENCES);
_.each(patienceIds, function (id) {
if (_.has(ACTIVE_PATIENCES, id)) {
ACTIVE_PATIENCES[id]._maybePrintMessage();
}
});
};
_.extend(exports.Patience.prototype, {
stop: function () {
var self = this;
delete ACTIVE_PATIENCES[self._id];
if (_.isEmpty(ACTIVE_PATIENCES)) {
nextYield = null;
}
self._clearMessageTimeout();
},
_maybePrintMessage: function () {
var self = this;
var now = +(new Date);
// Is it time to print a message?
if (self._whenMessage && +(new Date) >= self._whenMessage) {
self._printMessage();
}
},
_printMessage: function () {
var self = this;
// Did the timeout just fire, but we already printed the message due to a
// nudge while CPU-bound? We're done. (This shouldn't happen since we clear
// the timeout, but just in case...)
if (self._message === null)
return;
self._clearMessageTimeout();
// Pull out message, in case it's a function and it yields.
var message = self._message;
self._message = null;
if (typeof (message) === 'function') {
message();
} else {
console.log(message);
}
},
_clearMessageTimeout: function () {
var self = this;
if (self._messageTimeout) {
clearTimeout(self._messageTimeout);
self._messageTimeout = null;
}
self._whenMessage = null;
}
}); |
<<<<<<<
import ru from './ru/index'
=======
import PTpt from './pt-pt/index'
>>>>>>>
import ru from './ru/index'
import PTpt from './pt-pt/index'
<<<<<<<
import translationsRU from '../src/locale/ru/index'
=======
import translationsPTpt from '../src/locale/pt-pt/index'
>>>>>>>
import translationsPTpt from '../src/locale/pt-pt/index'
import translationsRU from '../src/locale/ru/index'
<<<<<<<
nl,
ru
=======
nl,
'pt-pt': PTpt,
zh_cn,
nl
>>>>>>>
nl,
'pt-pt': PTpt,
zh_cn,
nl,
ru,
<<<<<<<
Vue.i18n.add('ru', translationsRU)
=======
Vue.i18n.add('pt-pt', translationsPTpt)
>>>>>>>
Vue.i18n.add('pt-pt', translationsPTpt)
Vue.i18n.add('ru', translationsRU) |
<<<<<<<
import zh_hk from './zh_hk/index'
=======
import fr from './fr/index'
>>>>>>>
import zh_hk from './zh_hk/index'
import fr from './fr/index'
<<<<<<<
import translationsZhHk from '../src/locale/zh_hk/index'
=======
import translationsFr from '../src/locale/fr/index'
>>>>>>>
import translationsZhHk from '../src/locale/zh_hk/index'
import translationsFr from '../src/locale/fr/index'
<<<<<<<
zh_cn,
zh_hk
=======
zh_cn,
fr
>>>>>>>
zh_cn,
zh_hk,
fr
<<<<<<<
Vue.i18n.add('zh_hk', translationsZhHk)
=======
Vue.i18n.add('fr', translationsFr)
>>>>>>>
Vue.i18n.add('zh_hk', translationsZhHk)
Vue.i18n.add('fr', translationsFr) |
<<<<<<<
import id from './id/index'
=======
import fr from './fr/index'
>>>>>>>
import fr from './fr/index'
import id from './id/index'
<<<<<<<
import translationsId from '../src/locale/id/index'
=======
import translationsFr from '../src/locale/fr/index'
>>>>>>>
import translationsFr from '../src/locale/fr/index'
import translationsId from '../src/locale/id/index'
<<<<<<<
zh_cn,
id
=======
zh_cn,
fr
>>>>>>>
zh_cn,
fr,
id
<<<<<<<
Vue.i18n.add('id', translationsId)
=======
Vue.i18n.add('fr', translationsFr)
>>>>>>>
Vue.i18n.add('fr', translationsFr)
Vue.i18n.add('id', translationsId) |
<<<<<<<
cards: React.PropTypes.array,
renderCards: React.PropTypes.func,
loop: React.PropTypes.bool,
renderNoMoreCards: React.PropTypes.func,
showYup: React.PropTypes.bool,
showNope: React.PropTypes.bool,
handleYup: React.PropTypes.func,
handleNope: React.PropTypes.func,
containerStyle: View.propTypes.style,
yupStyle: View.propTypes.style,
yupTextStyle: Text.propTypes.style,
nopeStyle: View.propTypes.style,
nopeTextStyle: Text.propTypes.style
=======
cards: React.PropTypes.array,
renderCards: React.PropTypes.func,
loop: React.PropTypes.bool,
renderNoMoreCards: React.PropTypes.func,
showYup: React.PropTypes.bool,
showNope: React.PropTypes.bool,
handleYup: React.PropTypes.func,
handleNope: React.PropTypes.func,
yupText: React.PropTypes.string,
noText: React.PropTypes.string,
>>>>>>>
cards: React.PropTypes.array,
renderCards: React.PropTypes.func,
loop: React.PropTypes.bool,
renderNoMoreCards: React.PropTypes.func,
showYup: React.PropTypes.bool,
showNope: React.PropTypes.bool,
handleYup: React.PropTypes.func,
handleNope: React.PropTypes.func,
yupText: React.PropTypes.string,
noText: React.PropTypes.string,
containerStyle: View.propTypes.style,
yupStyle: View.propTypes.style,
yupTextStyle: Text.propTypes.style,
nopeStyle: View.propTypes.style,
nopeTextStyle: Text.propTypes.style |
<<<<<<<
thread.saveCommandMessageToLogs(msg);
} else if (config.alwaysReply) {
=======
if (msg.content.startsWith(config.snippetPrefix)) return; // Ignore snippets
thread.saveCommandMessage(msg);
} else if (! msg.author.bot && config.alwaysReply) {
>>>>>>>
thread.saveCommandMessageToLogs(msg);
} else if (! msg.author.bot && config.alwaysReply) {
<<<<<<<
// 1) If this edit was in DMs
if (msg.channel instanceof Eris.PrivateChannel) {
=======
// 1) Edit in DMs
if (! msg.author.bot && msg.channel instanceof Eris.PrivateChannel) {
>>>>>>>
// 1) If this edit was in DMs
if (! msg.author.bot && msg.channel instanceof Eris.PrivateChannel) {
<<<<<<<
// 2) If this edit was a chat message in the thread
else if (utils.messageIsOnInboxServer(msg) && utils.isStaff(msg.member)) {
=======
// 2) Edit in the thread
else if (utils.messageIsOnInboxServer(msg) && (msg.author.bot || utils.isStaff(msg.member))) {
>>>>>>>
// 2) If this edit was a chat message in the thread
else if (utils.messageIsOnInboxServer(msg) && (msg.author.bot || utils.isStaff(msg.member))) { |
<<<<<<<
commands.addInboxThreadCommand("alert", "[opt:string]", async (msg, args, thread) => {
if (args.opt && args.opt.startsWith("c")) {
await thread.setAlert(null);
await thread.postSystemMessage("Cancelled new message alert");
=======
commands.addInboxThreadCommand('alert', '[opt:string]', async (msg, args, thread) => {
if (args.opt && args.opt.startsWith('c')) {
await thread.removeAlert(msg.author.id)
await thread.postSystemMessage(`Cancelled your new message alert`);
>>>>>>>
commands.addInboxThreadCommand("alert", "[opt:string]", async (msg, args, thread) => {
if (args.opt && args.opt.startsWith("c")) {
await thread.removeAlert(msg.author.id)
await thread.postSystemMessage("Cancelled new message alert"); |
<<<<<<<
endpoint: 'http://localhost:5005',
key: 'key',
=======
endpoint: 'endpoint',
key: urlBase64.encode(userPublicKey),
>>>>>>>
endpoint: 'http://localhost:5005',
key: urlBase64.encode(userPublicKey),
<<<<<<<
endpoint: 'http://localhost:5005',
key: 'key',
=======
endpoint: 'endpoint',
key: urlBase64.encode(userPublicKey),
>>>>>>>
endpoint: 'http://localhost:5005',
key: urlBase64.encode(userPublicKey),
<<<<<<<
endpoint: 'http://localhost:5005',
key: 'key',
=======
endpoint: 'endpoint2',
key: urlBase64.encode(userPublicKey),
>>>>>>>
endpoint: 'http://localhost:5005',
key: urlBase64.encode(userPublicKey),
<<<<<<<
endpoint: 'http://localhost:5005',
key: 'key',
=======
endpoint: 'endpoint',
key: urlBase64.encode(userPublicKey),
>>>>>>>
endpoint: 'http://localhost:5005',
key: urlBase64.encode(userPublicKey),
<<<<<<<
endpoint: 'http://localhost:5005',
key: 'key',
=======
endpoint: 'endpoint',
key: urlBase64.encode(userPublicKey),
>>>>>>>
endpoint: 'http://localhost:5005',
key: urlBase64.encode(userPublicKey),
<<<<<<<
endpoint: 'http://localhost:5005',
key: 'key',
=======
endpoint: 'endpoint',
key: urlBase64.encode(userPublicKey),
>>>>>>>
endpoint: 'http://localhost:5005',
key: urlBase64.encode(userPublicKey), |
<<<<<<<
'blobRegion', // Region where blobs are stored (no cloud-mirror)
'publicBlobBucket', // Bucket containing public blobs
'privateBlobBucket', // Bucket containing private blobs
'LRUcache', // LRU cache for tasks
=======
>>>>>>>
'LRUcache', // LRU cache for tasks |
<<<<<<<
imports: bundle.externalModules.map( module => module.id ),
exports: keys( bundle.entryModule.exports ),
generate: options => bundle.generate( options ),
=======
generate: options => bundle.render( options ),
>>>>>>>
imports: bundle.externalModules.map( module => module.id ),
exports: keys( bundle.entryModule.exports ),
generate: options => bundle.render( options ), |
<<<<<<<
await testing.fakeauth.withAnonymousScopes(['github:latest-status:abc123:*'], async () => {
await assert.rejects(() => got(
helper.apiClient.buildUrl(helper.apiClient.latest, 'abc123', 'unknownRepo', 'nosuch'),
{ followRedirect: false }), err => err.statusCode === 404);
});
});
test('latest link without scopes', async function() {
const client = new helper.GithubClient({ rootUrl: helper.rootUrl });
await assert.rejects(
() => client.latest('a', 'b', 'c'),
err => err.code === 'InsufficientScopes');
=======
await assert.rejects(() => got(
helper.apiClient.buildUrl(helper.apiClient.latest, 'abc123', 'unknownRepo', 'nosuch'),
{ followRedirect: false }), err => err.response.statusCode === 404);
>>>>>>>
await testing.fakeauth.withAnonymousScopes(['github:latest-status:abc123:*'], async () => {
await assert.rejects(() => got(
helper.apiClient.buildUrl(helper.apiClient.latest, 'abc123', 'unknownRepo', 'nosuch'),
{ followRedirect: false }), err => err.response.statusCode === 404);
});
});
test('latest link without scopes', async function() {
const client = new helper.GithubClient({ rootUrl: helper.rootUrl });
await assert.rejects(
() => client.latest('a', 'b', 'c'),
err => err.code === 'InsufficientScopes'); |
<<<<<<<
* global_ - global attributes (common among all graphs, AIUI)
* user_ - attributes set by the user
* axes_ - array of axis index to { series : [ series names ] , options : { axis-specific options. }
* series_ - { seriesName -> { idx, yAxis, options }
* labels_ - used as mapping from index to series name.
=======
* global - global attributes (common among all graphs, AIUI)
* user - attributes set by the user
* axes - map of options specific to the axis.
* series - { seriesName -> { idx, yAxis, options }
* labels - used as mapping from index to series name.
>>>>>>>
* global_ - global attributes (common among all graphs, AIUI)
* user - attributes set by the user
* axes_ - array of axis index to { series : [ series names ] , options : { axis-specific options. }
* series_ - { seriesName -> { idx, yAxis, options }}
* labels_ - used as mapping from index to series name.
<<<<<<<
return this.findForAxis(name, seriesObj["yAxis"]);
}
/**
* Returns the number of y-axes on the chart.
* @return {Number} the number of axes.
*/
DygraphOptions.prototype.numAxes = function() {
return this.axes_.length;
}
/**
* Return the y-axis for a given series, specified by name.
*/
DygraphOptions.prototype.axisForSeries = function(seriesName) {
return this.series_[seriesName].yAxis;
}
/**
* Returns the options for the specified axis.
*/
DygraphOptions.prototype.axisOptions = function(yAxis) {
return this.axes_[yAxis].options;
}
/**
* Return the series associated with an axis.
*/
DygraphOptions.prototype.seriesForAxis = function(yAxis) {
return this.axes_[yAxis].series;
}
=======
return this.getForAxis(name, seriesObj["yAxis"]);
};
>>>>>>>
return this.getForAxis(name, seriesObj["yAxis"]);
};
/**
* Returns the number of y-axes on the chart.
* @return {Number} the number of axes.
*/
DygraphOptions.prototype.numAxes = function() {
return this.axes_.length;
}
/**
* Return the y-axis for a given series, specified by name.
*/
DygraphOptions.prototype.axisForSeries = function(seriesName) {
return this.series_[seriesName].yAxis;
}
/**
* Returns the options for the specified axis.
*/
DygraphOptions.prototype.axisOptions = function(yAxis) {
return this.axes_[yAxis].options;
}
/**
* Return the series associated with an axis.
*/
DygraphOptions.prototype.seriesForAxis = function(yAxis) {
return this.axes_[yAxis].series;
} |
<<<<<<<
for (var i = l - 1; i >= 0; i--) {
=======
var isStacked = this.attr_("stackedGraph");
for (var i = 0; i < l; i++) {
>>>>>>>
var isStacked = this.attr_("stackedGraph");
for (var i = l - 1; i >= 0; i--) {
<<<<<<<
if (!this.attr_("stackedGraph")) {
this.selPoints_.unshift(points[i]);
=======
if (!isStacked) {
this.selPoints_.push(points[i]);
>>>>>>>
if (!isStacked) {
this.selPoints_.unshift(points[i]); |
<<<<<<<
};
/**
* Assert that all the elements in 'parent' with class 'className' is
* the expected font size.
*/
Util.assertFontSizes = function(parent, className, expectedSize) {
var expectedSizePx = expectedSize + "px";
var labels = parent.getElementsByClassName(className);
assertTrue(labels.length > 0);
// window.getComputedStyle is apparently compatible with all browsers
// (IE first became compatible with IE9.)
// If this test fails on earlier browsers, then enable something like this,
// because the font size is set by the parent div.
// if (!window.getComputedStyle) {
// fontSize = label.parentElement.style.fontSize;
// }
for (var idx = 0; idx < labels.length; idx++) {
var label = labels[idx];
var fontSize = window.getComputedStyle(label).fontSize;
assertEquals(expectedSizePx, fontSize);
}
};
=======
}
/**
* Takes in an array of strings and returns an array of floats.
*/
Util.makeNumbers = function(ary) {
var ret = [];
for (var i = 0; i < ary.length; i++) {
ret.push(parseFloat(ary[i]));
}
return ret;
}
>>>>>>>
};
/**
* Assert that all the elements in 'parent' with class 'className' is
* the expected font size.
*/
Util.assertFontSizes = function(parent, className, expectedSize) {
var expectedSizePx = expectedSize + "px";
var labels = parent.getElementsByClassName(className);
assertTrue(labels.length > 0);
// window.getComputedStyle is apparently compatible with all browsers
// (IE first became compatible with IE9.)
// If this test fails on earlier browsers, then enable something like this,
// because the font size is set by the parent div.
// if (!window.getComputedStyle) {
// fontSize = label.parentElement.style.fontSize;
// }
for (var idx = 0; idx < labels.length; idx++) {
var label = labels[idx];
var fontSize = window.getComputedStyle(label).fontSize;
assertEquals(expectedSizePx, fontSize);
}
};
/**
* Takes in an array of strings and returns an array of floats.
*/
Util.makeNumbers = function(ary) {
var ret = [];
for (var i = 0; i < ary.length; i++) {
ret.push(parseFloat(ary[i]));
}
return ret;
}; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.