react-i13n
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -10,9 +10,10 @@ /** | ||
var ReactDOM = require('react-dom'); | ||
var clickHandler = require('../utils/clickHandler'); | ||
var debug = require('debug')('I13nMixin'); | ||
var DebugDashboard = require('../utils/DebugDashboard'); | ||
var I13nUtils = require('./I13nUtils'); | ||
var listen = require('subscribe-ui-event/dist/lib/listen'); | ||
var ReactI13n = require('../libs/ReactI13n'); | ||
var clickHandler = require('../utils/clickHandler'); | ||
var EventListener = require('fbjs/lib/EventListener'); | ||
var ViewportMixin = require('./viewport/ViewportMixin'); | ||
var I13nUtils = require('./I13nUtils'); | ||
var DebugDashboard = require('../utils/DebugDashboard'); | ||
require('setimmediate'); | ||
@@ -105,3 +106,3 @@ var IS_DEBUG_MODE = isDebugMode(); | ||
if (self.props.bindClickEvent) { | ||
self.clickEventListener = EventListener.listen(ReactDOM.findDOMNode(self), 'click', clickHandler.bind(self)); | ||
self.clickEventListener = listen(ReactDOM.findDOMNode(self), 'click', clickHandler.bind(self)); | ||
} | ||
@@ -209,3 +210,3 @@ | ||
self._subI13nComponents.push({ | ||
componentClickHandler: EventListener.listen(element, 'click', clickHandler.bind(Object.assign({}, self, {getI13nNode: function getI13nNodeForScannedNode() { | ||
componentClickHandler: listen(element, 'click', clickHandler.bind(Object.assign({}, self, {getI13nNode: function getI13nNodeForScannedNode() { | ||
return i13nNode; | ||
@@ -212,0 +213,0 @@ }}))), |
@@ -6,3 +6,3 @@ /** | ||
/* global document, window*/ | ||
var EventListener = require('fbjs/lib/EventListener'); | ||
var listen = require('subscribe-ui-event/dist/lib/listen'); | ||
@@ -14,5 +14,5 @@ var uniqueId = 0; | ||
var styles = window.getComputedStyle(DOMNode) || {}; | ||
if ('none' === styles.display || | ||
'hidden' === styles.visibility || | ||
'0' === styles.opacity) { | ||
if ('none' === styles.display || | ||
'hidden' === styles.visibility || | ||
'0' === styles.opacity) { | ||
return true; | ||
@@ -30,3 +30,3 @@ } else { | ||
var left = offset.left + DOMNode.offsetWidth - 15; | ||
container.style.position = 'absolute'; | ||
@@ -96,3 +96,3 @@ container.style['max-width'] = '300px'; | ||
dashboardTitle.style.background = '#400090'; | ||
dashboardTitle.style.color = '#FFF'; | ||
dashboardTitle.style.color = '#fff'; | ||
dashboardTitle.style.padding = '5px'; | ||
@@ -115,10 +115,10 @@ dashboardTitle.style['white-space'] = 'nowrap'; | ||
dashboardItem.innerHTML = key + ' : ' + model[key].value + (model[key].DOMNode !== DOMNode ? ' (inherited)' : ''); | ||
// set up scroll listener to show where the model data comes from | ||
// set up scroll listener to show where the model data comes from | ||
if (model[key].DOMNode) { | ||
model[key].DOMNode.style.transition = 'border 0.05s'; | ||
self.modelItemsListener.push(EventListener.listen(dashboardItem, 'mouseover', function () { | ||
self.modelItemsListener.push(listen(dashboardItem, 'mouseover', function () { | ||
model[key].DOMNode.style.border = '5px solid #b493f5'; | ||
})); | ||
self.modelItemsListener.push(EventListener.listen(dashboardItem, 'mouseout', function () { | ||
self.modelItemsListener.push(listen(dashboardItem, 'mouseout', function () { | ||
model[key].DOMNode.style.border = null; | ||
@@ -128,3 +128,3 @@ })); | ||
dashboardContainer.appendChild(dashboardItem); | ||
}); | ||
}); | ||
@@ -135,3 +135,3 @@ // generate dashboard | ||
dashboard.style.background = '#7300ff'; | ||
dashboard.style.color = '#FFF'; | ||
dashboard.style.color = '#fff'; | ||
dashboard.style.fontsize = '14px'; | ||
@@ -146,6 +146,6 @@ dashboard.style.width = '100%'; | ||
triggerNode.style.background = '#400090'; | ||
triggerNode.style.color = '#FFF'; | ||
triggerNode.style.color = '#fff'; | ||
triggerNode.style.padding = '2px'; | ||
triggerNode.style.cursor = 'pointer'; | ||
self.clickListener = EventListener.listen(triggerNode, 'click', function () { | ||
self.clickListener = listen(triggerNode, 'click', function () { | ||
if ('none' === dashboard.style.display) { | ||
@@ -161,9 +161,9 @@ dashboard.style.display = 'block'; | ||
DOMNode.style.transition = 'border 0.05s'; | ||
self.mouseOverListener = EventListener.listen(triggerNode, 'mouseover', function () { | ||
self.mouseOverListener = listen(triggerNode, 'mouseover', function () { | ||
DOMNode.style.border = '5px solid #5a00c8'; | ||
}); | ||
self.mouseOutListener = EventListener.listen(triggerNode, 'mouseout', function () { | ||
self.mouseOutListener = listen(triggerNode, 'mouseout', function () { | ||
DOMNode.style.border = null; | ||
}); | ||
container.appendChild(triggerNode); | ||
@@ -170,0 +170,0 @@ container.appendChild(dashboard); |
{ | ||
"name": "react-i13n", | ||
"description": "React I13n provides a performant and scalable solution to application instrumentation.", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"main": "index.js", | ||
@@ -17,3 +17,2 @@ "repository": { | ||
"debug": "^2.1.3", | ||
"fbjs": "^0.6.0", | ||
"hoist-non-react-statics": "^1.0.0", | ||
@@ -20,0 +19,0 @@ "setimmediate": "^1.0.2", |
6
74295
- Removedfbjs@^0.6.0
- Removedasap@2.0.6(transitive)
- Removedcore-js@1.2.7(transitive)
- Removedfbjs@0.6.1(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedpromise@7.3.1(transitive)
- Removedua-parser-js@0.7.40(transitive)
- Removedwhatwg-fetch@0.9.0(transitive)