conflict_resolution
stringlengths
27
16k
<<<<<<< // axis is an optional parameter. Can be set to 'x' or 'y'. Dygraph.prototype.isZoomed = function(axis) { if (axis == null) return this.zoomed_x_ || this.zoomed_y_; if (axis == 'x') return this.zoomed_x_; if (axis == 'y') return this.zoomed_y_; throw "axis parameter to Dygraph.isZoomed must be missing, 'x' or 'y'."; }; ======= Dygraph.prototype.toString = function() { var maindiv = this.maindiv_; var id = (maindiv && maindiv.id) ? maindiv.id : maindiv return "[Dygraph " + id + "]"; } >>>>>>> // Axis is an optional parameter. Can be set to 'x' or 'y'. Dygraph.prototype.isZoomed = function(axis) { if (axis == null) return this.zoomed_x_ || this.zoomed_y_; if (axis == 'x') return this.zoomed_x_; if (axis == 'y') return this.zoomed_y_; throw "axis parameter to Dygraph.isZoomed must be missing, 'x' or 'y'."; }; Dygraph.prototype.toString = function() { var maindiv = this.maindiv_; var id = (maindiv && maindiv.id) ? maindiv.id : maindiv return "[Dygraph " + id + "]"; } <<<<<<< var valueWindows; if (this.axes_ != undefined) { // Preserve valueWindow settings. valueWindows = []; for (var index = 0; index < this.axes_.length; index++) { valueWindows.push(this.axes_[index].valueWindow); } } this.axes_ = [{ yAxisId: 0 }]; // always have at least one y-axis. ======= this.axes_ = [{ yAxisId : 0, g : this }]; // always have at least one y-axis. >>>>>>> var valueWindows; if (this.axes_ != undefined) { // Preserve valueWindow settings. valueWindows = []; for (var index = 0; index < this.axes_.length; index++) { valueWindows.push(this.axes_[index].valueWindow); } } this.axes_ = [{ yAxisId : 0, g : this }]; // always have at least one y-axis.
<<<<<<< // Zoomed indicators - These indicate when the graph has been zoomed and on what axis. this.zoomed_x_ = false; this.zoomed_y_ = false; ======= // Number of digits to use when labeling the x (if numeric) and y axis // ticks. this.numXDigits_ = 2; this.numYDigits_ = 2; // When labeling x (if numeric) or y values in the legend, there are // numDigits + numExtraDigits of precision used. For axes labels with N // digits of precision, the data should be displayed with at least N+1 digits // of precision. The reason for this is to divide each interval between // successive ticks into tenths (for 1) or hundredths (for 2), etc. For // example, if the labels are [0, 1, 2], we want data to be displayed as // 0.1, 1.3, etc. this.numExtraDigits_ = 1; >>>>>>> // Zoomed indicators - These indicate when the graph has been zoomed and on what axis. this.zoomed_x_ = false; this.zoomed_y_ = false; // Number of digits to use when labeling the x (if numeric) and y axis // ticks. this.numXDigits_ = 2; this.numYDigits_ = 2; // When labeling x (if numeric) or y values in the legend, there are // numDigits + numExtraDigits of precision used. For axes labels with N // digits of precision, the data should be displayed with at least N+1 digits // of precision. The reason for this is to divide each interval between // successive ticks into tenths (for 1) or hundredths (for 2), etc. For // example, if the labels are [0, 1, 2], we want data to be displayed as // 0.1, 1.3, etc. this.numExtraDigits_ = 1; <<<<<<< if (datasets.length > 0) { // TODO(danvk): this method doesn't need to return anything. var out = this.computeYAxisRanges_(extremes); var axes = out[0]; var seriesToAxisMap = out[1]; this.layout_.updateOptions( { yAxes: axes, seriesToAxisMap: seriesToAxisMap } ); } ======= this.computeYAxisRanges_(extremes); this.layout_.updateOptions( { yAxes: this.axes_, seriesToAxisMap: this.seriesToAxisMap_ } ); >>>>>>> if (datasets.length > 0) { // TODO(danvk): this method doesn't need to return anything. this.computeYAxisRanges_(extremes); this.layout_.updateOptions( { yAxes: this.axes_, seriesToAxisMap: this.seriesToAxisMap_ } ); }
<<<<<<< * global_ - global attributes (common among all graphs, AIUI) * user_ - attributes set by the user * axes_ - array of axis index to { series : [ series names ] , options : { axis-specific options. } * series_ - { seriesName -> { idx, yAxis, options } * labels_ - used as mapping from index to series name. ======= * global - global attributes (common among all graphs, AIUI) * user - attributes set by the user * axes - map of options specific to the axis. * series - { seriesName -> { idx, yAxis, options } * labels - used as mapping from index to series name. >>>>>>> * global_ - global attributes (common among all graphs, AIUI) * user - attributes set by the user * axes_ - array of axis index to { series : [ series names ] , options : { axis-specific options. } * series_ - { seriesName -> { idx, yAxis, options }} * labels_ - used as mapping from index to series name. <<<<<<< return this.findForAxis(name, seriesObj["yAxis"]); } /** * Returns the number of y-axes on the chart. * @return {Number} the number of axes. */ DygraphOptions.prototype.numAxes = function() { return this.axes_.length; } /** * Return the y-axis for a given series, specified by name. */ DygraphOptions.prototype.axisForSeries = function(seriesName) { return this.series_[seriesName].yAxis; } /** * Returns the options for the specified axis. */ DygraphOptions.prototype.axisOptions = function(yAxis) { return this.axes_[yAxis].options; } /** * Return the series associated with an axis. */ DygraphOptions.prototype.seriesForAxis = function(yAxis) { return this.axes_[yAxis].series; } ======= return this.getForAxis(name, seriesObj["yAxis"]); }; >>>>>>> return this.getForAxis(name, seriesObj["yAxis"]); }; /** * Returns the number of y-axes on the chart. * @return {Number} the number of axes. */ DygraphOptions.prototype.numAxes = function() { return this.axes_.length; } /** * Return the y-axis for a given series, specified by name. */ DygraphOptions.prototype.axisForSeries = function(seriesName) { return this.series_[seriesName].yAxis; } /** * Returns the options for the specified axis. */ DygraphOptions.prototype.axisOptions = function(yAxis) { return this.axes_[yAxis].options; } /** * Return the series associated with an axis. */ DygraphOptions.prototype.seriesForAxis = function(yAxis) { return this.axes_[yAxis].series; }
<<<<<<< yValueFormatter: function(x, opt_numDigits) { return x.toPrecision(Math.min(21, Math.max(1, opt_numDigits || 2))); }, ======= yValueFormatter: function(x) { return Dygraph.round_(x, 2); }, >>>>>>> yValueFormatter: Dygraph.defaultFormat, <<<<<<< // Number of digits to use when labeling the x (if numeric) and y axis // ticks. this.numXDigits_ = 2; this.numYDigits_ = 2; // When labeling x (if numeric) or y values in the legend, there are // numDigits + numExtraDigits of precision used. For axes labels with N // digits of precision, the data should be displayed with at least N+1 digits // of precision. The reason for this is to divide each interval between // successive ticks into tenths (for 1) or hundredths (for 2), etc. For // example, if the labels are [0, 1, 2], we want data to be displayed as // 0.1, 1.3, etc. this.numExtraDigits_ = 1; ======= >>>>>>> // Number of digits to use when labeling the x (if numeric) and y axis // ticks. this.numXDigits_ = 2; this.numYDigits_ = 2; // When labeling x (if numeric) or y values in the legend, there are // numDigits + numExtraDigits of precision used. For axes labels with N // digits of precision, the data should be displayed with at least N+1 digits // of precision. The reason for this is to divide each interval between // successive ticks into tenths (for 1) or hundredths (for 2), etc. For // example, if the labels are [0, 1, 2], we want data to be displayed as // 0.1, 1.3, etc. this.numExtraDigits_ = 1; <<<<<<< var yval = fmtFunc(point.yval, this.numYDigits_ + this.numExtraDigits_); ======= var yval = fmtFunc(point.yval); >>>>>>> var yval = fmtFunc(point.yval, this.numYDigits_ + this.numExtraDigits_); <<<<<<< // numericTicks() returns multiple values. var ret = formatter(this.rawData_[0][0], this.rawData_[this.rawData_.length - 1][0], this); opts.xTicks = ret.ticks; this.numXDigits_ = ret.numDigits; } this.layout_.updateOptions(opts); ======= startDate = this.rawData_[0][0]; endDate = this.rawData_[this.rawData_.length - 1][0]; } var xTicks = this.attr_('xTicker')(startDate, endDate, this); this.layout_.updateOptions({xTicks: xTicks}); >>>>>>> // numericTicks() returns multiple values. var ret = formatter(this.rawData_[0][0], this.rawData_[this.rawData_.length - 1][0], this); opts.xTicks = ret.ticks; this.numXDigits_ = ret.numDigits; } this.layout_.updateOptions(opts); <<<<<<< * Determine the number of significant figures in a Number up to the specified * precision. Note that there is no way to determine if a trailing '0' is * significant or not, so by convention we return 1 for all of the following * inputs: 1, 1.0, 1.00, 1.000 etc. * @param {Number} x The input value. * @param {Number} opt_maxPrecision Optional maximum precision to consider. * Default and maximum allowed value is 13. * @return {Number} The number of significant figures which is >= 1. */ Dygraph.significantFigures = function(x, opt_maxPrecision) { var precision = Math.max(opt_maxPrecision || 13, 13); // Convert the number to its exponential notation form and work backwards, // ignoring the 'e+xx' bit. This may seem like a hack, but doing a loop and // dividing by 10 leads to roundoff errors. By using toExponential(), we let // the JavaScript interpreter handle the low level bits of the Number for us. var s = x.toExponential(precision); var ePos = s.lastIndexOf('e'); // -1 case handled by return below. for (var i = ePos - 1; i >= 0; i--) { if (s[i] == '.') { // Got to the decimal place. We'll call this 1 digit of precision because // we can't know for sure how many trailing 0s are significant. return 1; } else if (s[i] != '0') { // Found the first non-zero digit. Return the number of characters // except for the '.'. return i; // This is i - 1 + 1 (-1 is for '.', +1 is for 0 based index). } } // Occurs if toExponential() doesn't return a string containing 'e', which // should never happen. return 1; }; /** ======= >>>>>>> * Determine the number of significant figures in a Number up to the specified * precision. Note that there is no way to determine if a trailing '0' is * significant or not, so by convention we return 1 for all of the following * inputs: 1, 1.0, 1.00, 1.000 etc. * @param {Number} x The input value. * @param {Number} opt_maxPrecision Optional maximum precision to consider. * Default and maximum allowed value is 13. * @return {Number} The number of significant figures which is >= 1. */ Dygraph.significantFigures = function(x, opt_maxPrecision) { var precision = Math.max(opt_maxPrecision || 13, 13); // Convert the number to its exponential notation form and work backwards, // ignoring the 'e+xx' bit. This may seem like a hack, but doing a loop and // dividing by 10 leads to roundoff errors. By using toExponential(), we let // the JavaScript interpreter handle the low level bits of the Number for us. var s = x.toExponential(precision); var ePos = s.lastIndexOf('e'); // -1 case handled by return below. for (var i = ePos - 1; i >= 0; i--) { if (s[i] == '.') { // Got to the decimal place. We'll call this 1 digit of precision because // we can't know for sure how many trailing 0s are significant. return 1; } else if (s[i] != '0') { // Found the first non-zero digit. Return the number of characters // except for the '.'. return i; // This is i - 1 + 1 (-1 is for '.', +1 is for 0 based index). } } // Occurs if toExponential() doesn't return a string containing 'e', which // should never happen. return 1; }; /** <<<<<<< ticks[i].push({v: vals[i]}); ======= ticks.push({v: vals[i]}); >>>>>>> ticks[i].push({v: vals[i]}); <<<<<<< var formatter = attr('yAxisLabelFormatter') ? attr('yAxisLabelFormatter') : attr('yValueFormatter'); // Determine the number of decimal places needed for the labels below by // taking the maximum number of significant figures for any label. We must // take the max because we can't tell if trailing 0s are significant. var numDigits = 0; for (var i = 0; i < ticks.length; i++) { numDigits = Math.max(Dygraph.significantFigures(ticks[i].v), numDigits); } ======= var formatter = attr('yAxisLabelFormatter') ? attr('yAxisLabelFormatter') : attr('yValueFormatter'); >>>>>>> var formatter = attr('yAxisLabelFormatter') ? attr('yAxisLabelFormatter') : attr('yValueFormatter'); // Determine the number of decimal places needed for the labels below by // taking the maximum number of significant figures for any label. We must // take the max because we can't tell if trailing 0s are significant. var numDigits = 0; for (var i = 0; i < ticks.length; i++) { numDigits = Math.max(Dygraph.significantFigures(ticks[i].v), numDigits); } <<<<<<< axis.ticks = ret.ticks; this.numYDigits_ = ret.numDigits; ======= >>>>>>> axis.ticks = ret.ticks; this.numYDigits_ = ret.numDigits; <<<<<<< axis.ticks = ret.ticks; this.numYDigits_ = ret.numDigits; ======= >>>>>>> axis.ticks = ret.ticks; this.numYDigits_ = ret.numDigits;
<<<<<<< var valueWindows; if (this.axes_ != undefined) { // Preserve valueWindow settings. valueWindows = []; for (var index = 0; index < this.axes_.length; index++) { valueWindows.push(this.axes_[index].valueWindow); } } this.axes_ = [{}]; // always have at least one y-axis. ======= this.axes_ = [{ yAxisId: 0 }]; // always have at least one y-axis. >>>>>>> var valueWindows; if (this.axes_ != undefined) { // Preserve valueWindow settings. valueWindows = []; for (var index = 0; index < this.axes_.length; index++) { valueWindows.push(this.axes_[index].valueWindow); } } this.axes_ = [{ yAxisId: 0 }]; // always have at least one y-axis.
<<<<<<< else { if ( node.specifiers.length ) { node.specifiers.forEach( specifier => { const localName = specifier.local.name; const exportedName = specifier.exported.name; if ( this.exports[ exportedName ] || this.reexports[ exportedName ] ) { this.error( { code: 'DUPLICATE_EXPORT', message: `A module cannot have multiple exports with the same name ('${exportedName}')` }, specifier.start ); } this.exports[ exportedName ] = { localName }; } ); } else { // TODO is this really necessary? `export {}` is valid JS, and // might be used as a hint that this is indeed a module this.warn( { code: 'EMPTY_EXPORT', message: `Empty export declaration` }, node.start ); } ======= else if ( node.specifiers.length ) { node.specifiers.forEach( specifier => { const localName = specifier.local.name; const exportedName = specifier.exported.name; if ( this.exports[ exportedName ] || this.reexports[ exportedName ] ) { this.error({ code: 'DUPLICATE_EXPORT', message: `A module cannot have multiple exports with the same name ('${exportedName}')` }, specifier.start ); } this.exports[ exportedName ] = { localName }; }); >>>>>>> else { node.specifiers.forEach( specifier => { const localName = specifier.local.name; const exportedName = specifier.exported.name; if ( this.exports[ exportedName ] || this.reexports[ exportedName ] ) { this.error({ code: 'DUPLICATE_EXPORT', message: `A module cannot have multiple exports with the same name ('${exportedName}')` }, specifier.start ); } this.exports[ exportedName ] = { localName }; });
<<<<<<< }, "title": { "labels": ["Chart labels"], "type": "string", "default": "null", "description": "Text to display above the chart. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-title' classes." }, "titleHeight": { "default": "18", "labels": ["Chart labels"], "type": "integer", "description": "Height of the chart title, in pixels. This also controls the default font size of the title. If you style the title on your own, this controls how much space is set aside above the chart for the title's div." }, "xlabel": { "labels": ["Chart labels"], "type": "string", "default": "null", "description": "Text to display below the chart's x-axis. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-xlabel' classes." }, "xLabelHeight": { "labels": ["Chart labels"], "type": "integer", "default": "18", "description": "Height of the x-axis label, in pixels. This also controls the default font size of the x-axis label. If you style the label on your own, this controls how much space is set aside below the chart for the x-axis label's div." }, "ylabel": { "labels": ["Chart labels"], "type": "string", "default": "null", "description": "Text to display to the left of the chart's y-axis. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-ylabel' classes. The text will be rotated 90 degrees by default, so CSS rules may behave in unintuitive ways. No additional space is set aside for a y-axis label. If you need more space, increase the width of the y-axis tick labels using the yAxisLabelWidth option. If you need a wider div for the y-axis label, either style it that way with CSS (but remember that it's rotated, so width is controlled by the 'height' property) or set the yLabelWidth option." }, "yLabelWidth": { "labels": ["Chart labels"], "type": "integer", "default": "18", "description": "Width of the div which contains the y-axis label. Since the y-axis label appears rotated 90 degrees, this actually affects the height of its div." ======= }, "isZoomedIgnoreProgrammaticZoom" : { "default": "false", "labels": ["Zooming"], "type": "boolean", "description" : "When this option is passed to updateOptions() along with either the <code>dateWindow</code> or <code>valueRange</code> options, the zoom flags are not changed to reflect a zoomed state. This is primarily useful for when the display area of a chart is changed programmatically and also where manual zooming is allowed and use is made of the <code>isZoomed</code> method to determine this." >>>>>>> }, "title": { "labels": ["Chart labels"], "type": "string", "default": "null", "description": "Text to display above the chart. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-title' classes." }, "titleHeight": { "default": "18", "labels": ["Chart labels"], "type": "integer", "description": "Height of the chart title, in pixels. This also controls the default font size of the title. If you style the title on your own, this controls how much space is set aside above the chart for the title's div." }, "xlabel": { "labels": ["Chart labels"], "type": "string", "default": "null", "description": "Text to display below the chart's x-axis. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-xlabel' classes." }, "xLabelHeight": { "labels": ["Chart labels"], "type": "integer", "default": "18", "description": "Height of the x-axis label, in pixels. This also controls the default font size of the x-axis label. If you style the label on your own, this controls how much space is set aside below the chart for the x-axis label's div." }, "ylabel": { "labels": ["Chart labels"], "type": "string", "default": "null", "description": "Text to display to the left of the chart's y-axis. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-ylabel' classes. The text will be rotated 90 degrees by default, so CSS rules may behave in unintuitive ways. No additional space is set aside for a y-axis label. If you need more space, increase the width of the y-axis tick labels using the yAxisLabelWidth option. If you need a wider div for the y-axis label, either style it that way with CSS (but remember that it's rotated, so width is controlled by the 'height' property) or set the yLabelWidth option." }, "yLabelWidth": { "labels": ["Chart labels"], "type": "integer", "default": "18", "description": "Width of the div which contains the y-axis label. Since the y-axis label appears rotated 90 degrees, this actually affects the height of its div." }, "isZoomedIgnoreProgrammaticZoom" : { "default": "false", "labels": ["Zooming"], "type": "boolean", "description" : "When this option is passed to updateOptions() along with either the <code>dateWindow</code> or <code>valueRange</code> options, the zoom flags are not changed to reflect a zoomed state. This is primarily useful for when the display area of a chart is changed programmatically and also where manual zooming is allowed and use is made of the <code>isZoomed</code> method to determine this."
<<<<<<< var seriesExtremes = this.extremeValues_(series); extremes[seriesName] = seriesExtremes; var thisMinY = seriesExtremes[0]; var thisMaxY = seriesExtremes[1]; if (minY === null || thisMinY < minY) minY = thisMinY; if (maxY === null || thisMaxY > maxY) maxY = thisMaxY; ======= var extremes = this.extremeValues_(series); var thisMinY = extremes[0]; var thisMaxY = extremes[1]; if (minY === null || (thisMinY != null && thisMinY < minY)) minY = thisMinY; if (maxY === null || (thisMaxY != null && thisMaxY > maxY)) maxY = thisMaxY; >>>>>>> var seriesExtremes = this.extremeValues_(series); extremes[seriesName] = seriesExtremes; var thisMinY = seriesExtremes[0]; var thisMaxY = seriesExtremes[1]; if (minY === null || (thisMinY != null && thisMinY < minY)) minY = thisMinY; if (maxY === null || (thisMaxY != null && thisMaxY > maxY)) maxY = thisMaxY; <<<<<<< var out = this.computeYaxes_(extremes); var axes = out[0]; var seriesToAxisMap = out[1]; this.displayedYRange_ = axes[0].valueRange; this.layout_.updateOptions( { yAxes: axes, seriesToAxisMap: seriesToAxisMap } ); ======= // Use some heuristics to come up with a good maxY value, unless it's been // set explicitly by the user. if (this.valueRange_ != null) { this.addYTicks_(this.valueRange_[0], this.valueRange_[1]); this.displayedYRange_ = this.valueRange_; } else { // This affects the calculation of span, below. if (this.attr_("includeZero") && minY > 0) { minY = 0; } // Add some padding and round up to an integer to be human-friendly. var span = maxY - minY; // special case: if we have no sense of scale, use +/-10% of the sole value. if (span == 0) { span = maxY; } var maxAxisY = maxY + 0.1 * span; var minAxisY = minY - 0.1 * span; // Try to include zero and make it minAxisY (or maxAxisY) if it makes sense. if (!this.attr_("avoidMinZero")) { if (minAxisY < 0 && minY >= 0) minAxisY = 0; if (maxAxisY > 0 && maxY <= 0) maxAxisY = 0; } if (this.attr_("includeZero")) { if (maxY < 0) maxAxisY = 0; if (minY > 0) minAxisY = 0; } this.addYTicks_(minAxisY, maxAxisY); this.displayedYRange_ = [minAxisY, maxAxisY]; } >>>>>>> var out = this.computeYaxes_(extremes); var axes = out[0]; var seriesToAxisMap = out[1]; this.displayedYRange_ = axes[0].valueRange; this.layout_.updateOptions( { yAxes: axes, seriesToAxisMap: seriesToAxisMap } );
<<<<<<< message: 'Unknown option found: abc. Allowed keys: input, legacy, treeshake, acorn, acornInjectPlugins, context, moduleContext, plugins, onwarn, watch, cache, preferConst, experimentalDynamicImport, entry, external, extend, amd, banner, footer, intro, format, outro, sourcemap, sourcemapFile, name, globals, interop, legacy, freeze, indent, strict, noConflict, paths, exports, file, pureExternalModules' ======= message: 'Unknown option found: abc. Allowed keys: input, legacy, treeshake, acorn, context, moduleContext, plugins, onwarn, watch, cache, preferConst, experimentalDynamicImport, experimentalCodeSplitting, entry, external, extend, amd, banner, footer, intro, format, outro, sourcemap, sourcemapFile, name, globals, interop, legacy, freeze, indent, strict, noConflict, paths, exports, file, dir, pureExternalModules' >>>>>>> message: 'Unknown option found: abc. Allowed keys: input, legacy, treeshake, acorn, acornInjectPlugins, context, moduleContext, plugins, onwarn, watch, cache, preferConst, experimentalDynamicImport, experimentalCodeSplitting, entry, external, extend, amd, banner, footer, intro, format, outro, sourcemap, sourcemapFile, name, globals, interop, legacy, freeze, indent, strict, noConflict, paths, exports, file, dir, pureExternalModules'
<<<<<<< import { lstatSync, readFileSync, realpathSync } from './fs.js'; import { dirname, isAbsolute, resolve } from './path.js'; ======= import { isFile, readdirSync, readFileSync } from './fs.js'; import { basename, dirname, isAbsolute, resolve } from './path.js'; >>>>>>> import { lstatSync, readdirSync, readFileSync, realpathSync } from './fs.js'; import { basename, dirname, isAbsolute, resolve } from './path.js';
<<<<<<< describe('constructor', function() { it('throws error if stages is not a function', function() { assert.throws(function() { p = new Prompt({ stages: 'nope' }); ======= describe('constructor', function () { it('throws error if stages is not a function', function () { assert.throws(function () { p = new Prompt('nope'); >>>>>>> describe('constructor', function () { it('throws error if stages is not a function', function () { assert.throws(function () { p = new Prompt('nope'); <<<<<<< it('throws error if stages does not return array', function() { assert.throws(function() { p = new Prompt({ stages: function() { return null; } }); ======= it('throws error if stages does not return array', function () { assert.throws(function () { p = new Prompt(function () { return null; }); >>>>>>> it('throws error if stages does not return array', function () { assert.throws(function () { p = new Prompt({ stages: function () { return null; } }); <<<<<<< it('sets default opts', function() { p = new Prompt({ stages: function() { return []; } }); ======= it('sets default opts', function () { p = new Prompt(function () { return []; }); >>>>>>> it('sets default opts', function () { p = new Prompt({ stages: function () { return []; } }); <<<<<<< describe('prompt', function() { beforeEach(function() { p = new Prompt({ stages: MOCK_STAGES }); ======= describe('prompt', function () { beforeEach(function () { p = new Prompt(MOCK_STAGES); >>>>>>> describe('prompt', function () { beforeEach(function () { p = new Prompt({ stages: MOCK_STAGES });
<<<<<<< recentCommentsCount={2} maxLinesPerComment={1} ======= onLikes={this.onLikes(item.photo)} >>>>>>> onLikes={this.onLikes(item.photo)} recentCommentsCount={2} maxLinesPerComment={1}
<<<<<<< label = item.error.message } else if (item.state === 'processing'){ label = item.progress ======= label = item.error localStatus = styles.statusPink remoteStatus = styles.statusRed >>>>>>> label = item.error.message localStatus = styles.statusPink remoteStatus = styles.statusRed } else if (item.state === 'processing'){ label = item.progress
<<<<<<< viewWalletPhoto: (photoId) => { dispatch(PhotoViewingActions.viewWalletPhoto(photoId)) }, refresh: (threadId: string) => { dispatch(PhotoViewingActions.refreshThreadRequest(threadId)) }, toggleVerboseUi: () => { dispatch(PreferencesActions.toggleVerboseUi()) }, ======= dismissPhoto: () => { dispatch(UIActions.dismissViewedPhoto()) }, viewPhoto: (photoId, threadId) => { dispatch(UIActions.viewPhotoRequest(photoId, threadId)) }, refresh: (threadId: string) => { dispatch(TextileNodeActions.getPhotoHashesRequest(threadId)) }, >>>>>>> viewWalletPhoto: (photoId) => { dispatch(PhotoViewingActions.viewWalletPhoto(photoId)) }, refresh: (threadId: string) => { dispatch(PhotoViewingActions.refreshThreadRequest(threadId)) },
<<<<<<< import { CellType } from 'vtk.js/Sources/Common/DataModel/CellTypes/Constants'; const POLYDATA_FIELDS = ['verts', 'lines', 'polys', 'strips']; ======= import { POLYDATA_FIELDS } from 'vtk.js/Sources/Common/DataModel/PolyData/Constants'; >>>>>>> import { CellType } from 'vtk.js/Sources/Common/DataModel/CellTypes/Constants'; import { POLYDATA_FIELDS } from 'vtk.js/Sources/Common/DataModel/PolyData/Constants';
<<<<<<< <StatusBar barStyle='light-content' /> <ReduxNavigation /> ======= <StatusBar barStyle='dark-content' /> <AppNavigation /> >>>>>>> <StatusBar barStyle='light-content' /> <AppNavigation />
<<<<<<< function toMercator(geojson, options) { return convert(geojson, 'mercator', options); ======= export function toMercator(geojson, mutate) { return convert(geojson, mutate, 'mercator'); >>>>>>> export function toMercator(geojson, options) { return convert(geojson, 'mercator', options); <<<<<<< function toWgs84(geojson, options) { return convert(geojson, 'wgs84', options); ======= export function toWgs84(geojson, mutate) { return convert(geojson, mutate, 'wgs84'); >>>>>>> export function toWgs84(geojson, options) { return convert(geojson, 'wgs84', options);
<<<<<<< t.distance(lowLeft, lowRight, 'miles', function(err, horizontalDistance){ t.distance(lowLeft, topLeft, 'miles', function(err, verticalDistance){ if(horizontalDistance >= verticalDistance){ squareBbox[0] = bbox[0] squareBbox[2] = bbox[2] t.midpoint(lowLeft, topLeft, function(err, verticalMidpoint){ squareBbox[1] = verticalMidpoint.geometry.coordinates[1] - ((bbox[2] - bbox[0]) / 2) squareBbox[3] = verticalMidpoint.geometry.coordinates[1] + ((bbox[2] - bbox[0]) / 2) done(err, squareBbox) }) } else { squareBbox[1] = bbox[1] squareBbox[3] = bbox[3] t.midpoint(lowLeft, lowRight, function(err, horzontalMidpoint){ squareBbox[0] = horzontalMidpoint.geometry.coordinates[0] - ((bbox[3] - bbox[1]) / 2) squareBbox[2] = horzontalMidpoint.geometry.coordinates[0] + ((bbox[3] - bbox[1]) / 2) done(err, squareBbox) }) } }) }) ======= done = done || function () {}; if(horizontalDistance >= verticalDistance){ squareBbox[0] = bbox[0] squareBbox[2] = bbox[2] verticalMidpoint = t.midpoint(lowLeft, topLeft); squareBbox[1] = verticalMidpoint.geometry.coordinates[1] - ((bbox[2] - bbox[0]) / 2) squareBbox[3] = verticalMidpoint.geometry.coordinates[1] + ((bbox[2] - bbox[0]) / 2) } else { squareBbox[1] = bbox[1] squareBbox[3] = bbox[3] horizontalMidpoint = t.midpoint(lowLeft, lowRight); squareBbox[0] = horizontalMidpoint.geometry.coordinates[0] - ((bbox[3] - bbox[1]) / 2) squareBbox[2] = horizontalMidpoint.geometry.coordinates[0] + ((bbox[3] - bbox[1]) / 2) } done(null, squareBbox) return squareBbox; //t.midpoint(t.point(bbox[0,]), bbox) //squareBbox[0] = >>>>>>> done = done || function () {}; if(horizontalDistance >= verticalDistance){ squareBbox[0] = bbox[0] squareBbox[2] = bbox[2] verticalMidpoint = t.midpoint(lowLeft, topLeft); squareBbox[1] = verticalMidpoint.geometry.coordinates[1] - ((bbox[2] - bbox[0]) / 2) squareBbox[3] = verticalMidpoint.geometry.coordinates[1] + ((bbox[2] - bbox[0]) / 2) } else { squareBbox[1] = bbox[1] squareBbox[3] = bbox[3] horizontalMidpoint = t.midpoint(lowLeft, lowRight); squareBbox[0] = horizontalMidpoint.geometry.coordinates[0] - ((bbox[3] - bbox[1]) / 2) squareBbox[2] = horizontalMidpoint.geometry.coordinates[0] + ((bbox[3] - bbox[1]) / 2) } done(null, squareBbox) return squareBbox;
<<<<<<< module("Raven.parseDSN"); test("should parse dsn into an object", function() { var dsn = "http://public:[email protected]:80/project-id"; var config = Raven.parseDSN(dsn); equal(config['publicKey'], 'public'); equal(config['secretKey'], 'secret'); equal(config['servers'][0], 'http://example.com:80/api/store/'); equal(config['projectId'], 'project-id'); }); test("should parse dsn with a path", function() { var dsn = "http://public:[email protected]:80/path/project-id"; var config = Raven.parseDSN(dsn); equal(config['publicKey'], 'public'); equal(config['secretKey'], 'secret'); equal(config['servers'][0], 'http://example.com:80/path/api/store/'); equal(config['projectId'], 'project-id'); }); test("should parse dsn without a secret key", function() { var dsn = "http://[email protected]:80/path/project-id"; var config = Raven.parseDSN(dsn); equal(config['publicKey'], 'public'); equal(config['secretKey'], ''); equal(config['servers'][0], 'http://example.com:80/path/api/store/'); equal(config['projectId'], 'project-id'); }); ======= module("Raven.trimString"); test("should trim leading space", function() { var result = Raven.trimString(' foo'); equal(result, 'foo'); }); test("should trim trailing space", function() { var result = Raven.trimString('foo '); equal(result, 'foo'); }); >>>>>>> module("Raven.trimString"); test("should trim leading space", function() { var result = Raven.trimString(' foo'); equal(result, 'foo'); }); test("should trim trailing space", function() { var result = Raven.trimString('foo '); equal(result, 'foo'); }); module("Raven.parseDSN"); test("should parse dsn into an object", function() { var dsn = "http://public:[email protected]:80/project-id"; var config = Raven.parseDSN(dsn); equal(config['publicKey'], 'public'); equal(config['secretKey'], 'secret'); equal(config['servers'][0], 'http://example.com:80/api/store/'); equal(config['projectId'], 'project-id'); }); test("should parse dsn with a path", function() { var dsn = "http://public:[email protected]:80/path/project-id"; var config = Raven.parseDSN(dsn); equal(config['publicKey'], 'public'); equal(config['secretKey'], 'secret'); equal(config['servers'][0], 'http://example.com:80/path/api/store/'); equal(config['projectId'], 'project-id'); }); test("should parse dsn without a secret key", function() { var dsn = "http://[email protected]:80/path/project-id"; var config = Raven.parseDSN(dsn); equal(config['publicKey'], 'public'); equal(config['secretKey'], ''); equal(config['servers'][0], 'http://example.com:80/path/api/store/'); equal(config['projectId'], 'project-id'); });
<<<<<<< var server = app.listen(8080, 'localhost', function () { ======= app.get('/feed.xml', function(req, res) { const data = readData(); const feed = createFeed(data); res.set('Content-Type', 'application/rss+xml'); res.send(feed.xml()); }); // rss rendering function createFeed(data) { var feed = new RSS({ title: 'rejected.us', description: 'They Rejected Us. Everyone’s been rejected - these are our stories', feed_url: 'http://rejected.us/feed.xml', site_url: 'http://rejected.us', language: 'en', pubDate: Date.now(), ttl: '60' }); data.stories.forEach(function(story){ feed.item({ title: story.fullName + " - " + story.bio, description: story.story, url: 'http://rejected.us', author: story.fullName, date: Date.now() }); }); return feed; } function readData() { return JSON.parse(fs.readFileSync('data/data.json', 'utf8')); } var server = app.listen(8080, function () { >>>>>>> app.get('/feed.xml', function(req, res) { const data = readData(); const feed = createFeed(data); res.set('Content-Type', 'application/rss+xml'); res.send(feed.xml()); }); // rss rendering function createFeed(data) { var feed = new RSS({ title: 'rejected.us', description: 'They Rejected Us. Everyone’s been rejected - these are our stories', feed_url: 'http://rejected.us/feed.xml', site_url: 'http://rejected.us', language: 'en', pubDate: Date.now(), ttl: '60' }); data.stories.forEach(function(story){ feed.item({ title: story.fullName + " - " + story.bio, description: story.story, url: 'http://rejected.us', author: story.fullName, date: Date.now() }); }); return feed; } function readData() { return JSON.parse(fs.readFileSync('data/data.json', 'utf8')); } var server = app.listen(8080, 'localhost', function () {
<<<<<<< ======= // Ideally we would use AuthService instead of SessionService dep here to retrieve email and token, but it causes a circular dependency issue. So we go right to the source - SessionService rcMod. factory('authHttpResponseInterceptor',['$q','$location','SessionService',function($q,$location,SessionService){ return { request: function(config) { var rvd_prefix = "/restcomm-rvd/"; if ( config.url.substring(0, rvd_prefix.length) === rvd_prefix ) { //console.log("Adding auth headers to RVD request - " + config.url); var auth_header = SessionService.get("email_address") + ":" + SessionService.get("auth_token"); auth_header = "Basic " + btoa(auth_header); config.headers.authorization = auth_header; } return config; }, response: function(response){ if (response.status === 401) { $location.path('/login').search('returnTo', $location.path()); } return response || $q.when(response); }, responseError: function(rejection) { if (rejection.status === 401) { $location.path('/login').search('returnTo', $location.path()); } return $q.reject(rejection); } } }]) .config(['$httpProvider',function($httpProvider) { // http Intercpetor to check auth failures for xhr requests $httpProvider.interceptors.push('authHttpResponseInterceptor'); }]); >>>>>>>
<<<<<<< $http({method:'GET', url:'api/projects/'+name+'/settings'}) .success(function (data,status) {deferred.resolve(data)}) ======= $http({method:'GET', url:'services/projects/'+name+'/settings'}) .success(function (data,status) { cachedProjectSettings = data; deferred.resolve(cachedProjectSettings); }) >>>>>>> $http({method:'GET', url:'api/projects/'+name+'/settings'}) .success(function (data,status) { cachedProjectSettings = data; deferred.resolve(cachedProjectSettings); })
<<<<<<< projectSettings: function (projectSettingsService, $route) {return projectSettingsService.retrieve($route.current.params.projectName);}, ======= authInfo: function (authentication) {return authentication.authResolver();}, //projectSettings: function (projectSettingsService, $route) {return projectSettingsService.retrieve($route.current.params.projectName);}, >>>>>>> //projectSettings: function (projectSettingsService, $route) {return projectSettingsService.retrieve($route.current.params.projectName);},
<<<<<<< gather: {kind:'gather', label:'gather', title:'collect', action:undefined, method:'GET', timeout:undefined, finishOnKey:undefined, numDigits:undefined, steps:[], gatherType:"menu", menu:{mappings:[] /*{digits:1, next:"welcome.step1"}*/,}, collectdigits:{collectVariable:'',next:''}, iface:{}}, ======= gather: {kind:'gather', label:'gather', title:'collect', action:undefined, method:'GET', timeout:undefined, finishOnKey:undefined, numDigits:undefined, steps:{}, stepnames:[], gatherType:"menu", menu:{mappings:[] /*{digits:1, next:"welcome.step1"}*/,}, collectdigits:{collectVariable:'',next:'', scope:"module"}, iface:{}}, >>>>>>> gather: {kind:'gather', label:'gather', title:'collect', action:undefined, method:'GET', timeout:undefined, finishOnKey:undefined, numDigits:undefined, steps:[], gatherType:"menu", menu:{mappings:[] /*{digits:1, next:"welcome.step1"}*/,}, collectdigits:{collectVariable:'',next:'', scope:"module"}, iface:{}},
<<<<<<< $scope.nodes = packedState.nodes; /* * for ( var i=0; i < $scope.nodes.length; i++) { var packedNode = * $scope.nodes[i]; for (var j=0; j<packedNode.steps.length; j++) { var * step; step = stepPacker.unpack(packedNode.steps[j]); $scope.nodes[i] */ // if (node.steps[j].kind == 'gather') { // } elsen // step = node.steps[j]; /* * if (step.kind == "gather") { if (step.gatherType == "menu") * step.collectdigits = * angular.copy(protos.stepProto.gather.collectdigits); else if * (step.gatherType == "collectdigits") step.menu = * angular.copy(protos.stepProto.gather.menu); } else */ /* * if (step.kind == "play") { if (step.playType == "local") * step.remote = angular.copy(protos.stepProto.play.remote); * else if (step.playType == "remote") step.local = * angular.copy(protos.stepProto.play.local); } else if * (step.kind == "ussdCollect") { if (step.gatherType == "menu") * step.collectdigits = * angular.copy(protos.stepProto.ussdCollect.collectdigits); * else if (step.gatherType == "collectdigits") step.menu = * angular.copy(protos.stepProto.ussdCollect.menu); } */ // } // } $scope.activeNode = packedState.iface.activeNode; ======= //$scope.activeNode = packedState.iface.activeNode; >>>>>>> $scope.nodes = packedState.nodes; //$scope.activeNode = packedState.iface.activeNode;
<<<<<<< define('bforms-toolbar-order', [ 'jquery', 'bforms-toolbar', 'bforms-form', 'bforms-sortable' ], function () { var Order = function ($toolbar, opts) { this.options = $.extend(true, {}, this._defaultOptions, opts); this.name = 'order'; this.type = 'tab'; this.$toolbar = $toolbar; this.widget = $toolbar.data('bformsBsToolbar'); this._controls = {}; this.updated = false; this.currentConnection = {}; this._addDefaultControls(); }; Order.prototype.init = function () { var $elem = this.$container.find(this.options.selector); var controls = []; for (var k in this._controls) { if (this._controls.hasOwnProperty(k)) { controls.push(this._controls[k]); } } this.$orderForm = this.$container.bsForm({ container: $elem.attr('id'), actions: controls }); this.$sortable = $(this.options.sortableContainerSelector); this.bsSortableOptions = { serialize: 'array' }; this.$sortable.bsSortable(this.bsSortableOptions); this.previousConfigurationHtml = this.$sortable.html(); this._addDelegates(); }; Order.prototype._defaultOptions = { selector: '.bs-show_order', itemsSelector: '.sortable_list_item', sortableElementSelector: '.bs-sortable', axis: 'y', disableSelection: true, sortableContainerSelector: '.sortable-container', minimumItemHeight: 15 }; Order.prototype._addDefaultControls = function () { this._controls.reset = { name: 'reset', selector: '.js-btn-reset', validate: false, parse: false, handler: $.proxy(this._evOnReset, this) }; this._controls.save = { name: 'save', selector: '.js-btn-save_order', validate: false, parse: false, handler: $.proxy(this._evOnSave, this) }; }; Order.prototype.setControl = function (controlName, options) { var control = this._controls[controlName]; if (control) { control = $.extend(true, {}, control, options); } this._controls[controlName] = control; }; Order.prototype._addDelegates = function() { $(this.options.sortableContainerSelector).on('update', $.proxy(this._evOnUpdate, this)); }; Order.prototype._evOnUpdate = function (e) { this.reorderedList = e.updatedList; this.updated = true; }; Order.prototype._evOnReset = function () { this.$sortable.html(this.previousConfigurationHtml); $('.placeholder').remove(); this.$sortable.bsSortable(this.bsSortableOptions); }; Order.prototype._evOnSave = function () { if (this.updated) { $(this._controls.save.selector).attr('disabled', true); this.$orderForm.attr('disabled', true); var data = this.reorderedList; var url = $(this._controls.save.selector).data('url'); $('.loading-global').show(); $.bforms.ajax({ data: { model: data }, url: url, success: this._reorderSuccess, error: this._reorderError, context: this, loadingClass: '.loading-global' }); } }; Order.prototype._reorderError = function (response) { console.log('error'); $('.loading-global').hide(); this.$orderForm.removeAttr('disabled'); $(this._controls.save.selector).attr('disabled', false); this.updated = false; }; Order.prototype._reorderSuccess = function (response) { this.updated = false; $('.loading-global').hide(); this.$orderForm.removeAttr('disabled'); $(this._controls.save.selector).attr('disabled', false); this.previousConfigurationHtml = this.$sortable.html(); }; return Order; }); ======= define('bforms-toolbar-order', [ 'jquery', 'bforms-toolbar', 'bforms-form', 'bforms-sortable' ], function () { var Order = function ($toolbar, opts) { this.options = $.extend(true, {}, this._defaultOptions, opts); this.name = 'order'; this.type = 'tab'; this.$toolbar = $toolbar; this.widget = $toolbar.data('bformsBsToolbar'); this._controls = {}; this.updated = false; this.currentConnection = {}; this._addDefaultControls(); }; Order.prototype.init = function () { var $elem = this.$container.find(this.options.selector); var controls = []; for (var k in this._controls) { if (this._controls.hasOwnProperty(k)) { controls.push(this._controls[k]); } } this.$orderForm = this.$container.bsForm({ container: $elem.attr('id'), actions: controls }); this.$sortable = $(this.options.containerSelector); this.bsSortableOptions = { itemSelector: this.options.itemSelector, listSelector: this.options.listSelector, containerSelector: this.options.containerSelector, serialize: this.options.serialize }; this.$sortable.bsSortable(this.bsSortableOptions); this.previousConfigurationHtml = this.$sortable.html(); this._addDelegates(); }; Order.prototype._defaultOptions = { selector: '.bs-show_order', itemSelector: '.bs-sortable-item', listSelector: '.bs-sortable', containerSelector: '.sortable-container', serialize: 'array' }; Order.prototype._addDefaultControls = function () { this._controls.reset = { name: 'reset', selector: '.js-btn-reset', validate: false, parse: false, handler: $.proxy(this._evOnReset, this) }; this._controls.save = { name: 'save', selector: '.js-btn-save_order', validate: false, parse: false, handler: $.proxy(this._evOnSave, this) }; }; Order.prototype.setControl = function (controlName, options) { var control = this._controls[controlName]; if (control) { control = $.extend(true, {}, control, options); } this._controls[controlName] = control; }; Order.prototype._addDelegates = function () { $(this.options.containerSelector).on('update', $.proxy(this._evOnUpdate, this)); }; Order.prototype._evOnUpdate = function (e) { console.log('update'); this.reorderedList = e.updatedList; this.updated = true; }; Order.prototype._evOnReset = function () { this.$sortable.html(this.previousConfigurationHtml); $('.placeholder').remove(); this.$sortable.bsSortable(this.bsSortableOptions); }; Order.prototype._evOnSave = function () { if (this.updated) { $(this._controls.save.selector).attr('disabled', true); this.$orderForm.attr('disabled', true); var data = this.reorderedList; var url = $(this._controls.save.selector).data('url'); $('.loading-global').show(); $.bforms.ajax({ data: { model: data }, url: url, success: this._reorderSuccess, error: this._reorderError, context: this, loadingClass: '.loading-global' }); } }; Order.prototype._reorderError = function (response) { console.log('error'); $('.loading-global').hide(); this.$orderForm.removeAttr('disabled'); $(this._controls.save.selector).attr('disabled', false); this.updated = false; }; Order.prototype._reorderSuccess = function (response) { this.updated = false; $('.loading-global').hide(); this.$orderForm.removeAttr('disabled'); $(this._controls.save.selector).attr('disabled', false); this.previousConfigurationHtml = this.$sortable.html(); }; return Order; }); >>>>>>> define('bforms-toolbar-order', [ 'jquery', 'bforms-toolbar', 'bforms-form', 'bforms-sortable' ], function () { var Order = function ($toolbar, opts) { this.options = $.extend(true, {}, this._defaultOptions, opts); this.name = 'order'; this.type = 'tab'; this.$toolbar = $toolbar; this.widget = $toolbar.data('bformsBsToolbar'); this._controls = {}; this.updated = false; this.currentConnection = {}; this._addDefaultControls(); }; Order.prototype.init = function () { var $elem = this.$container.find(this.options.selector); var controls = []; for (var k in this._controls) { if (this._controls.hasOwnProperty(k)) { controls.push(this._controls[k]); } } this.$orderForm = this.$container.bsForm({ container: $elem.attr('id'), actions: controls }); this.$sortable = $(this.options.containerSelector); this.bsSortableOptions = { itemSelector: this.options.itemSelector, listSelector: this.options.listSelector, containerSelector: this.options.containerSelector, serialize: this.options.serialize }; this.$sortable.bsSortable(this.bsSortableOptions); this.previousConfigurationHtml = this.$sortable.html(); this._addDelegates(); }; Order.prototype._defaultOptions = { selector: '.bs-show_order', itemSelector: '.bs-sortable-item', listSelector: '.bs-sortable', containerSelector: '.sortable-container', serialize: 'array' }; Order.prototype._addDefaultControls = function () { this._controls.reset = { name: 'reset', selector: '.js-btn-reset', validate: false, parse: false, handler: $.proxy(this._evOnReset, this) }; this._controls.save = { name: 'save', selector: '.js-btn-save_order', validate: false, parse: false, handler: $.proxy(this._evOnSave, this) }; }; Order.prototype.setControl = function (controlName, options) { var control = this._controls[controlName]; if (control) { control = $.extend(true, {}, control, options); } this._controls[controlName] = control; }; Order.prototype._addDelegates = function () { $(this.options.containerSelector).on('update', $.proxy(this._evOnUpdate, this)); }; Order.prototype._evOnUpdate = function (e) { this.reorderedList = e.updatedList; this.updated = true; }; Order.prototype._evOnReset = function () { this.$sortable.html(this.previousConfigurationHtml); $('.placeholder').remove(); this.$sortable.bsSortable(this.bsSortableOptions); }; Order.prototype._evOnSave = function () { if (this.updated) { $(this._controls.save.selector).attr('disabled', true); this.$orderForm.attr('disabled', true); var data = this.reorderedList; var url = $(this._controls.save.selector).data('url'); $('.loading-global').show(); $.bforms.ajax({ data: { model: data }, url: url, success: this._reorderSuccess, error: this._reorderError, context: this, loadingClass: '.loading-global' }); } }; Order.prototype._reorderError = function (response) { $('.loading-global').hide(); this.$orderForm.removeAttr('disabled'); $(this._controls.save.selector).attr('disabled', false); this.updated = false; }; Order.prototype._reorderSuccess = function (response) { this.updated = false; $('.loading-global').hide(); this.$orderForm.removeAttr('disabled'); $(this._controls.save.selector).attr('disabled', false); this.previousConfigurationHtml = this.$sortable.html(); }; return Order; });
<<<<<<< "csscomb", "cssmin", "decache"]); grunt.registerTask("amd", ["jshint", "uglify", "decache"]); ======= 'csscomb', 'cssmin', "decache" ]); grunt.registerTask('amd', function() { grunt.fail.warn([ "The task 'amd' is not configured in the theme Gruntfile.", 'Specify the path to your $CFG->dirroot Gruntfile e.g.', '', 'grunt amd --gruntfile="/path/to/dirroot/Gruntfile.js"', '', '' ].join(os.EOL)); }); >>>>>>> "csscomb", "cssmin", "decache" ]); grunt.registerTask('amd', function() { grunt.fail.warn([ "The task 'amd' is not configured in the theme Gruntfile.", 'Specify the path to your $CFG->dirroot Gruntfile e.g.', '', 'grunt amd --gruntfile="/path/to/dirroot/Gruntfile.js"', '', '' ].join(os.EOL)); });
<<<<<<< const d0 = "0x80084bf2fba02475726feb2cab2d8215eab14bc6bdd8bfb2c8151257032ecd8b"; const d1 = "0xb039179a8a4ce2c252aa6f2f25798251c19b75fc1508d9d511a191e0487d64a7" const d2 = "0x263ab762270d3b73d3e2cddf9acc893bb6bd41110347e5d5e4bd1d3c128ea90a" const d3 = "0x4ce8765e720c576f6f5a34ca380b3de5f0912e6e3cc5355542c363891e54594b" ======= const d0 = Buffer.from("80084bf2fba02475726feb2cab2d8215eab14bc6bdd8bfb2c8151257032ecd8b", "hex") const d1 = Buffer.from("b039179a8a4ce2c252aa6f2f25798251c19b75fc1508d9d511a191e0487d64a7", "hex") const d2 = Buffer.from("263ab762270d3b73d3e2cddf9acc893bb6bd41110347e5d5e4bd1d3c128ea90a", "hex") const d3 = Buffer.from("4ce8765e720c576f6f5a34ca380b3de5f0912e6e3cc5355542c363891e54594b", "hex") >>>>>>> const d0 = "0x80084bf2fba02475726feb2cab2d8215eab14bc6bdd8bfb2c8151257032ecd8b" const d1 = "0xb039179a8a4ce2c252aa6f2f25798251c19b75fc1508d9d511a191e0487d64a7" const d2 = "0x263ab762270d3b73d3e2cddf9acc893bb6bd41110347e5d5e4bd1d3c128ea90a" const d3 = "0x4ce8765e720c576f6f5a34ca380b3de5f0912e6e3cc5355542c363891e54594b" <<<<<<< const s0 = abi.soliditySHA3(["string", "uint256", "string"], [streamId, 0, d0]); const s1 = abi.soliditySHA3(["string", "uint256", "string"], [streamId, 1, d1]); const s2 = abi.soliditySHA3(["string", "uint256", "string"], [streamId, 2, d2]); const s3 = abi.soliditySHA3(["string", "uint256", "string"], [streamId, 3, d3]); ======= const s0 = abi.soliditySHA3(["string", "uint256", "bytes"], [streamId, 0, d0]) const s1 = abi.soliditySHA3(["string", "uint256", "bytes"], [streamId, 1, d1]) const s2 = abi.soliditySHA3(["string", "uint256", "bytes"], [streamId, 2, d2]) const s3 = abi.soliditySHA3(["string", "uint256", "bytes"], [streamId, 3, d3]) >>>>>>> const s0 = abi.soliditySHA3(["string", "uint256", "string"], [streamId, 0, d0]) const s1 = abi.soliditySHA3(["string", "uint256", "string"], [streamId, 1, d1]) const s2 = abi.soliditySHA3(["string", "uint256", "string"], [streamId, 2, d2]) const s3 = abi.soliditySHA3(["string", "uint256", "string"], [streamId, 3, d3]) <<<<<<< const tD0 = "0x42538602949f370aa331d2c07a1ee7ff26caac9cc676288f94b82eb2188b8465" const tD1 = "0xa0b37b8bfae8e71330bd8e278e4a45ca916d00475dd8b85e9352533454c9fec8" const tD2 = "0x9f2898da52dedaca29f05bcac0c8e43e4b9f7cb5707c14cc3f35a567232cec7c" const tD3 = "0x5a082c81a7e4d5833ee20bd67d2f4d736f679da33e4bebd3838217cb27bec1d3" ======= const tD0 = Buffer.from("42538602949f370aa331d2c07a1ee7ff26caac9cc676288f94b82eb2188b8465", "hex") const tD1 = Buffer.from("a0b37b8bfae8e71330bd8e278e4a45ca916d00475dd8b85e9352533454c9fec8", "hex") const tD2 = Buffer.from("9f2898da52dedaca29f05bcac0c8e43e4b9f7cb5707c14cc3f35a567232cec7c", "hex") const tD3 = Buffer.from("5a082c81a7e4d5833ee20bd67d2f4d736f679da33e4bebd3838217cb27bec1d3", "hex") >>>>>>> const tD0 = "0x42538602949f370aa331d2c07a1ee7ff26caac9cc676288f94b82eb2188b8465" const tD1 = "0xa0b37b8bfae8e71330bd8e278e4a45ca916d00475dd8b85e9352533454c9fec8" const tD2 = "0x9f2898da52dedaca29f05bcac0c8e43e4b9f7cb5707c14cc3f35a567232cec7c" const tD3 = "0x5a082c81a7e4d5833ee20bd67d2f4d736f679da33e4bebd3838217cb27bec1d3" <<<<<<< tClaim0 = abi.soliditySHA3(["string", "uint256", "string", "string", "bytes"], [streamId, 0, d0, tD0, bSig0]); tClaim1 = abi.soliditySHA3(["string", "uint256", "string", "string", "bytes"], [streamId, 1, d1, tD1, bSig1]); tClaim2 = abi.soliditySHA3(["string", "uint256", "string", "string", "bytes"], [streamId, 2, d2, tD2, bSig2]); tClaim3 = abi.soliditySHA3(["string", "uint256", "string", "string", "bytes"], [streamId, 3, d3, tD3, bSig3]); ======= tClaim0 = abi.soliditySHA3(["string", "uint256", "bytes", "bytes", "bytes"], [streamId, 0, d0, tD0, bSig0]) tClaim1 = abi.soliditySHA3(["string", "uint256", "bytes", "bytes", "bytes"], [streamId, 1, d1, tD1, bSig1]) tClaim2 = abi.soliditySHA3(["string", "uint256", "bytes", "bytes", "bytes"], [streamId, 2, d2, tD2, bSig2]) tClaim3 = abi.soliditySHA3(["string", "uint256", "bytes", "bytes", "bytes"], [streamId, 3, d3, tD3, bSig3]) >>>>>>> tClaim0 = abi.soliditySHA3(["string", "uint256", "string", "string", "bytes"], [streamId, 0, d0, tD0, bSig0]) tClaim1 = abi.soliditySHA3(["string", "uint256", "string", "string", "bytes"], [streamId, 1, d1, tD1, bSig1]) tClaim2 = abi.soliditySHA3(["string", "uint256", "string", "string", "bytes"], [streamId, 2, d2, tD2, bSig2]) tClaim3 = abi.soliditySHA3(["string", "uint256", "string", "string", "bytes"], [streamId, 3, d3, tD3, bSig3])
<<<<<<< res.swagger.lastModified = _.max(resources, "modifiedOn").modifiedOn; ======= res.swagger.lastModified = _.maxBy(resources, 'modifiedOn').modifiedOn; >>>>>>> res.swagger.lastModified = _.maxBy(resources, "modifiedOn").modifiedOn; <<<<<<< resources = _.pluck(resources, "data"); ======= resources = _.map(resources, 'data'); >>>>>>> resources = _.map(resources, "data"); <<<<<<< resources = _.pluck(resources, "data"); ======= resources = _.map(resources, 'data'); >>>>>>> resources = _.map(resources, "data"); <<<<<<< let queryParams = _.where(req.swagger.params, { in: "query" }); ======= let queryParams = _.filter(req.swagger.params, { in: 'query' }); >>>>>>> let queryParams = _.filter(req.swagger.params, { in: "query" }); <<<<<<< util.debug("Filtering resources by %j", filterCriteria.data); resources = _.where(resources, filterCriteria); util.debug("%d resources matched the filter criteria", resources.length); ======= util.debug('Filtering resources by %j', filterCriteria.data); resources = _.filter(resources, filterCriteria); util.debug('%d resources matched the filter criteria', resources.length); >>>>>>> util.debug("Filtering resources by %j", filterCriteria.data); resources = _.filter(resources, filterCriteria); util.debug("%d resources matched the filter criteria", resources.length);
<<<<<<< dayName, ", ", _.padLeft(date.getUTCDate(), 2, "0"), " ", monthName, " ", date.getUTCFullYear(), " ", _.padLeft(date.getUTCHours(), 2, "0"), ":", _.padLeft(date.getUTCMinutes(), 2, "0"), ":", _.padLeft(date.getUTCSeconds(), 2, "0"), " GMT" ].join(""); ======= dayName, ', ', _.padStart(date.getUTCDate(), 2, '0'), ' ', monthName, ' ', date.getUTCFullYear(), ' ', _.padStart(date.getUTCHours(), 2, '0'), ':', _.padStart(date.getUTCMinutes(), 2, '0'), ':', _.padStart(date.getUTCSeconds(), 2, '0'), ' GMT' ].join(''); >>>>>>> dayName, ", ", _.padStart(date.getUTCDate(), 2, "0"), " ", monthName, " ", date.getUTCFullYear(), " ", _.padStart(date.getUTCHours(), 2, "0"), ":", _.padStart(date.getUTCMinutes(), 2, "0"), ":", _.padStart(date.getUTCSeconds(), 2, "0"), " GMT" ].join(""); <<<<<<< _.where(params, { in: "formData" }).forEach((param) => { ======= _.filter(params, { in: 'formData' }).forEach((param) => { >>>>>>> _.filter(params, { in: "formData" }).forEach((param) => {
<<<<<<< if (_.contains(name.substring(1, name.length - 1), "/")) { throw ono("Resource names cannot contain slashes"); ======= if (_.includes(name.substring(1, name.length - 1), '/')) { throw ono('Resource names cannot contain slashes'); >>>>>>> if (_.includes(name.substring(1, name.length - 1), "/")) { throw ono("Resource names cannot contain slashes");
<<<<<<< if (!this._headers.hasOwnProperty("Origin")) { var originScheme = uri.getScheme() === "wss" ? "https" : "http"; var originHost = uri.getPort() !== -1 ? uri.getHost() + ":" + uri.getPort() : uri.getHost(); this._headers["Origin"] = originScheme + "://" + originHost; } if (this._protocol !== "") { this._headers["Sec-WebSocket-Protocol"] = this._protocol } ======= var knownExtensions = new java.util.ArrayList(); var knownProtocols = new java.util.ArrayList(); if(this._protocol){ knownProtocols.add(new org.java_websocket.protocols.Protocol(this._protocol)); } >>>>>>> if (!this._headers.hasOwnProperty("Origin")) { var originScheme = uri.getScheme() === "wss" ? "https" : "http"; var originHost = uri.getPort() !== -1 ? uri.getHost() + ":" + uri.getPort() : uri.getHost(); this._headers["Origin"] = originScheme + "://" + originHost; } var knownExtensions = new java.util.ArrayList(); var knownProtocols = new java.util.ArrayList(); if(this._protocol){ knownProtocols.add(new org.java_websocket.protocols.Protocol(this._protocol)); } <<<<<<< //noinspection JSUnresolvedFunction switch (this._socket.getReadyState()) { case org.java_websocket.WebSocket.READYSTATE.NOT_YET_CONNECTED: return this.NOT_YET_CONNECTED; case org.java_websocket.WebSocket.READYSTATE.CONNECTING: return this.CONNECTING; case org.java_websocket.WebSocket.READYSTATE.OPEN: return this.OPEN; case org.java_websocket.WebSocket.READYSTATE.CLOSING: return this.CLOSING; case org.java_websocket .WebSocket.READYSTATE.CLOSED: return this.CLOSED; default: throw new Error("getReadyState returned invalid value"); } ======= //noinspection JSUnresolvedFunction switch (this._socket.getReadyState()) { case org.java_websocket.WebSocket.READYSTATE.NOT_YET_CONNECTED: return this.NOT_YET_CONNECTED; case org.java_websocket.WebSocket.READYSTATE.CONNECTING: return this.CONNECTING; case org.java_websocket.WebSocket.READYSTATE.OPEN: return this.OPEN; case org.java_websocket.WebSocket.READYSTATE.CLOSING: return this.CLOSING; case org.java_websocket .WebSocket.READYSTATE.CLOSED: return this.CLOSED; default: throw new Error("getReadyState returned invalid value"); } >>>>>>> //noinspection JSUnresolvedFunction switch (this._socket.getReadyState()) { case org.java_websocket.WebSocket.READYSTATE.NOT_YET_CONNECTED: return this.NOT_YET_CONNECTED; case org.java_websocket.WebSocket.READYSTATE.CONNECTING: return this.CONNECTING; case org.java_websocket.WebSocket.READYSTATE.OPEN: return this.OPEN; case org.java_websocket.WebSocket.READYSTATE.CLOSING: return this.CLOSING; case org.java_websocket .WebSocket.READYSTATE.CLOSED: return this.CLOSED; default: throw new Error("getReadyState returned invalid value"); }
<<<<<<< it('should return the notation pattern matching whole string for "' + name + '"', function(){ var pattern = DiceRoll.notationPatterns.get(name, null, true); ======= it(`should return the notation pattern matching whole string for "${name}"`, () => { const pattern = DiceRoller.notationPatterns.get(name, null, true); >>>>>>> it(`should return the notation pattern matching whole string for "${name}"`, () => { const pattern = DiceRoll.notationPatterns.get(name, null, true); <<<<<<< it('should return the notation pattern with flags and matching whole string for "' + name + '"', function(){ var pattern = DiceRoll.notationPatterns.get(name, 'g', true); ======= it(`should return the notation pattern with flags and matching whole string for "${name}"`, () => { const pattern = DiceRoller.notationPatterns.get(name, 'g', true); >>>>>>> it(`should return the notation pattern with flags and matching whole string for "${name}"`, () => { const pattern = DiceRoll.notationPatterns.get(name, 'g', true);
<<<<<<< class ArtistInviteSubmissionsAsGridSimple extends PureComponent { // eslint-disable-line max-len, react/no-multi-comp static propTypes = { submissionIds: PropTypes.object.isRequired, toggleLightBox: PropTypes.func.isRequired, columnCount: PropTypes.number.isRequired, headerText: PropTypes.string, } static defaultProps = { submissionIds: null, toggleLightBox: null, columnCount: null, headerText: null, } render() { const { toggleLightBox, submissionIds, columnCount, headerText, } = this.props if (!submissionIds || submissionIds.size === 0) { return null } const columns = [] for (let i = 0; i < columnCount; i += 1) { columns.push([]) } submissionIds.forEach((value, index) => columns[index % columnCount].push(submissionIds.get(index)), ) return ( <div className="Posts asGrid"> {headerText && <div className={titleWrapperStyle}> <h2 className={blackTitleStyle}>{headerText}</h2> </div> } {columns.map((columnSubmissionIds, i) => (<div className="Column" key={`column_${i + 1}`}> {columnSubmissionIds.map(id => ( <article className="PostGrid ArtistInviteSubmission" key={`postsAsGrid_${id}`}> <ArtistInviteSubmissionContainer toggleLightBox={toggleLightBox} submissionId={id} /> </article> ))} </div>), )} </div> ) } ======= export const artistInviteSubmissionsAsGrid = (submissionIds, columnCount, headerText) => { if (!submissionIds || submissionIds.size === 0) { return null } const columns = [] for (let i = 0; i < columnCount; i += 1) { columns.push([]) } submissionIds.forEach((value, index) => columns[index % columnCount].push(submissionIds.get(index)), ) return ( <div className={`Posts asGrid ${postGridStyle}`}> {headerText && <div className={titleWrapperStyle}> <h2 className={blackTitleStyle}>{headerText}</h2> </div> } {columns.map((columnSubmissionIds, i) => (<div className="Column" key={`column_${i + 1}`}> {columnSubmissionIds.map(id => ( <article className="PostGrid ArtistInviteSubmission" key={`postsAsGrid_${id}`}> <ArtistInviteSubmissionContainer submissionId={id} /> </article> ))} </div>), )} </div> ) >>>>>>> class ArtistInviteSubmissionsAsGridSimple extends PureComponent { // eslint-disable-line max-len, react/no-multi-comp static propTypes = { submissionIds: PropTypes.object.isRequired, toggleLightBox: PropTypes.func.isRequired, columnCount: PropTypes.number.isRequired, headerText: PropTypes.string, } static defaultProps = { submissionIds: null, toggleLightBox: null, columnCount: null, headerText: null, } render() { const { toggleLightBox, submissionIds, columnCount, headerText, } = this.props if (!submissionIds || submissionIds.size === 0) { return null } const columns = [] for (let i = 0; i < columnCount; i += 1) { columns.push([]) } submissionIds.forEach((value, index) => columns[index % columnCount].push(submissionIds.get(index)), ) return ( <div className={`Posts asGrid ${postGridStyle}`}> {headerText && <div className={titleWrapperStyle}> <h2 className={blackTitleStyle}>{headerText}</h2> </div> } {columns.map((columnSubmissionIds, i) => (<div className="Column" key={`column_${i + 1}`}> {columnSubmissionIds.map(id => ( <article className="PostGrid ArtistInviteSubmission" key={`postsAsGrid_${id}`}> <ArtistInviteSubmissionContainer toggleLightBox={toggleLightBox} submissionId={id} /> </article> ))} </div>), )} </div> ) } <<<<<<< static defaultProps = { toggleLightBox: null, postIds: null, isPostHeaderHidden: false, } render() { const { toggleLightBox, postIds, columnCount, isPostHeaderHidden, } = this.props const postIdsAsList = postIds.toList() const columns = [] for (let i = 0; i < columnCount; i += 1) { columns.push([]) } postIdsAsList.forEach((value, index) => columns[index % columnCount].push(postIdsAsList.get(index)), ) return ( <div className="Posts asGrid"> {columns.map((columnPostIds, i) => (<div className="Column" key={`column_${i + 1}`}> {columnPostIds.map(id => (<article className="PostGrid" key={`postsAsGrid_${id}`}> <PostContainer postId={id} isPostHeaderHidden={isPostHeaderHidden} toggleLightBox={toggleLightBox} /> </article>), )} </div>), )} </div> ) } ======= const columns = [] for (let i = 0; i < columnCount; i += 1) { columns.push([]) } postIdsAsList.forEach((value, index) => columns[index % columnCount].push(postIdsAsList.get(index)), ) return ( <div className={`Posts asGrid ${postGridStyle}`}> {columns.map((columnPostIds, i) => (<div className="Column" key={`column_${i + 1}`}> {columnPostIds.map(id => (<article className="PostGrid" key={`postsAsGrid_${id}`}> <PostContainer postId={id} isPostHeaderHidden={isPostHeaderHidden} /> </article>), )} </div>), )} </div> ) >>>>>>> static defaultProps = { toggleLightBox: null, postIds: null, isPostHeaderHidden: false, } render() { const { toggleLightBox, postIds, columnCount, isPostHeaderHidden, } = this.props const postIdsAsList = postIds.toList() const columns = [] for (let i = 0; i < columnCount; i += 1) { columns.push([]) } postIdsAsList.forEach((value, index) => columns[index % columnCount].push(postIdsAsList.get(index)), ) return ( <div className={`Posts asGrid ${postGridStyle}`}> {columns.map((columnPostIds, i) => (<div className="Column" key={`column_${i + 1}`}> {columnPostIds.map(id => (<article className="PostGrid" key={`postsAsGrid_${id}`}> <PostContainer postId={id} isPostHeaderHidden={isPostHeaderHidden} toggleLightBox={toggleLightBox} /> </article>), )} </div>), )} </div> ) } <<<<<<< class PostsAsRelatedSimple extends PureComponent { // eslint-disable-line react/no-multi-comp static propTypes = { toggleLightBox: PropTypes.func.isRequired, postIds: PropTypes.object.isRequired, columnCount: PropTypes.number.isRequired, isPostHeaderHidden: PropTypes.bool.isRequired, } static defaultProps = { toggleLightBox: null, postIds: null, isPostHeaderHidden: false, } render() { const { toggleLightBox, postIds, columnCount, isPostHeaderHidden, } = this.props const columns = [] // this is for post detail when the comments are fixed to the right const finalColumnCount = columnCount > 3 ? columnCount - 1 : columnCount for (let i = 0; i < finalColumnCount; i += 1) { columns.push([]) } postIds.forEach((value, index) => columns[index % finalColumnCount].push(postIds.get(index))) return ( <div className="Posts asGrid"> {postIds.size && <h2 className={relatedPostsTitleStyle}> Related Posts </h2> } {columns.map((columnPostIds, i) => (<div className="Column" key={`column_${i + 1}`}> {columnPostIds.map(id => (<article className="PostGrid" key={`postsAsGrid_${id}`}> <PostContainer postId={id} isPostHeaderHidden={isPostHeaderHidden} isRelatedPost toggleLightBox={toggleLightBox} /> </article>), )} </div>), )} </div> ) } ======= export const postsAsRelated = (postIds, colCount, isPostHeaderHidden) => { const columns = [] // this is for post detail when the comments are fixed to the right const columnCount = colCount > 3 ? colCount - 1 : colCount for (let i = 0; i < columnCount; i += 1) { columns.push([]) } postIds.forEach((value, index) => columns[index % columnCount].push(postIds.get(index))) return ( <div className={`Posts asGrid ${postGridStyle}`}> {postIds.size && <h2 className={relatedPostsTitleStyle}> Related Posts </h2> } {columns.map((columnPostIds, i) => (<div className="Column" key={`column_${i + 1}`}> {columnPostIds.map(id => (<article className="PostGrid" key={`postsAsGrid_${id}`}> <PostContainer postId={id} isPostHeaderHidden={isPostHeaderHidden} isRelatedPost /> </article>), )} </div>), )} </div> ) >>>>>>> class PostsAsRelatedSimple extends PureComponent { // eslint-disable-line react/no-multi-comp static propTypes = { toggleLightBox: PropTypes.func.isRequired, postIds: PropTypes.object.isRequired, columnCount: PropTypes.number.isRequired, isPostHeaderHidden: PropTypes.bool.isRequired, } static defaultProps = { toggleLightBox: null, postIds: null, isPostHeaderHidden: false, } render() { const { toggleLightBox, postIds, columnCount, isPostHeaderHidden, } = this.props const columns = [] // this is for post detail when the comments are fixed to the right const finalColumnCount = columnCount > 3 ? columnCount - 1 : columnCount for (let i = 0; i < finalColumnCount; i += 1) { columns.push([]) } postIds.forEach((value, index) => columns[index % finalColumnCount].push(postIds.get(index))) return ( <div className={`Posts asGrid ${postGridStyle}`}> {postIds.size && <h2 className={relatedPostsTitleStyle}> Related Posts </h2> } {columns.map((columnPostIds, i) => (<div className="Column" key={`column_${i + 1}`}> {columnPostIds.map(id => (<article className="PostGrid" key={`postsAsGrid_${id}`}> <PostContainer postId={id} isPostHeaderHidden={isPostHeaderHidden} isRelatedPost toggleLightBox={toggleLightBox} /> </article>), )} </div>), )} </div> ) }
<<<<<<< import _ from 'lodash' import { LOCATION_CHANGE } from 'react-router-redux' import { BEACONS, PROFILE, SET_LAYOUT_MODE } from '../constants/action_types' ======= import { UPDATE_LOCATION } from 'react-router-redux' import { BEACONS, GUI, HEAD_FAILURE, HEAD_REQUEST, HEAD_SUCCESS, LOAD_STREAM_SUCCESS, PROFILE, SET_LAYOUT_MODE, } from '../constants/action_types' >>>>>>> import _ from 'lodash' import { LOCATION_CHANGE } from 'react-router-redux' import { BEACONS, GUI, HEAD_FAILURE, HEAD_REQUEST, HEAD_SUCCESS, LOAD_STREAM_SUCCESS, PROFILE, SET_LAYOUT_MODE, } from '../constants/action_types' <<<<<<< currentStream: '/following', ======= newNotificationContent: false, history: {}, >>>>>>> currentStream: '/following', newNotificationContent: false, history: {},
<<<<<<< assert.ok(ReactDOM.findDOMNode(panes[0]).className.match(/\bcustom\b/)); assert.equal(ReactDOM.findDOMNode(panes[0]).id, 'pane0id'); ======= assert.ok(React.findDOMNode(panes[0]).className.match(/\bcustom\b/)); assert.ok(React.findDOMNode(navs[1]).className.match(/\btcustom\b/)); assert.equal(React.findDOMNode(panes[0]).id, 'pane0id'); >>>>>>> assert.ok(ReactDOM.findDOMNode(panes[0]).className.match(/\bcustom\b/)); assert.ok(ReactDOM.findDOMNode(navs[1]).className.match(/\btcustom\b/)); assert.equal(ReactDOM.findDOMNode(panes[0]).id, 'pane0id'); <<<<<<< it('should render with clearfix', function() { expect(ReactDOM.findDOMNode(instance).className).to.match(/\bclearfix\b/); ======= it('should render with clearfix', () => { expect(React.findDOMNode(instance).className).to.match(/\bclearfix\b/); >>>>>>> it('should render with clearfix', () => { expect(ReactDOM.findDOMNode(instance).className).to.match(/\bclearfix\b/); <<<<<<< it('should not render with clearfix', function() { expect(ReactDOM.findDOMNode(instance).className) ======= it('should not render with clearfix', () => { expect(React.findDOMNode(instance).className) >>>>>>> it('should not render with clearfix', () => { expect(ReactDOM.findDOMNode(instance).className) <<<<<<< afterEach(function () { ReactDOM.unmountComponentAtNode(mountPoint); ======= afterEach(() => { React.unmountComponentAtNode(mountPoint); >>>>>>> afterEach(() => { ReactDOM.unmountComponentAtNode(mountPoint); <<<<<<< afterEach(function() { ReactDOM.unmountComponentAtNode(mountPoint); document.body.removeChild(mountPoint); ======= afterEach(() => { instance = React.unmountComponentAtNode(document.body); >>>>>>> afterEach(() => { ReactDOM.unmountComponentAtNode(mountPoint); document.body.removeChild(mountPoint);
<<<<<<< import React, {cloneElement} from 'react'; import ReactDOM from 'react-dom'; ======= import domUtils from './utils/domUtils'; import getScrollbarSize from 'dom-helpers/util/scrollbarSize'; import EventListener from './utils/EventListener'; import createChainedFunction from './utils/createChainedFunction'; import CustomPropTypes from './utils/CustomPropTypes'; >>>>>>> import React, {cloneElement} from 'react'; import ReactDOM from 'react-dom'; import domUtils from './utils/domUtils'; import getScrollbarSize from 'dom-helpers/util/scrollbarSize'; import EventListener from './utils/EventListener'; import createChainedFunction from './utils/createChainedFunction'; import CustomPropTypes from './utils/CustomPropTypes'; <<<<<<< this.setState(this._getStyles() //eslint-disable-line react/no-did-mount-set-state , () => this.focusModalContent()); ======= if (this.props.backdrop) { this.iosClickHack(); } this.setState(this._getStyles(), () => this.focusModalContent()); >>>>>>> this.setState(this._getStyles(), () => this.focusModalContent()); <<<<<<< let modalContent = ReactDOM.findDOMNode(this.refs.dialog); let current = domUtils.activeElement(this); ======= let modalContent = React.findDOMNode(this.refs.dialog); let current = domUtils.activeElement(domUtils.ownerDocument(this)); >>>>>>> let modalContent = ReactDOM.findDOMNode(this.refs.dialog); let current = domUtils.activeElement(domUtils.ownerDocument(this)); <<<<<<< let active = domUtils.activeElement(this); let modal = ReactDOM.findDOMNode(this.refs.dialog); ======= let active = domUtils.activeElement(domUtils.ownerDocument(this)); let modal = React.findDOMNode(this.refs.dialog); >>>>>>> let active = domUtils.activeElement(domUtils.ownerDocument(this)); let modal = ReactDOM.findDOMNode(this.refs.dialog);
<<<<<<< it('Should have collapsing class', function () { instance.setState({ in: true }); ======= it('Should have collapsing class', () => { instance.setProps({ in: true }); >>>>>>> it('Should have collapsing class', () => { instance.setState({ in: true }); <<<<<<< it('Should set initial 0px height', function (done) { let node = ReactDOM.findDOMNode(instance); ======= it('Should set initial 0px height', (done) => { let node = React.findDOMNode(instance); >>>>>>> it('Should set initial 0px height', (done) => { let node = ReactDOM.findDOMNode(instance); <<<<<<< it('Should set node to height', function () { let node = ReactDOM.findDOMNode(instance); ======= it('Should set node to height', () => { let node = React.findDOMNode(instance); >>>>>>> it('Should set node to height', () => { let node = ReactDOM.findDOMNode(instance); <<<<<<< it('Should transition from collapsing to not collapsing', function (done) { let node = ReactDOM.findDOMNode(instance); ======= it('Should transition from collapsing to not collapsing', (done) => { let node = React.findDOMNode(instance); >>>>>>> it('Should transition from collapsing to not collapsing', (done) => { let node = ReactDOM.findDOMNode(instance); <<<<<<< it('Should clear height after transition complete', function (done) { let node = ReactDOM.findDOMNode(instance); ======= it('Should clear height after transition complete', (done) => { let node = React.findDOMNode(instance); >>>>>>> it('Should clear height after transition complete', (done) => { let node = ReactDOM.findDOMNode(instance); <<<<<<< it('Should set node to height', function () { let node = ReactDOM.findDOMNode(instance); ======= it('Should set node to height', () => { let node = React.findDOMNode(instance); >>>>>>> it('Should set node to height', () => { let node = ReactDOM.findDOMNode(instance); <<<<<<< it('Should transition from collapsing to not collapsing', function (done) { let node = ReactDOM.findDOMNode(instance); ======= it('Should transition from collapsing to not collapsing', (done) => { let node = React.findDOMNode(instance); >>>>>>> it('Should transition from collapsing to not collapsing', (done) => { let node = ReactDOM.findDOMNode(instance); <<<<<<< it('Should have 0px height after transition complete', function (done) { let node = ReactDOM.findDOMNode(instance); ======= it('Should have 0px height after transition complete', (done) => { let node = React.findDOMNode(instance); >>>>>>> it('Should have 0px height after transition complete', (done) => { let node = ReactDOM.findDOMNode(instance); <<<<<<< it('sets aria-expanded true when expanded', function() { let node = ReactDOM.findDOMNode(instance); instance.setState({ in: true}); ======= it('sets aria-expanded true when expanded', () => { let node = React.findDOMNode(instance); instance.setProps({ in: true}); >>>>>>> it('sets aria-expanded true when expanded', () => { let node = ReactDOM.findDOMNode(instance); instance.setState({ in: true}); <<<<<<< it('sets aria-expanded false when collapsed', function() { let node = ReactDOM.findDOMNode(instance); instance.setState({ in: false}); ======= it('sets aria-expanded false when collapsed', () => { let node = React.findDOMNode(instance); instance.setProps({ in: false}); >>>>>>> it('sets aria-expanded false when collapsed', () => { let node = ReactDOM.findDOMNode(instance); instance.setState({ in: false});
<<<<<<< export const CHANGE_CURRENT_FRAME = 'CHANGE_CURRENT_FRAME' export const CHANGE_THREED_COLORMAP = 'CHANGE_THREED_COLORMAP' export const UPDATE_THREE_D_COLORBY = 'UPDATE_THREE_D_COLORBY' export const UPDATE_THREE_D_COLORBY_OPTIONS = 'UPDATE_THREE_D_COLORBY_OPTIONS' export const UPDATE_THREE_D_CAMERAS = 'UPDATE_THREE_D_CAMERAS' export const UPDATE_THREE_D_SYNC = 'UPDATE_THREE_D_SYNC' ======= export const SET_UNSELECTED_POINT_SIZE = 'SET_UNSELECTED_POINT_SIZE' export const SET_UNSELECTED_BORDER_SIZE = 'SET_UNSELECTED_BORDER_SIZE' export const SET_SELECTED_POINT_SIZE = 'SET_SELECTED_POINT_SIZE' export const SET_SELECTED_BORDER_SIZE = 'SET_SELECTED_BORDER_SIZE' >>>>>>> export const CHANGE_CURRENT_FRAME = 'CHANGE_CURRENT_FRAME' export const CHANGE_THREED_COLORMAP = 'CHANGE_THREED_COLORMAP' export const UPDATE_THREE_D_COLORBY = 'UPDATE_THREE_D_COLORBY' export const UPDATE_THREE_D_COLORBY_OPTIONS = 'UPDATE_THREE_D_COLORBY_OPTIONS' export const UPDATE_THREE_D_CAMERAS = 'UPDATE_THREE_D_CAMERAS' export const UPDATE_THREE_D_SYNC = 'UPDATE_THREE_D_SYNC' export const SET_UNSELECTED_POINT_SIZE = 'SET_UNSELECTED_POINT_SIZE' export const SET_UNSELECTED_BORDER_SIZE = 'SET_UNSELECTED_BORDER_SIZE' export const SET_SELECTED_POINT_SIZE = 'SET_SELECTED_POINT_SIZE' export const SET_SELECTED_BORDER_SIZE = 'SET_SELECTED_BORDER_SIZE' <<<<<<< return { type: CHANGE_VARIABLE_ALIAS_LABEL, aliasVariable: variable, aliasLabel: label } } export function changeCurrentFrame(frame) { return { type: CHANGE_CURRENT_FRAME, currentFrame: frame } } export function changeThreeDColormap(label, key) { return { type: CHANGE_THREED_COLORMAP, threeDColormap: key } } export function updateThreeDColorBy(uri, colorBy) { return { type: UPDATE_THREE_D_COLORBY, uri: uri, colorBy: colorBy, } } export function updateThreeDColorByOptions(uri, options) { return { type: UPDATE_THREE_D_COLORBY_OPTIONS, uri: uri, options: options, } } export function updateThreeDCameras(cameras) { return { type: UPDATE_THREE_D_CAMERAS, cameras: cameras, // Throttle this action to only invoke it once every x milliseconds // because it gets called very often as the user interacts with a // 3D model, and that overwhelms the browser as it tries to bookmark // the state constantly. meta: { throttle: 1500 }, } } export function updateThreeDSync(threeD_sync) { return { type: UPDATE_THREE_D_SYNC, threeD_sync: threeD_sync } ======= return { type: CHANGE_VARIABLE_ALIAS_LABEL, aliasVariable: variable, aliasLabel: label } } export function setUnselectedPointSize(event) { return { type: SET_UNSELECTED_POINT_SIZE, size: parseFloat(event.target.value) } } export function setUnselectedBorderSize(event) { return { type: SET_UNSELECTED_BORDER_SIZE, size: parseFloat(event.target.value) } } export function setSelectedPointSize(event) { return { type: SET_SELECTED_POINT_SIZE, size: parseFloat(event.target.value) } } export function setSelectedBorderSize(event) { return { type: SET_SELECTED_BORDER_SIZE, size: parseFloat(event.target.value) } >>>>>>> return { type: CHANGE_VARIABLE_ALIAS_LABEL, aliasVariable: variable, aliasLabel: label } } export function changeCurrentFrame(frame) { return { type: CHANGE_CURRENT_FRAME, currentFrame: frame } } export function changeThreeDColormap(label, key) { return { type: CHANGE_THREED_COLORMAP, threeDColormap: key } } export function updateThreeDColorBy(uri, colorBy) { return { type: UPDATE_THREE_D_COLORBY, uri: uri, colorBy: colorBy, } } export function updateThreeDColorByOptions(uri, options) { return { type: UPDATE_THREE_D_COLORBY_OPTIONS, uri: uri, options: options, } } export function updateThreeDCameras(cameras) { return { type: UPDATE_THREE_D_CAMERAS, cameras: cameras, // Throttle this action to only invoke it once every x milliseconds // because it gets called very often as the user interacts with a // 3D model, and that overwhelms the browser as it tries to bookmark // the state constantly. meta: { throttle: 1500 }, } } export function updateThreeDSync(threeD_sync) { return { type: UPDATE_THREE_D_SYNC, threeD_sync: threeD_sync } } export function setUnselectedPointSize(event) { return { type: SET_UNSELECTED_POINT_SIZE, size: parseFloat(event.target.value) } } export function setUnselectedBorderSize(event) { return { type: SET_UNSELECTED_BORDER_SIZE, size: parseFloat(event.target.value) } } export function setSelectedPointSize(event) { return { type: SET_SELECTED_POINT_SIZE, size: parseFloat(event.target.value) } } export function setSelectedBorderSize(event) { return { type: SET_SELECTED_BORDER_SIZE, size: parseFloat(event.target.value) }
<<<<<<< import warning from 'react/lib/warning'; ======= import childrenToArray from './childrenToArray'; >>>>>>> import warning from 'react/lib/warning'; import childrenToArray from './childrenToArray';
<<<<<<< devtool: 'cheap-module-inline-source-map', stats: 'minimal', }), ======= }, >>>>>>> devtool: 'cheap-module-inline-source-map', stats: 'minimal', },
<<<<<<< <div className="bs-docs-section"> <h1 id="modals" className="page-header">Modals <small>Modal</small></h1> <h3 id="modals-static">A static example</h3> <p>A rendered modal with header, body, and set of actions in the footer.</p> <p>The header is added automatically if you pass in a <code>title</code> prop.</p> <ReactPlayground codeText={ModalStatic} /> <h3 id="modals-static">Live demo</h3> <p>Use <code>&lt;OverlayTrigger/&gt;</code> to create a real modal that's added to the document body when opened.</p> <ReactPlayground codeText={ModalOverlayTrigger} /> <h3 id="modals-static">Custom trigger</h3> <p>Use <code>&lt;OverlayTriggerMixin/&gt;</code> in a custom component to manage the modal's state yourself.</p> <ReactPlayground codeText={ModalOverlayTriggerMixin} /> </div> ======= <div className="bs-docs-section"> <h1 id="btn-dropdowns" className="page-header">Button dropdowns</h1> <p className="lead">Use <code>{'<DropdownButton />'}</code> or <code>{'<SplitButton />'}</code> components to display a button with a dropdown menu.</p> <h3 id="btn-dropdowns-single">Single button dropdowns</h3> <p>Create a dropdown button with the <code>{'<DropdownButton />'}</code> component.</p> <ReactPlayground codeText={DropdownButtonBasicText} /> <h3 id="btn-dropdowns-split">Split button dropdowns</h3> <p>Similarly, create split button dropdowns with the <code>{'<SplitButton />'}</code> component.</p> <ReactPlayground codeText={SplitButtonBasicText} /> <h3 id="btn-dropdowns-sizing">Sizing</h3> <p>Button dropdowns work with buttons of all sizes.</p> <ReactPlayground codeText={DropdownButtonSizesText} /> <h3 id="btn-dropdowns-dropup">Dropup variation</h3> <p>Trigger dropdown menus that site above the button by adding the <code>dropup</code> prop.</p> <ReactPlayground codeText={SplitButtonDropupText} /> <h3 id="btn-dropdowns-right">Dropdown right variation</h3> <p>Trigger dropdown menus that align to the right of the button using the <code>pullRight</code> prop.</p> <ReactPlayground codeText={SplitButtonRightText} /> </div> >>>>>>> <div className="bs-docs-section"> <h1 id="btn-dropdowns" className="page-header">Button dropdowns</h1> <p className="lead">Use <code>{'<DropdownButton />'}</code> or <code>{'<SplitButton />'}</code> components to display a button with a dropdown menu.</p> <h3 id="btn-dropdowns-single">Single button dropdowns</h3> <p>Create a dropdown button with the <code>{'<DropdownButton />'}</code> component.</p> <ReactPlayground codeText={DropdownButtonBasicText} /> <h3 id="btn-dropdowns-split">Split button dropdowns</h3> <p>Similarly, create split button dropdowns with the <code>{'<SplitButton />'}</code> component.</p> <ReactPlayground codeText={SplitButtonBasicText} /> <h3 id="btn-dropdowns-sizing">Sizing</h3> <p>Button dropdowns work with buttons of all sizes.</p> <ReactPlayground codeText={DropdownButtonSizesText} /> <h3 id="btn-dropdowns-dropup">Dropup variation</h3> <p>Trigger dropdown menus that site above the button by adding the <code>dropup</code> prop.</p> <ReactPlayground codeText={SplitButtonDropupText} /> <h3 id="btn-dropdowns-right">Dropdown right variation</h3> <p>Trigger dropdown menus that align to the right of the button using the <code>pullRight</code> prop.</p> <ReactPlayground codeText={SplitButtonRightText} /> </div> <div className="bs-docs-section"> <h1 id="modals" className="page-header">Modals <small>Modal</small></h1> <h3 id="modals-static">A static example</h3> <p>A rendered modal with header, body, and set of actions in the footer.</p> <p>The header is added automatically if you pass in a <code>title</code> prop.</p> <ReactPlayground codeText={ModalStatic} /> <h3 id="modals-static">Live demo</h3> <p>Use <code>&lt;OverlayTrigger/&gt;</code> to create a real modal that's added to the document body when opened.</p> <ReactPlayground codeText={ModalOverlayTrigger} /> <h3 id="modals-static">Custom trigger</h3> <p>Use <code>&lt;OverlayTriggerMixin/&gt;</code> in a custom component to manage the modal's state yourself.</p> <ReactPlayground codeText={ModalOverlayTriggerMixin} /> </div> <<<<<<< <li> <a href="#modals">Modals</a> </li> ======= <li> <a href="#btn-dropdowns">Button dropdowns</a> </li> >>>>>>> <li> <a href="#btn-dropdowns">Button dropdowns</a> </li> <li> <a href="#modals">Modals</a> </li>
<<<<<<< var Popover = BS.Popover ======= var Carousel = BS.Carousel var CarouselItem = BS.CarouselItem >>>>>>> var Popover = BS.Popover var Carousel = BS.Carousel var CarouselItem = BS.CarouselItem
<<<<<<< afterEach(function() { ReactDOM.unmountComponentAtNode(focusableContainer); ======= afterEach(() => { React.unmountComponentAtNode(focusableContainer); >>>>>>> afterEach(() => { ReactDOM.unmountComponentAtNode(focusableContainer); <<<<<<< describe('Keyboard Navigation', function() { it('sets focus on next menu item when the key "down" is pressed', function() { const instance = ReactDOM.render(simpleMenu, focusableContainer); ======= describe('Keyboard Navigation', () => { it('sets focus on next menu item when the key "down" is pressed', () => { const instance = React.render(simpleMenu, focusableContainer); >>>>>>> describe('Keyboard Navigation', () => { it('sets focus on next menu item when the key "down" is pressed', () => { const instance = ReactDOM.render(simpleMenu, focusableContainer); <<<<<<< it('with last item is focused when the key "down" is pressed first item gains focus', function() { const instance = ReactDOM.render(simpleMenu, focusableContainer); ======= it('with last item is focused when the key "down" is pressed first item gains focus', () => { const instance = React.render(simpleMenu, focusableContainer); >>>>>>> it('with last item is focused when the key "down" is pressed first item gains focus', () => { const instance = ReactDOM.render(simpleMenu, focusableContainer); <<<<<<< it('sets focus on previous menu item when the key "up" is pressed', function() { const instance = ReactDOM.render(simpleMenu, focusableContainer); ======= it('sets focus on previous menu item when the key "up" is pressed', () => { const instance = React.render(simpleMenu, focusableContainer); >>>>>>> it('sets focus on previous menu item when the key "up" is pressed', () => { const instance = ReactDOM.render(simpleMenu, focusableContainer); <<<<<<< it('with first item focused when the key "up" is pressed last item gains focus', function() { const instance = ReactDOM.render(simpleMenu, focusableContainer); ======= it('with first item focused when the key "up" is pressed last item gains focus', () => { const instance = React.render(simpleMenu, focusableContainer); >>>>>>> it('with first item focused when the key "up" is pressed last item gains focus', () => { const instance = ReactDOM.render(simpleMenu, focusableContainer);
<<<<<<< import ReactDOM from 'react-dom'; ======= import getOffset from 'dom-helpers/query/offset'; import css from 'dom-helpers/style'; >>>>>>> import ReactDOM from 'react-dom'; import getOffset from 'dom-helpers/query/offset'; import css from 'dom-helpers/style'; <<<<<<< let elem = ReactDOM.findDOMNode(this.refs.sideNav); let domUtils = Affix.domUtils; let sideNavOffsetTop = domUtils.getOffset(elem).top; let sideNavMarginTop = parseInt(domUtils.getComputedStyles(elem.firstChild).marginTop, 10); let topNavHeight = ReactDOM.findDOMNode(this.refs.topNav).offsetHeight; ======= let elem = React.findDOMNode(this.refs.sideNav); let sideNavOffsetTop = getOffset(elem).top; let sideNavMarginTop = parseInt(css(elem.firstChild, 'marginTop'), 10); let topNavHeight = React.findDOMNode(this.refs.topNav).offsetHeight; >>>>>>> let elem = ReactDOM.findDOMNode(this.refs.sideNav); let sideNavOffsetTop = getOffset(elem).top; let sideNavMarginTop = parseInt(css(elem.firstChild, 'marginTop'), 10); let topNavHeight = ReactDOM.findDOMNode(this.refs.topNav).offsetHeight;
<<<<<<< <PanelGroup bsStyle="default" id="panel"> <Panel><Panel.Body>Panel 1</Panel.Body></Panel> </PanelGroup> ======= <PanelGroup bsStyle="default"> <Panel>Panel 1</Panel> </PanelGroup>, >>>>>>> <PanelGroup bsStyle="default" id="panel"> <Panel><Panel.Body>Panel 1</Panel.Body></Panel> </PanelGroup>, <<<<<<< <PanelGroup bsStyle="default" id="panel"> <Panel bsStyle="primary"> <Panel.Body>Panel 1</Panel.Body> </Panel> </PanelGroup> ======= <PanelGroup bsStyle="default"> <Panel bsStyle="primary">Panel 1</Panel> </PanelGroup>, >>>>>>> <PanelGroup bsStyle="default" id="panel"> <Panel bsStyle="primary"> <Panel.Body>Panel 1</Panel.Body> </Panel> </PanelGroup>, <<<<<<< </PanelGroup> ) .render() .single('input.changeme') .trigger('select'); ======= </PanelGroup>, ); let panel = ReactTestUtils.findRenderedComponentWithType(instance, Panel); assert.notOk(panel.state.collapsing); ReactTestUtils.Simulate.select( ReactTestUtils.findRenderedDOMComponentWithClass(panel, 'changeme'), ); assert.notOk(panel.state.collapsing); >>>>>>> </PanelGroup>, ) .assertSingle('input.changeme') .simulate('select'); <<<<<<< </PanelGroup> ) .render() .find('a') .trigger('click'); ======= </PanelGroup>, ); let panel = ReactTestUtils.findRenderedComponentWithType(instance, Panel); assert.notOk(panel.state.expanded); ReactTestUtils.Simulate.click( ReactTestUtils.findRenderedDOMComponentWithClass(panel, 'ignoreme'), ); assert.notOk(panel.state.expanded); ReactTestUtils.Simulate.click( ReactTestUtils.findRenderedDOMComponentWithClass(panel, 'clickme'), ); assert.ok(panel.state.expanded); >>>>>>> </PanelGroup>, ) .find('a') .simulate('click'); <<<<<<< let panelBodies, panelGroup, headers, links; ======= let instance, panelBodies, panelGroup, links; >>>>>>> let panelBodies, panelGroup, headers, links; // eslint-disable-line <<<<<<< const inst = tsp( <PanelGroup accordion defaultActiveKey="1" id="panel"> <Panel eventKey="1"> <Panel.Heading> <Panel.Title toggle>foo</Panel.Title> </Panel.Heading> <Panel.Body collapsible>Panel 1</Panel.Body> </Panel> <Panel eventKey="2"> <Panel.Heading> <Panel.Title toggle>foo</Panel.Title> </Panel.Heading> <Panel.Body collapsible>Panel 2</Panel.Body> </Panel> </PanelGroup> ) .render(); panelGroup = inst.dom(); panelBodies = inst.find('.panel-collapse').dom(); headers = inst.find('.panel-heading').dom(); links = inst.find('.panel-heading a').dom(); ======= instance = ReactTestUtils.renderIntoDocument( <PanelGroup defaultActiveKey="1" accordion> <Panel header="Collapsible Group Item #1" eventKey="1" id="Panel1ID">Panel 1</Panel> <Panel header="Collapsible Group Item #2" eventKey="2" id="Panel2ID">Panel 2</Panel> </PanelGroup>, ); let accordion = ReactTestUtils.findRenderedComponentWithType(instance, PanelGroup); panelGroup = ReactTestUtils.findRenderedDOMComponentWithClass(accordion, 'panel-group'); panelBodies = panelGroup.getElementsByClassName('panel-collapse'); links = Array.from(panelGroup.getElementsByClassName('panel-heading')) .map(header => getOne(header.getElementsByTagName('a'))); >>>>>>> const inst = mount( <PanelGroup accordion defaultActiveKey="1" id="panel"> <Panel eventKey="1"> <Panel.Heading> <Panel.Title toggle>foo</Panel.Title> </Panel.Heading> <Panel.Body collapsible>Panel 1</Panel.Body> </Panel> <Panel eventKey="2"> <Panel.Heading> <Panel.Title toggle>foo</Panel.Title> </Panel.Heading> <Panel.Body collapsible>Panel 2</Panel.Body> </Panel> </PanelGroup>, ); panelGroup = inst.getDOMNode(); panelBodies = inst.find('.panel-collapse').map(n => n.getDOMNode()); headers = inst.find('.panel-heading').map(n => n.getDOMNode()); links = inst.find('.panel-heading a').map(n => n.getDOMNode());
<<<<<<< ButtonGroupJustified: require('fs').readFileSync(__dirname + '/../examples/ButtonGroupJustified.js', 'utf8'), ButtonGroupBlock: require('fs').readFileSync(__dirname + '/../examples/ButtonGroupBlock.js', 'utf8'), CustomButtonStyle: require('fs').readFileSync(__dirname + '/../examples/CustomButtonStyle.js', 'utf8'), ======= ButtonLoading: require('fs').readFileSync(__dirname + '/../examples/ButtonLoading.js', 'utf8'), ButtonSizes: require('fs').readFileSync(__dirname + '/../examples/ButtonSizes.js', 'utf8'), ButtonTagTypes: require('fs').readFileSync(__dirname + '/../examples/ButtonTagTypes.js', 'utf8'), ButtonToolbarBasic: require('fs').readFileSync(__dirname + '/../examples/ButtonToolbarBasic.js', 'utf8'), ButtonTypes: require('fs').readFileSync(__dirname + '/../examples/ButtonTypes.js', 'utf8'), CarouselControlled: require('fs').readFileSync(__dirname + '/../examples/CarouselControlled.js', 'utf8'), CarouselUncontrolled: require('fs').readFileSync(__dirname + '/../examples/CarouselUncontrolled.js', 'utf8'), Collapse: require('fs').readFileSync(__dirname + '/../examples/Collapse.js', 'utf8'), >>>>>>> ButtonLoading: require('fs').readFileSync(__dirname + '/../examples/ButtonLoading.js', 'utf8'), ButtonSizes: require('fs').readFileSync(__dirname + '/../examples/ButtonSizes.js', 'utf8'), ButtonTagTypes: require('fs').readFileSync(__dirname + '/../examples/ButtonTagTypes.js', 'utf8'), ButtonToolbarBasic: require('fs').readFileSync(__dirname + '/../examples/ButtonToolbarBasic.js', 'utf8'), ButtonTypes: require('fs').readFileSync(__dirname + '/../examples/ButtonTypes.js', 'utf8'), CarouselControlled: require('fs').readFileSync(__dirname + '/../examples/CarouselControlled.js', 'utf8'), CarouselUncontrolled: require('fs').readFileSync(__dirname + '/../examples/CarouselUncontrolled.js', 'utf8'), Collapse: require('fs').readFileSync(__dirname + '/../examples/Collapse.js', 'utf8'), CustomButtonStyle: require('fs').readFileSync(__dirname + '/../examples/CustomButtonStyle.js', 'utf8'),
<<<<<<< it('forwards provided href', function() { ======= it('forwards arbitrary props to the anchor', () => { const instance = ReactTestUtils.renderIntoDocument(<SafeAnchor herpa='derpa' />); const anchor = ReactTestUtils.findRenderedDOMComponentWithTag(instance, 'A'); anchor.props.herpa.should.equal('derpa'); }); it('forwards provided href', () => { >>>>>>> it('forwards provided href', () => {
<<<<<<< import ReactDOM from 'react-dom'; ======= import React from 'react'; import canUseDom from 'dom-helpers/util/inDOM'; >>>>>>> import ReactDOM from 'react-dom'; import canUseDom from 'dom-helpers/util/inDOM'; <<<<<<< let elem = ReactDOM.findDOMNode(componentOrElement); return (elem && elem.ownerDocument) || document; ======= let elem = React.findDOMNode(componentOrElement); return getOwnerDocument((elem && elem.ownerDocument) || document); >>>>>>> let elem = ReactDOM.findDOMNode(componentOrElement); return getOwnerDocument((elem && elem.ownerDocument) || document);
<<<<<<< const normalize = require('./lib/sig-util').normalize const BN = ethUtil.BN ======= const createId = require('./lib/random-id') const normalizeAddress = require('./lib/sig-util').normalize const messageManager = require('./lib/message-manager') function noop () {} >>>>>>> const normalizeAddress = require('./lib/sig-util').normalize function noop () {} <<<<<<< module.exports = class KeyringController extends EventEmitter { ======= class KeyringController extends EventEmitter { >>>>>>> class KeyringController extends EventEmitter { <<<<<<< selectedAccount: address, shapeShiftTxList: this.configManager.getShapeShiftTxList(), ======= >>>>>>> <<<<<<< signMessage (msgParams) { const address = normalize(msgParams.from) return this.getKeyringForAccount(address) .then((keyring) => { return keyring.signMessage(address, msgParams.data) }) ======= signMessage (msgParams, cb) { try { const msgId = msgParams.metamaskId delete msgParams.metamaskId const approvalCb = this._unconfMsgCbs[msgId] || noop const address = normalizeAddress(msgParams.from) return this.getKeyringForAccount(address) .then((keyring) => { return keyring.signMessage(address, msgParams.data) }).then((rawSig) => { cb(null, rawSig) approvalCb(null, true) messageManager.confirmMsg(msgId) return rawSig }) } catch (e) { cb(e) } >>>>>>> signMessage (msgParams) { const address = normalize(msgParams.from) return this.getKeyringForAccount(address) .then((keyring) => { return keyring.signMessage(address, msgParams.data) }) <<<<<<< } ======= } module.exports = KeyringController >>>>>>> } module.exports = KeyringController
<<<<<<< h('.sender-to-recipient__recipient', [ h('i.fa.fa-file-text-o'), h('.sender-to-recipient__name.sender-to-recipient__recipient-name', this.props.t('newContract')), ]), ======= this.renderRecipient(), >>>>>>> this.renderRecipient(), <<<<<<< localeMessages: PropTypes.object, ======= recipientName: PropTypes.string, recipientAddress: PropTypes.string, >>>>>>> localeMessages: PropTypes.object, recipientName: PropTypes.string, recipientAddress: PropTypes.string,
<<<<<<< await this.balancesController.updateAllBalances() ======= await this.txController.pendingTxTracker.updatePendingTxs() >>>>>>> await this.balancesController.updateAllBalances() await this.txController.pendingTxTracker.updatePendingTxs()
<<<<<<< this.keyringController.getState(), this.txManager.getState() ======= this.keyringController.getState(), this.noticeController.getState() >>>>>>> this.keyringController.getState(), this.txManager.getState() this.noticeController.getState() <<<<<<< const txManager = this.txManager ======= const noticeController = this.noticeController >>>>>>> const txManager = this.txManager const noticeController = this.noticeController
<<<<<<< }, this.props.t('cancel')), h('button.request-signature__footer__sign-button', { ======= }, t('cancel')), h('button.btn-primary--lg', { >>>>>>> }, this.props.t('cancel')), h('button.btn-primary--lg', {
<<<<<<< this.identities = {} // Essentially a name hash ======= this._unconfMsgCbs = {} >>>>>>> this.identities = {} // Essentially a name hash <<<<<<< return Promise.all(this.keyrings.map(this.displayForKeyring)) .then((displayKeyrings) => { const state = this.store.getState() // old wallet const wallet = this.configManager.getWallet() return { // computed isInitialized: (!!wallet || !!state.vault), isUnlocked: (!!this.password), keyrings: displayKeyrings, // hard coded keyringTypes: this.keyringTypes.map(krt => krt.type), // memStore identities: this.identities, // configManager seedWords: this.configManager.getSeedWords(), isDisclaimerConfirmed: this.configManager.getConfirmedDisclaimer(), currentFiat: this.configManager.getCurrentFiat(), conversionRate: this.configManager.getConversionRate(), conversionDate: this.configManager.getConversionDate(), } }) ======= // old wallet const memState = this.memStore.getState() const result = { // computed isUnlocked: (!!this.password), // memStore keyringTypes: memState.keyringTypes, identities: memState.identities, keyrings: memState.keyrings, // messageManager unconfMsgs: messageManager.unconfirmedMsgs(), messages: messageManager.getMsgList(), // configManager seedWords: this.configManager.getSeedWords(), isDisclaimerConfirmed: this.configManager.getConfirmedDisclaimer(), } return result >>>>>>> // old wallet const memState = this.memStore.getState() const result = { // computed isUnlocked: (!!this.password), // memStore keyringTypes: memState.keyringTypes, identities: memState.identities, keyrings: memState.keyrings, // configManager seedWords: this.configManager.getSeedWords(), isDisclaimerConfirmed: this.configManager.getConfirmedDisclaimer(), } return result
<<<<<<< const connect = require('../../metamask-connect') const { compose } = require('recompose') const { withRouter } = require('react-router-dom') ======= const PropTypes = require('prop-types') const connect = require('react-redux').connect >>>>>>> const connect = require('react-redux').connect const { compose } = require('recompose') const { withRouter } = require('react-router-dom') const PropTypes = require('prop-types') <<<<<<< const { SETTINGS_ROUTE, INFO_ROUTE, NEW_ACCOUNT_ROUTE, IMPORT_ACCOUNT_ROUTE, DEFAULT_ROUTE, } = require('../../routes') module.exports = compose( withRouter, connect(mapStateToProps, mapDispatchToProps) )(AccountMenu) ======= AccountMenu.contextTypes = { t: PropTypes.func, } module.exports = connect(mapStateToProps, mapDispatchToProps)(AccountMenu) >>>>>>> const { SETTINGS_ROUTE, INFO_ROUTE, NEW_ACCOUNT_ROUTE, IMPORT_ACCOUNT_ROUTE, DEFAULT_ROUTE, } = require('../../routes') module.exports = compose( withRouter, connect(mapStateToProps, mapDispatchToProps) )(AccountMenu) AccountMenu.contextTypes = { t: PropTypes.func, } <<<<<<< onClick: () => { lockMetamask() history.push(DEFAULT_ROUTE) }, }, this.props.t('logout')), ======= onClick: lockMetamask, }, this.context.t('logout')), >>>>>>> onClick: () => { lockMetamask() history.push(DEFAULT_ROUTE) }, }, this.context.t('logout')),
<<<<<<< function closePopupIfOpen (windowType) { if (windowType !== 'notification') { notificationManager.closePopup() } } function displayCriticalError (err) { container.innerHTML = '<div class="critical-error">The MetaMask app failed to load: please open and close MetaMask again to restart.</div>' container.style.height = '80px' log.error(err.stack) throw err ======= function closePopupIfOpen (windowType) { if (windowType !== 'notification') { // should close only chrome popup notificationManager.closePopup() >>>>>>> function closePopupIfOpen (windowType) { if (windowType !== 'notification') { // should close only chrome popup notificationManager.closePopup() } } function displayCriticalError (err) { container.innerHTML = '<div class="critical-error">The MetaMask app failed to load: please open and close MetaMask again to restart.</div>' container.style.height = '80px' log.error(err.stack) throw err
<<<<<<< ======= checkBrowserForConsoleErrors, verboseReportOnFailure, >>>>>>> <<<<<<< let extensionUri let tokenAddress ======= >>>>>>> let extensionUri
<<<<<<< isAccountMenuOpen: false, ======= isMascara: window.platform instanceof MetamascaraPlatform, >>>>>>> isAccountMenuOpen: false, isMascara: window.platform instanceof MetamascaraPlatform, <<<<<<< selectedTokenAddress: null, tokenExchangeRates: {}, tokens: [], send: { gasLimit: null, gasPrice: null, gasTotal: null, from: '', to: '', amount: '0x0', memo: '', errors: {}, }, ======= tokenExchangeRates: {}, coinOptions: {}, >>>>>>> selectedTokenAddress: null, tokenExchangeRates: {}, tokens: [], send: { gasLimit: null, gasPrice: null, gasTotal: null, from: '', to: '', amount: '0x0', memo: '', errors: {}, }, coinOptions: {}, <<<<<<< case actions.UPDATE_TOKEN_EXCHANGE_RATE: const { payload: { pair, marketinfo } } = action return extend(metamaskState, { tokenExchangeRates: { ...metamaskState.tokenExchangeRates, [pair]: marketinfo, }, }) case actions.UPDATE_TOKENS: return extend(metamaskState, { tokens: action.newTokens, }) // metamask.send case actions.UPDATE_GAS_LIMIT: return extend(metamaskState, { send: { ...metamaskState.send, gasLimit: action.value, }, }) case actions.UPDATE_GAS_PRICE: return extend(metamaskState, { send: { ...metamaskState.send, gasPrice: action.value, }, }) case actions.TOGGLE_ACCOUNT_MENU: return extend(metamaskState, { isAccountMenuOpen: !metamaskState.isAccountMenuOpen, }) case actions.UPDATE_GAS_TOTAL: return extend(metamaskState, { send: { ...metamaskState.send, gasTotal: action.value, }, }) case actions.UPDATE_SEND_FROM: return extend(metamaskState, { send: { ...metamaskState.send, from: action.value, }, }) case actions.UPDATE_SEND_TO: return extend(metamaskState, { send: { ...metamaskState.send, to: action.value, }, }) case actions.UPDATE_SEND_AMOUNT: return extend(metamaskState, { send: { ...metamaskState.send, amount: action.value, }, }) case actions.UPDATE_SEND_MEMO: return extend(metamaskState, { send: { ...metamaskState.send, memo: action.value, }, }) case actions.UPDATE_SEND_ERRORS: return extend(metamaskState, { send: { ...metamaskState.send, errors: { ...metamaskState.send.errors, ...action.value, } }, }) case actions.CLEAR_SEND: return extend(metamaskState, { send: { gasLimit: null, gasPrice: null, gasTotal: null, from: '', to: '', amount: '0x0', memo: '', errors: {}, }, }) ======= case actions.PAIR_UPDATE: const { value: { marketinfo: pairMarketInfo } } = action return extend(metamaskState, { tokenExchangeRates: { ...metamaskState.tokenExchangeRates, [pairMarketInfo.pair]: pairMarketInfo, }, }) case actions.SHAPESHIFT_SUBVIEW: const { value: { marketinfo, coinOptions } } = action return extend(metamaskState, { tokenExchangeRates: { ...metamaskState.tokenExchangeRates, [marketinfo.pair]: marketinfo, }, coinOptions, }) >>>>>>> case actions.UPDATE_TOKEN_EXCHANGE_RATE: const { payload: { pair, marketinfo } } = action return extend(metamaskState, { tokenExchangeRates: { ...metamaskState.tokenExchangeRates, [pair]: marketinfo, }, }) case actions.UPDATE_TOKENS: return extend(metamaskState, { tokens: action.newTokens, }) // metamask.send case actions.UPDATE_GAS_LIMIT: return extend(metamaskState, { send: { ...metamaskState.send, gasLimit: action.value, }, }) case actions.UPDATE_GAS_PRICE: return extend(metamaskState, { send: { ...metamaskState.send, gasPrice: action.value, }, }) case actions.TOGGLE_ACCOUNT_MENU: return extend(metamaskState, { isAccountMenuOpen: !metamaskState.isAccountMenuOpen, }) case actions.UPDATE_GAS_TOTAL: return extend(metamaskState, { send: { ...metamaskState.send, gasTotal: action.value, }, }) case actions.UPDATE_SEND_FROM: return extend(metamaskState, { send: { ...metamaskState.send, from: action.value, }, }) case actions.UPDATE_SEND_TO: return extend(metamaskState, { send: { ...metamaskState.send, to: action.value, }, }) case actions.UPDATE_SEND_AMOUNT: return extend(metamaskState, { send: { ...metamaskState.send, amount: action.value, }, }) case actions.UPDATE_SEND_MEMO: return extend(metamaskState, { send: { ...metamaskState.send, memo: action.value, }, }) case actions.UPDATE_SEND_ERRORS: return extend(metamaskState, { send: { ...metamaskState.send, errors: { ...metamaskState.send.errors, ...action.value, } }, }) case actions.CLEAR_SEND: return extend(metamaskState, { send: { gasLimit: null, gasPrice: null, gasTotal: null, from: '', to: '', amount: '0x0', memo: '', errors: {}, }, }) case actions.PAIR_UPDATE: const { value: { marketinfo: pairMarketInfo } } = action return extend(metamaskState, { tokenExchangeRates: { ...metamaskState.tokenExchangeRates, [pairMarketInfo.pair]: pairMarketInfo, }, }) case actions.SHAPESHIFT_SUBVIEW: const { value: { marketinfo: ssMarketInfo, coinOptions } } = action return extend(metamaskState, { tokenExchangeRates: { ...metamaskState.tokenExchangeRates, [marketinfo.pair]: ssMarketInfo, }, coinOptions, })
<<<<<<< ======= const gasLimit = new BN(parseInt(blockGasLimit)) const safeGasLimitBN = this.bnMultiplyByFraction(gasLimit, 19, 20) const saferGasLimitBN = this.bnMultiplyByFraction(gasLimit, 18, 20) const safeGasLimit = safeGasLimitBN.toString(10) >>>>>>> // From latest master // const gasLimit = new BN(parseInt(blockGasLimit)) // const safeGasLimitBN = this.bnMultiplyByFraction(gasLimit, 19, 20) // const saferGasLimitBN = this.bnMultiplyByFraction(gasLimit, 18, 20) // const safeGasLimit = safeGasLimitBN.toString(10) <<<<<<< return { USD, ETH, } } PendingTx.prototype.getData = function () { const { identities } = this.props const txMeta = this.gatherTxMeta() const txParams = txMeta.txParams || {} const decodedData = txParams.data && abiDecoder.decodeMethod(txParams.data) const { name, params = [] } = decodedData || {} const { type, value } = params[0] || {} const { USD: gasFeeInUSD, ETH: gasFeeInETH } = this.getGasFee() const { USD: totalInUSD, ETH: totalInETH } = this.getTotal() if (name === 'transfer' && type === 'address') { return { from: { address: txParams.from, name: identities[txParams.from].name, }, to: { address: value, name: identities[value] ? identities[value].name : 'New Recipient', }, memo: txParams.memo || '', gasFeeInUSD, gasFeeInETH, totalInUSD, totalInETH, } } else { return { from: { address: txParams.from, name: identities[txParams.from].name, }, to: { address: txParams.to, name: identities[txParams.to] ? identities[txParams.to].name : 'New Recipient', }, memo: txParams.memo || '', gasFeeInUSD, gasFeeInETH, totalInUSD, totalInETH, } } } PendingTx.prototype.render = function () { const { backToAccountDetail, selectedAddress } = this.props const txMeta = this.gatherTxMeta() const txParams = txMeta.txParams || {} // recipient check // const isValidAddress = !txParams.to || util.isValidAddress(txParams.to) const { from: { address: fromAddress, name: fromName, }, to: { address: toAddress, name: toName, }, memo, gasFeeInUSD, gasFeeInETH, totalInUSD, totalInETH, } = this.getData() // This is from the latest master // It handles some of the errors that we are not currently handling // Leaving as comments fo reference // const balanceBn = hexToBn(balance) // const insufficientBalance = balanceBn.lt(maxCost) // const buyDisabled = insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting // const showRejectAll = props.unconfTxListLength > 1 ======= const balanceBn = hexToBn(balance) const insufficientBalance = balanceBn.lt(maxCost) const dangerousGasLimit = gasBn.gte(saferGasLimitBN) const gasLimitSpecified = txMeta.gasLimitSpecified const buyDisabled = insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting const showRejectAll = props.unconfTxListLength > 1 >>>>>>> return { USD, ETH, } } PendingTx.prototype.getData = function () { const { identities } = this.props const txMeta = this.gatherTxMeta() const txParams = txMeta.txParams || {} const decodedData = txParams.data && abiDecoder.decodeMethod(txParams.data) const { name, params = [] } = decodedData || {} const { type, value } = params[0] || {} const { USD: gasFeeInUSD, ETH: gasFeeInETH } = this.getGasFee() const { USD: totalInUSD, ETH: totalInETH } = this.getTotal() if (name === 'transfer' && type === 'address') { return { from: { address: txParams.from, name: identities[txParams.from].name, }, to: { address: value, name: identities[value] ? identities[value].name : 'New Recipient', }, memo: txParams.memo || '', gasFeeInUSD, gasFeeInETH, totalInUSD, totalInETH, } } else { return { from: { address: txParams.from, name: identities[txParams.from].name, }, to: { address: txParams.to, name: identities[txParams.to] ? identities[txParams.to].name : 'New Recipient', }, memo: txParams.memo || '', gasFeeInUSD, gasFeeInETH, totalInUSD, totalInETH, } } } PendingTx.prototype.render = function () { const { backToAccountDetail, selectedAddress } = this.props const txMeta = this.gatherTxMeta() const txParams = txMeta.txParams || {} // recipient check // const isValidAddress = !txParams.to || util.isValidAddress(txParams.to) const { from: { address: fromAddress, name: fromName, }, to: { address: toAddress, name: toName, }, memo, gasFeeInUSD, gasFeeInETH, totalInUSD, totalInETH, } = this.getData() // This is from the latest master // It handles some of the errors that we are not currently handling // Leaving as comments fo reference // const balanceBn = hexToBn(balance) // const insufficientBalance = balanceBn.lt(maxCost) // const buyDisabled = insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting // const showRejectAll = props.unconfTxListLength > 1 // const dangerousGasLimit = gasBn.gte(saferGasLimitBN) // const gasLimitSpecified = txMeta.gasLimitSpecified <<<<<<< // These are latest errors handling from master // Leaving as comments as reference when we start implementing error handling // h('style', ` // .conf-buttons button { // margin-left: 10px; // text-transform: uppercase; // } // `), // txMeta.simulationFails ? // h('.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Transaction Error. Exception thrown in contract code.') // : null, // !isValidAddress ? // h('.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Recipient address is invalid. Sending this transaction will result in a loss of ETH.') // : null, // insufficientBalance ? // h('span.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Insufficient balance for transaction') // : null, // // send + cancel // h('.flex-row.flex-space-around.conf-buttons', { // style: { // display: 'flex', // justifyContent: 'flex-end', // margin: '14px 25px', // }, // }, [ // h('button', { // onClick: (event) => { // this.resetGasFields() // event.preventDefault() // }, // }, 'Reset'), // // Accept Button or Buy Button // insufficientBalance ? h('button.btn-green', { onClick: props.buyEth }, 'Buy Ether') : // h('input.confirm.btn-green', { // type: 'submit', // value: 'SUBMIT', // style: { marginLeft: '10px' }, // disabled: buyDisabled, // }), // h('button.cancel.btn-red', { // onClick: props.cancelTransaction, // }, 'Reject'), // ]), // showRejectAll ? h('.flex-row.flex-space-around.conf-buttons', { // style: { // display: 'flex', // justifyContent: 'flex-end', // margin: '14px 25px', // }, // }, [ // h('button.cancel.btn-red', { // onClick: props.cancelAllTransactions, // }, 'Reject All'), // ]) : null, // ]), // ]) // ) // } ======= h('style', ` .conf-buttons button { margin-left: 10px; text-transform: uppercase; } `), h('.cell.row', { style: { textAlign: 'center', }, }, [ txMeta.simulationFails ? h('.error', { style: { fontSize: '0.9em', }, }, 'Transaction Error. Exception thrown in contract code.') : null, !isValidAddress ? h('.error', { style: { fontSize: '0.9em', }, }, 'Recipient address is invalid. Sending this transaction will result in a loss of ETH.') : null, insufficientBalance ? h('span.error', { style: { fontSize: '0.9em', }, }, 'Insufficient balance for transaction') : null, (dangerousGasLimit && !gasLimitSpecified) ? h('span.error', { style: { fontSize: '0.9em', }, }, 'Gas limit set dangerously high. Approving this transaction is likely to fail.') : null, ]), // send + cancel h('.flex-row.flex-space-around.conf-buttons', { style: { display: 'flex', justifyContent: 'flex-end', margin: '14px 25px', }, }, [ h('button', { onClick: (event) => { this.resetGasFields() event.preventDefault() }, }, 'Reset'), // Accept Button or Buy Button insufficientBalance ? h('button.btn-green', { onClick: props.buyEth }, 'Buy Ether') : h('input.confirm.btn-green', { type: 'submit', value: 'SUBMIT', style: { marginLeft: '10px' }, disabled: buyDisabled, }), h('button.cancel.btn-red', { onClick: props.cancelTransaction, }, 'Reject'), ]), showRejectAll ? h('.flex-row.flex-space-around.conf-buttons', { style: { display: 'flex', justifyContent: 'flex-end', margin: '14px 25px', }, }, [ h('button.cancel.btn-red', { onClick: props.cancelAllTransactions, }, 'Reject All'), ]) : null, >>>>>>> // These are latest errors handling from master // Leaving as comments as reference when we start implementing error handling // h('style', ` // .conf-buttons button { // margin-left: 10px; // text-transform: uppercase; // } // `), // txMeta.simulationFails ? // h('.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Transaction Error. Exception thrown in contract code.') // : null, // !isValidAddress ? // h('.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Recipient address is invalid. Sending this transaction will result in a loss of ETH.') // : null, // insufficientBalance ? // h('span.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Insufficient balance for transaction') // : null, // // send + cancel // h('.flex-row.flex-space-around.conf-buttons', { // style: { // display: 'flex', // justifyContent: 'flex-end', // margin: '14px 25px', // }, // }, [ // h('button', { // onClick: (event) => { // this.resetGasFields() // event.preventDefault() // }, // }, 'Reset'), // // Accept Button or Buy Button // insufficientBalance ? h('button.btn-green', { onClick: props.buyEth }, 'Buy Ether') : // h('input.confirm.btn-green', { // type: 'submit', // value: 'SUBMIT', // style: { marginLeft: '10px' }, // disabled: buyDisabled, // }), // h('button.cancel.btn-red', { // onClick: props.cancelTransaction, // }, 'Reject'), // ]), // showRejectAll ? h('.flex-row.flex-space-around.conf-buttons', { // style: { // display: 'flex', // justifyContent: 'flex-end', // margin: '14px 25px', // }, // }, [ // h('button.cancel.btn-red', { // onClick: props.cancelAllTransactions, // }, 'Reject All'), // ]) : null, // ]), // ]) // ) // }
<<<<<<< const t = require('../i18n') ======= const { OLD_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums const environmentType = require('../../app/scripts/lib/environment-type') >>>>>>> const t = require('../i18n') const { OLD_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums const environmentType = require('../../app/scripts/lib/environment-type')
<<<<<<< const { withRouter } = require('react-router-dom') const { compose } = require('recompose') const { CONFIRM_TRANSACTION_ROUTE } = require('../routes') ======= const t = require('../../i18n') >>>>>>> const { withRouter } = require('react-router-dom') const { compose } = require('recompose') const { CONFIRM_TRANSACTION_ROUTE } = require('../routes') const t = require('../../i18n') <<<<<<< opts.onClick = () => history.push(CONFIRM_TRANSACTION_ROUTE) opts.transactionStatus = 'Not Started' ======= opts.onClick = () => showConfTxPage({id: transactionId}) opts.transactionStatus = t('Not Started') >>>>>>> opts.onClick = () => history.push(CONFIRM_TRANSACTION_ROUTE) opts.transactionStatus = t('Not Started')
<<<<<<< formatDate, bnMultiplyByFraction, getTxFeeBn, shortenBalance, getContractAtAddress, ======= exportAsFile: exportAsFile, >>>>>>> formatDate, bnMultiplyByFraction, getTxFeeBn, shortenBalance, getContractAtAddress, exportAsFile: exportAsFile, <<<<<<< } function bnMultiplyByFraction (targetBN, numerator, denominator) { const numBN = new ethUtil.BN(numerator) const denomBN = new ethUtil.BN(denominator) return targetBN.mul(numBN).div(denomBN) } function getTxFeeBn (gas, gasPrice = MIN_GAS_PRICE_BN.toString(16), blockGasLimit) { const gasBn = hexToBn(gas) const gasPriceBn = hexToBn(gasPrice) const txFeeBn = gasBn.mul(gasPriceBn) return txFeeBn.toString(16) } function getContractAtAddress (tokenAddress) { return global.eth.contract(abi).at(tokenAddress) ======= } function exportAsFile (filename, data) { // source: https://stackoverflow.com/a/33542499 by Ludovic Feltz const blob = new Blob([data], {type: 'text/csv'}) if (window.navigator.msSaveOrOpenBlob) { window.navigator.msSaveBlob(blob, filename) } else { const elem = window.document.createElement('a') elem.href = window.URL.createObjectURL(blob) elem.download = filename document.body.appendChild(elem) elem.click() document.body.removeChild(elem) } >>>>>>> } function bnMultiplyByFraction (targetBN, numerator, denominator) { const numBN = new ethUtil.BN(numerator) const denomBN = new ethUtil.BN(denominator) return targetBN.mul(numBN).div(denomBN) } function getTxFeeBn (gas, gasPrice = MIN_GAS_PRICE_BN.toString(16), blockGasLimit) { const gasBn = hexToBn(gas) const gasPriceBn = hexToBn(gasPrice) const txFeeBn = gasBn.mul(gasPriceBn) return txFeeBn.toString(16) } function getContractAtAddress (tokenAddress) { return global.eth.contract(abi).at(tokenAddress) } function exportAsFile (filename, data) { // source: https://stackoverflow.com/a/33542499 by Ludovic Feltz const blob = new Blob([data], {type: 'text/csv'}) if (window.navigator.msSaveOrOpenBlob) { window.navigator.msSaveBlob(blob, filename) } else { const elem = window.document.createElement('a') elem.href = window.URL.createObjectURL(blob) elem.download = filename document.body.appendChild(elem) elem.click() document.body.removeChild(elem) }
<<<<<<< ======= } App.prototype.render = function () { var props = this.props const { isLoading, loadingMessage, network, isMouseUser, setMouseUserState, } = props const isLoadingNetwork = network === 'loading' && props.currentView.name !== 'config' const loadMessage = loadingMessage || isLoadingNetwork ? this.getConnectingLabel() : null log.debug('Main ui render function') return ( h('.flex-column.full-height', { className: classnames({ 'mouse-user-styles': isMouseUser }), style: { overflowX: 'hidden', position: 'relative', alignItems: 'center', }, tabIndex: '0', onClick: () => setMouseUserState(true), onKeyDown: (e) => { if (e.keyCode === 9) { setMouseUserState(false) } }, }, [ >>>>>>> <<<<<<< // h(BuyOptions, {}, []), ]) ======= // A second instance of Walletview is used for non-mobile viewports this.props.sidebarOpen ? h(WalletView, { responsiveDisplayClassname: '.sidebar', style: {}, }) : undefined, ]), // overlay // TODO: add onClick for overlay to close sidebar this.props.sidebarOpen ? h('div.sidebar-overlay', { style: {}, onClick: () => { this.props.hideSidebar() }, }, []) : undefined, ]) } App.prototype.renderAppBar = function () { const { isUnlocked, network, provider, networkDropdownOpen, showNetworkDropdown, hideNetworkDropdown, currentView, isInitialized, betaUI, isPopup, welcomeScreenSeen, } = this.props if (window.METAMASK_UI_TYPE === 'notification') { return null >>>>>>> // h(BuyOptions, {}, []), ]) <<<<<<< ======= ]), !isInitialized && !isPopup && betaUI && h('.alpha-warning__container', {}, [ h('h2', { className: classnames({ 'alpha-warning': welcomeScreenSeen, 'alpha-warning-welcome-screen': !welcomeScreenSeen, }), }, 'Please be aware that this version is still under development'), ]), ]) ) } >>>>>>> !isInitialized && !isPopup && betaUI && h('.alpha-warning__container', {}, [ h('h2', { className: classnames({ 'alpha-warning': welcomeScreenSeen, 'alpha-warning-welcome-screen': !welcomeScreenSeen, }), }, 'Please be aware that this version is still under development'), ]), <<<<<<< return { // state from plugin networkDropdownOpen, sidebarOpen, isLoading, loadingMessage, noActiveNotices, isInitialized, isUnlocked: state.metamask.isUnlocked, selectedAddress: state.metamask.selectedAddress, currentView: state.appState.currentView, activeAddress: state.appState.activeAddress, transForward: state.appState.transForward, isMascara: state.metamask.isMascara, isOnboarding: Boolean(!noActiveNotices || seedWords || !isInitialized), seedWords: state.metamask.seedWords, unapprovedTxs, unapprovedMsgCount, unapprovedPersonalMsgCount, unapprovedTypedMessagesCount, menuOpen: state.appState.menuOpen, network: state.metamask.network, provider: state.metamask.provider, forgottenPassword: state.appState.forgottenPassword, lastUnreadNotice, lostAccounts, frequentRpcList: state.metamask.frequentRpcList || [], currentCurrency: state.metamask.currentCurrency, ======= case 'qr': log.debug('rendering show qr screen') return h('div', { style: { position: 'absolute', height: '100%', top: '0px', left: '0px', }, }, [ h('i.fa.fa-arrow-left.fa-lg.cursor-pointer.color-orange', { onClick: () => props.dispatch(actions.backToAccountDetail(props.activeAddress)), style: { marginLeft: '10px', marginTop: '50px', }, }), h('div', { style: { position: 'absolute', left: '44px', width: '285px', }, }, [ h(QrView, {key: 'qr', Qr}), ]), ]) >>>>>>> return { // state from plugin networkDropdownOpen, sidebarOpen, isLoading, loadingMessage, noActiveNotices, isInitialized, isUnlocked: state.metamask.isUnlocked, selectedAddress: state.metamask.selectedAddress, currentView: state.appState.currentView, activeAddress: state.appState.activeAddress, transForward: state.appState.transForward, isMascara: state.metamask.isMascara, isOnboarding: Boolean(!noActiveNotices || seedWords || !isInitialized), isPopup: state.metamask.isPopup, seedWords: state.metamask.seedWords, unapprovedTxs, unapprovedMsgs: state.metamask.unapprovedMsgs, unapprovedMsgCount, unapprovedPersonalMsgCount, unapprovedTypedMessagesCount, menuOpen: state.appState.menuOpen, network: state.metamask.network, provider: state.metamask.provider, forgottenPassword: state.appState.forgottenPassword, lastUnreadNotice, lostAccounts, frequentRpcList: state.metamask.frequentRpcList || [], currentCurrency: state.metamask.currentCurrency, isMouseUser: state.appState.isMouseUser, betaUI: state.metamask.featureFlags.betaUI, isRevealingSeedWords: state.metamask.isRevealingSeedWords, Qr: state.appState.Qr, welcomeScreenSeen: state.metamask.welcomeScreenSeen,
<<<<<<< removeListeners, applyListeners, ======= getPlatform, >>>>>>> removeListeners, applyListeners, getPlatform,
<<<<<<< let clock, network, preferences, controller, keyringMemStore const sandbox = sinon.createSandbox() const noop = () => {} const networkControllerProviderConfig = { getAccounts: noop, } beforeEach(async () => { nock('https://api.infura.io') .get(/.*/) .reply(200) keyringMemStore = new ObservableStore({ isUnlocked: false}) network = new NetworkController() preferences = new PreferencesController() controller = new DetectTokensController({ preferences: preferences, network: network, keyringMemStore: keyringMemStore }) network.initializeProvider(networkControllerProviderConfig) }) after(() => { sandbox.restore() nock.cleanAll() ======= const sandbox = sinon.createSandbox() let clock, keyringMemStore, network, preferences beforeEach(async () => { keyringMemStore = new ObservableStore({ isUnlocked: false}) network = new NetworkController({ provider: { type: 'mainnet' }}) preferences = new PreferencesController({ network }) }) after(() => { sandbox.restore() >>>>>>> const sandbox = sinon.createSandbox() let clock, keyringMemStore, network, preferences, controller const noop = () => {} const networkControllerProviderConfig = { getAccounts: noop, } beforeEach(async () => { nock('https://api.infura.io') .get(/.*/) .reply(200) keyringMemStore = new ObservableStore({ isUnlocked: false}) network = new NetworkController() preferences = new PreferencesController({ network }) controller = new DetectTokensController({ preferences: preferences, network: network, keyringMemStore: keyringMemStore }) network.initializeProvider(networkControllerProviderConfig) }) after(() => { sandbox.restore() nock.cleanAll() <<<<<<< const network = new NetworkController() network.initializeProvider(networkControllerProviderConfig) ======= >>>>>>> const network = new NetworkController() network.initializeProvider(networkControllerProviderConfig) <<<<<<< ======= const controller = new DetectTokensController({ preferences: preferences, network: network, keyringMemStore: keyringMemStore }) >>>>>>> // const controller = new DetectTokensController({ preferences: preferences, network: network, keyringMemStore: keyringMemStore })
<<<<<<< const t = require('../../../i18n') const DIRECT_DEPOSIT_ROW_TITLE = t('directDepositEther') const DIRECT_DEPOSIT_ROW_TEXT = t('directDepositEtherExplainer') const COINBASE_ROW_TITLE = t('buyCoinbase') const COINBASE_ROW_TEXT = t('buyCoinbaseExplainer') const SHAPESHIFT_ROW_TITLE = t('depositShapeShift') const SHAPESHIFT_ROW_TEXT = t('depositShapeShiftExplainer') const FAUCET_ROW_TITLE = t('testFaucet') const facuetRowText = (networkName) => { return t('getEtherFromFaucet', [networkName]) } ======= const DIRECT_DEPOSIT_ROW_TITLE = 'Directly Deposit Ether' const DIRECT_DEPOSIT_ROW_TEXT = `If you already have some Ether, the quickest way to get Ether in your new wallet by direct deposit.` const COINBASE_ROW_TITLE = 'Buy on Coinbase' const COINBASE_ROW_TEXT = `Coinbase is the world’s most popular way to buy and sell bitcoin, ethereum, and litecoin.` const SHAPESHIFT_ROW_TITLE = 'Deposit with ShapeShift' const SHAPESHIFT_ROW_TEXT = `If you own other cryptocurrencies, you can trade and deposit Ether directly into your MetaMask wallet. No Account Needed.` const FAUCET_ROW_TITLE = 'Test Faucet' const faucetRowText = networkName => `Get Ether from a faucet for the ${networkName}` >>>>>>> const t = require('../../../i18n') const DIRECT_DEPOSIT_ROW_TITLE = t('directDepositEther') const DIRECT_DEPOSIT_ROW_TEXT = t('directDepositEtherExplainer') const COINBASE_ROW_TITLE = t('buyCoinbase') const COINBASE_ROW_TEXT = t('buyCoinbaseExplainer') const SHAPESHIFT_ROW_TITLE = t('depositShapeShift') const SHAPESHIFT_ROW_TEXT = t('depositShapeShiftExplainer') const FAUCET_ROW_TITLE = t('testFaucet') const facuetRowText = (networkName) => { return t('getEtherFromFaucet', [networkName]) } <<<<<<< title: COINBASE_ROW_TITLE, text: COINBASE_ROW_TEXT, buttonLabel: t('continueToCoinbase'), onButtonClick: () => toCoinbase(address), hide: isTestNetwork || buyingWithShapeshift, }), ======= >>>>>>> <<<<<<< title: SHAPESHIFT_ROW_TITLE, text: SHAPESHIFT_ROW_TEXT, buttonLabel: t('shapeshiftBuy'), onButtonClick: () => this.setState({ buyingWithShapeshift: true }), hide: isTestNetwork, hideButton: buyingWithShapeshift, hideTitle: buyingWithShapeshift, onBackClick: () => this.setState({ buyingWithShapeshift: false }), showBackButton: this.state.buyingWithShapeshift, className: buyingWithShapeshift && 'deposit-ether-modal__buy-row__shapeshift-buy', }), ======= >>>>>>>
<<<<<<< h('div', { className: classnames({ 'confirm-screen-section-column--with-error': errors['insufficientFunds'], 'confirm-screen-section-column': !errors['insufficientFunds'], }), }, [ h('span.confirm-screen-label', [ t('total') + ' ' ]), h('div.confirm-screen-total-box__subtitle', [ t('amountPlusGas') ]), ======= h('div.confirm-screen-section-column', [ h('span.confirm-screen-label', [ this.props.t('total') + ' ' ]), h('div.confirm-screen-total-box__subtitle', [ this.props.t('amountPlusGas') ]), >>>>>>> h('div', { className: classnames({ 'confirm-screen-section-column--with-error': errors['insufficientFunds'], 'confirm-screen-section-column': !errors['insufficientFunds'], }), }, [ h('span.confirm-screen-label', [ this.props.t('total') + ' ' ]), h('div.confirm-screen-total-box__subtitle', [ this.props.t('amountPlusGas') ]), <<<<<<< updateSendErrors({ invalidGasParams: t('invalidGasParams') }) ======= this.props.dispatch(actions.displayWarning(this.props.t('invalidGasParams'))) >>>>>>> updateSendErrors({ invalidGasParams: this.props.t('invalidGasParams') })
<<<<<<< // STATUS METHODS // statuses: // - `'unapproved'` the user has not responded // - `'rejected'` the user has responded no! // - `'approved'` the user has approved the tx // - `'signed'` the tx is signed // - `'submitted'` the tx is sent to a server // - `'confirmed'` the tx has been included in a block. // - `'failed'` the tx failed for some reason, included on tx data. // - `'dropped'` the tx nonce was already used module.exports = class TransactionStateManger extends EventEmitter { ======= module.exports = class TransactionStateManager extends EventEmitter { >>>>>>> // STATUS METHODS // statuses: // - `'unapproved'` the user has not responded // - `'rejected'` the user has responded no! // - `'approved'` the user has approved the tx // - `'signed'` the tx is signed // - `'submitted'` the tx is sent to a server // - `'confirmed'` the tx has been included in a block. // - `'failed'` the tx failed for some reason, included on tx data. // - `'dropped'` the tx nonce was already used module.exports = class TransactionStateManager extends EventEmitter {
<<<<<<< const connect = require('react-redux').connect const { compose } = require('recompose') const { withRouter } = require('react-router-dom') ======= const connect = require('../../metamask-connect') >>>>>>> const connect = require('../../metamask-connect') const { compose } = require('recompose') const { withRouter } = require('react-router-dom') <<<<<<< const t = require('../../../i18n') const { SETTINGS_ROUTE, INFO_ROUTE, NEW_ACCOUNT_ROUTE, IMPORT_ACCOUNT_ROUTE, DEFAULT_ROUTE, } = require('../../routes') module.exports = compose( withRouter, connect(mapStateToProps, mapDispatchToProps) )(AccountMenu) ======= module.exports = connect(mapStateToProps, mapDispatchToProps)(AccountMenu) >>>>>>> const { SETTINGS_ROUTE, INFO_ROUTE, NEW_ACCOUNT_ROUTE, IMPORT_ACCOUNT_ROUTE, DEFAULT_ROUTE, } = require('../../routes') module.exports = compose( withRouter, connect(mapStateToProps, mapDispatchToProps) )(AccountMenu) <<<<<<< onClick: () => { lockMetamask() history.push(DEFAULT_ROUTE) }, }, t('logout')), ======= onClick: lockMetamask, }, this.props.t('logout')), >>>>>>> onClick: () => { lockMetamask() history.push(DEFAULT_ROUTE) }, }, this.props.t('logout')),
<<<<<<< unapprovedMsgCount, unapprovedPersonalMsgCount, send: state.metamask.send, ======= selectedAddressTxList: state.metamask.selectedAddressTxList, >>>>>>> unapprovedMsgCount, unapprovedPersonalMsgCount, send: state.metamask.send, selectedAddressTxList: state.metamask.selectedAddressTxList, <<<<<<< ConfirmTxScreen.prototype.componentWillMount = function () { const { unapprovedTxs = {}, send } = this.props const { to } = send if (Object.keys(unapprovedTxs).length === 0 && !to) { this.props.history.push(DEFAULT_ROUTE) } } ConfirmTxScreen.prototype.componentWillReceiveProps = function (nextProps) { const { send } = this.props const { to } = send const { unapprovedTxs = {} } = nextProps if (Object.keys(unapprovedTxs).length === 0 && !to) { this.props.history.push(DEFAULT_ROUTE) } } ======= ConfirmTxScreen.prototype.componentDidUpdate = function (prevProps) { const { unapprovedTxs, network, selectedAddressTxList, } = this.props const { index: prevIndex, unapprovedTxs: prevUnapprovedTxs } = prevProps const prevUnconfTxList = txHelper(prevUnapprovedTxs, {}, {}, {}, network) const prevTxData = prevUnconfTxList[prevIndex] || {} const prevTx = selectedAddressTxList.find(({ id }) => id === prevTxData.id) || {} const unconfTxList = txHelper(unapprovedTxs, {}, {}, {}, network) if (prevTx.status === 'dropped' && unconfTxList.length === 0) { this.goHome({}) } } >>>>>>> ConfirmTxScreen.prototype.componentDidUpdate = function (prevProps) { const { unapprovedTxs, network, selectedAddressTxList, } = this.props const { index: prevIndex, unapprovedTxs: prevUnapprovedTxs } = prevProps const prevUnconfTxList = txHelper(prevUnapprovedTxs, {}, {}, {}, network) const prevTxData = prevUnconfTxList[prevIndex] || {} const prevTx = selectedAddressTxList.find(({ id }) => id === prevTxData.id) || {} const unconfTxList = txHelper(unapprovedTxs, {}, {}, {}, network) if (prevTx.status === 'dropped' && unconfTxList.length === 0) { this.props.history.push(DEFAULT_ROUTE) } }
<<<<<<< ======= const t = require('../../../i18n') const SenderToRecipient = require('../sender-to-recipient') const NetworkDisplay = require('../network-display') >>>>>>> const t = require('../../../i18n') const SenderToRecipient = require('../sender-to-recipient') const NetworkDisplay = require('../network-display') <<<<<<< h('section.flex-row.flex-center.confirm-screen-row.confirm-screen-total-box ', [ h('div.confirm-screen-section-column', [ h('span.confirm-screen-label', [ this.props.t('total') + ' ' ]), h('div.confirm-screen-total-box__subtitle', [ this.props.t('amountPlusGas') ]), ]), h('div.confirm-screen-section-column', [ h('div.confirm-screen-row-info', `${totalInFIAT} ${currentCurrency.toUpperCase()}`), h('div.confirm-screen-row-detail', `${totalInETH} ETH`), ]), ======= h('div.confirm-screen-section-column', [ h('div.confirm-screen-row-info', `${totalInFIAT} ${currentCurrency.toUpperCase()}`), h('div.confirm-screen-row-detail', `${totalInETH} ETH`), >>>>>>> h('div.confirm-screen-section-column', [ h('div.confirm-screen-row-info', `${totalInFIAT} ${currentCurrency.toUpperCase()}`), h('div.confirm-screen-row-detail', `${totalInETH} ETH`), <<<<<<< h('form#pending-tx-form', { onSubmit: this.onSubmit, }, [ h('.page-container__footer', [ // Cancel Button h('button.btn-cancel.page-container__footer-button.allcaps', { onClick: (event) => { clearSend() this.cancel(event, txMeta) }, }, this.props.t('cancel')), // Accept Button h('button.btn-confirm.page-container__footer-button.allcaps', [this.props.t('confirm')]), ]), ======= // These are latest errors handling from master // Leaving as comments as reference when we start implementing error handling // h('style', ` // .conf-buttons button { // margin-left: 10px; // text-transform: uppercase; // } // `), // txMeta.simulationFails ? // h('.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Transaction Error. Exception thrown in contract code.') // : null, // !isValidAddress ? // h('.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Recipient address is invalid. Sending this transaction will result in a loss of ETH.') // : null, // insufficientBalance ? // h('span.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Insufficient balance for transaction') // : null, // // send + cancel // h('.flex-row.flex-space-around.conf-buttons', { // style: { // display: 'flex', // justifyContent: 'flex-end', // margin: '14px 25px', // }, // }, [ // h('button', { // onClick: (event) => { // this.resetGasFields() // event.preventDefault() // }, // }, 'Reset'), // // Accept Button or Buy Button // insufficientBalance ? h('button.btn-green', { onClick: props.buyEth }, 'Buy Ether') : // h('input.confirm.btn-green', { // type: 'submit', // value: 'SUBMIT', // style: { marginLeft: '10px' }, // disabled: buyDisabled, // }), // h('button.cancel.btn-red', { // onClick: props.cancelTransaction, // }, 'Reject'), // ]), // showRejectAll ? h('.flex-row.flex-space-around.conf-buttons', { // style: { // display: 'flex', // justifyContent: 'flex-end', // margin: '14px 25px', // }, // }, [ // h('button.cancel.btn-red', { // onClick: props.cancelAllTransactions, // }, 'Reject All'), // ]) : null, // ]), // ]) // ) // } ]), h('form#pending-tx-form', { onSubmit: this.onSubmit, }, [ h('.page-container__footer', [ // Cancel Button h('button.btn-cancel.page-container__footer-button.allcaps', { onClick: (event) => { clearSend() this.cancel(event, txMeta) }, }, t('cancel')), // Accept Button h('button.btn-confirm.page-container__footer-button.allcaps', [t('confirm')]), >>>>>>> // These are latest errors handling from master // Leaving as comments as reference when we start implementing error handling // h('style', ` // .conf-buttons button { // margin-left: 10px; // text-transform: uppercase; // } // `), // txMeta.simulationFails ? // h('.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Transaction Error. Exception thrown in contract code.') // : null, // !isValidAddress ? // h('.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Recipient address is invalid. Sending this transaction will result in a loss of ETH.') // : null, // insufficientBalance ? // h('span.error', { // style: { // marginLeft: 50, // fontSize: '0.9em', // }, // }, 'Insufficient balance for transaction') // : null, // // send + cancel // h('.flex-row.flex-space-around.conf-buttons', { // style: { // display: 'flex', // justifyContent: 'flex-end', // margin: '14px 25px', // }, // }, [ // h('button', { // onClick: (event) => { // this.resetGasFields() // event.preventDefault() // }, // }, 'Reset'), // // Accept Button or Buy Button // insufficientBalance ? h('button.btn-green', { onClick: props.buyEth }, 'Buy Ether') : // h('input.confirm.btn-green', { // type: 'submit', // value: 'SUBMIT', // style: { marginLeft: '10px' }, // disabled: buyDisabled, // }), // h('button.cancel.btn-red', { // onClick: props.cancelTransaction, // }, 'Reject'), // ]), // showRejectAll ? h('.flex-row.flex-space-around.conf-buttons', { // style: { // display: 'flex', // justifyContent: 'flex-end', // margin: '14px 25px', // }, // }, [ // h('button.cancel.btn-red', { // onClick: props.cancelAllTransactions, // }, 'Reject All'), // ]) : null, // ]), // ]) // ) // } ]), h('form#pending-tx-form', { onSubmit: this.onSubmit, }, [ h('.page-container__footer', [ // Cancel Button h('button.btn-cancel.page-container__footer-button.allcaps', { onClick: (event) => { clearSend() this.cancel(event, txMeta) }, }, this.props.t('cancel')), // Accept Button h('button.btn-confirm.page-container__footer-button.allcaps', [this.props.t('confirm')]),
<<<<<<< const { ADD_TOKEN_ROUTE } = require('../routes') ======= const t = require('../../i18n') >>>>>>> const { ADD_TOKEN_ROUTE } = require('../routes') const t = require('../../i18n') <<<<<<< h('button.btn-clear.wallet-view__add-token-button', { onClick: () => history.push(ADD_TOKEN_ROUTE), }, 'Add Token'), ======= h('button.btn-primary.wallet-view__add-token-button', { onClick: () => { showAddTokenPage() hideSidebar() }, }, t('addToken')), >>>>>>> h('button.btn-primary.wallet-view__add-token-button', { onClick: () => history.push(ADD_TOKEN_ROUTE), }, t('addToken')),
<<<<<<< driver.findElement(By.css('button')).click() ======= driver.findElement(By.css( 'button' )).click() await delay(300) >>>>>>> driver.findElement(By.css('button')).click() await delay(300)
<<<<<<< module.exports = compose( withRouter, connect(mapStateToProps, mapDispatchToProps) )(TxView) ======= TxView.contextTypes = { t: PropTypes.func, } module.exports = connect(mapStateToProps, mapDispatchToProps)(TxView) >>>>>>> module.exports = compose( withRouter, connect(mapStateToProps, mapDispatchToProps) )(TxView) TxView.contextTypes = { t: PropTypes.func, } <<<<<<< onClick: () => history.push(SEND_ROUTE), }, this.props.t('send')), ======= onClick: showSendPage, }, this.context.t('send')), >>>>>>> onClick: () => history.push(SEND_ROUTE), }, this.context.t('send')), <<<<<<< onClick: () => history.push(SEND_ROUTE), }, this.props.t('send')), ======= onClick: showSendTokenPage, }, this.context.t('send')), >>>>>>> onClick: () => history.push(SEND_ROUTE), }, this.context.t('send')),
<<<<<<< onBlur: () => { this.setErrorsFor('to') this.estimateGasAndPrice() }, onFocus: () => this.clearErrorsFor('to'), ======= onBlur: () => this.setErrorsFor('to'), onFocus: event => { this.clearErrorsFor('to') this.state.newTx.to && event.target.select() }, >>>>>>> onBlur: () => { this.setErrorsFor('to') this.estimateGasAndPrice() }, onFocus: event => { this.clearErrorsFor('to') this.state.newTx.to && event.target.select() },
<<<<<<< icon: h('img', { src: 'images/plus-btn-white.svg' }), text: t('createAccount'), ======= icon: h('img.account-menu__item-icon', { src: 'images/plus-btn-white.svg' }), text: 'Create Account', >>>>>>> icon: h('img.account-menu__item-icon', { src: 'images/plus-btn-white.svg' }), text: t('createAccount'), <<<<<<< icon: h('img', { src: 'images/import-account.svg' }), text: t('importAccount'), ======= icon: h('img.account-menu__item-icon', { src: 'images/import-account.svg' }), text: 'Import Account', >>>>>>> icon: h('img.account-menu__item-icon', { src: 'images/import-account.svg' }), text: t('importAccount'),
<<<<<<< const { SETTINGS_ROUTE, INFO_ROUTE, NEW_ACCOUNT_ROUTE, IMPORT_ACCOUNT_ROUTE, DEFAULT_ROUTE, } = require('../../routes') module.exports = compose( withRouter, connect(mapStateToProps, mapDispatchToProps) )(AccountMenu) ======= const t = require('../../../i18n') module.exports = connect(mapStateToProps, mapDispatchToProps)(AccountMenu) >>>>>>> const t = require('../../../i18n') const { SETTINGS_ROUTE, INFO_ROUTE, NEW_ACCOUNT_ROUTE, IMPORT_ACCOUNT_ROUTE, DEFAULT_ROUTE, } = require('../../routes') module.exports = compose( withRouter, connect(mapStateToProps, mapDispatchToProps) )(AccountMenu) <<<<<<< onClick: () => { lockMetamask() history.push(DEFAULT_ROUTE) }, }, 'Log out'), ======= onClick: lockMetamask, }, t('logout')), >>>>>>> onClick: () => { lockMetamask() history.push(DEFAULT_ROUTE) }, }, t('logout')), <<<<<<< onClick: () => { toggleAccountMenu() history.push(INFO_ROUTE) }, icon: h('img.account-menu__item-icon', { src: 'images/mm-info-icon.svg' }), text: 'Info & Help', ======= onClick: showInfoPage, icon: h('img', { src: 'images/mm-info-icon.svg' }), text: t('infoHelp'), >>>>>>> onClick: () => { toggleAccountMenu() history.push(INFO_ROUTE) }, icon: h('img', { src: 'images/mm-info-icon.svg' }), text: t('infoHelp'),
<<<<<<< const { EventEmitter } = require('events') const { Component } = require('react') const { connect } = require('react-redux') ======= const inherits = require('util').inherits const EventEmitter = require('events').EventEmitter const Component = require('react').Component const connect = require('../metamask-connect') >>>>>>> const { EventEmitter } = require('events') const { Component } = require('react') const connect = require('../metamask-connect') <<<<<<< return ( h('.initialize-screen.flex-column.flex-center', [ ======= h('h1', { style: { fontSize: '1.3em', textTransform: 'uppercase', color: '#7F8082', marginBottom: 10, }, }, this.props.t('appName')), >>>>>>> return ( h('.initialize-screen.flex-column.flex-center', [ <<<<<<< h('span.error.in-progress-notification', warning), // password h('input.large-input.letter-spacey', { type: 'password', id: 'password-box', placeholder: t('newPassword'), onInput: this.inputChanged.bind(this), ======= ]), h('span.in-progress-notification', state.warning), // password h('input.large-input.letter-spacey', { type: 'password', id: 'password-box', placeholder: this.props.t('newPassword'), onInput: this.inputChanged.bind(this), style: { width: 260, marginTop: 12, }, }), // confirm password h('input.large-input.letter-spacey', { type: 'password', id: 'password-box-confirm', placeholder: this.props.t('confirmPassword'), onKeyPress: this.createVaultOnEnter.bind(this), onInput: this.inputChanged.bind(this), style: { width: 260, marginTop: 16, }, }), h('button.primary', { onClick: this.createNewVaultAndKeychain.bind(this), style: { margin: 12, }, }, this.props.t('createDen')), h('.flex-row.flex-center.flex-grow', [ h('p.pointer', { onClick: this.showRestoreVault.bind(this), >>>>>>> h('span.error.in-progress-notification', warning), // password h('input.large-input.letter-spacey', { type: 'password', id: 'password-box', placeholder: this.props.t('newPassword'), onInput: this.inputChanged.bind(this), <<<<<<< }), // confirm password h('input.large-input.letter-spacey', { type: 'password', id: 'password-box-confirm', placeholder: t('confirmPassword'), onKeyPress: this.createVaultOnEnter.bind(this), onInput: this.inputChanged.bind(this), style: { width: 260, marginTop: 16, }, }), ======= }, this.props.t('importDen')), ]), >>>>>>> }), // confirm password h('input.large-input.letter-spacey', { type: 'password', id: 'password-box-confirm', placeholder: this.props.t('confirmPassword'), onKeyPress: this.createVaultOnEnter.bind(this), onInput: this.inputChanged.bind(this), style: { width: 260, marginTop: 16, }, }), <<<<<<< return { isInitialized, isUnlocked, ======= if (password.length < 8) { this.warning = this.props.t('passwordShort') this.props.dispatch(actions.displayWarning(this.warning)) return } if (password !== passwordConfirm) { this.warning = this.props.t('passwordMismatch') this.props.dispatch(actions.displayWarning(this.warning)) return >>>>>>> return { isInitialized, isUnlocked,
<<<<<<< const { isLoading, tokens } = state const { userAddress, network } = this.props ======= const { tokens, isLoading, error } = state const { userAddress } = this.props >>>>>>> const { tokens, isLoading, error } = state const { userAddress, network } = this.props <<<<<<< ======= if (error) { log.error(error) return this.message('There was a problem loading your token balances.') } const network = this.props.network >>>>>>> if (error) { log.error(error) return this.message('There was a problem loading your token balances.') }
<<<<<<< /** * Represents, and contains data about, an 'eth_signTypedData' type signature request. These are created when a * signature for an eth_signTypedData call is requested. * * @see {@link } * * @typedef {Object} TypedMessage * @property {number} id An id to track and identify the message object * @property {object} msgParams The parameters to pass to the eth_signTypedData method once the signature request is * approved. * @property {object} msgParams.metamaskId Added to msgParams for tracking and identification within Metamask. * @property {object} msgParams.from The address that is making the signature request. * @property {string} msgParams.data A hex string conversion of the raw buffer data of the signature request * @property {number} time The epoch time at which the this message was created * @property {string} status Indicates whether the signature request is 'unapproved', 'approved', 'signed' or 'rejected' * @property {string} type The json-prc signing method for which a signature request has been made. A 'Message' will * always have a 'eth_signTypedData' type. * */ ======= const log = require('loglevel') >>>>>>> const log = require('loglevel') /** * Represents, and contains data about, an 'eth_signTypedData' type signature request. These are created when a * signature for an eth_signTypedData call is requested. * * @see {@link } * * @typedef {Object} TypedMessage * @property {number} id An id to track and identify the message object * @property {object} msgParams The parameters to pass to the eth_signTypedData method once the signature request is * approved. * @property {object} msgParams.metamaskId Added to msgParams for tracking and identification within Metamask. * @property {object} msgParams.from The address that is making the signature request. * @property {string} msgParams.data A hex string conversion of the raw buffer data of the signature request * @property {number} time The epoch time at which the this message was created * @property {string} status Indicates whether the signature request is 'unapproved', 'approved', 'signed' or 'rejected' * @property {string} type The json-prc signing method for which a signature request has been made. A 'Message' will * always have a 'eth_signTypedData' type. * */
<<<<<<< const { SEND_ROUTE } = require('../routes') ======= const t = require('../../i18n') >>>>>>> const { SEND_ROUTE } = require('../routes') const t = require('../../i18n') <<<<<<< onClick: () => history.push(SEND_ROUTE), }, 'SEND'), ======= onClick: showSendPage, }, t('send')), >>>>>>> onClick: () => history.push(SEND_ROUTE), }, t('send')), <<<<<<< h('button.btn-clear.hero-balance-button', { onClick: () => history.push(SEND_ROUTE), }, 'SEND'), ======= h('button.btn-primary.hero-balance-button', { onClick: showSendTokenPage, }, t('send')), >>>>>>> h('button.btn-primary.hero-balance-button', { onClick: () => history.push(SEND_ROUTE), }, t('send')),
<<<<<<< return new Promise((resolve, reject) => { background.submitPassword(password, err => { dispatch(actions.hideLoadingIndication()) if (err) { reject(err) } else { dispatch(actions.transitionForward()) return forceUpdateMetamaskState(dispatch).then(resolve) } }) ======= background.submitPassword(password, (err) => { dispatch(actions.hideLoadingIndication()) if (err) { dispatch(actions.unlockFailed(err.message)) } else { dispatch(actions.unlockSucceeded()) dispatch(actions.transitionForward()) forceUpdateMetamaskState(dispatch) } >>>>>>> return new Promise((resolve, reject) => { background.submitPassword(password, (err) => { dispatch(actions.hideLoadingIndication()) if (err) { dispatch(actions.unlockFailed(err.message)) reject(err) } else { dispatch(actions.unlockSucceeded()) dispatch(actions.transitionForward()) return forceUpdateMetamaskState(dispatch).then(resolve) } })
<<<<<<< const { ADD_TOKEN_ROUTE } = require('../routes') const t = require('../../i18n') ======= >>>>>>> const { ADD_TOKEN_ROUTE } = require('../routes') <<<<<<< onClick: () => history.push(ADD_TOKEN_ROUTE), }, t('addToken')), ======= onClick: () => { showAddTokenPage() hideSidebar() }, }, this.props.t('addToken')), >>>>>>> onClick: () => history.push(ADD_TOKEN_ROUTE), }, this.props.t('addToken')),
<<<<<<< var txData = unconfTxList[index] || {} var isNotification = isPopupOrNotification() === 'notification' ======= var txData = unconfTxList[index] || unconfTxList[0] || {} >>>>>>> var txData = unconfTxList[index] || unconfTxList[0] || {} var isNotification = isPopupOrNotification() === 'notification'
<<<<<<< const unapprovedTxsAll = txHelper(metamaskState.unapprovedTxs, metamaskState.unapprovedMsgs, metamaskState.unapprovedPersonalMsgs, metamaskState.unapprovedTypedMessages, metamaskState.network) if (unapprovedTxsAll.length > 0) { store.dispatch(actions.showConfTxPage()) ======= const unapprovedTxsAll = txHelper(metamaskState.unapprovedTxs, metamaskState.unapprovedMsgs, metamaskState.unapprovedPersonalMsgs, metamaskState.network) const numberOfUnapprivedTx = unapprovedTxsAll.length if (numberOfUnapprivedTx > 0) { store.dispatch(actions.showConfTxPage({ id: unapprovedTxsAll[numberOfUnapprivedTx - 1].id, })) >>>>>>> const unapprovedTxsAll = txHelper(metamaskState.unapprovedTxs, metamaskState.unapprovedMsgs, metamaskState.unapprovedPersonalMsgs, metamaskState.unapprovedTypedMessages, metamaskState.network) const numberOfUnapprivedTx = unapprovedTxsAll.length if (numberOfUnapprivedTx > 0) { store.dispatch(actions.showConfTxPage({ id: unapprovedTxsAll[numberOfUnapprivedTx - 1].id, }))
<<<<<<< this.blockTracker.once('latest', async (blockNumberHex) => { let recentBlocks let blockNumber = Number.parseInt(blockNumberHex, 16) let state = this.store.getState() recentBlocks = state.recentBlocks while (recentBlocks.length < this.historyLength) { ======= this.blockTracker.once('block', async (block) => { const currentBlockNumber = Number.parseInt(block.number, 16) const blocksToFetch = Math.min(currentBlockNumber, this.historyLength) const prevBlockNumber = currentBlockNumber - 1 const targetBlockNumbers = Array(blocksToFetch).fill().map((_, index) => prevBlockNumber - index) await Promise.all(targetBlockNumbers.map(async (targetBlockNumber) => { >>>>>>> this.blockTracker.once('latest', async (blockNumberHex) => { const currentBlockNumber = Number.parseInt(blockNumberHex, 16) const blocksToFetch = Math.min(currentBlockNumber, this.historyLength) const prevBlockNumber = currentBlockNumber - 1 const targetBlockNumbers = Array(blocksToFetch).fill().map((_, index) => prevBlockNumber - index) await Promise.all(targetBlockNumbers.map(async (targetBlockNumber) => { <<<<<<< const prevBlockNumber = blockNumber - 1 const newBlock = await this.getBlockByNumber(prevBlockNumber) ======= const newBlock = await this.getBlockByNumber(targetBlockNumber) >>>>>>> const newBlock = await this.getBlockByNumber(targetBlockNumber) <<<<<<< blockNumber = Number.parseInt(newBlock.number, 16) ======= >>>>>>> <<<<<<< await timeout(100) } ======= })) >>>>>>> }))
<<<<<<< import React, { Component } from 'react' import PropTypes from 'prop-types' import {connect} from 'react-redux' import { createNewVaultAndKeychain } from '../../../../ui/app/actions' ======= import EventEmitter from 'events' import React, { Component } from 'react' import PropTypes from 'prop-types' import {connect} from 'react-redux' import classnames from 'classnames' import {createNewVaultAndKeychain} from '../../../../ui/app/actions' >>>>>>> import React, { Component } from 'react' import PropTypes from 'prop-types' import {connect} from 'react-redux' import { createNewVaultAndKeychain } from '../../../../ui/app/actions' <<<<<<< history: PropTypes.object.isRequired, isInitialized: PropTypes.bool, isUnlocked: PropTypes.bool, ======= goToImportWithSeedPhrase: PropTypes.func.isRequired, goToImportAccount: PropTypes.func.isRequired, next: PropTypes.func.isRequired, isMascara: PropTypes.bool.isRequired, >>>>>>> history: PropTypes.object.isRequired, isInitialized: PropTypes.bool, isUnlocked: PropTypes.bool, isMascara: PropTypes.bool.isRequired, <<<<<<< componentWillMount () { const { isInitialized, isUnlocked, history } = this.props if (isInitialized || isUnlocked) { history.push(DEFAULT_ROUTE) } } isValid () { const { password, confirmPassword } = this.state ======= isValid () { const {password, confirmPassword} = this.state >>>>>>> componentWillMount () { const { isInitialized, isUnlocked, history } = this.props if (isInitialized || isUnlocked) { history.push(DEFAULT_ROUTE) } } isValid () { const { password, confirmPassword } = this.state <<<<<<< const { password } = this.state const { createAccount, history } = this.props ======= const {password} = this.state const {createAccount, next} = this.props >>>>>>> const { password } = this.state const { createAccount, history } = this.props <<<<<<< mapStateToProps, ======= ({ appState: { isLoading }, metamask: { isMascara } }) => ({ isLoading, isMascara }), >>>>>>> mapStateToProps,
<<<<<<< }); test("Texture tables", function() { var simple_data = { number_columns: [0, 1, 2], columns: [0, 1, 2], data: [ { 0: 0, 1: 1, 2: 2 }, { 0: 3, 1: 4, 2: 5 }, { 0: 6, 1: 7, 2: 8 } ] }; var table = Facet.Data.texture_table(simple_data); for (var row_ix=0; row_ix<3; ++row_ix) { for (var col_ix=0; col_ix<3; ++col_ix) { var linear_index = row_ix * 3 + col_ix; var tex_y = Math.floor(linear_index / 4); var tex_x = linear_index - tex_y * 4; ok(vec.equal(table.index(row_ix, col_ix).constant_value(), vec.make([tex_x, tex_y]))); } } ======= }); test("color conversion", function() { /* The serious tests will be: Javascript and shade expressions // must behave identically (up to floating-point issues); // // Javascript and shade expressions must have appropriate inverses */ function match(c1, c2, tol) { tol = _.isUndefined(tol)?1e-5:tol; c1 = c1.values(); c2 = c2.values(); var d = 0, d1 = 0, d2 = 0; for (var i=0; i<c1.length; ++i) { d += (c1[i] - c2[i]) * (c1[i] - c2[i]); d1 += c1[i] * c1[i]; d2 += c2[i] * c2[i]; } d = Math.sqrt(d) / Math.max(Math.sqrt(d1), Math.sqrt(d2)); return d < tol; } function check(v1, v2, v3, source, target, tol) { var shade_source = Shade.Colors.shadetable[source].create(v1, v2, v3); var js_source = Shade.Colors.jstable[source].create(v1, v2, v3); var shade_target = shade_source[target](); var js_target = js_source[target](); var shade_source2 = shade_target[source](); var js_source2 = js_target[source](); if (!match(shade_source2, shade_source, tol)) { console.log("source", shade_source,shade_source.values(), js_source,js_source.values()); console.log("target", shade_target,shade_target.values(), js_target,js_target.values()); console.log("source2", shade_source2,shade_source2.values(), js_source2,js_source2.values()); console.log("---"); }; ok(match(shade_source, js_source, tol), "constructors match"); ok(match(shade_target, js_target, tol), source + "->" + target + " match"); ok(match(shade_source2, js_source2, tol), source+"->"+target+"->"+source + " match"); ok(match(shade_source, shade_source2, tol), source+"->"+target+"->"+source+" inverse shade"); ok(match(js_source, js_source2, tol), source+"->"+target+"->"+source+" inverse js"); } var test_count = 10; for (var i=0; i<test_count; ++i) { var r = Math.random(), g = Math.random(), b = Math.random(); // Test the 6 basic conversion routines check(r, g, b, "rgb", "hls"); check(r, g, b, "rgb", "srgb"); check(r, g, b, "rgb", "hsv"); check(r, g, b, "rgb", "xyz", 1e-3); check(r, g, b, "srgb", "xyz", 1e-3); var xyz = Shade.Colors.jstable.rgb.create(r, g, b).xyz(); check(xyz.x, xyz.y, xyz.z, "xyz", "luv"); var luv = xyz.luv(); check(luv.l, luv.u, luv.v, "luv", "hcl"); } // with the basic conversions verified, check the compound ones just // to prevent typos (function() { var r = Math.random(), g = Math.random(), b = Math.random(); var rgb = Shade.Colors.jstable.rgb.create(r, g, b); var srgb = rgb.srgb(); var xyz = rgb.xyz(); var luv = xyz.luv(); var hcl = luv.hcl(); var hsv = rgb.hsv(); var hls = rgb.hls(); check(luv.l, luv.u, luv.v, "luv", "rgb"); check(luv.l, luv.u, luv.v, "luv", "srgb"); check(hcl.h, hcl.c, hcl.l, "hcl", "xyz"); check(hcl.h, hcl.c, hcl.l, "hcl", "rgb"); check(hcl.h, hcl.c, hcl.l, "hcl", "srgb"); check(hcl.h, hcl.c, hcl.l, "hcl", "hsv"); check(hcl.h, hcl.c, hcl.l, "hcl", "hls"); check(hls.h, hls.l, hls.s, "hls", "hsv"); check(hls.h, hls.l, hls.s, "hls", "srgb"); check(hls.h, hls.l, hls.s, "hls", "xyz"); check(hls.h, hls.l, hls.s, "hls", "luv"); check(hsv.h, hsv.s, hsv.v, "hsv", "srgb"); check(hsv.h, hsv.s, hsv.v, "hsv", "xyz"); check(hsv.h, hsv.s, hsv.v, "hsv", "luv"); })(); >>>>>>> }); test("Texture tables", function() { var simple_data = { number_columns: [0, 1, 2], columns: [0, 1, 2], data: [ { 0: 0, 1: 1, 2: 2 }, { 0: 3, 1: 4, 2: 5 }, { 0: 6, 1: 7, 2: 8 } ] }; var table = Facet.Data.texture_table(simple_data); for (var row_ix=0; row_ix<3; ++row_ix) { for (var col_ix=0; col_ix<3; ++col_ix) { var linear_index = row_ix * 3 + col_ix; var tex_y = Math.floor(linear_index / 4); var tex_x = linear_index - tex_y * 4; ok(vec.equal(table.index(row_ix, col_ix).constant_value(), vec.make([tex_x, tex_y]))); } } }); test("color conversion", function() { /* The serious tests will be: Javascript and shade expressions // must behave identically (up to floating-point issues); // // Javascript and shade expressions must have appropriate inverses */ function match(c1, c2, tol) { tol = _.isUndefined(tol)?1e-5:tol; c1 = c1.values(); c2 = c2.values(); var d = 0, d1 = 0, d2 = 0; for (var i=0; i<c1.length; ++i) { d += (c1[i] - c2[i]) * (c1[i] - c2[i]); d1 += c1[i] * c1[i]; d2 += c2[i] * c2[i]; } d = Math.sqrt(d) / Math.max(Math.sqrt(d1), Math.sqrt(d2)); return d < tol; } function check(v1, v2, v3, source, target, tol) { var shade_source = Shade.Colors.shadetable[source].create(v1, v2, v3); var js_source = Shade.Colors.jstable[source].create(v1, v2, v3); var shade_target = shade_source[target](); var js_target = js_source[target](); var shade_source2 = shade_target[source](); var js_source2 = js_target[source](); if (!match(shade_source2, shade_source, tol)) { console.log("source", shade_source,shade_source.values(), js_source,js_source.values()); console.log("target", shade_target,shade_target.values(), js_target,js_target.values()); console.log("source2", shade_source2,shade_source2.values(), js_source2,js_source2.values()); console.log("---"); }; ok(match(shade_source, js_source, tol), "constructors match"); ok(match(shade_target, js_target, tol), source + "->" + target + " match"); ok(match(shade_source2, js_source2, tol), source+"->"+target+"->"+source + " match"); ok(match(shade_source, shade_source2, tol), source+"->"+target+"->"+source+" inverse shade"); ok(match(js_source, js_source2, tol), source+"->"+target+"->"+source+" inverse js"); } var test_count = 10; for (var i=0; i<test_count; ++i) { var r = Math.random(), g = Math.random(), b = Math.random(); // Test the 6 basic conversion routines check(r, g, b, "rgb", "hls"); check(r, g, b, "rgb", "srgb"); check(r, g, b, "rgb", "hsv"); check(r, g, b, "rgb", "xyz", 1e-3); check(r, g, b, "srgb", "xyz", 1e-3); var xyz = Shade.Colors.jstable.rgb.create(r, g, b).xyz(); check(xyz.x, xyz.y, xyz.z, "xyz", "luv"); var luv = xyz.luv(); check(luv.l, luv.u, luv.v, "luv", "hcl"); } // with the basic conversions verified, check the compound ones just // to prevent typos (function() { var r = Math.random(), g = Math.random(), b = Math.random(); var rgb = Shade.Colors.jstable.rgb.create(r, g, b); var srgb = rgb.srgb(); var xyz = rgb.xyz(); var luv = xyz.luv(); var hcl = luv.hcl(); var hsv = rgb.hsv(); var hls = rgb.hls(); check(luv.l, luv.u, luv.v, "luv", "rgb"); check(luv.l, luv.u, luv.v, "luv", "srgb"); check(hcl.h, hcl.c, hcl.l, "hcl", "xyz"); check(hcl.h, hcl.c, hcl.l, "hcl", "rgb"); check(hcl.h, hcl.c, hcl.l, "hcl", "srgb"); check(hcl.h, hcl.c, hcl.l, "hcl", "hsv"); check(hcl.h, hcl.c, hcl.l, "hcl", "hls"); check(hls.h, hls.l, hls.s, "hls", "hsv"); check(hls.h, hls.l, hls.s, "hls", "srgb"); check(hls.h, hls.l, hls.s, "hls", "xyz"); check(hls.h, hls.l, hls.s, "hls", "luv"); check(hsv.h, hsv.s, hsv.v, "hsv", "srgb"); check(hsv.h, hsv.s, hsv.v, "hsv", "xyz"); check(hsv.h, hsv.s, hsv.v, "hsv", "luv"); })();
<<<<<<< onClick: () => { toggleAccountMenu() history.push(NEW_ACCOUNT_ROUTE) }, icon: h('img', { src: 'images/plus-btn-white.svg' }), ======= onClick: () => showNewAccountPage('CREATE'), icon: h('img.account-menu__item-icon', { src: 'images/plus-btn-white.svg' }), >>>>>>> onClick: () => { toggleAccountMenu() history.push(NEW_ACCOUNT_ROUTE) }, icon: h('img.account-menu__item-icon', { src: 'images/plus-btn-white.svg' }), <<<<<<< onClick: () => { toggleAccountMenu() history.push(IMPORT_ACCOUNT_ROUTE) }, icon: h('img', { src: 'images/import-account.svg' }), ======= onClick: () => showNewAccountPage('IMPORT'), icon: h('img.account-menu__item-icon', { src: 'images/import-account.svg' }), >>>>>>> onClick: () => { toggleAccountMenu() history.push(IMPORT_ACCOUNT_ROUTE) }, icon: h('img.account-menu__item-icon', { src: 'images/import-account.svg' }), <<<<<<< onClick: () => { toggleAccountMenu() history.push(INFO_ROUTE) }, icon: h('img', { src: 'images/mm-info-icon.svg' }), ======= onClick: showInfoPage, icon: h('img.account-menu__item-icon', { src: 'images/mm-info-icon.svg' }), >>>>>>> onClick: () => { toggleAccountMenu() history.push(INFO_ROUTE) }, icon: h('img.account-menu__item-icon', { src: 'images/mm-info-icon.svg' }), <<<<<<< onClick: () => { toggleAccountMenu() history.push(SETTINGS_ROUTE) }, icon: h('img', { src: 'images/settings.svg' }), ======= onClick: showConfigPage, icon: h('img.account-menu__item-icon', { src: 'images/settings.svg' }), >>>>>>> onClick: () => { toggleAccountMenu() history.push(SETTINGS_ROUTE) }, icon: h('img.account-menu__item-icon', { src: 'images/settings.svg' }),
<<<<<<< ======= const fs = require('fs') const mkdirp = require('mkdirp') const pify = require('pify') const assert = require('assert') const {until} = require('selenium-webdriver') >>>>>>> const fs = require('fs') const mkdirp = require('mkdirp') const pify = require('pify') const assert = require('assert') <<<<<<< ======= closeAllWindowHandlesExcept, >>>>>>> closeAllWindowHandlesExcept,
<<<<<<< h('button.confirm-screen-back-button', { onClick: () => this.editTransaction(txMeta), ======= h('button.btn-clear.confirm-screen-back-button', { onClick: () => editTransaction(txMeta), >>>>>>> h('button.btn-clear.confirm-screen-back-button', { onClick: () => editTransaction(txMeta), <<<<<<< this.props.cancelTransaction(txMeta) .then(() => this.props.history.push(DEFAULT_ROUTE)) ======= const { cancelTransaction } = this.props cancelTransaction(txMeta) >>>>>>> const { cancelTransaction } = this.props cancelTransaction(txMeta) .then(() => this.props.history.push(DEFAULT_ROUTE))
<<<<<<< }, t(this.props.localeMessages, 'edit')), h('div.page-container__title', t(this.props.localeMessages, 'confirm')), h('div.page-container__subtitle', t(this.props.localeMessages, 'pleaseReviewTransaction')), ======= }, t('edit')), h('div.page-container__title', title), h('div.page-container__subtitle', subtitle), >>>>>>> }, t(this.props.localeMessages, 'edit')), h('div.page-container__title', title), h('div.page-container__subtitle', subtitle),
<<<<<<< import ptbr from './lang/pt-br'; ======= import es from './lang/es'; import th from './lang/th'; >>>>>>> import es from './lang/es'; import th from './lang/th'; import ptbr from './lang/pt-br'; <<<<<<< en, de, fr, pt, cn, it, 'pt-br': ptbr ======= en, de, fr, pt, cn, it, es, th >>>>>>> en, de, fr, pt, cn, it, es, th, 'pt-br': ptbr
<<<<<<< import './cool.vue'; import './cool-rtl2.vue'; import './green.vue'; ======= import './cool.vue'; import './cool-rtl.vue'; >>>>>>> import './cool.vue'; import './cool-rtl.vue'; import './cool-rtl2.vue'; import './green.vue';
<<<<<<< test: /\.scss/, include: path.resolve(__dirname, 'app/assets/scss'), loader: ExtractTextPlugin.extract('style-loader', 'css-loader!sass-loader') ======= test: /\.scss$/, include: path.resolve(__dirname, 'app/assets/scss'), loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader") >>>>>>> test: /\.scss$/, include: path.resolve(__dirname, 'app/assets/css'), loader: ExtractTextPlugin.extract('style-loader', 'css-loader!sass-loader')
<<<<<<< 'btford.socket-io', 'cfp.hotkeys' ======= 'btford.socket-io', 'infinite-scroll', 'monospaced.elastic' >>>>>>> 'btford.socket-io', 'cfp.hotkeys' 'infinite-scroll', 'monospaced.elastic' <<<<<<< require('angular-hotkeys'); ======= require('angular-elastic'); >>>>>>> require('angular-hotkeys'); require('angular-elastic');
<<<<<<< const topAppBarBundles = require('./top-app-bar/webpack.config.js'); const fabBundles = require('./fab/webpack.config.js'); ======= const materialIconBundles = require('./material-icon/webpack.config.js'); const topAppBarBundles = require('./top-app-bar/webpack.config.js'); >>>>>>> const materialIconBundles = require('./material-icon/webpack.config.js'); const topAppBarBundles = require('./top-app-bar/webpack.config.js'); const fabBundles = require('./fab/webpack.config.js'); <<<<<<< ...topAppBarBundles, ...fabBundles, ======= ...materialIconBundles, ...topAppBarBundles, >>>>>>> ...materialIconBundles, ...topAppBarBundles, ...fabBundles,
<<<<<<< // This order (and the avoidance of yields) is important to make // sure that when publish functions are rerun, they see a // consistent view of the world: this.userId is set and matches // the login token on the connection (not that there is // currently a public API for reading the login token on a // connection). Meteor._noYieldsAllowed(function () { Accounts._setLoginToken(self.connection.id, result.token); }); self.setUserId(result.id); ======= this.setUserId(result.id); Accounts._setLoginToken( result.id, this.connection, Accounts._hashLoginToken(result.token) ); >>>>>>> // This order (and the avoidance of yields) is important to make // sure that when publish functions are rerun, they see a // consistent view of the world: this.userId is set and matches // the login token on the connection (not that there is // currently a public API for reading the login token on a // connection). Meteor._noYieldsAllowed(function () { Accounts._setLoginToken( result.id, this.connection, Accounts._hashLoginToken(result.token) ); }); self.setUserId(result.id);
<<<<<<< ======= // The reload safetybelt is some js that will be loaded after everything else in // the HTML. In some multi-server deployments, when you update, you have a // chance of hitting an old server for the HTML and the new server for the JS or // CSS. This prevents you from displaying the page in that case, and instead // reloads it, presumably all on the new version now. var RELOAD_SAFETYBELT = "\n" + "if (typeof Package === 'undefined' || \n" + " ! Package.webapp || \n" + " ! Package.webapp.WebApp || \n" + " ! Package.webapp.WebApp._isCssLoaded()) \n" + " document.location.reload(); \n"; var makeAppNamePathPrefix = function (appName) { return encodeURIComponent(appName).replace(/\./g, '_'); }; >>>>>>> // The reload safetybelt is some js that will be loaded after everything else in // the HTML. In some multi-server deployments, when you update, you have a // chance of hitting an old server for the HTML and the new server for the JS or // CSS. This prevents you from displaying the page in that case, and instead // reloads it, presumably all on the new version now. var RELOAD_SAFETYBELT = "\n" + "if (typeof Package === 'undefined' || \n" + " ! Package.webapp || \n" + " ! Package.webapp.WebApp || \n" + " ! Package.webapp.WebApp._isCssLoaded()) \n" + " document.location.reload(); \n"; <<<<<<< ======= Log("Attempting to bind to proxy at " + proxyService.providers.proxy); WebAppInternals.bindToProxy(_.extend({ proxyEndpoint: proxyService.providers.proxy }, proxyConf), proxyServiceName); >>>>>>>