@sankhyalabs/core 5.20.0-dev.73 → 5.20.0-dev.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/classes/Base64Utils.md +39 -0
- package/.docs/classes/Change.md +11 -11
- package/.docs/classes/DataUnit.md +122 -100
- package/.docs/classes/SelectionInfo.md +12 -12
- package/.docs/classes/StringUtils.md +24 -0
- package/.docs/enumerations/ChangeOperation.md +4 -4
- package/.docs/enumerations/SelectionMode.md +2 -2
- package/.docs/globals.md +1 -0
- package/.docs/interfaces/DUActionInterceptor.md +1 -1
- package/.docs/interfaces/PageRequest.md +3 -3
- package/.docs/interfaces/QuickFilter.md +3 -3
- package/.docs/interfaces/Record.md +4 -4
- package/.docs/interfaces/SavedRecord.md +5 -5
- package/.docs/interfaces/WaitingChange.md +3 -3
- package/.docs/type-aliases/DataUnitEventOptions.md +1 -1
- package/dist/dataunit/DataUnit.d.ts +10 -1
- package/dist/dataunit/DataUnit.js +10 -4
- package/dist/dataunit/DataUnit.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/Base64Utils.d.ts +7 -0
- package/dist/utils/Base64Utils.js +13 -0
- package/dist/utils/Base64Utils.js.map +1 -0
- package/dist/utils/StringUtils.d.ts +6 -0
- package/dist/utils/StringUtils.js +11 -0
- package/dist/utils/StringUtils.js.map +1 -1
- package/package.json +1 -1
- package/reports/test-report.xml +146 -146
- package/src/dataunit/DataUnit.ts +18 -4
- package/src/index.ts +4 -1
- package/src/utils/Base64Utils.ts +13 -0
- package/src/utils/StringUtils.ts +13 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default class Base64Utils{
|
|
2
|
+
/**
|
|
3
|
+
* Adiciona caracteres de quebra de linha ao hash64 que representa o recordId do registro.
|
|
4
|
+
* @param base64String - id do registro
|
|
5
|
+
*/
|
|
6
|
+
public static addBreakLineCharacters(base64String: string) {
|
|
7
|
+
const lineBreakPattern = /.{1,76}/g;
|
|
8
|
+
const result = base64String.match(lineBreakPattern)?.join('\n') ?? base64String;
|
|
9
|
+
return result.slice(0, 247) + '\n' + result.slice(247);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
}
|
package/src/utils/StringUtils.ts
CHANGED
|
@@ -538,4 +538,17 @@ export class StringUtils {
|
|
|
538
538
|
|
|
539
539
|
return valueAux;
|
|
540
540
|
}
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Escapa caracteres especiais em uma string, usando sequencias de escape Unicode.
|
|
545
|
+
* @param str A string que deve sofrer alteração.
|
|
546
|
+
* @returns String com valores alterados.
|
|
547
|
+
*/
|
|
548
|
+
public static escapeString(str: string): string {
|
|
549
|
+
// eslint-disable-next-line no-control-regex
|
|
550
|
+
return str.replace(/[\u0000-\u001F\u007F-\uFFFF<>=&"']/g, (char) => {
|
|
551
|
+
return "\\u" + char.charCodeAt(0).toString(16).padStart(4, "0");
|
|
552
|
+
});
|
|
553
|
+
}
|
|
541
554
|
}
|