@sankhyalabs/core-docs 5.20.0-rc.9 → 6.0.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.
Files changed (42) hide show
  1. package/classes/Base64Utils.md +39 -0
  2. package/classes/Change.md +11 -11
  3. package/classes/ColumnFilterManager.md +145 -0
  4. package/classes/DataUnit.md +397 -137
  5. package/classes/DataUnitInMemoryLoader.md +303 -0
  6. package/classes/DataUnitLoaderUtils.md +151 -0
  7. package/classes/DateUtils.md +8 -8
  8. package/classes/FieldComparator.md +2 -2
  9. package/classes/IDBRepository.md +22 -0
  10. package/classes/LockManager.md +249 -0
  11. package/classes/MaskFormatter.md +66 -14
  12. package/classes/ObjectUtils.md +95 -2
  13. package/classes/OverflowWatcher.md +11 -11
  14. package/classes/SelectionInfo.md +25 -11
  15. package/classes/ServiceCanceledException.md +193 -0
  16. package/classes/ServiceUtils.md +67 -0
  17. package/classes/SilentException.md +193 -0
  18. package/classes/StringUtils.md +24 -0
  19. package/classes/UserAgentUtils.md +15 -1
  20. package/enumerations/Action.md +41 -21
  21. package/enumerations/ChangeOperation.md +4 -4
  22. package/enumerations/LockManagerOperation.md +33 -0
  23. package/enumerations/RECORD_DATE_FORMAT.md +27 -0
  24. package/enumerations/SelectionMode.md +2 -2
  25. package/enumerations/StorageType.md +37 -0
  26. package/globals.md +13 -0
  27. package/interfaces/DUActionInterceptor.md +1 -1
  28. package/interfaces/DataUnitInMemoryLoaderConfig.md +37 -0
  29. package/interfaces/IRepository.md +18 -0
  30. package/interfaces/LoadDataRequest.md +1 -1
  31. package/interfaces/OverFlowWatcherParams.md +6 -6
  32. package/interfaces/PageRequest.md +3 -3
  33. package/interfaces/PaginationInfo.md +25 -0
  34. package/interfaces/PaginationInfoBuilderParams.md +37 -0
  35. package/interfaces/QuickFilter.md +3 -3
  36. package/interfaces/Record.md +4 -4
  37. package/interfaces/SavedRecord.md +5 -5
  38. package/interfaces/WaitingChange.md +3 -3
  39. package/namespaces/MaskFormatter/type-aliases/MaskCharacter.md +1 -1
  40. package/namespaces/MaskFormatter/variables/MaskCharacter.md +1 -1
  41. package/package.json +1 -1
  42. package/type-aliases/DataUnitEventOptions.md +1 -1
@@ -0,0 +1,249 @@
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:28
30
+
31
+ ***
32
+
33
+ ### \_locks
34
+
35
+ > `static` `private` **\_locks**: `Map`\<`string`, `Lock`[]\>
36
+
37
+ #### Source
38
+
39
+ src/utils/LockManager.ts:23
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:87
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:30
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**: [`LockManagerOperation`](../enumerations/LockManagerOperation.md)
90
+
91
+ #### Returns
92
+
93
+ `undefined` \| `string`
94
+
95
+ #### Source
96
+
97
+ src/utils/LockManager.ts:34
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:47
116
+
117
+ ***
118
+
119
+ ### lock()
120
+
121
+ > `static` **lock**(`id`, `operation`): () => `void`
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**: [`LockManagerOperation`](../enumerations/LockManagerOperation.md)
132
+
133
+ Operação do contexto que o lock deve ser feito.
134
+
135
+ #### Returns
136
+
137
+ `Function`
138
+
139
+ - Uma função que fara a liberação do lock.
140
+
141
+ ##### Returns
142
+
143
+ `void`
144
+
145
+ #### Source
146
+
147
+ src/utils/LockManager.ts:137
148
+
149
+ ***
150
+
151
+ ### resetLocks()
152
+
153
+ > `static` **resetLocks**(`id`, `operation`): `Promise`\<`void`\>
154
+
155
+ Reseta todos os locks existentes para um determinado contexto e operação de forma assíncrona
156
+
157
+ #### Parameters
158
+
159
+ • **id**: `string` \| `HTMLElement`
160
+
161
+ ID do contexto ou elemento HTML contendo contexto
162
+
163
+ • **operation**: [`LockManagerOperation`](../enumerations/LockManagerOperation.md)
164
+
165
+ Operação específica para resetar os locks
166
+
167
+ #### Returns
168
+
169
+ `Promise`\<`void`\>
170
+
171
+ Promise que será resolvida quando todos os locks forem resetados
172
+
173
+ #### Source
174
+
175
+ src/utils/LockManager.ts:111
176
+
177
+ ***
178
+
179
+ ### traverseAndAddAttr()
180
+
181
+ > `static` `private` **traverseAndAddAttr**(`element`, `ctxId`): `void`
182
+
183
+ #### Parameters
184
+
185
+ • **element**: `HTMLElement`
186
+
187
+ • **ctxId**: `string`
188
+
189
+ #### Returns
190
+
191
+ `void`
192
+
193
+ #### Source
194
+
195
+ src/utils/LockManager.ts:69
196
+
197
+ ***
198
+
199
+ ### whenHasLock()
200
+
201
+ > `static` **whenHasLock**(`id`, `operation`, `timeOut`?): `Promise`\<`void`\>
202
+
203
+ #### Parameters
204
+
205
+ • **id**: `string` \| `HTMLElement`
206
+
207
+ • **operation**: [`LockManagerOperation`](../enumerations/LockManagerOperation.md)
208
+
209
+ • **timeOut?**: `number`
210
+
211
+ #### Returns
212
+
213
+ `Promise`\<`void`\>
214
+
215
+ #### Source
216
+
217
+ src/utils/LockManager.ts:191
218
+
219
+ ***
220
+
221
+ ### whenResolve()
222
+
223
+ > `static` **whenResolve**(`id`, `operation`, `debounce`?, `timeOut`?): `Promise`\<`void`\>
224
+
225
+ Aguarda todos os lockers de um contexto e operação serem resolvidos.
226
+
227
+ #### Parameters
228
+
229
+ • **id**: `string` \| `HTMLElement`
230
+
231
+ Pode ser um ID do contexto de locker, ou, o elemento contendo um contexto de locker.
232
+
233
+ • **operation**: [`LockManagerOperation`](../enumerations/LockManagerOperation.md)
234
+
235
+ Operação do contexto que devera aguardar.
236
+
237
+ • **debounce?**: `number`
238
+
239
+ • **timeOut?**: `number`
240
+
241
+ #### Returns
242
+
243
+ `Promise`\<`void`\>
244
+
245
+ - Promise que será resolvida quando todos lockers forem finalizados.
246
+
247
+ #### Source
248
+
249
+ src/utils/LockManager.ts:164
@@ -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,99 @@ 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
+
79
172
  ### isEmpty()
80
173
 
81
174
  > `static` **isEmpty**(`obj`): `boolean`
@@ -96,7 +189,7 @@ Objeto a ser verificado.
96
189
 
97
190
  #### Source
98
191
 
99
- src/utils/ObjectUtils.ts:94
192
+ src/utils/ObjectUtils.ts:119
100
193
 
101
194
  ***
102
195
 
@@ -120,7 +213,7 @@ Objeto a ser verificado.
120
213
 
121
214
  #### Source
122
215
 
123
- src/utils/ObjectUtils.ts:104
216
+ src/utils/ObjectUtils.ts:129
124
217
 
125
218
  ***
126
219
 
@@ -170,7 +170,7 @@ src/utils/OverflowWatcher/index.ts:52
170
170
 
171
171
  #### Source
172
172
 
173
- src/utils/OverflowWatcher/index.ts:205
173
+ src/utils/OverflowWatcher/index.ts:206
174
174
 
175
175
  ***
176
176
 
@@ -188,7 +188,7 @@ src/utils/OverflowWatcher/index.ts:205
188
188
 
189
189
  #### Source
190
190
 
191
- src/utils/OverflowWatcher/index.ts:212
191
+ src/utils/OverflowWatcher/index.ts:213
192
192
 
193
193
  ***
194
194
 
@@ -206,7 +206,7 @@ src/utils/OverflowWatcher/index.ts:212
206
206
 
207
207
  #### Source
208
208
 
209
- src/utils/OverflowWatcher/index.ts:177
209
+ src/utils/OverflowWatcher/index.ts:178
210
210
 
211
211
  ***
212
212
 
@@ -224,7 +224,7 @@ src/utils/OverflowWatcher/index.ts:177
224
224
 
225
225
  #### Source
226
226
 
227
- src/utils/OverflowWatcher/index.ts:187
227
+ src/utils/OverflowWatcher/index.ts:188
228
228
 
229
229
  ***
230
230
 
@@ -260,7 +260,7 @@ src/utils/OverflowWatcher/index.ts:96
260
260
 
261
261
  #### Source
262
262
 
263
- src/utils/OverflowWatcher/index.ts:157
263
+ src/utils/OverflowWatcher/index.ts:158
264
264
 
265
265
  ***
266
266
 
@@ -310,7 +310,7 @@ src/utils/OverflowWatcher/index.ts:58
310
310
 
311
311
  #### Source
312
312
 
313
- src/utils/OverflowWatcher/index.ts:166
313
+ src/utils/OverflowWatcher/index.ts:167
314
314
 
315
315
  ***
316
316
 
@@ -342,7 +342,7 @@ src/utils/OverflowWatcher/index.ts:62
342
342
 
343
343
  #### Source
344
344
 
345
- src/utils/OverflowWatcher/index.ts:162
345
+ src/utils/OverflowWatcher/index.ts:163
346
346
 
347
347
  ***
348
348
 
@@ -360,7 +360,7 @@ src/utils/OverflowWatcher/index.ts:162
360
360
 
361
361
  #### Source
362
362
 
363
- src/utils/OverflowWatcher/index.ts:197
363
+ src/utils/OverflowWatcher/index.ts:198
364
364
 
365
365
  ***
366
366
 
@@ -416,7 +416,7 @@ src/utils/OverflowWatcher/index.ts:100
416
416
 
417
417
  #### Source
418
418
 
419
- src/utils/OverflowWatcher/index.ts:153
419
+ src/utils/OverflowWatcher/index.ts:154
420
420
 
421
421
  ***
422
422
 
@@ -434,7 +434,7 @@ src/utils/OverflowWatcher/index.ts:153
434
434
 
435
435
  #### Source
436
436
 
437
- src/utils/OverflowWatcher/index.ts:226
437
+ src/utils/OverflowWatcher/index.ts:227
438
438
 
439
439
  ***
440
440
 
@@ -492,7 +492,7 @@ src/utils/OverflowWatcher/index.ts:131
492
492
 
493
493
  #### Source
494
494
 
495
- src/utils/OverflowWatcher/index.ts:192
495
+ src/utils/OverflowWatcher/index.ts:193
496
496
 
497
497
  ***
498
498