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

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 (18) hide show
  1. package/README.md +238 -14
  2. package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs +786 -17
  3. package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs.map +1 -1
  4. package/lib/entitlements/profile-entitlements-indemnity-widget/profile-entitlements-indemnity-widget.component.d.ts +32 -0
  5. package/lib/entitlements/profile-entitlements-medical-insurance-widget/components/medical-insurance-card/medical-insurance-card.component.d.ts +19 -0
  6. package/lib/entitlements/profile-entitlements-medical-insurance-widget/profile-entitlements-medical-insurance-widget.component.d.ts +36 -0
  7. package/lib/entitlements/profile-entitlements-others-widget/profile-entitlements-others-widget.component.d.ts +26 -0
  8. package/lib/entitlements/profile-entitlements-ticket-widget/components/ticket-card/ticket-card.component.d.ts +17 -0
  9. package/lib/entitlements/profile-entitlements-ticket-widget/profile-entitlements-ticket-widget.component.d.ts +34 -0
  10. package/lib/entitlements/profile-entitlements-vacations-widget/profile-entitlements-vacations-widget.component.d.ts +29 -0
  11. package/lib/profile-personal-info-contact-widget/profile-personal-info-contact-widget.component.d.ts +3 -1
  12. package/lib/services/hr-self-widgets.service.d.ts +2 -0
  13. package/lib/shared/services/entitlements-cache.service.d.ts +6 -0
  14. package/lib/shared/types/common.d.ts +12 -12
  15. package/package.json +1 -1
  16. package/public-api.d.ts +6 -0
  17. package/lib/my-vacation-team-widget/components/vacation-subordinates-popup/vacation-subordinates-popup.component.d.ts +0 -38
  18. package/lib/my-vacation-team-widget/my-vacation-team-widget.component.d.ts +0 -33
package/README.md CHANGED
@@ -25,13 +25,32 @@ Run `ng test shared-ui` to execute the unit tests via [Karma](https://karma-runn
25
25
  To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
26
26
 
27
27
  ## Sky Bayan HR Components
28
-
28
+
29
29
  This package contains shared HR components used in Bayan HR system, you can find in first installation the below
30
30
  components:
31
31
  1. My Main Details Widget
32
32
  2. My Upcoming Events Widget
33
33
  3. My Calendar Widget
34
-
34
+ 4. My Next Week Vacation Insights Widget
35
+ 5. Profile Personal Info Main Widget
36
+ 6. Profile Personal Info Contact Widget
37
+ 7. Profile Personal Info Address Widget
38
+ 8. Profile Personal Info Languages Widget
39
+ 9. Profile Personal Info Other Nationalities Widget
40
+ 10. Profile Experiences Widget
41
+ 11. Profile Degrees Widget
42
+ 12. Profile Bank Information Widget
43
+ 13. Profile Job Info Main Widget
44
+ 14. Profile Job Info Contract Widget
45
+ 15. Profile Job Info Salary Widget
46
+ 16. Profile Job Info Service Charge Widget
47
+ 17. Profile Employee Dependents Widget
48
+ 18. Profile Entitlements Vacations Widget
49
+ 19. Profile Entitlements Indemnity Widget
50
+ 20. Profile Entitlements Ticket Widget
51
+ 21. Profile Entitlements Medical Insurance Widget
52
+ 22. Profile Entitlements Others Widget
53
+
35
54
  ## Dependencies
36
55
  This library depends on `@skysoftware-co/bayan-components-ui` package which provides:
37
56
  - Employee Badge Component
@@ -272,15 +291,15 @@ The component calls `GET {baseUrl}/hr/employee-portal/calendar` with query param
272
291
  - Header: `api-version: 2`
273
292
 
274
293
 
275
- ## My Vacation Team Widget Component
294
+ ## My Next Week Vacation Insights Widget Component
276
295
 
277
296
  ### Usage
278
297
  ```html
279
- <hr-my-vacation-team-widget
298
+ <hr-my-next-week-vacation-insights-widget
280
299
  [baseUrl]="environment.baseUrl"
281
300
  [showProperty]="true"
282
301
  (isLoadingChanged)="onLoadingChanged($event)">
283
- </hr-my-vacation-team-widget>
302
+ </hr-my-next-week-vacation-insights-widget>
284
303
  ```
285
304
 
286
305
  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.
@@ -290,20 +309,22 @@ This component displays a "Next Week Vacation Insights" card showing two badges:
290
309
  |-------|------|---------------|-------------|
291
310
  | `baseUrl` | string | `''` | Base URL for API calls |
292
311
  | `showProperty` | boolean | `false` | Show employee property badge in the popup grid |
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 |
312
+ | `cardClass` | string | `'card rounded rounded-4 card-shadow border-top-0 h-100 p-4'` | Card container CSS class |
313
+ | `titleClass` | string | `'table-header-lg fw-meduim mb-3 mt-2'` | Card title CSS class |
295
314
  | `valueClass` | string | `'fs-24 mt-1 link-dark hover-primary text-decoration-none'` | Badge value CSS class (clickable) |
296
315
  | `disabledValueClass` | string | `'fs-24 mt-1 text-muted pe-none text-decoration-none'` | Badge value CSS class when count is 0 |
297
- | `upcomingContainerClass` | string | `'border-start border-5 mb-3'` | Upcoming vacations badge container CSS class |
316
+ | `upcomingContainerClass` | string | `'border-start border-5 mb-4'` | Upcoming vacations badge container CSS class |
298
317
  | `expectedContainerClass` | string | `'border-start border-5'` | Expected to return badge container CSS class |
318
+ | `firstRowClass` | string | `'mb-4'` | CSS class for the first badge row wrapper |
319
+ | `secondRowClass` | string | `'mt-3'` | CSS class for the second badge row wrapper |
299
320
 
300
321
  ### Output Events
301
322
  - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes
302
323
 
303
324
  ### API Endpoints
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`
325
+ - **Summary**: `GET {baseUrl}/hr/widgets/me/team/next-week-vacation-insights/summary?ShowDirectSubordinatesOnly=false`
326
+ - **Upcoming list**: `GET {baseUrl}/hr/widgets/me/team/next-week-vacation-insights/upcoming-vacations`
327
+ - **Expected to return list**: `GET {baseUrl}/hr/widgets/me/team/next-week-vacation-insights/expected-to-return`
307
328
 
308
329
  ## Profile Widgets
309
330
 
@@ -449,13 +470,15 @@ The package also exports profile-focused widgets used in the employee profile pa
449
470
  | `headerTextClass` | string | `'fs-16 mt-2 text-secondary'` | Header text CSS class |
450
471
  | `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
451
472
  | `rowClass` | string | `'row mt-4'` | Row container CSS class |
452
- | `columnClass` | string | `'col-md-4 col-6'` | Column CSS class |
453
- | `responsiveTopSpacingColumnClass` | string | `'col-md-4 col-6 mt-md-0 mt-4'` | Responsive top spacing column CSS class |
473
+ | `columnClass` | string | `'col-6'` | Column CSS class |
474
+ | `responsiveTopSpacingColumnClass` | string | `'col-6 mt-4'` | Responsive top spacing column CSS class |
454
475
  | `topSpacingBottomMdSpacingColumnClass` | string | `'col-md-4 col-6 mt-4 mb-md-5'` | Top spacing + medium bottom spacing CSS class |
455
476
  | `topSpacingBottomSpacingColumnClass` | string | `'col-md-4 col-6 mt-4 mb-5'` | Top spacing + bottom spacing CSS class |
456
477
  | `labelClass` | string | `'field-secondary-label-sm'` | Label CSS class |
457
478
  | `valueClass` | string | `'fs-14 fw-medium'` | Value CSS class |
458
- | `emergencyContactLabelClass` | string | `'fs-14 fw-semi-bold'` | Emergency contact title CSS class |
479
+ | `emergencyContactLabelClass` | string | `'fs-14 fw-semibold'` | Emergency contact title CSS class |
480
+ | `emergencyContactColumnClass` | string | `'col-md-4 col-6'` | Emergency contact column CSS class |
481
+ | `emergencyContactResponsiveColumnClass` | string | `'col-md-4 col-6 mt-md-0 mt-4'` | Emergency contact responsive column CSS class |
459
482
  | `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
460
483
  | `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
461
484
  | `contactIcon` | IconDefinition | `faPhone` | Header icon |
@@ -735,3 +758,204 @@ The package also exports profile-focused widgets used in the employee profile pa
735
758
  - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
736
759
  - `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
737
760
 
761
+ ## Profile Employee Dependents Widget
762
+
763
+ ### Usage
764
+ ```html
765
+ <hr-profile-dependents-widget
766
+ [baseUrl]="baseUrl"
767
+ (isLoadingChanged)="onDependentsLoadingChanged($event)">
768
+ </hr-profile-dependents-widget>
769
+ ```
770
+
771
+ This component displays employee dependents as cards (3 per row on large screens). Each card shows the dependent's name, type, birth date, and national number. It uses the shared `hr-widget-card` component for card rendering.
772
+
773
+ ### Input Properties
774
+ | Input | Type | Default Value | Description |
775
+ |-------|------|---------------|-------------|
776
+ | `baseUrl` | string | `''` | Base URL for API calls |
777
+ | `sectionTitle` | string | `'Dependents'` | Section title translation key |
778
+ | `icon` | IconDefinition | `faUsersLine` | Header icon |
779
+ | `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
780
+ | `headerTextClass` | string | `'fs-16 mt-2 text-secondary'` | Header text CSS class |
781
+ | `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
782
+ | `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
783
+ | `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
784
+
785
+ ### Output Events
786
+ - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
787
+
788
+ ## Profile Entitlement Widgets
789
+
790
+ The package includes entitlement widgets for displaying employee benefits and entitlements in the profile page.
791
+
792
+ ## Profile Entitlements Vacations Widget
793
+
794
+ ### Usage
795
+ ```html
796
+ <hr-profile-entitlements-vacations-widget
797
+ [baseUrl]="baseUrl"
798
+ (isLoadingChanged)="onVacationsLoadingChanged($event)">
799
+ </hr-profile-entitlements-vacations-widget>
800
+ ```
801
+
802
+ This component displays a list of vacation entitlements (vacation type name and entitlement days) in a two-column grid layout.
803
+
804
+ ### Input Properties
805
+ | Input | Type | Default Value | Description |
806
+ |-------|------|---------------|-------------|
807
+ | `baseUrl` | string | `''` | Base URL for API calls (required) |
808
+ | `sectionTitle` | string | `'Vacations'` | Section title translation key |
809
+ | `vacationsIcon` | IconDefinition | `faIslandTropical` | Header icon |
810
+ | `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
811
+ | `headerTextClass` | string | `'mt-2 field-secondary-label-lg'` | Header text CSS class |
812
+ | `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
813
+ | `rowClass` | string | `'row mt-4'` | Row container CSS class |
814
+ | `labelClass` | string | `'field-secondary-label-sm'` | Label CSS class |
815
+ | `valueClass` | string | `'fs-14 fw-meduim mt-2'` | Value CSS class |
816
+ | `labelColumnClass` | string | `'col-6'` | Label column CSS class |
817
+ | `valueColumnClass` | string | `'col-6'` | Value column CSS class |
818
+ | `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
819
+ | `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
820
+
821
+ ### Output Events
822
+ - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
823
+ - `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
824
+
825
+ ## Profile Entitlements Indemnity Widget
826
+
827
+ ### Usage
828
+ ```html
829
+ <hr-profile-entitlements-indemnity-widget
830
+ [baseUrl]="baseUrl"
831
+ [currencyCode]="currencyCode"
832
+ (isLoadingChanged)="onIndemnityLoadingChanged($event)">
833
+ </hr-profile-entitlements-indemnity-widget>
834
+ ```
835
+
836
+ This component shows indemnity entitlement details including eligibility status, service years, and start date. Uses `hr-info-field` sub-components for layout.
837
+
838
+ ### Input Properties
839
+ | Input | Type | Default Value | Description |
840
+ |-------|------|---------------|-------------|
841
+ | `baseUrl` | string | `''` | Base URL for API calls (required) |
842
+ | `currencyCode` | string | `''` | Currency code for amount display |
843
+ | `currencyDecimals` | number | `0` | Decimal precision for amount formatting |
844
+ | `sectionTitle` | string | `'indemnity'` | Section title translation key |
845
+ | `indemnityIcon` | IconDefinition | `faFileSignature` | Header icon |
846
+ | `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
847
+ | `headerTextClass` | string | `'mt-2 field-secondary-label-lg'` | Header text CSS class |
848
+ | `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
849
+ | `rowClass` | string | `'row mt-4'` | Row container CSS class |
850
+ | `columnClass` | string | `'col-6'` | Field column CSS class |
851
+ | `topSpacingColumnClass` | string | `'col-6 mt-4'` | Field column with top spacing CSS class |
852
+ | `labelClass` | string | `'field-secondary-label-sm'` | Label CSS class |
853
+ | `valueClass` | string | `'fs-14 fw-meduim'` | Value CSS class |
854
+ | `dateFormat` | string | `'dd/MM/yyyy'` | Date format for start date |
855
+ | `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
856
+ | `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
857
+
858
+ ### Output Events
859
+ - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
860
+ - `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
861
+
862
+ ## Profile Entitlements Ticket Widget
863
+
864
+ ### Usage
865
+ ```html
866
+ <hr-profile-entitlements-ticket-widget
867
+ [baseUrl]="baseUrl"
868
+ (isLoadingChanged)="onTicketLoadingChanged($event)">
869
+ </hr-profile-entitlements-ticket-widget>
870
+ ```
871
+
872
+ This component displays ticket entitlements as cards — one for the employee and one per dependent. Each card shows name, ticket class, sector, and entitlement frequency. Uses `hr-ticket-card` sub-component with `hr-widget-card` for card rendering.
873
+
874
+ ### Input Properties
875
+ | Input | Type | Default Value | Description |
876
+ |-------|------|---------------|-------------|
877
+ | `baseUrl` | string | `''` | Base URL for API calls (required) |
878
+ | `sectionTitle` | string | `'tickets'` | Section title translation key |
879
+ | `ticketsIcon` | IconDefinition | `faTicketsAirline` | Header icon |
880
+ | `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
881
+ | `headerTextClass` | string | `'mt-2 field-secondary-label-lg'` | Header text CSS class |
882
+ | `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
883
+ | `columnClass` | string | `'col-lg-4 col-6 mt-4'` | Card column CSS class |
884
+ | `cardHeight` | number | `135` | Card height in pixels |
885
+ | `cardClass` | string | `'p-3 card-shadow border border-1 h-100 rounded rounded-2'` | Card CSS class |
886
+ | `nameClass` | string | `'text-dark fs-16'` | Name text CSS class |
887
+ | `subtitleClass` | string | `'field-secondary-label-sm mb-3'` | Subtitle CSS class |
888
+ | `labelClass` | string | `'fs-12 text-secondary'` | Label CSS class |
889
+ | `valueClass` | string | `'fs-12 text-dark-gray mx-1'` | Value CSS class |
890
+ | `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
891
+ | `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
892
+
893
+ ### Output Events
894
+ - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
895
+ - `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
896
+
897
+ ## Profile Entitlements Medical Insurance Widget
898
+
899
+ ### Usage
900
+ ```html
901
+ <hr-profile-entitlements-medical-insurance-widget
902
+ [baseUrl]="baseUrl"
903
+ (isLoadingChanged)="onMedicalInsuranceLoadingChanged($event)">
904
+ </hr-profile-entitlements-medical-insurance-widget>
905
+ ```
906
+
907
+ This component displays medical insurance information as cards — the employee card shows class, number, coverage date, total employee/employer share; dependent cards show class, number, and coverage date. Uses `hr-medical-insurance-card` sub-component with `hr-widget-card` for card rendering.
908
+
909
+ ### Input Properties
910
+ | Input | Type | Default Value | Description |
911
+ |-------|------|---------------|-------------|
912
+ | `baseUrl` | string | `''` | Base URL for API calls (required) |
913
+ | `sectionTitle` | string | `'MedicalInsurance'` | Section title translation key |
914
+ | `medicalInsuranceIcon` | IconDefinition | `faNotesMedical` | Header icon |
915
+ | `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
916
+ | `headerTextClass` | string | `'mt-2 field-secondary-label-lg'` | Header text CSS class |
917
+ | `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
918
+ | `labelClass` | string | `'field-secondary-label-sm'` | Label CSS class |
919
+ | `valueClass` | string | `'text-dark-gray mx-1'` | Value CSS class |
920
+ | `columnClass` | string | `'col-lg-4 col-6 mt-4'` | Card column CSS class |
921
+ | `cardHeight` | number | `185` | Card height in pixels |
922
+ | `cardClass` | string | `'p-3 card-shadow h-100 border border-1 rounded rounded-2'` | Card CSS class |
923
+ | `nameClass` | string | `'text-dark fs-16 mb-2'` | Name text CSS class |
924
+ | `dateFormat` | string | `'dd/MM/yyyy'` | Date format for coverage date |
925
+ | `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
926
+ | `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
927
+
928
+ ### Output Events
929
+ - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
930
+ - `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
931
+
932
+ ## Profile Entitlements Others Widget
933
+
934
+ ### Usage
935
+ ```html
936
+ <hr-profile-entitlements-others-widget
937
+ [baseUrl]="baseUrl"
938
+ (isLoadingChanged)="onOthersLoadingChanged($event)">
939
+ </hr-profile-entitlements-others-widget>
940
+ ```
941
+
942
+ This component displays two fields: overtime eligibility (Eligible/NotEligible) and social security membership (Member/NotMember). Fetches both values via `forkJoin`.
943
+
944
+ ### Input Properties
945
+ | Input | Type | Default Value | Description |
946
+ |-------|------|---------------|-------------|
947
+ | `baseUrl` | string | `''` | Base URL for API calls (required) |
948
+ | `sectionTitle` | string | `'Others'` | Section title translation key |
949
+ | `othersIcon` | IconDefinition | `faGrid2Plus` | Header icon |
950
+ | `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
951
+ | `headerTextClass` | string | `'mt-2 field-secondary-label-lg'` | Header text CSS class |
952
+ | `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
953
+ | `rowClass` | string | `'row mt-4 mb-5'` | Row container CSS class |
954
+ | `columnClass` | string | `'col-md-4 col-6'` | Field column CSS class |
955
+ | `labelClass` | string | `'field-secondary-label-sm'` | Label CSS class |
956
+ | `valueClass` | string | `'fs-14 fw-meduim'` | Value CSS class |
957
+
958
+ ### Output Events
959
+ - `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
960
+ - `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
961
+