@sankhyalabs/core-docs 5.20.0-dev.7 → 5.20.0-dev.70

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 (43) hide show
  1. package/classes/Change.md +11 -11
  2. package/classes/ColumnFilterManager.md +145 -0
  3. package/classes/DataUnit.md +405 -137
  4. package/classes/DataUnitInMemoryLoader.md +303 -0
  5. package/classes/DataUnitLoaderUtils.md +151 -0
  6. package/classes/DateUtils.md +8 -8
  7. package/classes/FieldComparator.md +2 -2
  8. package/classes/IDBRepository.md +22 -0
  9. package/classes/LockManager.md +249 -0
  10. package/classes/MaskFormatter.md +66 -14
  11. package/classes/ObjectUtils.md +141 -0
  12. package/classes/OverflowWatcher.md +533 -0
  13. package/classes/SelectionInfo.md +25 -11
  14. package/classes/ServiceCanceledException.md +193 -0
  15. package/classes/ServiceUtils.md +67 -0
  16. package/classes/SilentException.md +193 -0
  17. package/classes/UserAgentUtils.md +15 -1
  18. package/enumerations/Action.md +41 -21
  19. package/enumerations/ChangeOperation.md +4 -4
  20. package/enumerations/LockManagerOperation.md +33 -0
  21. package/enumerations/OverflowDirection.md +29 -0
  22. package/enumerations/RECORD_DATE_FORMAT.md +27 -0
  23. package/enumerations/SelectionMode.md +2 -2
  24. package/enumerations/StorageType.md +37 -0
  25. package/globals.md +24 -0
  26. package/interfaces/DUActionInterceptor.md +1 -1
  27. package/interfaces/DataUnitInMemoryLoaderConfig.md +37 -0
  28. package/interfaces/IRepository.md +18 -0
  29. package/interfaces/LoadDataRequest.md +1 -1
  30. package/interfaces/OverFlowWatcherParams.md +67 -0
  31. package/interfaces/PageRequest.md +3 -3
  32. package/interfaces/PaginationInfo.md +25 -0
  33. package/interfaces/PaginationInfoBuilderParams.md +37 -0
  34. package/interfaces/QuickFilter.md +3 -3
  35. package/interfaces/Record.md +4 -4
  36. package/interfaces/SavedRecord.md +5 -5
  37. package/interfaces/WaitingChange.md +3 -3
  38. package/namespaces/MaskFormatter/type-aliases/MaskCharacter.md +1 -1
  39. package/namespaces/MaskFormatter/variables/MaskCharacter.md +1 -1
  40. package/package.json +1 -1
  41. package/type-aliases/DataUnitEventOptions.md +17 -0
  42. package/type-aliases/OnOverflowCallBack.md +25 -0
  43. package/variables/OVERFLOWED_CLASS_NAME.md +13 -0
@@ -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:142
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:116
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:196
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:169
@@ -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`