@sankhyalabs/core-docs 2.3.4 → 2.3.6

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.
Files changed (49) hide show
  1. package/README.md +57 -0
  2. package/classes/ApplicationContext.md +76 -0
  3. package/classes/ArrayUtils.md +89 -0
  4. package/classes/AuthorizedServiceCaller.md +76 -0
  5. package/classes/Change.md +168 -0
  6. package/classes/DataUnit.md +1394 -0
  7. package/classes/DataUnitAction.md +96 -0
  8. package/classes/DateUtils.md +190 -0
  9. package/classes/ElementIDUtils.md +243 -0
  10. package/classes/ErrorException.md +204 -0
  11. package/classes/ErrorTracking.md +54 -0
  12. package/classes/FloatingManager.md +384 -0
  13. package/classes/HttpProvider.md +96 -0
  14. package/classes/MaskFormatter-1.md +336 -0
  15. package/classes/NumberUtils.md +188 -0
  16. package/classes/ObjectUtils.md +81 -0
  17. package/classes/ReadyUtil.md +103 -0
  18. package/classes/RequestMetadata.md +84 -0
  19. package/classes/SkwHttpProvider.md +109 -0
  20. package/classes/StringUtils.md +410 -0
  21. package/classes/TimeFormatter.md +98 -0
  22. package/classes/UserAgentUtils.md +48 -0
  23. package/classes/WaitingChangeException.md +192 -0
  24. package/classes/WarningException.md +204 -0
  25. package/enums/Action.md +250 -0
  26. package/enums/ChangeOperation.md +52 -0
  27. package/enums/DataType.md +63 -0
  28. package/enums/DependencyType.md +41 -0
  29. package/enums/SortMode.md +30 -0
  30. package/enums/UserInterface.md +195 -0
  31. package/interfaces/DUActionInterceptor.md +29 -0
  32. package/interfaces/ExecutionContext.md +58 -0
  33. package/interfaces/FieldDescriptor.md +129 -0
  34. package/interfaces/Filter.md +41 -0
  35. package/interfaces/IElementIDInfo.md +30 -0
  36. package/interfaces/LoadDataRequest.md +63 -0
  37. package/interfaces/LoadDataResponse.md +30 -0
  38. package/interfaces/PageRequest.md +41 -0
  39. package/interfaces/PaginationInfo.md +63 -0
  40. package/interfaces/QuickFilter.md +30 -0
  41. package/interfaces/Record.md +40 -0
  42. package/interfaces/SavedRecord.md +55 -0
  43. package/interfaces/Sort.md +41 -0
  44. package/interfaces/SortingProvider.md +29 -0
  45. package/interfaces/UnitMetadata.md +41 -0
  46. package/interfaces/WaitingChange.md +41 -0
  47. package/modules/MaskFormatter.md +37 -0
  48. package/modules.md +63 -0
  49. 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,410 @@
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
+ - [decodeHtmlEntities](StringUtils.md#decodehtmlentities)
17
+ - [getBooleanValue](StringUtils.md#getbooleanvalue)
18
+ - [hashCode](StringUtils.md#hashcode)
19
+ - [isEmpty](StringUtils.md#isempty)
20
+ - [padEnd](StringUtils.md#padend)
21
+ - [padStart](StringUtils.md#padstart)
22
+ - [replaceAccentuatedChars](StringUtils.md#replaceaccentuatedchars)
23
+ - [replaceAccentuatedCharsKeepSymbols](StringUtils.md#replaceaccentuatedcharskeepsymbols)
24
+ - [replaceAccentuatedCharsLower](StringUtils.md#replaceaccentuatedcharslower)
25
+ - [replaceAccentuatedCharsUpper](StringUtils.md#replaceaccentuatedcharsupper)
26
+ - [toCamelCase](StringUtils.md#tocamelcase)
27
+ - [toKebabCase](StringUtils.md#tokebabcase)
28
+ - [toPascalCase](StringUtils.md#topascalcase)
29
+ - [toSnakeCase](StringUtils.md#tosnakecase)
30
+
31
+ ## Constructors
32
+
33
+ ### constructor
34
+
35
+ • **new StringUtils**()
36
+
37
+ ## Methods
38
+
39
+ ### compare
40
+
41
+ ▸ `Static` **compare**(`a`, `b`): `number`
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.
46
+
47
+ #### Parameters
48
+
49
+ | Name | Type | Description |
50
+ | :------ | :------ | :------ |
51
+ | `a` | `string` | Primeira string para comparação |
52
+ | `b` | `string` | Segunda string para comparação |
53
+
54
+ #### Returns
55
+
56
+ `number`
57
+
58
+ Um valor maior, menor ou igual a zero para determinar se a ordem precisa ser alterada.
59
+
60
+ #### Defined in
61
+
62
+ src/utils/StringUtils.ts:174
63
+
64
+ ___
65
+
66
+ ### decodeHtmlEntities
67
+
68
+ ▸ `Static` **decodeHtmlEntities**(`text`): `string`
69
+
70
+ Converte todas as entidades HTML de um texto
71
+
72
+ **`Example`**
73
+
74
+ ```ts
75
+ entrada: "&lt;Teste&gt;" // retorno: "<Teste>"
76
+ ```
77
+
78
+ #### Parameters
79
+
80
+ | Name | Type | Description |
81
+ | :------ | :------ | :------ |
82
+ | `text` | `string` | String para ser transformada. |
83
+
84
+ #### Returns
85
+
86
+ `string`
87
+
88
+ #### Defined in
89
+
90
+ src/utils/StringUtils.ts:51
91
+
92
+ ___
93
+
94
+ ### getBooleanValue
95
+
96
+ ▸ `Static` **getBooleanValue**(`value`, `defaultValue?`): `boolean`
97
+
98
+ Converte um valor em string para booleano
99
+
100
+ #### Parameters
101
+
102
+ | Name | Type | Default value | Description |
103
+ | :------ | :------ | :------ | :------ |
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") |
106
+
107
+ #### Returns
108
+
109
+ `boolean`
110
+
111
+ #### Defined in
112
+
113
+ src/utils/StringUtils.ts:137
114
+
115
+ ___
116
+
117
+ ### hashCode
118
+
119
+ ▸ `Static` **hashCode**(`value`): `string`
120
+
121
+ Calcula um código hash para uma string.
122
+
123
+ #### Parameters
124
+
125
+ | Name | Type | Description |
126
+ | :------ | :------ | :------ |
127
+ | `value` | `string` | String que será gerado o hash code. |
128
+
129
+ #### Returns
130
+
131
+ `string`
132
+
133
+ #### Defined in
134
+
135
+ src/utils/StringUtils.ts:121
136
+
137
+ ___
138
+
139
+ ### isEmpty
140
+
141
+ ▸ `Static` **isEmpty**(`value`): `Boolean`
142
+
143
+ Verifica se a string está vazia.
144
+ Valores null e undefined são considerados como vazio.
145
+
146
+ #### Parameters
147
+
148
+ | Name | Type | Description |
149
+ | :------ | :------ | :------ |
150
+ | `value` | `any` | String para ser validada. |
151
+
152
+ #### Returns
153
+
154
+ `Boolean`
155
+
156
+ #### Defined in
157
+
158
+ src/utils/StringUtils.ts:12
159
+
160
+ ___
161
+
162
+ ### padEnd
163
+
164
+ ▸ `Static` **padEnd**(`str`, `len`, `pad?`): `string`
165
+
166
+ #### Parameters
167
+
168
+ | Name | Type | Default value |
169
+ | :------ | :------ | :------ |
170
+ | `str` | `string` | `undefined` |
171
+ | `len` | `number` | `undefined` |
172
+ | `pad` | `string` | `" "` |
173
+
174
+ #### Returns
175
+
176
+ `string`
177
+
178
+ #### Defined in
179
+
180
+ src/utils/StringUtils.ts:157
181
+
182
+ ___
183
+
184
+ ### padStart
185
+
186
+ ▸ `Static` **padStart**(`str`, `len`, `pad?`): `string`
187
+
188
+ #### Parameters
189
+
190
+ | Name | Type | Default value |
191
+ | :------ | :------ | :------ |
192
+ | `str` | `string` | `undefined` |
193
+ | `len` | `number` | `undefined` |
194
+ | `pad` | `string` | `" "` |
195
+
196
+ #### Returns
197
+
198
+ `string`
199
+
200
+ #### Defined in
201
+
202
+ src/utils/StringUtils.ts:149
203
+
204
+ ___
205
+
206
+ ### replaceAccentuatedChars
207
+
208
+ ▸ `Static` **replaceAccentuatedChars**(`text`, `removeSpecialChars?`): `string`
209
+
210
+ Remove acentuação de vogais e de caracteres especiais que não sejam letras ou numeral.
211
+
212
+ **`Example`**
213
+
214
+ ```ts
215
+ entrada: "á@Êç#Ò", false // retorno: "a@Ec#O"
216
+ entrada: "á@Êç#Ò", true // retorno: "aEcO"
217
+ ```
218
+
219
+ #### Parameters
220
+
221
+ | Name | Type | Default value | Description |
222
+ | :------ | :------ | :------ | :------ |
223
+ | `text` | `string` | `undefined` | String para ser transformada. |
224
+ | `removeSpecialChars` | `boolean` | `true` | Remove outros caracteres especiais que não sejam letras e números. |
225
+
226
+ #### Returns
227
+
228
+ `string`
229
+
230
+ #### Defined in
231
+
232
+ src/utils/StringUtils.ts:98
233
+
234
+ ___
235
+
236
+ ### replaceAccentuatedCharsKeepSymbols
237
+
238
+ ▸ `Static` **replaceAccentuatedCharsKeepSymbols**(`text`): `string`
239
+
240
+ Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta mantendo espaços e símbolos.
241
+
242
+ #### Parameters
243
+
244
+ | Name | Type | Description |
245
+ | :------ | :------ | :------ |
246
+ | `text` | `string` | String para ser transformada. |
247
+
248
+ #### Returns
249
+
250
+ `string`
251
+
252
+ #### Defined in
253
+
254
+ src/utils/StringUtils.ts:113
255
+
256
+ ___
257
+
258
+ ### replaceAccentuatedCharsLower
259
+
260
+ ▸ `Static` **replaceAccentuatedCharsLower**(`text`): `string`
261
+
262
+ Remove acentos de vogais minúsculas.
263
+
264
+ **`Example`**
265
+
266
+ ```ts
267
+ entrada: "áêçò" // retorno: "aeco"
268
+ ```
269
+
270
+ #### Parameters
271
+
272
+ | Name | Type | Description |
273
+ | :------ | :------ | :------ |
274
+ | `text` | `string` | String para ser transformada. |
275
+
276
+ #### Returns
277
+
278
+ `string`
279
+
280
+ #### Defined in
281
+
282
+ src/utils/StringUtils.ts:78
283
+
284
+ ___
285
+
286
+ ### replaceAccentuatedCharsUpper
287
+
288
+ ▸ `Static` **replaceAccentuatedCharsUpper**(`text`): `string`
289
+
290
+ Remove acentos de vogais maiúsculas
291
+
292
+ **`Example`**
293
+
294
+ ```ts
295
+ entrada: "ÁÊÇÒ" // retorno: "AECO"
296
+ ```
297
+
298
+ #### Parameters
299
+
300
+ | Name | Type | Description |
301
+ | :------ | :------ | :------ |
302
+ | `text` | `string` | String para ser transformada. |
303
+
304
+ #### Returns
305
+
306
+ `string`
307
+
308
+ #### Defined in
309
+
310
+ src/utils/StringUtils.ts:34
311
+
312
+ ___
313
+
314
+ ### toCamelCase
315
+
316
+ ▸ `Static` **toCamelCase**(`value`): `string`
317
+
318
+ Utilitário para converter string em camelCase
319
+ Combina palavras compostas ou frases, alterando a inicial de cada uma, a partir da primeira, para maiúscula e unidas sem espaços.
320
+
321
+ #### Parameters
322
+
323
+ | Name | Type | Description |
324
+ | :------ | :------ | :------ |
325
+ | `value` | `string` | String a ser convertida |
326
+
327
+ #### Returns
328
+
329
+ `string`
330
+
331
+ String convertida em camelCase
332
+
333
+ #### Defined in
334
+
335
+ src/utils/StringUtils.ts:197
336
+
337
+ ___
338
+
339
+ ### toKebabCase
340
+
341
+ ▸ `Static` **toKebabCase**(`value`): `string`
342
+
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
345
+
346
+ #### Parameters
347
+
348
+ | Name | Type | Description |
349
+ | :------ | :------ | :------ |
350
+ | `value` | `string` | String a ser convertida |
351
+
352
+ #### Returns
353
+
354
+ `string`
355
+
356
+ String convertida em KebabCase
357
+
358
+ #### Defined in
359
+
360
+ src/utils/StringUtils.ts:240
361
+
362
+ ___
363
+
364
+ ### toPascalCase
365
+
366
+ ▸ `Static` **toPascalCase**(`value`): `string`
367
+
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
370
+
371
+ #### Parameters
372
+
373
+ | Name | Type | Description |
374
+ | :------ | :------ | :------ |
375
+ | `value` | `string` | String a ser convertida |
376
+
377
+ #### Returns
378
+
379
+ `string`
380
+
381
+ String convertida em PascalCase
382
+
383
+ #### Defined in
384
+
385
+ src/utils/StringUtils.ts:213
386
+
387
+ ___
388
+
389
+ ### toSnakeCase
390
+
391
+ ▸ `Static` **toSnakeCase**(`value`): `string`
392
+
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
395
+
396
+ #### Parameters
397
+
398
+ | Name | Type | Description |
399
+ | :------ | :------ | :------ |
400
+ | `value` | `string` | String a ser convertida |
401
+
402
+ #### Returns
403
+
404
+ `string`
405
+
406
+ String convertida em snake_case
407
+
408
+ #### Defined in
409
+
410
+ src/utils/StringUtils.ts:226
@@ -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