systelab-virtual-keyboard 20.1.0 → 20.2.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 +8 -7
- package/fesm2022/systelab-virtual-keyboard.mjs +69 -45
- package/fesm2022/systelab-virtual-keyboard.mjs.map +1 -1
- package/index.d.ts +21 -46
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ NgModule({
|
|
|
15
15
|
})
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Where config is an object with type *
|
|
18
|
+
Where config is an object with type *SystelabVirtualKeyboard.Config*. See [Config](src/lib/systelab-virtual-keyboard.public.ts) for details
|
|
19
19
|
|
|
20
20
|
Then the virtual keyboard can be enabled for inputs or textareas. To enable it the attribute *vkEnabled* can be used into the desire HTML element. It can be binding dynamically in the same way *[vkEnabled]="vkEnabledVariable"*
|
|
21
21
|
|
|
@@ -27,15 +27,15 @@ Then the virtual keyboard can be enabled for inputs or textareas. To enable it t
|
|
|
27
27
|
|
|
28
28
|
The default behaviour can be changed through some attributes:
|
|
29
29
|
|
|
30
|
-
| Name |
|
|
31
|
-
|
|
32
|
-
| vkEnabled |
|
|
33
|
-
| vkFixedBottom |
|
|
34
|
-
| vkConfig |
|
|
30
|
+
| Name | Type | Default | Description |
|
|
31
|
+
|-----------|:------------------------------:|:-------:| ----------- |
|
|
32
|
+
| vkEnabled | boolean | true | Enable the virtual keyboard for the element. If the property exists, the default value is true; if not, is false
|
|
33
|
+
| vkFixedBottom | booles | true | Fix the virtual keyboard to the bottom of the page. If the property exists, the default value is true; if not, is false
|
|
34
|
+
| vkConfig | SystelabVirtualKeyboard.Config | | Configuration object that overrides some default behaviours. See [Config](src/lib/systelab-virtual-keyboard.public.ts) for details
|
|
35
35
|
|
|
36
36
|
### Configuration object
|
|
37
37
|
|
|
38
|
-
The configuration params are describe into the interface [
|
|
38
|
+
The configuration params are describe into the interface [Config](src/lib/systelab-virtual-keyboard.public.ts)
|
|
39
39
|
|
|
40
40
|
| Name | Type | Default | Description |
|
|
41
41
|
|-----------|:----:|:-------:| ----------- |
|
|
@@ -43,6 +43,7 @@ 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
|
+
| numericCloseOnEnter | boolean | false | Close virtual keyboard on numeric layouts upon a *enter* action
|
|
46
47
|
|
|
47
48
|
### Styling variables
|
|
48
49
|
|
|
@@ -14,56 +14,73 @@ 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 (
|
|
17
|
+
var SystelabVirtualKeyboard;
|
|
18
|
+
(function (SystelabVirtualKeyboard) {
|
|
19
|
+
let InputMethods;
|
|
20
|
+
(function (InputMethods) {
|
|
21
|
+
InputMethods["onlyMouseEvents"] = "onlyMouseEvents";
|
|
22
|
+
InputMethods["onlyTouchEvents"] = "onlyTouchEvents";
|
|
23
|
+
})(InputMethods = SystelabVirtualKeyboard.InputMethods || (SystelabVirtualKeyboard.InputMethods = {}));
|
|
19
24
|
let Layouts;
|
|
20
25
|
(function (Layouts) {
|
|
21
|
-
Layouts["Default"] = "default";
|
|
22
26
|
Layouts["AlphaNumeric"] = "alpha-numeric";
|
|
23
27
|
Layouts["AlphaNumericShift"] = "alpha-numeric-shift";
|
|
24
28
|
Layouts["AlphaNumericUppercase"] = "alpha-numeric-uppercase";
|
|
25
29
|
Layouts["AlphaNumericUppercaseShift"] = "alpha-numeric-uppercase-shift";
|
|
26
30
|
Layouts["Numeric"] = "numeric";
|
|
27
31
|
Layouts["NumericShift"] = "numeric-shift";
|
|
28
|
-
})(Layouts =
|
|
32
|
+
})(Layouts = SystelabVirtualKeyboard.Layouts || (SystelabVirtualKeyboard.Layouts = {}));
|
|
33
|
+
})(SystelabVirtualKeyboard || (SystelabVirtualKeyboard = {}));
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* Copyright (c) 2020 - 2024 - Instrumentation Laboratory Company and Systelab Technologies, SA. All rights reserved.
|
|
37
|
+
* NOTICE: All information contained herein is and remains the property of Instrumentation Laboratory Company and its
|
|
38
|
+
* affiliates, if any. The intellectual and technical concepts contained herein are proprietary to Instrumentation
|
|
39
|
+
* Laboratory Company and its affiliates and may be covered by U.S. and foreign patents and patent applications, and/or
|
|
40
|
+
* are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is
|
|
41
|
+
* strictly forbidden unless prior written permission is Instrumentation Laboratory Company.
|
|
42
|
+
*/
|
|
43
|
+
var SystelabVirtualKeyboardConstants;
|
|
44
|
+
(function (SystelabVirtualKeyboardConstants) {
|
|
45
|
+
SystelabVirtualKeyboardConstants.VIRTUAL_KEYBOARD_CONFIG = new InjectionToken('VIRTUAL_KEYBOARD_CONFIG');
|
|
29
46
|
SystelabVirtualKeyboardConstants.LayoutDefinitions = {
|
|
30
|
-
|
|
47
|
+
'default': [
|
|
31
48
|
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
|
|
32
49
|
'{tab} q w e r t y u i o p { } |',
|
|
33
50
|
'{lock} a s d f g h j k l : " {enter}',
|
|
34
51
|
'{shift} z x c v b n m < > ? {shift}',
|
|
35
52
|
'{space}',
|
|
36
53
|
],
|
|
37
|
-
[
|
|
54
|
+
[SystelabVirtualKeyboard.Layouts.AlphaNumeric]: [
|
|
38
55
|
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
|
|
39
56
|
'{tab} q w e r t y u i o p { } |',
|
|
40
57
|
'{lock} a s d f g h j k l : " {enter}',
|
|
41
58
|
'{shift} z x c v b n m < > ? {shift}',
|
|
42
59
|
'{space}',
|
|
43
60
|
],
|
|
44
|
-
[
|
|
61
|
+
[SystelabVirtualKeyboard.Layouts.AlphaNumericShift]: [
|
|
45
62
|
'~ ! @ # $ % ^ & * ( ) _ + {bksp}',
|
|
46
63
|
'{tab} Q W E R T Y U I O P [ ] \\',
|
|
47
64
|
"{lock} A S D F G H J K L ; ' {enter}",
|
|
48
65
|
'{shift} Z X C V B N M , . / {shift}',
|
|
49
66
|
'{space}',
|
|
50
67
|
],
|
|
51
|
-
[
|
|
68
|
+
[SystelabVirtualKeyboard.Layouts.AlphaNumericUppercase]: [
|
|
52
69
|
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
|
|
53
70
|
'{tab} Q W E R T Y U I O P [ ] \\',
|
|
54
71
|
"{lock} A S D F G H J K L ; ' {enter}",
|
|
55
72
|
'{shift} Z X C V B N M , . / {shift}',
|
|
56
73
|
'{space}',
|
|
57
74
|
],
|
|
58
|
-
[
|
|
75
|
+
[SystelabVirtualKeyboard.Layouts.AlphaNumericUppercaseShift]: [
|
|
59
76
|
'~ ! @ # $ % ^ & * ( ) _ + {bksp}',
|
|
60
77
|
'{tab} Q W E R T Y U I O P [ ] \\',
|
|
61
78
|
"{lock} A S D F G H J K L ; ' {enter}",
|
|
62
79
|
'{shift} Z X C V B N M , . / {shift}',
|
|
63
80
|
'{space}',
|
|
64
81
|
],
|
|
65
|
-
[
|
|
66
|
-
[
|
|
82
|
+
[SystelabVirtualKeyboard.Layouts.Numeric]: ['7 8 9 {bksp}', '4 5 6 +', '1 2 3 -', '{shift} 0 . {enter}'],
|
|
83
|
+
[SystelabVirtualKeyboard.Layouts.NumericShift]: ['! @ # {bksp}', '$ % _ =', '& * ( -', '{shift} ) . {enter}'],
|
|
67
84
|
};
|
|
68
85
|
let Button;
|
|
69
86
|
(function (Button) {
|
|
@@ -76,11 +93,6 @@ var SystelabVirtualKeyboardConstants;
|
|
|
76
93
|
Button["Space"] = "{space}";
|
|
77
94
|
Button["Tab"] = "{tab}";
|
|
78
95
|
})(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
96
|
let InputModes;
|
|
85
97
|
(function (InputModes) {
|
|
86
98
|
InputModes["text"] = "text";
|
|
@@ -89,8 +101,6 @@ var SystelabVirtualKeyboardConstants;
|
|
|
89
101
|
})(InputModes = SystelabVirtualKeyboardConstants.InputModes || (SystelabVirtualKeyboardConstants.InputModes = {}));
|
|
90
102
|
})(SystelabVirtualKeyboardConstants || (SystelabVirtualKeyboardConstants = {}));
|
|
91
103
|
|
|
92
|
-
const VIRTUAL_KEYBOARD_CONFIG = new InjectionToken('VIRTUAL_KEYBOARD_CONFIG');
|
|
93
|
-
|
|
94
104
|
class SystelabVirtualKeyboardComponent {
|
|
95
105
|
handleKeyUp(event) {
|
|
96
106
|
if (event.isTrusted) {
|
|
@@ -110,10 +120,11 @@ class SystelabVirtualKeyboardComponent {
|
|
|
110
120
|
this.elementRef = elementRef;
|
|
111
121
|
this.virtualKeyboardConfig = virtualKeyboardConfig;
|
|
112
122
|
this.debug = false;
|
|
113
|
-
this.selectedLayout =
|
|
123
|
+
this.selectedLayout = 'default';
|
|
114
124
|
this.caretPosition = null;
|
|
115
125
|
this.caretPositionEnd = null;
|
|
116
126
|
this.shiftPressed = false;
|
|
127
|
+
this.specialKeysAlwaysUppercase = false;
|
|
117
128
|
this.capsLockOn = false;
|
|
118
129
|
this.closePanel = new EventEmitter();
|
|
119
130
|
}
|
|
@@ -142,6 +153,10 @@ class SystelabVirtualKeyboardComponent {
|
|
|
142
153
|
this.keyboard.setOptions({
|
|
143
154
|
layoutName: layout,
|
|
144
155
|
});
|
|
156
|
+
if (layout === SystelabVirtualKeyboard.Layouts.AlphaNumericUppercase || layout === SystelabVirtualKeyboard.Layouts.AlphaNumericUppercaseShift) {
|
|
157
|
+
this.specialKeysAlwaysUppercase = true;
|
|
158
|
+
this.addUppercaseClass();
|
|
159
|
+
}
|
|
145
160
|
}
|
|
146
161
|
}
|
|
147
162
|
prepareKeyboardConfig() {
|
|
@@ -158,13 +173,13 @@ class SystelabVirtualKeyboardComponent {
|
|
|
158
173
|
layout: SystelabVirtualKeyboardConstants.LayoutDefinitions,
|
|
159
174
|
};
|
|
160
175
|
if (this.virtualKeyboardConfig?.hasOwnProperty('inputMethod')) {
|
|
161
|
-
if (this.virtualKeyboardConfig.inputMethod ===
|
|
176
|
+
if (this.virtualKeyboardConfig.inputMethod === SystelabVirtualKeyboard.InputMethods.onlyMouseEvents) {
|
|
162
177
|
keyboardOptions = {
|
|
163
178
|
...keyboardOptions,
|
|
164
179
|
useMouseEvents: true,
|
|
165
180
|
};
|
|
166
181
|
}
|
|
167
|
-
else if (this.virtualKeyboardConfig.inputMethod ===
|
|
182
|
+
else if (this.virtualKeyboardConfig.inputMethod === SystelabVirtualKeyboard.InputMethods.onlyTouchEvents) {
|
|
168
183
|
keyboardOptions = {
|
|
169
184
|
...keyboardOptions,
|
|
170
185
|
useTouchEvents: true,
|
|
@@ -196,7 +211,7 @@ class SystelabVirtualKeyboardComponent {
|
|
|
196
211
|
if (this.debug) {
|
|
197
212
|
console.log('Key press:', button);
|
|
198
213
|
}
|
|
199
|
-
if (button
|
|
214
|
+
if (button.startsWith('&') && button.length > 1) {
|
|
200
215
|
button = new DOMParser().parseFromString(button, 'text/html').body.textContent;
|
|
201
216
|
}
|
|
202
217
|
if (button === SystelabVirtualKeyboardConstants.Button.Shift) {
|
|
@@ -227,6 +242,12 @@ class SystelabVirtualKeyboardComponent {
|
|
|
227
242
|
this.closePanel.emit();
|
|
228
243
|
return;
|
|
229
244
|
}
|
|
245
|
+
else if (this.virtualKeyboardConfig.numericCloseOnEnter &&
|
|
246
|
+
button === SystelabVirtualKeyboardConstants.Button.Enter &&
|
|
247
|
+
(this.selectedLayout === SystelabVirtualKeyboard.Layouts.Numeric || this.selectedLayout === SystelabVirtualKeyboard.Layouts.NumericShift)) {
|
|
248
|
+
this.closePanel.emit();
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
230
251
|
if (!this.isAcceptedNonStandardButton(button) && !this.isStandardButton(button)) {
|
|
231
252
|
return;
|
|
232
253
|
}
|
|
@@ -253,6 +274,9 @@ class SystelabVirtualKeyboardComponent {
|
|
|
253
274
|
this.keyboard.addButtonTheme(SystelabVirtualKeyboardConstants.Button.Enter, 'virtual-keyboard-uppercase');
|
|
254
275
|
}
|
|
255
276
|
removeUppercaseClass() {
|
|
277
|
+
if (this.specialKeysAlwaysUppercase) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
256
280
|
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Shift, 'virtual-keyboard-uppercase');
|
|
257
281
|
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Lock, 'virtual-keyboard-uppercase');
|
|
258
282
|
this.keyboard.removeButtonTheme(SystelabVirtualKeyboardConstants.Button.Tab, 'virtual-keyboard-uppercase');
|
|
@@ -302,7 +326,7 @@ class SystelabVirtualKeyboardComponent {
|
|
|
302
326
|
const eventInit = {
|
|
303
327
|
bubbles: true,
|
|
304
328
|
cancelable: true,
|
|
305
|
-
shiftKey: this.selectedLayout ===
|
|
329
|
+
shiftKey: this.selectedLayout === SystelabVirtualKeyboard.Layouts.AlphaNumericShift,
|
|
306
330
|
key: key,
|
|
307
331
|
code: code,
|
|
308
332
|
location: 0,
|
|
@@ -339,17 +363,17 @@ class SystelabVirtualKeyboardComponent {
|
|
|
339
363
|
const currentLayout = this.keyboard.options.layoutName;
|
|
340
364
|
let selectedLayout;
|
|
341
365
|
switch (currentLayout) {
|
|
342
|
-
case
|
|
343
|
-
case
|
|
344
|
-
selectedLayout = currentLayout ===
|
|
366
|
+
case SystelabVirtualKeyboard.Layouts.AlphaNumeric:
|
|
367
|
+
case SystelabVirtualKeyboard.Layouts.AlphaNumericShift:
|
|
368
|
+
selectedLayout = currentLayout === SystelabVirtualKeyboard.Layouts.AlphaNumeric ? SystelabVirtualKeyboard.Layouts.AlphaNumericShift : SystelabVirtualKeyboard.Layouts.AlphaNumeric;
|
|
345
369
|
break;
|
|
346
|
-
case
|
|
347
|
-
case
|
|
348
|
-
selectedLayout = currentLayout ===
|
|
370
|
+
case SystelabVirtualKeyboard.Layouts.AlphaNumericUppercase:
|
|
371
|
+
case SystelabVirtualKeyboard.Layouts.AlphaNumericUppercaseShift:
|
|
372
|
+
selectedLayout = currentLayout === SystelabVirtualKeyboard.Layouts.AlphaNumericUppercase ? SystelabVirtualKeyboard.Layouts.AlphaNumericUppercaseShift : SystelabVirtualKeyboard.Layouts.AlphaNumericUppercase;
|
|
349
373
|
break;
|
|
350
|
-
case
|
|
351
|
-
case
|
|
352
|
-
selectedLayout = currentLayout ===
|
|
374
|
+
case SystelabVirtualKeyboard.Layouts.Numeric:
|
|
375
|
+
case SystelabVirtualKeyboard.Layouts.NumericShift:
|
|
376
|
+
selectedLayout = currentLayout === SystelabVirtualKeyboard.Layouts.Numeric ? SystelabVirtualKeyboard.Layouts.NumericShift : SystelabVirtualKeyboard.Layouts.Numeric;
|
|
353
377
|
break;
|
|
354
378
|
default:
|
|
355
379
|
}
|
|
@@ -358,7 +382,7 @@ class SystelabVirtualKeyboardComponent {
|
|
|
358
382
|
}
|
|
359
383
|
}
|
|
360
384
|
isStandardButton(button) {
|
|
361
|
-
return button && !(button
|
|
385
|
+
return button && !(button.startsWith('{') && button.endsWith('}'));
|
|
362
386
|
}
|
|
363
387
|
/*
|
|
364
388
|
* OUTPUT STRING METHODS
|
|
@@ -424,7 +448,7 @@ class SystelabVirtualKeyboardComponent {
|
|
|
424
448
|
*/
|
|
425
449
|
this.setCaretPosition(event.target.selectionStart, event.target.selectionEnd);
|
|
426
450
|
if (this.debug) {
|
|
427
|
-
console.log('Caret at:', this.caretPosition, this.caretPositionEnd, event
|
|
451
|
+
console.log('Caret at:', this.caretPosition, this.caretPositionEnd, event?.target.tagName.toLowerCase(), event);
|
|
428
452
|
}
|
|
429
453
|
}
|
|
430
454
|
else if (event.type === 'pointerup' && this.activeInputElement === document.activeElement) {
|
|
@@ -471,7 +495,7 @@ class SystelabVirtualKeyboardComponent {
|
|
|
471
495
|
this.caretPosition = position;
|
|
472
496
|
this.caretPositionEnd = endPosition;
|
|
473
497
|
}
|
|
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 }); }
|
|
498
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SystelabVirtualKeyboardComponent, deps: [{ token: i0.ElementRef }, { token: SystelabVirtualKeyboardConstants.VIRTUAL_KEYBOARD_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
475
499
|
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" }); }
|
|
476
500
|
}
|
|
477
501
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SystelabVirtualKeyboardComponent, decorators: [{
|
|
@@ -481,7 +505,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
481
505
|
type: Optional
|
|
482
506
|
}, {
|
|
483
507
|
type: Inject,
|
|
484
|
-
args: [VIRTUAL_KEYBOARD_CONFIG]
|
|
508
|
+
args: [SystelabVirtualKeyboardConstants.VIRTUAL_KEYBOARD_CONFIG]
|
|
485
509
|
}] }], propDecorators: { handleKeyUp: [{
|
|
486
510
|
type: HostListener,
|
|
487
511
|
args: ['window:keyup', ['$event']]
|
|
@@ -508,7 +532,7 @@ class SystelabVirtualKeyboardOverlayService {
|
|
|
508
532
|
isOpen() {
|
|
509
533
|
return this.open;
|
|
510
534
|
}
|
|
511
|
-
create(inputOrigin, showKeyboardButtonElement, fixedBottom, layout =
|
|
535
|
+
create(inputOrigin, showKeyboardButtonElement, fixedBottom, layout = 'default') {
|
|
512
536
|
this.inputOrigin = inputOrigin;
|
|
513
537
|
this.fixedBottom = fixedBottom;
|
|
514
538
|
this.showKeyboardButtonElement = showKeyboardButtonElement;
|
|
@@ -630,7 +654,7 @@ class SystelabVirtualKeyboardOverlayService {
|
|
|
630
654
|
]);
|
|
631
655
|
}
|
|
632
656
|
getOverlaySize() {
|
|
633
|
-
const overlayWidth = this.layout ===
|
|
657
|
+
const overlayWidth = this.layout === SystelabVirtualKeyboard.Layouts.Numeric ? '331px' : '1200px';
|
|
634
658
|
return {
|
|
635
659
|
width: overlayWidth,
|
|
636
660
|
maxWidth: overlayWidth,
|
|
@@ -794,13 +818,13 @@ class SystelabVirtualKeyboardDirective {
|
|
|
794
818
|
return this.config.layout;
|
|
795
819
|
}
|
|
796
820
|
if (this.isInputAlphabetic(activeInputElement)) {
|
|
797
|
-
return
|
|
821
|
+
return SystelabVirtualKeyboard.Layouts.AlphaNumeric;
|
|
798
822
|
}
|
|
799
823
|
else if (this.isInputNumeric(activeInputElement)) {
|
|
800
|
-
return
|
|
824
|
+
return SystelabVirtualKeyboard.Layouts.Numeric;
|
|
801
825
|
}
|
|
802
826
|
else {
|
|
803
|
-
return
|
|
827
|
+
return SystelabVirtualKeyboard.Layouts.AlphaNumeric;
|
|
804
828
|
}
|
|
805
829
|
}
|
|
806
830
|
isInputAlphabetic(activeInputElement) {
|
|
@@ -830,7 +854,7 @@ class SystelabVirtualKeyboardDirective {
|
|
|
830
854
|
this.showKeyboardButtonElement = child;
|
|
831
855
|
}
|
|
832
856
|
}
|
|
833
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SystelabVirtualKeyboardDirective, deps: [{ token: i0.ElementRef }, { token: SystelabVirtualKeyboardOverlayService }, { token: i0.Renderer2 }, { token: DOCUMENT }, { token: VIRTUAL_KEYBOARD_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
857
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SystelabVirtualKeyboardDirective, deps: [{ token: i0.ElementRef }, { token: SystelabVirtualKeyboardOverlayService }, { token: i0.Renderer2 }, { token: DOCUMENT }, { token: SystelabVirtualKeyboardConstants.VIRTUAL_KEYBOARD_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
834
858
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.3", type: SystelabVirtualKeyboardDirective, isStandalone: false, selector: "input[vkEnabled], textarea[vkEnabled]", inputs: { vkEnabled: "vkEnabled", vkFixedBottom: "vkFixedBottom", vkDebug: "vkDebug", vkConfig: "vkConfig" }, host: { listeners: { "window:touchmove": "onDocumentScroll($event)", "window:touchend": "onDocumentScroll($event)", "window:wheel": "onDocumentScroll($event)", "document:scroll": "onDocumentScroll($event)", "click": "onClick($event)", "touchend": "onTouchEnd($event)" } }, ngImport: i0 }); }
|
|
835
859
|
}
|
|
836
860
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SystelabVirtualKeyboardDirective, decorators: [{
|
|
@@ -846,7 +870,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
846
870
|
type: Optional
|
|
847
871
|
}, {
|
|
848
872
|
type: Inject,
|
|
849
|
-
args: [VIRTUAL_KEYBOARD_CONFIG]
|
|
873
|
+
args: [SystelabVirtualKeyboardConstants.VIRTUAL_KEYBOARD_CONFIG]
|
|
850
874
|
}] }], propDecorators: { onDocumentScroll: [{
|
|
851
875
|
type: HostListener,
|
|
852
876
|
args: ['window:touchmove', ['$event']]
|
|
@@ -889,7 +913,7 @@ class SystelabVirtualKeyboardModule {
|
|
|
889
913
|
providers: [
|
|
890
914
|
SystelabVirtualKeyboardOverlayService,
|
|
891
915
|
{
|
|
892
|
-
provide: VIRTUAL_KEYBOARD_CONFIG, useValue: conf
|
|
916
|
+
provide: SystelabVirtualKeyboardConstants.VIRTUAL_KEYBOARD_CONFIG, useValue: conf
|
|
893
917
|
}
|
|
894
918
|
]
|
|
895
919
|
};
|
|
@@ -921,5 +945,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
921
945
|
* Generated bundle index. Do not edit.
|
|
922
946
|
*/
|
|
923
947
|
|
|
924
|
-
export {
|
|
948
|
+
export { SystelabVirtualKeyboard, SystelabVirtualKeyboardDirective, SystelabVirtualKeyboardModule, factory };
|
|
925
949
|
//# 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 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,GAAA,qBAAyC;AACzC,QAAA,OAAA,CAAA,uBAAA,CAAA,GAAA,yBAAiD;AACjD,QAAA,OAAA,CAAA,4BAAA,CAAA,GAAA,+BAA4D;AAC5D,QAAA,OAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,QAAA,OAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;AAClC,KAAC,EARW,OAAO,GAAP,gCAAA,CAAA,OAAO,KAAP,wCAAO,GAAA,EAAA,CAAA,CAAA;AAUN,IAAA,gCAAA,CAAA,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,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;;;;"}
|
|
1
|
+
{"version":3,"file":"systelab-virtual-keyboard.mjs","sources":["../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.public.ts","../../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.constants.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 SystelabVirtualKeyboard {\n\n export interface Config {\n layout?: SystelabVirtualKeyboard.Layouts;\n inputMethod?: SystelabVirtualKeyboard.InputMethods;\n showIcon?: boolean;\n showOnMouseClick?: boolean;\n numericCloseOnEnter?: boolean;\n }\n\n export enum InputMethods {\n onlyMouseEvents = 'onlyMouseEvents',\n onlyTouchEvents = 'onlyTouchEvents',\n }\n\n export enum Layouts {\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","/*\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 { SystelabVirtualKeyboard } from './systelab-virtual-keyboard.public';\nimport { InjectionToken } from '@angular/core';\n\nexport namespace SystelabVirtualKeyboardConstants {\n\n export const VIRTUAL_KEYBOARD_CONFIG = new InjectionToken<SystelabVirtualKeyboard.Config>('VIRTUAL_KEYBOARD_CONFIG');\n\n export const LayoutDefinitions = {\n 'default': [\n '` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',\n '{tab} q w e r t y u i o p { } |',\n '{lock} a s d f g h j k l : \" {enter}',\n '{shift} z x c v b n m < > ? {shift}',\n '{space}',\n ],\n [SystelabVirtualKeyboard.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 [SystelabVirtualKeyboard.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 [SystelabVirtualKeyboard.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 [SystelabVirtualKeyboard.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 [SystelabVirtualKeyboard.Layouts.Numeric]: ['7 8 9 {bksp}', '4 5 6 +', '1 2 3 -', '{shift} 0 . {enter}'],\n [SystelabVirtualKeyboard.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 InputModes {\n text = 'text',\n numeric = 'numeric',\n password = 'password',\n }\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 './systelab-virtual-keyboard.constants';\nimport { KeyboardOptions } from 'simple-keyboard/build/interfaces';\nimport { SystelabVirtualKeyboard } from './systelab-virtual-keyboard.public';\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: SystelabVirtualKeyboard.Layouts | 'default' = '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 = false;\n private specialKeysAlwaysUppercase = false;\n private capsLockOn = false;\n\n @Output() closePanel = new EventEmitter<void>();\n\n constructor(\n private readonly elementRef: ElementRef<HTMLInputElement>,\n @Optional() @Inject(SystelabVirtualKeyboardConstants.VIRTUAL_KEYBOARD_CONFIG) private readonly virtualKeyboardConfig: SystelabVirtualKeyboard.Config) {}\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: SystelabVirtualKeyboard.Layouts | 'default'): void {\n this.selectedLayout = layout;\n if (this.keyboard) {\n this.keyboard.setOptions({\n layoutName: layout,\n });\n\n if (layout === SystelabVirtualKeyboard.Layouts.AlphaNumericUppercase || layout === SystelabVirtualKeyboard.Layouts.AlphaNumericUppercaseShift) {\n this.specialKeysAlwaysUppercase = true;\n this.addUppercaseClass();\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 === SystelabVirtualKeyboard.InputMethods.onlyMouseEvents) {\n keyboardOptions = {\n ...keyboardOptions,\n useMouseEvents: true,\n }\n } else if (this.virtualKeyboardConfig.inputMethod === SystelabVirtualKeyboard.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.startsWith('&') && 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 } else if (\n this.virtualKeyboardConfig.numericCloseOnEnter &&\n button === SystelabVirtualKeyboardConstants.Button.Enter &&\n (this.selectedLayout === SystelabVirtualKeyboard.Layouts.Numeric || this.selectedLayout === SystelabVirtualKeyboard.Layouts.NumericShift)) {\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 if (this.specialKeysAlwaysUppercase) {\n return;\n }\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 === SystelabVirtualKeyboard.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: SystelabVirtualKeyboard.Layouts;\n\n switch (currentLayout) {\n case SystelabVirtualKeyboard.Layouts.AlphaNumeric:\n case SystelabVirtualKeyboard.Layouts.AlphaNumericShift:\n selectedLayout = currentLayout === SystelabVirtualKeyboard.Layouts.AlphaNumeric ? SystelabVirtualKeyboard.Layouts.AlphaNumericShift : SystelabVirtualKeyboard.Layouts.AlphaNumeric;\n break;\n\n case SystelabVirtualKeyboard.Layouts.AlphaNumericUppercase:\n case SystelabVirtualKeyboard.Layouts.AlphaNumericUppercaseShift:\n selectedLayout = currentLayout === SystelabVirtualKeyboard.Layouts.AlphaNumericUppercase ? SystelabVirtualKeyboard.Layouts.AlphaNumericUppercaseShift : SystelabVirtualKeyboard.Layouts.AlphaNumericUppercase;\n break;\n\n case SystelabVirtualKeyboard.Layouts.Numeric:\n case SystelabVirtualKeyboard.Layouts.NumericShift:\n selectedLayout = currentLayout === SystelabVirtualKeyboard.Layouts.Numeric ? SystelabVirtualKeyboard.Layouts.NumericShift : SystelabVirtualKeyboard.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.startsWith('{') && button.endsWith('}'));\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?.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 { SystelabVirtualKeyboard } from './systelab-virtual-keyboard.public';\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: SystelabVirtualKeyboard.Layouts | 'default';\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: SystelabVirtualKeyboard.Layouts | 'default' = '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 === SystelabVirtualKeyboard.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 { SystelabVirtualKeyboardConstants } from './systelab-virtual-keyboard.constants';\nimport { SystelabVirtualKeyboard } from './systelab-virtual-keyboard.public';\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: SystelabVirtualKeyboard.Config;\n\n @Input()\n get vkConfig(): SystelabVirtualKeyboard.Config {\n return this.config;\n }\n\n set vkConfig(config: SystelabVirtualKeyboard.Config) {\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(SystelabVirtualKeyboardConstants.VIRTUAL_KEYBOARD_CONFIG) private readonly virtualKeyboardConfig: SystelabVirtualKeyboard.Config,\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): SystelabVirtualKeyboard.Layouts {\n if (this.config?.hasOwnProperty('layout')) {\n return this.config.layout;\n }\n if (this.isInputAlphabetic(activeInputElement)) {\n return SystelabVirtualKeyboard.Layouts.AlphaNumeric;\n } else if (this.isInputNumeric(activeInputElement)) {\n return SystelabVirtualKeyboard.Layouts.Numeric;\n } else {\n return SystelabVirtualKeyboard.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 { SystelabVirtualKeyboardOverlayService } from './systelab-virtual-keyboard-overlay.service';\nimport { SystelabVirtualKeyboard } from '../public-api';\nimport { SystelabVirtualKeyboardConstants } from './systelab-virtual-keyboard.constants';\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?: SystelabVirtualKeyboard.Config): ModuleWithProviders<SystelabVirtualKeyboardModule> {\n return {\n ngModule: SystelabVirtualKeyboardModule,\n providers: [\n SystelabVirtualKeyboardOverlayService,\n {\n provide: SystelabVirtualKeyboardConstants.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 { SystelabVirtualKeyboard } from './lib/systelab-virtual-keyboard.public';\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,uBAAuB,EAAA;AAUpC,IAAA,IAAY,YAGX;AAHD,IAAA,CAAA,UAAY,YAAY,EAAA;AACpB,QAAA,YAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,QAAA,YAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACvC,KAAC,EAHW,YAAY,GAAZ,uBAAA,CAAA,YAAY,KAAZ,oCAAY,GAAA,EAAA,CAAA,CAAA;AAKxB,IAAA,IAAY,OAOX;AAPD,IAAA,CAAA,UAAY,OAAO,EAAA;AACf,QAAA,OAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;AAC9B,QAAA,OAAA,CAAA,mBAAA,CAAA,GAAA,qBAAyC;AACzC,QAAA,OAAA,CAAA,uBAAA,CAAA,GAAA,yBAAiD;AACjD,QAAA,OAAA,CAAA,4BAAA,CAAA,GAAA,+BAA4D;AAC5D,QAAA,OAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,QAAA,OAAA,CAAA,cAAA,CAAA,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ChD,OAAO,EAAE,CAAC,gCAAgC,CAAC;AAC9C,iBAAA;;;ACpBD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -4,9 +4,19 @@ 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 namespace
|
|
7
|
+
declare namespace SystelabVirtualKeyboard {
|
|
8
|
+
interface Config {
|
|
9
|
+
layout?: SystelabVirtualKeyboard.Layouts;
|
|
10
|
+
inputMethod?: SystelabVirtualKeyboard.InputMethods;
|
|
11
|
+
showIcon?: boolean;
|
|
12
|
+
showOnMouseClick?: boolean;
|
|
13
|
+
numericCloseOnEnter?: boolean;
|
|
14
|
+
}
|
|
15
|
+
enum InputMethods {
|
|
16
|
+
onlyMouseEvents = "onlyMouseEvents",
|
|
17
|
+
onlyTouchEvents = "onlyTouchEvents"
|
|
18
|
+
}
|
|
8
19
|
enum Layouts {
|
|
9
|
-
Default = "default",
|
|
10
20
|
AlphaNumeric = "alpha-numeric",
|
|
11
21
|
AlphaNumericShift = "alpha-numeric-shift",
|
|
12
22
|
AlphaNumericUppercase = "alpha-numeric-uppercase",
|
|
@@ -14,41 +24,6 @@ declare namespace SystelabVirtualKeyboardConstants {
|
|
|
14
24
|
Numeric = "numeric",
|
|
15
25
|
NumericShift = "numeric-shift"
|
|
16
26
|
}
|
|
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
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
interface SystelabVirtualKeyboardConfig {
|
|
48
|
-
layout?: SystelabVirtualKeyboardConstants.Layouts;
|
|
49
|
-
inputMethod?: SystelabVirtualKeyboardConstants.InputMethods;
|
|
50
|
-
showIcon?: boolean;
|
|
51
|
-
showOnMouseClick?: boolean;
|
|
52
27
|
}
|
|
53
28
|
|
|
54
29
|
declare class SystelabVirtualKeyboardComponent implements AfterViewInit {
|
|
@@ -65,12 +40,13 @@ declare class SystelabVirtualKeyboardComponent implements AfterViewInit {
|
|
|
65
40
|
private caretPositionEnd;
|
|
66
41
|
private activeInputElement;
|
|
67
42
|
private shiftPressed;
|
|
43
|
+
private specialKeysAlwaysUppercase;
|
|
68
44
|
private capsLockOn;
|
|
69
45
|
closePanel: EventEmitter<void>;
|
|
70
|
-
constructor(elementRef: ElementRef<HTMLInputElement>, virtualKeyboardConfig:
|
|
46
|
+
constructor(elementRef: ElementRef<HTMLInputElement>, virtualKeyboardConfig: SystelabVirtualKeyboard.Config);
|
|
71
47
|
ngAfterViewInit(): void;
|
|
72
48
|
setActiveInput(input: HTMLInputElement | HTMLTextAreaElement): void;
|
|
73
|
-
setLayout(layout:
|
|
49
|
+
setLayout(layout: SystelabVirtualKeyboard.Layouts | 'default'): void;
|
|
74
50
|
private prepareKeyboardConfig;
|
|
75
51
|
private buildButtonThemes;
|
|
76
52
|
private setButtonClasses;
|
|
@@ -108,7 +84,7 @@ declare class SystelabVirtualKeyboardOverlayService {
|
|
|
108
84
|
constructor(overlay: Overlay);
|
|
109
85
|
isCreated(): boolean;
|
|
110
86
|
isOpen(): boolean;
|
|
111
|
-
create(inputOrigin: HTMLInputElement, showKeyboardButtonElement: HTMLElement, fixedBottom: boolean, layout?:
|
|
87
|
+
create(inputOrigin: HTMLInputElement, showKeyboardButtonElement: HTMLElement, fixedBottom: boolean, layout?: SystelabVirtualKeyboard.Layouts | 'default'): ComponentRef<SystelabVirtualKeyboardComponent>;
|
|
112
88
|
updatePosition(): void;
|
|
113
89
|
setClickAlreadyHandled(): void;
|
|
114
90
|
setTouchEndAlreadyHandled(): void;
|
|
@@ -147,11 +123,11 @@ declare class SystelabVirtualKeyboardDirective implements OnInit, AfterViewInit,
|
|
|
147
123
|
get vkDebug(): boolean;
|
|
148
124
|
set vkDebug(debug: boolean);
|
|
149
125
|
private config;
|
|
150
|
-
get vkConfig():
|
|
151
|
-
set vkConfig(config:
|
|
126
|
+
get vkConfig(): SystelabVirtualKeyboard.Config;
|
|
127
|
+
set vkConfig(config: SystelabVirtualKeyboard.Config);
|
|
152
128
|
private panelRef;
|
|
153
129
|
private showKeyboardButtonElement;
|
|
154
|
-
constructor(elementRef: ElementRef<HTMLInputElement>, overlayService: SystelabVirtualKeyboardOverlayService, renderer: Renderer2, document: any, virtualKeyboardConfig:
|
|
130
|
+
constructor(elementRef: ElementRef<HTMLInputElement>, overlayService: SystelabVirtualKeyboardOverlayService, renderer: Renderer2, document: any, virtualKeyboardConfig: SystelabVirtualKeyboard.Config);
|
|
155
131
|
ngOnInit(): void;
|
|
156
132
|
ngAfterViewInit(): void;
|
|
157
133
|
ngOnDestroy(): void;
|
|
@@ -170,13 +146,12 @@ declare class SystelabVirtualKeyboardDirective implements OnInit, AfterViewInit,
|
|
|
170
146
|
|
|
171
147
|
declare const factory: () => void;
|
|
172
148
|
declare class SystelabVirtualKeyboardModule {
|
|
173
|
-
static forRoot(conf?:
|
|
149
|
+
static forRoot(conf?: SystelabVirtualKeyboard.Config): ModuleWithProviders<SystelabVirtualKeyboardModule>;
|
|
174
150
|
static forChild(): ModuleWithProviders<SystelabVirtualKeyboardModule>;
|
|
175
151
|
static ɵfac: i0.ɵɵFactoryDeclaration<SystelabVirtualKeyboardModule, never>;
|
|
176
152
|
static ɵmod: i0.ɵɵNgModuleDeclaration<SystelabVirtualKeyboardModule, [typeof SystelabVirtualKeyboardDirective], [typeof i2.CommonModule, typeof i3.OverlayModule], [typeof SystelabVirtualKeyboardDirective]>;
|
|
177
153
|
static ɵinj: i0.ɵɵInjectorDeclaration<SystelabVirtualKeyboardModule>;
|
|
178
154
|
}
|
|
179
155
|
|
|
180
|
-
export {
|
|
181
|
-
export type { SystelabVirtualKeyboardConfig };
|
|
156
|
+
export { SystelabVirtualKeyboard, SystelabVirtualKeyboardDirective, SystelabVirtualKeyboardModule, factory };
|
|
182
157
|
//# 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/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../projects/systelab-virtual-keyboard/src/lib/systelab-virtual-keyboard.public.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],"names":[],"mappings":";;;;;;AASA;AAEI;AACI;AACA;;;;AAIH;AAED;AACI;AACA;AACH;AAED;AACI;AACA;AACA;AACA;AACA;AACA;AACH;AACJ;;ACjBD;;;AAQI;AAQA;;;AAYO;;;;;;;;;AAWG;;;AAaH;;AA+BP;AA+BA;AAiBA;AAIA;AAgEA;AAQA;AAWA;AAwBA;AAIA;AASA;AAqBA;AAqBA;AA2BA;AAOA;AA6BA;AAsBA;AAqCA;AAQA;AAWA;AAaA;;;AAIH;;AChcD;;;;;;;;;;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;;AAMA;AAKA;;;;;;AA8BA;AAQA;AAWA;AAoBA;AAaA;AAKA;AAKA;AAIA;AAIA;AAIA;;;AAUH;;AC9ND;AAQA;;AAkBkB;;;;AAMjB;;"}
|