mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-02-12 18:56:16 +08:00
Build update
This commit is contained in:
parent
6e54729f46
commit
3012ce24e2
@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
* simple-keyboard v2.16.0
|
* simple-keyboard v2.17.0
|
||||||
* https://github.com/hodgef/simple-keyboard
|
* https://github.com/hodgef/simple-keyboard
|
||||||
*
|
*
|
||||||
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
|
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
* simple-keyboard v2.16.0 (Non-minified build)
|
* simple-keyboard v2.17.0 (Non-minified build)
|
||||||
* https://github.com/hodgef/simple-keyboard
|
* https://github.com/hodgef/simple-keyboard
|
||||||
*
|
*
|
||||||
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
|
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
* simple-keyboard v2.16.0 (Non-minified build)
|
* simple-keyboard v2.17.0 (Non-minified build)
|
||||||
* https://github.com/hodgef/simple-keyboard
|
* https://github.com/hodgef/simple-keyboard
|
||||||
*
|
*
|
||||||
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
|
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
|
||||||
@ -660,6 +660,13 @@
|
|||||||
return "ontouchstart" in window || navigator.maxTouchPoints;
|
return "ontouchstart" in window || navigator.maxTouchPoints;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* Determines whether pointer events are supported
|
||||||
|
*/ }, {
|
||||||
|
key: "pointerEventsSupported",
|
||||||
|
value: function pointerEventsSupported() {
|
||||||
|
return window.PointerEvent;
|
||||||
|
}
|
||||||
|
/**
|
||||||
* Bind all methods in a given class
|
* Bind all methods in a given class
|
||||||
*/ }, {
|
*/ }, {
|
||||||
key: "camelCase",
|
key: "camelCase",
|
||||||
@ -1363,6 +1370,20 @@
|
|||||||
}
|
}
|
||||||
if (typeof this.options.beforeFirstRender === "function") {
|
if (typeof this.options.beforeFirstRender === "function") {
|
||||||
this.options.beforeFirstRender();
|
this.options.beforeFirstRender();
|
||||||
|
/**
|
||||||
|
* Notify about PointerEvents usage
|
||||||
|
*/ }
|
||||||
|
if (this.utilities.pointerEventsSupported() && !this.options.useTouchEvents) {
|
||||||
|
if (this.options.debug) {
|
||||||
|
console.log("Using PointerEvents as it is supported by this browser");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Notify about touch events usage
|
||||||
|
*/ if (this.options.useTouchEvents) {
|
||||||
|
if (this.options.debug) {
|
||||||
|
console.log("useTouchEvents has been enabled. Only touch events will be used.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -1462,7 +1483,31 @@
|
|||||||
*/ var buttonType = _this9.options.useButtonTag ? "button" : "div";
|
*/ var buttonType = _this9.options.useButtonTag ? "button" : "div";
|
||||||
var buttonDOM = document.createElement(buttonType);
|
var buttonDOM = document.createElement(buttonType);
|
||||||
buttonDOM.className += "hg-button ".concat(fctBtnClass).concat(buttonThemeClass ? " " + buttonThemeClass : "");
|
buttonDOM.className += "hg-button ".concat(fctBtnClass).concat(buttonThemeClass ? " " + buttonThemeClass : "");
|
||||||
if (useTouchEvents) {
|
/**
|
||||||
|
* Handle button click event
|
||||||
|
*/ /* istanbul ignore next */ if (_this9.utilities.pointerEventsSupported() && !useTouchEvents) {
|
||||||
|
/**
|
||||||
|
* PointerEvents support
|
||||||
|
*/ buttonDOM.onpointerdown = function(e) {
|
||||||
|
if (_this9.options.preventMouseDownDefault) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
_this9.handleButtonClicked(button);
|
||||||
|
_this9.handleButtonMouseDown(button, e);
|
||||||
|
};
|
||||||
|
buttonDOM.onpointerup = function(e) {
|
||||||
|
if (_this9.options.preventMouseDownDefault) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
_this9.handleButtonMouseUp();
|
||||||
|
};
|
||||||
|
buttonDOM.onpointercancel = function(e) {
|
||||||
|
return _this9.handleButtonMouseUp();
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* Fallback for browsers not supporting PointerEvents
|
||||||
|
*/ if (useTouchEvents) {
|
||||||
buttonDOM.ontouchstart = function(e) {
|
buttonDOM.ontouchstart = function(e) {
|
||||||
_this9.handleButtonClicked(button);
|
_this9.handleButtonClicked(button);
|
||||||
_this9.handleButtonMouseDown(button, e);
|
_this9.handleButtonMouseDown(button, e);
|
||||||
@ -1485,6 +1530,7 @@
|
|||||||
_this9.handleButtonMouseDown(button, e);
|
_this9.handleButtonMouseDown(button, e);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Adding identifier
|
* Adding identifier
|
||||||
*/ buttonDOM.setAttribute("data-skBtn", button);
|
*/ buttonDOM.setAttribute("data-skBtn", button);
|
||||||
|
34
package-lock.json
generated
34
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "simple-keyboard",
|
"name": "simple-keyboard",
|
||||||
"version": "2.16.0",
|
"version": "2.17.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -13879,9 +13879,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-dev-utils": {
|
"react-dev-utils": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-7.0.5.tgz",
|
||||||
"integrity": "sha512-KEFsH1CewnmddPLXIuU+QWKTH/hpJKZClL2+74XN54NkPnR2KnB5gGmuQ0E7DwcCkUpdMxxqBX+rB7aB5sZS4A==",
|
"integrity": "sha512-zJnqqb0x6gd63E3xoz5pXAxBPNaW75Hyz7GgQp0qPhMroBCRQtRvG67AoTZZY1z4yCYVJQZAfQJFdnea0Ujbug==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "7.0.0",
|
"@babel/code-frame": "7.0.0",
|
||||||
@ -13902,7 +13902,7 @@
|
|||||||
"loader-utils": "1.2.3",
|
"loader-utils": "1.2.3",
|
||||||
"opn": "5.4.0",
|
"opn": "5.4.0",
|
||||||
"pkg-up": "2.0.0",
|
"pkg-up": "2.0.0",
|
||||||
"react-error-overlay": "^5.1.3",
|
"react-error-overlay": "^5.1.4",
|
||||||
"recursive-readdir": "2.2.2",
|
"recursive-readdir": "2.2.2",
|
||||||
"shell-quote": "1.6.1",
|
"shell-quote": "1.6.1",
|
||||||
"sockjs-client": "1.3.0",
|
"sockjs-client": "1.3.0",
|
||||||
@ -13934,9 +13934,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"caniuse-lite": {
|
"caniuse-lite": {
|
||||||
"version": "1.0.30000938",
|
"version": "1.0.30000942",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000938.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000942.tgz",
|
||||||
"integrity": "sha512-ekW8NQ3/FvokviDxhdKLZZAx7PptXNwxKgXtnR5y+PR3hckwuP3yJ1Ir+4/c97dsHNqtAyfKUGdw8P4EYzBNgw==",
|
"integrity": "sha512-wLf+IhZUy2rfz48tc40OH7jHjXjnvDFEYqBHluINs/6MgzoNLPf25zhE4NOVzqxLKndf+hau81sAW0RcGHIaBQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"electron-to-chromium": {
|
"electron-to-chromium": {
|
||||||
@ -14012,18 +14012,18 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node-releases": {
|
"node-releases": {
|
||||||
"version": "1.1.7",
|
"version": "1.1.9",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.9.tgz",
|
||||||
"integrity": "sha512-bKdrwaqJUPHqlCzDD7so/R+Nk0jGv9a11ZhLrD9f6i947qGLrGAhU3OxRENa19QQmwzGy/g6zCDEuLGDO8HPvA==",
|
"integrity": "sha512-oic3GT4OtbWWKfRolz5Syw0Xus0KRFxeorLNj0s93ofX6PWyuzKjsiGxsCtWktBwwmTF6DdRRf2KreGqeOk5KA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"semver": "^5.3.0"
|
"semver": "^5.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"p-limit": {
|
"p-limit": {
|
||||||
"version": "2.1.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
|
||||||
"integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==",
|
"integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"p-try": "^2.0.0"
|
"p-try": "^2.0.0"
|
||||||
@ -14068,9 +14068,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-error-overlay": {
|
"react-error-overlay": {
|
||||||
"version": "5.1.3",
|
"version": "5.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-5.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-5.1.4.tgz",
|
||||||
"integrity": "sha512-GoqeM3Xadie7XUApXOjkY3Qhs8RkwB/Za4WMedBGrOKH1eTuKGyoAECff7jiVonJchOx6KZ9i8ILO5XIoHB+Tg==",
|
"integrity": "sha512-fp+U98OMZcnduQ+NSEiQa4s/XMsbp+5KlydmkbESOw4P69iWZ68ZMFM5a2BuE0FgqPBKApJyRuYHR95jM8lAmg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"read-pkg": {
|
"read-pkg": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "simple-keyboard",
|
"name": "simple-keyboard",
|
||||||
"version": "2.16.0",
|
"version": "2.17.0",
|
||||||
"description": "On-screen Javascript Virtual Keyboard",
|
"description": "On-screen Javascript Virtual Keyboard",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"types": "build/index.d.ts",
|
"types": "build/index.d.ts",
|
||||||
|
Loading…
Reference in New Issue
Block a user