Skip to content

Commit

Permalink
Merge pull request #1 from IshavSohal/main
Browse files Browse the repository at this point in the history
Fix behavior of Left, Right, Home and End keys, Update Dependencies
  • Loading branch information
james-rae authored Jul 15, 2024
2 parents 3dccc9e + b98f14b commit 7a77069
Show file tree
Hide file tree
Showing 12 changed files with 14,992 additions and 24,955 deletions.
4,245 changes: 2,677 additions & 1,568 deletions dist/vue3-treeselect.common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue3-treeselect.common.js.map

Large diffs are not rendered by default.

4,299 changes: 2,704 additions & 1,595 deletions dist/vue3-treeselect.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue3-treeselect.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue3-treeselect.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue3-treeselect.umd.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/app.min.js

Large diffs are not rendered by default.

31,329 changes: 9,574 additions & 21,755 deletions package-lock.json

Large diffs are not rendered by default.

29 changes: 0 additions & 29 deletions src/components/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,40 +150,11 @@
}
break
}
case KEY_CODES.END: {
evt.preventDefault()
instance.highlightLastOption()
break
}
case KEY_CODES.HOME: {
evt.preventDefault()
instance.highlightFirstOption()
break
}
case KEY_CODES.ARROW_LEFT: {
const current = instance.getNode(instance.menu.current)
if (current.isBranch && instance.shouldExpand(current)) {
evt.preventDefault()
instance.toggleExpanded(current)
} else if (!current.isRootNode && (current.isLeaf || (current.isBranch && !(instance.shouldExpand(current))))) {
evt.preventDefault()
instance.setCurrentHighlightedOption(current.parentNode)
}
break
}
case KEY_CODES.ARROW_UP: {
evt.preventDefault()
instance.highlightPrevOption()
break
}
case KEY_CODES.ARROW_RIGHT: {
const current = instance.getNode(instance.menu.current)
if (current.isBranch && !instance.shouldExpand(current)) {
evt.preventDefault()
instance.toggleExpanded(current)
}
break
}
case KEY_CODES.ARROW_DOWN: {
evt.preventDefault()
instance.highlightNextOption()
Expand Down
14 changes: 14 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
const crypto = require('crypto');

/**
* The MD4 algorithm is not available anymore in Node.js 17+ (because of library SSL 3).
* In that case, silently replace MD4 by the MD5 algorithm.
*/
try {
crypto.createHash('md4');
} catch (e) {
console.warn('Crypto "MD4" is not supported anymore by this Node.js version');
const origCreateHash = crypto.createHash;
crypto.createHash = (alg, opts) => {
return origCreateHash(alg === 'md4' ? 'md5' : alg, opts);
};
}

module.exports = {
css: {
Expand Down
19 changes: 17 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
// webpack config
const crypto = require('crypto');

/**
* The MD4 algorithm is not available anymore in Node.js 17+ (because of library SSL 3).
* In that case, silently replace MD4 by the MD5 algorithm.
*/
try {
crypto.createHash('md4');
} catch (e) {
console.warn('Crypto "MD4" is not supported anymore by this Node.js version');
const origCreateHash = crypto.createHash;
crypto.createHash = (alg, opts) => {
return origCreateHash(alg === 'md4' ? 'md5' : alg, opts);
};
}

const path = require('path');
const WebpackBar = require('webpackbar');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
Expand All @@ -9,7 +25,6 @@ const { VueLoaderPlugin } = require('vue-loader');
const { DefinePlugin } = require('webpack');
const tsNameof = require("ts-nameof");


module.exports = (env = {}) => ([
{

Expand All @@ -20,7 +35,7 @@ module.exports = (env = {}) => ([
},
output: {
path: path.resolve(__dirname, "docs"),
filename: "[name].min.js",
filename: "[name].min.js"
},

watchOptions: {
Expand Down

0 comments on commit 7a77069

Please sign in to comment.