systelab-virtual-keyboard 20.0.0 → 20.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/fesm2022/systelab-virtual-keyboard.mjs +183 -103
- package/fesm2022/systelab-virtual-keyboard.mjs.map +1 -1
- package/index.d.ts +51 -31
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/scss/default-theme.scss +102 -0
package/README.md
CHANGED
|
@@ -43,3 +43,14 @@ The configuration params are describe into the interface [SystelabVirtualKeyboar
|
|
|
43
43
|
| inputMethod | SystelabVirtualKeyboardInputMethods | | The method detected for the keyboard to click or touch the keys
|
|
44
44
|
| showButton | boolean | false | Show or hide the button for showing the keyboard
|
|
45
45
|
| showOnMouseClick | boolean | false | Shows virtual keyboard upon mouse click on input field
|
|
46
|
+
|
|
47
|
+
### Styling variables
|
|
48
|
+
|
|
49
|
+
| Name | Default | Description |
|
|
50
|
+
|-----------|:----:|-------------------------------------------|
|
|
51
|
+
| --systelab-virtual-keyboard-font-family | 'SF Mono', 'Menlo', 'Consolas', 'Courier New', monospace | Font family fonts to use
|
|
52
|
+
| --systelab-virtual-keyboard-background-color | #B2B2B2 | Background of the keyboard
|
|
53
|
+
| --systelab-virtual-keyboard-button-color | #E5E5E5 | Normal button background color
|
|
54
|
+
| --systelab-virtual-keyboard-button-font-color | #000000 | Normal button font color
|
|
55
|
+
| --systelab-virtual-keyboard-active-special-button-color | #4D4D4D | Special buttons activation background color
|
|
56
|
+
| --systelab-virtual-keyboard-active-special-button-font-color | #FFFFFF | Special buttons activation font color
|
|
@@ -14,34 +14,80 @@ import { CommonModule } from '@angular/common';
|
|
|
14
14
|
* are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is
|
|
15
15
|
* strictly forbidden unless prior written permission is Instrumentation Laboratory Company.
|
|
16
16
|
*/
|
|
17
|
-
var
|
|
18
|
-
(function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
17
|
+
var SystelabVirtualKeyboardConstants;
|
|
18
|
+
(function (SystelabVirtualKeyboardConstants) {
|
|
19
|
+
let Layouts;
|
|
20
|
+
(function (Layouts) {
|
|
21
|
+
Layouts["Default"] = "default";
|
|
22
|
+
Layouts["AlphaNumeric"] = "alpha-numeric";
|
|
23
|
+
Layouts["AlphaNumericShift"] = "alpha-numeric-shift";
|
|
24
|
+
Layouts["AlphaNumericUppercase"] = "alpha-numeric-uppercase";
|
|
25
|
+
Layouts["AlphaNumericUppercaseShift"] = "alpha-numeric-uppercase-shift";
|
|
26
|
+
Layouts["Numeric"] = "numeric";
|
|
27
|
+
Layouts["NumericShift"] = "numeric-shift";
|
|
28
|
+
})(Layouts = SystelabVirtualKeyboardConstants.Layouts || (SystelabVirtualKeyboardConstants.Layouts = {}));
|
|
29
|
+
SystelabVirtualKeyboardConstants.LayoutDefinitions = {
|
|
30
|
+
[SystelabVirtualKeyboardConstants.Layouts.Default]: [
|
|
31
|
+
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
|
|
32
|
+
'{tab} q w e r t y u i o p { } |',
|
|
33
|
+
'{lock} a s d f g h j k l : " {enter}',
|
|
34
|
+
'{shift} z x c v b n m < > ? {shift}',
|
|
35
|
+
'{space}',
|
|
36
|
+
],
|
|
37
|
+
[SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric]: [
|
|
38
|
+
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
|
|
39
|
+
'{tab} q w e r t y u i o p { } |',
|
|
40
|
+
'{lock} a s d f g h j k l : " {enter}',
|
|
41
|
+
'{shift} z x c v b n m < > ? {shift}',
|
|
42
|
+
'{space}',
|
|
43
|
+
],
|
|
44
|
+
[SystelabVirtualKeyboardConstants.Layouts.AlphaNumericShift]: [
|
|
45
|
+
'~ ! @ # $ % ^ & * ( ) _ + {bksp}',
|
|
46
|
+
'{tab} Q W E R T Y U I O P [ ] \\',
|
|
47
|
+
"{lock} A S D F G H J K L ; ' {enter}",
|
|
48
|
+
'{shift} Z X C V B N M , . / {shift}',
|
|
49
|
+
'{space}',
|
|
50
|
+
],
|
|
51
|
+
[SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercase]: [
|
|
52
|
+
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
|
|
53
|
+
'{tab} Q W E R T Y U I O P [ ] \\',
|
|
54
|
+
"{lock} A S D F G H J K L ; ' {enter}",
|
|
55
|
+
'{shift} Z X C V B N M , . / {shift}',
|
|
56
|
+
'{space}',
|
|
57
|
+
],
|
|
58
|
+
[SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercaseShift]: [
|
|
59
|
+
'~ ! @ # $ % ^ & * ( ) _ + {bksp}',
|
|
60
|
+
'{tab} Q W E R T Y U I O P [ ] \\',
|
|
61
|
+
"{lock} A S D F G H J K L ; ' {enter}",
|
|
62
|
+
'{shift} Z X C V B N M , . / {shift}',
|
|
63
|
+
'{space}',
|
|
64
|
+
],
|
|
65
|
+
[SystelabVirtualKeyboardConstants.Layouts.Numeric]: ['7 8 9 {bksp}', '4 5 6 +', '1 2 3 -', '{shift} 0 . {enter}'],
|
|
66
|
+
[SystelabVirtualKeyboardConstants.Layouts.NumericShift]: ['! @ # {bksp}', '$ % _ =', '& * ( -', '{shift} ) . {enter}'],
|
|
67
|
+
};
|
|
68
|
+
let Button;
|
|
69
|
+
(function (Button) {
|
|
70
|
+
Button["Done"] = "{done}";
|
|
71
|
+
Button["Enter"] = "{enter}";
|
|
72
|
+
Button["Shift"] = "{shift}";
|
|
73
|
+
Button["Lock"] = "{lock}";
|
|
74
|
+
Button["Backspace"] = "{bksp}";
|
|
75
|
+
Button["Language"] = "{language}";
|
|
76
|
+
Button["Space"] = "{space}";
|
|
77
|
+
Button["Tab"] = "{tab}";
|
|
78
|
+
})(Button = SystelabVirtualKeyboardConstants.Button || (SystelabVirtualKeyboardConstants.Button = {}));
|
|
79
|
+
let InputMethods;
|
|
80
|
+
(function (InputMethods) {
|
|
81
|
+
InputMethods["onlyMouseEvents"] = "onlyMouseEvents";
|
|
82
|
+
InputMethods["onlyTouchEvents"] = "onlyTouchEvents";
|
|
83
|
+
})(InputMethods = SystelabVirtualKeyboardConstants.InputMethods || (SystelabVirtualKeyboardConstants.InputMethods = {}));
|
|
84
|
+
let InputModes;
|
|
85
|
+
(function (InputModes) {
|
|
86
|
+
InputModes["text"] = "text";
|
|
87
|
+
InputModes["numeric"] = "numeric";
|
|
88
|
+
InputModes["password"] = "password";
|
|
89
|
+
})(InputModes = SystelabVirtualKeyboardConstants.InputModes || (SystelabVirtualKeyboardConstants.InputModes = {}));
|
|
90
|
+
})(SystelabVirtualKeyboardConstants || (SystelabVirtualKeyboardConstants = {}));
|
|
45
91
|
|
|
46
92
|
const VIRTUAL_KEYBOARD_CONFIG = new InjectionToken('VIRTUAL_KEYBOARD_CONFIG');
|
|
47
93
|
|
|
@@ -64,36 +110,18 @@ class SystelabVirtualKeyboardComponent {
|
|
|
64
110
|
this.elementRef = elementRef;
|
|
65
111
|
this.virtualKeyboardConfig = virtualKeyboardConfig;
|
|
66
112
|
this.debug = false;
|
|
67
|
-
this.selectedLayout =
|
|
113
|
+
this.selectedLayout = SystelabVirtualKeyboardConstants.Layouts.Default;
|
|
68
114
|
this.caretPosition = null;
|
|
69
115
|
this.caretPositionEnd = null;
|
|
70
116
|
this.shiftPressed = false;
|
|
117
|
+
this.capsLockOn = false;
|
|
71
118
|
this.closePanel = new EventEmitter();
|
|
72
119
|
}
|
|
73
120
|
ngAfterViewInit() {
|
|
74
|
-
const layout = {
|
|
75
|
-
[SystelabVirtualKeyboardLayouts.default]: [
|
|
76
|
-
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
|
|
77
|
-
'{tab} q w e r t y u i o p [ ] \\',
|
|
78
|
-
"{lock} a s d f g h j k l ; ' {enter}",
|
|
79
|
-
'{shift} z x c v b n m , . / {shift}',
|
|
80
|
-
'{space}',
|
|
81
|
-
],
|
|
82
|
-
[SystelabVirtualKeyboardLayouts.shift]: [
|
|
83
|
-
'~ ! @ # $ % ^ & * ( ) _ + {bksp}',
|
|
84
|
-
'{tab} Q W E R T Y U I O P { } |',
|
|
85
|
-
'{lock} A S D F G H J K L : " {enter}',
|
|
86
|
-
'{shift} Z X C V B N M < > ? {shift}',
|
|
87
|
-
'{space}',
|
|
88
|
-
],
|
|
89
|
-
[SystelabVirtualKeyboardLayouts.numeric]: ['7 8 9', '4 5 6', '1 2 3', '0 {bksp}'],
|
|
90
|
-
};
|
|
91
121
|
const keyboardOptions = this.prepareKeyboardConfig();
|
|
92
122
|
this.keyboard = new SimpleKeyboard('.simple-keyboard', keyboardOptions);
|
|
123
|
+
this.setButtonClasses();
|
|
93
124
|
this.setLayout(this.selectedLayout);
|
|
94
|
-
if (this.debug) {
|
|
95
|
-
console.log('Layout: ', layout);
|
|
96
|
-
}
|
|
97
125
|
}
|
|
98
126
|
setActiveInput(input) {
|
|
99
127
|
this.activeInputElement = input;
|
|
@@ -117,46 +145,26 @@ class SystelabVirtualKeyboardComponent {
|
|
|
117
145
|
}
|
|
118
146
|
}
|
|
119
147
|
prepareKeyboardConfig() {
|
|
120
|
-
const layout = {
|
|
121
|
-
[SystelabVirtualKeyboardLayouts.default]: [
|
|
122
|
-
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
|
|
123
|
-
'{tab} q w e r t y u i o p [ ] \\',
|
|
124
|
-
"{lock} a s d f g h j k l ; ' {enter}",
|
|
125
|
-
'{shift} z x c v b n m , . / {shift}',
|
|
126
|
-
'{space}',
|
|
127
|
-
],
|
|
128
|
-
[SystelabVirtualKeyboardLayouts.shift]: [
|
|
129
|
-
'~ ! @ # $ % ^ & * ( ) _ + {bksp}',
|
|
130
|
-
'{tab} Q W E R T Y U I O P { } |',
|
|
131
|
-
'{lock} A S D F G H J K L : " {enter}',
|
|
132
|
-
'{shift} Z X C V B N M < > ? {shift}',
|
|
133
|
-
'{space}',
|
|
134
|
-
],
|
|
135
|
-
[SystelabVirtualKeyboardLayouts.numeric]: ['7 8 9', '4 5 6', '1 2 3', '0 {bksp}'],
|
|
136
|
-
};
|
|
137
148
|
let keyboardOptions = {
|
|
138
149
|
onKeyPress: (button) => this.handleKeyPress(button),
|
|
139
150
|
mergeDisplay: true,
|
|
140
|
-
theme: 'hg-theme-default hg-layout-default
|
|
151
|
+
theme: 'hg-theme-default hg-layout-default systelab-virtual-keyboard-theme',
|
|
141
152
|
display: {
|
|
142
|
-
[
|
|
153
|
+
[SystelabVirtualKeyboardConstants.Button.Backspace]: 'back',
|
|
154
|
+
[SystelabVirtualKeyboardConstants.Button.Enter]: 'enter',
|
|
155
|
+
[SystelabVirtualKeyboardConstants.Button.Lock]: 'lock',
|
|
143
156
|
},
|
|
144
|
-
buttonTheme:
|
|
145
|
-
|
|
146
|
-
class: 'virtual-keyboard-delete-button',
|
|
147
|
-
buttons: `${SystelabVirtualKeyboardButton.Backspace}`,
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
layout,
|
|
157
|
+
buttonTheme: this.buildButtonThemes(),
|
|
158
|
+
layout: SystelabVirtualKeyboardConstants.LayoutDefinitions,
|
|
151
159
|
};
|
|
152
160
|
if (this.virtualKeyboardConfig?.hasOwnProperty('inputMethod')) {
|
|
153
|
-
if (this.virtualKeyboardConfig.inputMethod ===
|
|
161
|
+
if (this.virtualKeyboardConfig.inputMethod === SystelabVirtualKeyboardConstants.InputMethods.onlyMouseEvents) {
|
|
154
162
|
keyboardOptions = {
|
|
155
163
|
...keyboardOptions,
|
|
156
164
|
useMouseEvents: true,
|
|
157
165
|
};
|
|
158
166
|
}
|
|
159
|
-
else if (this.virtualKeyboardConfig.inputMethod ===
|
|
167
|
+
else if (this.virtualKeyboardConfig.inputMethod === SystelabVirtualKeyboardConstants.InputMethods.onlyTouchEvents) {
|
|
160
168
|
keyboardOptions = {
|
|
161
169
|
...keyboardOptions,
|
|
162
170
|
useTouchEvents: true,
|
|
@@ -165,6 +173,25 @@ class SystelabVirtualKeyboardComponent {
|
|
|
165
173
|
}
|
|
166
174
|
return keyboardOptions;
|
|
167
175
|
}
|
|
176
|
+
buildButtonThemes() {
|
|
177
|
+
return [
|
|
178
|
+
{
|
|
179
|
+
class: 'virtual-keyboard-delete-button',
|
|
180
|
+
buttons: `${SystelabVirtualKeyboardConstants.Button.Backspace}`,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
class: 'virtual-keyboard-enter-button',
|
|
184
|
+
buttons: `${SystelabVirtualKeyboardConstants.Button.Enter}`,
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
class: 'virtual-keyboard-function-button',
|
|
188
|
+
buttons: `${SystelabVirtualKeyboardConstants.Button.Shift} ${SystelabVirtualKeyboardConstants.Button.Lock}`,
|
|
189
|
+
}
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
setButtonClasses() {
|
|
193
|
+
this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-shift-button');
|
|
194
|
+
}
|
|
168
195
|
handleKeyPress(button, e) {
|
|
169
196
|
if (this.debug) {
|
|
170
197
|
console.log('Key press:', button);
|
|
@@ -172,11 +199,31 @@ class SystelabVirtualKeyboardComponent {
|
|
|
172
199
|
if (button[0] === '&' && button.length > 1) {
|
|
173
200
|
button = new DOMParser().parseFromString(button, 'text/html').body.textContent;
|
|
174
201
|
}
|
|
175
|
-
if (button ===
|
|
176
|
-
this.shiftPressed =
|
|
202
|
+
if (button === SystelabVirtualKeyboardConstants.Button.Shift) {
|
|
203
|
+
this.shiftPressed = !this.shiftPressed;
|
|
204
|
+
this.toggleShiftLayout();
|
|
205
|
+
if (this.shiftPressed) {
|
|
206
|
+
this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-shift-active');
|
|
207
|
+
this.addUppercaseClass();
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-shift-active');
|
|
211
|
+
this.removeUppercaseClass();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
else if (button === SystelabVirtualKeyboardConstants.Button.Lock) {
|
|
215
|
+
this.capsLockOn = !this.capsLockOn;
|
|
177
216
|
this.toggleShiftLayout();
|
|
217
|
+
if (this.capsLockOn) {
|
|
218
|
+
this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Lock, 'virtual-keyboard-lock-active');
|
|
219
|
+
this.addUppercaseClass();
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Lock, 'virtual-keyboard-lock-active');
|
|
223
|
+
this.removeUppercaseClass();
|
|
224
|
+
}
|
|
178
225
|
}
|
|
179
|
-
else if (button ===
|
|
226
|
+
else if (button === SystelabVirtualKeyboardConstants.Button.Done) {
|
|
180
227
|
this.closePanel.emit();
|
|
181
228
|
return;
|
|
182
229
|
}
|
|
@@ -193,23 +240,39 @@ class SystelabVirtualKeyboardComponent {
|
|
|
193
240
|
this.dispatchEvents(button);
|
|
194
241
|
if (this.shiftPressed) {
|
|
195
242
|
this.toggleShiftLayout();
|
|
243
|
+
this.removeUppercaseClass();
|
|
196
244
|
}
|
|
197
|
-
this.shiftPressed =
|
|
245
|
+
this.shiftPressed = false;
|
|
246
|
+
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-shift-active');
|
|
247
|
+
}
|
|
248
|
+
addUppercaseClass() {
|
|
249
|
+
this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-uppercase');
|
|
250
|
+
this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Lock, 'virtual-keyboard-uppercase');
|
|
251
|
+
this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Tab, 'virtual-keyboard-uppercase');
|
|
252
|
+
this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Backspace, 'virtual-keyboard-uppercase');
|
|
253
|
+
this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Enter, 'virtual-keyboard-uppercase');
|
|
254
|
+
}
|
|
255
|
+
removeUppercaseClass() {
|
|
256
|
+
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-uppercase');
|
|
257
|
+
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Lock, 'virtual-keyboard-uppercase');
|
|
258
|
+
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Tab, 'virtual-keyboard-uppercase');
|
|
259
|
+
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Backspace, 'virtual-keyboard-uppercase');
|
|
260
|
+
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Enter, 'virtual-keyboard-uppercase');
|
|
198
261
|
}
|
|
199
262
|
handleButtonOutput(button) {
|
|
200
263
|
const commonParams = this.getCommonParams();
|
|
201
264
|
let output = this.activeInputElement?.value || '';
|
|
202
265
|
if (!this.isStandardButton(button)) {
|
|
203
|
-
if (button ===
|
|
266
|
+
if (button === SystelabVirtualKeyboardConstants.Button.Backspace) {
|
|
204
267
|
output = this.removeAt(output, ...commonParams);
|
|
205
268
|
}
|
|
206
|
-
else if (button ===
|
|
269
|
+
else if (button === SystelabVirtualKeyboardConstants.Button.Space) {
|
|
207
270
|
output = this.addStringAt(output, ' ', ...commonParams);
|
|
208
271
|
}
|
|
209
|
-
else if (button ===
|
|
272
|
+
else if (button === SystelabVirtualKeyboardConstants.Button.Tab) {
|
|
210
273
|
// Do nothing for tab
|
|
211
274
|
}
|
|
212
|
-
else if (button ===
|
|
275
|
+
else if (button === SystelabVirtualKeyboardConstants.Button.Enter) {
|
|
213
276
|
if (this.isTextarea) {
|
|
214
277
|
output = this.addStringAt(output, '\n', ...commonParams);
|
|
215
278
|
}
|
|
@@ -228,10 +291,10 @@ class SystelabVirtualKeyboardComponent {
|
|
|
228
291
|
}
|
|
229
292
|
isAcceptedNonStandardButton(button) {
|
|
230
293
|
return [
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
294
|
+
SystelabVirtualKeyboardConstants.Button.Backspace.toString(),
|
|
295
|
+
SystelabVirtualKeyboardConstants.Button.Space.toString(),
|
|
296
|
+
SystelabVirtualKeyboardConstants.Button.Tab.toString(),
|
|
297
|
+
SystelabVirtualKeyboardConstants.Button.Enter.toString(),
|
|
235
298
|
].includes(button);
|
|
236
299
|
}
|
|
237
300
|
dispatchEvents(button) {
|
|
@@ -239,7 +302,7 @@ class SystelabVirtualKeyboardComponent {
|
|
|
239
302
|
const eventInit = {
|
|
240
303
|
bubbles: true,
|
|
241
304
|
cancelable: true,
|
|
242
|
-
shiftKey: this.selectedLayout ===
|
|
305
|
+
shiftKey: this.selectedLayout === SystelabVirtualKeyboardConstants.Layouts.AlphaNumericShift,
|
|
243
306
|
key: key,
|
|
244
307
|
code: code,
|
|
245
308
|
location: 0,
|
|
@@ -262,7 +325,7 @@ class SystelabVirtualKeyboardComponent {
|
|
|
262
325
|
key = key.charAt(0).toUpperCase() + key.slice(1);
|
|
263
326
|
code = key;
|
|
264
327
|
// Fix to standard key code
|
|
265
|
-
if (code.toLowerCase() ===
|
|
328
|
+
if (code.toLowerCase() === SystelabVirtualKeyboardConstants.Button.Backspace.slice(1, SystelabVirtualKeyboardConstants.Button.Backspace.length - 1).toLowerCase()) {
|
|
266
329
|
code = 'Backspace';
|
|
267
330
|
}
|
|
268
331
|
}
|
|
@@ -274,8 +337,25 @@ class SystelabVirtualKeyboardComponent {
|
|
|
274
337
|
}
|
|
275
338
|
toggleShiftLayout() {
|
|
276
339
|
const currentLayout = this.keyboard.options.layoutName;
|
|
277
|
-
|
|
278
|
-
|
|
340
|
+
let selectedLayout;
|
|
341
|
+
switch (currentLayout) {
|
|
342
|
+
case SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric:
|
|
343
|
+
case SystelabVirtualKeyboardConstants.Layouts.AlphaNumericShift:
|
|
344
|
+
selectedLayout = currentLayout === SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric ? SystelabVirtualKeyboardConstants.Layouts.AlphaNumericShift : SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric;
|
|
345
|
+
break;
|
|
346
|
+
case SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercase:
|
|
347
|
+
case SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercaseShift:
|
|
348
|
+
selectedLayout = currentLayout === SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercase ? SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercaseShift : SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercase;
|
|
349
|
+
break;
|
|
350
|
+
case SystelabVirtualKeyboardConstants.Layouts.Numeric:
|
|
351
|
+
case SystelabVirtualKeyboardConstants.Layouts.NumericShift:
|
|
352
|
+
selectedLayout = currentLayout === SystelabVirtualKeyboardConstants.Layouts.Numeric ? SystelabVirtualKeyboardConstants.Layouts.NumericShift : SystelabVirtualKeyboardConstants.Layouts.Numeric;
|
|
353
|
+
break;
|
|
354
|
+
default:
|
|
355
|
+
}
|
|
356
|
+
if (selectedLayout) {
|
|
357
|
+
this.setLayout(selectedLayout);
|
|
358
|
+
}
|
|
279
359
|
}
|
|
280
360
|
isStandardButton(button) {
|
|
281
361
|
return button && !(button[0] === '{' && button[button.length - 1] === '}');
|
|
@@ -392,11 +472,11 @@ class SystelabVirtualKeyboardComponent {
|
|
|
392
472
|
this.caretPositionEnd = endPosition;
|
|
393
473
|
}
|
|
394
474
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SystelabVirtualKeyboardComponent, deps: [{ token: i0.ElementRef }, { token: VIRTUAL_KEYBOARD_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
395
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: SystelabVirtualKeyboardComponent, isStandalone: true, selector: "systelab-virtual-keyboard.component", outputs: { closePanel: "closePanel" }, host: { listeners: { "window:keyup": "handleKeyUp($event)", "window:pointerup": "handleMouseUp($event)", "window:mouseup": "handleMouseUp($event)" } }, ngImport: i0, template: "<!--\n ~ Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n ~ NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n ~ affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n ~ Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n ~ are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n ~ strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n -->\n\n<div class=\"simple-keyboard\"></div>\n"
|
|
475
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: SystelabVirtualKeyboardComponent, isStandalone: true, selector: "systelab-virtual-keyboard.component", outputs: { closePanel: "closePanel" }, host: { listeners: { "window:keyup": "handleKeyUp($event)", "window:pointerup": "handleMouseUp($event)", "window:mouseup": "handleMouseUp($event)" } }, ngImport: i0, template: "<!--\n ~ Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n ~ NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n ~ affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n ~ Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n ~ are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n ~ strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n -->\n\n<div class=\"simple-keyboard\"></div>\n" }); }
|
|
396
476
|
}
|
|
397
477
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SystelabVirtualKeyboardComponent, decorators: [{
|
|
398
478
|
type: Component,
|
|
399
|
-
args: [{ selector: 'systelab-virtual-keyboard.component', standalone: true, imports: [], template: "<!--\n ~ Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n ~ NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n ~ affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n ~ Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n ~ are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n ~ strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n -->\n\n<div class=\"simple-keyboard\"></div>\n"
|
|
479
|
+
args: [{ selector: 'systelab-virtual-keyboard.component', standalone: true, imports: [], template: "<!--\n ~ Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n ~ NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n ~ affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n ~ Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n ~ are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n ~ strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n -->\n\n<div class=\"simple-keyboard\"></div>\n" }]
|
|
400
480
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
401
481
|
type: Optional
|
|
402
482
|
}, {
|
|
@@ -428,7 +508,7 @@ class SystelabVirtualKeyboardOverlayService {
|
|
|
428
508
|
isOpen() {
|
|
429
509
|
return this.open;
|
|
430
510
|
}
|
|
431
|
-
create(inputOrigin, showKeyboardButtonElement, fixedBottom, layout =
|
|
511
|
+
create(inputOrigin, showKeyboardButtonElement, fixedBottom, layout = SystelabVirtualKeyboardConstants.Layouts.Default) {
|
|
432
512
|
this.inputOrigin = inputOrigin;
|
|
433
513
|
this.fixedBottom = fixedBottom;
|
|
434
514
|
this.showKeyboardButtonElement = showKeyboardButtonElement;
|
|
@@ -550,7 +630,7 @@ class SystelabVirtualKeyboardOverlayService {
|
|
|
550
630
|
]);
|
|
551
631
|
}
|
|
552
632
|
getOverlaySize() {
|
|
553
|
-
const overlayWidth = this.layout ===
|
|
633
|
+
const overlayWidth = this.layout === SystelabVirtualKeyboardConstants.Layouts.Numeric ? '331px' : '1200px';
|
|
554
634
|
return {
|
|
555
635
|
width: overlayWidth,
|
|
556
636
|
maxWidth: overlayWidth,
|
|
@@ -714,22 +794,22 @@ class SystelabVirtualKeyboardDirective {
|
|
|
714
794
|
return this.config.layout;
|
|
715
795
|
}
|
|
716
796
|
if (this.isInputAlphabetic(activeInputElement)) {
|
|
717
|
-
return
|
|
797
|
+
return SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric;
|
|
718
798
|
}
|
|
719
799
|
else if (this.isInputNumeric(activeInputElement)) {
|
|
720
|
-
return
|
|
800
|
+
return SystelabVirtualKeyboardConstants.Layouts.Numeric;
|
|
721
801
|
}
|
|
722
802
|
else {
|
|
723
|
-
return
|
|
803
|
+
return SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric;
|
|
724
804
|
}
|
|
725
805
|
}
|
|
726
806
|
isInputAlphabetic(activeInputElement) {
|
|
727
807
|
const inputMode = this.getInputMode(activeInputElement);
|
|
728
|
-
return inputMode && [
|
|
808
|
+
return inputMode && [SystelabVirtualKeyboardConstants.InputModes.text, SystelabVirtualKeyboardConstants.InputModes.password].some((i) => i === inputMode);
|
|
729
809
|
}
|
|
730
810
|
isInputNumeric(activeInputElement) {
|
|
731
811
|
const inputMode = this.getInputMode(activeInputElement);
|
|
732
|
-
return inputMode && [
|
|
812
|
+
return inputMode && [SystelabVirtualKeyboardConstants.InputModes.numeric].some((i) => i === inputMode);
|
|
733
813
|
}
|
|
734
814
|
getInputMode(activeInputElement) {
|
|
735
815
|
return activeInputElement?.inputMode ?? activeInputElement?.type;
|
|
@@ -841,5 +921,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
841
921
|
* Generated bundle index. Do not edit.
|
|
842
922
|
*/
|
|
843
923
|
|
|
844
|
-
export {
|
|
924
|
+
export { SystelabVirtualKeyboardConstants, SystelabVirtualKeyboardDirective, SystelabVirtualKeyboardModule, factory };
|
|
845
925
|
//# sourceMappingURL=systelab-virtual-keyboard.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systelab-virtual-keyboard.mjs","sources":["../../../projects/systelab-virtual-keyboard/src/lib/constants.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.config.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.component.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.component.html","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard-overlay.service.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.directive.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.module.ts","../../../projects/systelab-virtual-keyboard/src/public-api.ts","../../../projects/systelab-virtual-keyboard/src/systelab-virtual-keyboard.ts"],"sourcesContent":["/*\n * Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n * NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n * affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n * Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n * are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n * strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n */\n\nexport enum SystelabVirtualKeyboardButton {\n Done = '{done}',\n Enter = '{enter}',\n Shift = '{shift}',\n Lock = '{lock}',\n Backspace = '{bksp}',\n Language = '{language}',\n Space = '{space}',\n Tab = '{tab}',\n}\n\nexport enum SystelabVirtualKeyboardLayouts {\n default = 'default',\n shift = 'shift',\n numeric = 'numeric',\n}\n\nexport enum SystelabVirtualKeyboardInputMethods {\n onlyMouseEvents = 'onlyMouseEvents',\n onlyTouchEvents = 'onlyTouchEvents',\n}\n\nexport enum SystelabVirtualKeyboardInputModes {\n text = 'text',\n numeric = 'numeric',\n password = 'password',\n}\n","import { InjectionToken } from '@angular/core';\nimport { SystelabVirtualKeyboardInputMethods, SystelabVirtualKeyboardLayouts } from './constants';\n\nexport const VIRTUAL_KEYBOARD_CONFIG = new InjectionToken<SystelabVirtualKeyboardConfig>('VIRTUAL_KEYBOARD_CONFIG');\n\nexport interface SystelabVirtualKeyboardConfig {\n layout?: SystelabVirtualKeyboardLayouts;\n inputMethod?: SystelabVirtualKeyboardInputMethods;\n showIcon?: boolean;\n showOnMouseClick?: boolean;\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Optional,\n Output\n} from '@angular/core';\nimport { SimpleKeyboard } from 'simple-keyboard';\nimport {\n SystelabVirtualKeyboardButton,\n SystelabVirtualKeyboardInputMethods,\n SystelabVirtualKeyboardLayouts\n} from './constants';\nimport { SystelabVirtualKeyboardConfig, VIRTUAL_KEYBOARD_CONFIG } from './systelab-virtual-keyboard.config';\nimport { KeyboardOptions } from 'simple-keyboard/build/interfaces';\n\n@Component({\n selector: 'systelab-virtual-keyboard.component',\n standalone: true,\n imports: [],\n templateUrl: './systelab-virtual-keyboard.component.html',\n styleUrl: 'systelab-virtual-keyboard.component.scss',\n})\nexport class SystelabVirtualKeyboardComponent implements AfterViewInit {\n @HostListener('window:keyup', ['$event'])\n handleKeyUp(event: KeyboardEvent): void {\n if (event.isTrusted) {\n this.caretEventHandler(event);\n }\n }\n\n @HostListener('window:pointerup', ['$event'])\n @HostListener('window:mouseup', ['$event'])\n handleMouseUp(event: PointerEvent): void {\n this.caretEventHandler(event);\n }\n\n get maxLength(): number {\n return this.activeInputElement?.maxLength ?? -1;\n }\n\n get isTextarea(): boolean {\n return this.activeInputElement?.type === 'textarea';\n }\n\n public debug = false;\n private selectedLayout: SystelabVirtualKeyboardLayouts = SystelabVirtualKeyboardLayouts.default;\n private keyboard: SimpleKeyboard;\n private caretPosition: number | null = null;\n private caretPositionEnd: number | null = null;\n private activeInputElement!: HTMLInputElement | HTMLTextAreaElement | null;\n private shiftPressed: boolean = false;\n\n @Output() closePanel = new EventEmitter<void>();\n\n constructor(private elementRef: ElementRef<HTMLInputElement>, @Optional() @Inject(VIRTUAL_KEYBOARD_CONFIG) private virtualKeyboardConfig: SystelabVirtualKeyboardConfig,) {\n }\n\n ngAfterViewInit() {\n const layout = {\n [SystelabVirtualKeyboardLayouts.default]: [\n '` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',\n '{tab} q w e r t y u i o p [ ] \\\\',\n \"{lock} a s d f g h j k l ; ' {enter}\",\n '{shift} z x c v b n m , . / {shift}',\n '{space}',\n ],\n [SystelabVirtualKeyboardLayouts.shift]: [\n '~ ! @ # $ % ^ & * ( ) _ + {bksp}',\n '{tab} Q W E R T Y U I O P { } |',\n '{lock} A S D F G H J K L : \" {enter}',\n '{shift} Z X C V B N M < > ? {shift}',\n '{space}',\n ],\n [SystelabVirtualKeyboardLayouts.numeric]: ['7 8 9', '4 5 6', '1 2 3', '0 {bksp}'],\n };\n\n const keyboardOptions: KeyboardOptions = this.prepareKeyboardConfig();\n this.keyboard = new SimpleKeyboard('.simple-keyboard', keyboardOptions);\n this.setLayout(this.selectedLayout);\n if (this.debug) {\n console.log('Layout: ', layout);\n }\n }\n\n public setActiveInput(input: HTMLInputElement | HTMLTextAreaElement): void {\n this.activeInputElement = input;\n\n if (this.debug) {\n const inputType = this.activeInputElement?.type;\n console.log('Layout:', `${inputType}_${this.selectedLayout}`);\n }\n\n const { selectionStart, selectionEnd } = this.activeInputElement;\n this.setCaretPosition(selectionStart, selectionEnd);\n\n if (this.debug) {\n console.log('Caret start at:', this.caretPosition, this.caretPositionEnd);\n }\n this.focusActiveInput();\n }\n\n public setLayout(layout: SystelabVirtualKeyboardLayouts): void {\n this.selectedLayout = layout;\n if (this.keyboard) {\n this.keyboard.setOptions({\n layoutName: layout,\n });\n }\n }\n\n private prepareKeyboardConfig(): KeyboardOptions {\n const layout = {\n [SystelabVirtualKeyboardLayouts.default]: [\n '` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',\n '{tab} q w e r t y u i o p [ ] \\\\',\n \"{lock} a s d f g h j k l ; ' {enter}\",\n '{shift} z x c v b n m , . / {shift}',\n '{space}',\n ],\n [SystelabVirtualKeyboardLayouts.shift]: [\n '~ ! @ # $ % ^ & * ( ) _ + {bksp}',\n '{tab} Q W E R T Y U I O P { } |',\n '{lock} A S D F G H J K L : \" {enter}',\n '{shift} Z X C V B N M < > ? {shift}',\n '{space}',\n ],\n [SystelabVirtualKeyboardLayouts.numeric]: ['7 8 9', '4 5 6', '1 2 3', '0 {bksp}'],\n };\n\n let keyboardOptions: KeyboardOptions = {\n onKeyPress: (button) => this.handleKeyPress(button),\n mergeDisplay: true,\n theme: 'hg-theme-default hg-layout-default myTheme',\n display: {\n [SystelabVirtualKeyboardButton.Backspace]: 'delete',\n },\n buttonTheme: [\n {\n class: 'virtual-keyboard-delete-button',\n buttons: `${SystelabVirtualKeyboardButton.Backspace}`,\n },\n ],\n layout,\n };\n\n if (this.virtualKeyboardConfig?.hasOwnProperty('inputMethod')) {\n if (this.virtualKeyboardConfig.inputMethod === SystelabVirtualKeyboardInputMethods.onlyMouseEvents) {\n keyboardOptions = {\n ...keyboardOptions,\n useMouseEvents: true,\n }\n } else if (this.virtualKeyboardConfig.inputMethod === SystelabVirtualKeyboardInputMethods.onlyTouchEvents) {\n keyboardOptions = {\n ...keyboardOptions,\n useTouchEvents: true,\n }\n }\n }\n\n return keyboardOptions;\n }\n\n private handleKeyPress(button: string, e?: Event): void {\n if (this.debug) {\n console.log('Key press:', button);\n }\n\n if (button[0] === '&' && button.length > 1) {\n button = new DOMParser().parseFromString(button, 'text/html').body.textContent;\n }\n\n if (button === SystelabVirtualKeyboardButton.Shift || button === SystelabVirtualKeyboardButton.Lock) {\n this.shiftPressed = button === SystelabVirtualKeyboardButton.Shift;\n this.toggleShiftLayout();\n } else if (button === SystelabVirtualKeyboardButton.Done) {\n this.closePanel.emit();\n return;\n }\n\n if (!this.isAcceptedNonStandardButton(button) && !this.isStandardButton(button)) {\n return;\n }\n\n const output = this.handleButtonOutput(button);\n\n if (this.activeInputElement) {\n this.activeInputElement.value = output;\n\n if (this.debug) {\n console.log('Caret at:', this.caretPosition, this.caretPositionEnd, 'Button', e);\n }\n }\n\n this.dispatchEvents(button);\n\n if (this.shiftPressed) {\n this.toggleShiftLayout();\n }\n this.shiftPressed = button === SystelabVirtualKeyboardButton.Shift;\n }\n\n private handleButtonOutput(button: string): string {\n const commonParams: [number, number, boolean] = this.getCommonParams();\n let output = this.activeInputElement?.value || '';\n if (!this.isStandardButton(button)) {\n if (button === SystelabVirtualKeyboardButton.Backspace) {\n output = this.removeAt(output, ...commonParams);\n } else if (button === SystelabVirtualKeyboardButton.Space) {\n output = this.addStringAt(output, ' ', ...commonParams);\n } else if (button === SystelabVirtualKeyboardButton.Tab) {\n // Do nothing for tab\n } else if (button === SystelabVirtualKeyboardButton.Enter) {\n if (this.isTextarea) {\n output = this.addStringAt(output, '\\n', ...commonParams);\n }\n } else {\n return;\n }\n } else {\n output = this.addStringAt(output, button, ...commonParams);\n }\n\n return output;\n }\n\n private getCommonParams(): [number, number, boolean] {\n return [this.caretPosition || 0, this.caretPositionEnd || 0, true];\n }\n\n private isAcceptedNonStandardButton(button: string): boolean {\n return [\n SystelabVirtualKeyboardButton.Backspace.toString(),\n SystelabVirtualKeyboardButton.Space.toString(),\n SystelabVirtualKeyboardButton.Tab.toString(),\n SystelabVirtualKeyboardButton.Enter.toString(),\n ].includes(button);\n }\n\n private dispatchEvents(button: string) {\n const {key, code} = this.convertFromButtonToCode(button);\n\n const eventInit: KeyboardEventInit = {\n bubbles: true,\n cancelable: true,\n shiftKey: this.selectedLayout === SystelabVirtualKeyboardLayouts.shift,\n key: key,\n code: code,\n location: 0,\n };\n // Simulate all needed events on base element\n this.activeInputElement?.dispatchEvent(new KeyboardEvent('keydown', eventInit));\n this.activeInputElement?.dispatchEvent(new KeyboardEvent('keypress', eventInit));\n this.activeInputElement?.dispatchEvent(new Event('input', {bubbles: true}));\n this.activeInputElement?.dispatchEvent(new KeyboardEvent('keyup', eventInit));\n }\n\n /*\n * AUXILIARY METHODS\n * */\n private convertFromButtonToCode(button: string): { key: string; code: string } {\n let key: string;\n let code: string;\n if (button.includes('{') && button.includes('}')) {\n // Capitalize name\n key = button.slice(1, button.length - 1).toLowerCase();\n key = key.charAt(0).toUpperCase() + key.slice(1);\n code = key;\n\n // Fix to standard key code\n if (code.toLowerCase() === SystelabVirtualKeyboardButton.Backspace.slice(1, SystelabVirtualKeyboardButton.Backspace.length - 1).toLowerCase()) {\n code = 'Backspace';\n }\n } else {\n key = button;\n code = Number.isInteger(Number(button)) ? `Digit${button}` : `Key${button.toUpperCase()}`;\n }\n\n return {key, code};\n }\n\n private toggleShiftLayout(): void {\n const currentLayout = this.keyboard.options.layoutName;\n const selectedLayout: SystelabVirtualKeyboardLayouts =\n currentLayout === SystelabVirtualKeyboardLayouts.default ? SystelabVirtualKeyboardLayouts.shift : SystelabVirtualKeyboardLayouts.default;\n\n this.setLayout(selectedLayout);\n }\n\n private isStandardButton(button: string) {\n return button && !(button[0] === '{' && button[button.length - 1] === '}');\n }\n\n /*\n * OUTPUT STRING METHODS\n * */\n private removeAt(source: string, position = source.length, positionEnd = source.length, moveCaret = false): string {\n if (position === 0 && positionEnd === 0) {\n return source;\n }\n\n let output: string;\n\n if (position === positionEnd) {\n if (position && position >= 0) {\n output = source.slice(0, position - 1) + source.slice(position);\n if (moveCaret) {\n this.updateCaretPosition(1, true);\n }\n } else {\n output = source.slice(0, -1);\n if (moveCaret) {\n this.updateCaretPosition(1, true);\n }\n }\n } else {\n output = source.slice(0, position) + source.slice(positionEnd);\n if (moveCaret) {\n this.setCaretPosition(position);\n }\n }\n\n return output;\n }\n\n private addStringAt(source: string, str: string, position = source.length, positionEnd = source.length, moveCaret = false): string {\n if (this.maxLength !== -1 && source.length >= this.maxLength) {\n return source;\n }\n\n let output: string;\n\n if (!position && position !== 0) {\n output = source + str;\n } else {\n output = [source.slice(0, position), str, source.slice(positionEnd)].join('');\n if (moveCaret) {\n this.updateCaretPosition(str.length, false);\n }\n }\n\n return output;\n }\n\n /*\n * CARET METHODS\n * */\n private caretEventHandler(event: any) {\n let targetTagName = '';\n if (event.target.tagName) {\n targetTagName = event.target.tagName.toLowerCase();\n }\n\n const isTextInput =\n targetTagName === 'textarea' ||\n (targetTagName === 'input' && ['text', 'search', 'email', 'password', 'url', 'tel'].includes(event.target.type));\n\n const isKeyboard =\n event.target === this.elementRef.nativeElement || (event.target && this.elementRef.nativeElement.contains(event.target));\n\n if (isTextInput && this.activeInputElement == event.target) {\n /**\n * Tracks current cursor position\n * As keys are pressed, text will be added/removed at that position within the input.\n */\n this.setCaretPosition(event.target.selectionStart, event.target.selectionEnd);\n\n if (this.debug) {\n console.log('Caret at:', this.caretPosition, this.caretPositionEnd, event && event.target.tagName.toLowerCase(), event);\n }\n } else if (event.type === 'pointerup' && this.activeInputElement === document.activeElement) {\n return;\n } else if (!isKeyboard && event?.type !== 'selectionchange') {\n /**\n * we must ensure caretPosition doesn't persist once reactivated.\n */\n this.setCaretPosition(null);\n\n if (this.debug) {\n console.log(`Caret position reset due to \"${event?.type}\" event`, event);\n }\n }\n }\n\n private focusActiveInput(): void {\n this.activeInputElement?.focus();\n this.activeInputElement?.setSelectionRange(\n this.caretPosition,\n this.caretPositionEnd\n );\n }\n\n private updateCaretPosition(length: number, minus = false) {\n const newCaretPos = this.computeNewCaretPosition(length, minus);\n this.setCaretPosition(newCaretPos);\n // Scroll to bottom\n setTimeout(() => {\n this.activeInputElement?.scrollTo({\n top: this.activeInputElement.scrollHeight,\n } as ScrollToOptions);\n });\n }\n\n private computeNewCaretPosition(length: number, minus = false) {\n let caretPosition = this.caretPosition;\n\n if (caretPosition != null) {\n if (minus) {\n if (caretPosition > 0) caretPosition = caretPosition - length;\n } else {\n caretPosition = caretPosition + length;\n }\n }\n return caretPosition;\n }\n\n private setCaretPosition(position: number | null, endPosition = position): void {\n this.caretPosition = position;\n this.caretPositionEnd = endPosition;\n }\n}\n","<!--\n ~ Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n ~ NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n ~ affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n ~ Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n ~ are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n ~ strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n -->\n\n<div class=\"simple-keyboard\"></div>\n","/*\n * Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n * NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n * affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n * Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n * are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n * strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n */\n\nimport { Overlay, OverlayRef, OverlaySizeConfig, PositionStrategy } from '@angular/cdk/overlay';\nimport { ComponentRef, Injectable } from '@angular/core';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { SystelabVirtualKeyboardLayouts } from './constants';\nimport { SystelabVirtualKeyboardComponent } from './systelab-virtual-keyboard.component';\n\ninterface PositionStrategyOrigin {\n x: number;\n y: number;\n width?: number;\n height?: number;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SystelabVirtualKeyboardOverlayService {\n private overlayRef!: OverlayRef;\n private inputOrigin: HTMLInputElement;\n private fixedBottom: boolean;\n private showKeyboardButtonElement: HTMLElement;\n private open: boolean;\n private layout: SystelabVirtualKeyboardLayouts;\n private clickAlreadyHandled: boolean = false;\n private touchEndAlreadyHandled: boolean = false;\n\n constructor(private readonly overlay: Overlay) {\n this.initListener();\n }\n\n public isCreated(): boolean {\n return !!this.overlayRef;\n }\n\n public isOpen(): boolean {\n return this.open;\n }\n\n public create(\n inputOrigin: HTMLInputElement,\n showKeyboardButtonElement: HTMLElement,\n fixedBottom: boolean,\n layout: SystelabVirtualKeyboardLayouts = SystelabVirtualKeyboardLayouts.default,\n ): ComponentRef<SystelabVirtualKeyboardComponent> {\n this.inputOrigin = inputOrigin;\n this.fixedBottom = fixedBottom;\n this.showKeyboardButtonElement = showKeyboardButtonElement;\n this.layout = layout;\n this.overlayRef = this.overlay.create({\n hasBackdrop: false,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n disposeOnNavigation: true,\n backdropClass: 'systelab-virtual-keyboard__backdrop',\n panelClass: 'systelab-virtual-keyboard__panel',\n });\n if (fixedBottom) {\n this.overlayRef.addPanelClass('systelab-virtual-keyboard__panel--fixed-bottom');\n }\n\n this.updatePositionStrategy(inputOrigin, fixedBottom);\n this.updateSize();\n\n this.open = true;\n return this.overlayRef.attach(new ComponentPortal(SystelabVirtualKeyboardComponent));\n }\n\n public updatePosition(): void {\n this.updatePositionStrategy(this.inputOrigin, this.fixedBottom);\n }\n\n public setClickAlreadyHandled(): void {\n this.clickAlreadyHandled = true;\n }\n\n public setTouchEndAlreadyHandled(): void {\n this.touchEndAlreadyHandled = true;\n }\n\n public destroy(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n }\n this.overlayRef = null;\n this.open = false;\n }\n\n private initListener() {\n document.addEventListener('click', this.handleClick.bind(this));\n document.addEventListener('touchend', this.handleTouchEnd.bind(this));\n }\n\n private handleClick(event: MouseEvent) {\n if (this.clickAlreadyHandled) {\n this.clickAlreadyHandled = false;\n return;\n }\n\n event.stopPropagation();\n this.handleEventTarget(event.target);\n }\n\n private handleTouchEnd(event: TouchEvent) {\n if (this.touchEndAlreadyHandled) {\n this.touchEndAlreadyHandled = false;\n return;\n }\n\n event.stopPropagation();\n this.handleEventTarget(event.target);\n }\n\n private handleEventTarget(target: EventTarget) {\n const showKeyboardButtonTarget: boolean = (target as HTMLElement)?.classList.contains('virtual-keyboard-show-button');\n const virtualKeyboardTarget: boolean = document.querySelector('.simple-keyboard')?.contains(target as Node);\n const inputElementTarget: boolean = this.inputOrigin?.contains(target as Node);\n const containsShowButton: boolean = this.showKeyboardButtonElement?.contains(target as Node);\n\n if (!virtualKeyboardTarget &&\n !inputElementTarget &&\n !containsShowButton &&\n !showKeyboardButtonTarget) {\n if (this.isCreated()) {\n this.destroy();\n }\n }\n }\n\n public hasAttached(): boolean {\n return this.overlayRef?.hasAttached();\n }\n\n private updatePositionStrategy(inputOrigin: HTMLInputElement, fixedBottom: boolean): void {\n if (!!this.overlayRef) {\n this.overlayRef.updatePositionStrategy(this.getPositionStrategy(inputOrigin, fixedBottom));\n }\n }\n\n private updateSize(): void {\n if (!!this.overlayRef) {\n this.overlayRef.updateSize(this.getOverlaySize());\n }\n }\n\n private getPositionStrategy(inputOrigin: HTMLInputElement, fixedBottom: boolean): PositionStrategy {\n if (fixedBottom) {\n return this.overlay.position().global().centerHorizontally().bottom('0');\n }\n\n const pointWithDimensions: PositionStrategyOrigin = this.computePositionStrategyOrigin(inputOrigin);\n\n return this.overlay\n .position()\n .flexibleConnectedTo(pointWithDimensions)\n .withFlexibleDimensions(false)\n .withLockedPosition(true)\n .withPush(false)\n .withPositions([\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n },\n ]);\n }\n\n private getOverlaySize(): OverlaySizeConfig {\n const overlayWidth = this.layout === SystelabVirtualKeyboardLayouts.numeric ? '400px' : '1200px';\n\n return {\n width: overlayWidth,\n maxWidth: overlayWidth,\n minWidth: overlayWidth,\n };\n }\n\n private computePositionStrategyOrigin(inputOrigin: HTMLInputElement): PositionStrategyOrigin {\n const overlayOffsetX = this.computeOverlayOffsetX(inputOrigin);\n const { width: overlayWidthString } = this.getOverlaySize();\n const overlayWidth = Number((overlayWidthString as string).replace('px', ''));\n const {x, y, width, height} = inputOrigin.getBoundingClientRect();\n return {\n width,\n height,\n x: width < overlayWidth ? x - overlayOffsetX : x + overlayOffsetX,\n y,\n };\n }\n\n private computeOverlayOffsetX(inputOrigin: HTMLInputElement): number {\n const { width: overlayWidthString } = this.getOverlaySize();\n const overlayWidth = Number((overlayWidthString as string).replace('px', ''));\n const inputWidth = inputOrigin.getBoundingClientRect().width;\n\n const extraWidth = overlayWidth - inputWidth;\n\n return Math.abs(extraWidth) / 2;\n }\n}\n","/*\n * Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n * NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n * affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n * Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n * are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n * strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n */\n\nimport {\n AfterViewInit,\n ComponentRef,\n Directive,\n ElementRef,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Renderer2,\n DOCUMENT\n} from '@angular/core';\n\n\n\nimport { SystelabVirtualKeyboardInputModes, SystelabVirtualKeyboardLayouts } from './constants';\nimport { SystelabVirtualKeyboardComponent } from './systelab-virtual-keyboard.component';\nimport { SystelabVirtualKeyboardOverlayService } from './systelab-virtual-keyboard-overlay.service';\nimport { SystelabVirtualKeyboardConfig, VIRTUAL_KEYBOARD_CONFIG } from './systelab-virtual-keyboard.config';\n\n@Directive({\n selector: 'input[vkEnabled], textarea[vkEnabled]',\n standalone: false,\n})\nexport class SystelabVirtualKeyboardDirective implements OnInit, AfterViewInit, OnDestroy {\n @HostListener('window:touchmove', ['$event'])\n @HostListener('window:touchend', ['$event'])\n @HostListener('window:wheel', ['$event'])\n @HostListener('document:scroll', ['$event'])\n onDocumentScroll() {\n if (!this.vkEnabled) {\n return;\n }\n this.overlayService.updatePosition();\n }\n\n @HostListener('click', ['$event'])\n onClick(): void {\n if (!this.vkEnabled || !this.config.showOnMouseClick) {\n return;\n }\n\n this.closePanel();\n this.overlayService.setClickAlreadyHandled();\n this.openPanel();\n }\n\n @HostListener('touchend', ['$event'])\n onTouchEnd(): void {\n if (!this.vkEnabled) {\n return;\n }\n\n this.closePanel();\n this.overlayService.setTouchEndAlreadyHandled();\n this.openPanel();\n }\n\n private enabled = false;\n\n @Input()\n set vkEnabled(enabled: boolean | string) {\n if (typeof enabled === 'string') {\n this.enabled = true;\n } else {\n this.enabled = enabled;\n }\n };\n\n get vkEnabled(): boolean {\n return this.enabled;\n }\n\n private fixedBottom = false;\n\n @Input()\n get vkFixedBottom(): boolean {\n return this.fixedBottom;\n }\n\n set vkFixedBottom(fixedBottom: boolean | string) {\n if (typeof fixedBottom === 'string') {\n this.fixedBottom = true;\n } else {\n this.fixedBottom = fixedBottom;\n }\n }\n\n private debug = false;\n\n @Input()\n get vkDebug(): boolean {\n return this.debug;\n }\n\n set vkDebug(debug: boolean) {\n this.debug = debug;\n }\n\n private config: SystelabVirtualKeyboardConfig;\n\n @Input()\n get vkConfig(): SystelabVirtualKeyboardConfig {\n return this.config;\n }\n\n set vkConfig(config: SystelabVirtualKeyboardConfig) {\n this.config = config;\n }\n\n private panelRef!: ComponentRef<SystelabVirtualKeyboardComponent>;\n private showKeyboardButtonElement: HTMLElement;\n\n constructor(\n private readonly elementRef: ElementRef<HTMLInputElement>,\n private readonly overlayService: SystelabVirtualKeyboardOverlayService,\n private readonly renderer: Renderer2,\n @Inject(DOCUMENT) private readonly document: any,\n @Optional() @Inject(VIRTUAL_KEYBOARD_CONFIG) private virtualKeyboardConfig: SystelabVirtualKeyboardConfig,\n ) {\n this.config = this.virtualKeyboardConfig;\n }\n\n ngOnInit() {\n if (this.config?.showIcon) {\n this.attachKeyboardIcon();\n }\n }\n\n ngAfterViewInit() {\n if (this.vkEnabled && this.config?.showIcon) {\n const keyboardIcon = this.elementRef.nativeElement.parentElement.querySelector('i');\n keyboardIcon.addEventListener('click', this.togglePanel.bind(this));\n }\n }\n\n ngOnDestroy(): void {\n if (this.vkEnabled && this.config?.showIcon) {\n const keyboardIcon = this.elementRef.nativeElement.parentElement.querySelector('i');\n keyboardIcon.removeEventListener('click', this.togglePanel.bind(this));\n }\n this.overlayService.destroy();\n }\n\n private togglePanel(): void {\n if (!this.vkEnabled) {\n return;\n }\n if (this.overlayService.isOpen()) {\n this.closePanel();\n } else {\n this.openPanel();\n }\n }\n\n private openPanel(): void {\n if (!this.vkEnabled) {\n return;\n }\n if (this.overlayService.isCreated()) {\n this.overlayService.destroy();\n }\n if (this.overlayService.hasAttached()) {\n return;\n }\n\n const currentLayout = this.getLayout(this.elementRef.nativeElement);\n\n this.panelRef = this.overlayService.create(this.inputOrigin(), this.showKeyboardButtonElement, this.vkFixedBottom, currentLayout);\n this.panelRef.instance.debug = this.vkDebug;\n this.panelRef.instance.setActiveInput(this.elementRef.nativeElement);\n this.panelRef.instance.setLayout(currentLayout);\n this.panelRef.instance.closePanel.subscribe(() => this.closePanel());\n }\n\n private getLayout(activeInputElement: HTMLInputElement | HTMLTextAreaElement): SystelabVirtualKeyboardLayouts {\n if (this.config?.hasOwnProperty('layout')) {\n return this.config.layout;\n }\n if (this.isInputAlphabetic(activeInputElement)) {\n return SystelabVirtualKeyboardLayouts.default;\n } else if (this.isInputNumeric(activeInputElement)) {\n return SystelabVirtualKeyboardLayouts.numeric;\n } else {\n return SystelabVirtualKeyboardLayouts.default;\n }\n }\n\n private isInputAlphabetic(activeInputElement: HTMLInputElement | HTMLTextAreaElement): boolean {\n const inputMode = this.getInputMode(activeInputElement);\n return inputMode && [SystelabVirtualKeyboardInputModes.text, SystelabVirtualKeyboardInputModes.password].some((i) => i === inputMode);\n }\n\n private isInputNumeric(activeInputElement: HTMLInputElement | HTMLTextAreaElement): boolean {\n const inputMode = this.getInputMode(activeInputElement);\n return inputMode && [SystelabVirtualKeyboardInputModes.numeric].some((i) => i === inputMode);\n }\n\n private getInputMode(activeInputElement: HTMLInputElement | HTMLTextAreaElement): string {\n return activeInputElement?.inputMode ?? activeInputElement?.type;\n }\n\n private closePanel(): void {\n this.overlayService.destroy();\n }\n\n private inputOrigin(): HTMLInputElement {\n return this.elementRef.nativeElement;\n }\n\n private attachKeyboardIcon() {\n if (this.vkEnabled) {\n const child = this.document.createElement('i');\n child.classList.add('fa');\n child.classList.add('fa-keyboard');\n child.classList.add('systelab-virtual-keyboard__show-button');\n this.renderer.appendChild(this.elementRef.nativeElement.parentElement, child);\n this.showKeyboardButtonElement = child;\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SystelabVirtualKeyboardDirective } from './systelab-virtual-keyboard.directive';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { SystelabVirtualKeyboardConfig, VIRTUAL_KEYBOARD_CONFIG } from './systelab-virtual-keyboard.config';\nimport { SystelabVirtualKeyboardOverlayService } from './systelab-virtual-keyboard-overlay.service';\n\nexport const factory = () => {\n const systelabVirtualKeyboardModuleCreated = (factory as any)._systelabVirtualKeyboardModuleCreated || false;\n if (systelabVirtualKeyboardModuleCreated) {\n throw new Error('SystelabVirtualKeyboardModuleCreated.forRoot imported to many times');\n }\n (factory as any)._systelabVirtualKeyboardModuleCreated = true;\n};\n\n@NgModule({\n imports: [CommonModule, OverlayModule],\n declarations: [SystelabVirtualKeyboardDirective],\n exports: [SystelabVirtualKeyboardDirective],\n})\nexport class SystelabVirtualKeyboardModule {\n public static forRoot(conf?: SystelabVirtualKeyboardConfig): ModuleWithProviders<SystelabVirtualKeyboardModule> {\n return {\n ngModule: SystelabVirtualKeyboardModule,\n providers: [\n SystelabVirtualKeyboardOverlayService,\n {\n provide: VIRTUAL_KEYBOARD_CONFIG, useValue: conf\n }\n ]\n };\n }\n\n public static forChild(): ModuleWithProviders<SystelabVirtualKeyboardModule> {\n return {\n ngModule: SystelabVirtualKeyboardModule,\n providers: [],\n };\n }\n}\n","/*\n * Public API Surface of systelab-virtual-keyboard\n */\n\nexport * from './lib/constants';\nexport { SystelabVirtualKeyboardConfig } from './lib/systelab-virtual-keyboard.config';\nexport * from './lib/systelab-virtual-keyboard.directive';\nexport * from './lib/systelab-virtual-keyboard.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SystelabVirtualKeyboardOverlayService"],"mappings":";;;;;;;;AAAA;;;;;;;AAOG;IAES;AAAZ,CAAA,UAAY,6BAA6B,EAAA;AACrC,IAAA,6BAAA,CAAA,MAAA,CAAA,GAAA,QAAe;AACf,IAAA,6BAAA,CAAA,OAAA,CAAA,GAAA,SAAiB;AACjB,IAAA,6BAAA,CAAA,OAAA,CAAA,GAAA,SAAiB;AACjB,IAAA,6BAAA,CAAA,MAAA,CAAA,GAAA,QAAe;AACf,IAAA,6BAAA,CAAA,WAAA,CAAA,GAAA,QAAoB;AACpB,IAAA,6BAAA,CAAA,UAAA,CAAA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jC,6BAA6B,EAAA,OAAA,EAAA,CAJ5B,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;;2FAI5B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBALzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,YAAY,EAAE,CAAC,gCAAgC,CAAC;oBAChD,OAAO,EAAE,CAAC,gCAAgC,CAAC;AAC9C,iBAAA;;;ACnBD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"systelab-virtual-keyboard.mjs","sources":["../../../projects/systelab-virtual-keyboard/src/lib/constants.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.config.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.component.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.component.html","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard-overlay.service.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.directive.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.module.ts","../../../projects/systelab-virtual-keyboard/src/public-api.ts","../../../projects/systelab-virtual-keyboard/src/systelab-virtual-keyboard.ts"],"sourcesContent":["/*\n * Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n * NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n * affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n * Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n * are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n * strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n */\n\nexport namespace SystelabVirtualKeyboardConstants {\n\n export enum Layouts {\n Default = 'default',\n AlphaNumeric = 'alpha-numeric',\n AlphaNumericShift = 'alpha-numeric-shift',\n AlphaNumericUppercase = 'alpha-numeric-uppercase',\n AlphaNumericUppercaseShift = 'alpha-numeric-uppercase-shift',\n Numeric = 'numeric',\n NumericShift = 'numeric-shift',\n }\n\n export const LayoutDefinitions = {\n [SystelabVirtualKeyboardConstants.Layouts.Default]: [\n '` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',\n '{tab} q w e r t y u i o p { } |',\n '{lock} a s d f g h j k l : \" {enter}',\n '{shift} z x c v b n m < > ? {shift}',\n '{space}',\n ],\n [SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric]: [\n '` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',\n '{tab} q w e r t y u i o p { } |',\n '{lock} a s d f g h j k l : \" {enter}',\n '{shift} z x c v b n m < > ? {shift}',\n '{space}',\n ],\n [SystelabVirtualKeyboardConstants.Layouts.AlphaNumericShift]: [\n '~ ! @ # $ % ^ & * ( ) _ + {bksp}',\n '{tab} Q W E R T Y U I O P [ ] \\\\',\n \"{lock} A S D F G H J K L ; ' {enter}\",\n '{shift} Z X C V B N M , . / {shift}',\n '{space}',\n ],\n [SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercase]: [\n '` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',\n '{tab} Q W E R T Y U I O P [ ] \\\\',\n \"{lock} A S D F G H J K L ; ' {enter}\",\n '{shift} Z X C V B N M , . / {shift}',\n '{space}',\n ],\n [SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercaseShift]: [\n '~ ! @ # $ % ^ & * ( ) _ + {bksp}',\n '{tab} Q W E R T Y U I O P [ ] \\\\',\n \"{lock} A S D F G H J K L ; ' {enter}\",\n '{shift} Z X C V B N M , . / {shift}',\n '{space}',\n ],\n [SystelabVirtualKeyboardConstants.Layouts.Numeric]: ['7 8 9 {bksp}', '4 5 6 +', '1 2 3 -', '{shift} 0 . {enter}'],\n [SystelabVirtualKeyboardConstants.Layouts.NumericShift]: ['! @ # {bksp}', '$ % _ =', '& * ( -', '{shift} ) . {enter}'],\n };\n\n export enum Button {\n Done = '{done}',\n Enter = '{enter}',\n Shift = '{shift}',\n Lock = '{lock}',\n Backspace = '{bksp}',\n Language = '{language}',\n Space = '{space}',\n Tab = '{tab}',\n }\n\n export enum InputMethods {\n onlyMouseEvents = 'onlyMouseEvents',\n onlyTouchEvents = 'onlyTouchEvents',\n }\n\n export enum InputModes {\n text = 'text',\n numeric = 'numeric',\n password = 'password',\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { SystelabVirtualKeyboardConstants } from './constants';\n\nexport const VIRTUAL_KEYBOARD_CONFIG = new InjectionToken<SystelabVirtualKeyboardConfig>('VIRTUAL_KEYBOARD_CONFIG');\n\nexport interface SystelabVirtualKeyboardConfig {\n layout?: SystelabVirtualKeyboardConstants.Layouts;\n inputMethod?: SystelabVirtualKeyboardConstants.InputMethods;\n showIcon?: boolean;\n showOnMouseClick?: boolean;\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Optional,\n Output\n} from '@angular/core';\nimport { SimpleKeyboard } from 'simple-keyboard';\nimport { SystelabVirtualKeyboardConstants } from './constants';\nimport { SystelabVirtualKeyboardConfig, VIRTUAL_KEYBOARD_CONFIG } from './systelab-virtual-keyboard.config';\nimport { KeyboardOptions } from 'simple-keyboard/build/interfaces';\n\n@Component({\n selector: 'systelab-virtual-keyboard.component',\n standalone: true,\n imports: [],\n templateUrl: './systelab-virtual-keyboard.component.html',\n})\nexport class SystelabVirtualKeyboardComponent implements AfterViewInit {\n @HostListener('window:keyup', ['$event'])\n handleKeyUp(event: KeyboardEvent): void {\n if (event.isTrusted) {\n this.caretEventHandler(event);\n }\n }\n\n @HostListener('window:pointerup', ['$event'])\n @HostListener('window:mouseup', ['$event'])\n handleMouseUp(event: PointerEvent): void {\n this.caretEventHandler(event);\n }\n\n get maxLength(): number {\n return this.activeInputElement?.maxLength ?? -1;\n }\n\n get isTextarea(): boolean {\n return this.activeInputElement?.type === 'textarea';\n }\n\n public debug = false;\n private selectedLayout: SystelabVirtualKeyboardConstants.Layouts = SystelabVirtualKeyboardConstants.Layouts.Default;\n private keyboard: SimpleKeyboard;\n private caretPosition: number | null = null;\n private caretPositionEnd: number | null = null;\n private activeInputElement!: HTMLInputElement | HTMLTextAreaElement | null;\n\n private shiftPressed: boolean = false;\n private capsLockOn: boolean = false;\n\n @Output() closePanel = new EventEmitter<void>();\n\n constructor(\n private readonly elementRef: ElementRef<HTMLInputElement>,\n @Optional() @Inject(VIRTUAL_KEYBOARD_CONFIG) private readonly virtualKeyboardConfig: SystelabVirtualKeyboardConfig) {}\n\n ngAfterViewInit() {\n const keyboardOptions: KeyboardOptions = this.prepareKeyboardConfig();\n this.keyboard = new SimpleKeyboard('.simple-keyboard', keyboardOptions);\n this.setButtonClasses();\n this.setLayout(this.selectedLayout);\n }\n\n public setActiveInput(input: HTMLInputElement | HTMLTextAreaElement): void {\n this.activeInputElement = input;\n\n if (this.debug) {\n const inputType = this.activeInputElement?.type;\n console.log('Layout:', `${inputType}_${this.selectedLayout}`);\n }\n\n const { selectionStart, selectionEnd } = this.activeInputElement;\n this.setCaretPosition(selectionStart, selectionEnd);\n\n if (this.debug) {\n console.log('Caret start at:', this.caretPosition, this.caretPositionEnd);\n }\n this.focusActiveInput();\n }\n\n public setLayout(layout: SystelabVirtualKeyboardConstants.Layouts): void {\n this.selectedLayout = layout;\n if (this.keyboard) {\n this.keyboard.setOptions({\n layoutName: layout,\n });\n }\n }\n\n private prepareKeyboardConfig(): KeyboardOptions {\n let keyboardOptions: KeyboardOptions = {\n onKeyPress: (button) => this.handleKeyPress(button),\n mergeDisplay: true,\n theme: 'hg-theme-default hg-layout-default systelab-virtual-keyboard-theme',\n display: {\n [SystelabVirtualKeyboardConstants.Button.Backspace]: 'back',\n [SystelabVirtualKeyboardConstants.Button.Enter]: 'enter',\n [SystelabVirtualKeyboardConstants.Button.Lock]: 'lock',\n },\n buttonTheme: this.buildButtonThemes(),\n layout: SystelabVirtualKeyboardConstants.LayoutDefinitions,\n };\n\n if (this.virtualKeyboardConfig?.hasOwnProperty('inputMethod')) {\n if (this.virtualKeyboardConfig.inputMethod === SystelabVirtualKeyboardConstants.InputMethods.onlyMouseEvents) {\n keyboardOptions = {\n ...keyboardOptions,\n useMouseEvents: true,\n }\n } else if (this.virtualKeyboardConfig.inputMethod === SystelabVirtualKeyboardConstants.InputMethods.onlyTouchEvents) {\n keyboardOptions = {\n ...keyboardOptions,\n useTouchEvents: true,\n }\n }\n }\n\n return keyboardOptions;\n }\n\n private buildButtonThemes(): { class: string; buttons: string }[] {\n return [\n {\n class: 'virtual-keyboard-delete-button',\n buttons: `${SystelabVirtualKeyboardConstants.Button.Backspace}`,\n },\n {\n class: 'virtual-keyboard-enter-button',\n buttons: `${SystelabVirtualKeyboardConstants.Button.Enter}`,\n },\n {\n class: 'virtual-keyboard-function-button',\n buttons: `${SystelabVirtualKeyboardConstants.Button.Shift} ${SystelabVirtualKeyboardConstants.Button.Lock}`,\n }\n ]\n }\n\n private setButtonClasses(): void {\n this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-shift-button');\n }\n\n private handleKeyPress(button: string, e?: Event): void {\n if (this.debug) {\n console.log('Key press:', button);\n }\n\n if (button[0] === '&' && button.length > 1) {\n button = new DOMParser().parseFromString(button, 'text/html').body.textContent;\n }\n\n if (button === SystelabVirtualKeyboardConstants.Button.Shift ) {\n this.shiftPressed = !this.shiftPressed;\n this.toggleShiftLayout();\n if (this.shiftPressed) {\n this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-shift-active');\n this.addUppercaseClass();\n } else {\n this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-shift-active');\n this.removeUppercaseClass();\n }\n } else if (button === SystelabVirtualKeyboardConstants.Button.Lock) {\n this.capsLockOn = !this.capsLockOn;\n this.toggleShiftLayout();\n if (this.capsLockOn) {\n this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Lock, 'virtual-keyboard-lock-active');\n this.addUppercaseClass();\n } else {\n this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Lock, 'virtual-keyboard-lock-active');\n this.removeUppercaseClass();\n }\n } else if (button === SystelabVirtualKeyboardConstants.Button.Done) {\n this.closePanel.emit();\n return;\n }\n\n if (!this.isAcceptedNonStandardButton(button) && !this.isStandardButton(button)) {\n return;\n }\n\n const output = this.handleButtonOutput(button);\n\n if (this.activeInputElement) {\n this.activeInputElement.value = output;\n\n if (this.debug) {\n console.log('Caret at:', this.caretPosition, this.caretPositionEnd, 'Button', e);\n }\n }\n\n this.dispatchEvents(button);\n\n if (this.shiftPressed) {\n this.toggleShiftLayout();\n this.removeUppercaseClass();\n }\n this.shiftPressed = false;\n this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-shift-active');\n }\n\n private addUppercaseClass(): void {\n this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-uppercase');\n this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Lock, 'virtual-keyboard-uppercase');\n this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Tab, 'virtual-keyboard-uppercase');\n this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Backspace, 'virtual-keyboard-uppercase');\n this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Enter, 'virtual-keyboard-uppercase');\n }\n\n private removeUppercaseClass(): void {\n this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-uppercase');\n this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Lock, 'virtual-keyboard-uppercase');\n this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Tab, 'virtual-keyboard-uppercase');\n this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Backspace, 'virtual-keyboard-uppercase');\n this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Enter, 'virtual-keyboard-uppercase');\n }\n\n private handleButtonOutput(button: string): string {\n const commonParams: [number, number, boolean] = this.getCommonParams();\n let output = this.activeInputElement?.value || '';\n if (!this.isStandardButton(button)) {\n if (button === SystelabVirtualKeyboardConstants.Button.Backspace) {\n output = this.removeAt(output, ...commonParams);\n } else if (button === SystelabVirtualKeyboardConstants.Button.Space) {\n output = this.addStringAt(output, ' ', ...commonParams);\n } else if (button === SystelabVirtualKeyboardConstants.Button.Tab) {\n // Do nothing for tab\n } else if (button === SystelabVirtualKeyboardConstants.Button.Enter) {\n if (this.isTextarea) {\n output = this.addStringAt(output, '\\n', ...commonParams);\n }\n } else {\n return;\n }\n } else {\n output = this.addStringAt(output, button, ...commonParams);\n }\n\n return output;\n }\n\n private getCommonParams(): [number, number, boolean] {\n return [this.caretPosition || 0, this.caretPositionEnd || 0, true];\n }\n\n private isAcceptedNonStandardButton(button: string): boolean {\n return [\n SystelabVirtualKeyboardConstants.Button.Backspace.toString(),\n SystelabVirtualKeyboardConstants.Button.Space.toString(),\n SystelabVirtualKeyboardConstants.Button.Tab.toString(),\n SystelabVirtualKeyboardConstants.Button.Enter.toString(),\n ].includes(button);\n }\n\n private dispatchEvents(button: string) {\n const {key, code} = this.convertFromButtonToCode(button);\n\n const eventInit: KeyboardEventInit = {\n bubbles: true,\n cancelable: true,\n shiftKey: this.selectedLayout === SystelabVirtualKeyboardConstants.Layouts.AlphaNumericShift,\n key: key,\n code: code,\n location: 0,\n };\n // Simulate all needed events on base element\n this.activeInputElement?.dispatchEvent(new KeyboardEvent('keydown', eventInit));\n this.activeInputElement?.dispatchEvent(new KeyboardEvent('keypress', eventInit));\n this.activeInputElement?.dispatchEvent(new Event('input', {bubbles: true}));\n this.activeInputElement?.dispatchEvent(new KeyboardEvent('keyup', eventInit));\n }\n\n /*\n * AUXILIARY METHODS\n * */\n private convertFromButtonToCode(button: string): { key: string; code: string } {\n let key: string;\n let code: string;\n if (button.includes('{') && button.includes('}')) {\n // Capitalize name\n key = button.slice(1, button.length - 1).toLowerCase();\n key = key.charAt(0).toUpperCase() + key.slice(1);\n code = key;\n\n // Fix to standard key code\n if (code.toLowerCase() === SystelabVirtualKeyboardConstants.Button.Backspace.slice(1, SystelabVirtualKeyboardConstants.Button.Backspace.length - 1).toLowerCase()) {\n code = 'Backspace';\n }\n } else {\n key = button;\n code = Number.isInteger(Number(button)) ? `Digit${button}` : `Key${button.toUpperCase()}`;\n }\n\n return {key, code};\n }\n\n private toggleShiftLayout(): void {\n const currentLayout = this.keyboard.options.layoutName;\n let selectedLayout: SystelabVirtualKeyboardConstants.Layouts;\n\n switch (currentLayout) {\n case SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric:\n case SystelabVirtualKeyboardConstants.Layouts.AlphaNumericShift:\n selectedLayout = currentLayout === SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric ? SystelabVirtualKeyboardConstants.Layouts.AlphaNumericShift : SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric;\n break;\n\n case SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercase:\n case SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercaseShift:\n selectedLayout = currentLayout === SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercase ? SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercaseShift : SystelabVirtualKeyboardConstants.Layouts.AlphaNumericUppercase;\n break;\n\n case SystelabVirtualKeyboardConstants.Layouts.Numeric:\n case SystelabVirtualKeyboardConstants.Layouts.NumericShift:\n selectedLayout = currentLayout === SystelabVirtualKeyboardConstants.Layouts.Numeric ? SystelabVirtualKeyboardConstants.Layouts.NumericShift : SystelabVirtualKeyboardConstants.Layouts.Numeric;\n break;\n default:\n }\n\n if (selectedLayout) {\n this.setLayout(selectedLayout);\n }\n }\n\n private isStandardButton(button: string) {\n return button && !(button[0] === '{' && button[button.length - 1] === '}');\n }\n\n /*\n * OUTPUT STRING METHODS\n * */\n private removeAt(source: string, position = source.length, positionEnd = source.length, moveCaret = false): string {\n if (position === 0 && positionEnd === 0) {\n return source;\n }\n\n let output: string;\n\n if (position === positionEnd) {\n if (position && position >= 0) {\n output = source.slice(0, position - 1) + source.slice(position);\n if (moveCaret) {\n this.updateCaretPosition(1, true);\n }\n } else {\n output = source.slice(0, -1);\n if (moveCaret) {\n this.updateCaretPosition(1, true);\n }\n }\n } else {\n output = source.slice(0, position) + source.slice(positionEnd);\n if (moveCaret) {\n this.setCaretPosition(position);\n }\n }\n\n return output;\n }\n\n private addStringAt(source: string, str: string, position = source.length, positionEnd = source.length, moveCaret = false): string {\n if (this.maxLength !== -1 && source.length >= this.maxLength) {\n return source;\n }\n\n let output: string;\n\n if (!position && position !== 0) {\n output = source + str;\n } else {\n output = [source.slice(0, position), str, source.slice(positionEnd)].join('');\n if (moveCaret) {\n this.updateCaretPosition(str.length, false);\n }\n }\n\n return output;\n }\n\n /*\n * CARET METHODS\n * */\n private caretEventHandler(event: any) {\n let targetTagName = '';\n if (event.target.tagName) {\n targetTagName = event.target.tagName.toLowerCase();\n }\n\n const isTextInput =\n targetTagName === 'textarea' ||\n (targetTagName === 'input' && ['text', 'search', 'email', 'password', 'url', 'tel'].includes(event.target.type));\n\n const isKeyboard =\n event.target === this.elementRef.nativeElement || (event.target && this.elementRef.nativeElement.contains(event.target));\n\n if (isTextInput && this.activeInputElement == event.target) {\n /**\n * Tracks current cursor position\n * As keys are pressed, text will be added/removed at that position within the input.\n */\n this.setCaretPosition(event.target.selectionStart, event.target.selectionEnd);\n\n if (this.debug) {\n console.log('Caret at:', this.caretPosition, this.caretPositionEnd, event && event.target.tagName.toLowerCase(), event);\n }\n } else if (event.type === 'pointerup' && this.activeInputElement === document.activeElement) {\n return;\n } else if (!isKeyboard && event?.type !== 'selectionchange') {\n /**\n * we must ensure caretPosition doesn't persist once reactivated.\n */\n this.setCaretPosition(null);\n\n if (this.debug) {\n console.log(`Caret position reset due to \"${event?.type}\" event`, event);\n }\n }\n }\n\n private focusActiveInput(): void {\n this.activeInputElement?.focus();\n this.activeInputElement?.setSelectionRange(\n this.caretPosition,\n this.caretPositionEnd\n );\n }\n\n private updateCaretPosition(length: number, minus = false) {\n const newCaretPos = this.computeNewCaretPosition(length, minus);\n this.setCaretPosition(newCaretPos);\n // Scroll to bottom\n setTimeout(() => {\n this.activeInputElement?.scrollTo({\n top: this.activeInputElement.scrollHeight,\n } as ScrollToOptions);\n });\n }\n\n private computeNewCaretPosition(length: number, minus = false) {\n let caretPosition = this.caretPosition;\n\n if (caretPosition != null) {\n if (minus) {\n if (caretPosition > 0) caretPosition = caretPosition - length;\n } else {\n caretPosition = caretPosition + length;\n }\n }\n return caretPosition;\n }\n\n private setCaretPosition(position: number | null, endPosition = position): void {\n this.caretPosition = position;\n this.caretPositionEnd = endPosition;\n }\n}\n","<!--\n ~ Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n ~ NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n ~ affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n ~ Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n ~ are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n ~ strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n -->\n\n<div class=\"simple-keyboard\"></div>\n","/*\n * Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n * NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n * affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n * Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n * are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n * strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n */\n\nimport { Overlay, OverlayRef, OverlaySizeConfig, PositionStrategy } from '@angular/cdk/overlay';\nimport { ComponentRef, Injectable } from '@angular/core';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { SystelabVirtualKeyboardComponent } from './systelab-virtual-keyboard.component';\nimport { SystelabVirtualKeyboardConstants } from './constants';\n\ninterface PositionStrategyOrigin {\n x: number;\n y: number;\n width?: number;\n height?: number;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SystelabVirtualKeyboardOverlayService {\n private overlayRef!: OverlayRef;\n private inputOrigin: HTMLInputElement;\n private fixedBottom: boolean;\n private showKeyboardButtonElement: HTMLElement;\n private open: boolean;\n private layout: SystelabVirtualKeyboardConstants.Layouts;\n private clickAlreadyHandled: boolean = false;\n private touchEndAlreadyHandled: boolean = false;\n\n constructor(private readonly overlay: Overlay) {\n this.initListener();\n }\n\n public isCreated(): boolean {\n return !!this.overlayRef;\n }\n\n public isOpen(): boolean {\n return this.open;\n }\n\n public create(\n inputOrigin: HTMLInputElement,\n showKeyboardButtonElement: HTMLElement,\n fixedBottom: boolean,\n layout: SystelabVirtualKeyboardConstants.Layouts = SystelabVirtualKeyboardConstants.Layouts.Default,\n ): ComponentRef<SystelabVirtualKeyboardComponent> {\n this.inputOrigin = inputOrigin;\n this.fixedBottom = fixedBottom;\n this.showKeyboardButtonElement = showKeyboardButtonElement;\n this.layout = layout;\n this.overlayRef = this.overlay.create({\n hasBackdrop: false,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n disposeOnNavigation: true,\n backdropClass: 'systelab-virtual-keyboard__backdrop',\n panelClass: 'systelab-virtual-keyboard__panel',\n });\n if (fixedBottom) {\n this.overlayRef.addPanelClass('systelab-virtual-keyboard__panel--fixed-bottom');\n }\n\n this.updatePositionStrategy(inputOrigin, fixedBottom);\n this.updateSize();\n\n this.open = true;\n return this.overlayRef.attach(new ComponentPortal(SystelabVirtualKeyboardComponent));\n }\n\n public updatePosition(): void {\n this.updatePositionStrategy(this.inputOrigin, this.fixedBottom);\n }\n\n public setClickAlreadyHandled(): void {\n this.clickAlreadyHandled = true;\n }\n\n public setTouchEndAlreadyHandled(): void {\n this.touchEndAlreadyHandled = true;\n }\n\n public destroy(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n }\n this.overlayRef = null;\n this.open = false;\n }\n\n private initListener() {\n document.addEventListener('click', this.handleClick.bind(this));\n document.addEventListener('touchend', this.handleTouchEnd.bind(this));\n }\n\n private handleClick(event: MouseEvent) {\n if (this.clickAlreadyHandled) {\n this.clickAlreadyHandled = false;\n return;\n }\n\n event.stopPropagation();\n this.handleEventTarget(event.target);\n }\n\n private handleTouchEnd(event: TouchEvent) {\n if (this.touchEndAlreadyHandled) {\n this.touchEndAlreadyHandled = false;\n return;\n }\n\n event.stopPropagation();\n this.handleEventTarget(event.target);\n }\n\n private handleEventTarget(target: EventTarget) {\n const showKeyboardButtonTarget: boolean = (target as HTMLElement)?.classList.contains('virtual-keyboard-show-button');\n const virtualKeyboardTarget: boolean = document.querySelector('.simple-keyboard')?.contains(target as Node);\n const inputElementTarget: boolean = this.inputOrigin?.contains(target as Node);\n const containsShowButton: boolean = this.showKeyboardButtonElement?.contains(target as Node);\n\n if (!virtualKeyboardTarget &&\n !inputElementTarget &&\n !containsShowButton &&\n !showKeyboardButtonTarget) {\n if (this.isCreated()) {\n this.destroy();\n }\n }\n }\n\n public hasAttached(): boolean {\n return this.overlayRef?.hasAttached();\n }\n\n private updatePositionStrategy(inputOrigin: HTMLInputElement, fixedBottom: boolean): void {\n if (!!this.overlayRef) {\n this.overlayRef.updatePositionStrategy(this.getPositionStrategy(inputOrigin, fixedBottom));\n }\n }\n\n private updateSize(): void {\n if (!!this.overlayRef) {\n this.overlayRef.updateSize(this.getOverlaySize());\n }\n }\n\n private getPositionStrategy(inputOrigin: HTMLInputElement, fixedBottom: boolean): PositionStrategy {\n if (fixedBottom) {\n return this.overlay.position().global().centerHorizontally().bottom('0');\n }\n\n const pointWithDimensions: PositionStrategyOrigin = this.computePositionStrategyOrigin(inputOrigin);\n\n return this.overlay\n .position()\n .flexibleConnectedTo(pointWithDimensions)\n .withFlexibleDimensions(false)\n .withLockedPosition(true)\n .withPush(false)\n .withPositions([\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n },\n ]);\n }\n\n private getOverlaySize(): OverlaySizeConfig {\n const overlayWidth = this.layout === SystelabVirtualKeyboardConstants.Layouts.Numeric ? '331px' : '1200px';\n\n return {\n width: overlayWidth,\n maxWidth: overlayWidth,\n minWidth: overlayWidth,\n };\n }\n\n private computePositionStrategyOrigin(inputOrigin: HTMLInputElement): PositionStrategyOrigin {\n const overlayOffsetX = this.computeOverlayOffsetX(inputOrigin);\n const { width: overlayWidthString } = this.getOverlaySize();\n const overlayWidth = Number((overlayWidthString as string).replace('px', ''));\n const {x, y, width, height} = inputOrigin.getBoundingClientRect();\n return {\n width,\n height,\n x: width < overlayWidth ? x - overlayOffsetX : x + overlayOffsetX,\n y,\n };\n }\n\n private computeOverlayOffsetX(inputOrigin: HTMLInputElement): number {\n const { width: overlayWidthString } = this.getOverlaySize();\n const overlayWidth = Number((overlayWidthString as string).replace('px', ''));\n const inputWidth = inputOrigin.getBoundingClientRect().width;\n\n const extraWidth = overlayWidth - inputWidth;\n\n return Math.abs(extraWidth) / 2;\n }\n}\n","/*\n * Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.\n * NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its\n * affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation\n * Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or\n * are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is\n * strictly forbidden unless prior written permission is Instrumentation Laboratory Company.\n */\n\nimport {\n AfterViewInit,\n ComponentRef,\n Directive,\n DOCUMENT,\n ElementRef,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Renderer2\n} from '@angular/core';\n\n\nimport { SystelabVirtualKeyboardComponent } from './systelab-virtual-keyboard.component';\nimport { SystelabVirtualKeyboardOverlayService } from './systelab-virtual-keyboard-overlay.service';\nimport { SystelabVirtualKeyboardConfig, VIRTUAL_KEYBOARD_CONFIG } from './systelab-virtual-keyboard.config';\nimport { SystelabVirtualKeyboardConstants } from './constants';\n\n@Directive({\n selector: 'input[vkEnabled], textarea[vkEnabled]',\n standalone: false,\n})\nexport class SystelabVirtualKeyboardDirective implements OnInit, AfterViewInit, OnDestroy {\n @HostListener('window:touchmove', ['$event'])\n @HostListener('window:touchend', ['$event'])\n @HostListener('window:wheel', ['$event'])\n @HostListener('document:scroll', ['$event'])\n onDocumentScroll() {\n if (!this.vkEnabled) {\n return;\n }\n this.overlayService.updatePosition();\n }\n\n @HostListener('click', ['$event'])\n onClick(): void {\n if (!this.vkEnabled || !this.config.showOnMouseClick) {\n return;\n }\n\n this.closePanel();\n this.overlayService.setClickAlreadyHandled();\n this.openPanel();\n }\n\n @HostListener('touchend', ['$event'])\n onTouchEnd(): void {\n if (!this.vkEnabled) {\n return;\n }\n\n this.closePanel();\n this.overlayService.setTouchEndAlreadyHandled();\n this.openPanel();\n }\n\n private enabled = false;\n\n @Input()\n set vkEnabled(enabled: boolean | string) {\n if (typeof enabled === 'string') {\n this.enabled = true;\n } else {\n this.enabled = enabled;\n }\n };\n\n get vkEnabled(): boolean {\n return this.enabled;\n }\n\n private fixedBottom = false;\n\n @Input()\n get vkFixedBottom(): boolean {\n return this.fixedBottom;\n }\n\n set vkFixedBottom(fixedBottom: boolean | string) {\n if (typeof fixedBottom === 'string') {\n this.fixedBottom = true;\n } else {\n this.fixedBottom = fixedBottom;\n }\n }\n\n private debug = false;\n\n @Input()\n get vkDebug(): boolean {\n return this.debug;\n }\n\n set vkDebug(debug: boolean) {\n this.debug = debug;\n }\n\n private config: SystelabVirtualKeyboardConfig;\n\n @Input()\n get vkConfig(): SystelabVirtualKeyboardConfig {\n return this.config;\n }\n\n set vkConfig(config: SystelabVirtualKeyboardConfig) {\n this.config = config;\n }\n\n private panelRef!: ComponentRef<SystelabVirtualKeyboardComponent>;\n private showKeyboardButtonElement: HTMLElement;\n\n constructor(\n private readonly elementRef: ElementRef<HTMLInputElement>,\n private readonly overlayService: SystelabVirtualKeyboardOverlayService,\n private readonly renderer: Renderer2,\n @Inject(DOCUMENT) private readonly document: any,\n @Optional() @Inject(VIRTUAL_KEYBOARD_CONFIG) private readonly virtualKeyboardConfig: SystelabVirtualKeyboardConfig,\n ) {\n this.config = this.virtualKeyboardConfig;\n }\n\n ngOnInit() {\n if (this.config?.showIcon) {\n this.attachKeyboardIcon();\n }\n }\n\n ngAfterViewInit() {\n if (this.vkEnabled && this.config?.showIcon) {\n const keyboardIcon = this.elementRef.nativeElement.parentElement.querySelector('i');\n keyboardIcon.addEventListener('click', this.togglePanel.bind(this));\n }\n }\n\n ngOnDestroy(): void {\n if (this.vkEnabled && this.config?.showIcon) {\n const keyboardIcon = this.elementRef.nativeElement.parentElement.querySelector('i');\n keyboardIcon.removeEventListener('click', this.togglePanel.bind(this));\n }\n this.overlayService.destroy();\n }\n\n private togglePanel(): void {\n if (!this.vkEnabled) {\n return;\n }\n if (this.overlayService.isOpen()) {\n this.closePanel();\n } else {\n this.openPanel();\n }\n }\n\n private openPanel(): void {\n if (!this.vkEnabled) {\n return;\n }\n if (this.overlayService.isCreated()) {\n this.overlayService.destroy();\n }\n if (this.overlayService.hasAttached()) {\n return;\n }\n\n const currentLayout = this.getLayout(this.elementRef.nativeElement);\n\n this.panelRef = this.overlayService.create(this.inputOrigin(), this.showKeyboardButtonElement, this.vkFixedBottom, currentLayout);\n this.panelRef.instance.debug = this.vkDebug;\n this.panelRef.instance.setActiveInput(this.elementRef.nativeElement);\n this.panelRef.instance.setLayout(currentLayout);\n this.panelRef.instance.closePanel.subscribe(() => this.closePanel());\n }\n\n private getLayout(activeInputElement: HTMLInputElement | HTMLTextAreaElement): SystelabVirtualKeyboardConstants.Layouts {\n if (this.config?.hasOwnProperty('layout')) {\n return this.config.layout;\n }\n if (this.isInputAlphabetic(activeInputElement)) {\n return SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric;\n } else if (this.isInputNumeric(activeInputElement)) {\n return SystelabVirtualKeyboardConstants.Layouts.Numeric;\n } else {\n return SystelabVirtualKeyboardConstants.Layouts.AlphaNumeric;\n }\n }\n\n private isInputAlphabetic(activeInputElement: HTMLInputElement | HTMLTextAreaElement): boolean {\n const inputMode = this.getInputMode(activeInputElement);\n return inputMode && [SystelabVirtualKeyboardConstants.InputModes.text, SystelabVirtualKeyboardConstants.InputModes.password].some((i) => i === inputMode);\n }\n\n private isInputNumeric(activeInputElement: HTMLInputElement | HTMLTextAreaElement): boolean {\n const inputMode = this.getInputMode(activeInputElement);\n return inputMode && [SystelabVirtualKeyboardConstants.InputModes.numeric].some((i) => i === inputMode);\n }\n\n private getInputMode(activeInputElement: HTMLInputElement | HTMLTextAreaElement): string {\n return activeInputElement?.inputMode ?? activeInputElement?.type;\n }\n\n private closePanel(): void {\n this.overlayService.destroy();\n }\n\n private inputOrigin(): HTMLInputElement {\n return this.elementRef.nativeElement;\n }\n\n private attachKeyboardIcon() {\n if (this.vkEnabled) {\n const child = this.document.createElement('i');\n child.classList.add('fa');\n child.classList.add('fa-keyboard');\n child.classList.add('systelab-virtual-keyboard__show-button');\n this.renderer.appendChild(this.elementRef.nativeElement.parentElement, child);\n this.showKeyboardButtonElement = child;\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SystelabVirtualKeyboardDirective } from './systelab-virtual-keyboard.directive';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { SystelabVirtualKeyboardConfig, VIRTUAL_KEYBOARD_CONFIG } from './systelab-virtual-keyboard.config';\nimport { SystelabVirtualKeyboardOverlayService } from './systelab-virtual-keyboard-overlay.service';\n\nexport const factory = () => {\n const systelabVirtualKeyboardModuleCreated = (factory as any)._systelabVirtualKeyboardModuleCreated || false;\n if (systelabVirtualKeyboardModuleCreated) {\n throw new Error('SystelabVirtualKeyboardModuleCreated.forRoot imported to many times');\n }\n (factory as any)._systelabVirtualKeyboardModuleCreated = true;\n};\n\n@NgModule({\n imports: [CommonModule, OverlayModule],\n declarations: [SystelabVirtualKeyboardDirective],\n exports: [SystelabVirtualKeyboardDirective],\n})\nexport class SystelabVirtualKeyboardModule {\n public static forRoot(conf?: SystelabVirtualKeyboardConfig): ModuleWithProviders<SystelabVirtualKeyboardModule> {\n return {\n ngModule: SystelabVirtualKeyboardModule,\n providers: [\n SystelabVirtualKeyboardOverlayService,\n {\n provide: VIRTUAL_KEYBOARD_CONFIG, useValue: conf\n }\n ]\n };\n }\n\n public static forChild(): ModuleWithProviders<SystelabVirtualKeyboardModule> {\n return {\n ngModule: SystelabVirtualKeyboardModule,\n providers: [],\n };\n }\n}\n","/*\n * Public API Surface of systelab-virtual-keyboard\n */\n\nexport * from './lib/constants';\nexport { SystelabVirtualKeyboardConfig } from './lib/systelab-virtual-keyboard.config';\nexport * from './lib/systelab-virtual-keyboard.directive';\nexport * from './lib/systelab-virtual-keyboard.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SystelabVirtualKeyboardOverlayService"],"mappings":";;;;;;;;AAAA;;;;;;;AAOG;AAEG,IAAW;AAAjB,CAAA,UAAiB,gCAAgC,EAAA;AAE7C,IAAA,IAAY,OAQX;AARD,IAAA,CAAA,UAAY,OAAO,EAAA;AACf,QAAA,OAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,QAAA,OAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;AAC9B,QAAA,OAAA,CAAA,mBAAA,CAAA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ACP,qCAAqC;AACrC,gBAAA;AACI,oBAAA,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE;AAC/C;AACJ;SACJ;;AAGE,IAAA,OAAO,QAAQ,GAAA;QAClB,OAAO;AACH,YAAA,QAAQ,EAAE,6BAA6B;AACvC,YAAA,SAAS,EAAE,EAAE;SAChB;;8GAjBI,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,iBAHvB,gCAAgC,CAAA,EAAA,OAAA,EAAA,CADrC,YAAY,EAAE,aAAa,aAE3B,gCAAgC,CAAA,EAAA,CAAA,CAAA;+GAEjC,6BAA6B,EAAA,OAAA,EAAA,CAJ5B,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;;2FAI5B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBALzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,YAAY,EAAE,CAAC,gCAAgC,CAAC;oBAChD,OAAO,EAAE,CAAC,gCAAgC,CAAC;AAC9C,iBAAA;;;ACnBD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -4,41 +4,56 @@ import * as i3 from '@angular/cdk/overlay';
|
|
|
4
4
|
import { Overlay } from '@angular/cdk/overlay';
|
|
5
5
|
import * as i2 from '@angular/common';
|
|
6
6
|
|
|
7
|
-
declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
7
|
+
declare namespace SystelabVirtualKeyboardConstants {
|
|
8
|
+
enum Layouts {
|
|
9
|
+
Default = "default",
|
|
10
|
+
AlphaNumeric = "alpha-numeric",
|
|
11
|
+
AlphaNumericShift = "alpha-numeric-shift",
|
|
12
|
+
AlphaNumericUppercase = "alpha-numeric-uppercase",
|
|
13
|
+
AlphaNumericUppercaseShift = "alpha-numeric-uppercase-shift",
|
|
14
|
+
Numeric = "numeric",
|
|
15
|
+
NumericShift = "numeric-shift"
|
|
16
|
+
}
|
|
17
|
+
const LayoutDefinitions: {
|
|
18
|
+
default: string[];
|
|
19
|
+
"alpha-numeric": string[];
|
|
20
|
+
"alpha-numeric-shift": string[];
|
|
21
|
+
"alpha-numeric-uppercase": string[];
|
|
22
|
+
"alpha-numeric-uppercase-shift": string[];
|
|
23
|
+
numeric: string[];
|
|
24
|
+
"numeric-shift": string[];
|
|
25
|
+
};
|
|
26
|
+
enum Button {
|
|
27
|
+
Done = "{done}",
|
|
28
|
+
Enter = "{enter}",
|
|
29
|
+
Shift = "{shift}",
|
|
30
|
+
Lock = "{lock}",
|
|
31
|
+
Backspace = "{bksp}",
|
|
32
|
+
Language = "{language}",
|
|
33
|
+
Space = "{space}",
|
|
34
|
+
Tab = "{tab}"
|
|
35
|
+
}
|
|
36
|
+
enum InputMethods {
|
|
37
|
+
onlyMouseEvents = "onlyMouseEvents",
|
|
38
|
+
onlyTouchEvents = "onlyTouchEvents"
|
|
39
|
+
}
|
|
40
|
+
enum InputModes {
|
|
41
|
+
text = "text",
|
|
42
|
+
numeric = "numeric",
|
|
43
|
+
password = "password"
|
|
44
|
+
}
|
|
30
45
|
}
|
|
31
46
|
|
|
32
47
|
interface SystelabVirtualKeyboardConfig {
|
|
33
|
-
layout?:
|
|
34
|
-
inputMethod?:
|
|
48
|
+
layout?: SystelabVirtualKeyboardConstants.Layouts;
|
|
49
|
+
inputMethod?: SystelabVirtualKeyboardConstants.InputMethods;
|
|
35
50
|
showIcon?: boolean;
|
|
36
51
|
showOnMouseClick?: boolean;
|
|
37
52
|
}
|
|
38
53
|
|
|
39
54
|
declare class SystelabVirtualKeyboardComponent implements AfterViewInit {
|
|
40
|
-
private elementRef;
|
|
41
|
-
private virtualKeyboardConfig;
|
|
55
|
+
private readonly elementRef;
|
|
56
|
+
private readonly virtualKeyboardConfig;
|
|
42
57
|
handleKeyUp(event: KeyboardEvent): void;
|
|
43
58
|
handleMouseUp(event: PointerEvent): void;
|
|
44
59
|
get maxLength(): number;
|
|
@@ -50,13 +65,18 @@ declare class SystelabVirtualKeyboardComponent implements AfterViewInit {
|
|
|
50
65
|
private caretPositionEnd;
|
|
51
66
|
private activeInputElement;
|
|
52
67
|
private shiftPressed;
|
|
68
|
+
private capsLockOn;
|
|
53
69
|
closePanel: EventEmitter<void>;
|
|
54
70
|
constructor(elementRef: ElementRef<HTMLInputElement>, virtualKeyboardConfig: SystelabVirtualKeyboardConfig);
|
|
55
71
|
ngAfterViewInit(): void;
|
|
56
72
|
setActiveInput(input: HTMLInputElement | HTMLTextAreaElement): void;
|
|
57
|
-
setLayout(layout:
|
|
73
|
+
setLayout(layout: SystelabVirtualKeyboardConstants.Layouts): void;
|
|
58
74
|
private prepareKeyboardConfig;
|
|
75
|
+
private buildButtonThemes;
|
|
76
|
+
private setButtonClasses;
|
|
59
77
|
private handleKeyPress;
|
|
78
|
+
private addUppercaseClass;
|
|
79
|
+
private removeUppercaseClass;
|
|
60
80
|
private handleButtonOutput;
|
|
61
81
|
private getCommonParams;
|
|
62
82
|
private isAcceptedNonStandardButton;
|
|
@@ -88,7 +108,7 @@ declare class SystelabVirtualKeyboardOverlayService {
|
|
|
88
108
|
constructor(overlay: Overlay);
|
|
89
109
|
isCreated(): boolean;
|
|
90
110
|
isOpen(): boolean;
|
|
91
|
-
create(inputOrigin: HTMLInputElement, showKeyboardButtonElement: HTMLElement, fixedBottom: boolean, layout?:
|
|
111
|
+
create(inputOrigin: HTMLInputElement, showKeyboardButtonElement: HTMLElement, fixedBottom: boolean, layout?: SystelabVirtualKeyboardConstants.Layouts): ComponentRef<SystelabVirtualKeyboardComponent>;
|
|
92
112
|
updatePosition(): void;
|
|
93
113
|
setClickAlreadyHandled(): void;
|
|
94
114
|
setTouchEndAlreadyHandled(): void;
|
|
@@ -113,7 +133,7 @@ declare class SystelabVirtualKeyboardDirective implements OnInit, AfterViewInit,
|
|
|
113
133
|
private readonly overlayService;
|
|
114
134
|
private readonly renderer;
|
|
115
135
|
private readonly document;
|
|
116
|
-
private virtualKeyboardConfig;
|
|
136
|
+
private readonly virtualKeyboardConfig;
|
|
117
137
|
onDocumentScroll(): void;
|
|
118
138
|
onClick(): void;
|
|
119
139
|
onTouchEnd(): void;
|
|
@@ -157,6 +177,6 @@ declare class SystelabVirtualKeyboardModule {
|
|
|
157
177
|
static ɵinj: i0.ɵɵInjectorDeclaration<SystelabVirtualKeyboardModule>;
|
|
158
178
|
}
|
|
159
179
|
|
|
160
|
-
export {
|
|
180
|
+
export { SystelabVirtualKeyboardConstants, SystelabVirtualKeyboardDirective, SystelabVirtualKeyboardModule, factory };
|
|
161
181
|
export type { SystelabVirtualKeyboardConfig };
|
|
162
182
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../../projects/systelab-virtual-keyboard/src/lib/constants.ts","../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.config.ts","../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.component.ts","../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard-overlay.service.ts","../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.directive.ts","../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.module.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;;AASA;AACI;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../projects/systelab-virtual-keyboard/src/lib/constants.ts","../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.config.ts","../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.component.ts","../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard-overlay.service.ts","../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.directive.ts","../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.module.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;;AASA;AAEI;AACI;AACA;AACA;AACA;AACA;AACA;AACA;AACH;AAEM;;;;;;;;;AAwCP;AACI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACH;AAED;AACI;AACA;AACH;AAED;AACI;AACA;AACA;AACH;AACJ;;;AC5EG;AACA;;;AAGH;;ACKD;;;AAQI;AAQA;;;AAYO;;;;;;;;AAUG;;;AAaH;AAiBA;AASP;AA+BA;AAiBA;AAIA;AA0DA;AAQA;AAQA;AAwBA;AAIA;AASA;AAqBA;AAqBA;AA2BA;AAOA;AA6BA;AAsBA;AAqCA;AAQA;AAWA;AAaA;;;AAIH;;ACjbD;;;;;;;;;;AAaiC;AAItB;AAIA;;AAgCA;AAIA;AAIA;AAIA;AAQP;AAKA;AAUA;AAUA;AAgBO;AAIP;AAMA;AAMA;AAyCA;AAUA;AAaA;;;AASH;;ACnMD;;;;;;;AAiBI;AAWA;;AAYA;;;;AAoBA;;;AAeA;;;AAWA;;;;;;AA8BA;AAQA;AAWA;AAoBA;AAaA;AAKA;AAKA;AAIA;AAIA;AAIA;;;AAUH;;AC/ND;AAQA;;AAkBkB;;;;AAMjB;;;"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
@mixin forceWidth($width) {
|
|
2
|
+
min-width: #{$width} !important;
|
|
3
|
+
max-width: #{$width} !important;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--systelab-virtual-keyboard-font-family: 'SF Mono', 'Menlo', 'Consolas', 'Courier New', monospace;
|
|
8
|
+
--systelab-virtual-keyboard-background-color: #B2B2B2;
|
|
9
|
+
--systelab-virtual-keyboard-button-color: #E5E5E5;
|
|
10
|
+
--systelab-virtual-keyboard-button-font-color: #000000;
|
|
11
|
+
--systelab-virtual-keyboard-active-special-button-color: #4D4D4D;
|
|
12
|
+
--systelab-virtual-keyboard-active-special-button-font-color: #FFFFFF;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host {
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.systelab-virtual-keyboard-theme {
|
|
20
|
+
font-family: var(--systelab-virtual-keyboard-font-family);
|
|
21
|
+
background-color: var(--systelab-virtual-keyboard-background-color);
|
|
22
|
+
|
|
23
|
+
.hg-row {
|
|
24
|
+
.hg-button {
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
height: 65px;
|
|
27
|
+
min-width: 75px;
|
|
28
|
+
max-width: 75px !important;
|
|
29
|
+
border-radius: 10px;
|
|
30
|
+
&:not(:last-child) {
|
|
31
|
+
margin-right: 6.8px !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.hg-layout-alpha-numeric,
|
|
37
|
+
&.hg-layout-alpha-numeric-shift,
|
|
38
|
+
&.hg-layout-alpha-numeric-uppercase,
|
|
39
|
+
&.hg-layout-alpha-numeric-uppercase-shift {
|
|
40
|
+
.hg-row {
|
|
41
|
+
&:first-child .hg-button {
|
|
42
|
+
height: 50px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
.hg-button-shift {
|
|
46
|
+
@include forceWidth(182px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.hg-button-bksp {
|
|
50
|
+
@include forceWidth(125px);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.hg-button-tab {
|
|
54
|
+
@include forceWidth(126px);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.hg-button-enter,
|
|
58
|
+
.hg-button-lock {
|
|
59
|
+
@include forceWidth(141px);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.hg-button-space {
|
|
63
|
+
@include forceWidth(100%);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.virtual-keyboard-delete-button,
|
|
68
|
+
.virtual-keyboard-enter-button,
|
|
69
|
+
.virtual-keyboard-function-button {
|
|
70
|
+
background-color: var(--systelab-virtual-keyboard-button-color);
|
|
71
|
+
color: var(--systelab-virtual-keyboard-button-font-color);
|
|
72
|
+
&:first-child {
|
|
73
|
+
justify-content: flex-start;
|
|
74
|
+
align-items: flex-end;
|
|
75
|
+
padding-left: 15px;
|
|
76
|
+
padding-bottom: 15px;
|
|
77
|
+
}
|
|
78
|
+
&:last-child {
|
|
79
|
+
justify-content: flex-end;
|
|
80
|
+
align-items: flex-end;
|
|
81
|
+
padding-right: 15px;
|
|
82
|
+
padding-bottom: 15px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.hg-button-tab {
|
|
87
|
+
justify-content: flex-start;
|
|
88
|
+
align-items: flex-end;
|
|
89
|
+
padding-left: 15px;
|
|
90
|
+
padding-bottom: 15px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.virtual-keyboard-lock-active,
|
|
94
|
+
.virtual-keyboard-shift-active {
|
|
95
|
+
background-color: var(--systelab-virtual-keyboard-active-special-button-color);
|
|
96
|
+
color: var(--systelab-virtual-keyboard-active-special-button-font-color);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.virtual-keyboard-uppercase {
|
|
100
|
+
text-transform: uppercase;
|
|
101
|
+
}
|
|
102
|
+
}
|