@sankhyalabs/core 0.0.0-feat-dev-41261.1 → 0.0.0-feat-dev-41261.3

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.
@@ -129,7 +129,7 @@ src/utils/MaskFormatter.ts:55
129
129
 
130
130
  #### Source
131
131
 
132
- src/utils/MaskFormatter.ts:379
132
+ src/utils/MaskFormatter.ts:468
133
133
 
134
134
  ***
135
135
 
@@ -149,7 +149,7 @@ src/utils/MaskFormatter.ts:54
149
149
 
150
150
  #### Source
151
151
 
152
- src/utils/MaskFormatter.ts:393
152
+ src/utils/MaskFormatter.ts:482
153
153
 
154
154
  ***
155
155
 
@@ -179,7 +179,7 @@ src/utils/MaskFormatter.ts:49
179
179
 
180
180
  #### Source
181
181
 
182
- src/utils/MaskFormatter.ts:304
182
+ src/utils/MaskFormatter.ts:393
183
183
 
184
184
  ***
185
185
 
@@ -209,7 +209,7 @@ src/utils/MaskFormatter.ts:52
209
209
 
210
210
  #### Source
211
211
 
212
- src/utils/MaskFormatter.ts:285
212
+ src/utils/MaskFormatter.ts:374
213
213
 
214
214
  ***
215
215
 
@@ -219,7 +219,7 @@ src/utils/MaskFormatter.ts:285
219
219
 
220
220
  #### Source
221
221
 
222
- src/utils/MaskFormatter.ts:356
222
+ src/utils/MaskFormatter.ts:445
223
223
 
224
224
  ***
225
225
 
@@ -239,7 +239,7 @@ src/utils/MaskFormatter.ts:51
239
239
 
240
240
  #### Source
241
241
 
242
- src/utils/MaskFormatter.ts:333
242
+ src/utils/MaskFormatter.ts:422
243
243
 
244
244
  ## Accessors
245
245
 
@@ -269,6 +269,30 @@ src/utils/MaskFormatter.ts:87
269
269
 
270
270
  ## Methods
271
271
 
272
+ ### applyMask()
273
+
274
+ > **applyMask**(`value`): `string`
275
+
276
+ Aplica a máscara quando o input é alterado
277
+
278
+ #### Parameters
279
+
280
+ • **value**: `string`
281
+
282
+ Valor a ser aplicado com a máscara.
283
+
284
+ #### Returns
285
+
286
+ `string`
287
+
288
+ O valor processado de acordo com o padrão.
289
+
290
+ #### Source
291
+
292
+ src/utils/MaskFormatter.ts:102
293
+
294
+ ***
295
+
272
296
  ### format()
273
297
 
274
298
  > **format**(`value`, `trimBefore`): `string`
@@ -293,7 +317,31 @@ O valor processado de acordo com o padrão.
293
317
 
294
318
  #### Source
295
319
 
296
- src/utils/MaskFormatter.ts:102
320
+ src/utils/MaskFormatter.ts:191
321
+
322
+ ***
323
+
324
+ ### removeMask()
325
+
326
+ > **removeMask**(`value`): `string`
327
+
328
+ Remove a máscara formatando a string retornando sem máscara
329
+
330
+ #### Parameters
331
+
332
+ • **value**: `string`
333
+
334
+ Valor a ser formatado com máscara.
335
+
336
+ #### Returns
337
+
338
+ `string`
339
+
340
+ O valor processado de acordo com o padrão.
341
+
342
+ #### Source
343
+
344
+ src/utils/MaskFormatter.ts:171
297
345
 
298
346
  ***
299
347
 
@@ -309,4 +357,4 @@ Prepara a formatação internamente de acordo com o padrão.
309
357
 
310
358
  #### Source
311
359
 
312
- src/utils/MaskFormatter.ts:122
360
+ src/utils/MaskFormatter.ts:211
@@ -14,7 +14,7 @@
14
14
 
15
15
  #### Source
16
16
 
17
- src/dataunit/metadata/UnitMetadata.ts:77
17
+ src/dataunit/metadata/UnitMetadata.ts:78
18
18
 
19
19
  ***
20
20
 
@@ -24,7 +24,7 @@ src/dataunit/metadata/UnitMetadata.ts:77
24
24
 
25
25
  #### Source
26
26
 
27
- src/dataunit/metadata/UnitMetadata.ts:76
27
+ src/dataunit/metadata/UnitMetadata.ts:77
28
28
 
29
29
  ***
30
30
 
@@ -34,4 +34,4 @@ src/dataunit/metadata/UnitMetadata.ts:76
34
34
 
35
35
  #### Source
36
36
 
37
- src/dataunit/metadata/UnitMetadata.ts:78
37
+ src/dataunit/metadata/UnitMetadata.ts:79
@@ -14,7 +14,7 @@
14
14
 
15
15
  #### Source
16
16
 
17
- src/dataunit/metadata/UnitMetadata.ts:71
17
+ src/dataunit/metadata/UnitMetadata.ts:72
18
18
 
19
19
  ***
20
20
 
@@ -24,4 +24,4 @@ src/dataunit/metadata/UnitMetadata.ts:71
24
24
 
25
25
  #### Source
26
26
 
27
- src/dataunit/metadata/UnitMetadata.ts:72
27
+ src/dataunit/metadata/UnitMetadata.ts:73
@@ -14,7 +14,7 @@
14
14
 
15
15
  #### Source
16
16
 
17
- src/dataunit/metadata/UnitMetadata.ts:88
17
+ src/dataunit/metadata/UnitMetadata.ts:89
18
18
 
19
19
  ***
20
20
 
@@ -24,7 +24,7 @@ src/dataunit/metadata/UnitMetadata.ts:88
24
24
 
25
25
  #### Source
26
26
 
27
- src/dataunit/metadata/UnitMetadata.ts:84
27
+ src/dataunit/metadata/UnitMetadata.ts:85
28
28
 
29
29
  ***
30
30
 
@@ -34,7 +34,7 @@ src/dataunit/metadata/UnitMetadata.ts:84
34
34
 
35
35
  #### Source
36
36
 
37
- src/dataunit/metadata/UnitMetadata.ts:85
37
+ src/dataunit/metadata/UnitMetadata.ts:86
38
38
 
39
39
  ***
40
40
 
@@ -44,7 +44,7 @@ src/dataunit/metadata/UnitMetadata.ts:85
44
44
 
45
45
  #### Source
46
46
 
47
- src/dataunit/metadata/UnitMetadata.ts:91
47
+ src/dataunit/metadata/UnitMetadata.ts:92
48
48
 
49
49
  ***
50
50
 
@@ -54,7 +54,7 @@ src/dataunit/metadata/UnitMetadata.ts:91
54
54
 
55
55
  #### Source
56
56
 
57
- src/dataunit/metadata/UnitMetadata.ts:87
57
+ src/dataunit/metadata/UnitMetadata.ts:88
58
58
 
59
59
  ***
60
60
 
@@ -64,7 +64,7 @@ src/dataunit/metadata/UnitMetadata.ts:87
64
64
 
65
65
  #### Source
66
66
 
67
- src/dataunit/metadata/UnitMetadata.ts:82
67
+ src/dataunit/metadata/UnitMetadata.ts:83
68
68
 
69
69
  ***
70
70
 
@@ -74,7 +74,7 @@ src/dataunit/metadata/UnitMetadata.ts:82
74
74
 
75
75
  #### Source
76
76
 
77
- src/dataunit/metadata/UnitMetadata.ts:98
77
+ src/dataunit/metadata/UnitMetadata.ts:99
78
78
 
79
79
  ***
80
80
 
@@ -84,7 +84,7 @@ src/dataunit/metadata/UnitMetadata.ts:98
84
84
 
85
85
  #### Source
86
86
 
87
- src/dataunit/metadata/UnitMetadata.ts:83
87
+ src/dataunit/metadata/UnitMetadata.ts:84
88
88
 
89
89
  ***
90
90
 
@@ -94,7 +94,7 @@ src/dataunit/metadata/UnitMetadata.ts:83
94
94
 
95
95
  #### Source
96
96
 
97
- src/dataunit/metadata/UnitMetadata.ts:92
97
+ src/dataunit/metadata/UnitMetadata.ts:93
98
98
 
99
99
  ***
100
100
 
@@ -104,7 +104,7 @@ src/dataunit/metadata/UnitMetadata.ts:92
104
104
 
105
105
  #### Source
106
106
 
107
- src/dataunit/metadata/UnitMetadata.ts:97
107
+ src/dataunit/metadata/UnitMetadata.ts:98
108
108
 
109
109
  ***
110
110
 
@@ -114,7 +114,7 @@ src/dataunit/metadata/UnitMetadata.ts:97
114
114
 
115
115
  #### Source
116
116
 
117
- src/dataunit/metadata/UnitMetadata.ts:96
117
+ src/dataunit/metadata/UnitMetadata.ts:97
118
118
 
119
119
  ***
120
120
 
@@ -124,7 +124,7 @@ src/dataunit/metadata/UnitMetadata.ts:96
124
124
 
125
125
  #### Source
126
126
 
127
- src/dataunit/metadata/UnitMetadata.ts:90
127
+ src/dataunit/metadata/UnitMetadata.ts:91
128
128
 
129
129
  ***
130
130
 
@@ -134,7 +134,7 @@ src/dataunit/metadata/UnitMetadata.ts:90
134
134
 
135
135
  #### Source
136
136
 
137
- src/dataunit/metadata/UnitMetadata.ts:95
137
+ src/dataunit/metadata/UnitMetadata.ts:96
138
138
 
139
139
  ***
140
140
 
@@ -144,7 +144,7 @@ src/dataunit/metadata/UnitMetadata.ts:95
144
144
 
145
145
  #### Source
146
146
 
147
- src/dataunit/metadata/UnitMetadata.ts:93
147
+ src/dataunit/metadata/UnitMetadata.ts:94
148
148
 
149
149
  ***
150
150
 
@@ -154,7 +154,7 @@ src/dataunit/metadata/UnitMetadata.ts:93
154
154
 
155
155
  #### Source
156
156
 
157
- src/dataunit/metadata/UnitMetadata.ts:94
157
+ src/dataunit/metadata/UnitMetadata.ts:95
158
158
 
159
159
  ***
160
160
 
@@ -164,7 +164,7 @@ src/dataunit/metadata/UnitMetadata.ts:94
164
164
 
165
165
  #### Source
166
166
 
167
- src/dataunit/metadata/UnitMetadata.ts:89
167
+ src/dataunit/metadata/UnitMetadata.ts:90
168
168
 
169
169
  ***
170
170
 
@@ -174,4 +174,4 @@ src/dataunit/metadata/UnitMetadata.ts:89
174
174
 
175
175
  #### Source
176
176
 
177
- src/dataunit/metadata/UnitMetadata.ts:86
177
+ src/dataunit/metadata/UnitMetadata.ts:87
@@ -58,6 +58,16 @@ src/dataunit/metadata/UnitMetadata.ts:23
58
58
 
59
59
  ***
60
60
 
61
+ ### mask?
62
+
63
+ > `optional` **mask**: `string`
64
+
65
+ #### Source
66
+
67
+ src/dataunit/metadata/UnitMetadata.ts:35
68
+
69
+ ***
70
+
61
71
  ### name
62
72
 
63
73
  > **name**: `string`
@@ -14,7 +14,7 @@
14
14
 
15
15
  #### Source
16
16
 
17
- src/dataunit/metadata/UnitMetadata.ts:45
17
+ src/dataunit/metadata/UnitMetadata.ts:46
18
18
 
19
19
  ***
20
20
 
@@ -24,7 +24,7 @@ src/dataunit/metadata/UnitMetadata.ts:45
24
24
 
25
25
  #### Source
26
26
 
27
- src/dataunit/metadata/UnitMetadata.ts:44
27
+ src/dataunit/metadata/UnitMetadata.ts:45
28
28
 
29
29
  ***
30
30
 
@@ -34,4 +34,4 @@ src/dataunit/metadata/UnitMetadata.ts:44
34
34
 
35
35
  #### Source
36
36
 
37
- src/dataunit/metadata/UnitMetadata.ts:46
37
+ src/dataunit/metadata/UnitMetadata.ts:47
@@ -14,7 +14,7 @@
14
14
 
15
15
  #### Source
16
16
 
17
- src/dataunit/metadata/UnitMetadata.ts:58
17
+ src/dataunit/metadata/UnitMetadata.ts:59
18
18
 
19
19
  ***
20
20
 
@@ -24,7 +24,7 @@ src/dataunit/metadata/UnitMetadata.ts:58
24
24
 
25
25
  #### Source
26
26
 
27
- src/dataunit/metadata/UnitMetadata.ts:56
27
+ src/dataunit/metadata/UnitMetadata.ts:57
28
28
 
29
29
  ***
30
30
 
@@ -34,4 +34,4 @@ src/dataunit/metadata/UnitMetadata.ts:56
34
34
 
35
35
  #### Source
36
36
 
37
- src/dataunit/metadata/UnitMetadata.ts:57
37
+ src/dataunit/metadata/UnitMetadata.ts:58
@@ -24,4 +24,4 @@
24
24
 
25
25
  #### Source
26
26
 
27
- src/dataunit/metadata/UnitMetadata.ts:67
27
+ src/dataunit/metadata/UnitMetadata.ts:68
@@ -10,4 +10,4 @@
10
10
 
11
11
  ## Source
12
12
 
13
- src/utils/MaskFormatter.ts:170
13
+ src/utils/MaskFormatter.ts:259
@@ -10,4 +10,4 @@
10
10
 
11
11
  ## Source
12
12
 
13
- src/utils/MaskFormatter.ts:170
13
+ src/utils/MaskFormatter.ts:259
@@ -28,6 +28,7 @@ export interface FieldDescriptor {
28
28
  dependencies?: Array<FieldDependency>;
29
29
  group?: string;
30
30
  order?: number;
31
+ mask?: string;
31
32
  }
32
33
  export interface FieldDependency {
33
34
  masterFields: Array<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"UnitMetadata.js","sourceRoot":"","sources":["../../../src/dataunit/metadata/UnitMetadata.ts"],"names":[],"mappings":"AAqEA,MAAM,CAAN,IAAY,QAGX;AAHD,WAAY,QAAQ;IAChB,uBAAW,CAAA;IACX,yBAAa,CAAA;AACjB,CAAC,EAHW,QAAQ,KAAR,QAAQ,QAGnB;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACtB,yCAAuB,CAAA;IACvB,6CAA2B,CAAA;IAC3B,4CAA0B,CAAA;AAC9B,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,MAAM,CAAN,IAAY,aAkBX;AAlBD,WAAY,aAAa;IACr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IACzB,sCAAqB,CAAA;IACrB,8BAAa,CAAA;AACjB,CAAC,EAlBW,aAAa,KAAb,aAAa,QAkBxB;AAED,MAAM,CAAN,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IACzB,mEAA8C,CAAA;AAClD,CAAC,EAFW,iBAAiB,KAAjB,iBAAiB,QAE5B"}
@@ -71,6 +71,20 @@ export declare class MaskFormatter {
71
71
  */
72
72
  get mask(): string;
73
73
  constructor(mask: string);
74
+ /**
75
+ * Aplica a máscara quando o input é alterado
76
+ *
77
+ * @param value Valor a ser aplicado com a máscara.
78
+ * @return O valor processado de acordo com o padrão.
79
+ */
80
+ applyMask(value: string): string;
81
+ /**
82
+ * Remove a máscara formatando a string retornando sem máscara
83
+ *
84
+ * @param value Valor a ser formatado com máscara.
85
+ * @return O valor processado de acordo com o padrão.
86
+ */
87
+ removeMask(value: string): string;
74
88
  /**
75
89
  * Formata a string passada baseada na máscara definda pelo atributo mask.
76
90
  *
@@ -70,6 +70,82 @@ export class MaskFormatter {
70
70
  this.placeholder = ' ';
71
71
  this.mask = mask;
72
72
  }
73
+ /**
74
+ * Aplica a máscara quando o input é alterado
75
+ *
76
+ * @param value Valor a ser aplicado com a máscara.
77
+ * @return O valor processado de acordo com o padrão.
78
+ */
79
+ applyMask(value) {
80
+ const MASK_COR = "'#AAAAAA";
81
+ const expectedFormattedValue = this.format(value.replace(/\s/g, ""));
82
+ if (value === expectedFormattedValue) {
83
+ return value;
84
+ }
85
+ if (this.mask === MASK_COR) {
86
+ value = value.replace("#", "");
87
+ const expectedFormattedValue = this.format(value.replace(/\s/g, ""));
88
+ if (value === expectedFormattedValue) {
89
+ return value;
90
+ }
91
+ if (value.length >= 6) {
92
+ const formattedValue = this.format(value);
93
+ return formattedValue;
94
+ }
95
+ else {
96
+ return value;
97
+ }
98
+ }
99
+ const maskPlaceholders = this.mask.match(/[UAL#?*']/g) || [];
100
+ const placeholderCount = maskPlaceholders.length;
101
+ const validValue = value.split('').filter((char, index) => {
102
+ const placeholder = maskPlaceholders[index];
103
+ if (!placeholder)
104
+ return false;
105
+ switch (placeholder) {
106
+ case MaskFormatter.DIGIT_KEY:
107
+ return /\d/.test(char);
108
+ case MaskFormatter.UPPERCASE_KEY:
109
+ return /[a-zA-Z]/.test(char);
110
+ case MaskFormatter.LOWERCASE_KEY:
111
+ return /[a-zA-Z]/.test(char);
112
+ case MaskFormatter.ALPHA_NUMERIC_KEY:
113
+ return /[a-zA-Z0-9]/.test(char);
114
+ case MaskFormatter.CHARACTER_KEY:
115
+ return /[a-zA-Z]/.test(char);
116
+ case MaskFormatter.ANYTHING_KEY:
117
+ return true;
118
+ case MaskFormatter.LITERAL_KEY:
119
+ const literalChar = this.mask.charAt(index);
120
+ return char === literalChar;
121
+ default:
122
+ return false;
123
+ }
124
+ });
125
+ if (validValue.length >= placeholderCount) {
126
+ const formattedValue = this.format(validValue.join(''));
127
+ return formattedValue;
128
+ }
129
+ else {
130
+ const partialValue = validValue.join('');
131
+ return partialValue;
132
+ }
133
+ }
134
+ /**
135
+ * Remove a máscara formatando a string retornando sem máscara
136
+ *
137
+ * @param value Valor a ser formatado com máscara.
138
+ * @return O valor processado de acordo com o padrão.
139
+ */
140
+ removeMask(value) {
141
+ const maskString = this.mask.replace("#", "");
142
+ const maskElements = maskString.split("");
143
+ let valueMapped = value;
144
+ maskElements.forEach(maskChar => {
145
+ valueMapped = valueMapped.replace(maskChar, "");
146
+ });
147
+ return valueMapped;
148
+ }
73
149
  /**
74
150
  * Formata a string passada baseada na máscara definda pelo atributo mask.
75
151
  *
@@ -1 +1 @@
1
- {"version":3,"file":"MaskFormatter.js","sourceRoot":"","sources":["../../src/utils/MaskFormatter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,OAAO,aAAa;IA2BtB;;OAEG;IACH,IAAW,IAAI,CAAC,IAAY;QACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;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MAKE;IACK,OAAO,CAAC,KAAa;QACxB,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;IAC/B,CAAC;CACJ,CAAA;AAEc,gCAAkB,GAAG,KAAM,SAAQ,aAAa,CAAC,aAAa;IAEzE;;;;;MAKE;IACK,gBAAgB,CAAC,KAAa;QACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IACnE,CAAC;IAED;;;;;MAKE;IACK,OAAO,CAAC,KAAa;QACxB,OAAO,KAAK,CAAC,iBAAiB,EAAE,CAAC;IACrC,CAAC;CACJ,CAAA;AAEc,mCAAqB,GAAG,KAAM,SAAQ,aAAa,CAAC,aAAa;IAE5E;;;;;MAKE;IACK,gBAAgB,CAAC,KAAa;QACjC,qFAAqF;QACrF,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACtE,CAAC;CACJ,CAAA;AAEc,2BAAa,GAAG,KAAM,SAAQ,aAAa,CAAC,aAAa;IACpE;;;;;MAKE;IACK,gBAAgB,CAAC,KAAa;QACjC,oFAAoF;QACpF,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IACnE,CAAC;CAEJ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/core",
3
- "version": "0.0.0-feat-dev-41261.1",
3
+ "version": "0.0.0-feat-dev-41261.3",
4
4
  "description": "Modulo core JavaScript da Sankhya.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -1,173 +1,173 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <unitTest version="1">
3
3
  <file path="/builds/dti/design-system/sankhyacore/src/utils/test/objectUtils.spec.ts">
4
- <testCase name="ObjectUtils hasEquivalentValues should return true if both objects have the same property value" duration="8"/>
5
- <testCase name="ObjectUtils hasEquivalentValues should return false if both objects have different property values" duration="0"/>
4
+ <testCase name="ObjectUtils hasEquivalentValues should return true if both objects have the same property value" duration="195"/>
5
+ <testCase name="ObjectUtils hasEquivalentValues should return false if both objects have different property values" duration="1"/>
6
6
  <testCase name="ObjectUtils hasEquivalentValues should return true if both objects are equivalent with custom property to compare" duration="1"/>
7
- <testCase name="ObjectUtils hasEquivalentValues should return false if both objects are not equivalent with custom property to compare" duration="0"/>
7
+ <testCase name="ObjectUtils hasEquivalentValues should return false if both objects are not equivalent with custom property to compare" duration="1"/>
8
8
  <testCase name="ObjectUtils hasEquivalentValues should return false if one object does not have the property" duration="1"/>
9
- <testCase name="ObjectUtils hasEquivalentValues should return true if comparing primitive values directly" duration="1"/>
10
- <testCase name="ObjectUtils hasEquivalentValues should return false if comparing different primitive values" duration="0"/>
11
- <testCase name="ObjectUtils hasEquivalentValues should return true when comparing object with a null value" duration="0"/>
12
- <testCase name="ObjectUtils hasEquivalentValues should return false when comparing object with null and non-null value" duration="0"/>
9
+ <testCase name="ObjectUtils hasEquivalentValues should return true if comparing primitive values directly" duration="2"/>
10
+ <testCase name="ObjectUtils hasEquivalentValues should return false if comparing different primitive values" duration="1"/>
11
+ <testCase name="ObjectUtils hasEquivalentValues should return true when comparing object with a null value" duration="1"/>
12
+ <testCase name="ObjectUtils hasEquivalentValues should return false when comparing object with null and non-null value" duration="3"/>
13
13
  <testCase name="ObjectUtils hasEquivalentValues should return true when comparing non-object values that are equal" duration="1"/>
14
14
  <testCase name="ObjectUtils should get an object value based on its path" duration="1"/>
15
- <testCase name="ObjectUtils should get an object value based on its path" duration="1"/>
16
- <testCase name="ObjectUtils should return undefined if the path doesn&apos;t exist in the object" duration="0"/>
15
+ <testCase name="ObjectUtils should get an object value based on its path" duration="3"/>
16
+ <testCase name="ObjectUtils should return undefined if the path doesn&apos;t exist in the object" duration="1"/>
17
+ </file>
18
+ <file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaModel.spec.ts">
19
+ <testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="180"/>
20
+ <testCase name="StringUtils it should modify &quot;expressions&quot; and &quot;parameters&quot; properties through Setters methods" duration="1"/>
21
+ <testCase name="StringUtils it should return &quot;expression&quot; and &quot;parameters&quot; setted through constructor method" duration="1"/>
22
+ <testCase name="StringUtils it should return a Criteria class with &quot;expression&quot; and &quot;parameters&quot; as needed setted through &quot;append&quot; method" duration="3"/>
23
+ <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;append&quot; method" duration="5"/>
24
+ <testCase name="StringUtils it should return undefined as &quot;expression&quot; and &quot;[]&quot; as parameters as we use an empty criteria as first entry in the constructor" duration="1"/>
25
+ <testCase name="StringUtils it should return a Criteria class with &quot;Expression&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="1"/>
26
+ <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="3"/>
27
+ <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="1"/>
28
+ <testCase name="StringUtils it should return a Criteria class with &quot;Expression&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="2"/>
29
+ <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="1"/>
30
+ <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="1"/>
31
+ <testCase name="StringUtils it should return a toJSON object with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="1"/>
32
+ <testCase name="StringUtils it should return a toJSON object with through empty constructor" duration="0"/>
17
33
  </file>
18
34
  <file path="/builds/dti/design-system/sankhyacore/test/util/MaskFormatter.spec.ts">
19
- <testCase name="Mask Formatter mask:CPF complete valid" duration="20"/>
20
- <testCase name="Mask Formatter mask:CPF complete valid literals" duration="2"/>
35
+ <testCase name="Mask Formatter mask:CPF complete valid" duration="10"/>
36
+ <testCase name="Mask Formatter mask:CPF complete valid literals" duration="1"/>
21
37
  <testCase name="Mask Formatter mask:CPF incomplete valid" duration="1"/>
22
38
  <testCase name="Mask Formatter mask:CPF incomplete valid placeholder" duration="1"/>
23
39
  <testCase name="Mask Formatter mask:CPF too long valid" duration="1"/>
24
- <testCase name="Mask Formatter mask:CPF invalid for string" duration="177"/>
40
+ <testCase name="Mask Formatter mask:CPF invalid for string" duration="188"/>
25
41
  <testCase name="Mask Formatter mask:CPF invalid for being too long" duration="1"/>
26
- <testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="1"/>
42
+ <testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="0"/>
27
43
  <testCase name="Mask Formatter mask:Licence plate valid lowercase" duration="1"/>
28
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="3"/>
44
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
29
45
  <testCase name="Mask Formatter mask:Licence plate invalid for being too short" duration="1"/>
30
- <testCase name="Mask Formatter mask:Licence plate invalid for being too short with placeholder" duration="1"/>
31
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
32
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
33
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="68"/>
46
+ <testCase name="Mask Formatter mask:Licence plate invalid for being too short with placeholder" duration="0"/>
34
47
  <testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
35
48
  <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
36
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="2"/>
37
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
49
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
50
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
51
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
52
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
53
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
38
54
  <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
39
55
  <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
40
56
  <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
41
57
  </file>
42
- <file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaModel.spec.ts">
43
- <testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="89"/>
44
- <testCase name="StringUtils it should modify &quot;expressions&quot; and &quot;parameters&quot; properties through Setters methods" duration="1"/>
45
- <testCase name="StringUtils it should return &quot;expression&quot; and &quot;parameters&quot; setted through constructor method" duration="0"/>
46
- <testCase name="StringUtils it should return a Criteria class with &quot;expression&quot; and &quot;parameters&quot; as needed setted through &quot;append&quot; method" duration="2"/>
47
- <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;append&quot; method" duration="2"/>
48
- <testCase name="StringUtils it should return undefined as &quot;expression&quot; and &quot;[]&quot; as parameters as we use an empty criteria as first entry in the constructor" duration="1"/>
49
- <testCase name="StringUtils it should return a Criteria class with &quot;Expression&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="1"/>
50
- <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="1"/>
51
- <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;OR&quot; method" duration="106"/>
52
- <testCase name="StringUtils it should return a Criteria class with &quot;Expression&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="80"/>
53
- <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="3"/>
54
- <testCase name="StringUtils it should return a Criteria class with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="7"/>
55
- <testCase name="StringUtils it should return a toJSON object with &quot;Criteria class&quot; and &quot;parameters&quot; concatenaded as needed setted through &quot;AND&quot; method" duration="2"/>
56
- <testCase name="StringUtils it should return a toJSON object with through empty constructor" duration="1"/>
57
- </file>
58
- <file path="/builds/dti/design-system/sankhyacore/test/http/HttpProvider.spec.ts">
59
- <testCase name="HttpProvider Metodo GET" duration="4"/>
60
- </file>
61
- <file path="/builds/dti/design-system/sankhyacore/test/http/SkwHttpProvider.ts.spec.ts">
62
- <testCase name="HttpProvider Metodo POST" duration="0"/>
58
+ <file path="/builds/dti/design-system/sankhyacore/test/util/StringUtils.spec.ts">
59
+ <testCase name="StringUtils valor vazio" duration="1"/>
60
+ <testCase name="StringUtils valor em branco" duration="1"/>
61
+ <testCase name="StringUtils valor null" duration="0"/>
62
+ <testCase name="StringUtils valor undefined" duration="0"/>
63
+ <testCase name="StringUtils valor 0" duration="1"/>
64
+ <testCase name="StringUtils com valor" duration="0"/>
65
+ <testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="1"/>
66
+ <testCase name="StringUtils should return the original value when called with an object without a toString method" duration="2"/>
67
+ <testCase name="StringUtils should return the original value when called with undefined" duration="1"/>
63
68
  </file>
64
69
  <file path="/builds/dti/design-system/sankhyacore/test/util/NumberUtils.spec.ts">
65
- <testCase name="StringUtils stringToNumber" duration="92"/>
66
- <testCase name="StringUtils format" duration="194"/>
67
- <testCase name="StringUtils format without formatnumber parameter" duration="7"/>
68
- <testCase name="StringUtils format without formatnumber parameter" duration="2"/>
69
- <testCase name="StringUtils format round number" duration="3"/>
70
+ <testCase name="StringUtils stringToNumber" duration="14"/>
71
+ <testCase name="StringUtils format" duration="99"/>
72
+ <testCase name="StringUtils format without formatnumber parameter" duration="1"/>
73
+ <testCase name="StringUtils format without formatnumber parameter" duration="1"/>
74
+ <testCase name="StringUtils format round number" duration="79"/>
70
75
  </file>
71
- <file path="/builds/dti/design-system/sankhyacore/test/util/OverflowWatcher.spec.ts">
72
- <testCase name="OverflowWatcher should initialize with provided parameters" duration="186"/>
73
- <testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="7"/>
74
- <testCase name="OverflowWatcher Should call callback on forceUpdate" duration="303"/>
75
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="96"/>
76
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="94"/>
77
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="9"/>
78
- <testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="4"/>
79
- <testCase name="OverflowWatcher should ignore elements that can not overflow" duration="185"/>
80
- <testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="1"/>
76
+ <file path="/builds/dti/design-system/sankhyacore/test/http/HttpProvider.spec.ts">
77
+ <testCase name="HttpProvider Metodo GET" duration="1"/>
81
78
  </file>
82
79
  <file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaParameter.spec.ts">
83
80
  <testCase name="StringUtils it should return the correct values of &quot;value&quot; and &quot;type&quot; through the getters methods initial setted by the constructor" duration="2"/>
84
- <testCase name="StringUtils it should return the correct values of &quot;value&quot; and &quot;type&quot; through the getters methods initial setted by the setters methods" duration="1"/>
85
- <testCase name="StringUtils it should return the correct JSON/Object value through the buildParam method" duration="1"/>
81
+ <testCase name="StringUtils it should return the correct values of &quot;value&quot; and &quot;type&quot; through the getters methods initial setted by the setters methods" duration="0"/>
82
+ <testCase name="StringUtils it should return the correct JSON/Object value through the buildParam method" duration="0"/>
86
83
  </file>
87
- <file path="/builds/dti/design-system/sankhyacore/test/util/StringUtils.spec.ts">
88
- <testCase name="StringUtils valor vazio" duration="1"/>
89
- <testCase name="StringUtils valor em branco" duration="0"/>
90
- <testCase name="StringUtils valor null" duration="1"/>
91
- <testCase name="StringUtils valor undefined" duration="1"/>
92
- <testCase name="StringUtils valor 0" duration="0"/>
93
- <testCase name="StringUtils com valor" duration="1"/>
94
- <testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="1"/>
95
- <testCase name="StringUtils should return the original value when called with an object without a toString method" duration="2"/>
96
- <testCase name="StringUtils should return the original value when called with undefined" duration="1"/>
84
+ <file path="/builds/dti/design-system/sankhyacore/test/http/SkwHttpProvider.ts.spec.ts">
85
+ <testCase name="HttpProvider Metodo POST" duration="0"/>
86
+ </file>
87
+ <file path="/builds/dti/design-system/sankhyacore/test/util/OverflowWatcher.spec.ts">
88
+ <testCase name="OverflowWatcher should initialize with provided parameters" duration="87"/>
89
+ <testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="2"/>
90
+ <testCase name="OverflowWatcher Should call callback on forceUpdate" duration="203"/>
91
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="98"/>
92
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="15"/>
93
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="97"/>
94
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="91"/>
95
+ <testCase name="OverflowWatcher should ignore elements that can not overflow" duration="106"/>
96
+ <testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="6"/>
97
97
  </file>
98
98
  <file path="/builds/dti/design-system/sankhyacore/test/util/TimeFormatter.spec.ts">
99
- <testCase name="TimeFormatter Case: input string unformated with showSeconds" duration="8"/>
99
+ <testCase name="TimeFormatter Case: input string unformated with showSeconds" duration="2"/>
100
100
  <testCase name="TimeFormatter Case: input string unformated without showSeconds" duration="1"/>
101
- <testCase name="TimeFormatter Case: validateTime" duration="3"/>
101
+ <testCase name="TimeFormatter Case: validateTime" duration="1"/>
102
102
  </file>
103
103
  <file path="/builds/dti/design-system/sankhyacore/src/dataunit/state/slice/test/RecordsSlice.spec.ts">
104
104
  <testCase name="RecordsSlice should return newlines at the end" duration="2"/>
105
105
  </file>
106
- <file path="/builds/dti/design-system/sankhyacore/src/dataunit/test/DataUnit.spec.ts">
107
- <testCase name="DataUnit should return false when not waiting to reload" duration="3"/>
108
- <testCase name="DataUnit should set waitingToReload to true" duration="1"/>
109
- <testCase name="DataUnit should set waitingToReload to false" duration="0"/>
110
- <testCase name="DataUnit should dispatch SAVING_CANCELED action with correct fields and recordId" duration="2"/>
111
- </file>
112
106
  <file path="/builds/dti/design-system/sankhyacore/test/util/DataUnitStorage.spec.ts">
113
107
  <testCase name="DataUnitStorage put should store a DataUnit instance in the DataUnitStorage" duration="2"/>
114
- <testCase name="DataUnitStorage get should return the stored DataUnit instance from the DataUnitStorage" duration="12"/>
108
+ <testCase name="DataUnitStorage get should return the stored DataUnit instance from the DataUnitStorage" duration="1"/>
115
109
  <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"/>
110
+ <testCase name="DataUnitStorage remove should remove the specified DataUnit instance from the DataUnitStorage" duration="0"/>
117
111
  <testCase name="DataUnitStorage remove should remove the DataUnit instance with the specified name from the DataUnitStorage" duration="1"/>
118
112
  <testCase name="DataUnitStorage remove should not remove any DataUnit instance if the specified DataUnit instance or name is not found in the DataUnitStorage" duration="1"/>
119
113
  </file>
114
+ <file path="/builds/dti/design-system/sankhyacore/src/dataunit/test/DataUnit.spec.ts">
115
+ <testCase name="DataUnit should return false when not waiting to reload" duration="3"/>
116
+ <testCase name="DataUnit should set waitingToReload to true" duration="1"/>
117
+ <testCase name="DataUnit should set waitingToReload to false" duration="0"/>
118
+ <testCase name="DataUnit should dispatch SAVING_CANCELED action with correct fields and recordId" duration="1"/>
119
+ </file>
120
120
  <file path="/builds/dti/design-system/sankhyacore/test/util/ElementIDUtils.spec.ts">
121
- <testCase name="addIDInfo 1 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="11"/>
121
+ <testCase name="addIDInfo 1 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="13"/>
122
122
  <testCase name="addIDInfo 2 - should add data-element-id with valid id &quot;brComSankhyaFinCadMovimentacaofinanceira_snkApplication&quot;" duration="2"/>
123
123
  <testCase name="addIDInfo 3 - should add data-element-id with valid id &quot;movFinanceira_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="2"/>
124
- <testCase name="addIDInfo 4 - should add data-element-id with valid id &quot;meuID2_snkApplication&quot;" duration="1"/>
125
- <testCase name="addIDInfo 5 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="1"/>
126
- <testCase name="addIDInfo 6 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="2"/>
124
+ <testCase name="addIDInfo 4 - should add data-element-id with valid id &quot;meuID2_snkApplication&quot;" duration="2"/>
125
+ <testCase name="addIDInfo 5 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="2"/>
126
+ <testCase name="addIDInfo 6 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="1"/>
127
127
  <testCase name="addIDInfo 7 - should add data-element-id with valid id &quot;componenteNameTest_snkApplication&quot;" duration="1"/>
128
128
  <testCase name="addIDInfo 8 - should add data-element-id with valid id &quot;componentLabel_snkApplication&quot;" duration="1"/>
129
- <testCase name="addIDInfo 9 - should add data-element-id with valid id &quot;dataunitFinanceiro_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="2"/>
130
- <testCase name="addIDInfo 10 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="58"/>
129
+ <testCase name="addIDInfo 9 - should add data-element-id with valid id &quot;dataunitFinanceiro_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="1"/>
130
+ <testCase name="addIDInfo 10 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="2"/>
131
131
  <testCase name="addIDInfo 11 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira&quot;" duration="2"/>
132
132
  <testCase name="addIDInfo 12 - should add data-element-id with valid id &quot;dataunitFinanceiro_movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
133
133
  <testCase name="addIDInfo 13 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_movimentacaoFinanceira&quot;" duration="2"/>
134
- <testCase name="addIDInfo 14 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_movimentacaoFinanceira&quot;" duration="2"/>
134
+ <testCase name="addIDInfo 14 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_movimentacaoFinanceira&quot;" duration="8"/>
135
135
  <testCase name="addIDInfo 15 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="1"/>
136
- <testCase name="addIDInfo 16 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="3"/>
137
- <testCase name="addIDInfo 17 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="22"/>
138
- <testCase name="addIDInfo 18 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="3"/>
139
- <testCase name="addIDInfo 19 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
140
- <testCase name="addIDInfo 20 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="2"/>
136
+ <testCase name="addIDInfo 16 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="80"/>
137
+ <testCase name="addIDInfo 17 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="2"/>
138
+ <testCase name="addIDInfo 18 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
139
+ <testCase name="addIDInfo 19 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="0"/>
140
+ <testCase name="addIDInfo 20 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
141
141
  <testCase name="addIDInfo 21 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
142
142
  <testCase name="addIDInfo 22 - should add data-element-id with valid id &quot;bancoObrigatorio_movimentacaoFinanceira&quot;" duration="1"/>
143
143
  </file>
144
144
  <file path="/builds/dti/design-system/sankhyacore/test/util/ElementUtils.spec.ts">
145
- <testCase name="calcMarginSize should calculate correctly the size of horizontal margin" duration="63"/>
146
- <testCase name="calcMarginSize should calculate correctly the size of vertical margin" duration="4"/>
147
- <testCase name="calcMarginSize should threat values defined as zero" duration="7"/>
145
+ <testCase name="calcMarginSize should calculate correctly the size of horizontal margin" duration="27"/>
146
+ <testCase name="calcMarginSize should calculate correctly the size of vertical margin" duration="2"/>
147
+ <testCase name="calcMarginSize should threat values defined as zero" duration="3"/>
148
148
  </file>
149
149
  <file path="/builds/dti/design-system/sankhyacore/test/dataunit/formatting/PrettyFormatter.spec.ts">
150
- <testCase name="getFormattedValue should return empty string when value is null" duration="6"/>
151
- <testCase name="getFormattedValue should return empty string when value is not an array" duration="1"/>
152
- <testCase name="getFormattedValue should return empty string when value is an empty array" duration="0"/>
150
+ <testCase name="getFormattedValue should return empty string when value is null" duration="5"/>
151
+ <testCase name="getFormattedValue should return empty string when value is not an array" duration="0"/>
152
+ <testCase name="getFormattedValue should return empty string when value is an empty array" duration="1"/>
153
153
  <testCase name="getFormattedValue should return file name when value is an array with one file object" duration="0"/>
154
154
  <testCase name="getFormattedValue should return file count when value is an array with multiple file objects" duration="1"/>
155
- <testCase name="getFormattedValue should return empty string for undefined file" duration="1"/>
155
+ <testCase name="getFormattedValue should return empty string for undefined file" duration="0"/>
156
156
  <testCase name="getFormattedValue should handle OBJECT type with value field" duration="1"/>
157
157
  <testCase name="getFormattedValue should return empty string when value is undefined" duration="0"/>
158
- <testCase name="getFormattedValue should return value as string when value is not an object" duration="0"/>
158
+ <testCase name="getFormattedValue should return value as string when value is not an object" duration="1"/>
159
159
  <testCase name="getFormattedValue should return value.toString() when value is an object without value property" duration="0"/>
160
- <testCase name="getFormattedValue should handle BOOLEAN type" duration="0"/>
161
- <testCase name="getFormattedValue should format numbers correctly" duration="17"/>
162
- <testCase name="getFormattedValue should format dates correctly" duration="6"/>
163
- <testCase name="getFormattedValue should format times correctly" duration="1"/>
164
- <testCase name="getFormattedValue should format datetime correctly" duration="1"/>
160
+ <testCase name="getFormattedValue should handle BOOLEAN type" duration="1"/>
161
+ <testCase name="getFormattedValue should format numbers correctly" duration="10"/>
162
+ <testCase name="getFormattedValue should format dates correctly" duration="4"/>
163
+ <testCase name="getFormattedValue should format times correctly" duration="0"/>
164
+ <testCase name="getFormattedValue should format datetime correctly" duration="0"/>
165
165
  <testCase name="getFormattedValue should call toString with correct parameters" duration="1"/>
166
- <testCase name="getFormattedValue should handle undefined descriptor gracefully" duration="1"/>
166
+ <testCase name="getFormattedValue should handle undefined descriptor gracefully" duration="0"/>
167
167
  <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and matching option" duration="1"/>
168
168
  <testCase name="getFormattedValue should return value with OPTIONSELECTOR and no matching option" duration="0"/>
169
169
  <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and value as object" duration="0"/>
170
- <testCase name="getFormattedValue should return empty string with OPTIONSELECTOR and value as null" duration="0"/>
170
+ <testCase name="getFormattedValue should return empty string with OPTIONSELECTOR and value as null" duration="1"/>
171
171
  <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and options as JSON string" duration="0"/>
172
172
  <testCase name="getFormattedValue should return value with OPTIONSELECTOR and options as empty array" duration="1"/>
173
173
  <testCase name="getFormattedValue should format masked values correctly" duration="1"/>
@@ -32,6 +32,7 @@ export interface FieldDescriptor {
32
32
  dependencies?: Array<FieldDependency>;
33
33
  group?: string;
34
34
  order?: number;
35
+ mask?: string;
35
36
  }
36
37
 
37
38
  export interface FieldDependency {
@@ -92,6 +92,95 @@ export class MaskFormatter {
92
92
  this.mask = mask;
93
93
  }
94
94
 
95
+
96
+ /**
97
+ * Aplica a máscara quando o input é alterado
98
+ *
99
+ * @param value Valor a ser aplicado com a máscara.
100
+ * @return O valor processado de acordo com o padrão.
101
+ */
102
+ public applyMask(value: string) {
103
+ const MASK_COR = "'#AAAAAA";
104
+
105
+ const expectedFormattedValue = this.format(value.replace(/\s/g, ""));
106
+
107
+ if (value === expectedFormattedValue) {
108
+ return value;
109
+ }
110
+
111
+ if (this.mask === MASK_COR) {
112
+ value = value.replace("#", "")
113
+
114
+ const expectedFormattedValue = this.format(value.replace(/\s/g, ""));
115
+
116
+ if (value === expectedFormattedValue) {
117
+ return value;
118
+ }
119
+
120
+ if (value.length >= 6) {
121
+ const formattedValue = this.format(value);
122
+ return formattedValue;
123
+ } else {
124
+ return value;
125
+ }
126
+ }
127
+
128
+ const maskPlaceholders = this.mask.match(/[UAL#?*']/g) || [];
129
+ const placeholderCount = maskPlaceholders.length;
130
+
131
+ const validValue = value.split('').filter((char, index) => {
132
+ const placeholder = maskPlaceholders[index];
133
+ if (!placeholder) return false;
134
+
135
+ switch (placeholder) {
136
+ case MaskFormatter.DIGIT_KEY:
137
+ return /\d/.test(char);
138
+ case MaskFormatter.UPPERCASE_KEY:
139
+ return /[a-zA-Z]/.test(char);
140
+ case MaskFormatter.LOWERCASE_KEY:
141
+ return /[a-zA-Z]/.test(char);
142
+ case MaskFormatter.ALPHA_NUMERIC_KEY:
143
+ return /[a-zA-Z0-9]/.test(char);
144
+ case MaskFormatter.CHARACTER_KEY:
145
+ return /[a-zA-Z]/.test(char);
146
+ case MaskFormatter.ANYTHING_KEY:
147
+ return true;
148
+ case MaskFormatter.LITERAL_KEY:
149
+ const literalChar = this.mask.charAt(index);
150
+ return char === literalChar;
151
+ default:
152
+ return false;
153
+ }
154
+ });
155
+
156
+ if (validValue.length >= placeholderCount) {
157
+ const formattedValue = this.format(validValue.join(''));
158
+ return formattedValue;
159
+ } else {
160
+ const partialValue = validValue.join('');
161
+ return partialValue;
162
+ }
163
+ }
164
+
165
+ /**
166
+ * Remove a máscara formatando a string retornando sem máscara
167
+ *
168
+ * @param value Valor a ser formatado com máscara.
169
+ * @return O valor processado de acordo com o padrão.
170
+ */
171
+ public removeMask(value: string): string {
172
+ const maskString = this.mask.replace("#", "");
173
+ const maskElements = maskString.split("");
174
+
175
+ let valueMapped = value
176
+
177
+ maskElements.forEach(maskChar => {
178
+ valueMapped = valueMapped.replace(maskChar, "")
179
+ })
180
+
181
+ return valueMapped;
182
+ }
183
+
95
184
  /**
96
185
  * Formata a string passada baseada na máscara definda pelo atributo mask.
97
186
  *