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