@native-systems/utility 2.2.1 → 2.3.1
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 +4486 -42
- package/dist/index.d.ts +53 -6
- package/dist/index.esm.js +4486 -42
- package/package.json +11 -5
package/dist/index.d.ts
CHANGED
|
@@ -876,17 +876,17 @@ declare module "@native-systems/utility" {
|
|
|
876
876
|
*/
|
|
877
877
|
static formatMini(date: Date | string): string;
|
|
878
878
|
static getZoneAdjustedWeekday: (dateString: string, options: {
|
|
879
|
-
timezone: string;
|
|
879
|
+
timezone: string | undefined;
|
|
880
880
|
locale: string | undefined;
|
|
881
|
-
}) => string;
|
|
881
|
+
}, defaultTimeZone?: string) => string;
|
|
882
882
|
static getZoneAdjustedDate: (dateString: string, options: {
|
|
883
|
-
timezone: string;
|
|
883
|
+
timezone: string | undefined;
|
|
884
884
|
locale: string | undefined;
|
|
885
|
-
}) => string;
|
|
885
|
+
}, defaultTimeZone?: string) => string;
|
|
886
886
|
static getZoneAdjustedTime: (dateString: string, options: {
|
|
887
|
-
timezone: string;
|
|
887
|
+
timezone: string | undefined;
|
|
888
888
|
locale: string | undefined;
|
|
889
|
-
}) => string;
|
|
889
|
+
}, defaultTimeZone?: string) => string;
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
892
|
|
|
@@ -905,3 +905,50 @@ declare module "@native-systems/utility" {
|
|
|
905
905
|
declare module "@native-systems/utility" {
|
|
906
906
|
export const userTimezonePlugin: CompilerPlugin<UserTimezone>;
|
|
907
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
|
+
}
|