@sankhyalabs/core-docs 5.10.0 → 5.11.0-dev.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.
@@ -0,0 +1,245 @@
1
+ [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / IRepository
2
+
3
+ # Interface: IRepository<T\>
4
+
5
+ ## Type parameters
6
+
7
+ | Name |
8
+ | :------ |
9
+ | `T` |
10
+
11
+ ## Implemented by
12
+
13
+ - [`IDBRepository`](../classes/IDBRepository.md)
14
+
15
+ ## Table of contents
16
+
17
+ ### Methods
18
+
19
+ - [clear](IRepository.md#clear)
20
+ - [count](IRepository.md#count)
21
+ - [delete](IRepository.md#delete)
22
+ - [distict](IRepository.md#distict)
23
+ - [insert](IRepository.md#insert)
24
+ - [isEmpty](IRepository.md#isempty)
25
+ - [isOperating](IRepository.md#isoperating)
26
+ - [load](IRepository.md#load)
27
+ - [push](IRepository.md#push)
28
+ - [update](IRepository.md#update)
29
+
30
+ ## Methods
31
+
32
+ ### clear
33
+
34
+ ▸ **clear**(): `Promise`<`void`\>
35
+
36
+ Limpa todo o repositório
37
+
38
+ #### Returns
39
+
40
+ `Promise`<`void`\>
41
+
42
+ Promessa de execução
43
+
44
+ #### Defined in
45
+
46
+ src/repository/IRepository.ts:38
47
+
48
+ ___
49
+
50
+ ### count
51
+
52
+ ▸ **count**(): `Promise`<`number`\>
53
+
54
+ Conta os itens do repositório
55
+
56
+ #### Returns
57
+
58
+ `Promise`<`number`\>
59
+
60
+ Promessa de quantidade
61
+
62
+ #### Defined in
63
+
64
+ src/repository/IRepository.ts:81
65
+
66
+ ___
67
+
68
+ ### delete
69
+
70
+ ▸ **delete**(`items`): `Promise`<`void`\>
71
+
72
+ Remove itens do repositório
73
+
74
+ #### Parameters
75
+
76
+ | Name | Type | Description |
77
+ | :------ | :------ | :------ |
78
+ | `items` | `T`[] | Os itens a serem removidos |
79
+
80
+ #### Returns
81
+
82
+ `Promise`<`void`\>
83
+
84
+ Promessa de execução
85
+
86
+ #### Defined in
87
+
88
+ src/repository/IRepository.ts:46
89
+
90
+ ___
91
+
92
+ ### distict
93
+
94
+ ▸ **distict**(`itemProcessor`): `Promise`<`Map`<`string`, `any`\>\>
95
+
96
+ Itera todos os items colecionando os valores distintos.
97
+
98
+ #### Parameters
99
+
100
+ | Name | Type | Description |
101
+ | :------ | :------ | :------ |
102
+ | `itemProcessor` | (`item`: `T`) => { `key`: `string` ; `value`: `any` } | Uma função que processa um item e gera a chave e valor |
103
+
104
+ #### Returns
105
+
106
+ `Promise`<`Map`<`string`, `any`\>\>
107
+
108
+ Promessa de array com os valores distintos.
109
+
110
+ #### Defined in
111
+
112
+ src/repository/IRepository.ts:23
113
+
114
+ ___
115
+
116
+ ### insert
117
+
118
+ ▸ **insert**(`itemReference`, `items`): `Promise`<`void`\>
119
+
120
+ Insere itens em uma posição de referência
121
+
122
+ #### Parameters
123
+
124
+ | Name | Type | Description |
125
+ | :------ | :------ | :------ |
126
+ | `itemReference` | `T` | O item posterior aos inseridos |
127
+ | `items` | `T`[] | Os itens a serem inseridos |
128
+
129
+ #### Returns
130
+
131
+ `Promise`<`void`\>
132
+
133
+ Promessa de execução
134
+
135
+ #### Defined in
136
+
137
+ src/repository/IRepository.ts:63
138
+
139
+ ___
140
+
141
+ ### isEmpty
142
+
143
+ ▸ **isEmpty**(): `Promise`<`boolean`\>
144
+
145
+ Determina se o repositório está vazio ou ainda não foi criado.
146
+
147
+ #### Returns
148
+
149
+ `Promise`<`boolean`\>
150
+
151
+ #### Defined in
152
+
153
+ src/repository/IRepository.ts:74
154
+
155
+ ___
156
+
157
+ ### isOperating
158
+
159
+ ▸ **isOperating**(): `boolean`
160
+
161
+ Determina se o repositório está em condições normais de funcionamento.
162
+ Caso o banco tenha sido excluido, retorna false.
163
+
164
+ #### Returns
165
+
166
+ `boolean`
167
+
168
+ #### Defined in
169
+
170
+ src/repository/IRepository.ts:69
171
+
172
+ ___
173
+
174
+ ### load
175
+
176
+ ▸ **load**(`filterFunction?`, `sortingFunction?`, `offset?`, `limit?`): `Promise`<[`ILoadResult`](ILoadResult.md)<`T`\>\>
177
+
178
+ Recupera registros do repositório
179
+
180
+ #### Parameters
181
+
182
+ | Name | Type | Description |
183
+ | :------ | :------ | :------ |
184
+ | `filterFunction?` | (`value`: `T`) => `boolean` | Teste para determinar se um registro está no universo desejado |
185
+ | `sortingFunction?` | (`itemA`: `T`, `itemB`: `T`) => `number` | Critério comparação para ordenação |
186
+ | `offset?` | `number` | Determina que o resultado descarta os registros iniciais |
187
+ | `limit?` | `number` | Descarta o resultado a partir de uma quantidade de registros |
188
+
189
+ #### Returns
190
+
191
+ `Promise`<[`ILoadResult`](ILoadResult.md)<`T`\>\>
192
+
193
+ Promessa de um array que satisfaça aos critérios informados
194
+
195
+ #### Defined in
196
+
197
+ src/repository/IRepository.ts:14
198
+
199
+ ___
200
+
201
+ ### push
202
+
203
+ ▸ **push**(`items`): `Promise`<`void`\>
204
+
205
+ Adiciona registros no final do repositório
206
+
207
+ #### Parameters
208
+
209
+ | Name | Type | Description |
210
+ | :------ | :------ | :------ |
211
+ | `items` | `T`[] | Os items a serem adicionados |
212
+
213
+ #### Returns
214
+
215
+ `Promise`<`void`\>
216
+
217
+ Promessa de execução
218
+
219
+ #### Defined in
220
+
221
+ src/repository/IRepository.ts:31
222
+
223
+ ___
224
+
225
+ ### update
226
+
227
+ ▸ **update**(`items`): `Promise`<`void`\>
228
+
229
+ Altera itens já persistido no repositório
230
+
231
+ #### Parameters
232
+
233
+ | Name | Type | Description |
234
+ | :------ | :------ | :------ |
235
+ | `items` | `T`[] | Os itens a serem alterados |
236
+
237
+ #### Returns
238
+
239
+ `Promise`<`void`\>
240
+
241
+ Promessa de execução
242
+
243
+ #### Defined in
244
+
245
+ src/repository/IRepository.ts:54
@@ -0,0 +1,66 @@
1
+ [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / IRepositoryIndex
2
+
3
+ # Interface: IRepositoryIndex
4
+
5
+ ## Hierarchy
6
+
7
+ - `IDBIndexParameters`
8
+
9
+ ↳ **`IRepositoryIndex`**
10
+
11
+ ## Table of contents
12
+
13
+ ### Properties
14
+
15
+ - [multiEntry](IRepositoryIndex.md#multientry)
16
+ - [name](IRepositoryIndex.md#name)
17
+ - [path](IRepositoryIndex.md#path)
18
+ - [unique](IRepositoryIndex.md#unique)
19
+
20
+ ## Properties
21
+
22
+ ### multiEntry
23
+
24
+ • `Optional` **multiEntry**: `boolean`
25
+
26
+ #### Inherited from
27
+
28
+ IDBIndexParameters.multiEntry
29
+
30
+ #### Defined in
31
+
32
+ node_modules/typescript/lib/lib.dom.d.ts:583
33
+
34
+ ___
35
+
36
+ ### name
37
+
38
+ • **name**: `string`
39
+
40
+ #### Defined in
41
+
42
+ src/repository/indexeddb/IRepositoryIndex.ts:2
43
+
44
+ ___
45
+
46
+ ### path
47
+
48
+ • **path**: `string`
49
+
50
+ #### Defined in
51
+
52
+ src/repository/indexeddb/IRepositoryIndex.ts:3
53
+
54
+ ___
55
+
56
+ ### unique
57
+
58
+ • `Optional` **unique**: `boolean`
59
+
60
+ #### Inherited from
61
+
62
+ IDBIndexParameters.unique
63
+
64
+ #### Defined in
65
+
66
+ node_modules/typescript/lib/lib.dom.d.ts:584
@@ -15,6 +15,7 @@ Atributos enviados na requisição de carregamento dos registros
15
15
  - [parentRecordId](LoadDataRequest.md#parentrecordid)
16
16
  - [quickFilter](LoadDataRequest.md#quickfilter)
17
17
  - [sort](LoadDataRequest.md#sort)
18
+ - [source](LoadDataRequest.md#source)
18
19
 
19
20
  ## Properties
20
21
 
@@ -26,7 +27,7 @@ Filtros
26
27
 
27
28
  #### Defined in
28
29
 
29
- src/dataunit/loading/LoadDataRequest.ts:16
30
+ src/dataunit/loading/LoadDataRequest.ts:19
30
31
 
31
32
  ___
32
33
 
@@ -38,7 +39,7 @@ Na navegação de páginas devemos manter a seleção
38
39
 
39
40
  #### Defined in
40
41
 
41
- src/dataunit/loading/LoadDataRequest.ts:25
42
+ src/dataunit/loading/LoadDataRequest.ts:28
42
43
 
43
44
  ___
44
45
 
@@ -50,7 +51,7 @@ Quantidade de registros que será retornado
50
51
 
51
52
  #### Defined in
52
53
 
53
- src/dataunit/loading/LoadDataRequest.ts:10
54
+ src/dataunit/loading/LoadDataRequest.ts:13
54
55
 
55
56
  ___
56
57
 
@@ -62,7 +63,7 @@ Indice inicial dos registros que será retornado
62
63
 
63
64
  #### Defined in
64
65
 
65
- src/dataunit/loading/LoadDataRequest.ts:7
66
+ src/dataunit/loading/LoadDataRequest.ts:10
66
67
 
67
68
  ___
68
69
 
@@ -74,7 +75,7 @@ Info parent
74
75
 
75
76
  #### Defined in
76
77
 
77
- src/dataunit/loading/LoadDataRequest.ts:22
78
+ src/dataunit/loading/LoadDataRequest.ts:25
78
79
 
79
80
  ___
80
81
 
@@ -86,7 +87,7 @@ Filtro rápido
86
87
 
87
88
  #### Defined in
88
89
 
89
- src/dataunit/loading/LoadDataRequest.ts:13
90
+ src/dataunit/loading/LoadDataRequest.ts:16
90
91
 
91
92
  ___
92
93
 
@@ -98,4 +99,16 @@ Ordenação dos resultados
98
99
 
99
100
  #### Defined in
100
101
 
101
- src/dataunit/loading/LoadDataRequest.ts:19
102
+ src/dataunit/loading/LoadDataRequest.ts:22
103
+
104
+ ___
105
+
106
+ ### source
107
+
108
+ • `Optional` **source**: `String`
109
+
110
+ De onde partiu o refresh. Por padrão a fonte não é identificada
111
+
112
+ #### Defined in
113
+
114
+ src/dataunit/loading/LoadDataRequest.ts:7
@@ -18,7 +18,7 @@
18
18
 
19
19
  #### Defined in
20
20
 
21
- src/dataunit/DataUnit.ts:1790
21
+ src/dataunit/DataUnit.ts:1815
22
22
 
23
23
  ___
24
24
 
@@ -28,7 +28,7 @@ ___
28
28
 
29
29
  #### Defined in
30
30
 
31
- src/dataunit/DataUnit.ts:1791
31
+ src/dataunit/DataUnit.ts:1816
32
32
 
33
33
  ___
34
34
 
@@ -38,4 +38,4 @@ ___
38
38
 
39
39
  #### Defined in
40
40
 
41
- src/dataunit/DataUnit.ts:1792
41
+ src/dataunit/DataUnit.ts:1817
@@ -8,6 +8,7 @@ Informações da paginação retornada na requisição de carregamento de regist
8
8
 
9
9
  ### Properties
10
10
 
11
+ - [count](PaginationInfo.md#count)
11
12
  - [currentPage](PaginationInfo.md#currentpage)
12
13
  - [firstRecord](PaginationInfo.md#firstrecord)
13
14
  - [hasMore](PaginationInfo.md#hasmore)
@@ -16,6 +17,18 @@ Informações da paginação retornada na requisição de carregamento de regist
16
17
 
17
18
  ## Properties
18
19
 
20
+ ### count
21
+
22
+ • `Optional` **count**: `number`
23
+
24
+ Quantidade de registros carregados até o momento
25
+
26
+ #### Defined in
27
+
28
+ src/dataunit/loading/PaginationInfo.ts:17
29
+
30
+ ___
31
+
19
32
  ### currentPage
20
33
 
21
34
  • **currentPage**: `number`
@@ -44,11 +57,11 @@ ___
44
57
 
45
58
  • **hasMore**: `boolean`
46
59
 
47
- Se ainda existem mais registros além dos exibidos na página
60
+ Se ainda existem mais registros
48
61
 
49
62
  #### Defined in
50
63
 
51
- src/dataunit/loading/PaginationInfo.ts:17
64
+ src/dataunit/loading/PaginationInfo.ts:20
52
65
 
53
66
  ___
54
67
 
@@ -66,7 +79,7 @@ ___
66
79
 
67
80
  ### total
68
81
 
69
- • **total**: `number`
82
+ `Optional` **total**: `number`
70
83
 
71
84
  Quantidade total de registros
72
85
 
@@ -18,7 +18,7 @@
18
18
 
19
19
  #### Defined in
20
20
 
21
- src/dataunit/DataUnit.ts:1797
21
+ src/dataunit/DataUnit.ts:1822
22
22
 
23
23
  ___
24
24
 
@@ -28,7 +28,7 @@ ___
28
28
 
29
29
  #### Defined in
30
30
 
31
- src/dataunit/DataUnit.ts:1798
31
+ src/dataunit/DataUnit.ts:1823
32
32
 
33
33
  ___
34
34
 
@@ -38,4 +38,4 @@ ___
38
38
 
39
39
  #### Defined in
40
40
 
41
- src/dataunit/DataUnit.ts:1796
41
+ src/dataunit/DataUnit.ts:1821
@@ -29,7 +29,7 @@
29
29
 
30
30
  #### Defined in
31
31
 
32
- src/dataunit/DataUnit.ts:1690
32
+ src/dataunit/DataUnit.ts:1717
33
33
 
34
34
  ___
35
35
 
@@ -39,7 +39,7 @@ ___
39
39
 
40
40
  #### Defined in
41
41
 
42
- src/dataunit/DataUnit.ts:1689
42
+ src/dataunit/DataUnit.ts:1716
43
43
 
44
44
  ___
45
45
 
@@ -49,7 +49,7 @@ ___
49
49
 
50
50
  #### Defined in
51
51
 
52
- src/dataunit/DataUnit.ts:1687
52
+ src/dataunit/DataUnit.ts:1714
53
53
 
54
54
  ___
55
55
 
@@ -59,4 +59,4 @@ ___
59
59
 
60
60
  #### Defined in
61
61
 
62
- src/dataunit/DataUnit.ts:1688
62
+ src/dataunit/DataUnit.ts:1715
@@ -26,7 +26,7 @@
26
26
 
27
27
  #### Defined in
28
28
 
29
- src/dataunit/DataUnit.ts:1695
29
+ src/dataunit/DataUnit.ts:1722
30
30
 
31
31
  ___
32
32
 
@@ -40,7 +40,7 @@ ___
40
40
 
41
41
  #### Defined in
42
42
 
43
- src/dataunit/DataUnit.ts:1690
43
+ src/dataunit/DataUnit.ts:1717
44
44
 
45
45
  ___
46
46
 
@@ -54,7 +54,7 @@ ___
54
54
 
55
55
  #### Defined in
56
56
 
57
- src/dataunit/DataUnit.ts:1689
57
+ src/dataunit/DataUnit.ts:1716
58
58
 
59
59
  ___
60
60
 
@@ -68,7 +68,7 @@ ___
68
68
 
69
69
  #### Defined in
70
70
 
71
- src/dataunit/DataUnit.ts:1687
71
+ src/dataunit/DataUnit.ts:1714
72
72
 
73
73
  ___
74
74
 
@@ -82,4 +82,4 @@ ___
82
82
 
83
83
  #### Defined in
84
84
 
85
- src/dataunit/DataUnit.ts:1688
85
+ src/dataunit/DataUnit.ts:1715
@@ -12,13 +12,14 @@
12
12
 
13
13
  ### getSort
14
14
 
15
- ▸ **getSort**(`dataUnit`): `undefined` \| [`Sort`](Sort.md)[]
15
+ ▸ **getSort**(`dataUnit`, `defaultSorting`): `undefined` \| [`Sort`](Sort.md)[]
16
16
 
17
17
  #### Parameters
18
18
 
19
19
  | Name | Type |
20
20
  | :------ | :------ |
21
21
  | `dataUnit` | `string` |
22
+ | `defaultSorting` | [`Sort`](Sort.md)[] |
22
23
 
23
24
  #### Returns
24
25
 
@@ -18,7 +18,7 @@
18
18
 
19
19
  #### Defined in
20
20
 
21
- src/dataunit/DataUnit.ts:1785
21
+ src/dataunit/DataUnit.ts:1810
22
22
 
23
23
  ___
24
24
 
@@ -28,7 +28,7 @@ ___
28
28
 
29
29
  #### Defined in
30
30
 
31
- src/dataunit/DataUnit.ts:1786
31
+ src/dataunit/DataUnit.ts:1811
32
32
 
33
33
  ___
34
34
 
@@ -38,4 +38,4 @@ ___
38
38
 
39
39
  #### Defined in
40
40
 
41
- src/dataunit/DataUnit.ts:1784
41
+ src/dataunit/DataUnit.ts:1809
package/modules.md CHANGED
@@ -31,9 +31,11 @@
31
31
  - [ElementIDUtils](classes/ElementIDUtils.md)
32
32
  - [ErrorException](classes/ErrorException.md)
33
33
  - [ErrorTracking](classes/ErrorTracking.md)
34
+ - [FieldComparator](classes/FieldComparator.md)
34
35
  - [FloatingManager](classes/FloatingManager.md)
35
36
  - [HTMLBuilder](classes/HTMLBuilder.md)
36
37
  - [HttpProvider](classes/HttpProvider.md)
38
+ - [IDBRepository](classes/IDBRepository.md)
37
39
  - [JSUtils](classes/JSUtils.md)
38
40
  - [MaskFormatter](classes/MaskFormatter-1.md)
39
41
  - [NumberUtils](classes/NumberUtils.md)
@@ -60,6 +62,9 @@
60
62
  - [FieldDescriptor](interfaces/FieldDescriptor.md)
61
63
  - [Filter](interfaces/Filter.md)
62
64
  - [IElementIDInfo](interfaces/IElementIDInfo.md)
65
+ - [ILoadResult](interfaces/ILoadResult.md)
66
+ - [IRepository](interfaces/IRepository.md)
67
+ - [IRepositoryIndex](interfaces/IRepositoryIndex.md)
63
68
  - [LoadDataRequest](interfaces/LoadDataRequest.md)
64
69
  - [LoadDataResponse](interfaces/LoadDataResponse.md)
65
70
  - [PageRequest](interfaces/PageRequest.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/core-docs",
3
- "version": "5.10.0",
3
+ "version": "5.11.0-dev.1",
4
4
  "description": "Documentação da biblioteca de componentes Sankhya.",
5
5
  "main": "",
6
6
  "files": [