@skysoftware-co/bayan-hr-widgets-ui 1.0.33 → 1.0.35

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/README.md CHANGED
@@ -31,7 +31,7 @@ components:
31
31
  1. My Main Details Widget
32
32
  2. My Upcoming Events Widget
33
33
  3. My Calendar Widget
34
-
34
+
35
35
  ## Dependencies
36
36
  This library depends on `@skysoftware-co/bayan-components-ui` package which provides:
37
37
  - Employee Badge Component
@@ -243,6 +243,7 @@ This component displays an employee calendar showing vacations, public holidays,
243
243
  |-------|------|---------------|-------------|
244
244
  | `baseUrl` | string | `''` | Base URL for API calls |
245
245
  | `headerContainerClass` | string | `''` | Additional CSS class for the header container |
246
+ | `datasource` | `ScheduleRequestsResponse \| null` | `null` | External datasource for pending requests. When provided, pending vacation requests are merged with calendar vacations (consecutive same-type vacations are combined), and pending event requests are added as events. The calendar reactively updates whenever this input changes after the initial calendar data has loaded. |
246
247
  | `publicHolidayColor` | string | from `HRConstantsService`: `'#249EA0'` | Color for public holidays |
247
248
  | `dayOffColor` | string | from `HRConstantsService`: `'#FCCF5A'` | Color for days off |
248
249
  | `eventsColor` | string | from `HRConstantsService`: `'#e67e0f'` | Color for events |
@@ -271,15 +272,15 @@ The component calls `GET {baseUrl}/hr/employee-portal/calendar` with query param
271
272
  - Header: `api-version: 2`
272
273
 
273
274
 
274
- ## My Next Week Vacation Insights Widget Component
275
+ ## My Vacation Team Widget Component
275
276
 
276
277
  ### Usage
277
278
  ```html
278
- <hr-my-next-week-vacation-insights-widget
279
+ <hr-my-vacation-team-widget
279
280
  [baseUrl]="environment.baseUrl"
280
281
  [showProperty]="true"
281
282
  (isLoadingChanged)="onLoadingChanged($event)">
282
- </hr-my-next-week-vacation-insights-widget>
283
+ </hr-my-vacation-team-widget>
283
284
  ```
284
285
 
285
286
  This component displays a "Next Week Vacation Insights" card showing two badges: **Upcoming Vacations** and **Expected To Return** counts for team subordinates. Clicking a badge opens a popup with a paginated, searchable data grid listing the relevant employees. It uses `SkyWidgetSectionItemComponent` from `@skysoftware-co/sky-components-ui` for badge display and `BayanEmployeeBadgeComponent` from `@skysoftware-co/bayan-components-ui` for employee photos in the popup.
@@ -289,22 +290,20 @@ This component displays a "Next Week Vacation Insights" card showing two badges:
289
290
  |-------|------|---------------|-------------|
290
291
  | `baseUrl` | string | `''` | Base URL for API calls |
291
292
  | `showProperty` | boolean | `false` | Show employee property badge in the popup grid |
292
- | `cardClass` | string | `'card rounded rounded-4 card-shadow border-top-0 h-100 p-4'` | Card container CSS class |
293
- | `titleClass` | string | `'table-header-lg fw-meduim mb-3 mt-2'` | Card title CSS class |
293
+ | `cardClass` | string | `'card rounded rounded-4 card-shadow p-16 border-top-0 h-100 p-4'` | Card container CSS class |
294
+ | `titleClass` | string | `'table-header-lg fw-meduim'` | Card title CSS class |
294
295
  | `valueClass` | string | `'fs-24 mt-1 link-dark hover-primary text-decoration-none'` | Badge value CSS class (clickable) |
295
296
  | `disabledValueClass` | string | `'fs-24 mt-1 text-muted pe-none text-decoration-none'` | Badge value CSS class when count is 0 |
296
- | `upcomingContainerClass` | string | `'border-start border-5 mb-4'` | Upcoming vacations badge container CSS class |
297
+ | `upcomingContainerClass` | string | `'border-start border-5 mb-3'` | Upcoming vacations badge container CSS class |
297
298
  | `expectedContainerClass` | string | `'border-start border-5'` | Expected to return badge container CSS class |
298
- | `firstRowClass` | string | `'mb-4'` | CSS class for the first badge row wrapper |
299
- | `secondRowClass` | string | `'mt-3'` | CSS class for the second badge row wrapper |
300
299
 
301
300
  ### Output Events
302
301
  - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes
303
302
 
304
303
  ### API Endpoints
305
- - **Summary**: `GET {baseUrl}/hr/widgets/me/team/next-week-vacation-insights/summary?ShowDirectSubordinatesOnly=false`
306
- - **Upcoming list**: `GET {baseUrl}/hr/widgets/me/team/next-week-vacation-insights/upcoming-vacations`
307
- - **Expected to return list**: `GET {baseUrl}/hr/widgets/me/team/next-week-vacation-insights/expected-to-return`
304
+ - **Summary**: `GET {baseUrl}/hr/widgets/me/team/subordinates/vacations/summary?ShowDirectSubordinatesOnly=false`
305
+ - **Upcoming list**: `GET {baseUrl}/hr/widgets/me/team/subordinates/vacations/upcoming`
306
+ - **Expected to return list**: `GET {baseUrl}/hr/widgets/me/team/subordinates/vacations/expected-to-return`
308
307
 
309
308
  ## Profile Widgets
310
309
 
@@ -345,6 +344,92 @@ The package also exports profile-focused widgets used in the employee profile pa
345
344
  - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
346
345
  - `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
347
346
 
347
+ ## Profile Experiences Widget
348
+
349
+ ### Usage
350
+ ```html
351
+ <hr-profile-experiences-widget
352
+ [baseUrl]="baseUrl"
353
+ (isLoadingChanged)="onExperiencesLoadingChanged($event)">
354
+ </hr-profile-experiences-widget>
355
+ ```
356
+
357
+ ### Input Properties
358
+ | Input | Type | Default Value | Description |
359
+ |-------|------|---------------|-------------|
360
+ | `baseUrl` | string | `''` | Base URL for API calls. |
361
+ | `sectionTitle` | string | `'experiences'` | Section title translation key. |
362
+ | `experienceIcon` | IconDefinition | `faUsersRays` | Header icon. |
363
+ | `viewIcon` | IconDefinition | `faEye` | Attachment view icon. |
364
+ | `downloadIcon` | IconDefinition | `faFolderArrowDown` | Attachment download icon. |
365
+ | `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class. |
366
+ | `headerTextClass` | string | `'fs-16 mt-2 text-secondary'` | Header text CSS class. |
367
+ | `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class. |
368
+ | `rowClass` | string | `'mt-4'` | Main row CSS class. |
369
+ | `rowMarginBottomClass` | string | `'mb-5'` | Bottom spacing class when experiences exist. |
370
+ | `rowMarginBottomEmptyClass` | string | `'mb-4'` | Bottom spacing class when list is empty. |
371
+ | `headerRowClass` | string | `'row col-10'` | Header labels row CSS class. |
372
+ | `actionsSpacerClass` | string | `'col-2'` | Spacer column class between labels and actions area. |
373
+ | `itemRowClass` | string | `'row'` | Backward-compatible row class input (not used in current template loop). |
374
+ | `itemColumnsWrapperClass` | string | `'row col-10 mt-3'` | Per-item columns wrapper CSS class. |
375
+ | `itemColumnClass` | string | `'col-3'` | Column CSS class. |
376
+ | `labelClass` | string | `'field-secondary-label-sm text-ellipsis-one-line'` | Header label CSS class. |
377
+ | `valueClass` | string | `'text-dark-gray fs-14 text-ellipsis-one-line'` | Value text CSS class. |
378
+ | `actionsColumnClass` | string | `'col-2 align-items-end mt-3'` | Attachment action column CSS class. |
379
+ | `viewIconClass` | string | `'fs-15 text-dark cursor-pointer'` | View icon CSS class. |
380
+ | `downloadIconClass` | string | `'fs-15 mx-3 text-dark cursor-pointer'` | Download icon CSS class. |
381
+ | `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class. |
382
+ | `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class. |
383
+
384
+ ### Output Events
385
+ - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
386
+ - `attachmentViewed: EventEmitter<any>` - Emitted when attachment view icon is clicked.
387
+ - `attachmentDownloaded: EventEmitter<any>` - Emitted when attachment download icon is clicked.
388
+ - `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
389
+
390
+ ## Profile Degrees Widget
391
+
392
+ ### Usage
393
+ ```html
394
+ <hr-profile-degrees-widget
395
+ [baseUrl]="baseUrl"
396
+ (isLoadingChanged)="onDegreesLoadingChanged($event)">
397
+ </hr-profile-degrees-widget>
398
+ ```
399
+
400
+ ### Input Properties
401
+ | Input | Type | Default Value | Description |
402
+ |-------|------|---------------|-------------|
403
+ | `baseUrl` | string | `''` | Base URL for API calls. |
404
+ | `sectionTitle` | string | `'Degrees'` | Section title translation key. |
405
+ | `degreesIcon` | IconDefinition | `faFileCertificate` | Header icon. |
406
+ | `viewIcon` | IconDefinition | `faEye` | Attachment view icon. |
407
+ | `downloadIcon` | IconDefinition | `faFolderArrowDown` | Attachment download icon. |
408
+ | `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class. |
409
+ | `headerTextClass` | string | `'fs-16 mt-2 text-secondary'` | Header text CSS class. |
410
+ | `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class. |
411
+ | `rowClass` | string | `'mt-4'` | Main row CSS class. |
412
+ | `rowMarginBottomClass` | string | `'mb-5'` | Bottom spacing class when degrees exist. |
413
+ | `rowMarginBottomEmptyClass` | string | `'mb-4'` | Bottom spacing class when list is empty. |
414
+ | `headerRowClass` | string | `'row col-10'` | Header labels row CSS class. |
415
+ | `actionsSpacerClass` | string | `'col-2'` | Spacer column class between labels and actions area. |
416
+ | `itemRowClass` | string | `'row'` | Backward-compatible row class input (not used in current template loop). |
417
+ | `itemColumnsWrapperClass` | string | `'row col-10 mt-3'` | Per-item columns wrapper CSS class. |
418
+ | `itemColumnClass` | string | `'col-3'` | Column CSS class. |
419
+ | `labelClass` | string | `'field-secondary-label-sm text-ellipsis-one-line'` | Header label CSS class. |
420
+ | `valueClass` | string | `'text-dark-gray fs-14 text-ellipsis-one-line'` | Value text CSS class. |
421
+ | `actionsColumnClass` | string | `'col-2 align-items-end mt-3'` | Attachment action column CSS class. |
422
+ | `viewIconClass` | string | `'fs-15 text-dark cursor-pointer'` | View icon CSS class. |
423
+ | `downloadIconClass` | string | `'fs-15 mx-3 text-dark cursor-pointer'` | Download icon CSS class. |
424
+ | `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class. |
425
+ | `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class. |
426
+
427
+ ### Output Events
428
+ - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
429
+ - `attachmentViewed: EventEmitter<any>` - Emitted when attachment view icon is clicked.
430
+ - `attachmentDownloaded: EventEmitter<any>` - Emitted when attachment download icon is clicked.
431
+ - `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
432
+
348
433
  ## Profile Personal Info Contact Widget
349
434
 
350
435
  ### Usage
@@ -11,7 +11,7 @@ import { SkyShortcutIconComponent, SkySectionDividerComponent, SkyEmptyDesignCar
11
11
  import * as i1 from '@angular/common/http';
12
12
  import { HttpParams } from '@angular/common/http';
13
13
  import { map, shareReplay, catchError, throwError, lastValueFrom } from 'rxjs';
14
- import { faCakeCandles, faTreePalm, faCalendarStar, faMoneyCheckDollarPen, faMemoCircleInfo, faPhone, faBolt, faLanguage, faEarthAfrica, faHouse, faFileSignature, faSackDollar, faEnvelopeOpenDollar, faXmark, faFolderArrowDown, faUsersRays, faFileCertificate } from '@fortawesome/pro-light-svg-icons';
14
+ import { faCakeCandles, faTreePalm, faCalendarStar, faMoneyCheckDollarPen, faMemoCircleInfo, faPhone, faBolt, faLanguage, faEarthAfrica, faHouse, faFileSignature, faSackDollar, faEnvelopeOpenDollar, faXmark, faFolderArrowDown, faUsersRays, faFileCertificate, faUsersLine } from '@fortawesome/pro-light-svg-icons';
15
15
  import * as i2 from 'devextreme-angular/core';
16
16
  import { faCircle, faCalendarDays, faEye } from '@fortawesome/pro-regular-svg-icons';
17
17
  import moment from 'moment';
@@ -670,6 +670,8 @@ var Employer = "Employeur";
670
670
  var TerminationReason = "Motif de fin de service";
671
671
  var ThereIsNoDegreesYet = "Il n'y a pas encore de diplomes";
672
672
  var ThereIsNoExperiencesYet = "Il n'y a pas encore d'experiences";
673
+ var ThereIsNoDependentsYet = "Il n'y a pas encore de personnes à charge";
674
+ var DependentTypeName = "Type de personne à charge";
673
675
  var fr = {
674
676
  ReportingTo: ReportingTo,
675
677
  NotAnknown: NotAnknown,
@@ -791,7 +793,9 @@ var fr = {
791
793
  Employer: Employer,
792
794
  TerminationReason: TerminationReason,
793
795
  ThereIsNoDegreesYet: ThereIsNoDegreesYet,
794
- ThereIsNoExperiencesYet: ThereIsNoExperiencesYet
796
+ ThereIsNoExperiencesYet: ThereIsNoExperiencesYet,
797
+ ThereIsNoDependentsYet: ThereIsNoDependentsYet,
798
+ DependentTypeName: DependentTypeName
795
799
  };
796
800
 
797
801
  const BUILT_IN_LEXICONS = { en, ar, fr };
@@ -1112,6 +1116,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
1112
1116
  }]
1113
1117
  }] });
1114
1118
 
1119
+ class ProfileEmployeeDependentsCach {
1120
+ baseUrl = '';
1121
+ dependents$ = null;
1122
+ clear() {
1123
+ this.baseUrl = '';
1124
+ }
1125
+ ensureBaseUrl(baseUrl) {
1126
+ if (this.baseUrl && this.baseUrl !== baseUrl) {
1127
+ this.clear();
1128
+ }
1129
+ this.baseUrl = baseUrl;
1130
+ }
1131
+ setDependents(baseUrl, value) {
1132
+ this.ensureBaseUrl(baseUrl);
1133
+ this.dependents$ = value;
1134
+ }
1135
+ getDependents(baseUrl) {
1136
+ return this.baseUrl === baseUrl ? this.dependents$ : null;
1137
+ }
1138
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileEmployeeDependentsCach, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1139
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileEmployeeDependentsCach, providedIn: 'root' });
1140
+ }
1141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileEmployeeDependentsCach, decorators: [{
1142
+ type: Injectable,
1143
+ args: [{
1144
+ providedIn: 'root'
1145
+ }]
1146
+ }] });
1147
+
1115
1148
  class HRSelfWidgetsService {
1116
1149
  http;
1117
1150
  bankInformationCacheService;
@@ -1119,14 +1152,16 @@ class HRSelfWidgetsService {
1119
1152
  jobInformationCacheService;
1120
1153
  personalInformationCacheService;
1121
1154
  qualificationsCacheService;
1155
+ profileEmployeeDependentsCachService;
1122
1156
  headers = { 'api-version': '1' };
1123
- constructor(http, bankInformationCacheService, entitlementsCacheService, jobInformationCacheService, personalInformationCacheService, qualificationsCacheService) {
1157
+ constructor(http, bankInformationCacheService, entitlementsCacheService, jobInformationCacheService, personalInformationCacheService, qualificationsCacheService, profileEmployeeDependentsCachService) {
1124
1158
  this.http = http;
1125
1159
  this.bankInformationCacheService = bankInformationCacheService;
1126
1160
  this.entitlementsCacheService = entitlementsCacheService;
1127
1161
  this.jobInformationCacheService = jobInformationCacheService;
1128
1162
  this.personalInformationCacheService = personalInformationCacheService;
1129
1163
  this.qualificationsCacheService = qualificationsCacheService;
1164
+ this.profileEmployeeDependentsCachService = profileEmployeeDependentsCachService;
1130
1165
  }
1131
1166
  getMainDetails(baseUrl) {
1132
1167
  return this.http.get(`${baseUrl}/hr/widgets/me/main-details`, {
@@ -1431,6 +1466,22 @@ class HRSelfWidgetsService {
1431
1466
  this.qualificationsCacheService.setDegrees(baseUrl, request$);
1432
1467
  return request$;
1433
1468
  }
1469
+ getEmployeeDependents(baseUrl, forceRefresh = false) {
1470
+ if (!forceRefresh) {
1471
+ const cachedRequest$ = this.profileEmployeeDependentsCachService.getDependents(baseUrl);
1472
+ if (cachedRequest$) {
1473
+ return cachedRequest$;
1474
+ }
1475
+ }
1476
+ const request$ = this.http
1477
+ .get(`${baseUrl}/hr/widgets/me/profile/dependents`, { headers: this.headers })
1478
+ .pipe(map((response) => response?.ResponseData ?? []), shareReplay(1), catchError((error) => {
1479
+ this.profileEmployeeDependentsCachService.clear();
1480
+ return throwError(() => error);
1481
+ }));
1482
+ this.profileEmployeeDependentsCachService.setDependents(baseUrl, request$);
1483
+ return request$;
1484
+ }
1434
1485
  getEmployeeExperiences(baseUrl, forceRefresh = false) {
1435
1486
  if (!forceRefresh) {
1436
1487
  const cached = this.qualificationsCacheService.getExperiences(baseUrl);
@@ -1446,7 +1497,7 @@ class HRSelfWidgetsService {
1446
1497
  this.qualificationsCacheService.setExperiences(baseUrl, request$);
1447
1498
  return request$;
1448
1499
  }
1449
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, deps: [{ token: i1.HttpClient }, { token: BankInformationCacheService }, { token: EntitlementsCacheService }, { token: JobInformationCacheService }, { token: PersonalInformationCacheService }, { token: QualificationsCacheService }], target: i0.ɵɵFactoryTarget.Injectable });
1500
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, deps: [{ token: i1.HttpClient }, { token: BankInformationCacheService }, { token: EntitlementsCacheService }, { token: JobInformationCacheService }, { token: PersonalInformationCacheService }, { token: QualificationsCacheService }, { token: ProfileEmployeeDependentsCach }], target: i0.ɵɵFactoryTarget.Injectable });
1450
1501
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, providedIn: 'root' });
1451
1502
  }
1452
1503
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, decorators: [{
@@ -1454,7 +1505,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
1454
1505
  args: [{
1455
1506
  providedIn: 'root'
1456
1507
  }]
1457
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: BankInformationCacheService }, { type: EntitlementsCacheService }, { type: JobInformationCacheService }, { type: PersonalInformationCacheService }, { type: QualificationsCacheService }] });
1508
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: BankInformationCacheService }, { type: EntitlementsCacheService }, { type: JobInformationCacheService }, { type: PersonalInformationCacheService }, { type: QualificationsCacheService }, { type: ProfileEmployeeDependentsCach }] });
1458
1509
 
1459
1510
  class HRConstantsService {
1460
1511
  defaultVacationBalanceColor = '#727070';
@@ -2545,11 +2596,11 @@ class HRInfoFieldComponent {
2545
2596
  valueClass = 'fs-14 fw-medium';
2546
2597
  fallbackValue = '—';
2547
2598
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRInfoFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2548
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: HRInfoFieldComponent, isStandalone: true, selector: "hr-info-field", inputs: { labelKey: "labelKey", value: "value", labelClass: "labelClass", valueClass: "valueClass", fallbackValue: "fallbackValue" }, ngImport: i0, template: "<div [ngClass]=\"labelClass\">{{labelKey | HRTranslate}}</div>\r\n<div [ngClass]=\"valueClass\">{{value || fallbackValue}}</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }] });
2599
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: HRInfoFieldComponent, isStandalone: true, selector: "hr-info-field", inputs: { labelKey: "labelKey", value: "value", labelClass: "labelClass", valueClass: "valueClass", fallbackValue: "fallbackValue" }, ngImport: i0, template: "<div [ngClass]=\"labelClass\">{{labelKey | HRTranslate}}</div>\r\n<div [ngClass]=\"valueClass\" [title]=\"value|| fallbackValue\">{{value || fallbackValue}}</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }] });
2549
2600
  }
2550
2601
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRInfoFieldComponent, decorators: [{
2551
2602
  type: Component,
2552
- args: [{ selector: 'hr-info-field', standalone: true, imports: [CommonModule, HRTranslatePipe], template: "<div [ngClass]=\"labelClass\">{{labelKey | HRTranslate}}</div>\r\n<div [ngClass]=\"valueClass\">{{value || fallbackValue}}</div>\r\n" }]
2603
+ args: [{ selector: 'hr-info-field', standalone: true, imports: [CommonModule, HRTranslatePipe], template: "<div [ngClass]=\"labelClass\">{{labelKey | HRTranslate}}</div>\r\n<div [ngClass]=\"valueClass\" [title]=\"value|| fallbackValue\">{{value || fallbackValue}}</div>\r\n" }]
2553
2604
  }], propDecorators: { labelKey: [{
2554
2605
  type: Input,
2555
2606
  args: [{ required: true }]
@@ -3983,6 +4034,88 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3983
4034
  type: Output
3984
4035
  }] } });
3985
4036
 
4037
+ class WidgetCardComponent {
4038
+ cardClass = 'bg-white shadow-sm p-3 border-1 border';
4039
+ height = 110;
4040
+ contentTemplate;
4041
+ context;
4042
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: WidgetCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4043
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: WidgetCardComponent, isStandalone: true, selector: "hr-widget-card", inputs: { cardClass: "cardClass", height: "height", contentTemplate: "contentTemplate", context: "context" }, ngImport: i0, template: "<div [class]=\"cardClass\" [style.height.px]=\"height\" style=\"overflow: hidden;\">\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: context\">\n </ng-container>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
4044
+ }
4045
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: WidgetCardComponent, decorators: [{
4046
+ type: Component,
4047
+ args: [{ selector: 'hr-widget-card', standalone: true, imports: [CommonModule], template: "<div [class]=\"cardClass\" [style.height.px]=\"height\" style=\"overflow: hidden;\">\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: context\">\n </ng-container>\n</div>\n" }]
4048
+ }], propDecorators: { cardClass: [{
4049
+ type: Input
4050
+ }], height: [{
4051
+ type: Input
4052
+ }], contentTemplate: [{
4053
+ type: Input
4054
+ }], context: [{
4055
+ type: Input
4056
+ }] } });
4057
+
4058
+ class DependentsWidgetComponent {
4059
+ service;
4060
+ baseUrl = '';
4061
+ sectionTitle = 'Dependents';
4062
+ icon = faUsersLine;
4063
+ headerIconClass = 'primary-icon-xl';
4064
+ headerTextClass = 'fs-16 mt-2 text-secondary';
4065
+ headerDividerClass = 'flex-grow-1 ms-2';
4066
+ emptyStateContainerClass = 'd-flex flex-column justify-content-center align-items-center my-5';
4067
+ emptyStateTextClass = 'field-secondary-label-md';
4068
+ dependents = [];
4069
+ isLoading = true;
4070
+ isLoadingChanged = new EventEmitter();
4071
+ constructor(service) {
4072
+ this.service = service;
4073
+ }
4074
+ ngOnInit() {
4075
+ if (!this.baseUrl) {
4076
+ this.isLoading = false;
4077
+ return;
4078
+ }
4079
+ this.isLoadingChanged.emit(true);
4080
+ this.service.getEmployeeDependents(this.baseUrl).subscribe({
4081
+ next: (res) => {
4082
+ this.dependents = res ?? [];
4083
+ this.isLoading = false;
4084
+ this.isLoadingChanged.emit(false);
4085
+ },
4086
+ error: () => {
4087
+ this.dependents = [];
4088
+ this.isLoading = false;
4089
+ this.isLoadingChanged.emit(false);
4090
+ }
4091
+ });
4092
+ }
4093
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DependentsWidgetComponent, deps: [{ token: HRSelfWidgetsService }], target: i0.ɵɵFactoryTarget.Component });
4094
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: DependentsWidgetComponent, isStandalone: true, selector: "hr-profile-dependents-widget", inputs: { baseUrl: "baseUrl", sectionTitle: "sectionTitle", icon: "icon", headerIconClass: "headerIconClass", headerTextClass: "headerTextClass", headerDividerClass: "headerDividerClass", emptyStateContainerClass: "emptyStateContainerClass", emptyStateTextClass: "emptyStateTextClass" }, outputs: { isLoadingChanged: "isLoadingChanged" }, ngImport: i0, template: "<sky-section-divider [fontAwesomeIcon]=\"icon\"\r\n [text]=\"(sectionTitle | HRTranslate | uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n\r\n<div class=\"mt-4\">\r\n <div class=\"row mb-5\">\r\n @if(dependents.length){\r\n @for(d of dependents; track d){\r\n <div class=\"col-lg-4 col-6 mt-4\">\r\n\r\n <hr-widget-card [contentTemplate]=\"dependentTemplate\"\r\n [context]=\"{ d: d }\"\r\n [height]=\"110\">\r\n </hr-widget-card>\r\n\r\n </div>\r\n }\r\n }\r\n @else {\r\n\r\n <sky-empty-design-card [containerClass]=\"emptyStateContainerClass\"\r\n [cardBodyClass]=\"''\"\r\n [cardBodyContainerClass]=\"''\"\r\n [visibleIcon]=\"false\"\r\n [visibleQuickAction]=\"false\"\r\n [emptyTextClass]=\"emptyStateTextClass\"\r\n [emptyText]=\"isLoading ? ((sectionTitle | HRTranslate) + ' ' + ('IsLoading' | HRTranslate)) : ('ThereIsNoDependentsYet' | HRTranslate)\">\r\n </sky-empty-design-card>\r\n\r\n\r\n }\r\n </div>\r\n</div>\r\n\r\n<ng-template #dependentTemplate let-d=\"d\">\r\n <p class=\"text-dark fs-16 mb-2 d-flex\">\r\n <span class=\"text-truncate cursor-pointer\" [title]=\"d.DependantName\">\r\n {{ d.DependentName }}\r\n </span>\r\n <span class=\"mx-1\">({{ d.DependentTypeName }})</span>\r\n </p>\r\n <p class=\"mb-2 fs-12\">\r\n <span class=\"text-muted\">{{'BirthDate'|HRTranslate}}: </span>\r\n <span class=\"text-secondary mx-1\">{{ d.BirthDate | date:'dd/MM/yyyy' }}</span>\r\n </p>\r\n <p class=\"mb-0 fs-12\">\r\n <span class=\"text-muted\">{{'NationalNumber'|HRTranslate }}: </span>\r\n @if(d.NationalNumber){\r\n <span class=\"text-secondary mx-1\">{{ d.NationalNumber }}</span>\r\n } @else {\r\n <span class=\"text-secondary mx-1\">\u2014</span>\r\n }\r\n </p>\r\n</ng-template>\r\n\r\n\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }, { kind: "component", type: WidgetCardComponent, selector: "hr-widget-card", inputs: ["cardClass", "height", "contentTemplate", "context"] }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }, { kind: "component", type: SkyEmptyDesignCardComponent, selector: "sky-empty-design-card", inputs: ["emptyIcon", "emptyIconClass", "emptyText", "emptyTextClass", "actionTitle", "actionIcon", "actionDisabled", "textColor", "disabledTitleClass", "activeTitleClass", "disabledIconClass", "activeIconClass", "actionClass", "containerClass", "cardBodyClass", "cardBodyContainerClass", "visibleIcon", "visibleQuickAction"], outputs: ["onActionClick"] }, { kind: "component", type: SkySectionDividerComponent, selector: "sky-section-divider", inputs: ["text", "fontAwesomeIcon", "textClass", "dividerClass", "iconClass"] }] });
4095
+ }
4096
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DependentsWidgetComponent, decorators: [{
4097
+ type: Component,
4098
+ args: [{ selector: 'hr-profile-dependents-widget', standalone: true, imports: [CommonModule, WidgetCardComponent, HRTranslatePipe, SkyEmptyDesignCardComponent, SkySectionDividerComponent], template: "<sky-section-divider [fontAwesomeIcon]=\"icon\"\r\n [text]=\"(sectionTitle | HRTranslate | uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n\r\n<div class=\"mt-4\">\r\n <div class=\"row mb-5\">\r\n @if(dependents.length){\r\n @for(d of dependents; track d){\r\n <div class=\"col-lg-4 col-6 mt-4\">\r\n\r\n <hr-widget-card [contentTemplate]=\"dependentTemplate\"\r\n [context]=\"{ d: d }\"\r\n [height]=\"110\">\r\n </hr-widget-card>\r\n\r\n </div>\r\n }\r\n }\r\n @else {\r\n\r\n <sky-empty-design-card [containerClass]=\"emptyStateContainerClass\"\r\n [cardBodyClass]=\"''\"\r\n [cardBodyContainerClass]=\"''\"\r\n [visibleIcon]=\"false\"\r\n [visibleQuickAction]=\"false\"\r\n [emptyTextClass]=\"emptyStateTextClass\"\r\n [emptyText]=\"isLoading ? ((sectionTitle | HRTranslate) + ' ' + ('IsLoading' | HRTranslate)) : ('ThereIsNoDependentsYet' | HRTranslate)\">\r\n </sky-empty-design-card>\r\n\r\n\r\n }\r\n </div>\r\n</div>\r\n\r\n<ng-template #dependentTemplate let-d=\"d\">\r\n <p class=\"text-dark fs-16 mb-2 d-flex\">\r\n <span class=\"text-truncate cursor-pointer\" [title]=\"d.DependantName\">\r\n {{ d.DependentName }}\r\n </span>\r\n <span class=\"mx-1\">({{ d.DependentTypeName }})</span>\r\n </p>\r\n <p class=\"mb-2 fs-12\">\r\n <span class=\"text-muted\">{{'BirthDate'|HRTranslate}}: </span>\r\n <span class=\"text-secondary mx-1\">{{ d.BirthDate | date:'dd/MM/yyyy' }}</span>\r\n </p>\r\n <p class=\"mb-0 fs-12\">\r\n <span class=\"text-muted\">{{'NationalNumber'|HRTranslate }}: </span>\r\n @if(d.NationalNumber){\r\n <span class=\"text-secondary mx-1\">{{ d.NationalNumber }}</span>\r\n } @else {\r\n <span class=\"text-secondary mx-1\">\u2014</span>\r\n }\r\n </p>\r\n</ng-template>\r\n\r\n\r\n" }]
4099
+ }], ctorParameters: () => [{ type: HRSelfWidgetsService }], propDecorators: { baseUrl: [{
4100
+ type: Input
4101
+ }], sectionTitle: [{
4102
+ type: Input
4103
+ }], icon: [{
4104
+ type: Input
4105
+ }], headerIconClass: [{
4106
+ type: Input
4107
+ }], headerTextClass: [{
4108
+ type: Input
4109
+ }], headerDividerClass: [{
4110
+ type: Input
4111
+ }], emptyStateContainerClass: [{
4112
+ type: Input
4113
+ }], emptyStateTextClass: [{
4114
+ type: Input
4115
+ }], isLoadingChanged: [{
4116
+ type: Output
4117
+ }] } });
4118
+
3986
4119
  /*
3987
4120
  * Public API Surface of shared-ui
3988
4121
  */
@@ -3991,5 +4124,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3991
4124
  * Generated bundle index. Do not edit.
3992
4125
  */
3993
4126
 
3994
- export { EventOption, EventTypeEnum, HRCardHeaderComponent, HRConstantsService, HREmployeeCalendarComponent, HRHighlightPipe, HRTranslatePipe, HRTranslateService, MainWidgetShortcut, MyCalendarWidgetComponent, MyMainDetailsWidgetComponent, MyNextWeekVacationInsightsWidgetComponent, MyUpcomingEventsWidgetComponent, ProfileBankInfoWidgetComponent, ProfileDegreesWidgetComponent, ProfileExperiencesWidgetComponent, ProfileJobInfoContractWidgetComponent, ProfileJobInfoMainWidgetComponent, ProfileJobInfoSalaryWidgetComponent, ProfileJobInfoServiceChargeWidgetComponent, ProfilePersonalInfoAddressWidgetComponent, ProfilePersonalInfoContactWidgetComponent, ProfilePersonalInfoLanguagesWidgetComponent, ProfilePersonalInfoMainWidgetComponent, ProfilePersonalInfoOtherNationalitiesWidgetComponent, PublicHolidayWeekContext, RelativeDay, ScheduleVacationTypes, ServiceChargeEntitlementMode, VacationPopupType };
4127
+ export { DependentsWidgetComponent, EventOption, EventTypeEnum, HRCardHeaderComponent, HRConstantsService, HREmployeeCalendarComponent, HRHighlightPipe, HRTranslatePipe, HRTranslateService, MainWidgetShortcut, MyCalendarWidgetComponent, MyMainDetailsWidgetComponent, MyNextWeekVacationInsightsWidgetComponent, MyUpcomingEventsWidgetComponent, ProfileBankInfoWidgetComponent, ProfileDegreesWidgetComponent, ProfileExperiencesWidgetComponent, ProfileJobInfoContractWidgetComponent, ProfileJobInfoMainWidgetComponent, ProfileJobInfoSalaryWidgetComponent, ProfileJobInfoServiceChargeWidgetComponent, ProfilePersonalInfoAddressWidgetComponent, ProfilePersonalInfoContactWidgetComponent, ProfilePersonalInfoLanguagesWidgetComponent, ProfilePersonalInfoMainWidgetComponent, ProfilePersonalInfoOtherNationalitiesWidgetComponent, PublicHolidayWeekContext, RelativeDay, ScheduleVacationTypes, ServiceChargeEntitlementMode, VacationPopupType };
3995
4128
  //# sourceMappingURL=skysoftware-co-bayan-hr-widgets-ui.mjs.map