@sankhyalabs/core 5.20.0-dev.21 → 5.20.0-dev.23
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.
- package/.docs/classes/Change.md +11 -11
- package/.docs/classes/DataUnit.md +91 -91
- package/.docs/classes/SelectionInfo.md +11 -11
- package/.docs/enumerations/ChangeOperation.md +4 -4
- package/.docs/enumerations/SelectionMode.md +2 -2
- package/.docs/interfaces/DUActionInterceptor.md +1 -1
- package/.docs/interfaces/PageRequest.md +3 -3
- package/.docs/interfaces/QuickFilter.md +3 -3
- package/.docs/interfaces/Record.md +4 -4
- package/.docs/interfaces/SavedRecord.md +5 -5
- package/.docs/interfaces/WaitingChange.md +3 -3
- package/.docs/type-aliases/DataUnitEventOptions.md +1 -1
- package/dist/dataunit/DataUnit.d.ts +1 -1
- package/dist/dataunit/DataUnit.js +14 -11
- package/dist/dataunit/DataUnit.js.map +1 -1
- package/package.json +1 -1
- package/reports/test-report.xml +75 -75
- package/src/dataunit/DataUnit.ts +11 -8
package/reports/test-report.xml
CHANGED
|
@@ -1,125 +1,125 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<unitTest version="1">
|
|
3
|
-
<file path="/builds/dti/design-system/sankhyacore/test/http/SkwHttpProvider.ts.spec.ts">
|
|
4
|
-
<testCase name="HttpProvider Metodo POST" duration="4"/>
|
|
5
|
-
</file>
|
|
6
3
|
<file path="/builds/dti/design-system/sankhyacore/test/http/HttpProvider.spec.ts">
|
|
7
|
-
<testCase name="HttpProvider Metodo GET" duration="
|
|
4
|
+
<testCase name="HttpProvider Metodo GET" duration="4"/>
|
|
8
5
|
</file>
|
|
9
|
-
<file path="/builds/dti/design-system/sankhyacore/test/
|
|
10
|
-
<testCase name="
|
|
11
|
-
<testCase name="Mask Formatter mask:CPF complete valid literals" duration="8"/>
|
|
12
|
-
<testCase name="Mask Formatter mask:CPF incomplete valid" duration="1"/>
|
|
13
|
-
<testCase name="Mask Formatter mask:CPF incomplete valid placeholder" duration="1"/>
|
|
14
|
-
<testCase name="Mask Formatter mask:CPF too long valid" duration="1"/>
|
|
15
|
-
<testCase name="Mask Formatter mask:CPF invalid for string" duration="91"/>
|
|
16
|
-
<testCase name="Mask Formatter mask:CPF invalid for being too long" duration="1"/>
|
|
17
|
-
<testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="0"/>
|
|
18
|
-
<testCase name="Mask Formatter mask:Licence plate valid lowercase" duration="1"/>
|
|
19
|
-
<testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
|
|
20
|
-
<testCase name="Mask Formatter mask:Licence plate invalid for being too short" duration="1"/>
|
|
21
|
-
<testCase name="Mask Formatter mask:Licence plate invalid for being too short with placeholder" duration="0"/>
|
|
22
|
-
<testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
|
|
23
|
-
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
|
|
24
|
-
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
|
|
25
|
-
<testCase name="Mask Formatter mask:Licence plate invalid" duration="0"/>
|
|
26
|
-
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="0"/>
|
|
27
|
-
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
|
|
28
|
-
<testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
|
|
29
|
-
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
|
|
30
|
-
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
|
|
31
|
-
<testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
|
|
6
|
+
<file path="/builds/dti/design-system/sankhyacore/test/http/SkwHttpProvider.ts.spec.ts">
|
|
7
|
+
<testCase name="HttpProvider Metodo POST" duration="109"/>
|
|
32
8
|
</file>
|
|
33
9
|
<file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaParameter.spec.ts">
|
|
34
|
-
<testCase name="StringUtils it should return the correct values of "value" and "type" through the getters methods initial setted by the constructor" duration="
|
|
35
|
-
<testCase name="StringUtils it should return the correct values of "value" and "type" through the getters methods initial setted by the setters methods" duration="
|
|
10
|
+
<testCase name="StringUtils it should return the correct values of "value" and "type" through the getters methods initial setted by the constructor" duration="99"/>
|
|
11
|
+
<testCase name="StringUtils it should return the correct values of "value" and "type" through the getters methods initial setted by the setters methods" duration="0"/>
|
|
36
12
|
<testCase name="StringUtils it should return the correct JSON/Object value through the buildParam method" duration="0"/>
|
|
37
13
|
</file>
|
|
38
14
|
<file path="/builds/dti/design-system/sankhyacore/test/util/TimeFormatter.spec.ts">
|
|
39
15
|
<testCase name="TimeFormatter Case: input string unformated with showSeconds" duration="3"/>
|
|
40
16
|
<testCase name="TimeFormatter Case: input string unformated without showSeconds" duration="1"/>
|
|
41
|
-
<testCase name="TimeFormatter Case: validateTime" duration="
|
|
17
|
+
<testCase name="TimeFormatter Case: validateTime" duration="2"/>
|
|
42
18
|
</file>
|
|
43
19
|
<file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaModel.spec.ts">
|
|
44
|
-
<testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="
|
|
20
|
+
<testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="7"/>
|
|
45
21
|
<testCase name="StringUtils it should modify "expressions" and "parameters" properties through Setters methods" duration="1"/>
|
|
46
22
|
<testCase name="StringUtils it should return "expression" and "parameters" setted through constructor method" duration="0"/>
|
|
47
|
-
<testCase name="StringUtils it should return a Criteria class with "expression" and "parameters" as needed setted through "append" method" duration="
|
|
48
|
-
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "append" method" duration="
|
|
23
|
+
<testCase name="StringUtils it should return a Criteria class with "expression" and "parameters" as needed setted through "append" method" duration="1"/>
|
|
24
|
+
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "append" method" duration="88"/>
|
|
49
25
|
<testCase name="StringUtils it should return undefined as "expression" and "[]" as parameters as we use an empty criteria as first entry in the constructor" duration="1"/>
|
|
50
26
|
<testCase name="StringUtils it should return a Criteria class with "Expression" and "parameters" concatenaded as needed setted through "OR" method" duration="1"/>
|
|
51
27
|
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "OR" method" duration="0"/>
|
|
52
|
-
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "OR" method" duration="
|
|
53
|
-
<testCase name="StringUtils it should return a Criteria class with "Expression" and "parameters" concatenaded as needed setted through "AND" method" duration="
|
|
28
|
+
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "OR" method" duration="0"/>
|
|
29
|
+
<testCase name="StringUtils it should return a Criteria class with "Expression" and "parameters" concatenaded as needed setted through "AND" method" duration="8"/>
|
|
30
|
+
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "AND" method" duration="1"/>
|
|
54
31
|
<testCase name="StringUtils it should return a Criteria class with "Criteria class" and "parameters" concatenaded as needed setted through "AND" method" duration="1"/>
|
|
55
|
-
<testCase name="StringUtils it should return a
|
|
56
|
-
<testCase name="StringUtils it should return a toJSON object with "Criteria class" and "parameters" concatenaded as needed setted through "AND" method" duration="0"/>
|
|
32
|
+
<testCase name="StringUtils it should return a toJSON object with "Criteria class" and "parameters" concatenaded as needed setted through "AND" method" duration="1"/>
|
|
57
33
|
<testCase name="StringUtils it should return a toJSON object with through empty constructor" duration="0"/>
|
|
58
34
|
</file>
|
|
35
|
+
<file path="/builds/dti/design-system/sankhyacore/test/util/MaskFormatter.spec.ts">
|
|
36
|
+
<testCase name="Mask Formatter mask:CPF complete valid" duration="9"/>
|
|
37
|
+
<testCase name="Mask Formatter mask:CPF complete valid literals" duration="9"/>
|
|
38
|
+
<testCase name="Mask Formatter mask:CPF incomplete valid" duration="1"/>
|
|
39
|
+
<testCase name="Mask Formatter mask:CPF incomplete valid placeholder" duration="1"/>
|
|
40
|
+
<testCase name="Mask Formatter mask:CPF too long valid" duration="1"/>
|
|
41
|
+
<testCase name="Mask Formatter mask:CPF invalid for string" duration="278"/>
|
|
42
|
+
<testCase name="Mask Formatter mask:CPF invalid for being too long" duration="1"/>
|
|
43
|
+
<testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="1"/>
|
|
44
|
+
<testCase name="Mask Formatter mask:Licence plate valid lowercase" duration="1"/>
|
|
45
|
+
<testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
|
|
46
|
+
<testCase name="Mask Formatter mask:Licence plate invalid for being too short" duration="0"/>
|
|
47
|
+
<testCase name="Mask Formatter mask:Licence plate invalid for being too short with placeholder" duration="1"/>
|
|
48
|
+
<testCase name="Mask Formatter mask:Licence plate invalid" duration="6"/>
|
|
49
|
+
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
|
|
50
|
+
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="0"/>
|
|
51
|
+
<testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
|
|
52
|
+
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="0"/>
|
|
53
|
+
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
|
|
54
|
+
<testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
|
|
55
|
+
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
|
|
56
|
+
<testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
|
|
57
|
+
<testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
|
|
58
|
+
</file>
|
|
59
59
|
<file path="/builds/dti/design-system/sankhyacore/test/util/NumberUtils.spec.ts">
|
|
60
|
-
<testCase name="StringUtils stringToNumber" duration="
|
|
61
|
-
<testCase name="StringUtils format" duration="
|
|
60
|
+
<testCase name="StringUtils stringToNumber" duration="192"/>
|
|
61
|
+
<testCase name="StringUtils format" duration="21"/>
|
|
62
62
|
<testCase name="StringUtils format without formatnumber parameter" duration="1"/>
|
|
63
63
|
<testCase name="StringUtils format without formatnumber parameter" duration="1"/>
|
|
64
|
-
<testCase name="StringUtils format round number" duration="
|
|
64
|
+
<testCase name="StringUtils format round number" duration="1"/>
|
|
65
65
|
</file>
|
|
66
66
|
<file path="/builds/dti/design-system/sankhyacore/test/util/StringUtils.spec.ts">
|
|
67
|
-
<testCase name="StringUtils valor vazio" duration="
|
|
67
|
+
<testCase name="StringUtils valor vazio" duration="7"/>
|
|
68
68
|
<testCase name="StringUtils valor em branco" duration="1"/>
|
|
69
69
|
<testCase name="StringUtils valor null" duration="0"/>
|
|
70
70
|
<testCase name="StringUtils valor undefined" duration="0"/>
|
|
71
71
|
<testCase name="StringUtils valor 0" duration="1"/>
|
|
72
|
-
<testCase name="StringUtils com valor" duration="
|
|
72
|
+
<testCase name="StringUtils com valor" duration="1"/>
|
|
73
73
|
<testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="1"/>
|
|
74
|
-
<testCase name="StringUtils should return the original value when called with an object without a toString method" duration="
|
|
74
|
+
<testCase name="StringUtils should return the original value when called with an object without a toString method" duration="3"/>
|
|
75
75
|
<testCase name="StringUtils should return the original value when called with undefined" duration="1"/>
|
|
76
76
|
</file>
|
|
77
77
|
<file path="/builds/dti/design-system/sankhyacore/test/util/OverflowWatcher.spec.ts">
|
|
78
|
-
<testCase name="OverflowWatcher should initialize with provided parameters" duration="
|
|
79
|
-
<testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="
|
|
80
|
-
<testCase name="OverflowWatcher Should call callback on forceUpdate" duration="
|
|
81
|
-
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="
|
|
82
|
-
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="
|
|
83
|
-
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="
|
|
84
|
-
<testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="
|
|
85
|
-
<testCase name="OverflowWatcher should ignore elements that can not overflow" duration="
|
|
78
|
+
<testCase name="OverflowWatcher should initialize with provided parameters" duration="18"/>
|
|
79
|
+
<testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="71"/>
|
|
80
|
+
<testCase name="OverflowWatcher Should call callback on forceUpdate" duration="204"/>
|
|
81
|
+
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="17"/>
|
|
82
|
+
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="76"/>
|
|
83
|
+
<testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="10"/>
|
|
84
|
+
<testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="4"/>
|
|
85
|
+
<testCase name="OverflowWatcher should ignore elements that can not overflow" duration="11"/>
|
|
86
86
|
<testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="1"/>
|
|
87
87
|
</file>
|
|
88
|
-
<file path="/builds/dti/design-system/sankhyacore/test/util/DataUnitStorage.spec.ts">
|
|
89
|
-
<testCase name="DataUnitStorage put should store a DataUnit instance in the DataUnitStorage" duration="7"/>
|
|
90
|
-
<testCase name="DataUnitStorage get should return the stored DataUnit instance from the DataUnitStorage" duration="1"/>
|
|
91
|
-
<testCase name="DataUnitStorage get should return undefined if the DataUnit instance is not found in the DataUnitStorage" duration="1"/>
|
|
92
|
-
<testCase name="DataUnitStorage remove should remove the specified DataUnit instance from the DataUnitStorage" duration="0"/>
|
|
93
|
-
<testCase name="DataUnitStorage remove should remove the DataUnit instance with the specified name from the DataUnitStorage" duration="1"/>
|
|
94
|
-
<testCase name="DataUnitStorage remove should not remove any DataUnit instance if the specified DataUnit instance or name is not found in the DataUnitStorage" duration="0"/>
|
|
95
|
-
</file>
|
|
96
88
|
<file path="/builds/dti/design-system/sankhyacore/test/util/ElementIDUtils.spec.ts">
|
|
97
|
-
<testCase name="addIDInfo 1 - should add data-element-id with valid id "movFinanceira_snkApplication"" duration="
|
|
98
|
-
<testCase name="addIDInfo 2 - should add data-element-id with valid id "brComSankhyaFinCadMovimentacaofinanceira_snkApplication"" duration="
|
|
99
|
-
<testCase name="addIDInfo 3 - should add data-element-id with valid id "movFinanceira_br.com.sankhya.fin.cad.movimentacaoFinanceira"" duration="
|
|
100
|
-
<testCase name="addIDInfo 4 - should add data-element-id with valid id "meuID2_snkApplication"" duration="
|
|
89
|
+
<testCase name="addIDInfo 1 - should add data-element-id with valid id "movFinanceira_snkApplication"" duration="10"/>
|
|
90
|
+
<testCase name="addIDInfo 2 - should add data-element-id with valid id "brComSankhyaFinCadMovimentacaofinanceira_snkApplication"" duration="2"/>
|
|
91
|
+
<testCase name="addIDInfo 3 - should add data-element-id with valid id "movFinanceira_br.com.sankhya.fin.cad.movimentacaoFinanceira"" duration="1"/>
|
|
92
|
+
<testCase name="addIDInfo 4 - should add data-element-id with valid id "meuID2_snkApplication"" duration="1"/>
|
|
101
93
|
<testCase name="addIDInfo 5 - should add data-element-id with valid id "movFinanceira_snkApplication"" duration="1"/>
|
|
102
|
-
<testCase name="addIDInfo 6 - should add data-element-id with valid id "movFinanceira_snkApplication"" duration="
|
|
103
|
-
<testCase name="addIDInfo 7 - should add data-element-id with valid id "componenteNameTest_snkApplication"" duration="
|
|
94
|
+
<testCase name="addIDInfo 6 - should add data-element-id with valid id "movFinanceira_snkApplication"" duration="2"/>
|
|
95
|
+
<testCase name="addIDInfo 7 - should add data-element-id with valid id "componenteNameTest_snkApplication"" duration="1"/>
|
|
104
96
|
<testCase name="addIDInfo 8 - should add data-element-id with valid id "componentLabel_snkApplication"" duration="1"/>
|
|
105
|
-
<testCase name="addIDInfo 9 - should add data-element-id with valid id "dataunitFinanceiro_br.com.sankhya.fin.cad.movimentacaoFinanceira"" duration="
|
|
106
|
-
<testCase name="addIDInfo 10 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_br.com.sankhya.fin.cad.movimentacaoFinanceira"" duration="
|
|
107
|
-
<testCase name="addIDInfo 11 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira"" duration="
|
|
97
|
+
<testCase name="addIDInfo 9 - should add data-element-id with valid id "dataunitFinanceiro_br.com.sankhya.fin.cad.movimentacaoFinanceira"" duration="1"/>
|
|
98
|
+
<testCase name="addIDInfo 10 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_br.com.sankhya.fin.cad.movimentacaoFinanceira"" duration="1"/>
|
|
99
|
+
<testCase name="addIDInfo 11 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira"" duration="58"/>
|
|
108
100
|
<testCase name="addIDInfo 12 - should add data-element-id with valid id "dataunitFinanceiro_movFinanceira_movimentacaoFinanceira"" duration="1"/>
|
|
109
|
-
<testCase name="addIDInfo 13 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira"" duration="
|
|
110
|
-
<testCase name="addIDInfo 14 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_movimentacaoFinanceira"" duration="
|
|
101
|
+
<testCase name="addIDInfo 13 - should add data-element-id with valid id "dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira"" duration="2"/>
|
|
102
|
+
<testCase name="addIDInfo 14 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_movimentacaoFinanceira"" duration="2"/>
|
|
111
103
|
<testCase name="addIDInfo 15 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_snkApplication"" duration="1"/>
|
|
112
|
-
<testCase name="addIDInfo 16 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_snkApplication"" duration="
|
|
104
|
+
<testCase name="addIDInfo 16 - should add data-element-id with valid id "dataunitFinanceiro_meuIdTeste_snkApplication"" duration="4"/>
|
|
113
105
|
<testCase name="addIDInfo 17 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="1"/>
|
|
114
106
|
<testCase name="addIDInfo 18 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="1"/>
|
|
115
|
-
<testCase name="addIDInfo 19 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="
|
|
107
|
+
<testCase name="addIDInfo 19 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="1"/>
|
|
116
108
|
<testCase name="addIDInfo 20 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="1"/>
|
|
117
109
|
<testCase name="addIDInfo 21 - should add data-element-id with valid id "movFinanceira_movimentacaoFinanceira"" duration="1"/>
|
|
118
110
|
<testCase name="addIDInfo 22 - should add data-element-id with valid id "bancoObrigatorio_movimentacaoFinanceira"" duration="1"/>
|
|
119
111
|
</file>
|
|
112
|
+
<file path="/builds/dti/design-system/sankhyacore/test/util/DataUnitStorage.spec.ts">
|
|
113
|
+
<testCase name="DataUnitStorage put should store a DataUnit instance in the DataUnitStorage" duration="5"/>
|
|
114
|
+
<testCase name="DataUnitStorage get should return the stored DataUnit instance from the DataUnitStorage" duration="0"/>
|
|
115
|
+
<testCase name="DataUnitStorage get should return undefined if the DataUnit instance is not found in the DataUnitStorage" duration="1"/>
|
|
116
|
+
<testCase name="DataUnitStorage remove should remove the specified DataUnit instance from the DataUnitStorage" duration="1"/>
|
|
117
|
+
<testCase name="DataUnitStorage remove should remove the DataUnit instance with the specified name from the DataUnitStorage" duration="0"/>
|
|
118
|
+
<testCase name="DataUnitStorage remove should not remove any DataUnit instance if the specified DataUnit instance or name is not found in the DataUnitStorage" duration="0"/>
|
|
119
|
+
</file>
|
|
120
120
|
<file path="/builds/dti/design-system/sankhyacore/test/util/ElementUtils.spec.ts">
|
|
121
|
-
<testCase name="calcMarginSize should calculate correctly the size of horizontal margin" duration="
|
|
122
|
-
<testCase name="calcMarginSize should calculate correctly the size of vertical margin" duration="
|
|
123
|
-
<testCase name="calcMarginSize should threat values defined as zero" duration="
|
|
121
|
+
<testCase name="calcMarginSize should calculate correctly the size of horizontal margin" duration="46"/>
|
|
122
|
+
<testCase name="calcMarginSize should calculate correctly the size of vertical margin" duration="2"/>
|
|
123
|
+
<testCase name="calcMarginSize should threat values defined as zero" duration="4"/>
|
|
124
124
|
</file>
|
|
125
125
|
</unitTest>
|
package/src/dataunit/DataUnit.ts
CHANGED
|
@@ -41,7 +41,7 @@ export default class DataUnit {
|
|
|
41
41
|
private _sortingProvider?: SortingProvider;
|
|
42
42
|
private _filterProviders: Map<string, FilterProvider>;
|
|
43
43
|
private _stateManager: StateManager;
|
|
44
|
-
private _interceptors:
|
|
44
|
+
private _interceptors: Map<string, DUActionInterceptor>;
|
|
45
45
|
private _pageSize: number;
|
|
46
46
|
private _childByName = new Map<string, DataUnit>();
|
|
47
47
|
private _parentDataUnit: DataUnit | undefined;
|
|
@@ -79,7 +79,7 @@ export default class DataUnit {
|
|
|
79
79
|
this._filterProviders = new Map<string, FilterProvider>();
|
|
80
80
|
this._sortingProvider = undefined;
|
|
81
81
|
this._defaultSorting = [];
|
|
82
|
-
this._interceptors =
|
|
82
|
+
this._interceptors = new Map();
|
|
83
83
|
this._parentDataUnit = parentDataUnit;
|
|
84
84
|
this._parentDataUnit?.subscribe(this.onDataUnitParentEvent);
|
|
85
85
|
this._loadingLockers = [];
|
|
@@ -113,7 +113,7 @@ export default class DataUnit {
|
|
|
113
113
|
this._observers = [];
|
|
114
114
|
this._filterProviders = new Map<string, FilterProvider>();
|
|
115
115
|
this._sortingProvider = undefined;
|
|
116
|
-
this._interceptors =
|
|
116
|
+
this._interceptors = new Map();
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
/**
|
|
@@ -317,13 +317,16 @@ export default class DataUnit {
|
|
|
317
317
|
|
|
318
318
|
await this.processLoadingLockers();
|
|
319
319
|
|
|
320
|
-
if (this._parentDataUnit
|
|
320
|
+
if (this._parentDataUnit) {
|
|
321
|
+
const parentRecord = this._parentDataUnit.getSelectedRecord();
|
|
322
|
+
if(parentRecord == undefined || this._parentDataUnit.isNewRecord(parentRecord.__record__id__)){
|
|
321
323
|
if(this.records){
|
|
322
324
|
this.clearDataUnit();
|
|
323
325
|
}
|
|
324
326
|
return Promise.resolve({
|
|
325
327
|
records: []
|
|
326
328
|
});
|
|
329
|
+
}
|
|
327
330
|
}
|
|
328
331
|
|
|
329
332
|
const loadDataRequest = this.getLoadDataRequest(quickFilter, source);
|
|
@@ -665,7 +668,7 @@ export default class DataUnit {
|
|
|
665
668
|
*
|
|
666
669
|
*/
|
|
667
670
|
public addInterceptor(interceptor: DUActionInterceptor): void {
|
|
668
|
-
this._interceptors.
|
|
671
|
+
this._interceptors.set(interceptor.interceptAction.toString(), interceptor);
|
|
669
672
|
}
|
|
670
673
|
|
|
671
674
|
/**
|
|
@@ -676,7 +679,7 @@ export default class DataUnit {
|
|
|
676
679
|
*
|
|
677
680
|
*/
|
|
678
681
|
public removeInterceptor(interceptor: DUActionInterceptor) {
|
|
679
|
-
this._interceptors
|
|
682
|
+
this._interceptors.delete(interceptor.interceptAction.toString())
|
|
680
683
|
}
|
|
681
684
|
|
|
682
685
|
/**
|
|
@@ -1440,7 +1443,7 @@ export default class DataUnit {
|
|
|
1440
1443
|
if (executionCtx && executionCtx.before) {
|
|
1441
1444
|
action = executionCtx.before(action);
|
|
1442
1445
|
}
|
|
1443
|
-
if (action && this._interceptors && this._interceptors.
|
|
1446
|
+
if (action && this._interceptors && this._interceptors.size > 0) {
|
|
1444
1447
|
action = await this.intercept(action, this._interceptors.values());
|
|
1445
1448
|
}
|
|
1446
1449
|
if (action) {
|
|
@@ -1530,7 +1533,7 @@ export default class DataUnit {
|
|
|
1530
1533
|
* @param observer - Função que recebe como parâmetro as ações que serão monitoradas.
|
|
1531
1534
|
*
|
|
1532
1535
|
*/
|
|
1533
|
-
public subscribe(observer: (action: DataUnitAction) => void | Promise<void>) {
|
|
1536
|
+
public subscribe(observer: (action: DataUnitAction, options?:DataUnitEventOptions) => void | Promise<void>) {
|
|
1534
1537
|
this._observers.push(observer);
|
|
1535
1538
|
}
|
|
1536
1539
|
|