@skysoftware-co/bayan-hr-widgets-ui 1.0.34 → 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.
@@ -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';
@@ -188,8 +188,6 @@ var Employer$2 = "Employer";
188
188
  var TerminationReason$2 = "Termination reason";
189
189
  var ThereIsNoDegreesYet$2 = "There are no degrees yet";
190
190
  var ThereIsNoExperiencesYet$2 = "There are no experiences yet";
191
- var ThereIsNoDependentsYet$2 = "There are no dependents yet";
192
- var DependentTypeName$2 = "Dependent Type";
193
191
  var en = {
194
192
  ReportingTo: ReportingTo$2,
195
193
  NotAnknown: NotAnknown$2,
@@ -303,7 +301,7 @@ var en = {
303
301
  Degrees: Degrees$2,
304
302
  degrees: degrees$2,
305
303
  experiences: experiences$2,
306
- "Degree/Year": "Degree/Year",
304
+ "Degree/Year": "Degree / Year",
307
305
  Country: Country$2,
308
306
  Specialty: Specialty$2,
309
307
  Institute: Institute$2,
@@ -311,9 +309,7 @@ var en = {
311
309
  Employer: Employer$2,
312
310
  TerminationReason: TerminationReason$2,
313
311
  ThereIsNoDegreesYet: ThereIsNoDegreesYet$2,
314
- ThereIsNoExperiencesYet: ThereIsNoExperiencesYet$2,
315
- ThereIsNoDependentsYet: ThereIsNoDependentsYet$2,
316
- DependentTypeName: DependentTypeName$2
312
+ ThereIsNoExperiencesYet: ThereIsNoExperiencesYet$2
317
313
  };
318
314
 
319
315
  var ReportingTo$1 = "مفوض الى";
@@ -414,7 +410,7 @@ var ThereIsNoJobMainYet$1 = "لا توجد معلومات وظيفية بعد";
414
410
  var ThereIsNoJobContractYet$1 = "لا توجد معلومات عقد بعد";
415
411
  var ThereIsNoJobSalaryYet$1 = "لا توجد معلومات راتب بعد";
416
412
  var ThereIsNoJobServiceChargeYet$1 = "لا توجد معلومات مستحقات نهاية الخدمة بعد";
417
- var NextWeekVacationInsights$1 = "رؤى إجازات الأسبوع القادم";
413
+ var NextWeekVacationInsights$1 = "ملخص إجازات الأسبوع القادم";
418
414
  var UpcomingVacations$1 = "الإجازات القادمة";
419
415
  var ExpectedToReturn$1 = "المتوقع عودتهم";
420
416
  var Employee$1 = "الموظف";
@@ -433,8 +429,6 @@ var Employer$1 = "جهة العمل";
433
429
  var TerminationReason$1 = "سبب إنهاء الخدمة";
434
430
  var ThereIsNoDegreesYet$1 = "لا توجد مؤهلات علمية بعد";
435
431
  var ThereIsNoExperiencesYet$1 = "لا توجد خبرات بعد";
436
- var ThereIsNoDependentsYet$1 = "لا يوجد معالين حتى الآن";
437
- var DependentTypeName$1 = "نوع المعال";
438
432
  var ar = {
439
433
  ReportingTo: ReportingTo$1,
440
434
  NotAnknown: NotAnknown$1,
@@ -555,9 +549,7 @@ var ar = {
555
549
  Employer: Employer$1,
556
550
  TerminationReason: TerminationReason$1,
557
551
  ThereIsNoDegreesYet: ThereIsNoDegreesYet$1,
558
- ThereIsNoExperiencesYet: ThereIsNoExperiencesYet$1,
559
- ThereIsNoDependentsYet: ThereIsNoDependentsYet$1,
560
- DependentTypeName: DependentTypeName$1
552
+ ThereIsNoExperiencesYet: ThereIsNoExperiencesYet$1
561
553
  };
562
554
 
563
555
  var ReportingTo = "Rapport à";
@@ -2604,11 +2596,11 @@ class HRInfoFieldComponent {
2604
2596
  valueClass = 'fs-14 fw-medium';
2605
2597
  fallbackValue = '—';
2606
2598
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRInfoFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2607
- 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" }] });
2608
2600
  }
2609
2601
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRInfoFieldComponent, decorators: [{
2610
2602
  type: Component,
2611
- 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" }]
2612
2604
  }], propDecorators: { labelKey: [{
2613
2605
  type: Input,
2614
2606
  args: [{ required: true }]
@@ -4042,6 +4034,88 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
4042
4034
  type: Output
4043
4035
  }] } });
4044
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
+
4045
4119
  /*
4046
4120
  * Public API Surface of shared-ui
4047
4121
  */
@@ -4050,5 +4124,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
4050
4124
  * Generated bundle index. Do not edit.
4051
4125
  */
4052
4126
 
4053
- 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 };
4054
4128
  //# sourceMappingURL=skysoftware-co-bayan-hr-widgets-ui.mjs.map