@rangertechnologies/fusion-ui 0.2.3 → 0.2.5
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/package.json
CHANGED
|
@@ -1005,6 +1005,49 @@ export declare class ScrollService {
|
|
|
1005
1005
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollService, never>;
|
|
1006
1006
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1007
1007
|
}
|
|
1008
|
+
export interface FusionUserObject {
|
|
1009
|
+
_id?: string;
|
|
1010
|
+
firstName?: string;
|
|
1011
|
+
lastName?: string;
|
|
1012
|
+
thumbnailURL?: string;
|
|
1013
|
+
avatarUrl?: string;
|
|
1014
|
+
fusionId?: string;
|
|
1015
|
+
name?: string;
|
|
1016
|
+
}
|
|
1017
|
+
export type UserLookupMap = Record<string, FusionUserObject> | Map<string, FusionUserObject>;
|
|
1018
|
+
export interface TableColumnConfig {
|
|
1019
|
+
key?: string;
|
|
1020
|
+
column?: string;
|
|
1021
|
+
field?: string;
|
|
1022
|
+
name?: string;
|
|
1023
|
+
type?: 'user' | 'userTag' | string;
|
|
1024
|
+
maxVisible?: number;
|
|
1025
|
+
}
|
|
1026
|
+
export interface ResolvedUserChipItem {
|
|
1027
|
+
displayName: string;
|
|
1028
|
+
initials: string;
|
|
1029
|
+
avatarUrl: string | null;
|
|
1030
|
+
key: string;
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Checks whether a column is configured as 'user' or 'userTag' in tableConfigurations.
|
|
1034
|
+
*/
|
|
1035
|
+
export declare function getColumnConfig(tableConfigurations: any, column: string): TableColumnConfig | null;
|
|
1036
|
+
export declare function isUserColumnType(tableConfigurations: any, column: string): boolean;
|
|
1037
|
+
export declare function getUserColumnMaxVisible(tableConfigurations: any, column: string, defaultMax?: number): number;
|
|
1038
|
+
/**
|
|
1039
|
+
* Validates that an avatar URL uses a safe scheme/path (https://, http://, /, data:image/).
|
|
1040
|
+
*/
|
|
1041
|
+
export declare function isValidAvatarUrl(url: unknown): url is string;
|
|
1042
|
+
export declare function getUserInitials(name: string): string;
|
|
1043
|
+
export declare function formatUserDisplayName(user: FusionUserObject | null | undefined, rawFallback?: string): string;
|
|
1044
|
+
export declare function resolveUserChipItems(value: unknown, userLookupMap?: UserLookupMap): ResolvedUserChipItem[];
|
|
1045
|
+
export declare function resolveUserColumnText(value: unknown, userLookupMap?: UserLookupMap): string;
|
|
1046
|
+
/**
|
|
1047
|
+
* Configures MatTableDataSource sortingDataAccessor and filterPredicate so user/userTag columns
|
|
1048
|
+
* sort and filter by resolved "FirstName LastName" rather than "[object Object]" or raw _id.
|
|
1049
|
+
*/
|
|
1050
|
+
export declare function configureUserTableDataSource<T extends Record<string, any>>(dataSource: MatTableDataSource<T> | null | undefined, getTableConfigurations: () => any, getUserLookupMap: () => UserLookupMap | undefined): void;
|
|
1008
1051
|
export declare class DataTableComponent implements OnInit {
|
|
1009
1052
|
private scrollService;
|
|
1010
1053
|
private overlay;
|
|
@@ -1066,6 +1109,7 @@ export declare class DataTableComponent implements OnInit {
|
|
|
1066
1109
|
pageSize: any;
|
|
1067
1110
|
pageIndex: any;
|
|
1068
1111
|
tableConfigurations: any;
|
|
1112
|
+
userLookupMap?: UserLookupMap;
|
|
1069
1113
|
actionButtonCondition: any;
|
|
1070
1114
|
dateColumns: any;
|
|
1071
1115
|
timeColumns: any;
|
|
@@ -1244,6 +1288,9 @@ export declare class DataTableComponent implements OnInit {
|
|
|
1244
1288
|
isConditionMet(element: any, conditions: any): boolean;
|
|
1245
1289
|
isDateColumn(column: string): boolean;
|
|
1246
1290
|
isTimeColumn(column: string): boolean;
|
|
1291
|
+
isUserColumn(column: string): boolean;
|
|
1292
|
+
getUserColumnMaxVisible(column: string): number;
|
|
1293
|
+
private configureDataSource;
|
|
1247
1294
|
onInfoClick(ele: any, col: any, index: any): void;
|
|
1248
1295
|
onSearch(event: any): void;
|
|
1249
1296
|
emptySearch(event: any): void;
|
|
@@ -1428,6 +1475,10 @@ export declare class DataTableComponent implements OnInit {
|
|
|
1428
1475
|
"alias": "tableConfigurations";
|
|
1429
1476
|
"required": false;
|
|
1430
1477
|
};
|
|
1478
|
+
"userLookupMap": {
|
|
1479
|
+
"alias": "userLookupMap";
|
|
1480
|
+
"required": false;
|
|
1481
|
+
};
|
|
1431
1482
|
"actionButtonCondition": {
|
|
1432
1483
|
"alias": "actionButtonCondition";
|
|
1433
1484
|
"required": false;
|
|
@@ -1666,6 +1717,8 @@ export declare class AttendanceTableComponent implements OnInit, OnChanges, OnDe
|
|
|
1666
1717
|
filterScreenConfigs: Array<any>;
|
|
1667
1718
|
exportFieldsListConfigs: any;
|
|
1668
1719
|
exportFilterListConfigs: any;
|
|
1720
|
+
tableConfigurations: any;
|
|
1721
|
+
userLookupMap?: UserLookupMap;
|
|
1669
1722
|
private _stickyColumn;
|
|
1670
1723
|
private _stickyColumns;
|
|
1671
1724
|
set stickyColumn(val: boolean | Array<any>);
|
|
@@ -1739,14 +1792,22 @@ export declare class AttendanceTableComponent implements OnInit, OnChanges, OnDe
|
|
|
1739
1792
|
isFutureDate(column: string): boolean;
|
|
1740
1793
|
isColumnSticky(column: string): boolean;
|
|
1741
1794
|
getInitials(name: string): string;
|
|
1795
|
+
isUserColumn(column: string): boolean;
|
|
1796
|
+
getUserColumnMaxVisible(column: string): number;
|
|
1797
|
+
private configureDataSource;
|
|
1742
1798
|
triggerChangeDetection(): void;
|
|
1743
1799
|
hyperLinkClick(element: any, column: string, i: number): void;
|
|
1744
1800
|
isNearTarget(workingDays: any, totalDays: any): boolean;
|
|
1745
1801
|
isLeaveType(status: any): boolean;
|
|
1746
1802
|
containsOnlyNumbers(value: any): boolean;
|
|
1803
|
+
private formatPunchTime;
|
|
1747
1804
|
private resolveAttendanceValue;
|
|
1748
|
-
|
|
1749
|
-
|
|
1805
|
+
private getCellDateRelation;
|
|
1806
|
+
private resolveChipState;
|
|
1807
|
+
private buildNeedsReviewTooltip;
|
|
1808
|
+
getAttendanceChipClass(val: any, column?: string): string;
|
|
1809
|
+
getAttendanceChipSymbol(val: any, column?: string): string;
|
|
1810
|
+
getAttendanceTooltip(val: any, column?: string): string;
|
|
1750
1811
|
hasAttendanceChip(val: any, column: string): boolean;
|
|
1751
1812
|
isWeekOffState(val: any, column: string): boolean;
|
|
1752
1813
|
getDateRangeText(): string;
|
|
@@ -1912,6 +1973,14 @@ export declare class AttendanceTableComponent implements OnInit, OnChanges, OnDe
|
|
|
1912
1973
|
"alias": "exportFilterListConfigs";
|
|
1913
1974
|
"required": false;
|
|
1914
1975
|
};
|
|
1976
|
+
"tableConfigurations": {
|
|
1977
|
+
"alias": "tableConfigurations";
|
|
1978
|
+
"required": false;
|
|
1979
|
+
};
|
|
1980
|
+
"userLookupMap": {
|
|
1981
|
+
"alias": "userLookupMap";
|
|
1982
|
+
"required": false;
|
|
1983
|
+
};
|
|
1915
1984
|
"stickyColumn": {
|
|
1916
1985
|
"alias": "stickyColumn";
|
|
1917
1986
|
"required": false;
|
|
@@ -1944,6 +2013,34 @@ export declare class AttendanceTableComponent implements OnInit, OnChanges, OnDe
|
|
|
1944
2013
|
"filterDateEmitEvt": "filterDateEmitEvt";
|
|
1945
2014
|
}, never, ["[table-toolbar-left]", "[table-toolbar-right]"], true, never>;
|
|
1946
2015
|
}
|
|
2016
|
+
export declare class UserChipComponent implements OnChanges {
|
|
2017
|
+
value: unknown;
|
|
2018
|
+
userLookupMap?: UserLookupMap;
|
|
2019
|
+
maxVisible: number;
|
|
2020
|
+
items: ResolvedUserChipItem[];
|
|
2021
|
+
visibleItems: ResolvedUserChipItem[];
|
|
2022
|
+
overflowCount: number;
|
|
2023
|
+
overflowTooltip: string;
|
|
2024
|
+
private failedAvatarKeys;
|
|
2025
|
+
ngOnChanges(): void;
|
|
2026
|
+
onAvatarError(key: string): void;
|
|
2027
|
+
showImage(item: ResolvedUserChipItem): boolean;
|
|
2028
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserChipComponent, never>;
|
|
2029
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserChipComponent, "app-user-chip, fusion-user-chip", never, {
|
|
2030
|
+
"value": {
|
|
2031
|
+
"alias": "value";
|
|
2032
|
+
"required": false;
|
|
2033
|
+
};
|
|
2034
|
+
"userLookupMap": {
|
|
2035
|
+
"alias": "userLookupMap";
|
|
2036
|
+
"required": false;
|
|
2037
|
+
};
|
|
2038
|
+
"maxVisible": {
|
|
2039
|
+
"alias": "maxVisible";
|
|
2040
|
+
"required": false;
|
|
2041
|
+
};
|
|
2042
|
+
}, {}, never, never, true, never>;
|
|
2043
|
+
}
|
|
1947
2044
|
export declare class FusionCardComponent implements OnInit {
|
|
1948
2045
|
private sanitizer;
|
|
1949
2046
|
private renderer;
|