@sankhyalabs/core-docs 2.3.4 → 2.3.5
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 +57 -0
- package/classes/ApplicationContext.md +76 -0
- package/classes/ArrayUtils.md +89 -0
- package/classes/AuthorizedServiceCaller.md +76 -0
- package/classes/Change.md +168 -0
- package/classes/DataUnit.md +1394 -0
- package/classes/DataUnitAction.md +96 -0
- package/classes/DateUtils.md +190 -0
- package/classes/ElementIDUtils.md +243 -0
- package/classes/ErrorException.md +204 -0
- package/classes/ErrorTracking.md +54 -0
- package/classes/FloatingManager.md +384 -0
- package/classes/HttpProvider.md +96 -0
- package/classes/MaskFormatter-1.md +336 -0
- package/classes/NumberUtils.md +188 -0
- package/classes/ObjectUtils.md +81 -0
- package/classes/ReadyUtil.md +103 -0
- package/classes/RequestMetadata.md +84 -0
- package/classes/SkwHttpProvider.md +109 -0
- package/classes/StringUtils.md +381 -0
- package/classes/TimeFormatter.md +98 -0
- package/classes/UserAgentUtils.md +48 -0
- package/classes/WaitingChangeException.md +192 -0
- package/classes/WarningException.md +204 -0
- package/enums/Action.md +250 -0
- package/enums/ChangeOperation.md +52 -0
- package/enums/DataType.md +63 -0
- package/enums/DependencyType.md +41 -0
- package/enums/SortMode.md +30 -0
- package/enums/UserInterface.md +195 -0
- package/interfaces/DUActionInterceptor.md +29 -0
- package/interfaces/ExecutionContext.md +58 -0
- package/interfaces/FieldDescriptor.md +129 -0
- package/interfaces/Filter.md +41 -0
- package/interfaces/IElementIDInfo.md +30 -0
- package/interfaces/LoadDataRequest.md +63 -0
- package/interfaces/LoadDataResponse.md +30 -0
- package/interfaces/PageRequest.md +41 -0
- package/interfaces/PaginationInfo.md +63 -0
- package/interfaces/QuickFilter.md +30 -0
- package/interfaces/Record.md +40 -0
- package/interfaces/SavedRecord.md +55 -0
- package/interfaces/Sort.md +41 -0
- package/interfaces/SortingProvider.md +29 -0
- package/interfaces/UnitMetadata.md +41 -0
- package/interfaces/WaitingChange.md +41 -0
- package/modules/MaskFormatter.md +37 -0
- package/modules.md +63 -0
- package/package.json +1 -1
@@ -0,0 +1,84 @@
|
|
1
|
+
[@sankhyalabs/core](../README.md) / [Exports](../modules.md) / RequestMetadata
|
2
|
+
|
3
|
+
# Class: RequestMetadata
|
4
|
+
|
5
|
+
Representa as propriedades necessárias para se executar uma requisição.
|
6
|
+
|
7
|
+
## Table of contents
|
8
|
+
|
9
|
+
### Constructors
|
10
|
+
|
11
|
+
- [constructor](RequestMetadata.md#constructor)
|
12
|
+
|
13
|
+
### Properties
|
14
|
+
|
15
|
+
- [headers](RequestMetadata.md#headers)
|
16
|
+
- [method](RequestMetadata.md#method)
|
17
|
+
- [timeout](RequestMetadata.md#timeout)
|
18
|
+
- [url](RequestMetadata.md#url)
|
19
|
+
|
20
|
+
## Constructors
|
21
|
+
|
22
|
+
### constructor
|
23
|
+
|
24
|
+
• **new RequestMetadata**(`url`, `method`, `headers?`)
|
25
|
+
|
26
|
+
#### Parameters
|
27
|
+
|
28
|
+
| Name | Type | Description |
|
29
|
+
| :------ | :------ | :------ |
|
30
|
+
| `url` | `string` | A URL que deve ser chamada. |
|
31
|
+
| `method` | `Method` | O Método da requisição (GET, PUT, POST ou DELETE). |
|
32
|
+
| `headers?` | `Header`[] | - |
|
33
|
+
|
34
|
+
#### Defined in
|
35
|
+
|
36
|
+
src/http/RequestMetadata.ts:22
|
37
|
+
|
38
|
+
## Properties
|
39
|
+
|
40
|
+
### headers
|
41
|
+
|
42
|
+
• **headers**: `Header`[]
|
43
|
+
|
44
|
+
Headers para serem enviados na requisição
|
45
|
+
|
46
|
+
#### Defined in
|
47
|
+
|
48
|
+
src/http/RequestMetadata.ts:16
|
49
|
+
|
50
|
+
___
|
51
|
+
|
52
|
+
### method
|
53
|
+
|
54
|
+
• **method**: `Method`
|
55
|
+
|
56
|
+
O verbo HTTP
|
57
|
+
|
58
|
+
#### Defined in
|
59
|
+
|
60
|
+
src/http/RequestMetadata.ts:10
|
61
|
+
|
62
|
+
___
|
63
|
+
|
64
|
+
### timeout
|
65
|
+
|
66
|
+
• **timeout**: `number` = `30000`
|
67
|
+
|
68
|
+
Tempo limite de espera pela resposta
|
69
|
+
|
70
|
+
#### Defined in
|
71
|
+
|
72
|
+
src/http/RequestMetadata.ts:13
|
73
|
+
|
74
|
+
___
|
75
|
+
|
76
|
+
### url
|
77
|
+
|
78
|
+
• **url**: `string`
|
79
|
+
|
80
|
+
A URL a ser chamada
|
81
|
+
|
82
|
+
#### Defined in
|
83
|
+
|
84
|
+
src/http/RequestMetadata.ts:7
|
@@ -0,0 +1,109 @@
|
|
1
|
+
[@sankhyalabs/core](../README.md) / [Exports](../modules.md) / SkwHttpProvider
|
2
|
+
|
3
|
+
# Class: SkwHttpProvider
|
4
|
+
|
5
|
+
## Table of contents
|
6
|
+
|
7
|
+
### Constructors
|
8
|
+
|
9
|
+
- [constructor](SkwHttpProvider.md#constructor)
|
10
|
+
|
11
|
+
### Properties
|
12
|
+
|
13
|
+
- [STATUS\_CANCELED](SkwHttpProvider.md#status_canceled)
|
14
|
+
- [STATUS\_ERROR](SkwHttpProvider.md#status_error)
|
15
|
+
- [STATUS\_INFO](SkwHttpProvider.md#status_info)
|
16
|
+
- [STATUS\_OK](SkwHttpProvider.md#status_ok)
|
17
|
+
- [STATUS\_TIMEOUT](SkwHttpProvider.md#status_timeout)
|
18
|
+
- [\_counter](SkwHttpProvider.md#_counter)
|
19
|
+
|
20
|
+
### Methods
|
21
|
+
|
22
|
+
- [callService](SkwHttpProvider.md#callservice)
|
23
|
+
|
24
|
+
## Constructors
|
25
|
+
|
26
|
+
### constructor
|
27
|
+
|
28
|
+
• **new SkwHttpProvider**()
|
29
|
+
|
30
|
+
## Properties
|
31
|
+
|
32
|
+
### STATUS\_CANCELED
|
33
|
+
|
34
|
+
▪ `Static` **STATUS\_CANCELED**: `number` = `4`
|
35
|
+
|
36
|
+
#### Defined in
|
37
|
+
|
38
|
+
src/http/SkwHttpProvider.ts:11
|
39
|
+
|
40
|
+
___
|
41
|
+
|
42
|
+
### STATUS\_ERROR
|
43
|
+
|
44
|
+
▪ `Static` **STATUS\_ERROR**: `number` = `0`
|
45
|
+
|
46
|
+
#### Defined in
|
47
|
+
|
48
|
+
src/http/SkwHttpProvider.ts:7
|
49
|
+
|
50
|
+
___
|
51
|
+
|
52
|
+
### STATUS\_INFO
|
53
|
+
|
54
|
+
▪ `Static` **STATUS\_INFO**: `number` = `2`
|
55
|
+
|
56
|
+
#### Defined in
|
57
|
+
|
58
|
+
src/http/SkwHttpProvider.ts:9
|
59
|
+
|
60
|
+
___
|
61
|
+
|
62
|
+
### STATUS\_OK
|
63
|
+
|
64
|
+
▪ `Static` **STATUS\_OK**: `number` = `1`
|
65
|
+
|
66
|
+
#### Defined in
|
67
|
+
|
68
|
+
src/http/SkwHttpProvider.ts:8
|
69
|
+
|
70
|
+
___
|
71
|
+
|
72
|
+
### STATUS\_TIMEOUT
|
73
|
+
|
74
|
+
▪ `Static` **STATUS\_TIMEOUT**: `number` = `3`
|
75
|
+
|
76
|
+
#### Defined in
|
77
|
+
|
78
|
+
src/http/SkwHttpProvider.ts:10
|
79
|
+
|
80
|
+
___
|
81
|
+
|
82
|
+
### \_counter
|
83
|
+
|
84
|
+
▪ `Static` **\_counter**: `number` = `0`
|
85
|
+
|
86
|
+
#### Defined in
|
87
|
+
|
88
|
+
src/http/SkwHttpProvider.ts:5
|
89
|
+
|
90
|
+
## Methods
|
91
|
+
|
92
|
+
### callService
|
93
|
+
|
94
|
+
▸ `Static` **callService**(`serviceName`, `content`): `Promise`<`Object`\>
|
95
|
+
|
96
|
+
#### Parameters
|
97
|
+
|
98
|
+
| Name | Type |
|
99
|
+
| :------ | :------ |
|
100
|
+
| `serviceName` | `string` |
|
101
|
+
| `content` | `Object` |
|
102
|
+
|
103
|
+
#### Returns
|
104
|
+
|
105
|
+
`Promise`<`Object`\>
|
106
|
+
|
107
|
+
#### Defined in
|
108
|
+
|
109
|
+
src/http/SkwHttpProvider.ts:13
|
@@ -0,0 +1,381 @@
|
|
1
|
+
[@sankhyalabs/core](../README.md) / [Exports](../modules.md) / StringUtils
|
2
|
+
|
3
|
+
# Class: StringUtils
|
4
|
+
|
5
|
+
Classe com utiliários comuns para Strings.
|
6
|
+
|
7
|
+
## Table of contents
|
8
|
+
|
9
|
+
### Constructors
|
10
|
+
|
11
|
+
- [constructor](StringUtils.md#constructor)
|
12
|
+
|
13
|
+
### Methods
|
14
|
+
|
15
|
+
- [compare](StringUtils.md#compare)
|
16
|
+
- [getBooleanValue](StringUtils.md#getbooleanvalue)
|
17
|
+
- [hashCode](StringUtils.md#hashcode)
|
18
|
+
- [isEmpty](StringUtils.md#isempty)
|
19
|
+
- [padEnd](StringUtils.md#padend)
|
20
|
+
- [padStart](StringUtils.md#padstart)
|
21
|
+
- [replaceAccentuatedChars](StringUtils.md#replaceaccentuatedchars)
|
22
|
+
- [replaceAccentuatedCharsKeepSymbols](StringUtils.md#replaceaccentuatedcharskeepsymbols)
|
23
|
+
- [replaceAccentuatedCharsLower](StringUtils.md#replaceaccentuatedcharslower)
|
24
|
+
- [replaceAccentuatedCharsUpper](StringUtils.md#replaceaccentuatedcharsupper)
|
25
|
+
- [toCamelCase](StringUtils.md#tocamelcase)
|
26
|
+
- [toKebabCase](StringUtils.md#tokebabcase)
|
27
|
+
- [toPascalCase](StringUtils.md#topascalcase)
|
28
|
+
- [toSnakeCase](StringUtils.md#tosnakecase)
|
29
|
+
|
30
|
+
## Constructors
|
31
|
+
|
32
|
+
### constructor
|
33
|
+
|
34
|
+
• **new StringUtils**()
|
35
|
+
|
36
|
+
## Methods
|
37
|
+
|
38
|
+
### compare
|
39
|
+
|
40
|
+
▸ `Static` **compare**(`a`, `b`): `number`
|
41
|
+
|
42
|
+
Utilitário para determinar a ordem de strings. Geralmente usado no método "sort" de um array.
|
43
|
+
Retorna um número negativo se o primeiro argumento é menor que o segundo, zero se os dois são iguais
|
44
|
+
e um número positivo quando o primeiro é maior que o segundo.if they're equal, and a positive value otherwise.
|
45
|
+
|
46
|
+
#### Parameters
|
47
|
+
|
48
|
+
| Name | Type | Description |
|
49
|
+
| :------ | :------ | :------ |
|
50
|
+
| `a` | `string` | Primeira string para comparação |
|
51
|
+
| `b` | `string` | Segunda string para comparação |
|
52
|
+
|
53
|
+
#### Returns
|
54
|
+
|
55
|
+
`number`
|
56
|
+
|
57
|
+
Um valor maior, menor ou igual a zero para determinar se a ordem precisa ser alterada.
|
58
|
+
|
59
|
+
#### Defined in
|
60
|
+
|
61
|
+
src/utils/StringUtils.ts:147
|
62
|
+
|
63
|
+
___
|
64
|
+
|
65
|
+
### getBooleanValue
|
66
|
+
|
67
|
+
▸ `Static` **getBooleanValue**(`value`, `defaultValue?`): `boolean`
|
68
|
+
|
69
|
+
Converte um valor em string para booleano
|
70
|
+
|
71
|
+
#### Parameters
|
72
|
+
|
73
|
+
| Name | Type | Default value | Description |
|
74
|
+
| :------ | :------ | :------ | :------ |
|
75
|
+
| `value` | `string` | `undefined` | Valor a ser convertido |
|
76
|
+
| `defaultValue` | `boolean` | `false` | Será retornado esse caso seja passado valores diferentes do esperado(true, false, "true", "false", "S", "N") |
|
77
|
+
|
78
|
+
#### Returns
|
79
|
+
|
80
|
+
`boolean`
|
81
|
+
|
82
|
+
#### Defined in
|
83
|
+
|
84
|
+
src/utils/StringUtils.ts:110
|
85
|
+
|
86
|
+
___
|
87
|
+
|
88
|
+
### hashCode
|
89
|
+
|
90
|
+
▸ `Static` **hashCode**(`value`): `string`
|
91
|
+
|
92
|
+
Calcula um código hash para uma string.
|
93
|
+
|
94
|
+
#### Parameters
|
95
|
+
|
96
|
+
| Name | Type | Description |
|
97
|
+
| :------ | :------ | :------ |
|
98
|
+
| `value` | `string` | String que será gerado o hash code. |
|
99
|
+
|
100
|
+
#### Returns
|
101
|
+
|
102
|
+
`string`
|
103
|
+
|
104
|
+
#### Defined in
|
105
|
+
|
106
|
+
src/utils/StringUtils.ts:94
|
107
|
+
|
108
|
+
___
|
109
|
+
|
110
|
+
### isEmpty
|
111
|
+
|
112
|
+
▸ `Static` **isEmpty**(`value`): `Boolean`
|
113
|
+
|
114
|
+
Verifica se a string está vazia.
|
115
|
+
Valores null e undefined são considerados como vazio.
|
116
|
+
|
117
|
+
#### Parameters
|
118
|
+
|
119
|
+
| Name | Type | Description |
|
120
|
+
| :------ | :------ | :------ |
|
121
|
+
| `value` | `any` | String para ser validada. |
|
122
|
+
|
123
|
+
#### Returns
|
124
|
+
|
125
|
+
`Boolean`
|
126
|
+
|
127
|
+
#### Defined in
|
128
|
+
|
129
|
+
src/utils/StringUtils.ts:12
|
130
|
+
|
131
|
+
___
|
132
|
+
|
133
|
+
### padEnd
|
134
|
+
|
135
|
+
▸ `Static` **padEnd**(`str`, `len`, `pad?`): `string`
|
136
|
+
|
137
|
+
#### Parameters
|
138
|
+
|
139
|
+
| Name | Type | Default value |
|
140
|
+
| :------ | :------ | :------ |
|
141
|
+
| `str` | `string` | `undefined` |
|
142
|
+
| `len` | `number` | `undefined` |
|
143
|
+
| `pad` | `string` | `" "` |
|
144
|
+
|
145
|
+
#### Returns
|
146
|
+
|
147
|
+
`string`
|
148
|
+
|
149
|
+
#### Defined in
|
150
|
+
|
151
|
+
src/utils/StringUtils.ts:130
|
152
|
+
|
153
|
+
___
|
154
|
+
|
155
|
+
### padStart
|
156
|
+
|
157
|
+
▸ `Static` **padStart**(`str`, `len`, `pad?`): `string`
|
158
|
+
|
159
|
+
#### Parameters
|
160
|
+
|
161
|
+
| Name | Type | Default value |
|
162
|
+
| :------ | :------ | :------ |
|
163
|
+
| `str` | `string` | `undefined` |
|
164
|
+
| `len` | `number` | `undefined` |
|
165
|
+
| `pad` | `string` | `" "` |
|
166
|
+
|
167
|
+
#### Returns
|
168
|
+
|
169
|
+
`string`
|
170
|
+
|
171
|
+
#### Defined in
|
172
|
+
|
173
|
+
src/utils/StringUtils.ts:122
|
174
|
+
|
175
|
+
___
|
176
|
+
|
177
|
+
### replaceAccentuatedChars
|
178
|
+
|
179
|
+
▸ `Static` **replaceAccentuatedChars**(`text`, `removeSpecialChars?`): `string`
|
180
|
+
|
181
|
+
Remove acentuação de vogais e de caracteres especiais que não sejam letras ou numeral.
|
182
|
+
|
183
|
+
**`Example`**
|
184
|
+
|
185
|
+
```ts
|
186
|
+
entrada: "á@Êç#Ò", false // retorno: "a@Ec#O"
|
187
|
+
entrada: "á@Êç#Ò", true // retorno: "aEcO"
|
188
|
+
```
|
189
|
+
|
190
|
+
#### Parameters
|
191
|
+
|
192
|
+
| Name | Type | Default value | Description |
|
193
|
+
| :------ | :------ | :------ | :------ |
|
194
|
+
| `text` | `string` | `undefined` | String para ser transformada. |
|
195
|
+
| `removeSpecialChars` | `boolean` | `true` | Remove outros caracteres especiais que não sejam letras e números. |
|
196
|
+
|
197
|
+
#### Returns
|
198
|
+
|
199
|
+
`string`
|
200
|
+
|
201
|
+
#### Defined in
|
202
|
+
|
203
|
+
src/utils/StringUtils.ts:71
|
204
|
+
|
205
|
+
___
|
206
|
+
|
207
|
+
### replaceAccentuatedCharsKeepSymbols
|
208
|
+
|
209
|
+
▸ `Static` **replaceAccentuatedCharsKeepSymbols**(`text`): `string`
|
210
|
+
|
211
|
+
Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta mantendo espaços e símbolos.
|
212
|
+
|
213
|
+
#### Parameters
|
214
|
+
|
215
|
+
| Name | Type | Description |
|
216
|
+
| :------ | :------ | :------ |
|
217
|
+
| `text` | `string` | String para ser transformada. |
|
218
|
+
|
219
|
+
#### Returns
|
220
|
+
|
221
|
+
`string`
|
222
|
+
|
223
|
+
#### Defined in
|
224
|
+
|
225
|
+
src/utils/StringUtils.ts:86
|
226
|
+
|
227
|
+
___
|
228
|
+
|
229
|
+
### replaceAccentuatedCharsLower
|
230
|
+
|
231
|
+
▸ `Static` **replaceAccentuatedCharsLower**(`text`): `string`
|
232
|
+
|
233
|
+
Remove acentos de vogais minúsculas.
|
234
|
+
|
235
|
+
**`Example`**
|
236
|
+
|
237
|
+
```ts
|
238
|
+
entrada: "áêçò" // retorno: "aeco"
|
239
|
+
```
|
240
|
+
|
241
|
+
#### Parameters
|
242
|
+
|
243
|
+
| Name | Type | Description |
|
244
|
+
| :------ | :------ | :------ |
|
245
|
+
| `text` | `string` | String para ser transformada. |
|
246
|
+
|
247
|
+
#### Returns
|
248
|
+
|
249
|
+
`string`
|
250
|
+
|
251
|
+
#### Defined in
|
252
|
+
|
253
|
+
src/utils/StringUtils.ts:51
|
254
|
+
|
255
|
+
___
|
256
|
+
|
257
|
+
### replaceAccentuatedCharsUpper
|
258
|
+
|
259
|
+
▸ `Static` **replaceAccentuatedCharsUpper**(`text`): `string`
|
260
|
+
|
261
|
+
Remove acentos de vogais maiúsculas
|
262
|
+
|
263
|
+
**`Example`**
|
264
|
+
|
265
|
+
```ts
|
266
|
+
entrada: "ÁÊÇÒ" // retorno: "AECO"
|
267
|
+
```
|
268
|
+
|
269
|
+
#### Parameters
|
270
|
+
|
271
|
+
| Name | Type | Description |
|
272
|
+
| :------ | :------ | :------ |
|
273
|
+
| `text` | `string` | String para ser transformada. |
|
274
|
+
|
275
|
+
#### Returns
|
276
|
+
|
277
|
+
`string`
|
278
|
+
|
279
|
+
#### Defined in
|
280
|
+
|
281
|
+
src/utils/StringUtils.ts:34
|
282
|
+
|
283
|
+
___
|
284
|
+
|
285
|
+
### toCamelCase
|
286
|
+
|
287
|
+
▸ `Static` **toCamelCase**(`value`): `string`
|
288
|
+
|
289
|
+
Utilitário para converter string em camelCase
|
290
|
+
Combina palavras compostas ou frases, alterando a inicial de cada uma, a partir da primeira, para maiúscula e unidas sem espaços.
|
291
|
+
|
292
|
+
#### Parameters
|
293
|
+
|
294
|
+
| Name | Type | Description |
|
295
|
+
| :------ | :------ | :------ |
|
296
|
+
| `value` | `string` | String a ser convertida |
|
297
|
+
|
298
|
+
#### Returns
|
299
|
+
|
300
|
+
`string`
|
301
|
+
|
302
|
+
String convertida em camelCase
|
303
|
+
|
304
|
+
#### Defined in
|
305
|
+
|
306
|
+
src/utils/StringUtils.ts:170
|
307
|
+
|
308
|
+
___
|
309
|
+
|
310
|
+
### toKebabCase
|
311
|
+
|
312
|
+
▸ `Static` **toKebabCase**(`value`): `string`
|
313
|
+
|
314
|
+
Utilitário para converter string em kebab-case
|
315
|
+
Combina palavras substituindo cada espaço por um traço (-) convertendo todas as letras para minúsculas
|
316
|
+
|
317
|
+
#### Parameters
|
318
|
+
|
319
|
+
| Name | Type | Description |
|
320
|
+
| :------ | :------ | :------ |
|
321
|
+
| `value` | `string` | String a ser convertida |
|
322
|
+
|
323
|
+
#### Returns
|
324
|
+
|
325
|
+
`string`
|
326
|
+
|
327
|
+
String convertida em KebabCase
|
328
|
+
|
329
|
+
#### Defined in
|
330
|
+
|
331
|
+
src/utils/StringUtils.ts:213
|
332
|
+
|
333
|
+
___
|
334
|
+
|
335
|
+
### toPascalCase
|
336
|
+
|
337
|
+
▸ `Static` **toPascalCase**(`value`): `string`
|
338
|
+
|
339
|
+
Utilitário para converter string em PascalCase
|
340
|
+
Combina palavras colocando todas as palavras em minúsculas (mesmo a primeira palavra) removendo espaços
|
341
|
+
|
342
|
+
#### Parameters
|
343
|
+
|
344
|
+
| Name | Type | Description |
|
345
|
+
| :------ | :------ | :------ |
|
346
|
+
| `value` | `string` | String a ser convertida |
|
347
|
+
|
348
|
+
#### Returns
|
349
|
+
|
350
|
+
`string`
|
351
|
+
|
352
|
+
String convertida em PascalCase
|
353
|
+
|
354
|
+
#### Defined in
|
355
|
+
|
356
|
+
src/utils/StringUtils.ts:186
|
357
|
+
|
358
|
+
___
|
359
|
+
|
360
|
+
### toSnakeCase
|
361
|
+
|
362
|
+
▸ `Static` **toSnakeCase**(`value`): `string`
|
363
|
+
|
364
|
+
Utilitário para converter string em snake_case
|
365
|
+
Combina palavras substituindo cada espaço por um unsderscore (_) convertendo todas as letras para minúsculas
|
366
|
+
|
367
|
+
#### Parameters
|
368
|
+
|
369
|
+
| Name | Type | Description |
|
370
|
+
| :------ | :------ | :------ |
|
371
|
+
| `value` | `string` | String a ser convertida |
|
372
|
+
|
373
|
+
#### Returns
|
374
|
+
|
375
|
+
`string`
|
376
|
+
|
377
|
+
String convertida em snake_case
|
378
|
+
|
379
|
+
#### Defined in
|
380
|
+
|
381
|
+
src/utils/StringUtils.ts:199
|
@@ -0,0 +1,98 @@
|
|
1
|
+
[@sankhyalabs/core](../README.md) / [Exports](../modules.md) / TimeFormatter
|
2
|
+
|
3
|
+
# Class: TimeFormatter
|
4
|
+
|
5
|
+
`TimeFormatter` é um utilitário para formatação de strings desformatadas em strings válidas de horários
|
6
|
+
|
7
|
+
## Table of contents
|
8
|
+
|
9
|
+
### Constructors
|
10
|
+
|
11
|
+
- [constructor](TimeFormatter.md#constructor)
|
12
|
+
|
13
|
+
### Properties
|
14
|
+
|
15
|
+
- [\_maskFormatter](TimeFormatter.md#_maskformatter)
|
16
|
+
|
17
|
+
### Methods
|
18
|
+
|
19
|
+
- [prepareValue](TimeFormatter.md#preparevalue)
|
20
|
+
- [validateTime](TimeFormatter.md#validatetime)
|
21
|
+
|
22
|
+
## Constructors
|
23
|
+
|
24
|
+
### constructor
|
25
|
+
|
26
|
+
• **new TimeFormatter**()
|
27
|
+
|
28
|
+
## Properties
|
29
|
+
|
30
|
+
### \_maskFormatter
|
31
|
+
|
32
|
+
▪ `Static` **\_maskFormatter**: [`MaskFormatter`](MaskFormatter-1.md)
|
33
|
+
|
34
|
+
#### Defined in
|
35
|
+
|
36
|
+
src/utils/TimeFormatter.ts:8
|
37
|
+
|
38
|
+
## Methods
|
39
|
+
|
40
|
+
### prepareValue
|
41
|
+
|
42
|
+
▸ `Static` **prepareValue**(`value`, `showSeconds`): `string`
|
43
|
+
|
44
|
+
@prepareValue: converts an unformated time string into a formatted time.
|
45
|
+
|
46
|
+
**`Exemples`**
|
47
|
+
|
48
|
+
@"1012" | "10:12"
|
49
|
+
@"10:12" | "10:12:00"
|
50
|
+
@"100112" | "10:01:12"
|
51
|
+
|
52
|
+
#### Parameters
|
53
|
+
|
54
|
+
| Name | Type | Description |
|
55
|
+
| :------ | :------ | :------ |
|
56
|
+
| `value` | `string` | unformated time string to convert |
|
57
|
+
| `showSeconds` | `boolean` | - |
|
58
|
+
|
59
|
+
#### Returns
|
60
|
+
|
61
|
+
`string`
|
62
|
+
|
63
|
+
formatted time string
|
64
|
+
|
65
|
+
#### Defined in
|
66
|
+
|
67
|
+
src/utils/TimeFormatter.ts:22
|
68
|
+
|
69
|
+
___
|
70
|
+
|
71
|
+
### validateTime
|
72
|
+
|
73
|
+
▸ `Static` **validateTime**(`value`, `showSeconds`): `boolean`
|
74
|
+
|
75
|
+
@validateTime: validates if an input string has the corect time format.
|
76
|
+
|
77
|
+
**`Exemples`**
|
78
|
+
|
79
|
+
@"1012" | true
|
80
|
+
@"14e4" | false
|
81
|
+
@"2624" | false
|
82
|
+
|
83
|
+
#### Parameters
|
84
|
+
|
85
|
+
| Name | Type | Description |
|
86
|
+
| :------ | :------ | :------ |
|
87
|
+
| `value` | `string` | input string to validate |
|
88
|
+
| `showSeconds` | `boolean` | - |
|
89
|
+
|
90
|
+
#### Returns
|
91
|
+
|
92
|
+
`boolean`
|
93
|
+
|
94
|
+
true or false
|
95
|
+
|
96
|
+
#### Defined in
|
97
|
+
|
98
|
+
src/utils/TimeFormatter.ts:64
|
@@ -0,0 +1,48 @@
|
|
1
|
+
[@sankhyalabs/core](../README.md) / [Exports](../modules.md) / UserAgentUtils
|
2
|
+
|
3
|
+
# Class: UserAgentUtils
|
4
|
+
|
5
|
+
## Table of contents
|
6
|
+
|
7
|
+
### Constructors
|
8
|
+
|
9
|
+
- [constructor](UserAgentUtils.md#constructor)
|
10
|
+
|
11
|
+
### Methods
|
12
|
+
|
13
|
+
- [getBrowserInfo](UserAgentUtils.md#getbrowserinfo)
|
14
|
+
- [isFirefox](UserAgentUtils.md#isfirefox)
|
15
|
+
|
16
|
+
## Constructors
|
17
|
+
|
18
|
+
### constructor
|
19
|
+
|
20
|
+
• **new UserAgentUtils**()
|
21
|
+
|
22
|
+
## Methods
|
23
|
+
|
24
|
+
### getBrowserInfo
|
25
|
+
|
26
|
+
▸ `Static` **getBrowserInfo**(): `any`
|
27
|
+
|
28
|
+
#### Returns
|
29
|
+
|
30
|
+
`any`
|
31
|
+
|
32
|
+
#### Defined in
|
33
|
+
|
34
|
+
src/utils/UserAgentUtils/index.ts:10
|
35
|
+
|
36
|
+
___
|
37
|
+
|
38
|
+
### isFirefox
|
39
|
+
|
40
|
+
▸ `Static` **isFirefox**(): `boolean`
|
41
|
+
|
42
|
+
#### Returns
|
43
|
+
|
44
|
+
`boolean`
|
45
|
+
|
46
|
+
#### Defined in
|
47
|
+
|
48
|
+
src/utils/UserAgentUtils/index.ts:5
|