@sankhyalabs/core-docs 5.11.6 → 5.12.0-dev.1

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.
@@ -13,6 +13,7 @@ Classe com utiliários comuns para funções genéricas em JavaScript.
13
13
  ### Methods
14
14
 
15
15
  - [debounce](JSUtils.md#debounce)
16
+ - [debounceLeading](JSUtils.md#debounceleading)
16
17
  - [generateUUID](JSUtils.md#generateuuid)
17
18
  - [isBase64](JSUtils.md#isbase64)
18
19
  - [isEllipsisActive](JSUtils.md#isellipsisactive)
@@ -50,6 +51,32 @@ src/utils/JSUtils.ts:16
50
51
 
51
52
  ___
52
53
 
54
+ ### debounceLeading
55
+
56
+ ▸ `Static` **debounceLeading**(`callback`, `timeout?`, `context?`): `VoidFunction`
57
+
58
+ Método responsável por executar uma função e ignorar as outras posteriores até o tempo especificado.
59
+
60
+ #### Parameters
61
+
62
+ | Name | Type | Default value | Description |
63
+ | :------ | :------ | :------ | :------ |
64
+ | `callback` | `Function` | `undefined` | Função a ser invocada |
65
+ | `timeout` | `number` | `300` | Quantidade de tempo para aguardar antes de invocar novamente |
66
+ | `context?` | `any` | `undefined` | O contexto atual |
67
+
68
+ #### Returns
69
+
70
+ `VoidFunction`
71
+
72
+ A função com o debounce
73
+
74
+ #### Defined in
75
+
76
+ src/utils/JSUtils.ts:32
77
+
78
+ ___
79
+
53
80
  ### generateUUID
54
81
 
55
82
  ▸ `Static` **generateUUID**(): `string`
@@ -64,7 +91,7 @@ Método responsável em gerar um UUID.
64
91
 
65
92
  #### Defined in
66
93
 
67
- src/utils/JSUtils.ts:66
94
+ src/utils/JSUtils.ts:90
68
95
 
69
96
  ___
70
97
 
@@ -88,7 +115,7 @@ Método que verifica se uma string está encodada com base64.
88
115
 
89
116
  #### Defined in
90
117
 
91
- src/utils/JSUtils.ts:51
118
+ src/utils/JSUtils.ts:75
92
119
 
93
120
  ___
94
121
 
@@ -112,4 +139,4 @@ Método responsável em validar se um elemento HTML está com o ellipsis ativo.
112
139
 
113
140
  #### Defined in
114
141
 
115
- src/utils/JSUtils.ts:31
142
+ src/utils/JSUtils.ts:55
@@ -0,0 +1,233 @@
1
+ [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / KeyboardManager
2
+
3
+ # Class: KeyboardManager
4
+
5
+ `KeyboardManager` é reponsável por gerenciar eventos de teclado.
6
+
7
+ ## Table of contents
8
+
9
+ ### Constructors
10
+
11
+ - [constructor](KeyboardManager.md#constructor)
12
+
13
+ ### Properties
14
+
15
+ - [\_mappedElements](KeyboardManager.md#_mappedelements)
16
+ - [\_options](KeyboardManager.md#_options)
17
+
18
+ ### Accessors
19
+
20
+ - [mappedKeys](KeyboardManager.md#mappedkeys)
21
+
22
+ ### Methods
23
+
24
+ - [bind](KeyboardManager.md#bind)
25
+ - [checkModifiersIsApplied](KeyboardManager.md#checkmodifiersisapplied)
26
+ - [handleListenerEvent](KeyboardManager.md#handlelistenerevent)
27
+ - [keyAppliedWithModifiers](KeyboardManager.md#keyappliedwithmodifiers)
28
+ - [unbind](KeyboardManager.md#unbind)
29
+ - [verifyAndStopPropagation](KeyboardManager.md#verifyandstoppropagation)
30
+
31
+ ## Constructors
32
+
33
+ ### constructor
34
+
35
+ • **new KeyboardManager**(`options?`)
36
+
37
+ Construtor para a classe Keyboard.
38
+
39
+ #### Parameters
40
+
41
+ | Name | Type | Description |
42
+ | :------ | :------ | :------ |
43
+ | `options?` | `Partial`<`IKeyboardOptions`\> | opções para o gerenciamento de eventos de teclado. |
44
+
45
+ #### Defined in
46
+
47
+ src/utils/KeyboardManager/index.ts:19
48
+
49
+ ## Properties
50
+
51
+ ### \_mappedElements
52
+
53
+ • `Private` **\_mappedElements**: `IKeyboardMappedKeysElements` = `{}`
54
+
55
+ #### Defined in
56
+
57
+ src/utils/KeyboardManager/index.ts:12
58
+
59
+ ___
60
+
61
+ ### \_options
62
+
63
+ • `Private` **\_options**: `IKeyboardOptions`
64
+
65
+ #### Defined in
66
+
67
+ src/utils/KeyboardManager/index.ts:11
68
+
69
+ ## Accessors
70
+
71
+ ### mappedKeys
72
+
73
+ • `get` **mappedKeys**(): `IGetMappedKeys`[]
74
+
75
+ Obtém as chaves mapeadas.
76
+
77
+ #### Returns
78
+
79
+ `IGetMappedKeys`[]
80
+
81
+ chaves mapeadas com descrições
82
+
83
+ #### Defined in
84
+
85
+ src/utils/KeyboardManager/index.ts:97
86
+
87
+ ## Methods
88
+
89
+ ### bind
90
+
91
+ ▸ **bind**(`keyMap`, `callback`, `options?`): [`KeyboardManager`](KeyboardManager.md)
92
+
93
+ Associa um evento de teclado com uma função
94
+
95
+ #### Parameters
96
+
97
+ | Name | Type | Description |
98
+ | :------ | :------ | :------ |
99
+ | `keyMap` | `string` | Chave de mapeamento de teclado. |
100
+ | `callback` | `VoidFunction` | Função a ser executada quando o evento de teclado for disparado. |
101
+ | `options?` | `Partial`<`IKeyboardOptions`\> | Configurações dos eventos de teclado. |
102
+
103
+ #### Returns
104
+
105
+ [`KeyboardManager`](KeyboardManager.md)
106
+
107
+ O objeto `KeyboardManager`
108
+
109
+ #### Defined in
110
+
111
+ src/utils/KeyboardManager/index.ts:37
112
+
113
+ ___
114
+
115
+ ### checkModifiersIsApplied
116
+
117
+ ▸ `Private` **checkModifiersIsApplied**(`event`, `modifiedList`): `boolean`
118
+
119
+ Verifica se todas as teclas modificadoras foram aplicadas ao evento
120
+
121
+ #### Parameters
122
+
123
+ | Name | Type | Description |
124
+ | :------ | :------ | :------ |
125
+ | `event` | `KeyboardEvent` | O evento de teclado |
126
+ | `modifiedList` | `string`[] | As teclas modificadoras |
127
+
128
+ #### Returns
129
+
130
+ `boolean`
131
+
132
+ Retorna se todas as teclas modificadoras foram aplicadas
133
+
134
+ #### Defined in
135
+
136
+ src/utils/KeyboardManager/index.ts:166
137
+
138
+ ___
139
+
140
+ ### handleListenerEvent
141
+
142
+ ▸ `Private` **handleListenerEvent**(`keyMap`, `callback`, `propagate`, `event`): `void`
143
+
144
+ Executa uma função quando um evento de teclado for disparado
145
+
146
+ #### Parameters
147
+
148
+ | Name | Type | Description |
149
+ | :------ | :------ | :------ |
150
+ | `keyMap` | `string` | Chave de mapeamento de teclado |
151
+ | `callback` | `VoidFunction` | Função a ser executada |
152
+ | `propagate` | `boolean` | Se o evento de teclado deve ser propagado |
153
+ | `event` | `KeyboardEvent` | O evento de teclado |
154
+
155
+ #### Returns
156
+
157
+ `void`
158
+
159
+ #### Defined in
160
+
161
+ src/utils/KeyboardManager/index.ts:113
162
+
163
+ ___
164
+
165
+ ### keyAppliedWithModifiers
166
+
167
+ ▸ `Private` **keyAppliedWithModifiers**(`keyMap`, `pressedKeyCode`): `IKeyAppliedResponse`
168
+
169
+ Verifica se um evento de teclado foi disparado
170
+
171
+ #### Parameters
172
+
173
+ | Name | Type | Description |
174
+ | :------ | :------ | :------ |
175
+ | `keyMap` | `string` | Chave de mapeamento de teclado |
176
+ | `pressedKeyCode` | `number` | Código do evento de teclado pressionado |
177
+
178
+ #### Returns
179
+
180
+ `IKeyAppliedResponse`
181
+
182
+ Retorna se o evento de teclado foi disparado e as teclas modificadoras aplicadas ao evento
183
+
184
+ #### Defined in
185
+
186
+ src/utils/KeyboardManager/index.ts:129
187
+
188
+ ___
189
+
190
+ ### unbind
191
+
192
+ ▸ **unbind**(`keyMap`): [`KeyboardManager`](KeyboardManager.md)
193
+
194
+ Remove um evento de teclado
195
+
196
+ #### Parameters
197
+
198
+ | Name | Type | Description |
199
+ | :------ | :------ | :------ |
200
+ | `keyMap` | `string` | Chave de mapeamento de teclado. |
201
+
202
+ #### Returns
203
+
204
+ [`KeyboardManager`](KeyboardManager.md)
205
+
206
+ - O objeto `KeyboardManager`
207
+
208
+ #### Defined in
209
+
210
+ src/utils/KeyboardManager/index.ts:73
211
+
212
+ ___
213
+
214
+ ### verifyAndStopPropagation
215
+
216
+ ▸ `Private` **verifyAndStopPropagation**(`event`, `propagate`): `void`
217
+
218
+ Verifica e impede que o evento de teclado seja propagado
219
+
220
+ #### Parameters
221
+
222
+ | Name | Type | Description |
223
+ | :------ | :------ | :------ |
224
+ | `event` | `KeyboardEvent` | O evento de teclado |
225
+ | `propagate` | `boolean` | Se o evento de teclado deve ser propagado |
226
+
227
+ #### Returns
228
+
229
+ `void`
230
+
231
+ #### Defined in
232
+
233
+ src/utils/KeyboardManager/index.ts:202
@@ -17,8 +17,11 @@
17
17
  - [formatBytes](StringUtils.md#formatbytes)
18
18
  - [generateUUID](StringUtils.md#generateuuid)
19
19
  - [getBooleanValue](StringUtils.md#getbooleanvalue)
20
+ - [getOppositeCase](StringUtils.md#getoppositecase)
20
21
  - [hashCode](StringUtils.md#hashcode)
22
+ - [isCaseable](StringUtils.md#iscaseable)
21
23
  - [isEmpty](StringUtils.md#isempty)
24
+ - [isLowerCase](StringUtils.md#islowercase)
22
25
  - [padEnd](StringUtils.md#padend)
23
26
  - [padStart](StringUtils.md#padstart)
24
27
  - [prettyPrecision](StringUtils.md#prettyprecision)
@@ -97,7 +100,7 @@ ___
97
100
 
98
101
  ▸ `Static` **formatBytes**(`bytes`): `string`
99
102
 
100
- Utilitário para formatar bytes em string legível, convertendo para
103
+ Utilitário para formatar bytes em string legível, convertendo para
101
104
  múltiplos maiores caso necessário.
102
105
 
103
106
  #### Parameters
@@ -168,6 +171,30 @@ src/utils/StringUtils.ts:164
168
171
 
169
172
  ___
170
173
 
174
+ ### getOppositeCase
175
+
176
+ ▸ `Static` **getOppositeCase**(`original`): `string`
177
+
178
+ Inverte uma string de minúsculas para maiúsculas e vice-versa
179
+
180
+ #### Parameters
181
+
182
+ | Name | Type | Description |
183
+ | :------ | :------ | :------ |
184
+ | `original` | `string` | A string a ser invertida |
185
+
186
+ #### Returns
187
+
188
+ `string`
189
+
190
+ A string invertida
191
+
192
+ #### Defined in
193
+
194
+ src/utils/StringUtils.ts:400
195
+
196
+ ___
197
+
171
198
  ### hashCode
172
199
 
173
200
  ▸ `Static` **hashCode**(`value`): `string`
@@ -198,6 +225,30 @@ src/utils/StringUtils.ts:143
198
225
 
199
226
  ___
200
227
 
228
+ ### isCaseable
229
+
230
+ ▸ `Static` **isCaseable**(`original`): `boolean`
231
+
232
+ Checa se uma string pode ser convertida para letras maiúsculas ou minúsculas
233
+
234
+ #### Parameters
235
+
236
+ | Name | Type | Description |
237
+ | :------ | :------ | :------ |
238
+ | `original` | `string` | A string a ser verificada |
239
+
240
+ #### Returns
241
+
242
+ `boolean`
243
+
244
+ Se a string pode ser convertida
245
+
246
+ #### Defined in
247
+
248
+ src/utils/StringUtils.ts:375
249
+
250
+ ___
251
+
201
252
  ### isEmpty
202
253
 
203
254
  ▸ `Static` **isEmpty**(`value`): `Boolean`
@@ -223,6 +274,30 @@ src/utils/StringUtils.ts:16
223
274
 
224
275
  ___
225
276
 
277
+ ### isLowerCase
278
+
279
+ ▸ `Static` **isLowerCase**(`original`): `boolean`
280
+
281
+ Checa se uma string é minúscula
282
+
283
+ #### Parameters
284
+
285
+ | Name | Type | Description |
286
+ | :------ | :------ | :------ |
287
+ | `original` | `string` | A string a ser verificada |
288
+
289
+ #### Returns
290
+
291
+ `boolean`
292
+
293
+ Se a string é minúscula
294
+
295
+ #### Defined in
296
+
297
+ src/utils/StringUtils.ts:388
298
+
299
+ ___
300
+
226
301
  ### padEnd
227
302
 
228
303
  ▸ `Static` **padEnd**(`str`, `len`, `pad?`): `string`
package/modules.md CHANGED
@@ -37,6 +37,7 @@
37
37
  - [HttpProvider](classes/HttpProvider.md)
38
38
  - [IDBRepository](classes/IDBRepository.md)
39
39
  - [JSUtils](classes/JSUtils.md)
40
+ - [KeyboardManager](classes/KeyboardManager.md)
40
41
  - [MaskFormatter](classes/MaskFormatter-1.md)
41
42
  - [NumberUtils](classes/NumberUtils.md)
42
43
  - [ObjectUtils](classes/ObjectUtils.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/core-docs",
3
- "version": "5.11.6",
3
+ "version": "5.12.0-dev.1",
4
4
  "description": "Documentação da biblioteca de componentes Sankhya.",
5
5
  "main": "",
6
6
  "files": [