@bnsights/bbsf-controls 1.0.145 → 1.0.147
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 +8 -0
- package/bnsights-bbsf-controls-1.0.147.tgz +0 -0
- package/esm2022/lib/Shared/Models/TextAreaOptions.mjs +13 -1
- package/esm2022/lib/controls/TextArea/TextArea.component.mjs +110 -6
- package/fesm2022/bnsights-bbsf-controls.mjs +120 -5
- package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
- package/lib/Shared/Models/TextAreaOptions.d.ts +8 -0
- package/lib/controls/TextArea/TextArea.component.d.ts +16 -3
- package/package.json +2 -2
- package/src/lib/assets/Style-rtl.scss +17 -1
- package/src/lib/assets/images/mic-off.svg +11 -0
- package/src/lib/assets/images/mic.svg +5 -0
- package/src/lib/assets/sass/base.scss +71 -2
- package/src/lib/assets/sass/variables.scss +7 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LanguageDTO } from '@bnsights/bbsf-utilities/lib/shared/models';
|
|
1
2
|
import { ForceDirection } from '../Enums/ForceDirection';
|
|
2
3
|
import { ControlOptionsBase } from './ControlOptionsBase';
|
|
3
4
|
export declare class TextAreaOptions extends ControlOptionsBase {
|
|
@@ -20,4 +21,11 @@ export declare class TextAreaOptions extends ControlOptionsBase {
|
|
|
20
21
|
/** to set Direction of TextArea if TextArea is Arabic or English */
|
|
21
22
|
forceDirection: ForceDirection;
|
|
22
23
|
maxLengthWarningLimit: number;
|
|
24
|
+
enableSpeechRecognition: boolean;
|
|
25
|
+
speechLanguages: LanguageDTO[];
|
|
26
|
+
selectedSpeechLanguage: string;
|
|
27
|
+
iconMic: string;
|
|
28
|
+
iconMicOff: string;
|
|
29
|
+
extraClassMicLanguage: string;
|
|
30
|
+
autoSaveSpeechLanguagetoLocalStorage: boolean;
|
|
23
31
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { OnInit, EventEmitter } from '@angular/core';
|
|
2
2
|
import { FormGroup, AbstractControl, ControlContainer, FormGroupDirective } from '@angular/forms';
|
|
3
|
-
import { ControlValidationService, UtilityService } from '@bnsights/bbsf-utilities';
|
|
3
|
+
import { ControlValidationService, LanguageService, UtilityService, SpeechRecognitionService } from '@bnsights/bbsf-utilities';
|
|
4
4
|
import { ControlUtility } from '../../Shared/services/ControlUtility';
|
|
5
5
|
import { TextAreaOptions } from '../../Shared/Models/TextAreaOptions';
|
|
6
6
|
import { GlobalSettings } from '../../Shared/services/GlobalSettings.service';
|
|
7
|
+
import { Subscription } from 'rxjs';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class TextAreaComponent implements OnInit {
|
|
9
10
|
private controlUtility;
|
|
@@ -12,8 +13,10 @@ export declare class TextAreaComponent implements OnInit {
|
|
|
12
13
|
private utilityService;
|
|
13
14
|
private controlValidationService;
|
|
14
15
|
private globalSettings;
|
|
16
|
+
private speechRecognitionService;
|
|
17
|
+
private languageService;
|
|
15
18
|
static controlContainerstatic: any;
|
|
16
|
-
constructor(controlUtility: ControlUtility, controlContainer: ControlContainer, textAreaControlHost: FormGroupDirective, utilityService: UtilityService, controlValidationService: ControlValidationService, globalSettings: GlobalSettings);
|
|
19
|
+
constructor(controlUtility: ControlUtility, controlContainer: ControlContainer, textAreaControlHost: FormGroupDirective, utilityService: UtilityService, controlValidationService: ControlValidationService, globalSettings: GlobalSettings, speechRecognitionService: SpeechRecognitionService, languageService: LanguageService);
|
|
17
20
|
group: FormGroup;
|
|
18
21
|
options: TextAreaOptions;
|
|
19
22
|
onChange: EventEmitter<any>;
|
|
@@ -30,7 +33,11 @@ export declare class TextAreaComponent implements OnInit {
|
|
|
30
33
|
charsLimitMsgClass: string;
|
|
31
34
|
minCharsLimit: number;
|
|
32
35
|
maxLimitWarningMsg: string;
|
|
36
|
+
isMicOn: boolean;
|
|
33
37
|
textDir: any;
|
|
38
|
+
isFocused: boolean;
|
|
39
|
+
currentLanguage: String;
|
|
40
|
+
subscription: Subscription;
|
|
34
41
|
ngOnInit(): void;
|
|
35
42
|
ngAfterViewInit(): void;
|
|
36
43
|
resetError: () => void;
|
|
@@ -46,6 +53,12 @@ export declare class TextAreaComponent implements OnInit {
|
|
|
46
53
|
removeCustomValidation: (customValidation: any) => void;
|
|
47
54
|
addCustomValidation: (customValidation: any) => void;
|
|
48
55
|
isValid: () => void;
|
|
49
|
-
|
|
56
|
+
setSpeechLanguage(): void;
|
|
57
|
+
loadSelectedSpeechLanguage(): void;
|
|
58
|
+
startSpeechRecognition(): void;
|
|
59
|
+
stopSpeechRecognition(): void;
|
|
60
|
+
ngOnDestroy(): void;
|
|
61
|
+
onSpeechLanguageChange(event: any): void;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextAreaComponent, [null, { optional: true; }, null, null, null, null, null, null]>;
|
|
50
63
|
static ɵcmp: i0.ɵɵComponentDeclaration<TextAreaComponent, "BBSF-TextArea", never, { "group": { "alias": "group"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "onChange": "onChange"; }, never, never, false, never>;
|
|
51
64
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bnsights/bbsf-controls",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.147",
|
|
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.
|
|
15
|
+
"@bnsights/bbsf-utilities": "^1.0.56",
|
|
16
16
|
"@danielmoncada/angular-datetime-picker": "^17.0.0",
|
|
17
17
|
"@fullcalendar/angular": "^6.1.10",
|
|
18
18
|
"@fullcalendar/core": "^6.1.10",
|
|
@@ -280,7 +280,16 @@ input::-webkit-inner-spin-button {
|
|
|
280
280
|
right: auto !important;
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
|
|
283
|
+
//textarea mic
|
|
284
|
+
.bbsf-control.form-group .bbsf-input-container .language-container {
|
|
285
|
+
left: 10%;
|
|
286
|
+
right: auto;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.bbsf-control.form-group .bbsf-input-container > .language-container:nth-child(2) {
|
|
290
|
+
left: 2% !important;
|
|
291
|
+
right: auto !important;
|
|
292
|
+
}
|
|
284
293
|
@media screen and (min-width: 767px) and (max-width: 991px) {
|
|
285
294
|
.form-group.bbsf-control.bbsf-phone .bbsf-input-container .form-control {
|
|
286
295
|
.dropdown-menu.show {
|
|
@@ -289,4 +298,11 @@ input::-webkit-inner-spin-button {
|
|
|
289
298
|
}
|
|
290
299
|
}
|
|
291
300
|
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@media screen and (max-width: 767px) {
|
|
304
|
+
.bbsf-control.form-group .bbsf-input-container .language-container {
|
|
305
|
+
left: 14%;
|
|
306
|
+
right: auto;
|
|
307
|
+
}
|
|
292
308
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg width="16" height="19" viewBox="0 0 16 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Group 37303">
|
|
3
|
+
<g id="Group">
|
|
4
|
+
<path id="Vector" d="M7.92466 13.3485H7.27012C6.40214 13.3485 5.56971 13.0037 4.95595 12.3899C4.3422 11.7762 3.99739 10.9437 3.99739 10.0757V4.18484C3.99739 3.31686 4.3422 2.48442 4.95595 1.87067C5.56971 1.25691 6.40214 0.912109 7.27012 0.912109H7.92466C8.79265 0.912109 9.62508 1.25691 10.2388 1.87067C10.8526 2.48442 11.1974 3.31686 11.1974 4.18484V10.0757C11.1974 10.9437 10.8526 11.7762 10.2388 12.3899C9.62508 13.0037 8.79265 13.3485 7.92466 13.3485ZM12.8894 12.527C12.9328 12.4515 12.9444 12.3618 12.9217 12.2778C12.899 12.1937 12.8438 12.1221 12.7683 12.0787C12.6928 12.0353 12.6031 12.0236 12.519 12.0463C12.435 12.069 12.3633 12.1242 12.3199 12.1997C11.8519 13.0417 11.1672 13.7432 10.3369 14.2316C9.50653 14.72 8.56072 14.9776 7.59739 14.9776C6.63407 14.9776 5.68826 14.72 4.85792 14.2316C4.02759 13.7432 3.34292 13.0417 2.87485 12.1997C2.85336 12.1624 2.82471 12.1296 2.79055 12.1032C2.75639 12.0769 2.71738 12.0576 2.67574 12.0463C2.63411 12.0351 2.59067 12.0322 2.5479 12.0377C2.50513 12.0433 2.46387 12.0572 2.42648 12.0787C2.38909 12.1001 2.3563 12.1288 2.32998 12.1629C2.30366 12.1971 2.28432 12.2361 2.27308 12.2778C2.25037 12.3618 2.26199 12.4515 2.30539 12.527C2.82985 13.4706 3.59705 14.2568 4.52752 14.8041C5.45798 15.3515 6.51787 15.6401 7.59739 15.6401C8.67691 15.6401 9.7368 15.3515 10.6673 14.8041C11.5977 14.2568 12.3649 13.4706 12.8894 12.527ZM9.8883 18.2576H7.92466V16.9485C7.92466 16.8617 7.89018 16.7784 7.82881 16.7171C7.76743 16.6557 7.68419 16.6212 7.59739 16.6212C7.51059 16.6212 7.42735 16.6557 7.36597 16.7171C7.3046 16.7784 7.27012 16.8617 7.27012 16.9485V18.2576H5.30648C5.21968 18.2576 5.13644 18.292 5.07507 18.3534C5.01369 18.4148 4.97921 18.498 4.97921 18.5848C4.97921 18.6716 5.01369 18.7549 5.07507 18.8163C5.13644 18.8776 5.21968 18.9121 5.30648 18.9121H9.8883C9.9751 18.9121 10.0583 18.8776 10.1197 18.8163C10.1811 18.7549 10.2156 18.6716 10.2156 18.5848C10.2156 18.498 10.1811 18.4148 10.1197 18.3534C10.0583 18.292 9.9751 18.2576 9.8883 18.2576Z" fill="#8b8b8b"/>
|
|
5
|
+
</g>
|
|
6
|
+
<g id="Group 37302">
|
|
7
|
+
<rect id="Rectangle 9076" x="14.207" y="1.91211" width="1.2" height="19.9588" rx="0.6" transform="rotate(44.3252 14.207 1.91211)" fill="#8b8b8b"/>
|
|
8
|
+
<rect id="Rectangle 9077" x="14.168" y="1.91211" width="0.765394" height="19.9002" rx="0.382697" transform="rotate(44.3252 14.168 1.91211)" fill="#8b8b8b"/>
|
|
9
|
+
</g>
|
|
10
|
+
</g>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="11" height="19" viewBox="0 0 11 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Group">
|
|
3
|
+
<path id="Vector" d="M5.99107 13.3485H5.33653C4.46854 13.3485 3.63611 13.0037 3.02236 12.3899C2.4086 11.7762 2.0638 10.9437 2.0638 10.0757V4.18484C2.0638 3.31686 2.4086 2.48442 3.02236 1.87067C3.63611 1.25691 4.46854 0.912109 5.33653 0.912109H5.99107C6.85905 0.912109 7.69148 1.25691 8.30524 1.87067C8.91899 2.48442 9.2638 3.31686 9.2638 4.18484V10.0757C9.2638 10.9437 8.91899 11.7762 8.30524 12.3899C7.69148 13.0037 6.85905 13.3485 5.99107 13.3485ZM10.9558 12.527C10.9992 12.4515 11.0108 12.3618 10.9881 12.2778C10.9654 12.1937 10.9102 12.1221 10.8347 12.0787C10.7592 12.0353 10.6695 12.0236 10.5854 12.0463C10.5014 12.069 10.4297 12.1242 10.3863 12.1997C9.91827 13.0417 9.2336 13.7432 8.40327 14.2316C7.57293 14.72 6.62712 14.9776 5.6638 14.9776C4.70047 14.9776 3.75466 14.72 2.92433 14.2316C2.09399 13.7432 1.40933 13.0417 0.941253 12.1997C0.919764 12.1624 0.89112 12.1296 0.856958 12.1032C0.822796 12.0769 0.783784 12.0576 0.74215 12.0463C0.700515 12.0351 0.657074 12.0322 0.614306 12.0377C0.571538 12.0433 0.53028 12.0572 0.492889 12.0787C0.455499 12.1001 0.422706 12.1288 0.396385 12.1629C0.370064 12.1971 0.350729 12.2361 0.339485 12.2778C0.316776 12.3618 0.328399 12.4515 0.371798 12.527C0.89626 13.4706 1.66346 14.2568 2.59392 14.8041C3.52439 15.3515 4.58428 15.6401 5.6638 15.6401C6.74332 15.6401 7.80321 15.3515 8.73367 14.8041C9.66414 14.2568 10.4313 13.4706 10.9558 12.527ZM7.95471 18.2576H5.99107V16.9485C5.99107 16.8617 5.95659 16.7784 5.89522 16.7171C5.83384 16.6557 5.7506 16.6212 5.6638 16.6212C5.577 16.6212 5.49376 16.6557 5.43238 16.7171C5.37101 16.7784 5.33653 16.8617 5.33653 16.9485V18.2576H3.37289C3.28609 18.2576 3.20285 18.292 3.14147 18.3534C3.0801 18.4148 3.04562 18.498 3.04562 18.5848C3.04562 18.6716 3.0801 18.7549 3.14147 18.8163C3.20285 18.8776 3.28609 18.9121 3.37289 18.9121H7.95471C8.04151 18.9121 8.12475 18.8776 8.18612 18.8163C8.2475 18.7549 8.28198 18.6716 8.28198 18.5848C8.28198 18.498 8.2475 18.4148 8.18612 18.3534C8.12475 18.292 8.04151 18.2576 7.95471 18.2576Z" fill="#8b8b8b"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
input,
|
|
23
23
|
textarea {
|
|
24
|
-
padding-right: 40px;
|
|
24
|
+
padding-right: 40px !important;
|
|
25
25
|
|
|
26
26
|
&[dir="rtl"] {
|
|
27
27
|
padding-left: 40px !important;
|
|
@@ -29,7 +29,28 @@
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
&.p-80px {
|
|
33
|
+
input,
|
|
34
|
+
textarea {
|
|
35
|
+
padding-right: 80px !important;
|
|
36
|
+
|
|
37
|
+
&[dir="rtl"] {
|
|
38
|
+
padding-left: 80px !important;
|
|
39
|
+
padding-right: 1rem !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
&.p-120px {
|
|
44
|
+
input,
|
|
45
|
+
textarea {
|
|
46
|
+
padding-right: 120px !important;
|
|
32
47
|
|
|
48
|
+
&[dir="rtl"] {
|
|
49
|
+
padding-left: 120px !important;
|
|
50
|
+
padding-right: 1rem !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
33
54
|
input:disabled {
|
|
34
55
|
cursor: not-allowed !important;
|
|
35
56
|
}
|
|
@@ -132,8 +153,44 @@
|
|
|
132
153
|
background: #e5e5e5
|
|
133
154
|
}
|
|
134
155
|
}
|
|
156
|
+
.language-container {
|
|
157
|
+
position: absolute;
|
|
158
|
+
right: 10%;
|
|
159
|
+
top: 45%;
|
|
160
|
+
transform: translateY(-35%);
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
width: auto;
|
|
163
|
+
padding: 0.62rem 0.62rem 0.62rem 0.9rem;
|
|
164
|
+
display: flex;
|
|
165
|
+
border-radius: $bbsf-rounded;
|
|
166
|
+
background: $mic-bg;
|
|
167
|
+
gap: .4rem;
|
|
168
|
+
align-items: center;
|
|
169
|
+
|
|
170
|
+
&:hover {
|
|
171
|
+
background: $mic-bg-hover;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.language-select {
|
|
175
|
+
color: $mic-text;
|
|
176
|
+
padding: 0;
|
|
177
|
+
margin: 0 auto;
|
|
178
|
+
border: 0;
|
|
179
|
+
max-width: 36px;
|
|
180
|
+
text-align: center;
|
|
181
|
+
background: transparent;
|
|
182
|
+
line-height: 0;
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
font-size: .8rem;
|
|
185
|
+
font-weight: 700;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
}
|
|
191
|
+
.bbsf-input-container > .language-container:nth-child(2) {
|
|
192
|
+
right: 2% !important;
|
|
135
193
|
}
|
|
136
|
-
|
|
137
194
|
/* horizontal form control*/
|
|
138
195
|
.bbsf-horizontal {
|
|
139
196
|
display: flex;
|
|
@@ -259,4 +316,16 @@ input::-webkit-inner-spin-button {
|
|
|
259
316
|
.btn-icon-o.btn-secondary.active:focus,
|
|
260
317
|
.show>.btn-icon-o.btn-secondary.dropdown-toggle:focus {
|
|
261
318
|
box-shadow: none;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.expanded .language-container {
|
|
322
|
+
top: 25% !important;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
//responsive
|
|
326
|
+
@media screen and (max-width: 767px) {
|
|
327
|
+
.bbsf-control.form-group .bbsf-input-container .language-container {
|
|
328
|
+
left: 14%;
|
|
329
|
+
right: auto;
|
|
330
|
+
}
|
|
262
331
|
}
|