@rangertechnologies/fusion-ui 0.1.3 → 0.1.4

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.
@@ -1,7 +1,7 @@
1
1
  import * as i1$3 from "@angular/common";
2
- import { CommonModule } from "@angular/common";
2
+ import { CommonModule, DatePipe } from "@angular/common";
3
3
  import * as i0 from "@angular/core";
4
- import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostListener, Injectable, Input, Output, Pipe, ViewChild, ViewChildren } from "@angular/core";
4
+ import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostListener, Injectable, Input, Optional, Output, Pipe, ViewChild, ViewChildren } from "@angular/core";
5
5
  import { AngularSvgIconModule } from "angular-svg-icon";
6
6
  import * as i1$4 from "@ngx-translate/core";
7
7
  import { TranslateModule } from "@ngx-translate/core";
@@ -3575,6 +3575,123 @@ i0.ɵɵngDeclareClassMetadata({
3575
3575
  sideScreenEmittedEvent: [{ type: Output }]
3576
3576
  }
3577
3577
  });
3578
+ var ApprovalScreenComponent = class ApprovalScreenComponent {
3579
+ datePipe;
3580
+ constructor(datePipe) {
3581
+ this.datePipe = datePipe;
3582
+ }
3583
+ infoData;
3584
+ hideFields = [];
3585
+ approve = new EventEmitter();
3586
+ sideScreenEmitted() {
3587
+ this.approve.emit();
3588
+ }
3589
+ static ɵfac = i0.ɵɵngDeclareFactory({
3590
+ minVersion: "12.0.0",
3591
+ version: "22.2.4",
3592
+ ngImport: i0,
3593
+ type: ApprovalScreenComponent,
3594
+ deps: [{
3595
+ token: i1$3.DatePipe,
3596
+ optional: true
3597
+ }],
3598
+ target: i0.ɵɵFactoryTarget.Component
3599
+ });
3600
+ static ɵcmp = i0.ɵɵngDeclareComponent({
3601
+ minVersion: "14.0.0",
3602
+ version: "22.2.4",
3603
+ type: ApprovalScreenComponent,
3604
+ isStandalone: true,
3605
+ selector: "app-approval-screen",
3606
+ inputs: {
3607
+ infoData: "infoData",
3608
+ hideFields: "hideFields"
3609
+ },
3610
+ outputs: { approve: "approve" },
3611
+ providers: [DatePipe],
3612
+ ngImport: i0,
3613
+ template: "<app-common-screen headerTitle=\"Approval Details\" (sideScreenEmittedEvent)=\"sideScreenEmitted()\">\n <div class=\"side-main-content container\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <!-- Approval Info -->\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.NAME' | customTranslate : 'Name'}}:</div>\n <div class=\"col-6 text-start\">{{ infoData.name }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.STATUS' | customTranslate : 'Status'}}:</div>\n <div class=\"col-6 text-start\">\n <span class=\"badge custom-badge\" [ngClass]=\"{\n 'bg-success': infoData.status === 'Approved', \n 'bg-warning': infoData.status === 'Pending',\n 'bg-danger': infoData.status === 'Rejected'}\">\n {{ infoData.status }}</span>\n </div>\n </div>\n <div class=\"row mb-3\" *ngIf=\"!hideFields.includes('leaveStatus')\">\n <!-- SK21DEC24 to add Approval status in side screen-->\n <div class=\"col-6 text-start\">{{'APP.APPROVAL_STATUS' | customTranslate : 'Approval Status'}}:</div>\n <div class=\"col-6 text-start\">\n <span class=\"badge custom-badge\" [ngClass]=\"{\n 'bg-success': infoData.leaveStatus === 'Approved', \n 'bg-warning': infoData.leaveStatus === 'Pending',\n 'bg-danger': infoData.leaveStatus === 'Rejected'}\">\n {{ infoData.leaveStatus || '' }}</span>\n </div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.REASON' | customTranslate : 'Reason'}}:</div>\n <div class=\"col-6 text-start\">{{ infoData.reason }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.TYPE' | customTranslate : 'Type'}}:</div>\n <div class=\"col-6 text-start\">{{ infoData.type }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.APPLIED_ON' | customTranslate : 'Applied On'}}:</div>\n <div class=\"col-6 text-start\">{{ infoData.appliedOn | date:'short' }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.APPROVED_COUNT' | customTranslate : 'Approved Count'}}:</div>\n <div class=\"col-6 text-start\">{{ infoData.approvedCount }}</div>\n </div>\n </div>\n </div>\n \n <!-- Approval Managers -->\n <!-- SK03DEC24 show approval managers list only if applicable -->\n <h3 *ngIf=\"infoData.approvalManagers != undefined && infoData.approvalManagers.length > 0\" class=\"text-center mb-3 mt-4\" style=\"font-size: 20px\">{{'APP.APPROVAL_MANAGERS' | customTranslate : 'Approval Managers'}}</h3>\n <ul *ngIf=\"infoData.approvalManagers != undefined && infoData.approvalManagers.length > 0\" class=\"list-group mt-4\">\n <li *ngFor=\"let manager of infoData.approvalManagers\" class=\"list-group-item\">\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.EMPLOYEE_ID' | customTranslate : 'Employee ID'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.employeeId }}</div>\n </div>\n <div class=\"row mb-3\">\n <!-- SK10DEC24 to show manager name -->\n <div class=\"col-6 text-start\">{{'APP.EMPLOYEE_NAME' | customTranslate : 'Employee Name'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.name }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.APPROVAL_ORDER' | customTranslate : 'Approval Order'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.approvalOrder }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.STATUS' | customTranslate : 'Status'}}:</div>\n <div class=\"col-6 text-start\">\n <span class=\"badge custom-badge\" [ngClass]=\"{\n 'bg-success': manager.status === 'Approved', \n 'bg-warning': manager.status === 'Pending',\n 'bg-danger': manager.status === 'Rejected'}\">\n {{ manager.status }}\n </span>\n </div>\n </div>\n <div class=\"row mb-3\" *ngIf=\"manager.viewedOn\">\n <div class=\"col-6 text-start\">{{'APP.VIEWED_ON' | customTranslate : 'Viewed On'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.viewedOn | date:'short' }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.IS_OPTIONAL' | customTranslate : 'Is Optional'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.isOptional ? \"Yes\" : \"No\" }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.COMMENTS' | customTranslate : 'Comments'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.rejectionReason }}</div>\n </div>\n </li>\n </ul>\n </div>\n \n \n \n </app-common-screen>",
3614
+ styles: [""],
3615
+ dependencies: [
3616
+ {
3617
+ kind: "component",
3618
+ type: CommonScreenComponent,
3619
+ selector: "app-common-screen",
3620
+ inputs: ["headerTitle", "dynamicScreenStyle"],
3621
+ outputs: ["sideScreenEmittedEvent"]
3622
+ },
3623
+ {
3624
+ kind: "ngmodule",
3625
+ type: CommonModule
3626
+ },
3627
+ {
3628
+ kind: "directive",
3629
+ type: i1$3.NgClass,
3630
+ selector: "[ngClass]",
3631
+ inputs: ["class", "ngClass"]
3632
+ },
3633
+ {
3634
+ kind: "directive",
3635
+ type: i1$3.NgForOf,
3636
+ selector: "[ngFor][ngForOf]",
3637
+ inputs: [
3638
+ "ngForOf",
3639
+ "ngForTrackBy",
3640
+ "ngForTemplate"
3641
+ ]
3642
+ },
3643
+ {
3644
+ kind: "directive",
3645
+ type: i1$3.NgIf,
3646
+ selector: "[ngIf]",
3647
+ inputs: [
3648
+ "ngIf",
3649
+ "ngIfThen",
3650
+ "ngIfElse"
3651
+ ]
3652
+ },
3653
+ {
3654
+ kind: "pipe",
3655
+ type: i1$3.DatePipe,
3656
+ name: "date"
3657
+ },
3658
+ {
3659
+ kind: "pipe",
3660
+ type: CustomTranslatePipe,
3661
+ name: "customTranslate"
3662
+ }
3663
+ ]
3664
+ });
3665
+ };
3666
+ i0.ɵɵngDeclareClassMetadata({
3667
+ minVersion: "12.0.0",
3668
+ version: "22.2.4",
3669
+ ngImport: i0,
3670
+ type: ApprovalScreenComponent,
3671
+ decorators: [{
3672
+ type: Component,
3673
+ args: [{
3674
+ selector: "app-approval-screen",
3675
+ standalone: true,
3676
+ imports: [
3677
+ CommonScreenComponent,
3678
+ CommonModule,
3679
+ CustomTranslatePipe
3680
+ ],
3681
+ providers: [DatePipe],
3682
+ template: "<app-common-screen headerTitle=\"Approval Details\" (sideScreenEmittedEvent)=\"sideScreenEmitted()\">\n <div class=\"side-main-content container\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <!-- Approval Info -->\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.NAME' | customTranslate : 'Name'}}:</div>\n <div class=\"col-6 text-start\">{{ infoData.name }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.STATUS' | customTranslate : 'Status'}}:</div>\n <div class=\"col-6 text-start\">\n <span class=\"badge custom-badge\" [ngClass]=\"{\n 'bg-success': infoData.status === 'Approved', \n 'bg-warning': infoData.status === 'Pending',\n 'bg-danger': infoData.status === 'Rejected'}\">\n {{ infoData.status }}</span>\n </div>\n </div>\n <div class=\"row mb-3\" *ngIf=\"!hideFields.includes('leaveStatus')\">\n <!-- SK21DEC24 to add Approval status in side screen-->\n <div class=\"col-6 text-start\">{{'APP.APPROVAL_STATUS' | customTranslate : 'Approval Status'}}:</div>\n <div class=\"col-6 text-start\">\n <span class=\"badge custom-badge\" [ngClass]=\"{\n 'bg-success': infoData.leaveStatus === 'Approved', \n 'bg-warning': infoData.leaveStatus === 'Pending',\n 'bg-danger': infoData.leaveStatus === 'Rejected'}\">\n {{ infoData.leaveStatus || '' }}</span>\n </div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.REASON' | customTranslate : 'Reason'}}:</div>\n <div class=\"col-6 text-start\">{{ infoData.reason }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.TYPE' | customTranslate : 'Type'}}:</div>\n <div class=\"col-6 text-start\">{{ infoData.type }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.APPLIED_ON' | customTranslate : 'Applied On'}}:</div>\n <div class=\"col-6 text-start\">{{ infoData.appliedOn | date:'short' }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.APPROVED_COUNT' | customTranslate : 'Approved Count'}}:</div>\n <div class=\"col-6 text-start\">{{ infoData.approvedCount }}</div>\n </div>\n </div>\n </div>\n \n <!-- Approval Managers -->\n <!-- SK03DEC24 show approval managers list only if applicable -->\n <h3 *ngIf=\"infoData.approvalManagers != undefined && infoData.approvalManagers.length > 0\" class=\"text-center mb-3 mt-4\" style=\"font-size: 20px\">{{'APP.APPROVAL_MANAGERS' | customTranslate : 'Approval Managers'}}</h3>\n <ul *ngIf=\"infoData.approvalManagers != undefined && infoData.approvalManagers.length > 0\" class=\"list-group mt-4\">\n <li *ngFor=\"let manager of infoData.approvalManagers\" class=\"list-group-item\">\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.EMPLOYEE_ID' | customTranslate : 'Employee ID'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.employeeId }}</div>\n </div>\n <div class=\"row mb-3\">\n <!-- SK10DEC24 to show manager name -->\n <div class=\"col-6 text-start\">{{'APP.EMPLOYEE_NAME' | customTranslate : 'Employee Name'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.name }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.APPROVAL_ORDER' | customTranslate : 'Approval Order'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.approvalOrder }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.STATUS' | customTranslate : 'Status'}}:</div>\n <div class=\"col-6 text-start\">\n <span class=\"badge custom-badge\" [ngClass]=\"{\n 'bg-success': manager.status === 'Approved', \n 'bg-warning': manager.status === 'Pending',\n 'bg-danger': manager.status === 'Rejected'}\">\n {{ manager.status }}\n </span>\n </div>\n </div>\n <div class=\"row mb-3\" *ngIf=\"manager.viewedOn\">\n <div class=\"col-6 text-start\">{{'APP.VIEWED_ON' | customTranslate : 'Viewed On'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.viewedOn | date:'short' }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.IS_OPTIONAL' | customTranslate : 'Is Optional'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.isOptional ? \"Yes\" : \"No\" }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-6 text-start\">{{'APP.COMMENTS' | customTranslate : 'Comments'}}:</div>\n <div class=\"col-6 text-start\">{{ manager.rejectionReason }}</div>\n </div>\n </li>\n </ul>\n </div>\n \n \n \n </app-common-screen>"
3683
+ }]
3684
+ }],
3685
+ ctorParameters: () => [{
3686
+ type: i1$3.DatePipe,
3687
+ decorators: [{ type: Optional }]
3688
+ }],
3689
+ propDecorators: {
3690
+ infoData: [{ type: Input }],
3691
+ hideFields: [{ type: Input }],
3692
+ approve: [{ type: Output }]
3693
+ }
3694
+ });
3578
3695
  var BrowseComponent = class BrowseComponent {
3579
3696
  selectedEmployee;
3580
3697
  employeeFinanceInfo;
@@ -7246,6 +7363,73 @@ i0.ɵɵngDeclareClassMetadata({
7246
7363
  deleteModal: [{ type: Input }]
7247
7364
  }
7248
7365
  });
7366
+ var PdfFontService = class PdfFontService {
7367
+ fontLoadedPromise = null;
7368
+ configurePdfMake(pdfMakeInstance) {
7369
+ if (!pdfMakeInstance) return;
7370
+ pdfMakeInstance.vfs = (typeof window !== "undefined" ? window : {}).vfs || {};
7371
+ pdfMakeInstance.fonts = { Amiri: {
7372
+ normal: "Amiri-Regular.ttf",
7373
+ bold: "Amiri-Regular.ttf",
7374
+ italics: "Amiri-Regular.ttf",
7375
+ bolditalics: "Amiri-Regular.ttf"
7376
+ } };
7377
+ }
7378
+ async ensureAmiriFont(pdfMakeInstance) {
7379
+ if (typeof window === "undefined") return;
7380
+ const win = window;
7381
+ if (win.vfs && win.vfs["Amiri-Regular.ttf"]) {
7382
+ if (pdfMakeInstance) this.configurePdfMake(pdfMakeInstance);
7383
+ return;
7384
+ }
7385
+ if (!this.fontLoadedPromise) this.fontLoadedPromise = new Promise((resolve) => {
7386
+ const existing = document.querySelector("script[src*=\"vfs-amiri.js\"]");
7387
+ if (existing) {
7388
+ existing.addEventListener("load", () => resolve(), { once: true });
7389
+ existing.addEventListener("error", () => resolve(), { once: true });
7390
+ return;
7391
+ }
7392
+ const script = document.createElement("script");
7393
+ script.src = "/assets/fonts/vfs-amiri.js";
7394
+ script.async = true;
7395
+ script.onload = () => {
7396
+ resolve();
7397
+ };
7398
+ script.onerror = (err) => {
7399
+ console.warn("MR 18OCT26 Unable to load Amiri font dynamically, falling back to default pdfMake fonts", err);
7400
+ resolve();
7401
+ };
7402
+ document.head.appendChild(script);
7403
+ });
7404
+ await this.fontLoadedPromise;
7405
+ if (pdfMakeInstance) this.configurePdfMake(pdfMakeInstance);
7406
+ }
7407
+ static ɵfac = i0.ɵɵngDeclareFactory({
7408
+ minVersion: "12.0.0",
7409
+ version: "22.2.4",
7410
+ ngImport: i0,
7411
+ type: PdfFontService,
7412
+ deps: [],
7413
+ target: i0.ɵɵFactoryTarget.Injectable
7414
+ });
7415
+ static ɵprov = i0.ɵɵngDeclareInjectable({
7416
+ minVersion: "12.0.0",
7417
+ version: "22.2.4",
7418
+ ngImport: i0,
7419
+ type: PdfFontService,
7420
+ providedIn: "root"
7421
+ });
7422
+ };
7423
+ i0.ɵɵngDeclareClassMetadata({
7424
+ minVersion: "12.0.0",
7425
+ version: "22.2.4",
7426
+ ngImport: i0,
7427
+ type: PdfFontService,
7428
+ decorators: [{
7429
+ type: Injectable,
7430
+ args: [{ providedIn: "root" }]
7431
+ }]
7432
+ });
7249
7433
  var AmountToWordsPipe = class AmountToWordsPipe {
7250
7434
  transform(value) {
7251
7435
  if (value === null || value === void 0 || isNaN(value)) return "";
@@ -7285,6 +7469,6 @@ i0.ɵɵngDeclareClassMetadata({
7285
7469
  }]
7286
7470
  }]
7287
7471
  });
7288
- export { AlertService, AmountToWordsPipe, ApiService, CommonScreenComponent, ConfigService, Constants, CustomDatePipe, CustomPaginatorIntl, CustomTimePipe, CustomTranslatePipe, DataTableComponent, DropDownComponent, EditColumnCheckPipe, EditColumnDropdownPipe, EditColumnTypePipe, ErrorHandlerService, FileUploadComponent, FormsComponent, FusionButtonComponent, GetValuePipe, GlobalValuesService, LoaderService, ModalComponent, MultiCheckboxComponent, MultipleFilterComponent, PaginationComponent, PopoverComponent, ScrollService, SearchFilterComponent, SearchFilterPipe, SideScreenComponent, TabDataService, TotalColumSumPipe };
7472
+ export { AlertService, AmountToWordsPipe, ApiService, ApprovalScreenComponent, CommonScreenComponent, ConfigService, Constants, CustomDatePipe, CustomPaginatorIntl, CustomTimePipe, CustomTranslatePipe, DataTableComponent, DropDownComponent, EditColumnCheckPipe, EditColumnDropdownPipe, EditColumnTypePipe, ErrorHandlerService, FileUploadComponent, FormsComponent, FusionButtonComponent, GetValuePipe, GlobalValuesService, LoaderService, ModalComponent, MultiCheckboxComponent, MultipleFilterComponent, PaginationComponent, PdfFontService, PopoverComponent, ScrollService, SearchFilterComponent, SearchFilterPipe, SideScreenComponent, TabDataService, TotalColumSumPipe };
7289
7473
 
7290
7474
  //# sourceMappingURL=rangertechnologies-fusion-ui.mjs.map