@bnsights/bbsf-controls 1.0.180 → 1.0.182

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.
@@ -0,0 +1,8 @@
1
+ export declare class CalendarDTO {
2
+ id: string;
3
+ title: string;
4
+ start: Date;
5
+ end: Date;
6
+ colour: string;
7
+ allDay: boolean;
8
+ }
@@ -0,0 +1,57 @@
1
+ import { CustomValidation } from './CustomValidation';
2
+ import { Attribute } from './Attribute';
3
+ import { ControlLayout } from '../Enums/ControlLayout';
4
+ import { FileType } from '../Enums/FileType';
5
+ import { FileDTO } from './FileDTO';
6
+ export declare class FileOptions {
7
+ /**
8
+ * Represent Name Of Form Control
9
+ */
10
+ name: string;
11
+ /**
12
+ * Represent classes to FileInput that allow us to select the FileInput by jquery or javascript
13
+ */
14
+ extraClasses: string;
15
+ /** Represent value of the label*/
16
+ labelValue: string;
17
+ /** Represent Key of the label*/
18
+ labelKey: string;
19
+ /** Represent value of the labelDescription show under FileInput*/
20
+ labelDescription: string;
21
+ /**To set value to FileInput */
22
+ value: FileDTO[];
23
+ /**
24
+ * Display "*" beside the label
25
+ * if ForceAsterisk=true and IsRequired=True his display "*" ,
26
+ * if if ForceAsterisk=false and IsRequired=false this remove "*",
27
+ *if ForceAsterisk=false and IsRequired=True this display "*" ,
28
+ */
29
+ showAsterisk: boolean;
30
+ /** Ability to set FileInput required */
31
+ isRequired: boolean;
32
+ /** Ability to set FileInput required */
33
+ isMultipleFile: boolean;
34
+ /** Ability to display or hide the label of FileInput */
35
+ hideLabel: boolean;
36
+ /** Sets an attribute disable="disabled" */
37
+ isDisabled: boolean;
38
+ /** Sets boolean Value to Show IsDropZone Or Not */
39
+ isDropZone: boolean;
40
+ /** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
41
+ */
42
+ customValidation: CustomValidation[];
43
+ /** Set List of Custom Attribute to FileInput */
44
+ attributeList: Attribute[];
45
+ /** Set File MaxSize In MB */
46
+ fileMaxSizeInMB: number;
47
+ /** Set Max Number Of Files */
48
+ maxNoOfFiles: number;
49
+ /** Set Min Number Of Files */
50
+ minNoOfFiles: number;
51
+ /** Set File MaxSizeForAllFilesInMB In MB */
52
+ maxSizeForAllFilesInMB: number;
53
+ /** to set type of view if textbox is Vertical or Horizontal */
54
+ viewType: ControlLayout;
55
+ /** Set List of Custom Attribute to FileInput */
56
+ fileUploadAcceptsTypes: FileType[];
57
+ }
@@ -0,0 +1,57 @@
1
+ export * from './Attribute';
2
+ export * from './AutocompleteDTO';
3
+ export * from './AutocompleteOptions';
4
+ export * from './bread-crumb';
5
+ export * from './CalendarDTO';
6
+ export * from './CalendarEventDTO';
7
+ export * from './CalendarOptions';
8
+ export * from './CancelDTO';
9
+ export * from './CaptchaStyle';
10
+ export * from './CheckBoxOptions';
11
+ export * from './ConfirmationModalOptions';
12
+ export * from './control-filter-Item';
13
+ export * from './ControlOptionsBase';
14
+ export * from './CustomValidation';
15
+ export * from './DatePickerOptions';
16
+ export * from './DropdownListItem';
17
+ export * from './DropdownOptions';
18
+ export * from './EditPersonalImage';
19
+ export * from './EnglishArabicDTO';
20
+ export * from './FileDTO';
21
+ export * from './FileOptions';
22
+ export * from './FileUploadModel';
23
+ export * from './FileUploadOptions';
24
+ export * from './filter-options';
25
+ export * from './FilterItem';
26
+ export * from './FormOptions';
27
+ export * from './HtmlEditorOptions';
28
+ export * from './ImageUploadOptions';
29
+ export * from './MapAutocompleteDTO';
30
+ export * from './MapAutoCompleteOptions';
31
+ export * from './MarkdownEditorOptions';
32
+ export * from './MultilingualControlOptionsBase';
33
+ export * from './MultiLingualHtmlEditorOptions';
34
+ export * from './MultiLingualTextAreaOptions';
35
+ export * from './MultiLingualTextBoxOptions';
36
+ export * from './MultipleFileUploadModel';
37
+ export * from './page-header-options';
38
+ export * from './PagingDTO';
39
+ export * from './PagingOptions';
40
+ export * from './PagingPayload';
41
+ export * from './PhoneOptions';
42
+ export * from './ProfileImageUploadOptions';
43
+ export * from './ProfilePictureDTO';
44
+ export * from './RadioButtonItem';
45
+ export * from './RadioButtonOptions';
46
+ export * from './RangeNumber';
47
+ export * from './Recaptcha';
48
+ export * from './RecaptchaOptions';
49
+ export * from './RepeaterField';
50
+ export * from './RepeaterOptions';
51
+ export * from './SaveDTO';
52
+ export * from './TagsInputDTO';
53
+ export * from './TagsInputOptions';
54
+ export * from './TextAreaOptions';
55
+ export * from './TextBoxOptions';
56
+ export * from './ToggleSlideOptions';
57
+ export * from './UploadPersonalImage';
@@ -0,0 +1,6 @@
1
+ export * from './ControlUtility';
2
+ export * from './file-upload.service';
3
+ export * from './GlobalSettings.service';
4
+ export * from './OnPagingFiltersChange.service';
5
+ export * from './render-component-service.service';
6
+ export * from './validationErrorMassage.service';
@@ -1,36 +1,26 @@
1
- import { OnInit, AfterViewInit, OnDestroy, ElementRef, EventEmitter } from '@angular/core';
2
- import { FormGroup, AbstractControl, ControlContainer, FormGroupDirective, ValidatorFn } from '@angular/forms';
3
- import { FileUploadOptions } from '../../Shared/Models/FileUploadOptions';
4
- import { ControlUtility } from '../../Shared/services/ControlUtility';
1
+ import { OnInit, AfterViewInit, ElementRef, EventEmitter } from '@angular/core';
2
+ import { FormGroup, AbstractControl, ControlContainer, FormGroupDirective } from '@angular/forms';
5
3
  import { FileUploader, FileLikeObject, FileItem } from 'ng2-file-upload';
6
- import { FileUploadModel } from '../../Shared/Models/FileUploadModel';
7
- import { MultipleFileUploadModel } from '../../Shared/Models/MultipleFileUploadModel';
8
4
  import { ControlValidationService, UtilityService } from '@bnsights/bbsf-utilities';
9
- import { GlobalSettings } from '../../Shared/services/GlobalSettings.service';
10
- import { FileDTO } from '../../Shared/Models/FileDTO';
11
- import { FileUploadService } from '../../Shared/services/file-upload.service';
5
+ import { OnDestroy } from '@angular/core';
6
+ import { FileDTO, FileUploadModel, FileUploadOptions, MultipleFileUploadModel } from '../../Shared/Models';
7
+ import { ControlUtility, FileUploadService, GlobalSettings } from '../../Shared/services';
12
8
  import * as i0 from "@angular/core";
13
9
  export declare class FileUploadComponent implements OnInit, AfterViewInit, OnDestroy {
14
10
  private controlContainer;
15
- multipleFileUploadControlHost: FormGroupDirective;
11
+ MultipleFileUploadControlHost: FormGroupDirective;
16
12
  private controlUtility;
17
- utilityService: UtilityService;
13
+ UtilityService: UtilityService;
18
14
  private controlValidationService;
19
15
  private globalSettings;
20
16
  private fileUploadService;
21
- private static controlContainerStatic;
22
- private readonly BYTES_TO_MB;
23
- private readonly PROGRESS_COMPLETE;
24
- private readonly PROGRESS_NEAR_COMPLETE;
25
- private readonly ERROR_DISPLAY_DURATION;
26
- private readonly MAX_MEMORY_USAGE;
27
- private currentMemoryUsage;
28
- fileInput: ElementRef<HTMLInputElement>;
17
+ static controlContainerStatic: any;
18
+ fileInput: ElementRef;
29
19
  isSubmitted: boolean;
30
20
  group: FormGroup;
31
21
  options: FileUploadOptions;
32
22
  OnChange: EventEmitter<any>;
33
- isUploadComplete: EventEmitter<boolean>;
23
+ isUploadComplete: EventEmitter<any>;
34
24
  fileUploadFormControl: AbstractControl;
35
25
  validationMessage: string;
36
26
  validationCountMessage: string;
@@ -41,122 +31,44 @@ export declare class FileUploadComponent implements OnInit, AfterViewInit, OnDes
41
31
  toolTipTypeArray: string[];
42
32
  fileLikeObject: FileLikeObject;
43
33
  markAllAsTouched: boolean;
44
- validationRules: ValidatorFn[];
45
- validationRulesAsync: ValidatorFn[];
34
+ validationRules: any[];
35
+ validationRulesAsync: any[];
46
36
  fileUploadModel: FileUploadModel;
47
37
  multipleFileUploadModel: MultipleFileUploadModel;
48
- file: FileDTO | null;
38
+ file: any;
49
39
  deletedFiles: FileDTO[];
50
- private subscriptions;
51
- constructor(controlContainer: ControlContainer, multipleFileUploadControlHost: FormGroupDirective, controlUtility: ControlUtility, utilityService: UtilityService, controlValidationService: ControlValidationService, globalSettings: GlobalSettings, fileUploadService: FileUploadService);
52
- private initializeUploader;
40
+ private destroy$;
41
+ private pendingValidationErrors;
42
+ constructor(controlContainer: ControlContainer, MultipleFileUploadControlHost: FormGroupDirective, controlUtility: ControlUtility, UtilityService: UtilityService, controlValidationService: ControlValidationService, globalSettings: GlobalSettings, fileUploadService: FileUploadService);
53
43
  ngOnInit(): void;
54
- private initializeModels;
55
- private setViewType;
56
- private processInitialValue;
57
- private processMultipleFileValue;
58
- private processSingleFileValue;
59
- private createFileLikeObject;
60
- private setupLabels;
61
- private setupFileTypeValidation;
62
- private processAcceptedTypes;
63
- private getMimeTypeMap;
64
- private buildValidationMessage;
65
- private setupFormControl;
66
- private setupValidators;
67
- private setupCountMessage;
68
- private applyValidatorsAndState;
69
- private setupSubscriptions;
70
44
  ngAfterViewInit(): void;
71
- private applyAttributes;
72
45
  resetError: () => void;
73
46
  showGlobalError(): void;
74
- getErrorValidation(errorList: any): string;
47
+ getErrorValidation(ErrorList: any): string;
75
48
  fileOverAnother(event: any): void;
76
49
  isHideInput(): boolean;
77
50
  onFileChange(): void;
78
- private processNewlyAddedFiles;
79
- private getNewlyAddedFiles;
80
- private validateFilesInQueue;
81
- private validateSingleFile;
82
- private createFileSizeErrorMessage;
83
- private createFileTypeErrorMessage;
84
- private createDuplicateFileErrorMessage;
85
- private handleFileValidationResults;
86
- private processValidFilesForUpload;
87
- private shouldUseAsyncUpload;
88
- private validateFileConstraints;
89
- private validateMinFileCount;
90
- private validateMaxFileCount;
91
- private showFileCountError;
92
- private clearFileCountError;
93
- private validateTotalFileSize;
94
- private showTotalSizeError;
95
- private validateFileSize;
96
- private validateFileType;
97
- private validateIndividualFileSize;
98
- private validateIndividualFileType;
99
- private validateDuplicateFileName;
100
- private removeInvalidFiles;
101
- private showValidationErrors;
102
- private setValidationError;
103
- private clearInvalidFilesError;
104
- private setFormControlError;
105
- private handleAsyncFileUpload;
106
- private handleUploadProgress;
107
- private handleUploadComplete;
108
- private updateElementWithFileInfo;
109
- private createFileDTO;
110
- private handleSyncFileUpload;
111
- private updateQueueItemForSync;
112
- private findQueueItemByFile;
113
- private preserveFileReference;
114
- private createSyncFileDTO;
115
- private getExistingFileGUID;
116
- private updateFormValue;
117
- private setupMultipleFileModel;
118
- private updateFormControl;
119
- private preserveErrorsAndUpdateValue;
120
- private handlePatchAndEmit;
121
51
  removeFromControlValue(item: FileItem): void;
122
- private handleAsyncFileDeletion;
123
- private handleSingleFileRemoval;
124
- private handleMultipleFileRemoval;
125
- private processFileRemovalFromExisting;
126
- private resetDeletedFiles;
127
- private handleExistingFileRemoval;
128
- private removeFromUploadedFiles;
129
- private validateRemainingFiles;
130
- private updateMultipleFileModel;
131
52
  removeRequiredValidation: () => void;
132
53
  addRequiredValidation: () => void;
133
54
  removeCustomValidation: (customValidation: any) => void;
134
55
  addCustomValidation: (customValidation: any) => void;
135
- isValid: () => boolean;
56
+ isValid: () => void;
136
57
  convertSizeToMB(size: number): number;
137
- trackByFunction(index: number, item: FileItem): any;
138
- shouldShowFileList(): boolean;
139
- isDownloadEnabled(): boolean;
140
- isRemoveEnabled(): boolean;
141
- getFileDownloadUrl(item: FileItem): string | null;
142
- private getExistingFileUrl;
143
- private createFileUrl;
144
- private createBlobUrlWithFilename;
145
- private constructDownloadUrl;
146
- getFileName(item: FileItem): string;
147
- downloadFile(item: FileItem): void;
148
- private prepareFileDownload;
149
- private handleDownloadError;
150
- private executeFileDownload;
151
- private createDownloadLink;
152
- private triggerDownload;
153
- private cleanupBlobUrl;
154
- private trackMemoryUsage;
155
- private cleanupOldFiles;
156
- private cleanupEventListeners;
157
- private cleanupUploaderQueue;
158
58
  ngOnDestroy(): void;
159
- private checkAndClearMaxFileCountValidation;
59
+ sanitizeFileName(fileName: string): string;
60
+ /**
61
+ * Find duplicate files in the current upload queue
62
+ * @returns Array of newly added duplicate FileItem objects that should be rejected
63
+ */
64
+ private findDuplicateFiles;
65
+ /**
66
+ * Remove duplicate files from the uploader queue
67
+ * @param duplicateFiles Array of duplicate FileItem objects to remove
68
+ */
69
+ private removeDuplicateFilesFromQueue;
70
+ private isFileTypeAccepted;
71
+ private setValuePreservingErrors;
160
72
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, [{ optional: true; }, null, null, null, null, null, null]>;
161
73
  static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "BBSF-FileUpload", never, { "group": { "alias": "group"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "OnChange": "OnChange"; "isUploadComplete": "isUploadComplete"; }, never, never, false, never>;
162
74
  }
@@ -68,6 +68,8 @@ export declare class MultiLingualTextBoxComponent implements OnInit {
68
68
  getErrorValidation(ErrorList: any): string;
69
69
  getInputType(type: number): string;
70
70
  trimControlValue(type: string): void;
71
+ onPaste(event: ClipboardEvent, type: string): void;
72
+ onBlur(type: string): void;
71
73
  copyInputMessage(inputElement: any): void;
72
74
  showInputUsingLanguageMode(): void;
73
75
  onArabicFocus(isFocus: boolean): void;
@@ -1,12 +1,11 @@
1
- import { OnInit, EventEmitter } from '@angular/core';
1
+ import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
2
2
  import { FormGroup, AbstractControl, ControlContainer, FormGroupDirective } from '@angular/forms';
3
3
  import { ControlValidationService, LanguageService, UtilityService, SpeechRecognitionService } from '@bnsights/bbsf-utilities';
4
- import { ControlUtility } from '../../Shared/services/ControlUtility';
5
- import { TextAreaOptions } from '../../Shared/Models/TextAreaOptions';
6
- import { GlobalSettings } from '../../Shared/services/GlobalSettings.service';
7
4
  import { Subscription } from 'rxjs';
5
+ import { ControlUtility, GlobalSettings } from '../../Shared/services';
6
+ import { TextAreaOptions } from '../../Shared/Models';
8
7
  import * as i0 from "@angular/core";
9
- export declare class TextAreaComponent implements OnInit {
8
+ export declare class TextAreaComponent implements OnInit, OnDestroy {
10
9
  private controlUtility;
11
10
  private controlContainer;
12
11
  textAreaControlHost: FormGroupDirective;
@@ -15,7 +14,6 @@ export declare class TextAreaComponent implements OnInit {
15
14
  private globalSettings;
16
15
  private speechRecognitionService;
17
16
  private languageService;
18
- static controlContainerstatic: any;
19
17
  constructor(controlUtility: ControlUtility, controlContainer: ControlContainer, textAreaControlHost: FormGroupDirective, utilityService: UtilityService, controlValidationService: ControlValidationService, globalSettings: GlobalSettings, speechRecognitionService: SpeechRecognitionService, languageService: LanguageService);
20
18
  group: FormGroup;
21
19
  options: TextAreaOptions;
@@ -38,6 +36,7 @@ export declare class TextAreaComponent implements OnInit {
38
36
  isFocused: boolean;
39
37
  currentLanguage: String;
40
38
  subscription: Subscription;
39
+ valueChangesSubscription: Subscription;
41
40
  selectedSpeechLanguageDisplayText: string;
42
41
  ngOnInit(): void;
43
42
  ngAfterViewInit(): void;
@@ -46,6 +45,7 @@ export declare class TextAreaComponent implements OnInit {
46
45
  getErrorValidation(ErrorList: any): string;
47
46
  getInputType(type: number): string;
48
47
  trimControlValue(): void;
48
+ onKeyDown(event: KeyboardEvent): void;
49
49
  copyInputMessage(inputElement: any): void;
50
50
  onTextChange(): void;
51
51
  onFocus(isFocus: boolean): void;
@@ -60,8 +60,8 @@ export declare class TextAreaComponent implements OnInit {
60
60
  stopSpeechRecognition(): void;
61
61
  fireOnChange(text: any): void;
62
62
  ngOnDestroy(): void;
63
- onSpeechLanguageChange(event: any): void;
63
+ onSpeechLanguageChange(event: Event): void;
64
64
  enableOrDisableLanguageSelect(isEnabled?: boolean): void;
65
- static ɵfac: i0.ɵɵFactoryDeclaration<TextAreaComponent, [null, { optional: true; }, null, null, null, null, null, null]>;
65
+ static ɵfac: i0.ɵɵFactoryDeclaration<TextAreaComponent, [null, { optional: true; skipSelf: true; }, { optional: true; }, null, null, null, null, null]>;
66
66
  static ɵcmp: i0.ɵɵComponentDeclaration<TextAreaComponent, "BBSF-TextArea", never, { "group": { "alias": "group"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "onChange": "onChange"; }, never, never, false, never>;
67
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bnsights/bbsf-controls",
3
- "version": "1.0.180",
3
+ "version": "1.0.182",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^17.0.5",
6
6
  "@angular/cdk": "^17.0.2",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@angular/google-maps": "^17.0.3",
16
- "@bnsights/bbsf-utilities": "^1.0.64",
16
+ "@bnsights/bbsf-utilities": "^1.0.66",
17
17
  "@danielmoncada/angular-datetime-picker": "^17.0.0",
18
18
  "@fullcalendar/angular": "^6.1.10",
19
19
  "@fullcalendar/core": "^6.1.10",
@@ -48,7 +48,7 @@
48
48
  "moment": "^2.29.4",
49
49
  "ng-inline-svg-2": "^15.0.1",
50
50
  "ng-pick-datetime": "7.0.0",
51
- "ng2-file-upload": "^5.0.0",
51
+ "ng2-file-upload": "^7.0.1",
52
52
  "ngx-bootstrap": "^11.0.2",
53
53
  "ngx-dropzone": "^3.1.0",
54
54
  "ngx-file-up": "^1.4.7",