@sankhyalabs/core-docs 0.0.0-feat-dev-kb-15253.0 → 0.0.0-feat-dev-KB-14960.1

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.
@@ -52,7 +52,7 @@ Realiza correção do horário de verão.
52
52
 
53
53
  #### Defined in
54
54
 
55
- src/utils/DateUtils.ts:135
55
+ src/utils/DateUtils.ts:133
56
56
 
57
57
  ___
58
58
 
@@ -83,7 +83,7 @@ Informo: 2023-03-09 12:42:40 | Obtenho: 2023-03-09 00:00:00
83
83
 
84
84
  #### Defined in
85
85
 
86
- src/utils/DateUtils.ts:17
86
+ src/utils/DateUtils.ts:15
87
87
 
88
88
  ___
89
89
 
@@ -108,7 +108,7 @@ Converte data para uma string no formato pt-BR.
108
108
 
109
109
  #### Defined in
110
110
 
111
- src/utils/DateUtils.ts:29
111
+ src/utils/DateUtils.ts:27
112
112
 
113
113
  ___
114
114
 
@@ -133,7 +133,7 @@ Converte a data e hora para uma string no formato pt-BR.
133
133
 
134
134
  #### Defined in
135
135
 
136
- src/utils/DateUtils.ts:52
136
+ src/utils/DateUtils.ts:50
137
137
 
138
138
  ___
139
139
 
@@ -164,7 +164,7 @@ Informo: 2023-03-09 12:42:40 | Obtenho: 2023-03-09T12:42:47-03:00
164
164
 
165
165
  #### Defined in
166
166
 
167
- src/utils/DateUtils.ts:185
167
+ src/utils/DateUtils.ts:183
168
168
 
169
169
  ___
170
170
 
@@ -189,7 +189,7 @@ Converte as horas de uma data para uma string pt-BR.
189
189
 
190
190
  #### Defined in
191
191
 
192
- src/utils/DateUtils.ts:40
192
+ src/utils/DateUtils.ts:38
193
193
 
194
194
  ___
195
195
 
@@ -213,7 +213,7 @@ Obtém a data atual.
213
213
 
214
214
  #### Defined in
215
215
 
216
- src/utils/DateUtils.ts:106
216
+ src/utils/DateUtils.ts:104
217
217
 
218
218
  ___
219
219
 
@@ -249,7 +249,7 @@ Informo: 2 | Obtenho: "02"
249
249
 
250
250
  #### Defined in
251
251
 
252
- src/utils/DateUtils.ts:154
252
+ src/utils/DateUtils.ts:152
253
253
 
254
254
  ___
255
255
 
@@ -275,7 +275,7 @@ Converte String para Date.
275
275
 
276
276
  #### Defined in
277
277
 
278
- src/utils/DateUtils.ts:64
278
+ src/utils/DateUtils.ts:62
279
279
 
280
280
  ___
281
281
 
@@ -299,7 +299,7 @@ Timezone da data.
299
299
 
300
300
  #### Defined in
301
301
 
302
- src/utils/DateUtils.ts:164
302
+ src/utils/DateUtils.ts:162
303
303
 
304
304
  ___
305
305
 
@@ -324,4 +324,4 @@ Retorna se a data é válida.
324
324
 
325
325
  #### Defined in
326
326
 
327
- src/utils/DateUtils.ts:123
327
+ src/utils/DateUtils.ts:121
@@ -12,6 +12,7 @@
12
12
 
13
13
  - [compare](FieldComparator.md#compare)
14
14
  - [compareUndefined](FieldComparator.md#compareundefined)
15
+ - [compareValues](FieldComparator.md#comparevalues)
15
16
 
16
17
  ## Constructors
17
18
 
@@ -61,4 +62,26 @@ ___
61
62
 
62
63
  #### Defined in
63
64
 
65
+ src/dataunit/sorting/FieldComparator.ts:25
66
+
67
+ ___
68
+
69
+ ### compareValues
70
+
71
+ ▸ `Static` **compareValues**(`descriptor`, `valueA`, `valueB`): `number`
72
+
73
+ #### Parameters
74
+
75
+ | Name | Type |
76
+ | :------ | :------ |
77
+ | `descriptor` | [`FieldDescriptor`](../interfaces/FieldDescriptor.md) |
78
+ | `valueA` | `any` |
79
+ | `valueB` | `any` |
80
+
81
+ #### Returns
82
+
83
+ `number`
84
+
85
+ #### Defined in
86
+
64
87
  src/dataunit/sorting/FieldComparator.ts:21
@@ -15,6 +15,10 @@ além de permitir filtros e ordenações compostas
15
15
  | :------ |
16
16
  | `T` |
17
17
 
18
+ ## Implements
19
+
20
+ - [`IRepository`](../interfaces/IRepository.md)<`T`\>
21
+
18
22
  ## Table of contents
19
23
 
20
24
  ### Constructors
@@ -28,17 +32,23 @@ além de permitir filtros e ordenações compostas
28
32
  - [\_dbName](IDBRepository.md#_dbname)
29
33
  - [\_dbVersion](IDBRepository.md#_dbversion)
30
34
  - [\_indexKeyPath](IDBRepository.md#_indexkeypath)
35
+ - [\_indexes](IDBRepository.md#_indexes)
36
+ - [\_operating](IDBRepository.md#_operating)
31
37
  - [\_storeName](IDBRepository.md#_storename)
32
38
 
33
39
  ### Methods
34
40
 
35
41
  - [clear](IDBRepository.md#clear)
42
+ - [count](IDBRepository.md#count)
43
+ - [createStore](IDBRepository.md#createstore)
36
44
  - [delete](IDBRepository.md#delete)
45
+ - [distict](IDBRepository.md#distict)
37
46
  - [getAddedItems](IDBRepository.md#getaddeditems)
38
47
  - [getItemPosition](IDBRepository.md#getitemposition)
39
48
  - [getItemPositionByAdded](IDBRepository.md#getitempositionbyadded)
40
49
  - [insert](IDBRepository.md#insert)
41
50
  - [isEmpty](IDBRepository.md#isempty)
51
+ - [isOperating](IDBRepository.md#isoperating)
42
52
  - [load](IDBRepository.md#load)
43
53
  - [openDB](IDBRepository.md#opendb)
44
54
  - [push](IDBRepository.md#push)
@@ -48,7 +58,7 @@ além de permitir filtros e ordenações compostas
48
58
 
49
59
  ### constructor
50
60
 
51
- • **new IDBRepository**<`T`\>(`dbName`, `dbVersion`, `storeName`, `indexKeyPath`)
61
+ • **new IDBRepository**<`T`\>(`dbName`, `dbVersion`, `storeName`, `indexKeyPath`, `indexes?`)
52
62
 
53
63
  Construtor padrão
54
64
 
@@ -66,10 +76,11 @@ Construtor padrão
66
76
  | `dbVersion` | `number` | Versão do DB |
67
77
  | `storeName` | `string` | Nome da store |
68
78
  | `indexKeyPath` | `string` | Um atributo que identifique os objetos guardados |
79
+ | `indexes?` | [`IRepositoryIndex`](../interfaces/IRepositoryIndex.md)[] | - |
69
80
 
70
81
  #### Defined in
71
82
 
72
- src/indexeddb/IDBRepository.ts:31
83
+ src/repository/indexeddb/IDBRepository.ts:35
73
84
 
74
85
  ## Properties
75
86
 
@@ -79,7 +90,7 @@ src/indexeddb/IDBRepository.ts:31
79
90
 
80
91
  #### Defined in
81
92
 
82
- src/indexeddb/IDBRepository.ts:19
93
+ src/repository/indexeddb/IDBRepository.ts:21
83
94
 
84
95
  ___
85
96
 
@@ -89,7 +100,7 @@ ___
89
100
 
90
101
  #### Defined in
91
102
 
92
- src/indexeddb/IDBRepository.ts:21
103
+ src/repository/indexeddb/IDBRepository.ts:24
93
104
 
94
105
  ___
95
106
 
@@ -99,7 +110,7 @@ ___
99
110
 
100
111
  #### Defined in
101
112
 
102
- src/indexeddb/IDBRepository.ts:16
113
+ src/repository/indexeddb/IDBRepository.ts:18
103
114
 
104
115
  ___
105
116
 
@@ -109,7 +120,7 @@ ___
109
120
 
110
121
  #### Defined in
111
122
 
112
- src/indexeddb/IDBRepository.ts:17
123
+ src/repository/indexeddb/IDBRepository.ts:19
113
124
 
114
125
  ___
115
126
 
@@ -119,7 +130,27 @@ ___
119
130
 
120
131
  #### Defined in
121
132
 
122
- src/indexeddb/IDBRepository.ts:20
133
+ src/repository/indexeddb/IDBRepository.ts:22
134
+
135
+ ___
136
+
137
+ ### \_indexes
138
+
139
+ • `Private` `Optional` **\_indexes**: [`IRepositoryIndex`](../interfaces/IRepositoryIndex.md)[]
140
+
141
+ #### Defined in
142
+
143
+ src/repository/indexeddb/IDBRepository.ts:23
144
+
145
+ ___
146
+
147
+ ### \_operating
148
+
149
+ • `Private` **\_operating**: `boolean` = `true`
150
+
151
+ #### Defined in
152
+
153
+ src/repository/indexeddb/IDBRepository.ts:25
123
154
 
124
155
  ___
125
156
 
@@ -129,7 +160,7 @@ ___
129
160
 
130
161
  #### Defined in
131
162
 
132
- src/indexeddb/IDBRepository.ts:18
163
+ src/repository/indexeddb/IDBRepository.ts:20
133
164
 
134
165
  ## Methods
135
166
 
@@ -145,9 +176,57 @@ Limpa todo o repositório
145
176
 
146
177
  Promessa de execução
147
178
 
179
+ #### Implementation of
180
+
181
+ [IRepository](../interfaces/IRepository.md).[clear](../interfaces/IRepository.md#clear)
182
+
183
+ #### Defined in
184
+
185
+ src/repository/indexeddb/IDBRepository.ts:123
186
+
187
+ ___
188
+
189
+ ### count
190
+
191
+ ▸ **count**(): `Promise`<`number`\>
192
+
193
+ Conta os itens do repositório
194
+
195
+ #### Returns
196
+
197
+ `Promise`<`number`\>
198
+
199
+ Promessa de quantidade
200
+
201
+ #### Implementation of
202
+
203
+ [IRepository](../interfaces/IRepository.md).[count](../interfaces/IRepository.md#count)
204
+
148
205
  #### Defined in
149
206
 
150
- src/indexeddb/IDBRepository.ts:113
207
+ src/repository/indexeddb/IDBRepository.ts:236
208
+
209
+ ___
210
+
211
+ ### createStore
212
+
213
+ ▸ `Private` **createStore**(`db`, `name`, `indexPrefix?`): `void`
214
+
215
+ #### Parameters
216
+
217
+ | Name | Type | Default value |
218
+ | :------ | :------ | :------ |
219
+ | `db` | `IDBPDatabase`<`unknown`\> | `undefined` |
220
+ | `name` | `string` | `undefined` |
221
+ | `indexPrefix` | `string` | `""` |
222
+
223
+ #### Returns
224
+
225
+ `void`
226
+
227
+ #### Defined in
228
+
229
+ src/repository/indexeddb/IDBRepository.ts:271
151
230
 
152
231
  ___
153
232
 
@@ -169,15 +248,47 @@ Remove itens do repositório
169
248
 
170
249
  Promessa de execução
171
250
 
251
+ #### Implementation of
252
+
253
+ [IRepository](../interfaces/IRepository.md).[delete](../interfaces/IRepository.md#delete)
254
+
172
255
  #### Defined in
173
256
 
174
- src/indexeddb/IDBRepository.ts:134
257
+ src/repository/indexeddb/IDBRepository.ts:138
258
+
259
+ ___
260
+
261
+ ### distict
262
+
263
+ ▸ **distict**(`itemProcessor`): `Promise`<`Map`<`string`, `any`\>\>
264
+
265
+ Itera todos os items colecionando os valores distintos.
266
+
267
+ #### Parameters
268
+
269
+ | Name | Type | Description |
270
+ | :------ | :------ | :------ |
271
+ | `itemProcessor` | (`item`: `T`) => { `key`: `string` ; `value`: `any` } | Uma função que processa um item e gera a chave e valor |
272
+
273
+ #### Returns
274
+
275
+ `Promise`<`Map`<`string`, `any`\>\>
276
+
277
+ Promessa de array com os valores distintos.
278
+
279
+ #### Implementation of
280
+
281
+ [IRepository](../interfaces/IRepository.md).[distict](../interfaces/IRepository.md#distict)
282
+
283
+ #### Defined in
284
+
285
+ src/repository/indexeddb/IDBRepository.ts:78
175
286
 
176
287
  ___
177
288
 
178
289
  ### getAddedItems
179
290
 
180
- ▸ `Private` **getAddedItems**(`db`): `Promise`<`AddedItem`<`T`\>[]\>
291
+ ▸ `Private` **getAddedItems**(`db`): `Promise`<`IAddedItem`<`T`\>[]\>
181
292
 
182
293
  #### Parameters
183
294
 
@@ -187,11 +298,11 @@ ___
187
298
 
188
299
  #### Returns
189
300
 
190
- `Promise`<`AddedItem`<`T`\>[]\>
301
+ `Promise`<`IAddedItem`<`T`\>[]\>
191
302
 
192
303
  #### Defined in
193
304
 
194
- src/indexeddb/IDBRepository.ts:303
305
+ src/repository/indexeddb/IDBRepository.ts:319
195
306
 
196
307
  ___
197
308
 
@@ -212,7 +323,7 @@ ___
212
323
 
213
324
  #### Defined in
214
325
 
215
- src/indexeddb/IDBRepository.ts:268
326
+ src/repository/indexeddb/IDBRepository.ts:284
216
327
 
217
328
  ___
218
329
 
@@ -233,7 +344,7 @@ ___
233
344
 
234
345
  #### Defined in
235
346
 
236
- src/indexeddb/IDBRepository.ts:291
347
+ src/repository/indexeddb/IDBRepository.ts:307
237
348
 
238
349
  ___
239
350
 
@@ -256,9 +367,13 @@ Insere itens em uma posição de referência
256
367
 
257
368
  Promessa de execução
258
369
 
370
+ #### Implementation of
371
+
372
+ [IRepository](../interfaces/IRepository.md).[insert](../interfaces/IRepository.md#insert)
373
+
259
374
  #### Defined in
260
375
 
261
- src/indexeddb/IDBRepository.ts:203
376
+ src/repository/indexeddb/IDBRepository.ts:194
262
377
 
263
378
  ___
264
379
 
@@ -272,9 +387,34 @@ Determina se o repositório está vazio ou ainda não foi criado.
272
387
 
273
388
  `Promise`<`boolean`\>
274
389
 
390
+ #### Implementation of
391
+
392
+ [IRepository](../interfaces/IRepository.md).[isEmpty](../interfaces/IRepository.md#isempty)
393
+
394
+ #### Defined in
395
+
396
+ src/repository/indexeddb/IDBRepository.ts:218
397
+
398
+ ___
399
+
400
+ ### isOperating
401
+
402
+ ▸ **isOperating**(): `boolean`
403
+
404
+ Determina se o repositório está em condições normais de funcionamento.
405
+ Caso o banco tenha sido excluido, retorna false.
406
+
407
+ #### Returns
408
+
409
+ `boolean`
410
+
411
+ #### Implementation of
412
+
413
+ [IRepository](../interfaces/IRepository.md).[isOperating](../interfaces/IRepository.md#isoperating)
414
+
275
415
  #### Defined in
276
416
 
277
- src/indexeddb/IDBRepository.ts:226
417
+ src/repository/indexeddb/IDBRepository.ts:214
278
418
 
279
419
  ___
280
420
 
@@ -299,9 +439,13 @@ Recupera registros do repositório
299
439
 
300
440
  Promessa de um array que satisfaça aos critérios informados
301
441
 
442
+ #### Implementation of
443
+
444
+ [IRepository](../interfaces/IRepository.md).[load](../interfaces/IRepository.md#load)
445
+
302
446
  #### Defined in
303
447
 
304
- src/indexeddb/IDBRepository.ts:48
448
+ src/repository/indexeddb/IDBRepository.ts:44
305
449
 
306
450
  ___
307
451
 
@@ -315,7 +459,7 @@ ___
315
459
 
316
460
  #### Defined in
317
461
 
318
- src/indexeddb/IDBRepository.ts:244
462
+ src/repository/indexeddb/IDBRepository.ts:250
319
463
 
320
464
  ___
321
465
 
@@ -337,9 +481,13 @@ Adiciona registros no final do repositório
337
481
 
338
482
  Promessa de execução
339
483
 
484
+ #### Implementation of
485
+
486
+ [IRepository](../interfaces/IRepository.md).[push](../interfaces/IRepository.md#push)
487
+
340
488
  #### Defined in
341
489
 
342
- src/indexeddb/IDBRepository.ts:88
490
+ src/repository/indexeddb/IDBRepository.ts:103
343
491
 
344
492
  ___
345
493
 
@@ -361,6 +509,10 @@ Altera itens já persistido no repositório
361
509
 
362
510
  Promessa de execução
363
511
 
512
+ #### Implementation of
513
+
514
+ [IRepository](../interfaces/IRepository.md).[update](../interfaces/IRepository.md#update)
515
+
364
516
  #### Defined in
365
517
 
366
- src/indexeddb/IDBRepository.ts:167
518
+ src/repository/indexeddb/IDBRepository.ts:165
@@ -45,7 +45,7 @@
45
45
 
46
46
  #### Defined in
47
47
 
48
- src/dataunit/DataUnit.ts:1822
48
+ src/dataunit/DataUnit.ts:1834
49
49
 
50
50
  ## Properties
51
51
 
@@ -55,7 +55,7 @@ src/dataunit/DataUnit.ts:1822
55
55
 
56
56
  #### Defined in
57
57
 
58
- src/dataunit/DataUnit.ts:1816
58
+ src/dataunit/DataUnit.ts:1828
59
59
 
60
60
  ___
61
61
 
@@ -65,7 +65,7 @@ ___
65
65
 
66
66
  #### Defined in
67
67
 
68
- src/dataunit/DataUnit.ts:1818
68
+ src/dataunit/DataUnit.ts:1830
69
69
 
70
70
  ___
71
71
 
@@ -75,7 +75,7 @@ ___
75
75
 
76
76
  #### Defined in
77
77
 
78
- src/dataunit/DataUnit.ts:1819
78
+ src/dataunit/DataUnit.ts:1831
79
79
 
80
80
  ___
81
81
 
@@ -85,7 +85,7 @@ ___
85
85
 
86
86
  #### Defined in
87
87
 
88
- src/dataunit/DataUnit.ts:1817
88
+ src/dataunit/DataUnit.ts:1829
89
89
 
90
90
  ___
91
91
 
@@ -95,7 +95,7 @@ ___
95
95
 
96
96
  #### Defined in
97
97
 
98
- src/dataunit/DataUnit.ts:1820
98
+ src/dataunit/DataUnit.ts:1832
99
99
 
100
100
  ## Accessors
101
101
 
@@ -109,7 +109,7 @@ src/dataunit/DataUnit.ts:1820
109
109
 
110
110
  #### Defined in
111
111
 
112
- src/dataunit/DataUnit.ts:1847
112
+ src/dataunit/DataUnit.ts:1859
113
113
 
114
114
  ___
115
115
 
@@ -123,7 +123,7 @@ ___
123
123
 
124
124
  #### Defined in
125
125
 
126
- src/dataunit/DataUnit.ts:1837
126
+ src/dataunit/DataUnit.ts:1849
127
127
 
128
128
  ___
129
129
 
@@ -137,7 +137,7 @@ ___
137
137
 
138
138
  #### Defined in
139
139
 
140
- src/dataunit/DataUnit.ts:1830
140
+ src/dataunit/DataUnit.ts:1842
141
141
 
142
142
  ## Methods
143
143
 
@@ -151,7 +151,7 @@ src/dataunit/DataUnit.ts:1830
151
151
 
152
152
  #### Defined in
153
153
 
154
- src/dataunit/DataUnit.ts:1854
154
+ src/dataunit/DataUnit.ts:1866
155
155
 
156
156
  ___
157
157
 
@@ -165,4 +165,4 @@ ___
165
165
 
166
166
  #### Defined in
167
167
 
168
- src/dataunit/DataUnit.ts:1858
168
+ src/dataunit/DataUnit.ts:1870
@@ -35,7 +35,7 @@
35
35
 
36
36
  #### Defined in
37
37
 
38
- src/http/SkwHttpProvider.ts:11
38
+ src/http/SkwHttpProvider.ts:8
39
39
 
40
40
  ___
41
41
 
@@ -45,7 +45,7 @@ ___
45
45
 
46
46
  #### Defined in
47
47
 
48
- src/http/SkwHttpProvider.ts:7
48
+ src/http/SkwHttpProvider.ts:4
49
49
 
50
50
  ___
51
51
 
@@ -55,7 +55,7 @@ ___
55
55
 
56
56
  #### Defined in
57
57
 
58
- src/http/SkwHttpProvider.ts:9
58
+ src/http/SkwHttpProvider.ts:6
59
59
 
60
60
  ___
61
61
 
@@ -65,7 +65,7 @@ ___
65
65
 
66
66
  #### Defined in
67
67
 
68
- src/http/SkwHttpProvider.ts:8
68
+ src/http/SkwHttpProvider.ts:5
69
69
 
70
70
  ___
71
71
 
@@ -75,7 +75,7 @@ ___
75
75
 
76
76
  #### Defined in
77
77
 
78
- src/http/SkwHttpProvider.ts:10
78
+ src/http/SkwHttpProvider.ts:7
79
79
 
80
80
  ___
81
81
 
@@ -85,7 +85,7 @@ ___
85
85
 
86
86
  #### Defined in
87
87
 
88
- src/http/SkwHttpProvider.ts:5
88
+ src/http/SkwHttpProvider.ts:2
89
89
 
90
90
  ## Methods
91
91
 
@@ -106,4 +106,4 @@ src/http/SkwHttpProvider.ts:5
106
106
 
107
107
  #### Defined in
108
108
 
109
- src/http/SkwHttpProvider.ts:13
109
+ src/http/SkwHttpProvider.ts:10
@@ -132,7 +132,7 @@ id único randômico.
132
132
 
133
133
  #### Defined in
134
134
 
135
- src/utils/StringUtils.ts:355
135
+ src/utils/StringUtils.ts:354
136
136
 
137
137
  ___
138
138
 
@@ -322,7 +322,7 @@ simplificação do strNumber, sem os zeros à direita depois do ponto.
322
322
 
323
323
  #### Defined in
324
324
 
325
- src/utils/StringUtils.ts:334
325
+ src/utils/StringUtils.ts:333
326
326
 
327
327
  ___
328
328