@sankhyalabs/core-docs 5.20.0-dev.5 → 5.20.0-dev.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 (78) hide show
  1. package/README.md +3 -1
  2. package/classes/ApplicationContext.md +31 -32
  3. package/classes/ArrayUtils.md +95 -83
  4. package/classes/AuthorizedServiceCaller.md +25 -34
  5. package/classes/Change.md +59 -74
  6. package/classes/DataUnit.md +1017 -1091
  7. package/classes/DataUnitAction.md +25 -42
  8. package/classes/DataUnitStorage.md +40 -43
  9. package/classes/DateUtils.md +133 -126
  10. package/classes/ElementIDUtils.md +123 -122
  11. package/classes/ErrorException.md +67 -88
  12. package/classes/ErrorTracking.md +20 -23
  13. package/classes/FieldComparator.md +35 -39
  14. package/classes/FloatingManager.md +195 -198
  15. package/classes/HTMLBuilder.md +14 -20
  16. package/classes/HttpProvider.md +45 -41
  17. package/classes/IDBRepository.md +179 -196
  18. package/classes/JSUtils.md +65 -66
  19. package/classes/KeyboardManager.md +95 -87
  20. package/classes/{MaskFormatter-1.md → MaskFormatter.md} +81 -120
  21. package/classes/NumberUtils.md +163 -152
  22. package/classes/ObjectUtils.md +66 -71
  23. package/classes/OnboardingUtils.md +36 -51
  24. package/classes/PromiseSync.md +25 -42
  25. package/classes/ReadyUtil.md +31 -41
  26. package/classes/RequestMetadata.md +29 -30
  27. package/classes/SearchUtils.md +18 -20
  28. package/classes/SelectionInfo.md +59 -74
  29. package/classes/SkwHttpProvider.md +33 -45
  30. package/classes/StringUtils.md +297 -322
  31. package/classes/TimeFormatter.md +43 -44
  32. package/classes/UserAgentUtils.md +17 -20
  33. package/classes/VersionUtils.md +15 -18
  34. package/classes/WaitingChangeException.md +63 -84
  35. package/classes/WarningException.md +67 -88
  36. package/enumerations/Action.md +297 -0
  37. package/enumerations/ChangeOperation.md +47 -0
  38. package/enumerations/DataType.md +57 -0
  39. package/enumerations/DependencyType.md +37 -0
  40. package/enumerations/SelectionMode.md +27 -0
  41. package/enumerations/SortMode.md +27 -0
  42. package/enumerations/UserInterface.md +177 -0
  43. package/functions/defaultDataLoader.md +25 -0
  44. package/{modules.md → globals.md} +17 -39
  45. package/interfaces/ChildDescriptor.md +12 -16
  46. package/interfaces/ChildLink.md +9 -12
  47. package/interfaces/DUActionInterceptor.md +10 -14
  48. package/interfaces/ExecutionContext.md +17 -32
  49. package/interfaces/FieldDescriptor.md +52 -66
  50. package/interfaces/Filter.md +13 -17
  51. package/interfaces/IElementIDInfo.md +11 -14
  52. package/interfaces/ILoadResult.md +11 -16
  53. package/interfaces/IRepository.md +88 -93
  54. package/interfaces/IRepositoryIndex.md +23 -30
  55. package/interfaces/LoadDataRequest.md +36 -45
  56. package/interfaces/LoadDataResponse.md +11 -14
  57. package/interfaces/PageRequest.md +16 -20
  58. package/interfaces/PaginationInfo.md +24 -31
  59. package/interfaces/PromiseSyncCallback.md +13 -17
  60. package/interfaces/QuickFilter.md +17 -21
  61. package/interfaces/Record.md +26 -33
  62. package/interfaces/SavedRecord.md +33 -41
  63. package/interfaces/Sort.md +12 -16
  64. package/interfaces/SortingProvider.md +10 -13
  65. package/interfaces/UnitMetadata.md +16 -21
  66. package/interfaces/WaitingChange.md +16 -20
  67. package/namespaces/MaskFormatter/README.md +17 -0
  68. package/namespaces/MaskFormatter/type-aliases/MaskCharacter.md +13 -0
  69. package/namespaces/MaskFormatter/variables/MaskCharacter.md +13 -0
  70. package/package.json +1 -1
  71. package/enums/Action.md +0 -305
  72. package/enums/ChangeOperation.md +0 -52
  73. package/enums/DataType.md +0 -63
  74. package/enums/DependencyType.md +0 -41
  75. package/enums/SelectionMode.md +0 -30
  76. package/enums/SortMode.md +0 -30
  77. package/enums/UserInterface.md +0 -195
  78. package/modules/MaskFormatter.md +0 -37
@@ -1,83 +1,74 @@
1
- [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / NumberUtils
1
+ [**@sankhyalabs/core**](../README.md) **Docs**
2
+
3
+ ***
4
+
5
+ [@sankhyalabs/core](../globals.md) / NumberUtils
2
6
 
3
7
  # Class: NumberUtils
4
8
 
5
9
  `NumberUtils`: Utilizado para manipulação de numerais.
6
10
 
7
- ## Table of contents
11
+ ## Constructors
8
12
 
9
- ### Constructors
13
+ ### new NumberUtils()
10
14
 
11
- - [constructor](NumberUtils.md#constructor)
15
+ > **new NumberUtils**(): [`NumberUtils`](NumberUtils.md)
12
16
 
13
- ### Methods
17
+ #### Returns
14
18
 
15
- - [changeFormat](NumberUtils.md#changeformat)
16
- - [compare](NumberUtils.md#compare)
17
- - [format](NumberUtils.md#format)
18
- - [getValueOrDefault](NumberUtils.md#getvalueordefault)
19
- - [getValueOrZero](NumberUtils.md#getvalueorzero)
20
- - [keepOnlyDecimalSeparator](NumberUtils.md#keeponlydecimalseparator)
21
- - [round](NumberUtils.md#round)
22
- - [safeFormat](NumberUtils.md#safeformat)
23
- - [stringToNumber](NumberUtils.md#stringtonumber)
19
+ [`NumberUtils`](NumberUtils.md)
24
20
 
25
- ## Constructors
21
+ ## Methods
26
22
 
27
- ### constructor
23
+ ### changeFormat()
28
24
 
29
- **new NumberUtils**()
25
+ > `static` **changeFormat**(`value`): `string`
30
26
 
31
- ## Methods
27
+ Troca o formato do numeral(string) de "PT-BR" para "EN-US" e vice-versa.
32
28
 
33
- ### changeFormat
29
+ #### Parameters
34
30
 
35
- `Static` **changeFormat**(`value`): `string`
31
+ **value**: `string`
36
32
 
37
- Troca o formato do numeral(string) de "PT-BR" para "EN-US" e vice-versa.
33
+ Numeral em formato de string a ser convertido.
34
+
35
+ #### Returns
36
+
37
+ `string`
38
+
39
+ - Numeral em formato de string formatado de "PT-BR" para "EN-US" e vice-versa.
38
40
 
39
- **`Example`**
41
+ #### Examples
40
42
 
41
43
  ```ts
42
44
  Informo: "15,55" | Obtenho: "15.55"
43
45
  ```
44
46
 
45
- **`Example`**
46
-
47
47
  ```ts
48
48
  Informo: "27.99" | Obtenho: "27,99"
49
49
  ```
50
50
 
51
- #### Parameters
52
-
53
- | Name | Type | Description |
54
- | :------ | :------ | :------ |
55
- | `value` | `string` | Numeral em formato de string a ser convertido. |
56
-
57
- #### Returns
58
-
59
- `string`
60
-
61
- - Numeral em formato de string formatado de "PT-BR" para "EN-US" e vice-versa.
62
-
63
- #### Defined in
51
+ #### Source
64
52
 
65
53
  src/utils/NumberUtils.ts:186
66
54
 
67
- ___
55
+ ***
68
56
 
69
- ### compare
57
+ ### compare()
70
58
 
71
- `Static` **compare**(`a`, `b`): `number`
59
+ > `static` **compare**(`a`, `b`): `number`
72
60
 
73
61
  Determina a ordem de umeros.
74
62
 
75
63
  #### Parameters
76
64
 
77
- | Name | Type | Description |
78
- | :------ | :------ | :------ |
79
- | `a` | `number` | Primeio número para comparação. |
80
- | `b` | `number` | Segundo número para comparação. |
65
+ **a**: `number`
66
+
67
+ Primeio número para comparação.
68
+
69
+ • **b**: `number`
70
+
71
+ Segundo número para comparação.
81
72
 
82
73
  #### Returns
83
74
 
@@ -85,34 +76,35 @@ Determina a ordem de umeros.
85
76
 
86
77
  - 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.
87
78
 
88
- #### Defined in
79
+ #### Source
89
80
 
90
81
  src/utils/NumberUtils.ts:267
91
82
 
92
- ___
83
+ ***
93
84
 
94
- ### format
85
+ ### format()
95
86
 
96
- `Static` **format**(`value`, `precision`, `prettyPrecision?`, `defaultValue?`): `string`
87
+ > `static` **format**(`value`, `precision`, `prettyPrecision`, `defaultValue`): `string`
97
88
 
98
89
  Formata o numeral com a precisão informada.
99
90
 
100
- **`Example`**
91
+ #### Parameters
101
92
 
102
- ```ts
103
- Informado: ('10,9845444', 3, 3) | Retorna: '10,985'
104
- Informado: (undefined, 3, 3) | Retorna: NaN
105
- Informado: (undefined, 3, 3, '0,00') | Retorna: 0,00
106
- ```
93
+ • **value**: `string`
107
94
 
108
- #### Parameters
95
+ Numeral em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico - sem separador de milhares: ######.##).
96
+
97
+ • **precision**: `number`
98
+
99
+ Quantidade de casas decimais.
100
+
101
+ • **prettyPrecision**: `number`= `NaN`
109
102
 
110
- | Name | Type | Default value | Description |
111
- | :------ | :------ | :------ | :------ |
112
- | `value` | `string` | `undefined` | Numeral em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico - sem separador de milhares: ######.##). |
113
- | `precision` | `number` | `undefined` | Quantidade de casas decimais. |
114
- | `prettyPrecision` | `number` | `NaN` | Quantidade de zeros nos decimais. |
115
- | `defaultValue` | `string` | `undefined` | Valor padrão caso o value não seja um valor numérico válido. |
103
+ Quantidade de zeros nos decimais.
104
+
105
+ **defaultValue**: `string`= `undefined`
106
+
107
+ Valor padrão caso o value não seja um valor numérico válido.
116
108
 
117
109
  #### Returns
118
110
 
@@ -120,66 +112,73 @@ Informado: (undefined, 3, 3, '0,00') | Retorna: 0,00
120
112
 
121
113
  - Numeral em formato de String formatado em PT-BR.
122
114
 
123
- #### Defined in
115
+ #### Example
116
+
117
+ ```ts
118
+ Informado: ('10,9845444', 3, 3) | Retorna: '10,985'
119
+ Informado: (undefined, 3, 3) | Retorna: NaN
120
+ Informado: (undefined, 3, 3, '0,00') | Retorna: 0,00
121
+ ```
122
+
123
+ #### Source
124
124
 
125
125
  src/utils/NumberUtils.ts:77
126
126
 
127
- ___
127
+ ***
128
128
 
129
- ### getValueOrDefault
129
+ ### getValueOrDefault()
130
130
 
131
- `Static` **getValueOrDefault**(`value`, `defaultValue`): `number`
131
+ > `static` **getValueOrDefault**(`value`, `defaultValue`): `number`
132
132
 
133
133
  Obtém o valor ou o valor padrão, caso o valor seja inválido(NaN/undefined).
134
134
 
135
- **`Example`**
135
+ #### Parameters
136
+
137
+ • **value**: `any`
138
+
139
+ Valor a ser validado.
140
+
141
+ • **defaultValue**: `number`
142
+
143
+ Valor padrão a ser retornado caso o value seja inválido.
144
+
145
+ #### Returns
146
+
147
+ `number`
148
+
149
+ - O próprio numeral passado ou zero.
150
+
151
+ #### Examples
136
152
 
137
153
  ```ts
138
154
  Informo: value: 30, defaultValue: 0 | Obtenho: 30
139
155
  ```
140
156
 
141
- **`Example`**
142
-
143
157
  ```ts
144
158
  Informo: value: "30", defaultValue: 0 | Obtenho: 30
145
159
  ```
146
160
 
147
- **`Example`**
148
-
149
161
  ```ts
150
162
  Informo: value: "30abc", defaultValue: 0 | Obtenho: 0
151
163
  ```
152
164
 
153
- #### Parameters
154
-
155
- | Name | Type | Description |
156
- | :------ | :------ | :------ |
157
- | `value` | `any` | Valor a ser validado. |
158
- | `defaultValue` | `number` | Valor padrão a ser retornado caso o value seja inválido. |
159
-
160
- #### Returns
161
-
162
- `number`
163
-
164
- - O próprio numeral passado ou zero.
165
-
166
- #### Defined in
165
+ #### Source
167
166
 
168
167
  src/utils/NumberUtils.ts:208
169
168
 
170
- ___
169
+ ***
171
170
 
172
- ### getValueOrZero
171
+ ### getValueOrZero()
173
172
 
174
- `Static` **getValueOrZero**(`value`): `number`
173
+ > `static` **getValueOrZero**(`value`): `number`
175
174
 
176
175
  Obtém o valor ou zero, caso o valor seja inválido(NaN/undefined).
177
176
 
178
177
  #### Parameters
179
178
 
180
- | Name | Type | Description |
181
- | :------ | :------ | :------ |
182
- | `value` | `any` | Numeral a ser validado. |
179
+ **value**: `any`
180
+
181
+ Numeral a ser validado.
183
182
 
184
183
  #### Returns
185
184
 
@@ -187,30 +186,27 @@ Obtém o valor ou zero, caso o valor seja inválido(NaN/undefined).
187
186
 
188
187
  - O próprio numeral passado. Caso esse seja inválido retorna zero.
189
188
 
190
- #### Defined in
189
+ #### Source
191
190
 
192
191
  src/utils/NumberUtils.ts:227
193
192
 
194
- ___
193
+ ***
195
194
 
196
- ### keepOnlyDecimalSeparator
195
+ ### keepOnlyDecimalSeparator()
197
196
 
198
- `Static` **keepOnlyDecimalSeparator**(`value`, `formatnumber?`): `string`
197
+ > `static` **keepOnlyDecimalSeparator**(`value`, `formatnumber`): `string`
199
198
 
200
199
  Retira os separadores de milhar de um numeral em formato de string.
201
200
 
202
- **`Example`**
201
+ #### Parameters
203
202
 
204
- ```ts
205
- Informado: '95.12' | Retorna: '9512'
206
- ```
203
+ • **value**: `string`
207
204
 
208
- #### Parameters
205
+ Numeral em formato de string a ser convertido.
206
+
207
+ • **formatnumber**: `string`= `'pt-BR'`
209
208
 
210
- | Name | Type | Default value | Description |
211
- | :------ | :------ | :------ | :------ |
212
- | `value` | `string` | `undefined` | Numeral em formato de string a ser convertido. |
213
- | `formatnumber` | `string` | `'pt-BR'` | Formatação de ENTRADA e SAÍDA do utilitário: pt-BR="###.###,##" en-US="###,###.##"; Default: "pt-BR". |
209
+ Formatação de ENTRADA e SAÍDA do utilitário: pt-BR="###.###,##" en-US="###,###.##"; Default: "pt-BR".
214
210
 
215
211
  #### Returns
216
212
 
@@ -218,19 +214,41 @@ Informado: '95.12' | Retorna: '9512'
218
214
 
219
215
  - Numeral em formato de string formatado apenas com separador decimal.
220
216
 
221
- #### Defined in
217
+ #### Example
218
+
219
+ ```ts
220
+ Informado: '95.12' | Retorna: '9512'
221
+ ```
222
+
223
+ #### Source
222
224
 
223
225
  src/utils/NumberUtils.ts:158
224
226
 
225
- ___
227
+ ***
226
228
 
227
- ### round
229
+ ### round()
228
230
 
229
- `Static` **round**(`value`, `decimals?`): `number`
231
+ > `static` **round**(`value`, `decimals`): `number`
230
232
 
231
233
  Realiza o arredondamento de casas decimais de um numero.
232
234
 
233
- **`Example`**
235
+ #### Parameters
236
+
237
+ • **value**: `number`
238
+
239
+ Numeral a ser arredondado.
240
+
241
+ • **decimals**: `number`= `2`
242
+
243
+ Quantidade de casas decimais ussada no arredondamento.
244
+
245
+ #### Returns
246
+
247
+ `number`
248
+
249
+ - O próprio numeral arredondado com a quantidade de casas decimais do argumento decimals.
250
+
251
+ #### Example
234
252
 
235
253
  ```ts
236
254
  Informo: (100.12) | 100.12
@@ -249,65 +267,70 @@ Informo: ("100.16", 2) | 100.16
249
267
  Informo: ("100.16", 3) | 100.16
250
268
  ```
251
269
 
252
- #### Parameters
270
+ #### Source
253
271
 
254
- | Name | Type | Default value | Description |
255
- | :------ | :------ | :------ | :------ |
256
- | `value` | `number` | `undefined` | Numeral a ser arredondado. |
257
- | `decimals` | `number` | `2` | Quantidade de casas decimais ussada no arredondamento. |
272
+ src/utils/NumberUtils.ts:255
258
273
 
259
- #### Returns
274
+ ***
260
275
 
261
- `number`
276
+ ### safeFormat()
262
277
 
263
- - O próprio numeral arredondado com a quantidade de casas decimais do argumento decimals.
278
+ > `static` **safeFormat**(`value`, `precision`, `prettyPrecision`): `string`
264
279
 
265
- #### Defined in
280
+ Formata o numeral com a precisão informada e o valor default 0,00 caso o value não seja um numero valido.
266
281
 
267
- src/utils/NumberUtils.ts:255
282
+ #### Parameters
268
283
 
269
- ___
284
+ • **value**: `string`
270
285
 
271
- ### safeFormat
286
+ Numeral em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico - sem separador de milhares: ######.##).
272
287
 
273
- `Static` **safeFormat**(`value`, `precision`, `prettyPrecision?`): `string`
288
+ **precision**: `number`
274
289
 
275
- Formata o numeral com a precisão informada e o valor default 0,00 caso o value não seja um numero valido.
290
+ Quantidade de casas decimais.
276
291
 
277
- **`Example`**
292
+ • **prettyPrecision**: `number`= `NaN`
293
+
294
+ Quantidade de zeros nos decimais.
295
+
296
+ #### Returns
297
+
298
+ `string`
299
+
300
+ - Numeral em formato de String formatado em PT-BR.
301
+
302
+ #### Example
278
303
 
279
304
  ```ts
280
305
  Informado: ('10,9845444', 3, 3) | Retorna: '10,985'
281
306
  Informado: (undefined, 3, 3) | Retorna: 0,00
282
307
  ```
283
308
 
284
- #### Parameters
309
+ #### Source
285
310
 
286
- | Name | Type | Default value | Description |
287
- | :------ | :------ | :------ | :------ |
288
- | `value` | `string` | `undefined` | Numeral em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico - sem separador de milhares: ######.##). |
289
- | `precision` | `number` | `undefined` | Quantidade de casas decimais. |
290
- | `prettyPrecision` | `number` | `NaN` | Quantidade de zeros nos decimais. |
311
+ src/utils/NumberUtils.ts:143
291
312
 
292
- #### Returns
313
+ ***
293
314
 
294
- `string`
315
+ ### stringToNumber()
295
316
 
296
- - Numeral em formato de String formatado em PT-BR.
317
+ > `static` **stringToNumber**(`value`): `number`
297
318
 
298
- #### Defined in
319
+ Converte o dado numérico de string para number.
299
320
 
300
- src/utils/NumberUtils.ts:143
321
+ #### Parameters
301
322
 
302
- ___
323
+ • **value**: `string`
303
324
 
304
- ### stringToNumber
325
+ Numeral em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico: ######.##).
305
326
 
306
- `Static` **stringToNumber**(`value`): `number`
327
+ #### Returns
307
328
 
308
- Converte o dado numérico de string para number.
329
+ `number`
330
+
331
+ - Numeral passado.
309
332
 
310
- **`Example`**
333
+ #### Example
311
334
 
312
335
  ```ts
313
336
  @"100,12" | 100.12
@@ -318,18 +341,6 @@ Converte o dado numérico de string para number.
318
341
  @"string" | NaN
319
342
  ```
320
343
 
321
- #### Parameters
322
-
323
- | Name | Type | Description |
324
- | :------ | :------ | :------ |
325
- | `value` | `string` | Numeral em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico: ######.##). |
326
-
327
- #### Returns
328
-
329
- `number`
330
-
331
- - Numeral passado.
332
-
333
- #### Defined in
344
+ #### Source
334
345
 
335
346
  src/utils/NumberUtils.ts:22