@sankhyalabs/core-docs 2.3.6 → 2.4.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Class: StringUtils
4
4
 
5
- Classe com utiliários comuns para Strings.
5
+ `StringUtils`: Utilizado para manipulação de Strings.
6
6
 
7
7
  ## Table of contents
8
8
 
@@ -40,26 +40,24 @@ Classe com utiliários comuns para Strings.
40
40
 
41
41
  ▸ `Static` **compare**(`a`, `b`): `number`
42
42
 
43
- Utilitário para determinar a ordem de strings. Geralmente usado no método "sort" de um array.
44
- Retorna um número negativo se o primeiro argumento é menor que o segundo, zero se os dois são iguais
45
- e um número positivo quando o primeiro é maior que o segundo.if they're equal, and a positive value otherwise.
43
+ Determina a ordem de strings.
46
44
 
47
45
  #### Parameters
48
46
 
49
47
  | Name | Type | Description |
50
48
  | :------ | :------ | :------ |
51
- | `a` | `string` | Primeira string para comparação |
52
- | `b` | `string` | Segunda string para comparação |
49
+ | `a` | `string` | Primeira string para comparação. |
50
+ | `b` | `string` | Segunda string para comparação. |
53
51
 
54
52
  #### Returns
55
53
 
56
54
  `number`
57
55
 
58
- Um valor maior, menor ou igual a zero para determinar se a ordem precisa ser alterada.
56
+ - Um numeral negativo se o primeiro argumento é menor que o segundo, zero se os dois são iguais e um numeral positivo quando o primeiro é maior que o segundo.
59
57
 
60
58
  #### Defined in
61
59
 
62
- src/utils/StringUtils.ts:174
60
+ src/utils/StringUtils.ts:218
63
61
 
64
62
  ___
65
63
 
@@ -87,7 +85,7 @@ entrada: "&lt;Teste&gt;" // retorno: "<Teste>"
87
85
 
88
86
  #### Defined in
89
87
 
90
- src/utils/StringUtils.ts:51
88
+ src/utils/StringUtils.ts:53
91
89
 
92
90
  ___
93
91
 
@@ -95,22 +93,31 @@ ___
95
93
 
96
94
  ▸ `Static` **getBooleanValue**(`value`, `defaultValue?`): `boolean`
97
95
 
98
- Converte um valor em string para booleano
96
+ Converte um texto do tipo string para um booleano.
97
+
98
+ **`Example`**
99
+
100
+ ```ts
101
+ Informado: 'true' | Retorna: true
102
+ Informado: 'false' | Retorna: false
103
+ ```
99
104
 
100
105
  #### Parameters
101
106
 
102
107
  | Name | Type | Default value | Description |
103
108
  | :------ | :------ | :------ | :------ |
104
- | `value` | `string` | `undefined` | Valor a ser convertido |
105
- | `defaultValue` | `boolean` | `false` | Será retornado esse caso seja passado valores diferentes do esperado(true, false, "true", "false", "S", "N") |
109
+ | `value` | `string` | `undefined` | Valor a ser convertido. |
110
+ | `defaultValue` | `boolean` | `false` | Valor padrão. |
106
111
 
107
112
  #### Returns
108
113
 
109
114
  `boolean`
110
115
 
116
+ - Texto convertido.
117
+
111
118
  #### Defined in
112
119
 
113
- src/utils/StringUtils.ts:137
120
+ src/utils/StringUtils.ts:148
114
121
 
115
122
  ___
116
123
 
@@ -120,6 +127,12 @@ ___
120
127
 
121
128
  Calcula um código hash para uma string.
122
129
 
130
+ **`Example`**
131
+
132
+ ```ts
133
+ Informado: '123456' | Retorna: 1450575459
134
+ ```
135
+
123
136
  #### Parameters
124
137
 
125
138
  | Name | Type | Description |
@@ -130,9 +143,11 @@ Calcula um código hash para uma string.
130
143
 
131
144
  `string`
132
145
 
146
+ - Um hash calculado com base no valor informado.
147
+
133
148
  #### Defined in
134
149
 
135
- src/utils/StringUtils.ts:121
150
+ src/utils/StringUtils.ts:127
136
151
 
137
152
  ___
138
153
 
@@ -140,7 +155,7 @@ ___
140
155
 
141
156
  ▸ `Static` **isEmpty**(`value`): `Boolean`
142
157
 
143
- Verifica se a string está vazia.
158
+ Retorna se a string está vazia.
144
159
  Valores null e undefined são considerados como vazio.
145
160
 
146
161
  #### Parameters
@@ -153,9 +168,11 @@ Valores null e undefined são considerados como vazio.
153
168
 
154
169
  `Boolean`
155
170
 
171
+ - Verdadeiro caso a string não contenha informação.
172
+
156
173
  #### Defined in
157
174
 
158
- src/utils/StringUtils.ts:12
175
+ src/utils/StringUtils.ts:14
159
176
 
160
177
  ___
161
178
 
@@ -163,21 +180,38 @@ ___
163
180
 
164
181
  ▸ `Static` **padEnd**(`str`, `len`, `pad?`): `string`
165
182
 
183
+ Adiciona caracteres à direita caso texto seja menor que o valor do parâmetro len passado.
184
+
185
+ **`Example`**
186
+
187
+ ```ts
188
+ padStart('SANKHYA', 8,'.') | Retorna: 'SANKHYA...'
189
+ ```
190
+
191
+ **`Example`**
192
+
193
+ ```ts
194
+ padStart('SANKHYA', 5,'A') | Retorna: 'SANKHYA'
195
+ ```
196
+
166
197
  #### Parameters
167
198
 
168
- | Name | Type | Default value |
169
- | :------ | :------ | :------ |
170
- | `str` | `string` | `undefined` |
171
- | `len` | `number` | `undefined` |
172
- | `pad` | `string` | `" "` |
199
+ | Name | Type | Default value | Description |
200
+ | :------ | :------ | :------ | :------ |
201
+ | `str` | `string` | `undefined` | Texto para ser ajustado. |
202
+ | `len` | `number` | `undefined` | Tamanho desejado do texto. |
203
+ | `pad` | `string` | `" "` | Caractere a ser adicionado a direita caso o texto menor que o tamanho passado. |
173
204
 
174
205
  #### Returns
175
206
 
176
207
  `string`
177
208
 
209
+ - Texto passado se este for maior que o len.
210
+ Ou retorna o texto com os caracteres adicionados na direita.
211
+
178
212
  #### Defined in
179
213
 
180
- src/utils/StringUtils.ts:157
214
+ src/utils/StringUtils.ts:202
181
215
 
182
216
  ___
183
217
 
@@ -185,21 +219,38 @@ ___
185
219
 
186
220
  ▸ `Static` **padStart**(`str`, `len`, `pad?`): `string`
187
221
 
222
+ Adiciona caracteres à esquerda caso texto seja menor que o valor do parâmetro len passado.
223
+
224
+ **`Example`**
225
+
226
+ ```ts
227
+ padStart('SANKHYA', 8,'.') | Retorna: '...SANKHYA'
228
+ ```
229
+
230
+ **`Example`**
231
+
232
+ ```ts
233
+ padStart('SANKHYA', 5,'A') | Retorna: 'SANKHYA'
234
+ ```
235
+
188
236
  #### Parameters
189
237
 
190
- | Name | Type | Default value |
191
- | :------ | :------ | :------ |
192
- | `str` | `string` | `undefined` |
193
- | `len` | `number` | `undefined` |
194
- | `pad` | `string` | `" "` |
238
+ | Name | Type | Default value | Description |
239
+ | :------ | :------ | :------ | :------ |
240
+ | `str` | `string` | `undefined` | Texto para ser ajustado. |
241
+ | `len` | `number` | `undefined` | Tamanho desejado do texto. |
242
+ | `pad` | `string` | `" "` | Caractere a ser adicionado a esquerda caso o texto menor que o tamanho passado. |
195
243
 
196
244
  #### Returns
197
245
 
198
246
  `string`
199
247
 
248
+ - Texto passado se este for maior que o len.
249
+ Ou retorna o texto com os caracteres adicionados na esquerda.
250
+
200
251
  #### Defined in
201
252
 
202
- src/utils/StringUtils.ts:149
253
+ src/utils/StringUtils.ts:177
203
254
 
204
255
  ___
205
256
 
@@ -229,7 +280,7 @@ entrada: "á@Êç#Ò", true // retorno: "aEcO"
229
280
 
230
281
  #### Defined in
231
282
 
232
- src/utils/StringUtils.ts:98
283
+ src/utils/StringUtils.ts:100
233
284
 
234
285
  ___
235
286
 
@@ -243,15 +294,17 @@ Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta ma
243
294
 
244
295
  | Name | Type | Description |
245
296
  | :------ | :------ | :------ |
246
- | `text` | `string` | String para ser transformada. |
297
+ | `text` | `string` | Texto para ser transformado. |
247
298
 
248
299
  #### Returns
249
300
 
250
301
  `string`
251
302
 
303
+ - Texto sem acentuação e caixa alta, mantendo espaços e símbolos.
304
+
252
305
  #### Defined in
253
306
 
254
- src/utils/StringUtils.ts:113
307
+ src/utils/StringUtils.ts:116
255
308
 
256
309
  ___
257
310
 
@@ -279,7 +332,7 @@ entrada: "áêçò" // retorno: "aeco"
279
332
 
280
333
  #### Defined in
281
334
 
282
- src/utils/StringUtils.ts:78
335
+ src/utils/StringUtils.ts:80
283
336
 
284
337
  ___
285
338
 
@@ -307,7 +360,7 @@ entrada: "ÁÊÇÒ" // retorno: "AECO"
307
360
 
308
361
  #### Defined in
309
362
 
310
- src/utils/StringUtils.ts:34
363
+ src/utils/StringUtils.ts:36
311
364
 
312
365
  ___
313
366
 
@@ -315,24 +368,30 @@ ___
315
368
 
316
369
  ▸ `Static` **toCamelCase**(`value`): `string`
317
370
 
318
- Utilitário para converter string em camelCase
371
+ Converte string em camelCase.
319
372
  Combina palavras compostas ou frases, alterando a inicial de cada uma, a partir da primeira, para maiúscula e unidas sem espaços.
320
373
 
374
+ **`Example`**
375
+
376
+ ```ts
377
+ toCamelCase('Exemplo de uso') | Retorna: 'exemploDeUso'
378
+ ```
379
+
321
380
  #### Parameters
322
381
 
323
382
  | Name | Type | Description |
324
383
  | :------ | :------ | :------ |
325
- | `value` | `string` | String a ser convertida |
384
+ | `value` | `string` | String a ser convertida. |
326
385
 
327
386
  #### Returns
328
387
 
329
388
  `string`
330
389
 
331
- String convertida em camelCase
390
+ String convertida em camelCase.
332
391
 
333
392
  #### Defined in
334
393
 
335
- src/utils/StringUtils.ts:197
394
+ src/utils/StringUtils.ts:244
336
395
 
337
396
  ___
338
397
 
@@ -340,24 +399,23 @@ ___
340
399
 
341
400
  ▸ `Static` **toKebabCase**(`value`): `string`
342
401
 
343
- Utilitário para converter string em kebab-case
344
- Combina palavras substituindo cada espaço por um traço (-) convertendo todas as letras para minúsculas
402
+ Utilitário para converter string em kebab-case.
345
403
 
346
404
  #### Parameters
347
405
 
348
406
  | Name | Type | Description |
349
407
  | :------ | :------ | :------ |
350
- | `value` | `string` | String a ser convertida |
408
+ | `value` | `string` | String a ser convertida. |
351
409
 
352
410
  #### Returns
353
411
 
354
412
  `string`
355
413
 
356
- String convertida em KebabCase
414
+ String convertida em KebabCase.
357
415
 
358
416
  #### Defined in
359
417
 
360
- src/utils/StringUtils.ts:240
418
+ src/utils/StringUtils.ts:284
361
419
 
362
420
  ___
363
421
 
@@ -365,24 +423,23 @@ ___
365
423
 
366
424
  ▸ `Static` **toPascalCase**(`value`): `string`
367
425
 
368
- Utilitário para converter string em PascalCase
369
- Combina palavras colocando todas as palavras em minúsculas (mesmo a primeira palavra) removendo espaços
426
+ Converte string para PascalCase.
370
427
 
371
428
  #### Parameters
372
429
 
373
430
  | Name | Type | Description |
374
431
  | :------ | :------ | :------ |
375
- | `value` | `string` | String a ser convertida |
432
+ | `value` | `string` | String a ser convertida. |
376
433
 
377
434
  #### Returns
378
435
 
379
436
  `string`
380
437
 
381
- String convertida em PascalCase
438
+ String convertida em PascalCase.
382
439
 
383
440
  #### Defined in
384
441
 
385
- src/utils/StringUtils.ts:213
442
+ src/utils/StringUtils.ts:259
386
443
 
387
444
  ___
388
445
 
@@ -390,21 +447,20 @@ ___
390
447
 
391
448
  ▸ `Static` **toSnakeCase**(`value`): `string`
392
449
 
393
- Utilitário para converter string em snake_case
394
- Combina palavras substituindo cada espaço por um unsderscore (_) convertendo todas as letras para minúsculas
450
+ Utilitário para converter string em snake_case.
395
451
 
396
452
  #### Parameters
397
453
 
398
454
  | Name | Type | Description |
399
455
  | :------ | :------ | :------ |
400
- | `value` | `string` | String a ser convertida |
456
+ | `value` | `string` | String a ser convertida. |
401
457
 
402
458
  #### Returns
403
459
 
404
460
  `string`
405
461
 
406
- String convertida em snake_case
462
+ String convertida em snake_case.
407
463
 
408
464
  #### Defined in
409
465
 
410
- src/utils/StringUtils.ts:226
466
+ src/utils/StringUtils.ts:271
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Class: TimeFormatter
4
4
 
5
- `TimeFormatter` é um utilitário para formatação de strings desformatadas em strings válidas de horários
5
+ `TimeFormatter`: Utilizado para formatar horas.
6
6
 
7
7
  ## Table of contents
8
8
 
@@ -41,7 +41,7 @@ src/utils/TimeFormatter.ts:8
41
41
 
42
42
  ▸ `Static` **prepareValue**(`value`, `showSeconds`): `string`
43
43
 
44
- @prepareValue: converts an unformated time string into a formatted time.
44
+ Converte um texto para o formato de hora.
45
45
 
46
46
  **`Exemples`**
47
47
 
@@ -53,14 +53,14 @@ src/utils/TimeFormatter.ts:8
53
53
 
54
54
  | Name | Type | Description |
55
55
  | :------ | :------ | :------ |
56
- | `value` | `string` | unformated time string to convert |
57
- | `showSeconds` | `boolean` | - |
56
+ | `value` | `string` | Texto não formatado. |
57
+ | `showSeconds` | `boolean` | Se será validado os segundos. |
58
58
 
59
59
  #### Returns
60
60
 
61
61
  `string`
62
62
 
63
- formatted time string
63
+ - Texto em formato de hora.
64
64
 
65
65
  #### Defined in
66
66
 
@@ -72,7 +72,7 @@ ___
72
72
 
73
73
  ▸ `Static` **validateTime**(`value`, `showSeconds`): `boolean`
74
74
 
75
- @validateTime: validates if an input string has the corect time format.
75
+ Retorna se o texto está no formato de hora.
76
76
 
77
77
  **`Exemples`**
78
78
 
@@ -84,14 +84,14 @@ ___
84
84
 
85
85
  | Name | Type | Description |
86
86
  | :------ | :------ | :------ |
87
- | `value` | `string` | input string to validate |
88
- | `showSeconds` | `boolean` | - |
87
+ | `value` | `string` | Texto a ser validado. |
88
+ | `showSeconds` | `boolean` | Se será validado os segundos. |
89
89
 
90
90
  #### Returns
91
91
 
92
92
  `boolean`
93
93
 
94
- true or false
94
+ - Verdadeiro para valores no formato de hora e False para formatos diferentes.
95
95
 
96
96
  #### Defined in
97
97
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  # Class: UserAgentUtils
4
4
 
5
+ `UserAgentUtils`: Utilitario para tratativas relacionadas ao navegador.
6
+
5
7
  ## Table of contents
6
8
 
7
9
  ### Constructors
@@ -25,13 +27,17 @@
25
27
 
26
28
  ▸ `Static` **getBrowserInfo**(): `any`
27
29
 
30
+ Obtém nome e versão do navegador que está sendo utilizado.
31
+
28
32
  #### Returns
29
33
 
30
34
  `any`
31
35
 
36
+ Objeto com o nome e versão do navegador.
37
+
32
38
  #### Defined in
33
39
 
34
- src/utils/UserAgentUtils/index.ts:10
40
+ src/utils/UserAgentUtils/index.ts:22
35
41
 
36
42
  ___
37
43
 
@@ -39,10 +45,14 @@ ___
39
45
 
40
46
  ▸ `Static` **isFirefox**(): `boolean`
41
47
 
48
+ Obtém se o navegador do usuário é o firefox.
49
+
42
50
  #### Returns
43
51
 
44
52
  `boolean`
45
53
 
54
+ Verdadeiro se o navegador do usuário for o firefox.
55
+
46
56
  #### Defined in
47
57
 
48
- src/utils/UserAgentUtils/index.ts:5
58
+ src/utils/UserAgentUtils/index.ts:13
@@ -2,6 +2,8 @@
2
2
 
3
3
  # Class: WaitingChangeException
4
4
 
5
+ `WaitingChangeException`: Exceção lançada quando um campo está pendente de finalizar a alteração antes de executar uma ação.
6
+
5
7
  ## Hierarchy
6
8
 
7
9
  - `Error`
@@ -47,7 +49,7 @@ Error.constructor
47
49
 
48
50
  #### Defined in
49
51
 
50
- src/exceptions/WaitingChangeException.ts:7
52
+ src/exceptions/WaitingChangeException.ts:12
51
53
 
52
54
  ## Properties
53
55
 
@@ -69,13 +71,15 @@ ___
69
71
 
70
72
  • **message**: `string`
71
73
 
74
+ Descrição do erro.
75
+
72
76
  #### Overrides
73
77
 
74
78
  Error.message
75
79
 
76
80
  #### Defined in
77
81
 
78
- src/exceptions/WaitingChangeException.ts:5
82
+ src/exceptions/WaitingChangeException.ts:10
79
83
 
80
84
  ___
81
85
 
@@ -111,9 +115,11 @@ ___
111
115
 
112
116
  • **title**: `string`
113
117
 
118
+ Titulo do erro.
119
+
114
120
  #### Defined in
115
121
 
116
- src/exceptions/WaitingChangeException.ts:4
122
+ src/exceptions/WaitingChangeException.ts:7
117
123
 
118
124
  ___
119
125
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  # Class: WarningException
4
4
 
5
+ `WarningException`: Exceção lançada quando o "erro" vindo do backend é caracterizado como warning.
6
+
5
7
  ## Hierarchy
6
8
 
7
9
  - `Error`
@@ -49,7 +51,7 @@ Error.constructor
49
51
 
50
52
  #### Defined in
51
53
 
52
- src/exceptions/WarningException.ts:8
54
+ src/exceptions/WarningException.ts:15
53
55
 
54
56
  ## Properties
55
57
 
@@ -71,9 +73,11 @@ ___
71
73
 
72
74
  • **errorCode**: `string`
73
75
 
76
+ Código do alerta, indica o alerta disparado pelo backend.
77
+
74
78
  #### Defined in
75
79
 
76
- src/exceptions/WarningException.ts:6
80
+ src/exceptions/WarningException.ts:13
77
81
 
78
82
  ___
79
83
 
@@ -81,13 +85,15 @@ ___
81
85
 
82
86
  • **message**: `string`
83
87
 
88
+ Descrição do alerta.
89
+
84
90
  #### Overrides
85
91
 
86
92
  Error.message
87
93
 
88
94
  #### Defined in
89
95
 
90
- src/exceptions/WarningException.ts:5
96
+ src/exceptions/WarningException.ts:10
91
97
 
92
98
  ___
93
99
 
@@ -123,9 +129,11 @@ ___
123
129
 
124
130
  • **title**: `string`
125
131
 
132
+ Titulo do alerta.
133
+
126
134
  #### Defined in
127
135
 
128
- src/exceptions/WarningException.ts:4
136
+ src/exceptions/WarningException.ts:7
129
137
 
130
138
  ___
131
139
 
@@ -19,7 +19,7 @@
19
19
 
20
20
  #### Defined in
21
21
 
22
- src/dataunit/DataUnit.ts:570
22
+ src/dataunit/DataUnit.ts:1042
23
23
 
24
24
  ___
25
25
 
@@ -29,7 +29,7 @@ ___
29
29
 
30
30
  #### Defined in
31
31
 
32
- src/dataunit/DataUnit.ts:572
32
+ src/dataunit/DataUnit.ts:1044
33
33
 
34
34
  ___
35
35
 
@@ -39,7 +39,7 @@ ___
39
39
 
40
40
  #### Defined in
41
41
 
42
- src/dataunit/DataUnit.ts:569
42
+ src/dataunit/DataUnit.ts:1041
43
43
 
44
44
  ___
45
45
 
@@ -49,4 +49,4 @@ ___
49
49
 
50
50
  #### Defined in
51
51
 
52
- src/dataunit/DataUnit.ts:571
52
+ src/dataunit/DataUnit.ts:1043
package/enums/DataType.md CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  #### Defined in
22
22
 
23
- src/dataunit/metadata/DataType.ts:7
23
+ src/dataunit/metadata/DataType.ts:9
24
24
 
25
25
  ___
26
26
 
@@ -30,7 +30,7 @@ ___
30
30
 
31
31
  #### Defined in
32
32
 
33
- src/dataunit/metadata/DataType.ts:5
33
+ src/dataunit/metadata/DataType.ts:7
34
34
 
35
35
  ___
36
36
 
@@ -40,7 +40,7 @@ ___
40
40
 
41
41
  #### Defined in
42
42
 
43
- src/dataunit/metadata/DataType.ts:4
43
+ src/dataunit/metadata/DataType.ts:6
44
44
 
45
45
  ___
46
46
 
@@ -50,7 +50,7 @@ ___
50
50
 
51
51
  #### Defined in
52
52
 
53
- src/dataunit/metadata/DataType.ts:8
53
+ src/dataunit/metadata/DataType.ts:10
54
54
 
55
55
  ___
56
56
 
@@ -60,4 +60,4 @@ ___
60
60
 
61
61
  #### Defined in
62
62
 
63
- src/dataunit/metadata/DataType.ts:6
63
+ src/dataunit/metadata/DataType.ts:8
@@ -26,4 +26,4 @@
26
26
 
27
27
  #### Defined in
28
28
 
29
- src/dataunit/DataUnit.ts:555
29
+ src/dataunit/DataUnit.ts:1027