@native-systems/utility 2.2.0 → 2.3.0
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/dist/index.cjs +4456 -39
- package/dist/index.d.ts +48 -0
- package/dist/index.esm.js +4456 -39
- package/package.json +13 -6
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ declare module "@native-systems/utility" {
|
|
|
3
3
|
hasNextPage: boolean;
|
|
4
4
|
hasPrevPage: boolean;
|
|
5
5
|
totalPages: number;
|
|
6
|
+
resultCount?: number;
|
|
6
7
|
data: T;
|
|
7
8
|
};
|
|
8
9
|
export type { Paginated };
|
|
@@ -904,3 +905,50 @@ declare module "@native-systems/utility" {
|
|
|
904
905
|
declare module "@native-systems/utility" {
|
|
905
906
|
export const userTimezonePlugin: CompilerPlugin<UserTimezone>;
|
|
906
907
|
}
|
|
908
|
+
|
|
909
|
+
declare module "@native-systems/utility" {
|
|
910
|
+
function generatePrefix(name: string, fallback?: string): string;
|
|
911
|
+
export { generatePrefix };
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
declare module "@native-systems/utility" {
|
|
915
|
+
export class LabelMapper {
|
|
916
|
+
/**
|
|
917
|
+
* Integer label formatter with suffix and fallback.
|
|
918
|
+
*/
|
|
919
|
+
static intLabel(v: unknown, suffix: string, fallback?: string): string;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
declare module "@native-systems/utility" {
|
|
924
|
+
class FormSanitizer {
|
|
925
|
+
/**
|
|
926
|
+
* Compare the provided form data, with the provided customer opject, to check if data differs from the existing customer object.
|
|
927
|
+
* @param localData The already known data. This object can be a superset of the data object.
|
|
928
|
+
* @param data The form data, that should replace the localData object.
|
|
929
|
+
* @returns {boolean} True if the data differs from the local data.
|
|
930
|
+
*/
|
|
931
|
+
static formHoldsNewData<T>(localData: {
|
|
932
|
+
[key: string]: any;
|
|
933
|
+
}, data: {
|
|
934
|
+
[key: string]: T;
|
|
935
|
+
}): boolean;
|
|
936
|
+
}
|
|
937
|
+
export { FormSanitizer };
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
declare module "@native-systems/utility" {
|
|
941
|
+
export class InfoFormatter {
|
|
942
|
+
static getName(firstName: string | undefined | null, lastName: string | undefined | null, email?: string | null): string;
|
|
943
|
+
static getEmail(email: string | null): string | undefined;
|
|
944
|
+
static getLetter(name: string | null | undefined): string | null;
|
|
945
|
+
static getBackgroundColor(email: string | undefined | null): string;
|
|
946
|
+
static getInitial(name: string): string;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
declare module "@native-systems/utility" {
|
|
951
|
+
export class LanguageHandler {
|
|
952
|
+
static langFromLocale(locale: string): string;
|
|
953
|
+
}
|
|
954
|
+
}
|