conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
currentCustomizeScript: appContainer.config.customizeScript,
=======
currentCustomizeCss: appContainer.config.customizeCss,
>>>>>>>
currentCustomizeCss: appContainer.config.customizeCss,
currentCustomizeScript: appContainer.config.customizeScript,
<<<<<<<
* Change customize script
*/
changeCustomizeScript(inpuValue) {
this.setState({ currentCustomizeScript: inpuValue });
}
/**
=======
* Change custom css
*/
changeCustomCss(inputValue) {
this.setState({ currentCustomizeCss: inputValue });
}
/**
>>>>>>>
* Change custom css
*/
changeCustomCss(inputValue) {
this.setState({ currentCustomizeCss: inputValue });
}
/**
* Change customize script
*/
changeCustomizeScript(inpuValue) {
this.setState({ currentCustomizeScript: inpuValue });
}
/**
<<<<<<<
/**
* Update customize script
* @memberOf AdminCustomizeContainer
* @return {string} Scripts
*/
async updateCustomizeScript() {
// TODO GW-538 create apiV3
}
=======
/**
* Update customCss
* @memberOf AdminCustomizeContainer
* @return {string} css
*/
async updateCustomizeCss() {
// TODO GW-534 create apiV3
}
>>>>>>>
/**
* Update customCss
* @memberOf AdminCustomizeContainer
* @return {string} css
*/
async updateCustomizeCss() {
// TODO GW-534 create apiV3
}
/**
* Update customize script
* @memberOf AdminCustomizeContainer
* @return {string} Scripts
*/
async updateCustomizeScript() {
// TODO GW-538 create apiV3
} |
<<<<<<<
currentHighlightJsStyle: appContainer.config.highlightJsStyle,
isHighlightJsStyleBorderEnabled: appContainer.config.highlightJsStyleBorder,
=======
currentCustomizeCss: appContainer.config.customizeCss,
currentCustomizeScript: appContainer.config.customizeScript,
>>>>>>>
currentHighlightJsStyle: appContainer.config.highlightJsStyle,
isHighlightJsStyleBorderEnabled: appContainer.config.highlightJsStyleBorder,
currentCustomizeCss: appContainer.config.customizeCss,
currentCustomizeScript: appContainer.config.customizeScript,
<<<<<<<
* Switch highlightJsStyle
*/
switchHighlightJsStyle(value) {
this.setState({ currentHighlightJsStyle: value });
}
/**
* Switch highlightJsStyleBorder
*/
switchHighlightJsStyleBorder() {
this.setState({ isHighlightJsStyleBorderEnabled: !this.state.isHighlightJsStyleBorderEnabled });
}
/**
=======
* Change custom css
*/
changeCustomCss(inputValue) {
this.setState({ currentCustomizeCss: inputValue });
}
/**
* Change customize script
*/
changeCustomizeScript(inpuValue) {
this.setState({ currentCustomizeScript: inpuValue });
}
/**
>>>>>>>
* Switch highlightJsStyle
*/
switchHighlightJsStyle(value) {
this.setState({ currentHighlightJsStyle: value });
}
/**
* Switch highlightJsStyleBorder
*/
switchHighlightJsStyleBorder() {
this.setState({ isHighlightJsStyleBorderEnabled: !this.state.isHighlightJsStyleBorderEnabled });
}
/**
* Change custom css
*/
changeCustomCss(inputValue) {
this.setState({ currentCustomizeCss: inputValue });
}
/**
* Change customize script
*/
changeCustomizeScript(inpuValue) {
this.setState({ currentCustomizeScript: inpuValue });
}
/**
<<<<<<<
/**
* Update code highlight
* @memberOf AdminCustomizeContainer
* @return {Array} Code highlight
*/
async updateHighlightJsStyle() {
// TODO GW-515 create apiV3
}
=======
/**
* Update customCss
* @memberOf AdminCustomizeContainer
* @return {string} css
*/
async updateCustomizeCss() {
// TODO GW-534 create apiV3
}
/**
* Update customize script
* @memberOf AdminCustomizeContainer
* @return {string} Scripts
*/
async updateCustomizeScript() {
// TODO GW-538 create apiV3
}
>>>>>>>
/**
* Update code highlight
* @memberOf AdminCustomizeContainer
* @return {Array} Code highlight
*/
async updateHighlightJsStyle() {
// TODO GW-515 create apiV3
}
/**
* Update customCss
* @memberOf AdminCustomizeContainer
* @return {string} Customize css
*/
async updateCustomizeCss() {
// TODO GW-534 create apiV3
}
/**
* Update customize script
* @memberOf AdminCustomizeContainer
* @return {string} Customize scripts
*/
async updateCustomizeScript() {
// TODO GW-538 create apiV3
} |
<<<<<<<
=======
>>>>>>>
<<<<<<<
const globalLang = crowi.configManager.getConfig('crowi', 'app:globalLang');
=======
const globalLang = configManager.getConfig('crowi', 'globalLang');
>>>>>>>
const globalLang = configManager.getConfig('crowi', 'app:globalLang');
<<<<<<<
const globalLang = crowi.configManager.getConfig('crowi', 'app:globalLang');
=======
const configManager = crowi.configManager;
const globalLang = configManager.getConfig('crowi', 'globalLang');
>>>>>>>
const configManager = crowi.configManager;
const globalLang = configManager.getConfig('crowi', 'app:globalLang'); |
<<<<<<<
* GeneralSetting:
* type:object
* GuestModeParams:
* type: object
* properties:
* restrictGuestMode:
* type: string
* description: type of restrictGuestMode
* PageDeletionParams:
* type: object
* properties:
* pageCompleteDeletionAuthority:
* type: string
* description: type of pageDeletionAuthority
* Function:
* type: object
* properties:
* hideRestrictedByOwner:
* type: boolean
* description: enable hide by owner
* hideRestrictedByGroup:
* type: boolean
* description: enable hide by group
* TwitterOAuthSetting:
* type:object
* consumerKey:
* type: string
* description: key of comsumer
* consumerSecret:
* type: string
* description: password of comsumer
* isSameUsernameTreatedAsIdenticalUser
* type: boolean
* description: local account automatically linked the email matched
=======
* GeneralSetting:
* type:object
* GuestModeParams:
* type: object
* properties:
* restrictGuestMode:
* type: string
* description: type of restrictGuestMode
* PageDeletionParams:
* type: object
* properties:
* pageCompleteDeletionAuthority:
* type: string
* description: type of pageDeletionAuthority
* Function:
* type: object
* properties:
* hideRestrictedByOwner:
* type: boolean
* description: enable hide by owner
* hideRestrictedByGroup:
* type: boolean
* description: enable hide by group
>>>>>>>
* GeneralSetting:
* type:object
* GuestModeParams:
* type: object
* properties:
* restrictGuestMode:
* type: string
* description: type of restrictGuestMode
* PageDeletionParams:
* type: object
* properties:
* pageCompleteDeletionAuthority:
* type: string
* description: type of pageDeletionAuthority
* Function:
* type: object
* properties:
* hideRestrictedByOwner:
* type: boolean
* description: enable hide by owner
* hideRestrictedByGroup:
* type: boolean
* description: enable hide by group
* TwitterOAuthSetting:
* type:object
* consumerKey:
* type: string
* description: key of comsumer
* consumerSecret:
* type: string
* description: password of comsumer
* isSameUsernameTreatedAsIdenticalUser
* type: boolean
* description: local account automatically linked the email matched
<<<<<<<
* /security-setting/:
* get:
* tags: [SecuritySetting]
* description: Get security paramators
* responses:
* 200:
* description: params of security
* content:
* application/json:
* schema:
* properties:
* securityParams:
* $ref: '#/components/schemas/SecurityParams'
*/
router.get('/', loginRequiredStrictly, adminRequired, async(req, res) => {
const securityParams = {
generalAuth: {
isTwitterOAuthEnabled: await crowi.configManager.getConfig('crowi', 'security:passport-twitter:isEnabled'),
},
twitterOAuth: {
twitterConsumerKey: await crowi.configManager.getConfig('crowi', 'security:passport-twitter:consumerKey') || '',
twitterConsumerSecret: await crowi.configManager.getConfig('crowi', 'security:passport-twitter:consumerSecret') || '',
isSameUsernameTreatedAsIdenticalUser: await crowi.configManager.getConfig('crowi', 'security:passport-twitter:isSameUsernameTreatedAsIdenticalUser') || false,
},
};
return res.apiv3({ securityParams });
});
/**
* @swagger
*
* /security-setting/guest-mode:
=======
* /security-setting/general-setting:
>>>>>>>
* /security-setting/:
* get:
* tags: [SecuritySetting]
* description: Get security paramators
* responses:
* 200:
* description: params of security
* content:
* application/json:
* schema:
* properties:
* securityParams:
* $ref: '#/components/schemas/SecurityParams'
*/
router.get('/', loginRequiredStrictly, adminRequired, async(req, res) => {
const securityParams = {
generalAuth: {
isTwitterOAuthEnabled: await crowi.configManager.getConfig('crowi', 'security:passport-twitter:isEnabled'),
},
twitterOAuth: {
twitterConsumerKey: await crowi.configManager.getConfig('crowi', 'security:passport-twitter:consumerKey') || '',
twitterConsumerSecret: await crowi.configManager.getConfig('crowi', 'security:passport-twitter:consumerSecret') || '',
isSameUsernameTreatedAsIdenticalUser: await crowi.configManager.getConfig('crowi', 'security:passport-twitter:isSameUsernameTreatedAsIdenticalUser') || false,
},
};
return res.apiv3({ securityParams });
});
/**
* @swagger
*
* /security-setting/general-setting:
<<<<<<<
* $ref: '#/components/schemas/Function'
=======
* $ref: '#/components/schemas/SecurityParams/GeneralSetting'
>>>>>>>
* $ref: '#/components/schemas/SecurityParams/GeneralSetting' |
<<<<<<<
// don't add any more middlewares to this file.
// all new middlewares should be an independent file under /server/routes/middlewares
const debug = require('debug')('growi:lib:middlewares');
=======
// eslint-disable-next-line no-unused-vars
>>>>>>>
// don't add any more middlewares to this file.
// all new middlewares should be an independent file under /server/routes/middlewares
// eslint-disable-next-line no-unused-vars |
<<<<<<<
, UserGroup = models.UserGroup
=======
, ExternalAccount = models.ExternalAccount
>>>>>>>
, ExternalAccount = models.ExternalAccount
, UserGroup = models.UserGroup
<<<<<<<
actions.userGroup = {};
actions.userGroup.index = function (req, res) {
var page = parseInt(req.query.page) || 1;
UserGroup.findUserGroupsWithPagination({ page: page }, function (err, result) {
const pager = createPager(result.total, result.limit, result.page, result.pages, MAX_PAGE_LIST);
return res.render('admin/user_groups', {
userGroups: result.docs,
pager: pager
});
});
};
// actions.userGroup.create = function (req, res) {
// var form = req.form.createGroupForm;
// // var toSendEmail = form.sendEmail || false;
// // if (req.form.isValid) {
// User.createUsersByInvitation(form.userGroupName, function (err, newUserGroup) {
// if (err) {
// req.flash('errorMessage', req.form.errors.join('\n'));
// } else {
// req.flash('createdUserGroup', newUserGroup);
// }
// return res.redirect('/admin/user_groups');
// });
// // } else {
// // req.flash('errorMessage', req.form.errors.join('\n'));
// // return res.redirect('/admin/user_groups');
// // }
// };
=======
actions.externalAccount = {};
actions.externalAccount.index = function(req, res) {
const page = parseInt(req.query.page) || 1;
ExternalAccount.findAllWithPagination({page})
.then((result) => {
const pager = createPager(result.total, result.limit, result.page, result.pages, MAX_PAGE_LIST);
return res.render('admin/external-accounts', {
accounts: result.docs,
pager: pager
})
});
};
actions.externalAccount.remove = function(req, res) {
const accountId = req.params.id;
ExternalAccount.findOneAndRemove({accountId})
.then((result) => {
if (result == null) {
req.flash('errorMessage', '削除に失敗しました。');
return res.redirect('/admin/users/external-accounts');
}
else {
req.flash('successMessage', `外部アカウント '${accountId}' を削除しました`);
return res.redirect('/admin/users/external-accounts');
}
});
};
>>>>>>>
actions.externalAccount = {};
actions.externalAccount.index = function(req, res) {
const page = parseInt(req.query.page) || 1;
ExternalAccount.findAllWithPagination({page})
.then((result) => {
const pager = createPager(result.total, result.limit, result.page, result.pages, MAX_PAGE_LIST);
return res.render('admin/external-accounts', {
accounts: result.docs,
pager: pager
})
});
};
actions.externalAccount.remove = function(req, res) {
const accountId = req.params.id;
ExternalAccount.findOneAndRemove({accountId})
.then((result) => {
if (result == null) {
req.flash('errorMessage', '削除に失敗しました。');
return res.redirect('/admin/users/external-accounts');
}
else {
req.flash('successMessage', `外部アカウント '${accountId}' を削除しました`);
return res.redirect('/admin/users/external-accounts');
}
});
};
actions.userGroup = {};
actions.userGroup.index = function (req, res) {
var page = parseInt(req.query.page) || 1;
UserGroup.findUserGroupsWithPagination({ page: page }, function (err, result) {
const pager = createPager(result.total, result.limit, result.page, result.pages, MAX_PAGE_LIST);
return res.render('admin/user_groups', {
userGroups: result.docs,
pager: pager
});
});
};
// actions.userGroup.create = function (req, res) {
// var form = req.form.createGroupForm;
// // var toSendEmail = form.sendEmail || false;
// // if (req.form.isValid) {
// User.createUsersByInvitation(form.userGroupName, function (err, newUserGroup) {
// if (err) {
// req.flash('errorMessage', req.form.errors.join('\n'));
// } else {
// req.flash('createdUserGroup', newUserGroup);
// }
// return res.redirect('/admin/user_groups');
// });
// // } else {
// // req.flash('errorMessage', req.form.errors.join('\n'));
// // return res.redirect('/admin/user_groups');
// // }
// }; |
<<<<<<<
router.use('/app-settings', require('./app-settings')(crowi));
=======
router.use('/customize-setting', require('./customize-setting')(crowi));
>>>>>>>
router.use('/app-settings', require('./app-settings')(crowi));
router.use('/customize-setting', require('./customize-setting')(crowi)); |
<<<<<<<
Array.from(this.state.selectedPages).map((page) => {
const pageId = page._id;
const revisionId = page.revision._id;
this.props.crowi.apiPost('/pages.remove',
{page_id: pageId, revision_id: revisionId, completely: deleteCompletely})
.then(res => {
if (res.ok) {
this.state.selectedPages.delete(page);
}
else {
isDeleted = false;
}
}).catch(err => {
console.error(err.message); // eslint-disable-line no-console
isDeleted = false;
this.setState({errorMessageForDeleting: err.message});
=======
Promise.all(Array.from(this.state.selectedPages).map((page) => {
return new Promise((resolve, reject) => {
const pageId = page._id;
const revisionId = page.revision._id;
this.props.crowi.apiPost('/pages.remove', {page_id: pageId, revision_id: revisionId, completely: deleteCompletely})
.then(res => {
if (res.ok) {
this.state.selectedPages.delete(page);
return resolve();
}
else {
return reject();
}
})
.catch(err => {
/* eslint-disable no-console */
console.log(err.message);
/* eslint-enable */
this.setState({errorMessageForDeleting: err.message});
return reject();
});
>>>>>>>
Promise.all(Array.from(this.state.selectedPages).map((page) => {
return new Promise((resolve, reject) => {
const pageId = page._id;
const revisionId = page.revision._id;
this.props.crowi.apiPost('/pages.remove', {page_id: pageId, revision_id: revisionId, completely: deleteCompletely})
.then(res => {
if (res.ok) {
this.state.selectedPages.delete(page);
return resolve();
}
else {
return reject();
}
})
.catch(err => {
console.log(err.message); // eslint-disable-line no-console
this.setState({errorMessageForDeleting: err.message});
return reject();
}); |
<<<<<<<
define(['embed'], function(embed){
["indexOf", "lastIndexOf"].forEach(
function(name, idx){
embed[name] = function(arr, callback, thisObj){
// This is due to a bug found in in Chrome 9, FF 3.6 and 4:
// Having undefined as the second parameter to lastIndexOf
// will result in lastIndeOf interpreting this as 0.
// TODO: Do we want to have this in an own feature?
return typeof thisObj == "undefined" ?
Array.prototype[name].call(arr, callback) :
Array.prototype[name].call(arr, callback, thisObj);
};
}
);
["forEach", "map", "some", "every", "filter"].forEach(
function(name, idx){
embed[name] = function(arr, callback, thisObj){
if(typeof callback == "string"){
callback = new Function("item", "index", "array", callback);
}
return Array.prototype[name].call(arr, callback, thisObj);
};
=======
dojo.indexOf = function(arr, value, fromIndex){
// summary:
// locates the first index of the provided value in the
// passed array. If the value is not found, -1 is returned.
// description:
// This method corresponds to the JavaScript 1.6 Array.indexOf method, with one difference: when
// run over sparse arrays, the Dojo function invokes the callback for every index whereas JavaScript
// 1.6's indexOf skips the holes in the sparse array.
// For details on this method, see:
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/indexOf
// example:
// >>> // Positive usage example for indexOf()
// >>> dojo.indexOf([2,4,6], 4) // Find number 4 in the given array.
// 1
// >>> // Failing usage example for indexOf()
// >>> dojo.indexOf([2,4,6], 3) // Find number 3 in the given array, will not be found.
// -1
return arr.indexOf(value, fromIndex);
};
dojo.lastIndexOf = function(arr, value, fromIndex){
// In chrome and ff there seems to be passed 0 if thisObj is undefined.
// >>> // Test for specific chrome+ff bug, third parameter
// >>> dojo.lastIndexOf([1,2,3,4,5,6], 3)
// 2
if (arguments.length < 3) {
return arr.lastIndexOf(value);
} else {
return arr.lastIndexOf(value, fromIndex);
}
};
//dojo.forEach = function(/*Array|String*/arr, /*Function|String*/callback, /*Object?*/thisObject){
// return arr.forEach(callback, thisObject);
//}
//["map", "some", "every", "filter"].forEach(
["forEach", "map", "some", "every", "filter"].forEach(
function(name, idx){
dojo[name] = function(arr, callback, thisObj){
if(typeof callback == "string"){
callback = new Function("item", "index", "array", callback);
}
//return Array.prototype[name].call(arr, callback, thisObj);
return arr[name](callback, thisObj);
>>>>>>>
define(['embed'], function(embed){
dojo.indexOf = function(arr, value, fromIndex){
// summary:
// locates the first index of the provided value in the
// passed array. If the value is not found, -1 is returned.
// description:
// This method corresponds to the JavaScript 1.6 Array.indexOf method, with one difference: when
// run over sparse arrays, the Dojo function invokes the callback for every index whereas JavaScript
// 1.6's indexOf skips the holes in the sparse array.
// For details on this method, see:
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/indexOf
// example:
// >>> // Positive usage example for indexOf()
// >>> dojo.indexOf([2,4,6], 4) // Find number 4 in the given array.
// 1
// >>> // Failing usage example for indexOf()
// >>> dojo.indexOf([2,4,6], 3) // Find number 3 in the given array, will not be found.
// -1
return arr.indexOf(value, fromIndex);
};
dojo.lastIndexOf = function(arr, value, fromIndex){
// In chrome and ff there seems to be passed 0 if thisObj is undefined.
// >>> // Test for specific chrome+ff bug, third parameter
// >>> dojo.lastIndexOf([1,2,3,4,5,6], 3)
// 2
if (arguments.length < 3) {
return arr.lastIndexOf(value);
} else {
return arr.lastIndexOf(value, fromIndex);
}
};
["forEach", "map", "some", "every", "filter"].forEach(
function(name, idx){
embed[name] = function(arr, callback, thisObj){
if(typeof callback == "string"){
callback = new Function("item", "index", "array", callback);
}
return Array.prototype[name].call(arr, callback, thisObj);
}; |
<<<<<<<
const { body } = require('express-validator/check');
const ErrorV3 = require('../../models/vo/error-apiv3');
=======
>>>>>>>
const { body } = require('express-validator/check');
const ErrorV3 = require('../../models/vo/error-apiv3');
<<<<<<<
const LIMIT_FOR_LIST = 10;
=======
const { query } = require('express-validator');
>>>>>>>
const LIMIT_FOR_LIST = 10;
const { query } = require('express-validator');
<<<<<<<
const apiV3FormValidator = require('../../middlewares/apiv3-form-validator')(crowi);
=======
const apiV3FormValidator = require('../../middlewares/apiv3-form-validator')(crowi);
>>>>>>>
const apiV3FormValidator = require('../../middlewares/apiv3-form-validator')(crowi); |
<<<<<<<
customizeScript: [
body('customizeScript').isString(),
],
=======
customizeCss: [
body('customizeCss').isString(),
],
>>>>>>>
customizeCss: [
body('customizeCss').isString(),
],
customizeScript: [
body('customizeScript').isString(),
],
<<<<<<<
/**
* @swagger
*
* /customize-setting/customizeScript:
* put:
* tags: [CustomizeSetting]
* description: Update customizeScript
* requestBody:
* required: true
* content:
* application/json:
* schama:
* type: object
* properties:
* customizeScript:
* description: customize script
* type: string
* responses:
* 200:
* description: Succeeded to update customize script
* content:
* application/json:
* schema:
* properties:
* customizedParams:
* $ref: '#/components/schemas/CustomizeStatus'
*/
router.put('/customize-script', loginRequiredStrictly, adminRequired, csrf, validator.customizeScript, ApiV3FormValidator, async(req, res) => {
const requestParams = {
'customize:script': req.body.customizeScript,
};
try {
await crowi.configManager.updateConfigsInTheSameNamespace('crowi', requestParams);
const customizedParams = {
customizeScript: await crowi.configManager.getConfig('crowi', 'customize:script'),
};
return res.apiv3({ customizedParams });
}
catch (err) {
const msg = 'Error occurred in updating customizeScript';
logger.error('Error', err);
return res.apiv3Err(new ErrorV3(msg, 'update-customizeScript-failed'));
}
});
=======
/**
* @swagger
*
* /customize-setting/customizeCss:
* put:
* tags: [CustomizeSetting]
* description: Update customizeCss
* requestBody:
* required: true
* content:
* application/json:
* schama:
* type: object
* properties:
* customizeCss:
* description: customize css
* type: string
* responses:
* 200:
* description: Succeeded to update customize css
* content:
* application/json:
* schema:
* properties:
* customizedParams:
* $ref: '#/components/schemas/CustomizeStatus'
*/
router.put('/customize-css', loginRequiredStrictly, adminRequired, csrf, validator.customizeCss, ApiV3FormValidator, async(req, res) => {
const requestParams = {
'customize:css': req.body.customizeCss,
};
try {
await crowi.configManager.updateConfigsInTheSameNamespace('crowi', requestParams);
const customizedParams = {
customizeCss: await crowi.configManager.getConfig('crowi', 'customize:css'),
};
return res.apiv3({ customizedParams });
}
catch (err) {
const msg = 'Error occurred in updating customizeCss';
logger.error('Error', err);
return res.apiv3Err(new ErrorV3(msg, 'update-customizeCss-failed'));
}
});
>>>>>>>
/**
* @swagger
*
* /customize-setting/customizeCss:
* put:
* tags: [CustomizeSetting]
* description: Update customizeCss
* requestBody:
* required: true
* content:
* application/json:
* schama:
* type: object
* properties:
* customizeCss:
* description: customize css
* type: string
* responses:
* 200:
* description: Succeeded to update customize css
* content:
* application/json:
* schema:
* properties:
* customizedParams:
* $ref: '#/components/schemas/CustomizeStatus'
*/
router.put('/customize-css', loginRequiredStrictly, adminRequired, csrf, validator.customizeCss, ApiV3FormValidator, async(req, res) => {
const requestParams = {
'customize:css': req.body.customizeCss,
};
try {
await crowi.configManager.updateConfigsInTheSameNamespace('crowi', requestParams);
const customizedParams = {
customizeCss: await crowi.configManager.getConfig('crowi', 'customize:css'),
};
return res.apiv3({ customizedParams });
}
catch (err) {
const msg = 'Error occurred in updating customizeCss';
logger.error('Error', err);
return res.apiv3Err(new ErrorV3(msg, 'update-customizeCss-failed'));
}
});
/**
* @swagger
*
* /customize-setting/customizeScript:
* put:
* tags: [CustomizeSetting]
* description: Update customizeScript
* requestBody:
* required: true
* content:
* application/json:
* schama:
* type: object
* properties:
* customizeScript:
* description: customize script
* type: string
* responses:
* 200:
* description: Succeeded to update customize script
* content:
* application/json:
* schema:
* properties:
* customizedParams:
* $ref: '#/components/schemas/CustomizeStatus'
*/
router.put('/customize-script', loginRequiredStrictly, adminRequired, csrf, validator.customizeScript, ApiV3FormValidator, async(req, res) => {
const requestParams = {
'customize:script': req.body.customizeScript,
};
try {
await crowi.configManager.updateConfigsInTheSameNamespace('crowi', requestParams);
const customizedParams = {
customizeScript: await crowi.configManager.getConfig('crowi', 'customize:script'),
};
return res.apiv3({ customizedParams });
}
catch (err) {
const msg = 'Error occurred in updating customizeScript';
logger.error('Error', err);
return res.apiv3Err(new ErrorV3(msg, 'update-customizeScript-failed'));
}
}); |
<<<<<<<
const validator = {
lineBreak: [
body('isEnabledLinebreaks').isBoolean(),
body('isEnabledLinebreaksInComments').isBoolean(),
],
presentationSetting: [
body('pageBreakSeparator').isInt().not().isEmpty(),
],
xssSetting: [
body('isEnabledXss').isBoolean(),
body('tagWhiteList').isArray(),
body('attrWhiteList').isArray(),
],
};
=======
const ErrorV3 = require('../../models/vo/error-apiv3');
const validator = {};
>>>>>>>
const ErrorV3 = require('../../models/vo/error-apiv3');
const validator = {
lineBreak: [
body('isEnabledLinebreaks').isBoolean(),
body('isEnabledLinebreaksInComments').isBoolean(),
],
presentationSetting: [
body('pageBreakSeparator').isInt().not().isEmpty(),
],
xssSetting: [
body('isEnabledXss').isBoolean(),
body('tagWhiteList').isArray(),
body('attrWhiteList').isArray(),
],
}; |
<<<<<<<
/**
* @swagger
*
* /page/archive:
* post:
* tags: [Page]
* summary: /page/archive
* description: create page archive
* requestBody:
* content:
* application/json:
* schema:
* properties:
* targetPagePath:
* type: string
* responses:
* 200:
* description: create page archive
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Page'
*/
router.post('/archive', accessTokenParser, loginRequired, async(req, res) => {
const PageArchive = crowi.model('PageArchive');
const filePath = 'path';
const creator = req.user._id;
const basePagePath = '/base';
const archive = await PageArchive.create({ filePath, creator, basePagePath });
console.log(archive);
});
=======
router.post('/archive', accessTokenParser, loginRequired, csrf, validator.archive, apiV3FormValidator, async(req, res) => {
const {
isCommentDownload,
isAttachmentFileDownload,
isSubordinatedPageDownload,
fileType,
hierarchyType,
hierarchyValue,
} = req.body;
console.log(isCommentDownload);
console.log(isAttachmentFileDownload);
console.log(fileType);
console.log(isSubordinatedPageDownload);
console.log(hierarchyType);
console.log(hierarchyValue);
return res.apiv3({});
});
>>>>>>>
/**
* @swagger
*
* /page/archive:
* post:
* tags: [Page]
* summary: /page/archive
* description: create page archive
* requestBody:
* content:
* application/json:
* schema:
* properties:
* targetPagePath:
* type: string
* responses:
* 200:
* description: create page archive
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Page'
*/
router.post('/archive', accessTokenParser, loginRequired, csrf, validator.archive, apiV3FormValidator, async(req, res) => {
const {
isCommentDownload,
isAttachmentFileDownload,
isSubordinatedPageDownload,
fileType,
hierarchyType,
hierarchyValue,
} = req.body;
const PageArchive = crowi.model('PageArchive');
const filePath = 'path';
const creator = req.user._id;
const basePagePath = '/base';
const archive = await PageArchive.create({ filePath, creator, basePagePath });
console.log(archive);
}); |
<<<<<<<
layoutType: Config.layoutType(config),
=======
env: {
PLANTUML_URI: env.PLANTUML_URI || null,
MATHJAX: env.MATHJAX || null,
},
>>>>>>>
layoutType: Config.layoutType(config),
env: {
PLANTUML_URI: env.PLANTUML_URI || null,
MATHJAX: env.MATHJAX || null,
}, |
<<<<<<<
s3Region: crowi.configManager.getConfig('crowi', 'aws:region'),
s3CustomEndpoint: crowi.configManager.getConfig('crowi', 'aws:customEndpoint'),
s3Bucket: crowi.configManager.getConfig('crowi', 'aws:bucket'),
s3AccessKeyId: crowi.configManager.getConfig('crowi', 'aws:accessKeyId'),
s3SecretAccessKey: crowi.configManager.getConfig('crowi', 'aws:secretAccessKey'),
=======
region: crowi.configManager.getConfig('crowi', 'aws:region'),
customEndpoint: crowi.configManager.getConfig('crowi', 'aws:customEndpoint'),
bucket: crowi.configManager.getConfig('crowi', 'aws:bucket'),
accessKeyId: crowi.configManager.getConfig('crowi', 'aws:accessKeyId'),
secretAccessKey: crowi.configManager.getConfig('crowi', 'aws:secretAccessKey'),
envGcsApiKeyJsonPath: crowi.configManager.getConfigFromEnvVars('crowi', 'gcs:apiKeyJsonPath'),
envGcsBucket: crowi.configManager.getConfigFromEnvVars('crowi', 'gcs:bucket'),
envGcsUploadNamespace: crowi.configManager.getConfigFromEnvVars('crowi', 'gcs:uploadNamespace'),
>>>>>>>
s3Region: crowi.configManager.getConfig('crowi', 'aws:region'),
s3CustomEndpoint: crowi.configManager.getConfig('crowi', 'aws:customEndpoint'),
s3Bucket: crowi.configManager.getConfig('crowi', 'aws:bucket'),
s3AccessKeyId: crowi.configManager.getConfig('crowi', 'aws:accessKeyId'),
s3SecretAccessKey: crowi.configManager.getConfig('crowi', 'aws:secretAccessKey'),
envGcsApiKeyJsonPath: crowi.configManager.getConfigFromEnvVars('crowi', 'gcs:apiKeyJsonPath'),
envGcsBucket: crowi.configManager.getConfigFromEnvVars('crowi', 'gcs:bucket'),
envGcsUploadNamespace: crowi.configManager.getConfigFromEnvVars('crowi', 'gcs:uploadNamespace'), |
<<<<<<<
const middlewares = require('../util/middlewares')(crowi);
=======
const middlewares = require('../util/middlewares')(crowi, app);
const accessTokenParser = require('../middleware/access-token-parser')(crowi);
const loginRequiredStrictly = require('../middleware/login-required')(crowi);
const loginRequired = require('../middleware/login-required')(crowi, true);
const adminRequired = require('../middleware/admin-required')(crowi);
const csrf = require('../middleware/csrf')(crowi);
>>>>>>>
const middlewares = require('../util/middlewares')(crowi, app);
const accessTokenParser = require('../middleware/access-token-parser')(crowi);
const loginRequiredStrictly = require('../middleware/login-required')(crowi);
const loginRequired = require('../middleware/login-required')(crowi, true);
const adminRequired = require('../middleware/admin-required')(crowi);
const csrf = require('../middleware/csrf')(crowi);
<<<<<<<
app.get('/admin/notification' , loginRequired() , adminRequired , admin.notification.index);
app.post('/admin/notification/slackIwhSetting', loginRequired() , adminRequired , csrf, form.admin.slackIwhSetting, admin.notification.slackIwhSetting);
app.post('/admin/notification/slackSetting', loginRequired() , adminRequired , csrf, form.admin.slackSetting, admin.notification.slackSetting);
app.get('/admin/notification/slackAuth' , loginRequired() , adminRequired , admin.notification.slackAuth);
app.get('/admin/notification/slackSetting/disconnect', loginRequired() , adminRequired , admin.notification.disconnectFromSlack);
app.post('/_api/admin/notification.add' , loginRequired() , adminRequired , csrf, admin.api.notificationAdd);
app.post('/_api/admin/notification.remove' , loginRequired() , adminRequired , csrf, admin.api.notificationRemove);
app.get('/_api/admin/users.search' , loginRequired() , adminRequired , admin.api.usersSearch);
app.get('/admin/global-notification/new' , loginRequired() , adminRequired , admin.globalNotification.detail);
app.get('/admin/global-notification/:id' , loginRequired() , adminRequired , admin.globalNotification.detail);
app.post('/admin/global-notification/new' , loginRequired() , adminRequired , form.admin.notificationGlobal, admin.globalNotification.create);
app.post('/_api/admin/global-notification/toggleIsEnabled', loginRequired() , adminRequired , admin.api.toggleIsEnabledForGlobalNotification);
app.post('/admin/global-notification/:id/update', loginRequired() , adminRequired , form.admin.notificationGlobal, admin.globalNotification.update);
app.post('/admin/global-notification/:id/remove', loginRequired() , adminRequired , admin.globalNotification.remove);
app.get('/admin/users' , loginRequired() , adminRequired , admin.user.index);
app.post('/admin/user/:id/makeAdmin' , loginRequired() , adminRequired , csrf, admin.user.makeAdmin);
app.post('/admin/user/:id/removeFromAdmin', loginRequired() , adminRequired , admin.user.removeFromAdmin);
app.post('/admin/user/:id/activate' , loginRequired() , adminRequired , csrf, admin.user.activate);
app.post('/admin/user/:id/suspend' , loginRequired() , adminRequired , csrf, admin.user.suspend);
app.post('/admin/user/:id/remove' , loginRequired() , adminRequired , csrf, admin.user.remove);
app.post('/admin/user/:id/removeCompletely' , loginRequired() , adminRequired , csrf, admin.user.removeCompletely);
=======
app.get('/admin/notification' , loginRequiredStrictly , adminRequired , admin.notification.index);
app.post('/admin/notification/slackIwhSetting', loginRequiredStrictly , adminRequired , csrf, form.admin.slackIwhSetting, admin.notification.slackIwhSetting);
app.post('/admin/notification/slackSetting', loginRequiredStrictly , adminRequired , csrf, form.admin.slackSetting, admin.notification.slackSetting);
app.get('/admin/notification/slackAuth' , loginRequiredStrictly , adminRequired , admin.notification.slackAuth);
app.get('/admin/notification/slackSetting/disconnect', loginRequiredStrictly , adminRequired , admin.notification.disconnectFromSlack);
app.post('/_api/admin/notification.add' , loginRequiredStrictly , adminRequired , csrf, admin.api.notificationAdd);
app.post('/_api/admin/notification.remove' , loginRequiredStrictly , adminRequired , csrf, admin.api.notificationRemove);
app.get('/_api/admin/users.search' , loginRequiredStrictly , adminRequired , admin.api.usersSearch);
app.get('/admin/global-notification/new' , loginRequiredStrictly , adminRequired , admin.globalNotification.detail);
app.get('/admin/global-notification/:id' , loginRequiredStrictly , adminRequired , admin.globalNotification.detail);
app.post('/admin/global-notification/new' , loginRequiredStrictly , adminRequired , form.admin.notificationGlobal, admin.globalNotification.create);
app.post('/_api/admin/global-notification/toggleIsEnabled', loginRequiredStrictly , adminRequired , admin.api.toggleIsEnabledForGlobalNotification);
app.post('/admin/global-notification/:id/update', loginRequiredStrictly , adminRequired , form.admin.notificationGlobal, admin.globalNotification.update);
app.post('/admin/global-notification/:id/remove', loginRequiredStrictly , adminRequired , admin.globalNotification.remove);
app.get('/admin/users' , loginRequiredStrictly , adminRequired , admin.user.index);
app.post('/admin/user/invite' , form.admin.userInvite , loginRequiredStrictly , adminRequired , csrf, admin.user.invite);
app.post('/admin/user/:id/makeAdmin' , loginRequiredStrictly , adminRequired , csrf, admin.user.makeAdmin);
app.post('/admin/user/:id/removeFromAdmin', loginRequiredStrictly , adminRequired , admin.user.removeFromAdmin);
app.post('/admin/user/:id/activate' , loginRequiredStrictly , adminRequired , csrf, admin.user.activate);
app.post('/admin/user/:id/suspend' , loginRequiredStrictly , adminRequired , csrf, admin.user.suspend);
app.post('/admin/user/:id/remove' , loginRequiredStrictly , adminRequired , csrf, admin.user.remove);
app.post('/admin/user/:id/removeCompletely' , loginRequiredStrictly , adminRequired , csrf, admin.user.removeCompletely);
>>>>>>>
app.get('/admin/notification' , loginRequiredStrictly , adminRequired , admin.notification.index);
app.post('/admin/notification/slackIwhSetting', loginRequiredStrictly , adminRequired , csrf, form.admin.slackIwhSetting, admin.notification.slackIwhSetting);
app.post('/admin/notification/slackSetting', loginRequiredStrictly , adminRequired , csrf, form.admin.slackSetting, admin.notification.slackSetting);
app.get('/admin/notification/slackAuth' , loginRequiredStrictly , adminRequired , admin.notification.slackAuth);
app.get('/admin/notification/slackSetting/disconnect', loginRequiredStrictly , adminRequired , admin.notification.disconnectFromSlack);
app.post('/_api/admin/notification.add' , loginRequiredStrictly , adminRequired , csrf, admin.api.notificationAdd);
app.post('/_api/admin/notification.remove' , loginRequiredStrictly , adminRequired , csrf, admin.api.notificationRemove);
app.get('/_api/admin/users.search' , loginRequiredStrictly , adminRequired , admin.api.usersSearch);
app.get('/admin/global-notification/new' , loginRequiredStrictly , adminRequired , admin.globalNotification.detail);
app.get('/admin/global-notification/:id' , loginRequiredStrictly , adminRequired , admin.globalNotification.detail);
app.post('/admin/global-notification/new' , loginRequiredStrictly , adminRequired , form.admin.notificationGlobal, admin.globalNotification.create);
app.post('/_api/admin/global-notification/toggleIsEnabled', loginRequiredStrictly , adminRequired , admin.api.toggleIsEnabledForGlobalNotification);
app.post('/admin/global-notification/:id/update', loginRequiredStrictly , adminRequired , form.admin.notificationGlobal, admin.globalNotification.update);
app.post('/admin/global-notification/:id/remove', loginRequiredStrictly , adminRequired , admin.globalNotification.remove);
app.get('/admin/users' , loginRequiredStrictly , adminRequired , admin.user.index);
app.post('/admin/user/:id/makeAdmin' , loginRequiredStrictly , adminRequired , csrf, admin.user.makeAdmin);
app.post('/admin/user/:id/removeFromAdmin', loginRequiredStrictly , adminRequired , admin.user.removeFromAdmin);
app.post('/admin/user/:id/activate' , loginRequiredStrictly , adminRequired , csrf, admin.user.activate);
app.post('/admin/user/:id/suspend' , loginRequiredStrictly , adminRequired , csrf, admin.user.suspend);
app.post('/admin/user/:id/remove' , loginRequiredStrictly , adminRequired , csrf, admin.user.remove);
app.post('/admin/user/:id/removeCompletely' , loginRequiredStrictly , adminRequired , csrf, admin.user.removeCompletely);
<<<<<<<
app.get('/admin/user-groups' , loginRequired(), adminRequired, admin.userGroup.index);
app.get('/admin/user-group-detail/:id' , loginRequired(), adminRequired, admin.userGroup.detail);
=======
app.get('/admin/user-groups' , loginRequiredStrictly, adminRequired, admin.userGroup.index);
app.get('/admin/user-group-detail/:id' , loginRequiredStrictly, adminRequired, admin.userGroup.detail);
app.post('/admin/user-group/create' , form.admin.userGroupCreate, loginRequiredStrictly, adminRequired, csrf, admin.userGroup.create);
app.post('/admin/user-group/:userGroupId/update', loginRequiredStrictly, adminRequired, csrf, admin.userGroup.update);
app.post('/admin/user-group.remove' , loginRequiredStrictly, adminRequired, csrf, admin.userGroup.removeCompletely);
app.get('/_api/admin/user-groups', loginRequiredStrictly, adminRequired, admin.api.userGroups);
// user-group-relations admin
app.post('/admin/user-group-relation/create', loginRequiredStrictly, adminRequired, csrf, admin.userGroupRelation.create);
app.post('/admin/user-group-relation/:id/remove-relation/:relationId', loginRequiredStrictly, adminRequired, csrf, admin.userGroupRelation.remove);
>>>>>>>
app.get('/admin/user-groups' , loginRequiredStrictly, adminRequired, admin.userGroup.index);
app.get('/admin/user-group-detail/:id' , loginRequiredStrictly, adminRequired, admin.userGroup.detail);
<<<<<<<
app.get('/admin/importer' , loginRequired() , adminRequired , admin.importer.index);
app.post('/_api/admin/settings/importerEsa' , loginRequired() , adminRequired , csrf, admin.importer.api.validators.importer.esa(),admin.api.importerSettingEsa);
app.post('/_api/admin/settings/importerQiita' ,loginRequired() , adminRequired , csrf , admin.importer.api.validators.importer.qiita(), admin.api.importerSettingQiita);
app.post('/_api/admin/import/esa' , loginRequired() , adminRequired , admin.api.importDataFromEsa);
app.post('/_api/admin/import/testEsaAPI' , loginRequired() , adminRequired , csrf, admin.api.testEsaAPI);
app.post('/_api/admin/import/qiita' , loginRequired() , adminRequired , admin.api.importDataFromQiita);
app.post('/_api/admin/import/testQiitaAPI' , loginRequired() , adminRequired , csrf, admin.api.testQiitaAPI);
app.get('/me' , loginRequired() , me.index);
app.get('/me/password' , loginRequired() , me.password);
app.get('/me/apiToken' , loginRequired() , me.apiToken);
app.post('/me' , loginRequired() , csrf , form.me.user , me.index);
=======
app.get('/admin/importer' , loginRequiredStrictly , adminRequired , admin.importer.index);
app.post('/_api/admin/settings/importerEsa' , loginRequiredStrictly , adminRequired , csrf , form.admin.importerEsa , admin.api.importerSettingEsa);
app.post('/_api/admin/settings/importerQiita' , loginRequiredStrictly , adminRequired , csrf , form.admin.importerQiita , admin.api.importerSettingQiita);
app.post('/_api/admin/import/esa' , loginRequiredStrictly , adminRequired , admin.api.importDataFromEsa);
app.post('/_api/admin/import/testEsaAPI' , loginRequiredStrictly , adminRequired , csrf , form.admin.importerEsa , admin.api.testEsaAPI);
app.post('/_api/admin/import/qiita' , loginRequiredStrictly , adminRequired , admin.api.importDataFromQiita);
app.post('/_api/admin/import/testQiitaAPI' , loginRequiredStrictly , adminRequired , csrf , form.admin.importerQiita , admin.api.testQiitaAPI);
// export management for admin
app.get('/admin/export' , loginRequiredStrictly , adminRequired ,admin.export.index);
app.get('/admin/export/:fileName' , loginRequiredStrictly , adminRequired ,admin.export.download);
app.get('/me' , loginRequiredStrictly , me.index);
app.get('/me/password' , loginRequiredStrictly , me.password);
app.get('/me/apiToken' , loginRequiredStrictly , me.apiToken);
app.post('/me' , loginRequiredStrictly , csrf , form.me.user , me.index);
>>>>>>>
app.get('/admin/importer' , loginRequiredStrictly , adminRequired , admin.importer.index);
app.post('/_api/admin/settings/importerEsa' , loginRequiredStrictly , adminRequired , csrf, admin.importer.api.validators.importer.esa(),admin.api.importerSettingEsa);
app.post('/_api/admin/settings/importerQiita' , loginRequiredStrictly , adminRequired , csrf , admin.importer.api.validators.importer.qiita(), admin.api.importerSettingQiita);
app.post('/_api/admin/import/esa' , loginRequiredStrictly , adminRequired , admin.api.importDataFromEsa);
app.post('/_api/admin/import/testEsaAPI' , loginRequiredStrictly , adminRequired , csrf, admin.api.testEsaAPI);
app.post('/_api/admin/import/qiita' , loginRequiredStrictly , adminRequired , admin.api.importDataFromQiita);
app.post('/_api/admin/import/testQiitaAPI' , loginRequiredStrictly , adminRequired , csrf, admin.api.testQiitaAPI);
app.get('/me' , loginRequiredStrictly , me.index);
app.get('/me/password' , loginRequiredStrictly , me.password);
app.get('/me/apiToken' , loginRequiredStrictly , me.apiToken);
app.post('/me' , loginRequiredStrictly , csrf , form.me.user , me.index); |
<<<<<<<
customtheme: require('./admin/customtheme'),
=======
customtitle: require('./admin/customtitle'),
>>>>>>>
customtheme: require('./admin/customtheme'),
customtitle: require('./admin/customtitle'), |
<<<<<<<
onBuildEnd: [],
onExit: []
=======
onBuildEnd: [],
dev: true,
verbose: false
>>>>>>>
onBuildEnd: [],
onExit: [],
dev: true,
verbose: false
<<<<<<<
if(!options.onExit) {
options.onExit = defaultOptions.onExit;
}
=======
if (!options.dev) {
options.dev = defaultOptions.dev;
}
if (!options.verbose) {
options.verbose = defaultOptions.verbose;
}
options = validateInput(options);
>>>>>>>
if (!options.onExit) {
options.onExit = defaultOptions.onExit;
}
if (!options.dev) {
options.dev = defaultOptions.dev;
}
if (!options.verbose) {
options.verbose = defaultOptions.verbose;
}
options = validateInput(options);
<<<<<<<
compiler.plugin("emit", function (compilation, callback) {
if(options.onBuildEnd.length){
console.log("Executing post-build scripts");
options.onBuildEnd.forEach(function(script){ exec(script, puts)});
}
callback();
});
compiler.plugin("done", function () {
if(options.onExit.length){
console.log("Executing addiotn scripts befor exit");
options.onExit.forEach(function(script){ exec(script, puts)});
}
});
=======
compiler.plugin('emit', function (compilation, callback) {
if (options.onBuildEnd.length) {
console.log('Executing post-build scripts');
options.onBuildEnd.forEach(function (script) {
exec(script, puts)
});
if (options.dev) {
options.onBuildEnd = [];
}
}
callback();
});
>>>>>>>
compiler.plugin('emit', function (compilation, callback) {
if (options.onBuildEnd.length) {
console.log('Executing post-build scripts');
options.onBuildEnd.forEach(function (script) {
exec(script, puts);
});
if (options.dev) {
options.onBuildEnd = [];
}
}
callback();
});
compiler.plugin("done", function () {
if (options.onExit.length) {
console.log("Executing addiotn scripts befor exit");
options.onExit.forEach(function (script) {
exec(script, puts);
});
}
}); |
<<<<<<<
if (word !== undefined) {
return (this.memory[loc + 1].toString(16) + this.memory[loc].toString(16)).toString(16);
}
return this.memory[loc].toString(16);
=======
return this.memory[loc].toString(16).toUpperCase();
>>>>>>>
if (word !== undefined) {
return (this.memory[loc + 1].toString(16) + this.memory[loc].toString(16)).toString(16);
}
return this.memory[loc].toString(16).toUpperCase();
<<<<<<<
"A1" : "lda_idx",
"B1" : "lda_idy"
=======
"A1" : "lda_ix",
"B1" : "lda_iy",
"84" : "sty_zp",
"94" : "sty_zpx",
"8C" : "sty_a"
>>>>>>>
"A1" : "lda_idx",
"B1" : "lda_idy"
"84" : "sty_zp",
"94" : "sty_zpx",
"8C" : "sty_a" |
<<<<<<<
return isObject(blob) ? Ok(blob) : makeErr('Must be an object', blob, []);
=======
return typeof blob === 'object' ? Ok(blob) : Err(annotate(blob, 'Must be an object'));
>>>>>>>
return isObject(blob) ? Ok(blob) : Err(annotate(blob, 'Must be an object')); |
<<<<<<<
* Creates a higher-order component which adds filtering capability to the
* wrapped component. Filters get applied when the original component is about
* to be mounted.
=======
* Creates a higher-order component which adds filtering capability to the wrapped component.
* Filters get applied when the original component is about to be mounted.
* When a filter is added or removed that matches the hook name, the wrapped component re-renders.
>>>>>>>
* Creates a higher-order component which adds filtering capability to the
* wrapped component. Filters get applied when the original component is about
* to be mounted. When a filter is added or removed that matches the hook name,
* the wrapped component re-renders. |
<<<<<<<
{ slug: 'rest-api', title: __( 'REST API Blocks' ) },
{ slug: 'embed', title: __( 'Embed' ) },
=======
{ slug: 'widgets', title: __( 'Widgets' ) },
>>>>>>>
{ slug: 'rest-api', title: __( 'REST API Blocks' ) },
{ slug: 'widgets', title: __( 'Widgets' ) },
{ slug: 'embed', title: __( 'Embed' ) }, |
<<<<<<<
if ( this.props.onSetup ) {
this.props.onSetup( editor );
}
=======
editor.on( 'selectionChange', this.onSelectionChange );
>>>>>>>
editor.on( 'selectionChange', this.onSelectionChange );
if ( this.props.onSetup ) {
this.props.onSetup( editor );
} |
<<<<<<<
this.onScroll = throttle( this.onScroll.bind( this ), 250 );
=======
this.isEndOfEditor = this.isEndOfEditor.bind( this );
>>>>>>>
this.onScroll = throttle( this.onScroll.bind( this ), 250 );
this.isEndOfEditor = this.isEndOfEditor.bind( this );
<<<<<<<
onScroll() {
if ( this.toolbarElem ) {
const n = findDOMNode( this.toolbarElem );
const blockControls = n ? n.closest( BLOCK_CONTROLS_SELECTOR ) : null;
if ( blockControls ) {
const currentTop = blockControls.getBoundingClientRect().top;
const stickyTop = parseInt( window.getComputedStyle( blockControls ).top, 10 );
const expandDown = currentTop - stickyTop <= MORE_DRAWER_HEIGHT;
this.setState( { expandDown } );
}
}
}
=======
isEndOfEditor() {
const range = this.editor.selection.getRng();
if ( range.endOffset !== range.endContainer.textContent.length || ! range.collapsed ) {
return false;
}
const start = range.endContainer;
const body = this.editor.getBody();
let element = start;
while ( element !== body ) {
const child = element;
element = element.parentNode;
if ( element.lastChild !== child ) {
return false;
}
}
return true;
}
>>>>>>>
onScroll() {
if ( this.toolbarElem ) {
const n = findDOMNode( this.toolbarElem );
const blockControls = n ? n.closest( BLOCK_CONTROLS_SELECTOR ) : null;
if ( blockControls ) {
const currentTop = blockControls.getBoundingClientRect().top;
const stickyTop = parseInt( window.getComputedStyle( blockControls ).top, 10 );
const expandDown = currentTop - stickyTop <= MORE_DRAWER_HEIGHT;
this.setState( { expandDown } );
}
}
}
isEndOfEditor() {
const range = this.editor.selection.getRng();
if ( range.endOffset !== range.endContainer.textContent.length || ! range.collapsed ) {
return false;
}
const start = range.endContainer;
const body = this.editor.getBody();
let element = start;
while ( element !== body ) {
const child = element;
element = element.parentNode;
if ( element.lastChild !== child ) {
return false;
}
}
return true;
} |
<<<<<<<
placeholder={ placeholder || __( 'New Paragraph' ) }
/>
</Autocomplete>,
=======
placeholder={ placeholder || __( 'Add text or type / to insert content' ) }
/>
</BlockAutocomplete>,
>>>>>>>
placeholder={ placeholder || __( 'Add text or type / to insert content' ) }
/>
</Autocomplete>, |
<<<<<<<
const getOptions = ( search ) => {
let payload;
if ( search ) {
payload = { data: { search } };
}
return ( new wp.api.collections.Users() ).fetch( payload ).then( ( users ) => {
=======
const getOptions = () => {
return wp.apiRequest( { path: '/wp/v2/users' } ).then( ( users ) => {
>>>>>>>
const getOptions = ( search ) => {
let payload;
if ( search ) {
payload = { data: { search } };
}
return wp.apiRequest( { path: '/wp/v2/users' } ).then( ( users ) => { |
<<<<<<<
const { ENTER, ESCAPE, UP, DOWN, LEFT, RIGHT, TAB, SPACE } = keycodes;
=======
const { ENTER, ESCAPE, UP, DOWN, LEFT, RIGHT } = keycodes;
>>>>>>>
const { ENTER, ESCAPE, UP, DOWN, LEFT, RIGHT, SPACE } = keycodes;
<<<<<<<
export default withSpokenMessages( withInstanceId( Autocomplete ) );
=======
export default flowRight( [
withInstanceId,
withFocusOutside,
] )( Autocomplete );
>>>>>>>
export default flowRight( [
withInstanceId,
withFocusOutside,
withSpokenMessages,
] )( Autocomplete ); |
<<<<<<<
export { default as ToolbarMenu } from './toolbar-menu';
=======
export { default as Popover } from './popover';
>>>>>>>
export { default as ToolbarMenu } from './toolbar-menu';
export { default as Popover } from './popover'; |
<<<<<<<
=======
* WordPress dependencies
*/
import { switchChildrenNodeName } from 'element';
import { Toolbar } from 'components';
/**
>>>>>>>
* WordPress dependencies
*/
import { Toolbar } from 'components';
/** |
<<<<<<<
config.oauth_token=access_token;
if(this.client && this.client.downstream){
this.client.downstream.init();
}
=======
setTimeout(()=>{
this.client.downstream.init();
},2000);
>>>>>>>
config.oauth_token=access_token;
setTimeout(()=>{
this.client.downstream.init();
},2000); |
<<<<<<<
it( 'allows named exports to be added explicitly via config', () => {
return rollup({
entry: 'samples/custom-named-exports/main.js',
plugins: [
npm({ main: true }),
commonjs({
namedExports: {
'samples/custom-named-exports/secret-named-exporter.js': [ 'named' ],
'external': [ 'message' ]
}
})
]
}).then( executeBundle );
});
=======
it( 'converts a CommonJS module with custom file extension', () => {
return rollup({
entry: 'samples/extension/main.coffee',
plugins: [ commonjs({ extensions: ['.coffee' ]}) ]
}).then( bundle => {
assert.equal( executeBundle( bundle ).exports, 42 );
});
});
>>>>>>>
it( 'allows named exports to be added explicitly via config', () => {
return rollup({
entry: 'samples/custom-named-exports/main.js',
plugins: [
npm({ main: true }),
commonjs({
namedExports: {
'samples/custom-named-exports/secret-named-exporter.js': [ 'named' ],
'external': [ 'message' ]
}
})
]
}).then( executeBundle );
});
it( 'converts a CommonJS module with custom file extension', () => {
return rollup({
entry: 'samples/extension/main.coffee',
plugins: [ commonjs({ extensions: ['.coffee' ]}) ]
}).then( bundle => {
assert.equal( executeBundle( bundle ).exports, 42 );
});
}); |
<<<<<<<
import { isEqual } from '../util/minilo'
import { makeWatchers } from '../util/vue-helpers'
=======
import { hasSource } from '../util/assert'
>>>>>>>
import { hasSource } from '../util/assert'
import { isEqual } from '../util/minilo'
import { makeWatchers } from '../util/vue-helpers' |
<<<<<<<
import { isEqual, isFunction, isString, pick, replaceTokens } from '../util/minilo'
import { makeWatchers } from '../util/vue-helpers'
=======
import { hasSource, hasView } from '../util/assert'
import { isFunction, isString, pick, replaceTokens } from '../util/minilo'
>>>>>>>
import { hasSource, hasView } from '../util/assert'
import { isEqual, isFunction, isString, pick, replaceTokens } from '../util/minilo'
import { makeWatchers } from '../util/vue-helpers'
<<<<<<<
this.scheduleRecreate()
},
tileKey (value) {
if (!this.$source || value === this.$source.getKey()) {
return
}
this.$source.setKey(value)
},
tileLoadFunction (value, prevValue) {
if (!this.$source || isEqual(value, prevValue)) return
this.$source.setTileLoadFunction(value)
},
url () {
if (!this.$source) return
=======
return this::source.methods.deinit()
},
/**
* @return {void}
* @protected
*/
mount () {
this::source.methods.mount()
},
/**
* @return {void}
* @protected
*/
unmount () {
this::source.methods.mount()
},
subscribeAll () {
this::subscribeToSourceEvents()
},
}
>>>>>>>
this.scheduleRecreate()
},
tileKey (value) {
if (!this.$source || value === this.$source.getKey()) {
return
}
this.$source.setKey(value)
},
tileLoadFunction (value, prevValue) {
if (!this.$source || isEqual(value, prevValue)) return
this.$source.setTileLoadFunction(value)
},
url () {
if (!this.$source) return
<<<<<<<
this.scheduleRecreate()
}),
...makeWatchers([
'maxZoom',
'minZoom',
'tileSize',
], () => function (value, prevValue) {
if (!this.$source || isEqual(value, prevValue)) return
this._tileGrid = this.createTileGrid()
this.$source.setTileGridForProjection(this.projection, this._tileGrid)
this.$source.setTileUrlFunction(this.createUrlFunc())
this.scheduleRefresh()
}),
},
=======
export default {
mixins: [source, withUrl],
props,
computed,
methods,
watch,
}
function subscribeToSourceEvents () {
hasSource(this)
const events = observableFromOlEvent(this.$source, [
'tileloadstart',
'tileloadend',
'tileloaderror',
])
this.subscribeTo(events, evt => this.$emit(evt.type, evt))
>>>>>>>
this.scheduleRecreate()
}),
...makeWatchers([
'maxZoom',
'minZoom',
'tileSize',
], () => function (value, prevValue) {
if (!this.$source || isEqual(value, prevValue)) return
this._tileGrid = this.createTileGrid()
this.$source.setTileGridForProjection(this.projection, this._tileGrid)
this.$source.setTileUrlFunction(this.createUrlFunc())
this.scheduleRefresh()
}),
},
}
function subscribeToSourceEvents () {
hasSource(this)
const events = observableFromOlEvent(this.$source, [
'tileloadstart',
'tileloadend',
'tileloaderror',
])
this.subscribeTo(events, evt => this.$emit(evt.type, evt)) |
<<<<<<<
import uuid from 'uuid/v4'
=======
/** @module ol-ext/feature */
>>>>>>>
/** @module ol-ext/feature */
import uuid from 'uuid/v4' |
<<<<<<<
AutomationController.prototype.setProfiles = function () {
var langFile = this.loadMainLang();
if (!this.profiles || this.profiles.length === 0) {
sid = _.uniqueId('sua'+ Math.floor(new Date().getTime() /1000));
this.profiles = [{
id: 1,
sid: sid,
role: 1,
login: 'admin',
password: 'admin',
name: langFile.profile_name,
last_login: null,
lang:'en',
color:'#dddddd',
default_ui: 1,
dashboard: [],
interval: 2000,
rooms:[],
expert_view: false,
hide_all_device_events: false,
hide_system_events: false,
hide_single_device_events: []
}];
}
return this.profiles;
};
=======
>>>>>>>
AutomationController.prototype.getListProfiles = function () {
return this.profiles;
};
<<<<<<<
AutomationController.prototype.createProfile = function (object) {
var id = this.profiles.length ? this.profiles[this.profiles.length - 1].id + 1 : 1,
sid = _.uniqueId('u'+ Math.floor(new Date().getTime() /1000));
profile = {
id: id,
sid: sid,
role: object.role || 2,
login: object.login,
password: object.password,
name: object.name,
lang: object.lang,
color: object.color,
default_ui: object.default_ui,
dashboard: object.dashboard,
interval: parseInt(object.interval),
rooms: object.rooms,
expert_view: object.expert_view || false,
hide_all_device_events: object.hide_all_device_events,
hide_system_events: object.hide_system_events,
hide_single_device_events: object.hide_single_device_events
};
_.defaults(profile, {
sid: null,
role: null, // admin = 1, user = 2
login: '',
password: null,
name: '',
last_login: null,
lang:'en',
color:'#dddddd',
default_ui: 1,
dashboard: [],
interval: 2000,
rooms:[],
expert_view: false,
hide_all_device_events: false,
hide_system_events: false,
hide_single_device_events: []
});
=======
AutomationController.prototype.createProfile = function (profile) {
var id = this.profiles.length ? this.profiles[this.profiles.length - 1].id + 1 : 1;
profile.id = id;
>>>>>>>
AutomationController.prototype.createProfile = function (profile) {
var id = this.profiles.length ? this.profiles[this.profiles.length - 1].id + 1 : 1;
profile.id = id;
<<<<<<<
_.defaults(this.profiles[index], {
role: null, // admin = 1, user = 2
name: '',
lang:'en',
color:'#dddddd',
default_ui: 1,
dashboard: [],
interval: 2000,
rooms:[],
expert_view: false,
hide_all_device_events: false,
hide_system_events: false,
hide_single_device_events: []
});
=======
>>>>>>> |
<<<<<<<
this.zway.controller.data.smartStart.dskProvisioningList.value = dskProvisioningList;
=======
var zway = this.zway;
/* TODO
// get controller node
var controllerNode = zway.controller.data.nodeId.value;
// update provisioning list
zway.devices[controllerNode].data.smartStart.dskProvisioningList.value = dskProvisioningList;
*/
// update provisioning list
zway.controller.data.smartStart.dskProvisioningList.value = dskProvisioningList;
// save z-way data
//zway.devices.SaveData();
};
ZWave.prototype.nodeNameByType = function (nodeId, nodeData) {
var name = 'Device ' + '_' + nodeId,
type = '',
node = nodeData;
if(node){
var isListening = node.isListening.value,
isFLiRS = !isListening && (node.sensor250.value || node.sensor1000.value),
hasWakeup = !isListening && !node.sensor250.value && !node.sensor1000.value;
if (hasWakeup || isFLiRS) {
type = 'Battery';
} else if (isListening) {
type = 'Mains';
}
name = type + name;
}
return name;
>>>>>>>
this.zway.controller.data.smartStart.dskProvisioningList.value = dskProvisioningList;
};
ZWave.prototype.nodeNameByType = function (nodeId, nodeData) {
var name = 'Device ' + '_' + nodeId,
type = '',
node = nodeData;
if(node){
var isListening = node.isListening.value,
isFLiRS = !isListening && (node.sensor250.value || node.sensor1000.value),
hasWakeup = !isListening && !node.sensor250.value && !node.sensor1000.value;
if (hasWakeup || isFLiRS) {
type = 'Battery';
} else if (isListening) {
type = 'Mains';
}
name = type + name;
}
return name; |
<<<<<<<
var rand = require('rand-paul');
=======
var request = require('request');
var progress = require('request-progress');
>>>>>>>
var rand = require('rand-paul');
var request = require('request');
var progress = require('request-progress'); |
<<<<<<<
export const EVENTS_MAP = "EVENTS_MAP";
=======
export const TRASH_POINT = "TRASH_POINT";
>>>>>>>
export const TRASH_POINT = "TRASH_POINT";
export const EVENTS_MAP = "EVENTS_MAP";
<<<<<<<
Navigation.registerComponent(EVENTS_MAP, () => EventsMap, store, Provider);
=======
Navigation.registerComponent(TRASH_POINT, () => TrashPoint, store, Provider);
>>>>>>>
Navigation.registerComponent(TRASH_POINT, () => TrashPoint, store, Provider);
Navigation.registerComponent(EVENTS_MAP, () => EventsMap, store, Provider); |
<<<<<<<
CLEAR_EVENTS_ACTION,
LOAD_EVENTS_FOR_MAP_ACTION,
LOAD_EVENTS_FOR_MAP_SUCCESS,
LOAD_EVENTS_FOR_MAP_ERROR, SHOW_NEW_DELTA
} from "../actions/events";
=======
CLEAR_EVENTS_ACTION,
LOAD_EVENT_SUCCESS,
CLEAN_EVENT,
LOAD_EVENTS_ERROR,
} from '../types/events';
import { LOGOUT } from '../actions/auth';
>>>>>>>
CLEAR_EVENTS_ACTION,
LOAD_EVENTS_FOR_MAP_ACTION,
LOAD_EVENTS_FOR_MAP_SUCCESS,
LOAD_EVENTS_FOR_MAP_ERROR, SHOW_NEW_DELTA
} from "../actions/events";
import { LOGOUT } from '../actions/auth';
<<<<<<<
{
page: undefined,
pageSize: undefined,
events: undefined,
mapEvents: undefined,
error: undefined,
newDelta: undefined,
});
=======
{
events: null,
errors: null,
currentEvent: null,
});
>>>>>>>
{
events: null,
errors: null,
currentEvent: null,
mapEvents: undefined,
newDelta: undefined,
});
<<<<<<<
},
[LOAD_EVENTS_FOR_MAP_SUCCESS]: (state, { payload }) => {
return state.withMutations(mState => mState
.set('mapEvents', payload));
},
[LOAD_EVENTS_FOR_MAP_ERROR]: (state, { payload }) => {
return state.withMutations(mState => mState
.set('error', payload));
},
[SHOW_NEW_DELTA]: (state, { payload }) => {
return state.withMutations(mState => mState
.set('newDelta', payload));
},
=======
},
[LOAD_EVENT_SUCCESS]: (state, { payload }) => {
return state.withMutations(mState =>
mState.set('currentEvent', {
...payload,
}),
);
},
[LOAD_EVENTS_ERROR]: (state, { payload }) => {
return state.withMutations(mState =>
mState.set('errors', {
errorEvent: payload,
}),
);
},
[CLEAN_EVENT]: (state) => {
return state.withMutations(mState =>
mState.set('currentEvent', null),
);
},
>>>>>>>
},
[LOAD_EVENT_SUCCESS]: (state, { payload }) => {
return state.withMutations(mState =>
mState.set('currentEvent', {
...payload,
}),
);
},
[LOAD_EVENTS_ERROR]: (state, { payload }) => {
return state.withMutations(mState =>
mState.set('errors', {
errorEvent: payload,
}),
);
},
[CLEAN_EVENT]: (state) => {
return state.withMutations(mState =>
mState.set('currentEvent', null),
);
},
[LOAD_EVENTS_FOR_MAP_SUCCESS]: (state, { payload }) => {
return state.withMutations(mState => mState
.set('mapEvents', payload));
},
[LOAD_EVENTS_FOR_MAP_ERROR]: (state, { payload }) => {
return state.withMutations(mState => mState
.set('error', payload));
},
[SHOW_NEW_DELTA]: (state, { payload }) => {
return state.withMutations(mState => mState
.set('newDelta', payload));
}, |
<<<<<<<
=======
import {
SEARCH_EVENTS_ACTION,
SEARCH_EVENTS_ERROR_ACTION,
SEARCH_EVENTS_SUCCESS_ACTION,
CLEAR_EVENTS_ACTION,
LOAD_EVENT,
LOAD_EVENT_SUCCESS,
LOAD_EVENTS_ERROR,
CLEAN_EVENT,
} from '../types/events';
>>>>>>>
import {
LOAD_EVENT,
LOAD_EVENT_SUCCESS,
LOAD_EVENTS_ERROR,
CLEAN_EVENT,
} from '../types/events';
<<<<<<<
type: CLEAR_EVENTS_ACTION
});
export const LOAD_EVENTS_FOR_MAP_ACTION = 'LOAD_EVENTS_FOR_MAP_ACTION';
export const loadEventsForMapAction = parameters => ({
type: LOAD_EVENTS_FOR_MAP_ACTION,
payload: parameters
});
export const LOAD_EVENTS_FOR_MAP_SUCCESS = 'LOAD_EVENTS_FOR_MAP_SUCCESS';
export const loadEventsForMapSuccess = mapEvents => ({
type: LOAD_EVENTS_FOR_MAP_SUCCESS,
payload: mapEvents
});
export const SHOW_NEW_DELTA = 'SHOW_NEW_DELTA';
export const showNewDeltaAction = newDelts => ({
type: LOAD_EVENTS_FOR_MAP_SUCCESS,
payload: newDelts
});
export const LOAD_EVENTS_FOR_MAP_ERROR = 'LOAD_EVENTS_FOR_MAP_ERROR';
export const loadEventsForMapError = error => ({
type: LOAD_EVENTS_FOR_MAP_ERROR,
payload: error
=======
type: CLEAR_EVENTS_ACTION,
});
export const loadEvent = data => ({
type: LOAD_EVENT,
payload: data,
});
export const cleanEvent = () => ({
type: CLEAN_EVENT,
});
export const loadEventSuccess = data => ({
type: LOAD_EVENT_SUCCESS,
payload: data,
});
export const loadEventError = err => ({
type: LOAD_EVENTS_ERROR,
payload: err,
>>>>>>>
type: CLEAR_EVENTS_ACTION,
});
export const loadEvent = data => ({
type: LOAD_EVENT,
payload: data,
});
export const cleanEvent = () => ({
type: CLEAN_EVENT,
});
export const loadEventSuccess = data => ({
type: LOAD_EVENT_SUCCESS,
payload: data,
});
export const loadEventError = err => ({
type: LOAD_EVENTS_ERROR,
payload: err,
});
export const LOAD_EVENTS_FOR_MAP_ACTION = 'LOAD_EVENTS_FOR_MAP_ACTION';
export const loadEventsForMapAction = parameters => ({
type: LOAD_EVENTS_FOR_MAP_ACTION,
payload: parameters
});
export const LOAD_EVENTS_FOR_MAP_SUCCESS = 'LOAD_EVENTS_FOR_MAP_SUCCESS';
export const loadEventsForMapSuccess = mapEvents => ({
type: LOAD_EVENTS_FOR_MAP_SUCCESS,
payload: mapEvents
});
export const SHOW_NEW_DELTA = 'SHOW_NEW_DELTA';
export const showNewDeltaAction = newDelts => ({
type: LOAD_EVENTS_FOR_MAP_SUCCESS,
payload: newDelts
});
export const LOAD_EVENTS_FOR_MAP_ERROR = 'LOAD_EVENTS_FOR_MAP_ERROR';
export const loadEventsForMapError = error => ({
type: LOAD_EVENTS_FOR_MAP_ERROR,
payload: error |
<<<<<<<
loadMyTrashPointsFlow, createTrashPointFlow,
=======
loadMyTrashPointsFlow,
loadEventFlow,
>>>>>>>
loadMyTrashPointsFlow,
createTrashPointFlow,
loadEventFlow,
<<<<<<<
sagaMiddleware.run(createTrashPointFlow),
=======
sagaMiddleware.run(loadEventFlow),
>>>>>>>
sagaMiddleware.run(createTrashPointFlow),
sagaMiddleware.run(loadEventFlow), |
<<<<<<<
getMapEventsFlow,
=======
loadMyEventsFlow,
loadMyTrashPointsFlow,
>>>>>>>
getMapEventsFlow,
loadMyEventsFlow,
loadMyTrashPointsFlow,
<<<<<<<
sagaMiddleware.run(getMapEventsFlow),
=======
sagaMiddleware.run(loadMyEventsFlow),
sagaMiddleware.run(loadMyTrashPointsFlow),
>>>>>>>
sagaMiddleware.run(loadMyEventsFlow),
sagaMiddleware.run(loadMyTrashPointsFlow),
sagaMiddleware.run(getMapEventsFlow), |
<<<<<<<
import styles from './styles';
import strings from '../../assets/strings';
import { GooglePlacesAutocomplete } from 'react-native-google-places-autocomplete';
import { Map } from '../../components';
import { DEFAULT_ZOOM } from '../../shared/constants';
import { MARKER_STATUS_IMAGES } from '../../components/Map/Marker';
import { connect } from 'react-redux';
import { Icons } from '../../assets/images';
=======
import styles from './styles'
import strings from '../../assets/strings'
import {GooglePlacesAutocomplete} from 'react-native-google-places-autocomplete';
import {Map} from '../../components/Map/Map';
import {DEFAULT_ZOOM} from "../../shared/constants";
import {MARKER_STATUS_IMAGES} from "../../components/Map/Marker";
import {connect} from "react-redux";
import {IGPSCoordinates} from "NativeModules";
import {geocodeCoordinates} from "../../shared/geo";
>>>>>>>
import styles from './styles'
import strings from '../../assets/strings'
import {GooglePlacesAutocomplete} from 'react-native-google-places-autocomplete';
import {Map} from '../../components/Map/Map';
import {DEFAULT_ZOOM} from "../../shared/constants";
import {MARKER_STATUS_IMAGES} from "../../components/Map/Marker";
import {connect} from "react-redux";
import {IGPSCoordinates} from "NativeModules";
import {geocodeCoordinates} from "../../shared/geo";
import { Icons } from '../../assets/images';
<<<<<<<
constructor(props) {
super(props);
const { initialLocation } = props;
if (initialLocation !== undefined) {
this.state = {
marker: undefined,
region: null,
initialRegion: {
latitude: initialLocation.latitude,
longitude: initialLocation.longitude,
latitudeDelta: DEFAULT_ZOOM,
longitudeDelta: DEFAULT_ZOOM,
},
=======
constructor(props) {
super(props);
const {initialLocation} = props;
if (initialLocation !== undefined) {
this.state = {
marker: undefined,
initialRegion: {
latitude: initialLocation.latitude,
longitude: initialLocation.longitude,
latitudeDelta: DEFAULT_ZOOM,
longitudeDelta: DEFAULT_ZOOM,
}
>>>>>>>
constructor(props) {
super(props);
const {initialLocation} = props;
if (initialLocation !== undefined) {
this.state = {
marker: undefined,
initialRegion: {
latitude: initialLocation.latitude,
longitude: initialLocation.longitude,
latitudeDelta: DEFAULT_ZOOM,
longitudeDelta: DEFAULT_ZOOM,
}
<<<<<<<
// componentDidMount() {
// if (this.state.initialRegion === undefined) {
// this.getCurrentPosition();
// }
// }
componentWillReceiveProps(nextProps) {
if (this.state.initialRegion === undefined && nextProps.auth.get('token') !== undefined) {
this.getCurrentPosition();
=======
componentDidMount() {
if (this.state.initialRegion === undefined) {
this.getCurrentPosition();
>>>>>>>
componentDidMount() {
if (this.state.initialRegion === undefined) {
this.getCurrentPosition();
<<<<<<<
if (event.type === 'NavBarButtonPress') {
switch (event.id) {
case cancelId: {
this.back();
break;
=======
if (event.type === 'NavBarButtonPress') {
switch (event.id) {
case cancelId: {
this.props.navigator.pop();
break;
>>>>>>>
if (event.type === 'NavBarButtonPress') {
switch (event.id) {
case cancelId: {
this.props.navigator.pop();
break;
<<<<<<<
onConfirmPress = () => {
const { latitude, longitude } = this.state.marker.latlng;
this.back({
latitude,
longitude,
});
};
back(selectedLocation = undefined) {
this.props.onLocationSelected(selectedLocation);
this.props.navigator.pop({
animated: true,
animationType: 'slide_out',
=======
async onConfirmPress() {
const {latitude, longitude} = this.state.marker.latlng;
const place = await geocodeCoordinates(this.state.marker.latlng);
this.props.onLocationSelected({
latitude,
longitude,
place: place.mainText
>>>>>>>
async onConfirmPress() {
const {latitude, longitude} = this.state.marker.latlng;
const place = await geocodeCoordinates(this.state.marker.latlng);
this.props.onLocationSelected({
latitude,
longitude,
place: place.mainText |
<<<<<<<
import {ADD_TRASH_POINTS, ADD_COORDINATOR, ADD_LOCATION, CREATE_EVENT} from "../../index";
=======
import {ADD_COORDINATOR, ADD_LOCATION} from "../../index";
>>>>>>>
import {ADD_TRASH_POINTS, ADD_COORDINATOR, ADD_LOCATION, CREATE_EVENT} from "../../index";
<<<<<<<
<TouchableOpacity onPress={this.onAddTrashPointsClick.bind(this)}>
<View style={styles.trashpointTipStyle}>
<Image source={require('../images/ic_trashpoints.png')}
style={styles.imageTrashStyle}/>
<Text style={styles.textTrashStyle}>{strings.label_tip_add_trashpoints}</Text>
</View>
</TouchableOpacity>
<View style={styles.titleStyle}>
<Text style={styles.titleTextStyle}>{strings.label_description.toUpperCase()}</Text>
</View>
=======
<View style={styles.trashpointTipStyle}>
<Image source={require('../../../assets/images/ic_trashpoints.png')}
style={styles.imageTrashStyle}/>
<Text style={styles.textTrashStyle}>{strings.label_tip_add_trashpoints}</Text>
</View>
{this.renderDescriptionTitle()}
>>>>>>>
<TouchableOpacity onPress={this.onAddTrashPointsClick.bind(this)}>
<View style={styles.trashpointTipStyle}>
<Image source={require('../../../assets/images/ic_trashpoints.png')}
style={styles.imageTrashStyle}/>
<Text style={styles.textTrashStyle}>{strings.label_tip_add_trashpoints}</Text>
</View>
</TouchableOpacity>
{this.renderDescriptionTitle()} |
<<<<<<<
fetchDatasetFlow,
=======
loadEventFlow,
>>>>>>>
fetchDatasetFlow,
loadEventFlow,
<<<<<<<
sagaMiddleware.run(getMapEventsFlow),
sagaMiddleware.run(fetchDatasetFlow),
=======
sagaMiddleware.run(loadEventFlow),
>>>>>>>
sagaMiddleware.run(loadEventFlow),
sagaMiddleware.run(getMapEventsFlow),
sagaMiddleware.run(fetchDatasetFlow), |
<<<<<<<
import * as userSaga from "../reducers/user/saga";
import * as trashPointsSaga from "../reducers/trashpoints/saga";
=======
import reducers from './reducers';
import {
loginGoogleFlow,
loginFacebookFlow,
updateProfileStatusFlow,
loadProfileFlow,
createEventFlow,
} from './sagas';
>>>>>>>
import * as userSaga from "../reducers/user/saga";
import * as trashPointsSaga from "../reducers/trashpoints/saga";
import reducers from './reducers';
import {
loginGoogleFlow,
loginFacebookFlow,
updateProfileStatusFlow,
loadProfileFlow,
createEventFlow,
} from './sagas';
<<<<<<<
networkStatusState,
progressInitialState,
popoverReducer,
errorReducer,
configReducer,
networkReducer,
progressReducer
} from '../reducers/app/reducers'
import {
trashPointsInitialState,
trashPointsReducer
} from '../reducers/trashpoints/reducer'
const combinedReducers = combineReducers({
auth: authReducer,
profile: profileReducer,
profileState: profileStatusReducer,
//network: networkReducer,
// config: configReducer,
error: errorReducer,
trashPoints: trashPointsReducer,
progress: progressReducer,
// popover: popoverReducer,
// root: rootReducer,
// login: loginReducer,
// list: listReducer,
// profile: profileReducer,
// school: schoolReducer,
// categoryFeed: categoryFeedReducer,
// editGroups: editGroupsReducer,
// dashboard: dashboardReducer,
// notifications: notificationsReducer,
// events: eventsReducer,
// schoolCategories: schoolCategoriesReducer
});
=======
} from '../reducers/app/reducers';
import {initialProfileState} from './reducers/profile';
import {initialAuthState} from './reducers/auth';
import {initialCreateProfileState} from './reducers/create-event-reducer';
// const combinedReducers = combineReducers({
// auth: authReducer,
// profile: profileReducer,
// profileState: profileStatusReducer,
// //network: networkReducer,
// // config: configReducer,
// error: errorReducer,
// // popover: popoverReducer,
// // root: rootReducer,
// // login: loginReducer,
// // list: listReducer,
// // profile: profileReducer,
// // school: schoolReducer,
// // categoryFeed: categoryFeedReducer,
// // editGroups: editGroupsReducer,
// // dashboard: dashboardReducer,
// // notifications: notificationsReducer,
// // events: eventsReducer,
// // schoolCategories: schoolCategoriesReducer
// });
>>>>>>>
} from '../reducers/app/reducers';
import {initialProfileState} from './reducers/profile';
import {initialAuthState} from './reducers/auth';
import {initialCreateProfileState} from './reducers/create-event-reducer';
networkStatusState,
progressInitialState,
popoverReducer,
errorReducer,
configReducer,
networkReducer,
progressReducer
} from '../reducers/app/reducers'
import {
trashPointsInitialState,
trashPointsReducer
} from '../reducers/trashpoints/reducer'
const combinedReducers = combineReducers({
auth: authReducer,
profile: profileReducer,
profileState: profileStatusReducer,
//network: networkReducer,
// config: configReducer,
error: errorReducer,
trashPoints: trashPointsReducer,
progress: progressReducer,
// popover: popoverReducer,
// const combinedReducers = combineReducers({
// auth: authReducer,
// profile: profileReducer,
// profileState: profileStatusReducer,
// //network: networkReducer,
// // config: configReducer,
// error: errorReducer,
// // popover: popoverReducer,
// // root: rootReducer,
// // login: loginReducer,
// // list: listReducer,
// // profile: profileReducer,
// // school: schoolReducer,
// // categoryFeed: categoryFeedReducer,
// // editGroups: editGroupsReducer,
// // dashboard: dashboardReducer,
// // notifications: notificationsReducer,
// // events: eventsReducer,
// // schoolCategories: schoolCategoriesReducer
// });
<<<<<<<
auth: Immutable.Map(authInitialState),
profile: Immutable.Map(profileInitialState),
profileState: Immutable.Map(profileStatusInitialState),
error: Immutable.Map(errorInitialState),
trashPoints: Immutable.Map(trashPointsInitialState),
progress: Immutable.Map(progressInitialState)
=======
auth: initialAuthState,
profile: initialProfileState,
createEvent: initialCreateProfileState,
// profileState: Immutable.Map(profileStatusInitialState),
// error: Immutable.Map(errorInitialState),
>>>>>>>
auth: initialAuthState,
profile: initialProfileState,
createEvent: initialCreateProfileState,
// profileState: Immutable.Map(profileStatusInitialState),
// error: Immutable.Map(errorInitialState),
trashPoints: Immutable.Map(trashPointsInitialState),
progress: Immutable.Map(progressInitialState)
<<<<<<<
sagaMiddleware.run(userSaga.loginGoogleFlow),
sagaMiddleware.run(userSaga.loginFacebookFlow),
sagaMiddleware.run(userSaga.updateProfileStatusFlow),
sagaMiddleware.run(userSaga.loadProfileFlow),
sagaMiddleware.run(trashPointsSaga.searchTrashPointsFlow)
=======
sagaMiddleware.run(loginGoogleFlow),
sagaMiddleware.run(loginFacebookFlow),
sagaMiddleware.run(updateProfileStatusFlow),
sagaMiddleware.run(loadProfileFlow),
sagaMiddleware.run(createEventFlow),
>>>>>>>
sagaMiddleware.run(loginGoogleFlow),
sagaMiddleware.run(loginFacebookFlow),
sagaMiddleware.run(updateProfileStatusFlow),
sagaMiddleware.run(loadProfileFlow),
sagaMiddleware.run(createEventFlow),
sagaMiddleware.run(userSaga.loginGoogleFlow),
sagaMiddleware.run(userSaga.loginFacebookFlow),
sagaMiddleware.run(userSaga.updateProfileStatusFlow),
sagaMiddleware.run(userSaga.loadProfileFlow),
sagaMiddleware.run(trashPointsSaga.searchTrashPointsFlow) |
<<<<<<<
createEventFlow,
searchTrashPointsFlow,
searchEventsFlow
=======
logoutFlow,
>>>>>>>
logoutFlow,
createEventFlow,
searchTrashPointsFlow,
searchEventsFlow
<<<<<<<
=======
>>>>>>>
<<<<<<<
const sagaMiddleware = createSagaMiddleware();
const store = createStore(
reducers,
compose(applyMiddleware(sagaMiddleware, createActionBuffer(REHYDRATE)), autoRehydrate({log: true})));
=======
store = Reactotron.createStore(reducers, enhancer);
} else {
store = createStore(reducers, enhancer);
}
>>>>>>>
store = Reactotron.createStore(reducers, enhancer);
} else {
store = createStore(reducers, enhancer);
}
<<<<<<<
{
storage: AsyncStorage,
blacklist:['trashPoints', 'events']
}
);
return {
...store,
runSaga: [
sagaMiddleware.run(loginGoogleFlow),
sagaMiddleware.run(loginFacebookFlow),
sagaMiddleware.run(updateProfileStatusFlow),
sagaMiddleware.run(loadProfileFlow),
sagaMiddleware.run(createEventFlow),
sagaMiddleware.run(searchTrashPointsFlow),
sagaMiddleware.run(searchEventsFlow),
]
};
=======
{
storage: AsyncStorage,
// blacklist:['editGroups', 'school', 'events']
},
);
return {
...store,
runSaga: [
sagaMiddleware.run(loginGoogleFlow),
sagaMiddleware.run(loginFacebookFlow),
sagaMiddleware.run(updateProfileStatusFlow),
sagaMiddleware.run(loadProfileFlow),
sagaMiddleware.run(logoutFlow),
],
};
>>>>>>>
{
storage: AsyncStorage,
blacklist:['trashPoints', 'events']
},
);
return {
...store,
runSaga: [
sagaMiddleware.run(loginGoogleFlow),
sagaMiddleware.run(loginFacebookFlow),
sagaMiddleware.run(updateProfileStatusFlow),
sagaMiddleware.run(loadProfileFlow),
sagaMiddleware.run(logoutFlow),
sagaMiddleware.run(createEventFlow),
sagaMiddleware.run(searchTrashPointsFlow),
sagaMiddleware.run(searchEventsFlow),
],
}; |
<<<<<<<
import EventsMap from '../EventMap/EventsMap';
=======
>>>>>>>
import EventsMap from '../EventMap/EventsMap';
<<<<<<<
this.loadEvents(0);
// const { onLoadMapEventsAction } = this.props;
// onLoadMapEventsAction()
=======
this.loadEvents(0)
>>>>>>>
this.loadEvents(0) |
<<<<<<<
export default async function server({ cwd, overlayDir, middleware, http2 = false, compress = true, aliases } = {}) {
try {
await fs.access(posix.resolve(cwd, 'index.html'));
} catch (e) {
throw new Error(`You are missing an "index.html" file in "${cwd}".`);
}
=======
export default async function server({ cwd, overlayDir, middleware, http2, compress = true, optimize, aliases } = {}) {
>>>>>>>
export default async function server({ cwd, overlayDir, middleware, http2, compress = true, optimize, aliases } = {}) {
try {
await fs.access(posix.resolve(cwd, 'index.html'));
} catch (e) {
throw new Error(`You are missing an "index.html" file in "${cwd}".`);
} |
<<<<<<<
switch (sourceType) {
case sourceTypes.JAVASCRIPT:
try{
data = esprima_parse(content, { loc: true, tolerant: true, jsx: true });
}catch(e){
data = '';
}
break;
case sourceTypes.HTML:
data = cheerio_load(content, { xmlMode: true, withStartIndices: true });
break;
case sourceTypes.JSON:
data = content;
break;
default:
break;
=======
let error = null;
try {
switch (sourceType) {
case sourceTypes.JAVASCRIPT:
data = esprima_parse(content, { loc: true, tolerant: true });
break;
case sourceTypes.HTML:
data = cheerio_load(content, { xmlMode: true, withStartIndices: true });
break;
case sourceTypes.JSON:
data = {json: JSON.parse(content), text: content};
break;
default:
break;
}
} catch (e) {
error = e;
>>>>>>>
let error = null;
try {
switch (sourceType) {
case sourceTypes.JAVASCRIPT:
data = esprima_parse(content, { loc: true, tolerant: true, jsx: true });
break;
case sourceTypes.HTML:
data = cheerio_load(content, { xmlMode: true, withStartIndices: true });
break;
case sourceTypes.JSON:
data = {json: JSON.parse(content), text: content};
break;
default:
break;
}
} catch (e) {
error = e; |
<<<<<<<
case 'ts':
case 'tsx':
=======
case 'jsx':
case 'htm':
>>>>>>>
case 'jsx':
case 'ts':
case 'tsx':
case 'htm': |
<<<<<<<
import URL from './URLShim.js';
import { PalindromError, PalindromConnectionError } from './palindrom-errors.js';
import { Heartbeat, NoHeartbeat } from './heartbeat.js';
=======
import { PalindromError, PalindromConnectionError } from './palindrom-errors';
import { Heartbeat, NoHeartbeat } from './heartbeat';
>>>>>>>
import { PalindromError, PalindromConnectionError } from './palindrom-errors.js';
import { Heartbeat, NoHeartbeat } from './heartbeat.js'; |
<<<<<<<
this.useWebSocket = false; //change to TRUE to enable WebSocket connection
=======
var useWebSocket = false;
var that = this;
Object.defineProperty(this, "useWebSocket", {
get: function () {
return useWebSocket;
},
set: function (newValue) {
if(newValue == false) {
if(that._ws) {
that._ws.onclose = function() { //overwrites the previous onclose
that._ws = null;
};
that._ws.close();
}
}
return useWebSocket = newValue;
}
});
this.localPatchQueue = [];
>>>>>>>
var useWebSocket = false;
var that = this;
Object.defineProperty(this, "useWebSocket", {
get: function () {
return useWebSocket;
},
set: function (newValue) {
if(newValue == false) {
if(that._ws) {
that._ws.onclose = function() { //overwrites the previous onclose
that._ws = null;
};
that._ws.close();
}
}
return useWebSocket = newValue;
}
});
<<<<<<<
var txt = JSON.stringify( this.queue? this.queue.send(patches) : patches);
=======
if(this.debug) {
var errors = this.validatePatches(patches, this.remoteObj, true);
errors.forEach(function(error, index) {
if(error) {
that.showError("Outgoing patch validation error", error + "\n\nIn patch:\n\n" + JSON.stringify(patches[index]) );
}
});
}
var txt = JSON.stringify(patches);
>>>>>>>
if(this.debug) {
var errors = this.validatePatches(patches, this.remoteObj, true);
errors.forEach(function(error, index) {
if(error) {
that.showError("Outgoing patch validation error", error + "\n\nIn patch:\n\n" + JSON.stringify(patches[index]) );
}
});
}
var txt = JSON.stringify( this.queue? this.queue.send(patches) : patches);
<<<<<<<
this._ws.send(txt);
=======
if(!this._ws) {
this.lastRequestPromise = this.lastRequestPromise.then( this.webSocketUpgrade.bind(this) );
}
this.lastRequestPromise = this.lastRequestPromise.then( this.webSocketSend.bind(this,txt) );
>>>>>>>
if(!this._ws) {
this.webSocketUpgrade(function(){
that._ws.send(txt);
});
} else {
this._ws.send(txt);
}
<<<<<<<
// Versioning: versionedpatch.rev
=======
var that = this;
>>>>>>>
// Versioning: versionedpatch.rev
var that = this;
<<<<<<<
if(this.queue){
this.queue.receive(this.obj, patches);
}else{
jsonpatch.apply(this.obj, patches);
}
var that = this;
=======
jsonpatch.apply(this.obj, patches);
>>>>>>>
if(this.queue){
this.queue.receive(this.obj, patches);
}else{
jsonpatch.apply(this.obj, patches);
} |
<<<<<<<
=======
name: "ABC News",
logo: "stations/images-europe/albania/ABC News.png",
url: "https://abcradiolivehls-lh.akamaihd.net/i/newsradio_1@327297/master.m3u8"
},
{
name: "Alfa dhe Omega Radio",
logo: "stations/images-europe/albania/Alfa dhe Omega Radio.png",
url: "http://cp11.shoutcheap.com:8037/;?1602675279871"
},
{
name: "Alpo Radio",
logo: "stations/images-europe/albania/Alpo Radio.png",
url: "http://62.210.24.124:8379/;stream.mp3"
},
{
>>>>>>>
name: "Alfa dhe Omega Radio",
logo: "stations/images-europe/albania/Alfa dhe Omega Radio.png",
url: "http://cp11.shoutcheap.com:8037/;?1602675279871"
},
{
<<<<<<<
=======
name: "City Radio",
logo: "stations/images-europe/albania/City Radio.png",
url: "https://cp1.sednastream.com/proxy/cityradio?mp=/stream"
},
{
name: "Kiss FM",
logo: "stations/images-europe/albania/Kiss FM.png",
url: "https://stream.kissfm.com.al:8000/stream?ver=699557"
},
{
name: "Love Radio",
logo: "stations/images-europe/albania/Love Radio.jpg",
url: "http://185.32.20.10:6200/;"
},
{
name: "MCN Radio",
logo: "stations/images-europe/albania/MCN Radio.jpg",
url: "http://149.202.220.47:8888/mcnradio;"
},
{
>>>>>>>
name: "City Radio",
logo: "stations/images-europe/albania/City Radio.png",
url: "https://cp1.sednastream.com/proxy/cityradio?mp=/stream"
},
{
name: "Kiss FM",
logo: "stations/images-europe/albania/Kiss FM.png",
url: "https://stream.kissfm.com.al:8000/stream?ver=699557"
},
{
name: "Love Radio",
logo: "stations/images-europe/albania/Love Radio.jpg",
url: "http://185.32.20.10:6200/;"
},
{
name: "MCN Radio",
logo: "stations/images-europe/albania/MCN Radio.jpg",
url: "http://149.202.220.47:8888/mcnradio;"
},
{ |
<<<<<<<
const config = {
devtool: isProduction ? undefined : 'cheap-module-source-map',
entry: APP_DIR + '/index.jsx',
output: {
path: BUILD_DIR,
publicPath: '/',
filename: '[name].js',
chunkFilename: '[name].js'
},
devServer: {
host: 'localhost',
historyApiFallback: true,
port: 3000,
contentBase: './src',
stats: 'minimal',
hot: true,
inline: true
},
module : {
loaders : [
{
test : /\.jsx?$/,
include : APP_DIR,
loader : 'babel-loader'
},
{
test: /\.scss$/,
use: isProduction ? extractStyles.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
},
{
loader: 'postcss-loader',
},
{
loader: 'sass-loader',
},
],
}) : ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'],
},
{
test: /\.(png|jpg|jpeg|gif|svg)$/,
loader: 'file-loader',
options: {
name: 'assets/[name].[ext]?[hash]',
=======
module.exports = env => {
const config = {
devtool: isProduction ? undefined : 'cheap-module-source-map',
entry: APP_DIR + '/index.jsx',
output: {
path: BUILD_DIR,
filename: 'ptemplate.js'
},
devServer: {
host: 'localhost',
historyApiFallback: true,
port: 3000,
contentBase: './src',
stats: 'minimal',
hot: true,
inline: true
},
module : {
loaders : [
{
test : /\.jsx?$/,
include : APP_DIR,
loader : 'babel-loader'
>>>>>>>
module.exports = env => {
const config = {
devtool: isProduction ? undefined : 'cheap-module-source-map',
entry: APP_DIR + '/index.jsx',
output: {
path: BUILD_DIR,
publicPath: '/',
filename: '[name].js',
chunkFilename: '[name].js'
},
devServer: {
host: 'localhost',
historyApiFallback: true,
port: 3000,
contentBase: './src',
stats: 'minimal',
hot: true,
inline: true
},
module : {
loaders : [
{
test : /\.jsx?$/,
include : APP_DIR,
loader : 'babel-loader' |
<<<<<<<
=======
this.useCompress = false; // 是否使用压缩文件
// 当你即将发布你的塔时,请使用“JS代码压缩工具”将所有js代码进行压缩,然后将这里的useCompress改为true。
// 请注意,只有useCompress是false时才会读取floors目录下的文件,为true时会直接读取libs目录下的floors.min.js文件。
// 如果要进行剧本的修改请务必将其改成false。
this.floorIds = [ // 在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器的顺序和上楼器/下楼器的顺序
"sample0", "sample1", "sample2"
]
>>>>>>>
<<<<<<<
if (({"editor":0,"replay":0}).hasOwnProperty(mode)) {
main.mode = mode;
if (mode === 'editor')main.editor = {};
}
main.loadPureData(function(){
main.useCompress=data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.useCompress;
main.floorIds=data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds;
main.loaderJs(function () {
var coreData = {};
for (i = 0; i < main.loadList.length; i++) {
var name = main.loadList[i];
if (name === 'core') continue;
main[name].init(main.dom);
coreData[name] = main[name];
}
main.loaderFloors(function() {
main.core.init(main.dom, main.statusBar, main.canvas, main.images, main.sounds, main.floorIds, main.floors, coreData);
main.core.resize(main.dom.body.clientWidth, main.dom.body.clientHeight);
});
});
=======
main.loaderJs(function () {
var coreData = {};
for (i = 0; i < main.loadList.length; i++) {
var name = main.loadList[i];
if (name === 'core') continue;
main[name].init(main.dom);
coreData[name] = main[name];
}
main.loaderFloors(function() {
main.core.init(main.dom, main.statusBar, main.canvas, main.images, main.bgms, main.sounds, main.floorIds, main.floors, coreData);
main.core.resize(main.dom.body.clientWidth, main.dom.body.clientHeight);
})
>>>>>>>
if (({"editor":0,"replay":0}).hasOwnProperty(mode)) {
main.mode = mode;
if (mode === 'editor')main.editor = {};
}
main.loadPureData(function(){
main.useCompress=data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.useCompress;
main.floorIds=data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds;
main.loaderJs(function () {
var coreData = {};
for (i = 0; i < main.loadList.length; i++) {
var name = main.loadList[i];
if (name === 'core') continue;
main[name].init(main.dom);
coreData[name] = main[name];
}
main.loaderFloors(function() {
main.core.init(main.dom, main.statusBar, main.canvas, main.images, main.bgms, main.sounds, main.floorIds, main.floors, coreData);
main.core.resize(main.dom.body.clientWidth, main.dom.body.clientHeight);
});
}); |
<<<<<<<
music.src = 'project/sounds/'+t;
=======
if (main.bgmRemote) music.src = 'https://gitee.com/ckcz123/h5music/raw/master/'+core.firstData.name+'/'+t;
else music.src = 'sounds/'+t;
>>>>>>>
if (main.bgmRemote) music.src = 'https://gitee.com/ckcz123/h5music/raw/master/'+core.firstData.name+'/'+t;
else music.src = 'project/sounds/'+t; |
<<<<<<<
'autoHeroMove': false,
'automaticRouting': false,
'automaticRouted': false,
'autoStep': 0,
'movedStep': 0,
'destStep': 0,
'automaticRoutingTemp': {'destX': 0, 'destY': 0, 'moveStep': []},
'autoStepRoutes': [],
'holdingPath': 0,
'stepPostfix': [],
'mouseOutCheck': 1,
'moveStepBeforeStop': [],
=======
// 勇士移动状态
'heroMoving': 0,
'heroStop': true,
// 自动寻路相关
'automaticRoute': {
'autoHeroMove': false,
'autoStep': 0,
'movedStep': 0,
'destStep': 0,
'destX': null,
'destY': null,
'autoStepRoutes': [],
'moveStepBeforeStop': [],
'cursorX': null,
'cursorY': null,
},
// 按下键的时间:为了判定双击
'downTime': null,
// 路线&回放
'route': [],
'replay': {
'replaying': false,
'pausing': false,
'animate': false, // 正在某段动画中
'toReplay': [],
'totalList': [],
'speed': 1.0
},
>>>>>>>
// 勇士移动状态
'heroMoving': 0,
'heroStop': true,
// 自动寻路相关
'automaticRoute': {
'autoHeroMove': false,
'autoStep': 0,
'movedStep': 0,
'destStep': 0,
'destX': null,
'destY': null,
'autoStepRoutes': [],
'moveStepBeforeStop': [],
'cursorX': null,
'cursorY': null,
},
// 按下键的时间:为了判定双击
'downTime': null,
// 路线&回放
'route': [],
'replay': {
'replaying': false,
'pausing': false,
'animate': false, // 正在某段动画中
'toReplay': [],
'totalList': [],
'speed': 1.0
},
<<<<<<<
core.status.floorId = mapName;
core.status.thisMap = core.status.maps[mapName];
var drawEvent = function(){
var mapData = core.status.maps[core.status.floorId];
var mapBlocks = mapData.blocks;
var mapArray = core.maps.getMapArray(core.status.maps, core.status.floorId);
for (var b = 0; b < mapBlocks.length; b++) {
// 事件启用
var block = mapBlocks[b];
if (core.isset(block.event) && !(core.isset(block.enable) && !block.enable)) {
if (block.event.cls == 'autotile') {
core.drawAutotile(core.canvas.event, mapArray, block, 32, 0, 0);
}
else {
if (block.event.id!='none') {
var blockIcon = core.material.icons[block.event.cls][block.event.id];
var blockImage = core.material.images[block.event.cls];
core.canvas.event.drawImage(core.material.images[block.event.cls], 0, blockIcon * 32, 32, 32, block.x * 32, block.y * 32, 32, 32);
core.addGlobalAnimate(block.event.animate, block.x * 32, block.y * 32, blockIcon, blockImage);
}
=======
var mapArray = core.maps.getMapArray(mapBlocks);
for (var b = 0; b < mapBlocks.length; b++) {
// 事件启用
var block = mapBlocks[b];
if (core.isset(block.event) && !(core.isset(block.enable) && !block.enable)) {
if (block.event.cls == 'autotile') {
core.drawAutotile(core.canvas.event, mapArray, block, 32, 0, 0);
}
else {
if (block.event.id!='none') {
blockIcon = core.material.icons[block.event.cls][block.event.id];
blockImage = core.material.images[block.event.cls];
core.canvas.event.drawImage(core.material.images[block.event.cls], 0, blockIcon * 32, 32, 32, block.x * 32, block.y * 32, 32, 32);
core.addGlobalAnimate(block.event.animate, block.x * 32, block.y * 32, blockIcon, blockImage);
>>>>>>>
core.status.floorId = mapName;
core.status.thisMap = core.status.maps[mapName];
var drawEvent = function(){
var mapData = core.status.maps[core.status.floorId];
var mapBlocks = mapData.blocks;
var mapArray = core.maps.getMapArray(mapBlocks);
for (var b = 0; b < mapBlocks.length; b++) {
// 事件启用
var block = mapBlocks[b];
if (core.isset(block.event) && !(core.isset(block.enable) && !block.enable)) {
if (block.event.cls == 'autotile') {
core.drawAutotile(core.canvas.event, mapArray, block, 32, 0, 0);
}
else {
if (block.event.id!='none') {
blockIcon = core.material.icons[block.event.cls][block.event.id];
blockImage = core.material.images[block.event.cls];
core.canvas.event.drawImage(core.material.images[block.event.cls], 0, blockIcon * 32, 32, 32, block.x * 32, block.y * 32, 32, 32);
core.addGlobalAnimate(block.event.animate, block.x * 32, block.y * 32, blockIcon, blockImage);
}
<<<<<<<
if (main.mode=='editor' && main.editor.disableGlobalAnimate) return;
=======
/*
>>>>>>>
if (main.mode=='editor' && main.editor.disableGlobalAnimate) return;
/* |
<<<<<<<
var namesObj={};
namesObj.allIds = core.getAllIconIds();
namesObj.allIconIds = namesObj.allIds.concat(Object.keys(core.statusBar.icons).filter(function (x) {
=======
var allIds = ["this"].concat(core.getAllIconIds());
var allIconIds = allIds.concat(Object.keys(core.statusBar.icons).filter(function (x) {
>>>>>>>
var namesObj={};
namesObj.allIds = ["this"].concat(core.getAllIconIds());
namesObj.allIconIds = namesObj.allIds.concat(Object.keys(core.statusBar.icons).filter(function (x) { |
<<<<<<<
const sendGridKey = keys.sendGrid;
// For emails
const sgMail = require('@sendgrid/mail'); // eslint-disable-line
sgMail.setApiKey(sendGridKey);
// @route POST api/employees/add
=======
// @route POST api/employees/register
>>>>>>>
const sendGridKey = keys.sendGrid;
// For emails
const sgMail = require('@sendgrid/mail'); // eslint-disable-line
sgMail.setApiKey(sendGridKey);
// @route POST api/employees/register |
<<<<<<<
/**
* function parses a Javascript file and returns an object containing interesting nodes and their details,
* by looping through it with the {@link #parseutils.asyncTasks} array
* @param {string} text - the text of the file to analyze
* @returns {object} - cache object
**/
=======
/*
we pass in the text we read from the file the user passed in and we pass it to esprima
which gives us an AST
asycnTasks is an array of
we pass this new array to asyc.parallel
*/
>>>>>>>
/**
* function parses a Javascript file and returns an object containing interesting nodes and their details,
* by looping through it with the {@link #parseutils.asyncTasks} array
* @param {string} text - the text of the file to analyze
* @returns {object} - cache object
**/
<<<<<<<
=======
// const JSTEXT = fs.readFileSync('./lib/test.js');
// const parsed = parser(JSTEXT);
// console.log('parsed', parsed);
>>>>>>> |
<<<<<<<
// describe('Test number one', () => {
// it('is yinyan a chinese' , function () {
// expect(true).to.equal(true);
// })
// it('is yinyan a chinese' , function () {
// cy.server();
// cy.visit('');
// cy.get('.searchbox')
// .type('a')
// .should('have.value', 'a')
// })
// })
import search from "./../../src/lib/search";
const urlApp = "http://localhost:4000/"
const getInfoList = (data, label) => {
return data.hits.hits.map(e => e["_source"][label])
}
const testPair = {
label: "label",
str: "ta"
}
describe("Search by query (function)", () => {
it("should return results corresponding the query string", () => {
const {label, str} = testPair;
search(label, str).then(response => {
const arr = getInfoList(response, label);
const regex = new RegExp(str);
arr.forEach(e => {
expect(regex.test(e.toLowerCase())).to.equal(true)
})
})
})
})
const retriveInfoList = (cy, DOMQuery) => {
const results = cy.get(DOMQuery);
var tmp = results.get("div").text();
console.log(tmp)
}
describe("Search by query (website)", () => {
it("should show results corresponding the query string", () => {
const {label, str} = testPair;
cy.visit(urlApp);
cy.get(".searchbox")
.type(str)
.should("have.value", str);
//retriveInfoList(cy, "section")
})
=======
describe('Test number one', () => {
beforeEach(function() {
cy.visit('http://localhost:4000');
cy.server();
})
it('testing search and hits result score' , function () {
cy.get('.searchbox')
.type('aurelia')
.should('have.value', 'aurelia')
cy.get('.score').contains('1 result found');
})
it('searchbox is autofocus' , function () {
cy.focused().should('have.class','searchbox');
});
>>>>>>>
import search from "./../../src/lib/search";
const urlApp = "http://localhost:4000/"
const getInfoList = (data, label) => {
return data.hits.hits.map(e => e["_source"][label])
}
const testPair = {
label: "label",
str: "ta"
}
describe("Search by query (function)", () => {
it("should return results corresponding the query string", () => {
const {label, str} = testPair;
search(label, str).then(response => {
const arr = getInfoList(response, label);
const regex = new RegExp(str);
arr.forEach(e => {
expect(regex.test(e.toLowerCase())).to.equal(true)
})
})
})
})
const retriveInfoList = (cy, DOMQuery) => {
const results = cy.get(DOMQuery);
var tmp = results.get("div").text();
console.log(tmp)
}
describe("Search by query (website)", () => {
it("should show results corresponding the query string", () => {
const {label, str} = testPair;
cy.visit(urlApp);
cy.get(".searchbox")
.type(str)
.should("have.value", str);
//retriveInfoList(cy, "section")
})
// describe('Test number one', () => {
// beforeEach(function() {
// cy.visit('http://localhost:4000');
// cy.server();
// })
// it('testing search and hits result score' , function () {
// cy.get('.searchbox')
// .type('aurelia')
// .should('have.value', 'aurelia')
// cy.get('.score').contains('1 result found');
// })
// it('searchbox is autofocus' , function () {
// cy.focused().should('have.class','searchbox');
// });
// |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
setChrAndRange: function (chr, start, end, update, force) {
// TODO:
// get proper browser boundaries
// get chromosome length
this.chr = chr;
this.setRange(start, end, update, force);
},
>>>>>>>
<<<<<<<
=======
getNewPositionQueryString: function (chr, start, end) {
var location = this.urlParamTemplate
.replace('__CHR__', chr)
.replace('__START__', start)
.replace('__END__', end);
if (this.useHash) {
return location;
}
// no parameters
if (window.location.search == "") {
return "?" + location;
}
// otherwise
return (window.location.search + '&').
replace(this.paramRegex, '$1' + location + '$5').slice(0, -1);
},
>>>>>>>
<<<<<<<
menuTemplate: $('<div class="gv_menu"> <div class="close">x</div> <table></table> </div>').on('click', function (e) {
if ($(e.target).hasClass('close')) {
$(this).fadeOut('fast', function () { $(this).remove() });
}
}),
=======
menuTemplate: $(' \
<div class="menu"> \
<div class="close">x</div> \
<table></table> \
</div> \
'),
// style="border:1px solid #aaa;"
/*
findParent: function (child) {
var p0 = child.parent();
var p1 = child.parent();
while(p0 != undefined) {
p1 = p0;
p0 = p0.parent();
alert("searching for parent p1.position().top="+p1.position().top);
}
return p1;
},
*/
>>>>>>>
menuTemplate: $('<div class="gv_menu"> <div class="close">x</div> <table></table> </div>').on('click', function (e) {
if ($(e.target).hasClass('close')) {
$(this).fadeOut('fast', function () { $(this).remove() });
}
}), |
<<<<<<<
exports.getRefId = getRefId;
=======
var show = function(filename, callback) {
var gitfs = this;
this.getParentId(function(err, id) {
gitfs.readObject(id.toString(), function(err, commit) {
gitfs.readObject(commit.tree, function(err, tree) {
gitfs.readObject(tree[filename], function(err, content) {
callback(err, content);
});
});
});
});
}
var log_from = function(filename, from, cb) {
var gitfs = this;
this.readObject(from, function(err, commit) {
gitfs.readObject(commit.tree, function(err, tree) {
var commits = tree[filename] ? [commit] : [];
if (commit.parent) {
gitfs.log_from(filename, commit.parent, function(err, nextCommits) {
cb(err, commits.concat(nextCommits));
});
} else {
cb(err, commits);
}
});
});
}
var log = function(filename, callback) {
var gitfs = this;
this.getParentId(function(err, id) {
gitfs.log_from(filename, id.toString(), callback);
});
}
>>>>>>>
var show = function(filename, callback) {
var gitfs = this;
this.getParentId(function(err, id) {
gitfs.readObject(id.toString(), function(err, commit) {
gitfs.readObject(commit.tree, function(err, tree) {
gitfs.readObject(tree[filename], function(err, content) {
callback(err, content);
});
});
});
});
}
var log_from = function(filename, from, cb) {
var gitfs = this;
this.readObject(from, function(err, commit) {
gitfs.readObject(commit.tree, function(err, tree) {
var commits = tree[filename] ? [commit] : [];
if (commit.parent) {
gitfs.log_from(filename, commit.parent, function(err, nextCommits) {
cb(err, commits.concat(nextCommits));
});
} else {
cb(err, commits);
}
});
});
}
var log = function(filename, callback) {
var gitfs = this;
this.getParentId(function(err, id) {
gitfs.log_from(filename, id.toString(), callback);
});
}
exports.getRefId = getRefId; |
<<<<<<<
routes.forEach(function (route) {
makeExpressRoute(router, mountpath, route);
routePath = buildRoutePath(mountpath, route.path);
routesMethod[routePath] = routesMethod[routePath] || [];
routesMethod[routePath].push(route.method.toLowerCase());
});
Object.keys(routesMethod).forEach(function (routePath){
router.use(pathRegexp(routePath), buildNotAllowedMiddleware(routesMethod[routePath]));
=======
routes.forEach(function(route) {
makeExpressRoute(router, mountpath, route, options.api.securityDefinitions);
>>>>>>>
routes.forEach(function (route) {
makeExpressRoute(router, mountpath, route, options.api.securityDefinitions);
routePath = buildRoutePath(mountpath, route.path);
routesMethod[routePath] = routesMethod[routePath] || [];
routesMethod[routePath].push(route.method.toLowerCase());
});
Object.keys(routesMethod).forEach(function (routePath){
router.use(pathRegexp(routePath), buildNotAllowedMiddleware(routesMethod[routePath])); |
<<<<<<<
ses.getSendQuota((err, data) => {
if (err) { // Either access keys are wrong here or the request is being placed too quickly
res.status(400).send({ message: 'Please confirm your Amazon SES settings and try again later.' });
} else {
const { Max24HourSend, SentLast24Hours, MaxSendRate } = data;
const AvailableToday = Max24HourSend - SentLast24Hours;
generator.next({ Max24HourSend, SentLast24Hours, MaxSendRate, AvailableToday });
}
});
}
function countListSubscribers(listId, AvailableToday) {
db.listsubscriber.count({
where: {
listId: listId,
subscribed: true
}
}).then(total => {
if (total > AvailableToday && process.env.NODE_ENV === 'production') {
res.status(400).send({ message: `This list exceeds your 24 hour allowance of ${AvailableToday} emails. Please upgrade your SES limit.` });
} else {
generator.next(total);
}
return null;
}).catch(err => {
res.status(500).send(err);
});
}
=======
function countListSubscribers(listId, AvailableToday, campaignId) {
let totalListSubscribers, totalEmailsToSend;
db.listsubscriber.count({
where: {
listId,
subscribed: true
}
}).then(total => {
totalListSubscribers = total;
console.log(total);
return db.listsubscriber.count({
where: {
listId,
subscribed: true
},
include: [
{ model: db.campaignsubscriber, where: { campaignId, sent: false } }
]
})
}).then(total => {
totalEmailsToSend = total;
console.log(total);
if (totalEmailsToSend > AvailableToday && process.env.NODE_ENV === 'production') {
res.status(400).send({ message: `This list exceeds your 24 hour allowance of ${AvailableToday} emails. Please upgrade your SES limit.` });
} else {
generator.next({ totalListSubscribers, totalEmailsToSend });
}
return null;
}).catch(err => {
throw err;
res.status(500).send(err);
});
}
function updateAnalytics(campaignId, userId, totalEmails) {
db.user.findById(
userId
).then(foundUser => {
return foundUser.increment('sentEmailsCount', { by: totalEmails });
}).then(() => {
return db.campaignanalytics.findOne(
{ where: { campaignId } }
);
}).then(result => {
generator.next(result.dataValues.id);
return null;
}).catch(err => {
throw err;
res.status(500).send(err);
});
}
>>>>>>>
ses.getSendQuota((err, data) => {
if (err) { // Either access keys are wrong here or the request is being placed too quickly
res.status(400).send({ message: 'Please confirm your Amazon SES settings and try again later.' });
} else {
const { Max24HourSend, SentLast24Hours, MaxSendRate } = data;
const AvailableToday = Max24HourSend - SentLast24Hours;
generator.next({ Max24HourSend, SentLast24Hours, MaxSendRate, AvailableToday });
}
});
}
function countListSubscribers(listId, AvailableToday, campaignId) {
let totalListSubscribers, totalEmailsToSend;
db.listsubscriber.count({
where: {
listId,
subscribed: true
}
}).then(total => {
totalListSubscribers = total;
console.log(total);
return db.listsubscriber.count({
where: {
listId,
subscribed: true
},
include: [
{ model: db.campaignsubscriber, where: { campaignId, sent: false } }
]
})
}).then(total => {
totalEmailsToSend = total;
console.log(total);
if (totalEmailsToSend > AvailableToday && process.env.NODE_ENV === 'production') {
res.status(400).send({ message: `This list exceeds your 24 hour allowance of ${AvailableToday} emails. Please upgrade your SES limit.` });
} else {
generator.next({ totalListSubscribers, totalEmailsToSend });
}
return null;
}).catch(err => {
throw err;
res.status(500).send(err);
});
}
<<<<<<<
function howLongEmailingWillTake(totalListSubscribers, AvailableToday, MaxSendRate) {
const timeTaken = (totalListSubscribers / MaxSendRate / 60);
const emailsLeftAfterSend = AvailableToday - totalListSubscribers;
let formattedMessage = `Your campaign is being sent to ${totalListSubscribers.toLocaleString('en-GB')} subscribers, it should be done `;
=======
function howLongEmailingWillTake(totalListSubscribers, AvailableToday, MaxSendRate, status) {
const timeTaken = (totalListSubscribers / MaxSendRate / 60);
const emailsLeftAfterSend = AvailableToday - totalListSubscribers;
let formattedMessage
if (status == 'ready') {
formattedMessage = `Your campaign is being sent to ${totalListSubscribers.toLocaleString('en-GB')} subscribers, it should be done `;
} else if (status == 'interrupted') {
formattedMessage = `Campaign sending resumed - sending to remaining ${totalListSubscribers.toLocaleString('en-GB')} subscribers, it should be done `;
}
>>>>>>>
function howLongEmailingWillTake(totalEmailsToSend, AvailableToday, MaxSendRate, status) {
const timeTaken = (totalEmailsToSend / MaxSendRate / 60);
const emailsLeftAfterSend = AvailableToday - totalEmailsToSend;
console.log(totalEmailsToSend);
let formattedMessage
if (status == 'ready') {
formattedMessage = `Your campaign is being sent to ${totalEmailsToSend.toLocaleString('en-GB')} subscribers, it should be done `;
} else if (status == 'interrupted') {
formattedMessage = `Campaign sending resumed - sending to remaining ${totalEmailsToSend.toLocaleString('en-GB')} subscribers, it should be done `;
} |
<<<<<<<
app.post('/api/send', apiIsAuth, parseJson, (req, res) => {
sendCampaign(req, res, io, redis);
});
// Stop sending a campaign
app.post('/api/stop', apiIsAuth, parseJson, (req, res) => {
stopCampaignSending(req, res, redis)
=======
app.post('/api/send', apiIsAuth, parseJson, cookieParser, (req, res) => {
sendCampaign(req, res, io);
>>>>>>>
app.post('/api/send', apiIsAuth, parseJson, cookieParser, (req, res) => {
sendCampaign(req, res, io, redis);
});
// Stop sending a campaign
app.post('/api/stop', apiIsAuth, parseJson, (req, res) => {
stopCampaignSending(req, res, redis); |
<<<<<<<
=======
let userId = '';
const access = campaignPermission(req.cookies.user, req.user.id)
.then(userIdAndCampaigns => {
// userIdAndCampaigns.userId must equal 'Write'
if (userIdAndCampaigns.campaigns === 'Write') {
throw 'Permission denied';
} else {
userId = userIdAndCampaigns.userId;
return null;
}
});
Promise.all([access])
.then(() => {
// BEGIN ACCESS CONTROL
>>>>>>>
let userId = '';
const access = campaignPermission(req.cookies.user, req.user.id)
.then(userIdAndCampaigns => {
// userIdAndCampaigns.userId must equal 'Write'
if (userIdAndCampaigns.campaigns === 'Write') {
throw 'Permission denied';
} else {
userId = userIdAndCampaigns.userId;
return null;
}
});
Promise.all([access])
.then(() => {
// BEGIN ACCESS CONTROL
<<<<<<<
=======
// END ACCESS CONTROL
})
.catch(err => {
res.status(400).send(err);
});
>>>>>>>
// END ACCESS CONTROL
})
.catch(err => {
res.status(400).send(err);
}); |
<<<<<<<
// Node 8 supports native async functions - no need to use compiled code!
module.exports =
parseInt(process.versions.node, 10) < 8
? require('../lib/cli')
: require('../src/cli');
=======
#!/usr/bin/env node
require('v8-compile-cache');
const chalk = require('chalk');
const program = require('commander');
const version = require('../package.json').version;
program.version(version);
program
.command('serve [input]')
.description('starts a development server')
.option(
'-p, --port <port>',
'set the port to serve on. defaults to 1234',
parseInt
)
.option('-o, --open', 'automatically open in default browser')
.option(
'-d, --out-dir <path>',
'set the output directory. defaults to "dist"'
)
.option(
'--public-url <url>',
'set the public URL to serve on. defaults to the same as the --out-dir option'
)
.option('--no-hmr', 'disable hot module replacement')
.option('--no-cache', 'disable the filesystem cache')
.option('-V, --version', 'output the version number')
.action(bundle);
program
.command('watch [input]')
.description('starts the bundler in watch mode')
.option(
'-d, --out-dir <path>',
'set the output directory. defaults to "dist"'
)
.option(
'--public-url <url>',
'set the public URL to serve on. defaults to the same as the --out-dir option'
)
.option('--no-hmr', 'disable hot module replacement')
.option('--no-cache', 'disable the filesystem cache')
.action(bundle);
program
.command('build [input]')
.description('bundles for production')
.option(
'-d, --out-dir <path>',
'set the output directory. defaults to "dist"'
)
.option(
'--public-url <url>',
'set the public URL to serve on. defaults to the same as the --out-dir option'
)
.option('--no-minify', 'disable minification')
.option('--no-cache', 'disable the filesystem cache')
.action(bundle);
program
.command('help [command]')
.description('display help information for a command')
.action(function(command) {
let cmd = program.commands.find(c => c.name() === command) || program;
cmd.help();
});
program.on('--help', function() {
console.log('');
console.log(
' Run `' +
chalk.bold('parcel help <command>') +
'` for more information on specific commands'
);
console.log('');
});
// Make serve the default command
var args = process.argv;
if (!args[2] || !program.commands.some(c => c.name() === args[2])) {
args.splice(2, 0, 'serve');
}
program.parse(args);
async function bundle(main, command) {
// Require bundler here so the help command is fast
const Bundler = require('../');
if (command.name() === 'build') {
process.env.NODE_ENV = 'production';
} else {
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
}
const bundler = new Bundler(main, command);
if (command.name() === 'serve') {
const server = await bundler.serve(command.port || 1234);
if (command.open) {
require('opn')(`http://localhost:${server.address().port}`);
}
} else {
bundler.bundle();
}
}
>>>>>>>
#!/usr/bin/env node
// Node 8 supports native async functions - no need to use compiled code!
module.exports =
parseInt(process.versions.node, 10) < 8
? require('../lib/cli')
: require('../src/cli'); |
<<<<<<<
options: ParcelOptions
};
=======
cliOpts: CLIOptions
|};
>>>>>>>
options: ParcelOptions
|};
<<<<<<<
return await transformer.generate(input, config, this.options);
=======
return transformer.generate(input, config, this.cliOpts);
>>>>>>>
return transformer.generate(input, config, this.options); |
<<<<<<<
FilePath,
ParcelOptions,
=======
CLIOptions,
FilePath,
Namer,
>>>>>>>
FilePath,
Namer,
ParcelOptions,
<<<<<<<
type Opts = {
options: ParcelOptions,
=======
type Opts = {|
cliOpts: CLIOptions,
>>>>>>>
type Opts = {|
options: ParcelOptions,
<<<<<<<
async bundle(graph: AssetGraph) {
report({
type: 'buildProgress',
phase: 'bundling'
});
=======
async bundle(graph: AssetGraph): Promise<BundleGraph> {
>>>>>>>
async bundle(graph: AssetGraph): Promise<BundleGraph> {
report({
type: 'buildProgress',
phase: 'bundling'
}); |
<<<<<<<
import localRequire from '@parcel/utils/src/localRequire';
=======
import {localResolve} from '@parcel/utils/src/localRequire';
>>>>>>>
import {localResolve} from '@parcel/utils/src/localRequire';
<<<<<<<
let [resolved, pkg] = await localRequire.resolve(pluginName, this.filePath);
=======
let [resolved, pkg] = await localResolve(pluginName, this.configPath);
>>>>>>>
let [resolved, pkg] = await localResolve(pluginName, this.filePath); |
<<<<<<<
import type {Bundle, ParcelOptions, Blob, FilePath} from '@parcel/types';
import {report} from './ReporterRunner';
=======
>>>>>>>
import {report} from './ReporterRunner';
<<<<<<<
options: ParcelOptions
};
=======
cliOpts: CLIOptions
|};
>>>>>>>
options: ParcelOptions
|};
<<<<<<<
await writeFile(bundle.filePath, contents);
return {
time: Date.now() - start,
size: contents.length
};
=======
await writeFile(filePath, contents);
>>>>>>>
await writeFile(nullthrows(bundle.filePath), contents);
return {
time: Date.now() - start,
size: contents.length
};
<<<<<<<
report({
type: 'buildProgress',
phase: 'packaging',
bundle
});
// $FlowFixMe - filePath should already be filled in at this point
let packager = await this.config.getPackager(bundle.filePath);
return await packager.package(bundle, this.options);
=======
let packager = await this.config.getPackager(nullthrows(bundle.filePath));
return packager.package(bundle, this.cliOpts);
>>>>>>>
report({
type: 'buildProgress',
phase: 'packaging',
bundle
});
let packager = await this.config.getPackager(nullthrows(bundle.filePath));
return packager.package(bundle, this.options);
<<<<<<<
// $FlowFixMe - filePath should already be filled in at this point
let optimizers = await this.config.getOptimizers(bundle.filePath);
if (!optimizers.length) {
return contents;
}
report({
type: 'buildProgress',
phase: 'optimizing',
bundle
});
=======
let optimizers = await this.config.getOptimizers(
nullthrows(bundle.filePath)
);
>>>>>>>
let optimizers = await this.config.getOptimizers(
nullthrows(bundle.filePath)
);
if (!optimizers.length) {
return contents;
}
report({
type: 'buildProgress',
phase: 'optimizing',
bundle
}); |
<<<<<<<
const abortError = new Error('Build aborted');
=======
type ParcelOpts = {|
entries: string | Array<string>,
cwd?: string,
cliOpts: CLIOptions,
killWorkers?: boolean,
env?: {[string]: ?string},
config?: ParcelConfig,
defaultConfig?: ParcelConfig
|};
>>>>>>>
<<<<<<<
async init() {
await Cache.createCacheDir(this.options.cacheDir);
=======
async init(): Promise<void> {
await Cache.createCacheDir(this.options.cliOpts.cacheDir);
>>>>>>>
async init(): Promise<void> {
await Cache.createCacheDir(this.options.cacheDir);
<<<<<<<
this.bundlerRunner = new BundlerRunner({
config,
options: this.options,
rootDir: this.rootDir
});
this.reporterRunner = new ReporterRunner({
config,
options: this.options
});
let targetResolver = new TargetResolver();
let targets = await targetResolver.resolve(this.rootDir);
this.assetGraphBuilder = new AssetGraphBuilder({
options: this.options,
config,
entries: this.entries,
targets,
rootDir: this.rootDir
});
this.farm = await WorkerFarm.getShared(
{
config,
options: this.options,
env: this.options.env
},
{
workerPath: require.resolve('./worker')
}
);
this.runPackage = this.farm.mkhandle('runPackage');
}
async run() {
await this.init();
=======
this.bundlerRunner = new BundlerRunner({
config,
cliOpts: this.options.cliOpts,
rootDir: this.rootDir
});
let targetResolver = new TargetResolver();
let targets = await targetResolver.resolve(this.rootDir);
this.assetGraphBuilder = new AssetGraphBuilder({
cliOpts: this.options.cliOpts,
config,
entries: this.entries,
targets,
rootDir: this.rootDir
});
this.farm = await WorkerFarm.getShared(
{
config,
cliOpts: this.options.cliOpts,
env: this.options.env
},
{
workerPath: require.resolve('./worker')
}
);
this.runPackage = this.farm.mkhandle('runPackage');
}
async run(): Promise<BundleGraph> {
await this.init();
>>>>>>>
this.bundlerRunner = new BundlerRunner({
config,
options: this.options,
rootDir: this.rootDir
});
this.reporterRunner = new ReporterRunner({
config,
options: this.options
});
let targetResolver = new TargetResolver();
let targets = await targetResolver.resolve(this.rootDir);
this.assetGraphBuilder = new AssetGraphBuilder({
options: this.options,
config,
entries: this.entries,
targets,
rootDir: this.rootDir
});
this.farm = await WorkerFarm.getShared(
{
config,
options: this.options,
env: this.options.env
},
{
workerPath: require.resolve('./worker')
}
);
this.runPackage = this.farm.mkhandle('runPackage');
}
async run(): Promise<BundleGraph> {
await this.init();
<<<<<<<
=======
if (process.env.PARCEL_DUMP_GRAPH != null) {
const dumpGraphToGraphViz = require('@parcel/utils/src/dumpGraphToGraphViz')
.default;
await dumpGraphToGraphViz(assetGraph, 'MainAssetGraph');
}
>>>>>>>
if (process.env.PARCEL_DUMP_GRAPH != null) {
const dumpGraphToGraphViz = require('@parcel/utils/src/dumpGraphToGraphViz')
.default;
await dumpGraphToGraphViz(assetGraph, 'MainAssetGraph');
}
<<<<<<<
if (e !== abortError) {
// console.error(e); // eslint-disable-line no-console
this.reporterRunner.report({
type: 'buildFailure',
error: e
});
=======
if (!(e instanceof BuildAbortError)) {
console.error(e); // eslint-disable-line no-console
>>>>>>>
if (!(e instanceof BuildAbortError)) {
this.reporterRunner.report({
type: 'buildFailure',
error: e
}); |
<<<<<<<
=======
import {PluginLogger} from '@parcel/logger';
import ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';
import path from 'path';
>>>>>>>
<<<<<<<
let result = await resolver.resolve({
filePath,
dependency: dep,
options: this.pluginOptions
});
=======
try {
let result = await resolver.plugin.resolve({
dependency: dep,
options: this.pluginOptions,
logger: new PluginLogger({origin: resolver.name})
});
>>>>>>>
try {
let result = await resolver.plugin.resolve({
filePath,
dependency: dep,
options: this.pluginOptions,
logger: new PluginLogger({origin: resolver.name})
});
<<<<<<<
if (result && result.filePath) {
return {
filePath: result.filePath,
sideEffects: result.sideEffects,
code: result.code,
env: dependency.env,
pipeline: pipeline ?? dependency.pipeline
};
=======
if (result && result.filePath) {
return {
filePath: result.filePath,
sideEffects: result.sideEffects,
code: result.code,
env: dependency.env,
pipeline: dependency.pipeline
};
}
} catch (e) {
throw new ThrowableDiagnostic({
diagnostic: errorToDiagnostic(e, resolver.name)
});
>>>>>>>
if (result && result.filePath) {
return {
filePath: result.filePath,
sideEffects: result.sideEffects,
code: result.code,
env: dependency.env,
pipeline: pipeline ?? dependency.pipeline
};
}
} catch (e) {
throw new ThrowableDiagnostic({
diagnostic: errorToDiagnostic(e, resolver.name)
}); |
<<<<<<<
=======
// Pad a string with spaces on either side
function pad(
text: string,
length: number,
align: 'left' | 'right' = 'left'
): string {
let pad = ' '.repeat(length - stringWidth(text));
if (align === 'right') {
return pad + text;
}
return text + pad;
}
// Count visible characters in a string
function stringWidth(string: string): number {
return countBreaks(stripAnsi('' + string));
}
let loggerExport: Logger;
>>>>>>>
<<<<<<<
module.exports = new Logger();
}
let logger = module.exports;
// eslint-disable-next-line no-console
console.log = message => {
logger.info(message);
};
// eslint-disable-next-line no-console
console.warn = message => {
logger.warn(message);
};
// eslint-disable-next-line no-console
console.error = message => {
logger.error(message);
};
=======
loggerExport = new Logger();
}
export default loggerExport;
>>>>>>>
logger = new Logger();
}
/* eslint-disable no-console */
// $FlowFixMe
console.log = (...messages: Array<mixed>) => {
logger.info(messages.map(m => inspect(m)).join(' '));
};
// $FlowFixMe
console.warn = message => {
logger.warn(message);
};
// $FlowFixMe
console.error = message => {
logger.error(message);
};
/* eslint-enable no-console */
export default logger; |
<<<<<<<
scoresHelper(scores.l, team, body, outData);
=======
buildAndPrintScores(scores.l, team, body);
>>>>>>>
buildAndPrintScores(scores.l, team, body, outData); |
<<<<<<<
const outData = {
json: (standings.json === undefined) ? undefined : standings.json,
csv: (standings.csv === undefined) ? undefined : standings.csv,
dir: (standings.dir === undefined) ? undefined : standings.dir
};
=======
>>>>>>>
const outData = {
json: (standings.json === undefined) ? undefined : standings.json,
csv: (standings.csv === undefined) ? undefined : standings.csv,
dir: (standings.dir === undefined) ? undefined : standings.dir
};
<<<<<<<
standingsHelper(body, outData);
=======
buildAndPrintStandings(body);
>>>>>>>
buildAndPrintStandings(body, outData); |
<<<<<<<
const fixturesHelper = (league, name, team, body, outData) => {
=======
const buildAndPrintFixtures = (league, name, team, body) => {
>>>>>>>
const buildAndPrintFixtures = (league, name, team, body, outData) => {
<<<<<<<
const scoresHelper = (isLive, team, body, outData) => {
=======
const buildAndPrintScores = (isLive, team, body) => {
>>>>>>>
const buildAndPrintScores = (isLive, team, body, outData) => {
<<<<<<<
const standings = (body, outData) => {
=======
const buildAndPrintStandings = (body) => {
>>>>>>>
const buildAndPrintStandings = (body, outData) => { |
<<<<<<<
=======
webFrame.setIsolatedWorldHumanReadableName(worldId, cs.extensionName)
webFrame.setIsolatedWorldSecurityOrigin(worldId, `${constants.EXTENSION_PROTOCOL}://${cs.extensionId}`)
const getContentSecurityPolicy = () => ipcRenderer.sendSync('GET_CONTENTSECURITYPOLICY_SYNC');
>>>>>>>
<<<<<<<
const csp = contentSecurityPolicy.policy || "script-src 'self'; object-src 'self'";
setIsolatedWorldInfo(worldId, cs.extensionName, `chrome-extension://${cs.chromeStoreExtensionId}`, csp);
=======
if (contentSecurityPolicy.policy) {
webFrame.setIsolatedWorldContentSecurityPolicy(worldId, contentSecurityPolicy.policy);
} else {
// Match Chromium kDefaultIsolatedWorldCSP_Secure
// https://cs.chromium.org/chromium/src/extensions/common/manifest_handlers/csp_info.cc?l=36
webFrame.setIsolatedWorldContentSecurityPolicy(worldId, "script-src 'self'; object-src 'self'");
}
>>>>>>>
// Defaults to Chromium kDefaultIsolatedWorldCSP_Secure
// https://cs.chromium.org/chromium/src/extensions/common/manifest_handlers/csp_info.cc?l=36
const csp = contentSecurityPolicy.policy || "script-src 'self'; object-src 'self'";
setIsolatedWorldInfo(worldId, cs.extensionName, `${constants.EXTENSION_PROTOCOL}://${cs.extensionId}`, csp); |
<<<<<<<
await ECx.load('kbfnbcaeplbcioakkpcpgfkobkghlhen');
=======
// load React for the fun
await ECx.load('fmkadmapgofadopljbjfkapdkoienihi');
>>>>>>>
await ECx.load('kbfnbcaeplbcioakkpcpgfkobkghlhen');
// load React for the fun
await ECx.load('fmkadmapgofadopljbjfkapdkoienihi'); |
<<<<<<<
=======
// TMP Folder
tmpFolder = Settings.tmpLocation,
>>>>>>>
<<<<<<<
win.on('close', function(){
deleteFolder(App.settings.temporaryDirectory);
win.close(true);
});
=======
if(Settings.deleteTmpOnClose) {
win.on('close', function(){
deleteFolder(tmpFolder);
win.close(true);
});
}
>>>>>>>
win.on('close', function(){
deleteFolder(App.settings.temporaryDirectory);
win.close(true);
}); |
<<<<<<<
'lt', 'nl', 'no', 'pl', 'pt', 'pt-br', 'ro', 'ru', 'sk', 'sv', 'tr'],
=======
'lt', 'nl', 'no', 'pl', 'pt', 'pt-br', 'ro', 'ru', 'sv', 'tr', 'zh-tw'],
>>>>>>>
'lt', 'nl', 'no', 'pl', 'pt', 'pt-br', 'ro', 'ru', 'sk', 'sv', 'tr', 'zh-tw'], |
<<<<<<<
window.spawnCallback = function (url, subs) {
// Sort sub according lang translation
var subArray = [];
for (lang in subs) {
subArray.push({
'language': Languages[lang],
'sub': subs[lang]
});
}
subArray.sort(function (sub1, sub2) {
return sub1.language.localeCompare(sub2.language);
});
=======
window.spawnCallback = function (url, subs, movieModel) {
>>>>>>>
window.spawnCallback = function (url, subs, movieModel) {
// Sort sub according lang translation
var subArray = [];
for (lang in subs) {
subArray.push({
'language': Languages[lang],
'sub': subs[lang]
});
}
subArray.sort(function (sub1, sub2) {
return sub1.language.localeCompare(sub2.language);
});
<<<<<<<
for( index in subArray ) {
subtracks += '<track kind="subtitles" src="app://host/' + subArray[index].sub + '" srclang="es" label="' + subArray[index].language + '" charset="utf-8" />';
=======
for( lang in subs ) {
subtracks += '<track kind="subtitles" src="app://host/' + subs[lang] + '" srclang="'+ lang +'" label="' + i18n.__(lang) + '" charset="utf-8" />';
>>>>>>>
for( index in subArray ) {
subtracks += '<track kind="subtitles" src="app://host/' + subArray[index].sub + '" srclang="es" label="' + subArray[index].language + '" charset="utf-8" />'; |
<<<<<<<
var ObjCClass = require('cocoascript-class').default
var EventEmitter = require('events')
var parseWebArguments = require('./parseWebArguments')
var CONSTANTS = require('./constants')
// We create one ObjC class for ourselves here
var NavigationDelegateClass
var WebScriptHandlerClass
// TODO: events
// - 'page-favicon-updated'
// - 'new-window'
// - 'did-navigate-in-page'
// - 'will-prevent-unload'
// - 'crashed'
// - 'unresponsive'
// - 'responsive'
// - 'destroyed'
// - 'before-input-event'
// - 'certificate-error'
// - 'found-in-page'
// - 'media-started-playing'
// - 'media-paused'
// - 'did-change-theme-color'
// - 'update-target-url'
// - 'cursor-changed'
// - 'context-menu'
// - 'select-bluetooth-device'
// - 'paint'
// - 'console-message'
=======
var EventEmitter = require('@skpm/events')
>>>>>>>
var EventEmitter = require('events')
<<<<<<<
if (!NavigationDelegateClass) {
NavigationDelegateClass = ObjCClass({
classname: 'NavigationDelegateClass',
state: NSMutableDictionary.dictionaryWithDictionary({
wasReady: 0,
}),
utils: null,
// // Called when the web view begins to receive web content.
'webView:didCommitNavigation:': function(webView) {
this.utils.emit('will-navigate', {}, String(String(webView.url())))
},
// // Called when web content begins to load in a web view.
'webView:didStartProvisionalNavigation:': function() {
this.utils.emit('did-start-navigation')
this.utils.emit('did-start-loading')
},
// Called when a web view receives a server redirect.
'webView:didReceiveServerRedirectForProvisionalNavigation:': function() {
this.utils.emit('did-get-redirect-request')
},
// // Called when the web view needs to respond to an authentication challenge.
'webView:didReceiveAuthenticationChallenge:completionHandler:': function(
webView,
challenge,
completionHandler
) {
function callback(username, password) {
completionHandler(
0,
NSURLCredential.credentialWithUser_password_persistence(
username,
password,
1
)
)
}
var protectionSpace = challenge.protectionSpace()
this.utils.emit(
'login',
{},
{
method: String(protectionSpace.authenticationMethod()),
url: 'not implemented', // TODO:
referrer: 'not implemented', // TODO:
},
{
isProxy: !!protectionSpace.isProxy(),
scheme: String(protectionSpace.protocol()),
host: String(protectionSpace.host()),
port: Number(protectionSpace.port()),
realm: String(protectionSpace.realm()),
},
callback
)
},
// Called when an error occurs during navigation.
// 'webView:didFailNavigation:withError:': function(
// webView,
// navigation,
// error
// ) {},
// Called when an error occurs while the web view is loading content.
'webView:didFailProvisionalNavigation:withError:': function(
webView,
navigation,
error
) {
this.utils.emit('did-fail-load', error)
},
// Called when the navigation is complete.
'webView:didFinishNavigation:': function() {
if (this.state.wasReady == 0) {
// eslint-disable-line
this.utils.emitBrowserEvent('ready-to-show')
this.state.setObject_forKey(1, 'wasReady')
}
this.utils.emit('did-navigate')
this.utils.emit('did-frame-navigate')
this.utils.emit('did-stop-loading')
this.utils.emit('did-finish-load')
this.utils.emit('did-frame-finish-load')
},
// Called when the web view’s web content process is terminated.
'webViewWebContentProcessDidTerminate:': function() {
this.utils.emit('dom-ready')
},
// Decides whether to allow or cancel a navigation.
// webView:decidePolicyForNavigationAction:decisionHandler:
// Decides whether to allow or cancel a navigation after its response is known.
// webView:decidePolicyForNavigationResponse:decisionHandler:
})
}
if (!WebScriptHandlerClass) {
WebScriptHandlerClass = ObjCClass({
classname: 'WebScriptHandlerClass',
utils: null,
'userContentController:didReceiveScriptMessage:': function(_, message) {
var webArguments = JSON.parse(String(message.body()))
var args = this.utils.parseWebArguments([JSON.stringify(webArguments)])
if (!args) {
return
}
this.utils.emit.apply(this, args)
},
})
}
var navigationDelegate = NavigationDelegateClass.new()
navigationDelegate.utils = NSDictionary.dictionaryWithDictionary({
setTitle: browserWindow.setTitle.bind(browserWindow),
emitBrowserEvent: browserWindow.emit.bind(browserWindow),
emit: webContents.emit.bind(webContents),
})
// reset state as well
navigationDelegate.state = NSMutableDictionary.dictionaryWithDictionary({
wasReady: 0,
})
webview.setNavigationDelegate(navigationDelegate)
var webScriptHandler = WebScriptHandlerClass.new()
webScriptHandler.utils = NSDictionary.dictionaryWithDictionary({
emit: webContents.emit.bind(webContents),
parseWebArguments: parseWebArguments,
})
webview
.configuration()
.userContentController()
.addScriptMessageHandler_name(webScriptHandler, CONSTANTS.JS_BRIDGE)
=======
>>>>>>> |
<<<<<<<
this._activeJobs = 0;
this._delayedJobs = new Map();
=======
>>>>>>>
this._delayedJobs = new Map(); |
<<<<<<<
before(Ironium.purgeQueues);
before(function() {
=======
before(() => {
>>>>>>>
before(function() {
<<<<<<<
before(Ironium.purgeQueues);
before(function() {
=======
before(() => {
>>>>>>>
before(function() {
<<<<<<<
before(Ironium.purgeQueues);
before(function() {
=======
before(() => {
>>>>>>>
before(function() {
<<<<<<<
it('should run jobs in parallel', function() {
assert.equal(chain.join(''), '121234345656');
=======
it('should run jobs in parallel', () => {
assert(chain.join('').startsWith('12123434'));
>>>>>>>
it('should run jobs in parallel', function() {
assert(chain.join('').startsWith('12123434')); |
<<<<<<<
function(Obj, Firebug, Xpcom, Console, Css, Win, Arr, Str, BreakpointStore,
ErrorMessageObj, Eventsm, ErrorStackTraceObserver) {
=======
function(Module, Obj, Firebug, FirebugReps, Xpcom, Console, Css, Win, Arr, Str) {
>>>>>>>
function(Module, Obj, Firebug, FirebugReps, Xpcom, Console, Css, Win, Arr, Str, BreakpointStore,
ErrorMessageObj, Eventsm, ErrorStackTraceObserver) {
<<<<<<<
/**
* @module
*/
var Errors = Firebug.Errors = Obj.extend(Firebug.Module,
/** @lends Errors */
=======
var Errors = Firebug.Errors = Obj.extend(Module,
>>>>>>>
/**
* @module
*/
var Errors = Firebug.Errors = Obj.extend(Module,
/** @lends Errors */ |
<<<<<<<
function(Firebug, Http, Dom) {
=======
function (Firebug, Http, Dom, Css) {
>>>>>>>
function(Firebug, Http, Dom, Css) {
<<<<<<<
init: function(parentNode, config, callback)
=======
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Initialization
init: function (parentNode, config, callback)
>>>>>>>
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Initialization
init: function (parentNode, config, callback)
<<<<<<<
}, config);
callback();
=======
this.view = elt;
}
// Create editor;
this.editorObject = doc.defaultView.CodeMirror(
onEditorCreate.bind(this), config);
>>>>>>>
}, config);
<<<<<<<
handler(getEventObject(type, arguments));
};
if (!this.BuiltInEventsHandlers)
this.BuiltInEventsHandlers = {};
if (!this.BuiltInEventsHandlers[type])
=======
this.editorObject.on(type, function ()
{
handler(getEventObject(type, arguments));
});
}
else if (type == SourceEditor.Events.breakpointChange)
>>>>>>>
handler(getEventObject(type, arguments));
};
if (!this.BuiltInEventsHandlers)
this.BuiltInEventsHandlers = {};
if (!this.BuiltInEventsHandlers[type])
<<<<<<<
for (var i = 0; i < this.BuiltInEventsHandlers[type].length; i++)
{
// There is already the same handler.
if (this.BuiltInEventsHandlers[type][i].handler == handler)
return;
}
=======
FBTrace.sysout("addEventListener; " + type)
editorNode = this.editorObject.getWrapperElement();
editorNode.addEventListener(type, handler, false);
>>>>>>>
for (var i = 0; i < this.BuiltInEventsHandlers[type].length; i++)
{
// There is already the same handler.
if (this.BuiltInEventsHandlers[type][i].handler == handler)
return;
}
FBTrace.sysout("addEventListener; " + type);
editorNode = this.editorObject.getWrapperElement();
editorNode.addEventListener(type, handler, false);
<<<<<<<
=======
getSelectedText: function()
{
return this.editorObject.getSelection();
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
>>>>>>>
getSelectedText: function()
{
return this.editorObject.getSelection();
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
<<<<<<<
// TODO
},
focus: function()
{
this.editorObject.focus();
},
// ********************************************************************************************* //
// Breakpoints
addBreakpoint: function(lineNo)
{
var info = this.editorObject.lineInfo(lineNo);
if (!info.gutterMarkers)
{
var breakpoint = this.getGutterElement().ownerDocument.createElement("div");
breakpoint.className = "breakpoint";
this.editorObject.setGutterMarker(lineNo, SourceEditor.Gutters.breakpoints, breakpoint);
// dispatch event;
if (this.bpChangingHandlers)
{
var event = {
added: [{ line: lineNo}],
removed: []
};
this.bpChangingHandlers.forEach(function(handler)
{
handler(event);
});
}
}
},
removeBreakpoint: function(lineNo)
{
this.removeGutterMarker(SourceEditor.Gutters.breakpoints, lineNo);
// dispatch event;
if (this.bpChangingHandlers)
{
var event = {
added: [],
removed: [{ line: lineNo}]
};
this.bpChangingHandlers.forEach(function(handler)
{
handler(event);
});
}
},
// ************************************************************************************************** //
// Gutters and Marker API
setGutterMarker: function(gutter, lineNo, markerElt)
{
this.editorObject.setGutterMarker(lineNo, gutter, markerElt);
},
removeGutterMarker: function(gutter, lineNo)
{
this.editorObject.setGutterMarker(lineNo, gutter, null);
},
clearGutter: function(gutter)
{
this.editorObject.clearGutter(gutter);
},
getGutterMarker: function(gutter, lineNo)
{
var info = this.editorObject.lineInfo(lineNo);
return (info.gutterMarkers && info.gutterMarkers[gutter] ?
info.gutterMarkers[gutter] : null);
},
// ************************************************************************************************** //
// Editor DOM nodes
getViewElement: function()
{
return this.editorObject.getWrapperElement();
},
getGutterElement: function()
{
return this.editorObject.getGutterElement();
}
=======
var coords = {line: line, ch: 0};
this.editorObject.scrollTo(0, this.editor.charCoords(coords, "local").top);
},
focus: function()
{
this.editorObject.focus();
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
getLineFromEvent: function(e)
{
var pos = {
left: event.pageX,
top: event.pageY - 60 //xxxHonza: why the top is not zero but 60 in the event?
};
return this.editorObject.coordsChar(pos);
},
getLineIndex: function(target)
{
// xxxHonza: the target provided by 'contextmenu' event is wrong and so,
// use the one from 'mousedown'
if (this.currentTarget)
target = this.currentTarget;
var lineElement = Dom.getAncestorByClass(target, "firebug-line");
if (!lineElement)
return -1;
lineElement = lineElement.parentNode;
//var lineObj = lineElement.lineObj; // other useful info
var lineNo = parseInt(lineElement.lineNumber, 10);
if (isNaN(lineNo))
return -1;
// Return index (zero based)
return lineNo - 1;
},
>>>>>>>
var coords = {line: line, ch: 0};
this.editorObject.scrollTo(0, this.editor.charCoords(coords, "local").top);
},
focus: function()
{
this.editorObject.focus();
},
// ********************************************************************************************* //
// Breakpoints
addBreakpoint: function(lineNo)
{
var info = this.editorObject.lineInfo(lineNo);
if (!info.gutterMarkers)
{
var breakpoint = this.getGutterElement().ownerDocument.createElement("div");
breakpoint.className = "breakpoint";
this.editorObject.setGutterMarker(lineNo, SourceEditor.Gutters.breakpoints, breakpoint);
// dispatch event;
if (this.bpChangingHandlers)
{
var event = {
added: [{ line: lineNo}],
removed: []
};
this.bpChangingHandlers.forEach(function(handler)
{
handler(event);
});
}
}
},
removeBreakpoint: function(lineNo)
{
this.removeGutterMarker(SourceEditor.Gutters.breakpoints, lineNo);
// dispatch event;
if (this.bpChangingHandlers)
{
var event = {
added: [],
removed: [{ line: lineNo}]
};
this.bpChangingHandlers.forEach(function(handler)
{
handler(event);
});
}
},
// ************************************************************************************************** //
// Gutters and Marker API
setGutterMarker: function(gutter, lineNo, markerElt)
{
this.editorObject.setGutterMarker(lineNo, gutter, markerElt);
},
removeGutterMarker: function(gutter, lineNo)
{
this.editorObject.setGutterMarker(lineNo, gutter, null);
},
clearGutter: function(gutter)
{
this.editorObject.clearGutter(gutter);
},
getGutterMarker: function(gutter, lineNo)
{
var info = this.editorObject.lineInfo(lineNo);
return (info.gutterMarkers && info.gutterMarkers[gutter] ?
info.gutterMarkers[gutter] : null);
},
// ************************************************************************************************** //
// Editor DOM nodes
getViewElement: function()
{
return this.editorObject.getWrapperElement();
},
getGutterElement: function()
{
return this.editorObject.getGutterElement();
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
getLineFromEvent: function(e)
{
var pos = {
left: event.pageX,
top: event.pageY - 60 //xxxHonza: why the top is not zero but 60 in the event?
};
return this.editorObject.coordsChar(pos);
},
getLineIndex: function(target)
{
// xxxHonza: the target provided by 'contextmenu' event is wrong and so,
// use the one from 'mousedown'
if (this.currentTarget)
target = this.currentTarget;
var lineElement = Dom.getAncestorByClass(target, "firebug-line");
if (!lineElement)
return -1;
lineElement = lineElement.parentNode;
//var lineObj = lineElement.lineObj; // other useful info
var lineNo = parseInt(lineElement.lineNumber, 10);
if (isNaN(lineNo))
return -1;
// Return index (zero based)
return lineNo - 1;
},
<<<<<<<
function getBuiltInEvents()
=======
function editorSupportedEvents()
>>>>>>>
function getBuiltInEvents()
<<<<<<<
var builtInEvents = getBuiltInEvents();
for (var event in builtInEvents)
{
if (eventType == builtInEvents[event])
return true;
}
return false;
=======
var supportedEvents = editorSupportedEvents();
return (eventType in supportedEvents ? true : false);
>>>>>>>
var builtInEvents = getBuiltInEvents();
for (var event in builtInEvents)
{
if (eventType == builtInEvents[event])
return true;
}
return false; |
<<<<<<<
callback();
=======
this.view = elt;
callback();
}
// Create editor;
this.editorObject = doc.defaultView.CodeMirror(
onEditorCreate.bind(this), config);
>>>>>>>
callback();
<<<<<<<
else if (type == SourceEditor.Events.breakpointChange)
{
if (!this.bpChangingHandlers)
this.bpChangingHandlers = [];
this.bpChangingHandlers.push(handler);
=======
},
>>>>>>>
else if (type == SourceEditor.Events.breakpointChange)
{
if (!this.bpChangingHandlers)
this.bpChangingHandlers = [];
this.bpChangingHandlers.push(handler);
<<<<<<<
setDebugLocation: function()
=======
setDebugLocation: function(line)
>>>>>>>
setDebugLocation: function(line)
<<<<<<<
getTopIndex: function()
=======
scrollToLine: function(line, options)
{
options = options || {};
if (options.scrollTo == "top")
{
// Scroll so, the specified line is displayed at the top of the editor.
this.editorObject.scrollIntoView({line: line});
}
else
{
var scrollInfo = this.editorObject.getScrollInfo();
var hScrollBar = this.view.getElementsByClassName("CodeMirror-hscrollbar")[0];
// Do not include h-scrollbar in editor height (even if CM docs says getScrollInfo
// returns the visible area minus scrollbars, it doesn't seem to work).
var editorHeight = scrollInfo.clientHeight - hScrollBar.offsetHeight;
var coords = this.editorObject.charCoords({line: line, ch: 0}, "local");
var top = coords.top;
var bottom = coords.bottom;
var lineHeight = this.editorObject.defaultTextHeight();
// Scroll only if the target line is outside of the viewport.
if (top <= scrollInfo.top || bottom >= scrollInfo.top + editorHeight)
{
var middle = top - (editorHeight / 2);
this.editorObject.scrollTo(null, middle);
}
}
},
getTopIndex: function()
>>>>>>>
scrollToLine: function(line, options)
{
options = options || {};
if (options.scrollTo == "top")
{
// Scroll so, the specified line is displayed at the top of the editor.
this.editorObject.scrollIntoView({line: line});
}
else
{
var scrollInfo = this.editorObject.getScrollInfo();
var hScrollBar = this.view.getElementsByClassName("CodeMirror-hscrollbar")[0];
// Do not include h-scrollbar in editor height (even if CM docs says getScrollInfo
// returns the visible area minus scrollbars, it doesn't seem to work).
var editorHeight = scrollInfo.clientHeight - hScrollBar.offsetHeight;
var coords = this.editorObject.charCoords({line: line, ch: 0}, "local");
var top = coords.top;
var bottom = coords.bottom;
var lineHeight = this.editorObject.defaultTextHeight();
// Scroll only if the target line is outside of the viewport.
if (top <= scrollInfo.top || bottom >= scrollInfo.top + editorHeight)
{
var middle = top - (editorHeight / 2);
this.editorObject.scrollTo(null, middle);
}
}
},
getTopIndex: function()
<<<<<<<
},
focus: function()
{
this.editorObject.focus();
},
// ********************************************************************************************* //
// Breakpoints
addBreakpoint: function(lineNo)
{
var info = this.editorObject.lineInfo(lineNo);
if (!info.gutterMarkers)
{
var breakpoint = this.getGutterElement().ownerDocument.createElement("div");
breakpoint.className = "breakpoint";
this.editorObject.setGutterMarker(lineNo, SourceEditor.Gutters.breakpoints, breakpoint);
// dispatch event;
if (this.bpChangingHandlers)
{
var event = {
added: [{ line: lineNo}],
removed: []
};
this.bpChangingHandlers.forEach(function(handler)
{
handler(event);
});
}
}
},
removeBreakpoint: function(lineNo)
{
this.removeGutterMarker(SourceEditor.Gutters.breakpoints, lineNo);
// dispatch event;
if (this.bpChangingHandlers)
{
var event = {
added: [],
removed: [{ line: lineNo}]
};
this.bpChangingHandlers.forEach(function(handler)
{
handler(event);
});
}
},
// ************************************************************************************************** //
// Gutters and Marker API
setGutterMarker: function(gutter, lineNo, markerElt)
{
this.editorObject.setGutterMarker(lineNo, gutter, markerElt);
},
removeGutterMarker: function(gutter, lineNo)
{
this.editorObject.setGutterMarker(lineNo, gutter, null);
},
clearGutter: function(gutter)
{
this.editorObject.clearGutter(gutter);
},
getGutterMarker: function(gutter, lineNo)
{
var info = this.editorObject.lineInfo(lineNo);
return (info.gutterMarkers && info.gutterMarkers[gutter] ?
info.gutterMarkers[gutter] : null);
},
// ************************************************************************************************** //
// Editor DOM nodes
getViewElement: function()
{
return this.editorObject.getWrapperElement();
},
getGutterElement: function()
{
return this.editorObject.getGutterElement();
=======
},
setTopIndex: function()
{
// TODO
>>>>>>>
},
setTopIndex: function()
{
// TODO
},
focus: function()
{
this.editorObject.focus();
},
// ********************************************************************************************* //
// Breakpoints
addBreakpoint: function(lineNo)
{
var info = this.editorObject.lineInfo(lineNo);
if (!info.gutterMarkers)
{
var breakpoint = this.getGutterElement().ownerDocument.createElement("div");
breakpoint.className = "breakpoint";
this.editorObject.setGutterMarker(lineNo, SourceEditor.Gutters.breakpoints, breakpoint);
// dispatch event;
if (this.bpChangingHandlers)
{
var event = {
added: [{ line: lineNo}],
removed: []
};
this.bpChangingHandlers.forEach(function(handler)
{
handler(event);
});
}
}
},
removeBreakpoint: function(lineNo)
{
this.removeGutterMarker(SourceEditor.Gutters.breakpoints, lineNo);
// dispatch event;
if (this.bpChangingHandlers)
{
var event = {
added: [],
removed: [{ line: lineNo}]
};
this.bpChangingHandlers.forEach(function(handler)
{
handler(event);
});
}
},
// ************************************************************************************************** //
// Gutters and Marker API
setGutterMarker: function(gutter, lineNo, markerElt)
{
this.editorObject.setGutterMarker(lineNo, gutter, markerElt);
},
removeGutterMarker: function(gutter, lineNo)
{
this.editorObject.setGutterMarker(lineNo, gutter, null);
},
clearGutter: function(gutter)
{
this.editorObject.clearGutter(gutter);
},
getGutterMarker: function(gutter, lineNo)
{
var info = this.editorObject.lineInfo(lineNo);
return (info.gutterMarkers && info.gutterMarkers[gutter] ?
info.gutterMarkers[gutter] : null);
},
// ************************************************************************************************** //
// Editor DOM nodes
getViewElement: function()
{
return this.editorObject.getWrapperElement();
},
getGutterElement: function()
{
return this.editorObject.getGutterElement();
<<<<<<<
// ************************************************************************************************** //
// Local Helpers
=======
// ********************************************************************************************* //
// Local Helpers
>>>>>>>
// ********************************************************************************************* //
// Local Helpers
<<<<<<<
switch (type)
{
=======
switch (type)
{
>>>>>>>
switch (type)
{
<<<<<<<
=======
>>>>>>> |
<<<<<<<
function getStackDump()
{
var lines = [];
for (var frame = Components.stack; frame; frame = frame.caller)
lines.push(frame.filename + " (" + frame.lineNumber + ")");
return lines.join("\n");
};
// ********************************************************************************************* //
return scope.traceConsoleService.getTracer("extensions.firebug");
=======
return tracer;
>>>>>>>
// ********************************************************************************************* //
return tracer; |
<<<<<<<
Url, SourceLink, SourceFile, StackFrame, StackTrace, Css, Dom, Win, System,
Xpath, Str, Xml, ToggleBranch, ClosureInspector, Menu, CompilationUnit,
ErrorMessageObj, ErrorCopy, NetUtils) {
=======
Url, SourceLink, StackFrame, Css, Dom, Win, System, Xpath, Str, Xml, ToggleBranch,
ClosureInspector, Menu, CompilationUnit, NetUtils, PanelActivation) {
>>>>>>>
Url, SourceLink, SourceFile, StackFrame, StackTrace, Css, Dom, Win, System,
Xpath, Str, Xml, ToggleBranch, ClosureInspector, Menu, CompilationUnit,
NetUtils, PanelActivation) {
<<<<<<<
=======
// XXXjjb Since the repObject is fn the stack does not have correct line numbers
FirebugReps.StackFrame = domplate(Firebug.Rep,
{
tag:
OBJECTBLOCK({$hasTwisty: "$object|hasArguments", _repObject: "$object",
onclick: "$onToggleArguments"},
SPAN({"class":"stackFrameMarker"}, ""),
A({"class": "objectLink a11yFocus", _repObject: "$object"}, "$object|getCallName"),
SPAN("("),
SPAN({"class": "arguments"},
FOR("arg", "$object|argIterator",
SPAN({"class": "argName"}, "$arg.name"),
SPAN("="),
TAG("$arg.tag", {object: "$arg.value"}),
SPAN({"class": "arrayComma"}, "$arg.delim")
)
),
SPAN(")"),
SPAN({"class": "objectLink-sourceLink objectLink a11yFocus",
_repObject: "$object|getSourceLink",
role: "link"},
"$object|getSourceLinkTitle"),
DIV({"class": "argList"})
),
argList:
DIV({"class": "argListBox", onclick: "$onSelectFrame"},
FOR("arg", "$object|argIterator",
DIV({"class": "argBox"},
SPAN({"class": "argName"}, "$arg.name"),
SPAN(" = "),
TAG("$arg.tag", {object: "$arg.value"})
)
)
),
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
getTitle: function(frame)
{
return frame.getFunctionName();
},
hasArguments: function(frame)
{
return frame.args.length;
},
getCallName: function(frame)
{
return frame.getFunctionName();
},
getSourceLinkTitle: function(frame)
{
var fileName = Url.getFileName(frame.href);
var maxWidth = Firebug.sourceLinkLabelWidth;
if (maxWidth > 0)
var fileName = Str.cropString(fileName, maxWidth);
return Locale.$STRF("Line", [fileName, frame.line]);
},
argIterator: function(frame)
{
if (!frame.args)
return [];
var items = [];
for (var i = 0; i < frame.args.length; ++i)
{
var arg = frame.args[i];
if (!arg)
break;
if (arg.hasOwnProperty('value')) // then we got these from jsd
{
var rep = Firebug.getRep(arg.value);
var tag = rep.shortTag ? rep.shortTag : rep.tag;
var delim = (i == frame.args.length-1 ? "" : ", ");
items.push({name: arg.name, value: arg.value, tag: tag, delim: delim});
}
else if (arg.hasOwnProperty('name'))
{
items.push({name: arg.name, delim: delim});
}
else // eg from Error object
{
var delim = (i == frame.args.length-1 ? "" : ", ");
var rep = Firebug.getRep(arg);
var tag = rep.shortTag ? rep.shortTag : rep.tag;
items.push({value: arg, tag: tag, delim: delim});
}
if (FBTrace.DBG_DOMPLATE)
FBTrace.sysout("reps.stackframe args[" + i + "]: " + arg.name + " = " +
arg.value, {arg: arg, item: items[items.length - 1]});
}
return items;
},
getSourceLink: function(stackFrame)
{
var sourceLink = new SourceLink.SourceLink(stackFrame.href, stackFrame.line, "js");
return sourceLink;
},
onToggleArguments: function(event)
{
this.toggleArguments(event.originalTarget);
},
toggleArguments: function(target)
{
if (Css.hasClass(target, "objectBox-stackFrame"))
{
if (Css.hasClass(target, "opened"))
this.collapseArguments(target);
else
this.expandArguments(target);
}
},
collapseArguments: function(target)
{
if (!Css.hasClass(target, "opened"))
return;
Css.toggleClass(target, "opened");
var argList = target.getElementsByClassName("argList").item(0);
Dom.clearNode(argList);
},
expandArguments: function(target)
{
if (Css.hasClass(target, "opened"))
return;
var frame = target.repObject;
if (!this.hasArguments(frame))
return;
Css.toggleClass(target, "opened");
var argList = target.getElementsByClassName("argList").item(0);
this.argList.replace({object: frame}, argList);
},
onSelectFrame: function(event)
{
var target = event.currentTarget;
if (Css.hasClass(target, "argListBox"))
{
var stackFrame = Dom.getAncestorByClass(target, "objectBox-stackFrame");
var panel = Firebug.getElementPanel(target);
this.inspectObject(stackFrame.repObject, panel.context);
Events.cancelEvent(event);
}
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Rep
className: "stackFrame",
supportsObject: function(object, type)
{
return object instanceof StackFrame.StackFrame;
},
inspectObject: function(stackFrame, context)
{
if (context.stopped)
Firebug.chrome.select(stackFrame);
else
Firebug.chrome.select(this.getSourceLink(stackFrame));
},
getTooltip: function(stackFrame, context)
{
return Locale.$STRF("Line", [stackFrame.href, stackFrame.line]);
}
});
// ********************************************************************************************* //
FirebugReps.StackTrace = domplate(Firebug.Rep,
{
tag:
DIV({role : "group", "aria-label" : Locale.$STR("aria.labels.stack trace")},
FOR("frame", "$object.frames|frameIterator",
TAG(FirebugReps.StackFrame.tag, {object: "$frame"})
)
),
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
className: "stackTrace",
supportsObject: function(object, type)
{
return object instanceof StackFrame.StackTrace;
},
frameIterator: function(frames)
{
// Skip Firebug internal frames.
// xxxHonza: this is another place where we peel off stack frames.
var result = [];
for (var i=0; frames && i<frames.length; i++)
{
var frame = frames[i];
var sf = frame.sourceFile;
if ((sf && sf.href && Str.hasPrefix(sf.href, "chrome")) ||
(frame.fn === "_firebugRerun") ||
(frame.fn === "jsdbug_NoScriptFunctionName") ||
(frame.fn === "(debugger)"))
{
continue;
}
result.push(frames[i]);
}
return result;
}
});
// ********************************************************************************************* //
// xxxsz: Is this code still in use?
FirebugReps.Assert = domplate(Firebug.Rep,
{
tag:
DIV(
DIV({"class": "errorTitle"}),
DIV({"class": "assertDescription"})
),
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
className: "assert",
inspectObject: function(error, context)
{
var sourceLink = this.getSourceLink(error);
Firebug.chrome.select(sourceLink);
},
getContextMenuItems: function(error, target, context)
{
var breakOnThisError = this.hasErrorBreak(error);
return [
{
label: "CopyError",
tooltiptext: "console.tip.Copy_Error",
command: Obj.bindFixed(this.copyError, this, error)
},
"-",
{
label: "BreakOnThisError",
tooltiptext: "console.menu.tip.Break_On_This_Error",
type: "checkbox",
checked: breakOnThisError,
command: Obj.bindFixed(this.breakOnThisError, this, error, context)
},
Menu.optionMenu("BreakOnAllErrors", "breakOnErrors",
"console.menu.tip.Break_On_All_Errors")
];
}
});
// ********************************************************************************************* //
>>>>>>>
<<<<<<<
// ********************************************************************************************* //
=======
//********************************************************************************************** //
>>>>>>>
// ********************************************************************************************* // |
<<<<<<<
=======
"firebug/chrome/module",
"firebug/lib/object",
>>>>>>>
<<<<<<<
function(Firebug, FBTrace, Obj, Events, Wrapper, Arr, Css, Dom, Xml, System, Module, Win,
HighlighterCache, QuickInfoBox) {
"use strict";
=======
function(Module, Obj, Firebug, Firefox, FirebugReps, Locale, Events, Wrapper, Arr, Css, Dom, Xml,
Win, System, HighlighterCache, QuickInfoBox) {
>>>>>>>
function(Firebug, FBTrace, Module, Obj, Events, Wrapper, Arr, Css, Dom, Xml, System, Win,
HighlighterCache, QuickInfoBox) {
"use strict"; |
<<<<<<<
/**
* Select a group
*
* @param {string} name - Name of the group to select
*/
const selectGroup = function selectGroup (name) {
if (isOpen()) {
throw new Error('Ups, I\'m open.')
=======
if (callback) {
callback.call(this)
}
lightbox.dispatchEvent(new Event('tobii-next'))
>>>>>>>
/**
* Select the previous slide
*
*/
const previous = function previous () {
if (!isOpen()) {
throw new Error('Ups, I\'m closed.')
}
if (groups[activeGroup].currentIndex > 0) {
leave(groups[activeGroup].currentIndex)
load(--groups[activeGroup].currentIndex)
updateLightbox('left')
cleanup(groups[activeGroup].currentIndex + 1)
preload(groups[activeGroup].currentIndex - 1)
}
lightbox.dispatchEvent(new Event('tobii-prev'))
}
/**
* Select the next slide
*
*/
const next = function next () {
if (!isOpen()) {
throw new Error('Ups, I\'m closed.')
}
if (groups[activeGroup].currentIndex < groups[activeGroup].elementsLength - 1) {
leave(groups[activeGroup].currentIndex)
load(++groups[activeGroup].currentIndex)
updateLightbox('right')
cleanup(groups[activeGroup].currentIndex - 1)
preload(groups[activeGroup].currentIndex + 1)
}
lightbox.dispatchEvent(new Event('tobii-next'))
}
/**
* Select a group
*
* @param {string} name - Name of the group to select
*/
const selectGroup = function selectGroup (name) {
if (isOpen()) {
throw new Error('Ups, I\'m open.')
<<<<<<<
select: select,
=======
count: count,
>>>>>>>
select: select,
count: count, |
<<<<<<<
=======
"firebug/chrome/activablePanel",
"firebug/js/breakpoint",
>>>>>>>
"firebug/chrome/activablePanel",
<<<<<<<
Arr, System, Menu, NetUtils, NetProgress, CSSInfoTip, ConditionEditor, TimeInfoTip,
PanelNotification) {
=======
Arr, System, Menu, NetUtils, NetProgress, CSSInfoTip, TimeInfoTip,
PanelNotification, ActivablePanel) {
>>>>>>>
Arr, System, Menu, NetUtils, NetProgress, CSSInfoTip, ConditionEditor, TimeInfoTip,
PanelNotification, ActivablePanel) { |
<<<<<<<
"firebug/debugger/breakpoints/breakpointGroup",
"firebug/html/htmlEditor",
=======
"firebug/editor/baseEditor",
>>>>>>>
"firebug/editor/baseEditor",
<<<<<<<
CSSSelectorEditor, CSSInfoTip, Module, BreakpointGroup, HTMLEditor) {
=======
CSSSelectorEditor, CSSInfoTip, Module, BaseEditor, Editor, InlineEditor) {
>>>>>>>
CSSSelectorEditor, CSSInfoTip, Module, BaseEditor, Editor, InlineEditor, BreakpointGroup,
HTMLEditor) {
<<<<<<<
=======
// HTMLEditor
function HTMLEditor(doc)
{
this.box = this.tag.replace({}, doc, this);
this.input = this.box.firstChild;
this.multiLine = true;
this.tabNavigation = false;
this.arrowCompletion = false;
}
HTMLEditor.prototype = domplate(BaseEditor,
{
tag:
DIV(
TEXTAREA({"class": "htmlEditor fullPanelEditor", oninput: "$onInput"})
),
getValue: function()
{
return this.input.value;
},
setValue: function(value)
{
return this.input.value = value;
},
show: function(target, panel, value, textSize)
{
this.target = target;
this.panel = panel;
var el = target.repObject;
if (this.innerEditMode)
{
this.editingParent = el;
}
else
{
this.editingRange = el.ownerDocument.createRange();
this.editingRange.selectNode(el);
this.originalLocalName = el.localName;
}
this.panel.panelNode.appendChild(this.box);
this.input.value = value;
this.input.focus();
var command = Firebug.chrome.$("cmd_firebug_toggleHTMLEditing");
command.setAttribute("checked", true);
},
hide: function()
{
var command = Firebug.chrome.$("cmd_firebug_toggleHTMLEditing");
command.setAttribute("checked", false);
this.panel.panelNode.removeChild(this.box);
delete this.editingParent;
delete this.editingRange;
delete this.originalLocalName;
delete this.target;
delete this.panel;
},
getNewSelection: function(fragment)
{
// Get a new element to select in the HTML panel. An element with the
// same localName is preferred, or just any element. If there is none,
// we choose the parent instead.
var found = null;
var nodes = fragment.childNodes;
for (var i = 0; i < nodes.length; ++i)
{
var n = nodes[i];
if (n.nodeType === Node.ELEMENT_NODE)
{
if (n.localName === this.originalLocalName)
return n;
if (!found)
found = n;
}
}
if (found)
return found;
return this.editingRange.startContainer;
},
saveEdit: function(target, value, previousValue)
{
if (this.innerEditMode)
{
try
{
// xxxHonza: Catch "can't access dead object" exception.
this.editingParent.innerHTML = value;
}
catch (e)
{
FBTrace.sysout("htmlPanel.saveEdit; EXCEPTION " + e, e);
}
}
else
{
try
{
var range = this.editingRange;
var fragment = range.createContextualFragment(value);
var sel = this.getNewSelection(fragment);
var cnl = fragment.childNodes.length;
range.deleteContents();
range.insertNode(fragment);
var sc = range.startContainer, so = range.startOffset;
range.setEnd(sc, so + cnl);
this.panel.select(sel, false, true);
// Clear and update the status path, to make sure it doesn't
// show elements no longer in the DOM.
Firebug.chrome.clearStatusPath();
Firebug.chrome.syncStatusPath();
}
catch (e)
{
if (FBTrace.DBG_ERRORS)
FBTrace.sysout("HTMLEditor.saveEdit; EXCEPTION " + e, e);
}
}
},
endEditing: function()
{
//this.panel.markChange();
this.panel.setEditEnableState(true);
return true;
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
onInput: function()
{
Editor.update();
}
});
// ********************************************************************************************* //
>>>>>>> |
<<<<<<<
pref("extensions.firebug.DBG_CONNECTION", false); // Connection to the remote browser (for remote debugging)
pref("extensions.firebug.DBG_MENU", false); // Menus and context menus in Firebug
pref("extensions.firebug.DBG_BTI", false); // Browser Tools Interface
pref("extensions.firebug.DBG_DOMTREE", false); // DomTree Widget
pref("extensions.firebug.DBG_GRIPCACHE", false); // Cache for remote objects - grips (comes over RDP)
=======
pref("extensions.firebug.DBG_MENU", false); // Menus and context menus in Firebug
pref("extensions.firebug.DBG_SELECTOR", false); // Selector side panel (in the CSS panel)
>>>>>>>
pref("extensions.firebug.DBG_CONNECTION", false); // Connection to the remote browser (for remote debugging)
pref("extensions.firebug.DBG_MENU", false); // Menus and context menus in Firebug
pref("extensions.firebug.DBG_BTI", false); // Browser Tools Interface
pref("extensions.firebug.DBG_DOMTREE", false); // DomTree Widget
pref("extensions.firebug.DBG_GRIPCACHE", false); // Cache for remote objects - grips (comes over RDP)
pref("extensions.firebug.DBG_SELECTOR", false); // Selector side panel (in the CSS panel) |
<<<<<<<
"firebug/debugger/debuggerLib",
"firebug/debugger/breakpoints/breakpointStore",
=======
"firebug/chrome/activablePanel",
>>>>>>>
"firebug/chrome/activablePanel",
"firebug/debugger/debuggerLib",
"firebug/debugger/breakpoints/breakpointStore",
<<<<<<<
Wrapper, Xpcom, ErrorMessageObj, PanelNotification, DebuggerLib, BreakpointStore) {
=======
PanelNotification, ActivablePanel) {
>>>>>>>
Wrapper, Xpcom, ErrorMessageObj, PanelNotification, ActivablePanel, DebuggerLib,
BreakpointStore) {
<<<<<<<
Firebug.unregisterUIListener(this);
Firebug.ActivablePanel.destroy.apply(this, arguments); // must be called last
=======
ActivablePanel.destroy.apply(this, arguments); // must be called last
>>>>>>>
Firebug.unregisterUIListener(this);
ActivablePanel.destroy.apply(this, arguments); // must be called last |
<<<<<<<
function(Firebug, FBTrace, Obj, Arr, Wrapper, Dom, Locale, ClosureInspector, FirebugReps) {
=======
function(Firebug, Obj, Arr, Wrapper, Dom, FBTrace, Locale, ClosureInspector, PanelActivation,
FirebugReps, DebuggerLib) {
>>>>>>>
function(Firebug, FBTrace, Obj, Arr, Wrapper, Dom, Locale, ClosureInspector, PanelActivation,
FirebugReps, DebuggerLib) {
<<<<<<<
hasChildren: function(value)
=======
shouldShowClosures: function()
{
if (!Firebug.showClosures)
return false;
var requireScriptPanel = DebuggerLib._closureInspectionRequiresDebugger();
if (requireScriptPanel && !PanelActivation.isPanelEnabled(Firebug.getPanelType("script")))
return false;
return true;
},
addMemberInternal: function(object, type, props, name, value, level, parentIsScope)
>>>>>>>
shouldShowClosures: function()
{
if (!Firebug.showClosures)
return false;
var requireScriptPanel = DebuggerLib._closureInspectionRequiresDebugger();
if (requireScriptPanel && !PanelActivation.isPanelEnabled(Firebug.getPanelType("script")))
return false;
return true;
},
hasChildren: function(value)
<<<<<<<
if (typeof value === "function" && Firebug.showClosures && this.context)
=======
if (!hasChildren && valueType === "function" && this.shouldShowClosures() && this.context)
>>>>>>>
if (typeof value === "function" && this.shouldShowClosures() && this.context) |
<<<<<<<
Firebug.DOMBasePanel.prototype = Obj.extend(Firebug.Panel,
/** @lends Firebug.DOMBasePanel */
=======
Firebug.DOMBasePanel.prototype = Obj.extend(Panel,
/** lends Firebug.DOMBasePanel */
>>>>>>>
Firebug.DOMBasePanel.prototype = Obj.extend(Panel,
/** @lends Firebug.DOMBasePanel */ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.