@bnsights/bbsf-controls 1.0.181 → 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.
- package/README.md +14 -4
- package/esm2022/lib/Shared/Models/CalendarDTO.mjs +3 -0
- package/esm2022/lib/Shared/Models/FileOptions.mjs +15 -0
- package/esm2022/lib/Shared/Models/FileUploadOptions.mjs +1 -1
- package/esm2022/lib/Shared/Models/index.mjs +58 -0
- package/esm2022/lib/Shared/services/GlobalSettings.service.mjs +1 -1
- package/esm2022/lib/Shared/services/index.mjs +7 -0
- package/esm2022/lib/Shared/services/validationErrorMassage.service.mjs +4 -1
- package/esm2022/lib/controls/FileUpload/FileUpload.component.mjs +318 -186
- package/esm2022/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.mjs +79 -26
- package/esm2022/lib/controls/TextArea/TextArea.component.mjs +115 -38
- package/fesm2022/bnsights-bbsf-controls.mjs +7537 -7249
- package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
- package/lib/Shared/Models/CalendarDTO.d.ts +8 -0
- package/lib/Shared/Models/FileOptions.d.ts +57 -0
- package/lib/Shared/Models/index.d.ts +57 -0
- package/lib/Shared/services/index.d.ts +6 -0
- package/lib/controls/FileUpload/FileUpload.component.d.ts +24 -12
- package/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.d.ts +2 -0
- package/lib/controls/TextArea/TextArea.component.d.ts +8 -8
- package/package.json +3 -3
|
@@ -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,24 +1,20 @@
|
|
|
1
1
|
import { OnInit, AfterViewInit, ElementRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { FormGroup, AbstractControl, ControlContainer, FormGroupDirective } from '@angular/forms';
|
|
3
|
-
import { FileUploadOptions } from '../../Shared/Models/FileUploadOptions';
|
|
4
|
-
import { ControlUtility } from '../../Shared/services/ControlUtility';
|
|
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 {
|
|
10
|
-
import { FileDTO } from '../../Shared/Models
|
|
11
|
-
import { FileUploadService } from '../../Shared/services
|
|
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
|
-
export declare class FileUploadComponent implements OnInit, AfterViewInit {
|
|
9
|
+
export declare class FileUploadComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
14
10
|
private controlContainer;
|
|
15
|
-
|
|
11
|
+
MultipleFileUploadControlHost: FormGroupDirective;
|
|
16
12
|
private controlUtility;
|
|
17
13
|
UtilityService: UtilityService;
|
|
18
14
|
private controlValidationService;
|
|
19
15
|
private globalSettings;
|
|
20
16
|
private fileUploadService;
|
|
21
|
-
static
|
|
17
|
+
static controlContainerStatic: any;
|
|
22
18
|
fileInput: ElementRef;
|
|
23
19
|
isSubmitted: boolean;
|
|
24
20
|
group: FormGroup;
|
|
@@ -36,12 +32,14 @@ export declare class FileUploadComponent implements OnInit, AfterViewInit {
|
|
|
36
32
|
fileLikeObject: FileLikeObject;
|
|
37
33
|
markAllAsTouched: boolean;
|
|
38
34
|
validationRules: any[];
|
|
39
|
-
|
|
35
|
+
validationRulesAsync: any[];
|
|
40
36
|
fileUploadModel: FileUploadModel;
|
|
41
37
|
multipleFileUploadModel: MultipleFileUploadModel;
|
|
42
38
|
file: any;
|
|
43
39
|
deletedFiles: FileDTO[];
|
|
44
|
-
|
|
40
|
+
private destroy$;
|
|
41
|
+
private pendingValidationErrors;
|
|
42
|
+
constructor(controlContainer: ControlContainer, MultipleFileUploadControlHost: FormGroupDirective, controlUtility: ControlUtility, UtilityService: UtilityService, controlValidationService: ControlValidationService, globalSettings: GlobalSettings, fileUploadService: FileUploadService);
|
|
45
43
|
ngOnInit(): void;
|
|
46
44
|
ngAfterViewInit(): void;
|
|
47
45
|
resetError: () => void;
|
|
@@ -57,6 +55,20 @@ export declare class FileUploadComponent implements OnInit, AfterViewInit {
|
|
|
57
55
|
addCustomValidation: (customValidation: any) => void;
|
|
58
56
|
isValid: () => void;
|
|
59
57
|
convertSizeToMB(size: number): number;
|
|
58
|
+
ngOnDestroy(): void;
|
|
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;
|
|
60
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, [{ optional: true; }, null, null, null, null, null, null]>;
|
|
61
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>;
|
|
62
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:
|
|
63
|
+
onSpeechLanguageChange(event: Event): void;
|
|
64
64
|
enableOrDisableLanguageSelect(isEnabled?: boolean): void;
|
|
65
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextAreaComponent, [null, { optional: true; },
|
|
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.
|
|
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.
|
|
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": "^
|
|
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",
|