Skip to content

Commit 92d2336

Browse files
author
Hamed
committed
first version
1 parent 108cabd commit 92d2336

File tree

9 files changed

+4767
-0
lines changed

9 files changed

+4767
-0
lines changed

.gitignore

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
15+
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
18+
19+
# Coverage directory used by tools like istanbul
20+
coverage
21+
22+
# nyc test coverage
23+
.nyc_output
24+
25+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
.grunt
27+
28+
# Bower dependency directory (https://bower.io/)
29+
bower_components
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (https://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# Typescript v1 declaration files
42+
typings/
43+
44+
# Optional npm cache directory
45+
.npm
46+
47+
# Optional eslint cache
48+
.eslintcache
49+
50+
# Optional REPL history
51+
.node_repl_history
52+
53+
# Output of 'npm pack'
54+
*.tgz
55+
56+
# Yarn Integrity file
57+
.yarn-integrity
58+
59+
# dotenv environment variables file
60+
.env
61+
62+
# next.js build output
63+
.next
64+
### Example user template template
65+
### Example user template
66+
67+
# IntelliJ project files
68+
.idea
69+
*.iml
70+
out
71+
gen
72+
73+
dist/
74+
smart-area.js
75+
smart-input.js

package.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"name": "smart-area-vue",
3+
"version": "1.0.0",
4+
"description": "Autocomplete, dropdowns, mentions and other goodies to html textareas",
5+
"main": "dist/smart-area-vue.js",
6+
"files": [
7+
"src",
8+
"dist",
9+
"smart-area.js",
10+
"smart-input.js"
11+
],
12+
"scripts": {
13+
"build": "webpack --hide-modules"
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/parsisolution/smart-area-vue.git"
18+
},
19+
"keywords": [
20+
"Autocomplete",
21+
"Dropdown",
22+
"Mention",
23+
"Suggest",
24+
"Highlight",
25+
"Textarea",
26+
"Input",
27+
"Component",
28+
"Vue",
29+
"VueJS",
30+
"Vue2",
31+
"CSS"
32+
],
33+
"author": "Hamed Ehtesham",
34+
"license": "MIT",
35+
"bugs": {
36+
"url": "https://github.com/parsisolution/smart-area-vue/issues"
37+
},
38+
"homepage": "https://github.com/parsisolution/smart-area-vue#readme",
39+
"dependencies": {
40+
"autocomplete2": "^1.0.0"
41+
},
42+
"devDependencies": {
43+
"babel-core": "^6.26.3",
44+
"babel-loader": "^7.1.4",
45+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
46+
"babel-plugin-transform-runtime": "^6.23.0",
47+
"babel-preset-env": "^1.7.0",
48+
"css-loader": "*",
49+
"style-loader": "^0.21.0",
50+
"template-banner-webpack-plugin": "^1.1.2",
51+
"uglifyjs-webpack-plugin": "^1.2.5",
52+
"vue-loader": "^13.7.0",
53+
"vue-template-compiler": "^2.5.16",
54+
"webpack": "^3.10.0",
55+
"webpack-merge": "^4.1.2"
56+
}
57+
}

src/KeyCodes.js

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
const keyCodes = {
2+
Backspace: 8,
3+
Tab: 9,
4+
Enter: 13,
5+
Shift: 16,
6+
Ctrl: 17,
7+
Alt: 18,
8+
PauseBreak: 19,
9+
CapsLock: 20,
10+
Escape: 27,
11+
Space: 32,
12+
PageUp: 33,
13+
PageDown: 34,
14+
End: 35,
15+
Home: 36,
16+
17+
LeftArrow: 37,
18+
UpArrow: 38,
19+
RightArrow: 39,
20+
DownArrow: 40,
21+
22+
Insert: 45,
23+
Delete: 46,
24+
25+
Zero: 48,
26+
One: 49,
27+
Two: 50,
28+
Three: 51,
29+
Four: 52,
30+
Five: 53,
31+
Six: 54,
32+
Seven: 55,
33+
Eight: 56,
34+
Nine: 57,
35+
36+
A: 65,
37+
B: 66,
38+
C: 67,
39+
D: 68,
40+
E: 69,
41+
F: 70,
42+
G: 71,
43+
H: 72,
44+
I: 73,
45+
J: 74,
46+
K: 75,
47+
L: 76,
48+
M: 77,
49+
N: 78,
50+
O: 79,
51+
P: 80,
52+
Q: 81,
53+
R: 82,
54+
S: 83,
55+
T: 84,
56+
U: 85,
57+
V: 86,
58+
W: 87,
59+
X: 88,
60+
Y: 89,
61+
Z: 90,
62+
63+
LeftWindowKey: 91,
64+
RightWindowKey: 92,
65+
SelectKey: 93,
66+
67+
Numpad0: 96,
68+
Numpad1: 97,
69+
Numpad2: 98,
70+
Numpad3: 99,
71+
Numpad4: 100,
72+
Numpad5: 101,
73+
Numpad6: 102,
74+
Numpad7: 103,
75+
Numpad8: 104,
76+
Numpad9: 105,
77+
78+
Multiply: 106,
79+
Add: 107,
80+
Subtract: 109,
81+
DecimalPoint: 110,
82+
Divide: 111,
83+
84+
F1: 112,
85+
F2: 113,
86+
F3: 114,
87+
F4: 115,
88+
F5: 116,
89+
F6: 117,
90+
F7: 118,
91+
F8: 119,
92+
F9: 120,
93+
F10: 121,
94+
F11: 122,
95+
F12: 123,
96+
97+
NumLock: 144,
98+
ScrollLock: 145,
99+
100+
SemiColon: 186,
101+
Equals: 187,
102+
Comma: 188,
103+
Dash: 189,
104+
Period: 190,
105+
ForwardSlash: 191,
106+
Tilde: 192,
107+
108+
OpenBracket: 219,
109+
ClosedBracket: 221,
110+
Quote: 222
111+
};
112+
113+
keyCodes.ClosedParen = keyCodes.Zero;
114+
keyCodes.ExclamationMark = keyCodes.One;
115+
keyCodes.AtSign = keyCodes.Two;
116+
keyCodes.PoundSign = keyCodes.Three;
117+
keyCodes.Hash = keyCodes.PoundSign;
118+
keyCodes.DollarSign = keyCodes.Four;
119+
keyCodes.PercentSign = keyCodes.Five;
120+
keyCodes.Caret = keyCodes.Six;
121+
keyCodes.Hat = keyCodes.Caret;
122+
keyCodes.Ampersand = keyCodes.Seven;
123+
keyCodes.Star = keyCodes.Eight;
124+
keyCodes.Asterik = keyCodes.Star;
125+
keyCodes.OpenParen = keyCodes.Nine;
126+
keyCodes.UnderScore = keyCodes.Dash;
127+
keyCodes.PlusSign = keyCodes.Equals;
128+
keyCodes.GraveAccent = keyCodes.Tilde;
129+
130+
module.exports = keyCodes;

0 commit comments

Comments
 (0)