@sankhyalabs/core 5.20.0-dev.54 → 5.20.0-dev.56

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 (47) hide show
  1. package/.docs/classes/Change.md +11 -11
  2. package/.docs/classes/DataUnit.md +135 -135
  3. package/.docs/classes/LockManager.md +191 -0
  4. package/.docs/classes/SelectionInfo.md +12 -12
  5. package/.docs/classes/ServiceUtils.md +67 -0
  6. package/.docs/classes/SilentException.md +193 -0
  7. package/.docs/enumerations/ChangeOperation.md +4 -4
  8. package/.docs/enumerations/LockManagerOperation.md +21 -0
  9. package/.docs/enumerations/SelectionMode.md +2 -2
  10. package/.docs/enumerations/StorageType.md +37 -0
  11. package/.docs/globals.md +5 -0
  12. package/.docs/interfaces/DUActionInterceptor.md +1 -1
  13. package/.docs/interfaces/PageRequest.md +3 -3
  14. package/.docs/interfaces/QuickFilter.md +3 -3
  15. package/.docs/interfaces/Record.md +4 -4
  16. package/.docs/interfaces/SavedRecord.md +5 -5
  17. package/.docs/interfaces/WaitingChange.md +3 -3
  18. package/.docs/type-aliases/DataUnitEventOptions.md +1 -1
  19. package/dist/dataunit/DataUnit.js +4 -2
  20. package/dist/dataunit/DataUnit.js.map +1 -1
  21. package/dist/exceptions/SilentException.d.ts +14 -0
  22. package/dist/exceptions/SilentException.js +13 -0
  23. package/dist/exceptions/SilentException.js.map +1 -0
  24. package/dist/index.d.ts +5 -1
  25. package/dist/index.js +5 -1
  26. package/dist/index.js.map +1 -1
  27. package/dist/utils/CacheManager/index.d.ts +52 -0
  28. package/dist/utils/CacheManager/index.js +101 -0
  29. package/dist/utils/CacheManager/index.js.map +1 -0
  30. package/dist/utils/CacheManager/interfaces/index.d.ts +5 -0
  31. package/dist/utils/CacheManager/interfaces/index.js +7 -0
  32. package/dist/utils/CacheManager/interfaces/index.js.map +1 -0
  33. package/dist/utils/LockManager.d.ts +46 -0
  34. package/dist/utils/LockManager.js +141 -0
  35. package/dist/utils/LockManager.js.map +1 -0
  36. package/dist/utils/ServiceUtils.d.ts +24 -0
  37. package/dist/utils/ServiceUtils.js +40 -0
  38. package/dist/utils/ServiceUtils.js.map +1 -0
  39. package/package.json +1 -1
  40. package/reports/test-report.xml +89 -89
  41. package/src/dataunit/DataUnit.ts +7 -4
  42. package/src/exceptions/SilentException.ts +25 -0
  43. package/src/index.ts +10 -1
  44. package/src/utils/CacheManager/index.ts +103 -0
  45. package/src/utils/CacheManager/interfaces/index.ts +5 -0
  46. package/src/utils/LockManager.ts +157 -0
  47. package/src/utils/ServiceUtils.ts +36 -0
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Define os tipos de operação que o locker pode controlar
3
+ */
4
+ export declare enum LockManagerOperation {
5
+ /**
6
+ Operação de lock utilizada para controlar cliques nos botoes da taskbar.
7
+ */
8
+ TASKBAR_CLICK = "taskbar_click"
9
+ }
10
+ export declare class LockManager {
11
+ private static _locks;
12
+ /**
13
+ * Nome do atributo que será utilizado para controlar contexto de locks nos elementos da DOM.
14
+ */
15
+ static ATTRIBUTE_NAME: string;
16
+ private static buildContextID;
17
+ private static buildLockerID;
18
+ private static findExistingCtxId;
19
+ private static traverseAndAddAttr;
20
+ /**
21
+ * Cria um contexto de locker, caso nao exista, para todos elementos pais iniciados com ez- ou snk-.
22
+ *
23
+ * @param startElement - Elemento de de onde o lock deve começar.
24
+ *
25
+ * @returns - O id do locker, que pode ser usado para iniciar ou aguardar um lock do contexto.
26
+ */
27
+ static addLockManagerCtxId(startElement: HTMLElement): string;
28
+ /**
29
+ * Inicia um locker baseado em um contexto e uma operação.
30
+ *
31
+ * @param id - Pode ser um ID do contexto de locker, ou, o elemento contendo um contexto de locker.
32
+ * @param operation - Operação do contexto que o lock deve ser feito.
33
+ *
34
+ * @returns - Uma função que fara a liberação do lock.
35
+ */
36
+ static lock(id: string | HTMLElement, operation: LockManagerOperation): any;
37
+ /**
38
+ * Aguarda todos os lockers de um contexto e operação serem resolvidos.
39
+ *
40
+ * @param id - Pode ser um ID do contexto de locker, ou, o elemento contendo um contexto de locker.
41
+ * @param operation - Operação do contexto que devera aguardar.
42
+ *
43
+ * @returns - Promise que será resolvida quando todos lockers forem finalizados.
44
+ */
45
+ static whenResolve(id: string | HTMLElement, operation: LockManagerOperation): Promise<void>;
46
+ }
@@ -0,0 +1,141 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { StringUtils } from "./StringUtils.js";
11
+ /**
12
+ * Define os tipos de operação que o locker pode controlar
13
+ */
14
+ export var LockManagerOperation;
15
+ (function (LockManagerOperation) {
16
+ /**
17
+ Operação de lock utilizada para controlar cliques nos botoes da taskbar.
18
+ */
19
+ LockManagerOperation["TASKBAR_CLICK"] = "taskbar_click";
20
+ })(LockManagerOperation || (LockManagerOperation = {}));
21
+ export class LockManager {
22
+ static buildContextID() {
23
+ return StringUtils.generateUUID();
24
+ }
25
+ static buildLockerID(ctxId, operation) {
26
+ if (ctxId == undefined)
27
+ return undefined;
28
+ let resolvedID = ctxId;
29
+ if (resolvedID instanceof HTMLElement) {
30
+ resolvedID = ctxId.getAttribute(LockManager.ATTRIBUTE_NAME);
31
+ if (!resolvedID)
32
+ return undefined;
33
+ }
34
+ return `${resolvedID}_${operation}`;
35
+ }
36
+ /**
37
+ * Cria um contexto de locker, caso nao exista, para todos elementos pais iniciados com ez- ou snk-.
38
+ *
39
+ * @param startElement - Elemento de de onde o lock deve começar.
40
+ *
41
+ * @returns - O id do locker, que pode ser usado para iniciar ou aguardar um lock do contexto.
42
+ */
43
+ static addLockManagerCtxId(startElement) {
44
+ var _a;
45
+ try {
46
+ if (!startElement) {
47
+ console.error("Elemento inicial não fornecido.");
48
+ return "";
49
+ }
50
+ const ctxId = (_a = LockManager.findExistingCtxId(startElement)) !== null && _a !== void 0 ? _a : LockManager.buildContextID();
51
+ let currentElement = startElement;
52
+ while (currentElement && currentElement.tagName != 'BODY') {
53
+ LockManager.traverseAndAddAttr(currentElement, ctxId);
54
+ currentElement = currentElement.parentElement;
55
+ }
56
+ return ctxId;
57
+ }
58
+ catch (err) {
59
+ console.warn(`Erro ao registrar locks para o elemento: ${startElement === null || startElement === void 0 ? void 0 : startElement.tagName}`, err);
60
+ return "";
61
+ }
62
+ }
63
+ /**
64
+ * Inicia um locker baseado em um contexto e uma operação.
65
+ *
66
+ * @param id - Pode ser um ID do contexto de locker, ou, o elemento contendo um contexto de locker.
67
+ * @param operation - Operação do contexto que o lock deve ser feito.
68
+ *
69
+ * @returns - Uma função que fara a liberação do lock.
70
+ */
71
+ static lock(id, operation) {
72
+ var _a;
73
+ const lockerId = LockManager.buildLockerID(id, operation);
74
+ if (!lockerId)
75
+ return () => { };
76
+ const lock = { done: false };
77
+ const promise = new Promise(resolve => lock.resolve = resolve);
78
+ lock.promise = promise;
79
+ const currentLocks = (_a = LockManager._locks.get(lockerId)) !== null && _a !== void 0 ? _a : [];
80
+ currentLocks.push(lock);
81
+ LockManager._locks.set(lockerId, currentLocks);
82
+ return () => {
83
+ var _a;
84
+ lock.done = true;
85
+ (_a = lock.resolve) === null || _a === void 0 ? void 0 : _a.call(lock);
86
+ };
87
+ }
88
+ /**
89
+ * Aguarda todos os lockers de um contexto e operação serem resolvidos.
90
+ *
91
+ * @param id - Pode ser um ID do contexto de locker, ou, o elemento contendo um contexto de locker.
92
+ * @param operation - Operação do contexto que devera aguardar.
93
+ *
94
+ * @returns - Promise que será resolvida quando todos lockers forem finalizados.
95
+ */
96
+ static whenResolve(id, operation) {
97
+ var _a, _b;
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ const lockerId = LockManager.buildLockerID(id, operation);
100
+ if (!lockerId)
101
+ return;
102
+ while ((_a = LockManager._locks.get(lockerId)) === null || _a === void 0 ? void 0 : _a.length) {
103
+ const locks = (_b = LockManager._locks.get(lockerId)) !== null && _b !== void 0 ? _b : [];
104
+ yield Promise.all(locks.map(lock => lock.promise));
105
+ //Aguarda listeners da tela reagirem as mudancas de estado do dataunit
106
+ yield new Promise(resolve => setTimeout(resolve, 200));
107
+ LockManager._locks.set(lockerId, locks.filter(lock => !lock.done));
108
+ }
109
+ });
110
+ }
111
+ }
112
+ LockManager._locks = new Map();
113
+ /**
114
+ * Nome do atributo que será utilizado para controlar contexto de locks nos elementos da DOM.
115
+ */
116
+ LockManager.ATTRIBUTE_NAME = "data-locker-manger-context-id";
117
+ LockManager.findExistingCtxId = (element) => {
118
+ let currentElement = element;
119
+ while (currentElement) {
120
+ if (currentElement.hasAttribute(LockManager.ATTRIBUTE_NAME)) {
121
+ return currentElement.getAttribute(LockManager.ATTRIBUTE_NAME);
122
+ }
123
+ const childWithCtxId = Array.from(currentElement.children).find(child => (child instanceof HTMLElement) && child.hasAttribute(LockManager.ATTRIBUTE_NAME));
124
+ if (childWithCtxId) {
125
+ return childWithCtxId.getAttribute(LockManager.ATTRIBUTE_NAME);
126
+ }
127
+ currentElement = currentElement.parentElement;
128
+ }
129
+ return null;
130
+ };
131
+ LockManager.traverseAndAddAttr = (element, ctxId) => {
132
+ if (element.tagName.startsWith('EZ-') || element.tagName.startsWith('SNK-')) {
133
+ element.setAttribute(LockManager.ATTRIBUTE_NAME, ctxId);
134
+ }
135
+ Array.from(element.children).forEach((child) => {
136
+ if (child instanceof HTMLElement) {
137
+ LockManager.traverseAndAddAttr(child, ctxId);
138
+ }
139
+ });
140
+ };
141
+ //# sourceMappingURL=LockManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LockManager.js","sourceRoot":"","sources":["../../src/utils/LockManager.ts"],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AC,CAAA;AAEc,8BAAkB,GAAG,CAAC,OAAoB,EAAE,KAAa,EAAQ,EAAE;IAC9E,IAAI,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QACzE,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;KAC3D;IACD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC3C,IAAI,KAAK,YAAY,WAAW,EAAE;YAC9B,WAAW,CAAC,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SAChD;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { StorageType } from './CacheManager/interfaces/index.js';
2
+ export declare class ServiceUtils {
3
+ /**
4
+ * Auxilia no uso do CacheManager, gerando automaticamente uma chave de cache com base no identificador.
5
+ *
6
+ * @template T Tipo do dado a ser retornado.
7
+ * @param identifier Identificadores únicos usados para compor a chave de cache.
8
+ * @param fetchFunction Função que retorna uma `Promise` com o valor a ser armazenado no cache caso ele não exista ou tenha expirado.
9
+ * @param storageType Tipo de armazenamento: `'sessionStorage'` ou `'localStorage'`. O padrão é `'sessionStorage'`.
10
+ * @returns Uma `Promise` com o valor armazenado ou obtido via `fetchFunction`.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const actions = await useCacheWithService(
15
+ * `${this.entityName} - ${this.resourceID}`,
16
+ * async () => {
17
+ * return await fetchActionsFromAPI();
18
+ * }
19
+ * );
20
+ * console.log(actions);
21
+ * ```
22
+ */
23
+ static useCacheWithService<T>(identifier: string, fetchFunction: () => Promise<T>, storageType?: StorageType): Promise<T>;
24
+ }
@@ -0,0 +1,40 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { CacheManager } from './CacheManager/index.js';
11
+ import { StorageType } from './CacheManager/interfaces/index.js';
12
+ export class ServiceUtils {
13
+ /**
14
+ * Auxilia no uso do CacheManager, gerando automaticamente uma chave de cache com base no identificador.
15
+ *
16
+ * @template T Tipo do dado a ser retornado.
17
+ * @param identifier Identificadores únicos usados para compor a chave de cache.
18
+ * @param fetchFunction Função que retorna uma `Promise` com o valor a ser armazenado no cache caso ele não exista ou tenha expirado.
19
+ * @param storageType Tipo de armazenamento: `'sessionStorage'` ou `'localStorage'`. O padrão é `'sessionStorage'`.
20
+ * @returns Uma `Promise` com o valor armazenado ou obtido via `fetchFunction`.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * const actions = await useCacheWithService(
25
+ * `${this.entityName} - ${this.resourceID}`,
26
+ * async () => {
27
+ * return await fetchActionsFromAPI();
28
+ * }
29
+ * );
30
+ * console.log(actions);
31
+ * ```
32
+ */
33
+ static useCacheWithService(identifier, fetchFunction, storageType = StorageType.IN_MEMORY_CACHE) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ const cacheKey = `${identifier}`;
36
+ return CacheManager.getOrSet(cacheKey, fetchFunction, storageType);
37
+ });
38
+ }
39
+ }
40
+ //# sourceMappingURL=ServiceUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceUtils.js","sourceRoot":"","sources":["../../src/utils/ServiceUtils.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAGjE,MAAM,OAAO,YAAY;IAGrB;;;;;;;;;;;;;;;;;;;OAmBG;IACI,MAAM,CAAO,mBAAmB,CACnC,UAAkB,EAClB,aAA+B,EAC/B,cAA2B,WAAW,CAAC,eAAe;;YAEtD,MAAM,QAAQ,GAAG,GAAG,UAAU,EAAE,CAAC;YACjC,OAAO,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;QACvE,CAAC;KAAA;CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/core",
3
- "version": "5.20.0-dev.54",
3
+ "version": "5.20.0-dev.56",
4
4
  "description": "Modulo core JavaScript da Sankhya.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -1,175 +1,175 @@
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="73"/>
4
+ <testCase name="ObjectUtils hasEquivalentValues should return true if both objects have the same property value" duration="5"/>
5
5
  <testCase name="ObjectUtils hasEquivalentValues should return false if both objects have different property values" duration="1"/>
6
- <testCase name="ObjectUtils hasEquivalentValues should return true if both objects are equivalent with custom property to compare" duration="30"/>
6
+ <testCase name="ObjectUtils hasEquivalentValues should return true if both objects are equivalent with custom property to compare" duration="73"/>
7
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="0"/>
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="0"/>
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="1"/>
12
12
  <testCase name="ObjectUtils hasEquivalentValues should return false when comparing object with null and non-null value" duration="0"/>
13
- <testCase name="ObjectUtils hasEquivalentValues should return true when comparing non-object values that are equal" duration="3"/>
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
15
  <testCase name="ObjectUtils should get an object value based on its path" duration="0"/>
16
- <testCase name="ObjectUtils should return undefined if the path doesn&apos;t exist in the object" duration="1"/>
16
+ <testCase name="ObjectUtils should return undefined if the path doesn&apos;t exist in the object" duration="0"/>
17
17
  </file>
18
18
  <file path="/builds/dti/design-system/sankhyacore/test/util/MaskFormatter.spec.ts">
19
- <testCase name="Mask Formatter mask:CPF complete valid" duration="87"/>
20
- <testCase name="Mask Formatter mask:CPF complete valid literals" duration="1"/>
21
- <testCase name="Mask Formatter mask:CPF incomplete valid" duration="1"/>
19
+ <testCase name="Mask Formatter mask:CPF complete valid" duration="21"/>
20
+ <testCase name="Mask Formatter mask:CPF complete valid literals" duration="93"/>
21
+ <testCase name="Mask Formatter mask:CPF incomplete valid" duration="0"/>
22
22
  <testCase name="Mask Formatter mask:CPF incomplete valid placeholder" duration="1"/>
23
- <testCase name="Mask Formatter mask:CPF too long valid" duration="3"/>
24
- <testCase name="Mask Formatter mask:CPF invalid for string" duration="191"/>
25
- <testCase name="Mask Formatter mask:CPF invalid for being too long" duration="1"/>
26
- <testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="0"/>
23
+ <testCase name="Mask Formatter mask:CPF too long valid" duration="0"/>
24
+ <testCase name="Mask Formatter mask:CPF invalid for string" duration="197"/>
25
+ <testCase name="Mask Formatter mask:CPF invalid for being too long" duration="0"/>
26
+ <testCase name="Mask Formatter mask:Licence plate valid uppercase" duration="1"/>
27
27
  <testCase name="Mask Formatter mask:Licence plate valid lowercase" duration="1"/>
28
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="7"/>
29
- <testCase name="Mask Formatter mask:Licence plate invalid for being too short" duration="0"/>
28
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="5"/>
29
+ <testCase name="Mask Formatter mask:Licence plate invalid for being too short" duration="1"/>
30
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="6"/>
32
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="0"/>
33
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
34
- <testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
35
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="0"/>
31
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="4"/>
32
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
36
33
  <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
37
34
  <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
38
- <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="0"/>
35
+ <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="1"/>
37
+ <testCase name="Mask Formatter mask:Licence plate invalid" duration="2"/>
38
+ <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask" duration="1"/>
39
39
  <testCase name="Mask Formatter mask:Licence plate with AlphaNumerical Mask with placeholder" duration="1"/>
40
40
  <testCase name="Mask Formatter mask:Licence plate invalid" duration="1"/>
41
41
  </file>
42
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="9"/>
43
+ <testCase name="StringUtils it should return the undefined and [] to Criteria Props through new class with empty constructor" duration="75"/>
44
44
  <testCase name="StringUtils it should modify &quot;expressions&quot; and &quot;parameters&quot; properties through Setters methods" duration="1"/>
45
45
  <testCase name="StringUtils it should return &quot;expression&quot; and &quot;parameters&quot; setted through constructor method" duration="1"/>
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="28"/>
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="1"/>
47
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="1"/>
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="0"/>
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
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
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
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="1"/>
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="67"/>
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="1"/>
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="82"/>
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="2"/>
54
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="1"/>
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="1"/>
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="15"/>
56
56
  <testCase name="StringUtils it should return a toJSON object with through empty constructor" duration="1"/>
57
57
  </file>
58
58
  <file path="/builds/dti/design-system/sankhyacore/test/http/HttpProvider.spec.ts">
59
- <testCase name="HttpProvider Metodo GET" duration="74"/>
60
- </file>
61
- <file path="/builds/dti/design-system/sankhyacore/test/util/OverflowWatcher.spec.ts">
62
- <testCase name="OverflowWatcher should initialize with provided parameters" duration="17"/>
63
- <testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="3"/>
64
- <testCase name="OverflowWatcher Should call callback on forceUpdate" duration="445"/>
65
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="66"/>
66
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="14"/>
67
- <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="9"/>
68
- <testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="5"/>
69
- <testCase name="OverflowWatcher should ignore elements that can not overflow" duration="72"/>
70
- <testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="1"/>
71
- </file>
72
- <file path="/builds/dti/design-system/sankhyacore/test/http/SkwHttpProvider.ts.spec.ts">
73
- <testCase name="HttpProvider Metodo POST" duration="1"/>
59
+ <testCase name="HttpProvider Metodo GET" duration="0"/>
74
60
  </file>
75
61
  <file path="/builds/dti/design-system/sankhyacore/test/util/NumberUtils.spec.ts">
76
- <testCase name="StringUtils stringToNumber" duration="104"/>
77
- <testCase name="StringUtils format" duration="221"/>
62
+ <testCase name="StringUtils stringToNumber" duration="88"/>
63
+ <testCase name="StringUtils format" duration="92"/>
78
64
  <testCase name="StringUtils format without formatnumber parameter" duration="1"/>
79
- <testCase name="StringUtils format without formatnumber parameter" duration="4"/>
65
+ <testCase name="StringUtils format without formatnumber parameter" duration="2"/>
80
66
  <testCase name="StringUtils format round number" duration="2"/>
81
67
  </file>
68
+ <file path="/builds/dti/design-system/sankhyacore/test/util/OverflowWatcher.spec.ts">
69
+ <testCase name="OverflowWatcher should initialize with provided parameters" duration="9"/>
70
+ <testCase name="OverflowWatcher should disconect ResizeObserver when destroy is called" duration="2"/>
71
+ <testCase name="OverflowWatcher Should call callback on forceUpdate" duration="289"/>
72
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan" duration="18"/>
73
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan when notOverFlow is empty" duration="83"/>
74
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with childSpan considering overflowed elements" duration="7"/>
75
+ <testCase name="OverflowWatcher Should call callback on forceUpdate with empty list" duration="99"/>
76
+ <testCase name="OverflowWatcher should ignore elements that can not overflow" duration="103"/>
77
+ <testCase name="OverflowWatcher Should not call callback on forceUpdate" duration="1"/>
78
+ </file>
82
79
  <file path="/builds/dti/design-system/sankhyacore/test/util/StringUtils.spec.ts">
83
80
  <testCase name="StringUtils valor vazio" duration="1"/>
84
81
  <testCase name="StringUtils valor em branco" duration="1"/>
85
82
  <testCase name="StringUtils valor null" duration="0"/>
86
- <testCase name="StringUtils valor undefined" duration="1"/>
87
- <testCase name="StringUtils valor 0" duration="0"/>
88
- <testCase name="StringUtils com valor" duration="1"/>
89
- <testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="57"/>
90
- <testCase name="StringUtils should return the original value when called with an object without a toString method" duration="2"/>
91
- <testCase name="StringUtils should return the original value when called with undefined" duration="1"/>
83
+ <testCase name="StringUtils valor undefined" duration="0"/>
84
+ <testCase name="StringUtils valor 0" duration="1"/>
85
+ <testCase name="StringUtils com valor" duration="0"/>
86
+ <testCase name="StringUtils substitui vogais com acento por vogais sem acento" duration="2"/>
87
+ <testCase name="StringUtils should return the original value when called with an object without a toString method" duration="1"/>
88
+ <testCase name="StringUtils should return the original value when called with undefined" duration="0"/>
89
+ </file>
90
+ <file path="/builds/dti/design-system/sankhyacore/test/http/SkwHttpProvider.ts.spec.ts">
91
+ <testCase name="HttpProvider Metodo POST" duration="0"/>
92
92
  </file>
93
93
  <file path="/builds/dti/design-system/sankhyacore/test/util/CriteriaParameter.spec.ts">
94
- <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="104"/>
94
+ <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"/>
95
95
  <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"/>
96
- <testCase name="StringUtils it should return the correct JSON/Object value through the buildParam method" duration="0"/>
96
+ <testCase name="StringUtils it should return the correct JSON/Object value through the buildParam method" duration="1"/>
97
97
  </file>
98
98
  <file path="/builds/dti/design-system/sankhyacore/test/util/TimeFormatter.spec.ts">
99
99
  <testCase name="TimeFormatter Case: input string unformated with showSeconds" duration="2"/>
100
- <testCase name="TimeFormatter Case: input string unformated without showSeconds" duration="3"/>
100
+ <testCase name="TimeFormatter Case: input string unformated without showSeconds" duration="1"/>
101
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
- <testCase name="RecordsSlice should return newlines at the end" duration="3"/>
105
- </file>
106
- <file path="/builds/dti/design-system/sankhyacore/test/util/DataUnitStorage.spec.ts">
107
- <testCase name="DataUnitStorage put should store a DataUnit instance in the DataUnitStorage" duration="3"/>
108
- <testCase name="DataUnitStorage get should return the stored DataUnit instance from the DataUnitStorage" duration="1"/>
109
- <testCase name="DataUnitStorage get should return undefined if the DataUnit instance is not found in the DataUnitStorage" duration="1"/>
110
- <testCase name="DataUnitStorage remove should remove the specified DataUnit instance from the DataUnitStorage" duration="0"/>
111
- <testCase name="DataUnitStorage remove should remove the DataUnit instance with the specified name from the DataUnitStorage" duration="1"/>
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"/>
104
+ <testCase name="RecordsSlice should return newlines at the end" duration="2"/>
113
105
  </file>
114
106
  <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="31"/>
107
+ <testCase name="DataUnit should return false when not waiting to reload" duration="2"/>
116
108
  <testCase name="DataUnit should set waitingToReload to true" duration="1"/>
117
- <testCase name="DataUnit should set waitingToReload to false" duration="1"/>
109
+ <testCase name="DataUnit should set waitingToReload to false" duration="0"/>
118
110
  <testCase name="DataUnit should dispatch SAVING_CANCELED action with correct fields and recordId" 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="2"/>
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="1"/>
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/ElementIDUtils.spec.ts">
121
- <testCase name="addIDInfo 1 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="63"/>
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="2"/>
124
+ <testCase name="addIDInfo 4 - should add data-element-id with valid id &quot;meuID2_snkApplication&quot;" duration="1"/>
125
125
  <testCase name="addIDInfo 5 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="1"/>
126
126
  <testCase name="addIDInfo 6 - should add data-element-id with valid id &quot;movFinanceira_snkApplication&quot;" duration="1"/>
127
- <testCase name="addIDInfo 7 - should add data-element-id with valid id &quot;componenteNameTest_snkApplication&quot;" duration="1"/>
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="1"/>
127
+ <testCase name="addIDInfo 7 - should add data-element-id with valid id &quot;componenteNameTest_snkApplication&quot;" duration="2"/>
128
+ <testCase name="addIDInfo 8 - should add data-element-id with valid id &quot;componentLabel_snkApplication&quot;" duration="69"/>
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
130
  <testCase name="addIDInfo 10 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIDTeste_br.com.sankhya.fin.cad.movimentacaoFinanceira&quot;" duration="1"/>
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="3"/>
135
135
  <testCase name="addIDInfo 15 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="1"/>
136
136
  <testCase name="addIDInfo 16 - should add data-element-id with valid id &quot;dataunitFinanceiro_meuIdTeste_snkApplication&quot;" duration="1"/>
137
137
  <testCase name="addIDInfo 17 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
138
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="27"/>
139
+ <testCase name="addIDInfo 19 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="0"/>
140
140
  <testCase name="addIDInfo 20 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
141
- <testCase name="addIDInfo 21 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="1"/>
142
- <testCase name="addIDInfo 22 - should add data-element-id with valid id &quot;bancoObrigatorio_movimentacaoFinanceira&quot;" duration="3"/>
141
+ <testCase name="addIDInfo 21 - should add data-element-id with valid id &quot;movFinanceira_movimentacaoFinanceira&quot;" duration="0"/>
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="46"/>
146
- <testCase name="calcMarginSize should calculate correctly the size of vertical margin" duration="5"/>
147
- <testCase name="calcMarginSize should threat values defined as zero" duration="13"/>
145
+ <testCase name="calcMarginSize should calculate correctly the size of horizontal margin" duration="28"/>
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="18"/>
150
+ <testCase name="getFormattedValue should return empty string when value is null" duration="4"/>
151
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="1"/>
153
- <testCase name="getFormattedValue should return file name when value is an array with one file object" duration="0"/>
152
+ <testCase name="getFormattedValue should return empty string when value is an empty array" duration="0"/>
153
+ <testCase name="getFormattedValue should return file name when value is an array with one file object" duration="1"/>
154
154
  <testCase name="getFormattedValue should return file count when value is an array with multiple file objects" duration="0"/>
155
- <testCase name="getFormattedValue should return empty string for undefined file" duration="1"/>
156
- <testCase name="getFormattedValue should handle OBJECT type with value field" duration="1"/>
155
+ <testCase name="getFormattedValue should return empty string for undefined file" duration="0"/>
156
+ <testCase name="getFormattedValue should handle OBJECT type with value field" duration="3"/>
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="1"/>
158
+ <testCase name="getFormattedValue should return value as string when value is not an object" duration="0"/>
159
159
  <testCase name="getFormattedValue should return value.toString() when value is an object without value property" duration="0"/>
160
160
  <testCase name="getFormattedValue should handle BOOLEAN type" duration="0"/>
161
- <testCase name="getFormattedValue should format numbers correctly" duration="24"/>
162
- <testCase name="getFormattedValue should format dates correctly" duration="8"/>
161
+ <testCase name="getFormattedValue should format numbers correctly" duration="11"/>
162
+ <testCase name="getFormattedValue should format dates correctly" duration="4"/>
163
163
  <testCase name="getFormattedValue should format times correctly" duration="1"/>
164
- <testCase name="getFormattedValue should format datetime correctly" duration="1"/>
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="37"/>
167
167
  <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and matching option" duration="0"/>
168
168
  <testCase name="getFormattedValue should return value with OPTIONSELECTOR and no matching option" duration="1"/>
169
169
  <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and value as object" duration="0"/>
170
170
  <testCase name="getFormattedValue should return empty string with OPTIONSELECTOR and value as null" duration="0"/>
171
171
  <testCase name="getFormattedValue should format value correctly with OPTIONSELECTOR and options as JSON string" duration="0"/>
172
- <testCase name="getFormattedValue should return value with OPTIONSELECTOR and options as empty array" duration="1"/>
172
+ <testCase name="getFormattedValue should return value with OPTIONSELECTOR and options as empty array" duration="0"/>
173
173
  <testCase name="getFormattedValue should format masked values correctly" duration="1"/>
174
174
  </file>
175
175
  </unitTest>
@@ -28,6 +28,7 @@ import { getInvalidFieldMessage, InvalidFieldsReducer } from "./state/slice/Inva
28
28
  import { getLoadingProperties, LoadingPropertiesReducer } from "./state/slice/LoadingProperties.js";
29
29
  import SortingUtils from "../utils/SortingUtils.js";
30
30
  import ServiceCanceledException from "../exceptions/ServiceCanceledException.js";
31
+ import SilentException from "../exceptions/SilentException.js";
31
32
 
32
33
  /***
33
34
  * `DataUnit`: Atua como uma camada de abstração entre o back-end e a interface do usuário.
@@ -503,11 +504,13 @@ export default class DataUnit {
503
504
  this.dispatchAction(Action.SAVING_ERROR);
504
505
  this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
505
506
  if(cause instanceof ServiceCanceledException){
506
- console.debug("Service canceled: " + cause.message)
507
- resolve()
508
- } else{
509
- fail(new ErrorException("Erro ao salvar alterações", cause, errorCode))
507
+ console.debug("Service canceled: " + cause.message);
508
+ resolve();
509
+ }
510
+ if(cause instanceof SilentException){
511
+ fail();
510
512
  }
513
+ fail(new ErrorException("Erro ao salvar alterações", cause, errorCode));
511
514
  });
512
515
  } else {
513
516
  this.dispatchAction(Action.LOADING_PROPERTIES_CLEANED);
@@ -0,0 +1,25 @@
1
+ /**
2
+ * `SilentException`: Exceção lançada quando uma exception silenciosa é.
3
+ */
4
+ export default class SilentException extends Error {
5
+
6
+ /** Nome da exceção. */
7
+ public name: string;
8
+
9
+ /** Titulo do erro. */
10
+ public title: string;
11
+
12
+ /** Descrição do erro. */
13
+ public message: string;
14
+
15
+ /** Código do erro, indica o erro disparado pelo backend. */
16
+ public errorCode: string;
17
+
18
+ constructor(title: string = "", message: string = "", errorCode: string = "") {
19
+ super(message);
20
+ this.name = "SilentException";
21
+ this.title = title;
22
+ this.message = message;
23
+ this.errorCode = errorCode;
24
+ }
25
+ }