@sankhyalabs/core 5.20.0-dev.6 → 5.20.0-dev.60

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 (144) hide show
  1. package/.docs/classes/Change.md +11 -11
  2. package/.docs/classes/DataUnit.md +317 -137
  3. package/.docs/classes/DateUtils.md +8 -8
  4. package/.docs/classes/IDBRepository.md +22 -0
  5. package/.docs/classes/LockManager.md +191 -0
  6. package/.docs/classes/MaskFormatter.md +66 -14
  7. package/.docs/classes/ObjectUtils.md +141 -0
  8. package/.docs/classes/OverflowWatcher.md +533 -0
  9. package/.docs/classes/SelectionInfo.md +25 -11
  10. package/.docs/classes/ServiceCanceledException.md +193 -0
  11. package/.docs/classes/ServiceUtils.md +67 -0
  12. package/.docs/classes/SilentException.md +193 -0
  13. package/.docs/enumerations/Action.md +41 -21
  14. package/.docs/enumerations/ChangeOperation.md +4 -4
  15. package/.docs/enumerations/LockManagerOperation.md +21 -0
  16. package/.docs/enumerations/OverflowDirection.md +29 -0
  17. package/.docs/enumerations/SelectionMode.md +2 -2
  18. package/.docs/enumerations/StorageType.md +37 -0
  19. package/.docs/globals.md +18 -0
  20. package/.docs/interfaces/DUActionInterceptor.md +1 -1
  21. package/.docs/interfaces/IRepository.md +18 -0
  22. package/.docs/interfaces/LoadDataRequest.md +1 -1
  23. package/.docs/interfaces/OverFlowWatcherParams.md +67 -0
  24. package/.docs/interfaces/PageRequest.md +3 -3
  25. package/.docs/interfaces/PaginationInfo.md +13 -0
  26. package/.docs/interfaces/QuickFilter.md +3 -3
  27. package/.docs/interfaces/Record.md +4 -4
  28. package/.docs/interfaces/SavedRecord.md +5 -5
  29. package/.docs/interfaces/WaitingChange.md +3 -3
  30. package/.docs/namespaces/MaskFormatter/type-aliases/MaskCharacter.md +1 -1
  31. package/.docs/namespaces/MaskFormatter/variables/MaskCharacter.md +1 -1
  32. package/.docs/type-aliases/DataUnitEventOptions.md +17 -0
  33. package/.docs/type-aliases/OnOverflowCallBack.md +25 -0
  34. package/.docs/variables/OVERFLOWED_CLASS_NAME.md +13 -0
  35. package/bun.lockb +0 -0
  36. package/dist/dataunit/DataUnit.d.ts +60 -11
  37. package/dist/dataunit/DataUnit.js +158 -46
  38. package/dist/dataunit/DataUnit.js.map +1 -1
  39. package/dist/dataunit/DataUnitHelper.js +6 -5
  40. package/dist/dataunit/DataUnitHelper.js.map +1 -1
  41. package/dist/dataunit/formatting/PrettyFormatter.js +10 -6
  42. package/dist/dataunit/formatting/PrettyFormatter.js.map +1 -1
  43. package/dist/dataunit/loading/LoadDataRequest.d.ts +1 -1
  44. package/dist/dataunit/loading/PaginationInfo.d.ts +4 -0
  45. package/dist/dataunit/metadata/DataType.js +3 -0
  46. package/dist/dataunit/metadata/DataType.js.map +1 -1
  47. package/dist/dataunit/state/action/DataUnitAction.d.ts +2 -0
  48. package/dist/dataunit/state/action/DataUnitAction.js +2 -0
  49. package/dist/dataunit/state/action/DataUnitAction.js.map +1 -1
  50. package/dist/dataunit/state/slice/InvalidFieldsSlice.js +2 -0
  51. package/dist/dataunit/state/slice/InvalidFieldsSlice.js.map +1 -1
  52. package/dist/dataunit/state/slice/RecordsSlice.js +1 -1
  53. package/dist/dataunit/state/slice/RecordsSlice.js.map +1 -1
  54. package/dist/dataunit/state/slice/SelectionSlice.js +4 -4
  55. package/dist/dataunit/state/slice/SelectionSlice.js.map +1 -1
  56. package/dist/exceptions/ServiceCanceledException.d.ts +14 -0
  57. package/dist/exceptions/ServiceCanceledException.js +13 -0
  58. package/dist/exceptions/ServiceCanceledException.js.map +1 -0
  59. package/dist/exceptions/SilentException.d.ts +14 -0
  60. package/dist/exceptions/SilentException.js +13 -0
  61. package/dist/exceptions/SilentException.js.map +1 -0
  62. package/dist/index.d.ts +8 -2
  63. package/dist/index.js +7 -1
  64. package/dist/index.js.map +1 -1
  65. package/dist/repository/IRepository.d.ts +6 -0
  66. package/dist/repository/indexeddb/IDBRepository.d.ts +1 -0
  67. package/dist/repository/indexeddb/IDBRepository.js +3 -0
  68. package/dist/repository/indexeddb/IDBRepository.js.map +1 -1
  69. package/dist/utils/CacheManager/index.d.ts +52 -0
  70. package/dist/utils/CacheManager/index.js +101 -0
  71. package/dist/utils/CacheManager/index.js.map +1 -0
  72. package/dist/utils/CacheManager/interfaces/index.d.ts +5 -0
  73. package/dist/utils/CacheManager/interfaces/index.js +7 -0
  74. package/dist/utils/CacheManager/interfaces/index.js.map +1 -0
  75. package/dist/utils/DateUtils.js +3 -0
  76. package/dist/utils/DateUtils.js.map +1 -1
  77. package/dist/utils/ElementUtils.d.ts +2 -0
  78. package/dist/utils/ElementUtils.js +9 -0
  79. package/dist/utils/ElementUtils.js.map +1 -0
  80. package/dist/utils/LockManager.d.ts +46 -0
  81. package/dist/utils/LockManager.js +141 -0
  82. package/dist/utils/LockManager.js.map +1 -0
  83. package/dist/utils/MaskFormatter.d.ts +16 -1
  84. package/dist/utils/MaskFormatter.js +82 -2
  85. package/dist/utils/MaskFormatter.js.map +1 -1
  86. package/dist/utils/ObjectUtils.d.ts +38 -0
  87. package/dist/utils/ObjectUtils.js +51 -0
  88. package/dist/utils/ObjectUtils.js.map +1 -1
  89. package/dist/utils/OnboardingUtils.js +1 -1
  90. package/dist/utils/OnboardingUtils.js.map +1 -1
  91. package/dist/utils/OverflowWatcher/index.d.ts +59 -0
  92. package/dist/utils/OverflowWatcher/index.js +188 -0
  93. package/dist/utils/OverflowWatcher/index.js.map +1 -0
  94. package/dist/utils/OverflowWatcher/types/overflow-callback.d.ts +6 -0
  95. package/dist/utils/OverflowWatcher/types/overflow-callback.js +2 -0
  96. package/dist/utils/OverflowWatcher/types/overflow-callback.js.map +1 -0
  97. package/dist/utils/OverflowWatcher/types/overflow-direction.d.ts +7 -0
  98. package/dist/utils/OverflowWatcher/types/overflow-direction.js +9 -0
  99. package/dist/utils/OverflowWatcher/types/overflow-direction.js.map +1 -0
  100. package/dist/utils/ServiceUtils.d.ts +24 -0
  101. package/dist/utils/ServiceUtils.js +40 -0
  102. package/dist/utils/ServiceUtils.js.map +1 -0
  103. package/dist/utils/SortingUtils.d.ts +9 -0
  104. package/dist/utils/SortingUtils.js +24 -0
  105. package/dist/utils/SortingUtils.js.map +1 -0
  106. package/jest.config.ts +2 -0
  107. package/package.json +2 -1
  108. package/reports/test-report.xml +175 -0
  109. package/setupTests.js +7 -0
  110. package/sonar-project.properties +6 -3
  111. package/src/dataunit/DataUnit.ts +189 -59
  112. package/src/dataunit/DataUnitHelper.ts +6 -5
  113. package/src/dataunit/formatting/PrettyFormatter.ts +10 -6
  114. package/src/dataunit/loading/LoadDataRequest.ts +1 -1
  115. package/src/dataunit/loading/PaginationInfo.ts +5 -0
  116. package/src/dataunit/metadata/DataType.ts +3 -0
  117. package/src/dataunit/state/action/DataUnitAction.ts +2 -0
  118. package/src/dataunit/state/slice/InvalidFieldsSlice.ts +2 -0
  119. package/src/dataunit/state/slice/RecordsSlice.ts +1 -1
  120. package/src/dataunit/state/slice/SelectionSlice.ts +4 -4
  121. package/src/dataunit/state/slice/test/RecordsSlice.spec.ts +45 -0
  122. package/src/dataunit/test/DataUnit.spec.ts +44 -0
  123. package/src/exceptions/ServiceCanceledException.ts +25 -0
  124. package/src/exceptions/SilentException.ts +25 -0
  125. package/src/index.ts +19 -1
  126. package/src/repository/IRepository.ts +7 -0
  127. package/src/repository/indexeddb/IDBRepository.ts +4 -0
  128. package/src/utils/CacheManager/index.ts +103 -0
  129. package/src/utils/CacheManager/interfaces/index.ts +5 -0
  130. package/src/utils/DateUtils.ts +3 -0
  131. package/src/utils/ElementUtils.ts +10 -0
  132. package/src/utils/LockManager.ts +157 -0
  133. package/src/utils/MaskFormatter.ts +93 -2
  134. package/src/utils/ObjectUtils.ts +56 -0
  135. package/src/utils/OnboardingUtils.ts +1 -1
  136. package/src/utils/OverflowWatcher/index.ts +243 -0
  137. package/src/utils/OverflowWatcher/types/overflow-callback.ts +6 -0
  138. package/src/utils/OverflowWatcher/types/overflow-direction.ts +7 -0
  139. package/src/utils/ServiceUtils.ts +36 -0
  140. package/src/utils/SortingUtils.ts +30 -0
  141. package/src/utils/test/objectUtils.spec.ts +109 -0
  142. package/test/dataunit/formatting/PrettyFormatter.spec.ts +177 -0
  143. package/test/util/ElementUtils.spec.ts +34 -0
  144. package/test/util/OverflowWatcher.spec.ts +152 -0
@@ -40,7 +40,7 @@ Data a ser ajustada.
40
40
 
41
41
  #### Source
42
42
 
43
- src/utils/DateUtils.ts:136
43
+ src/utils/DateUtils.ts:139
44
44
 
45
45
  ***
46
46
 
@@ -130,7 +130,7 @@ define se devemos considerar os segundos.
130
130
 
131
131
  #### Source
132
132
 
133
- src/utils/DateUtils.ts:53
133
+ src/utils/DateUtils.ts:56
134
134
 
135
135
  ***
136
136
 
@@ -161,7 +161,7 @@ Informo: 2023-03-09 12:42:40 | Obtenho: 2023-03-09T12:42:47-03:00
161
161
 
162
162
  #### Source
163
163
 
164
- src/utils/DateUtils.ts:186
164
+ src/utils/DateUtils.ts:189
165
165
 
166
166
  ***
167
167
 
@@ -213,7 +213,7 @@ Caso true retorna a data com informações de horário.
213
213
 
214
214
  #### Source
215
215
 
216
- src/utils/DateUtils.ts:107
216
+ src/utils/DateUtils.ts:110
217
217
 
218
218
  ***
219
219
 
@@ -247,7 +247,7 @@ Informo: 2 | Obtenho: "02"
247
247
 
248
248
  #### Source
249
249
 
250
- src/utils/DateUtils.ts:155
250
+ src/utils/DateUtils.ts:158
251
251
 
252
252
  ***
253
253
 
@@ -279,7 +279,7 @@ Quando ativado, retorna o primeiro dia do mês apenas para construir a data.
279
279
 
280
280
  #### Source
281
281
 
282
- src/utils/DateUtils.ts:65
282
+ src/utils/DateUtils.ts:68
283
283
 
284
284
  ***
285
285
 
@@ -303,7 +303,7 @@ Timezone da data.
303
303
 
304
304
  #### Source
305
305
 
306
- src/utils/DateUtils.ts:165
306
+ src/utils/DateUtils.ts:168
307
307
 
308
308
  ***
309
309
 
@@ -331,4 +331,4 @@ Determina se a data retornada deve conter informação de horário ou não. Por
331
331
 
332
332
  #### Source
333
333
 
334
- src/utils/DateUtils.ts:124
334
+ src/utils/DateUtils.ts:127
@@ -279,6 +279,28 @@ src/repository/indexeddb/IDBRepository.ts:319
279
279
 
280
280
  ***
281
281
 
282
+ ### getFromCache()
283
+
284
+ > **getFromCache**(): `undefined` \| `T`[]
285
+
286
+ Retorna todos os registros que estão em cache no momento
287
+
288
+ #### Returns
289
+
290
+ `undefined` \| `T`[]
291
+
292
+ Todos registros que estão em cache no momento
293
+
294
+ #### Implementation of
295
+
296
+ [`IRepository`](../interfaces/IRepository.md).[`getFromCache`](../interfaces/IRepository.md#getfromcache)
297
+
298
+ #### Source
299
+
300
+ src/repository/indexeddb/IDBRepository.ts:324
301
+
302
+ ***
303
+
282
304
  ### getItemPosition()
283
305
 
284
306
  > `private` **getItemPosition**(`db`, `itemTest`): `Promise`\<`number`\>
@@ -0,0 +1,191 @@
1
+ [**@sankhyalabs/core**](../README.md) • **Docs**
2
+
3
+ ***
4
+
5
+ [@sankhyalabs/core](../globals.md) / LockManager
6
+
7
+ # Class: LockManager
8
+
9
+ ## Constructors
10
+
11
+ ### new LockManager()
12
+
13
+ > **new LockManager**(): [`LockManager`](LockManager.md)
14
+
15
+ #### Returns
16
+
17
+ [`LockManager`](LockManager.md)
18
+
19
+ ## Properties
20
+
21
+ ### ATTRIBUTE\_NAME
22
+
23
+ > `static` **ATTRIBUTE\_NAME**: `string` = `"data-locker-manger-context-id"`
24
+
25
+ Nome do atributo que será utilizado para controlar contexto de locks nos elementos da DOM.
26
+
27
+ #### Source
28
+
29
+ src/utils/LockManager.ts:24
30
+
31
+ ***
32
+
33
+ ### \_locks
34
+
35
+ > `static` `private` **\_locks**: `Map`\<`string`, `Lock`[]\>
36
+
37
+ #### Source
38
+
39
+ src/utils/LockManager.ts:19
40
+
41
+ ## Methods
42
+
43
+ ### addLockManagerCtxId()
44
+
45
+ > `static` **addLockManagerCtxId**(`startElement`): `string`
46
+
47
+ Cria um contexto de locker, caso nao exista, para todos elementos pais iniciados com ez- ou snk-.
48
+
49
+ #### Parameters
50
+
51
+ • **startElement**: `HTMLElement`
52
+
53
+ Elemento de de onde o lock deve começar.
54
+
55
+ #### Returns
56
+
57
+ `string`
58
+
59
+ - O id do locker, que pode ser usado para iniciar ou aguardar um lock do contexto.
60
+
61
+ #### Source
62
+
63
+ src/utils/LockManager.ts:83
64
+
65
+ ***
66
+
67
+ ### buildContextID()
68
+
69
+ > `static` `private` **buildContextID**(): `string`
70
+
71
+ #### Returns
72
+
73
+ `string`
74
+
75
+ #### Source
76
+
77
+ src/utils/LockManager.ts:26
78
+
79
+ ***
80
+
81
+ ### buildLockerID()
82
+
83
+ > `static` `private` **buildLockerID**(`ctxId`, `operation`): `undefined` \| `string`
84
+
85
+ #### Parameters
86
+
87
+ • **ctxId**: `string` \| `HTMLElement`
88
+
89
+ • **operation**: [`TASKBAR_CLICK`](../enumerations/LockManagerOperation.md#taskbar_click)
90
+
91
+ #### Returns
92
+
93
+ `undefined` \| `string`
94
+
95
+ #### Source
96
+
97
+ src/utils/LockManager.ts:30
98
+
99
+ ***
100
+
101
+ ### findExistingCtxId()
102
+
103
+ > `static` `private` **findExistingCtxId**(`element`): `null` \| `string`
104
+
105
+ #### Parameters
106
+
107
+ • **element**: `HTMLElement`
108
+
109
+ #### Returns
110
+
111
+ `null` \| `string`
112
+
113
+ #### Source
114
+
115
+ src/utils/LockManager.ts:43
116
+
117
+ ***
118
+
119
+ ### lock()
120
+
121
+ > `static` **lock**(`id`, `operation`): `any`
122
+
123
+ Inicia um locker baseado em um contexto e uma operação.
124
+
125
+ #### Parameters
126
+
127
+ • **id**: `string` \| `HTMLElement`
128
+
129
+ Pode ser um ID do contexto de locker, ou, o elemento contendo um contexto de locker.
130
+
131
+ • **operation**: [`TASKBAR_CLICK`](../enumerations/LockManagerOperation.md#taskbar_click)
132
+
133
+ Operação do contexto que o lock deve ser feito.
134
+
135
+ #### Returns
136
+
137
+ `any`
138
+
139
+ - Uma função que fara a liberação do lock.
140
+
141
+ #### Source
142
+
143
+ src/utils/LockManager.ts:114
144
+
145
+ ***
146
+
147
+ ### traverseAndAddAttr()
148
+
149
+ > `static` `private` **traverseAndAddAttr**(`element`, `ctxId`): `void`
150
+
151
+ #### Parameters
152
+
153
+ • **element**: `HTMLElement`
154
+
155
+ • **ctxId**: `string`
156
+
157
+ #### Returns
158
+
159
+ `void`
160
+
161
+ #### Source
162
+
163
+ src/utils/LockManager.ts:65
164
+
165
+ ***
166
+
167
+ ### whenResolve()
168
+
169
+ > `static` **whenResolve**(`id`, `operation`): `Promise`\<`void`\>
170
+
171
+ Aguarda todos os lockers de um contexto e operação serem resolvidos.
172
+
173
+ #### Parameters
174
+
175
+ • **id**: `string` \| `HTMLElement`
176
+
177
+ Pode ser um ID do contexto de locker, ou, o elemento contendo um contexto de locker.
178
+
179
+ • **operation**: [`TASKBAR_CLICK`](../enumerations/LockManagerOperation.md#taskbar_click)
180
+
181
+ Operação do contexto que devera aguardar.
182
+
183
+ #### Returns
184
+
185
+ `Promise`\<`void`\>
186
+
187
+ - Promise que será resolvida quando todos lockers forem finalizados.
188
+
189
+ #### Source
190
+
191
+ src/utils/LockManager.ts:142
@@ -66,7 +66,7 @@ resultaria na string '123-____'.
66
66
 
67
67
  #### Source
68
68
 
69
- src/utils/MaskFormatter.ts:91
69
+ src/utils/MaskFormatter.ts:92
70
70
 
71
71
  ## Properties
72
72
 
@@ -76,7 +76,7 @@ src/utils/MaskFormatter.ts:91
76
76
 
77
77
  #### Source
78
78
 
79
- src/utils/MaskFormatter.ts:65
79
+ src/utils/MaskFormatter.ts:66
80
80
 
81
81
  ***
82
82
 
@@ -86,7 +86,7 @@ src/utils/MaskFormatter.ts:65
86
86
 
87
87
  #### Source
88
88
 
89
- src/utils/MaskFormatter.ts:66
89
+ src/utils/MaskFormatter.ts:67
90
90
 
91
91
  ***
92
92
 
@@ -99,7 +99,7 @@ ou seja, aqueles que o usuário ainda não informou. Por padrão usamos um espa
99
99
 
100
100
  #### Source
101
101
 
102
- src/utils/MaskFormatter.ts:72
102
+ src/utils/MaskFormatter.ts:73
103
103
 
104
104
  ***
105
105
 
@@ -129,7 +129,7 @@ src/utils/MaskFormatter.ts:55
129
129
 
130
130
  #### Source
131
131
 
132
- src/utils/MaskFormatter.ts:375
132
+ src/utils/MaskFormatter.ts:466
133
133
 
134
134
  ***
135
135
 
@@ -149,7 +149,7 @@ src/utils/MaskFormatter.ts:54
149
149
 
150
150
  #### Source
151
151
 
152
- src/utils/MaskFormatter.ts:389
152
+ src/utils/MaskFormatter.ts:480
153
153
 
154
154
  ***
155
155
 
@@ -179,7 +179,7 @@ src/utils/MaskFormatter.ts:49
179
179
 
180
180
  #### Source
181
181
 
182
- src/utils/MaskFormatter.ts:300
182
+ src/utils/MaskFormatter.ts:391
183
183
 
184
184
  ***
185
185
 
@@ -209,7 +209,7 @@ src/utils/MaskFormatter.ts:52
209
209
 
210
210
  #### Source
211
211
 
212
- src/utils/MaskFormatter.ts:281
212
+ src/utils/MaskFormatter.ts:372
213
213
 
214
214
  ***
215
215
 
@@ -219,7 +219,7 @@ src/utils/MaskFormatter.ts:281
219
219
 
220
220
  #### Source
221
221
 
222
- src/utils/MaskFormatter.ts:352
222
+ src/utils/MaskFormatter.ts:443
223
223
 
224
224
  ***
225
225
 
@@ -239,7 +239,7 @@ src/utils/MaskFormatter.ts:51
239
239
 
240
240
  #### Source
241
241
 
242
- src/utils/MaskFormatter.ts:329
242
+ src/utils/MaskFormatter.ts:420
243
243
 
244
244
  ## Accessors
245
245
 
@@ -265,13 +265,37 @@ A última máscara informada.
265
265
 
266
266
  #### Source
267
267
 
268
- src/utils/MaskFormatter.ts:87
268
+ src/utils/MaskFormatter.ts:88
269
269
 
270
270
  ## Methods
271
271
 
272
+ ### applyMask()
273
+
274
+ > **applyMask**(`value`): `string`
275
+
276
+ Aplica a máscara quando o input é alterado
277
+
278
+ #### Parameters
279
+
280
+ • **value**: `string`
281
+
282
+ Valor a ser aplicado com a máscara.
283
+
284
+ #### Returns
285
+
286
+ `string`
287
+
288
+ O valor processado de acordo com o padrão.
289
+
290
+ #### Source
291
+
292
+ src/utils/MaskFormatter.ts:103
293
+
294
+ ***
295
+
272
296
  ### format()
273
297
 
274
- > **format**(`value`): `string`
298
+ > **format**(`value`, `trimBefore`): `string`
275
299
 
276
300
  Formata a string passada baseada na máscara definda pelo atributo mask.
277
301
 
@@ -281,6 +305,34 @@ Formata a string passada baseada na máscara definda pelo atributo mask.
281
305
 
282
306
  Valor a ser formatado.
283
307
 
308
+ • **trimBefore**: `boolean`= `false`
309
+
310
+ Executa um trim para remover espaços em branco.
311
+
312
+ #### Returns
313
+
314
+ `string`
315
+
316
+ O valor processado de acordo com o padrão.
317
+
318
+ #### Source
319
+
320
+ src/utils/MaskFormatter.ts:189
321
+
322
+ ***
323
+
324
+ ### removeMask()
325
+
326
+ > **removeMask**(`value`): `string`
327
+
328
+ Remove a máscara formatando a string retornando sem máscara
329
+
330
+ #### Parameters
331
+
332
+ • **value**: `string`
333
+
334
+ Valor a ser formatado com máscara.
335
+
284
336
  #### Returns
285
337
 
286
338
  `string`
@@ -289,7 +341,7 @@ O valor processado de acordo com o padrão.
289
341
 
290
342
  #### Source
291
343
 
292
- src/utils/MaskFormatter.ts:101
344
+ src/utils/MaskFormatter.ts:169
293
345
 
294
346
  ***
295
347
 
@@ -305,4 +357,4 @@ Prepara a formatação internamente de acordo com o padrão.
305
357
 
306
358
  #### Source
307
359
 
308
- src/utils/MaskFormatter.ts:118
360
+ src/utils/MaskFormatter.ts:209
@@ -76,6 +76,147 @@ src/utils/ObjectUtils.ts:84
76
76
 
77
77
  ***
78
78
 
79
+ ### getComparableProp()
80
+
81
+ > `static` `private` **getComparableProp**(`value`, `propToCompare`): `boolean`
82
+
83
+ #### Parameters
84
+
85
+ • **value**: `any`
86
+
87
+ • **propToCompare**: `string`= `"value"`
88
+
89
+ #### Returns
90
+
91
+ `boolean`
92
+
93
+ #### Source
94
+
95
+ src/utils/ObjectUtils.ts:106
96
+
97
+ ***
98
+
99
+ ### getProp()
100
+
101
+ > `static` **getProp**(`obj`, `keyPath`): `undefined` \| `Record`\<`string`, `any`\>
102
+
103
+ Busca a propriedade de um objeto baseado em seu caminho.
104
+
105
+ #### Parameters
106
+
107
+ • **obj**: `Record`\<`string`, `any`\>
108
+
109
+ Objeto a ser verificado.
110
+
111
+ • **keyPath**: `string`
112
+
113
+ Caminho da propriedade a ser buscada.
114
+
115
+ #### Returns
116
+
117
+ `undefined` \| `Record`\<`string`, `any`\>
118
+
119
+ - O valor da propriedade caso ela exista.
120
+
121
+ #### Source
122
+
123
+ src/utils/ObjectUtils.ts:140
124
+
125
+ ***
126
+
127
+ ### hasEquivalentProps()
128
+
129
+ > `static` **hasEquivalentProps**(`obj1`, `obj2`, `propToCompare`): `boolean`
130
+
131
+ Compara se o valor de dois items são equivalentes.
132
+ Comparando tanto o valor do item em si, quanto sua propriedade "value"
133
+
134
+ #### Parameters
135
+
136
+ • **obj1**: `any`
137
+
138
+ Objeto a ser comparado.
139
+
140
+ • **obj2**: `any`
141
+
142
+ Objeto a ser comparado.
143
+
144
+ • **propToCompare**: `string`= `"value"`
145
+
146
+ propriedade que deve ser comparada.
147
+
148
+ #### Returns
149
+
150
+ `boolean`
151
+
152
+ - Se o objeto 1 é equivalente ao objeto 2.
153
+
154
+ *
155
+
156
+ #### Examples
157
+
158
+ ```ts
159
+ hasEquivalentProps('123', {value: '123', label: teste}, 'value') | Retorna: true
160
+ ```
161
+
162
+ ```ts
163
+ hasEquivalentProps('xpto', {value: '123', label: teste}, 'propName') | Retorna: false
164
+ ```
165
+
166
+ #### Source
167
+
168
+ src/utils/ObjectUtils.ts:102
169
+
170
+ ***
171
+
172
+ ### isEmpty()
173
+
174
+ > `static` **isEmpty**(`obj`): `boolean`
175
+
176
+ Verifica se o objeto está vazio (sem atributos).
177
+
178
+ #### Parameters
179
+
180
+ • **obj**: `object`
181
+
182
+ Objeto a ser verificado.
183
+
184
+ #### Returns
185
+
186
+ `boolean`
187
+
188
+ - True caso o objeto esteja vazio.
189
+
190
+ #### Source
191
+
192
+ src/utils/ObjectUtils.ts:119
193
+
194
+ ***
195
+
196
+ ### isNotEmpty()
197
+
198
+ > `static` **isNotEmpty**(`obj`): `boolean`
199
+
200
+ Verifica se o objeto NÃO está vazio (sem atributos).
201
+
202
+ #### Parameters
203
+
204
+ • **obj**: `object`
205
+
206
+ Objeto a ser verificado.
207
+
208
+ #### Returns
209
+
210
+ `boolean`
211
+
212
+ - True caso o objeto NÃO esteja vazio
213
+
214
+ #### Source
215
+
216
+ src/utils/ObjectUtils.ts:129
217
+
218
+ ***
219
+
79
220
  ### objectToString()
80
221
 
81
222
  > `static` **objectToString**(`data`): `string`