Build update

This commit is contained in:
Francisco Hodge 2019-03-07 20:53:23 -05:00
parent 90b67ec416
commit 19f6ac9ac1
9 changed files with 29 additions and 12 deletions

View File

@ -1,6 +1,6 @@
/*!
*
* simple-keyboard v2.17.0
* simple-keyboard v2.18.0
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*!
*
* simple-keyboard v2.17.0 (Non-minified build)
* simple-keyboard v2.18.0 (Non-minified build)
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)

10
build/index.d.ts vendored
View File

@ -10,6 +10,11 @@ declare module 'simple-keyboard' {
}
interface KeyboardOptions {
/**
* Utilities
*/
utilities?: any;
/**
* Modify the keyboard layout.
*/
@ -121,6 +126,11 @@ declare module 'simple-keyboard' {
*/
autoUseTouchEvents?: boolean;
/**
* Opt out of PointerEvents handling, falling back to the prior mouse event logic.
*/
useMouseEvents?: boolean;
/**
* Executes the callback function on key press. Returns button layout name (i.e.: "{shift}").
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*!
*
* simple-keyboard v2.17.0 (Non-minified build)
* simple-keyboard v2.18.0 (Non-minified build)
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
@ -849,6 +849,7 @@
* @property {object} inputPattern Restrains input(s) change to the defined regular expression pattern.
* @property {boolean} useTouchEvents Instructs simple-keyboard to use touch events instead of click events.
* @property {boolean} autoUseTouchEvents Enable useTouchEvents automatically when touch device is detected.
* @property {boolean} useMouseEvents Opt out of PointerEvents handling, falling back to the prior mouse event logic.
*/ this.options = options;
this.options.layoutName = this.options.layoutName || "default";
this.options.theme = this.options.theme || "hg-theme-default";
@ -948,6 +949,11 @@
*/ }
if (typeof this.options.onChange === "function") {
this.options.onChange(this.input[this.options.inputName]);
/**
* Calling onChangeAll
*/ }
if (typeof this.options.onChangeAll === "function") {
this.options.onChangeAll(this.input);
}
}
if (debug) {
@ -1047,7 +1053,7 @@
*/ if (this.options.syncInstanceInputs) {
this.syncInstanceInputs(this.input);
}
return this.input[this.options.inputName];
return this.input[inputName];
}
/**
* Set the keyboards input.
@ -1458,6 +1464,7 @@
var layout = this.options.layout || services_KeyboardLayout.getDefaultLayout();
var useTouchEvents = this.options.useTouchEvents || false;
var useTouchEventsClass = useTouchEvents ? "hg-touch-events" : "";
var useMouseEvents = this.options.useMouseEvents || false;
/**
* Account for buttonTheme, if set
*/ var buttonThemesParsed = Array.isArray(this.options.buttonTheme) ? this.getButtonTheme() : {};
@ -1485,7 +1492,7 @@
buttonDOM.className += "hg-button ".concat(fctBtnClass).concat(buttonThemeClass ? " " + buttonThemeClass : "");
/**
* Handle button click event
*/ /* istanbul ignore next */ if (_this9.utilities.pointerEventsSupported() && !useTouchEvents) {
*/ /* istanbul ignore next */ if (_this9.utilities.pointerEventsSupported() && !useTouchEvents && !useMouseEvents) {
/**
* PointerEvents support
*/ buttonDOM.onpointerdown = function(e) {

4
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "simple-keyboard",
"version": "2.17.0",
"version": "2.18.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -5312,7 +5312,7 @@
},
"duplexer": {
"version": "0.1.1",
"resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
"dev": true
},

View File

@ -1,6 +1,6 @@
{
"name": "simple-keyboard",
"version": "2.17.0",
"version": "2.18.0",
"description": "On-screen Javascript Virtual Keyboard",
"main": "build/index.js",
"types": "build/index.d.ts",