Skip to content

Commit

Permalink
release v2.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
roland-reed committed Apr 12, 2018
1 parent 513e259 commit c0e6c24
Show file tree
Hide file tree
Showing 15 changed files with 152 additions and 126 deletions.
33 changes: 26 additions & 7 deletions dist/React.js
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,16 @@
dispatchEvent(e, name);
});
}
createHandle("change");
function onCompositionStart(e) {
e.target.__onComposition = true;
}
function onCompositionEnd(e) {
e.target.__onComposition = false;
dispatchEvent(e, "change");
}
function isInCompositionMode(e) {
return !e.target.__onComposition;
}
createHandle("doubleclick");
createHandle("scroll");
createHandle("wheel");
Expand All @@ -1075,6 +1084,21 @@
eventHooks.click = eventHooks.clickcapture = function(dom) {
dom.onclick = dom.onclick || noop;
};
createHandle("change", isInCompositionMode);
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(dom, "compositionstart", onCompositionStart);
addEvent(dom, "compositionend", onCompositionEnd);
addEvent(document, "input", specialHandles.change);
}
};
} else {
createHandle("change");
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(document, "input", specialHandles.change);
}
};
}
eventPropHooks.click = function(e) {
return !e.target.disabled;
Expand All @@ -1098,11 +1122,6 @@
? -event.wheelDeltaY
: "wheelDelta" in event ? -event.wheelDelta : 0;
};
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(document, "input", specialHandles.change);
}
};
var focusMap = {
focus: "focus",
blur: "blur"
Expand Down Expand Up @@ -3011,7 +3030,7 @@
React = win.React;
} else {
React = win.React = win.ReactDOM = {
version: "2.1.3",
version: "2.1.4",
render: render,
hydrate: render,
options: options,
Expand Down
2 changes: 1 addition & 1 deletion dist/React.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/React.min.js.map

Large diffs are not rendered by default.

33 changes: 26 additions & 7 deletions dist/ReactIE.js
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,16 @@
dispatchEvent(e, name);
});
}
createHandle("change");
function onCompositionStart(e) {
e.target.__onComposition = true;
}
function onCompositionEnd(e) {
e.target.__onComposition = false;
dispatchEvent(e, "change");
}
function isInCompositionMode(e) {
return !e.target.__onComposition;
}
createHandle("doubleclick");
createHandle("scroll");
createHandle("wheel");
Expand All @@ -1075,6 +1084,21 @@
eventHooks.click = eventHooks.clickcapture = function(dom) {
dom.onclick = dom.onclick || noop;
};
createHandle("change", isInCompositionMode);
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(dom, "compositionstart", onCompositionStart);
addEvent(dom, "compositionend", onCompositionEnd);
addEvent(document, "input", specialHandles.change);
}
};
} else {
createHandle("change");
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(document, "input", specialHandles.change);
}
};
}
eventPropHooks.click = function(e) {
return !e.target.disabled;
Expand All @@ -1098,11 +1122,6 @@
? -event.wheelDeltaY
: "wheelDelta" in event ? -event.wheelDelta : 0;
};
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(document, "input", specialHandles.change);
}
};
var focusMap = {
focus: "focus",
blur: "blur"
Expand Down Expand Up @@ -3178,7 +3197,7 @@
React = win.React;
} else {
React = win.React = win.ReactDOM = {
version: "2.1.3",
version: "2.1.4",
render: render,
hydrate: render,
Fragment: Fragment,
Expand Down
2 changes: 1 addition & 1 deletion dist/ReactIE.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ReactIE.min.js.map

Large diffs are not rendered by default.

33 changes: 26 additions & 7 deletions dist/ReactSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,16 @@
dispatchEvent(e, name);
});
}
createHandle("change");
function onCompositionStart(e) {
e.target.__onComposition = true;
}
function onCompositionEnd(e) {
e.target.__onComposition = false;
dispatchEvent(e, "change");
}
function isInCompositionMode(e) {
return !e.target.__onComposition;
}
createHandle("doubleclick");
createHandle("scroll");
createHandle("wheel");
Expand All @@ -1075,6 +1084,21 @@
eventHooks.click = eventHooks.clickcapture = function(dom) {
dom.onclick = dom.onclick || noop;
};
createHandle("change", isInCompositionMode);
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(dom, "compositionstart", onCompositionStart);
addEvent(dom, "compositionend", onCompositionEnd);
addEvent(document$1, "input", specialHandles.change);
}
};
} else {
createHandle("change");
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(document$1, "input", specialHandles.change);
}
};
}
eventPropHooks.click = function(e) {
return !e.target.disabled;
Expand All @@ -1098,11 +1122,6 @@
? -event.wheelDeltaY
: "wheelDelta" in event ? -event.wheelDelta : 0;
};
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(document$1, "input", specialHandles.change);
}
};
var focusMap = {
focus: "focus",
blur: "blur"
Expand Down Expand Up @@ -2995,7 +3014,7 @@
React = win.React;
} else {
React = win.React = win.ReactDOM = {
version: "2.1.3",
version: "2.1.4",
render: render,
hydrate: render,
options: options,
Expand Down
2 changes: 1 addition & 1 deletion dist/ReactSelection.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ReactSelection.min.js.map

Large diffs are not rendered by default.

33 changes: 26 additions & 7 deletions dist/ReactShim.js
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,16 @@
dispatchEvent(e, name);
});
}
createHandle("change");
function onCompositionStart(e) {
e.target.__onComposition = true;
}
function onCompositionEnd(e) {
e.target.__onComposition = false;
dispatchEvent(e, "change");
}
function isInCompositionMode(e) {
return !e.target.__onComposition;
}
createHandle("doubleclick");
createHandle("scroll");
createHandle("wheel");
Expand All @@ -1409,6 +1418,21 @@
eventHooks.click = eventHooks.clickcapture = function(dom) {
dom.onclick = dom.onclick || noop;
};
createHandle("change", isInCompositionMode);
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(dom, "compositionstart", onCompositionStart);
addEvent(dom, "compositionend", onCompositionEnd);
addEvent(document, "input", specialHandles.change);
}
};
} else {
createHandle("change");
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(document, "input", specialHandles.change);
}
};
}
eventPropHooks.click = function(e) {
return !e.target.disabled;
Expand All @@ -1432,11 +1456,6 @@
? -event.wheelDeltaY
: "wheelDelta" in event ? -event.wheelDelta : 0;
};
eventHooks.changecapture = eventHooks.change = function(dom) {
if (/text|password|search/.test(dom.type)) {
addEvent(document, "input", specialHandles.change);
}
};
var focusMap = {
focus: "focus",
blur: "blur"
Expand Down Expand Up @@ -2858,7 +2877,7 @@
React = win.React;
} else {
React = win.React = win.ReactDOM = {
version: "2.1.3",
version: "2.1.4",
render: render,
hydrate: render,
Fragment: Fragment,
Expand Down
2 changes: 1 addition & 1 deletion dist/ReactShim.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ReactShim.min.js.map

Large diffs are not rendered by default.

36 changes: 10 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
{
"name": "qreact",
"version": "2.1.3",
"description": "a mini React-like framework",
"version": "2.1.4",
"description": "React16-compat mini library",
"main": "dist/React.js",
"scripts": {
"build": "node scripts/build.js",
"test": "node node_modules/karma-event-driver-ext",
"devtools": "rollup -c build/rollup.tools.js",
"precommit-msg": "echo 'Linting code...' && exit 0",
"lint": "eslint src/ server/ --fix",
"sync": "node scripts/sync.js",
"format": "prettier-eslint \"?(build|src|server|test)/**/*.js\" --write --log-level error"
"format":
"prettier-eslint \"?(build|src|server|test)/**/*.js\" --write --log-level error"
},
"pre-commit": [
"test",
"precommit-msg",
"lint"
],
"pre-commit": ["precommit-msg", "test"],
"lint-staged": {
"src/**/*.js": [
"prettier --write",
"git add"
]
"src/**/*.js": ["format", "lint", "git add"]
},
"keywords": [
"react-like"
],
"keywords": ["react-like"],
"author": "YMFE (https://github.com/YMFE) / 司徒正美 / 祝鑫奔",
"license": "Apache-2.0",
"bugs": {
Expand Down Expand Up @@ -90,20 +81,13 @@
"commit-msg": "validate-commit-msg"
},
"validate-commit-msg": {
"types": [
"feat",
"fix",
"docs",
"test",
"chore",
"refactor",
"opti"
],
"types": ["feat", "fix", "docs", "test", "chore", "refactor", "opti"],
"warnOnFail": false,
"maxSubjectLength": 100,
"subjectPattern": ".+",
"subjectPatternErrorMsg": "请输入message信息!",
"helpMessage": "Commit message 格式错误, \n请查看规范: http://wiki.corp.qunar.com/pages/viewpage.action?pageId=159698767"
"helpMessage":
"Commit message 格式错误, \n请查看规范: http://wiki.corp.qunar.com/pages/viewpage.action?pageId=159698767"
},
"dependencies": {}
}
57 changes: 0 additions & 57 deletions scripts/minify.js

This file was deleted.

Loading

0 comments on commit c0e6c24

Please sign in to comment.