@sankhyalabs/core-docs 0.0.0-hotfix-ga-KB-4098.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 (59) hide show
  1. package/README.md +63 -0
  2. package/classes/ApplicationContext.md +90 -0
  3. package/classes/ArrayUtils.md +99 -0
  4. package/classes/AuthorizedServiceCaller.md +76 -0
  5. package/classes/Change.md +190 -0
  6. package/classes/DataUnit.md +2427 -0
  7. package/classes/DataUnitAction.md +96 -0
  8. package/classes/DataUnitStorage.md +116 -0
  9. package/classes/DateUtils.md +327 -0
  10. package/classes/ElementIDUtils.md +308 -0
  11. package/classes/ErrorException.md +214 -0
  12. package/classes/ErrorTracking.md +62 -0
  13. package/classes/FloatingManager.md +530 -0
  14. package/classes/HttpProvider.md +96 -0
  15. package/classes/JSUtils.md +115 -0
  16. package/classes/MaskFormatter-1.md +347 -0
  17. package/classes/NumberUtils.md +335 -0
  18. package/classes/ObjectUtils.md +160 -0
  19. package/classes/OnboardingUtils.md +126 -0
  20. package/classes/PromiseSync.md +91 -0
  21. package/classes/ReadyUtil.md +115 -0
  22. package/classes/RequestMetadata.md +84 -0
  23. package/classes/SelectionInfo.md +168 -0
  24. package/classes/SkwHttpProvider.md +109 -0
  25. package/classes/StringUtils.md +562 -0
  26. package/classes/TimeFormatter.md +98 -0
  27. package/classes/UserAgentUtils.md +58 -0
  28. package/classes/VersionUtils.md +42 -0
  29. package/classes/WaitingChangeException.md +200 -0
  30. package/classes/WarningException.md +214 -0
  31. package/enums/Action.md +283 -0
  32. package/enums/ChangeOperation.md +52 -0
  33. package/enums/DataType.md +63 -0
  34. package/enums/DependencyType.md +41 -0
  35. package/enums/SelectionMode.md +30 -0
  36. package/enums/SortMode.md +30 -0
  37. package/enums/UserInterface.md +195 -0
  38. package/interfaces/ChildDescriptor.md +41 -0
  39. package/interfaces/ChildLink.md +30 -0
  40. package/interfaces/DUActionInterceptor.md +29 -0
  41. package/interfaces/ExecutionContext.md +58 -0
  42. package/interfaces/FieldDescriptor.md +140 -0
  43. package/interfaces/Filter.md +41 -0
  44. package/interfaces/IElementIDInfo.md +30 -0
  45. package/interfaces/LoadDataRequest.md +101 -0
  46. package/interfaces/LoadDataResponse.md +36 -0
  47. package/interfaces/PageRequest.md +41 -0
  48. package/interfaces/PaginationInfo.md +75 -0
  49. package/interfaces/PromiseSyncCallback.md +39 -0
  50. package/interfaces/QuickFilter.md +41 -0
  51. package/interfaces/Record.md +62 -0
  52. package/interfaces/SavedRecord.md +85 -0
  53. package/interfaces/Sort.md +41 -0
  54. package/interfaces/SortingProvider.md +29 -0
  55. package/interfaces/UnitMetadata.md +52 -0
  56. package/interfaces/WaitingChange.md +41 -0
  57. package/modules/MaskFormatter.md +37 -0
  58. package/modules.md +73 -0
  59. package/package.json +14 -0
@@ -0,0 +1,2427 @@
1
+ [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / DataUnit
2
+
3
+ # Class: DataUnit
4
+
5
+ `DataUnit`: Atua como uma camada de abstração entre o back-end e a interface do usuário.
6
+
7
+ ## Table of contents
8
+
9
+ ### Constructors
10
+
11
+ - [constructor](DataUnit.md#constructor)
12
+
13
+ ### Properties
14
+
15
+ - [\_childByName](DataUnit.md#_childbyname)
16
+ - [\_filterProviders](DataUnit.md#_filterproviders)
17
+ - [\_interceptors](DataUnit.md#_interceptors)
18
+ - [\_loadingLockers](DataUnit.md#_loadinglockers)
19
+ - [\_name](DataUnit.md#_name)
20
+ - [\_observers](DataUnit.md#_observers)
21
+ - [\_pageSize](DataUnit.md#_pagesize)
22
+ - [\_parentDataUnit](DataUnit.md#_parentdataunit)
23
+ - [\_sortingProvider](DataUnit.md#_sortingprovider)
24
+ - [\_stateManager](DataUnit.md#_statemanager)
25
+ - [\_uuid](DataUnit.md#_uuid)
26
+ - [dataLoader](DataUnit.md#dataloader)
27
+ - [metadataLoader](DataUnit.md#metadataloader)
28
+ - [recordLoader](DataUnit.md#recordloader)
29
+ - [removeLoader](DataUnit.md#removeloader)
30
+ - [saveLoader](DataUnit.md#saveloader)
31
+
32
+ ### Accessors
33
+
34
+ - [dataUnitId](DataUnit.md#dataunitid)
35
+ - [metadata](DataUnit.md#metadata)
36
+ - [name](DataUnit.md#name)
37
+ - [pageSize](DataUnit.md#pagesize)
38
+ - [records](DataUnit.md#records)
39
+ - [sortingProvider](DataUnit.md#sortingprovider)
40
+
41
+ ### Methods
42
+
43
+ - [addFilterProvider](DataUnit.md#addfilterprovider)
44
+ - [addInterceptor](DataUnit.md#addinterceptor)
45
+ - [addLoadingLocker](DataUnit.md#addloadinglocker)
46
+ - [addRecord](DataUnit.md#addrecord)
47
+ - [buildChangesToSave](DataUnit.md#buildchangestosave)
48
+ - [buildChangesToSaveFromChild](DataUnit.md#buildchangestosavefromchild)
49
+ - [canRedo](DataUnit.md#canredo)
50
+ - [canUndo](DataUnit.md#canundo)
51
+ - [cancelEdition](DataUnit.md#canceledition)
52
+ - [cancelWaitingChange](DataUnit.md#cancelwaitingchange)
53
+ - [childrenIsDirty](DataUnit.md#childrenisdirty)
54
+ - [clearDataUnit](DataUnit.md#cleardataunit)
55
+ - [clearInvalid](DataUnit.md#clearinvalid)
56
+ - [clearSelection](DataUnit.md#clearselection)
57
+ - [copySelected](DataUnit.md#copyselected)
58
+ - [disableField](DataUnit.md#disablefield)
59
+ - [dispatchAction](DataUnit.md#dispatchaction)
60
+ - [doDispatchAction](DataUnit.md#dodispatchaction)
61
+ - [enableField](DataUnit.md#enablefield)
62
+ - [executeLoadData](DataUnit.md#executeloaddata)
63
+ - [getAddedRecords](DataUnit.md#getaddedrecords)
64
+ - [getAllChangesToSave](DataUnit.md#getallchangestosave)
65
+ - [getAppliedFilters](DataUnit.md#getappliedfilters)
66
+ - [getChildDataunit](DataUnit.md#getchilddataunit)
67
+ - [getChildInfo](DataUnit.md#getchildinfo)
68
+ - [getField](DataUnit.md#getfield)
69
+ - [getFieldValue](DataUnit.md#getfieldvalue)
70
+ - [getFielterProviderKey](DataUnit.md#getfielterproviderkey)
71
+ - [getFilters](DataUnit.md#getfilters)
72
+ - [getFormattedValue](DataUnit.md#getformattedvalue)
73
+ - [getInvalidMessage](DataUnit.md#getinvalidmessage)
74
+ - [getLastLoadRequest](DataUnit.md#getlastloadrequest)
75
+ - [getLoadDataRequest](DataUnit.md#getloaddatarequest)
76
+ - [getModifiedRecords](DataUnit.md#getmodifiedrecords)
77
+ - [getPaginationInfo](DataUnit.md#getpaginationinfo)
78
+ - [getParentRecordId](DataUnit.md#getparentrecordid)
79
+ - [getRecordsByDataUnit](DataUnit.md#getrecordsbydataunit)
80
+ - [getSelectedRecord](DataUnit.md#getselectedrecord)
81
+ - [getSelectedRecords](DataUnit.md#getselectedrecords)
82
+ - [getSelection](DataUnit.md#getselection)
83
+ - [getSelectionInfo](DataUnit.md#getselectioninfo)
84
+ - [getSort](DataUnit.md#getsort)
85
+ - [gotoPage](DataUnit.md#gotopage)
86
+ - [hasCopiedRecord](DataUnit.md#hascopiedrecord)
87
+ - [hasDirtyRecords](DataUnit.md#hasdirtyrecords)
88
+ - [hasNewRecord](DataUnit.md#hasnewrecord)
89
+ - [hasNext](DataUnit.md#hasnext)
90
+ - [hasPrevious](DataUnit.md#hasprevious)
91
+ - [hasWaitingChanges](DataUnit.md#haswaitingchanges)
92
+ - [hideField](DataUnit.md#hidefield)
93
+ - [intercept](DataUnit.md#intercept)
94
+ - [isDirty](DataUnit.md#isdirty)
95
+ - [isNewRecord](DataUnit.md#isnewrecord)
96
+ - [isSameRequest](DataUnit.md#issamerequest)
97
+ - [loadData](DataUnit.md#loaddata)
98
+ - [loadMetadata](DataUnit.md#loadmetadata)
99
+ - [nextPage](DataUnit.md#nextpage)
100
+ - [nextRecord](DataUnit.md#nextrecord)
101
+ - [notifySavingData](DataUnit.md#notifysavingdata)
102
+ - [onDataUnitParentEvent](DataUnit.md#ondataunitparentevent)
103
+ - [previousPage](DataUnit.md#previouspage)
104
+ - [previousRecord](DataUnit.md#previousrecord)
105
+ - [processLoadingLockers](DataUnit.md#processloadinglockers)
106
+ - [redo](DataUnit.md#redo)
107
+ - [release](DataUnit.md#release)
108
+ - [reloadCurrentRecord](DataUnit.md#reloadcurrentrecord)
109
+ - [removeChildDataunit](DataUnit.md#removechilddataunit)
110
+ - [removeInterceptor](DataUnit.md#removeinterceptor)
111
+ - [removeRecords](DataUnit.md#removerecords)
112
+ - [removeSelectedRecords](DataUnit.md#removeselectedrecords)
113
+ - [saveData](DataUnit.md#savedata)
114
+ - [selectFirst](DataUnit.md#selectfirst)
115
+ - [selectLast](DataUnit.md#selectlast)
116
+ - [setFieldValue](DataUnit.md#setfieldvalue)
117
+ - [setInvalidField](DataUnit.md#setinvalidfield)
118
+ - [setSelection](DataUnit.md#setselection)
119
+ - [setSelectionByIndex](DataUnit.md#setselectionbyindex)
120
+ - [showField](DataUnit.md#showfield)
121
+ - [startChange](DataUnit.md#startchange)
122
+ - [subscribe](DataUnit.md#subscribe)
123
+ - [toString](DataUnit.md#tostring)
124
+ - [undo](DataUnit.md#undo)
125
+ - [unsubscribe](DataUnit.md#unsubscribe)
126
+ - [updatePageSelection](DataUnit.md#updatepageselection)
127
+ - [validateAndTypeValue](DataUnit.md#validateandtypevalue)
128
+ - [valueFromString](DataUnit.md#valuefromstring)
129
+ - [valueToString](DataUnit.md#valuetostring)
130
+ - [waitingForChange](DataUnit.md#waitingforchange)
131
+
132
+ ## Constructors
133
+
134
+ ### constructor
135
+
136
+ • **new DataUnit**(`name?`, `parentDataUnit?`)
137
+
138
+ #### Parameters
139
+
140
+ | Name | Type | Default value |
141
+ | :------ | :------ | :------ |
142
+ | `name` | `string` | `DEFAULT_DATAUNIT_NAME` |
143
+ | `parentDataUnit?` | [`DataUnit`](DataUnit.md) | `undefined` |
144
+
145
+ #### Defined in
146
+
147
+ src/dataunit/DataUnit.ts:53
148
+
149
+ ## Properties
150
+
151
+ ### \_childByName
152
+
153
+ • `Private` **\_childByName**: `Map`<`string`, [`DataUnit`](DataUnit.md)\>
154
+
155
+ #### Defined in
156
+
157
+ src/dataunit/DataUnit.ts:43
158
+
159
+ ___
160
+
161
+ ### \_filterProviders
162
+
163
+ • `Private` **\_filterProviders**: `Map`<`string`, `FilterProvider`\>
164
+
165
+ #### Defined in
166
+
167
+ src/dataunit/DataUnit.ts:39
168
+
169
+ ___
170
+
171
+ ### \_interceptors
172
+
173
+ • `Private` **\_interceptors**: [`DUActionInterceptor`](../interfaces/DUActionInterceptor.md)[]
174
+
175
+ #### Defined in
176
+
177
+ src/dataunit/DataUnit.ts:41
178
+
179
+ ___
180
+
181
+ ### \_loadingLockers
182
+
183
+ • `Private` **\_loadingLockers**: `Promise`<`void`\>[]
184
+
185
+ #### Defined in
186
+
187
+ src/dataunit/DataUnit.ts:45
188
+
189
+ ___
190
+
191
+ ### \_name
192
+
193
+ • `Private` **\_name**: `string`
194
+
195
+ #### Defined in
196
+
197
+ src/dataunit/DataUnit.ts:36
198
+
199
+ ___
200
+
201
+ ### \_observers
202
+
203
+ • `Private` **\_observers**: (`action`: [`DataUnitAction`](DataUnitAction.md)) => `void`[]
204
+
205
+ #### Defined in
206
+
207
+ src/dataunit/DataUnit.ts:37
208
+
209
+ ___
210
+
211
+ ### \_pageSize
212
+
213
+ • `Private` **\_pageSize**: `number`
214
+
215
+ #### Defined in
216
+
217
+ src/dataunit/DataUnit.ts:42
218
+
219
+ ___
220
+
221
+ ### \_parentDataUnit
222
+
223
+ • `Private` **\_parentDataUnit**: `undefined` \| [`DataUnit`](DataUnit.md)
224
+
225
+ #### Defined in
226
+
227
+ src/dataunit/DataUnit.ts:44
228
+
229
+ ___
230
+
231
+ ### \_sortingProvider
232
+
233
+ • `Private` `Optional` **\_sortingProvider**: [`SortingProvider`](../interfaces/SortingProvider.md)
234
+
235
+ #### Defined in
236
+
237
+ src/dataunit/DataUnit.ts:38
238
+
239
+ ___
240
+
241
+ ### \_stateManager
242
+
243
+ • `Private` **\_stateManager**: `default`
244
+
245
+ #### Defined in
246
+
247
+ src/dataunit/DataUnit.ts:40
248
+
249
+ ___
250
+
251
+ ### \_uuid
252
+
253
+ • `Private` **\_uuid**: `string`
254
+
255
+ #### Defined in
256
+
257
+ src/dataunit/DataUnit.ts:35
258
+
259
+ ___
260
+
261
+ ### dataLoader
262
+
263
+ • `Optional` **dataLoader**: (`dataUnit`: [`DataUnit`](DataUnit.md), `request`: [`LoadDataRequest`](../interfaces/LoadDataRequest.md)) => `Promise`<[`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
264
+
265
+ #### Type declaration
266
+
267
+ ▸ (`dataUnit`, `request`): `Promise`<[`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
268
+
269
+ ##### Parameters
270
+
271
+ | Name | Type |
272
+ | :------ | :------ |
273
+ | `dataUnit` | [`DataUnit`](DataUnit.md) |
274
+ | `request` | [`LoadDataRequest`](../interfaces/LoadDataRequest.md) |
275
+
276
+ ##### Returns
277
+
278
+ `Promise`<[`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
279
+
280
+ #### Defined in
281
+
282
+ src/dataunit/DataUnit.ts:48
283
+
284
+ ___
285
+
286
+ ### metadataLoader
287
+
288
+ • `Optional` **metadataLoader**: (`dataUnit`: [`DataUnit`](DataUnit.md)) => `Promise`<[`UnitMetadata`](../interfaces/UnitMetadata.md)\>
289
+
290
+ #### Type declaration
291
+
292
+ ▸ (`dataUnit`): `Promise`<[`UnitMetadata`](../interfaces/UnitMetadata.md)\>
293
+
294
+ ##### Parameters
295
+
296
+ | Name | Type |
297
+ | :------ | :------ |
298
+ | `dataUnit` | [`DataUnit`](DataUnit.md) |
299
+
300
+ ##### Returns
301
+
302
+ `Promise`<[`UnitMetadata`](../interfaces/UnitMetadata.md)\>
303
+
304
+ #### Defined in
305
+
306
+ src/dataunit/DataUnit.ts:47
307
+
308
+ ___
309
+
310
+ ### recordLoader
311
+
312
+ • `Optional` **recordLoader**: (`dataUnit`: [`DataUnit`](DataUnit.md), `recordIds`: `string`[]) => `Promise`<[`Record`](../interfaces/Record.md)[]\>
313
+
314
+ #### Type declaration
315
+
316
+ ▸ (`dataUnit`, `recordIds`): `Promise`<[`Record`](../interfaces/Record.md)[]\>
317
+
318
+ ##### Parameters
319
+
320
+ | Name | Type |
321
+ | :------ | :------ |
322
+ | `dataUnit` | [`DataUnit`](DataUnit.md) |
323
+ | `recordIds` | `string`[] |
324
+
325
+ ##### Returns
326
+
327
+ `Promise`<[`Record`](../interfaces/Record.md)[]\>
328
+
329
+ #### Defined in
330
+
331
+ src/dataunit/DataUnit.ts:51
332
+
333
+ ___
334
+
335
+ ### removeLoader
336
+
337
+ • `Optional` **removeLoader**: (`dataUnit`: [`DataUnit`](DataUnit.md), `recordIds`: `string`[]) => `Promise`<`string`[]\>
338
+
339
+ #### Type declaration
340
+
341
+ ▸ (`dataUnit`, `recordIds`): `Promise`<`string`[]\>
342
+
343
+ ##### Parameters
344
+
345
+ | Name | Type |
346
+ | :------ | :------ |
347
+ | `dataUnit` | [`DataUnit`](DataUnit.md) |
348
+ | `recordIds` | `string`[] |
349
+
350
+ ##### Returns
351
+
352
+ `Promise`<`string`[]\>
353
+
354
+ #### Defined in
355
+
356
+ src/dataunit/DataUnit.ts:50
357
+
358
+ ___
359
+
360
+ ### saveLoader
361
+
362
+ • `Optional` **saveLoader**: (`dataUnit`: [`DataUnit`](DataUnit.md), `changes`: [`Change`](Change.md)[]) => `Promise`<[`SavedRecord`](../interfaces/SavedRecord.md)[]\>
363
+
364
+ #### Type declaration
365
+
366
+ ▸ (`dataUnit`, `changes`): `Promise`<[`SavedRecord`](../interfaces/SavedRecord.md)[]\>
367
+
368
+ ##### Parameters
369
+
370
+ | Name | Type |
371
+ | :------ | :------ |
372
+ | `dataUnit` | [`DataUnit`](DataUnit.md) |
373
+ | `changes` | [`Change`](Change.md)[] |
374
+
375
+ ##### Returns
376
+
377
+ `Promise`<[`SavedRecord`](../interfaces/SavedRecord.md)[]\>
378
+
379
+ #### Defined in
380
+
381
+ src/dataunit/DataUnit.ts:49
382
+
383
+ ## Accessors
384
+
385
+ ### dataUnitId
386
+
387
+ • `get` **dataUnitId**(): `string`
388
+
389
+ #### Returns
390
+
391
+ `string`
392
+
393
+ #### Defined in
394
+
395
+ src/dataunit/DataUnit.ts:93
396
+
397
+ ___
398
+
399
+ ### metadata
400
+
401
+ • `get` **metadata**(): [`UnitMetadata`](../interfaces/UnitMetadata.md)
402
+
403
+ Obtém os metadados do DataUnit.
404
+
405
+ #### Returns
406
+
407
+ [`UnitMetadata`](../interfaces/UnitMetadata.md)
408
+
409
+ #### Defined in
410
+
411
+ src/dataunit/DataUnit.ts:647
412
+
413
+ • `set` **metadata**(`md`): `void`
414
+
415
+ Define a propriedade metadata da instância da classe com um novo valor e chama o método dispatchAction para notificar os observers da aplicação sobre a mudança.
416
+
417
+ #### Parameters
418
+
419
+ | Name | Type |
420
+ | :------ | :------ |
421
+ | `md` | [`UnitMetadata`](../interfaces/UnitMetadata.md) |
422
+
423
+ #### Returns
424
+
425
+ `void`
426
+
427
+ #### Defined in
428
+
429
+ src/dataunit/DataUnit.ts:638
430
+
431
+ ___
432
+
433
+ ### name
434
+
435
+ • `get` **name**(): `string`
436
+
437
+ Obtém o nome de identificação do DataUnit (geralmente em formato de URI - Uniform Resource Identifier).
438
+
439
+ #### Returns
440
+
441
+ `string`
442
+
443
+ - Nome de identificação do DataUnit.
444
+
445
+ #### Defined in
446
+
447
+ src/dataunit/DataUnit.ts:104
448
+
449
+ ___
450
+
451
+ ### pageSize
452
+
453
+ • `get` **pageSize**(): `number`
454
+
455
+ Obtém a quantidade de registros que está sendo exibido por página.
456
+
457
+ #### Returns
458
+
459
+ `number`
460
+
461
+ - Quantidade de registros exibidos por página.
462
+
463
+ #### Defined in
464
+
465
+ src/dataunit/DataUnit.ts:708
466
+
467
+ • `set` **pageSize**(`size`): `void`
468
+
469
+ Define a quantidade de registros que será exibido por página.
470
+
471
+ #### Parameters
472
+
473
+ | Name | Type | Description |
474
+ | :------ | :------ | :------ |
475
+ | `size` | `number` | Quantidade de registros que será exibido por página. |
476
+
477
+ #### Returns
478
+
479
+ `void`
480
+
481
+ #### Defined in
482
+
483
+ src/dataunit/DataUnit.ts:697
484
+
485
+ ___
486
+
487
+ ### records
488
+
489
+ • `get` **records**(): [`Record`](../interfaces/Record.md)[]
490
+
491
+ Obtém todos os registros atuais.
492
+
493
+ #### Returns
494
+
495
+ [`Record`](../interfaces/Record.md)[]
496
+
497
+ - Todos os registros atuais.
498
+
499
+ #### Defined in
500
+
501
+ src/dataunit/DataUnit.ts:685
502
+
503
+ • `set` **records**(`records`): `void`
504
+
505
+ Define a propriedade records da instância da classe com um novo valor e chama o método dispatchAction para notificar os observers da aplicação sobre a mudança.
506
+
507
+ #### Parameters
508
+
509
+ | Name | Type |
510
+ | :------ | :------ |
511
+ | `records` | [`Record`](../interfaces/Record.md)[] |
512
+
513
+ #### Returns
514
+
515
+ `void`
516
+
517
+ #### Defined in
518
+
519
+ src/dataunit/DataUnit.ts:674
520
+
521
+ ___
522
+
523
+ ### sortingProvider
524
+
525
+ • `set` **sortingProvider**(`provider`): `void`
526
+
527
+ Define a lógica de ordenação dos registros.
528
+
529
+ #### Parameters
530
+
531
+ | Name | Type | Description |
532
+ | :------ | :------ | :------ |
533
+ | `provider` | [`SortingProvider`](../interfaces/SortingProvider.md) | Objeto usado para definir a propriedade sortingProvider da instância da classe. |
534
+
535
+ #### Returns
536
+
537
+ `void`
538
+
539
+ #### Defined in
540
+
541
+ src/dataunit/DataUnit.ts:629
542
+
543
+ ## Methods
544
+
545
+ ### addFilterProvider
546
+
547
+ ▸ **addFilterProvider**(`provider`): `void`
548
+
549
+ Adiciona um FilterProvider.
550
+
551
+ #### Parameters
552
+
553
+ | Name | Type | Description |
554
+ | :------ | :------ | :------ |
555
+ | `provider` | `FilterProvider` | FilterProvider que será adicionado. |
556
+
557
+ #### Returns
558
+
559
+ `void`
560
+
561
+ #### Defined in
562
+
563
+ src/dataunit/DataUnit.ts:608
564
+
565
+ ___
566
+
567
+ ### addInterceptor
568
+
569
+ ▸ **addInterceptor**(`interceptor`): `void`
570
+
571
+ Adiciona um interceptor correspondente a uma ação do DataUnit para fazer um processamento customizado.
572
+
573
+ #### Parameters
574
+
575
+ | Name | Type | Description |
576
+ | :------ | :------ | :------ |
577
+ | `interceptor` | [`DUActionInterceptor`](../interfaces/DUActionInterceptor.md) | Interceptor a ser adicionado. |
578
+
579
+ #### Returns
580
+
581
+ `void`
582
+
583
+ #### Defined in
584
+
585
+ src/dataunit/DataUnit.ts:586
586
+
587
+ ___
588
+
589
+ ### addLoadingLocker
590
+
591
+ ▸ **addLoadingLocker**(): `Function`
592
+
593
+ Adiciona um locker para impedir o carregamento dos registros do dataUnit.
594
+
595
+ #### Returns
596
+
597
+ `Function`
598
+
599
+ Retorna uma função responsável por liberar o lock adicionado.
600
+
601
+ #### Defined in
602
+
603
+ src/dataunit/DataUnit.ts:1610
604
+
605
+ ___
606
+
607
+ ### addRecord
608
+
609
+ ▸ **addRecord**(`executionCtx?`): `Promise`<`boolean`\>
610
+
611
+ Adiciona um novo registro.
612
+
613
+ #### Parameters
614
+
615
+ | Name | Type | Description |
616
+ | :------ | :------ | :------ |
617
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da inserção do dado no DataUnit. |
618
+
619
+ #### Returns
620
+
621
+ `Promise`<`boolean`\>
622
+
623
+ #### Defined in
624
+
625
+ src/dataunit/DataUnit.ts:754
626
+
627
+ ___
628
+
629
+ ### buildChangesToSave
630
+
631
+ ▸ **buildChangesToSave**(): [`Change`](Change.md)[]
632
+
633
+ Retorna as alterações a serem salvas no DataUnit atual.
634
+
635
+ #### Returns
636
+
637
+ [`Change`](Change.md)[]
638
+
639
+ - Mudanças realizadas no DataUnit atual
640
+
641
+ #### Defined in
642
+
643
+ src/dataunit/DataUnit.ts:416
644
+
645
+ ___
646
+
647
+ ### buildChangesToSaveFromChild
648
+
649
+ ▸ **buildChangesToSaveFromChild**(`allChanges`, `dataUnit`): `void`
650
+
651
+ #### Parameters
652
+
653
+ | Name | Type |
654
+ | :------ | :------ |
655
+ | `allChanges` | [`Change`](Change.md)[] |
656
+ | `dataUnit` | [`DataUnit`](DataUnit.md) |
657
+
658
+ #### Returns
659
+
660
+ `void`
661
+
662
+ #### Defined in
663
+
664
+ src/dataunit/DataUnit.ts:420
665
+
666
+ ___
667
+
668
+ ### canRedo
669
+
670
+ ▸ **canRedo**(): `boolean`
671
+
672
+ Retorna se a informação do estado futuro está salva, permitindo refazer a ação.
673
+
674
+ #### Returns
675
+
676
+ `boolean`
677
+
678
+ Verdadeiro se for possível refazer a ação.
679
+
680
+ #### Defined in
681
+
682
+ src/dataunit/DataUnit.ts:1263
683
+
684
+ ___
685
+
686
+ ### canUndo
687
+
688
+ ▸ **canUndo**(): `boolean`
689
+
690
+ Retorna se a informação do estado anterior está salva, permitindo desfazer a ação.
691
+
692
+ #### Returns
693
+
694
+ `boolean`
695
+
696
+ Verdadeiro se for possível desfazer a ação.
697
+
698
+ #### Defined in
699
+
700
+ src/dataunit/DataUnit.ts:1252
701
+
702
+ ___
703
+
704
+ ### cancelEdition
705
+
706
+ ▸ **cancelEdition**(`executionCtx?`, `fromParent?`, `silent?`): `Promise`<`boolean`\>
707
+
708
+ Cancela edição do registro atual.
709
+
710
+ #### Parameters
711
+
712
+ | Name | Type | Default value | Description |
713
+ | :------ | :------ | :------ | :------ |
714
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | `undefined` | Contexto de execução do cancelamento da seleção dos registros. |
715
+ | `fromParent?` | `boolean` | `undefined` | - |
716
+ | `silent` | `boolean` | `false` | - |
717
+
718
+ #### Returns
719
+
720
+ `Promise`<`boolean`\>
721
+
722
+ #### Defined in
723
+
724
+ src/dataunit/DataUnit.ts:1119
725
+
726
+ ___
727
+
728
+ ### cancelWaitingChange
729
+
730
+ ▸ **cancelWaitingChange**(`fieldName`): `void`
731
+
732
+ Cancela o início de uma alteração no campo.
733
+
734
+ #### Parameters
735
+
736
+ | Name | Type | Description |
737
+ | :------ | :------ | :------ |
738
+ | `fieldName` | `string` | Identificador do campo. |
739
+
740
+ #### Returns
741
+
742
+ `void`
743
+
744
+ #### Defined in
745
+
746
+ src/dataunit/DataUnit.ts:908
747
+
748
+ ___
749
+
750
+ ### childrenIsDirty
751
+
752
+ ▸ `Private` **childrenIsDirty**(): `boolean`
753
+
754
+ Retorna se existe algum DataUnit detail com alterações pendentes.
755
+
756
+ #### Returns
757
+
758
+ `boolean`
759
+
760
+ Verdadeiro se existir alterações pendentes em algum DataUnit detail.
761
+
762
+ #### Defined in
763
+
764
+ src/dataunit/DataUnit.ts:1148
765
+
766
+ ___
767
+
768
+ ### clearDataUnit
769
+
770
+ ▸ **clearDataUnit**(): `void`
771
+
772
+ Limpa todos os registros do DataUnit
773
+
774
+ #### Returns
775
+
776
+ `void`
777
+
778
+ #### Defined in
779
+
780
+ src/dataunit/DataUnit.ts:1052
781
+
782
+ ___
783
+
784
+ ### clearInvalid
785
+
786
+ ▸ **clearInvalid**(`recordId`, `fieldName?`): `void`
787
+
788
+ Limpa campos inválidos.
789
+
790
+ #### Parameters
791
+
792
+ | Name | Type | Description |
793
+ | :------ | :------ | :------ |
794
+ | `recordId` | `string` | Indica em qual registro o campo não está mais inválido. |
795
+ | `fieldName?` | `string` | Nome do campo. Caso omitido, todos os campos serão limpos. |
796
+
797
+ #### Returns
798
+
799
+ `void`
800
+
801
+ #### Defined in
802
+
803
+ src/dataunit/DataUnit.ts:873
804
+
805
+ ___
806
+
807
+ ### clearSelection
808
+
809
+ ▸ **clearSelection**(`executionCtx?`): `void`
810
+
811
+ Limpa a seleção.
812
+
813
+ #### Parameters
814
+
815
+ | Name | Type | Description |
816
+ | :------ | :------ | :------ |
817
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da seleção dos registros do DataUnit. |
818
+
819
+ #### Returns
820
+
821
+ `void`
822
+
823
+ #### Defined in
824
+
825
+ src/dataunit/DataUnit.ts:983
826
+
827
+ ___
828
+
829
+ ### copySelected
830
+
831
+ ▸ **copySelected**(`executionCtx?`): `void`
832
+
833
+ Efetua a cópia do registro selecionado.
834
+
835
+ #### Parameters
836
+
837
+ | Name | Type | Description |
838
+ | :------ | :------ | :------ |
839
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da cópia do dado do DataUnit. |
840
+
841
+ #### Returns
842
+
843
+ `void`
844
+
845
+ #### Defined in
846
+
847
+ src/dataunit/DataUnit.ts:765
848
+
849
+ ___
850
+
851
+ ### disableField
852
+
853
+ ▸ **disableField**(`fieldName`): `void`
854
+
855
+ Desabilita um campo do DataUnit
856
+
857
+ #### Parameters
858
+
859
+ | Name | Type | Description |
860
+ | :------ | :------ | :------ |
861
+ | `fieldName` | `string` | nome do campo para ficar desabilitado. |
862
+
863
+ #### Returns
864
+
865
+ `void`
866
+
867
+ #### Defined in
868
+
869
+ src/dataunit/DataUnit.ts:1521
870
+
871
+ ___
872
+
873
+ ### dispatchAction
874
+
875
+ ▸ `Private` **dispatchAction**(`actionType`, `payload?`, `executionCtx?`): `Promise`<`boolean`\>
876
+
877
+ Lança ação do DataUnit para que sejam processadas.
878
+
879
+ #### Parameters
880
+
881
+ | Name | Type | Description |
882
+ | :------ | :------ | :------ |
883
+ | `actionType` | [`Action`](../enums/Action.md) | Tipo de ação que será executada. |
884
+ | `payload?` | `any` | Dados que serão processados na ação. |
885
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução de lançar a ação que será executada. |
886
+
887
+ #### Returns
888
+
889
+ `Promise`<`boolean`\>
890
+
891
+ - Verdadeiro se ação iniciada.
892
+
893
+ #### Defined in
894
+
895
+ src/dataunit/DataUnit.ts:1313
896
+
897
+ ___
898
+
899
+ ### doDispatchAction
900
+
901
+ ▸ `Private` **doDispatchAction**(`action`): `void`
902
+
903
+ Processa as ações no DataUnit e notifica os observers.
904
+
905
+ #### Parameters
906
+
907
+ | Name | Type | Description |
908
+ | :------ | :------ | :------ |
909
+ | `action` | [`DataUnitAction`](DataUnitAction.md) | Ações em execução no DataUnit. |
910
+
911
+ #### Returns
912
+
913
+ `void`
914
+
915
+ #### Defined in
916
+
917
+ src/dataunit/DataUnit.ts:1361
918
+
919
+ ___
920
+
921
+ ### enableField
922
+
923
+ ▸ **enableField**(`fieldName`): `void`
924
+
925
+ Habilita um campo do DataUnit
926
+
927
+ #### Parameters
928
+
929
+ | Name | Type | Description |
930
+ | :------ | :------ | :------ |
931
+ | `fieldName` | `string` | nome do campo para ser habilitado. |
932
+
933
+ #### Returns
934
+
935
+ `void`
936
+
937
+ #### Defined in
938
+
939
+ src/dataunit/DataUnit.ts:1506
940
+
941
+ ___
942
+
943
+ ### executeLoadData
944
+
945
+ ▸ `Private` **executeLoadData**(`request`, `executionCtx?`, `checkLastFilter?`): `Promise`<[`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
946
+
947
+ Executa o carregamento dos registros.
948
+
949
+ #### Parameters
950
+
951
+ | Name | Type | Description |
952
+ | :------ | :------ | :------ |
953
+ | `request` | [`LoadDataRequest`](../interfaces/LoadDataRequest.md) | Dados da requisição para carregamento dos registros. |
954
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução do carregamento dos registros do DataUnit. |
955
+ | `checkLastFilter?` | `boolean` | Habilita a verificação da última requisição, evitando carga desnecessária. |
956
+
957
+ #### Returns
958
+
959
+ `Promise`<[`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
960
+
961
+ - Registros do DataUnit.
962
+
963
+ #### Defined in
964
+
965
+ src/dataunit/DataUnit.ts:171
966
+
967
+ ___
968
+
969
+ ### getAddedRecords
970
+
971
+ ▸ **getAddedRecords**(): [`Record`](../interfaces/Record.md)[]
972
+
973
+ Obtém os registros adicionados no DataUnit.
974
+
975
+ #### Returns
976
+
977
+ [`Record`](../interfaces/Record.md)[]
978
+
979
+ - Lista dos registros adicionados.
980
+
981
+ #### Defined in
982
+
983
+ src/dataunit/DataUnit.ts:731
984
+
985
+ ___
986
+
987
+ ### getAllChangesToSave
988
+
989
+ ▸ **getAllChangesToSave**(): [`Change`](Change.md)[]
990
+
991
+ Retorna todas as alterações do DataUnit a serem salvas, incluindo no nível Master e Detail.
992
+
993
+ #### Returns
994
+
995
+ [`Change`](Change.md)[]
996
+
997
+ - Todas as mudanças realizadas no DataUnit, tanto Master quanto Detail;
998
+
999
+ #### Defined in
1000
+
1001
+ src/dataunit/DataUnit.ts:438
1002
+
1003
+ ___
1004
+
1005
+ ### getAppliedFilters
1006
+
1007
+ ▸ **getAppliedFilters**(): `undefined` \| [`Filter`](../interfaces/Filter.md)[]
1008
+
1009
+ Obtém os filtros aplicados.
1010
+
1011
+ #### Returns
1012
+
1013
+ `undefined` \| [`Filter`](../interfaces/Filter.md)[]
1014
+
1015
+ - Lista de filtros.
1016
+
1017
+ #### Defined in
1018
+
1019
+ src/dataunit/DataUnit.ts:1495
1020
+
1021
+ ___
1022
+
1023
+ ### getChildDataunit
1024
+
1025
+ ▸ **getChildDataunit**(`name`): [`DataUnit`](DataUnit.md)
1026
+
1027
+ Cria um dataunit filho.
1028
+
1029
+ #### Parameters
1030
+
1031
+ | Name | Type | Description |
1032
+ | :------ | :------ | :------ |
1033
+ | `name` | `string` | Nome do dataunit filho. |
1034
+
1035
+ #### Returns
1036
+
1037
+ [`DataUnit`](DataUnit.md)
1038
+
1039
+ #### Defined in
1040
+
1041
+ src/dataunit/DataUnit.ts:1384
1042
+
1043
+ ___
1044
+
1045
+ ### getChildInfo
1046
+
1047
+ ▸ **getChildInfo**(`name`): `undefined` \| [`ChildDescriptor`](../interfaces/ChildDescriptor.md)
1048
+
1049
+ Obtém informações da ligação para um DataUnit filho.
1050
+
1051
+ #### Parameters
1052
+
1053
+ | Name | Type | Description |
1054
+ | :------ | :------ | :------ |
1055
+ | `name` | `string` | Nome do DataUnit que se deseja. |
1056
+
1057
+ #### Returns
1058
+
1059
+ `undefined` \| [`ChildDescriptor`](../interfaces/ChildDescriptor.md)
1060
+
1061
+ - As informações sobre a ligação solicitada. Pode retornar undefined.
1062
+
1063
+ #### Defined in
1064
+
1065
+ src/dataunit/DataUnit.ts:660
1066
+
1067
+ ___
1068
+
1069
+ ### getField
1070
+
1071
+ ▸ **getField**(`fieldName`): `undefined` \| [`FieldDescriptor`](../interfaces/FieldDescriptor.md)
1072
+
1073
+ Obtém metadados de um campo específico.
1074
+
1075
+ #### Parameters
1076
+
1077
+ | Name | Type | Description |
1078
+ | :------ | :------ | :------ |
1079
+ | `fieldName` | `string` | Identificador do campo. |
1080
+
1081
+ #### Returns
1082
+
1083
+ `undefined` \| [`FieldDescriptor`](../interfaces/FieldDescriptor.md)
1084
+
1085
+ - Metadados do campo informado.
1086
+
1087
+ #### Defined in
1088
+
1089
+ src/dataunit/DataUnit.ts:743
1090
+
1091
+ ___
1092
+
1093
+ ### getFieldValue
1094
+
1095
+ ▸ **getFieldValue**(`fieldName`): `any`
1096
+
1097
+ Obtém valor do campo desejado.
1098
+
1099
+ #### Parameters
1100
+
1101
+ | Name | Type | Description |
1102
+ | :------ | :------ | :------ |
1103
+ | `fieldName` | `string` | Identificador do campo a ser buscado. |
1104
+
1105
+ #### Returns
1106
+
1107
+ `any`
1108
+
1109
+ - Valor do campo.
1110
+
1111
+ #### Defined in
1112
+
1113
+ src/dataunit/DataUnit.ts:824
1114
+
1115
+ ___
1116
+
1117
+ ### getFielterProviderKey
1118
+
1119
+ ▸ `Private` **getFielterProviderKey**(`provider`): `string`
1120
+
1121
+ Obtém chave única para identificação do FilterProvider.
1122
+
1123
+ #### Parameters
1124
+
1125
+ | Name | Type | Description |
1126
+ | :------ | :------ | :------ |
1127
+ | `provider` | `FilterProvider` | Interface FilterProvider na qual será retornada uma chave correspondente. |
1128
+
1129
+ #### Returns
1130
+
1131
+ `string`
1132
+
1133
+ - A chave do provider.
1134
+
1135
+ #### Defined in
1136
+
1137
+ src/dataunit/DataUnit.ts:153
1138
+
1139
+ ___
1140
+
1141
+ ### getFilters
1142
+
1143
+ ▸ **getFilters**(): `undefined` \| [`Filter`](../interfaces/Filter.md)[]
1144
+
1145
+ Obtém todos os filtros de dados.
1146
+
1147
+ #### Returns
1148
+
1149
+ `undefined` \| [`Filter`](../interfaces/Filter.md)[]
1150
+
1151
+ - Lista de filtros.
1152
+
1153
+ #### Defined in
1154
+
1155
+ src/dataunit/DataUnit.ts:1466
1156
+
1157
+ ___
1158
+
1159
+ ### getFormattedValue
1160
+
1161
+ ▸ **getFormattedValue**(`fieldName`, `value?`): `string`
1162
+
1163
+ Formata o valor do campo considerando as informações do descriptor.
1164
+ Diferente do método "valueToString" que retorna o dado em valor textual,
1165
+ getFormattedValue retorna uma informação amigável ao usuário, geralmente
1166
+ usada na interface.
1167
+
1168
+ #### Parameters
1169
+
1170
+ | Name | Type | Description |
1171
+ | :------ | :------ | :------ |
1172
+ | `fieldName` | `string` | Nome do campo utilizado do qual se quer obter valor. |
1173
+ | `value?` | `any` | (opcional) - O valor a ser convertido. Caso omitido pega do registro selecionado. |
1174
+
1175
+ #### Returns
1176
+
1177
+ `string`
1178
+
1179
+ - Valor formatado.
1180
+
1181
+ #### Defined in
1182
+
1183
+ src/dataunit/DataUnit.ts:563
1184
+
1185
+ ___
1186
+
1187
+ ### getInvalidMessage
1188
+
1189
+ ▸ **getInvalidMessage**(`recordId`, `fieldName`): `undefined` \| `string`
1190
+
1191
+ Obtém a mensagem de campo inválido para determinado registro.
1192
+
1193
+ #### Parameters
1194
+
1195
+ | Name | Type | Description |
1196
+ | :------ | :------ | :------ |
1197
+ | `recordId` | `string` | Identificador do registro. |
1198
+ | `fieldName` | `string` | Nome do campo. |
1199
+
1200
+ #### Returns
1201
+
1202
+ `undefined` \| `string`
1203
+
1204
+ #### Defined in
1205
+
1206
+ src/dataunit/DataUnit.ts:885
1207
+
1208
+ ___
1209
+
1210
+ ### getLastLoadRequest
1211
+
1212
+ ▸ **getLastLoadRequest**(): `undefined` \| [`LoadDataRequest`](../interfaces/LoadDataRequest.md)
1213
+
1214
+ Obtém as informações da última carga de dados.
1215
+
1216
+ #### Returns
1217
+
1218
+ `undefined` \| [`LoadDataRequest`](../interfaces/LoadDataRequest.md)
1219
+
1220
+ - As informações de filtro e paginação.
1221
+
1222
+ #### Defined in
1223
+
1224
+ src/dataunit/DataUnit.ts:1484
1225
+
1226
+ ___
1227
+
1228
+ ### getLoadDataRequest
1229
+
1230
+ ▸ `Private` **getLoadDataRequest**(`quickFilter?`): [`LoadDataRequest`](../interfaces/LoadDataRequest.md)
1231
+
1232
+ #### Parameters
1233
+
1234
+ | Name | Type |
1235
+ | :------ | :------ |
1236
+ | `quickFilter?` | [`QuickFilter`](../interfaces/QuickFilter.md) |
1237
+
1238
+ #### Returns
1239
+
1240
+ [`LoadDataRequest`](../interfaces/LoadDataRequest.md)
1241
+
1242
+ #### Defined in
1243
+
1244
+ src/dataunit/DataUnit.ts:319
1245
+
1246
+ ___
1247
+
1248
+ ### getModifiedRecords
1249
+
1250
+ ▸ **getModifiedRecords**(): [`Record`](../interfaces/Record.md)[]
1251
+
1252
+ Obtém os registros modificados e ainda não salvos no DataUnit.
1253
+
1254
+ #### Returns
1255
+
1256
+ [`Record`](../interfaces/Record.md)[]
1257
+
1258
+ - Lista dos registros em edição.
1259
+
1260
+ #### Defined in
1261
+
1262
+ src/dataunit/DataUnit.ts:719
1263
+
1264
+ ___
1265
+
1266
+ ### getPaginationInfo
1267
+
1268
+ ▸ **getPaginationInfo**(): `void` \| [`PaginationInfo`](../interfaces/PaginationInfo.md)
1269
+
1270
+ Obtém informações de paginação dos registros.
1271
+
1272
+ #### Returns
1273
+
1274
+ `void` \| [`PaginationInfo`](../interfaces/PaginationInfo.md)
1275
+
1276
+ - Informações da paginação de registros.
1277
+
1278
+ #### Defined in
1279
+
1280
+ src/dataunit/DataUnit.ts:618
1281
+
1282
+ ___
1283
+
1284
+ ### getParentRecordId
1285
+
1286
+ ▸ `Private` **getParentRecordId**(): `undefined` \| `string`
1287
+
1288
+ #### Returns
1289
+
1290
+ `undefined` \| `string`
1291
+
1292
+ #### Defined in
1293
+
1294
+ src/dataunit/DataUnit.ts:797
1295
+
1296
+ ___
1297
+
1298
+ ### getRecordsByDataUnit
1299
+
1300
+ ▸ `Private` **getRecordsByDataUnit**(`records`): `Map`<`string`, [`Record`](../interfaces/Record.md)[]\>
1301
+
1302
+ #### Parameters
1303
+
1304
+ | Name | Type |
1305
+ | :------ | :------ |
1306
+ | `records` | [`Record`](../interfaces/Record.md)[] |
1307
+
1308
+ #### Returns
1309
+
1310
+ `Map`<`string`, [`Record`](../interfaces/Record.md)[]\>
1311
+
1312
+ #### Defined in
1313
+
1314
+ src/dataunit/DataUnit.ts:775
1315
+
1316
+ ___
1317
+
1318
+ ### getSelectedRecord
1319
+
1320
+ ▸ **getSelectedRecord**(): `undefined` \| [`Record`](../interfaces/Record.md)
1321
+
1322
+ Retorna apenas um registro selecionado no Dataunit
1323
+
1324
+ #### Returns
1325
+
1326
+ `undefined` \| [`Record`](../interfaces/Record.md)
1327
+
1328
+ - Registro selecionado.
1329
+
1330
+ #### Defined in
1331
+
1332
+ src/dataunit/DataUnit.ts:1040
1333
+
1334
+ ___
1335
+
1336
+ ### getSelectedRecords
1337
+
1338
+ ▸ **getSelectedRecords**(): `undefined` \| [`Record`](../interfaces/Record.md)[]
1339
+
1340
+ Obtém todos os registros selecionados.
1341
+
1342
+ **`Deprecated`**
1343
+
1344
+ - Utilize o método `getSelectionInfo()` para obter os registros selecionados.
1345
+ Devido a seleção virtual baseada em critérios e ordenação (ALL_RECORDS), esse
1346
+ método foi descontinuado e pode retornar erros no caso da seleção virtual.
1347
+
1348
+ #### Returns
1349
+
1350
+ `undefined` \| [`Record`](../interfaces/Record.md)[]
1351
+
1352
+ - Lista de registros selecionados.
1353
+
1354
+ #### Defined in
1355
+
1356
+ src/dataunit/DataUnit.ts:1571
1357
+
1358
+ ___
1359
+
1360
+ ### getSelection
1361
+
1362
+ ▸ **getSelection**(): `string`[]
1363
+
1364
+ Obtém ids dos registros selecionados.
1365
+
1366
+ **`Deprecated`**
1367
+
1368
+ - Utilize o método `getSelectionInfo()` para obter os registros selecionados.
1369
+ Devido a seleção virtual baseada em critérios e ordenação (ALL_RECORDS), esse
1370
+ método foi descontinuado e pode retornar erros no caso da seleção virtual.
1371
+
1372
+ #### Returns
1373
+
1374
+ `string`[]
1375
+
1376
+ - Lista com id de todos os registros selecionados.
1377
+
1378
+ #### Defined in
1379
+
1380
+ src/dataunit/DataUnit.ts:1595
1381
+
1382
+ ___
1383
+
1384
+ ### getSelectionInfo
1385
+
1386
+ ▸ **getSelectionInfo**(): `undefined` \| [`SelectionInfo`](SelectionInfo.md)
1387
+
1388
+ Obtém informações sobre a seleção atual.
1389
+
1390
+ #### Returns
1391
+
1392
+ `undefined` \| [`SelectionInfo`](SelectionInfo.md)
1393
+
1394
+ - Objeto com informações como registros selecionados e seleção por critério.
1395
+
1396
+ #### Defined in
1397
+
1398
+ src/dataunit/DataUnit.ts:1029
1399
+
1400
+ ___
1401
+
1402
+ ### getSort
1403
+
1404
+ ▸ **getSort**(): `undefined` \| [`Sort`](../interfaces/Sort.md)[]
1405
+
1406
+ Obtém a estrutura de ordenação das colunas dos dados.
1407
+
1408
+ #### Returns
1409
+
1410
+ `undefined` \| [`Sort`](../interfaces/Sort.md)[]
1411
+
1412
+ - Lista dos ordenáveis por prioridade.
1413
+
1414
+ #### Defined in
1415
+
1416
+ src/dataunit/DataUnit.ts:1455
1417
+
1418
+ ___
1419
+
1420
+ ### gotoPage
1421
+
1422
+ ▸ **gotoPage**(`page`, `executionCtx?`): `Promise`<`void` \| [`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
1423
+
1424
+ Alterna entre os registros por número de página.
1425
+
1426
+ #### Parameters
1427
+
1428
+ | Name | Type | Description |
1429
+ | :------ | :------ | :------ |
1430
+ | `page` | `number` | Número da página desejada. |
1431
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução do carregamento dos registros do DataUnit. |
1432
+
1433
+ #### Returns
1434
+
1435
+ `Promise`<`void` \| [`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
1436
+
1437
+ - Registros da página desejada.
1438
+
1439
+ #### Defined in
1440
+
1441
+ src/dataunit/DataUnit.ts:272
1442
+
1443
+ ___
1444
+
1445
+ ### hasCopiedRecord
1446
+
1447
+ ▸ **hasCopiedRecord**(): `boolean`
1448
+
1449
+ Retorna se existe pelo menos um registro novo.
1450
+
1451
+ #### Returns
1452
+
1453
+ `boolean`
1454
+
1455
+ Verdadeiro se algum registro foi adicionado.
1456
+
1457
+ #### Defined in
1458
+
1459
+ src/dataunit/DataUnit.ts:1232
1460
+
1461
+ ___
1462
+
1463
+ ### hasDirtyRecords
1464
+
1465
+ ▸ **hasDirtyRecords**(): `boolean`
1466
+
1467
+ Retorna se existe algum registro em modo de edição.
1468
+
1469
+ #### Returns
1470
+
1471
+ `boolean`
1472
+
1473
+ Verdadeiro se existir alterações de registros pendentes.
1474
+
1475
+ #### Defined in
1476
+
1477
+ src/dataunit/DataUnit.ts:1162
1478
+
1479
+ ___
1480
+
1481
+ ### hasNewRecord
1482
+
1483
+ ▸ **hasNewRecord**(): `boolean`
1484
+
1485
+ Retorna se existe pelo menos um registro novo.
1486
+
1487
+ #### Returns
1488
+
1489
+ `boolean`
1490
+
1491
+ Verdadeiro se algum registro foi adicionado.
1492
+
1493
+ #### Defined in
1494
+
1495
+ src/dataunit/DataUnit.ts:1220
1496
+
1497
+ ___
1498
+
1499
+ ### hasNext
1500
+
1501
+ ▸ **hasNext**(): `boolean`
1502
+
1503
+ Retorna se existir uma pagina seguinte a atual na paginação.
1504
+
1505
+ #### Returns
1506
+
1507
+ `boolean`
1508
+
1509
+ Verdadeiro se existir uma próxima página.
1510
+
1511
+ #### Defined in
1512
+
1513
+ src/dataunit/DataUnit.ts:1173
1514
+
1515
+ ___
1516
+
1517
+ ### hasPrevious
1518
+
1519
+ ▸ **hasPrevious**(): `boolean`
1520
+
1521
+ Retorna se existe uma página anterior a atual na paginação.
1522
+
1523
+ #### Returns
1524
+
1525
+ `boolean`
1526
+
1527
+ Verdadeiro se existir uma página anterior.
1528
+
1529
+ #### Defined in
1530
+
1531
+ src/dataunit/DataUnit.ts:1188
1532
+
1533
+ ___
1534
+
1535
+ ### hasWaitingChanges
1536
+
1537
+ ▸ **hasWaitingChanges**(): `boolean`
1538
+
1539
+ Retorna se existe alterações pendentes.
1540
+
1541
+ #### Returns
1542
+
1543
+ `boolean`
1544
+
1545
+ Verdadeiro se existir pendências de modificações.
1546
+
1547
+ #### Defined in
1548
+
1549
+ src/dataunit/DataUnit.ts:916
1550
+
1551
+ ___
1552
+
1553
+ ### hideField
1554
+
1555
+ ▸ **hideField**(`fieldName`): `void`
1556
+
1557
+ Deixa um campo do DataUnit invisível
1558
+
1559
+ #### Parameters
1560
+
1561
+ | Name | Type | Description |
1562
+ | :------ | :------ | :------ |
1563
+ | `fieldName` | `string` | nome do campo para ficar invisível. |
1564
+
1565
+ #### Returns
1566
+
1567
+ `void`
1568
+
1569
+ #### Defined in
1570
+
1571
+ src/dataunit/DataUnit.ts:1536
1572
+
1573
+ ___
1574
+
1575
+ ### intercept
1576
+
1577
+ ▸ `Private` **intercept**(`action`, `interceptors`): `Promise`<[`DataUnitAction`](DataUnitAction.md)\>
1578
+
1579
+ Notifica os interceptors de que uma ação foi executada, para que cada interceptor possa fazer sua respectiva tratativa dos dados.
1580
+
1581
+ #### Parameters
1582
+
1583
+ | Name | Type | Description |
1584
+ | :------ | :------ | :------ |
1585
+ | `action` | [`DataUnitAction`](DataUnitAction.md) | Ação que foi executada. |
1586
+ | `interceptors` | `IterableIterator`<[`DUActionInterceptor`](../interfaces/DUActionInterceptor.md)\> | Interceptors que serão notificados. |
1587
+
1588
+ #### Returns
1589
+
1590
+ `Promise`<[`DataUnitAction`](DataUnitAction.md)\>
1591
+
1592
+ - Ação executada no DataUnit.
1593
+
1594
+ #### Defined in
1595
+
1596
+ src/dataunit/DataUnit.ts:1344
1597
+
1598
+ ___
1599
+
1600
+ ### isDirty
1601
+
1602
+ ▸ **isDirty**(): `boolean`
1603
+
1604
+ Retorna se existe algum tipo de alteração pendente.
1605
+
1606
+ #### Returns
1607
+
1608
+ `boolean`
1609
+
1610
+ Verdadeiro se existir alterações pendentes.
1611
+
1612
+ #### Defined in
1613
+
1614
+ src/dataunit/DataUnit.ts:1137
1615
+
1616
+ ___
1617
+
1618
+ ### isNewRecord
1619
+
1620
+ ▸ **isNewRecord**(`recordId`): `boolean`
1621
+
1622
+ Verifica se um registro é proveniente de inclusão.
1623
+
1624
+ #### Parameters
1625
+
1626
+ | Name | Type | Description |
1627
+ | :------ | :------ | :------ |
1628
+ | `recordId` | `string` | O id do registro a ser verificado. |
1629
+
1630
+ #### Returns
1631
+
1632
+ `boolean`
1633
+
1634
+ Verdadeiro se o id solicitado é de um registro novo.
1635
+
1636
+ #### Defined in
1637
+
1638
+ src/dataunit/DataUnit.ts:1204
1639
+
1640
+ ___
1641
+
1642
+ ### isSameRequest
1643
+
1644
+ ▸ `Private` **isSameRequest**(`request`): `boolean`
1645
+
1646
+ #### Parameters
1647
+
1648
+ | Name | Type |
1649
+ | :------ | :------ |
1650
+ | `request` | [`LoadDataRequest`](../interfaces/LoadDataRequest.md) |
1651
+
1652
+ #### Returns
1653
+
1654
+ `boolean`
1655
+
1656
+ #### Defined in
1657
+
1658
+ src/dataunit/DataUnit.ts:201
1659
+
1660
+ ___
1661
+
1662
+ ### loadData
1663
+
1664
+ ▸ **loadData**(`quickFilter?`, `executionCtx?`, `checkLastFilter?`): `Promise`<[`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
1665
+
1666
+ Carrega os registros do DataUnit.
1667
+
1668
+ #### Parameters
1669
+
1670
+ | Name | Type | Description |
1671
+ | :------ | :------ | :------ |
1672
+ | `quickFilter?` | [`QuickFilter`](../interfaces/QuickFilter.md) | Filtros a serem aplicados. |
1673
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução do carregamento dos registros. |
1674
+ | `checkLastFilter?` | `boolean` | Habilita a verificação da última requisição, evitando carga desnecessária. |
1675
+
1676
+ #### Returns
1677
+
1678
+ `Promise`<[`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
1679
+
1680
+ - Registros requisitados.
1681
+
1682
+ #### Defined in
1683
+
1684
+ src/dataunit/DataUnit.ts:245
1685
+
1686
+ ___
1687
+
1688
+ ### loadMetadata
1689
+
1690
+ ▸ **loadMetadata**(`executionCtx?`): `Promise`<`void` \| [`UnitMetadata`](../interfaces/UnitMetadata.md)\>
1691
+
1692
+ Carrega os metadados do DataUnit.
1693
+
1694
+ #### Parameters
1695
+
1696
+ | Name | Type | Description |
1697
+ | :------ | :------ | :------ |
1698
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução do carregamento dos metadados do DataUnit. |
1699
+
1700
+ #### Returns
1701
+
1702
+ `Promise`<`void` \| [`UnitMetadata`](../interfaces/UnitMetadata.md)\>
1703
+
1704
+ - Metadados carregados.
1705
+
1706
+ #### Defined in
1707
+
1708
+ src/dataunit/DataUnit.ts:216
1709
+
1710
+ ___
1711
+
1712
+ ### nextPage
1713
+
1714
+ ▸ **nextPage**(`executionCtx?`): `Promise`<`void` \| [`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
1715
+
1716
+ Vai para os registros da página seguinte.
1717
+
1718
+ #### Parameters
1719
+
1720
+ | Name | Type | Description |
1721
+ | :------ | :------ | :------ |
1722
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução do carregamento dos registros do DataUnit. |
1723
+
1724
+ #### Returns
1725
+
1726
+ `Promise`<`void` \| [`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
1727
+
1728
+ - Registros da página seguinte.
1729
+
1730
+ #### Defined in
1731
+
1732
+ src/dataunit/DataUnit.ts:302
1733
+
1734
+ ___
1735
+
1736
+ ### nextRecord
1737
+
1738
+ ▸ **nextRecord**(`executionCtx?`): `void`
1739
+
1740
+ Seleciona o próximo registro.
1741
+
1742
+ #### Parameters
1743
+
1744
+ | Name | Type | Description |
1745
+ | :------ | :------ | :------ |
1746
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da seleção do registro do DataUnit. |
1747
+
1748
+ #### Returns
1749
+
1750
+ `void`
1751
+
1752
+ #### Defined in
1753
+
1754
+ src/dataunit/DataUnit.ts:1064
1755
+
1756
+ ___
1757
+
1758
+ ### notifySavingData
1759
+
1760
+ ▸ `Private` **notifySavingData**(`executionCtx?`): `Promise`<`boolean`\>
1761
+
1762
+ #### Parameters
1763
+
1764
+ | Name | Type |
1765
+ | :------ | :------ |
1766
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) |
1767
+
1768
+ #### Returns
1769
+
1770
+ `Promise`<`boolean`\>
1771
+
1772
+ #### Defined in
1773
+
1774
+ src/dataunit/DataUnit.ts:338
1775
+
1776
+ ___
1777
+
1778
+ ### onDataUnitParentEvent
1779
+
1780
+ ▸ `Private` **onDataUnitParentEvent**(`action`): `void`
1781
+
1782
+ Trata as Actions do DataUnit Parent
1783
+
1784
+ #### Parameters
1785
+
1786
+ | Name | Type |
1787
+ | :------ | :------ |
1788
+ | `action` | [`DataUnitAction`](DataUnitAction.md) |
1789
+
1790
+ #### Returns
1791
+
1792
+ `void`
1793
+
1794
+ #### Defined in
1795
+
1796
+ src/dataunit/DataUnit.ts:129
1797
+
1798
+ ___
1799
+
1800
+ ### previousPage
1801
+
1802
+ ▸ **previousPage**(`executionCtx?`): `Promise`<`void` \| [`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
1803
+
1804
+ Vai para os registros da página anterior.
1805
+
1806
+ #### Parameters
1807
+
1808
+ | Name | Type | Description |
1809
+ | :------ | :------ | :------ |
1810
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução do carregamento dos registros do DataUnit. |
1811
+
1812
+ #### Returns
1813
+
1814
+ `Promise`<`void` \| [`LoadDataResponse`](../interfaces/LoadDataResponse.md)\>
1815
+
1816
+ - Registros da página anterior.
1817
+
1818
+ #### Defined in
1819
+
1820
+ src/dataunit/DataUnit.ts:315
1821
+
1822
+ ___
1823
+
1824
+ ### previousRecord
1825
+
1826
+ ▸ **previousRecord**(`executionCtx?`): `void`
1827
+
1828
+ Seleciona o registro anterior.
1829
+
1830
+ #### Parameters
1831
+
1832
+ | Name | Type | Description |
1833
+ | :------ | :------ | :------ |
1834
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da seleção do registro do DataUnit. |
1835
+
1836
+ #### Returns
1837
+
1838
+ `void`
1839
+
1840
+ #### Defined in
1841
+
1842
+ src/dataunit/DataUnit.ts:1091
1843
+
1844
+ ___
1845
+
1846
+ ### processLoadingLockers
1847
+
1848
+ ▸ `Private` **processLoadingLockers**(): `Promise`<`void`\>
1849
+
1850
+ #### Returns
1851
+
1852
+ `Promise`<`void`\>
1853
+
1854
+ #### Defined in
1855
+
1856
+ src/dataunit/DataUnit.ts:1620
1857
+
1858
+ ___
1859
+
1860
+ ### redo
1861
+
1862
+ ▸ **redo**(`executionCtx?`): `void`
1863
+
1864
+ Refaz a última ação.
1865
+
1866
+ #### Parameters
1867
+
1868
+ | Name | Type | Description |
1869
+ | :------ | :------ | :------ |
1870
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução de refazer a última ação. |
1871
+
1872
+ #### Returns
1873
+
1874
+ `void`
1875
+
1876
+ #### Defined in
1877
+
1878
+ src/dataunit/DataUnit.ts:1286
1879
+
1880
+ ___
1881
+
1882
+ ### release
1883
+
1884
+ ▸ **release**(): `void`
1885
+
1886
+ Desfaz vinculos do DataUnit. Chamado quando o DU não é mais necessário.
1887
+
1888
+ #### Returns
1889
+
1890
+ `void`
1891
+
1892
+ #### Defined in
1893
+
1894
+ src/dataunit/DataUnit.ts:85
1895
+
1896
+ ___
1897
+
1898
+ ### reloadCurrentRecord
1899
+
1900
+ ▸ **reloadCurrentRecord**(): `Promise`<[`Record`](../interfaces/Record.md)[]\>
1901
+
1902
+ Recarrega registro selecionado com dados atualizados do servidor.
1903
+
1904
+ #### Returns
1905
+
1906
+ `Promise`<[`Record`](../interfaces/Record.md)[]\>
1907
+
1908
+ - Dados atualizados do registro selecionado.
1909
+
1910
+ #### Defined in
1911
+
1912
+ src/dataunit/DataUnit.ts:1431
1913
+
1914
+ ___
1915
+
1916
+ ### removeChildDataunit
1917
+
1918
+ ▸ **removeChildDataunit**(`name`): `void`
1919
+
1920
+ Remove um dataunit filho.
1921
+
1922
+ #### Parameters
1923
+
1924
+ | Name | Type | Description |
1925
+ | :------ | :------ | :------ |
1926
+ | `name` | `string` | Nome do dataunit filho. |
1927
+
1928
+ #### Returns
1929
+
1930
+ `void`
1931
+
1932
+ #### Defined in
1933
+
1934
+ src/dataunit/DataUnit.ts:1397
1935
+
1936
+ ___
1937
+
1938
+ ### removeInterceptor
1939
+
1940
+ ▸ **removeInterceptor**(`interceptor`): `void`
1941
+
1942
+ Remove um interceptor da lista de interceptors.
1943
+
1944
+ #### Parameters
1945
+
1946
+ | Name | Type | Description |
1947
+ | :------ | :------ | :------ |
1948
+ | `interceptor` | [`DUActionInterceptor`](../interfaces/DUActionInterceptor.md) | Interceptor a ser removido. |
1949
+
1950
+ #### Returns
1951
+
1952
+ `void`
1953
+
1954
+ #### Defined in
1955
+
1956
+ src/dataunit/DataUnit.ts:597
1957
+
1958
+ ___
1959
+
1960
+ ### removeRecords
1961
+
1962
+ ▸ **removeRecords**(`recordIds`, `cachedRecords`, `buffered?`, `executionCtx?`, `silent?`): `Promise`<`string`[]\>
1963
+
1964
+ Efetua requisição para remoção dos registros.
1965
+
1966
+ #### Parameters
1967
+
1968
+ | Name | Type | Default value | Description |
1969
+ | :------ | :------ | :------ | :------ |
1970
+ | `recordIds` | `string`[] | `undefined` | Lista de IDs dos registros que serão removidos. |
1971
+ | `cachedRecords` | [`Record`](../interfaces/Record.md)[] | `undefined` | Dados dos registros que serão removidos. |
1972
+ | `buffered` | `boolean` | `false` | Se será utilizado buffer na solicitação. |
1973
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | `undefined` | Contexto de execução da remoção do registro do DataUnit. |
1974
+ | `silent` | `boolean` | `false` | Define se haverá mensagem de confirmação da remoção |
1975
+
1976
+ #### Returns
1977
+
1978
+ `Promise`<`string`[]\>
1979
+
1980
+ - ID's dos registros removidos.
1981
+
1982
+ #### Defined in
1983
+
1984
+ src/dataunit/DataUnit.ts:481
1985
+
1986
+ ___
1987
+
1988
+ ### removeSelectedRecords
1989
+
1990
+ ▸ **removeSelectedRecords**(`buffered?`, `silent?`): `Promise`<`string`[]\>
1991
+
1992
+ Remove o registro selecionado.
1993
+
1994
+ #### Parameters
1995
+
1996
+ | Name | Type | Default value | Description |
1997
+ | :------ | :------ | :------ | :------ |
1998
+ | `buffered` | `boolean` | `false` | Se será utilizado buffer na solicitação. |
1999
+ | `silent` | `boolean` | `false` | Define se haverá mensagem de confirmação da remoção |
2000
+
2001
+ #### Returns
2002
+
2003
+ `Promise`<`string`[]\>
2004
+
2005
+ - ID's dos registros removidos.
2006
+
2007
+ #### Defined in
2008
+
2009
+ src/dataunit/DataUnit.ts:455
2010
+
2011
+ ___
2012
+
2013
+ ### saveData
2014
+
2015
+ ▸ **saveData**(`executionCtx?`): `Promise`<`void`\>
2016
+
2017
+ Salva o estado do registro do DataUnit.
2018
+
2019
+ #### Parameters
2020
+
2021
+ | Name | Type | Description |
2022
+ | :------ | :------ | :------ |
2023
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da persistencia do registro do DataUnit. |
2024
+
2025
+ #### Returns
2026
+
2027
+ `Promise`<`void`\>
2028
+
2029
+ - Resposta da solicitação.
2030
+
2031
+ #### Defined in
2032
+
2033
+ src/dataunit/DataUnit.ts:362
2034
+
2035
+ ___
2036
+
2037
+ ### selectFirst
2038
+
2039
+ ▸ **selectFirst**(`executionCtx?`): `void`
2040
+
2041
+ Seleciona o primeiro registro.
2042
+
2043
+ #### Parameters
2044
+
2045
+ | Name | Type | Description |
2046
+ | :------ | :------ | :------ |
2047
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da seleção do registro do DataUnit. |
2048
+
2049
+ #### Returns
2050
+
2051
+ `void`
2052
+
2053
+ #### Defined in
2054
+
2055
+ src/dataunit/DataUnit.ts:929
2056
+
2057
+ ___
2058
+
2059
+ ### selectLast
2060
+
2061
+ ▸ **selectLast**(`executionCtx?`): `void`
2062
+
2063
+ Seleciona o último registro.
2064
+
2065
+ #### Parameters
2066
+
2067
+ | Name | Type | Description |
2068
+ | :------ | :------ | :------ |
2069
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da seleção do registro do DataUnit. |
2070
+
2071
+ #### Returns
2072
+
2073
+ `void`
2074
+
2075
+ #### Defined in
2076
+
2077
+ src/dataunit/DataUnit.ts:942
2078
+
2079
+ ___
2080
+
2081
+ ### setFieldValue
2082
+
2083
+ ▸ **setFieldValue**(`fieldName`, `newValue`, `records?`): `Promise`<`boolean`\>
2084
+
2085
+ Insere valor no campo desejado.
2086
+
2087
+ #### Parameters
2088
+
2089
+ | Name | Type | Description |
2090
+ | :------ | :------ | :------ |
2091
+ | `fieldName` | `string` | Identificador do campo a ser modificado. |
2092
+ | `newValue` | `any` | Valor a ser inserido no campo. |
2093
+ | `records?` | `string`[] | Indica quais registros foram afetados pela alteração no valor do campo. |
2094
+
2095
+ #### Returns
2096
+
2097
+ `Promise`<`boolean`\>
2098
+
2099
+ - Promise que será resolvida quando o novo valor for persistido no state.
2100
+
2101
+ #### Defined in
2102
+
2103
+ src/dataunit/DataUnit.ts:838
2104
+
2105
+ ___
2106
+
2107
+ ### setInvalidField
2108
+
2109
+ ▸ **setInvalidField**(`fieldName`, `message`, `recordId`): `void`
2110
+
2111
+ Marca campos como inválidos.
2112
+
2113
+ #### Parameters
2114
+
2115
+ | Name | Type | Description |
2116
+ | :------ | :------ | :------ |
2117
+ | `fieldName` | `string` | Nome do campo inválido. |
2118
+ | `message` | `string` | Mensagem descrevendo o motivo da invalidade. |
2119
+ | `recordId` | `string` | Indica qual registro está com o campo inválido. |
2120
+
2121
+ #### Returns
2122
+
2123
+ `void`
2124
+
2125
+ #### Defined in
2126
+
2127
+ src/dataunit/DataUnit.ts:861
2128
+
2129
+ ___
2130
+
2131
+ ### setSelection
2132
+
2133
+ ▸ **setSelection**(`selection`, `executionCtx?`): `Promise`<[`SelectionInfo`](SelectionInfo.md)\>
2134
+
2135
+ Seleciona múltiplos registros por ID ou todos os registros (multipágina) .
2136
+
2137
+ #### Parameters
2138
+
2139
+ | Name | Type | Description |
2140
+ | :------ | :------ | :------ |
2141
+ | `selection` | `string`[] \| [`ALL_RECORDS`](../enums/SelectionMode.md#all_records) | IDs para selecionar ou o modo de seleção completo. |
2142
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da seleção dos registros do DataUnit. |
2143
+
2144
+ #### Returns
2145
+
2146
+ `Promise`<[`SelectionInfo`](SelectionInfo.md)\>
2147
+
2148
+ #### Defined in
2149
+
2150
+ src/dataunit/DataUnit.ts:969
2151
+
2152
+ ___
2153
+
2154
+ ### setSelectionByIndex
2155
+
2156
+ ▸ **setSelectionByIndex**(`selection`, `executionCtx?`): `void`
2157
+
2158
+ Seleciona múltiplos registros por índice.
2159
+
2160
+ #### Parameters
2161
+
2162
+ | Name | Type | Description |
2163
+ | :------ | :------ | :------ |
2164
+ | `selection` | `number`[] | Índices desejados para a seleção. |
2165
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da seleção do registro do DataUnit. |
2166
+
2167
+ #### Returns
2168
+
2169
+ `void`
2170
+
2171
+ #### Defined in
2172
+
2173
+ src/dataunit/DataUnit.ts:956
2174
+
2175
+ ___
2176
+
2177
+ ### showField
2178
+
2179
+ ▸ **showField**(`fieldName`): `void`
2180
+
2181
+ Deixa um campo do DataUnit visível
2182
+
2183
+ #### Parameters
2184
+
2185
+ | Name | Type | Description |
2186
+ | :------ | :------ | :------ |
2187
+ | `fieldName` | `string` | nome do campo para ficar visível. |
2188
+
2189
+ #### Returns
2190
+
2191
+ `void`
2192
+
2193
+ #### Defined in
2194
+
2195
+ src/dataunit/DataUnit.ts:1551
2196
+
2197
+ ___
2198
+
2199
+ ### startChange
2200
+
2201
+ ▸ **startChange**(`fieldName`, `waitingChange`): `void`
2202
+
2203
+ Inicia alteração no campo.
2204
+
2205
+ #### Parameters
2206
+
2207
+ | Name | Type | Description |
2208
+ | :------ | :------ | :------ |
2209
+ | `fieldName` | `string` | Identificador do campo a ser modificado. |
2210
+ | `waitingChange` | [`WaitingChange`](../interfaces/WaitingChange.md) | Informa que uma mudança irá iniciar. |
2211
+
2212
+ #### Returns
2213
+
2214
+ `void`
2215
+
2216
+ #### Defined in
2217
+
2218
+ src/dataunit/DataUnit.ts:897
2219
+
2220
+ ___
2221
+
2222
+ ### subscribe
2223
+
2224
+ ▸ **subscribe**(`observer`): `void`
2225
+
2226
+ Adiciona um novo observer no DataUnit.
2227
+ Ela vai ser chamada sempre que uma ação for despachada (dispatchAction()).
2228
+
2229
+ #### Parameters
2230
+
2231
+ | Name | Type | Description |
2232
+ | :------ | :------ | :------ |
2233
+ | `observer` | (`action`: [`DataUnitAction`](DataUnitAction.md)) => `void` | Função que recebe como parâmetro as ações que serão monitoradas. |
2234
+
2235
+ #### Returns
2236
+
2237
+ `void`
2238
+
2239
+ #### Defined in
2240
+
2241
+ src/dataunit/DataUnit.ts:1409
2242
+
2243
+ ___
2244
+
2245
+ ### toString
2246
+
2247
+ ▸ **toString**(): `string`
2248
+
2249
+ Obtém a representação textual do DataUnit, nesse caso, o nome do DataUnit.
2250
+
2251
+ #### Returns
2252
+
2253
+ `string`
2254
+
2255
+ - Valor contido na propriedade name.
2256
+
2257
+ #### Defined in
2258
+
2259
+ src/dataunit/DataUnit.ts:1297
2260
+
2261
+ ___
2262
+
2263
+ ### undo
2264
+
2265
+ ▸ **undo**(`executionCtx?`): `void`
2266
+
2267
+ Desfaz a última ação.
2268
+
2269
+ #### Parameters
2270
+
2271
+ | Name | Type | Description |
2272
+ | :------ | :------ | :------ |
2273
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução de desfazer a última ação. |
2274
+
2275
+ #### Returns
2276
+
2277
+ `void`
2278
+
2279
+ #### Defined in
2280
+
2281
+ src/dataunit/DataUnit.ts:1275
2282
+
2283
+ ___
2284
+
2285
+ ### unsubscribe
2286
+
2287
+ ▸ **unsubscribe**(`observer`): `void`
2288
+
2289
+ Remove um observer existente.
2290
+
2291
+ #### Parameters
2292
+
2293
+ | Name | Type | Description |
2294
+ | :------ | :------ | :------ |
2295
+ | `observer` | `Function` | Observer que se deseja remover. |
2296
+
2297
+ #### Returns
2298
+
2299
+ `void`
2300
+
2301
+ #### Defined in
2302
+
2303
+ src/dataunit/DataUnit.ts:1420
2304
+
2305
+ ___
2306
+
2307
+ ### updatePageSelection
2308
+
2309
+ ▸ **updatePageSelection**(`selection`, `executionCtx?`): `Promise`<`undefined` \| [`SelectionInfo`](SelectionInfo.md)\>
2310
+
2311
+ Atualiza a seleção dos registros atuais.
2312
+
2313
+ #### Parameters
2314
+
2315
+ | Name | Type | Description |
2316
+ | :------ | :------ | :------ |
2317
+ | `selection` | `string`[] | IDs dos registros selecionados no snapshot atual |
2318
+ | `executionCtx?` | [`ExecutionContext`](../interfaces/ExecutionContext.md) | Contexto de execução da seleção dos registros do DataUnit. |
2319
+
2320
+ #### Returns
2321
+
2322
+ `Promise`<`undefined` \| [`SelectionInfo`](SelectionInfo.md)\>
2323
+
2324
+ - Informações sobre a seleção.
2325
+
2326
+ #### Defined in
2327
+
2328
+ src/dataunit/DataUnit.ts:996
2329
+
2330
+ ___
2331
+
2332
+ ### validateAndTypeValue
2333
+
2334
+ ▸ `Private` **validateAndTypeValue**(`fieldName`, `newValue`): `any`
2335
+
2336
+ Obtém o valor convertido de acordo com o tipo do campo.
2337
+
2338
+ #### Parameters
2339
+
2340
+ | Name | Type | Description |
2341
+ | :------ | :------ | :------ |
2342
+ | `fieldName` | `string` | Identificador do campo. |
2343
+ | `newValue` | `any` | Novo valor que será atribuído ao campo pós validação. |
2344
+
2345
+ #### Returns
2346
+
2347
+ `any`
2348
+
2349
+ - Novo valor convertido em um tipo valido.
2350
+
2351
+ #### Defined in
2352
+
2353
+ src/dataunit/DataUnit.ts:118
2354
+
2355
+ ___
2356
+
2357
+ ### valueFromString
2358
+
2359
+ ▸ **valueFromString**(`fieldName`, `value`): `any`
2360
+
2361
+ Obtém o valor do campo em seu formato/tipo correto a partir de uma string.
2362
+
2363
+ #### Parameters
2364
+
2365
+ | Name | Type | Description |
2366
+ | :------ | :------ | :------ |
2367
+ | `fieldName` | `string` | Nome do campo que terá o tipo identificado para conversão. |
2368
+ | `value` | `string` | Texto que será convertido de acordo com o tipo identificado no campo. |
2369
+
2370
+ #### Returns
2371
+
2372
+ `any`
2373
+
2374
+ - Valor convertido ou ele mesmo.
2375
+
2376
+ #### Defined in
2377
+
2378
+ src/dataunit/DataUnit.ts:530
2379
+
2380
+ ___
2381
+
2382
+ ### valueToString
2383
+
2384
+ ▸ **valueToString**(`fieldName`, `value`): `string`
2385
+
2386
+ Converte o valor informado para texto de acordo com o tipo do campo informado.
2387
+
2388
+ #### Parameters
2389
+
2390
+ | Name | Type | Description |
2391
+ | :------ | :------ | :------ |
2392
+ | `fieldName` | `string` | Nome do campo utilizado para buscar o tipo de dado com o padrão de conversão para string. |
2393
+ | `value` | `any` | Valor a ser convertido. |
2394
+
2395
+ #### Returns
2396
+
2397
+ `string`
2398
+
2399
+ - Valor informado convertido.
2400
+
2401
+ #### Defined in
2402
+
2403
+ src/dataunit/DataUnit.ts:545
2404
+
2405
+ ___
2406
+
2407
+ ### waitingForChange
2408
+
2409
+ ▸ **waitingForChange**(`fieldName`): `boolean`
2410
+
2411
+ Retorna se a alteração no campo já foi concluída ou se ainda está incompleta.
2412
+
2413
+ #### Parameters
2414
+
2415
+ | Name | Type | Description |
2416
+ | :------ | :------ | :------ |
2417
+ | `fieldName` | `string` | Identificador do campo a ser verificado. |
2418
+
2419
+ #### Returns
2420
+
2421
+ `boolean`
2422
+
2423
+ - Verdadeiro se ainda está pendente.
2424
+
2425
+ #### Defined in
2426
+
2427
+ src/dataunit/DataUnit.ts:811