@corp-products/ui-components 3.6.8 → 3.7.0

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/index.d.ts CHANGED
@@ -395,7 +395,8 @@ declare enum FormFieldTypeEnum {
395
395
  SELECT = "select",
396
396
  SWITCH = "switch",
397
397
  AUTO_COMPLETE = "auto-complete",
398
- HIJRI_DATE_PICKER = "hijri-date"
398
+ HIJRI_DATE_PICKER = "hijri-date",
399
+ UPLOAD_FILE = "upload-file"
399
400
  }
400
401
 
401
402
  declare class ConfirmationDialogComponent extends DynamicDialogRef implements OnInit, OnDestroy {
@@ -405,10 +406,13 @@ declare class ConfirmationDialogComponent extends DynamicDialogRef implements On
405
406
  private readonly _ref;
406
407
  private readonly _subscription;
407
408
  dialogFormData: DynamicFormData;
409
+ uploadedFile: any;
408
410
  ngOnDestroy(): void;
409
411
  ngOnInit(): void;
410
412
  submit(): void;
411
413
  close(): void;
414
+ onPopFilesUploaded(file: any): void;
415
+ onFileDeleted(file: any): void;
412
416
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationDialogComponent, never>;
413
417
  static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationDialogComponent, "app-confirm-dialog", never, {}, {}, never, never, true, never>;
414
418
  }
@@ -456,14 +460,21 @@ declare class DynamicFormComponent implements OnInit {
456
460
  name: string;
457
461
  event: any;
458
462
  }>;
463
+ popUpFilesUploaded: EventEmitter<any>;
464
+ fileDeleted: EventEmitter<{
465
+ fileId: string;
466
+ isNew: boolean;
467
+ }>;
459
468
  inputsNames: string[];
460
469
  formGroup: FormGroup;
461
470
  inputsMap: InputsMap;
462
471
  readonly fieldType: typeof FormFieldTypeEnum;
463
472
  getFormControl: typeof FormUtils.getFormControl;
464
473
  ngOnInit(): void;
474
+ onFilesUploaded(file: any): void;
475
+ onFileDeleted(file: any): void;
465
476
  static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormComponent, never>;
466
- static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormComponent, "app-dynamic-form", never, { "dynamicFormData": { "alias": "dynamicFormData"; "required": true; }; }, { "selectButtonChange": "selectButtonChange"; "selectChange": "selectChange"; "switchChange": "switchChange"; "autoCompleteSearch": "autoCompleteSearch"; "autoCompleteSelect": "autoCompleteSelect"; }, never, never, true, never>;
477
+ static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormComponent, "app-dynamic-form", never, { "dynamicFormData": { "alias": "dynamicFormData"; "required": true; }; }, { "selectButtonChange": "selectButtonChange"; "selectChange": "selectChange"; "switchChange": "switchChange"; "autoCompleteSearch": "autoCompleteSearch"; "autoCompleteSelect": "autoCompleteSelect"; "popUpFilesUploaded": "popUpFilesUploaded"; "fileDeleted": "fileDeleted"; }, never, never, true, never>;
467
478
  }
468
479
 
469
480
  declare class UserAutocompleteCardComponent {
@@ -598,7 +609,7 @@ interface ConfirmationDialogData {
598
609
  declare class ConfirmationDialogService {
599
610
  private dialogService;
600
611
  constructor(dialogService: DialogService);
601
- open(data: ConfirmationDialogData): Observable<boolean>;
612
+ open(data: ConfirmationDialogData): Observable<any>;
602
613
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationDialogService, never>;
603
614
  static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmationDialogService>;
604
615
  }
@@ -725,5 +736,89 @@ declare class AlertDialogService {
725
736
  declare const dateRangeValidator: (fromKey: string, toKey: string) => ValidatorFn;
726
737
  declare const notFutureDateValidator: (dateKey: string) => ValidatorFn;
727
738
 
728
- export { AlertDialogComponent, AlertDialogService, AppAccordionComponent, AppBreadcrumbComponent, AppButtonComponent, AppDropdownMenuComponent, AppTabsComponent, AutoCompleteComponent, BasicErrorKeysEnum, BottomSheetComponent, ConfirmationDialogComponent, ConfirmationDialogService, DatePickerComponent, DualCalendarComponent, DynamicFormComponent, DynamicSidebarService, DynamicSidebarV2Service, ErrorsWithValuesKeysEnum, FormFieldTypeEnum, FormUtils, FormValidationService, IcoMoonIconComponent, InputComponent, MONTHS_GREGORIAN, MONTHS_HIJRI, ReadMoreComponent, SelectButtonComponent, SelectComponent, SideBarComponent, SidebarConfigDefaults, SwitchComponent, UserAutocompleteCardComponent, UserInfoComponent, ValidationErrorsPipe, WEEKDAYS, dateRangeValidator, getGregorianMonthName, getHijriMonthName, getWeekdayName, notFutureDateValidator, numbersOnlyValidator };
729
- export type { AlertDialogData, AppButtonIconPos, AppButtonSeverity, AppButtonSize, AppButtonVariant, AppTabs, BreadCrumbExtraData, BreadCrumbPosition, BreadcrumbItem, ConfirmationDialogData, DateRangeInterface, Dropdown, DropdownMenuItem, DropdownTextColor, DynamicFormData, DynamicSidebarV2Actions, DynamicSidebarV2Config, InputContentType, InputType, InputsMap, InputsMapData, LabelValue, RoutedTab, SidebarActionConfig, SidebarActionV2Config, SidebarConfig, SidebarV2Actions, TemplateTab };
739
+ interface AttachmentFile {
740
+ id: string;
741
+ fileName: string;
742
+ size: number;
743
+ mimeType: string;
744
+ createdDate?: string;
745
+ createdBy?: UserProfileData;
746
+ createdByDepartment?: Department;
747
+ }
748
+ interface UploadProgress {
749
+ fileId: string;
750
+ fileName: string;
751
+ progress: number;
752
+ status: UploadStatus;
753
+ error?: string;
754
+ response?: AttachmentFile;
755
+ }
756
+ interface Department {
757
+ id: string;
758
+ nameAr: string;
759
+ nameEn: string;
760
+ }
761
+ interface FileItem extends AttachmentFile {
762
+ progress?: number;
763
+ status?: UploadStatus;
764
+ error?: string;
765
+ file?: File;
766
+ isNew?: boolean;
767
+ }
768
+ interface DownloadRequest {
769
+ attachmentIds: string[];
770
+ }
771
+ interface FileTypeConfig {
772
+ icon: string;
773
+ iconPathCount: number;
774
+ colorClass?: string;
775
+ }
776
+ interface PdfPreviewState {
777
+ visible: boolean;
778
+ blob: Blob | null;
779
+ fileName: string;
780
+ }
781
+ interface Attachment {
782
+ id?: string;
783
+ nameFile: string;
784
+ size: number;
785
+ url?: string | ArrayBuffer | null;
786
+ file?: File;
787
+ isCanceled?: boolean;
788
+ uploadStatus?: UploadStatus;
789
+ status?: AttachmentStatusDisplay;
790
+ serverResponse?: unknown;
791
+ errorMessage?: string;
792
+ }
793
+ interface AttachmentStatusDisplay {
794
+ icon: string;
795
+ label: string;
796
+ labelClass?: string;
797
+ percentage?: number;
798
+ success?: boolean;
799
+ }
800
+ declare enum UploadStatus {
801
+ PENDING = "pending",
802
+ SUCCESS = "success",
803
+ UPLOADING = "uploading",
804
+ FAILED = "failed"
805
+ }
806
+ interface UserProfileData {
807
+ contact: Contact;
808
+ position: Position;
809
+ email: string;
810
+ profileImage: string;
811
+ nameEn: string;
812
+ nameAr: string;
813
+ }
814
+ interface Contact {
815
+ mobile: string;
816
+ work: string;
817
+ }
818
+ interface Position {
819
+ code: string;
820
+ name: string;
821
+ }
822
+
823
+ export { AlertDialogComponent, AlertDialogService, AppAccordionComponent, AppBreadcrumbComponent, AppButtonComponent, AppDropdownMenuComponent, AppTabsComponent, AutoCompleteComponent, BasicErrorKeysEnum, BottomSheetComponent, ConfirmationDialogComponent, ConfirmationDialogService, DatePickerComponent, DualCalendarComponent, DynamicFormComponent, DynamicSidebarService, DynamicSidebarV2Service, ErrorsWithValuesKeysEnum, FormFieldTypeEnum, FormUtils, FormValidationService, IcoMoonIconComponent, InputComponent, MONTHS_GREGORIAN, MONTHS_HIJRI, ReadMoreComponent, SelectButtonComponent, SelectComponent, SideBarComponent, SidebarConfigDefaults, SwitchComponent, UploadStatus, UserAutocompleteCardComponent, UserInfoComponent, ValidationErrorsPipe, WEEKDAYS, dateRangeValidator, getGregorianMonthName, getHijriMonthName, getWeekdayName, notFutureDateValidator, numbersOnlyValidator };
824
+ export type { AlertDialogData, AppButtonIconPos, AppButtonSeverity, AppButtonSize, AppButtonVariant, AppTabs, Attachment, AttachmentFile, AttachmentStatusDisplay, BreadCrumbExtraData, BreadCrumbPosition, BreadcrumbItem, ConfirmationDialogData, Contact, DateRangeInterface, Department, DownloadRequest, Dropdown, DropdownMenuItem, DropdownTextColor, DynamicFormData, DynamicSidebarV2Actions, DynamicSidebarV2Config, FileItem, FileTypeConfig, InputContentType, InputType, InputsMap, InputsMapData, LabelValue, PdfPreviewState, Position, RoutedTab, SidebarActionConfig, SidebarActionV2Config, SidebarConfig, SidebarV2Actions, TemplateTab, UploadProgress, UserProfileData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corp-products/ui-components",
3
- "version": "3.6.8",
3
+ "version": "3.7.0",
4
4
  "author": "shireen Omar",
5
5
  "description": "shared UI components across our apps",
6
6
  "peerDependencies": {