@ieeesa-npm/presentation 0.5.5 → 0.5.7

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 (25) hide show
  1. package/esm2022/lib/assets/constants.json +6 -1
  2. package/esm2022/lib/components/breadcrumb/breadcrumb.component.mjs +114 -0
  3. package/esm2022/lib/components/date-picker/date-picker.component.mjs +17 -5
  4. package/esm2022/lib/components/date-picker-header/date-picker-header.component.mjs +3 -4
  5. package/esm2022/lib/components/dynamic-form/dynamic-form.component.mjs +3 -3
  6. package/esm2022/lib/components/form-error/form-error.component.mjs +3 -3
  7. package/esm2022/lib/components/form-support-text/form-support-text.component.mjs +3 -3
  8. package/esm2022/lib/components/modal-confirmation/modal-confirmation.component.mjs +3 -3
  9. package/esm2022/lib/components/navigation-menu/navigation-menu.component.mjs +3 -3
  10. package/esm2022/lib/components/notification/notification.component.mjs +3 -3
  11. package/esm2022/lib/date-formats.mjs +2 -2
  12. package/esm2022/lib/models/breadcrumb.model.mjs +2 -0
  13. package/esm2022/lib/models/date-picker.model.mjs +1 -1
  14. package/esm2022/lib/models/navigation-menu.model.mjs +1 -1
  15. package/esm2022/public-api.mjs +3 -1
  16. package/fesm2022/ieeesa-npm-presentation.mjs +173 -49
  17. package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
  18. package/lib/components/breadcrumb/breadcrumb.component.d.ts +52 -0
  19. package/lib/components/chips/chips.component.d.ts +5 -0
  20. package/lib/components/date-picker/date-picker.component.d.ts +9 -1
  21. package/lib/models/breadcrumb.model.d.ts +6 -0
  22. package/lib/models/date-picker.model.d.ts +3 -0
  23. package/package.json +3 -3
  24. package/public-api.d.ts +2 -0
  25. package/src/lib/assets/constants.json +6 -1
@@ -0,0 +1,52 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import { ActivatedRoute, Router } from '@angular/router';
4
+ import { Breadcrumb } from '../../models/breadcrumb.model';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Reusable breadcrumb component for displaying and navigating through a hierarchy of pages.
8
+ * @class BreadcrumbComponent
9
+ */
10
+ export declare class BreadcrumbComponent implements OnDestroy {
11
+ private activatedRoute;
12
+ private router;
13
+ breadcrumbTexts: any;
14
+ /**
15
+ * Initial route for the breadcrumb component.
16
+ * @type {string}
17
+ * @default '/'
18
+ * @memberof BreadcrumbComponent
19
+ */
20
+ breadcrumbInitialRoute: string;
21
+ /**
22
+ * Initial label for the breadcrumb component.
23
+ * @type {string}
24
+ * @default breadcrumbTexts?.breadcrumb?.label?.dashboard
25
+ * @memberof BreadcrumbComponent
26
+ */
27
+ breadcrumbInitialRouteLabel: any;
28
+ breadcrumbs: Breadcrumb[];
29
+ destroy$: Subject<boolean>;
30
+ constructor(activatedRoute: ActivatedRoute, router: Router);
31
+ /**
32
+ * Sets up the subscription to router events to update breadcrumbs.
33
+ * @memberof BreadcrumbComponent
34
+ */
35
+ setRouteData(): void;
36
+ /**
37
+ * Recursively gets the breadcrumb items for the given route.
38
+ * @param {ActivatedRoute} route - The activated route.
39
+ * @param {string} [url=''] - The current URL.
40
+ * @param {Breadcrumb[]} [breadcrumbs=[]] - The current breadcrumb items.
41
+ * @return {Breadcrumb[]} - The array of breadcrumb items.
42
+ * @memberof BreadcrumbComponent
43
+ */
44
+ getBreadcrumbs(route: ActivatedRoute, url?: string, breadcrumbs?: Breadcrumb[]): Breadcrumb[];
45
+ /**
46
+ * NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
47
+ * @memberof BreadcrumbComponent
48
+ */
49
+ ngOnDestroy(): void;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbComponent, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbComponent, "ieeesa-breadcrumb", never, { "breadcrumbInitialRoute": { "alias": "breadcrumbInitialRoute"; "required": false; }; "breadcrumbInitialRouteLabel": { "alias": "breadcrumbInitialRouteLabel"; "required": false; }; }, {}, never, never, true, never>;
52
+ }
@@ -146,6 +146,11 @@ export declare class ChipsComponent implements OnInit, OnDestroy {
146
146
  url: string;
147
147
  }[];
148
148
  };
149
+ breadcrumb: {
150
+ label: {
151
+ dashboard: string;
152
+ };
153
+ };
149
154
  defaultWelcomeBgColor: string;
150
155
  };
151
156
  chipsType: typeof ChipsType;
@@ -71,6 +71,8 @@ export declare class DatePickerComponent implements FormField, OnInit {
71
71
  minDate: string;
72
72
  maxDate: string;
73
73
  };
74
+ minDate: Date | moment.Moment;
75
+ maxDate: Date | moment.Moment;
74
76
  selectedDate: EventEmitter<string>;
75
77
  selectedDateRange: EventEmitter<{
76
78
  startDate: string;
@@ -125,6 +127,12 @@ export declare class DatePickerComponent implements FormField, OnInit {
125
127
  * @memberof DatePickerComponent
126
128
  */
127
129
  isRequired(): boolean;
130
+ /**
131
+ * Sets the updated selected date using datepicker service which will be shown in datepicker header
132
+ * @param {string} controlName
133
+ * @memberof DatePickerComponent
134
+ */
135
+ onDatePickerOpen(controlName: string): void;
128
136
  static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
129
- static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "ieeesa-date-picker", never, { "selectedDates": { "alias": "selectedDates"; "required": false; }; "selectedRange": { "alias": "selectedRange"; "required": false; }; "calendarType": { "alias": "calendarType"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholderLabel": { "alias": "placeholderLabel"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "isLabelAlignedLeft": { "alias": "isLabelAlignedLeft"; "required": false; }; "datepickerLabel": { "alias": "datepickerLabel"; "required": false; }; "dateRange": { "alias": "dateRange"; "required": false; }; }, { "selectedDate": "selectedDate"; "selectedDateRange": "selectedDateRange"; }, never, never, true, never>;
137
+ static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "ieeesa-date-picker", never, { "selectedDates": { "alias": "selectedDates"; "required": false; }; "selectedRange": { "alias": "selectedRange"; "required": false; }; "calendarType": { "alias": "calendarType"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholderLabel": { "alias": "placeholderLabel"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "isLabelAlignedLeft": { "alias": "isLabelAlignedLeft"; "required": false; }; "datepickerLabel": { "alias": "datepickerLabel"; "required": false; }; "dateRange": { "alias": "dateRange"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, { "selectedDate": "selectedDate"; "selectedDateRange": "selectedDateRange"; }, never, never, true, never>;
130
138
  }
@@ -0,0 +1,6 @@
1
+ import { Params } from "@angular/router";
2
+ export interface Breadcrumb {
3
+ label: string;
4
+ params?: Params;
5
+ url: string;
6
+ }
@@ -1,4 +1,5 @@
1
1
  import { CalendarType } from '../models/calendar.model';
2
+ import * as moment from 'moment';
2
3
  export interface DatePicker {
3
4
  placeholderLabel?: string;
4
5
  selectedDates?: string[];
@@ -10,4 +11,6 @@ export interface DatePicker {
10
11
  maxDate: string;
11
12
  };
12
13
  calendarType: CalendarType;
14
+ minDate?: Date | moment.Moment;
15
+ maxDate?: Date | moment.Moment;
13
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ieeesa-npm/presentation",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0",
@@ -18,8 +18,8 @@
18
18
  "moment": "^2.29.4",
19
19
  "rxjs": "~7.8.0",
20
20
  "zone.js": "~0.13.0",
21
- "@ieeesa-npm/shared-styles": "^0.1.4",
22
- "@ieeesa-npm/feature": "^0.3.7"
21
+ "@ieeesa-npm/shared-styles": "^0.1.5",
22
+ "@ieeesa-npm/feature": "^0.3.9"
23
23
  },
24
24
  "dependencies": {
25
25
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -24,6 +24,7 @@ export * from './lib/components/welcome/welcome.component';
24
24
  export * from './lib/components/chips/chips.component';
25
25
  export * from './lib/components/filter/filter.component';
26
26
  export * from './lib/components/data-table/data-table.component';
27
+ export * from './lib/components/breadcrumb/breadcrumb.component';
27
28
  export * from './lib/directives/dynamic-form-field/dynamic-form-field.directive';
28
29
  export * from './lib/directives/focus-invalid-form-field/focus-invalid-form-field.directive';
29
30
  export * from './lib/directives/set-background/set-background.directive';
@@ -54,6 +55,7 @@ export * from './lib/models/chip-option.model';
54
55
  export * from './lib/models/paginator-config.model';
55
56
  export * from './lib/models/table-actions.model';
56
57
  export * from './lib/models/table-schema.model';
58
+ export * from './lib/models/breadcrumb.model';
57
59
  export * from './lib/services/datepicker.service';
58
60
  export * from './lib/services/form-utility.service';
59
61
  export * from './lib/presentation.module';
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "datePicker": {
84
84
  "selectDateLabel": "Select Date",
85
- "dateFormatLabel": "DD-MMM-YYYY",
85
+ "dateFormatLabel": "dd mmm yyyy",
86
86
  "startDateLabel": "Start Date",
87
87
  "endDateLabel": "End Date"
88
88
  },
@@ -187,5 +187,10 @@
187
187
  }
188
188
  ]
189
189
  },
190
+ "breadcrumb": {
191
+ "label": {
192
+ "dashboard": "Dashboard"
193
+ }
194
+ },
190
195
  "defaultWelcomeBgColor": "#C0DCED"
191
196
  }