Compare commits

..
659 Commits
Author SHA1 Message Date
Francisco Hodge d186fb1e09 Optimization: Removing non-minified dist 2019-08-17 16:27:06 -04:00
Francisco Hodge 29677485a9 2.25.4 2019-08-17 16:06:15 -04:00
Francisco Hodge 37ade80dd6 2.25.4 2019-08-17 16:05:07 -04:00
Francisco Hodge eab88f7de3 Merge 2019-08-17 15:39:38 -04:00
dependabot-preview[bot]andGitHub 26e6747b0f Merge pull request #200 from hodgef/dependabot/npm_and_yarn/jest-24.9.0 2019-08-17 09:40:05 +00:00
dependabot-preview[bot]andGitHub 88c462ddf3 Bump jest from 24.8.0 to 24.9.0
Bumps [jest](https://github.com/facebook/jest) from 24.8.0 to 24.9.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v24.8.0...v24.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-17 09:34:58 +00:00
dependabot-preview[bot]andGitHub 5452367733 Merge pull request #201 from hodgef/dependabot/npm_and_yarn/babel-jest-24.9.0 2019-08-17 09:32:34 +00:00
dependabot-preview[bot]andGitHub bdbf82828d Merge pull request #199 from hodgef/dependabot/npm_and_yarn/jest-resolve-24.9.0 2019-08-17 09:30:09 +00:00
dependabot-preview[bot]andGitHub e4b3622291 Merge pull request #198 from hodgef/dependabot/npm_and_yarn/webpack-4.39.2 2019-08-17 09:23:11 +00:00
dependabot-preview[bot]andGitHub 181dd240a0 Merge pull request #197 from hodgef/dependabot/npm_and_yarn/react-dev-utils-9.0.3 2019-08-17 09:17:49 +00:00
dependabot-preview[bot]andGitHub 628d27cf18 Bump babel-jest from 24.8.0 to 24.9.0
Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 24.8.0 to 24.9.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v24.9.0/packages/babel-jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-17 09:17:45 +00:00
dependabot-preview[bot]andGitHub de8dd3f204 Bump jest-resolve from 24.8.0 to 24.9.0
Bumps [jest-resolve](https://github.com/facebook/jest/tree/HEAD/packages/jest-resolve) from 24.8.0 to 24.9.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v24.9.0/packages/jest-resolve)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-17 09:15:30 +00:00
dependabot-preview[bot]andGitHub c696606b11 Bump webpack from 4.39.1 to 4.39.2
Bumps [webpack](https://github.com/webpack/webpack) from 4.39.1 to 4.39.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.39.1...v4.39.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-17 09:13:47 +00:00
dependabot-preview[bot]andGitHub 9e17a1e0df Bump react-dev-utils from 9.0.2 to 9.0.3
Bumps [react-dev-utils](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-dev-utils) from 9.0.2 to 9.0.3.
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-1.x.md)
- [Commits](https://github.com/facebook/create-react-app/commits/react-dev-utils@9.0.3/packages/react-dev-utils)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-17 09:13:02 +00:00
Francisco Hodge d1c9a0ead7 npm update 2019-08-13 11:18:50 -04:00
Francisco HodgeandGitHub b054ee45a3 Update README.md 2019-08-13 11:14:44 -04:00
Francisco Hodge c459ab60c1 npm update 2019-08-13 01:35:41 -04:00
Francisco HodgeandGitHub f2c690e010 Update README.md 2019-08-13 01:28:28 -04:00
Francisco HodgeandGitHub e567c3f19b Update README.md 2019-08-13 01:19:13 -04:00
Francisco Hodge e6f8f47975 npm update 2019-08-11 21:09:51 -04:00
Francisco Hodge 0541693901 Build update 2019-08-11 20:28:04 -04:00
Francisco Hodge cb598712c6 npm update 2019-08-11 20:24:37 -04:00
Francisco Hodge 020aa04894 Types update 2019-08-11 20:24:12 -04:00
Francisco Hodge 618800f455 Tests update 2019-08-11 20:23:59 -04:00
Francisco Hodge 74bb07d46a Added ButtonTheme/ButtonAttributes demo 2019-08-11 20:23:42 -04:00
Francisco Hodge f158a603c9 Added buttonAttributes option. Improved buttonTheme handling. Cleanup. Fixes #196 2019-08-11 20:21:21 -04:00
Francisco Hodge 23da05ee60 Build update 2019-08-11 00:15:13 -04:00
Francisco Hodge 331687de5b Added types for caretPosition 2019-08-11 00:08:30 -04:00
dependabot-preview[bot]andGitHub 1ac8bf00ef Merge pull request #195 from hodgef/dependabot/npm_and_yarn/react-16.9.0 2019-08-10 10:03:34 +00:00
dependabot-preview[bot]andGitHub eb68681f2a Bump react from 16.8.6 to 16.9.0
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 16.8.6 to 16.9.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.9.0/packages/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:58:30 +00:00
dependabot-preview[bot]andGitHub 312c9db7f7 Merge pull request #193 from hodgef/dependabot/npm_and_yarn/react-dev-utils-9.0.2 2019-08-10 09:56:18 +00:00
dependabot-preview[bot]andGitHub 7317ae147e Merge pull request #190 from hodgef/dependabot/npm_and_yarn/babel-preset-react-app-9.0.1 2019-08-10 09:51:33 +00:00
dependabot-preview[bot]andGitHub a4c0b824ea Merge pull request #194 from hodgef/dependabot/npm_and_yarn/eslint-plugin-react-hooks-1.7.0 2019-08-10 09:51:25 +00:00
dependabot-preview[bot]andGitHub a23b1ab6cd Bump react-dev-utils from 9.0.1 to 9.0.2
Bumps [react-dev-utils](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-dev-utils) from 9.0.1 to 9.0.2.
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-1.x.md)
- [Commits](https://github.com/facebook/create-react-app/commits/react-dev-utils@9.0.2/packages/react-dev-utils)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:49:05 +00:00
dependabot-preview[bot]andGitHub 485ae27dad Merge pull request #191 from hodgef/dependabot/npm_and_yarn/sass-loader-7.2.0 2019-08-10 09:46:59 +00:00
dependabot-preview[bot]andGitHub ed9c0744bd Merge pull request #192 from hodgef/dependabot/npm_and_yarn/webpack-dev-server-3.8.0 2019-08-10 09:41:10 +00:00
dependabot-preview[bot]andGitHub bc24494ec1 Bump eslint-plugin-react-hooks from 1.6.1 to 1.7.0
Bumps [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:34:43 +00:00
dependabot-preview[bot]andGitHub 9952ecd8be Merge pull request #189 from hodgef/dependabot/npm_and_yarn/file-loader-4.2.0 2019-08-10 09:32:35 +00:00
dependabot-preview[bot]andGitHub 419ca818a1 Merge pull request #188 from hodgef/dependabot/npm_and_yarn/babel-plugin-named-asset-import-0.3.3 2019-08-10 09:31:40 +00:00
dependabot-preview[bot]andGitHub cab2599dd1 Bump babel-preset-react-app from 9.0.0 to 9.0.1
Bumps [babel-preset-react-app](https://github.com/facebook/create-react-app/tree/HEAD/packages/babel-preset-react-app) from 9.0.0 to 9.0.1.
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-1.x.md)
- [Commits](https://github.com/facebook/create-react-app/commits/babel-preset-react-app@9.0.1/packages/babel-preset-react-app)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:30:15 +00:00
dependabot-preview[bot]andGitHub c59251694d Merge pull request #187 from hodgef/dependabot/npm_and_yarn/css-loader-3.2.0 2019-08-10 09:28:05 +00:00
dependabot-preview[bot]andGitHub e333ebacde Merge pull request #186 from hodgef/dependabot/npm_and_yarn/react-app-polyfill-1.0.2 2019-08-10 09:27:16 +00:00
dependabot-preview[bot]andGitHub 71b5af63b8 Bump sass-loader from 7.1.0 to 7.2.0
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 7.1.0 to 7.2.0.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v7.1.0...v7.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:25:57 +00:00
dependabot-preview[bot]andGitHub a24bcc4775 Merge pull request #185 from hodgef/dependabot/npm_and_yarn/style-loader-1.0.0 2019-08-10 09:23:35 +00:00
dependabot-preview[bot]andGitHub fa984e93e8 Bump webpack-dev-server from 3.7.2 to 3.8.0
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.7.2 to 3.8.0.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.7.2...v3.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:20:46 +00:00
dependabot-preview[bot]andGitHub 42be0e3f86 Bump file-loader from 4.1.0 to 4.2.0
Bumps [file-loader](https://github.com/webpack-contrib/file-loader) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/webpack-contrib/file-loader/releases)
- [Changelog](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/file-loader/compare/v4.1.0...v4.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:17:28 +00:00
dependabot-preview[bot]andGitHub e59afc0b0c Merge pull request #184 from hodgef/dependabot/npm_and_yarn/react-dom-16.9.0 2019-08-10 09:17:19 +00:00
dependabot-preview[bot]andGitHub 96eaa2c1d3 Bump babel-plugin-named-asset-import from 0.3.2 to 0.3.3
Bumps [babel-plugin-named-asset-import](https://github.com/facebook/create-react-app/tree/HEAD/packages/babel-plugin-named-asset-import) from 0.3.2 to 0.3.3.
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-1.x.md)
- [Commits](https://github.com/facebook/create-react-app/commits/babel-plugin-named-asset-import@0.3.3/packages/babel-plugin-named-asset-import)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:17:03 +00:00
dependabot-preview[bot]andGitHub 983d27c11c Bump css-loader from 3.1.0 to 3.2.0
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v3.1.0...v3.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:15:55 +00:00
dependabot-preview[bot]andGitHub cb67a69f9d Bump react-app-polyfill from 1.0.1 to 1.0.2
Bumps [react-app-polyfill](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-app-polyfill) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-1.x.md)
- [Commits](https://github.com/facebook/create-react-app/commits/react-app-polyfill@1.0.2/packages/react-app-polyfill)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:15:12 +00:00
dependabot-preview[bot]andGitHub abc03918be Bump style-loader from 0.23.1 to 1.0.0
Bumps [style-loader](https://github.com/webpack-contrib/style-loader) from 0.23.1 to 1.0.0.
- [Release notes](https://github.com/webpack-contrib/style-loader/releases)
- [Changelog](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/style-loader/compare/v0.23.1...v1.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:14:21 +00:00
dependabot-preview[bot]andGitHub 8029e1fce9 Bump react-dom from 16.8.6 to 16.9.0
Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 16.8.6 to 16.9.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.9.0/packages/react-dom)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-10 09:13:36 +00:00
dependabot-preview[bot]andGitHub 946fdbb417 Merge pull request #181 from hodgef/dependabot/npm_and_yarn/resolve-1.12.0 2019-08-03 09:47:25 +00:00
dependabot-preview[bot]andGitHub f5ceef195e Bump resolve from 1.11.1 to 1.12.0
Bumps [resolve](https://github.com/browserify/resolve) from 1.11.1 to 1.12.0.
- [Release notes](https://github.com/browserify/resolve/releases)
- [Commits](https://github.com/browserify/resolve/compare/v1.11.1...v1.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-03 09:36:40 +00:00
dependabot-preview[bot]andGitHub 82ad303159 Merge pull request #182 from hodgef/dependabot/npm_and_yarn/terser-webpack-plugin-1.4.1 2019-08-03 09:36:03 +00:00
dependabot-preview[bot]andGitHub 75d8167fad Merge pull request #183 from hodgef/dependabot/npm_and_yarn/uglifyjs-webpack-plugin-2.2.0 2019-08-03 09:34:38 +00:00
dependabot-preview[bot]andGitHub 32af9739be Merge pull request #180 from hodgef/dependabot/npm_and_yarn/eslint-plugin-flowtype-3.13.0 2019-08-03 09:26:34 +00:00
dependabot-preview[bot]andGitHub 89c8e39d0c Bump terser-webpack-plugin from 1.3.0 to 1.4.1
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 1.3.0 to 1.4.1.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v1.3.0...v1.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-03 09:24:21 +00:00
dependabot-preview[bot]andGitHub 434215cdef Bump uglifyjs-webpack-plugin from 2.1.3 to 2.2.0
Bumps [uglifyjs-webpack-plugin](https://github.com/webpack-contrib/uglifyjs-webpack-plugin) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/compare/v2.1.3...v2.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-03 09:24:03 +00:00
dependabot-preview[bot]andGitHub e513c8b49a Merge pull request #179 from hodgef/dependabot/npm_and_yarn/webpack-4.39.1 2019-08-03 09:21:58 +00:00
dependabot-preview[bot]andGitHub 6fa48db14e Bump eslint-plugin-flowtype from 3.10.4 to 3.13.0
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 3.10.4 to 3.13.0.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v3.10.4...v3.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-03 09:14:03 +00:00
dependabot-preview[bot]andGitHub d29f82e1ed Bump webpack from 4.38.0 to 4.39.1
Bumps [webpack](https://github.com/webpack/webpack) from 4.38.0 to 4.39.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.38.0...v4.39.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-03 09:13:09 +00:00
Francisco Hodge 4b77a07565 Build update 2019-07-31 21:04:51 -04:00
dependabot-preview[bot]andGitHub 4af477f749 Merge pull request #178 from hodgef/dependabot/npm_and_yarn/typescript-eslint/parser-1.13.0 2019-07-27 09:34:56 +00:00
dependabot-preview[bot]andGitHub f9439493d2 Merge pull request #177 from hodgef/dependabot/npm_and_yarn/semver-6.3.0 2019-07-27 09:28:58 +00:00
dependabot-preview[bot]andGitHub c23ff225c0 Bump @typescript-eslint/parser from 1.12.0 to 1.13.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v1.13.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-27 09:28:05 +00:00
dependabot-preview[bot]andGitHub cda4e404f5 Merge pull request #176 from hodgef/dependabot/npm_and_yarn/copy-webpack-plugin-5.0.4 2019-07-27 09:26:03 +00:00
dependabot-preview[bot]andGitHub f2c4d2d3df Merge pull request #175 from hodgef/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-1.13.0 2019-07-27 09:24:03 +00:00
dependabot-preview[bot]andGitHub dd73ebaaa9 Merge pull request #173 from hodgef/dependabot/npm_and_yarn/eslint-plugin-react-7.14.3 2019-07-27 09:21:51 +00:00
dependabot-preview[bot]andGitHub 7e2f5ac61d Merge pull request #174 from hodgef/dependabot/npm_and_yarn/webpack-4.38.0 2019-07-27 09:20:26 +00:00
dependabot-preview[bot]andGitHub 988871a5f8 Bump semver from 6.2.0 to 6.3.0
Bumps [semver](https://github.com/npm/node-semver) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.2.0...v6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-27 09:16:55 +00:00
dependabot-preview[bot]andGitHub d79cf5a591 Bump copy-webpack-plugin from 5.0.3 to 5.0.4
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 5.0.3 to 5.0.4.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v5.0.3...v5.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-27 09:15:48 +00:00
dependabot-preview[bot]andGitHub d8745a31c7 Bump @typescript-eslint/eslint-plugin from 1.12.0 to 1.13.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v1.13.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-27 09:15:02 +00:00
dependabot-preview[bot]andGitHub 2888562b65 Bump webpack from 4.36.1 to 4.38.0
Bumps [webpack](https://github.com/webpack/webpack) from 4.36.1 to 4.38.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.36.1...v4.38.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-27 09:14:14 +00:00
dependabot-preview[bot]andGitHub 83367c56cd Bump eslint-plugin-react from 7.14.2 to 7.14.3
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.14.2 to 7.14.3.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.14.2...v7.14.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-27 09:13:28 +00:00
dependabot-preview[bot]andGitHub 258d410dee Merge pull request #168 from hodgef/dependabot/npm_and_yarn/babel/core-7.5.5 2019-07-20 10:04:16 +00:00
dependabot-preview[bot]andGitHub 2b06589259 Merge pull request #167 from hodgef/dependabot/npm_and_yarn/html-webpack-plugin-4.0.0-beta.8 2019-07-20 10:01:15 +00:00
dependabot-preview[bot]andGitHub f83b592a61 Merge pull request #165 from hodgef/dependabot/npm_and_yarn/url-loader-2.1.0 2019-07-20 10:00:54 +00:00
dependabot-preview[bot]andGitHub 7a2fc73ac3 Merge pull request #170 from hodgef/dependabot/npm_and_yarn/mini-css-extract-plugin-0.8.0 2019-07-20 09:55:06 +00:00
dependabot-preview[bot]andGitHub ae70a518e5 Merge pull request #169 from hodgef/dependabot/npm_and_yarn/css-loader-3.1.0 2019-07-20 09:54:43 +00:00
dependabot-preview[bot]andGitHub 5f5ba69277 Bump @babel/core from 7.5.4 to 7.5.5
Bumps [@babel/core](https://github.com/babel/babel) from 7.5.4 to 7.5.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.5.4...v7.5.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:50:15 +00:00
dependabot-preview[bot]andGitHub f08e9d1031 Merge pull request #166 from hodgef/dependabot/npm_and_yarn/svgr/webpack-4.3.2 2019-07-20 09:48:11 +00:00
dependabot-preview[bot]andGitHub dbd4d3d7d2 Merge pull request #164 from hodgef/dependabot/npm_and_yarn/babel/plugin-proposal-class-properties-7.5.5 2019-07-20 09:45:57 +00:00
dependabot-preview[bot]andGitHub d8a350ae01 Merge pull request #163 from hodgef/dependabot/npm_and_yarn/babel/runtime-7.5.5 2019-07-20 09:41:30 +00:00
dependabot-preview[bot]andGitHub ce50ab2c4e Merge pull request #162 from hodgef/dependabot/npm_and_yarn/babel/preset-env-7.5.5 2019-07-20 09:35:12 +00:00
dependabot-preview[bot]andGitHub f16a3c7eff Bump html-webpack-plugin from 4.0.0-beta.7 to 4.0.0-beta.8
Bumps [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) from 4.0.0-beta.7 to 4.0.0-beta.8.
- [Release notes](https://github.com/jantimon/html-webpack-plugin/releases)
- [Changelog](https://github.com/jantimon/html-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jantimon/html-webpack-plugin/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:35:05 +00:00
dependabot-preview[bot]andGitHub 35cede2de1 Merge pull request #161 from hodgef/dependabot/npm_and_yarn/file-loader-4.1.0 2019-07-20 09:32:49 +00:00
dependabot-preview[bot]andGitHub d05bdd600b Bump url-loader from 2.0.1 to 2.1.0
Bumps [url-loader](https://github.com/webpack-contrib/url-loader) from 2.0.1 to 2.1.0.
- [Release notes](https://github.com/webpack-contrib/url-loader/releases)
- [Changelog](https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/url-loader/compare/v2.0.1...v2.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:25:46 +00:00
dependabot-preview[bot]andGitHub c4ebf1ada0 Merge pull request #160 from hodgef/dependabot/npm_and_yarn/webpack-4.36.1 2019-07-20 09:23:34 +00:00
dependabot-preview[bot]andGitHub fa7b7c0f59 Bump mini-css-extract-plugin from 0.7.0 to 0.8.0
Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.7.0...v0.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:22:25 +00:00
dependabot-preview[bot]andGitHub 3188c5859d Bump css-loader from 3.0.0 to 3.1.0
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v3.0.0...v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:21:43 +00:00
dependabot-preview[bot]andGitHub c9cb6cfbb3 Bump @svgr/webpack from 4.3.1 to 4.3.2
Bumps [@svgr/webpack](https://github.com/smooth-code/svgr) from 4.3.1 to 4.3.2.
- [Release notes](https://github.com/smooth-code/svgr/releases)
- [Changelog](https://github.com/smooth-code/svgr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smooth-code/svgr/compare/v4.3.1...v4.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:19:14 +00:00
dependabot-preview[bot]andGitHub fdee26e841 Merge pull request #159 from hodgef/dependabot/npm_and_yarn/eslint-plugin-import-2.18.2 2019-07-20 09:19:13 +00:00
dependabot-preview[bot]andGitHub 1384b6e0ff Bump @babel/plugin-proposal-class-properties from 7.5.0 to 7.5.5
Bumps [@babel/plugin-proposal-class-properties](https://github.com/babel/babel) from 7.5.0 to 7.5.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.5.0...v7.5.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:17:50 +00:00
dependabot-preview[bot]andGitHub 36163aceec Bump @babel/runtime from 7.5.4 to 7.5.5
Bumps [@babel/runtime](https://github.com/babel/babel) from 7.5.4 to 7.5.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.5.4...v7.5.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:17:10 +00:00
dependabot-preview[bot]andGitHub 80919dd755 Bump @babel/preset-env from 7.5.4 to 7.5.5
Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.5.4 to 7.5.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.5.4...v7.5.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:16:24 +00:00
dependabot-preview[bot]andGitHub 2197bb3abc Bump file-loader from 4.0.0 to 4.1.0
Bumps [file-loader](https://github.com/webpack-contrib/file-loader) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/webpack-contrib/file-loader/releases)
- [Changelog](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/file-loader/compare/v4.0.0...v4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:15:38 +00:00
dependabot-preview[bot]andGitHub 3a7088ec20 Bump webpack from 4.35.3 to 4.36.1
Bumps [webpack](https://github.com/webpack/webpack) from 4.35.3 to 4.36.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.35.3...v4.36.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:14:37 +00:00
dependabot-preview[bot]andGitHub cba9754672 Bump eslint-plugin-import from 2.18.0 to 2.18.2
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.18.0 to 2.18.2.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.18.0...v2.18.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-20 09:13:56 +00:00
Francisco Hodge f251e6ee35 Build update 2019-07-14 18:05:43 -04:00
Francisco Hodge 2113229d61 Merge remote-tracking branch 'origin' into staging 2019-07-14 17:11:32 -04:00
Francisco Hodge 460633a00d Build update 2019-07-14 17:09:48 -04:00
Francisco Hodge d4e9f51182 Return button in onKeyReleased method. Tests updated. Fixes #145 2019-07-14 11:55:03 -04:00
Francisco Hodge 8ba6f879d0 Code optimization, added onKeyReleased. Fixes #144, #145 2019-07-14 11:27:18 -04:00
Francisco Hodge 16f26bd6d9 Code optimization, added onKeyReleased 2019-07-14 11:06:43 -04:00
Francisco Hodge 5239521964 Code optimization, added onKeyReleased 2019-07-14 01:08:51 -04:00
dependabot-preview[bot]andGitHub b0a7748351 Merge pull request #149 from hodgef/dependabot/npm_and_yarn/babel/runtime-7.5.4 2019-07-13 09:52:06 +00:00
dependabot-preview[bot]andGitHub 9f42786deb Bump @babel/runtime from 7.5.1 to 7.5.4
Bumps [@babel/runtime](https://github.com/babel/babel) from 7.5.1 to 7.5.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.5.1...v7.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 09:48:07 +00:00
dependabot-preview[bot]andGitHub 910a9f5292 Merge pull request #152 from hodgef/dependabot/npm_and_yarn/typescript-eslint/parser-1.12.0 2019-07-13 09:45:55 +00:00
dependabot-preview[bot]andGitHub 3ad37394f2 Merge pull request #150 from hodgef/dependabot/npm_and_yarn/webpack-4.35.3 2019-07-13 09:44:40 +00:00
dependabot-preview[bot]andGitHub 2bc496e370 Merge pull request #153 from hodgef/dependabot/npm_and_yarn/babel/core-7.5.4 2019-07-13 09:37:36 +00:00
dependabot-preview[bot]andGitHub f6104e214f Merge pull request #151 from hodgef/dependabot/npm_and_yarn/babel/preset-env-7.5.4 2019-07-13 09:33:40 +00:00
dependabot-preview[bot]andGitHub 26ce879b3a Bump @typescript-eslint/parser from 1.11.0 to 1.12.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v1.12.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 09:31:03 +00:00
dependabot-preview[bot]andGitHub 4b68c236e2 Bump webpack from 4.35.2 to 4.35.3
Bumps [webpack](https://github.com/webpack/webpack) from 4.35.2 to 4.35.3.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.35.2...v4.35.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 09:30:53 +00:00
dependabot-preview[bot]andGitHub 04705619a4 Merge pull request #148 from hodgef/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-1.12.0 2019-07-13 09:28:51 +00:00
dependabot-preview[bot]andGitHub ab1facf287 Merge pull request #147 from hodgef/dependabot/npm_and_yarn/html-webpack-plugin-4.0.0-beta.7 2019-07-13 09:24:26 +00:00
dependabot-preview[bot]andGitHub 30c95a8264 Bump @babel/core from 7.5.0 to 7.5.4
Bumps [@babel/core](https://github.com/babel/babel) from 7.5.0 to 7.5.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.5.0...v7.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 09:20:13 +00:00
dependabot-preview[bot]andGitHub 07ac2fef5a Bump @babel/preset-env from 7.5.0 to 7.5.4
Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.5.0 to 7.5.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.5.0...v7.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 09:18:45 +00:00
dependabot-preview[bot]andGitHub 665a120a0b Merge pull request #146 from hodgef/dependabot/npm_and_yarn/postcss-preset-env-6.7.0 2019-07-13 09:17:43 +00:00
dependabot-preview[bot]andGitHub be69873219 Bump @typescript-eslint/eslint-plugin from 1.11.0 to 1.12.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v1.12.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 09:16:39 +00:00
dependabot-preview[bot]andGitHub a5281dba1c Bump html-webpack-plugin from 4.0.0-beta.5 to 4.0.0-beta.7
Bumps [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) from 4.0.0-beta.5 to 4.0.0-beta.7.
- [Release notes](https://github.com/jantimon/html-webpack-plugin/releases)
- [Changelog](https://github.com/jantimon/html-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jantimon/html-webpack-plugin/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 09:15:58 +00:00
dependabot-preview[bot]andGitHub 72733e57be Bump postcss-preset-env from 6.6.0 to 6.7.0
Bumps [postcss-preset-env](https://github.com/csstools/postcss-preset-env) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/csstools/postcss-preset-env/releases)
- [Changelog](https://github.com/csstools/postcss-preset-env/blob/master/CHANGELOG.md)
- [Commits](https://github.com/csstools/postcss-preset-env/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 09:15:11 +00:00
dependabot-preview[bot]andGitHub ea84c35e32 Merge pull request #143 from hodgef/dependabot/npm_and_yarn/lodash-4.17.14 2019-07-10 23:19:46 +00:00
dependabot-preview[bot]andGitHub bb36b32e5b [Security] Bump lodash from 4.17.11 to 4.17.14
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-10 23:17:04 +00:00
dependabot-preview[bot]andGitHub a44cca5ee9 Merge pull request #142 from hodgef/dependabot/npm_and_yarn/lodash.template-4.5.0 2019-07-10 20:46:04 +00:00
dependabot-preview[bot]andGitHub c9ec9716b7 [Security] Bump lodash.template from 4.4.0 to 4.5.0
Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.4.0...4.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-10 20:43:19 +00:00
Francisco Hodge c49d6f858b Build update 2019-07-08 00:31:15 -04:00
Francisco Hodge d4e54508f5 Removing active css styling for hg-button 2019-07-07 23:39:52 -04:00
dependabot-preview[bot]andGitHub b64a0383dc Merge pull request #140 from hodgef/dependabot/npm_and_yarn/babel/plugin-proposal-class-properties-7.5.0 2019-07-06 09:49:20 +00:00
dependabot-preview[bot]andGitHub d5adc5025c Merge pull request #138 from hodgef/dependabot/npm_and_yarn/semver-6.2.0 2019-07-06 09:48:47 +00:00
dependabot-preview[bot]andGitHub d39a2804cb Merge pull request #139 from hodgef/dependabot/npm_and_yarn/eslint-plugin-jsx-a11y-6.2.3 2019-07-06 09:46:44 +00:00
dependabot-preview[bot]andGitHub 09c1f8b56a Merge pull request #141 from hodgef/dependabot/npm_and_yarn/svgr/webpack-4.3.1 2019-07-06 09:40:05 +00:00
dependabot-preview[bot]andGitHub dc01ad5e3a Bump @babel/plugin-proposal-class-properties from 7.4.4 to 7.5.0
Bumps [@babel/plugin-proposal-class-properties](https://github.com/babel/babel) from 7.4.4 to 7.5.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.4.4...v7.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-06 09:37:20 +00:00
dependabot-preview[bot]andGitHub c3a565fd20 Bump semver from 6.1.2 to 6.2.0
Bumps [semver](https://github.com/npm/node-semver) from 6.1.2 to 6.2.0.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.1.2...v6.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-06 09:37:18 +00:00
dependabot-preview[bot]andGitHub 3cf2764001 Merge pull request #137 from hodgef/dependabot/npm_and_yarn/babel/core-7.5.0 2019-07-06 09:35:07 +00:00
dependabot-preview[bot]andGitHub fe3a012f7f Merge pull request #136 from hodgef/dependabot/npm_and_yarn/babel/runtime-7.5.1 2019-07-06 09:32:33 +00:00
dependabot-preview[bot]andGitHub 70cb19f1ef Bump eslint-plugin-jsx-a11y from 6.2.1 to 6.2.3
Bumps [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) from 6.2.1 to 6.2.3.
- [Release notes](https://github.com/evcohen/eslint-plugin-jsx-a11y/releases)
- [Changelog](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evcohen/eslint-plugin-jsx-a11y/compare/v6.2.1...v6.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-06 09:28:16 +00:00
dependabot-preview[bot]andGitHub 316647bdac Merge pull request #135 from hodgef/dependabot/npm_and_yarn/eslint-loader-2.2.1 2019-07-06 09:26:11 +00:00
dependabot-preview[bot]andGitHub 8e07afda65 Merge pull request #134 from hodgef/dependabot/npm_and_yarn/webpack-4.35.2 2019-07-06 09:21:20 +00:00
dependabot-preview[bot]andGitHub 25f81ab1c7 Bump @svgr/webpack from 4.3.0 to 4.3.1
Bumps [@svgr/webpack](https://github.com/smooth-code/svgr) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/smooth-code/svgr/releases)
- [Changelog](https://github.com/smooth-code/svgr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smooth-code/svgr/compare/v4.3.0...v4.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-06 09:19:12 +00:00
dependabot-preview[bot]andGitHub 78f578f787 Merge pull request #133 from hodgef/dependabot/npm_and_yarn/babel/preset-env-7.5.0 2019-07-06 09:16:41 +00:00
dependabot-preview[bot]andGitHub 692f773c31 Bump @babel/core from 7.4.5 to 7.5.0
Bumps [@babel/core](https://github.com/babel/babel) from 7.4.5 to 7.5.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.4.5...v7.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-06 09:15:59 +00:00
dependabot-preview[bot]andGitHub b95670e8c4 Bump @babel/runtime from 7.4.5 to 7.5.1
Bumps [@babel/runtime](https://github.com/babel/babel) from 7.4.5 to 7.5.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.4.5...v7.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-06 09:15:21 +00:00
dependabot-preview[bot]andGitHub c4c1e8b181 Bump eslint-loader from 2.1.2 to 2.2.1
Bumps [eslint-loader](https://github.com/webpack-contrib/eslint-loader) from 2.1.2 to 2.2.1.
- [Release notes](https://github.com/webpack-contrib/eslint-loader/releases)
- [Changelog](https://github.com/webpack-contrib/eslint-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/eslint-loader/compare/2.1.2...v2.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-06 09:14:39 +00:00
dependabot-preview[bot]andGitHub 9e8b28b124 Bump webpack from 4.35.0 to 4.35.2
Bumps [webpack](https://github.com/webpack/webpack) from 4.35.0 to 4.35.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.35.0...v4.35.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-06 09:14:00 +00:00
dependabot-preview[bot]andGitHub 665262bf93 Bump @babel/preset-env from 7.4.5 to 7.5.0
Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.4.5 to 7.5.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.4.5...v7.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-06 09:13:22 +00:00
dependabot-preview[bot]andGitHub 5830c34263 Merge pull request #127 from hodgef/dependabot/npm_and_yarn/eslint-plugin-react-hooks-1.6.1 2019-06-29 09:52:43 +00:00
dependabot-preview[bot]andGitHub 458e7be599 Merge pull request #129 from hodgef/dependabot/npm_and_yarn/@typescript-eslint/eslint-plugin-1.11.0 2019-06-29 09:48:42 +00:00
dependabot-preview[bot]andGitHub 9e96f186c8 Bump eslint-plugin-react-hooks from 1.6.0 to 1.6.1
Bumps [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-29 09:46:46 +00:00
dependabot-preview[bot]andGitHub f2169a4cd0 Merge pull request #126 from hodgef/dependabot/npm_and_yarn/eslint-plugin-react-7.14.2 2019-06-29 09:44:40 +00:00
dependabot-preview[bot]andGitHub 003d44325c Merge pull request #130 from hodgef/dependabot/npm_and_yarn/semver-6.1.2 2019-06-29 09:36:56 +00:00
dependabot-preview[bot]andGitHub e193745029 Bump @typescript-eslint/eslint-plugin from 1.10.2 to 1.11.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 1.10.2 to 1.11.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v1.11.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-29 09:34:47 +00:00
dependabot-preview[bot]andGitHub dfa4686be6 Merge pull request #128 from hodgef/dependabot/npm_and_yarn/@typescript-eslint/parser-1.11.0 2019-06-29 09:32:33 +00:00
dependabot-preview[bot]andGitHub 9618f96c2b Merge pull request #125 from hodgef/dependabot/npm_and_yarn/url-loader-2.0.1 2019-06-29 09:28:48 +00:00
dependabot-preview[bot]andGitHub 7f0cf50d79 Bump eslint-plugin-react from 7.13.0 to 7.14.2
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.13.0 to 7.14.2.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.13.0...v7.14.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-29 09:27:38 +00:00
dependabot-preview[bot]andGitHub 7d501807ff Merge pull request #124 from hodgef/dependabot/npm_and_yarn/eslint-plugin-import-2.18.0 2019-06-29 09:26:33 +00:00
dependabot-preview[bot]andGitHub 891d3a4daf Merge pull request #123 from hodgef/dependabot/npm_and_yarn/fs-extra-8.1.0 2019-06-29 09:25:36 +00:00
dependabot-preview[bot]andGitHub a5451f73fa Merge pull request #122 from hodgef/dependabot/npm_and_yarn/optimize-css-assets-webpack-plugin-5.0.3 2019-06-29 09:22:33 +00:00
dependabot-preview[bot]andGitHub 9d94f0a802 Bump semver from 6.1.1 to 6.1.2
Bumps [semver](https://github.com/npm/node-semver) from 6.1.1 to 6.1.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.1.1...v6.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-29 09:19:57 +00:00
dependabot-preview[bot]andGitHub d5bdb3e917 Bump @typescript-eslint/parser from 1.10.2 to 1.11.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 1.10.2 to 1.11.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v1.11.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-29 09:18:34 +00:00
dependabot-preview[bot]andGitHub b0722f6871 Merge pull request #121 from hodgef/dependabot/npm_and_yarn/is-wsl-2.1.0 2019-06-29 09:16:16 +00:00
dependabot-preview[bot]andGitHub 2865389267 Bump url-loader from 2.0.0 to 2.0.1
Bumps [url-loader](https://github.com/webpack-contrib/url-loader) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/webpack-contrib/url-loader/releases)
- [Changelog](https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/url-loader/compare/v2.0.0...v2.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-29 09:16:09 +00:00
dependabot-preview[bot]andGitHub a3cfb8e104 Bump eslint-plugin-import from 2.17.3 to 2.18.0
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.17.3 to 2.18.0.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.17.3...v2.18.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-29 09:15:11 +00:00
dependabot-preview[bot]andGitHub f7cc244eb6 Bump fs-extra from 8.0.1 to 8.1.0
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 8.0.1 to 8.1.0.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/commits/8.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-29 09:14:24 +00:00
dependabot-preview[bot]andGitHub e11c8c4aa0 Bump optimize-css-assets-webpack-plugin from 5.0.1 to 5.0.3
Bumps [optimize-css-assets-webpack-plugin](https://github.com/NMFR/optimize-css-assets-webpack-plugin) from 5.0.1 to 5.0.3.
- [Release notes](https://github.com/NMFR/optimize-css-assets-webpack-plugin/releases)
- [Commits](https://github.com/NMFR/optimize-css-assets-webpack-plugin/compare/v5.0.1...v5.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-29 09:13:45 +00:00
dependabot-preview[bot]andGitHub 71b3a70b33 Bump is-wsl from 2.0.0 to 2.1.0
Bumps [is-wsl](https://github.com/sindresorhus/is-wsl) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/sindresorhus/is-wsl/releases)
- [Commits](https://github.com/sindresorhus/is-wsl/compare/v2.0.0...v2.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-29 09:12:59 +00:00
Francisco Hodge 64a63db2f3 Build update 2019-06-22 11:14:41 -04:00
Francisco Hodge 0f6da50b34 npm update 2019-06-22 11:07:37 -04:00
dependabot-preview[bot]andGitHub 990efcda62 Merge pull request #118 from hodgef/dependabot/npm_and_yarn/webpack-dev-server-3.7.2 2019-06-22 09:29:43 +00:00
dependabot-preview[bot]andGitHub 5954dec8a3 Merge pull request #119 from hodgef/dependabot/npm_and_yarn/eslint-plugin-flowtype-3.10.4 2019-06-22 09:25:43 +00:00
dependabot-preview[bot]andGitHub 5566c09cba Merge pull request #117 from hodgef/dependabot/npm_and_yarn/babel-eslint-10.0.2 2019-06-22 09:20:40 +00:00
dependabot-preview[bot]andGitHub b9f8e95a15 Bump webpack-dev-server from 3.7.1 to 3.7.2
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.7.1 to 3.7.2.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.7.1...v3.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-22 09:18:52 +00:00
dependabot-preview[bot]andGitHub 205004f4b3 Merge pull request #116 from hodgef/dependabot/npm_and_yarn/webpack-4.35.0 2019-06-22 09:16:52 +00:00
dependabot-preview[bot]andGitHub 7adfe713a3 Bump eslint-plugin-flowtype from 3.10.3 to 3.10.4
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 3.10.3 to 3.10.4.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v3.10.3...v3.10.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-22 09:15:56 +00:00
dependabot-preview[bot]andGitHub c715499007 Bump babel-eslint from 10.0.1 to 10.0.2
Bumps [babel-eslint](https://github.com/babel/babel-eslint) from 10.0.1 to 10.0.2.
- [Release notes](https://github.com/babel/babel-eslint/releases)
- [Commits](https://github.com/babel/babel-eslint/compare/v10.0.1...v10.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-22 09:13:58 +00:00
dependabot-preview[bot]andGitHub da36eddc43 Bump webpack from 4.34.0 to 4.35.0
Bumps [webpack](https://github.com/webpack/webpack) from 4.34.0 to 4.35.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.34.0...v4.35.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-22 09:13:15 +00:00
dependabot-preview[bot]andGitHub d73ecb2e59 Merge pull request #111 from hodgef/dependabot/npm_and_yarn/webpack-4.34.0 2019-06-15 09:42:52 +00:00
dependabot-preview[bot]andGitHub 4b93c7def2 Bump webpack from 4.33.0 to 4.34.0
Bumps [webpack](https://github.com/webpack/webpack) from 4.33.0 to 4.34.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.33.0...v4.34.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-15 09:38:51 +00:00
dependabot-preview[bot]andGitHub 9f8eaf5fb8 Merge pull request #110 from hodgef/dependabot/npm_and_yarn/@typescript-eslint/parser-1.10.2 2019-06-15 09:36:49 +00:00
dependabot-preview[bot]andGitHub 5002fb8ae5 Merge pull request #108 from hodgef/dependabot/npm_and_yarn/css-loader-3.0.0 2019-06-15 09:29:59 +00:00
dependabot-preview[bot]andGitHub bfd6774fdc Merge pull request #112 from hodgef/dependabot/npm_and_yarn/eslint-plugin-flowtype-3.10.3 2019-06-15 09:27:22 +00:00
dependabot-preview[bot]andGitHub 8f334ea429 Bump @typescript-eslint/parser from 1.9.0 to 1.10.2
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 1.9.0 to 1.10.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v1.10.2/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-15 09:23:26 +00:00
dependabot-preview[bot]andGitHub 780a097ac8 Merge pull request #109 from hodgef/dependabot/npm_and_yarn/@typescript-eslint/eslint-plugin-1.10.2 2019-06-15 09:21:18 +00:00
dependabot-preview[bot]andGitHub 90efb5bb08 Bump css-loader from 2.1.1 to 3.0.0
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 2.1.1 to 3.0.0.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v2.1.1...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-15 09:17:36 +00:00
dependabot-preview[bot]andGitHub 5b20248ac5 Bump eslint-plugin-flowtype from 3.9.1 to 3.10.3
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 3.9.1 to 3.10.3.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v3.9.1...v3.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-15 09:16:45 +00:00
dependabot-preview[bot]andGitHub fc137e4a31 Merge pull request #107 from hodgef/dependabot/npm_and_yarn/postcss-normalize-8.0.1 2019-06-15 09:15:15 +00:00
dependabot-preview[bot]andGitHub 356a71c006 Bump @typescript-eslint/eslint-plugin from 1.9.0 to 1.10.2
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 1.9.0 to 1.10.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v1.10.2/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-15 09:14:24 +00:00
dependabot-preview[bot]andGitHub e0093fc64a Bump postcss-normalize from 7.0.0 to 8.0.1
Bumps [postcss-normalize](https://github.com/csstools/postcss-normalize) from 7.0.0 to 8.0.1.
- [Release notes](https://github.com/csstools/postcss-normalize/releases)
- [Changelog](https://github.com/csstools/postcss-normalize/blob/master/CHANGELOG.md)
- [Commits](https://github.com/csstools/postcss-normalize/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-15 09:12:54 +00:00
Francisco Hodge a2fb28a88b Build update 2019-06-13 18:40:54 -04:00
Francisco Hodge 539fa0fffd npm update 2019-06-13 18:34:45 -04:00
dependabot-preview[bot]andGitHub fa40e7a5cf Merge pull request #103 from hodgef/dependabot/npm_and_yarn/webpack-dev-server-3.7.1 2019-06-08 09:26:40 +00:00
dependabot-preview[bot]andGitHub d61813102e Merge pull request #106 from hodgef/dependabot/npm_and_yarn/prettier-1.18.2 2019-06-08 09:24:49 +00:00
dependabot-preview[bot]andGitHub 1d543bb8ea Merge pull request #105 from hodgef/dependabot/npm_and_yarn/pnp-webpack-plugin-1.5.0 2019-06-08 09:22:44 +00:00
dependabot-preview[bot]andGitHub 8b95cb0c93 Merge pull request #104 from hodgef/dependabot/npm_and_yarn/file-loader-4.0.0 2019-06-08 09:20:41 +00:00
dependabot-preview[bot]andGitHub b82136f248 Bump webpack-dev-server from 3.5.1 to 3.7.1
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.5.1 to 3.7.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.5.1...v3.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-08 09:17:36 +00:00
dependabot-preview[bot]andGitHub ccb952f6c5 Bump prettier from 1.17.1 to 1.18.2
Bumps [prettier](https://github.com/prettier/prettier) from 1.17.1 to 1.18.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/1.17.1...1.18.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-08 09:15:32 +00:00
dependabot-preview[bot]andGitHub d387d7a37c Merge pull request #102 from hodgef/dependabot/npm_and_yarn/url-loader-2.0.0 2019-06-08 09:15:28 +00:00
dependabot-preview[bot]andGitHub f3665eeea3 Bump pnp-webpack-plugin from 1.4.3 to 1.5.0
Bumps [pnp-webpack-plugin](https://github.com/arcanis/pnp-webpack-plugin) from 1.4.3 to 1.5.0.
- [Release notes](https://github.com/arcanis/pnp-webpack-plugin/releases)
- [Commits](https://github.com/arcanis/pnp-webpack-plugin/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-08 09:14:46 +00:00
dependabot-preview[bot]andGitHub 1facc21b0a Bump file-loader from 3.0.1 to 4.0.0
Bumps [file-loader](https://github.com/webpack-contrib/file-loader) from 3.0.1 to 4.0.0.
- [Release notes](https://github.com/webpack-contrib/file-loader/releases)
- [Changelog](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/file-loader/compare/v3.0.1...v4.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-08 09:14:03 +00:00
dependabot-preview[bot]andGitHub 1d9be6dae5 Bump url-loader from 1.1.2 to 2.0.0
Bumps [url-loader](https://github.com/webpack-contrib/url-loader) from 1.1.2 to 2.0.0.
- [Release notes](https://github.com/webpack-contrib/url-loader/releases)
- [Changelog](https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/url-loader/compare/v1.1.2...v2.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-08 09:12:40 +00:00
Francisco Hodge 3162cc80f8 Build update 2019-06-05 22:23:36 -04:00
Francisco Hodge de2100cb7b npm update 2019-06-05 21:09:14 -04:00
Francisco Hodge 04a3c186f0 Added disableButtonHold option 2019-06-05 21:08:53 -04:00
dependabot-preview[bot]andGitHub 5fa612a923 Merge pull request #99 from hodgef/dependabot/npm_and_yarn/webpack-4.33.0 2019-06-05 13:15:09 +00:00
dependabot-preview[bot]andGitHub 9a34b6eb37 Merge pull request #97 from hodgef/dependabot/npm_and_yarn/resolve-1.11.1 2019-06-05 13:14:41 +00:00
dependabot-preview[bot]andGitHub 66fa632ca4 Bump resolve from 1.11.0 to 1.11.1
Bumps [resolve](https://github.com/browserify/resolve) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/browserify/resolve/releases)
- [Commits](https://github.com/browserify/resolve/compare/v1.11.0...v1.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-05 13:08:22 +00:00
dependabot-preview[bot]andGitHub 51d6d66fc6 Bump webpack from 4.32.2 to 4.33.0
Bumps [webpack](https://github.com/webpack/webpack) from 4.32.2 to 4.33.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.32.2...v4.33.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-05 13:08:19 +00:00
dependabot-preview[bot]andGitHub 84d2c45887 Merge pull request #98 from hodgef/dependabot/npm_and_yarn/webpack-dev-server-3.5.1 2019-06-05 13:05:48 +00:00
dependabot-preview[bot]andGitHub 966bfd47db Merge pull request #96 from hodgef/dependabot/npm_and_yarn/postcss-normalize-8.0.0 2019-06-05 12:58:38 +00:00
dependabot-preview[bot]andGitHub 02d88bae10 Bump webpack-dev-server from 3.5.0 to 3.5.1
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.5.0...v3.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-05 12:57:16 +00:00
dependabot-preview[bot]andGitHub 6802c1f9dc Bump postcss-normalize from 7.0.1 to 8.0.0
Bumps [postcss-normalize](https://github.com/csstools/postcss-normalize) from 7.0.1 to 8.0.0.
- [Release notes](https://github.com/csstools/postcss-normalize/releases)
- [Changelog](https://github.com/csstools/postcss-normalize/blob/master/CHANGELOG.md)
- [Commits](https://github.com/csstools/postcss-normalize/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-05 12:55:34 +00:00
Francisco Hodge b490481761 Build update 2019-06-02 03:04:55 -04:00
Francisco Hodge 8795232092 Added destroy method 2019-06-02 02:56:24 -04:00
dependabot-preview[bot]andGitHub ba20077e7a Merge pull request #94 from hodgef/dependabot/npm_and_yarn/mini-css-extract-plugin-0.7.0 2019-06-01 09:26:16 +00:00
dependabot-preview[bot]andGitHub f175c1dcb8 Merge pull request #93 from hodgef/dependabot/npm_and_yarn/@svgr/webpack-4.3.0 2019-06-01 09:23:27 +00:00
dependabot-preview[bot]andGitHub abd2471119 Merge pull request #92 from hodgef/dependabot/npm_and_yarn/webpack-dev-server-3.5.0 2019-06-01 09:21:18 +00:00
dependabot-preview[bot]andGitHub d25b70fc3d Merge pull request #91 from hodgef/dependabot/npm_and_yarn/semver-6.1.1 2019-06-01 09:18:32 +00:00
dependabot-preview[bot]andGitHub d274abf755 Bump mini-css-extract-plugin from 0.6.0 to 0.7.0
Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/mini-css-extract-plugin/compare/v0.6.0...v0.7.0)
2019-06-01 09:16:19 +00:00
dependabot-preview[bot]andGitHub 922c865d0f Bump @svgr/webpack from 4.2.0 to 4.3.0
Bumps [@svgr/webpack](https://github.com/smooth-code/svgr) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/smooth-code/svgr/releases)
- [Changelog](https://github.com/smooth-code/svgr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smooth-code/svgr/compare/v4.2.0...v4.3.0)
2019-06-01 09:15:29 +00:00
dependabot-preview[bot]andGitHub 5735215b0a Bump webpack-dev-server from 3.4.1 to 3.5.0
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.4.1...v3.5.0)
2019-06-01 09:14:36 +00:00
dependabot-preview[bot]andGitHub d007a76fa0 Bump semver from 6.1.0 to 6.1.1
Bumps [semver](https://github.com/npm/node-semver) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.1.0...v6.1.1)
2019-06-01 09:13:44 +00:00
Francisco Hodge d561c8b666 Build update 2019-05-25 17:46:21 -04:00
dependabot-preview[bot]andGitHub 78cc636d32 Merge pull request #88 from hodgef/dependabot/npm_and_yarn/eslint-plugin-flowtype-3.9.1 2019-05-25 09:41:50 +00:00
dependabot-preview[bot]andGitHub 5907eb3baa Merge pull request #86 from hodgef/dependabot/npm_and_yarn/terser-webpack-plugin-1.3.0 2019-05-25 09:38:09 +00:00
dependabot-preview[bot]andGitHub 4e7ea1f687 Bump eslint-plugin-flowtype from 3.9.0 to 3.9.1
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v3.9.0...v3.9.1)
2019-05-25 09:31:39 +00:00
dependabot-preview[bot]andGitHub 4388f26cb6 Merge pull request #87 from hodgef/dependabot/npm_and_yarn/eslint-plugin-import-2.17.3 2019-05-25 09:29:23 +00:00
dependabot-preview[bot]andGitHub 2c524f82ff Bump terser-webpack-plugin from 1.2.4 to 1.3.0
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 1.2.4 to 1.3.0.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v1.2.4...v1.3.0)
2019-05-25 09:27:10 +00:00
dependabot-preview[bot]andGitHub 2911bb5022 Merge pull request #85 from hodgef/dependabot/npm_and_yarn/semver-6.1.0 2019-05-25 09:24:56 +00:00
dependabot-preview[bot]andGitHub 3fe39dc9e3 Merge pull request #84 from hodgef/dependabot/npm_and_yarn/webpack-4.32.2 2019-05-25 09:22:48 +00:00
dependabot-preview[bot]andGitHub ab9839f94f Merge pull request #83 from hodgef/dependabot/npm_and_yarn/@babel/core-7.4.5 2019-05-25 09:20:05 +00:00
dependabot-preview[bot]andGitHub b4c21693bd Merge pull request #82 from hodgef/dependabot/npm_and_yarn/@babel/runtime-7.4.5 2019-05-25 09:18:14 +00:00
dependabot-preview[bot]andGitHub 7a647f16ab Bump eslint-plugin-import from 2.17.2 to 2.17.3
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.17.2 to 2.17.3.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.17.2...v2.17.3)
2019-05-25 09:17:25 +00:00
dependabot-preview[bot]andGitHub 619991b4ba Bump semver from 6.0.0 to 6.1.0
Bumps [semver](https://github.com/npm/node-semver) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.0.0...v6.1.0)
2019-05-25 09:15:50 +00:00
dependabot-preview[bot]andGitHub e7fa7fb1fd Merge pull request #81 from hodgef/dependabot/npm_and_yarn/@babel/preset-env-7.4.5 2019-05-25 09:15:13 +00:00
dependabot-preview[bot]andGitHub 31fa3d0592 Bump webpack from 4.31.0 to 4.32.2
Bumps [webpack](https://github.com/webpack/webpack) from 4.31.0 to 4.32.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.31.0...v4.32.2)
2019-05-25 09:15:03 +00:00
dependabot-preview[bot]andGitHub bcef967a20 Bump @babel/core from 7.4.4 to 7.4.5
Bumps [@babel/core](https://github.com/babel/babel) from 7.4.4 to 7.4.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.4.4...v7.4.5)
2019-05-25 09:14:15 +00:00
dependabot-preview[bot]andGitHub 267838c299 Bump @babel/runtime from 7.4.4 to 7.4.5
Bumps [@babel/runtime](https://github.com/babel/babel) from 7.4.4 to 7.4.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.4.4...v7.4.5)
2019-05-25 09:13:27 +00:00
dependabot-preview[bot]andGitHub c5ad9d2240 Bump @babel/preset-env from 7.4.4 to 7.4.5
Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.4.4 to 7.4.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.4.4...v7.4.5)
2019-05-25 09:12:40 +00:00
Francisco Hodge 8a865aed53 Build update 2019-05-21 00:02:15 -04:00
dependabot[bot]andGitHub a0f603597c Merge pull request #78 from hodgef/dependabot/npm_and_yarn/webpack-dev-server-3.4.1 2019-05-18 09:18:21 +00:00
dependabot[bot] 0a814d0a7b Bump webpack-dev-server from 3.3.1 to 3.4.1
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.3.1 to 3.4.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.3.1...v3.4.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-18 09:12:52 +00:00
dependabot[bot]andGitHub 513db7f056 Merge pull request #71 from hodgef/dependabot/npm_and_yarn/babel-loader-8.0.6 2019-05-17 00:06:00 +00:00
dependabot[bot]andGitHub 1d863c4f81 Merge pull request #72 from hodgef/dependabot/npm_and_yarn/@typescript-eslint/eslint-plugin-1.9.0 2019-05-17 00:03:55 +00:00
dependabot[bot]andGitHub 9443d6a91a Merge pull request #77 from hodgef/dependabot/npm_and_yarn/eslint-plugin-flowtype-3.9.0 2019-05-17 00:01:25 +00:00
dependabot[bot]andGitHub f19bf3c933 Merge pull request #76 from hodgef/dependabot/npm_and_yarn/terser-webpack-plugin-1.2.4 2019-05-17 00:00:26 +00:00
dependabot[bot]andGitHub 55f96064e0 Merge pull request #75 from hodgef/dependabot/npm_and_yarn/uglifyjs-webpack-plugin-2.1.3 2019-05-16 23:57:47 +00:00
dependabot[bot]andGitHub 44e4d00111 Merge pull request #74 from hodgef/dependabot/npm_and_yarn/prettier-1.17.1 2019-05-16 23:56:57 +00:00
dependabot[bot]andGitHub 13f80bdcbe Merge pull request #73 from hodgef/dependabot/npm_and_yarn/fs-extra-8.0.1 2019-05-16 23:54:39 +00:00
dependabot[bot] 17016588d6 Bump babel-loader from 8.0.5 to 8.0.6
Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.0.5 to 8.0.6.
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.0.5...v8.0.6)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:50:03 +00:00
dependabot[bot] a63e3cce76 Bump @typescript-eslint/eslint-plugin from 1.7.0 to 1.9.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) from 1.7.0 to 1.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/compare/v1.7.0...v1.9.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:49:53 +00:00
dependabot[bot] 46b1c9bfda Bump eslint-plugin-flowtype from 3.8.1 to 3.9.0
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 3.8.1 to 3.9.0.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v3.8.1...v3.9.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:48:19 +00:00
dependabot[bot] f523d6ae51 Bump terser-webpack-plugin from 1.2.3 to 1.2.4
Bumps [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/webpack-contrib/terser-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v1.2.3...v1.2.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:47:50 +00:00
dependabot[bot]andGitHub 68dfc94ea7 Merge pull request #70 from hodgef/dependabot/npm_and_yarn/@typescript-eslint/parser-1.9.0 2019-05-16 23:46:58 +00:00
dependabot[bot] 2274108619 Bump uglifyjs-webpack-plugin from 2.1.2 to 2.1.3
Bumps [uglifyjs-webpack-plugin](https://github.com/webpack-contrib/uglifyjs-webpack-plugin) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/uglifyjs-webpack-plugin/compare/v2.1.2...v2.1.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:46:35 +00:00
dependabot[bot] 7d5417ab2a Bump prettier from 1.17.0 to 1.17.1
Bumps [prettier](https://github.com/prettier/prettier) from 1.17.0 to 1.17.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/1.17.0...1.17.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:45:51 +00:00
dependabot[bot] 1a29880ef8 Bump fs-extra from 7.0.1 to 8.0.1
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 7.0.1 to 8.0.1.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:44:57 +00:00
dependabot[bot]andGitHub 319eaa22cf Merge pull request #69 from hodgef/dependabot/npm_and_yarn/resolve-1.11.0 2019-05-16 23:44:27 +00:00
dependabot[bot] c8bafdb517 Bump @typescript-eslint/parser from 1.7.0 to 1.9.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint) from 1.7.0 to 1.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/compare/v1.7.0...v1.9.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:42:40 +00:00
dependabot[bot] fb7008d04b Bump resolve from 1.10.1 to 1.11.0
Bumps [resolve](https://github.com/browserify/resolve) from 1.10.1 to 1.11.0.
- [Release notes](https://github.com/browserify/resolve/releases)
- [Commits](https://github.com/browserify/resolve/compare/v1.10.1...v1.11.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-16 23:41:38 +00:00
Francisco Hodge 69706bd8f6 Build update 2019-05-16 19:38:38 -04:00
Francisco Hodge ad4af7cde0 npm update 2019-05-16 19:31:31 -04:00
Francisco Hodge a0c24db9d2 Updated types 2019-05-16 19:18:46 -04:00
Francisco Hodge f702184e15 build update 2019-05-10 18:51:45 -04:00
Francisco Hodge 45d2f5b50d Updated dev dependencies 2019-05-10 18:47:38 -04:00
Francisco Hodge e88d0fdb12 2.21.0 2019-04-27 22:19:34 -04:00
Francisco Hodge 38cbc0e99c Build update 2019-04-27 14:46:36 -04:00
Francisco Hodge 2264560eb5 npm update 2019-04-27 14:37:15 -04:00
Francisco Hodge 1b55cbe774 SyncInstanceInputs caret position and tests improvements. Fixes #65 2019-04-27 14:31:26 -04:00
Francisco Hodge 049900b49a Build update 2019-04-18 10:21:45 -04:00
Francisco Hodge 06873ec0d2 npm update 2019-04-18 10:15:51 -04:00
Francisco Hodge 2926b554a2 Tests update 2019-04-18 10:13:09 -04:00
Francisco Hodge 20d24d97fd caretPosition reset when inputName is changed through setOptions 2019-04-18 10:13:02 -04:00
Francisco Hodge 451b64d31a Build update 2019-04-18 09:05:17 -04:00
Francisco Hodge 194c60c6c9 Fix mouseHold for preventMouseDownDefault 2019-04-18 09:01:22 -04:00
Francisco Hodge f9881d3cc7 Build update 2019-04-15 10:45:54 -04:00
Francisco Hodge 2e20230cf7 Reset caret position on clearInput, replaceInput 2019-04-15 10:40:26 -04:00
Francisco Hodge 72c9a75279 Build update 2019-04-13 20:32:06 -04:00
Francisco Hodge 00b619cd31 Updated dev dependencies 2019-04-13 20:22:21 -04:00
Francisco Hodge 46cd98237a Build update 2019-04-09 20:44:10 -04:00
Francisco Hodge efc502741e Updated types 2019-04-09 20:40:14 -04:00
Francisco Hodge f9d594b8a0 Updated types 2019-04-09 20:27:19 -04:00
Francisco Hodge 737d1fe2f2 Build update 2019-03-26 23:47:58 -04:00
Francisco Hodge 2afc8a1401 Updated dev dependencies 2019-03-26 23:31:52 -04:00
Francisco Hodge 808f02f37c Build update 2019-03-16 22:48:37 -04:00
Francisco Hodge 719aa8783a Updated dev dependencies 2019-03-16 22:38:50 -04:00
Francisco Hodge 1cacd7d739 Build update 2019-03-12 09:11:29 -04:00
Francisco Hodge 096fed915e npm update 2019-03-12 09:09:52 -04:00
Francisco Hodge 38d9a635b8 Build update 2019-03-11 18:33:48 -04:00
Francisco Hodge 564aa188e4 Merge branch 'staging' 2019-03-11 18:31:04 -04:00
Francisco Hodge aadb84b8f7 npm update 2019-03-11 18:26:13 -04:00
Francisco Hodge dadad31fdd Tests update 2019-03-11 18:26:00 -04:00
Francisco Hodge 8582350774 Added stopMouseDownPropagation option 2019-03-11 18:25:51 -04:00
Francisco Hodge 287c33f498 build update 2019-03-10 19:38:38 -04:00
Francisco Hodge 1d0e985922 CI: Added dev server testing 2019-03-10 15:58:22 -04:00
Francisco Hodge a96effb570 Updated dev dependencies 2019-03-10 15:57:45 -04:00
Francisco Hodge 0bea304528 Build update 2019-03-09 21:52:44 -05:00
Francisco Hodge 652084cabb npm update 2019-03-09 21:47:49 -05:00
Francisco Hodge 39c4acba85 Tests update 2019-03-09 21:47:39 -05:00
Francisco Hodge 69b830c632 Added row button grouping functionality 2019-03-09 21:47:31 -05:00
Francisco Hodge cd909cffa8 Build update 2019-03-07 21:30:17 -05:00
Francisco Hodge 92d2b381db npm update 2019-03-07 21:26:43 -05:00
Francisco Hodge 96206d1b47 Remove PointerEvents debug message when useMouseEvents is enabled 2019-03-07 21:26:22 -05:00
Francisco Hodge 19f6ac9ac1 Build update 2019-03-07 20:53:23 -05:00
Francisco Hodge 90b67ec416 Support Utilities access through Typescript 2019-03-07 20:53:07 -05:00
Francisco Hodge 6208d5f7e1 Fixed getInput output when inputName is passed 2019-03-07 20:52:40 -05:00
Francisco Hodge bd0274415b Fixed onChangeAll callback 2019-03-07 20:51:57 -05:00
Francisco Hodge 30941f4ba0 Adding useMouseEvents option 2019-03-07 20:51:29 -05:00
Francisco Hodge 48a15e6715 Disable devDependency tracking 2019-03-07 20:49:34 -05:00
Francisco Hodge f8ee859bb0 Build update 2019-03-07 07:36:08 -05:00
Francisco Hodge 3012ce24e2 Build update 2019-03-07 07:32:24 -05:00
Francisco Hodge 6e54729f46 Tests update 2019-03-07 07:32:15 -05:00
Francisco Hodge 5ab58f2528 Using PointerEvents on browsers that support it 2019-03-07 07:32:07 -05:00
Francisco Hodge 47ddf0b1e8 Build update 2019-03-06 20:26:46 -05:00
Francisco Hodge 74c3bc692f Build update 2019-03-06 20:22:18 -05:00
Francisco Hodge ae1436a52d Reinstating method bindings 2019-03-06 20:22:09 -05:00
Francisco Hodge adc1db7a7f Repairing CI, per node bug https://github.com/facebook/jest/issues/8069 2019-03-06 20:13:32 -05:00
Francisco Hodge ec983bf82b Build update 2019-03-06 20:00:48 -05:00
Francisco Hodge 0d82696868 Tests update 2019-03-06 19:45:08 -05:00
Francisco Hodge 477972f26f Build update 2019-03-06 19:37:49 -05:00
Francisco Hodge 18a3aa9dd5 Added methods beforeRender, beforeFirstRender 2019-03-06 19:33:28 -05:00
Francisco Hodge c007f7406a Added enabling isMouseHold for delete and backspace buttons 2019-03-06 19:32:46 -05:00
Francisco Hodge 1a53fae5d6 Added isTouchDevice and touch device helper methods 2019-03-06 19:32:03 -05:00
Francisco Hodge 00f8daff3c Added binding of methods 2019-03-06 19:31:07 -05:00
Francisco Hodge abacee54ee Updated tests 2019-03-06 19:30:06 -05:00
Francisco Hodge 93a45a7c26 Added internal getButtonTheme 2019-03-06 19:29:29 -05:00
Francisco Hodge c4005e7409 Updated types 2019-03-06 19:28:24 -05:00
Francisco Hodge ed944d1204 Added autoUseTouchEvents and related touch device fixes 2019-03-06 19:28:12 -05:00
Francisco Hodge 30042d5d72 Disable pointer events for .hg-button span elements 2019-03-06 19:25:55 -05:00
Francisco Hodge c97945c8b1 Updated dev dependencies 2019-03-02 18:07:43 -05:00
Francisco Hodge bee709e3b5 Remove max-width for standard buttons 2019-02-25 20:26:30 -05:00
Francisco Hodge 92d1e822a5 Updated dev dependencies 2019-02-23 14:44:13 -05:00
Francisco Hodge 3700bbe144 MIT Licensing 2019-02-23 14:44:05 -05:00
Francisco Hodge 4e4c187cea Updated dev dependencies 2019-02-20 18:17:42 -05:00
Francisco Hodge 974eaf8f5c Updated dev dependencies 2019-02-16 11:12:38 -05:00
Francisco Hodge 70d2cca7ac Adding PrettierPlugin to build process 2019-02-15 21:49:27 -05:00
Francisco Hodge 05976e0e7b Adding unminified bundle to dist 2019-02-15 21:48:40 -05:00
Francisco Hodge 4a35dff92f Updated dev dependencies 2019-02-09 10:19:48 -05:00
Francisco Hodge 04def5da87 License: Supporting both MIT and GPLv3 2019-01-28 11:11:28 -05:00
Francisco Hodge dc085b377d Updated dev dependencies 2019-01-27 20:02:29 -05:00
Francisco Hodge effee00b87 Added new inputPattern option 2019-01-24 23:04:59 -05:00
Francisco Hodge 90b408eff6 Tests update 2019-01-24 23:03:48 -05:00
Francisco Hodge 21fa732b1f Types update 2019-01-24 23:03:23 -05:00
Francisco Hodge 80f4307c36 Build update 2019-01-24 23:03:14 -05:00
Francisco Hodge 681bb3d0ee npm update 2019-01-24 23:02:59 -05:00
Francisco Hodge e1fa685c6c Merge branch 'master' of https://github.com/hodgef/simple-keyboard 2019-01-17 18:37:07 -05:00
Francisco Hodge 2de7154128 npm update 2019-01-17 18:36:48 -05:00
Francisco Hodge c9afe43f5b Build update 2019-01-17 18:36:36 -05:00
Francisco Hodge c59f819db9 Tests update 2019-01-17 18:36:19 -05:00
Francisco Hodge 1f9efb0c66 Ensure caretPosition is unset on disableCaretPositioning 2019-01-17 18:36:09 -05:00
Francisco HodgeandGitHub 32cbce8c8a Update issue templates 2019-01-17 09:20:47 -05:00
Francisco Hodge 6c2236f762 Adding types for disableCaretPositioning option 2019-01-16 19:38:42 -05:00
Francisco Hodge 23a50e6f44 Updated devDependencies 2019-01-06 15:44:07 -05:00
Francisco Hodge c316d493c7 Tests update 2018-12-27 13:46:15 -05:00
Francisco Hodge 70e7635f25 npm update 2018-12-27 13:38:38 -05:00
Francisco HodgeandGitHub f5b73b09e7 Merge pull request #45 from mkusher/patch-1
fixed camelCase function
2018-12-27 13:33:09 -05:00
Aleh KashnikauandGitHub 7432e01740 fixed camelCase function
Added check for empty word
2018-12-27 21:29:05 +03:00
Francisco Hodge 459ab71c45 npm update 2018-12-24 13:31:13 -05:00
Francisco Hodge a5c177e41c Specifying layout class on keyboard element 2018-12-24 13:30:52 -05:00
Francisco Hodge d382945de7 Updated devDependencies 2018-12-23 17:42:02 -05:00
Francisco Hodge 4335f477a1 Adding new option: useButtonTag 2018-12-14 00:28:18 -05:00
Francisco Hodge d03f00c0d1 Updated devDependencies 2018-12-08 15:49:33 -05:00
Francisco HodgeandGitHub 9cea07dd41 Merge pull request #41 from armno/fix-incorrect-return-type-definition
[Angular] Fix return type of getButtonElement()
2018-12-04 20:11:10 -05:00
Francisco Hodge efe18e7240 Build update 2018-12-04 20:06:52 -05:00
Francisco Hodge 82e242a806 Modified getInput return type 2018-12-04 20:06:32 -05:00
Armno 4a9d485d5b add return type for getButtonElement in type definition file 2018-12-04 10:42:05 +07:00
Francisco Hodge 6ffd2e77ad Improved Angular types support 2018-12-02 14:48:46 -05:00
Francisco Hodge 7753bc5ba3 Build update 2018-11-28 09:04:10 -05:00
Francisco HodgeandGitHub 9c4fa00363 Merge pull request #40 from armno/master
Add type definition file for TypeScript
2018-11-28 08:58:36 -05:00
Francisco Hodge 251af057d8 npm update 2018-11-28 08:53:06 -05:00
Francisco Hodge e60574d56d Build update 2018-11-28 08:52:58 -05:00
Francisco Hodge b3b482e864 Copy index.d.ts to build folder on build 2018-11-28 08:52:27 -05:00
Armno ff037ad5b7 remove exporting KeyboardOptions interface 2018-11-28 12:43:13 +07:00
Armno ede2ce04b1 add overloaded constructor type definition 2018-11-28 11:56:00 +07:00
Armno 10380099e6 add more types 2018-11-28 11:20:32 +07:00
Armno 058b6774da Merge remote-tracking branch 'upstream/master' 2018-11-28 09:17:25 +07:00
Francisco Hodge 3b12b278f7 build update 2018-11-27 18:00:24 -05:00
Francisco Hodge 3523df1ef5 npm update 2018-11-27 17:55:06 -05:00
Francisco HodgeandGitHub 178c63cf98 Update README.md 2018-11-27 17:49:12 -05:00
Francisco HodgeandGitHub ec452963fb Update README.md 2018-11-27 17:40:17 -05:00
Armno b5cbfa780b add public methods type definitions 2018-11-27 23:43:20 +07:00
Armno 5c40dd3109 WIP: create type definition file 2018-11-27 19:57:08 +07:00
Francisco Hodge 7ab6baa0f4 Build update 2018-11-25 21:48:14 -05:00
Francisco Hodge 0512e2c624 Fix full keyboard numpad cursor positioning 2018-11-25 21:48:08 -05:00
Francisco Hodge 2693030203 Readme update 2018-11-25 20:15:15 -05:00
Francisco Hodge 3cbdf604fe Updated dev dependencies 2018-11-25 18:16:27 -05:00
Francisco Hodge d87cb82238 Readme update 2018-11-25 18:16:05 -05:00
Francisco Hodge 125f6b6504 Tests update 2018-11-25 18:11:09 -05:00
Francisco Hodge 97b475a2b7 Setting preventMouseDownDefault false by default 2018-11-25 12:03:40 -05:00
Francisco Hodge 682660d638 Docs update 2018-11-24 21:12:28 -05:00
Francisco Hodge d8c1327eff Bind caret handler events once regardless of number of instances 2018-11-24 21:12:19 -05:00
Francisco Hodge b8fc9425ba Demo test update 2018-11-24 21:10:47 -05:00
Francisco Hodge 5c42ae3fbb Demo update 2018-11-24 21:10:33 -05:00
Francisco Hodge a8e826679f npm update 2018-11-24 21:10:07 -05:00
Francisco Hodge f78bfc0d02 Build update 2018-11-24 21:10:00 -05:00
Francisco Hodge 9c12f410ed Build update 2018-11-24 20:31:26 -05:00
Francisco HodgeandGitHub f83884af5c Merge pull request #39 from SteinRobert/preventDefault-for-mousedown-option
Adds preventDefault to mousedown event
2018-11-24 20:21:23 -05:00
Francisco Hodge be25e26c46 npm update 2018-11-24 20:13:02 -05:00
Francisco Hodge 3b93f37cb2 Docs update 2018-11-24 20:12:52 -05:00
Francisco Hodge 822e7a97b7 Build update 2018-11-24 20:12:04 -05:00
Francisco Hodge bc420bb60c Adding ternary condition for preventMouseDownDefault 2018-11-24 20:11:48 -05:00
Robert Stein 1aedf9c487 - changes mousedown event simulation so that event object is passed
to `onmousedown` handler
2018-11-24 16:43:30 +01:00
Robert Stein 0052efa582 - preventDefault is now called for mousedown event by default
- this can be disabled by setting preventMouseDownDefault to false
2018-11-24 16:29:13 +01:00
Francisco Hodge 316319a311 Tests update 2018-11-19 09:32:04 -05:00
Francisco Hodge 02bc34e3b7 npm update 2018-11-19 09:30:17 -05:00
Francisco Hodge d38433be1c Fix buttonHold issue 2018-11-19 09:29:49 -05:00
Francisco Hodge 366f4cd98e Fix clearInput issue 2018-11-19 09:25:27 -05:00
Francisco Hodge ee3d6a18f2 npm update 2018-11-16 23:31:05 -05:00
Francisco Hodge e6d6c78389 Updating tests 2018-11-16 23:30:57 -05:00
Francisco Hodge ba09ac7952 Updating devDependencies 2018-11-16 23:24:53 -05:00
Francisco Hodge 3ee9873d77 2.9.0 - Adding useTouchEvents 2018-11-16 00:39:49 -05:00
Francisco Hodge 347480735c 2.9.0 2018-11-16 00:32:09 -05:00
Francisco HodgeandGitHub 3086a45295 Merge pull request #35 from MadDeveloper/tactile-touch-events
feat(Keyboard): add touch events (by @MadDeveloper)
2018-11-16 00:26:12 -05:00
Francisco Hodge d33d557f08 Updating github templates 2018-11-15 12:18:24 -05:00
Julien Sergent f8fb18e244 feat(Keyboard): add touch events
Can be enabled passing `useTouchEvents` option to the Keyboard constructor.
2018-11-15 17:05:39 +01:00
Francisco Hodge 2d8799367a Updating har-validator 2018-11-14 14:06:26 -05:00
Francisco Hodge 7698e29373 2.8.0 - Webpack 4, Babel 7 2018-11-09 11:06:46 -05:00
dependabot[bot]andGitHub 9f96f58663 Merge pull request #32 from hodgef/dependabot/npm_and_yarn/dotenv-6.1.0 2018-11-07 20:29:09 +00:00
dependabot[bot]andGitHub 226faaa7ec Merge pull request #31 from hodgef/dependabot/npm_and_yarn/webpack-manifest-plugin-2.0.4 2018-11-07 20:28:54 +00:00
dependabot[bot]andGitHub e0d8bf8824 Merge pull request #33 from hodgef/dependabot/npm_and_yarn/react-dom-16.6.1 2018-11-07 11:05:51 +00:00
dependabot[bot] 26c6c88cae Bump webpack-manifest-plugin from 1.3.2 to 2.0.4
Bumps [webpack-manifest-plugin](https://github.com/danethurber/webpack-manifest-plugin) from 1.3.2 to 2.0.4.
- [Release notes](https://github.com/danethurber/webpack-manifest-plugin/releases)
- [Commits](https://github.com/danethurber/webpack-manifest-plugin/compare/v1.3.2...v2.0.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-07 10:55:15 +00:00
dependabot[bot] effb564455 Bump react-dom from 16.6.0 to 16.6.1
Bumps [react-dom](https://github.com/facebook/react) from 16.6.0 to 16.6.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/compare/v16.6.0...v16.6.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-07 10:55:10 +00:00
dependabot[bot] 924a30cca8 Bump dotenv from 4.0.0 to 6.1.0
Bumps [dotenv](https://github.com/motdotla/dotenv) from 4.0.0 to 6.1.0.
- [Release notes](https://github.com/motdotla/dotenv/releases)
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](https://github.com/motdotla/dotenv/compare/v4.0.0...v6.1.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-07 10:53:42 +00:00
dependabot[bot]andGitHub a3c1451c2e Merge pull request #30 from hodgef/dependabot/npm_and_yarn/webpack-3.12.0 2018-11-07 10:52:38 +00:00
dependabot[bot] 2efc9b5469 Bump webpack from 3.8.1 to 3.12.0
Bumps [webpack](https://github.com/webpack/webpack) from 3.8.1 to 3.12.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v3.8.1...v3.12.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-07 10:48:17 +00:00
Francisco Hodge 3b13360fc1 npm update 2018-11-06 17:45:19 -05:00
dependabot[bot]andGitHub a18836f95d Merge pull request #26 from hodgef/dependabot/npm_and_yarn/eslint-loader-2.1.1 2018-11-06 19:54:19 +00:00
dependabot[bot]andGitHub 9a9a234761 Merge pull request #25 from hodgef/dependabot/npm_and_yarn/postcss-flexbugs-fixes-4.1.0 2018-11-06 19:53:18 +00:00
dependabot[bot]andGitHub 577553299b Merge pull request #28 from hodgef/dependabot/npm_and_yarn/react-16.6.0 2018-11-06 10:42:05 +00:00
dependabot[bot] f62dc0f87a Bump eslint-loader from 1.9.0 to 2.1.1
Bumps [eslint-loader](https://github.com/webpack-contrib/eslint-loader) from 1.9.0 to 2.1.1.
- [Release notes](https://github.com/webpack-contrib/eslint-loader/releases)
- [Changelog](https://github.com/webpack-contrib/eslint-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/eslint-loader/compare/1.9.0...2.1.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-06 10:36:40 +00:00
dependabot[bot] f6b16099af Bump react from 16.2.0 to 16.6.0
Bumps [react](https://github.com/facebook/react) from 16.2.0 to 16.6.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/compare/v16.2.0...v16.6.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-06 10:36:36 +00:00
dependabot[bot]andGitHub b03a90b7aa Merge pull request #27 from hodgef/dependabot/npm_and_yarn/eslint-plugin-flowtype-2.50.3 2018-11-06 10:34:21 +00:00
dependabot[bot] eebdd570e1 Bump eslint-plugin-flowtype from 2.39.1 to 2.50.3
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 2.39.1 to 2.50.3.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v2.39.1...v2.50.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-06 10:29:05 +00:00
dependabot[bot] 32457f8471 Bump postcss-flexbugs-fixes from 3.2.0 to 4.1.0
Bumps [postcss-flexbugs-fixes](https://github.com/luisrudge/postcss-flexbugs-fixes) from 3.2.0 to 4.1.0.
- [Release notes](https://github.com/luisrudge/postcss-flexbugs-fixes/releases)
- [Changelog](https://github.com/luisrudge/postcss-flexbugs-fixes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/luisrudge/postcss-flexbugs-fixes/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-06 10:23:21 +00:00
Francisco Hodge 2177211841 Updating devDependencies 2018-11-05 18:31:04 -05:00
dependabot[bot]andGitHub 251260a555 Merge pull request #23 from hodgef/dependabot/npm_and_yarn/css-loader-0.28.11 2018-11-05 23:19:22 +00:00
dependabot[bot]andGitHub 00286710b2 Merge pull request #21 from hodgef/dependabot/npm_and_yarn/style-loader-0.23.1 2018-11-05 23:14:01 +00:00
dependabot[bot] 95f71d31b1 Bump css-loader from 0.28.7 to 0.28.11
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 0.28.7 to 0.28.11.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v0.28.7...v0.28.11)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-05 22:43:50 +00:00
dependabot[bot] 66479fdfaa Bump style-loader from 0.19.0 to 0.23.1
Bumps [style-loader](https://github.com/webpack-contrib/style-loader) from 0.19.0 to 0.23.1.
- [Release notes](https://github.com/webpack-contrib/style-loader/releases)
- [Changelog](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/style-loader/compare/v0.19.0...v0.23.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-05 22:40:12 +00:00
Francisco Hodge 4e3a06fd78 npm update 2018-11-05 17:36:50 -05:00
Francisco Hodge b89f09ea13 Merge branch 'master' of https://github.com/hodgef/simple-keyboard 2018-11-05 17:34:48 -05:00
Francisco Hodge d1100cef92 Fixing caret issue when using maxLength 2018-11-05 17:34:16 -05:00
Francisco Hodge 6475dcacf2 Build update 2018-11-05 17:31:41 -05:00
Francisco Hodge 4e5d36173d Docs update 2018-11-05 17:31:11 -05:00
dependabot[bot]andGitHub 931bb2a7c9 Merge pull request #20 from hodgef/dependabot/npm_and_yarn/copy-webpack-plugin-4.6.0 2018-11-05 10:53:47 +00:00
dependabot[bot] 99c213e41b Bump copy-webpack-plugin from 4.5.0 to 4.6.0
Bumps [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/webpack-contrib/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v4.5.0...v4.6.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-05 10:51:45 +00:00
Francisco Hodge 221c41933b Merge branch 'master' of https://github.com/hodgef/simple-keyboard 2018-11-04 20:46:10 -05:00
Francisco Hodge 3a4cf5faaa Build update 2018-11-04 20:45:43 -05:00
dependabot[bot]andGitHub 708b97d64e Merge pull request #19 from hodgef/dependabot/npm_and_yarn/eslint-config-react-app-2.1.0 2018-11-05 01:38:13 +00:00
dependabot[bot]andGitHub b41c489803 Merge pull request #18 from hodgef/dependabot/npm_and_yarn/autoprefixer-9.3.1 2018-11-05 01:34:14 +00:00
dependabot[bot] 2c78c56f5e Bump autoprefixer from 7.1.6 to 9.3.1
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 7.1.6 to 9.3.1.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/7.1.6...9.3.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-05 01:27:15 +00:00
dependabot[bot]andGitHub 5fe8a198f1 Merge pull request #17 from hodgef/dependabot/npm_and_yarn/sw-precache-webpack-plugin-0.11.5 2018-11-05 01:24:31 +00:00
dependabot[bot]andGitHub e9c3b280ac Merge pull request #16 from hodgef/dependabot/npm_and_yarn/react-dom-16.6.0 2018-11-05 01:18:48 +00:00
dependabot[bot] 3a97f43b5d Bump eslint-config-react-app from 2.0.1 to 2.1.0
Bumps [eslint-config-react-app](https://github.com/facebook/create-react-app) from 2.0.1 to 2.1.0.
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/create-react-app/compare/react-scripts@2.0.1...v2.1.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-05 00:37:40 +00:00
dependabot[bot] 84ab70cdb2 Bump sw-precache-webpack-plugin from 0.11.4 to 0.11.5
Bumps [sw-precache-webpack-plugin](https://github.com/goldhand/sw-precache-webpack-plugin) from 0.11.4 to 0.11.5.
- [Release notes](https://github.com/goldhand/sw-precache-webpack-plugin/releases)
- [Changelog](https://github.com/goldhand/sw-precache-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/goldhand/sw-precache-webpack-plugin/compare/v0.11.4...v0.11.5)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-05 00:33:21 +00:00
dependabot[bot] ba93b6f648 Bump react-dom from 16.2.0 to 16.6.0
Bumps [react-dom](https://github.com/facebook/react) from 16.2.0 to 16.6.0.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/compare/v16.2.0...v16.6.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-05 00:31:49 +00:00
Francisco Hodge 9abb36172d Adding disableCaretPositioning option 2018-11-04 17:25:39 -05:00
Francisco Hodge 701db33ab1 Merge branch 'master' of https://github.com/hodgef/simple-keyboard 2018-11-03 01:41:10 -04:00
Francisco Hodge 2eb88579ca Button hold adjustment 2018-11-03 01:39:41 -04:00
Francisco Hodge a309fd6cb4 Update issue templates 2018-11-01 19:53:36 -04:00
Francisco Hodge 342918a3be npm update 2018-11-01 13:23:42 -04:00
Francisco Hodge c6244e29f6 Updating dev dependencies 2018-11-01 13:16:34 -04:00
Francisco Hodge d6e815b2f8 Build update 2018-11-01 12:49:01 -04:00
Francisco Hodge 8a4ab7b570 npm update 2018-11-01 12:46:45 -04:00
Francisco Hodge 550715001d Adjusting button hold handler 2018-11-01 12:46:30 -04:00
Francisco Hodge 444806160b Docs update 2018-11-01 12:45:04 -04:00
Francisco Hodge 265f88c7d6 Adding onModulesLoaded 2018-11-01 00:16:11 -04:00
Francisco Hodge 2cd5cf4498 Build update 2018-11-01 00:15:42 -04:00
Francisco Hodge 40e50108ae Docs update 2018-11-01 00:14:02 -04:00
Francisco Hodge b7636841f7 Build update 2018-10-31 20:46:55 -04:00
Francisco Hodge 922ce24eb7 Build update 2018-10-31 19:48:25 -04:00
Francisco Hodge 824c3578d0 Add class per plugin 2018-10-31 19:48:17 -04:00
Francisco Hodge 1ee5c7dd2d Docs update 2018-10-31 19:47:03 -04:00
Francisco Hodge 41cf4a472b Build update 2018-10-31 18:43:31 -04:00
Francisco Hodge 7c5f0528f2 Adjusting module loading 2018-10-31 18:43:23 -04:00
Francisco Hodge 04b2a730ef Docs update 2018-10-31 18:42:33 -04:00
Francisco Hodge 1f3d5ddf0d Build update 2018-10-31 17:58:54 -04:00
Francisco Hodge 843db06345 Module handling improvements 2018-10-31 17:57:33 -04:00
Francisco Hodge 6001d044f2 Tests update 2018-10-31 17:57:14 -04:00
Francisco Hodge eafd6af044 Build update 2018-10-31 17:57:05 -04:00
Francisco Hodge 295493e976 Docs update 2018-10-31 17:56:32 -04:00
Francisco Hodge 472df83482 Tests update 2018-10-30 23:38:56 -04:00
Francisco Hodge e7284b0e38 Docs update 2018-10-30 23:33:29 -04:00
Francisco Hodge 288fcf3507 Build update 2018-10-30 23:28:48 -04:00
Francisco Hodge cfdf7574ca Tests update 2018-10-30 23:28:39 -04:00
Francisco Hodge d567b3ac01 Enhancing add-on compatibility 2018-10-30 23:28:23 -04:00
Francisco Hodge 3bd4fb58b7 Build update 2018-10-29 11:48:05 -04:00
Francisco Hodge 01be532886 Docs update 2018-10-29 11:47:56 -04:00
Francisco Hodge e23e6d4e04 npm update 2018-10-29 11:47:23 -04:00
Francisco HodgeandGitHub 2571411e06 Update README.md 2018-10-29 11:13:40 -04:00
Francisco HodgeandGitHub 0d9af8d1ec Update README.md 2018-10-29 11:13:01 -04:00
Francisco HodgeandGitHub 37e52e0d98 Update README.md 2018-10-29 11:08:02 -04:00
Francisco HodgeandGitHub 3ab80c4209 Update README.md 2018-10-29 11:06:52 -04:00
Francisco HodgeandGitHub d3e548b8f5 Update README.md 2018-10-29 11:04:16 -04:00
Francisco HodgeandGitHub 6aff86df1f Update README.md 2018-10-29 11:02:21 -04:00
Francisco HodgeandGitHub bb8897ecbe Update README.md 2018-10-29 10:48:02 -04:00
Francisco HodgeandGitHub 2fdf33d63e Update README.md 2018-10-29 10:47:07 -04:00
Francisco HodgeandGitHub 1d99b1bc31 Update README.md 2018-10-29 10:41:08 -04:00
Francisco Hodge 3070479369 build update 2018-10-24 20:27:29 -04:00
Francisco Hodge 222629abdd Docs update 2018-10-24 20:20:28 -04:00
Francisco Hodge b4b0a3bb38 Build update 2018-10-24 18:54:37 -04:00
Francisco Hodge 3f163ec62a Readme update 2018-10-24 18:53:33 -04:00
Francisco HodgeandGitHub 648693cffe Update README.md 2018-10-24 18:49:46 -04:00
Francisco Hodge fe0036f88e Removing uneeded logging 2018-10-24 18:43:44 -04:00
Francisco Hodge f284eed9ef Removing unneeded logging 2018-10-24 18:39:45 -04:00
Francisco Hodge b9ed3792ee npm update 2018-10-24 18:34:56 -04:00
Francisco Hodge 2e3ca5716b Docs update 2018-10-24 18:18:24 -04:00
Francisco Hodge 4589ab789d npm update 2018-10-24 18:18:01 -04:00
Francisco Hodge 806594d96c Build update 2018-10-24 18:17:26 -04:00
Francisco Hodge 5d09d461c9 build update 2018-10-20 14:53:40 -04:00
Francisco Hodge ec11903020 npm update 2018-10-20 14:51:41 -04:00
Francisco HodgeandGitHub 3f237c97c8 Update README.md 2018-10-20 14:47:31 -04:00
Francisco Hodge 53269c1fc6 readme update 2018-10-20 14:37:06 -04:00
Francisco Hodge 3da2bc3d57 Merge branch 'master' of https://github.com/hodgef/simple-keyboard 2018-10-20 14:30:10 -04:00
Francisco HodgeandGitHub 97223c25ef Update README.md 2018-10-20 14:29:14 -04:00
Francisco Hodge 8ce55fc73e npm update 2018-10-20 14:26:55 -04:00
Francisco HodgeandGitHub bb8196aec5 Update README.md 2018-10-20 14:24:20 -04:00
Francisco HodgeandGitHub 3c07aa8395 Update README.md 2018-10-20 14:22:18 -04:00
Francisco HodgeandGitHub 7d94fc2302 Update README.md 2018-10-20 14:21:40 -04:00
Francisco Hodge 9accf04545 build update 2018-10-17 15:36:33 -04:00
Francisco Hodge ce949fdae1 Readme update 2018-10-17 14:53:20 -04:00
Francisco Hodge e31438b331 build update 2018-10-16 18:03:09 -04:00
Francisco Hodge 79f1dfe562 Adding coverage badge to readme 2018-10-16 18:00:21 -04:00
Francisco Hodge 37ba9fd85f deps cleanup 2018-10-16 17:59:50 -04:00
Francisco Hodge d45b3329a7 travis ci config update 2018-10-16 17:52:04 -04:00
Francisco Hodge 1500ba2f2b travis ci config updated 2018-10-16 17:47:57 -04:00
Francisco Hodge eb31f91b17 adding mocha to deps 2018-10-16 17:43:35 -04:00
Francisco Hodge db95212243 travis ci config update 2018-10-16 17:37:28 -04:00
Francisco Hodge 0f0ee2233e Build update 2018-10-16 17:31:23 -04:00
Francisco Hodge 3c5b94abf8 2.6.0 cleanup 2018-10-16 17:31:13 -04:00
Francisco Hodge 48c4e362b3 Demo adjustments 2018-10-16 17:29:32 -04:00
Francisco Hodge 61b896ad77 Readme update 2018-10-16 17:26:30 -04:00
Francisco Hodge befa988090 Updated CI tests 2018-10-16 17:26:21 -04:00
Francisco Hodge b08fae64b8 updated travis ci config 2018-10-15 00:43:05 -04:00
Francisco Hodge 17ccf253b4 build update 2018-10-14 22:54:37 -04:00
Francisco Hodge 6edfc6efc2 README update 2018-10-14 22:52:00 -04:00
Francisco Hodge 025e351583 tests update 2018-10-14 22:46:10 -04:00
Francisco Hodge cc85584154 build update 2018-10-14 22:44:51 -04:00
Francisco Hodge 5033b345f7 npm update 2018-10-14 22:44:02 -04:00
Francisco HodgeandGitHub 5d5aef242c Update README.md 2018-10-14 19:02:14 -04:00
Francisco HodgeandGitHub 71bab13453 Update README.md 2018-10-14 18:58:03 -04:00
Francisco Hodge 773a9b5eb3 Merge branch 'master' of https://github.com/hodgef/simple-keyboard 2018-10-12 18:16:22 -04:00
Francisco Hodge b0d8923a80 build update 2018-10-12 18:15:45 -04:00
Francisco Hodge 8728cc6a2a npm update 2018-10-12 18:14:31 -04:00
Francisco Hodge fec9d24a19 Fix caret positioning 2018-10-12 18:14:22 -04:00
Francisco Hodge 1a08fe74e0 Update issue templates 2018-10-12 17:56:47 -04:00
Francisco Hodge b2f7bac585 Build update 2018-10-10 12:21:38 -04:00
Francisco Hodge 46bf8e0dc3 npm update 2018-10-10 12:20:32 -04:00
Francisco Hodge e8216fee35 Demo update 2018-10-10 12:20:10 -04:00
Francisco Hodge 4f5af90d8d Fix curly brace output 2018-10-10 12:20:02 -04:00
Francisco Hodge 02fd2223ff Rename readme 2018-10-09 20:10:40 -04:00
Francisco Hodge feb9e51441 Adding readme 2018-10-09 20:09:48 -04:00
Francisco Hodge 5c0d1ed63d Update issue templates 2018-10-09 19:54:47 -04:00
Francisco Hodge d248a37c70 build update 2018-10-08 19:16:10 -04:00
Francisco Hodge f1d4b77ffb npm update 2018-10-08 19:13:06 -04:00
Francisco Hodge 7795b98dcc Adding discord chat link to Readme 2018-10-08 19:12:51 -04:00
Francisco Hodge e8c17a4050 Build update 2018-10-07 22:17:35 -04:00
Francisco Hodge 6e83a1f402 Adding highlighting support for control, alt, meta keys 2018-10-07 22:16:15 -04:00
Francisco Hodge ba45bbe5ad build uodate 2018-10-06 22:49:57 -04:00
Francisco Hodge d79fc3b2e3 npm update 2018-10-06 22:25:36 -04:00
Francisco Hodge 88b804643b Removing caret position reset 2018-10-06 22:25:29 -04:00
Francisco Hodge 7b7697841e Build update 2018-10-06 19:07:14 -04:00
Francisco Hodge c1cfacfcae npm update 2018-10-06 19:02:53 -04:00
Francisco Hodge 0b1a25c8d9 Updating README 2018-10-06 19:00:30 -04:00
Francisco Hodge 53611310c0 Build update 2018-10-06 13:51:41 -04:00
Francisco Hodge 9e521122b5 2.5.2 Readme update 2018-10-06 13:50:56 -04:00
Francisco Hodge ab6b54dc43 Fix mixed props 2018-10-06 13:49:31 -04:00
Francisco Hodge 0c773151c7 Avoid cursor position change when maxLength is set 2018-10-06 13:35:33 -04:00
Francisco Hodge 9633c99dad Caret bounds fix 2018-10-06 04:06:09 -04:00
Francisco Hodge 280956dba3 Build update 2018-10-06 02:34:06 -04:00
Francisco Hodge 92bae5f3fb Demo update 2018-10-06 02:31:09 -04:00
Francisco Hodge fa94cf2ba3 PhysicalKeyboard highlighting improvement 2018-10-06 02:26:57 -04:00
Francisco Hodge 24de8bcb20 Clearing out uneeded code 2018-10-06 02:26:22 -04:00
Francisco Hodge cbfba64447 improved buttonTheme functionality 2018-10-06 02:26:00 -04:00
Francisco Hodge 5e5c1c4abe Precise Button element identifiers 2018-10-06 02:25:04 -04:00
Francisco Hodge c980024e71 onRender functionality 2018-10-06 02:24:04 -04:00
Francisco Hodge a321ab9b91 onInit callback 2018-10-06 02:23:38 -04:00
Francisco Hodge 0f1936b03e Utilities adjustment 2018-10-06 02:23:17 -04:00
Francisco Hodge 625a426fef Cursor position support 2018-10-06 02:22:57 -04:00
Francisco Hodge 2ad0ba8506 Cursor position support 2018-10-06 02:22:02 -04:00
Francisco Hodge d923c5d920 maxLength functionality 2018-10-06 02:18:55 -04:00
Francisco Hodge 282e84941a getButtonElement functionality 2018-10-06 02:17:54 -04:00
Francisco Hodge e95ebc1b9e Adding utilities as instance 2018-10-06 02:16:12 -04:00
Francisco Hodge 0dffe921ff Removing readonly from demo 2018-10-06 02:12:50 -04:00
Francisco Hodge 26e7970b41 Build update 2018-09-24 21:26:41 -04:00
Francisco Hodge 36df4e83cc Readme update 2018-09-24 15:52:54 -04:00
Francisco Hodge 1c98cf85f6 Updated Styling 2018-09-23 23:38:47 -04:00
Francisco Hodge a1d6bf4fe0 Merge Display feature 2018-09-23 23:38:34 -04:00
Francisco Hodge 345f22827b Button definitions update 2018-09-23 23:38:11 -04:00
Francisco Hodge f0ef1e8e7b Physical Keyboard Highlighting support 2018-09-23 23:37:46 -04:00
Francisco Hodge 1cc5b9b0ee Multiple Instance Sync Support 2018-09-23 23:36:01 -04:00
Francisco Hodge 7d6e933a4e Update Keyboard Size 2018-09-23 23:32:53 -04:00
Francisco Hodge 3f4248737f Adding Full Keyboard Demo 2018-09-23 23:32:30 -04:00
Francisco Hodge 572498022c Adding build header 2018-09-09 22:47:01 -04:00
Francisco Hodge 8a85b92f8f Readme update 2018-09-08 10:59:47 -04:00
Francisco Hodge 36123371fb Readme update 2018-09-08 10:29:13 -04:00
Francisco Hodge 15c929316d Readme update 2018-08-29 10:47:04 -04:00
Francisco Hodge 30603e76b5 Emoji backspace fix 2018-08-24 00:40:54 -04:00
Francisco Hodge ad17363173 Fix README typo 2018-08-21 20:14:42 -04:00
Francisco Hodge 1fe93ba6dd Readme update 2018-08-14 17:00:51 -04:00
Francisco Hodge 7e968e07b8 Readme update 2018-08-14 16:45:54 -04:00
Francisco Hodge 6c5026da34 Updating readme 2018-08-13 21:43:12 -04:00
Francisco Hodge 38f178cc18 Readme update 2018-08-13 21:26:34 -04:00
Francisco Hodge 8e3b0e18c0 Reset className on clear() 2018-08-13 14:48:21 -04:00
Francisco Hodge c32a8a9568 maintenance: npm audit fix performed 2018-08-13 13:39:50 -04:00
Francisco Hodge 705b5acf53 npm bin update 2018-08-07 10:31:14 -04:00
Francisco Hodge d4886c1f6f npm update 2018-08-07 09:08:36 -04:00
Francisco Hodge 6ba68a21e6 npm version bump 2018-08-03 14:47:36 -04:00
Francisco Hodge 958019199a Removing peer dependencies 2018-08-03 14:46:53 -04:00
Francisco Hodge 65bf9362bd Dist update 2018-07-31 12:02:22 -04:00
Francisco Hodge f4a5d946d6 npm version update 2018-07-31 12:00:02 -04:00
Francisco Hodge 12fcae865e Changed key "delete" to "backspace" as per suggestion 2018-07-31 11:58:19 -04:00
Francisco Hodge 5b84982812 npm version bump 2018-07-19 10:13:27 -04:00
Francisco Hodge be6d1b0f93 Update badges 2018-07-19 10:13:09 -04:00
Francisco Hodge 0f5dad0527 Switching to JSDelivr for CDN use case 2018-07-13 17:23:28 -04:00
Francisco Hodge 94c14df816 Disable tap to zoom on IOS10+ 2018-07-13 17:08:35 -04:00
Francisco Hodge 4206e02ca2 Readme update 2018-07-05 17:24:26 -04:00
Francisco Hodge 3b1e9c131a Updated README links 2018-07-05 17:20:58 -04:00
Francisco Hodge e7b604f6b1 Added multiple inputs live demo 2018-07-03 19:10:47 -04:00
Francisco Hodge 66ae70f29a update example links 2018-06-29 22:29:40 -04:00
Francisco Hodge 470bdc8e74 readme links update 2018-06-29 22:26:35 -04:00
Francisco Hodge 0533b4c2c2 npm bump 2018-06-29 21:43:44 -04:00
Francisco Hodge 5a7fef7643 Updated README with buttonTheme example 2018-06-29 21:43:22 -04:00
Francisco Hodge d88912cd23 Build update 2018-06-29 20:43:07 -04:00
Francisco Hodge e138f1fd6f Support multiple classes for themeButtons 2018-06-29 20:41:14 -04:00
Francisco Hodge 0581247fbe Build update 2018-06-29 20:17:44 -04:00
Francisco Hodge d8d8d460c2 Updated dependencies, bump npm version 2018-06-29 20:17:04 -04:00
Francisco Hodge 8b8d90f248 Slightly updating demo css 2018-06-29 20:10:19 -04:00
Francisco Hodge 42e47ef8f9 Adding clearer colors for Keyboard 2018-06-29 20:04:31 -04:00
Francisco Hodge 1e16bde389 Single button styling support (buttonTheme) 2018-06-29 20:01:29 -04:00
Francisco Hodge 201542b189 Minor typo fix 2018-06-29 19:59:03 -04:00
Francisco Hodge 41b23cca89 README update 2018-06-08 10:59:11 -04:00
Francisco Hodge b2df5cf09e npm version bump 2018-06-08 10:40:30 -04:00
Francisco Hodge 10bbcdd89c Updating README cdn usage example 2018-06-08 10:39:20 -04:00
Francisco Hodge 3b75d11b9c Update build 2018-06-08 10:28:50 -04:00
Francisco Hodge 71136a0d5e Webpack config adjustment 2018-06-08 10:15:21 -04:00
Francisco Hodge 1aafdeee0a npm bump 2018-06-08 09:57:53 -04:00
Francisco Hodge 41c87430ff npm bump 2018-05-30 23:16:41 -04:00
Francisco Hodge ff2476a331 README typo fix 2018-05-30 23:15:01 -04:00
Francisco Hodge 894483e6a7 Adding editable CodeSandbox examples 2018-05-30 22:28:51 -04:00
Francisco Hodge cbef48eb3c npm version bump 2018-05-02 13:01:16 -04:00
Francisco Hodge 2769002ff6 Adding further comments on multiple input example 2018-05-02 12:41:29 -04:00
Francisco Hodge 04088f63c1 Fix image path 2018-04-30 15:33:15 -04:00
Francisco Hodge 69ed611788 Bump npm version 2018-04-30 12:47:31 -04:00
Francisco Hodge dbed641621 Updating documentation 2018-04-30 12:47:18 -04:00
Francisco Hodge d1e6630247 README cleanup 2018-04-30 11:11:31 -04:00
Francisco Hodge d8e8b6076a Updating dist 2018-04-30 11:07:21 -04:00
Francisco Hodge 7c292d04bf Adding inputName, setOptions, Use-cases documentation 2018-04-30 11:05:55 -04:00
Francisco Hodge f91e50a1b2 Bump npm version 2018-04-30 10:37:44 -04:00
Francisco Hodge c7eb4ba4d3 Adding newLineOnEnter in demo 2018-04-30 10:37:09 -04:00
Francisco Hodge d407413cce Adding multiple input demo, per request 2018-04-30 10:36:05 -04:00
Francisco Hodge f8ebb30d76 Adding Multiple Input support 2018-04-30 10:35:51 -04:00
Francisco Hodge 276a478eb6 Fix typo 2018-04-24 10:10:20 -04:00
Francisco Hodge c239e21625 Updated examples 2018-04-24 10:06:23 -04:00
Francisco Hodge d42036ec3e bump npm version 2018-04-24 09:39:00 -04:00
Francisco Hodge cbd1506f53 Improved readme examples 2018-04-24 09:38:14 -04:00
Francisco Hodge d477c35cce Adding build to git for user convenience 2018-04-24 09:18:55 -04:00
Francisco Hodge 4362e486a5 readme fix 2018-04-23 06:35:37 -04:00
Francisco Hodge 2502bcc910 bump npm version 2018-04-21 18:04:44 -04:00
Francisco Hodge df42db3b95 ES6 initial setup 2018-04-20 16:34:02 -04:00
65 changed files with 17627 additions and 8808 deletions
+17
View File
@@ -0,0 +1,17 @@
---
name: Bug report
about: Create a report to help improve simple-keyboard
title: ''
labels: ''
assignees: hodgef
---
**Simple-keyboard version**
As some bugs have been addressed in later versions, please ensure you are running the latest.
**Describe the bug**
A clear and concise description of what the bug is. Providing a [sandbox example](https://codesandbox.io/s/vanilla) or code depicting the issue is important, as this will help us reproduce the issue.
**Screenshots**
If applicable, add screenshots to help explain your problem.
+20
View File
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea you'd like to see in simple-keyboard
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+4
View File
@@ -0,0 +1,4 @@
# About .github
This directory handles special features to be used on simple-keyboard's Github repository.
It is not needed for simple-keyboard to run and can be safely removed.
+8
View File
@@ -0,0 +1,8 @@
## Description
A few sentences describing the overall goals of the pull request's commits.
## Checks
- [ ] Tests ( `npm run test -- --coverage` ) Coverage at `./coverage/lcov-report/index.html` should be 100%
- [ ] Documentation ( `npm run docs` ) Coverage at `./docs/source.html` should be 100%
+4 -2
View File
@@ -1,10 +1,11 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# production
/build
/demo
# testing
@@ -16,6 +17,7 @@
.env.development.local
.env.test.local
.env.production.local
.vscode
npm-debug.log*
yarn-debug.log*
+5
View File
@@ -4,6 +4,9 @@
# testing
/coverage
# docs
/docs
# misc
.DS_Store
.env.local
@@ -14,6 +17,8 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.github
/demo
# Development folders and files
public
+16 -2
View File
@@ -1,5 +1,19 @@
language: node_js
node_js:
- "node"
- node
install:
- npm install -g codecov
- npm install
script:
- npm run test
- npm run start -- --testMode
- npm run demo
- npm run coverage
- codecov
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL
+2 -2
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2018 Francisco Hodge
Copyright (c) 2019 Francisco Hodge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
+45 -113
View File
@@ -1,132 +1,64 @@
# simple-keyboard
<p>
<a href="https://simple-keyboard.com/demo">
<img alt="simple-keyboard: Javscript Virtual Keyboard" src="https://i.imgur.com/Po6659n.gif">
</a>
[![npm](https://img.shields.io/npm/v/simple-keyboard.svg)](https://www.npmjs.com/package/simple-keyboard)
[![Dependencies](https://img.shields.io/david/hodgef/simple-keyboard.svg)](https://www.npmjs.com/package/simple-keyboard)
[![Dev Dependencies](https://img.shields.io/david/dev/hodgef/simple-keyboard.svg)](https://www.npmjs.com/package/simple-keyboard)
[![npm downloads](https://img.shields.io/npm/dm/simple-keyboard.svg)](https://www.npmjs.com/package/simple-keyboard)
<a href="https://www.npmjs.com/package/simple-keyboard">
<img src="https://badgen.net/npm/v/simple-keyboard?color=blue" alt="npm version">
</a>
[![NPM](https://nodei.co/npm/simple-keyboard.png)](https://npmjs.com/package/simple-keyboard)
<a href="https://bundlephobia.com/result?p=simple-keyboard">
<img src="https://badgen.net/bundlephobia/minzip/simple-keyboard/?color=green" alt="install size">
</a>
> An easily customisable and responsive on-screen virtual keyboard for React.js projects.
<a href="https://travis-ci.org/hodgef/simple-keyboard">
<img src="https://api.travis-ci.org/hodgef/simple-keyboard.svg?branch=master"
alt="build status">
</a>
<a href="https://david-dm.org/hodgef/simple-keyboard">
<img src="https://badgen.net/david/dep/hodgef/simple-keyboard" alt="coverage">
</a>
## Installation
<a href="https://codecov.io/gh/hodgef/simple-keyboard">
<img src="https://badgen.net/codecov/c/github/hodgef/simple-keyboard" alt="coverage">
</a>
</p>
`npm install simple-keyboard --save`
> The slick virtual keyboard for Javascript. Compatible with your JS, React, Angular or Vue projects.
## Usage
## 🚀 Demo
[Demo Showcase (Vanilla, Angular, React, Vue)](https://simple-keyboard.com/demo)
````js
import React, {Component} from 'react';
import Keyboard from 'simple-keyboard';
import 'simple-keyboard/build/css/index.css';
## 📦 Installation & Usage
You can use simple-keyboard as a `<script>` tag from a CDN, or install it from npm.
Check out the [Getting Started](https://simple-keyboard.com/getting-started) docs to begin.
class App extends Component {
## 📖 Documentation
Check out the [simple-keyboard documentation](https://simple-keyboard.com/documentation) site.
onChange = (input) => {
console.log("Input changed", input);
}
Feel free to browse the [Q&A / Use-cases](https://simple-keyboard.com/qa-use-cases/) page for advanced use-cases.
onKeyPress = (button) => {
console.log("Button pressed", button);
}
render(){
return (
<Keyboard
onChange={input =>
this.onChange(input)}
onKeyPress={button =>
this.onKeyPress(button)}
/>
);
}
}
export default App;
````
> Need a more extensive example? [Click here](https://github.com/hodgef/simple-keyboard/blob/master/src/demo/App.js).
## Options
You can customize the Keyboard by passing options (props) to it.
Here are the available options (the code examples are the defaults):
### layout
> Modify the keyboard layout
```js
layout={{
'default': [
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
'{tab} q w e r t y u i o p [ ] \\',
'{lock} a s d f g h j k l ; \' {enter}',
'{shift} z x c v b n m , . / {shift}',
'.com @ {space}'
],
'shift': [
'~ ! @ # $ % ^ & * ( ) _ + {bksp}',
'{tab} Q W E R T Y U I O P { } |',
'{lock} A S D F G H J K L : " {enter}',
'{shift} Z X C V B N M < > ? {shift}',
'.com @ {space}'
]
}}
```
### layoutName
> Specifies which layout should be used.
```js
layoutName={"default"}
```
### display
> Replaces variable buttons (such as `{bksp}`) with a human-friendly name (e.g.: "delete").
```js
display={{
'{bksp}': 'delete',
'{enter}': '< enter',
'{shift}': 'shift',
'{s}': 'shift',
'{tab}': 'tab',
'{lock}': 'caps',
'{accept}': 'Submit',
'{space}': ' ',
'{//}': ' '
}}
```
### theme
> A prop to add your own css classes. You can add multiple classes separated by a space.
```js
theme={"hg-theme-default"}
```
### debug
> Runs a console.log every time a key is pressed. Displays the buttons pressed and the current input.
```js
debug={false}
```
## Demo
To run demo on your own computer:
### To run demo on your own computer
* Clone this repository
* `npm install`
* `npm start`
* Visit [http://localhost:3000/](http://localhost:3000/)
## Note
### Other versions
This is a work in progress. Feel free to submit any issues you have at:
* [React.js](https://github.com/hodgef/react-simple-keyboard)
* [Angular](https://simple-keyboard.com/demo)
* [Vue.js](https://simple-keyboard.com/demo)
### Questions?
<a href="http://franciscohodge.com/simple-keyboard/chat/join" title="Join our Discord chat" target="_blank"><img src="https://franciscohodge.com/project-pages/simple-keyboard/images/discord.png" align="center" width="200"></a>
## ✅ Contributing
PR's and issues are welcome. Feel free to submit any issues you have at:
[https://github.com/hodgef/simple-keyboard/issues](https://github.com/hodgef/simple-keyboard/issues)
+12
View File
@@ -0,0 +1,12 @@
/*!
*
* simple-keyboard v2.26.0
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/body,html{margin:0;padding:0}.simple-keyboard{font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;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}.simple-keyboard .hg-row{display:flex}.simple-keyboard .hg-row:not(:last-child){margin-bottom:5px}.simple-keyboard .hg-row .hg-button-container,.simple-keyboard .hg-row .hg-button:not(:last-child){margin-right:5px}.simple-keyboard .hg-row>div:last-child{margin-right:0}.simple-keyboard .hg-row .hg-button-container{display:flex}.simple-keyboard .hg-button{display:inline-block;flex-grow:1;cursor:pointer}.simple-keyboard .hg-button span{pointer-events:none}.simple-keyboard.hg-theme-default{background-color:rgba(0,0,0,.1);padding:5px;border-radius:5px}.simple-keyboard.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}.simple-keyboard button.hg-button{border-width:0;outline:0;font-size:inherit}.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button{width:33.3%;height:60px;align-items:center;display:flex;justify-content:center}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd,.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.simple-keyboard.hg-theme-default .hg-button.hg-button-com{max-width:85px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton{background:rgba(5,25,70,.53);color:#fff}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}
/*# sourceMappingURL=index.css.map */
File diff suppressed because one or more lines are too long
+266
View File
@@ -0,0 +1,266 @@
declare module 'simple-keyboard' {
interface KeyboardLayoutObject {
default: string[];
shift?: any;
[key: string]: string[];
}
interface KeyboardButtonTheme {
class: string;
buttons: string;
}
interface KeyboardButtonAttributes {
attribute: string;
value: string;
buttons: string;
}
interface KeyboardOptions {
/**
* Modify the keyboard layout.
*/
layout?: KeyboardLayoutObject;
/**
* Specifies which layout should be used.
*/
layoutName?: string;
/**
* Replaces variable buttons (such as `{bksp}`) with a human-friendly name (e.g.: `backspace`).
*/
display?: { [button: string]: string };
/**
* By default, when you set the display property, you replace the default one. This setting merges them instead.
*/
mergeDisplay?: boolean;
/**
* A prop to add your own css classes to the keyboard wrapper. You can add multiple classes separated by a space.
*/
theme?: string;
/**
* A prop to add your own css classes to one or several buttons.
*/
buttonTheme?: KeyboardButtonTheme[];
/**
* A prop to add your own attributes to one or several buttons.
*/
buttonAttributes?: KeyboardButtonAttributes[];
/**
* Runs a `console.log` every time a key is pressed. Displays the buttons pressed and the current input.
*/
debug?: boolean;
/**
* Specifies whether clicking the "ENTER" button will input a newline (`\n`) or not.
*/
newLineOnEnter?: boolean;
/**
* Specifies whether clicking the "TAB" button will input a tab character (`\t`) or not.
*/
tabCharOnTab?: boolean;
/**
* Allows you to use a single simple-keyboard instance for several inputs.
*/
inputName?: string;
/**
* `number`: Restrains all of simple-keyboard inputs to a certain length. This should be used in addition to the input elements maxlengthattribute.
*
* `{ [inputName: string]: number }`: Restrains simple-keyboards individual inputs to a certain length. This should be used in addition to the input elements maxlengthattribute.
*/
maxLength?: any;
/**
* When set to true, this option synchronizes the internal input of every simple-keyboard instance.
*/
syncInstanceInputs?: boolean;
/**
* Enable highlighting of keys pressed on physical keyboard.
*/
physicalKeyboardHighlight?: boolean;
/**
* Calling preventDefault for the mousedown events keeps the focus on the input.
*/
preventMouseDownDefault?: boolean;
/**
* Define the text color that the physical keyboard highlighted key should have.
*/
physicalKeyboardHighlightTextColor?: string;
/**
* Define the background color that the physical keyboard highlighted key should have.
*/
physicalKeyboardHighlightBgColor?: string;
/**
* Render buttons as a button element instead of a div element.
*/
useButtonTag?: boolean;
/**
* A prop to ensure characters are always be added/removed at the end of the string.
*/
disableCaretPositioning?: boolean;
/**
* Restrains input(s) change to the defined regular expression pattern.
*/
inputPattern?: any;
/**
* Instructs simple-keyboard to use touch events instead of click events.
*/
useTouchEvents?: boolean;
/**
* Enable useTouchEvents automatically when touch device is detected.
*/
autoUseTouchEvents?: boolean;
/**
* Opt out of PointerEvents handling, falling back to the prior mouse event logic.
*/
useMouseEvents?: boolean;
/**
* Disable button hold action.
*/
disableButtonHold?: boolean;
/**
* Executes the callback function on key press. Returns button layout name (i.e.: "{shift}").
*/
onKeyPress?: (button: string) => any;
/**
* Executes the callback function on key release.
*/
onKeyReleased?: (button: string) => any;
/**
* Executes the callback function on input change. Returns the current input's string.
*/
onChange?: (input: string) => any;
/**
* Executes the callback function before the first simple-keyboard render.
*/
beforeFirstRender?: () => void;
/**
* Executes the callback function before a simple-keyboard render.
*/
beforeRender?: () => void;
/**
* Executes the callback function every time simple-keyboard is rendered (e.g: when you change layouts).
*/
onRender?: () => void;
/**
* Executes the callback function once simple-keyboard is rendered for the first time (on initialization).
*/
onInit?: () => void;
/**
* Executes the callback function on input change. Returns the input object with all defined inputs.
*/
onChangeAll?: (inputs: any) => any;
/**
* Executes the callback function on key release.
*/
onKeyReleased?: () => void;
}
class Keyboard {
constructor(selector: string, options: KeyboardOptions);
constructor(options: KeyboardOptions);
/**
* Options
*/
options: KeyboardOptions;
/**
* Utilities
*/
utilities?: any;
/**
* caretPosition
*/
caretPosition?: number;
/**
* Adds/Modifies an entry to the `buttonTheme`. Basically a way to add a class to a button.
* @param {string} buttons List of buttons to select (separated by a space).
* @param {string} className Classes to give to the selected buttons (separated by space).
*/
addButtonTheme(buttons: string, className: string): void;
/**
* Removes/Amends an entry to the `buttonTheme`. Basically a way to remove a class previously added to a button through buttonTheme or addButtonTheme.
* @param {string} buttons List of buttons to select (separated by a space).
* @param {string} className Classes to give to the selected buttons (separated by space).
*/
removeButtonTheme(buttons: string, className: string): void;
/**
* Clear the keyboard's input.
*
* @param {string} [inputName] optional - the internal input to select
*/
clearInput(inputName?: string): void;
/**
* Get the keyboards input (You can also get it from the onChange prop).
* @param {string} [inputName] optional - the internal input to select
*/
getInput(inputName?: string): string;
/**
* Set the keyboards input.
* @param {string} input the input value
* @param {string} inputName optional - the internal input to select
*/
setInput(input: string, inputName?: string): void;
/**
* Set new option or modify existing ones after initialization.
* @param {KeyboardOptions} option The option to set
*/
setOptions(options: KeyboardOptions): void;
/**
* Send a command to all simple-keyboard instances at once (if you have multiple instances).
* @param {function(instance: object, key: string)} callback Function to run on every instance
*/
dispatch(callback: (instance: any, key: string) => void): void;
/**
* Get the DOM Element of a button. If there are several buttons with the same name, an array of the DOM Elements is returned.
* @param {string} button The button layout name to select
*/
getButtonElement(button: string): HTMLElement | HTMLElement[];
/**
* Clears keyboard listeners and DOM elements.
*/
destroy(): void;
}
export default Keyboard;
}
+13
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+9 -6
View File
@@ -27,24 +27,27 @@ var dotenvFiles = [
// Load environment variables from .env* files. Suppress warnings using silent
// if this file is missing. dotenv will never modify any environment variables
// that have already been set.
// that have already been set. Variable expansion is supported in .env files.
// https://github.com/motdotla/dotenv
// https://github.com/motdotla/dotenv-expand
dotenvFiles.forEach(dotenvFile => {
if (fs.existsSync(dotenvFile)) {
require('dotenv').config({
path: dotenvFile,
});
require('dotenv-expand')(
require('dotenv').config({
path: dotenvFile,
})
);
}
});
// We support resolving modules according to `NODE_PATH`.
// This lets you use absolute paths in imports inside large monorepos:
// https://github.com/facebookincubator/create-react-app/issues/253.
// https://github.com/facebook/create-react-app/issues/253.
// It works similar to `NODE_PATH` in Node itself:
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
// https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421
// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
// We also resolve them to make sure all tools using them work consistently.
const appDirectory = fs.realpathSync(process.cwd());
process.env.NODE_PATH = (process.env.NODE_PATH || '')
+25
View File
@@ -0,0 +1,25 @@
const fs = require('fs');
const path = require('path');
/**
* A module to get package informations from package.json
* @module getPackageJson
* @param {...string} keys from package.json if no arguments passed it returns package.json content as object
* @returns {object} with given keys or content of package.json as object
*/
/**
* Returns package info
*/
const getPackageJson = function(...args) {
const packageJSON = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json')));
if (!args.length) {
return packageJSON;
}
return args.reduce((out, key) => {
out[key] = packageJSON[key];
return out;
}, {});
};
module.exports = getPackageJson;
+1 -1
View File
@@ -1,7 +1,7 @@
'use strict';
// This is a custom Jest transformer turning style imports into empty objects.
// http://facebook.github.io/jest/docs/tutorial-webpack.html
// http://facebook.github.io/jest/docs/en/webpack.html
module.exports = {
process() {
+30 -2
View File
@@ -1,12 +1,40 @@
'use strict';
const path = require('path');
const camelcase = require('camelcase');
// This is a custom Jest transformer turning file imports into filenames.
// http://facebook.github.io/jest/docs/tutorial-webpack.html
// http://facebook.github.io/jest/docs/en/webpack.html
module.exports = {
process(src, filename) {
return `module.exports = ${JSON.stringify(path.basename(filename))};`;
const assetFilename = JSON.stringify(path.basename(filename));
if (filename.match(/\.svg$/)) {
// Based on how SVGR generates a component name:
// https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6
const pascalCaseFileName = camelcase(path.parse(filename).name, {
pascalCase: true,
});
const componentName = `Svg${pascalCaseFileName}`;
return `const React = require('react');
module.exports = {
__esModule: true,
default: ${assetFilename},
ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
return {
$$typeof: Symbol.for('react.element'),
type: 'svg',
ref: ref,
key: null,
props: Object.assign({}, props, {
children: ${assetFilename}
})
};
}),
};`;
}
return `module.exports = ${assetFilename};`;
},
};
+88
View File
@@ -0,0 +1,88 @@
'use strict';
const fs = require('fs');
const path = require('path');
const paths = require('./paths');
const chalk = require('react-dev-utils/chalk');
const resolve = require('resolve');
/**
* Get the baseUrl of a compilerOptions object.
*
* @param {Object} options
*/
function getAdditionalModulePaths(options = {}) {
const baseUrl = options.baseUrl;
// We need to explicitly check for null and undefined (and not a falsy value) because
// TypeScript treats an empty string as `.`.
if (baseUrl == null) {
// If there's no baseUrl set we respect NODE_PATH
// Note that NODE_PATH is deprecated and will be removed
// in the next major release of create-react-app.
const nodePath = process.env.NODE_PATH || '';
return nodePath.split(path.delimiter).filter(Boolean);
}
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
// We don't need to do anything if `baseUrl` is set to `node_modules`. This is
// the default behavior.
if (path.relative(paths.appNodeModules, baseUrlResolved) === '') {
return null;
}
// Allow the user set the `baseUrl` to `appSrc`.
if (path.relative(paths.appSrc, baseUrlResolved) === '') {
return [paths.appSrc];
}
// Otherwise, throw an error.
throw new Error(
chalk.red.bold(
"Your project's `baseUrl` can only be set to `src` or `node_modules`." +
' Create React App does not support other values at this time.'
)
);
}
function getModules() {
// Check if TypeScript is setup
const hasTsConfig = fs.existsSync(paths.appTsConfig);
const hasJsConfig = fs.existsSync(paths.appJsConfig);
if (hasTsConfig && hasJsConfig) {
throw new Error(
'You have both a tsconfig.json and a jsconfig.json. If you are using TypeScript please remove your jsconfig.json file.'
);
}
let config;
// If there's a tsconfig.json we assume it's a
// TypeScript project and set up the config
// based on tsconfig.json
if (hasTsConfig) {
const ts = require(resolve.sync('typescript', {
basedir: paths.appNodeModules,
}));
config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config;
// Otherwise we'll check if there is jsconfig.json
// for non TS projects.
} else if (hasJsConfig) {
config = require(paths.appJsConfig);
}
config = config || {};
const options = config.compilerOptions || {};
const additionalModulePaths = getAdditionalModulePaths(options);
return {
additionalModulePaths: additionalModulePaths,
hasTsConfig,
};
}
module.exports = getModules();
+49 -18
View File
@@ -5,20 +5,20 @@ const fs = require('fs');
const url = require('url');
// Make sure any symlinks in the project folder are resolved:
// https://github.com/facebookincubator/create-react-app/issues/637
// https://github.com/facebook/create-react-app/issues/637
const appDirectory = fs.realpathSync(process.cwd());
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
const envPublicUrl = process.env.PUBLIC_URL;
function ensureSlash(path, needsSlash) {
const hasSlash = path.endsWith('/');
function ensureSlash(inputPath, needsSlash) {
const hasSlash = inputPath.endsWith('/');
if (hasSlash && !needsSlash) {
return path.substr(path, path.length - 1);
return inputPath.substr(0, inputPath.length - 1);
} else if (!hasSlash && needsSlash) {
return `${path}/`;
return `${inputPath}/`;
} else {
return path;
return inputPath;
}
}
@@ -38,27 +38,58 @@ function getServedPath(appPackageJson) {
return ensureSlash(servedUrl, true);
}
const moduleFileExtensions = [
'web.mjs',
'mjs',
'web.js',
'js',
'web.ts',
'ts',
'web.tsx',
'tsx',
'json',
'web.jsx',
'jsx',
];
// Resolve file paths in the same order as webpack
const resolveModule = (resolveFn, filePath) => {
const extension = moduleFileExtensions.find(extension =>
fs.existsSync(resolveFn(`${filePath}.${extension}`))
);
if (extension) {
return resolveFn(`${filePath}.${extension}`);
}
return resolveFn(`${filePath}.js`);
};
// config after eject: we're in ./config/
module.exports = {
dotenv: resolveApp('.env'),
appPath: resolveApp('.'),
appBuild: resolveApp('build'),
appDemoBuild: resolveApp('demo'),
appDemo: resolveApp('demo'),
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveApp('src/demo/index.js'), // CRL: Updated for demo purposes
appIndexJs: resolveModule(resolveApp, 'src/demo/index'),
appLibIndexJs: resolveModule(resolveApp, 'src/lib/index'),
appDemoIndexJs: resolveModule(resolveApp, 'src/demo/index'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
appSrcLib: resolveApp('src/lib'),
appSrcLibTypes: resolveApp('src/lib/@types'),
appSrcDemo: resolveApp('src/demo'),
appTsConfig: resolveApp('tsconfig.json'),
appJsConfig: resolveApp('jsconfig.json'),
yarnLockFile: resolveApp('yarn.lock'),
testsSetup: resolveApp('src/setupTests.js'),
testsSetup: resolveModule(resolveApp, 'src/setupTests'),
proxySetup: resolveApp('src/setupProxy.js'),
appNodeModules: resolveApp('node_modules'),
publicUrl: getPublicUrl(resolveApp('package.json')),
servedPath: getServedPath(resolveApp('package.json')),
// CRL: New paths for demo build
appDemoIndexJs: resolveApp('src/demo/index.js'),
appDemoSrc: resolveApp('src/demo'),
// CRL: New paths for library
appLibIndexJs: resolveApp('src/lib/index.js'),
appLibSrc: resolveApp('src/lib'),
//servedPath: getServedPath(resolveApp('package.json')),
servedPath: ''
};
module.exports.moduleFileExtensions = moduleFileExtensions;
+35
View File
@@ -0,0 +1,35 @@
'use strict';
const { resolveModuleName } = require('ts-pnp');
exports.resolveModuleName = (
typescript,
moduleName,
containingFile,
compilerOptions,
resolutionHost
) => {
return resolveModuleName(
moduleName,
containingFile,
compilerOptions,
resolutionHost,
typescript.resolveModuleName
);
};
exports.resolveTypeReferenceDirective = (
typescript,
moduleName,
containingFile,
compilerOptions,
resolutionHost
) => {
return resolveModuleName(
moduleName,
containingFile,
compilerOptions,
resolutionHost,
typescript.resolveTypeReferenceDirective
);
};
-22
View File
@@ -1,22 +0,0 @@
'use strict';
if (typeof Promise === 'undefined') {
// Rejection tracking prevents a common issue where React gets into an
// inconsistent state due to an error, but it gets swallowed by a Promise,
// and the user has no idea what causes React's erratic future behavior.
require('promise/lib/rejection-tracking').enable();
window.Promise = require('promise/lib/es6-extensions.js');
}
// fetch() polyfill for making API calls.
require('whatwg-fetch');
// Object.assign() is commonly used with React.
// It will use the native implementation if it's present and isn't buggy.
Object.assign = require('object-assign');
// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.
// We don't polyfill it in the browser--this is user's responsibility.
if (process.env.NODE_ENV === 'test') {
require('raf').polyfill(global);
}
+628 -258
View File
@@ -1,279 +1,649 @@
'use strict';
const autoprefixer = require('autoprefixer');
const fs = require('fs');
const isWsl = require('is-wsl');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
const TerserPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const safePostCssParser = require('postcss-safe-parser');
const ManifestPlugin = require('webpack-manifest-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
const paths = require('./paths');
const modules = require('./modules');
const getClientEnvironment = require('./env');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
const getPackageJson = require('./getPackageJson');
const eslint = require('eslint');
const postcssNormalize = require('postcss-normalize');
const appPackageJson = require(paths.appPackageJson);
// Webpack uses `publicPath` to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.
const publicPath = paths.servedPath;
// Some apps do not use client-side routing with pushState.
// For these, "homepage" can be set to "." to enable relative asset paths.
const shouldUseRelativeAssetPaths = publicPath === './';
// Source maps are resource heavy and can cause out of memory issue for large source files.
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
// `publicUrl` is just like `publicPath`, but we will provide it to our app
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
const publicUrl = '.';
// Get environment variables to inject into our app.
const env = getClientEnvironment(publicUrl);
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
// makes for a smoother build process.
const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false';
// Assert this just to be safe.
// Development builds of React are slow and not intended for production.
if (env.stringified['process.env'].NODE_ENV !== '"production"') {
throw new Error('Production builds must have NODE_ENV=production.');
}
const imageInlineSizeLimit = parseInt(
process.env.IMAGE_INLINE_SIZE_LIMIT || '10000'
);
// Note: defined here because it will be used more than once.
const cssFilename = 'css/index.css';
// Check if TypeScript is setup
const useTypeScript = fs.existsSync(paths.appTsConfig);
// ExtractTextPlugin expects the build output to be flat.
// (See https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/27)
// However, our output is structured with css, js and media folders.
// To have this structure working with relative paths, we have to use custom options.
const extractTextPluginOptions = shouldUseRelativeAssetPaths
? // Making sure that the publicPath goes back to to build folder.
{ publicPath: Array(cssFilename.split('/').length).join('../') }
: {};
// style files regexes
const cssRegex = /\.css$/;
const cssModuleRegex = /\.module\.css$/;
const sassRegex = /\.(scss|sass)$/;
const sassModuleRegex = /\.module\.(scss|sass)$/;
// This is the production configuration.
// It compiles slowly and is focused on producing a fast and minimal bundle.
// The development configuration is different and lives in a separate file.
module.exports = {
// Don't attempt to continue if there are any errors.
bail: true,
// We generate sourcemaps in production. This is slow but gives good results.
// You can exclude the *.map files from the build during deployment.
devtool: shouldUseSourceMap ? 'source-map' : false,
// In production, we only want to load the app code.
entry: [paths.appDemoIndexJs], // CRL: library index file instead of app index
output: {
// CRL: Updated whole block with library specific info
path: paths.appDemoBuild,
filename: 'index.js',
libraryTarget: 'umd'
},
resolve: {
// This allows you to set a fallback for where Webpack should look for modules.
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
// It is guaranteed to exist because we tweak it in `env.js`
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
),
// These are the reasonable defaults supported by the Node ecosystem.
// We also include JSX as a common component filename extension to support
// some tools, although we do not recommend using it, see:
// https://github.com/facebookincubator/create-react-app/issues/290
// `web` extension prefixes have been added for better support
// for React Native Web.
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web'
// This is the production and development configuration.
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
module.exports = function(webpackEnv) {
const isEnvDevelopment = webpackEnv === 'development';
const isEnvProduction = webpackEnv === 'production';
// Webpack uses `publicPath` to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.
// In development, we always serve from the root. This makes config easier.
const publicPath = paths.servedPath
// Some apps do not use client-side routing with pushState.
// For these, "homepage" can be set to "." to enable relative asset paths.
const shouldUseRelativeAssetPaths = publicPath === './';
// `publicUrl` is just like `publicPath`, but we will provide it to our app
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
const publicUrl = publicPath.slice(0, -1);
// Get environment variables to inject into our app.
const env = getClientEnvironment(publicUrl);
// common function to get style loaders
const getStyleLoaders = (cssOptions, preProcessor) => {
const loaders = [
isEnvDevelopment && require.resolve('style-loader'),
isEnvProduction && {
loader: MiniCssExtractPlugin.loader,
options: shouldUseRelativeAssetPaths ? { publicPath: '../../' } : {},
},
{
loader: require.resolve('css-loader'),
options: cssOptions,
},
{
// Options for PostCSS as we reference these options twice
// Adds vendor prefixing based on your specified browser support in
// package.json
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebook/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
require('postcss-preset-env')({
autoprefixer: {
flexbox: 'no-2009',
},
stage: 3,
}),
// Adds PostCSS Normalize as the reset css with default options,
// so that it honors browserslist config in package.json
// which in turn let's users customize the target behavior as per their needs.
postcssNormalize(),
],
sourceMap: isEnvProduction && shouldUseSourceMap,
},
},
].filter(Boolean);
if (preProcessor) {
loaders.push(
{
loader: require.resolve('resolve-url-loader'),
options: {
sourceMap: isEnvProduction && shouldUseSourceMap,
},
},
{
loader: require.resolve(preProcessor),
options: {
sourceMap: true,
},
}
);
}
return loaders;
};
return {
mode: 'production',
// Stop compilation early in production
bail: isEnvProduction,
devtool: isEnvProduction
? shouldUseSourceMap
? 'source-map'
: false
: isEnvDevelopment && 'cheap-module-source-map',
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
entry: isEnvProduction ? [paths.appDemoIndexJs] : [
// Include an alternative client for WebpackDevServer. A client's job is to
// connect to WebpackDevServer by a socket and get notified about changes.
// When you save a file, the client will either apply hot updates (in case
// of CSS changes), or refresh the page (in case of JS changes). When you
// make a syntax error, this client will display a syntax error overlay.
// Note: instead of the default WebpackDevServer client, we use a custom one
// to bring better experience for Create React App users. You can replace
// the line below with these two lines if you prefer the stock client:
// require.resolve('webpack-dev-server/client') + '?/',
// require.resolve('webpack/hot/dev-server'),
isEnvDevelopment &&
require.resolve('react-dev-utils/webpackHotDevClient'),
// Finally, this is your app's code:
paths.appDemoIndexJs,
// We include the app code last so that if there is a runtime error during
// initialization, it doesn't blow up the WebpackDevServer client, and
// changing JS code would still trigger a refresh.
].filter(Boolean),
output: {
// The build folder.
path: isEnvProduction ? paths.appDemo : undefined,
// Add /* filename */ comments to generated require()s in the output.
pathinfo: isEnvDevelopment,
// There will be one main bundle, and one file per asynchronous chunk.
// In development, it does not produce real files.
filename: 'index.js',
// TODO: remove this when upgrading to webpack 5
futureEmitAssets: true,
// There are also additional JS chunk files if you use code splitting.
chunkFilename: 'static/js/[name].[contenthash:8].chunk.js',
// We inferred the "public path" (such as / or /my-project) from homepage.
// We use "/" in development.
publicPath: publicPath,
// Point sourcemap entries to original disk location (format as URL on Windows)
devtoolModuleFilenameTemplate: isEnvProduction
? info =>
path
.relative(paths.appSrcDemo, info.absoluteResourcePath)
.replace(/\\/g, '/')
: isEnvDevelopment &&
(info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')),
// Prevents conflicts when multiple Webpack runtimes (from different apps)
// are used on the same page.
jsonpFunction: `webpackJsonp${appPackageJson.name}`,
},
optimization: {
minimize: isEnvProduction,
minimizer: [
// This is only used in production mode
new TerserPlugin({
terserOptions: {
parse: {
// We want terser to parse ecma 8 code. However, we don't want it
// to apply any minification steps that turns valid ecma 5 code
// into invalid ecma 5 code. This is why the 'compress' and 'output'
// sections only apply transformations that are ecma 5 safe
// https://github.com/facebook/create-react-app/pull/4234
ecma: 8,
},
compress: {
ecma: 5,
warnings: false,
// Disabled because of an issue with Uglify breaking seemingly valid code:
// https://github.com/facebook/create-react-app/issues/2376
// Pending further investigation:
// https://github.com/mishoo/UglifyJS2/issues/2011
comparisons: false,
// Disabled because of an issue with Terser breaking valid code:
// https://github.com/facebook/create-react-app/issues/5250
// Pending further investigation:
// https://github.com/terser-js/terser/issues/120
inline: 2,
},
mangle: {
safari10: true,
keep_classnames: true,
keep_fnames: true,
module: true
},
output: {
ecma: 5,
comments: false,
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebook/create-react-app/issues/2488
ascii_only: true,
},
},
// Use multi-process parallel running to improve the build speed
// Default number of concurrent runs: os.cpus().length - 1
// Disabled on WSL (Windows Subsystem for Linux) due to an issue with Terser
// https://github.com/webpack-contrib/terser-webpack-plugin/issues/21
parallel: !isWsl,
// Enable file caching
cache: true,
sourceMap: shouldUseSourceMap,
}),
new OptimizeCSSAssetsPlugin({
cssProcessorOptions: {
parser: safePostCssParser,
map: shouldUseSourceMap
? {
// `inline: false` forces the sourcemap to be output into a
// separate file
inline: false,
// `annotation: true` appends the sourceMappingURL to the end of
// the css file, helping the browser find the sourcemap
annotation: true,
}
: false,
},
}),
],
// Automatically split vendor and commons
// https://twitter.com/wSokra/status/969633336732905474
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
splitChunks: {
/*chunks: 'all',
name: false,*/
cacheGroups: {
default: false,
}
},
// Keep the runtime chunk separated to enable long term caching
// https://twitter.com/wSokra/status/969679223278505985
runtimeChunk: false,
},
resolve: {
// This allows you to set a fallback for where Webpack should look for modules.
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebook/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
modules.additionalModulePaths || []
),
// These are the reasonable defaults supported by the Node ecosystem.
// We also include JSX as a common component filename extension to support
// some tools, although we do not recommend using it, see:
// https://github.com/facebook/create-react-app/issues/290
// `web` extension prefixes have been added for better support
// for React Native Web.
extensions: paths.moduleFileExtensions
.map(ext => `.${ext}`)
.filter(ext => useTypeScript || !ext.includes('ts')),
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
},
plugins: [
// Adds support for installing with Plug'n'Play, leading to faster installs and adding
// guards against forgotten dependencies and such.
PnpWebpackPlugin,
// Prevents users from importing files from outside of src/ (or node_modules/).
// This often causes confusion because we only process files within src/ with babel.
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
// please link the files into your node_modules/ and let module-resolution kick in.
// Make sure your source files are compiled, as they will not be processed in any way.
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
],
},
resolveLoader: {
plugins: [
// Also related to Plug'n'Play, but this time it tells Webpack to load its loaders
// from the current package.
PnpWebpackPlugin.moduleLoader(module),
],
},
module: {
strictExportPresence: true,
rules: [
// Disable require.ensure as it's not a standard language feature.
{ parser: { requireEnsure: false } },
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|mjs|jsx|ts|tsx)$/,
enforce: 'pre',
use: [
{
options: {
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
resolvePluginsRelativeTo: __dirname,
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrcDemo,
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
// back to the "file" loader at the end of the loader list.
oneOf: [
// "url" loader works like "file" loader except that it embeds assets
// smaller than specified limit in bytes as data URLs to avoid requests.
// A missing `test` is equivalent to a match.
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
loader: require.resolve('url-loader'),
options: {
limit: imageInlineSizeLimit,
name: 'static/media/[name].[hash:8].[ext]',
},
},
// Process application JS with Babel.
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
{
test: /\.(js|mjs|jsx|ts|tsx)$/,
include: paths.appSrcDemo,
loader: require.resolve('babel-loader'),
options: {
customize: require.resolve(
'babel-preset-react-app/webpack-overrides'
),
plugins: [
[
require.resolve('babel-plugin-named-asset-import'),
{
loaderMap: {
svg: {
ReactComponent: '@svgr/webpack?-prettier,-svgo,+ref![path]',
},
},
},
],
],
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
cacheDirectory: true,
cacheCompression: isEnvProduction,
compact: isEnvProduction,
},
},
// Process any JS outside of the app with Babel.
// Unlike the application JS, we only compile the standard ES features.
{
test: /\.(js|mjs)$/,
exclude: /@babel(?:\/|\\{1,2})runtime/,
loader: require.resolve('babel-loader'),
options: {
babelrc: false,
configFile: false,
compact: false,
presets: [
[
require.resolve('babel-preset-react-app/dependencies'),
{ helpers: true },
],
],
plugins: [
[
"@babel/plugin-proposal-class-properties"
]
],
cacheDirectory: true,
cacheCompression: isEnvProduction,
// If an error happens in a package, it's possible to be
// because it was compiled. Thus, we don't want the browser
// debugger to show the original code. Instead, the code
// being evaluated would be much more helpful.
sourceMaps: false,
},
},
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader turns CSS into JS modules that inject <style> tags.
// In production, we use MiniCSSExtractPlugin to extract that CSS
// to a file, but in development "style" loader enables hot editing
// of CSS.
// By default we support CSS Modules with the extension .module.css
{
test: cssRegex,
exclude: cssModuleRegex,
use: getStyleLoaders({
importLoaders: 1,
sourceMap: isEnvProduction && shouldUseSourceMap,
}),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true,
},
// Adds support for CSS Modules (https://github.com/css-modules/css-modules)
// using the extension .module.css
{
test: cssModuleRegex,
use: getStyleLoaders({
importLoaders: 1,
sourceMap: isEnvProduction && shouldUseSourceMap,
modules: true,
getLocalIdent: getCSSModuleLocalIdent,
}),
},
// Opt-in support for SASS (using .scss or .sass extensions).
// By default we support SASS Modules with the
// extensions .module.scss or .module.sass
{
test: sassRegex,
exclude: sassModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap,
},
'sass-loader'
),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true,
},
// Adds support for CSS Modules, but using SASS
// using the extension .module.scss or .module.sass
{
test: sassModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap,
modules: true,
getLocalIdent: getCSSModuleLocalIdent,
},
'sass-loader'
),
},
// "file" loader makes sure those assets get served by WebpackDevServer.
// When you `import` an asset, you get its (virtual) filename.
// In production, they would get copied to the `build` folder.
// This loader doesn't use a "test" so it will catch all modules
// that fall through the other loaders.
{
loader: require.resolve('file-loader'),
// Exclude `js` files to keep "css" loader working as it injects
// its runtime that would otherwise be processed through "file" loader.
// Also exclude `html` and `json` extensions so they get processed
// by webpacks internal loaders.
exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
options: {
name: 'static/media/[name].[hash:8].[ext]',
},
},
// ** STOP ** Are you adding a new loader?
// Make sure to add the new loader(s) before the "file" loader.
],
},
],
},
plugins: [
// Prevents users from importing files from outside of src/ (or node_modules/).
// This often causes confusion because we only process files within src/ with babel.
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
// please link the files into your node_modules/ and let module-resolution kick in.
// Make sure your source files are compiled, as they will not be processed in any way.
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson])
]
},
module: {
strictExportPresence: true,
rules: [
// TODO: Disable require.ensure as it's not a standard language feature.
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
// { parser: { requireEnsure: false } },
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
use: [
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin(
Object.assign(
{},
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint')
},
loader: require.resolve('eslint-loader')
}
],
include: paths.appDemoSrc // CRL: updated with library src folder
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
// back to the "file" loader at the end of the loader list.
oneOf: [
// "url" loader works just like "file" loader but it also embeds
// assets smaller than specified size as data URLs to avoid requests.
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
loader: require.resolve('url-loader'),
options: {
limit: 10000,
name: 'media/[name].[ext]'
}
inject: true,
template: paths.appHtml
},
// Process JS with Babel.
{
test: /\.(js|jsx|mjs)$/,
include: [paths.appLibSrc, paths.appDemoSrc], // CRL: updated with library src folder
loader: require.resolve('babel-loader'),
options: {
compact: true
}
},
// The notation here is somewhat confusing.
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader normally turns CSS into JS modules injecting <style>,
// but unlike in development configuration, we do something different.
// `ExtractTextPlugin` first applies the "postcss" and "css" loaders
// (second argument), then grabs the result CSS and puts it into a
// separate file in our build process. This way we actually ship
// a single CSS file in production instead of JS code injecting <style>
// tags. If you use code splitting, however, any async bundles will still
// use the "style" loader inside the async code so CSS from them won't be
// in the main CSS file.
{
test: /\.css$/,
loader: ExtractTextPlugin.extract(
Object.assign(
{
fallback: {
loader: require.resolve('style-loader'),
options: {
hmr: false
}
},
use: [
{
loader: require.resolve('css-loader'),
options: {
importLoaders: 1,
minimize: true,
sourceMap: shouldUseSourceMap
}
},
{
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebookincubator/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9' // React doesn't support IE8 anyway
],
flexbox: 'no-2009'
})
]
}
}
]
isEnvProduction
? {
minify: {
removeComments: true,
collapseWhitespace: true,
removeRedundantAttributes: true,
useShortDoctype: true,
removeEmptyAttributes: true,
removeStyleLinkTypeAttributes: true,
keepClosingSlash: true,
minifyJS: true,
minifyCSS: true,
minifyURLs: true,
},
extractTextPluginOptions
)
)
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
},
// "file" loader makes sure assets end up in the `build` folder.
// When you `import` an asset, you get its filename.
// This loader doesn't use a "test" so it will catch all modules
// that fall through the other loaders.
{
loader: require.resolve('file-loader'),
// Exclude `js` files to keep "css" loader working as it injects
// it's runtime that would otherwise processed through "file" loader.
// Also exclude `html` and `json` extensions so they get processed
// by webpacks internal loaders.
exclude: [/\.js$/, /\.html$/, /\.json$/],
options: {
name: 'media/[name].[ext]'
}
}
// ** STOP ** Are you adding a new loader?
// Make sure to add the new loader(s) before the "file" loader.
]
}
]
},
plugins: [
// Makes some environment variables available to the JS code, for example:
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
// It is absolutely essential that NODE_ENV was set to production here.
// Otherwise React will be compiled in the very slow development mode.
new InterpolateHtmlPlugin(env.raw),
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin({
inject: true,
template: paths.appHtml
}),
// Add module names to factory functions so they appear in browser profiler.
new webpack.NamedModulesPlugin(),
new webpack.DefinePlugin(env.stringified),
// Minify the code.
new webpack.optimize.UglifyJsPlugin({
compress: false,
mangle: {
safari10: true
},
output: {
comments: false,
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebookincubator/create-react-app/issues/2488
ascii_only: true
},
sourceMap: shouldUseSourceMap
}),
// Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
new ExtractTextPlugin({
filename: cssFilename
}),
// Moment.js is an extremely popular library that bundles large locale files
// by default due to how Webpack interprets its code. This is a practical
// solution that requires the user to opt into importing specific locales.
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new CopyWebpackPlugin([
{ from: `${paths.appPublic}/favicon.ico`, to: paths.appDemoBuild },
{ from: `${paths.appPublic}/manifest.json`, to: paths.appDemoBuild }
])
],
// CRL: added externals block for library
// externals: {
// 'react': 'react',
// 'react-dom': 'react-dom'
// },
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}
: undefined
)
),
// Inlines the webpack runtime script. This script is too small to warrant
// a network request.
isEnvProduction &&
shouldInlineRuntimeChunk &&
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
// In production, it will be an empty string unless you specify "homepage"
// in `package.json`, in which case it will be the pathname of that URL.
// In development, this will be an empty string.
new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
// This gives some necessary context to module not found errors, such as
// the requesting resource.
new ModuleNotFoundPlugin(paths.appPath),
// Makes some environment variables available to the JS code, for example:
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
// It is absolutely essential that NODE_ENV is set to production
// during a production build.
// Otherwise React will be compiled in the very slow development mode.
new webpack.DefinePlugin(env.stringified),
// This is necessary to emit hot updates (currently CSS only):
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
// Watcher doesn't work well if you mistype casing in a path so we use
// a plugin that prints an error when you attempt to do this.
// See https://github.com/facebook/create-react-app/issues/240
isEnvDevelopment && new CaseSensitivePathsPlugin(),
// If you require a missing module and then `npm install` it, you still have
// to restart the development server for Webpack to discover it. This plugin
// makes the discovery automatic so you don't have to restart.
// See https://github.com/facebook/create-react-app/issues/186
isEnvDevelopment &&
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
isEnvProduction &&
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: 'index.css',
chunkFilename: 'index.[contenthash:8].chunk.css',
}),
// Generate a manifest file which contains a mapping of all asset filenames
// to their corresponding output file so that tools can pick it up without
// having to parse `index.html`.
/*new ManifestPlugin({
fileName: 'asset-manifest.json',
publicPath: publicPath,
generate: (seed, files) => {
const manifestFiles = files.reduce(function(manifest, file) {
manifest[file.name] = file.path;
return manifest;
}, seed);
return {
files: manifestFiles,
};
},
}),*/
// Moment.js is an extremely popular library that bundles large locale files
// by default due to how Webpack interprets its code. This is a practical
// solution that requires the user to opt into importing specific locales.
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
// Generate a service worker script that will precache, and keep up to date,
// the HTML & assets that are part of the Webpack build.
/*isEnvProduction &&
new WorkboxWebpackPlugin.GenerateSW({
clientsClaim: true,
exclude: [/\.map$/, /asset-manifest\.json$/],
importWorkboxFrom: 'cdn',
navigateFallback: publicUrl + '/index.html',
navigateFallbackBlacklist: [
// Exclude URLs starting with /_, as they're likely an API call
new RegExp('^/_'),
// Exclude URLs containing a dot, as they're likely a resource in
// public/ and not a SPA route
new RegExp('/[^/]+\\.[^/]+$'),
],
}),*/
// TypeScript type checking
useTypeScript &&
new ForkTsCheckerWebpackPlugin({
typescript: resolve.sync('typescript', {
basedir: paths.appNodeModules,
}),
useTypescriptIncrementalApi: true,
checkSyntacticErrors: true,
resolveModuleNameModule: process.versions.pnp
? `${__dirname}/pnpTs.js`
: undefined,
resolveTypeReferenceDirectiveModule: process.versions.pnp
? `${__dirname}/pnpTs.js`
: undefined,
tsconfig: paths.appTsConfig,
reportFiles: [
'**',
'!**/__tests__/**',
'!**/?(*.)(spec|test).*',
'!**/src/setupProxy.*',
'!**/src/setupTests.*',
],
watch: paths.appSrcDemo,
silent: true,
// The formatter is invoked directly in WebpackDevServerUtils during development
formatter: isEnvProduction ? typescriptFormatter : undefined,
}),
].filter(Boolean),
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
module: 'empty',
dgram: 'empty',
dns: 'mock',
fs: 'empty',
http2: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty',
},
// Turn off performance processing because we utilize
// our own hints via the FileSizeReporter
performance: false,
};
};
-259
View File
@@ -1,259 +0,0 @@
'use strict';
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getClientEnvironment = require('./env');
const paths = require('./paths');
// Webpack uses `publicPath` to determine where the app is being served from.
// In development, we always serve from the root. This makes config easier.
const publicPath = '/';
// `publicUrl` is just like `publicPath`, but we will provide it to our app
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
const publicUrl = '';
// Get environment variables to inject into our app.
const env = getClientEnvironment(publicUrl);
// This is the development configuration.
// It is focused on developer experience and fast rebuilds.
// The production configuration is different and lives in a separate file.
module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.
devtool: 'cheap-module-source-map',
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.
entry: [
// Include an alternative client for WebpackDevServer. A client's job is to
// connect to WebpackDevServer by a socket and get notified about changes.
// When you save a file, the client will either apply hot updates (in case
// of CSS changes), or refresh the page (in case of JS changes). When you
// make a syntax error, this client will display a syntax error overlay.
// Note: instead of the default WebpackDevServer client, we use a custom one
// to bring better experience for Create React App users. You can replace
// the line below with these two lines if you prefer the stock client:
// require.resolve('webpack-dev-server/client') + '?/',
// require.resolve('webpack/hot/dev-server'),
require.resolve('react-dev-utils/webpackHotDevClient'),
// Finally, this is your app's code:
paths.appIndexJs,
// We include the app code last so that if there is a runtime error during
// initialization, it doesn't blow up the WebpackDevServer client, and
// changing JS code would still trigger a refresh.
],
output: {
// Add /* filename */ comments to generated require()s in the output.
pathinfo: true,
// This does not produce a real file. It's just the virtual path that is
// served by WebpackDevServer in development. This is the JS bundle
// containing code from all our entry points, and the Webpack runtime.
filename: 'static/js/bundle.js',
// There are also additional JS chunk files if you use code splitting.
chunkFilename: 'static/js/[name].chunk.js',
// This is the URL that app is served from. We use "/" in development.
publicPath: publicPath,
// Point sourcemap entries to original disk location (format as URL on Windows)
devtoolModuleFilenameTemplate: info =>
path.resolve(info.absoluteResourcePath).replace(/\\/g, '/'),
},
resolve: {
// This allows you to set a fallback for where Webpack should look for modules.
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
// It is guaranteed to exist because we tweak it in `env.js`
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
),
// These are the reasonable defaults supported by the Node ecosystem.
// We also include JSX as a common component filename extension to support
// some tools, although we do not recommend using it, see:
// https://github.com/facebookincubator/create-react-app/issues/290
// `web` extension prefixes have been added for better support
// for React Native Web.
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
},
plugins: [
// Prevents users from importing files from outside of src/ (or node_modules/).
// This often causes confusion because we only process files within src/ with babel.
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
// please link the files into your node_modules/ and let module-resolution kick in.
// Make sure your source files are compiled, as they will not be processed in any way.
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
],
},
module: {
strictExportPresence: true,
rules: [
// TODO: Disable require.ensure as it's not a standard language feature.
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
// { parser: { requireEnsure: false } },
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint'),
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrc,
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
// back to the "file" loader at the end of the loader list.
oneOf: [
// "url" loader works like "file" loader except that it embeds assets
// smaller than specified limit in bytes as data URLs to avoid requests.
// A missing `test` is equivalent to a match.
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
loader: require.resolve('url-loader'),
options: {
limit: 10000,
name: 'static/media/[name].[hash:8].[ext]',
},
},
// Process JS with Babel.
{
test: /\.(js|jsx|mjs)$/,
include: paths.appSrc,
loader: require.resolve('babel-loader'),
options: {
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
cacheDirectory: true,
},
},
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader turns CSS into JS modules that inject <style> tags.
// In production, we use a plugin to extract that CSS to a file, but
// in development "style" loader enables hot editing of CSS.
{
test: /\.css$/,
use: [
require.resolve('style-loader'),
{
loader: require.resolve('css-loader'),
options: {
importLoaders: 1,
},
},
{
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebookincubator/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9', // React doesn't support IE8 anyway
],
flexbox: 'no-2009',
}),
],
},
},
],
},
// "file" loader makes sure those assets get served by WebpackDevServer.
// When you `import` an asset, you get its (virtual) filename.
// In production, they would get copied to the `build` folder.
// This loader doesn't use a "test" so it will catch all modules
// that fall through the other loaders.
{
// Exclude `js` files to keep "css" loader working as it injects
// it's runtime that would otherwise processed through "file" loader.
// Also exclude `html` and `json` extensions so they get processed
// by webpacks internal loaders.
exclude: [/\.js$/, /\.html$/, /\.json$/],
loader: require.resolve('file-loader'),
options: {
name: 'static/media/[name].[hash:8].[ext]',
},
},
],
},
// ** STOP ** Are you adding a new loader?
// Make sure to add the new loader(s) before the "file" loader.
],
},
plugins: [
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
// In development, this will be an empty string.
new InterpolateHtmlPlugin(env.raw),
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin({
inject: true,
template: paths.appHtml,
}),
// Add module names to factory functions so they appear in browser profiler.
new webpack.NamedModulesPlugin(),
// Makes some environment variables available to the JS code, for example:
// if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`.
new webpack.DefinePlugin(env.stringified),
// This is necessary to emit hot updates (currently CSS only):
new webpack.HotModuleReplacementPlugin(),
// Watcher doesn't work well if you mistype casing in a path so we use
// a plugin that prints an error when you attempt to do this.
// See https://github.com/facebookincubator/create-react-app/issues/240
new CaseSensitivePathsPlugin(),
// If you require a missing module and then `npm install` it, you still have
// to restart the development server for Webpack to discover it. This plugin
// makes the discovery automatic so you don't have to restart.
// See https://github.com/facebookincubator/create-react-app/issues/186
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
// Moment.js is an extremely popular library that bundles large locale files
// by default due to how Webpack interprets its code. This is a practical
// solution that requires the user to opt into importing specific locales.
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
],
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty',
},
// Turn off performance hints during development because we don't do any
// splitting or minification in interest of speed. These warnings become
// cumbersome.
performance: {
hints: false,
},
};
+692
View File
@@ -0,0 +1,692 @@
'use strict';
const fs = require('fs');
const isWsl = require('is-wsl');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
const TerserPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const safePostCssParser = require('postcss-safe-parser');
const ManifestPlugin = require('webpack-manifest-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
const paths = require('./paths');
const modules = require('./modules');
const getClientEnvironment = require('./env');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const getPackageJson = require('./getPackageJson');
const PrettierPlugin = require("prettier-webpack-plugin");
const eslint = require('eslint');
const postcssNormalize = require('postcss-normalize');
const appPackageJson = require(paths.appPackageJson);
// Source maps are resource heavy and can cause out of memory issue for large source files.
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
// makes for a smoother build process.
const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false';
const imageInlineSizeLimit = parseInt(
process.env.IMAGE_INLINE_SIZE_LIMIT || '10000'
);
// Check if TypeScript is setup
const useTypeScript = fs.existsSync(paths.appTsConfig);
// style files regexes
const cssRegex = /\.css$/;
const cssModuleRegex = /\.module\.css$/;
const sassRegex = /\.(scss|sass)$/;
const sassModuleRegex = /\.module\.(scss|sass)$/;
const {
version,
name,
license,
repository,
author,
} = getPackageJson('version', 'name', 'license', 'repository', 'author');
const banner = `
${name} v${version}
${repository.url}
Copyright (c) ${author.replace(/ *\<[^)]*\> */g, " ")}
This source code is licensed under the ${license} license found in the
LICENSE file in the root directory of this source tree.
`;
// This is the production and development configuration.
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
module.exports = function(webpackEnv) {
const isEnvDevelopment = webpackEnv === 'development';
const isEnvProduction = webpackEnv === 'production';
// Webpack uses `publicPath` to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.
// In development, we always serve from the root. This makes config easier.
const publicPath = isEnvProduction
? paths.servedPath
: isEnvDevelopment && '/';
// Some apps do not use client-side routing with pushState.
// For these, "homepage" can be set to "." to enable relative asset paths.
const shouldUseRelativeAssetPaths = publicPath === './';
// `publicUrl` is just like `publicPath`, but we will provide it to our app
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
const publicUrl = isEnvProduction
? publicPath.slice(0, -1)
: isEnvDevelopment && '';
// Get environment variables to inject into our app.
const env = getClientEnvironment(publicUrl);
// common function to get style loaders
const getStyleLoaders = (cssOptions, preProcessor) => {
const loaders = [
isEnvDevelopment && require.resolve('style-loader'),
isEnvProduction && {
loader: MiniCssExtractPlugin.loader,
options: shouldUseRelativeAssetPaths ? { publicPath: '../../' } : {},
},
{
loader: require.resolve('css-loader'),
options: cssOptions,
},
{
// Options for PostCSS as we reference these options twice
// Adds vendor prefixing based on your specified browser support in
// package.json
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebook/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
require('postcss-preset-env')({
autoprefixer: {
flexbox: 'no-2009',
},
stage: 3,
}),
// Adds PostCSS Normalize as the reset css with default options,
// so that it honors browserslist config in package.json
// which in turn let's users customize the target behavior as per their needs.
postcssNormalize(),
],
sourceMap: isEnvProduction && shouldUseSourceMap,
},
},
].filter(Boolean);
if (preProcessor) {
loaders.push(
{
loader: require.resolve('resolve-url-loader'),
options: {
sourceMap: isEnvProduction && shouldUseSourceMap,
},
},
{
loader: require.resolve(preProcessor),
options: {
sourceMap: true,
},
}
);
}
return loaders;
};
return {
mode: isEnvProduction ? 'production' : isEnvDevelopment && 'development',
// Stop compilation early in production
bail: isEnvProduction,
devtool: isEnvProduction
? shouldUseSourceMap
? 'source-map'
: false
: isEnvDevelopment && 'cheap-module-source-map',
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
entry: isEnvProduction ? [paths.appLibIndexJs] : [
// Include an alternative client for WebpackDevServer. A client's job is to
// connect to WebpackDevServer by a socket and get notified about changes.
// When you save a file, the client will either apply hot updates (in case
// of CSS changes), or refresh the page (in case of JS changes). When you
// make a syntax error, this client will display a syntax error overlay.
// Note: instead of the default WebpackDevServer client, we use a custom one
// to bring better experience for Create React App users. You can replace
// the line below with these two lines if you prefer the stock client:
// require.resolve('webpack-dev-server/client') + '?/',
// require.resolve('webpack/hot/dev-server'),
isEnvDevelopment &&
require.resolve('react-dev-utils/webpackHotDevClient'),
// Finally, this is your app's code:
paths.appIndexJs,
// We include the app code last so that if there is a runtime error during
// initialization, it doesn't blow up the WebpackDevServer client, and
// changing JS code would still trigger a refresh.
].filter(Boolean),
output: {
// The build folder.
path: isEnvProduction ? paths.appBuild : undefined,
// Add /* filename */ comments to generated require()s in the output.
pathinfo: isEnvDevelopment,
// There will be one main bundle, and one file per asynchronous chunk.
// In development, it does not produce real files.
filename: isEnvProduction
? 'index.js'
: isEnvDevelopment && 'static/js/bundle.js',
// TODO: remove this when upgrading to webpack 5
futureEmitAssets: true,
// There are also additional JS chunk files if you use code splitting.
chunkFilename: isEnvProduction
? 'static/js/[name].[contenthash:8].chunk.js'
: isEnvDevelopment && 'static/js/[name].chunk.js',
// We inferred the "public path" (such as / or /my-project) from homepage.
// We use "/" in development.
publicPath: publicPath,
library: "SimpleKeyboard",
libraryTarget: 'umd',
umdNamedDefine: true,
// Point sourcemap entries to original disk location (format as URL on Windows)
devtoolModuleFilenameTemplate: isEnvProduction
? info =>
path
.relative(paths.appSrcLib, info.absoluteResourcePath)
.replace(/\\/g, '/')
: isEnvDevelopment &&
(info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')),
// Prevents conflicts when multiple Webpack runtimes (from different apps)
// are used on the same page.
jsonpFunction: `webpackJsonp${appPackageJson.name}`,
},
optimization: {
minimize: isEnvProduction,
minimizer: [
// This is only used in production mode
new TerserPlugin({
terserOptions: {
parse: {
// We want terser to parse ecma 8 code. However, we don't want it
// to apply any minification steps that turns valid ecma 5 code
// into invalid ecma 5 code. This is why the 'compress' and 'output'
// sections only apply transformations that are ecma 5 safe
// https://github.com/facebook/create-react-app/pull/4234
ecma: 8,
},
compress: {
ecma: 5,
warnings: false,
// Disabled because of an issue with Uglify breaking seemingly valid code:
// https://github.com/facebook/create-react-app/issues/2376
// Pending further investigation:
// https://github.com/mishoo/UglifyJS2/issues/2011
comparisons: false,
// Disabled because of an issue with Terser breaking valid code:
// https://github.com/facebook/create-react-app/issues/5250
// Pending further investigation:
// https://github.com/terser-js/terser/issues/120
inline: 2,
},
mangle: {
safari10: true,
keep_classnames: true,
keep_fnames: true,
module: true
},
output: {
ecma: 5,
comments: false,
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebook/create-react-app/issues/2488
ascii_only: true,
},
},
// Use multi-process parallel running to improve the build speed
// Default number of concurrent runs: os.cpus().length - 1
// Disabled on WSL (Windows Subsystem for Linux) due to an issue with Terser
// https://github.com/webpack-contrib/terser-webpack-plugin/issues/21
parallel: !isWsl,
// Enable file caching
cache: true,
sourceMap: shouldUseSourceMap,
}),
new webpack.BannerPlugin({
banner: banner,
entryOnly: true
}),
new OptimizeCSSAssetsPlugin({
cssProcessorOptions: {
parser: safePostCssParser,
map: shouldUseSourceMap
? {
// `inline: false` forces the sourcemap to be output into a
// separate file
inline: false,
// `annotation: true` appends the sourceMappingURL to the end of
// the css file, helping the browser find the sourcemap
annotation: true,
}
: false,
},
}),
],
// Automatically split vendor and commons
// https://twitter.com/wSokra/status/969633336732905474
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
splitChunks: {
//chunks: 'all',
cacheGroups: {
default: false,
}
},
// Keep the runtime chunk separated to enable long term caching
// https://twitter.com/wSokra/status/969679223278505985
runtimeChunk: false,
},
resolve: {
// This allows you to set a fallback for where Webpack should look for modules.
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebook/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
modules.additionalModulePaths || []
),
// These are the reasonable defaults supported by the Node ecosystem.
// We also include JSX as a common component filename extension to support
// some tools, although we do not recommend using it, see:
// https://github.com/facebook/create-react-app/issues/290
// `web` extension prefixes have been added for better support
// for React Native Web.
extensions: paths.moduleFileExtensions
.map(ext => `.${ext}`)
.filter(ext => useTypeScript || !ext.includes('ts')),
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
},
plugins: [
// Adds support for installing with Plug'n'Play, leading to faster installs and adding
// guards against forgotten dependencies and such.
PnpWebpackPlugin,
// Prevents users from importing files from outside of src/ (or node_modules/).
// This often causes confusion because we only process files within src/ with babel.
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
// please link the files into your node_modules/ and let module-resolution kick in.
// Make sure your source files are compiled, as they will not be processed in any way.
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
],
},
resolveLoader: {
plugins: [
// Also related to Plug'n'Play, but this time it tells Webpack to load its loaders
// from the current package.
PnpWebpackPlugin.moduleLoader(module),
],
},
module: {
strictExportPresence: true,
rules: [
// Disable require.ensure as it's not a standard language feature.
{ parser: { requireEnsure: false } },
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|mjs|jsx|ts|tsx)$/,
enforce: 'pre',
use: [
{
options: {
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
resolvePluginsRelativeTo: __dirname,
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrcLib,
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
// back to the "file" loader at the end of the loader list.
oneOf: [
// "url" loader works like "file" loader except that it embeds assets
// smaller than specified limit in bytes as data URLs to avoid requests.
// A missing `test` is equivalent to a match.
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
loader: require.resolve('url-loader'),
options: {
limit: imageInlineSizeLimit,
name: 'static/media/[name].[hash:8].[ext]',
},
},
// Process application JS with Babel.
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
{
test: /\.(js|mjs|jsx|ts|tsx)$/,
include: paths.appSrcLib,
loader: require.resolve('babel-loader'),
options: {
customize: require.resolve(
'babel-preset-react-app/webpack-overrides'
),
plugins: [
[
require.resolve('babel-plugin-named-asset-import'),
{
loaderMap: {
svg: {
ReactComponent: '@svgr/webpack?-prettier,-svgo,+ref![path]',
},
},
},
],
],
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
cacheDirectory: true,
cacheCompression: isEnvProduction,
compact: isEnvProduction,
},
},
// Process any JS outside of the app with Babel.
// Unlike the application JS, we only compile the standard ES features.
{
test: /\.(js|mjs)$/,
exclude: /@babel(?:\/|\\{1,2})runtime/,
loader: require.resolve('babel-loader'),
options: {
babelrc: false,
configFile: false,
compact: false,
presets: [
[
require.resolve('babel-preset-react-app/dependencies'),
{ helpers: true },
],
],
plugins: [
[
"@babel/plugin-proposal-class-properties"
]
],
cacheDirectory: true,
cacheCompression: isEnvProduction,
// If an error happens in a package, it's possible to be
// because it was compiled. Thus, we don't want the browser
// debugger to show the original code. Instead, the code
// being evaluated would be much more helpful.
sourceMaps: false,
},
},
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader turns CSS into JS modules that inject <style> tags.
// In production, we use MiniCSSExtractPlugin to extract that CSS
// to a file, but in development "style" loader enables hot editing
// of CSS.
// By default we support CSS Modules with the extension .module.css
{
test: cssRegex,
exclude: cssModuleRegex,
use: getStyleLoaders({
importLoaders: 1,
sourceMap: isEnvProduction && shouldUseSourceMap,
}),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true,
},
// Adds support for CSS Modules (https://github.com/css-modules/css-modules)
// using the extension .module.css
{
test: cssModuleRegex,
use: getStyleLoaders({
importLoaders: 1,
sourceMap: isEnvProduction && shouldUseSourceMap,
modules: true,
getLocalIdent: getCSSModuleLocalIdent,
}),
},
// Opt-in support for SASS (using .scss or .sass extensions).
// By default we support SASS Modules with the
// extensions .module.scss or .module.sass
{
test: sassRegex,
exclude: sassModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap,
},
'sass-loader'
),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true,
},
// Adds support for CSS Modules, but using SASS
// using the extension .module.scss or .module.sass
{
test: sassModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: isEnvProduction && shouldUseSourceMap,
modules: true,
getLocalIdent: getCSSModuleLocalIdent,
},
'sass-loader'
),
},
// "file" loader makes sure those assets get served by WebpackDevServer.
// When you `import` an asset, you get its (virtual) filename.
// In production, they would get copied to the `build` folder.
// This loader doesn't use a "test" so it will catch all modules
// that fall through the other loaders.
{
loader: require.resolve('file-loader'),
// Exclude `js` files to keep "css" loader working as it injects
// its runtime that would otherwise be processed through "file" loader.
// Also exclude `html` and `json` extensions so they get processed
// by webpacks internal loaders.
exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
options: {
name: 'static/media/[name].[hash:8].[ext]',
},
},
// ** STOP ** Are you adding a new loader?
// Make sure to add the new loader(s) before the "file" loader.
],
},
],
},
plugins: [
isEnvDevelopment &&
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin(
Object.assign(
{},
{
inject: true,
template: paths.appHtml,
},
isEnvProduction
? {
minify: {
removeComments: true,
collapseWhitespace: true,
removeRedundantAttributes: true,
useShortDoctype: true,
removeEmptyAttributes: true,
removeStyleLinkTypeAttributes: true,
keepClosingSlash: true,
minifyJS: true,
minifyCSS: true,
minifyURLs: true,
},
}
: undefined
)
),
// Inlines the webpack runtime script. This script is too small to warrant
// a network request.
isEnvProduction &&
shouldInlineRuntimeChunk &&
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
// In production, it will be an empty string unless you specify "homepage"
// in `package.json`, in which case it will be the pathname of that URL.
// In development, this will be an empty string.
new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
// This gives some necessary context to module not found errors, such as
// the requesting resource.
new ModuleNotFoundPlugin(paths.appPath),
// Makes some environment variables available to the JS code, for example:
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
// It is absolutely essential that NODE_ENV is set to production
// during a production build.
// Otherwise React will be compiled in the very slow development mode.
new webpack.DefinePlugin(env.stringified),
// This is necessary to emit hot updates (currently CSS only):
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
// Watcher doesn't work well if you mistype casing in a path so we use
// a plugin that prints an error when you attempt to do this.
// See https://github.com/facebook/create-react-app/issues/240
isEnvDevelopment && new CaseSensitivePathsPlugin(),
// If you require a missing module and then `npm install` it, you still have
// to restart the development server for Webpack to discover it. This plugin
// makes the discovery automatic so you don't have to restart.
// See https://github.com/facebook/create-react-app/issues/186
isEnvDevelopment &&
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
isEnvProduction &&
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: 'css/index.css',
chunkFilename: 'css/index.[contenthash:8].chunk.css',
}),
// Generate a manifest file which contains a mapping of all asset filenames
// to their corresponding output file so that tools can pick it up without
// having to parse `index.html`.
/*new ManifestPlugin({
fileName: 'asset-manifest.json',
publicPath: publicPath,
generate: (seed, files) => {
const manifestFiles = files.reduce(function(manifest, file) {
manifest[file.name] = file.path;
return manifest;
}, seed);
return {
files: manifestFiles,
};
},
}),*/
// Moment.js is an extremely popular library that bundles large locale files
// by default due to how Webpack interprets its code. This is a practical
// solution that requires the user to opt into importing specific locales.
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new CopyWebpackPlugin([
{
from: `${paths.appSrcLibTypes}`,
to: paths.appBuild
}
]),
new PrettierPlugin(),
// Generate a service worker script that will precache, and keep up to date,
// the HTML & assets that are part of the Webpack build.
/*isEnvProduction &&
new WorkboxWebpackPlugin.GenerateSW({
clientsClaim: true,
exclude: [/\.map$/, /asset-manifest\.json$/],
importWorkboxFrom: 'cdn',
navigateFallback: publicUrl + '/index.html',
navigateFallbackBlacklist: [
// Exclude URLs starting with /_, as they're likely an API call
new RegExp('^/_'),
// Exclude URLs containing a dot, as they're likely a resource in
// public/ and not a SPA route
new RegExp('/[^/]+\\.[^/]+$'),
],
}),*/
// TypeScript type checking
useTypeScript &&
new ForkTsCheckerWebpackPlugin({
typescript: resolve.sync('typescript', {
basedir: paths.appNodeModules,
}),
async: isEnvDevelopment,
useTypescriptIncrementalApi: true,
checkSyntacticErrors: true,
resolveModuleNameModule: process.versions.pnp
? `${__dirname}/pnpTs.js`
: undefined,
resolveTypeReferenceDirectiveModule: process.versions.pnp
? `${__dirname}/pnpTs.js`
: undefined,
tsconfig: paths.appTsConfig,
reportFiles: [
'**',
'!**/__tests__/**',
'!**/?(*.)(spec|test).*',
'!**/src/setupProxy.*',
'!**/src/setupTests.*',
],
watch: paths.appSrcLib,
silent: true,
// The formatter is invoked directly in WebpackDevServerUtils during development
formatter: isEnvProduction ? typescriptFormatter : undefined,
}),
].filter(Boolean),
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
module: 'empty',
dgram: 'empty',
dns: 'mock',
fs: 'empty',
http2: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty',
},
// Turn off performance processing because we utilize
// our own hints via the FileSizeReporter
performance: false,
};
};
-274
View File
@@ -1,274 +0,0 @@
'use strict';
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const paths = require('./paths');
const getClientEnvironment = require('./env');
// Webpack uses `publicPath` to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.
const publicPath = paths.servedPath;
// Some apps do not use client-side routing with pushState.
// For these, "homepage" can be set to "." to enable relative asset paths.
const shouldUseRelativeAssetPaths = publicPath === './';
// Source maps are resource heavy and can cause out of memory issue for large source files.
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
// `publicUrl` is just like `publicPath`, but we will provide it to our app
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
const publicUrl = publicPath.slice(0, -1);
// Get environment variables to inject into our app.
const env = getClientEnvironment(publicUrl);
// Assert this just to be safe.
// Development builds of React are slow and not intended for production.
if (env.stringified['process.env'].NODE_ENV !== '"production"') {
throw new Error('Production builds must have NODE_ENV=production.');
}
// Note: defined here because it will be used more than once.
const cssFilename = 'css/index.css';
// ExtractTextPlugin expects the build output to be flat.
// (See https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/27)
// However, our output is structured with css, js and media folders.
// To have this structure working with relative paths, we have to use custom options.
const extractTextPluginOptions = shouldUseRelativeAssetPaths
? // Making sure that the publicPath goes back to to build folder.
{ publicPath: Array(cssFilename.split('/').length).join('../') }
: {};
// This is the production configuration.
// It compiles slowly and is focused on producing a fast and minimal bundle.
// The development configuration is different and lives in a separate file.
module.exports = {
// Don't attempt to continue if there are any errors.
bail: true,
// We generate sourcemaps in production. This is slow but gives good results.
// You can exclude the *.map files from the build during deployment.
devtool: shouldUseSourceMap ? 'source-map' : false,
// In production, we only want to load the app code.
entry: [paths.appLibIndexJs], // CRL: library index file instead of app index
output: {
// CRL: Updated whole block with library specific info
path: paths.appBuild,
filename: 'index.js',
libraryTarget: 'umd'
},
resolve: {
// This allows you to set a fallback for where Webpack should look for modules.
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
// It is guaranteed to exist because we tweak it in `env.js`
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
),
// These are the reasonable defaults supported by the Node ecosystem.
// We also include JSX as a common component filename extension to support
// some tools, although we do not recommend using it, see:
// https://github.com/facebookincubator/create-react-app/issues/290
// `web` extension prefixes have been added for better support
// for React Native Web.
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
},
plugins: [
// Prevents users from importing files from outside of src/ (or node_modules/).
// This often causes confusion because we only process files within src/ with babel.
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
// please link the files into your node_modules/ and let module-resolution kick in.
// Make sure your source files are compiled, as they will not be processed in any way.
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
],
},
module: {
strictExportPresence: true,
rules: [
// TODO: Disable require.ensure as it's not a standard language feature.
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
// { parser: { requireEnsure: false } },
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint'),
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appLibSrc, // CRL: updated with library src folder
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
// back to the "file" loader at the end of the loader list.
oneOf: [
// "url" loader works just like "file" loader but it also embeds
// assets smaller than specified size as data URLs to avoid requests.
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
loader: require.resolve('url-loader'),
options: {
limit: 10000,
name: 'media/[name].[ext]',
},
},
// Process JS with Babel.
{
test: /\.(js|jsx|mjs)$/,
include: paths.appLibSrc, // CRL: updated with library src folder
loader: require.resolve('babel-loader'),
options: {
compact: true,
},
},
// The notation here is somewhat confusing.
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader normally turns CSS into JS modules injecting <style>,
// but unlike in development configuration, we do something different.
// `ExtractTextPlugin` first applies the "postcss" and "css" loaders
// (second argument), then grabs the result CSS and puts it into a
// separate file in our build process. This way we actually ship
// a single CSS file in production instead of JS code injecting <style>
// tags. If you use code splitting, however, any async bundles will still
// use the "style" loader inside the async code so CSS from them won't be
// in the main CSS file.
{
test: /\.css$/,
loader: ExtractTextPlugin.extract(
Object.assign(
{
fallback: {
loader: require.resolve('style-loader'),
options: {
hmr: false,
},
},
use: [
{
loader: require.resolve('css-loader'),
options: {
importLoaders: 1,
minimize: true,
sourceMap: shouldUseSourceMap,
},
},
{
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebookincubator/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9', // React doesn't support IE8 anyway
],
flexbox: 'no-2009',
}),
],
},
},
],
},
extractTextPluginOptions
)
),
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
},
// "file" loader makes sure assets end up in the `build` folder.
// When you `import` an asset, you get its filename.
// This loader doesn't use a "test" so it will catch all modules
// that fall through the other loaders.
{
loader: require.resolve('file-loader'),
// Exclude `js` files to keep "css" loader working as it injects
// it's runtime that would otherwise processed through "file" loader.
// Also exclude `html` and `json` extensions so they get processed
// by webpacks internal loaders.
exclude: [/\.js$/, /\.html$/, /\.json$/],
options: {
name: 'media/[name].[ext]',
},
},
// ** STOP ** Are you adding a new loader?
// Make sure to add the new loader(s) before the "file" loader.
],
},
],
},
plugins: [
// Makes some environment variables available to the JS code, for example:
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
// It is absolutely essential that NODE_ENV was set to production here.
// Otherwise React will be compiled in the very slow development mode.
new webpack.DefinePlugin(env.stringified),
// Minify the code.
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
// Disabled because of an issue with Uglify breaking seemingly valid code:
// https://github.com/facebookincubator/create-react-app/issues/2376
// Pending further investigation:
// https://github.com/mishoo/UglifyJS2/issues/2011
comparisons: false,
},
mangle: {
safari10: true,
},
output: {
comments: false,
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebookincubator/create-react-app/issues/2488
ascii_only: true,
},
sourceMap: shouldUseSourceMap,
}),
// Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
new ExtractTextPlugin({
filename: cssFilename,
}),
// Moment.js is an extremely popular library that bundles large locale files
// by default due to how Webpack interprets its code. This is a practical
// solution that requires the user to opt into importing specific locales.
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
],
// CRL: added externals block for library
externals: {
'react': 'react',
'react-dom': 'react-dom'
},
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty',
},
};
+579
View File
@@ -0,0 +1,579 @@
'use strict';
const fs = require('fs');
const isWsl = require('is-wsl');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const safePostCssParser = require('postcss-safe-parser');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
const paths = require('./paths');
const modules = require('./modules');
const getClientEnvironment = require('./env');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const getPackageJson = require('./getPackageJson');
const postcssNormalize = require('postcss-normalize');
// Source maps are resource heavy and can cause out of memory issue for large source files.
const shouldUseSourceMap = false;
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
// makes for a smoother build process.
const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false';
// Check if TypeScript is setup
const useTypeScript = fs.existsSync(paths.appTsConfig);
// style files regexes
const cssRegex = /\.css$/;
const cssModuleRegex = /\.module\.css$/;
const sassRegex = /\.(scss|sass)$/;
const sassModuleRegex = /\.module\.(scss|sass)$/;
const {
version,
name,
license,
repository,
author,
} = getPackageJson('version', 'name', 'license', 'repository', 'author');
const banner = `
${name} v${version} (Non-minified build)
${repository.url}
Copyright (c) ${author.replace(/ *\<[^)]*\> */g, " ")}
This source code is licensed under the ${license} license found in the
LICENSE file in the root directory of this source tree.
`;
// This is the production and development configuration.
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
module.exports = function(webpackEnv) {
const isEnvDevelopment = webpackEnv === 'development';
const isEnvProduction = webpackEnv === 'production';
// Webpack uses `publicPath` to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.
// In development, we always serve from the root. This makes config easier.
const publicPath = isEnvProduction
? paths.servedPath
: isEnvDevelopment && '/';
// Some apps do not use client-side routing with pushState.
// For these, "homepage" can be set to "." to enable relative asset paths.
const shouldUseRelativeAssetPaths = publicPath === './';
// `publicUrl` is just like `publicPath`, but we will provide it to our app
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
const publicUrl = isEnvProduction
? publicPath.slice(0, -1)
: isEnvDevelopment && '';
// Get environment variables to inject into our app.
const env = getClientEnvironment(publicUrl);
// common function to get style loaders
const getStyleLoaders = (cssOptions, preProcessor) => {
const loaders = [
{
loader: MiniCssExtractPlugin.loader,
options: Object.assign(
{},
shouldUseRelativeAssetPaths ? { publicPath: '../../' } : undefined
),
},
{
loader: require.resolve('css-loader'),
options: cssOptions,
},
{
// Options for PostCSS as we reference these options twice
// Adds vendor prefixing based on your specified browser support in
// package.json
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebook/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
require('postcss-preset-env')({
autoprefixer: {
flexbox: 'no-2009',
},
stage: 3,
}),
// Adds PostCSS Normalize as the reset css with default options,
// so that it honors browserslist config in package.json
// which in turn let's users customize the target behavior as per their needs.
postcssNormalize(),
],
sourceMap: shouldUseSourceMap,
},
},
].filter(Boolean);
if (preProcessor) {
loaders.push({
loader: require.resolve(preProcessor),
options: {
sourceMap: shouldUseSourceMap,
},
});
}
return loaders;
};
return {
mode: 'production',
// Stop compilation early in production
bail: true,
devtool: false,
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
entry: [paths.appLibIndexJs],
output: {
// The build folder.
path: paths.appBuild,
// Add /* filename */ comments to generated require()s in the output.
pathinfo: isEnvDevelopment,
// There will be one main bundle, and one file per asynchronous chunk.
// In development, it does not produce real files.
filename: 'simple-keyboard.js',
// TODO: remove this when upgrading to webpack 5
futureEmitAssets: true,
// There are also additional JS chunk files if you use code splitting.
chunkFilename: 'index.[chunkhash:8].chunk.js',
// We inferred the "public path" (such as / or /my-project) from homepage.
// We use "/" in development.
publicPath: publicPath,
library: "SimpleKeyboard",
libraryTarget: 'umd',
umdNamedDefine: true,
// Point sourcemap entries to original disk location (format as URL on Windows)
devtoolModuleFilenameTemplate: info =>
path
.relative(paths.appSrcLib, info.absoluteResourcePath)
.replace(/\\/g, '/'),
},
optimization: {
minimizer: [
// we specify a custom UglifyJsPlugin here to get source maps in production
new UglifyJsPlugin({
cache: false,
parallel: false,
uglifyOptions: {
output: {
comments: true,
beautify: true,
braces: true,
indent_level: 2
},
mangle: false,
compress: false
},
// Use multi-process parallel running to improve the build speed
// Default number of concurrent runs: os.cpus().length - 1
// Disabled on WSL (Windows Subsystem for Linux) due to an issue with Terser
// https://github.com/webpack-contrib/terser-webpack-plugin/issues/21
parallel: !isWsl,
// Enable file caching
cache: true,
sourceMap: false,
}),
new webpack.BannerPlugin({
banner: banner,
entryOnly: true
}),
new OptimizeCSSAssetsPlugin({
cssProcessorOptions: {
parser: safePostCssParser,
map: shouldUseSourceMap
? {
// `inline: false` forces the sourcemap to be output into a
// separate file
inline: false,
// `annotation: true` appends the sourceMappingURL to the end of
// the css file, helping the browser find the sourcemap
annotation: true,
}
: false,
},
}),
],
// Automatically split vendor and commons
// https://twitter.com/wSokra/status/969633336732905474
// https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
splitChunks: {
//chunks: 'all',
cacheGroups: {
default: false,
}
},
// Keep the runtime chunk separated to enable long term caching
// https://twitter.com/wSokra/status/969679223278505985
runtimeChunk: false,
},
resolve: {
// This allows you to set a fallback for where Webpack should look for modules.
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebook/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(modules.additionalModulePaths || []),
// These are the reasonable defaults supported by the Node ecosystem.
// We also include JSX as a common component filename extension to support
// some tools, although we do not recommend using it, see:
// https://github.com/facebook/create-react-app/issues/290
// `web` extension prefixes have been added for better support
// for React Native Web.
extensions: paths.moduleFileExtensions
.map(ext => `.${ext}`)
.filter(ext => useTypeScript || !ext.includes('ts')),
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
},
plugins: [
// Adds support for installing with Plug'n'Play, leading to faster installs and adding
// guards against forgotten dependencies and such.
PnpWebpackPlugin,
// Prevents users from importing files from outside of src/ (or node_modules/).
// This often causes confusion because we only process files within src/ with babel.
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
// please link the files into your node_modules/ and let module-resolution kick in.
// Make sure your source files are compiled, as they will not be processed in any way.
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
],
},
resolveLoader: {
plugins: [
// Also related to Plug'n'Play, but this time it tells Webpack to load its loaders
// from the current package.
PnpWebpackPlugin.moduleLoader(module),
],
},
module: {
strictExportPresence: true,
rules: [
// Disable require.ensure as it's not a standard language feature.
{ parser: { requireEnsure: false } },
// First, run the linter.
// It's important to do this before Babel processes the JS.
{
test: /\.(js|mjs|jsx|ts|tsx)$/,
enforce: 'pre',
use: [
{
options: {
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrcLib,
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
// back to the "file" loader at the end of the loader list.
oneOf: [
// "url" loader works like "file" loader except that it embeds assets
// smaller than specified limit in bytes as data URLs to avoid requests.
// A missing `test` is equivalent to a match.
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
loader: require.resolve('url-loader'),
options: {
limit: 10000,
name: 'static/media/[name].[hash:8].[ext]',
},
},
// Process application JS with Babel.
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
{
test: /\.(js|mjs|jsx|ts|tsx)$/,
include: paths.appSrcLib,
loader: require.resolve('babel-loader'),
options: {
customize: require.resolve(
'babel-preset-react-app/webpack-overrides'
),
plugins: [
[
require.resolve('babel-plugin-named-asset-import'),
{
loaderMap: {
svg: {
ReactComponent: '@svgr/webpack?-prettier,-svgo,+ref![path]',
},
},
},
],
],
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
cacheDirectory: true,
cacheCompression: true,
compact: true,
},
},
// Process any JS outside of the app with Babel.
// Unlike the application JS, we only compile the standard ES features.
{
test: /\.(js|mjs)$/,
exclude: /@babel(?:\/|\\{1,2})runtime/,
loader: require.resolve('babel-loader'),
options: {
babelrc: false,
configFile: false,
compact: false,
presets: [
[
require.resolve('babel-preset-react-app/dependencies'),
{ helpers: true },
],
],
cacheDirectory: true,
cacheCompression: true,
// If an error happens in a package, it's possible to be
// because it was compiled. Thus, we don't want the browser
// debugger to show the original code. Instead, the code
// being evaluated would be much more helpful.
sourceMaps: false,
},
},
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
// "style" loader turns CSS into JS modules that inject <style> tags.
// In production, we use MiniCSSExtractPlugin to extract that CSS
// to a file, but in development "style" loader enables hot editing
// of CSS.
// By default we support CSS Modules with the extension .module.css
{
test: cssRegex,
exclude: cssModuleRegex,
use: getStyleLoaders({
importLoaders: 1,
sourceMap: shouldUseSourceMap,
}),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true,
},
// Adds support for CSS Modules (https://github.com/css-modules/css-modules)
// using the extension .module.css
{
test: cssModuleRegex,
use: getStyleLoaders({
importLoaders: 1,
sourceMap: shouldUseSourceMap,
modules: true,
getLocalIdent: getCSSModuleLocalIdent,
}),
},
// Opt-in support for SASS (using .scss or .sass extensions).
// By default we support SASS Modules with the
// extensions .module.scss or .module.sass
{
test: sassRegex,
exclude: sassModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: shouldUseSourceMap,
},
'sass-loader'
),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
// Remove this when webpack adds a warning or an error for this.
// See https://github.com/webpack/webpack/issues/6571
sideEffects: true,
},
// Adds support for CSS Modules, but using SASS
// using the extension .module.scss or .module.sass
{
test: sassModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
sourceMap: shouldUseSourceMap,
modules: true,
getLocalIdent: getCSSModuleLocalIdent,
},
'sass-loader'
),
},
// "file" loader makes sure those assets get served by WebpackDevServer.
// When you `import` an asset, you get its (virtual) filename.
// In production, they would get copied to the `build` folder.
// This loader doesn't use a "test" so it will catch all modules
// that fall through the other loaders.
{
loader: require.resolve('file-loader'),
// Exclude `js` files to keep "css" loader working as it injects
// its runtime that would otherwise be processed through "file" loader.
// Also exclude `html` and `json` extensions so they get processed
// by webpacks internal loaders.
exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
options: {
name: 'static/media/[name].[hash:8].[ext]',
},
},
// ** STOP ** Are you adding a new loader?
// Make sure to add the new loader(s) before the "file" loader.
],
},
],
},
plugins: [
// Generates an `index.html` file with the <script> injected.
/*new HtmlWebpackPlugin(
Object.assign(
{},
{
inject: true,
template: paths.appHtml,
},
isEnvProduction
? {
minify: {
removeComments: true,
collapseWhitespace: true,
removeRedundantAttributes: true,
useShortDoctype: true,
removeEmptyAttributes: true,
removeStyleLinkTypeAttributes: true,
keepClosingSlash: true,
minifyJS: true,
minifyCSS: true,
minifyURLs: true,
},
}
: undefined
)
),*/
// Inlines the webpack runtime script. This script is too small to warrant
// a network request.
shouldInlineRuntimeChunk &&
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
// In production, it will be an empty string unless you specify "homepage"
// in `package.json`, in which case it will be the pathname of that URL.
// In development, this will be an empty string.
new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),
// This gives some necessary context to module not found errors, such as
// the requesting resource.
new ModuleNotFoundPlugin(paths.appPath),
// Makes some environment variables available to the JS code, for example:
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
// It is absolutely essential that NODE_ENV is set to production
// during a production build.
// Otherwise React will be compiled in the very slow development mode.
new webpack.DefinePlugin(env.stringified),
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: 'css/simple-keyboard.css',
chunkFilename: 'css/index.[contenthash:8].chunk.css',
}),
// Generate a manifest file which contains a mapping of all asset filenames
// to their corresponding output file so that tools can pick it up without
// having to parse `index.html`.
/*new ManifestPlugin({
fileName: 'asset-manifest.json',
publicPath: publicPath,
generate: (seed, files) => {
const manifestFiles = files.reduce(function(manifest, file) {
manifest[file.name] = file.path;
return manifest;
}, seed);
return {
files: manifestFiles,
};
},
}),*/
// Moment.js is an extremely popular library that bundles large locale files
// by default due to how Webpack interprets its code. This is a practical
// solution that requires the user to opt into importing specific locales.
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
// Generate a service worker script that will precache, and keep up to date,
// the HTML & assets that are part of the Webpack build.
/*isEnvProduction &&
new WorkboxWebpackPlugin.GenerateSW({
clientsClaim: true,
exclude: [/\.map$/, /asset-manifest\.json$/],
importWorkboxFrom: 'cdn',
navigateFallback: publicUrl + '/index.html',
navigateFallbackBlacklist: [
// Exclude URLs starting with /_, as they're likely an API call
new RegExp('^/_'),
// Exclude URLs containing a dot, as they're likely a resource in
// public/ and not a SPA route
new RegExp('/[^/]+\\.[^/]+$'),
],
}),*/
// TypeScript type checking
useTypeScript &&
new ForkTsCheckerWebpackPlugin({
typescript: resolve.sync('typescript', {
basedir: paths.appNodeModules,
}),
async: false,
useTypescriptIncrementalApi: true,
checkSyntacticErrors: true,
tsconfig: paths.appTsConfig,
reportFiles: [
'**',
'!**/__tests__/**',
'!**/?(*.)(spec|test).*',
'!**/src/setupProxy.*',
'!**/src/setupTests.*',
],
watch: paths.appSrcLib,
silent: true,
// The formatter is invoked directly in WebpackDevServerUtils during development
formatter: isEnvProduction ? typescriptFormatter : undefined,
}),
].filter(Boolean),
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
module: 'empty',
dgram: 'empty',
dns: 'mock',
fs: 'empty',
http2: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty',
},
// Turn off performance processing because we utilize
// our own hints via the FileSizeReporter
performance: false,
};
};
+22 -18
View File
@@ -1,10 +1,11 @@
'use strict';
const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
const path = require('path');
const config = require('./webpack.config.dev');
const ignoredFiles = require('react-dev-utils/ignoredFiles');
const paths = require('./paths');
const fs = require('fs');
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
const host = process.env.HOST || '0.0.0.0';
@@ -17,8 +18,8 @@ module.exports = function(proxy, allowedHost) {
// https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a
// However, it made several existing use cases such as development in cloud
// environment or subdomains in development significantly more complicated:
// https://github.com/facebookincubator/create-react-app/issues/2271
// https://github.com/facebookincubator/create-react-app/issues/2233
// https://github.com/facebook/create-react-app/issues/2271
// https://github.com/facebook/create-react-app/issues/2233
// While we're investigating better solutions, for now we will take a
// compromise. Since our WDS configuration only serves files in the `public`
// folder we won't consider accessing them a vulnerability. However, if you
@@ -59,41 +60,44 @@ module.exports = function(proxy, allowedHost) {
hot: true,
// It is important to tell WebpackDevServer to use the same "root" path
// as we specified in the config. In development, we always serve from /.
publicPath: config.output.publicPath,
publicPath: '/',
// WebpackDevServer is noisy by default so we emit custom message instead
// by listening to the compiler events with `compiler.plugin` calls above.
// by listening to the compiler events with `compiler.hooks[...].tap` calls above.
quiet: true,
// Reportedly, this avoids CPU overload on some systems.
// https://github.com/facebookincubator/create-react-app/issues/293
// https://github.com/facebook/create-react-app/issues/293
// src/node_modules is not ignored to support absolute imports
// https://github.com/facebookincubator/create-react-app/issues/1065
// https://github.com/facebook/create-react-app/issues/1065
watchOptions: {
ignored: new RegExp(
`^(?!${path
.normalize(paths.appSrc + '/')
.replace(/[\\]+/g, '\\\\')}).+[\\\\/]node_modules[\\\\/]`,
'g'
),
ignored: ignoredFiles(paths.appSrc),
},
// Enable HTTPS if the HTTPS environment variable is set to 'true'
https: protocol === 'https',
host: host,
host,
overlay: false,
historyApiFallback: {
// Paths with dots should still use the history fallback.
// See https://github.com/facebookincubator/create-react-app/issues/387.
// See https://github.com/facebook/create-react-app/issues/387.
disableDotRule: true,
},
public: allowedHost,
proxy,
before(app) {
before(app, server) {
if (fs.existsSync(paths.proxySetup)) {
// This registers user provided middleware for proxy reasons
require(paths.proxySetup)(app);
}
// This lets us fetch source contents from webpack for the error overlay
app.use(evalSourceMapMiddleware(server));
// This lets us open files from the runtime error overlay.
app.use(errorOverlayMiddleware());
// This service worker file is effectively a 'no-op' that will reset any
// previous service worker registered for the same host:port combination.
// We do this in development to avoid hitting the production cache if
// it used the same host and port.
// https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432
// https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432
app.use(noopServiceWorkerMiddleware());
},
};
+9801 -7307
View File
File diff suppressed because it is too large Load Diff
+125 -67
View File
@@ -1,14 +1,16 @@
{
"name": "simple-keyboard",
"version": "1.1.0",
"description": "React.js Virtual Keyboard",
"version": "2.26.0",
"description": "On-screen Javascript Virtual Keyboard",
"main": "build/index.js",
"types": "build/index.d.ts",
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"demo": "node scripts/demo.js",
"test": "node scripts/test.js --env=jsdom",
"prepublish": "npm run build"
"test": "node scripts/test.js",
"coverage": "node scripts/test.js --coverage --watchAll=false",
"prepare": "npm run build"
},
"repository": {
"type": "git",
@@ -18,106 +20,162 @@
"bugs": {
"url": "https://github.com/hodgef/simple-keyboard/issues"
},
"homepage": "https://github.com/hodgef/simple-keyboard",
"homepage": "https://virtual-keyboard.js.org/",
"keywords": [
"react",
"reactjs",
"javascript",
"es6",
"digital",
"keyboard",
"onscreen",
"virtual",
"screen-keyboard",
"component",
"simple",
"easy"
"virtual-keyboard",
"touchscreen",
"touch-screen",
"kiosk",
"osk",
"js"
],
"license": "MIT",
"dependencies": {},
"devDependencies": {
"autoprefixer": "7.1.6",
"babel-core": "6.26.0",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.3",
"babel-loader": "7.1.2",
"babel-preset-react-app": "^3.1.0",
"babel-runtime": "6.26.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "1.1.3",
"copy-webpack-plugin": "^4.3.1",
"css-loader": "0.28.7",
"dotenv": "4.0.0",
"eslint": "4.10.0",
"eslint-config-react-app": "^2.0.1",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.39.1",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.4.0",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "1.1.5",
"fs-extra": "3.0.1",
"html-webpack-plugin": "2.29.0",
"jest": "20.0.4",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.8",
"promise": "8.0.1",
"raf": "3.4.0",
"react": "^16.2.0",
"react-dev-utils": "^4.2.1",
"react-dom": "^16.2.0",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
"url-loader": "0.6.2",
"webpack": "3.8.1",
"webpack-dev-server": "2.9.4",
"webpack-manifest-plugin": "1.3.2",
"whatwg-fetch": "2.0.3",
"prop-types": "^15.6.1"
"@babel/core": "7.5.5",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@svgr/webpack": "4.3.2",
"@typescript-eslint/eslint-plugin": "1.13.0",
"@typescript-eslint/parser": "1.13.0",
"babel-eslint": "10.0.2",
"babel-jest": "^24.8.0",
"babel-loader": "8.0.6",
"babel-plugin-named-asset-import": "^0.3.3",
"babel-preset-react-app": "^9.0.1",
"camelcase": "^5.2.0",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"copy-webpack-plugin": "^5.0.3",
"css-loader": "2.1.1",
"dotenv": "6.2.0",
"dotenv-expand": "4.2.0",
"eslint": "^6.1.0",
"eslint-config-react-app": "^5.0.1",
"eslint-loader": "2.2.1",
"eslint-plugin-flowtype": "3.13.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.14.3",
"eslint-plugin-react-hooks": "^1.6.1",
"file-loader": "3.0.1",
"fs-extra": "7.0.1",
"html-webpack-plugin": "4.0.0-beta.5",
"identity-obj-proxy": "3.0.0",
"is-wsl": "^1.1.0",
"jest": "24.8.0",
"jest-environment-jsdom-fourteen": "0.1.0",
"jest-resolve": "24.9.0",
"jest-watch-typeahead": "0.3.1",
"mini-css-extract-plugin": "0.5.0",
"optimize-css-assets-webpack-plugin": "5.0.3",
"pnp-webpack-plugin": "1.5.0",
"prettier": "^1.17.0",
"prettier-webpack-plugin": "^1.2.0",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-normalize": "7.0.1",
"postcss-preset-env": "6.7.0",
"postcss-safe-parser": "4.0.1",
"react": "^16.9.0",
"react-app-polyfill": "^1.0.2",
"react-dev-utils": "^9.0.3",
"react-dom": "^16.9.0",
"resolve": "1.12.0",
"resolve-url-loader": "3.1.0",
"sass-loader": "7.2.0",
"semver": "6.3.0",
"style-loader": "1.0.0",
"terser-webpack-plugin": "1.4.1",
"ts-pnp": "1.1.2",
"uglifyjs-webpack-plugin": "^2.1.2",
"url-loader": "2.1.0",
"webpack": "4.39.1",
"webpack-dev-server": "3.2.1",
"webpack-manifest-plugin": "2.0.4",
"workbox-webpack-plugin": "4.3.1"
},
"peerDependencies": {
"react": ">=0.14",
"react-dom": ">=0.14"
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"jest": {
"roots": [
"<rootDir>/src"
],
"collectCoverageFrom": [
"src/**/*.{js,jsx,mjs}"
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/*.d.ts",
"!src/lib/index.js",
"!src/demo/index.js",
"!src/utils/**",
"!src/**/*.d.ts",
"!**/tests/**"
],
"setupFiles": [
"<rootDir>/config/polyfills.js"
"react-app-polyfill/jsdom"
],
"setupFilesAfterEnv": [],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}",
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}"
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
],
"testEnvironment": "node",
"testURL": "http://localhost",
"testEnvironment": "jest-environment-jsdom-fourteen",
"transform": {
"^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|mjs|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$"
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
"^.+\\.module\\.(css|sass|scss)$"
],
"modulePaths": [],
"moduleNameMapper": {
"^react-native$": "react-native-web"
"^react-native$": "react-native-web",
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
},
"moduleFileExtensions": [
"web.js",
"mjs",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"web.jsx",
"jsx",
"node"
],
"watchPlugins": [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
]
},
"babel": {
"presets": [
"react-app"
],
"plugins": [
[
"@babel/plugin-proposal-class-properties"
]
]
},
"eslintConfig": {
"extends": "react-app"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

+17 -29
View File
@@ -1,40 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta name="theme-color" content="#000000" />
<title>simple-keyboard</title>
<style>
/**
* Disabling double-tap to zoom in iOS 10+
* as it interferes with simple-keyboard
*/
body,
html {
touch-action: manipulation;
}
</style>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
-15
View File
@@ -1,15 +0,0 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
+76 -12
View File
@@ -14,37 +14,53 @@ process.on('unhandledRejection', err => {
// Ensure environment variables are read.
require('../config/env');
const chalk = require('chalk');
const path = require('path');
const chalk = require('react-dev-utils/chalk');
const fs = require('fs-extra');
const webpack = require('webpack');
const config = require('../config/webpack.config.prod');
const configFactory = require('../config/webpack.config');
const paths = require('../config/paths');
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
const printHostingInstructions = require('react-dev-utils/printHostingInstructions');
const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
const printBuildError = require('react-dev-utils/printBuildError');
const measureFileSizesBeforeBuild =
FileSizeReporter.measureFileSizesBeforeBuild;
const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild;
const useYarn = fs.existsSync(paths.yarnLockFile);
// These sizes are pretty large. We'll warn for bundles exceeding them.
const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;
const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
const isInteractive = process.stdout.isTTY;
// Warn and crash if required files are missing
if (!checkRequiredFiles([paths.appLibIndexJs])) { // CRL: Updated with library index file
if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
process.exit(1);
}
// First, read the current file sizes in build directory.
// This lets us display how much they changed later.
measureFileSizesBeforeBuild(paths.appBuild)
// Generate configuration
const config = configFactory('production');
// We require that you explicitly set browsers and do not fall back to
// browserslist defaults.
const { checkBrowsers } = require('react-dev-utils/browsersHelper');
checkBrowsers(paths.appPath, isInteractive)
.then(() => {
// First, read the current file sizes in build directory.
// This lets us display how much they changed later.
return measureFileSizesBeforeBuild(paths.appBuild);
})
.then(previousFileSizes => {
// Remove all content but keep the directory so that
// if you're in it, you don't end up in Trash
fs.emptyDirSync(paths.appBuild);
// Merge with the public folder
//copyPublicFolder();
// Start the webpack build
return build(previousFileSizes);
})
@@ -76,25 +92,65 @@ measureFileSizesBeforeBuild(paths.appBuild)
WARN_AFTER_CHUNK_GZIP_SIZE
);
console.log();
const appPackage = require(paths.appPackageJson);
const publicUrl = paths.publicUrl;
const publicPath = config.output.publicPath;
const buildFolder = path.relative(process.cwd(), paths.appBuild);
printHostingInstructions(
appPackage,
publicUrl,
publicPath,
buildFolder,
useYarn
);
},
err => {
console.log(chalk.red('Failed to compile.\n'));
printBuildError(err);
throw new Error('Failed to compile');
process.exit(1);
}
);
)
.catch(err => {
if (err && err.message) {
console.log(err.message);
}
process.exit(1);
});
// Create the production build and print the deployment instructions.
function build(previousFileSizes) {
// We used to support resolving modules according to `NODE_PATH`.
// This now has been deprecated in favor of jsconfig/tsconfig.json
// This lets you use absolute paths in imports inside large monorepos:
if (process.env.NODE_PATH) {
console.log(
chalk.yellow(
'Setting NODE_PATH to resolve modules absolutely has been deprecated in favor of setting baseUrl in jsconfig.json (or tsconfig.json if you are using TypeScript) and will be removed in a future major release of create-react-app.'
)
);
console.log();
}
console.log('Creating an optimized production build...');
let compiler = webpack(config);
const compiler = webpack(config);
return new Promise((resolve, reject) => {
compiler.run((err, stats) => {
let messages;
if (err) {
return reject(err);
if (!err.message) {
return reject(err);
}
messages = formatWebpackMessages({
errors: [err.message],
warnings: [],
});
} else {
messages = formatWebpackMessages(
stats.toJson({ all: false, warnings: true, errors: true })
);
}
const messages = formatWebpackMessages(stats.toJson({}, true));
if (messages.errors.length) {
// Only keep the first error. Others are often indicative
// of the same problem, but confuse the reader with noise.
@@ -117,6 +173,7 @@ function build(previousFileSizes) {
);
return reject(new Error(messages.warnings.join('\n\n')));
}
return resolve({
stats,
previousFileSizes,
@@ -125,3 +182,10 @@ function build(previousFileSizes) {
});
});
}
function copyPublicFolder() {
fs.copySync(paths.appPublic, paths.appBuild, {
dereference: true,
filter: file => file !== paths.appHtml,
});
}
+79 -15
View File
@@ -14,37 +14,53 @@ process.on('unhandledRejection', err => {
// Ensure environment variables are read.
require('../config/env');
const chalk = require('chalk');
const path = require('path');
const chalk = require('react-dev-utils/chalk');
const fs = require('fs-extra');
const webpack = require('webpack');
const config = require('../config/webpack.config.demo');
const configFactory = require('../config/webpack.config.demo');
const paths = require('../config/paths');
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
const printHostingInstructions = require('react-dev-utils/printHostingInstructions');
const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
const printBuildError = require('react-dev-utils/printBuildError');
const measureFileSizesBeforeBuild =
FileSizeReporter.measureFileSizesBeforeBuild;
const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild;
const useYarn = fs.existsSync(paths.yarnLockFile);
// These sizes are pretty large. We'll warn for bundles exceeding them.
const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;
const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
const isInteractive = process.stdout.isTTY;
// Warn and crash if required files are missing
if (!checkRequiredFiles([paths.appDemoIndexJs])) { // CRL: Updated with library index file
if (!checkRequiredFiles([paths.appHtml, paths.appDemoIndexJs])) {
process.exit(1);
}
// First, read the current file sizes in build directory.
// This lets us display how much they changed later.
measureFileSizesBeforeBuild(paths.appDemoBuild)
// Generate configuration
const config = configFactory('production');
// We require that you explicitly set browsers and do not fall back to
// browserslist defaults.
const { checkBrowsers } = require('react-dev-utils/browsersHelper');
checkBrowsers(paths.appPath, isInteractive)
.then(() => {
// First, read the current file sizes in build directory.
// This lets us display how much they changed later.
return measureFileSizesBeforeBuild(paths.appDemo);
})
.then(previousFileSizes => {
// Remove all content but keep the directory so that
// if you're in it, you don't end up in Trash
fs.emptyDirSync(paths.appDemoBuild);
fs.emptyDirSync(paths.appDemo);
// Merge with the public folder
copyPublicFolder();
// Start the webpack build
return build(previousFileSizes);
})
@@ -71,30 +87,70 @@ measureFileSizesBeforeBuild(paths.appDemoBuild)
printFileSizesAfterBuild(
stats,
previousFileSizes,
paths.appDemoBuild,
paths.appDemo,
WARN_AFTER_BUNDLE_GZIP_SIZE,
WARN_AFTER_CHUNK_GZIP_SIZE
);
console.log();
const appPackage = require(paths.appPackageJson);
const publicUrl = paths.publicUrl;
const publicPath = config.output.publicPath;
const buildFolder = path.relative(process.cwd(), paths.appDemo);
printHostingInstructions(
appPackage,
publicUrl,
publicPath,
buildFolder,
useYarn
);
},
err => {
console.log(chalk.red('Failed to compile.\n'));
printBuildError(err);
throw new Error('Failed to compile');
process.exit(1);
}
);
)
.catch(err => {
if (err && err.message) {
console.log(err.message);
}
process.exit(1);
});
// Create the production build and print the deployment instructions.
function build(previousFileSizes) {
console.log('Creating a build of the demo app...');
// We used to support resolving modules according to `NODE_PATH`.
// This now has been deprecated in favor of jsconfig/tsconfig.json
// This lets you use absolute paths in imports inside large monorepos:
if (process.env.NODE_PATH) {
console.log(
chalk.yellow(
'Setting NODE_PATH to resolve modules absolutely has been deprecated in favor of setting baseUrl in jsconfig.json (or tsconfig.json if you are using TypeScript) and will be removed in a future major release of create-react-app.'
)
);
console.log();
}
let compiler = webpack(config);
console.log('Creating an optimized production build...');
const compiler = webpack(config);
return new Promise((resolve, reject) => {
compiler.run((err, stats) => {
let messages;
if (err) {
return reject(err);
if (!err.message) {
return reject(err);
}
messages = formatWebpackMessages({
errors: [err.message],
warnings: [],
});
} else {
messages = formatWebpackMessages(
stats.toJson({ all: false, warnings: true, errors: true })
);
}
const messages = formatWebpackMessages(stats.toJson({}, true));
if (messages.errors.length) {
// Only keep the first error. Others are often indicative
// of the same problem, but confuse the reader with noise.
@@ -117,6 +173,7 @@ function build(previousFileSizes) {
);
return reject(new Error(messages.warnings.join('\n\n')));
}
return resolve({
stats,
previousFileSizes,
@@ -125,3 +182,10 @@ function build(previousFileSizes) {
});
});
}
function copyPublicFolder() {
fs.copySync(paths.appPublic, paths.appDemo, {
dereference: true,
filter: file => file !== paths.appHtml,
});
}
+83 -8
View File
@@ -14,8 +14,9 @@ process.on('unhandledRejection', err => {
// Ensure environment variables are read.
require('../config/env');
const fs = require('fs');
const chalk = require('chalk');
const chalk = require('react-dev-utils/chalk');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const clearConsole = require('react-dev-utils/clearConsole');
@@ -28,14 +29,14 @@ const {
} = require('react-dev-utils/WebpackDevServerUtils');
const openBrowser = require('react-dev-utils/openBrowser');
const paths = require('../config/paths');
const config = require('../config/webpack.config.dev');
const configFactory = require('../config/webpack.config');
const createDevServerConfig = require('../config/webpackDevServer.config');
const useYarn = fs.existsSync(paths.yarnLockFile);
const isInteractive = process.stdout.isTTY;
// Warn and crash if required files are missing
if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
if (!checkRequiredFiles([paths.appHtml, paths.appDemoIndexJs])) {
process.exit(1);
}
@@ -43,23 +44,64 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
const HOST = process.env.HOST || '0.0.0.0';
// We attempt to use the default port but if it is busy, we offer the user to
// run on a different port. `detect()` Promise resolves to the next free port.
choosePort(HOST, DEFAULT_PORT)
if (process.env.HOST) {
console.log(
chalk.cyan(
`Attempting to bind to HOST environment variable: ${chalk.yellow(
chalk.bold(process.env.HOST)
)}`
)
);
console.log(
`If this was unintentional, check that you haven't mistakenly set it in your shell.`
);
console.log(
`Learn more here: ${chalk.yellow('https://bit.ly/CRA-advanced-config')}`
);
console.log();
}
// We require that you explicitly set browsers and do not fall back to
// browserslist defaults.
const { checkBrowsers } = require('react-dev-utils/browsersHelper');
checkBrowsers(paths.appPath, isInteractive)
.then(() => {
// We attempt to use the default port but if it is busy, we offer the user to
// run on a different port. `choosePort()` Promise resolves to the next free port.
return choosePort(HOST, DEFAULT_PORT);
})
.then(port => {
if (port == null) {
// We have not found a port.
return;
}
const args = process.argv;
const testMode = args[2] === "--testMode";
const config = configFactory('development');
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
const appName = require(paths.appPackageJson).name;
const useTypeScript = fs.existsSync(paths.appTsConfig);
const urls = prepareUrls(protocol, HOST, port);
const devSocket = {
warnings: warnings =>
devServer.sockWrite(devServer.sockets, 'warnings', warnings),
errors: errors =>
devServer.sockWrite(devServer.sockets, 'errors', errors),
};
// Create a webpack compiler that is configured with custom messages.
const compiler = createCompiler(webpack, config, appName, urls, useYarn);
const compiler = createCompiler({
appName,
config,
devSocket,
urls,
useYarn,
useTypeScript,
webpack,
});
// Load proxy config
const proxySetting = require(paths.appPackageJson).proxy;
const proxyConfig = prepareProxy(proxySetting, paths.appPublic);
// Serve webpack assets generated by the compiler over a web sever.
// Serve webpack assets generated by the compiler over a web server.
const serverConfig = createDevServerConfig(
proxyConfig,
urls.lanUrlForConfig
@@ -73,8 +115,41 @@ choosePort(HOST, DEFAULT_PORT)
if (isInteractive) {
clearConsole();
}
// We used to support resolving modules according to `NODE_PATH`.
// This now has been deprecated in favor of jsconfig/tsconfig.json
// This lets you use absolute paths in imports inside large monorepos:
if (process.env.NODE_PATH) {
console.log(
chalk.yellow(
'Setting NODE_PATH to resolve modules absolutely has been deprecated in favor of setting baseUrl in jsconfig.json (or tsconfig.json if you are using TypeScript) and will be removed in a future major release of create-react-app.'
)
);
console.log();
}
console.log(chalk.cyan('Starting the development server...\n'));
openBrowser(urls.localUrlForBrowser);
/**
* Handle testMode
*/
if(testMode){
compiler.hooks.done.tap('done', (stats) => {
stats = stats.toJson();
if (stats.errors && stats.errors.length > 0) {
return;
}
console.warn("App started in test mode. Closing in 5 seconds.");
let closeTimeout = setTimeout(() => {
clearTimeout(closeTimeout);
devServer.close();
process.exit();
}, 5000);
});
}
});
['SIGINT', 'SIGTERM'].forEach(function(sig) {
+31 -5
View File
@@ -15,12 +15,38 @@ process.on('unhandledRejection', err => {
// Ensure environment variables are read.
require('../config/env');
const jest = require('jest');
const argv = process.argv.slice(2);
// Watch unless on CI or in coverage mode
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
argv.push('--watch');
const jest = require('jest');
const execSync = require('child_process').execSync;
let argv = process.argv.slice(2);
function isInGitRepository() {
try {
execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });
return true;
} catch (e) {
return false;
}
}
function isInMercurialRepository() {
try {
execSync('hg --cwd . root', { stdio: 'ignore' });
return true;
} catch (e) {
return false;
}
}
// Watch unless on CI or explicitly running all tests
if (
!process.env.CI &&
argv.indexOf('--watchAll') === -1 &&
argv.indexOf('--watchAll=false') === -1
) {
// https://github.com/facebook/create-react-app/issues/5210
const hasSourceControl = isInGitRepository() || isInMercurialRepository();
argv.push(hasSourceControl ? '--watch' : '--watchAll');
}
-57
View File
@@ -1,57 +0,0 @@
import React, {Component} from 'react';
import Keyboard from '../lib';
class App extends Component {
onChange = (input) => {
console.log("Input changed", input);
}
onKeyPress = (button) => {
console.log("Button pressed", button);
}
render(){
return (
<div>
<Keyboard
onChange={input => this.onChange(input)}
onKeyPress={button => this.onKeyPress(button)}
layoutName={"default"}
layout={{
'default': [
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
'{tab} q w e r t y u i o p [ ] \\',
'{lock} a s d f g h j k l ; \' {enter}',
'{shift} z x c v b n m , . / {shift}',
'.com @ {space}'
],
'shift': [
'~ ! @ # $ % ^ & * ( ) _ + {bksp}',
'{tab} Q W E R T Y U I O P { } |',
'{lock} A S D F G H J K L : " {enter}',
'{shift} Z X C V B N M < > ? {shift}',
'.com @ {space}'
]
}}
theme={"hg-layout-default hg-theme-default"}
debug={true}
display={{
'{bksp}': 'delete',
'{enter}': '< enter',
'{shift}': 'shift',
'{s}': 'shift',
'{tab}': 'tab',
'{lock}': 'caps',
'{accept}': 'Submit',
'{space}': ' ',
'{//}': ' '
}}
/>
</div>
);
}
}
export default App;
+55
View File
@@ -0,0 +1,55 @@
import Keyboard from "../lib";
import "./css/BasicDemo.css";
const setDOM = () => {
document.querySelector("#root").innerHTML = `
<input class="input" placeholder="Tap on the virtual keyboard to start" />
<div class="simple-keyboard"></div>
`;
};
class Demo {
constructor() {
setDOM();
/**
* Demo Start
*/
this.keyboard = new Keyboard({
onChange: input => this.onChange(input),
onKeyPress: button => this.onKeyPress(button)
});
/**
* Update simple-keyboard when input is changed directly
*/
document.querySelector(".input").addEventListener("input", event => {
this.keyboard.setInput(event.target.value);
});
}
onChange(input) {
document.querySelector(".input").value = input;
console.log("Input changed", input);
}
onKeyPress(button) {
console.log("Button pressed", button);
/**
* If you want to handle the shift and caps lock buttons
*/
if (button === "{shift}" || button === "{lock}") this.handleShift();
}
handleShift() {
let currentLayout = this.keyboard.options.layoutName;
let shiftToggle = currentLayout === "default" ? "shift" : "default";
this.keyboard.setOptions({
layoutName: shiftToggle
});
}
}
export default Demo;
+73
View File
@@ -0,0 +1,73 @@
import Keyboard from "../lib";
import "./css/ButtonThemeDemo.css";
const setDOM = () => {
document.querySelector("#root").innerHTML = `
<input class="input" placeholder="Tap on the virtual keyboard to start" />
<div class="simple-keyboard"></div>
`;
};
class Demo {
constructor() {
setDOM();
/**
* Demo Start
*/
this.keyboard = new Keyboard({
theme: "hg-theme-default my-theme",
onChange: input => this.onChange(input),
onKeyPress: button => this.onKeyPress(button),
buttonTheme: [
{
class: "my-button",
buttons: "{enter} {bksp} q Q"
},
{
class: "my-button-outline",
buttons: "q Q b B"
}
],
buttonAttributes: [
{
attribute: "aria-label",
value: "bee",
buttons: "b B"
}
]
});
/**
* Update simple-keyboard when input is changed directly
*/
document.querySelector(".input").addEventListener("input", event => {
this.keyboard.setInput(event.target.value);
});
}
onChange(input) {
document.querySelector(".input").value = input;
console.log("Input changed", input);
}
onKeyPress(button) {
console.log("Button pressed", button);
/**
* If you want to handle the shift and caps lock buttons
*/
if (button === "{shift}" || button === "{lock}") this.handleShift();
}
handleShift() {
let currentLayout = this.keyboard.options.layoutName;
let shiftToggle = currentLayout === "default" ? "shift" : "default";
this.keyboard.setOptions({
layoutName: shiftToggle
});
}
}
export default Demo;
+157
View File
@@ -0,0 +1,157 @@
import Keyboard from "../lib";
import "./css/FullKeyboardDemo.css";
const setDOM = () => {
document.querySelector("#root").innerHTML = `
<input class="input" placeholder="Tap on the virtual keyboard to start" />
<div class="keyboardContainer">
<div class="simple-keyboard-main"></div>
<div class="controlArrows">
<div class="simple-keyboard-control"></div>
<div class="simple-keyboard-arrows"></div>
</div>
<div class="numPad">
<div class="simple-keyboard-numpad"></div>
<div class="simple-keyboard-numpadEnd"></div>
</div>
</div>
`;
};
class Demo {
constructor() {
setDOM();
/**
* Demo Start
*/
let commonKeyboardOptions = {
onChange: input => this.onChange(input),
onKeyPress: button => this.onKeyPress(button),
theme: "simple-keyboard hg-theme-default hg-layout-default",
physicalKeyboardHighlight: true,
syncInstanceInputs: true,
mergeDisplay: true,
debug: true
};
this.keyboard = new Keyboard(".simple-keyboard-main", {
...commonKeyboardOptions,
/**
* Layout by:
* Sterling Butters (https://github.com/SterlingButters)
*/
layout: {
default: [
"{escape} {f1} {f2} {f3} {f4} {f5} {f6} {f7} {f8} {f9} {f10} {f11} {f12}",
"` 1 2 3 4 5 6 7 8 9 0 - = {backspace}",
"{tab} q w e r t y u i o p [ ] \\",
"{capslock} a s d f g h j k l ; ' {enter}",
"{shiftleft} z x c v b n m , . / {shiftright}",
"{controlleft} {altleft} {metaleft} {space} {metaright} {altright}"
],
shift: [
"{escape} {f1} {f2} {f3} {f4} {f5} {f6} {f7} {f8} {f9} {f10} {f11} {f12}",
"~ ! @ # $ % ^ & * ( ) _ + {backspace}",
"{tab} Q W E R T Y U I O P { } |",
'{capslock} A S D F G H J K L : " {enter}',
"{shiftleft} Z X C V B N M < > ? {shiftright}",
"{controlleft} {altleft} {metaleft} {space} {metaright} {altright}"
]
},
display: {
"{escape}": "esc ⎋",
"{tab}": "tab ⇥",
"{backspace}": "backspace ⌫",
"{enter}": "enter ↵",
"{capslock}": "caps lock ⇪",
"{shiftleft}": "shift ⇧",
"{shiftright}": "shift ⇧",
"{controlleft}": "ctrl ⌃",
"{controlright}": "ctrl ⌃",
"{altleft}": "alt ⌥",
"{altright}": "alt ⌥",
"{metaleft}": "cmd ⌘",
"{metaright}": "cmd ⌘"
}
});
this.keyboardControlPad = new Keyboard(".simple-keyboard-control", {
...commonKeyboardOptions,
layout: {
default: [
"{prtscr} {scrolllock} {pause}",
"{insert} {home} {pageup}",
"{delete} {end} {pagedown}"
]
}
});
this.keyboardArrows = new Keyboard(".simple-keyboard-arrows", {
...commonKeyboardOptions,
layout: {
default: ["{arrowup}", "{arrowleft} {arrowdown} {arrowright}"]
}
});
this.keyboardNumPad = new Keyboard(".simple-keyboard-numpad", {
...commonKeyboardOptions,
layout: {
default: [
"{numlock} {numpaddivide} {numpadmultiply}",
"{numpad7} {numpad8} {numpad9}",
"{numpad4} {numpad5} {numpad6}",
"{numpad1} {numpad2} {numpad3}",
"{numpad0} {numpaddecimal}"
]
}
});
this.keyboardNumPadEnd = new Keyboard(".simple-keyboard-numpadEnd", {
...commonKeyboardOptions,
layout: {
default: ["{numpadsubtract}", "{numpadadd}", "{numpadenter}"]
}
});
document.querySelector(".input").addEventListener("input", event => {
let input = document.querySelector(".input").value;
this.keyboard.setInput(input);
});
}
onChange(input) {
document.querySelector(".input").value = input;
this.keyboard.setInput(input);
console.log("Input changed", input);
}
onKeyPress(button) {
console.log("Button pressed", button);
/**
* If you want to handle the shift and caps lock buttons
*/
if (
button === "{shift}" ||
button === "{shiftleft}" ||
button === "{shiftright}" ||
button === "{capslock}"
)
this.handleShift();
}
handleShift() {
let currentLayout = this.keyboard.options.layoutName;
let shiftToggle = currentLayout === "default" ? "shift" : "default";
this.keyboard.setOptions({
layoutName: shiftToggle
});
}
}
export default Demo;
+12
View File
@@ -0,0 +1,12 @@
input {
width: 100%;
height: 100px;
padding: 20px;
font-size: 20px;
border: none;
box-sizing: border-box;
}
.simple-keyboard {
max-width: 850px;
}
+26
View File
@@ -0,0 +1,26 @@
input {
width: 100%;
height: 100px;
padding: 20px;
font-size: 20px;
border: none;
box-sizing: border-box;
}
.simple-keyboard {
max-width: 850px;
}
.simple-keyboard.my-theme .hg-button.my-button {
background: blue;
color: white;
}
.simple-keyboard.my-theme .hg-button[aria-label] {
background: black;
color: white;
}
.simple-keyboard.my-theme .hg-button.my-button-outline {
border: 2px solid red;
}
+132
View File
@@ -0,0 +1,132 @@
input {
width: 100%;
height: 100px;
padding: 20px;
font-size: 20px;
border: none;
box-sizing: border-box;
}
.keyboardContainer {
display: flex;
background-color: rgba(0, 0, 0, 0.1);
justify-content: center;
width: 1024px;
border-radius: 5px;
}
.simple-keyboard.hg-theme-default {
display: inline-block;
}
.simple-keyboard-main.simple-keyboard {
width: 640px;
min-width: 640px;
background: none;
}
.simple-keyboard-main.simple-keyboard .hg-row:first-child {
margin-bottom: 10px;
}
.simple-keyboard-arrows.simple-keyboard {
align-self: flex-end;
background: none;
}
.simple-keyboard .hg-button.selectedButton {
background: rgba(5, 25, 70, 0.53);
color: white;
}
.simple-keyboard .hg-button.emptySpace {
pointer-events: none;
background: none;
border: none;
box-shadow: none;
}
.simple-keyboard-arrows .hg-row {
justify-content: center;
}
.simple-keyboard-arrows .hg-button {
width: 50px;
flex-grow: 0;
justify-content: center;
display: flex;
align-items: center;
}
.controlArrows {
display: flex;
align-items: center;
justify-content: space-between;
flex-flow: column;
}
.simple-keyboard-control.simple-keyboard {
background: none;
}
.simple-keyboard-control.simple-keyboard .hg-row:first-child {
margin-bottom: 10px;
}
.simple-keyboard-control .hg-button {
width: 50px;
flex-grow: 0;
justify-content: center;
display: flex;
align-items: center;
}
.numPad {
display: flex;
align-items: flex-end;
}
.simple-keyboard-numpad.simple-keyboard {
background: none;
}
.simple-keyboard-numpad.simple-keyboard {
width: 160px;
}
.simple-keyboard-numpad.simple-keyboard .hg-button {
width: 50px;
justify-content: center;
display: flex;
align-items: center;
}
.simple-keyboard-numpadEnd.simple-keyboard {
width: 50px;
background: none;
margin: 0;
padding: 5px 5px 5px 0;
}
.simple-keyboard-numpadEnd.simple-keyboard .hg-button {
align-items: center;
justify-content: center;
display: flex;
}
.simple-keyboard-numpadEnd .hg-button.hg-standardBtn.hg-button-plus {
height: 85px;
}
.simple-keyboard-numpadEnd.simple-keyboard .hg-button.hg-button-enter {
height: 85px;
}
.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {
background: rgba(5, 25, 70, 0.53);
color: white;
}
.hg-button.hg-functionBtn.hg-button-space {
width: 350px;
}
+3
View File
@@ -0,0 +1,3 @@
#root {
padding: 0px 40px;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

+17 -6
View File
@@ -1,7 +1,18 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import "./css/index.css";
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
/**
* Demos
*/
import BasicDemo from "./BasicDemo";
//import FullKeyboardDemo from "./FullKeyboardDemo";
//import ButtonThemeDemo from "./ButtonThemeDemo";
/**
* Selected demo
*/
const SELECTED_DEMO = BasicDemo;
/**
* Bootstrap
*/
new SELECTED_DEMO();
-108
View File
@@ -1,108 +0,0 @@
// In production, we register a service worker to serve assets from local cache.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on the "N+1" visit to a page, since previously
// cached resources are updated in the background.
// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
// This link also includes instructions on opting out of this behavior.
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
);
export default function register() {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(process.env.PUBLIC_URL, window.location);
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
return;
}
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
if (isLocalhost) {
// This is running on localhost. Lets check if a service worker still exists or not.
checkValidServiceWorker(swUrl);
} else {
// Is not local host. Just register service worker
registerValidSW(swUrl);
}
});
}
}
function registerValidSW(swUrl) {
navigator.serviceWorker
.register(swUrl)
.then(registration => {
registration.onupdatefound = () => {
const installingWorker = registration.installing;
installingWorker.onstatechange = () => {
if (installingWorker.state === 'installed') {
if (navigator.serviceWorker.controller) {
// At this point, the old content will have been purged and
// the fresh content will have been added to the cache.
// It's the perfect time to display a "New content is
// available; please refresh." message in your web app.
console.log('New content is available; please refresh.');
} else {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
console.log('Content is cached for offline use.');
}
}
};
};
})
.catch(error => {
console.error('Error during service worker registration:', error);
});
}
function checkValidServiceWorker(swUrl) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl)
.then(response => {
// Ensure service worker exists, and that we really are getting a JS file.
if (
response.status === 404 ||
response.headers.get('content-type').indexOf('javascript') === -1
) {
// No service worker found. Probably a different app. Reload the page.
navigator.serviceWorker.ready.then(registration => {
registration.unregister().then(() => {
window.location.reload();
});
});
} else {
// Service worker found. Proceed as normal.
registerValidSW(swUrl);
}
})
.catch(() => {
console.log(
'No internet connection found. App is running in offline mode.'
);
});
}
export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then(registration => {
registration.unregister();
});
}
}
+61
View File
@@ -0,0 +1,61 @@
import TestUtility from '../../utils/TestUtility';
import BasicDemo from '../BasicDemo';
let testUtil = new TestUtility();
it('Demo will load', () => {
testUtil.setDOM();
let demo = new BasicDemo();
});
it('Demo onDOMLoaded will work', () => {
testUtil.setDOM();
let demo = new BasicDemo();
expect(demo.keyboard).toBeTruthy();
});
it('Demo onChange will work', () => {
testUtil.setDOM();
let demo = new BasicDemo();
demo.onChange("test");
expect(document.body.querySelector('.input').value).toBe("test");
});
it('Demo onChange will work', () => {
testUtil.setDOM();
let demo = new BasicDemo();
demo.keyboard.getButtonElement("q").onclick();
expect(document.body.querySelector('.input').value).toBe("q");
});
it('Demo input change will work', () => {
testUtil.setDOM();
let demo = new BasicDemo();
document.body.querySelector('.input').value = "test";
document.body.querySelector('.input').dispatchEvent(new Event('input'));
expect(demo.keyboard.getInput()).toBe("test");
});
it('Demo handleShiftButton will work', () => {
testUtil.setDOM();
let demo = new BasicDemo();
demo.keyboard.getButtonElement("{shift}")[0].onclick();
expect(demo.keyboard.options.layoutName).toBe("shift");
demo.keyboard.getButtonElement("{shift}")[0].onclick();
expect(demo.keyboard.options.layoutName).toBe("default");
});
+77
View File
@@ -0,0 +1,77 @@
import TestUtility from '../../utils/TestUtility';
import ButtonThemeDemo from '../ButtonThemeDemo';
let testUtil = new TestUtility();
it('Demo will load', () => {
testUtil.setDOM();
let demo = new ButtonThemeDemo();
});
it('Demo onDOMLoaded will work', () => {
testUtil.setDOM();
let demo = new ButtonThemeDemo();
expect(demo.keyboard).toBeTruthy();
});
it('Demo onChange will work', () => {
testUtil.setDOM();
let demo = new ButtonThemeDemo();
demo.onChange("test");
expect(document.body.querySelector('.input').value).toBe("test");
});
it('Demo onChange will work', () => {
testUtil.setDOM();
let demo = new ButtonThemeDemo();
demo.keyboard.getButtonElement("q").onclick();
expect(document.body.querySelector('.input').value).toBe("q");
});
it('Demo input change will work', () => {
testUtil.setDOM();
let demo = new ButtonThemeDemo();
document.body.querySelector('.input').value = "test";
document.body.querySelector('.input').dispatchEvent(new Event('input'));
expect(demo.keyboard.getInput()).toBe("test");
});
it('Demo handleShiftButton will work', () => {
testUtil.setDOM();
let demo = new ButtonThemeDemo();
demo.keyboard.getButtonElement("{shift}")[0].onclick();
expect(demo.keyboard.options.layoutName).toBe("shift");
demo.keyboard.getButtonElement("{shift}")[0].onclick();
expect(demo.keyboard.options.layoutName).toBe("default");
});
it('Demo buttons will have proper attributes and classes', () => {
testUtil.setDOM();
let demo = new ButtonThemeDemo();
let buttonDOM = demo.keyboard.getButtonElement("b");
console.log("buttonDOM", buttonDOM.outerHTML);
let hasAttribute = buttonDOM.hasAttribute("aria-label");
expect(hasAttribute).toBeTruthy();
let hasClass = buttonDOM.classList.contains("my-button-outline");
expect(hasClass).toBeTruthy();
});
+62
View File
@@ -0,0 +1,62 @@
import TestUtility from '../../utils/TestUtility';
import FullKeyboardDemo from '../FullKeyboardDemo';
let testUtil = new TestUtility();
it('Demo will load', () => {
testUtil.setDOM();
let demo = new FullKeyboardDemo();
});
it('Demo onDOMLoaded will work', () => {
testUtil.setDOM();
let demo = new FullKeyboardDemo();
expect(demo.keyboard).toBeTruthy();
});
it('Demo onChange will work', () => {
testUtil.setDOM();
let demo = new FullKeyboardDemo();
demo.onChange("test");
expect(document.body.querySelector('.input').value).toBe("test");
});
it('Demo onChange will work', () => {
testUtil.setDOM();
let demo = new FullKeyboardDemo();
demo.keyboard.getButtonElement("q").onclick();
expect(document.body.querySelector('.input').value).toBe("q");
});
it('Demo input change will work', () => {
testUtil.setDOM();
let demo = new FullKeyboardDemo();
document.body.querySelector('.input').value = "test";
document.body.querySelector('.input').dispatchEvent(new Event('input'));
expect(demo.keyboard.getInput()).toBe("test");
expect(demo.keyboardNumPad.getInput()).toBe("test");
});
it('Demo handleShiftButton will work', () => {
testUtil.setDOM();
let demo = new FullKeyboardDemo();
demo.keyboard.getButtonElement("{shiftleft}").onclick();
expect(demo.keyboard.options.layoutName).toBe("shift");
demo.keyboard.getButtonElement("{shiftright}").onclick();
expect(demo.keyboard.options.layoutName).toBe("default");
});
+266
View File
@@ -0,0 +1,266 @@
declare module 'simple-keyboard' {
interface KeyboardLayoutObject {
default: string[];
shift?: any;
[key: string]: string[];
}
interface KeyboardButtonTheme {
class: string;
buttons: string;
}
interface KeyboardButtonAttributes {
attribute: string;
value: string;
buttons: string;
}
interface KeyboardOptions {
/**
* Modify the keyboard layout.
*/
layout?: KeyboardLayoutObject;
/**
* Specifies which layout should be used.
*/
layoutName?: string;
/**
* Replaces variable buttons (such as `{bksp}`) with a human-friendly name (e.g.: `backspace`).
*/
display?: { [button: string]: string };
/**
* By default, when you set the display property, you replace the default one. This setting merges them instead.
*/
mergeDisplay?: boolean;
/**
* A prop to add your own css classes to the keyboard wrapper. You can add multiple classes separated by a space.
*/
theme?: string;
/**
* A prop to add your own css classes to one or several buttons.
*/
buttonTheme?: KeyboardButtonTheme[];
/**
* A prop to add your own attributes to one or several buttons.
*/
buttonAttributes?: KeyboardButtonAttributes[];
/**
* Runs a `console.log` every time a key is pressed. Displays the buttons pressed and the current input.
*/
debug?: boolean;
/**
* Specifies whether clicking the "ENTER" button will input a newline (`\n`) or not.
*/
newLineOnEnter?: boolean;
/**
* Specifies whether clicking the "TAB" button will input a tab character (`\t`) or not.
*/
tabCharOnTab?: boolean;
/**
* Allows you to use a single simple-keyboard instance for several inputs.
*/
inputName?: string;
/**
* `number`: Restrains all of simple-keyboard inputs to a certain length. This should be used in addition to the input elements maxlengthattribute.
*
* `{ [inputName: string]: number }`: Restrains simple-keyboards individual inputs to a certain length. This should be used in addition to the input elements maxlengthattribute.
*/
maxLength?: any;
/**
* When set to true, this option synchronizes the internal input of every simple-keyboard instance.
*/
syncInstanceInputs?: boolean;
/**
* Enable highlighting of keys pressed on physical keyboard.
*/
physicalKeyboardHighlight?: boolean;
/**
* Calling preventDefault for the mousedown events keeps the focus on the input.
*/
preventMouseDownDefault?: boolean;
/**
* Define the text color that the physical keyboard highlighted key should have.
*/
physicalKeyboardHighlightTextColor?: string;
/**
* Define the background color that the physical keyboard highlighted key should have.
*/
physicalKeyboardHighlightBgColor?: string;
/**
* Render buttons as a button element instead of a div element.
*/
useButtonTag?: boolean;
/**
* A prop to ensure characters are always be added/removed at the end of the string.
*/
disableCaretPositioning?: boolean;
/**
* Restrains input(s) change to the defined regular expression pattern.
*/
inputPattern?: any;
/**
* Instructs simple-keyboard to use touch events instead of click events.
*/
useTouchEvents?: boolean;
/**
* Enable useTouchEvents automatically when touch device is detected.
*/
autoUseTouchEvents?: boolean;
/**
* Opt out of PointerEvents handling, falling back to the prior mouse event logic.
*/
useMouseEvents?: boolean;
/**
* Disable button hold action.
*/
disableButtonHold?: boolean;
/**
* Executes the callback function on key press. Returns button layout name (i.e.: "{shift}").
*/
onKeyPress?: (button: string) => any;
/**
* Executes the callback function on key release.
*/
onKeyReleased?: (button: string) => any;
/**
* Executes the callback function on input change. Returns the current input's string.
*/
onChange?: (input: string) => any;
/**
* Executes the callback function before the first simple-keyboard render.
*/
beforeFirstRender?: () => void;
/**
* Executes the callback function before a simple-keyboard render.
*/
beforeRender?: () => void;
/**
* Executes the callback function every time simple-keyboard is rendered (e.g: when you change layouts).
*/
onRender?: () => void;
/**
* Executes the callback function once simple-keyboard is rendered for the first time (on initialization).
*/
onInit?: () => void;
/**
* Executes the callback function on input change. Returns the input object with all defined inputs.
*/
onChangeAll?: (inputs: any) => any;
/**
* Executes the callback function on key release.
*/
onKeyReleased?: () => void;
}
class Keyboard {
constructor(selector: string, options: KeyboardOptions);
constructor(options: KeyboardOptions);
/**
* Options
*/
options: KeyboardOptions;
/**
* Utilities
*/
utilities?: any;
/**
* caretPosition
*/
caretPosition?: number;
/**
* Adds/Modifies an entry to the `buttonTheme`. Basically a way to add a class to a button.
* @param {string} buttons List of buttons to select (separated by a space).
* @param {string} className Classes to give to the selected buttons (separated by space).
*/
addButtonTheme(buttons: string, className: string): void;
/**
* Removes/Amends an entry to the `buttonTheme`. Basically a way to remove a class previously added to a button through buttonTheme or addButtonTheme.
* @param {string} buttons List of buttons to select (separated by a space).
* @param {string} className Classes to give to the selected buttons (separated by space).
*/
removeButtonTheme(buttons: string, className: string): void;
/**
* Clear the keyboard's input.
*
* @param {string} [inputName] optional - the internal input to select
*/
clearInput(inputName?: string): void;
/**
* Get the keyboards input (You can also get it from the onChange prop).
* @param {string} [inputName] optional - the internal input to select
*/
getInput(inputName?: string): string;
/**
* Set the keyboards input.
* @param {string} input the input value
* @param {string} inputName optional - the internal input to select
*/
setInput(input: string, inputName?: string): void;
/**
* Set new option or modify existing ones after initialization.
* @param {KeyboardOptions} option The option to set
*/
setOptions(options: KeyboardOptions): void;
/**
* Send a command to all simple-keyboard instances at once (if you have multiple instances).
* @param {function(instance: object, key: string)} callback Function to run on every instance
*/
dispatch(callback: (instance: any, key: string) => void): void;
/**
* Get the DOM Element of a button. If there are several buttons with the same name, an array of the DOM Elements is returned.
* @param {string} button The button layout name to select
*/
getButtonElement(button: string): HTMLElement | HTMLElement[];
/**
* Clears keyboard listeners and DOM elements.
*/
destroy(): void;
}
export default Keyboard;
}
+74 -15
View File
@@ -1,14 +1,17 @@
body, html {
body,
html {
margin: 0;
padding: 0;
}
.simple-keyboard {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue",
Helvetica, Arial, "Lucida Grande", sans-serif;
width: 100%;
user-select: none;
box-sizing: border-box;
overflow: hidden;
touch-action: manipulation;
}
.simple-keyboard .hg-row {
@@ -23,39 +26,95 @@ body, html {
margin-right: 5px;
}
.simple-keyboard .hg-row .hg-button-container {
margin-right: 5px;
}
.simple-keyboard .hg-row > div:last-child {
margin-right: 0;
}
.simple-keyboard .hg-row .hg-button-container {
display: flex;
}
.simple-keyboard .hg-button {
display: inline-block;
flex-grow: 1;
cursor: pointer;
}
.simple-keyboard.hg-layout-default .hg-button.hg-standardBtn {
max-width: 100px;
.simple-keyboard .hg-button span {
pointer-events: none;
}
/**
* hg-theme-default theme
*/
.simple-keyboard.hg-theme-default {
background-color: rgba(0,0,0,0.2);
padding: 5px;
border-radius: 5px;
}
.simple-keyboard.hg-theme-default {
background-color: rgba(0, 0, 0, 0.1);
padding: 5px;
border-radius: 5px;
}
.simple-keyboard.hg-theme-default .hg-button {
box-shadow: 0px 0px 51px -2px rgba(0,0,0,0.3);
.simple-keyboard.hg-theme-default .hg-button {
box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);
height: 40px;
border: 1px solid rgba(0,0,0,0.25);
border-radius: 5px;
box-sizing: border-box;
padding: 5px;
background: white;
}
border-bottom: 1px solid #b5b5b5;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {
/* When using option "useButtonTag" */
.simple-keyboard button.hg-button {
border-width: 0;
outline: 0;
font-size: inherit;
}
.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {
width: 33.3%;
height: 60px;
align-items: center;
display: flex;
justify-content: center;
}
}
.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadadd {
height: 85px;
}
.simple-keyboard.hg-theme-default .hg-button.hg-button-numpadenter {
height: 85px;
}
.simple-keyboard.hg-theme-default .hg-button.hg-button-numpad0 {
width: 105px;
}
.simple-keyboard.hg-theme-default .hg-button.hg-button-com {
max-width: 85px;
}
.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn.hg-button-at {
max-width: 45px;
}
.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {
background: rgba(5, 25, 70, 0.53);
color: white;
}
.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"] {
max-width: 82px;
}
.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"] {
max-width: 60px;
}
File diff suppressed because it is too large Load Diff
-8
View File
@@ -1,8 +0,0 @@
import React from 'react';
import ReactDOM from 'react-dom';
import Keyboard from './Keyboard';
it('Keyboard renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<Keyboard />, div);
});
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,2 +1,2 @@
import Keyboard from './components/Keyboard';
export default Keyboard;
import SimpleKeyboard from "./components/Keyboard";
export default SimpleKeyboard;
+25 -33
View File
@@ -1,37 +1,29 @@
/**
* Keyboard Layout Service
*/
class KeyboardLayout {
static getLayout = layout => {
if(layout === "qwerty"){
return {
'default': [
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
'{tab} q w e r t y u i o p [ ] \\',
'{lock} a s d f g h j k l ; \' {enter}',
'{shift} z x c v b n m , . / {shift}',
'.com @ {space}'
],
'shift': [
'~ ! @ # $ % ^ & * ( ) _ + {bksp}',
'{tab} Q W E R T Y U I O P { } |',
'{lock} A S D F G H J K L : " {enter}',
'{shift} Z X C V B N M < > ? {shift}',
'.com @ {space}'
]
};
} else if(layout === "numeric"){
return {
'default': [
'1 2 3',
'4 5 6',
'7 8 9',
'{//} 0 {bksp}'
]
};
} else {
return KeyboardLayout.getLayout("qwerty");
}
/**
* Get default simple-keyboard layout
* @return {object} The default layout (US-QWERTY)
*/
static getDefaultLayout() {
return {
default: [
"` 1 2 3 4 5 6 7 8 9 0 - = {bksp}",
"{tab} q w e r t y u i o p [ ] \\",
"{lock} a s d f g h j k l ; ' {enter}",
"{shift} z x c v b n m , . / {shift}",
".com @ {space}"
],
shift: [
"~ ! @ # $ % ^ & * ( ) _ + {bksp}",
"{tab} Q W E R T Y U I O P { } |",
'{lock} A S D F G H J K L : " {enter}',
"{shift} Z X C V B N M < > ? {shift}",
".com @ {space}"
]
};
}
}
export default KeyboardLayout;
export default KeyboardLayout;
+92
View File
@@ -0,0 +1,92 @@
import Utilities from "../services/Utilities";
/**
* Physical Keyboard Service
*/
class PhysicalKeyboard {
/**
* Creates an instance of the PhysicalKeyboard service
*/
constructor({ dispatch, getOptions }) {
/**
* @type {object} A simple-keyboard instance
*/
this.dispatch = dispatch;
this.getOptions = getOptions;
/**
* Bindings
*/
Utilities.bindMethods(PhysicalKeyboard, this);
}
handleHighlightKeyDown(event) {
let options = this.getOptions();
let buttonPressed = this.getSimpleKeyboardLayoutKey(event);
this.dispatch(instance => {
let buttonDOM =
instance.getButtonElement(buttonPressed) ||
instance.getButtonElement(`{${buttonPressed}}`);
if (buttonDOM) {
buttonDOM.style.backgroundColor =
options.physicalKeyboardHighlightBgColor || "#9ab4d0";
buttonDOM.style.color =
options.physicalKeyboardHighlightTextColor || "white";
}
});
}
handleHighlightKeyUp(event) {
let buttonPressed = this.getSimpleKeyboardLayoutKey(event);
this.dispatch(instance => {
let buttonDOM =
instance.getButtonElement(buttonPressed) ||
instance.getButtonElement(`{${buttonPressed}}`);
if (buttonDOM && buttonDOM.removeAttribute) {
buttonDOM.removeAttribute("style");
}
});
}
/**
* Transforms a KeyboardEvent's "key.code" string into a simple-keyboard layout format
* @param {object} event The KeyboardEvent
*/
getSimpleKeyboardLayoutKey(event) {
let output;
if (
event.code.includes("Numpad") ||
event.code.includes("Shift") ||
event.code.includes("Space") ||
event.code.includes("Backspace") ||
event.code.includes("Control") ||
event.code.includes("Alt") ||
event.code.includes("Meta")
) {
output = event.code;
} else {
output = event.key;
}
/**
* If button is not uppercase, casting to lowercase
*/
if (
output !== output.toUpperCase() ||
(event.code[0] === "F" &&
Number.isInteger(Number(event.code[1])) &&
event.code.length <= 3)
) {
output = output.toLowerCase();
}
return output;
}
}
export default PhysicalKeyboard;
+382 -61
View File
@@ -1,85 +1,406 @@
/**
* Utility Service
*/
class Utilities {
static normalizeString(string){
let output;
/**
* Creates an instance of the Utility service
*/
constructor({ getOptions, getCaretPosition, dispatch }) {
this.getOptions = getOptions;
this.getCaretPosition = getCaretPosition;
this.dispatch = dispatch;
if(string === "@")
output = 'at';
else if(string === ",")
output = 'comma';
else if(string === ".")
output = 'dot';
else if(string === "\\")
output = 'backslash';
else if(string === "/")
output = 'fordardslash';
else if(string === "*")
output = 'asterisk';
else if(string === "&")
output = 'ampersand';
else if(string === "$")
output = 'dollarsign';
else if(string === "=")
output = 'equals';
else if(string === "-")
output = 'minus';
else if(string === "'")
output = 'apostrophe';
else if(string === ";")
output = 'colon';
else if(string === "[")
output = 'openbracket';
else if(string === "]")
output = 'closebracket';
else if(string === "//")
output = 'emptybutton';
else
output = '';
return output ? ` hg-button-${output}` : '';
/**
* Bindings
*/
Utilities.bindMethods(Utilities, this);
}
static getButtonClass = button => {
let buttonTypeClass = (button.includes("{") && button !== '{//}') ? "functionBtn" : "standardBtn";
/**
* Adds default classes to a given button
*
* @param {string} button The button's layout name
* @return {string} The classes to be added to the button
*/
getButtonClass(button) {
let buttonTypeClass =
button.includes("{") && button.includes("}") && button !== "{//}"
? "functionBtn"
: "standardBtn";
let buttonWithoutBraces = button.replace("{", "").replace("}", "");
let buttonNormalized = "";
let buttonNormalized =
buttonTypeClass === "standardBtn" ?
Utilities.normalizeString(buttonWithoutBraces) : ` hg-button-${buttonWithoutBraces}`;
if (buttonTypeClass !== "standardBtn")
buttonNormalized = ` hg-button-${buttonWithoutBraces}`;
return `hg-${buttonTypeClass}${buttonNormalized}`;
}
static getDefaultDiplay(){
/**
* Default button display labels
*/
getDefaultDiplay() {
return {
'{bksp}': 'delete',
'{enter}': '< enter',
'{shift}': 'shift',
'{s}': 'shift',
'{tab}': 'tab',
'{lock}': 'caps',
'{accept}': 'Submit',
'{space}': ' ',
'{//}': ' '
"{bksp}": "backspace",
"{backspace}": "backspace",
"{enter}": "< enter",
"{shift}": "shift",
"{shiftleft}": "shift",
"{shiftright}": "shift",
"{alt}": "alt",
"{s}": "shift",
"{tab}": "tab",
"{lock}": "caps",
"{capslock}": "caps",
"{accept}": "Submit",
"{space}": " ",
"{//}": " ",
"{esc}": "esc",
"{escape}": "esc",
"{f1}": "f1",
"{f2}": "f2",
"{f3}": "f3",
"{f4}": "f4",
"{f5}": "f5",
"{f6}": "f6",
"{f7}": "f7",
"{f8}": "f8",
"{f9}": "f9",
"{f10}": "f10",
"{f11}": "f11",
"{f12}": "f12",
"{numpaddivide}": "/",
"{numlock}": "lock",
"{arrowup}": "↑",
"{arrowleft}": "←",
"{arrowdown}": "↓",
"{arrowright}": "→",
"{prtscr}": "print",
"{scrolllock}": "scroll",
"{pause}": "pause",
"{insert}": "ins",
"{home}": "home",
"{pageup}": "up",
"{delete}": "del",
"{end}": "end",
"{pagedown}": "down",
"{numpadmultiply}": "*",
"{numpadsubtract}": "-",
"{numpadadd}": "+",
"{numpadenter}": "enter",
"{period}": ".",
"{numpaddecimal}": ".",
"{numpad0}": "0",
"{numpad1}": "1",
"{numpad2}": "2",
"{numpad3}": "3",
"{numpad4}": "4",
"{numpad5}": "5",
"{numpad6}": "6",
"{numpad7}": "7",
"{numpad8}": "8",
"{numpad9}": "9"
};
}
/**
* Returns the display (label) name for a given button
*
* @param {string} button The button's layout name
* @param {object} display The provided display option
* @param {boolean} mergeDisplay Whether the provided param value should be merged with the default one.
*/
getButtonDisplayName(button, display, mergeDisplay) {
if (mergeDisplay) {
display = Object.assign({}, this.getDefaultDiplay(), display);
} else {
display = display || this.getDefaultDiplay();
}
static getButtonDisplayName = (button, display) => {
display = display || Utilities.getDefaultDiplay();
return display[button] || button;
}
static getUpdatedInput = (button, input) => {
/**
* Returns the updated input resulting from clicking a given button
*
* @param {string} button The button's layout name
* @param {string} input The input string
* @param {number} caretPos The cursor's current position
* @param {boolean} moveCaret Whether to update simple-keyboard's cursor
*/
getUpdatedInput(button, input, caretPos, moveCaret) {
let options = this.getOptions();
let output = input;
if(button === "{bksp}" && output.length > 0)
output = output.slice(0, -1);
else if(button === "{space}")
output = output + ' ';
else if(!button.includes("{") && !button.includes("{"))
output = output + button;
if (
(button === "{bksp}" || button === "{backspace}") &&
output.length > 0
) {
output = this.removeAt(output, caretPos, moveCaret);
} else if (button === "{space}")
output = this.addStringAt(output, " ", caretPos, moveCaret);
else if (
button === "{tab}" &&
!(
typeof options.tabCharOnTab === "boolean" &&
options.tabCharOnTab === false
)
) {
output = this.addStringAt(output, "\t", caretPos, moveCaret);
} else if (
(button === "{enter}" || button === "{numpadenter}") &&
options.newLineOnEnter
)
output = this.addStringAt(output, "\n", caretPos, moveCaret);
else if (
button.includes("numpad") &&
Number.isInteger(Number(button[button.length - 2]))
) {
output = this.addStringAt(
output,
button[button.length - 2],
caretPos,
moveCaret
);
} else if (button === "{numpaddivide}")
output = this.addStringAt(output, "/", caretPos, moveCaret);
else if (button === "{numpadmultiply}")
output = this.addStringAt(output, "*", caretPos, moveCaret);
else if (button === "{numpadsubtract}")
output = this.addStringAt(output, "-", caretPos, moveCaret);
else if (button === "{numpadadd}")
output = this.addStringAt(output, "+", caretPos, moveCaret);
else if (button === "{numpaddecimal}")
output = this.addStringAt(output, ".", caretPos, moveCaret);
else if (button === "{" || button === "}")
output = this.addStringAt(output, button, caretPos, moveCaret);
else if (!button.includes("{") && !button.includes("}"))
output = this.addStringAt(output, button, caretPos, moveCaret);
return output;
}
/**
* Moves the cursor position by a given amount
*
* @param {number} length Represents by how many characters the input should be moved
* @param {boolean} minus Whether the cursor should be moved to the left or not.
*/
updateCaretPos(length, minus) {
let newCaretPos = this.updateCaretPosAction(length, minus);
this.dispatch(instance => {
instance.caretPosition = newCaretPos;
});
}
/**
* Action method of updateCaretPos
*
* @param {number} length Represents by how many characters the input should be moved
* @param {boolean} minus Whether the cursor should be moved to the left or not.
*/
updateCaretPosAction(length, minus) {
let options = this.getOptions();
let caretPosition = this.getCaretPosition();
if (minus) {
if (caretPosition > 0) caretPosition = caretPosition - length;
} else {
caretPosition = caretPosition + length;
}
if (options.debug) {
console.log("Caret at:", caretPosition, `(${this.keyboardDOMClass})`);
}
return caretPosition;
}
/**
* Adds a string to the input at a given position
*
* @param {string} source The source input
* @param {string} string The string to add
* @param {number} position The (cursor) position where the string should be added
* @param {boolean} moveCaret Whether to update simple-keyboard's cursor
*/
addStringAt(source, string, position, moveCaret) {
let output;
if (!position && position !== 0) {
output = source + string;
} else {
output = [source.slice(0, position), string, source.slice(position)].join(
""
);
/**
* Avoid caret position change when maxLength is set
*/
if (!this.isMaxLengthReached()) {
if (moveCaret) this.updateCaretPos(string.length);
}
}
return output;
}
/**
* Removes an amount of characters at a given position
*
* @param {string} source The source input
* @param {number} position The (cursor) position from where the characters should be removed
* @param {boolean} moveCaret Whether to update simple-keyboard's cursor
*/
removeAt(source, position, moveCaret) {
let caretPosition = this.getCaretPosition();
if (caretPosition === 0) {
return source;
}
let output;
let prevTwoChars;
let emojiMatched;
let emojiMatchedReg = /([\uD800-\uDBFF][\uDC00-\uDFFF])/g;
/**
* Emojis are made out of two characters, so we must take a custom approach to trim them.
* For more info: https://mathiasbynens.be/notes/javascript-unicode
*/
if (position && position >= 0) {
prevTwoChars = source.substring(position - 2, position);
emojiMatched = prevTwoChars.match(emojiMatchedReg);
if (emojiMatched) {
output = source.substr(0, position - 2) + source.substr(position);
if (moveCaret) this.updateCaretPos(2, true);
} else {
output = source.substr(0, position - 1) + source.substr(position);
if (moveCaret) this.updateCaretPos(1, true);
}
} else {
prevTwoChars = source.slice(-2);
emojiMatched = prevTwoChars.match(emojiMatchedReg);
if (emojiMatched) {
output = source.slice(0, -2);
if (moveCaret) this.updateCaretPos(2, true);
} else {
output = source.slice(0, -1);
if (moveCaret) this.updateCaretPos(1, true);
}
}
return output;
}
/**
* Determines whether the maxLength has been reached. This function is called when the maxLength option it set.
*
* @param {object} inputObj
* @param {string} updatedInput
*/
handleMaxLength(inputObj, updatedInput) {
let options = this.getOptions();
let maxLength = options.maxLength;
let currentInput = inputObj[options.inputName];
let condition = currentInput.length === maxLength;
if (
/**
* If pressing this button won't add more characters
* We exit out of this limiter function
*/
updatedInput.length <= currentInput.length
) {
return false;
}
if (Number.isInteger(maxLength)) {
if (options.debug) {
console.log("maxLength (num) reached:", condition);
}
if (condition) {
/**
* @type {boolean} Boolean value that shows whether maxLength has been reached
*/
this.maxLengthReached = true;
return true;
} else {
this.maxLengthReached = false;
return false;
}
}
if (typeof maxLength === "object") {
let condition = currentInput.length === maxLength[options.inputName];
if (options.debug) {
console.log("maxLength (obj) reached:", condition);
}
if (condition) {
this.maxLengthReached = true;
return true;
} else {
this.maxLengthReached = false;
return false;
}
}
}
/**
* Gets the current value of maxLengthReached
*/
isMaxLengthReached() {
return Boolean(this.maxLengthReached);
}
/**
* Determines whether a touch device is being used
*/
isTouchDevice() {
return "ontouchstart" in window || navigator.maxTouchPoints;
}
/**
* Determines whether pointer events are supported
*/
pointerEventsSupported() {
return window.PointerEvent;
}
/**
* Bind all methods in a given class
*/
static bindMethods(myClass, instance) {
for (let myMethod of Object.getOwnPropertyNames(myClass.prototype)) {
let excludeMethod =
myMethod === "constructor" || myMethod === "bindMethods";
if (!excludeMethod) {
instance[myMethod] = instance[myMethod].bind(instance);
}
}
}
/**
* Transforms an arbitrary string to camelCase
*
* @param {string} string The string to transform.
*/
camelCase(string) {
if (!string) return false;
return string
.toLowerCase()
.trim()
.split(/[.\-_\s]/g)
.reduce((string, word) =>
word.length ? string + word[0].toUpperCase() + word.slice(1) : string
);
}
}
export default Utilities;
export default Utilities;
@@ -0,0 +1,118 @@
import Keyboard from '../../components/Keyboard';
import TestUtility from '../../../utils/TestUtility';
let testUtil = new TestUtility();
it('PhysicalKeyboard keydown will be handled with physicalKeyboardHighlight', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
physicalKeyboardHighlight: true
});
document.dispatchEvent(new KeyboardEvent('keydown', {
code: "KeyF",
key: "f",
target: {
tagName: "input"
}
}));
});
it('PhysicalKeyboard keydown will be handled without physicalKeyboardHighlight', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
physicalKeyboardHighlight: false
});
document.dispatchEvent(new KeyboardEvent('keydown', {
code: "KeyF",
key: "f",
target: {
tagName: "input"
}
}));
});
it('PhysicalKeyboard keydown will not style non-existent buttons', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
physicalKeyboardHighlight: true
});
document.dispatchEvent(new KeyboardEvent('keydown', {
code: "WRONG",
key: "WRONG",
target: {
tagName: "input"
}
}));
});
it('PhysicalKeyboard keyup will be handled with physicalKeyboardHighlight', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
physicalKeyboardHighlight: true
});
document.dispatchEvent(new KeyboardEvent('keyup', {
code: "KeyF",
key: "f",
target: {
tagName: "input"
}
}));
});
it('PhysicalKeyboard keyup will be handle special buttons', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
physicalKeyboardHighlight: true
});
document.dispatchEvent(new KeyboardEvent('keyup', {
code: "Shift",
key: "Shift",
target: {
tagName: "input"
}
}));
});
it('PhysicalKeyboard keyup will not style non-existent buttons', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
physicalKeyboardHighlight: true,
debug: true
});
document.dispatchEvent(new KeyboardEvent('keyup', {
code: "WRONG",
key: "WRONG",
target: {
tagName: "input"
}
}));
});
it('PhysicalKeyboard will work with F1-F12 keys', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
physicalKeyboardHighlight: true,
debug: true
});
document.dispatchEvent(new KeyboardEvent('keyup', {
code: "F12",
key: "F12",
target: {
tagName: "input"
}
}));
});
+493
View File
@@ -0,0 +1,493 @@
import Keyboard from '../../components/Keyboard';
import TestUtility from '../../../utils/TestUtility';
let testUtil = new TestUtility();
it('Keyboard mergeDisplay will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
mergeDisplay: true,
display: {
"q": "qreplaced"
}
});
expect(keyboard.getButtonElement("q").querySelector("span").innerHTML).toBe("qreplaced");
});
it('Keyboard function buttons will work', () => {
testUtil.setDOM();
new Keyboard();
testUtil.testLayoutFctButtons((fctBtnCount, fctBtnHasOnclickCount) => {
expect(fctBtnCount).toBe(fctBtnHasOnclickCount);
});
});
it('Keyboard {bksp} button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{bksp}", "test");
expect(output).toBe("tes");
});
it('Keyboard {space} button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{space}", "test");
expect(output).toBe("test ");
});
it('Keyboard {tab} button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{tab}", "test");
expect(output).toBe("test\t");
});
it('Keyboard {tab} button will work with tabCharOnTab:false', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
tabCharOnTab: false
});
let output = keyboard.utilities.getUpdatedInput("{tab}", "test");
expect(output).toBe("test");
});
it('Keyboard {enter} button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{enter}", "test");
expect(output).toBe("test");
});
it('Keyboard {enter} button will work with newLineOnEnter:true', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
newLineOnEnter: true
});
let output = keyboard.utilities.getUpdatedInput("{enter}", "test");
expect(output).toBe("test\n");
});
it('Keyboard {numpadX} buttons will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
for(let i = 0;i<=9;i++){
let output = keyboard.utilities.getUpdatedInput(`{numpad${i}}`, "test");
expect(output).toBe(`test${i}`);
}
});
it('Keyboard {numpaddivide} button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{numpaddivide}", "test");
expect(output).toBe("test/");
});
it('Keyboard {numpadmultiply} button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{numpadmultiply}", "test");
expect(output).toBe("test*");
});
it('Keyboard {numpadsubtract} button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{numpadsubtract}", "test");
expect(output).toBe("test-");
});
it('Keyboard {numpadadd} button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{numpadadd}", "test");
expect(output).toBe("test+");
});
it('Keyboard {numpadadd} button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{numpadadd}", "test");
expect(output).toBe("test+");
});
it('Keyboard {numpaddecimal} button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{numpaddecimal}", "test");
expect(output).toBe("test.");
});
it('Keyboard custom function buttons will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
layout: {
default: [
"{randombuttontest}"
]
}
});
let output = keyboard.utilities.getUpdatedInput("{randombuttontest}", "test");
expect(output).toBe("test");
expect(keyboard.getButtonElement("{randombuttontest}").onclick).toBeTruthy();
});
it('Keyboard "{" button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("{", "test");
expect(output).toBe("test{");
});
it('Keyboard "}" button will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.getUpdatedInput("}", "test");
expect(output).toBe("test}");
});
it('Keyboard standard button will affect input', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
for (let i = 65; i <= 90; i++) {
let char = String.fromCharCode(i);
let output = keyboard.utilities.getUpdatedInput(char, "test");
expect(output).toBe(`test${char}`);
}
});
it('Keyboard updateCaretPos will work with minus', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
syncInstanceInputs: true
});
keyboard.caretPosition = 5;
keyboard.utilities.updateCaretPos(2, true);
expect(keyboard.caretPosition).toBe(3);
});
it('Keyboard updateCaretPos will work with minus', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
keyboard.caretPosition = 5;
keyboard.utilities.updateCaretPos(2, true);
expect(keyboard.caretPosition).toBe(3);
});
it('Keyboard updateCaretPos will work with plus', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
keyboard.caretPosition = 5;
keyboard.utilities.updateCaretPos(2);
expect(keyboard.caretPosition).toBe(7);
});
it('Keyboard addStringAt will work with debug', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
debug: true
});
keyboard.getButtonElement("q").onclick();
expect(keyboard.getInput()).toBe("q");
});
it('Keyboard addStringAt will work with position', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
debug: true
});
keyboard.setInput("test");
keyboard.caretPosition = 4;
keyboard.getButtonElement("q").onclick();
expect(keyboard.getInput()).toBe("testq");
});
it('Keyboard addStringAt will respect maxLength', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
debug: true,
maxLength: 4
});
keyboard.setInput("test");
keyboard.caretPosition = 4;
keyboard.utilities.handleMaxLength(keyboard.input, "testq")
keyboard.utilities.addStringAt("test", "q", 4);
expect(keyboard.caretPosition).toBe(4);
});
it('Keyboard handleMaxLength will exit out on same updatedInput', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
debug: true
});
keyboard.setInput("test");
let output = keyboard.utilities.handleMaxLength(keyboard.input, "test")
expect(output).toBeFalsy();
});
it('Keyboard handleMaxLength will work with object maxLength', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
maxLength: {
default: 4
}
});
keyboard.setInput("test");
let output = keyboard.utilities.handleMaxLength(keyboard.input, "testq");
expect(output).toBeTruthy();
});
it('Keyboard handleMaxLength will work with object maxLength and debug', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
maxLength: {
default: 4
},
debug: true
});
keyboard.setInput("test");
let output = keyboard.utilities.handleMaxLength(keyboard.input, "testq");
expect(output).toBeTruthy();
});
it('Keyboard handleMaxLength will return false if obj maxLength not reached', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
maxLength: {
default: 7
}
});
keyboard.setInput("test");
let output = keyboard.utilities.handleMaxLength(keyboard.input, "testq");
expect(output).toBeFalsy();
});
it('Keyboard handleMaxLength will work without debug', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
maxLength: 4
});
keyboard.setInput("test");
let output = keyboard.utilities.handleMaxLength(keyboard.input, "testq");
expect(output).toBeTruthy();
});
it('Keyboard handleMaxLength will work with numeric maxLength', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
maxLength: 3
});
keyboard.setInput("test");
let output = keyboard.utilities.handleMaxLength(keyboard.input, "testq");
expect(output).toBeFalsy();
});
it('Keyboard handleMaxLength wont work with non numeric or object maxLength', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
maxLength: "wrong"
});
keyboard.setInput("test");
let output = keyboard.utilities.handleMaxLength(keyboard.input, "testq");
expect(output).toBeFalsy();
});
it('Keyboard handleMaxLength wont work with non numeric or object maxLength (with debug)', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
maxLength: "wrong",
debug: true
});
keyboard.setInput("test");
let output = keyboard.utilities.handleMaxLength(keyboard.input, "testq");
expect(output).toBeFalsy();
});
it('Keyboard isMaxLengthReached will work', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
maxLength: 5
});
let output = keyboard.utilities.isMaxLengthReached();
expect(output).toBeFalsy();
});
it('Keyboard removeAt will exit out on caretPosition:0', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
keyboard.setInput("test");
keyboard.caretPosition = 0;
keyboard.utilities.removeAt(keyboard.getInput(), 0);
expect(keyboard.getInput()).toBe("test");
keyboard.setInput("test");
keyboard.caretPosition = 5;
keyboard.utilities.removeAt(keyboard.getInput(), 0, true);
expect(keyboard.caretPosition).toBe(4);
});
it('Keyboard removeAt will remove multi-byte unicodes with caretPos>0', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
keyboard.caretPosition = 6;
let output = keyboard.utilities.removeAt("test\uD83D\uDE00", 6);
expect(output).toBe("test");
keyboard.caretPosition = 6;
output = keyboard.utilities.removeAt("test\uD83D\uDE00", 6, true);
expect(keyboard.caretPosition).toBe(4);
});
it('Keyboard removeAt will not remove multi-byte unicodes with caretPos:0', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
let output = keyboard.utilities.removeAt("\uD83D\uDE00");
expect(output).toBeFalsy();
output = keyboard.utilities.removeAt("\uD83D\uDE00", 0, true);
expect(output).toBeFalsy();
});
it('Keyboard removeAt will remove regular strings', () => {
testUtil.setDOM();
let keyboard = new Keyboard({
debug: true
});
keyboard.caretPosition = 6;
let output = keyboard.utilities.removeAt("testie", 6);
expect(output).toBe("testi");
keyboard.caretPosition = 6;
output = keyboard.utilities.removeAt("testie", 6, true);
expect(keyboard.caretPosition).toBe(5);
});
it('Keyboard will work with custom (and weird) class', () => {
testUtil.setDOM("my--weird--class");
let keyboard = new Keyboard(".my--weird--class");
expect(keyboard.keyboardDOMClass).toBe("my--weird--class");
});
it('Keyboard camelCase will work with empty strings', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
expect(keyboard.utilities.camelCase()).toBeFalsy();
});
+112
View File
@@ -0,0 +1,112 @@
/**
* Test Utility Functions
*/
export default class TestUtility {
/**
* Set's a basic DOM structure to test in
*/
setDOM = (divClass) => {
this.clear();
const wrapperDOM = document.createElement('div');
wrapperDOM.setAttribute("id", "root");
const keyboardDOM = document.createElement('div');
keyboardDOM.className = divClass || "simple-keyboard";
wrapperDOM.appendChild(keyboardDOM);
document.body.appendChild(wrapperDOM);
}
/**
* Clears DOM structure
*/
clear = () => {
document.body.innerHTML = "";
}
/**
* Test if standard buttons respect maxLength and do input a value
*/
testLayoutStdButtons = (keyboard) => {
let stdBtnCount = 0;
let fullInput = '';
this.iterateButtons((button) => {
let label = button.getAttribute("data-skbtn");
if(label.includes("{"))
return false;
// Click all standard buttons, respects maxLength
button.onclick();
// Recording fullInput, bypasses maxLength
fullInput = keyboard.utilities.getUpdatedInput(label, fullInput, keyboard.options, null);
stdBtnCount += label.length;
});
/**
* Check if maxLength is respected
*/
if(
(
typeof keyboard.options.maxLength === "object" &&
keyboard.getInput().length !== keyboard.options.maxLength[keyboard.options.layoutName]
) ||
(
typeof keyboard.options.maxLength !== "object" &&
keyboard.getInput().length !== keyboard.options.maxLength
)
)
throw new Error("MAX_LENGTH_ISSUE");
else
console.log("MAX_LENGTH PASSED:", keyboard.options.layoutName, keyboard.getInput().length, keyboard.options.maxLength);
/**
* Check if all standard buttons are inputting something
* (Regardless of maxLength)
*/
if(stdBtnCount !== fullInput.length)
throw new Error("STANDARD_BUTTONS_ISSUE");
else
console.log("STANDARD_BUTTONS PASSED:", keyboard.options.layoutName, stdBtnCount, fullInput.length);
}
/**
* Test if function buttons are interactive (have an onclick)
*/
testLayoutFctButtons = (callback) => {
let fctBtnCount = 0;
let fctBtnHasOnclickCount = 0;
this.iterateButtons((button) => {
let label = button.getAttribute("data-skbtn");
if(!label.includes("{") && !label.includes("}"))
return false;
fctBtnCount++;
if(button.onclick){
button.onclick();
fctBtnHasOnclickCount++;
}
callback(fctBtnCount, fctBtnHasOnclickCount);
});
}
/**
* Iterates on the keyboard buttons
*/
iterateButtons = (callback, selector) => {
let rows = document.body.querySelector(selector || '.simple-keyboard').children;
Array.from(rows).forEach(row => {
Array.from(row.children).forEach((button) => {
callback(button);
});
});
}
}