@sankhyalabs/core 5.20.0-dev.4 → 5.20.0-dev.6

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 (102) hide show
  1. package/.docs/README.md +3 -1
  2. package/.docs/classes/ApplicationContext.md +31 -32
  3. package/.docs/classes/ArrayUtils.md +95 -83
  4. package/.docs/classes/AuthorizedServiceCaller.md +25 -34
  5. package/.docs/classes/Change.md +59 -74
  6. package/.docs/classes/DataUnit.md +1017 -1091
  7. package/.docs/classes/DataUnitAction.md +25 -42
  8. package/.docs/classes/DataUnitStorage.md +40 -43
  9. package/.docs/classes/DateUtils.md +133 -126
  10. package/.docs/classes/ElementIDUtils.md +123 -122
  11. package/.docs/classes/ErrorException.md +67 -88
  12. package/.docs/classes/ErrorTracking.md +20 -23
  13. package/.docs/classes/FieldComparator.md +35 -39
  14. package/.docs/classes/FloatingManager.md +195 -198
  15. package/.docs/classes/HTMLBuilder.md +14 -20
  16. package/.docs/classes/HttpProvider.md +45 -41
  17. package/.docs/classes/IDBRepository.md +179 -196
  18. package/.docs/classes/JSUtils.md +65 -66
  19. package/.docs/classes/KeyboardManager.md +95 -87
  20. package/.docs/classes/{MaskFormatter-1.md → MaskFormatter.md} +81 -120
  21. package/.docs/classes/NumberUtils.md +163 -152
  22. package/.docs/classes/ObjectUtils.md +66 -71
  23. package/.docs/classes/OnboardingUtils.md +36 -51
  24. package/.docs/classes/PromiseSync.md +25 -42
  25. package/.docs/classes/ReadyUtil.md +31 -41
  26. package/.docs/classes/RequestMetadata.md +29 -30
  27. package/.docs/classes/SearchUtils.md +18 -20
  28. package/.docs/classes/SelectionInfo.md +59 -74
  29. package/.docs/classes/SkwHttpProvider.md +33 -45
  30. package/.docs/classes/StringUtils.md +297 -322
  31. package/.docs/classes/TimeFormatter.md +43 -44
  32. package/.docs/classes/UserAgentUtils.md +17 -20
  33. package/.docs/classes/VersionUtils.md +15 -18
  34. package/.docs/classes/WaitingChangeException.md +63 -84
  35. package/.docs/classes/WarningException.md +67 -88
  36. package/.docs/enumerations/Action.md +297 -0
  37. package/.docs/enumerations/ChangeOperation.md +47 -0
  38. package/.docs/enumerations/DataType.md +57 -0
  39. package/.docs/enumerations/DependencyType.md +37 -0
  40. package/.docs/enumerations/SelectionMode.md +27 -0
  41. package/.docs/enumerations/SortMode.md +27 -0
  42. package/.docs/enumerations/UserInterface.md +177 -0
  43. package/.docs/functions/defaultDataLoader.md +25 -0
  44. package/.docs/{modules.md → globals.md} +17 -39
  45. package/.docs/interfaces/ChildDescriptor.md +12 -16
  46. package/.docs/interfaces/ChildLink.md +9 -12
  47. package/.docs/interfaces/DUActionInterceptor.md +10 -14
  48. package/.docs/interfaces/ExecutionContext.md +17 -32
  49. package/.docs/interfaces/FieldDescriptor.md +52 -66
  50. package/.docs/interfaces/Filter.md +13 -17
  51. package/.docs/interfaces/IElementIDInfo.md +11 -14
  52. package/.docs/interfaces/ILoadResult.md +11 -16
  53. package/.docs/interfaces/IRepository.md +88 -93
  54. package/.docs/interfaces/IRepositoryIndex.md +23 -30
  55. package/.docs/interfaces/LoadDataRequest.md +36 -45
  56. package/.docs/interfaces/LoadDataResponse.md +11 -14
  57. package/.docs/interfaces/PageRequest.md +16 -20
  58. package/.docs/interfaces/PaginationInfo.md +24 -31
  59. package/.docs/interfaces/PromiseSyncCallback.md +13 -17
  60. package/.docs/interfaces/QuickFilter.md +17 -21
  61. package/.docs/interfaces/Record.md +26 -33
  62. package/.docs/interfaces/SavedRecord.md +33 -41
  63. package/.docs/interfaces/Sort.md +12 -16
  64. package/.docs/interfaces/SortingProvider.md +10 -13
  65. package/.docs/interfaces/UnitMetadata.md +16 -21
  66. package/.docs/interfaces/WaitingChange.md +16 -20
  67. package/.docs/namespaces/MaskFormatter/README.md +17 -0
  68. package/.docs/namespaces/MaskFormatter/type-aliases/MaskCharacter.md +13 -0
  69. package/.docs/namespaces/MaskFormatter/variables/MaskCharacter.md +13 -0
  70. package/dist/dataunit/DataUnit.d.ts +16 -0
  71. package/dist/dataunit/DataUnit.js +35 -3
  72. package/dist/dataunit/DataUnit.js.map +1 -1
  73. package/dist/dataunit/formatting/PrettyFormatter.js +3 -1
  74. package/dist/dataunit/formatting/PrettyFormatter.js.map +1 -1
  75. package/dist/dataunit/metadata/DataType.js +10 -1
  76. package/dist/dataunit/metadata/DataType.js.map +1 -1
  77. package/dist/dataunit/state/action/DataUnitAction.d.ts +3 -1
  78. package/dist/dataunit/state/action/DataUnitAction.js +2 -0
  79. package/dist/dataunit/state/action/DataUnitAction.js.map +1 -1
  80. package/dist/dataunit/state/slice/ChangesSlice.js +12 -11
  81. package/dist/dataunit/state/slice/ChangesSlice.js.map +1 -1
  82. package/dist/dataunit/state/slice/LoadingProperties.d.ts +9 -0
  83. package/dist/dataunit/state/slice/LoadingProperties.js +31 -0
  84. package/dist/dataunit/state/slice/LoadingProperties.js.map +1 -0
  85. package/jest.config.ts +1 -1
  86. package/package.json +11 -4
  87. package/sonar-project.properties +7 -0
  88. package/src/dataunit/DataUnit.ts +37 -3
  89. package/src/dataunit/formatting/PrettyFormatter.ts +3 -1
  90. package/src/dataunit/metadata/DataType.ts +10 -1
  91. package/src/dataunit/state/action/DataUnitAction.ts +3 -1
  92. package/src/dataunit/state/slice/ChangesSlice.ts +15 -14
  93. package/src/dataunit/state/slice/LoadingProperties.ts +37 -0
  94. package/.docs/.nojekyll +0 -1
  95. package/.docs/enums/Action.md +0 -305
  96. package/.docs/enums/ChangeOperation.md +0 -52
  97. package/.docs/enums/DataType.md +0 -63
  98. package/.docs/enums/DependencyType.md +0 -41
  99. package/.docs/enums/SelectionMode.md +0 -30
  100. package/.docs/enums/SortMode.md +0 -30
  101. package/.docs/enums/UserInterface.md +0 -195
  102. package/.docs/modules/MaskFormatter.md +0 -37
@@ -1,85 +1,77 @@
1
- [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / SavedRecord
1
+ [**@sankhyalabs/core**](../README.md) **Docs**
2
2
 
3
- # Interface: SavedRecord
4
-
5
- ## Hierarchy
6
-
7
- - [`Record`](Record.md)
3
+ ***
8
4
 
9
- **`SavedRecord`**
5
+ [@sankhyalabs/core](../globals.md) / SavedRecord
10
6
 
11
- ## Table of contents
7
+ # Interface: SavedRecord
12
8
 
13
- ### Properties
9
+ ## Extends
14
10
 
15
- - [\_\_old\_\_id\_\_](SavedRecord.md#__old__id__)
16
- - [\_\_owner\_\_dataunit\_\_name\_\_](SavedRecord.md#__owner__dataunit__name__)
17
- - [\_\_parent\_\_record\_\_id\_\_](SavedRecord.md#__parent__record__id__)
18
- - [\_\_record\_\_id\_\_](SavedRecord.md#__record__id__)
19
- - [\_\_record\_\_label\_\_](SavedRecord.md#__record__label__)
11
+ - [`Record`](Record.md)
20
12
 
21
13
  ## Properties
22
14
 
23
- ### \_\_old\_\_id\_\_
15
+ ### \_\_old\_\_id\_\_?
24
16
 
25
- `Optional` **\_\_old\_\_id\_\_**: `string`
17
+ > `optional` **\_\_old\_\_id\_\_**: `string`
26
18
 
27
- #### Defined in
19
+ #### Source
28
20
 
29
- src/dataunit/DataUnit.ts:1755
21
+ src/dataunit/DataUnit.ts:1789
30
22
 
31
- ___
23
+ ***
32
24
 
33
- ### \_\_owner\_\_dataunit\_\_name\_\_
25
+ ### \_\_owner\_\_dataunit\_\_name\_\_?
34
26
 
35
- `Optional` **\_\_owner\_\_dataunit\_\_name\_\_**: `string`
27
+ > `optional` **\_\_owner\_\_dataunit\_\_name\_\_**: `string`
36
28
 
37
29
  #### Inherited from
38
30
 
39
- [Record](Record.md).[__owner__dataunit__name__](Record.md#__owner__dataunit__name__)
31
+ [`Record`](Record.md).[`__owner__dataunit__name__`](Record.md#__owner__dataunit__name__)
40
32
 
41
- #### Defined in
33
+ #### Source
42
34
 
43
- src/dataunit/DataUnit.ts:1750
35
+ src/dataunit/DataUnit.ts:1784
44
36
 
45
- ___
37
+ ***
46
38
 
47
- ### \_\_parent\_\_record\_\_id\_\_
39
+ ### \_\_parent\_\_record\_\_id\_\_?
48
40
 
49
- `Optional` **\_\_parent\_\_record\_\_id\_\_**: `string`
41
+ > `optional` **\_\_parent\_\_record\_\_id\_\_**: `string`
50
42
 
51
43
  #### Inherited from
52
44
 
53
- [Record](Record.md).[__parent__record__id__](Record.md#__parent__record__id__)
45
+ [`Record`](Record.md).[`__parent__record__id__`](Record.md#__parent__record__id__)
54
46
 
55
- #### Defined in
47
+ #### Source
56
48
 
57
- src/dataunit/DataUnit.ts:1749
49
+ src/dataunit/DataUnit.ts:1783
58
50
 
59
- ___
51
+ ***
60
52
 
61
53
  ### \_\_record\_\_id\_\_
62
54
 
63
- **\_\_record\_\_id\_\_**: `string`
55
+ > **\_\_record\_\_id\_\_**: `string`
64
56
 
65
57
  #### Inherited from
66
58
 
67
- [Record](Record.md).[__record__id__](Record.md#__record__id__)
59
+ [`Record`](Record.md).[`__record__id__`](Record.md#__record__id__)
68
60
 
69
- #### Defined in
61
+ #### Source
70
62
 
71
- src/dataunit/DataUnit.ts:1747
63
+ src/dataunit/DataUnit.ts:1781
72
64
 
73
- ___
65
+ ***
74
66
 
75
- ### \_\_record\_\_label\_\_
67
+ ### \_\_record\_\_label\_\_?
76
68
 
77
- `Optional` **\_\_record\_\_label\_\_**: `string`
69
+ > `optional` **\_\_record\_\_label\_\_**: `string`
78
70
 
79
71
  #### Inherited from
80
72
 
81
- [Record](Record.md).[__record__label__](Record.md#__record__label__)
73
+ [`Record`](Record.md).[`__record__label__`](Record.md#__record__label__)
82
74
 
83
- #### Defined in
75
+ #### Source
84
76
 
85
- src/dataunit/DataUnit.ts:1748
77
+ src/dataunit/DataUnit.ts:1782
@@ -1,41 +1,37 @@
1
- [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / Sort
1
+ [**@sankhyalabs/core**](../README.md) **Docs**
2
2
 
3
- # Interface: Sort
4
-
5
- ## Table of contents
3
+ ***
6
4
 
7
- ### Properties
5
+ [@sankhyalabs/core](../globals.md) / Sort
8
6
 
9
- - [dataType](Sort.md#datatype)
10
- - [field](Sort.md#field)
11
- - [mode](Sort.md#mode)
7
+ # Interface: Sort
12
8
 
13
9
  ## Properties
14
10
 
15
11
  ### dataType
16
12
 
17
- **dataType**: [`DataType`](../enums/DataType.md)
13
+ > **dataType**: [`DataType`](../enumerations/DataType.md)
18
14
 
19
- #### Defined in
15
+ #### Source
20
16
 
21
17
  src/dataunit/metadata/UnitMetadata.ts:58
22
18
 
23
- ___
19
+ ***
24
20
 
25
21
  ### field
26
22
 
27
- **field**: `string`
23
+ > **field**: `string`
28
24
 
29
- #### Defined in
25
+ #### Source
30
26
 
31
27
  src/dataunit/metadata/UnitMetadata.ts:56
32
28
 
33
- ___
29
+ ***
34
30
 
35
31
  ### mode
36
32
 
37
- **mode**: [`SortMode`](../enums/SortMode.md)
33
+ > **mode**: [`SortMode`](../enumerations/SortMode.md)
38
34
 
39
- #### Defined in
35
+ #### Source
40
36
 
41
37
  src/dataunit/metadata/UnitMetadata.ts:57
@@ -1,30 +1,27 @@
1
- [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / SortingProvider
1
+ [**@sankhyalabs/core**](../README.md) **Docs**
2
2
 
3
- # Interface: SortingProvider
4
-
5
- ## Table of contents
3
+ ***
6
4
 
7
- ### Methods
5
+ [@sankhyalabs/core](../globals.md) / SortingProvider
8
6
 
9
- - [getSort](SortingProvider.md#getsort)
7
+ # Interface: SortingProvider
10
8
 
11
9
  ## Methods
12
10
 
13
- ### getSort
11
+ ### getSort()
14
12
 
15
- **getSort**(`dataUnit`, `defaultSorting`): `undefined` \| [`Sort`](Sort.md)[]
13
+ > **getSort**(`dataUnit`, `defaultSorting`): `undefined` \| [`Sort`](Sort.md)[]
16
14
 
17
15
  #### Parameters
18
16
 
19
- | Name | Type |
20
- | :------ | :------ |
21
- | `dataUnit` | `string` |
22
- | `defaultSorting` | [`Sort`](Sort.md)[] |
17
+ **dataUnit**: `string`
18
+
19
+ **defaultSorting**: [`Sort`](Sort.md)[]
23
20
 
24
21
  #### Returns
25
22
 
26
23
  `undefined` \| [`Sort`](Sort.md)[]
27
24
 
28
- #### Defined in
25
+ #### Source
29
26
 
30
27
  src/dataunit/metadata/UnitMetadata.ts:67
@@ -1,52 +1,47 @@
1
- [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / UnitMetadata
1
+ [**@sankhyalabs/core**](../README.md) **Docs**
2
2
 
3
- # Interface: UnitMetadata
4
-
5
- ## Table of contents
3
+ ***
6
4
 
7
- ### Properties
5
+ [@sankhyalabs/core](../globals.md) / UnitMetadata
8
6
 
9
- - [children](UnitMetadata.md#children)
10
- - [fields](UnitMetadata.md#fields)
11
- - [label](UnitMetadata.md#label)
12
- - [name](UnitMetadata.md#name)
7
+ # Interface: UnitMetadata
13
8
 
14
9
  ## Properties
15
10
 
16
- ### children
11
+ ### children?
17
12
 
18
- `Optional` **children**: [`ChildDescriptor`](ChildDescriptor.md)[]
13
+ > `optional` **children**: [`ChildDescriptor`](ChildDescriptor.md)[]
19
14
 
20
- #### Defined in
15
+ #### Source
21
16
 
22
17
  src/dataunit/metadata/UnitMetadata.ts:7
23
18
 
24
- ___
19
+ ***
25
20
 
26
21
  ### fields
27
22
 
28
- **fields**: [`FieldDescriptor`](FieldDescriptor.md)[]
23
+ > **fields**: [`FieldDescriptor`](FieldDescriptor.md)[]
29
24
 
30
- #### Defined in
25
+ #### Source
31
26
 
32
27
  src/dataunit/metadata/UnitMetadata.ts:6
33
28
 
34
- ___
29
+ ***
35
30
 
36
31
  ### label
37
32
 
38
- **label**: `string`
33
+ > **label**: `string`
39
34
 
40
- #### Defined in
35
+ #### Source
41
36
 
42
37
  src/dataunit/metadata/UnitMetadata.ts:5
43
38
 
44
- ___
39
+ ***
45
40
 
46
41
  ### name
47
42
 
48
- **name**: `string`
43
+ > **name**: `string`
49
44
 
50
- #### Defined in
45
+ #### Source
51
46
 
52
47
  src/dataunit/metadata/UnitMetadata.ts:4
@@ -1,41 +1,37 @@
1
- [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / WaitingChange
1
+ [**@sankhyalabs/core**](../README.md) **Docs**
2
2
 
3
- # Interface: WaitingChange
4
-
5
- ## Table of contents
3
+ ***
6
4
 
7
- ### Properties
5
+ [@sankhyalabs/core](../globals.md) / WaitingChange
8
6
 
9
- - [blocking](WaitingChange.md#blocking)
10
- - [promise](WaitingChange.md#promise)
11
- - [waitmessage](WaitingChange.md#waitmessage)
7
+ # Interface: WaitingChange
12
8
 
13
9
  ## Properties
14
10
 
15
11
  ### blocking
16
12
 
17
- **blocking**: `boolean`
13
+ > **blocking**: `boolean`
18
14
 
19
- #### Defined in
15
+ #### Source
20
16
 
21
- src/dataunit/DataUnit.ts:1843
17
+ src/dataunit/DataUnit.ts:1877
22
18
 
23
- ___
19
+ ***
24
20
 
25
- ### promise
21
+ ### promise?
26
22
 
27
- `Optional` **promise**: `Promise`<`any`\>
23
+ > `optional` **promise**: `Promise`\<`any`\>
28
24
 
29
- #### Defined in
25
+ #### Source
30
26
 
31
- src/dataunit/DataUnit.ts:1844
27
+ src/dataunit/DataUnit.ts:1878
32
28
 
33
- ___
29
+ ***
34
30
 
35
31
  ### waitmessage
36
32
 
37
- **waitmessage**: `string`
33
+ > **waitmessage**: `string`
38
34
 
39
- #### Defined in
35
+ #### Source
40
36
 
41
- src/dataunit/DataUnit.ts:1842
37
+ src/dataunit/DataUnit.ts:1876
@@ -0,0 +1,17 @@
1
+ [**@sankhyalabs/core**](../../README.md) • **Docs**
2
+
3
+ ***
4
+
5
+ [@sankhyalabs/core](../../globals.md) / MaskFormatter
6
+
7
+ # Namespace: MaskFormatter
8
+
9
+ ## Index
10
+
11
+ ### Type Aliases
12
+
13
+ - [MaskCharacter](type-aliases/MaskCharacter.md)
14
+
15
+ ### Variables
16
+
17
+ - [MaskCharacter](variables/MaskCharacter.md)
@@ -0,0 +1,13 @@
1
+ [**@sankhyalabs/core**](../../../README.md) • **Docs**
2
+
3
+ ***
4
+
5
+ [@sankhyalabs/core](../../../globals.md) / [MaskFormatter](../README.md) / MaskCharacter
6
+
7
+ # Type alias: MaskCharacter
8
+
9
+ > **MaskCharacter**: `InstanceType`\<*typeof* [`MaskCharacter`](../variables/MaskCharacter.md)\>
10
+
11
+ ## Source
12
+
13
+ src/utils/MaskFormatter.ts:166
@@ -0,0 +1,13 @@
1
+ [**@sankhyalabs/core**](../../../README.md) • **Docs**
2
+
3
+ ***
4
+
5
+ [@sankhyalabs/core](../../../globals.md) / [MaskFormatter](../README.md) / MaskCharacter
6
+
7
+ # Variable: MaskCharacter
8
+
9
+ > **MaskCharacter**: *typeof* `__class`
10
+
11
+ ## Source
12
+
13
+ src/utils/MaskFormatter.ts:166
@@ -43,6 +43,22 @@ export default class DataUnit {
43
43
  * - Sorting Providers
44
44
  */
45
45
  releaseCallbacks(): void;
46
+ /**
47
+ * Adiciona uma propriedade transacional que será envida aos
48
+ * loaders (dataLoader, saveLoader, removeLoader e recordLoader) na chamada.
49
+ * Essas propriedades serão limpas ao final da execução de cada método.
50
+ *
51
+ * @param name - Nome da propriedade
52
+ * @param value - Valor da propriedade
53
+ *
54
+ */
55
+ addGlobalLoaderProp(name: string, value: string): void;
56
+ /**
57
+ * Retorna as propriedades transacionais adicionados anteriores à chamada.
58
+ *
59
+ * @returns - Todas as propriedades desde o final do último loader.
60
+ */
61
+ getGlobalLoaderProps(): Map<string, string>;
46
62
  get dataUnitId(): string;
47
63
  /**
48
64
  *
@@ -28,6 +28,7 @@ import { getFormattedValue } from "./formatting/PrettyFormatter.js";
28
28
  import { v4 as uuid } from "uuid";
29
29
  import { DataUnitStorage } from "./DataUnitStorage.js";
30
30
  import { getInvalidFieldMessage, InvalidFieldsReducer } from "./state/slice/InvalidFieldsSlice.js";
31
+ import { getLoadingProperties, LoadingPropertiesReducer } from "./state/slice/LoadingProperties.js";
31
32
  /***
32
33
  * `DataUnit`: Atua como uma camada de abstração entre o back-end e a interface do usuário.
33
34
  */
@@ -62,6 +63,7 @@ export default class DataUnit {
62
63
  this._pageSize = 0;
63
64
  this._stateManager = new StateManager([
64
65
  HistReducer,
66
+ LoadingPropertiesReducer,
65
67
  UnitMetadataReducer,
66
68
  LoadingControlReducer,
67
69
  RecordsReducer,
@@ -110,6 +112,26 @@ export default class DataUnit {
110
112
  this._sortingProvider = undefined;
111
113
  this._interceptors = [];
112
114
  }
115
+ /**
116
+ * Adiciona uma propriedade transacional que será envida aos
117
+ * loaders (dataLoader, saveLoader, removeLoader e recordLoader) na chamada.
118
+ * Essas propriedades serão limpas ao final da execução de cada método.
119
+ *
120
+ * @param name - Nome da propriedade
121
+ * @param value - Valor da propriedade
122
+ *
123
+ */
124
+ addGlobalLoaderProp(name, value) {
125
+ this.dispatchAction(Action.LOADING_PROPERTY_ADDED, { [name]: value });
126
+ }
127
+ /**
128
+ * Retorna as propriedades transacionais adicionados anteriores à chamada.
129
+ *
130
+ * @returns - Todas as propriedades desde o final do último loader.
131
+ */
132
+ getGlobalLoaderProps() {
133
+ return getLoadingProperties(this._stateManager) || new Map();
134
+ }
113
135
  get dataUnitId() {
114
136
  return this._uuid;
115
137
  }
@@ -182,6 +204,7 @@ export default class DataUnit {
182
204
  if (this.dataLoader) {
183
205
  this.dataLoader(this, request).then(response => {
184
206
  this.dispatchAction(Action.DATA_LOADED, Object.assign(Object.assign({}, response), { keepSelection: request.keepSelection, filters: request.filters }), executionCtx);
207
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
185
208
  if (selectFirstRecord) {
186
209
  this.requestSelectFirst(executionCtx);
187
210
  }
@@ -189,6 +212,7 @@ export default class DataUnit {
189
212
  }).catch(error => {
190
213
  console.error(error);
191
214
  const { errorCode } = error;
215
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
192
216
  fail(new ErrorException("Erro ao carregar registros", error, errorCode));
193
217
  });
194
218
  }
@@ -368,6 +392,7 @@ export default class DataUnit {
368
392
  if (this.saveLoader) {
369
393
  const changes = this.getAllChangesToSave();
370
394
  this.saveLoader(this, changes).then((records) => {
395
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
371
396
  const recordsByDataUnit = this.getRecordsByDataUnit(records);
372
397
  const dispatchPromisses = [];
373
398
  for (const [ownerDataUnitName, splittedRecords] of recordsByDataUnit) {
@@ -380,10 +405,12 @@ export default class DataUnit {
380
405
  Promise.all(dispatchPromisses).then(() => resolve());
381
406
  }).catch(cause => {
382
407
  const { errorCode } = cause;
408
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
383
409
  fail(new ErrorException("Erro ao salvar alterações", cause, errorCode));
384
410
  });
385
411
  }
386
412
  else {
413
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
387
414
  resolve();
388
415
  }
389
416
  });
@@ -471,6 +498,7 @@ export default class DataUnit {
471
498
  return __awaiter(this, void 0, void 0, function* () {
472
499
  if (recordIds) {
473
500
  if (buffered || !this.removeLoader) {
501
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
474
502
  this.dispatchAction(Action.RECORDS_REMOVED, { records: recordIds, cachedRecords, buffered: true }, executionCtx);
475
503
  }
476
504
  else {
@@ -485,8 +513,10 @@ export default class DataUnit {
485
513
  const nextIndex = Math.min(removedIndex.slice(-1)[0] + 1, currentRecordsKeys.length);
486
514
  const selectionAfterRemove = [currentRecordsKeys[nextIndex]];
487
515
  this.dispatchAction(Action.RECORDS_REMOVED, { records: removedIds, cachedRecords, removedIndex, buffered: false, selectionAfterRemove }, executionCtx);
516
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
488
517
  resolve(removedIds);
489
518
  }).catch(error => {
519
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
490
520
  const { errorCode } = error;
491
521
  fail(new ErrorException("Erro ao remover registros", error, errorCode));
492
522
  });
@@ -1391,13 +1421,15 @@ export default class DataUnit {
1391
1421
  return new Promise((resolve, fail) => __awaiter(this, void 0, void 0, function* () {
1392
1422
  const selection = getSelection(this._stateManager);
1393
1423
  this.dispatchAction(Action.LOADING_RECORD, selection);
1394
- if (!this.dataLoader)
1395
- return;
1396
- if (!this.recordLoader)
1424
+ if (!this.recordLoader || !this.dataLoader) {
1425
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
1397
1426
  return;
1427
+ }
1398
1428
  this.recordLoader(this, selection).then(response => {
1399
1429
  this.dispatchAction(Action.RECORD_LOADED, response);
1430
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
1400
1431
  }).catch(cause => {
1432
+ this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
1401
1433
  const { errorCode } = cause;
1402
1434
  fail(new ErrorException("Erro ao recarregar registro", cause, errorCode));
1403
1435
  });