ud-components 0.0.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.
Files changed (45) hide show
  1. package/README.md +63 -0
  2. package/enums/application-status.enum.d.ts +5 -0
  3. package/enums/custom-table.enum.d.ts +27 -0
  4. package/enums/modal-input-type.enum.d.ts +13 -0
  5. package/enums/role.enum.d.ts +9 -0
  6. package/enums/snackbar-type.enum.d.ts +6 -0
  7. package/enums/table-display-column-type.d.ts +15 -0
  8. package/fesm2022/ud-components.mjs +2040 -0
  9. package/fesm2022/ud-components.mjs.map +1 -0
  10. package/index.d.ts +5 -0
  11. package/interfaces/floor.interface.d.ts +7 -0
  12. package/interfaces/page-request.interface.d.ts +5 -0
  13. package/interfaces/phone.interface.d.ts +9 -0
  14. package/interfaces/supabase.interface.d.ts +4 -0
  15. package/interfaces/tab.interface.d.ts +5 -0
  16. package/interfaces/table-display-column.interface.d.ts +56 -0
  17. package/interfaces/table.interface.d.ts +10 -0
  18. package/lib/carousel/carousel.component.d.ts +12 -0
  19. package/lib/custom-input/custom-input.component.d.ts +11 -0
  20. package/lib/custom-snackbar/custom-snackbar.component.d.ts +28 -0
  21. package/lib/custom-table/custom-table.component.d.ts +217 -0
  22. package/lib/custom-table/custom-table.interface.d.ts +18 -0
  23. package/lib/dynamic-component/dynamic-component.component.d.ts +14 -0
  24. package/lib/edit-view/edit-view-section.directive.d.ts +8 -0
  25. package/lib/edit-view/edit-view.component.d.ts +14 -0
  26. package/lib/file-input/file-input.component.d.ts +24 -0
  27. package/lib/kpi/kpi.component.d.ts +20 -0
  28. package/lib/kpi/kpi.enum.d.ts +22 -0
  29. package/lib/kpi/kpi.interface.d.ts +25 -0
  30. package/lib/modal/modal.component.d.ts +30 -0
  31. package/lib/pill/pill.component.d.ts +10 -0
  32. package/lib/progress-bar/progress-bar.component.d.ts +9 -0
  33. package/lib/summary-view/summary-view.component.d.ts +15 -0
  34. package/lib/summary-view/summary-view.interface.d.ts +10 -0
  35. package/lib/tabs/tabs.component.d.ts +16 -0
  36. package/lib/tel-input/tel-input.component.d.ts +19 -0
  37. package/package.json +23 -0
  38. package/pipes/capitalize/capitalize.pipe.d.ts +7 -0
  39. package/pipes/pluralize/pluralize.pipe.d.ts +7 -0
  40. package/pipes/safe/safe.pipe.d.ts +10 -0
  41. package/pipes/singular/singular.pipe.d.ts +7 -0
  42. package/public-api.d.ts +14 -0
  43. package/services/translate-wrapper/translate-wrapper.service.d.ts +11 -0
  44. package/utils/common-utils.d.ts +33 -0
  45. package/utils/time-options.utils.d.ts +4 -0
@@ -0,0 +1,56 @@
1
+ import { TableDisplayColumnType } from '../enums/table-display-column-type';
2
+ import { TemplateRef } from '@angular/core';
3
+ import { SortDirection } from '@angular/material/sort';
4
+ import { Observable } from 'rxjs';
5
+ export interface TableDisplayColumn {
6
+ /**
7
+ * Property in which to take the value from
8
+ */
9
+ property: string;
10
+ /**
11
+ * Name / Label
12
+ */
13
+ name: Observable<string>;
14
+ /**
15
+ * Data type
16
+ */
17
+ type: TableDisplayColumnType;
18
+ /**
19
+ * Route
20
+ */
21
+ route?: string;
22
+ /**
23
+ * Route item id
24
+ */
25
+ routeId?: string;
26
+ /**
27
+ * Icons
28
+ */
29
+ icons?: {
30
+ [key: string]: {
31
+ name: string;
32
+ color: string;
33
+ };
34
+ };
35
+ /**
36
+ * Transform data to something else
37
+ */
38
+ transformFn?: any;
39
+ /**
40
+ * Initial sort direction
41
+ */
42
+ initSort?: SortDirection;
43
+ /**
44
+ * HTML Template to override default template
45
+ */
46
+ dataCellTemplate?: TemplateRef<any>;
47
+ /**
48
+ * Enable/disable filtering on column. Enabled by default
49
+ */
50
+ disableFiltering?: boolean;
51
+ /**
52
+ * If present, it will use this property to send to the backend instead of the default property
53
+ * Useful in cases where were not sending the whole object to the client but still need to filter
54
+ */
55
+ filterProperty?: string;
56
+ }
@@ -0,0 +1,10 @@
1
+ import { PageRequest } from './page-request.interface';
2
+ import { DateOperator, NumberOperator, StringOperator } from '../enums/custom-table.enum';
3
+ export interface FilterCriteria {
4
+ field: string;
5
+ operator: StringOperator | NumberOperator | DateOperator;
6
+ value: any;
7
+ }
8
+ export interface PageRequestWithFilters extends PageRequest {
9
+ filters?: FilterCriteria[];
10
+ }
@@ -0,0 +1,12 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { SwiperContainer } from 'swiper/element/bundle';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CarouselComponent {
5
+ pictures: string[];
6
+ height: number;
7
+ direction: string;
8
+ autoplay: boolean;
9
+ swiperRef: ElementRef<SwiperContainer>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<CarouselComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<CarouselComponent, "ud-carousel", never, { "pictures": { "alias": "pictures"; "required": false; }; "height": { "alias": "height"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "autoplay": { "alias": "autoplay"; "required": false; }; }, {}, never, never, true, never>;
12
+ }
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CustomInputComponent {
3
+ type: string;
4
+ placeholder?: string;
5
+ required: boolean;
6
+ name: string;
7
+ inputValue: string;
8
+ constructor();
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomInputComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomInputComponent, "c-input", never, { "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "name": { "alias": "name"; "required": false; }; "inputValue": { "alias": "inputValue"; "required": false; }; }, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,28 @@
1
+ import { OnInit, OnDestroy } from '@angular/core';
2
+ import { MatSnackBarRef } from '@angular/material/snack-bar';
3
+ import { SnackbarType } from '../../enums/snackbar-type.enum';
4
+ import * as i0 from "@angular/core";
5
+ export interface SnackbarData {
6
+ message: string;
7
+ type: SnackbarType;
8
+ duration: number;
9
+ action?: string;
10
+ }
11
+ export declare class CustomSnackbarComponent implements OnInit, OnDestroy {
12
+ data: SnackbarData;
13
+ private snackBarRef;
14
+ progress: number;
15
+ private subscription?;
16
+ private isPaused;
17
+ private elapsedTime;
18
+ constructor(data: SnackbarData, snackBarRef: MatSnackBarRef<CustomSnackbarComponent>);
19
+ ngOnInit(): void;
20
+ ngOnDestroy(): void;
21
+ private startTimer;
22
+ pauseTimer(): void;
23
+ resumeTimer(): void;
24
+ dismiss(): void;
25
+ protected readonly SnackbarType: typeof SnackbarType;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomSnackbarComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomSnackbarComponent, "ud-custom-snackbar", never, {}, {}, never, never, true, never>;
28
+ }
@@ -0,0 +1,217 @@
1
+ import { CustomAction, TableQueryChange } from './custom-table.interface';
2
+ import { NumberOperator } from '../../enums/custom-table.enum';
3
+ import { Role } from '../../enums/role.enum';
4
+ import { TableDisplayColumnType } from '../../enums/table-display-column-type';
5
+ import { FloorInterface } from '../../interfaces/floor.interface';
6
+ import { TableDisplayColumn } from '../../interfaces/table-display-column.interface';
7
+ import { TranslateWrapperService } from '../../services/translate-wrapper/translate-wrapper.service';
8
+ import { SelectionModel } from '@angular/cdk/collections';
9
+ import { ElementRef, EventEmitter, OnInit, TemplateRef } from '@angular/core';
10
+ import { FormGroup } from '@angular/forms';
11
+ import { MatPaginator, PageEvent } from '@angular/material/paginator';
12
+ import { MatSort } from '@angular/material/sort';
13
+ import { MatTableDataSource } from '@angular/material/table';
14
+ import { Observable } from 'rxjs';
15
+ import * as i0 from "@angular/core";
16
+ export declare enum ActionType {
17
+ ADD = "add",
18
+ APPROVE = "approve",
19
+ DELETE = "delete",
20
+ EXTEND = "extend",
21
+ REJECT = "reject"
22
+ }
23
+ export declare class CustomTableComponent implements OnInit {
24
+ private translateService;
25
+ private readonly destroyRef;
26
+ /**
27
+ * ID of the table, if present, we can use it to the table's pagination and filtering
28
+ */
29
+ id?: string;
30
+ /**
31
+ * Title of the table
32
+ */
33
+ title: Observable<string>;
34
+ /**
35
+ * Icon of the table
36
+ */
37
+ icon: string;
38
+ /**
39
+ * Actions
40
+ */
41
+ actions: ActionType[];
42
+ /**
43
+ * Custom actions
44
+ */
45
+ customActions: CustomAction[];
46
+ /**
47
+ * Allowed roles
48
+ */
49
+ allowedRoles: Role[];
50
+ /**
51
+ * Should have checkbox or not
52
+ */
53
+ haveCheckbox: boolean;
54
+ /**
55
+ * Columns of the table
56
+ */
57
+ displayedColumns: TableDisplayColumn[];
58
+ /**
59
+ * Data source / rows
60
+ */
61
+ dataSource: MatTableDataSource<any>;
62
+ /**
63
+ * Page size options
64
+ */
65
+ paginationSizeOptions: number[];
66
+ /**
67
+ * First page size
68
+ */
69
+ initialPageSize?: number;
70
+ specificSelectRow: boolean;
71
+ /**
72
+ * If filters are enabled
73
+ */
74
+ hasFilter: boolean;
75
+ /**
76
+ * If rows can be expandable
77
+ */
78
+ expandableRows: boolean;
79
+ /**
80
+ * Expanded rows
81
+ */
82
+ expandedItem: {
83
+ type: string;
84
+ property: string;
85
+ };
86
+ emptyMessage?: Observable<string>;
87
+ /**
88
+ * Table loading status
89
+ */
90
+ isLoading?: boolean;
91
+ /**
92
+ * Whether to have one filter for all columns or one filter per column
93
+ */
94
+ separateFilters?: boolean;
95
+ /**
96
+ * Show paginator or not
97
+ */
98
+ showPaginator?: boolean;
99
+ /**
100
+ * Display message if there's no data
101
+ */
102
+ noTableDataMessage?: string;
103
+ /**
104
+ * Actions button shown or not
105
+ */
106
+ actionsMenuEnabled?: boolean;
107
+ /**
108
+ * Number of rows
109
+ */
110
+ totalElements?: number;
111
+ /**
112
+ * Use server side filtering or client side filtering
113
+ * Should only use client side if there aren't a lot of rows
114
+ */
115
+ serverSideFiltering?: boolean;
116
+ /**
117
+ * Remove header
118
+ */
119
+ disableHeader?: boolean;
120
+ /**
121
+ * Emits delete
122
+ */
123
+ delete: EventEmitter<SelectionModel<any>>;
124
+ /**
125
+ * Emits approve
126
+ */
127
+ approve: EventEmitter<SelectionModel<any>>;
128
+ /**
129
+ * Emits reject
130
+ */
131
+ reject: EventEmitter<SelectionModel<any>>;
132
+ /**
133
+ * Emits extend
134
+ */
135
+ extend: EventEmitter<SelectionModel<any>>;
136
+ /**
137
+ * Emits add
138
+ */
139
+ add: EventEmitter<void>;
140
+ /**
141
+ * Emits clicked
142
+ */
143
+ clicked: EventEmitter<any>;
144
+ /**
145
+ * Emits combined query change (filters + pagination)
146
+ */
147
+ queryChange: EventEmitter<TableQueryChange>;
148
+ actionsTemplate: TemplateRef<any>;
149
+ selection: SelectionModel<any>;
150
+ selectedFilters: TableDisplayColumn[];
151
+ expandedElement: FloorInterface | null;
152
+ columnsToDisplayWithExpand: string[];
153
+ tableDisplayColumnType: typeof TableDisplayColumnType;
154
+ initSortedCol: TableDisplayColumn | null;
155
+ filterByColumnFormGroup: FormGroup;
156
+ /**
157
+ * Related to filtering and pagination on localStorage
158
+ */
159
+ private isRestoringState;
160
+ private currentFilters;
161
+ /**
162
+ * Operators
163
+ *
164
+ * - Number
165
+ */
166
+ numberOperations: {
167
+ label: Observable<string>;
168
+ value: NumberOperator;
169
+ }[];
170
+ paginatorRef: MatPaginator;
171
+ set paginator(val: MatPaginator);
172
+ set sort(val: MatSort);
173
+ allFilterInput: ElementRef<HTMLInputElement>;
174
+ constructor(translateService: TranslateWrapperService);
175
+ ngOnInit(): void;
176
+ applyFilterToAllColumns(event: Event): void;
177
+ applyFilterByColumn(): void;
178
+ private buildFilterCriteria;
179
+ filterSelectionChanged(selectedFilters: string[]): void;
180
+ deleteAction(): void;
181
+ approveAction(): void;
182
+ rejectAction(): void;
183
+ extendAction(): void;
184
+ addAction(): void;
185
+ clickedAction(item: any): void;
186
+ onPageChange(event: PageEvent): void;
187
+ /** Whether the number of selected elements matches the total number of rows. */
188
+ isAllSelected(): boolean;
189
+ /** Selects all rows if they are not all selected; otherwise clear selection. */
190
+ toggleAllRows(): void;
191
+ /** The label for the checkbox on the passed row */
192
+ checkboxLabel(row?: any): string;
193
+ selectRow(row?: any): void;
194
+ setInitSort(): void;
195
+ setInitFilter(): void;
196
+ private restoreTableQuery;
197
+ private restoreFiltersFromCriteria;
198
+ private setTableQuery;
199
+ buildColumnFilterControls(): void;
200
+ setEmptyMessage(): void;
201
+ formatPhoneNumber(value: string): string;
202
+ getRowBackgroundColor(index: number): "bg-accent" | "bg-white";
203
+ getHyperlinkRoute(row: any, column: TableDisplayColumn): string;
204
+ private isApplicationSubmitted;
205
+ get hasSelectedRow(): boolean;
206
+ get actionColumnStyleWidth(): string;
207
+ get generalColumnStyleWidth(): string;
208
+ get displayedColumnsProperty(): string[];
209
+ get displayedColumnsWithoutSelect(): TableDisplayColumn[];
210
+ get displayCheckbox(): boolean;
211
+ protected readonly capitalize: (word: string) => string;
212
+ protected readonly TableDisplayColumnType: typeof TableDisplayColumnType;
213
+ protected readonly NumberOperator: typeof NumberOperator;
214
+ protected readonly ActionType: typeof ActionType;
215
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomTableComponent, never>;
216
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomTableComponent, "custom-table", never, { "id": { "alias": "id"; "required": false; }; "title": { "alias": "title"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "customActions": { "alias": "customActions"; "required": false; }; "allowedRoles": { "alias": "allowedRoles"; "required": false; }; "haveCheckbox": { "alias": "haveCheckbox"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "paginationSizeOptions": { "alias": "paginationSizeOptions"; "required": false; }; "initialPageSize": { "alias": "initialPageSize"; "required": false; }; "specificSelectRow": { "alias": "specificSelectRow"; "required": false; }; "hasFilter": { "alias": "hasFilter"; "required": false; }; "expandableRows": { "alias": "expandableRows"; "required": false; }; "expandedItem": { "alias": "expandedItem"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "separateFilters": { "alias": "separateFilters"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "noTableDataMessage": { "alias": "noTableDataMessage"; "required": false; }; "actionsMenuEnabled": { "alias": "actionsMenuEnabled"; "required": false; }; "totalElements": { "alias": "totalElements"; "required": false; }; "serverSideFiltering": { "alias": "serverSideFiltering"; "required": false; }; "disableHeader": { "alias": "disableHeader"; "required": false; }; }, { "delete": "delete"; "approve": "approve"; "reject": "reject"; "extend": "extend"; "add": "add"; "clicked": "clicked"; "queryChange": "queryChange"; }, ["actionsTemplate"], never, true, never>;
217
+ }
@@ -0,0 +1,18 @@
1
+ import { SelectionModel } from '@angular/cdk/collections';
2
+ import { FilterCriteria } from '../../interfaces/table.interface';
3
+ export interface CustomAction {
4
+ clickFn: (params?: any) => any;
5
+ tooltipText: string;
6
+ icon: string;
7
+ disabled?: (selection: SelectionModel<any>) => boolean;
8
+ }
9
+ export interface TableQuery {
10
+ filters?: FilterCriteria[];
11
+ pageSize?: number;
12
+ pageNumber?: number;
13
+ }
14
+ export interface TableQueryChange {
15
+ filters: FilterCriteria[];
16
+ pageIndex: number;
17
+ pageSize: number;
18
+ }
@@ -0,0 +1,14 @@
1
+ import { AfterViewInit, ViewContainerRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DynamicComponentComponent implements AfterViewInit {
4
+ component: any;
5
+ properties: {
6
+ [key: string]: any;
7
+ };
8
+ container: ViewContainerRef;
9
+ componentRef: any;
10
+ constructor();
11
+ ngAfterViewInit(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicComponentComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<DynamicComponentComponent, "ud-dynamic-component", never, { "component": { "alias": "component"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; }, {}, never, never, true, never>;
14
+ }
@@ -0,0 +1,8 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class EditViewSectionDirective {
4
+ templateRef: TemplateRef<any>;
5
+ constructor(templateRef: TemplateRef<any>);
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditViewSectionDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EditViewSectionDirective, "[editViewSection]", never, {}, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,14 @@
1
+ import { QueryList } from '@angular/core';
2
+ import { EditViewSectionDirective } from './edit-view-section.directive';
3
+ import * as i0 from "@angular/core";
4
+ export declare class EditViewComponent {
5
+ title: string;
6
+ loading: boolean;
7
+ skeletonTitleHeight: string;
8
+ skeletonBodyHeight: string;
9
+ sections: QueryList<EditViewSectionDirective>;
10
+ get sectionsArray(): EditViewSectionDirective[];
11
+ get hasSections(): boolean;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditViewComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditViewComponent, "ud-edit-view", never, { "title": { "alias": "title"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "skeletonTitleHeight": { "alias": "skeletonTitleHeight"; "required": false; }; "skeletonBodyHeight": { "alias": "skeletonBodyHeight"; "required": false; }; }, {}, ["sections"], ["[header-actions]", "[main]", "[footer]"], true, never>;
14
+ }
@@ -0,0 +1,24 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { NgxFileDropEntry } from 'ngx-file-drop';
3
+ import { MatDialog } from '@angular/material/dialog';
4
+ import { StorageSignedResponse } from '../../interfaces/supabase.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class FileInputComponent {
7
+ private dialog;
8
+ accept: string;
9
+ label: string;
10
+ multiple: boolean;
11
+ icon?: string;
12
+ initialFiles: import("@angular/core").InputSignal<StorageSignedResponse | StorageSignedResponse[] | undefined>;
13
+ filesSelected: EventEmitter<File[]>;
14
+ protected files: File[];
15
+ protected previewUrls: string[];
16
+ protected uploadStatus: string | null;
17
+ constructor(dialog: MatDialog);
18
+ dropped(droppedFiles: NgxFileDropEntry[]): Promise<void>;
19
+ removeFile(index: number): void;
20
+ clearFiles(): void;
21
+ openImageDialog(index: number): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileInputComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileInputComponent, "ud-file-input", never, { "accept": { "alias": "accept"; "required": false; }; "label": { "alias": "label"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "initialFiles": { "alias": "initialFiles"; "required": false; "isSignal": true; }; }, { "filesSelected": "filesSelected"; }, never, never, true, never>;
24
+ }
@@ -0,0 +1,20 @@
1
+ import { IconColor, KpiDataType, KpiProgressBarType } from './kpi.enum';
2
+ import { KpiData, PillData, ProgressBarData, TextData } from './kpi.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class KpiComponent {
5
+ title: string;
6
+ subtitle?: string;
7
+ dataType: KpiDataType;
8
+ data: KpiData;
9
+ icon: string;
10
+ iconColor: IconColor;
11
+ titleRef?: string;
12
+ getProgressData(): ProgressBarData;
13
+ getProgressBarValue(): number;
14
+ getPillData(): PillData;
15
+ getTextData(): TextData;
16
+ protected readonly KpiDataType: typeof KpiDataType;
17
+ protected readonly KpiProgressBarType: typeof KpiProgressBarType;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<KpiComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<KpiComponent, "ud-kpi", never, { "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "dataType": { "alias": "dataType"; "required": false; }; "data": { "alias": "data"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "titleRef": { "alias": "titleRef"; "required": false; }; }, {}, never, ["*"], true, never>;
20
+ }
@@ -0,0 +1,22 @@
1
+ export declare enum KpiDataType {
2
+ PROGRESS_BAR = "PROGRESS_BAR",
3
+ PILLS = "PILLS",
4
+ TEXT = "TEXT"
5
+ }
6
+ export declare enum KpiProgressBarType {
7
+ PERCENTAGE = "PERCENTAGE",
8
+ DIVISION = "DIVISION"
9
+ }
10
+ export declare enum KpiPillType {
11
+ SUCCESS = "success",
12
+ WARNING = "warning",
13
+ DANGER = "danger",
14
+ INFO = "info"
15
+ }
16
+ export declare enum IconColor {
17
+ PURPLE = "purple",
18
+ AMBER = "amber",
19
+ GREEN = "green",
20
+ BLUE = "blue",
21
+ RED = "red"
22
+ }
@@ -0,0 +1,25 @@
1
+ import { Observable } from 'rxjs';
2
+ import { KpiPillType, KpiProgressBarType } from './kpi.enum';
3
+ export interface KpiData {
4
+ }
5
+ export interface ProgressBarData extends KpiData {
6
+ type: KpiProgressBarType;
7
+ data: {
8
+ value: number;
9
+ max: number;
10
+ };
11
+ }
12
+ export interface PillData extends KpiData {
13
+ value: number;
14
+ pills: Pill[];
15
+ }
16
+ export interface Pill {
17
+ value: number;
18
+ label: Observable<string>;
19
+ type: KpiPillType;
20
+ }
21
+ export interface TextData extends KpiData {
22
+ value: string | number;
23
+ unit?: string;
24
+ description?: string;
25
+ }
@@ -0,0 +1,30 @@
1
+ import { ModalInputType } from '../../enums/modal-input-type.enum';
2
+ import { FormGroup } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ModalComponent {
5
+ data: any;
6
+ protected form?: FormGroup;
7
+ protected modalInputType: typeof ModalInputType;
8
+ protected showClose: boolean;
9
+ protected pictureUrls?: string;
10
+ protected currentPictureIndex?: number;
11
+ protected autocompleteFilteredOptions: any[];
12
+ protected defaultMinTime: string;
13
+ protected defaultMaxTime: string;
14
+ DEFAULT_TIME_OPTIONS: {
15
+ label: string;
16
+ value: Date;
17
+ }[];
18
+ constructor(data: any);
19
+ previous(): void;
20
+ next(): void;
21
+ getMinimumDate(): Date;
22
+ getDefaultTime(): number[];
23
+ onAutocompleteInputChange(event: Event, options: {
24
+ label: string;
25
+ value: any;
26
+ }[]): void;
27
+ autocompleteDisplayFn(option: any): string;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "ud-modal", never, {}, {}, never, never, true, never>;
30
+ }
@@ -0,0 +1,10 @@
1
+ import { KpiPillType } from '../kpi/kpi.enum';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class PillComponent {
5
+ text: string | Observable<string>;
6
+ type: KpiPillType;
7
+ get observableText(): Observable<string>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<PillComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<PillComponent, "ud-pill", never, { "text": { "alias": "text"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, {}, never, never, true, never>;
10
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class ProgressBarComponent {
3
+ value: number;
4
+ height: string;
5
+ borderRadius: string;
6
+ backgroundColor: string;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProgressBarComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProgressBarComponent, "ud-progress-bar", never, { "value": { "alias": "value"; "required": false; }; "height": { "alias": "height"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; }, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1,15 @@
1
+ import { EditOptions, SummaryField } from './summary-view.interface';
2
+ import * as i0 from "@angular/core";
3
+ type LAYOUTS = 'text-left' | 'text-right' | 'text-all' | 'text-none';
4
+ export declare class SummaryViewComponent {
5
+ title: string | null;
6
+ editOptions: EditOptions | null;
7
+ summaryFields: SummaryField[];
8
+ loading: boolean;
9
+ layout: LAYOUTS;
10
+ skeletonTitleHeight: string;
11
+ skeletonBodyHeight: string;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<SummaryViewComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<SummaryViewComponent, "ud-summary-view", never, { "title": { "alias": "title"; "required": false; }; "editOptions": { "alias": "editOptions"; "required": false; }; "summaryFields": { "alias": "summaryFields"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "skeletonTitleHeight": { "alias": "skeletonTitleHeight"; "required": false; }; "skeletonBodyHeight": { "alias": "skeletonBodyHeight"; "required": false; }; }, {}, never, ["[header-actions]", "*"], true, never>;
14
+ }
15
+ export {};
@@ -0,0 +1,10 @@
1
+ export interface SummaryField {
2
+ label?: string;
3
+ icon: string;
4
+ value: string | number | boolean | undefined;
5
+ }
6
+ export interface EditOptions {
7
+ disabled: boolean;
8
+ routerLink: string;
9
+ tooltip?: string;
10
+ }
@@ -0,0 +1,16 @@
1
+ import { EventEmitter, QueryList, ElementRef, AfterViewInit, OnInit } from '@angular/core';
2
+ import { Tab } from '../../interfaces/tab.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TabsComponent implements OnInit, AfterViewInit {
5
+ tabs: Tab[];
6
+ tabChange: EventEmitter<Tab>;
7
+ tabItems: QueryList<ElementRef>;
8
+ activeTab: Tab;
9
+ sliderStyle: any;
10
+ ngOnInit(): void;
11
+ ngAfterViewInit(): void;
12
+ setActiveTab(tab: Tab): void;
13
+ updateSliderPosition(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<TabsComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "ud-tabs", never, { "tabs": { "alias": "tabs"; "required": false; }; }, { "tabChange": "tabChange"; }, never, never, true, never>;
16
+ }
@@ -0,0 +1,19 @@
1
+ import { CountryCode } from '../../interfaces/phone.interface';
2
+ import { OnInit } from '@angular/core';
3
+ import { AbstractControl } from '@angular/forms';
4
+ import { MatFormFieldAppearance } from '@angular/material/form-field';
5
+ import * as i0 from "@angular/core";
6
+ export declare class TelInputComponent implements OnInit {
7
+ group: AbstractControl;
8
+ appearance: MatFormFieldAppearance;
9
+ width: number;
10
+ showIcon: boolean;
11
+ protected static COUNTRIES: CountryCode[];
12
+ protected countries: CountryCode[];
13
+ protected selectedCountry: CountryCode;
14
+ ngOnInit(): void;
15
+ get countryCode(): AbstractControl;
16
+ get phoneNumber(): AbstractControl;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<TelInputComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<TelInputComponent, "ud-tel-input", never, { "group": { "alias": "group"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "width": { "alias": "width"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; }, {}, never, never, true, never>;
19
+ }
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "ud-components",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^19.2.0",
6
+ "@angular/core": "^19.2.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "sideEffects": false,
12
+ "module": "fesm2022/ud-components.mjs",
13
+ "typings": "index.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./index.d.ts",
20
+ "default": "./fesm2022/ud-components.mjs"
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CapitalizePipe implements PipeTransform {
4
+ transform(value: string | null | undefined): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CapitalizePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<CapitalizePipe, "capitalize", true>;
7
+ }