From ef1959b3bc9f81e4de72574b1859722bec7461b4 Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Thu, 3 Sep 2020 04:52:24 +0000 Subject: [PATCH] Build update --- build/css/index.css | 2 +- build/css/index.css.map | 2 +- build/index.js | 2 +- build/index.js.map | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/css/index.css b/build/css/index.css index bf9cff452..5778ccd74 100644 --- a/build/css/index.css +++ b/build/css/index.css @@ -1,6 +1,6 @@ /*! * - * react-simple-keyboard v2.4.0 + * react-simple-keyboard v2.4.1 * https://github.com/hodgef/react-simple-keyboard * * Copyright (c) Francisco Hodge (https://github.com/hodgef) diff --git a/build/css/index.css.map b/build/css/index.css.map index 20d7cdcb3..d057fd45a 100644 --- a/build/css/index.css.map +++ b/build/css/index.css.map @@ -1 +1 @@ -{"version":3,"sources":["index.css","webpack://node_modules/simple-keyboard/build/css/index.css","webpack://webpack:/src/lib/components/Keyboard.css"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;ACVF;;;;;;;;;;EAUE,CCNF,kBACE,UAAW,CACX,wBAAiB,CAAjB,qBAAiB,CAAjB,oBAAiB,CAAjB,gBAAiB,CACjB,qBAAsB,CACtB,eAAgB,CAChB,yBACF,CAEA,kCACE,mBACF,CAGA,mCACE,cAAe,CACf,SAAU,CACV,iBACF,CAEA,kBACE,oHAC+C,CAC/C,wBAAyB,CACzB,WAAY,CACZ,iBACF,CAEA,6BACE,oBAAqB,CACrB,WAEF,CAEA,0BACE,YACF,CAEA,2CACE,iBACF,CAMA,qGACE,gBACF,CAEA,yCACE,cACF,CAEA,+CACE,YACF,CAEA,6BACE,sCAA+C,CAC/C,WAAY,CACZ,iBAAkB,CAClB,qBAAsB,CACtB,WAAY,CACZ,eAAiB,CACjB,+BAAgC,CAChC,cAAe,CACf,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,yCACF,CAEA,6CACE,kBACF,CAEA,+CACE,WAAY,CACZ,WAAY,CACZ,kBAAmB,CACnB,YAAa,CACb,sBACF,CAMA,oGACE,WACF,CAEA,+CACE,WACF,CAEA,2CACE,cACF,CAEA,yDACE,cACF,CAEA,+CACE,4BAAiC,CACjC,UACF,CAEA,+DACE,cACF,CAEA,4DACE,cACF","file":"index.css","sourcesContent":["/*!\n * \n * react-simple-keyboard v2.4.0\n * https://github.com/hodgef/react-simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\n/*!\n * \n * simple-keyboard v2.30.1\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */.hg-theme-default{width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;touch-action:manipulation}.hg-theme-default .hg-button span{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;outline:0;font-size:inherit}.hg-theme-default{font-family:\"HelveticaNeue-Light\",\"Helvetica Neue Light\",\"Helvetica Neue\",Helvetica,Arial,\"Lucida Grande\",sans-serif;background-color:#ececec;padding:5px;border-radius:5px}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{box-shadow:0 0 3px -1px rgba(0,0,0,.3);height:40px;border-radius:5px;box-sizing:border-box;padding:5px;background:#fff;border-bottom:1px solid #b5b5b5;cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;align-items:center;display:flex;justify-content:center}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"]{max-width:60px}\n/*# sourceMappingURL=index.css.map */\n","/*!\n * \n * simple-keyboard v2.30.1\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\n/**\n * simple-keyboard\n * Theme: hg-theme-default\n */\n.hg-theme-default {\n width: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-sizing: border-box;\n overflow: hidden;\n touch-action: manipulation;\n}\n\n.hg-theme-default .hg-button span {\n pointer-events: none;\n}\n\n/* When using option \"useButtonTag\" */\n.hg-theme-default button.hg-button {\n border-width: 0;\n outline: 0;\n font-size: inherit;\n}\n\n.hg-theme-default {\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\n background-color: #ececec;\n padding: 5px;\n border-radius: 5px;\n}\n\n.hg-theme-default .hg-button {\n display: inline-block;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.hg-theme-default .hg-row {\n display: flex;\n}\n\n.hg-theme-default .hg-row:not(:last-child) {\n margin-bottom: 5px;\n}\n\n.hg-theme-default .hg-row .hg-button:not(:last-child) {\n margin-right: 5px;\n}\n\n.hg-theme-default .hg-row .hg-button-container {\n margin-right: 5px;\n}\n\n.hg-theme-default .hg-row > div:last-child {\n margin-right: 0;\n}\n\n.hg-theme-default .hg-row .hg-button-container {\n display: flex;\n}\n\n.hg-theme-default .hg-button {\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\n height: 40px;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 5px;\n background: white;\n border-bottom: 1px solid #b5b5b5;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.hg-theme-default .hg-button.hg-activeButton {\n background: #efefef;\n}\n\n.hg-theme-default.hg-layout-numeric .hg-button {\n width: 33.3%;\n height: 60px;\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.hg-theme-default .hg-button.hg-button-numpadadd {\n height: 85px;\n}\n\n.hg-theme-default .hg-button.hg-button-numpadenter {\n height: 85px;\n}\n\n.hg-theme-default .hg-button.hg-button-numpad0 {\n width: 105px;\n}\n\n.hg-theme-default .hg-button.hg-button-com {\n max-width: 85px;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\n max-width: 45px;\n}\n\n.hg-theme-default .hg-button.hg-selectedButton {\n background: rgba(5, 25, 70, 0.53);\n color: white;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\n max-width: 82px;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\n max-width: 60px;\n}\n\n","/**\n * simple-keyboard\n * Theme: hg-theme-default\n */\n.hg-theme-default {\n width: 100%;\n user-select: none;\n box-sizing: border-box;\n overflow: hidden;\n touch-action: manipulation;\n}\n\n.hg-theme-default .hg-button span {\n pointer-events: none;\n}\n\n/* When using option \"useButtonTag\" */\n.hg-theme-default button.hg-button {\n border-width: 0;\n outline: 0;\n font-size: inherit;\n}\n\n.hg-theme-default {\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\n background-color: #ececec;\n padding: 5px;\n border-radius: 5px;\n}\n\n.hg-theme-default .hg-button {\n display: inline-block;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.hg-theme-default .hg-row {\n display: flex;\n}\n\n.hg-theme-default .hg-row:not(:last-child) {\n margin-bottom: 5px;\n}\n\n.hg-theme-default .hg-row .hg-button:not(:last-child) {\n margin-right: 5px;\n}\n\n.hg-theme-default .hg-row .hg-button-container {\n margin-right: 5px;\n}\n\n.hg-theme-default .hg-row > div:last-child {\n margin-right: 0;\n}\n\n.hg-theme-default .hg-row .hg-button-container {\n display: flex;\n}\n\n.hg-theme-default .hg-button {\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\n height: 40px;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 5px;\n background: white;\n border-bottom: 1px solid #b5b5b5;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.hg-theme-default .hg-button.hg-activeButton {\n background: #efefef;\n}\n\n.hg-theme-default.hg-layout-numeric .hg-button {\n width: 33.3%;\n height: 60px;\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.hg-theme-default .hg-button.hg-button-numpadadd {\n height: 85px;\n}\n\n.hg-theme-default .hg-button.hg-button-numpadenter {\n height: 85px;\n}\n\n.hg-theme-default .hg-button.hg-button-numpad0 {\n width: 105px;\n}\n\n.hg-theme-default .hg-button.hg-button-com {\n max-width: 85px;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\n max-width: 45px;\n}\n\n.hg-theme-default .hg-button.hg-selectedButton {\n background: rgba(5, 25, 70, 0.53);\n color: white;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\n max-width: 82px;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\n max-width: 60px;\n}\n"]} \ No newline at end of file +{"version":3,"sources":["index.css","webpack://node_modules/simple-keyboard/build/css/index.css","webpack://webpack:/src/lib/components/Keyboard.css"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;ACVF;;;;;;;;;;EAUE,CCNF,kBACE,UAAW,CACX,wBAAiB,CAAjB,qBAAiB,CAAjB,oBAAiB,CAAjB,gBAAiB,CACjB,qBAAsB,CACtB,eAAgB,CAChB,yBACF,CAEA,kCACE,mBACF,CAGA,mCACE,cAAe,CACf,SAAU,CACV,iBACF,CAEA,kBACE,oHAC+C,CAC/C,wBAAyB,CACzB,WAAY,CACZ,iBACF,CAEA,6BACE,oBAAqB,CACrB,WAEF,CAEA,0BACE,YACF,CAEA,2CACE,iBACF,CAMA,qGACE,gBACF,CAEA,yCACE,cACF,CAEA,+CACE,YACF,CAEA,6BACE,sCAA+C,CAC/C,WAAY,CACZ,iBAAkB,CAClB,qBAAsB,CACtB,WAAY,CACZ,eAAiB,CACjB,+BAAgC,CAChC,cAAe,CACf,YAAa,CACb,kBAAmB,CACnB,sBAAuB,CACvB,yCACF,CAEA,6CACE,kBACF,CAEA,+CACE,WAAY,CACZ,WAAY,CACZ,kBAAmB,CACnB,YAAa,CACb,sBACF,CAMA,oGACE,WACF,CAEA,+CACE,WACF,CAEA,2CACE,cACF,CAEA,yDACE,cACF,CAEA,+CACE,4BAAiC,CACjC,UACF,CAEA,+DACE,cACF,CAEA,4DACE,cACF","file":"index.css","sourcesContent":["/*!\n * \n * react-simple-keyboard v2.4.1\n * https://github.com/hodgef/react-simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\n/*!\n * \n * simple-keyboard v2.30.1\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */.hg-theme-default{width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden;touch-action:manipulation}.hg-theme-default .hg-button span{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;outline:0;font-size:inherit}.hg-theme-default{font-family:\"HelveticaNeue-Light\",\"Helvetica Neue Light\",\"Helvetica Neue\",Helvetica,Arial,\"Lucida Grande\",sans-serif;background-color:#ececec;padding:5px;border-radius:5px}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{box-shadow:0 0 3px -1px rgba(0,0,0,.3);height:40px;border-radius:5px;box-sizing:border-box;padding:5px;background:#fff;border-bottom:1px solid #b5b5b5;cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;align-items:center;display:flex;justify-content:center}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"]{max-width:60px}\n/*# sourceMappingURL=index.css.map */\n","/*!\n * \n * simple-keyboard v2.30.1\n * https://github.com/hodgef/simple-keyboard\n * \n * Copyright (c) Francisco Hodge (https://github.com/hodgef)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\n/**\n * simple-keyboard\n * Theme: hg-theme-default\n */\n.hg-theme-default {\n width: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-sizing: border-box;\n overflow: hidden;\n touch-action: manipulation;\n}\n\n.hg-theme-default .hg-button span {\n pointer-events: none;\n}\n\n/* When using option \"useButtonTag\" */\n.hg-theme-default button.hg-button {\n border-width: 0;\n outline: 0;\n font-size: inherit;\n}\n\n.hg-theme-default {\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\n background-color: #ececec;\n padding: 5px;\n border-radius: 5px;\n}\n\n.hg-theme-default .hg-button {\n display: inline-block;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.hg-theme-default .hg-row {\n display: flex;\n}\n\n.hg-theme-default .hg-row:not(:last-child) {\n margin-bottom: 5px;\n}\n\n.hg-theme-default .hg-row .hg-button:not(:last-child) {\n margin-right: 5px;\n}\n\n.hg-theme-default .hg-row .hg-button-container {\n margin-right: 5px;\n}\n\n.hg-theme-default .hg-row > div:last-child {\n margin-right: 0;\n}\n\n.hg-theme-default .hg-row .hg-button-container {\n display: flex;\n}\n\n.hg-theme-default .hg-button {\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\n height: 40px;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 5px;\n background: white;\n border-bottom: 1px solid #b5b5b5;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.hg-theme-default .hg-button.hg-activeButton {\n background: #efefef;\n}\n\n.hg-theme-default.hg-layout-numeric .hg-button {\n width: 33.3%;\n height: 60px;\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.hg-theme-default .hg-button.hg-button-numpadadd {\n height: 85px;\n}\n\n.hg-theme-default .hg-button.hg-button-numpadenter {\n height: 85px;\n}\n\n.hg-theme-default .hg-button.hg-button-numpad0 {\n width: 105px;\n}\n\n.hg-theme-default .hg-button.hg-button-com {\n max-width: 85px;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\n max-width: 45px;\n}\n\n.hg-theme-default .hg-button.hg-selectedButton {\n background: rgba(5, 25, 70, 0.53);\n color: white;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\n max-width: 82px;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\n max-width: 60px;\n}\n\n","/**\n * simple-keyboard\n * Theme: hg-theme-default\n */\n.hg-theme-default {\n width: 100%;\n user-select: none;\n box-sizing: border-box;\n overflow: hidden;\n touch-action: manipulation;\n}\n\n.hg-theme-default .hg-button span {\n pointer-events: none;\n}\n\n/* When using option \"useButtonTag\" */\n.hg-theme-default button.hg-button {\n border-width: 0;\n outline: 0;\n font-size: inherit;\n}\n\n.hg-theme-default {\n font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\",\n Helvetica, Arial, \"Lucida Grande\", sans-serif;\n background-color: #ececec;\n padding: 5px;\n border-radius: 5px;\n}\n\n.hg-theme-default .hg-button {\n display: inline-block;\n flex-grow: 1;\n cursor: pointer;\n}\n\n.hg-theme-default .hg-row {\n display: flex;\n}\n\n.hg-theme-default .hg-row:not(:last-child) {\n margin-bottom: 5px;\n}\n\n.hg-theme-default .hg-row .hg-button:not(:last-child) {\n margin-right: 5px;\n}\n\n.hg-theme-default .hg-row .hg-button-container {\n margin-right: 5px;\n}\n\n.hg-theme-default .hg-row > div:last-child {\n margin-right: 0;\n}\n\n.hg-theme-default .hg-row .hg-button-container {\n display: flex;\n}\n\n.hg-theme-default .hg-button {\n box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);\n height: 40px;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 5px;\n background: white;\n border-bottom: 1px solid #b5b5b5;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.hg-theme-default .hg-button.hg-activeButton {\n background: #efefef;\n}\n\n.hg-theme-default.hg-layout-numeric .hg-button {\n width: 33.3%;\n height: 60px;\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.hg-theme-default .hg-button.hg-button-numpadadd {\n height: 85px;\n}\n\n.hg-theme-default .hg-button.hg-button-numpadenter {\n height: 85px;\n}\n\n.hg-theme-default .hg-button.hg-button-numpad0 {\n width: 105px;\n}\n\n.hg-theme-default .hg-button.hg-button-com {\n max-width: 85px;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {\n max-width: 45px;\n}\n\n.hg-theme-default .hg-button.hg-selectedButton {\n background: rgba(5, 25, 70, 0.53);\n color: white;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\".com\"] {\n max-width: 82px;\n}\n\n.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=\"@\"] {\n max-width: 60px;\n}\n"]} \ No newline at end of file diff --git a/build/index.js b/build/index.js index 861798c81..bc012a3d9 100644 --- a/build/index.js +++ b/build/index.js @@ -1,6 +1,6 @@ /*! * - * react-simple-keyboard v2.4.0 + * react-simple-keyboard v2.4.1 * https://github.com/hodgef/react-simple-keyboard * * Copyright (c) Francisco Hodge (https://github.com/hodgef) diff --git a/build/index.js.map b/build/index.js.map index be82ee4f8..85c6300bd 100644 --- a/build/index.js.map +++ b/build/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../webpack/universalModuleDefinition","../../webpack/bootstrap","../../external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","../../../../webpack/universalModuleDefinition","../../../../webpack/bootstrap","../../services/Utilities.js","../../services/PhysicalKeyboard.js","../../components/Keyboard.js","../../services/KeyboardLayout.js","../../index.js","../../node_modules/prop-types/index.js","../../node_modules/webpack/buildin/module.js","../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/typeof.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","services/Utilities.js","components/Keyboard.js","index.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE__0__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Utilities","getOptions","getCaretPosition","getCaretPositionEnd","dispatch","bindMethods","myClass","instance","getOwnPropertyNames","myMethod","button","buttonTypeClass","includes","buttonWithoutBraces","replace","buttonNormalized","display","mergeDisplay","assign","getDefaultDiplay","input","caretPos","caretPosEnd","moveCaret","options","commonParams","output","length","removeAt","addStringAt","tabCharOnTab","newLineOnEnter","Number","isInteger","minus","newCaretPos","updateCaretPosAction","setCaretPosition","caretPosition","debug","console","log","keyboardDOMClass","source","str","position","positionEnd","slice","join","isMaxLengthReached","updateCaretPos","emojiMatchedReg","substring","match","substr","inputObj","updatedInput","maxLength","currentInput","inputName","condition","maxLengthReached","Boolean","window","navigator","maxTouchPoints","PointerEvent","toLowerCase","trim","split","reduce","word","toUpperCase","PhysicalKeyboard","event","buttonPressed","getSimpleKeyboardLayoutKey","buttonDOM","getButtonElement","style","backgroundColor","physicalKeyboardHighlightBgColor","color","physicalKeyboardHighlightTextColor","removeAttribute","code","SimpleKeyboard","keyboardDOM","params","document","querySelector","HTMLDivElement","className","warn","Error","caretPositionEnd","initCallback","baseDOMClasses","keyboardClasses","filter","DOMClass","handleParams","utilities","layoutName","theme","preventMouseDownDefault","keyboardPluginClasses","buttonElements","currentInstanceName","camelCase","allKeyboardInstances","keyboardInstanceNames","keys","isFirstKeyboardInstance","physicalKeyboard","render","loadModules","endPosition","onKeyPress","getUpdatedInput","inputPattern","inputPatternIsValid","handleMaxLength","syncInstanceInputs","onChange","onChangeAll","e","preventDefault","stopMouseDownPropagation","stopPropagation","target","classList","add","activeButtonClass","holdInteractionTimeout","clearTimeout","holdTimeout","isMouseHold","disableButtonHold","setTimeout","handleButtonHold","recurseButtons","buttonElement","remove","onKeyReleased","handleButtonClicked","replaceInput","changedOptions","onSetOptions","newOptions","JSON","stringify","optionName","innerHTML","callback","forEach","buttons","buttonTheme","classNameFound","map","class","classNameItem","buttonThemeArray","push","Array","isArray","index","filteredButtonArray","item","splice","buttonArr","inputVal","inputPatternRaw","RegExp","didInputMatch","test","useTouchEvents","useMouseEvents","onkeyup","handleKeyUp","onkeydown","handleKeyDown","pointerEventsSupported","ontouchstart","handlePointerDown","ontouchend","handlePointerUp","ontouchcancel","handleKeyboardContainerMouseDown","onmousedown","onmouseup","onpointerdown","onpointerup","onpointercancel","caretEventHandler","physicalKeyboardHighlight","handleHighlightKeyUp","handleHighlightKeyDown","handleButtonMouseUp","targetTagName","disableCaretPositioning","tagName","isKeyboard","contains","selectionStart","selectionEnd","fn","buttonName","deleteButton","onclick","clear","initialized","buttonClasses","themeObj","themeObjClasses","buttonAttributes","attrObj","attribute","processAutoTouchEvents","disableContextualWindow","oncontextmenu","autoUseTouchEvents","setEventListeners","onInit","isTouchDevice","onTouchDeviceDetected","beforeFirstRender","beforeRender","onRender","onModulesLoaded","keyboardModule","KeyboardModule","constructor","classStr","init","prop","rowDOM","rowIndex","containerStartIndexes","containerEndIndexes","rowDOMArray","from","children","removedElements","startIndex","arrIndex","endIndex","updated_startIndex","updated_endIndex","containerDOM","createElement","containerUID","setAttribute","containedElements","appendChild","element","layoutClass","layout","default","shift","useTouchEventsClass","disableRowButtonContainers","getKeyboardClassString","row","rIndex","rowArray","bIndex","buttonHasContainerStart","indexOf","buttonHasContainerEnd","fctBtnClass","getButtonClass","buttonDisplayName","getButtonDisplayName","buttonType","useButtonTag","b","getButtonThemeClasses","setDOMButtonAttributes","handleButtonMouseDown","buttonUID","buttonSpanDOM","parseRowDOMContainers","webpackPolyfill","deprecate","paths","_typeof","obj","iterator","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","getShim","isRequired","ReactPropTypes","array","bool","func","number","string","symbol","any","arrayOf","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","cleanProps","sourceObj","keyboardRef","stateToIgnore","KeyboardReact","cssClass","baseClass","initRef","useRef","previousProps","useEffect","parsedProps","parseProps","current","Keyboard","updatedProps","prevProps","cleanedProps","cleanedPrevProps","changedProps","keyboard","setOptions","propTypes"],"mappings":";;;;;;;;;;;CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,UACR,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,sBAAuB,CAAC,SAAUJ,GACf,kBAAZC,QACdA,QAA6B,oBAAID,EAAQG,QAAQ,UAEjDJ,EAA0B,oBAAIC,EAAQD,EAAY,OARpD,CASGO,MAAM,SAASC,GAClB,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,oBAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHX,QAAS,IAUV,OANAY,EAAQH,GAAUI,KAAKZ,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,qBAG/DP,EAAOU,GAAI,EAGJV,EAAOD,QA0Df,OArDAQ,oBAAoBM,EAAIF,EAGxBJ,oBAAoBO,EAAIR,EAGxBC,oBAAoBQ,EAAI,SAAShB,EAASiB,EAAMC,GAC3CV,oBAAoBW,EAAEnB,EAASiB,IAClCG,OAAOC,eAAerB,EAASiB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,oBAAoBgB,EAAI,SAASxB,GACX,qBAAXyB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAerB,EAASyB,OAAOC,YAAa,CAAEC,MAA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SAAUd,QACVe,MAAOf,QACPgB,UAAWhB,QACXiB,MAAOjB,QACPkB,MAAOlB,QAEPmB,eAAgB7B,uBAChBC,kBAAmBF,eAKrB,OAFAa,EAAekB,UAAYlB,EAEpBA,I,6BCnDTxV,EAAOD,QAFoB,gD,20BCTpB,IAKD4W,WAAa,SAAAC,GAAS,sCACvBA,GADuB,IAE1BC,YAAa,KACbC,cAAe,Q,gBCFXC,G,KAAgB,SAAAhC,GACpB,IAAMiC,EAAWjC,EAAMkC,WAAa,wBAC9BC,EAAUC,mBACVN,EAAcM,mBACdC,EAAgBD,iBAAOpC,GAgC7B,OA9BAsC,qBAAU,WACR,IAAMC,EDbgB,SAAAvC,GAAK,sCAC1BA,GAD0B,IAE7B9L,MAAM,mBAAD,OAAqB8L,EAAM9L,OAAS,sBCWnBsO,CAAWxC,GAK1BmC,EAAQM,UACXN,EAAQM,SAAU,EAClBF,EAAYtS,OAASC,QAAQC,IAAI,6BACjC2R,EAAYW,QAAU,IAAIC,IAAJ,WAAiBT,GAAYM,GACnDA,EAAYT,aAAeS,EAAYT,YAAYA,EAAYW,UAGjE,IAAME,EDdkB,SAACC,EAAW5C,GACtC,IAAM6C,EAAejB,WAAW5B,GAC1B8C,EAAmBlB,WAAWgB,GAEpC,OAAOxW,OAAOsI,KAAKmO,GAAchP,QAC/B,SAAAoM,GAAQ,OAAI4C,EAAa5C,KAAc6C,EAAiB7C,MCSnC8C,CAAaV,EAAcI,QAASF,GAKzD,GAAII,EAAatT,OAAQ,CACvB,IAAM2T,EAAWlB,EAAYW,QAC7BJ,EAAcI,QAAUF,EACxBS,EAASC,WAAWV,GACpBA,EAAYtS,OACVC,QAAQC,IACN,gEACAwS,MAGL,CAACR,EAASF,EAAUI,EAAerC,IAE/B,yBAAK1M,UAAW2O,MAGzBD,EAAckB,UAAY,CACxBhB,UAAWP,IAAUb,QAGRkB,QC/CAU","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"ReactSimpleKeyboard\", [\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactSimpleKeyboard\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"ReactSimpleKeyboard\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__0__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"SimpleKeyboard\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SimpleKeyboard\"] = factory();\n\telse\n\t\troot[\"SimpleKeyboard\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/**\n * Utility Service\n */\nclass Utilities {\n /**\n * Creates an instance of the Utility service\n */\n constructor({ getOptions, getCaretPosition, getCaretPositionEnd, dispatch }) {\n this.getOptions = getOptions;\n this.getCaretPosition = getCaretPosition;\n this.getCaretPositionEnd = getCaretPositionEnd;\n this.dispatch = dispatch;\n\n /**\n * Bindings\n */\n Utilities.bindMethods(Utilities, this);\n }\n\n /**\n * Adds default classes to a given button\n *\n * @param {string} button The button's layout name\n * @return {string} The classes to be added to the button\n */\n getButtonClass(button) {\n const buttonTypeClass =\n button.includes(\"{\") && button.includes(\"}\") && button !== \"{//}\"\n ? \"functionBtn\"\n : \"standardBtn\";\n const buttonWithoutBraces = button.replace(\"{\", \"\").replace(\"}\", \"\");\n let buttonNormalized = \"\";\n\n if (buttonTypeClass !== \"standardBtn\")\n buttonNormalized = ` hg-button-${buttonWithoutBraces}`;\n\n return `hg-${buttonTypeClass}${buttonNormalized}`;\n }\n\n /**\n * Default button display labels\n */\n getDefaultDiplay() {\n return {\n \"{bksp}\": \"backspace\",\n \"{backspace}\": \"backspace\",\n \"{enter}\": \"< enter\",\n \"{shift}\": \"shift\",\n \"{shiftleft}\": \"shift\",\n \"{shiftright}\": \"shift\",\n \"{alt}\": \"alt\",\n \"{s}\": \"shift\",\n \"{tab}\": \"tab\",\n \"{lock}\": \"caps\",\n \"{capslock}\": \"caps\",\n \"{accept}\": \"Submit\",\n \"{space}\": \" \",\n \"{//}\": \" \",\n \"{esc}\": \"esc\",\n \"{escape}\": \"esc\",\n \"{f1}\": \"f1\",\n \"{f2}\": \"f2\",\n \"{f3}\": \"f3\",\n \"{f4}\": \"f4\",\n \"{f5}\": \"f5\",\n \"{f6}\": \"f6\",\n \"{f7}\": \"f7\",\n \"{f8}\": \"f8\",\n \"{f9}\": \"f9\",\n \"{f10}\": \"f10\",\n \"{f11}\": \"f11\",\n \"{f12}\": \"f12\",\n \"{numpaddivide}\": \"/\",\n \"{numlock}\": \"lock\",\n \"{arrowup}\": \"↑\",\n \"{arrowleft}\": \"←\",\n \"{arrowdown}\": \"↓\",\n \"{arrowright}\": \"→\",\n \"{prtscr}\": \"print\",\n \"{scrolllock}\": \"scroll\",\n \"{pause}\": \"pause\",\n \"{insert}\": \"ins\",\n \"{home}\": \"home\",\n \"{pageup}\": \"up\",\n \"{delete}\": \"del\",\n \"{end}\": \"end\",\n \"{pagedown}\": \"down\",\n \"{numpadmultiply}\": \"*\",\n \"{numpadsubtract}\": \"-\",\n \"{numpadadd}\": \"+\",\n \"{numpadenter}\": \"enter\",\n \"{period}\": \".\",\n \"{numpaddecimal}\": \".\",\n \"{numpad0}\": \"0\",\n \"{numpad1}\": \"1\",\n \"{numpad2}\": \"2\",\n \"{numpad3}\": \"3\",\n \"{numpad4}\": \"4\",\n \"{numpad5}\": \"5\",\n \"{numpad6}\": \"6\",\n \"{numpad7}\": \"7\",\n \"{numpad8}\": \"8\",\n \"{numpad9}\": \"9\"\n };\n }\n /**\n * Returns the display (label) name for a given button\n *\n * @param {string} button The button's layout name\n * @param {object} display The provided display option\n * @param {boolean} mergeDisplay Whether the provided param value should be merged with the default one.\n */\n getButtonDisplayName(button, display, mergeDisplay) {\n if (mergeDisplay) {\n display = Object.assign({}, this.getDefaultDiplay(), display);\n } else {\n display = display || this.getDefaultDiplay();\n }\n\n return display[button] || button;\n }\n\n /**\n * Returns the updated input resulting from clicking a given button\n *\n * @param {string} button The button's layout name\n * @param {string} input The input string\n * @param {number} caretPos The cursor's current position\n * @param {number} caretPosEnd The cursor's current end position\n * @param {boolean} moveCaret Whether to update simple-keyboard's cursor\n */\n getUpdatedInput(\n button,\n input,\n caretPos,\n caretPosEnd = caretPos,\n moveCaret = false\n ) {\n const options = this.getOptions();\n const commonParams = [caretPos, caretPosEnd, moveCaret];\n\n let output = input;\n\n if (\n (button === \"{bksp}\" || button === \"{backspace}\") &&\n output.length > 0\n ) {\n output = this.removeAt(output, ...commonParams);\n } else if (button === \"{space}\")\n output = this.addStringAt(output, \" \", ...commonParams);\n else if (\n button === \"{tab}\" &&\n !(\n typeof options.tabCharOnTab === \"boolean\" &&\n options.tabCharOnTab === false\n )\n ) {\n output = this.addStringAt(output, \"\\t\", ...commonParams);\n } else if (\n (button === \"{enter}\" || button === \"{numpadenter}\") &&\n options.newLineOnEnter\n )\n output = this.addStringAt(output, \"\\n\", ...commonParams);\n else if (\n button.includes(\"numpad\") &&\n Number.isInteger(Number(button[button.length - 2]))\n ) {\n output = this.addStringAt(\n output,\n button[button.length - 2],\n ...commonParams\n );\n } else if (button === \"{numpaddivide}\")\n output = this.addStringAt(output, \"/\", ...commonParams);\n else if (button === \"{numpadmultiply}\")\n output = this.addStringAt(output, \"*\", ...commonParams);\n else if (button === \"{numpadsubtract}\")\n output = this.addStringAt(output, \"-\", ...commonParams);\n else if (button === \"{numpadadd}\")\n output = this.addStringAt(output, \"+\", ...commonParams);\n else if (button === \"{numpaddecimal}\")\n output = this.addStringAt(output, \".\", ...commonParams);\n else if (button === \"{\" || button === \"}\")\n output = this.addStringAt(output, button, ...commonParams);\n else if (!button.includes(\"{\") && !button.includes(\"}\"))\n output = this.addStringAt(output, button, ...commonParams);\n\n return output;\n }\n\n /**\n * Moves the cursor position by a given amount\n *\n * @param {number} length Represents by how many characters the input should be moved\n * @param {boolean} minus Whether the cursor should be moved to the left or not.\n */\n updateCaretPos(length, minus) {\n const newCaretPos = this.updateCaretPosAction(length, minus);\n\n this.dispatch(instance => {\n instance.setCaretPosition(newCaretPos);\n });\n }\n\n /**\n * Action method of updateCaretPos\n *\n * @param {number} length Represents by how many characters the input should be moved\n * @param {boolean} minus Whether the cursor should be moved to the left or not.\n */\n updateCaretPosAction(length, minus) {\n const options = this.getOptions();\n let caretPosition = this.getCaretPosition();\n\n if (minus) {\n if (caretPosition > 0) caretPosition = caretPosition - length;\n } else {\n caretPosition = caretPosition + length;\n }\n\n if (options.debug) {\n console.log(\"Caret at:\", caretPosition, `(${this.keyboardDOMClass})`);\n }\n\n return caretPosition;\n }\n\n /**\n * Adds a string to the input at a given position\n *\n * @param {string} source The source input\n * @param {string} str The string to add\n * @param {number} position The (cursor) position where the string should be added\n * @param {boolean} moveCaret Whether to update simple-keyboard's cursor\n */\n addStringAt(\n source,\n str,\n position = source.length,\n positionEnd = source.length,\n moveCaret = false\n ) {\n let output;\n\n if (!position && position !== 0) {\n output = source + str;\n } else {\n output = [source.slice(0, position), str, source.slice(positionEnd)].join(\n \"\"\n );\n\n /**\n * Avoid caret position change when maxLength is set\n */\n if (!this.isMaxLengthReached()) {\n if (moveCaret) this.updateCaretPos(str.length);\n }\n }\n\n return output;\n }\n\n /**\n * Removes an amount of characters at a given position\n *\n * @param {string} source The source input\n * @param {number} position The (cursor) position from where the characters should be removed\n * @param {boolean} moveCaret Whether to update simple-keyboard's cursor\n */\n removeAt(\n source,\n position = source.length,\n positionEnd = source.length,\n moveCaret = false\n ) {\n if (position === 0 && positionEnd === 0) {\n return source;\n }\n\n let output;\n\n if (position === positionEnd) {\n let prevTwoChars;\n let emojiMatched;\n const emojiMatchedReg = /([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])/g;\n\n /**\n * Emojis are made out of two characters, so we must take a custom approach to trim them.\n * For more info: https://mathiasbynens.be/notes/javascript-unicode\n */\n if (position && position >= 0) {\n prevTwoChars = source.substring(position - 2, position);\n emojiMatched = prevTwoChars.match(emojiMatchedReg);\n\n if (emojiMatched) {\n output = source.substr(0, position - 2) + source.substr(position);\n if (moveCaret) this.updateCaretPos(2, true);\n } else {\n output = source.substr(0, position - 1) + source.substr(position);\n if (moveCaret) this.updateCaretPos(1, true);\n }\n } else {\n prevTwoChars = source.slice(-2);\n emojiMatched = prevTwoChars.match(emojiMatchedReg);\n\n if (emojiMatched) {\n output = source.slice(0, -2);\n if (moveCaret) this.updateCaretPos(2, true);\n } else {\n output = source.slice(0, -1);\n if (moveCaret) this.updateCaretPos(1, true);\n }\n }\n } else {\n output = source.slice(0, position) + source.slice(positionEnd);\n if (moveCaret) {\n this.dispatch(instance => {\n instance.setCaretPosition(position);\n });\n }\n }\n\n return output;\n }\n /**\n * Determines whether the maxLength has been reached. This function is called when the maxLength option it set.\n *\n * @param {object} inputObj\n * @param {string} updatedInput\n */\n handleMaxLength(inputObj, updatedInput) {\n const options = this.getOptions();\n const maxLength = options.maxLength;\n const currentInput = inputObj[options.inputName];\n const condition = updatedInput.length - 1 >= maxLength;\n\n if (\n /**\n * If pressing this button won't add more characters\n * We exit out of this limiter function\n */\n updatedInput.length <= currentInput.length\n ) {\n return false;\n }\n\n if (Number.isInteger(maxLength)) {\n if (options.debug) {\n console.log(\"maxLength (num) reached:\", condition);\n }\n\n if (condition) {\n /**\n * @type {boolean} Boolean value that shows whether maxLength has been reached\n */\n this.maxLengthReached = true;\n return true;\n } else {\n this.maxLengthReached = false;\n return false;\n }\n }\n\n if (typeof maxLength === \"object\") {\n const condition = currentInput.length === maxLength[options.inputName];\n\n if (options.debug) {\n console.log(\"maxLength (obj) reached:\", condition);\n }\n\n if (condition) {\n this.maxLengthReached = true;\n return true;\n } else {\n this.maxLengthReached = false;\n return false;\n }\n }\n }\n\n /**\n * Gets the current value of maxLengthReached\n */\n isMaxLengthReached() {\n return Boolean(this.maxLengthReached);\n }\n\n /**\n * Determines whether a touch device is being used\n */\n isTouchDevice() {\n return \"ontouchstart\" in window || navigator.maxTouchPoints;\n }\n\n /**\n * Determines whether pointer events are supported\n */\n pointerEventsSupported() {\n return window.PointerEvent;\n }\n\n /**\n * Bind all methods in a given class\n */\n\n static bindMethods(myClass, instance) {\n // eslint-disable-next-line no-unused-vars\n for (const myMethod of Object.getOwnPropertyNames(myClass.prototype)) {\n const excludeMethod =\n myMethod === \"constructor\" || myMethod === \"bindMethods\";\n if (!excludeMethod) {\n instance[myMethod] = instance[myMethod].bind(instance);\n }\n }\n }\n\n /**\n * Transforms an arbitrary string to camelCase\n *\n * @param {string} str The string to transform.\n */\n camelCase(str) {\n if (!str) return false;\n\n return str\n .toLowerCase()\n .trim()\n .split(/[.\\-_\\s]/g)\n .reduce((str, word) =>\n word.length ? str + word[0].toUpperCase() + word.slice(1) : str\n );\n }\n}\n\nexport default Utilities;\n","import Utilities from \"../services/Utilities\";\n\n/**\n * Physical Keyboard Service\n */\nclass PhysicalKeyboard {\n /**\n * Creates an instance of the PhysicalKeyboard service\n */\n constructor({ dispatch, getOptions }) {\n /**\n * @type {object} A simple-keyboard instance\n */\n this.dispatch = dispatch;\n this.getOptions = getOptions;\n\n /**\n * Bindings\n */\n Utilities.bindMethods(PhysicalKeyboard, this);\n }\n\n handleHighlightKeyDown(event) {\n const options = this.getOptions();\n const buttonPressed = this.getSimpleKeyboardLayoutKey(event);\n\n this.dispatch(instance => {\n const buttonDOM =\n instance.getButtonElement(buttonPressed) ||\n instance.getButtonElement(`{${buttonPressed}}`);\n\n if (buttonDOM) {\n buttonDOM.style.backgroundColor =\n options.physicalKeyboardHighlightBgColor || \"#dadce4\";\n buttonDOM.style.color =\n options.physicalKeyboardHighlightTextColor || \"black\";\n }\n });\n }\n\n handleHighlightKeyUp(event) {\n const buttonPressed = this.getSimpleKeyboardLayoutKey(event);\n\n this.dispatch(instance => {\n const buttonDOM =\n instance.getButtonElement(buttonPressed) ||\n instance.getButtonElement(`{${buttonPressed}}`);\n\n if (buttonDOM && buttonDOM.removeAttribute) {\n buttonDOM.removeAttribute(\"style\");\n }\n });\n }\n\n /**\n * Transforms a KeyboardEvent's \"key.code\" string into a simple-keyboard layout format\n * @param {object} event The KeyboardEvent\n */\n getSimpleKeyboardLayoutKey(event) {\n let output;\n\n if (\n event.code.includes(\"Numpad\") ||\n event.code.includes(\"Shift\") ||\n event.code.includes(\"Space\") ||\n event.code.includes(\"Backspace\") ||\n event.code.includes(\"Control\") ||\n event.code.includes(\"Alt\") ||\n event.code.includes(\"Meta\")\n ) {\n output = event.code;\n } else {\n output = event.key;\n }\n\n /**\n * If button is not uppercase, casting to lowercase\n */\n if (\n output !== output.toUpperCase() ||\n (event.code[0] === \"F\" &&\n Number.isInteger(Number(event.code[1])) &&\n event.code.length <= 3)\n ) {\n output = output.toLowerCase();\n }\n\n return output;\n }\n}\n\nexport default PhysicalKeyboard;\n","import \"./Keyboard.css\";\n\n// Services\nimport { getDefaultLayout } from \"../services/KeyboardLayout\";\nimport PhysicalKeyboard from \"../services/PhysicalKeyboard\";\nimport Utilities from \"../services/Utilities\";\n\n/**\n * Root class for simple-keyboard\n * This class:\n * - Parses the options\n * - Renders the rows and buttons\n * - Handles button functionality\n */\nclass SimpleKeyboard {\n /**\n * Creates an instance of SimpleKeyboard\n * @param {Array} params If first parameter is a string, it is considered the container class. The second parameter is then considered the options object. If first parameter is an object, it is considered the options object.\n */\n constructor(...params) {\n const { keyboardDOMClass, keyboardDOM, options = {} } = this.handleParams(\n params\n );\n\n /**\n * Initializing Utilities\n */\n this.utilities = new Utilities({\n getOptions: this.getOptions,\n getCaretPosition: this.getCaretPosition,\n getCaretPositionEnd: this.getCaretPositionEnd,\n dispatch: this.dispatch\n });\n\n /**\n * Caret position\n */\n this.caretPosition = null;\n\n /**\n * Caret position end\n */\n this.caretPositionEnd = null;\n\n /**\n * Processing options\n */\n this.keyboardDOM = keyboardDOM;\n\n /**\n * @type {object}\n * @property {object} layout Modify the keyboard layout.\n * @property {string} layoutName Specifies which layout should be used.\n * @property {object} display Replaces variable buttons (such as {bksp}) with a human-friendly name (e.g.: “backspace”).\n * @property {boolean} mergeDisplay By default, when you set the display property, you replace the default one. This setting merges them instead.\n * @property {string} theme A prop to add your own css classes to the keyboard wrapper. You can add multiple classes separated by a space.\n * @property {array} buttonTheme A prop to add your own css classes to one or several buttons.\n * @property {array} buttonAttributes A prop to add your own attributes to one or several buttons.\n * @property {boolean} debug Runs a console.log every time a key is pressed. Displays the buttons pressed and the current input.\n * @property {boolean} newLineOnEnter Specifies whether clicking the “ENTER” button will input a newline (\\n) or not.\n * @property {boolean} tabCharOnTab Specifies whether clicking the “TAB” button will input a tab character (\\t) or not.\n * @property {string} inputName Allows you to use a single simple-keyboard instance for several inputs.\n * @property {number} maxLength Restrains all of simple-keyboard inputs to a certain length. This should be used in addition to the input element’s maxlengthattribute.\n * @property {object} maxLength Restrains simple-keyboard’s individual inputs to a certain length. This should be used in addition to the input element’s maxlengthattribute.\n * @property {boolean} syncInstanceInputs When set to true, this option synchronizes the internal input of every simple-keyboard instance.\n * @property {boolean} physicalKeyboardHighlight Enable highlighting of keys pressed on physical keyboard.\n * @property {boolean} preventMouseDownDefault Calling preventDefault for the mousedown events keeps the focus on the input.\n * @property {boolean} stopMouseDownPropagation Stops pointer down events on simple-keyboard buttons from bubbling to parent elements.\n * @property {string} physicalKeyboardHighlightTextColor Define the text color that the physical keyboard highlighted key should have.\n * @property {string} physicalKeyboardHighlightBgColor Define the background color that the physical keyboard highlighted key should have.\n * @property {function(button: string):string} onKeyPress Executes the callback function on key press. Returns button layout name (i.e.: “{shift}”).\n * @property {function(input: string):string} onChange Executes the callback function on input change. Returns the current input’s string.\n * @property {function} onRender Executes the callback function every time simple-keyboard is rendered (e.g: when you change layouts).\n * @property {function} onInit Executes the callback function once simple-keyboard is rendered for the first time (on initialization).\n * @property {function(inputs: object):object} onChangeAll Executes the callback function on input change. Returns the input object with all defined inputs.\n * @property {boolean} useButtonTag Render buttons as a button element instead of a div element.\n * @property {boolean} disableCaretPositioning A prop to ensure characters are always be added/removed at the end of the string.\n * @property {object} inputPattern Restrains input(s) change to the defined regular expression pattern.\n * @property {boolean} useTouchEvents Instructs simple-keyboard to use touch events instead of click events.\n * @property {boolean} autoUseTouchEvents Enable useTouchEvents automatically when touch device is detected.\n * @property {boolean} useMouseEvents Opt out of PointerEvents handling, falling back to the prior mouse event logic.\n * @property {function} destroy Clears keyboard listeners and DOM elements.\n * @property {boolean} disableButtonHold Disable button hold action.\n * @property {function} onKeyReleased Executes the callback function on key release.\n * @property {array} modules Module classes to be loaded by simple-keyboard.\n */\n this.options = options;\n this.options.layoutName = this.options.layoutName || \"default\";\n this.options.theme = this.options.theme || \"hg-theme-default\";\n this.options.inputName = this.options.inputName || \"default\";\n this.options.preventMouseDownDefault =\n this.options.preventMouseDownDefault || false;\n\n /**\n * @type {object} Classes identifying loaded plugins\n */\n this.keyboardPluginClasses = \"\";\n\n /**\n * Bindings\n */\n Utilities.bindMethods(SimpleKeyboard, this);\n\n /**\n * simple-keyboard uses a non-persistent internal input to keep track of the entered string (the variable `keyboard.input`).\n * This removes any dependency to input DOM elements. You can type and directly display the value in a div element, for example.\n * @example\n * // To get entered input\n * const input = keyboard.getInput();\n *\n * // To clear entered input.\n * keyboard.clearInput();\n *\n * @type {object}\n * @property {object} default Default SimpleKeyboard internal input.\n * @property {object} myInputName Example input that can be set through `options.inputName:\"myInputName\"`.\n */\n this.input = {};\n this.input[this.options.inputName] = \"\";\n\n /**\n * @type {string} DOM class of the keyboard wrapper, normally \"simple-keyboard\" by default.\n */\n this.keyboardDOMClass = keyboardDOMClass;\n\n /**\n * @type {object} Contains the DOM elements of every rendered button, the key being the button's layout name (e.g.: \"{enter}\").\n */\n this.buttonElements = {};\n\n /**\n * Simple-keyboard Instances\n * This enables multiple simple-keyboard support with easier management\n */\n if (!window[\"SimpleKeyboardInstances\"])\n window[\"SimpleKeyboardInstances\"] = {};\n\n this.currentInstanceName = this.utilities.camelCase(this.keyboardDOMClass);\n window[\"SimpleKeyboardInstances\"][this.currentInstanceName] = this;\n\n /**\n * Instance vars\n */\n this.allKeyboardInstances = window[\"SimpleKeyboardInstances\"];\n this.keyboardInstanceNames = Object.keys(window[\"SimpleKeyboardInstances\"]);\n this.isFirstKeyboardInstance =\n this.keyboardInstanceNames[0] === this.currentInstanceName;\n\n /**\n * Physical Keyboard support\n */\n this.physicalKeyboard = new PhysicalKeyboard({\n dispatch: this.dispatch,\n getOptions: this.getOptions\n });\n\n /**\n * Rendering keyboard\n */\n if (this.keyboardDOM) this.render();\n else {\n console.warn(`\".${keyboardDOMClass}\" was not found in the DOM.`);\n throw new Error(\"KEYBOARD_DOM_ERROR\");\n }\n\n /**\n * Modules\n */\n this.modules = {};\n this.loadModules();\n }\n\n /**\n * parseParams\n */\n handleParams = params => {\n let keyboardDOMClass;\n let keyboardDOM;\n let options;\n\n /**\n * If first parameter is a string:\n * Consider it as an element's class\n */\n if (typeof params[0] === \"string\") {\n keyboardDOMClass = params[0].split(\".\").join(\"\");\n keyboardDOM = document.querySelector(`.${keyboardDOMClass}`);\n options = params[1];\n\n /**\n * If first parameter is an HTMLDivElement\n * Consider it as the keyboard DOM element\n */\n } else if (params[0] instanceof HTMLDivElement) {\n /**\n * This element must have a class, otherwise throw\n */\n if (!params[0].className) {\n console.warn(\"Any DOM element passed as parameter must have a class.\");\n throw new Error(\"KEYBOARD_DOM_CLASS_ERROR\");\n }\n\n keyboardDOMClass = params[0].className.split(\" \")[0];\n keyboardDOM = params[0];\n options = params[1];\n\n /**\n * Otherwise, search for .simple-keyboard DOM element\n */\n } else {\n keyboardDOMClass = \"simple-keyboard\";\n keyboardDOM = document.querySelector(`.${keyboardDOMClass}`);\n options = params[0];\n }\n\n return {\n keyboardDOMClass,\n keyboardDOM,\n options\n };\n };\n\n /**\n * Getters\n */\n getOptions = () => this.options;\n getCaretPosition = () => this.caretPosition;\n getCaretPositionEnd = () => this.caretPositionEnd;\n\n /**\n * Setters\n */\n setCaretPosition(position, endPosition) {\n this.caretPosition = position;\n this.caretPositionEnd = endPosition || position;\n }\n\n /**\n * Handles clicks made to keyboard buttons\n * @param {string} button The button's layout name.\n */\n handleButtonClicked(button) {\n const debug = this.options.debug;\n\n /**\n * Ignoring placeholder buttons\n */\n if (button === \"{//}\") return false;\n\n /**\n * Calling onKeyPress\n */\n if (typeof this.options.onKeyPress === \"function\")\n this.options.onKeyPress(button);\n\n if (!this.input[this.options.inputName])\n this.input[this.options.inputName] = \"\";\n\n const updatedInput = this.utilities.getUpdatedInput(\n button,\n this.input[this.options.inputName],\n this.caretPosition,\n this.caretPositionEnd\n );\n\n if (\n // If input will change as a result of this button press\n this.input[this.options.inputName] !== updatedInput &&\n // This pertains to the \"inputPattern\" option:\n // If inputPattern isn't set\n (!this.options.inputPattern ||\n // Or, if it is set and if the pattern is valid - we proceed.\n (this.options.inputPattern && this.inputPatternIsValid(updatedInput)))\n ) {\n /**\n * If maxLength and handleMaxLength yield true, halting\n */\n if (\n this.options.maxLength &&\n this.utilities.handleMaxLength(this.input, updatedInput)\n ) {\n return false;\n }\n\n this.input[this.options.inputName] = this.utilities.getUpdatedInput(\n button,\n this.input[this.options.inputName],\n this.caretPosition,\n this.caretPositionEnd,\n true\n );\n\n if (debug) console.log(\"Input changed:\", this.input);\n\n if (this.options.debug) {\n console.log(\n \"Caret at: \",\n this.getCaretPosition(),\n this.getCaretPositionEnd(),\n `(${this.keyboardDOMClass})`\n );\n }\n\n /**\n * Enforce syncInstanceInputs, if set\n */\n if (this.options.syncInstanceInputs) this.syncInstanceInputs();\n\n /**\n * Calling onChange\n */\n if (typeof this.options.onChange === \"function\")\n this.options.onChange(this.input[this.options.inputName]);\n\n /**\n * Calling onChangeAll\n */\n if (typeof this.options.onChangeAll === \"function\")\n this.options.onChangeAll(this.input);\n }\n\n if (debug) {\n console.log(\"Key pressed:\", button);\n }\n }\n\n /**\n * Handles button mousedown\n */\n /* istanbul ignore next */\n handleButtonMouseDown(button, e) {\n /**\n * Handle event options\n */\n if (this.options.preventMouseDownDefault) e.preventDefault();\n if (this.options.stopMouseDownPropagation) e.stopPropagation();\n\n /**\n * Add active class\n */\n if (e) e.target.classList.add(this.activeButtonClass);\n\n if (this.holdInteractionTimeout) clearTimeout(this.holdInteractionTimeout);\n if (this.holdTimeout) clearTimeout(this.holdTimeout);\n\n /**\n * @type {boolean} Whether the mouse is being held onKeyPress\n */\n this.isMouseHold = true;\n\n /**\n * @type {object} Time to wait until a key hold is detected\n */\n if (!this.options.disableButtonHold) {\n this.holdTimeout = setTimeout(() => {\n if (\n (this.isMouseHold &&\n // TODO: This needs to be configurable through options\n ((!button.includes(\"{\") && !button.includes(\"}\")) ||\n button === \"{delete}\" ||\n button === \"{backspace}\" ||\n button === \"{bksp}\" ||\n button === \"{space}\" ||\n button === \"{tab}\")) ||\n button === \"{arrowright}\" ||\n button === \"{arrowleft}\" ||\n button === \"{arrowup}\" ||\n button === \"{arrowdown}\"\n ) {\n if (this.options.debug) console.log(\"Button held:\", button);\n\n this.handleButtonHold(button, e);\n }\n clearTimeout(this.holdTimeout);\n }, 500);\n }\n }\n\n /**\n * Handles button mouseup\n */\n handleButtonMouseUp(button) {\n this.dispatch(instance => {\n /**\n * Remove active class\n */\n instance.recurseButtons(buttonElement => {\n buttonElement.classList.remove(this.activeButtonClass);\n });\n\n instance.isMouseHold = false;\n if (instance.holdInteractionTimeout)\n clearTimeout(instance.holdInteractionTimeout);\n });\n\n /**\n * Calling onKeyReleased\n */\n if (button && typeof this.options.onKeyReleased === \"function\")\n this.options.onKeyReleased(button);\n }\n\n /**\n * Handles container mousedown\n */\n handleKeyboardContainerMouseDown(e) {\n /**\n * Handle event options\n */\n if (this.options.preventMouseDownDefault) e.preventDefault();\n }\n\n /**\n * Handles button hold\n */\n /* istanbul ignore next */\n handleButtonHold(button) {\n if (this.holdInteractionTimeout) clearTimeout(this.holdInteractionTimeout);\n\n /**\n * @type {object} Timeout dictating the speed of key hold iterations\n */\n this.holdInteractionTimeout = setTimeout(() => {\n if (this.isMouseHold) {\n this.handleButtonClicked(button);\n this.handleButtonHold(button);\n } else {\n clearTimeout(this.holdInteractionTimeout);\n }\n }, 100);\n }\n\n /**\n * Send a command to all simple-keyboard instances (if you have several instances).\n */\n syncInstanceInputs() {\n this.dispatch(instance => {\n instance.replaceInput(this.input);\n instance.setCaretPosition(this.caretPosition, this.caretPositionEnd);\n });\n }\n\n /**\n * Clear the keyboard’s input.\n * @param {string} [inputName] optional - the internal input to select\n */\n clearInput(inputName) {\n inputName = inputName || this.options.inputName;\n this.input[inputName] = \"\";\n\n /**\n * Reset caretPosition\n */\n this.setCaretPosition(0);\n\n /**\n * Enforce syncInstanceInputs, if set\n */\n if (this.options.syncInstanceInputs) this.syncInstanceInputs();\n }\n\n /**\n * Get the keyboard’s input (You can also get it from the onChange prop).\n * @param {string} [inputName] optional - the internal input to select\n */\n getInput(inputName) {\n inputName = inputName || this.options.inputName;\n\n /**\n * Enforce syncInstanceInputs, if set\n */\n if (this.options.syncInstanceInputs) this.syncInstanceInputs();\n\n return this.input[inputName];\n }\n\n /**\n * Set the keyboard’s input.\n * @param {string} input the input value\n * @param {string} inputName optional - the internal input to select\n */\n setInput(input, inputName) {\n inputName = inputName || this.options.inputName;\n this.input[inputName] = input;\n\n /**\n * Enforce syncInstanceInputs, if set\n */\n if (this.options.syncInstanceInputs) this.syncInstanceInputs();\n }\n\n /**\n * Replace the input object (`keyboard.input`)\n * @param {object} inputObj The input object\n */\n replaceInput(inputObj) {\n this.input = inputObj;\n }\n\n /**\n * Set new option or modify existing ones after initialization.\n * @param {object} options The options to set\n */\n setOptions(options = {}) {\n const changedOptions = this.changedOptions(options);\n this.options = Object.assign(this.options, options);\n\n if (changedOptions.length) {\n if (this.options.debug) {\n console.log(\"changedOptions\", changedOptions);\n }\n\n /**\n * Some option changes require adjustments before re-render\n */\n this.onSetOptions(options);\n\n /**\n * Rendering\n */\n this.render();\n }\n }\n\n /**\n * Detecting changes to non-function options\n * This allows us to ascertain whether a button re-render is needed\n */\n changedOptions(newOptions) {\n return Object.keys(newOptions).filter(\n optionName =>\n JSON.stringify(newOptions[optionName]) !==\n JSON.stringify(this.options[optionName])\n );\n }\n\n /**\n * Executing actions depending on changed options\n * @param {object} options The options to set\n */\n onSetOptions(options) {\n if (options.inputName) {\n /**\n * inputName changed. This requires a caretPosition reset\n */\n // TODO: Review side-effects\n if (this.options.debug) {\n console.log(\"inputName changed. caretPosition reset.\");\n }\n this.setCaretPosition(null);\n }\n }\n\n /**\n * Remove all keyboard rows and reset keyboard values.\n * Used internally between re-renders.\n */\n clear() {\n this.keyboardDOM.innerHTML = \"\";\n this.keyboardDOM.className = this.keyboardDOMClass;\n this.buttonElements = {};\n }\n\n /**\n * Send a command to all simple-keyboard instances at once (if you have multiple instances).\n * @param {function(instance: object, key: string)} callback Function to run on every instance\n */\n dispatch(callback) {\n if (!window[\"SimpleKeyboardInstances\"]) {\n console.warn(\n `SimpleKeyboardInstances is not defined. Dispatch cannot be called.`\n );\n throw new Error(\"INSTANCES_VAR_ERROR\");\n }\n\n return Object.keys(window[\"SimpleKeyboardInstances\"]).forEach(key => {\n callback(window[\"SimpleKeyboardInstances\"][key], key);\n });\n }\n\n /**\n * Adds/Modifies an entry to the `buttonTheme`. Basically a way to add a class to a button.\n * @param {string} buttons List of buttons to select (separated by a space).\n * @param {string} className Classes to give to the selected buttons (separated by space).\n */\n addButtonTheme(buttons, className) {\n if (!className || !buttons) return false;\n\n buttons.split(\" \").forEach(button => {\n className.split(\" \").forEach(classNameItem => {\n if (!this.options.buttonTheme) this.options.buttonTheme = [];\n\n let classNameFound = false;\n\n /**\n * If class is already defined, we add button to class definition\n */\n this.options.buttonTheme.map(buttonTheme => {\n if (buttonTheme.class.split(\" \").includes(classNameItem)) {\n classNameFound = true;\n\n const buttonThemeArray = buttonTheme.buttons.split(\" \");\n if (!buttonThemeArray.includes(button)) {\n classNameFound = true;\n buttonThemeArray.push(button);\n buttonTheme.buttons = buttonThemeArray.join(\" \");\n }\n }\n return buttonTheme;\n });\n\n /**\n * If class is not defined, we create a new entry\n */\n if (!classNameFound) {\n this.options.buttonTheme.push({\n class: classNameItem,\n buttons: buttons\n });\n }\n });\n });\n\n this.render();\n }\n\n /**\n * Removes/Amends an entry to the `buttonTheme`. Basically a way to remove a class previously added to a button through buttonTheme or addButtonTheme.\n * @param {string} buttons List of buttons to select (separated by a space).\n * @param {string} className Classes to give to the selected buttons (separated by space).\n */\n removeButtonTheme(buttons, className) {\n /**\n * When called with empty parameters, remove all button themes\n */\n if (!buttons && !className) {\n this.options.buttonTheme = [];\n this.render();\n return false;\n }\n\n /**\n * If buttons are passed and buttonTheme has items\n */\n if (\n buttons &&\n Array.isArray(this.options.buttonTheme) &&\n this.options.buttonTheme.length\n ) {\n const buttonArray = buttons.split(\" \");\n buttonArray.forEach(button => {\n this.options.buttonTheme.map((buttonTheme, index) => {\n /**\n * If className is set, we affect the buttons only for that class\n * Otherwise, we afect all classes\n */\n if (\n (className && className.includes(buttonTheme.class)) ||\n !className\n ) {\n const filteredButtonArray = buttonTheme.buttons\n .split(\" \")\n .filter(item => item !== button);\n\n /**\n * If buttons left, return them, otherwise, remove button Theme\n */\n if (filteredButtonArray.length) {\n buttonTheme.buttons = filteredButtonArray.join(\" \");\n } else {\n this.options.buttonTheme.splice(index, 1);\n buttonTheme = null;\n }\n }\n\n return buttonTheme;\n });\n });\n\n this.render();\n }\n }\n\n /**\n * Get the DOM Element of a button. If there are several buttons with the same name, an array of the DOM Elements is returned.\n * @param {string} button The button layout name to select\n */\n getButtonElement(button) {\n let output;\n\n const buttonArr = this.buttonElements[button];\n if (buttonArr) {\n if (buttonArr.length > 1) {\n output = buttonArr;\n } else {\n output = buttonArr[0];\n }\n }\n\n return output;\n }\n\n /**\n * This handles the \"inputPattern\" option\n * by checking if the provided inputPattern passes\n */\n inputPatternIsValid(inputVal) {\n const inputPatternRaw = this.options.inputPattern;\n let inputPattern;\n\n /**\n * Check if input pattern is global or targeted to individual inputs\n */\n if (inputPatternRaw instanceof RegExp) {\n inputPattern = inputPatternRaw;\n } else {\n inputPattern = inputPatternRaw[this.options.inputName];\n }\n\n if (inputPattern && inputVal) {\n const didInputMatch = inputPattern.test(inputVal);\n\n if (this.options.debug) {\n console.log(\n `inputPattern (\"${inputPattern}\"): ${\n didInputMatch ? \"passed\" : \"did not pass!\"\n }`\n );\n }\n\n return didInputMatch;\n } else {\n /**\n * inputPattern doesn't seem to be set for the current input, or input is empty. Pass.\n */\n return true;\n }\n }\n\n /**\n * Handles simple-keyboard event listeners\n */\n setEventListeners() {\n const { useTouchEvents, useMouseEvents } = this.options;\n\n /**\n * Only first instance should set the event listeners\n */\n if (this.isFirstKeyboardInstance || !this.allKeyboardInstances) {\n if (this.options.debug) {\n console.log(`Caret handling started (${this.keyboardDOMClass})`);\n }\n\n /**\n * Event Listeners\n */\n document.onkeyup = this.handleKeyUp;\n document.onkeydown = this.handleKeyDown;\n\n /**\n * Pointer events\n */\n if (\n this.utilities.pointerEventsSupported() &&\n !useTouchEvents &&\n !useMouseEvents\n ) {\n document.onpointerdown = this.handlePointerDown;\n document.onpointerup = this.handlePointerUp;\n document.onpointercancel = this.handlePointerUp;\n\n this.keyboardDOM.onpointerdown = this.handleKeyboardContainerMouseDown;\n\n /**\n * Touch events\n */\n } else if (useTouchEvents) {\n document.ontouchstart = this.handlePointerDown;\n document.ontouchend = this.handlePointerUp;\n document.ontouchcancel = this.handlePointerUp;\n\n this.keyboardDOM.ontouchstart = this.handleKeyboardContainerMouseDown;\n\n /**\n * Mouse events\n */\n } else if (!useTouchEvents) {\n document.onmousedown = this.handlePointerDown;\n document.onmouseup = this.handlePointerUp;\n\n this.keyboardDOM.onmousedown = this.handleKeyboardContainerMouseDown;\n }\n }\n }\n\n /**\n * Event Handler: KeyUp\n */\n handleKeyUp(event) {\n this.caretEventHandler(event);\n\n if (this.options.physicalKeyboardHighlight) {\n this.physicalKeyboard.handleHighlightKeyUp(event);\n }\n }\n\n /**\n * Event Handler: KeyDown\n */\n handleKeyDown(event) {\n if (this.options.physicalKeyboardHighlight) {\n this.physicalKeyboard.handleHighlightKeyDown(event);\n }\n }\n\n /**\n * Event Handler: PointerDown\n */\n handlePointerDown(event) {\n this.caretEventHandler(event);\n }\n\n /**\n * Event Handler: PointerUp\n */\n handlePointerUp(event) {\n this.handleButtonMouseUp();\n this.caretEventHandler(event);\n }\n\n /**\n * Called by {@link setEventListeners} when an event that warrants a cursor position update is triggered\n */\n caretEventHandler(event) {\n if (this.options.disableCaretPositioning) {\n this.setCaretPosition(null);\n return;\n }\n\n let targetTagName;\n\n if (event.target.tagName) {\n targetTagName = event.target.tagName.toLowerCase();\n }\n\n /* istanbul ignore next */\n this.dispatch(instance => {\n const isKeyboard =\n event.target === instance.keyboardDOM ||\n (event.target && instance.keyboardDOM.contains(event.target));\n\n // if (!this.isMouseHold) {\n // instance.isMouseHold = false;\n // }\n\n if (targetTagName === \"textarea\" || targetTagName === \"input\") {\n /**\n * Tracks current cursor position\n * As keys are pressed, text will be added/removed at that position within the input.\n */\n instance.setCaretPosition(\n event.target.selectionStart,\n event.target.selectionEnd\n );\n\n if (instance.options.debug) {\n console.log(\n \"Caret at: \",\n instance.getCaretPosition(),\n instance.getCaretPositionEnd(),\n event && event.target.tagName.toLowerCase(),\n `(${instance.keyboardDOMClass})`\n );\n }\n\n // TODO: Review side-effects\n } else if (!isKeyboard) {\n instance.setCaretPosition(null);\n }\n });\n }\n\n /**\n * Execute an operation on each button\n */\n recurseButtons(fn) {\n if (!fn) return false;\n\n Object.keys(this.buttonElements).forEach(buttonName =>\n this.buttonElements[buttonName].forEach(fn)\n );\n }\n\n /**\n * Destroy keyboard listeners and DOM elements\n */\n destroy() {\n if (this.options.debug)\n console.log(\n `Destroying simple-keyboard instance: ${this.currentInstanceName}`\n );\n\n /**\n * Remove buttons\n */\n let deleteButton = buttonElement => {\n buttonElement.onpointerdown = null;\n buttonElement.onpointerup = null;\n buttonElement.onpointercancel = null;\n buttonElement.ontouchstart = null;\n buttonElement.ontouchend = null;\n buttonElement.ontouchcancel = null;\n buttonElement.onclick = null;\n buttonElement.onmousedown = null;\n buttonElement.onmouseup = null;\n\n buttonElement.remove();\n buttonElement = null;\n };\n\n this.recurseButtons(deleteButton);\n deleteButton = null;\n\n /**\n * Remove wrapper events\n */\n this.keyboardDOM.onpointerdown = null;\n this.keyboardDOM.ontouchstart = null;\n this.keyboardDOM.onmousedown = null;\n\n /**\n * Clearing keyboard wrapper\n */\n this.clear();\n\n /**\n * Remove timouts\n */\n /* istanbul ignore next */\n if (this.holdInteractionTimeout) clearTimeout(this.holdInteractionTimeout);\n /* istanbul ignore next */\n if (this.holdTimeout) clearTimeout(this.holdTimeout);\n\n /**\n * Remove instance\n */\n window[\"SimpleKeyboardInstances\"][this.currentInstanceName] = null;\n delete window[\"SimpleKeyboardInstances\"][this.currentInstanceName];\n\n /**\n * Removing document listeners if there are no more instances\n */\n if (!Object.keys(window[\"SimpleKeyboardInstances\"]).length) {\n /**\n * Remove document listeners\n */\n document.onkeydown = null;\n document.onkeyup = null;\n\n document.onpointerdown = null;\n document.onpointerup = null;\n\n document.onmousedown = null;\n document.onmouseup = null;\n\n document.ontouchstart = null;\n document.ontouchend = null;\n document.ontouchcancel = null;\n\n if (this.options.debug) {\n console.log(\n \"Destroy: No instances remaining. Document listeners removed\",\n window[\"SimpleKeyboardInstances\"]\n );\n }\n } else {\n if (this.options.debug) {\n console.log(\n \"Destroy: Instances remaining! Document listeners not removed\",\n window[\"SimpleKeyboardInstances\"]\n );\n }\n }\n\n /**\n * Reset initialized flag\n */\n this.initialized = false;\n }\n\n /**\n * Process buttonTheme option\n */\n getButtonThemeClasses(button) {\n const buttonTheme = this.options.buttonTheme;\n let buttonClasses = [];\n\n if (Array.isArray(buttonTheme)) {\n buttonTheme.forEach(themeObj => {\n if (\n themeObj.class &&\n typeof themeObj.class === \"string\" &&\n themeObj.buttons &&\n typeof themeObj.buttons === \"string\"\n ) {\n const themeObjClasses = themeObj.class.split(\" \");\n const themeObjButtons = themeObj.buttons.split(\" \");\n\n if (themeObjButtons.includes(button)) {\n buttonClasses = [...buttonClasses, ...themeObjClasses];\n }\n } else {\n console.warn(\n `Incorrect \"buttonTheme\". Please check the documentation.`,\n themeObj\n );\n }\n });\n }\n\n return buttonClasses;\n }\n\n /**\n * Process buttonAttributes option\n */\n setDOMButtonAttributes(button, callback) {\n const buttonAttributes = this.options.buttonAttributes;\n\n if (Array.isArray(buttonAttributes)) {\n buttonAttributes.forEach(attrObj => {\n if (\n attrObj.attribute &&\n typeof attrObj.attribute === \"string\" &&\n attrObj.value &&\n typeof attrObj.value === \"string\" &&\n attrObj.buttons &&\n typeof attrObj.buttons === \"string\"\n ) {\n const attrObjButtons = attrObj.buttons.split(\" \");\n\n if (attrObjButtons.includes(button)) {\n callback(attrObj.attribute, attrObj.value);\n }\n } else {\n console.warn(\n `Incorrect \"buttonAttributes\". Please check the documentation.`,\n attrObj\n );\n }\n });\n }\n }\n\n onTouchDeviceDetected() {\n /**\n * Processing autoTouchEvents\n */\n this.processAutoTouchEvents();\n\n /**\n * Disabling contextual window on touch devices\n */\n this.disableContextualWindow();\n }\n\n /**\n * Disabling contextual window for hg-button\n */\n /* istanbul ignore next */\n disableContextualWindow() {\n window.oncontextmenu = event => {\n if (event.target.classList.contains(\"hg-button\")) {\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n };\n }\n\n /**\n * Process autoTouchEvents option\n */\n processAutoTouchEvents() {\n if (this.options.autoUseTouchEvents) {\n this.options.useTouchEvents = true;\n\n if (this.options.debug) {\n console.log(\n `autoUseTouchEvents: Touch device detected, useTouchEvents enabled.`\n );\n }\n }\n }\n\n /**\n * Executes the callback function once simple-keyboard is rendered for the first time (on initialization).\n */\n onInit() {\n if (this.options.debug) {\n console.log(`${this.keyboardDOMClass} Initialized`);\n }\n\n /**\n * setEventListeners\n */\n this.setEventListeners();\n\n if (typeof this.options.onInit === \"function\") this.options.onInit();\n }\n\n /**\n * Executes the callback function before a simple-keyboard render.\n */\n beforeFirstRender() {\n /**\n * Performing actions when touch device detected\n */\n if (this.utilities.isTouchDevice()) {\n this.onTouchDeviceDetected();\n }\n\n if (typeof this.options.beforeFirstRender === \"function\")\n this.options.beforeFirstRender();\n\n /**\n * Notify about PointerEvents usage\n */\n if (\n this.isFirstKeyboardInstance &&\n this.utilities.pointerEventsSupported() &&\n !this.options.useTouchEvents &&\n !this.options.useMouseEvents\n ) {\n if (this.options.debug) {\n console.log(\"Using PointerEvents as it is supported by this browser\");\n }\n }\n\n /**\n * Notify about touch events usage\n */\n if (this.options.useTouchEvents) {\n if (this.options.debug) {\n console.log(\n \"useTouchEvents has been enabled. Only touch events will be used.\"\n );\n }\n }\n }\n\n /**\n * Executes the callback function before a simple-keyboard render.\n */\n beforeRender() {\n if (typeof this.options.beforeRender === \"function\")\n this.options.beforeRender();\n }\n\n /**\n * Executes the callback function every time simple-keyboard is rendered (e.g: when you change layouts).\n */\n onRender() {\n if (typeof this.options.onRender === \"function\") this.options.onRender();\n }\n\n /**\n * Executes the callback function once all modules have been loaded\n */\n onModulesLoaded() {\n if (typeof this.options.onModulesLoaded === \"function\")\n this.options.onModulesLoaded(this);\n }\n\n /**\n * Register module\n */\n registerModule = (name, initCallback) => {\n if (!this.modules[name]) this.modules[name] = {};\n\n initCallback(this.modules[name]);\n };\n\n /**\n * Load modules\n */\n loadModules() {\n if (Array.isArray(this.options.modules)) {\n this.options.modules.forEach(KeyboardModule => {\n const keyboardModule = new KeyboardModule();\n\n /* istanbul ignore next */\n if (\n keyboardModule.constructor.name &&\n keyboardModule.constructor.name !== \"Function\"\n ) {\n const classStr = `module-${this.utilities.camelCase(\n keyboardModule.constructor.name\n )}`;\n this.keyboardPluginClasses =\n this.keyboardPluginClasses + ` ${classStr}`;\n }\n\n keyboardModule.init(this);\n });\n\n this.keyboardPluginClasses =\n this.keyboardPluginClasses + \" modules-loaded\";\n\n this.render();\n this.onModulesLoaded();\n }\n }\n\n /**\n * Get module prop\n */\n getModuleProp(name, prop) {\n if (!this.modules[name]) return false;\n\n return this.modules[name][prop];\n }\n\n /**\n * getModulesList\n */\n getModulesList() {\n return Object.keys(this.modules);\n }\n\n /**\n * Parse Row DOM containers\n */\n parseRowDOMContainers(\n rowDOM,\n rowIndex,\n containerStartIndexes,\n containerEndIndexes\n ) {\n const rowDOMArray = Array.from(rowDOM.children);\n let removedElements = 0;\n\n if (rowDOMArray.length) {\n containerStartIndexes.forEach((startIndex, arrIndex) => {\n const endIndex = containerEndIndexes[arrIndex];\n\n /**\n * If there exists a respective end index\n * if end index comes after start index\n */\n if (!endIndex || !(endIndex > startIndex)) {\n return false;\n }\n\n /**\n * Updated startIndex, endIndex\n * This is since the removal of buttons to place a single button container\n * results in a modified array size\n */\n const updated_startIndex = startIndex - removedElements;\n const updated_endIndex = endIndex - removedElements;\n\n /**\n * Create button container\n */\n const containerDOM = document.createElement(\"div\");\n containerDOM.className += \"hg-button-container\";\n const containerUID = `${this.options.layoutName}-r${rowIndex}c${arrIndex}`;\n containerDOM.setAttribute(\"data-skUID\", containerUID);\n\n /**\n * Taking elements due to be inserted into container\n */\n const containedElements = rowDOMArray.splice(\n updated_startIndex,\n updated_endIndex - updated_startIndex + 1\n );\n removedElements = updated_endIndex - updated_startIndex;\n\n /**\n * Inserting elements to container\n */\n containedElements.forEach(element => containerDOM.appendChild(element));\n\n /**\n * Adding container at correct position within rowDOMArray\n */\n rowDOMArray.splice(updated_startIndex, 0, containerDOM);\n\n /**\n * Clearing old rowDOM children structure\n */\n rowDOM.innerHTML = \"\";\n\n /**\n * Appending rowDOM new children list\n */\n rowDOMArray.forEach(element => rowDOM.appendChild(element));\n\n if (this.options.debug) {\n console.log(\n \"rowDOMContainer\",\n containedElements,\n updated_startIndex,\n updated_endIndex,\n removedElements + 1\n );\n }\n });\n }\n\n return rowDOM;\n }\n\n /**\n * getKeyboardClassString\n */\n getKeyboardClassString = (...baseDOMClasses) => {\n const keyboardClasses = [this.keyboardDOMClass, ...baseDOMClasses].filter(\n DOMClass => !!DOMClass\n );\n\n return keyboardClasses.join(\" \");\n };\n\n /**\n * Renders rows and buttons as per options\n */\n render() {\n /**\n * Clear keyboard\n */\n this.clear();\n\n /**\n * Calling beforeFirstRender\n */\n if (!this.initialized) {\n this.beforeFirstRender();\n }\n\n /**\n * Calling beforeRender\n */\n this.beforeRender();\n\n const layoutClass = `hg-layout-${this.options.layoutName}`;\n const layout = this.options.layout || getDefaultLayout();\n const useTouchEvents = this.options.useTouchEvents || false;\n const useTouchEventsClass = useTouchEvents ? \"hg-touch-events\" : \"\";\n const useMouseEvents = this.options.useMouseEvents || false;\n const disableRowButtonContainers = this.options.disableRowButtonContainers;\n\n /**\n * Adding themeClass, layoutClass to keyboardDOM\n */\n this.keyboardDOM.className = this.getKeyboardClassString(\n this.options.theme,\n layoutClass,\n this.keyboardPluginClasses,\n useTouchEventsClass\n );\n\n /**\n * Iterating through each row\n */\n layout[this.options.layoutName].forEach((row, rIndex) => {\n const rowArray = row.split(\" \");\n\n /**\n * Creating empty row\n */\n let rowDOM = document.createElement(\"div\");\n rowDOM.className += \"hg-row\";\n\n /**\n * Tracking container indicators in rows\n */\n const containerStartIndexes = [];\n const containerEndIndexes = [];\n\n /**\n * Iterating through each button in row\n */\n rowArray.forEach((button, bIndex) => {\n /**\n * Check if button has a container indicator\n */\n const buttonHasContainerStart =\n !disableRowButtonContainers &&\n typeof button === \"string\" &&\n button.length > 1 &&\n button.indexOf(\"[\") === 0;\n\n const buttonHasContainerEnd =\n !disableRowButtonContainers &&\n typeof button === \"string\" &&\n button.length > 1 &&\n button.indexOf(\"]\") === button.length - 1;\n\n /**\n * Save container start index, if applicable\n */\n if (buttonHasContainerStart) {\n containerStartIndexes.push(bIndex);\n\n /**\n * Removing indicator\n */\n button = button.replace(/\\[/g, \"\");\n }\n\n if (buttonHasContainerEnd) {\n containerEndIndexes.push(bIndex);\n\n /**\n * Removing indicator\n */\n button = button.replace(/\\]/g, \"\");\n }\n\n /**\n * Processing button options\n */\n const fctBtnClass = this.utilities.getButtonClass(button);\n const buttonDisplayName = this.utilities.getButtonDisplayName(\n button,\n this.options.display,\n this.options.mergeDisplay\n );\n\n /**\n * Creating button\n */\n const buttonType = this.options.useButtonTag ? \"button\" : \"div\";\n const buttonDOM = document.createElement(buttonType);\n buttonDOM.className += `hg-button ${fctBtnClass}`;\n\n /**\n * Adding buttonTheme\n */\n buttonDOM.classList.add(...this.getButtonThemeClasses(button));\n\n /**\n * Adding buttonAttributes\n */\n this.setDOMButtonAttributes(button, (attribute, value) => {\n buttonDOM.setAttribute(attribute, value);\n });\n\n this.activeButtonClass = \"hg-activeButton\";\n\n /**\n * Handle button click event\n */\n /* istanbul ignore next */\n if (\n this.utilities.pointerEventsSupported() &&\n !useTouchEvents &&\n !useMouseEvents\n ) {\n /**\n * Handle PointerEvents\n */\n buttonDOM.onpointerdown = e => {\n this.handleButtonClicked(button);\n this.handleButtonMouseDown(button, e);\n };\n buttonDOM.onpointerup = () => {\n this.handleButtonMouseUp(button);\n };\n buttonDOM.onpointercancel = () => {\n this.handleButtonMouseUp(button);\n };\n } else {\n /**\n * Fallback for browsers not supporting PointerEvents\n */\n if (useTouchEvents) {\n /**\n * Handle touch events\n */\n buttonDOM.ontouchstart = e => {\n this.handleButtonClicked(button);\n this.handleButtonMouseDown(button, e);\n };\n buttonDOM.ontouchend = () => {\n this.handleButtonMouseUp(button);\n };\n buttonDOM.ontouchcancel = () => {\n this.handleButtonMouseUp(button);\n };\n } else {\n /**\n * Handle mouse events\n */\n buttonDOM.onclick = () => {\n this.handleButtonClicked(button);\n };\n buttonDOM.onmousedown = e => {\n this.handleButtonMouseDown(button, e);\n };\n buttonDOM.onmouseup = () => {\n this.handleButtonMouseUp(button);\n };\n }\n }\n\n /**\n * Adding identifier\n */\n buttonDOM.setAttribute(\"data-skBtn\", button);\n\n /**\n * Adding unique id\n * Since there's no limit on spawning same buttons, the unique id ensures you can style every button\n */\n const buttonUID = `${this.options.layoutName}-r${rIndex}b${bIndex}`;\n buttonDOM.setAttribute(\"data-skBtnUID\", buttonUID);\n\n /**\n * Adding button label to button\n */\n const buttonSpanDOM = document.createElement(\"span\");\n buttonSpanDOM.innerHTML = buttonDisplayName;\n buttonDOM.appendChild(buttonSpanDOM);\n\n /**\n * Adding to buttonElements\n */\n if (!this.buttonElements[button]) this.buttonElements[button] = [];\n\n this.buttonElements[button].push(buttonDOM);\n\n /**\n * Appending button to row\n */\n rowDOM.appendChild(buttonDOM);\n });\n\n /**\n * Parse containers in row\n */\n rowDOM = this.parseRowDOMContainers(\n rowDOM,\n rIndex,\n containerStartIndexes,\n containerEndIndexes\n );\n\n /**\n * Appending row to keyboard\n */\n this.keyboardDOM.appendChild(rowDOM);\n });\n\n /**\n * Calling onRender\n */\n this.onRender();\n\n if (!this.initialized) {\n /**\n * Ensures that onInit and beforeFirstRender are only called once per instantiation\n */\n this.initialized = true;\n\n /**\n * Calling onInit\n */\n this.onInit();\n }\n }\n}\n\nexport default SimpleKeyboard;\n","export const getDefaultLayout = () => {\n return {\n default: [\n \"` 1 2 3 4 5 6 7 8 9 0 - = {bksp}\",\n \"{tab} q w e r t y u i o p [ ] \\\\\",\n \"{lock} a s d f g h j k l ; ' {enter}\",\n \"{shift} z x c v b n m , . / {shift}\",\n \".com @ {space}\"\n ],\n shift: [\n \"~ ! @ # $ % ^ & * ( ) _ + {bksp}\",\n \"{tab} Q W E R T Y U I O P { } |\",\n '{lock} A S D F G H J K L : \" {enter}',\n \"{shift} Z X C V B N M < > ? {shift}\",\n \".com @ {space}\"\n ]\n };\n};\n","import SimpleKeyboard from \"./components/Keyboard\";\nexport default SimpleKeyboard;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","export const parseProps = props => ({\r\n ...props,\r\n theme: `simple-keyboard ${props.theme || \"hg-theme-default\"}`\r\n});\r\n\r\nconst cleanProps = sourceObj => ({\r\n ...sourceObj,\r\n keyboardRef: null,\r\n stateToIgnore: null\r\n});\r\n\r\nexport const changedProps = (prevProps, props) => {\r\n const cleanedProps = cleanProps(props);\r\n const cleanedPrevProps = cleanProps(prevProps);\r\n\r\n return Object.keys(cleanedProps).filter(\r\n propName => cleanedProps[propName] !== cleanedPrevProps[propName]\r\n );\r\n};\r\n","import React, { useEffect, useRef } from \"react\";\r\nimport Keyboard from \"simple-keyboard\";\r\nimport { parseProps, changedProps } from \"../services/Utilities\";\r\nimport PropTypes from \"prop-types\";\r\nimport \"simple-keyboard/build/css/index.css\";\r\n\r\nconst KeyboardReact = props => {\r\n const cssClass = props.baseClass || \"react-simple-keyboard\";\r\n const initRef = useRef();\r\n const keyboardRef = useRef();\r\n const previousProps = useRef(props);\r\n\r\n useEffect(() => {\r\n const parsedProps = parseProps(props);\r\n\r\n /**\r\n * Initialize simple-keyboard\r\n */\r\n if (!initRef.current) {\r\n initRef.current = true;\r\n parsedProps.debug && console.log(\"ReactSimpleKeyboard: Init\");\r\n keyboardRef.current = new Keyboard(`.${cssClass}`, parsedProps);\r\n parsedProps.keyboardRef && parsedProps.keyboardRef(keyboardRef.current);\r\n }\r\n\r\n const updatedProps = changedProps(previousProps.current, parsedProps);\r\n\r\n /**\r\n * Only trigger render if props changed\r\n */\r\n if (updatedProps.length) {\r\n const keyboard = keyboardRef.current;\r\n previousProps.current = parsedProps;\r\n keyboard.setOptions(parsedProps);\r\n parsedProps.debug &&\r\n console.log(\r\n \"ReactSimpleKeyboard - setOptions called due to updated props:\",\r\n updatedProps\r\n );\r\n }\r\n }, [initRef, cssClass, previousProps, props]);\r\n\r\n return
;\r\n};\r\n\r\nKeyboardReact.propTypes = {\r\n baseClass: PropTypes.string\r\n};\r\n\r\nexport default KeyboardReact;\r\n","import Keyboard from \"./components/Keyboard\";\n\nexport default Keyboard;\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../../webpack/universalModuleDefinition","../../webpack/bootstrap","../../external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","../../../../webpack/universalModuleDefinition","../../../../webpack/bootstrap","../../services/Utilities.js","../../services/PhysicalKeyboard.js","../../components/Keyboard.js","../../services/KeyboardLayout.js","../../index.js","../../node_modules/prop-types/index.js","../../node_modules/webpack/buildin/module.js","../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/typeof.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","services/Utilities.js","components/Keyboard.js","index.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE__0__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Utilities","getOptions","getCaretPosition","getCaretPositionEnd","dispatch","bindMethods","myClass","instance","getOwnPropertyNames","myMethod","button","buttonTypeClass","includes","buttonWithoutBraces","replace","buttonNormalized","display","mergeDisplay","assign","getDefaultDiplay","input","caretPos","caretPosEnd","moveCaret","options","commonParams","output","length","removeAt","addStringAt","tabCharOnTab","newLineOnEnter","Number","isInteger","minus","newCaretPos","updateCaretPosAction","setCaretPosition","caretPosition","debug","console","log","keyboardDOMClass","source","str","position","positionEnd","slice","join","isMaxLengthReached","updateCaretPos","emojiMatchedReg","substring","match","substr","inputObj","updatedInput","maxLength","currentInput","inputName","condition","maxLengthReached","Boolean","window","navigator","maxTouchPoints","PointerEvent","toLowerCase","trim","split","reduce","word","toUpperCase","PhysicalKeyboard","event","buttonPressed","getSimpleKeyboardLayoutKey","buttonDOM","getButtonElement","style","backgroundColor","physicalKeyboardHighlightBgColor","color","physicalKeyboardHighlightTextColor","removeAttribute","code","SimpleKeyboard","keyboardDOM","params","document","querySelector","HTMLDivElement","className","warn","Error","caretPositionEnd","initCallback","baseDOMClasses","keyboardClasses","filter","DOMClass","handleParams","utilities","layoutName","theme","preventMouseDownDefault","keyboardPluginClasses","buttonElements","currentInstanceName","camelCase","allKeyboardInstances","keyboardInstanceNames","keys","isFirstKeyboardInstance","physicalKeyboard","render","loadModules","endPosition","onKeyPress","getUpdatedInput","inputPattern","inputPatternIsValid","handleMaxLength","syncInstanceInputs","onChange","onChangeAll","e","preventDefault","stopMouseDownPropagation","stopPropagation","target","classList","add","activeButtonClass","holdInteractionTimeout","clearTimeout","holdTimeout","isMouseHold","disableButtonHold","setTimeout","handleButtonHold","recurseButtons","buttonElement","remove","onKeyReleased","handleButtonClicked","replaceInput","changedOptions","onSetOptions","newOptions","JSON","stringify","optionName","innerHTML","callback","forEach","buttons","buttonTheme","classNameFound","map","class","classNameItem","buttonThemeArray","push","Array","isArray","index","filteredButtonArray","item","splice","buttonArr","inputVal","inputPatternRaw","RegExp","didInputMatch","test","useTouchEvents","useMouseEvents","onkeyup","handleKeyUp","onkeydown","handleKeyDown","pointerEventsSupported","ontouchstart","handlePointerDown","ontouchend","handlePointerUp","ontouchcancel","handleKeyboardContainerMouseDown","onmousedown","onmouseup","onpointerdown","onpointerup","onpointercancel","caretEventHandler","physicalKeyboardHighlight","handleHighlightKeyUp","handleHighlightKeyDown","handleButtonMouseUp","targetTagName","disableCaretPositioning","tagName","isKeyboard","contains","selectionStart","selectionEnd","fn","buttonName","deleteButton","onclick","clear","initialized","buttonClasses","themeObj","themeObjClasses","buttonAttributes","attrObj","attribute","processAutoTouchEvents","disableContextualWindow","oncontextmenu","autoUseTouchEvents","setEventListeners","onInit","isTouchDevice","onTouchDeviceDetected","beforeFirstRender","beforeRender","onRender","onModulesLoaded","keyboardModule","KeyboardModule","constructor","classStr","init","prop","rowDOM","rowIndex","containerStartIndexes","containerEndIndexes","rowDOMArray","from","children","removedElements","startIndex","arrIndex","endIndex","updated_startIndex","updated_endIndex","containerDOM","createElement","containerUID","setAttribute","containedElements","appendChild","element","layoutClass","layout","default","shift","useTouchEventsClass","disableRowButtonContainers","getKeyboardClassString","row","rIndex","rowArray","bIndex","buttonHasContainerStart","indexOf","buttonHasContainerEnd","fctBtnClass","getButtonClass","buttonDisplayName","getButtonDisplayName","buttonType","useButtonTag","b","getButtonThemeClasses","setDOMButtonAttributes","handleButtonMouseDown","buttonUID","buttonSpanDOM","parseRowDOMContainers","webpackPolyfill","deprecate","paths","_typeof","obj","iterator","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","getShim","isRequired","ReactPropTypes","array","bool","func","number","string","symbol","any","arrayOf","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","cleanProps","sourceObj","keyboardRef","stateToIgnore","KeyboardReact","cssClass","baseClass","initRef","useRef","previousProps","useEffect","parsedProps","parseProps","current","Keyboard","updatedProps","prevProps","cleanedProps","cleanedPrevProps","changedProps","keyboard","setOptions","propTypes"],"mappings":";;;;;;;;;;;CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,UACR,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,sBAAuB,CAAC,SAAUJ,GACf,kBAAZC,QACdA,QAA6B,oBAAID,EAAQG,QAAQ,UAEjDJ,EAA0B,oBAAIC,EAAQD,EAAY,OARpD,CASGO,MAAM,SAASC,GAClB,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,oBAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,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,GACtC,IAAM6C,EAAejB,WAAW5B,GAC1B8C,EAAmBlB,WAAWgB,GAEpC,OAAOxW,OAAOsI,KAAKmO,GAAchP,QAC/B,SAAAoM,GAAQ,OAAI4C,EAAa5C,KAAc6C,EAAiB7C,MCSnC8C,CAAaV,EAAcI,QAASF,GAKzD,GAAII,EAAatT,OAAQ,CACvB,IAAM2T,EAAWlB,EAAYW,QAC7BJ,EAAcI,QAAUF,EACxBS,EAASC,WAAWV,GACpBA,EAAYtS,OACVC,QAAQC,IACN,gEACAwS,MAGL,CAACR,EAASF,EAAUI,EAAerC,IAE/B,yBAAK1M,UAAW2O,MAGzBD,EAAckB,UAAY,CACxBhB,UAAWP,IAAUb,QAGRkB,QC/CAU","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"ReactSimpleKeyboard\", [\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactSimpleKeyboard\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"ReactSimpleKeyboard\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__0__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"SimpleKeyboard\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SimpleKeyboard\"] = factory();\n\telse\n\t\troot[\"SimpleKeyboard\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/**\n * Utility Service\n */\nclass Utilities {\n /**\n * Creates an instance of the Utility service\n */\n constructor({ getOptions, getCaretPosition, getCaretPositionEnd, dispatch }) {\n this.getOptions = getOptions;\n this.getCaretPosition = getCaretPosition;\n this.getCaretPositionEnd = getCaretPositionEnd;\n this.dispatch = dispatch;\n\n /**\n * Bindings\n */\n Utilities.bindMethods(Utilities, this);\n }\n\n /**\n * Adds default classes to a given button\n *\n * @param {string} button The button's layout name\n * @return {string} The classes to be added to the button\n */\n getButtonClass(button) {\n const buttonTypeClass =\n button.includes(\"{\") && button.includes(\"}\") && button !== \"{//}\"\n ? \"functionBtn\"\n : \"standardBtn\";\n const buttonWithoutBraces = button.replace(\"{\", \"\").replace(\"}\", \"\");\n let buttonNormalized = \"\";\n\n if (buttonTypeClass !== \"standardBtn\")\n buttonNormalized = ` hg-button-${buttonWithoutBraces}`;\n\n return `hg-${buttonTypeClass}${buttonNormalized}`;\n }\n\n /**\n * Default button display labels\n */\n getDefaultDiplay() {\n return {\n \"{bksp}\": \"backspace\",\n \"{backspace}\": \"backspace\",\n \"{enter}\": \"< enter\",\n \"{shift}\": \"shift\",\n \"{shiftleft}\": \"shift\",\n \"{shiftright}\": \"shift\",\n \"{alt}\": \"alt\",\n \"{s}\": \"shift\",\n \"{tab}\": \"tab\",\n \"{lock}\": \"caps\",\n \"{capslock}\": \"caps\",\n \"{accept}\": \"Submit\",\n \"{space}\": \" \",\n \"{//}\": \" \",\n \"{esc}\": \"esc\",\n \"{escape}\": \"esc\",\n \"{f1}\": \"f1\",\n \"{f2}\": \"f2\",\n \"{f3}\": \"f3\",\n \"{f4}\": \"f4\",\n \"{f5}\": \"f5\",\n \"{f6}\": \"f6\",\n \"{f7}\": \"f7\",\n \"{f8}\": \"f8\",\n \"{f9}\": \"f9\",\n \"{f10}\": \"f10\",\n \"{f11}\": \"f11\",\n \"{f12}\": \"f12\",\n \"{numpaddivide}\": \"/\",\n \"{numlock}\": \"lock\",\n \"{arrowup}\": \"↑\",\n \"{arrowleft}\": \"←\",\n \"{arrowdown}\": \"↓\",\n \"{arrowright}\": \"→\",\n \"{prtscr}\": \"print\",\n \"{scrolllock}\": \"scroll\",\n \"{pause}\": \"pause\",\n \"{insert}\": \"ins\",\n \"{home}\": \"home\",\n \"{pageup}\": \"up\",\n \"{delete}\": \"del\",\n \"{end}\": \"end\",\n \"{pagedown}\": \"down\",\n \"{numpadmultiply}\": \"*\",\n \"{numpadsubtract}\": \"-\",\n \"{numpadadd}\": \"+\",\n \"{numpadenter}\": \"enter\",\n \"{period}\": \".\",\n \"{numpaddecimal}\": \".\",\n \"{numpad0}\": \"0\",\n \"{numpad1}\": \"1\",\n \"{numpad2}\": \"2\",\n \"{numpad3}\": \"3\",\n \"{numpad4}\": \"4\",\n \"{numpad5}\": \"5\",\n \"{numpad6}\": \"6\",\n \"{numpad7}\": \"7\",\n \"{numpad8}\": \"8\",\n \"{numpad9}\": \"9\"\n };\n }\n /**\n * Returns the display (label) name for a given button\n *\n * @param {string} button The button's layout name\n * @param {object} display The provided display option\n * @param {boolean} mergeDisplay Whether the provided param value should be merged with the default one.\n */\n getButtonDisplayName(button, display, mergeDisplay) {\n if (mergeDisplay) {\n display = Object.assign({}, this.getDefaultDiplay(), display);\n } else {\n display = display || this.getDefaultDiplay();\n }\n\n return display[button] || button;\n }\n\n /**\n * Returns the updated input resulting from clicking a given button\n *\n * @param {string} button The button's layout name\n * @param {string} input The input string\n * @param {number} caretPos The cursor's current position\n * @param {number} caretPosEnd The cursor's current end position\n * @param {boolean} moveCaret Whether to update simple-keyboard's cursor\n */\n getUpdatedInput(\n button,\n input,\n caretPos,\n caretPosEnd = caretPos,\n moveCaret = false\n ) {\n const options = this.getOptions();\n const commonParams = [caretPos, caretPosEnd, moveCaret];\n\n let output = input;\n\n if (\n (button === \"{bksp}\" || button === \"{backspace}\") &&\n output.length > 0\n ) {\n output = this.removeAt(output, ...commonParams);\n } else if (button === \"{space}\")\n output = this.addStringAt(output, \" \", ...commonParams);\n else if (\n button === \"{tab}\" &&\n !(\n typeof options.tabCharOnTab === \"boolean\" &&\n options.tabCharOnTab === false\n )\n ) {\n output = this.addStringAt(output, \"\\t\", ...commonParams);\n } else if (\n (button === \"{enter}\" || button === \"{numpadenter}\") &&\n options.newLineOnEnter\n )\n output = this.addStringAt(output, \"\\n\", ...commonParams);\n else if (\n button.includes(\"numpad\") &&\n Number.isInteger(Number(button[button.length - 2]))\n ) {\n output = this.addStringAt(\n output,\n button[button.length - 2],\n ...commonParams\n );\n } else if (button === \"{numpaddivide}\")\n output = this.addStringAt(output, \"/\", ...commonParams);\n else if (button === \"{numpadmultiply}\")\n output = this.addStringAt(output, \"*\", ...commonParams);\n else if (button === \"{numpadsubtract}\")\n output = this.addStringAt(output, \"-\", ...commonParams);\n else if (button === \"{numpadadd}\")\n output = this.addStringAt(output, \"+\", ...commonParams);\n else if (button === \"{numpaddecimal}\")\n output = this.addStringAt(output, \".\", ...commonParams);\n else if (button === \"{\" || button === \"}\")\n output = this.addStringAt(output, button, ...commonParams);\n else if (!button.includes(\"{\") && !button.includes(\"}\"))\n output = this.addStringAt(output, button, ...commonParams);\n\n return output;\n }\n\n /**\n * Moves the cursor position by a given amount\n *\n * @param {number} length Represents by how many characters the input should be moved\n * @param {boolean} minus Whether the cursor should be moved to the left or not.\n */\n updateCaretPos(length, minus) {\n const newCaretPos = this.updateCaretPosAction(length, minus);\n\n this.dispatch(instance => {\n instance.setCaretPosition(newCaretPos);\n });\n }\n\n /**\n * Action method of updateCaretPos\n *\n * @param {number} length Represents by how many characters the input should be moved\n * @param {boolean} minus Whether the cursor should be moved to the left or not.\n */\n updateCaretPosAction(length, minus) {\n const options = this.getOptions();\n let caretPosition = this.getCaretPosition();\n\n if (minus) {\n if (caretPosition > 0) caretPosition = caretPosition - length;\n } else {\n caretPosition = caretPosition + length;\n }\n\n if (options.debug) {\n console.log(\"Caret at:\", caretPosition, `(${this.keyboardDOMClass})`);\n }\n\n return caretPosition;\n }\n\n /**\n * Adds a string to the input at a given position\n *\n * @param {string} source The source input\n * @param {string} str The string to add\n * @param {number} position The (cursor) position where the string should be added\n * @param {boolean} moveCaret Whether to update simple-keyboard's cursor\n */\n addStringAt(\n source,\n str,\n position = source.length,\n positionEnd = source.length,\n moveCaret = false\n ) {\n let output;\n\n if (!position && position !== 0) {\n output = source + str;\n } else {\n output = [source.slice(0, position), str, source.slice(positionEnd)].join(\n \"\"\n );\n\n /**\n * Avoid caret position change when maxLength is set\n */\n if (!this.isMaxLengthReached()) {\n if (moveCaret) this.updateCaretPos(str.length);\n }\n }\n\n return output;\n }\n\n /**\n * Removes an amount of characters at a given position\n *\n * @param {string} source The source input\n * @param {number} position The (cursor) position from where the characters should be removed\n * @param {boolean} moveCaret Whether to update simple-keyboard's cursor\n */\n removeAt(\n source,\n position = source.length,\n positionEnd = source.length,\n moveCaret = false\n ) {\n if (position === 0 && positionEnd === 0) {\n return source;\n }\n\n let output;\n\n if (position === positionEnd) {\n let prevTwoChars;\n let emojiMatched;\n const emojiMatchedReg = /([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])/g;\n\n /**\n * Emojis are made out of two characters, so we must take a custom approach to trim them.\n * For more info: https://mathiasbynens.be/notes/javascript-unicode\n */\n if (position && position >= 0) {\n prevTwoChars = source.substring(position - 2, position);\n emojiMatched = prevTwoChars.match(emojiMatchedReg);\n\n if (emojiMatched) {\n output = source.substr(0, position - 2) + source.substr(position);\n if (moveCaret) this.updateCaretPos(2, true);\n } else {\n output = source.substr(0, position - 1) + source.substr(position);\n if (moveCaret) this.updateCaretPos(1, true);\n }\n } else {\n prevTwoChars = source.slice(-2);\n emojiMatched = prevTwoChars.match(emojiMatchedReg);\n\n if (emojiMatched) {\n output = source.slice(0, -2);\n if (moveCaret) this.updateCaretPos(2, true);\n } else {\n output = source.slice(0, -1);\n if (moveCaret) this.updateCaretPos(1, true);\n }\n }\n } else {\n output = source.slice(0, position) + source.slice(positionEnd);\n if (moveCaret) {\n this.dispatch(instance => {\n instance.setCaretPosition(position);\n });\n }\n }\n\n return output;\n }\n /**\n * Determines whether the maxLength has been reached. This function is called when the maxLength option it set.\n *\n * @param {object} inputObj\n * @param {string} updatedInput\n */\n handleMaxLength(inputObj, updatedInput) {\n const options = this.getOptions();\n const maxLength = options.maxLength;\n const currentInput = inputObj[options.inputName];\n const condition = updatedInput.length - 1 >= maxLength;\n\n if (\n /**\n * If pressing this button won't add more characters\n * We exit out of this limiter function\n */\n updatedInput.length <= currentInput.length\n ) {\n return false;\n }\n\n if (Number.isInteger(maxLength)) {\n if (options.debug) {\n console.log(\"maxLength (num) reached:\", condition);\n }\n\n if (condition) {\n /**\n * @type {boolean} Boolean value that shows whether maxLength has been reached\n */\n this.maxLengthReached = true;\n return true;\n } else {\n this.maxLengthReached = false;\n return false;\n }\n }\n\n if (typeof maxLength === \"object\") {\n const condition = currentInput.length === maxLength[options.inputName];\n\n if (options.debug) {\n console.log(\"maxLength (obj) reached:\", condition);\n }\n\n if (condition) {\n this.maxLengthReached = true;\n return true;\n } else {\n this.maxLengthReached = false;\n return false;\n }\n }\n }\n\n /**\n * Gets the current value of maxLengthReached\n */\n isMaxLengthReached() {\n return Boolean(this.maxLengthReached);\n }\n\n /**\n * Determines whether a touch device is being used\n */\n isTouchDevice() {\n return \"ontouchstart\" in window || navigator.maxTouchPoints;\n }\n\n /**\n * Determines whether pointer events are supported\n */\n pointerEventsSupported() {\n return window.PointerEvent;\n }\n\n /**\n * Bind all methods in a given class\n */\n\n static bindMethods(myClass, instance) {\n // eslint-disable-next-line no-unused-vars\n for (const myMethod of Object.getOwnPropertyNames(myClass.prototype)) {\n const excludeMethod =\n myMethod === \"constructor\" || myMethod === \"bindMethods\";\n if (!excludeMethod) {\n instance[myMethod] = instance[myMethod].bind(instance);\n }\n }\n }\n\n /**\n * Transforms an arbitrary string to camelCase\n *\n * @param {string} str The string to transform.\n */\n camelCase(str) {\n if (!str) return false;\n\n return str\n .toLowerCase()\n .trim()\n .split(/[.\\-_\\s]/g)\n .reduce((str, word) =>\n word.length ? str + word[0].toUpperCase() + word.slice(1) : str\n );\n }\n}\n\nexport default Utilities;\n","import Utilities from \"../services/Utilities\";\n\n/**\n * Physical Keyboard Service\n */\nclass PhysicalKeyboard {\n /**\n * Creates an instance of the PhysicalKeyboard service\n */\n constructor({ dispatch, getOptions }) {\n /**\n * @type {object} A simple-keyboard instance\n */\n this.dispatch = dispatch;\n this.getOptions = getOptions;\n\n /**\n * Bindings\n */\n Utilities.bindMethods(PhysicalKeyboard, this);\n }\n\n handleHighlightKeyDown(event) {\n const options = this.getOptions();\n const buttonPressed = this.getSimpleKeyboardLayoutKey(event);\n\n this.dispatch(instance => {\n const buttonDOM =\n instance.getButtonElement(buttonPressed) ||\n instance.getButtonElement(`{${buttonPressed}}`);\n\n if (buttonDOM) {\n buttonDOM.style.backgroundColor =\n options.physicalKeyboardHighlightBgColor || \"#dadce4\";\n buttonDOM.style.color =\n options.physicalKeyboardHighlightTextColor || \"black\";\n }\n });\n }\n\n handleHighlightKeyUp(event) {\n const buttonPressed = this.getSimpleKeyboardLayoutKey(event);\n\n this.dispatch(instance => {\n const buttonDOM =\n instance.getButtonElement(buttonPressed) ||\n instance.getButtonElement(`{${buttonPressed}}`);\n\n if (buttonDOM && buttonDOM.removeAttribute) {\n buttonDOM.removeAttribute(\"style\");\n }\n });\n }\n\n /**\n * Transforms a KeyboardEvent's \"key.code\" string into a simple-keyboard layout format\n * @param {object} event The KeyboardEvent\n */\n getSimpleKeyboardLayoutKey(event) {\n let output;\n\n if (\n event.code.includes(\"Numpad\") ||\n event.code.includes(\"Shift\") ||\n event.code.includes(\"Space\") ||\n event.code.includes(\"Backspace\") ||\n event.code.includes(\"Control\") ||\n event.code.includes(\"Alt\") ||\n event.code.includes(\"Meta\")\n ) {\n output = event.code;\n } else {\n output = event.key;\n }\n\n /**\n * If button is not uppercase, casting to lowercase\n */\n if (\n output !== output.toUpperCase() ||\n (event.code[0] === \"F\" &&\n Number.isInteger(Number(event.code[1])) &&\n event.code.length <= 3)\n ) {\n output = output.toLowerCase();\n }\n\n return output;\n }\n}\n\nexport default PhysicalKeyboard;\n","import \"./Keyboard.css\";\n\n// Services\nimport { getDefaultLayout } from \"../services/KeyboardLayout\";\nimport PhysicalKeyboard from \"../services/PhysicalKeyboard\";\nimport Utilities from \"../services/Utilities\";\n\n/**\n * Root class for simple-keyboard\n * This class:\n * - Parses the options\n * - Renders the rows and buttons\n * - Handles button functionality\n */\nclass SimpleKeyboard {\n /**\n * Creates an instance of SimpleKeyboard\n * @param {Array} params If first parameter is a string, it is considered the container class. The second parameter is then considered the options object. If first parameter is an object, it is considered the options object.\n */\n constructor(...params) {\n const { keyboardDOMClass, keyboardDOM, options = {} } = this.handleParams(\n params\n );\n\n /**\n * Initializing Utilities\n */\n this.utilities = new Utilities({\n getOptions: this.getOptions,\n getCaretPosition: this.getCaretPosition,\n getCaretPositionEnd: this.getCaretPositionEnd,\n dispatch: this.dispatch\n });\n\n /**\n * Caret position\n */\n this.caretPosition = null;\n\n /**\n * Caret position end\n */\n this.caretPositionEnd = null;\n\n /**\n * Processing options\n */\n this.keyboardDOM = keyboardDOM;\n\n /**\n * @type {object}\n * @property {object} layout Modify the keyboard layout.\n * @property {string} layoutName Specifies which layout should be used.\n * @property {object} display Replaces variable buttons (such as {bksp}) with a human-friendly name (e.g.: “backspace”).\n * @property {boolean} mergeDisplay By default, when you set the display property, you replace the default one. This setting merges them instead.\n * @property {string} theme A prop to add your own css classes to the keyboard wrapper. You can add multiple classes separated by a space.\n * @property {array} buttonTheme A prop to add your own css classes to one or several buttons.\n * @property {array} buttonAttributes A prop to add your own attributes to one or several buttons.\n * @property {boolean} debug Runs a console.log every time a key is pressed. Displays the buttons pressed and the current input.\n * @property {boolean} newLineOnEnter Specifies whether clicking the “ENTER” button will input a newline (\\n) or not.\n * @property {boolean} tabCharOnTab Specifies whether clicking the “TAB” button will input a tab character (\\t) or not.\n * @property {string} inputName Allows you to use a single simple-keyboard instance for several inputs.\n * @property {number} maxLength Restrains all of simple-keyboard inputs to a certain length. This should be used in addition to the input element’s maxlengthattribute.\n * @property {object} maxLength Restrains simple-keyboard’s individual inputs to a certain length. This should be used in addition to the input element’s maxlengthattribute.\n * @property {boolean} syncInstanceInputs When set to true, this option synchronizes the internal input of every simple-keyboard instance.\n * @property {boolean} physicalKeyboardHighlight Enable highlighting of keys pressed on physical keyboard.\n * @property {boolean} preventMouseDownDefault Calling preventDefault for the mousedown events keeps the focus on the input.\n * @property {boolean} stopMouseDownPropagation Stops pointer down events on simple-keyboard buttons from bubbling to parent elements.\n * @property {string} physicalKeyboardHighlightTextColor Define the text color that the physical keyboard highlighted key should have.\n * @property {string} physicalKeyboardHighlightBgColor Define the background color that the physical keyboard highlighted key should have.\n * @property {function(button: string):string} onKeyPress Executes the callback function on key press. Returns button layout name (i.e.: “{shift}”).\n * @property {function(input: string):string} onChange Executes the callback function on input change. Returns the current input’s string.\n * @property {function} onRender Executes the callback function every time simple-keyboard is rendered (e.g: when you change layouts).\n * @property {function} onInit Executes the callback function once simple-keyboard is rendered for the first time (on initialization).\n * @property {function(inputs: object):object} onChangeAll Executes the callback function on input change. Returns the input object with all defined inputs.\n * @property {boolean} useButtonTag Render buttons as a button element instead of a div element.\n * @property {boolean} disableCaretPositioning A prop to ensure characters are always be added/removed at the end of the string.\n * @property {object} inputPattern Restrains input(s) change to the defined regular expression pattern.\n * @property {boolean} useTouchEvents Instructs simple-keyboard to use touch events instead of click events.\n * @property {boolean} autoUseTouchEvents Enable useTouchEvents automatically when touch device is detected.\n * @property {boolean} useMouseEvents Opt out of PointerEvents handling, falling back to the prior mouse event logic.\n * @property {function} destroy Clears keyboard listeners and DOM elements.\n * @property {boolean} disableButtonHold Disable button hold action.\n * @property {function} onKeyReleased Executes the callback function on key release.\n * @property {array} modules Module classes to be loaded by simple-keyboard.\n */\n this.options = options;\n this.options.layoutName = this.options.layoutName || \"default\";\n this.options.theme = this.options.theme || \"hg-theme-default\";\n this.options.inputName = this.options.inputName || \"default\";\n this.options.preventMouseDownDefault =\n this.options.preventMouseDownDefault || false;\n\n /**\n * @type {object} Classes identifying loaded plugins\n */\n this.keyboardPluginClasses = \"\";\n\n /**\n * Bindings\n */\n Utilities.bindMethods(SimpleKeyboard, this);\n\n /**\n * simple-keyboard uses a non-persistent internal input to keep track of the entered string (the variable `keyboard.input`).\n * This removes any dependency to input DOM elements. You can type and directly display the value in a div element, for example.\n * @example\n * // To get entered input\n * const input = keyboard.getInput();\n *\n * // To clear entered input.\n * keyboard.clearInput();\n *\n * @type {object}\n * @property {object} default Default SimpleKeyboard internal input.\n * @property {object} myInputName Example input that can be set through `options.inputName:\"myInputName\"`.\n */\n this.input = {};\n this.input[this.options.inputName] = \"\";\n\n /**\n * @type {string} DOM class of the keyboard wrapper, normally \"simple-keyboard\" by default.\n */\n this.keyboardDOMClass = keyboardDOMClass;\n\n /**\n * @type {object} Contains the DOM elements of every rendered button, the key being the button's layout name (e.g.: \"{enter}\").\n */\n this.buttonElements = {};\n\n /**\n * Simple-keyboard Instances\n * This enables multiple simple-keyboard support with easier management\n */\n if (!window[\"SimpleKeyboardInstances\"])\n window[\"SimpleKeyboardInstances\"] = {};\n\n this.currentInstanceName = this.utilities.camelCase(this.keyboardDOMClass);\n window[\"SimpleKeyboardInstances\"][this.currentInstanceName] = this;\n\n /**\n * Instance vars\n */\n this.allKeyboardInstances = window[\"SimpleKeyboardInstances\"];\n this.keyboardInstanceNames = Object.keys(window[\"SimpleKeyboardInstances\"]);\n this.isFirstKeyboardInstance =\n this.keyboardInstanceNames[0] === this.currentInstanceName;\n\n /**\n * Physical Keyboard support\n */\n this.physicalKeyboard = new PhysicalKeyboard({\n dispatch: this.dispatch,\n getOptions: this.getOptions\n });\n\n /**\n * Rendering keyboard\n */\n if (this.keyboardDOM) this.render();\n else {\n console.warn(`\".${keyboardDOMClass}\" was not found in the DOM.`);\n throw new Error(\"KEYBOARD_DOM_ERROR\");\n }\n\n /**\n * Modules\n */\n this.modules = {};\n this.loadModules();\n }\n\n /**\n * parseParams\n */\n handleParams = params => {\n let keyboardDOMClass;\n let keyboardDOM;\n let options;\n\n /**\n * If first parameter is a string:\n * Consider it as an element's class\n */\n if (typeof params[0] === \"string\") {\n keyboardDOMClass = params[0].split(\".\").join(\"\");\n keyboardDOM = document.querySelector(`.${keyboardDOMClass}`);\n options = params[1];\n\n /**\n * If first parameter is an HTMLDivElement\n * Consider it as the keyboard DOM element\n */\n } else if (params[0] instanceof HTMLDivElement) {\n /**\n * This element must have a class, otherwise throw\n */\n if (!params[0].className) {\n console.warn(\"Any DOM element passed as parameter must have a class.\");\n throw new Error(\"KEYBOARD_DOM_CLASS_ERROR\");\n }\n\n keyboardDOMClass = params[0].className.split(\" \")[0];\n keyboardDOM = params[0];\n options = params[1];\n\n /**\n * Otherwise, search for .simple-keyboard DOM element\n */\n } else {\n keyboardDOMClass = \"simple-keyboard\";\n keyboardDOM = document.querySelector(`.${keyboardDOMClass}`);\n options = params[0];\n }\n\n return {\n keyboardDOMClass,\n keyboardDOM,\n options\n };\n };\n\n /**\n * Getters\n */\n getOptions = () => this.options;\n getCaretPosition = () => this.caretPosition;\n getCaretPositionEnd = () => this.caretPositionEnd;\n\n /**\n * Setters\n */\n setCaretPosition(position, endPosition) {\n this.caretPosition = position;\n this.caretPositionEnd = endPosition || position;\n }\n\n /**\n * Handles clicks made to keyboard buttons\n * @param {string} button The button's layout name.\n */\n handleButtonClicked(button) {\n const debug = this.options.debug;\n\n /**\n * Ignoring placeholder buttons\n */\n if (button === \"{//}\") return false;\n\n /**\n * Calling onKeyPress\n */\n if (typeof this.options.onKeyPress === \"function\")\n this.options.onKeyPress(button);\n\n if (!this.input[this.options.inputName])\n this.input[this.options.inputName] = \"\";\n\n const updatedInput = this.utilities.getUpdatedInput(\n button,\n this.input[this.options.inputName],\n this.caretPosition,\n this.caretPositionEnd\n );\n\n if (\n // If input will change as a result of this button press\n this.input[this.options.inputName] !== updatedInput &&\n // This pertains to the \"inputPattern\" option:\n // If inputPattern isn't set\n (!this.options.inputPattern ||\n // Or, if it is set and if the pattern is valid - we proceed.\n (this.options.inputPattern && this.inputPatternIsValid(updatedInput)))\n ) {\n /**\n * If maxLength and handleMaxLength yield true, halting\n */\n if (\n this.options.maxLength &&\n this.utilities.handleMaxLength(this.input, updatedInput)\n ) {\n return false;\n }\n\n this.input[this.options.inputName] = this.utilities.getUpdatedInput(\n button,\n this.input[this.options.inputName],\n this.caretPosition,\n this.caretPositionEnd,\n true\n );\n\n if (debug) console.log(\"Input changed:\", this.input);\n\n if (this.options.debug) {\n console.log(\n \"Caret at: \",\n this.getCaretPosition(),\n this.getCaretPositionEnd(),\n `(${this.keyboardDOMClass})`\n );\n }\n\n /**\n * Enforce syncInstanceInputs, if set\n */\n if (this.options.syncInstanceInputs) this.syncInstanceInputs();\n\n /**\n * Calling onChange\n */\n if (typeof this.options.onChange === \"function\")\n this.options.onChange(this.input[this.options.inputName]);\n\n /**\n * Calling onChangeAll\n */\n if (typeof this.options.onChangeAll === \"function\")\n this.options.onChangeAll(this.input);\n }\n\n if (debug) {\n console.log(\"Key pressed:\", button);\n }\n }\n\n /**\n * Handles button mousedown\n */\n /* istanbul ignore next */\n handleButtonMouseDown(button, e) {\n /**\n * Handle event options\n */\n if (this.options.preventMouseDownDefault) e.preventDefault();\n if (this.options.stopMouseDownPropagation) e.stopPropagation();\n\n /**\n * Add active class\n */\n if (e) e.target.classList.add(this.activeButtonClass);\n\n if (this.holdInteractionTimeout) clearTimeout(this.holdInteractionTimeout);\n if (this.holdTimeout) clearTimeout(this.holdTimeout);\n\n /**\n * @type {boolean} Whether the mouse is being held onKeyPress\n */\n this.isMouseHold = true;\n\n /**\n * @type {object} Time to wait until a key hold is detected\n */\n if (!this.options.disableButtonHold) {\n this.holdTimeout = setTimeout(() => {\n if (\n (this.isMouseHold &&\n // TODO: This needs to be configurable through options\n ((!button.includes(\"{\") && !button.includes(\"}\")) ||\n button === \"{delete}\" ||\n button === \"{backspace}\" ||\n button === \"{bksp}\" ||\n button === \"{space}\" ||\n button === \"{tab}\")) ||\n button === \"{arrowright}\" ||\n button === \"{arrowleft}\" ||\n button === \"{arrowup}\" ||\n button === \"{arrowdown}\"\n ) {\n if (this.options.debug) console.log(\"Button held:\", button);\n\n this.handleButtonHold(button, e);\n }\n clearTimeout(this.holdTimeout);\n }, 500);\n }\n }\n\n /**\n * Handles button mouseup\n */\n handleButtonMouseUp(button) {\n this.dispatch(instance => {\n /**\n * Remove active class\n */\n instance.recurseButtons(buttonElement => {\n buttonElement.classList.remove(this.activeButtonClass);\n });\n\n instance.isMouseHold = false;\n if (instance.holdInteractionTimeout)\n clearTimeout(instance.holdInteractionTimeout);\n });\n\n /**\n * Calling onKeyReleased\n */\n if (button && typeof this.options.onKeyReleased === \"function\")\n this.options.onKeyReleased(button);\n }\n\n /**\n * Handles container mousedown\n */\n handleKeyboardContainerMouseDown(e) {\n /**\n * Handle event options\n */\n if (this.options.preventMouseDownDefault) e.preventDefault();\n }\n\n /**\n * Handles button hold\n */\n /* istanbul ignore next */\n handleButtonHold(button) {\n if (this.holdInteractionTimeout) clearTimeout(this.holdInteractionTimeout);\n\n /**\n * @type {object} Timeout dictating the speed of key hold iterations\n */\n this.holdInteractionTimeout = setTimeout(() => {\n if (this.isMouseHold) {\n this.handleButtonClicked(button);\n this.handleButtonHold(button);\n } else {\n clearTimeout(this.holdInteractionTimeout);\n }\n }, 100);\n }\n\n /**\n * Send a command to all simple-keyboard instances (if you have several instances).\n */\n syncInstanceInputs() {\n this.dispatch(instance => {\n instance.replaceInput(this.input);\n instance.setCaretPosition(this.caretPosition, this.caretPositionEnd);\n });\n }\n\n /**\n * Clear the keyboard’s input.\n * @param {string} [inputName] optional - the internal input to select\n */\n clearInput(inputName) {\n inputName = inputName || this.options.inputName;\n this.input[inputName] = \"\";\n\n /**\n * Reset caretPosition\n */\n this.setCaretPosition(0);\n\n /**\n * Enforce syncInstanceInputs, if set\n */\n if (this.options.syncInstanceInputs) this.syncInstanceInputs();\n }\n\n /**\n * Get the keyboard’s input (You can also get it from the onChange prop).\n * @param {string} [inputName] optional - the internal input to select\n */\n getInput(inputName) {\n inputName = inputName || this.options.inputName;\n\n /**\n * Enforce syncInstanceInputs, if set\n */\n if (this.options.syncInstanceInputs) this.syncInstanceInputs();\n\n return this.input[inputName];\n }\n\n /**\n * Set the keyboard’s input.\n * @param {string} input the input value\n * @param {string} inputName optional - the internal input to select\n */\n setInput(input, inputName) {\n inputName = inputName || this.options.inputName;\n this.input[inputName] = input;\n\n /**\n * Enforce syncInstanceInputs, if set\n */\n if (this.options.syncInstanceInputs) this.syncInstanceInputs();\n }\n\n /**\n * Replace the input object (`keyboard.input`)\n * @param {object} inputObj The input object\n */\n replaceInput(inputObj) {\n this.input = inputObj;\n }\n\n /**\n * Set new option or modify existing ones after initialization.\n * @param {object} options The options to set\n */\n setOptions(options = {}) {\n const changedOptions = this.changedOptions(options);\n this.options = Object.assign(this.options, options);\n\n if (changedOptions.length) {\n if (this.options.debug) {\n console.log(\"changedOptions\", changedOptions);\n }\n\n /**\n * Some option changes require adjustments before re-render\n */\n this.onSetOptions(options);\n\n /**\n * Rendering\n */\n this.render();\n }\n }\n\n /**\n * Detecting changes to non-function options\n * This allows us to ascertain whether a button re-render is needed\n */\n changedOptions(newOptions) {\n return Object.keys(newOptions).filter(\n optionName =>\n JSON.stringify(newOptions[optionName]) !==\n JSON.stringify(this.options[optionName])\n );\n }\n\n /**\n * Executing actions depending on changed options\n * @param {object} options The options to set\n */\n onSetOptions(options) {\n if (options.inputName) {\n /**\n * inputName changed. This requires a caretPosition reset\n */\n // TODO: Review side-effects\n if (this.options.debug) {\n console.log(\"inputName changed. caretPosition reset.\");\n }\n this.setCaretPosition(null);\n }\n }\n\n /**\n * Remove all keyboard rows and reset keyboard values.\n * Used internally between re-renders.\n */\n clear() {\n this.keyboardDOM.innerHTML = \"\";\n this.keyboardDOM.className = this.keyboardDOMClass;\n this.buttonElements = {};\n }\n\n /**\n * Send a command to all simple-keyboard instances at once (if you have multiple instances).\n * @param {function(instance: object, key: string)} callback Function to run on every instance\n */\n dispatch(callback) {\n if (!window[\"SimpleKeyboardInstances\"]) {\n console.warn(\n `SimpleKeyboardInstances is not defined. Dispatch cannot be called.`\n );\n throw new Error(\"INSTANCES_VAR_ERROR\");\n }\n\n return Object.keys(window[\"SimpleKeyboardInstances\"]).forEach(key => {\n callback(window[\"SimpleKeyboardInstances\"][key], key);\n });\n }\n\n /**\n * Adds/Modifies an entry to the `buttonTheme`. Basically a way to add a class to a button.\n * @param {string} buttons List of buttons to select (separated by a space).\n * @param {string} className Classes to give to the selected buttons (separated by space).\n */\n addButtonTheme(buttons, className) {\n if (!className || !buttons) return false;\n\n buttons.split(\" \").forEach(button => {\n className.split(\" \").forEach(classNameItem => {\n if (!this.options.buttonTheme) this.options.buttonTheme = [];\n\n let classNameFound = false;\n\n /**\n * If class is already defined, we add button to class definition\n */\n this.options.buttonTheme.map(buttonTheme => {\n if (buttonTheme.class.split(\" \").includes(classNameItem)) {\n classNameFound = true;\n\n const buttonThemeArray = buttonTheme.buttons.split(\" \");\n if (!buttonThemeArray.includes(button)) {\n classNameFound = true;\n buttonThemeArray.push(button);\n buttonTheme.buttons = buttonThemeArray.join(\" \");\n }\n }\n return buttonTheme;\n });\n\n /**\n * If class is not defined, we create a new entry\n */\n if (!classNameFound) {\n this.options.buttonTheme.push({\n class: classNameItem,\n buttons: buttons\n });\n }\n });\n });\n\n this.render();\n }\n\n /**\n * Removes/Amends an entry to the `buttonTheme`. Basically a way to remove a class previously added to a button through buttonTheme or addButtonTheme.\n * @param {string} buttons List of buttons to select (separated by a space).\n * @param {string} className Classes to give to the selected buttons (separated by space).\n */\n removeButtonTheme(buttons, className) {\n /**\n * When called with empty parameters, remove all button themes\n */\n if (!buttons && !className) {\n this.options.buttonTheme = [];\n this.render();\n return false;\n }\n\n /**\n * If buttons are passed and buttonTheme has items\n */\n if (\n buttons &&\n Array.isArray(this.options.buttonTheme) &&\n this.options.buttonTheme.length\n ) {\n const buttonArray = buttons.split(\" \");\n buttonArray.forEach(button => {\n this.options.buttonTheme.map((buttonTheme, index) => {\n /**\n * If className is set, we affect the buttons only for that class\n * Otherwise, we afect all classes\n */\n if (\n (className && className.includes(buttonTheme.class)) ||\n !className\n ) {\n const filteredButtonArray = buttonTheme.buttons\n .split(\" \")\n .filter(item => item !== button);\n\n /**\n * If buttons left, return them, otherwise, remove button Theme\n */\n if (filteredButtonArray.length) {\n buttonTheme.buttons = filteredButtonArray.join(\" \");\n } else {\n this.options.buttonTheme.splice(index, 1);\n buttonTheme = null;\n }\n }\n\n return buttonTheme;\n });\n });\n\n this.render();\n }\n }\n\n /**\n * Get the DOM Element of a button. If there are several buttons with the same name, an array of the DOM Elements is returned.\n * @param {string} button The button layout name to select\n */\n getButtonElement(button) {\n let output;\n\n const buttonArr = this.buttonElements[button];\n if (buttonArr) {\n if (buttonArr.length > 1) {\n output = buttonArr;\n } else {\n output = buttonArr[0];\n }\n }\n\n return output;\n }\n\n /**\n * This handles the \"inputPattern\" option\n * by checking if the provided inputPattern passes\n */\n inputPatternIsValid(inputVal) {\n const inputPatternRaw = this.options.inputPattern;\n let inputPattern;\n\n /**\n * Check if input pattern is global or targeted to individual inputs\n */\n if (inputPatternRaw instanceof RegExp) {\n inputPattern = inputPatternRaw;\n } else {\n inputPattern = inputPatternRaw[this.options.inputName];\n }\n\n if (inputPattern && inputVal) {\n const didInputMatch = inputPattern.test(inputVal);\n\n if (this.options.debug) {\n console.log(\n `inputPattern (\"${inputPattern}\"): ${\n didInputMatch ? \"passed\" : \"did not pass!\"\n }`\n );\n }\n\n return didInputMatch;\n } else {\n /**\n * inputPattern doesn't seem to be set for the current input, or input is empty. Pass.\n */\n return true;\n }\n }\n\n /**\n * Handles simple-keyboard event listeners\n */\n setEventListeners() {\n const { useTouchEvents, useMouseEvents } = this.options;\n\n /**\n * Only first instance should set the event listeners\n */\n if (this.isFirstKeyboardInstance || !this.allKeyboardInstances) {\n if (this.options.debug) {\n console.log(`Caret handling started (${this.keyboardDOMClass})`);\n }\n\n /**\n * Event Listeners\n */\n document.onkeyup = this.handleKeyUp;\n document.onkeydown = this.handleKeyDown;\n\n /**\n * Pointer events\n */\n if (\n this.utilities.pointerEventsSupported() &&\n !useTouchEvents &&\n !useMouseEvents\n ) {\n document.onpointerdown = this.handlePointerDown;\n document.onpointerup = this.handlePointerUp;\n document.onpointercancel = this.handlePointerUp;\n\n this.keyboardDOM.onpointerdown = this.handleKeyboardContainerMouseDown;\n\n /**\n * Touch events\n */\n } else if (useTouchEvents) {\n document.ontouchstart = this.handlePointerDown;\n document.ontouchend = this.handlePointerUp;\n document.ontouchcancel = this.handlePointerUp;\n\n this.keyboardDOM.ontouchstart = this.handleKeyboardContainerMouseDown;\n\n /**\n * Mouse events\n */\n } else if (!useTouchEvents) {\n document.onmousedown = this.handlePointerDown;\n document.onmouseup = this.handlePointerUp;\n\n this.keyboardDOM.onmousedown = this.handleKeyboardContainerMouseDown;\n }\n }\n }\n\n /**\n * Event Handler: KeyUp\n */\n handleKeyUp(event) {\n this.caretEventHandler(event);\n\n if (this.options.physicalKeyboardHighlight) {\n this.physicalKeyboard.handleHighlightKeyUp(event);\n }\n }\n\n /**\n * Event Handler: KeyDown\n */\n handleKeyDown(event) {\n if (this.options.physicalKeyboardHighlight) {\n this.physicalKeyboard.handleHighlightKeyDown(event);\n }\n }\n\n /**\n * Event Handler: PointerDown\n */\n handlePointerDown(event) {\n this.caretEventHandler(event);\n }\n\n /**\n * Event Handler: PointerUp\n */\n handlePointerUp(event) {\n this.handleButtonMouseUp();\n this.caretEventHandler(event);\n }\n\n /**\n * Called by {@link setEventListeners} when an event that warrants a cursor position update is triggered\n */\n caretEventHandler(event) {\n if (this.options.disableCaretPositioning) {\n this.setCaretPosition(null);\n return;\n }\n\n let targetTagName;\n\n if (event.target.tagName) {\n targetTagName = event.target.tagName.toLowerCase();\n }\n\n /* istanbul ignore next */\n this.dispatch(instance => {\n const isKeyboard =\n event.target === instance.keyboardDOM ||\n (event.target && instance.keyboardDOM.contains(event.target));\n\n // if (!this.isMouseHold) {\n // instance.isMouseHold = false;\n // }\n\n if (targetTagName === \"textarea\" || targetTagName === \"input\") {\n /**\n * Tracks current cursor position\n * As keys are pressed, text will be added/removed at that position within the input.\n */\n instance.setCaretPosition(\n event.target.selectionStart,\n event.target.selectionEnd\n );\n\n if (instance.options.debug) {\n console.log(\n \"Caret at: \",\n instance.getCaretPosition(),\n instance.getCaretPositionEnd(),\n event && event.target.tagName.toLowerCase(),\n `(${instance.keyboardDOMClass})`\n );\n }\n\n // TODO: Review side-effects\n } else if (!isKeyboard) {\n instance.setCaretPosition(null);\n }\n });\n }\n\n /**\n * Execute an operation on each button\n */\n recurseButtons(fn) {\n if (!fn) return false;\n\n Object.keys(this.buttonElements).forEach(buttonName =>\n this.buttonElements[buttonName].forEach(fn)\n );\n }\n\n /**\n * Destroy keyboard listeners and DOM elements\n */\n destroy() {\n if (this.options.debug)\n console.log(\n `Destroying simple-keyboard instance: ${this.currentInstanceName}`\n );\n\n /**\n * Remove buttons\n */\n let deleteButton = buttonElement => {\n buttonElement.onpointerdown = null;\n buttonElement.onpointerup = null;\n buttonElement.onpointercancel = null;\n buttonElement.ontouchstart = null;\n buttonElement.ontouchend = null;\n buttonElement.ontouchcancel = null;\n buttonElement.onclick = null;\n buttonElement.onmousedown = null;\n buttonElement.onmouseup = null;\n\n buttonElement.remove();\n buttonElement = null;\n };\n\n this.recurseButtons(deleteButton);\n deleteButton = null;\n\n /**\n * Remove wrapper events\n */\n this.keyboardDOM.onpointerdown = null;\n this.keyboardDOM.ontouchstart = null;\n this.keyboardDOM.onmousedown = null;\n\n /**\n * Clearing keyboard wrapper\n */\n this.clear();\n\n /**\n * Remove timouts\n */\n /* istanbul ignore next */\n if (this.holdInteractionTimeout) clearTimeout(this.holdInteractionTimeout);\n /* istanbul ignore next */\n if (this.holdTimeout) clearTimeout(this.holdTimeout);\n\n /**\n * Remove instance\n */\n window[\"SimpleKeyboardInstances\"][this.currentInstanceName] = null;\n delete window[\"SimpleKeyboardInstances\"][this.currentInstanceName];\n\n /**\n * Removing document listeners if there are no more instances\n */\n if (!Object.keys(window[\"SimpleKeyboardInstances\"]).length) {\n /**\n * Remove document listeners\n */\n document.onkeydown = null;\n document.onkeyup = null;\n\n document.onpointerdown = null;\n document.onpointerup = null;\n\n document.onmousedown = null;\n document.onmouseup = null;\n\n document.ontouchstart = null;\n document.ontouchend = null;\n document.ontouchcancel = null;\n\n if (this.options.debug) {\n console.log(\n \"Destroy: No instances remaining. Document listeners removed\",\n window[\"SimpleKeyboardInstances\"]\n );\n }\n } else {\n if (this.options.debug) {\n console.log(\n \"Destroy: Instances remaining! Document listeners not removed\",\n window[\"SimpleKeyboardInstances\"]\n );\n }\n }\n\n /**\n * Reset initialized flag\n */\n this.initialized = false;\n }\n\n /**\n * Process buttonTheme option\n */\n getButtonThemeClasses(button) {\n const buttonTheme = this.options.buttonTheme;\n let buttonClasses = [];\n\n if (Array.isArray(buttonTheme)) {\n buttonTheme.forEach(themeObj => {\n if (\n themeObj.class &&\n typeof themeObj.class === \"string\" &&\n themeObj.buttons &&\n typeof themeObj.buttons === \"string\"\n ) {\n const themeObjClasses = themeObj.class.split(\" \");\n const themeObjButtons = themeObj.buttons.split(\" \");\n\n if (themeObjButtons.includes(button)) {\n buttonClasses = [...buttonClasses, ...themeObjClasses];\n }\n } else {\n console.warn(\n `Incorrect \"buttonTheme\". Please check the documentation.`,\n themeObj\n );\n }\n });\n }\n\n return buttonClasses;\n }\n\n /**\n * Process buttonAttributes option\n */\n setDOMButtonAttributes(button, callback) {\n const buttonAttributes = this.options.buttonAttributes;\n\n if (Array.isArray(buttonAttributes)) {\n buttonAttributes.forEach(attrObj => {\n if (\n attrObj.attribute &&\n typeof attrObj.attribute === \"string\" &&\n attrObj.value &&\n typeof attrObj.value === \"string\" &&\n attrObj.buttons &&\n typeof attrObj.buttons === \"string\"\n ) {\n const attrObjButtons = attrObj.buttons.split(\" \");\n\n if (attrObjButtons.includes(button)) {\n callback(attrObj.attribute, attrObj.value);\n }\n } else {\n console.warn(\n `Incorrect \"buttonAttributes\". Please check the documentation.`,\n attrObj\n );\n }\n });\n }\n }\n\n onTouchDeviceDetected() {\n /**\n * Processing autoTouchEvents\n */\n this.processAutoTouchEvents();\n\n /**\n * Disabling contextual window on touch devices\n */\n this.disableContextualWindow();\n }\n\n /**\n * Disabling contextual window for hg-button\n */\n /* istanbul ignore next */\n disableContextualWindow() {\n window.oncontextmenu = event => {\n if (event.target.classList.contains(\"hg-button\")) {\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n };\n }\n\n /**\n * Process autoTouchEvents option\n */\n processAutoTouchEvents() {\n if (this.options.autoUseTouchEvents) {\n this.options.useTouchEvents = true;\n\n if (this.options.debug) {\n console.log(\n `autoUseTouchEvents: Touch device detected, useTouchEvents enabled.`\n );\n }\n }\n }\n\n /**\n * Executes the callback function once simple-keyboard is rendered for the first time (on initialization).\n */\n onInit() {\n if (this.options.debug) {\n console.log(`${this.keyboardDOMClass} Initialized`);\n }\n\n /**\n * setEventListeners\n */\n this.setEventListeners();\n\n if (typeof this.options.onInit === \"function\") this.options.onInit();\n }\n\n /**\n * Executes the callback function before a simple-keyboard render.\n */\n beforeFirstRender() {\n /**\n * Performing actions when touch device detected\n */\n if (this.utilities.isTouchDevice()) {\n this.onTouchDeviceDetected();\n }\n\n if (typeof this.options.beforeFirstRender === \"function\")\n this.options.beforeFirstRender();\n\n /**\n * Notify about PointerEvents usage\n */\n if (\n this.isFirstKeyboardInstance &&\n this.utilities.pointerEventsSupported() &&\n !this.options.useTouchEvents &&\n !this.options.useMouseEvents\n ) {\n if (this.options.debug) {\n console.log(\"Using PointerEvents as it is supported by this browser\");\n }\n }\n\n /**\n * Notify about touch events usage\n */\n if (this.options.useTouchEvents) {\n if (this.options.debug) {\n console.log(\n \"useTouchEvents has been enabled. Only touch events will be used.\"\n );\n }\n }\n }\n\n /**\n * Executes the callback function before a simple-keyboard render.\n */\n beforeRender() {\n if (typeof this.options.beforeRender === \"function\")\n this.options.beforeRender();\n }\n\n /**\n * Executes the callback function every time simple-keyboard is rendered (e.g: when you change layouts).\n */\n onRender() {\n if (typeof this.options.onRender === \"function\") this.options.onRender();\n }\n\n /**\n * Executes the callback function once all modules have been loaded\n */\n onModulesLoaded() {\n if (typeof this.options.onModulesLoaded === \"function\")\n this.options.onModulesLoaded(this);\n }\n\n /**\n * Register module\n */\n registerModule = (name, initCallback) => {\n if (!this.modules[name]) this.modules[name] = {};\n\n initCallback(this.modules[name]);\n };\n\n /**\n * Load modules\n */\n loadModules() {\n if (Array.isArray(this.options.modules)) {\n this.options.modules.forEach(KeyboardModule => {\n const keyboardModule = new KeyboardModule();\n\n /* istanbul ignore next */\n if (\n keyboardModule.constructor.name &&\n keyboardModule.constructor.name !== \"Function\"\n ) {\n const classStr = `module-${this.utilities.camelCase(\n keyboardModule.constructor.name\n )}`;\n this.keyboardPluginClasses =\n this.keyboardPluginClasses + ` ${classStr}`;\n }\n\n keyboardModule.init(this);\n });\n\n this.keyboardPluginClasses =\n this.keyboardPluginClasses + \" modules-loaded\";\n\n this.render();\n this.onModulesLoaded();\n }\n }\n\n /**\n * Get module prop\n */\n getModuleProp(name, prop) {\n if (!this.modules[name]) return false;\n\n return this.modules[name][prop];\n }\n\n /**\n * getModulesList\n */\n getModulesList() {\n return Object.keys(this.modules);\n }\n\n /**\n * Parse Row DOM containers\n */\n parseRowDOMContainers(\n rowDOM,\n rowIndex,\n containerStartIndexes,\n containerEndIndexes\n ) {\n const rowDOMArray = Array.from(rowDOM.children);\n let removedElements = 0;\n\n if (rowDOMArray.length) {\n containerStartIndexes.forEach((startIndex, arrIndex) => {\n const endIndex = containerEndIndexes[arrIndex];\n\n /**\n * If there exists a respective end index\n * if end index comes after start index\n */\n if (!endIndex || !(endIndex > startIndex)) {\n return false;\n }\n\n /**\n * Updated startIndex, endIndex\n * This is since the removal of buttons to place a single button container\n * results in a modified array size\n */\n const updated_startIndex = startIndex - removedElements;\n const updated_endIndex = endIndex - removedElements;\n\n /**\n * Create button container\n */\n const containerDOM = document.createElement(\"div\");\n containerDOM.className += \"hg-button-container\";\n const containerUID = `${this.options.layoutName}-r${rowIndex}c${arrIndex}`;\n containerDOM.setAttribute(\"data-skUID\", containerUID);\n\n /**\n * Taking elements due to be inserted into container\n */\n const containedElements = rowDOMArray.splice(\n updated_startIndex,\n updated_endIndex - updated_startIndex + 1\n );\n removedElements = updated_endIndex - updated_startIndex;\n\n /**\n * Inserting elements to container\n */\n containedElements.forEach(element => containerDOM.appendChild(element));\n\n /**\n * Adding container at correct position within rowDOMArray\n */\n rowDOMArray.splice(updated_startIndex, 0, containerDOM);\n\n /**\n * Clearing old rowDOM children structure\n */\n rowDOM.innerHTML = \"\";\n\n /**\n * Appending rowDOM new children list\n */\n rowDOMArray.forEach(element => rowDOM.appendChild(element));\n\n if (this.options.debug) {\n console.log(\n \"rowDOMContainer\",\n containedElements,\n updated_startIndex,\n updated_endIndex,\n removedElements + 1\n );\n }\n });\n }\n\n return rowDOM;\n }\n\n /**\n * getKeyboardClassString\n */\n getKeyboardClassString = (...baseDOMClasses) => {\n const keyboardClasses = [this.keyboardDOMClass, ...baseDOMClasses].filter(\n DOMClass => !!DOMClass\n );\n\n return keyboardClasses.join(\" \");\n };\n\n /**\n * Renders rows and buttons as per options\n */\n render() {\n /**\n * Clear keyboard\n */\n this.clear();\n\n /**\n * Calling beforeFirstRender\n */\n if (!this.initialized) {\n this.beforeFirstRender();\n }\n\n /**\n * Calling beforeRender\n */\n this.beforeRender();\n\n const layoutClass = `hg-layout-${this.options.layoutName}`;\n const layout = this.options.layout || getDefaultLayout();\n const useTouchEvents = this.options.useTouchEvents || false;\n const useTouchEventsClass = useTouchEvents ? \"hg-touch-events\" : \"\";\n const useMouseEvents = this.options.useMouseEvents || false;\n const disableRowButtonContainers = this.options.disableRowButtonContainers;\n\n /**\n * Adding themeClass, layoutClass to keyboardDOM\n */\n this.keyboardDOM.className = this.getKeyboardClassString(\n this.options.theme,\n layoutClass,\n this.keyboardPluginClasses,\n useTouchEventsClass\n );\n\n /**\n * Iterating through each row\n */\n layout[this.options.layoutName].forEach((row, rIndex) => {\n const rowArray = row.split(\" \");\n\n /**\n * Creating empty row\n */\n let rowDOM = document.createElement(\"div\");\n rowDOM.className += \"hg-row\";\n\n /**\n * Tracking container indicators in rows\n */\n const containerStartIndexes = [];\n const containerEndIndexes = [];\n\n /**\n * Iterating through each button in row\n */\n rowArray.forEach((button, bIndex) => {\n /**\n * Check if button has a container indicator\n */\n const buttonHasContainerStart =\n !disableRowButtonContainers &&\n typeof button === \"string\" &&\n button.length > 1 &&\n button.indexOf(\"[\") === 0;\n\n const buttonHasContainerEnd =\n !disableRowButtonContainers &&\n typeof button === \"string\" &&\n button.length > 1 &&\n button.indexOf(\"]\") === button.length - 1;\n\n /**\n * Save container start index, if applicable\n */\n if (buttonHasContainerStart) {\n containerStartIndexes.push(bIndex);\n\n /**\n * Removing indicator\n */\n button = button.replace(/\\[/g, \"\");\n }\n\n if (buttonHasContainerEnd) {\n containerEndIndexes.push(bIndex);\n\n /**\n * Removing indicator\n */\n button = button.replace(/\\]/g, \"\");\n }\n\n /**\n * Processing button options\n */\n const fctBtnClass = this.utilities.getButtonClass(button);\n const buttonDisplayName = this.utilities.getButtonDisplayName(\n button,\n this.options.display,\n this.options.mergeDisplay\n );\n\n /**\n * Creating button\n */\n const buttonType = this.options.useButtonTag ? \"button\" : \"div\";\n const buttonDOM = document.createElement(buttonType);\n buttonDOM.className += `hg-button ${fctBtnClass}`;\n\n /**\n * Adding buttonTheme\n */\n buttonDOM.classList.add(...this.getButtonThemeClasses(button));\n\n /**\n * Adding buttonAttributes\n */\n this.setDOMButtonAttributes(button, (attribute, value) => {\n buttonDOM.setAttribute(attribute, value);\n });\n\n this.activeButtonClass = \"hg-activeButton\";\n\n /**\n * Handle button click event\n */\n /* istanbul ignore next */\n if (\n this.utilities.pointerEventsSupported() &&\n !useTouchEvents &&\n !useMouseEvents\n ) {\n /**\n * Handle PointerEvents\n */\n buttonDOM.onpointerdown = e => {\n this.handleButtonClicked(button);\n this.handleButtonMouseDown(button, e);\n };\n buttonDOM.onpointerup = () => {\n this.handleButtonMouseUp(button);\n };\n buttonDOM.onpointercancel = () => {\n this.handleButtonMouseUp(button);\n };\n } else {\n /**\n * Fallback for browsers not supporting PointerEvents\n */\n if (useTouchEvents) {\n /**\n * Handle touch events\n */\n buttonDOM.ontouchstart = e => {\n this.handleButtonClicked(button);\n this.handleButtonMouseDown(button, e);\n };\n buttonDOM.ontouchend = () => {\n this.handleButtonMouseUp(button);\n };\n buttonDOM.ontouchcancel = () => {\n this.handleButtonMouseUp(button);\n };\n } else {\n /**\n * Handle mouse events\n */\n buttonDOM.onclick = () => {\n this.handleButtonClicked(button);\n };\n buttonDOM.onmousedown = e => {\n this.handleButtonMouseDown(button, e);\n };\n buttonDOM.onmouseup = () => {\n this.handleButtonMouseUp(button);\n };\n }\n }\n\n /**\n * Adding identifier\n */\n buttonDOM.setAttribute(\"data-skBtn\", button);\n\n /**\n * Adding unique id\n * Since there's no limit on spawning same buttons, the unique id ensures you can style every button\n */\n const buttonUID = `${this.options.layoutName}-r${rIndex}b${bIndex}`;\n buttonDOM.setAttribute(\"data-skBtnUID\", buttonUID);\n\n /**\n * Adding button label to button\n */\n const buttonSpanDOM = document.createElement(\"span\");\n buttonSpanDOM.innerHTML = buttonDisplayName;\n buttonDOM.appendChild(buttonSpanDOM);\n\n /**\n * Adding to buttonElements\n */\n if (!this.buttonElements[button]) this.buttonElements[button] = [];\n\n this.buttonElements[button].push(buttonDOM);\n\n /**\n * Appending button to row\n */\n rowDOM.appendChild(buttonDOM);\n });\n\n /**\n * Parse containers in row\n */\n rowDOM = this.parseRowDOMContainers(\n rowDOM,\n rIndex,\n containerStartIndexes,\n containerEndIndexes\n );\n\n /**\n * Appending row to keyboard\n */\n this.keyboardDOM.appendChild(rowDOM);\n });\n\n /**\n * Calling onRender\n */\n this.onRender();\n\n if (!this.initialized) {\n /**\n * Ensures that onInit and beforeFirstRender are only called once per instantiation\n */\n this.initialized = true;\n\n /**\n * Calling onInit\n */\n this.onInit();\n }\n }\n}\n\nexport default SimpleKeyboard;\n","export const getDefaultLayout = () => {\n return {\n default: [\n \"` 1 2 3 4 5 6 7 8 9 0 - = {bksp}\",\n \"{tab} q w e r t y u i o p [ ] \\\\\",\n \"{lock} a s d f g h j k l ; ' {enter}\",\n \"{shift} z x c v b n m , . / {shift}\",\n \".com @ {space}\"\n ],\n shift: [\n \"~ ! @ # $ % ^ & * ( ) _ + {bksp}\",\n \"{tab} Q W E R T Y U I O P { } |\",\n '{lock} A S D F G H J K L : \" {enter}',\n \"{shift} Z X C V B N M < > ? {shift}\",\n \".com @ {space}\"\n ]\n };\n};\n","import SimpleKeyboard from \"./components/Keyboard\";\nexport default SimpleKeyboard;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","export const parseProps = props => ({\n ...props,\n theme: `simple-keyboard ${props.theme || \"hg-theme-default\"}`\n});\n\nconst cleanProps = sourceObj => ({\n ...sourceObj,\n keyboardRef: null,\n stateToIgnore: null\n});\n\nexport const changedProps = (prevProps, props) => {\n const cleanedProps = cleanProps(props);\n const cleanedPrevProps = cleanProps(prevProps);\n\n return Object.keys(cleanedProps).filter(\n propName => cleanedProps[propName] !== cleanedPrevProps[propName]\n );\n};\n","import React, { useEffect, useRef } from \"react\";\nimport Keyboard from \"simple-keyboard\";\nimport { parseProps, changedProps } from \"../services/Utilities\";\nimport PropTypes from \"prop-types\";\nimport \"simple-keyboard/build/css/index.css\";\n\nconst KeyboardReact = props => {\n const cssClass = props.baseClass || \"react-simple-keyboard\";\n const initRef = useRef();\n const keyboardRef = useRef();\n const previousProps = useRef(props);\n\n useEffect(() => {\n const parsedProps = parseProps(props);\n\n /**\n * Initialize simple-keyboard\n */\n if (!initRef.current) {\n initRef.current = true;\n parsedProps.debug && console.log(\"ReactSimpleKeyboard: Init\");\n keyboardRef.current = new Keyboard(`.${cssClass}`, parsedProps);\n parsedProps.keyboardRef && parsedProps.keyboardRef(keyboardRef.current);\n }\n\n const updatedProps = changedProps(previousProps.current, parsedProps);\n\n /**\n * Only trigger render if props changed\n */\n if (updatedProps.length) {\n const keyboard = keyboardRef.current;\n previousProps.current = parsedProps;\n keyboard.setOptions(parsedProps);\n parsedProps.debug &&\n console.log(\n \"ReactSimpleKeyboard - setOptions called due to updated props:\",\n updatedProps\n );\n }\n }, [initRef, cssClass, previousProps, props]);\n\n return
;\n};\n\nKeyboardReact.propTypes = {\n baseClass: PropTypes.string\n};\n\nexport default KeyboardReact;\n","import Keyboard from \"./components/Keyboard\";\n\nexport default Keyboard;\n"],"sourceRoot":""} \ No newline at end of file