@bnsights/bbsf-controls 1.0.112 → 1.0.113

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 (38) hide show
  1. package/README.md +6 -1
  2. package/bnsights-bbsf-controls-1.0.113.tgz +0 -0
  3. package/esm2022/lib/Shared/Components/app-base-component.mjs +5 -5
  4. package/esm2022/lib/Shared/Models/Attribute.mjs +1 -1
  5. package/esm2022/lib/Shared/Models/CancelDTO.mjs +3 -3
  6. package/esm2022/lib/Shared/Models/FileDTO.mjs +22 -2
  7. package/esm2022/lib/Shared/Models/FileUploadOptions.mjs +3 -1
  8. package/esm2022/lib/Shared/Models/FilterItem.mjs +2 -2
  9. package/esm2022/lib/Shared/Models/UploadPersonalImage.mjs +3 -3
  10. package/esm2022/lib/Shared/services/file-upload.service.mjs +29 -0
  11. package/esm2022/lib/controls/ConfirmationModal/ConfirmationModal.component.mjs +2 -2
  12. package/esm2022/lib/controls/DateTimePicker/DateTimePicker.component.mjs +12 -4
  13. package/esm2022/lib/controls/FileUplaod/FileUplaod.component.mjs +131 -64
  14. package/esm2022/lib/controls/Form/Form.component.mjs +2 -2
  15. package/esm2022/lib/controls/HtmlEditor/HtmlEditor.component.mjs +2 -2
  16. package/esm2022/lib/controls/ImageUpload/ImageUpload.component.mjs +15 -15
  17. package/esm2022/lib/controls/MapAutoComplete/MapAutoComplete.component.mjs +2 -2
  18. package/esm2022/lib/controls/Paging/Paging.component.mjs +16 -16
  19. package/esm2022/lib/controls/ProfileImageUploader/ProfileImageUploader.component.mjs +19 -19
  20. package/esm2022/lib/controls/TagsInput/TagsInput.component.mjs +2 -2
  21. package/esm2022/lib/controls/Toggleslide/Toggleslide.component.mjs +2 -2
  22. package/esm2022/lib/controls/page-header-component/page-header-component.component.mjs +1 -1
  23. package/fesm2022/bnsights-bbsf-controls.mjs +265 -144
  24. package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
  25. package/lib/Shared/Models/Attribute.d.ts +1 -1
  26. package/lib/Shared/Models/CancelDTO.d.ts +2 -2
  27. package/lib/Shared/Models/FileDTO.d.ts +18 -18
  28. package/lib/Shared/Models/FileUploadOptions.d.ts +2 -0
  29. package/lib/Shared/Models/FilterItem.d.ts +4 -4
  30. package/lib/Shared/Models/UploadPersonalImage.d.ts +2 -2
  31. package/lib/Shared/services/file-upload.service.d.ts +11 -0
  32. package/lib/controls/DateTimePicker/DateTimePicker.component.d.ts +3 -1
  33. package/lib/controls/FileUplaod/FileUplaod.component.d.ts +9 -5
  34. package/lib/controls/Paging/Paging.component.d.ts +2 -2
  35. package/package.json +2 -2
  36. package/src/lib/assets/Style-rtl.scss +16 -0
  37. package/src/lib/assets/sass/file-upload.scss +39 -1
  38. package/src/lib/assets/sass/image-upload.scss +5 -6
@@ -1,4 +1,4 @@
1
1
  export declare class Attribute {
2
- Key: string;
2
+ key: string;
3
3
  value: any;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  export declare class CancelDTO {
2
2
  constructor();
3
- English: string;
4
- Arabic: string;
3
+ english: string;
4
+ arabic: string;
5
5
  }
@@ -1,19 +1,19 @@
1
- export interface FileDTO {
2
- ID?: number;
3
- IDEncyrpted?: string;
4
- ID_GUID?: string;
5
- MimeType?: string;
6
- NameWithExtension?: string;
7
- CorrelationId?: string;
8
- Modified?: Date;
9
- ModifiedBy?: string;
10
- FontAwesomeClass?: string;
11
- ProviderName?: string;
12
- Tags?: string;
13
- FileName: string;
14
- FileType: string;
15
- FileBase64: string;
16
- Bytes?: any;
17
- FileSizeInMB: number;
18
- FileURL?: string;
1
+ export declare class FileDTO {
2
+ iD?: number;
3
+ iDEncyrpted?: string;
4
+ iD_GUID?: string;
5
+ mimeType?: string;
6
+ nameWithExtension?: string;
7
+ correlationId?: string;
8
+ modified?: Date;
9
+ modifiedBy?: string;
10
+ fontAwesomeClass?: string;
11
+ providerName?: string;
12
+ tags?: string;
13
+ fileName: string;
14
+ fileType: string;
15
+ fileBase64: string;
16
+ bytes?: any;
17
+ fileSizeInMB: number;
18
+ fileURL?: string;
19
19
  }
@@ -16,4 +16,6 @@ export declare class FileUploadOptions extends ControlOptionsBase {
16
16
  maxSizeForAllFilesInMB: number;
17
17
  /** Set List of Custom Attribute to FileInput */
18
18
  fileUploadAcceptsTypes: FileType[];
19
+ /** Ability to set Upload File Async */
20
+ isUploadFileAsync: boolean;
19
21
  }
@@ -3,11 +3,11 @@ export declare class FilterItem {
3
3
  /** jQuery selector used to retrieve the parameter value*/
4
4
  jQuerySelector: string;
5
5
  /** FormControlName used to retrieve the value Of Control*/
6
- FormControlName: string;
6
+ formControlName: string;
7
7
  /** The action parameter exact name (case sensitive)*/
8
- ActionParameterName: string;
8
+ actionParameterName: string;
9
9
  /** Check If This Filter Is Form Control Or js Filter */
10
- IsFormControl: boolean;
10
+ isFormControl: boolean;
11
11
  /**Set Filter Type To Filter*/
12
- FilterType: FilterType;
12
+ filterType: FilterType;
13
13
  }
@@ -1,5 +1,5 @@
1
1
  export declare class UploadPersonalImage {
2
2
  constructor();
3
- English: string;
4
- Arabic: string;
3
+ english: string;
4
+ arabic: string;
5
5
  }
@@ -0,0 +1,11 @@
1
+ import { RequestHandlerService } from '@bnsights/bbsf-utilities';
2
+ import * as i0 from "@angular/core";
3
+ export declare class FileUploadService {
4
+ private http;
5
+ apiUrl: string;
6
+ constructor(http: RequestHandlerService);
7
+ uploadFile(file: File): import("rxjs").Observable<any>;
8
+ deleteFile(id: string): import("rxjs").Observable<unknown>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<FileUploadService>;
11
+ }
@@ -20,6 +20,7 @@ export declare class DateInputComponent implements OnInit {
20
20
  constructor(onChangeService: OnPagingFiltersChangeService, controlUtility: ControlUtility, controlContainer: ControlContainer, DateInputControlHost: FormGroupDirective, utilityService: UtilityService, controlValidationService: ControlValidationService, dateTimeAdapter: DateTimeAdapter<any>);
21
21
  group: FormGroup;
22
22
  options: DatePickerOptions;
23
+ DropdownTemplateVariable: any;
23
24
  onChange: EventEmitter<any>;
24
25
  datePickerFormControl: AbstractControl;
25
26
  markAllAsTouched: boolean;
@@ -46,6 +47,7 @@ export declare class DateInputComponent implements OnInit {
46
47
  checkIfStartDateBeForEndDate: () => {
47
48
  InvalidStartDate: boolean;
48
49
  };
50
+ checkIsPickerInFilter(): void;
49
51
  translateByKey(key: string): string;
50
52
  removeRequiredValidation: () => void;
51
53
  addRequiredValidation: () => void;
@@ -53,5 +55,5 @@ export declare class DateInputComponent implements OnInit {
53
55
  addCustomValidation: (customValidation: any) => void;
54
56
  isValid: () => void;
55
57
  static ɵfac: i0.ɵɵFactoryDeclaration<DateInputComponent, [null, null, { optional: true; }, null, null, null, null]>;
56
- static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "BBSF-DateTimePicker", never, { "group": { "alias": "group"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "onChange": "onChange"; }, never, never, false, never>;
58
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateInputComponent, "BBSF-DateTimePicker", never, { "group": { "alias": "group"; "required": false; }; "options": { "alias": "options"; "required": false; }; "DropdownTemplateVariable": { "alias": "DropdownTemplateVariable"; "required": false; }; }, { "onChange": "onChange"; }, never, never, false, never>;
57
59
  }
@@ -2,12 +2,13 @@ import { OnInit, ElementRef, EventEmitter } from '@angular/core';
2
2
  import { FormGroup, AbstractControl, ControlContainer, FormGroupDirective } from '@angular/forms';
3
3
  import { FileUploadOptions } from '../../Shared/Models/FileUploadOptions';
4
4
  import { ControlUtility } from '../../Shared/services/ControlUtility';
5
- import { FileUploader, FileLikeObject } from 'ng2-file-upload';
5
+ import { FileUploader, FileLikeObject, FileItem } from 'ng2-file-upload';
6
6
  import { FileUploadModel } from '../../Shared/Models/FileUploadModel';
7
7
  import { MultipleFileUploadModel } from '../../Shared/Models/MultipleFileUploadModel';
8
8
  import { ControlValidationService, UtilityService } from '@bnsights/bbsf-utilities';
9
9
  import { GlobalSettings } from '../../Shared/services/GlobalSettings.service';
10
10
  import { FileDTO } from '../../Shared/Models/FileDTO';
11
+ import { FileUploadService } from '../../Shared/services/file-upload.service';
11
12
  import * as i0 from "@angular/core";
12
13
  export declare class FileUploadComponent implements OnInit {
13
14
  private controlContainer;
@@ -16,12 +17,14 @@ export declare class FileUploadComponent implements OnInit {
16
17
  UtilityService: UtilityService;
17
18
  private controlValidationService;
18
19
  private globalSettings;
20
+ private fileUploadService;
19
21
  static controlContainerstatic: any;
20
22
  fileInput: ElementRef;
21
23
  isSubmitted: boolean;
22
24
  group: FormGroup;
23
25
  options: FileUploadOptions;
24
26
  OnChange: EventEmitter<any>;
27
+ isUploadComplete: EventEmitter<any>;
25
28
  fileUploadFormControl: AbstractControl;
26
29
  validationMessage: string;
27
30
  validationCountMessage: string;
@@ -38,7 +41,7 @@ export declare class FileUploadComponent implements OnInit {
38
41
  multipleFileUploadModel: MultipleFileUploadModel;
39
42
  file: any;
40
43
  deletedFiles: FileDTO[];
41
- constructor(controlContainer: ControlContainer, MultipleFileUplaodControlHost: FormGroupDirective, controlUtility: ControlUtility, UtilityService: UtilityService, controlValidationService: ControlValidationService, globalSettings: GlobalSettings);
44
+ constructor(controlContainer: ControlContainer, MultipleFileUplaodControlHost: FormGroupDirective, controlUtility: ControlUtility, UtilityService: UtilityService, controlValidationService: ControlValidationService, globalSettings: GlobalSettings, fileUploadService: FileUploadService);
42
45
  ngOnInit(): void;
43
46
  ngAfterViewInit(): void;
44
47
  resetError: () => void;
@@ -47,12 +50,13 @@ export declare class FileUploadComponent implements OnInit {
47
50
  fileOverAnother(event: any): void;
48
51
  isHideInput(): boolean;
49
52
  onFileChange(): void;
50
- removeFromControlValue(item: any): void;
53
+ removeFromControlValue(item: FileItem): void;
51
54
  removeRequiredValidation: () => void;
52
55
  addRequiredValidation: () => void;
53
56
  removeCustomValidation: (customValidation: any) => void;
54
57
  addCustomValidation: (customValidation: any) => void;
55
58
  isValid: () => void;
56
- static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, [{ optional: true; }, null, null, null, null, null]>;
57
- static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "BBSF-FileUplaod", never, { "group": { "alias": "group"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "OnChange": "OnChange"; }, never, never, false, never>;
59
+ convertSizeToMB(size: number): number;
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, [{ optional: true; }, null, null, null, null, null, null]>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "BBSF-FileUplaod", never, { "group": { "alias": "group"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "OnChange": "OnChange"; "isUploadComplete": "isUploadComplete"; }, never, never, false, never>;
58
62
  }
@@ -46,8 +46,8 @@ export declare class PagingComponent<T> implements OnInit, OnDestroy {
46
46
  changePageSize(e: any): void;
47
47
  onScrollDown(): void;
48
48
  getItemList(page: any, IsFilterUpdated?: boolean): void;
49
- ReinitializePaging: () => void;
50
- UpdatePaging: () => void;
49
+ reinitializePaging: () => void;
50
+ updatePaging: () => void;
51
51
  castItems(objectArr: any[]): T[];
52
52
  setText(pagesNumber: number, itemsNumber: number): void;
53
53
  clearFilters(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bnsights/bbsf-controls",
3
- "version": "1.0.112",
3
+ "version": "1.0.113",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^17.0.5",
6
6
  "@angular/cdk": "^17.0.2",
@@ -12,7 +12,7 @@
12
12
  "@angular/router": "^17.0.5"
13
13
  },
14
14
  "dependencies": {
15
- "@bnsights/bbsf-utilities": "^1.0.43",
15
+ "@bnsights/bbsf-utilities": "^1.0.44",
16
16
  "@danielmoncada/angular-datetime-picker": "^17.0.0",
17
17
  "@fullcalendar/angular": "^6.1.10",
18
18
  "@fullcalendar/core": "^6.1.10",
@@ -174,4 +174,20 @@ input::-webkit-inner-spin-button {
174
174
 
175
175
  .form-control.input-icon-o {
176
176
  border-radius: 0 0.475rem 0.475rem 0 !important;
177
+ }
178
+
179
+ .form-group.bbsf-control.bbsf-file-upload {
180
+ .uploaded-items {
181
+ .btn-group {
182
+ .btn-download-file {
183
+ .file-name {
184
+ margin-right: 0.75rem;
185
+ margin-left: 0rem;
186
+ }
187
+ }
188
+
189
+ }
190
+
191
+
192
+ }
177
193
  }
@@ -7,7 +7,7 @@
7
7
  align-items: center;
8
8
 
9
9
  &:hover {
10
- background: #ebebeb;
10
+ background: initial;
11
11
  }
12
12
 
13
13
  svg {
@@ -23,6 +23,23 @@
23
23
  margin-left: 0.75rem;
24
24
  }
25
25
  }
26
+
27
+ .btn-progress-upload {
28
+ position: relative;
29
+
30
+ .upload {
31
+ position: absolute;
32
+ left: 0;
33
+ right: 0;
34
+ background-color: #5cb85ca1;
35
+ height: 100%;
36
+ border-radius: 0.475rem;
37
+ }
38
+
39
+ .file-uploaded.upload {
40
+ background-color: transparent;
41
+ }
42
+ }
26
43
  }
27
44
 
28
45
  .btn-danger {
@@ -30,5 +47,26 @@
30
47
  align-items: center;
31
48
  justify-content: center;
32
49
  }
50
+
51
+ .btn-download-file.btn.btn-danger {
52
+ border-color: #e2e2e2 !important;
53
+ background-color: #c2bfbf !important;
54
+
55
+ &:hover {
56
+ border-color: #d9214e !important;
57
+ background-color: #d9214e !important;
58
+
59
+ }
60
+ }
33
61
  }
34
62
  }
63
+
64
+ .spinner-border.text-muted {
65
+ width: 18px;
66
+ height: 18px;
67
+ }
68
+
69
+ .btn-group-sm>.btn:not(.btn-outline):not(.btn-dashed):not(.border-hover):not(.border-active):not(.btn-flush):not(.btn-icon),
70
+ .btn:not(.btn-outline):not(.btn-dashed):not(.border-hover):not(.border-active):not(.btn-flush):not(.btn-icon).btn-sm {
71
+ padding: calc(0.55rem + 1px) calc(1rem + 1px) !important;
72
+ }
@@ -1,4 +1,6 @@
1
- .form-group.bbsf-control.bbsf-image-upload, .form-group.bbsf-control.bbsf-file-upload, .form-group.bbsf-control.bbsf-profile-image-upload {
1
+ .form-group.bbsf-control.bbsf-image-upload,
2
+ .form-group.bbsf-control.bbsf-file-upload,
3
+ .form-group.bbsf-control.bbsf-profile-image-upload {
2
4
  .bbsf-input-container {
3
5
  height: 140px;
4
6
  display: flex;
@@ -25,7 +27,7 @@
25
27
 
26
28
  .uploaded-items {
27
29
  display: flex;
28
- align-items: center;
30
+ align-items: baseline;
29
31
  flex-wrap: wrap;
30
32
 
31
33
  .btn-group {
@@ -33,9 +35,6 @@
33
35
  margin-right: 0.4rem;
34
36
  }
35
37
 
36
- .btn-group:last-child {
37
- margin:0rem;
38
- }
39
38
  }
40
39
 
41
40
  .svg-and-validation {
@@ -128,4 +127,4 @@
128
127
  }
129
128
  }
130
129
  }
131
- }
130
+ }