@seniorsistemas/angular-components 17.26.8 → 17.26.9-bugfix-sds-309-cfd66723

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 (34) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +174 -75
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/dynamic-form/configurations/fields/text-area-field.d.ts +8 -6
  6. package/components/dynamic-form/configurations/fields/text-area-ia-field.d.ts +6 -0
  7. package/components/speech-recognition/speech-recognition/speech-recognition.component.d.ts +3 -0
  8. package/components/speech-recognition/speech-recognition.service.d.ts +6 -1
  9. package/components/text-area/text-area/text-area.component.d.ts +3 -0
  10. package/components/text-area-ia/text-area-ia.component.d.ts +2 -0
  11. package/esm2015/components/dynamic-form/components/fields/text-area/text-area-field.component.js +2 -2
  12. package/esm2015/components/dynamic-form/components/fields/text-area-ia/text-area-ia-field.component.js +6 -4
  13. package/esm2015/components/dynamic-form/configurations/fields/text-area-field.js +9 -3
  14. package/esm2015/components/dynamic-form/configurations/fields/text-area-ia-field.js +5 -2
  15. package/esm2015/components/speech-recognition/speech-recognition/speech-recognition.component.js +32 -10
  16. package/esm2015/components/speech-recognition/speech-recognition.service.js +96 -57
  17. package/esm2015/components/text-area/text-area/text-area.component.js +14 -3
  18. package/esm2015/components/text-area-ia/text-area-ia.component.js +10 -2
  19. package/esm2015/locale/fallback.js +3 -2
  20. package/esm5/components/dynamic-form/components/fields/text-area/text-area-field.component.js +2 -2
  21. package/esm5/components/dynamic-form/components/fields/text-area-ia/text-area-ia-field.component.js +6 -4
  22. package/esm5/components/dynamic-form/configurations/fields/text-area-field.js +10 -4
  23. package/esm5/components/dynamic-form/configurations/fields/text-area-ia-field.js +5 -2
  24. package/esm5/components/speech-recognition/speech-recognition/speech-recognition.component.js +33 -10
  25. package/esm5/components/speech-recognition/speech-recognition.service.js +106 -57
  26. package/esm5/components/text-area/text-area/text-area.component.js +14 -3
  27. package/esm5/components/text-area-ia/text-area-ia.component.js +10 -2
  28. package/esm5/locale/fallback.js +3 -2
  29. package/fesm2015/seniorsistemas-angular-components.js +163 -75
  30. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  31. package/fesm5/seniorsistemas-angular-components.js +174 -75
  32. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  33. package/package.json +1 -1
  34. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -6635,20 +6635,26 @@ class SliderField extends Field {
6635
6635
 
6636
6636
  class TextAreaField extends Field {
6637
6637
  constructor(config) {
6638
- var _a;
6638
+ var _a, _b, _c;
6639
6639
  super(config);
6640
+ this.style = {
6641
+ resize: 'vertical'
6642
+ };
6640
6643
  this.cols = config.cols;
6641
6644
  this.rows = config.rows;
6642
6645
  this.keyFilter = config.keyFilter;
6643
- this.style = config.style;
6646
+ this.style = Object.assign(Object.assign({}, config.style), this.style);
6644
6647
  this.readonly = config.readonly;
6645
6648
  this.speechRecognition = (_a = config.speechRecognition) !== null && _a !== void 0 ? _a : false;
6649
+ this.keepContext = (_b = config.keepContext) !== null && _b !== void 0 ? _b : false;
6650
+ this.speechRecognitionPlaceholder = (_c = config.speechRecognitionPlaceholder) !== null && _c !== void 0 ? _c : '';
6651
+ this.maxLength = config.maxLength;
6646
6652
  }
6647
6653
  }
6648
6654
 
6649
6655
  class TextAreaIAField extends Field {
6650
6656
  constructor(config) {
6651
- var _a;
6657
+ var _a, _b, _c;
6652
6658
  super(config);
6653
6659
  this.style = {
6654
6660
  resize: 'vertical'
@@ -6660,6 +6666,9 @@ class TextAreaIAField extends Field {
6660
6666
  this.prompt = config.prompt;
6661
6667
  this.readonly = config.readonly;
6662
6668
  this.speechRecognition = (_a = config.speechRecognition) !== null && _a !== void 0 ? _a : false;
6669
+ this.keepContext = (_b = config.keepContext) !== null && _b !== void 0 ? _b : false;
6670
+ this.speechRecognitionPlaceholder = (_c = config.speechRecognitionPlaceholder) !== null && _c !== void 0 ? _c : '';
6671
+ this.maxLength = config.maxLength;
6663
6672
  }
6664
6673
  }
6665
6674
 
@@ -10608,74 +10617,80 @@ SliderFieldComponent = __decorate([
10608
10617
  ], SliderFieldComponent);
10609
10618
 
10610
10619
  let SpeechRecognitionService = class SpeechRecognitionService {
10611
- constructor(localeService, ngZone) {
10620
+ constructor(localeService, ngZone, toastService, translateService) {
10612
10621
  this.localeService = localeService;
10613
10622
  this.ngZone = ngZone;
10623
+ this.toastService = toastService;
10624
+ this.translateService = translateService;
10614
10625
  this.hasSupportSpeechRecognition = false;
10615
10626
  this.isListening = false;
10616
10627
  this.TIMEOUT_NO_MESSAGE = 3000;
10617
10628
  this.setRecognition();
10618
10629
  }
10619
10630
  listen() {
10631
+ const speechSubject = new Subject();
10620
10632
  if (this.isListening) {
10621
- return;
10633
+ speechSubject.error('Already listening');
10622
10634
  }
10623
- const speechSubject = new Subject();
10624
- this.isListening = true;
10625
- this.recognition.continuous = true;
10626
- this.recognition.interimResults = true;
10627
- this.recognition.maxAlternatives = 1;
10628
- let silenceTimer;
10629
- const restartSilenceTimer = () => {
10630
- if (silenceTimer !== undefined) {
10631
- clearTimeout(silenceTimer);
10635
+ this.hasMicrophoneAccess().then((hasAccess) => {
10636
+ if (!hasAccess) {
10637
+ this.toastService.show({ severity: 'error', text: this.translateService.instant('platform.angular_components.no_microphone_permission') });
10638
+ speechSubject.error('Microphone access is disabled');
10639
+ return;
10632
10640
  }
10633
- silenceTimer = setTimeout(() => {
10634
- this.recognition.stop();
10635
- }, this.TIMEOUT_NO_MESSAGE);
10636
- };
10637
- let fullTranscript = '';
10638
- let interimTranscript = '';
10639
- this.recognition.onresult = (event) => {
10640
- this.ngZone.run(() => {
10641
- restartSilenceTimer();
10642
- let interimTranscript = '';
10643
- for (let i = event.resultIndex; i < event.results.length; ++i) {
10644
- const transcript = event.results[i][0].transcript;
10645
- if (event.results[i].isFinal) {
10646
- fullTranscript += transcript + '\n';
10647
- }
10648
- else {
10649
- interimTranscript += transcript;
10650
- }
10651
- }
10652
- interimTranscript = interimTranscript;
10653
- speechSubject.next({ text: fullTranscript + interimTranscript, isFinal: false });
10654
- });
10655
- };
10656
- this.recognition.onerror = () => {
10657
- this.ngZone.run(() => {
10641
+ this.isListening = true;
10642
+ this.recognition.continuous = true;
10643
+ this.recognition.interimResults = true;
10644
+ this.recognition.maxAlternatives = 1;
10645
+ let silenceTimer;
10646
+ const restartSilenceTimer = () => {
10658
10647
  if (silenceTimer !== undefined) {
10659
10648
  clearTimeout(silenceTimer);
10660
10649
  }
10661
- this.isListening = false;
10662
- speechSubject.next({
10663
- isFinal: true,
10664
- text: ''
10650
+ silenceTimer = setTimeout(() => {
10651
+ this.recognition.stop();
10652
+ }, this.TIMEOUT_NO_MESSAGE);
10653
+ };
10654
+ let fullTranscript = '';
10655
+ let interimTranscript = '';
10656
+ this.recognition.onresult = (event) => {
10657
+ this.ngZone.run(() => {
10658
+ restartSilenceTimer();
10659
+ let interimTranscript = '';
10660
+ for (let i = event.resultIndex; i < event.results.length; ++i) {
10661
+ const transcript = event.results[i][0].transcript;
10662
+ if (event.results[i].isFinal) {
10663
+ fullTranscript += transcript + '\n';
10664
+ }
10665
+ else {
10666
+ interimTranscript += transcript;
10667
+ }
10668
+ }
10669
+ interimTranscript = interimTranscript;
10670
+ speechSubject.next({ text: fullTranscript + interimTranscript, isFinal: false });
10665
10671
  });
10666
- });
10667
- };
10668
- this.recognition.onend = () => {
10669
- this.ngZone.run(() => {
10670
- if (silenceTimer !== undefined) {
10671
- clearTimeout(silenceTimer);
10672
- }
10673
- speechSubject.next({ text: fullTranscript + interimTranscript, isFinal: true });
10674
- this.isListening = false;
10675
- speechSubject.complete();
10676
- });
10677
- };
10678
- this.recognition.start();
10672
+ };
10673
+ this.recognition.onerror = () => {
10674
+ this.ngZone.run(() => {
10675
+ if (silenceTimer !== undefined) {
10676
+ clearTimeout(silenceTimer);
10677
+ }
10678
+ this.isListening = false;
10679
+ speechSubject.error('Speech recognition error');
10680
+ });
10681
+ };
10682
+ this.recognition.onend = () => {
10683
+ this.ngZone.run(() => {
10684
+ if (silenceTimer !== undefined) {
10685
+ clearTimeout(silenceTimer);
10686
+ }
10687
+ speechSubject.next({ text: fullTranscript + interimTranscript, isFinal: true });
10688
+ this.isListening = false;
10689
+ speechSubject.complete();
10690
+ });
10691
+ };
10692
+ this.recognition.start();
10693
+ });
10679
10694
  return speechSubject;
10680
10695
  }
10681
10696
  stop() {
@@ -10695,12 +10710,41 @@ let SpeechRecognitionService = class SpeechRecognitionService {
10695
10710
  this.recognition.maxAlternatives = 1;
10696
10711
  this.localeService.getLocale().subscribe(locale => this.recognition.lang = locale);
10697
10712
  }
10713
+ hasMicrophoneAccess() {
10714
+ return __awaiter(this, void 0, void 0, function* () {
10715
+ try {
10716
+ const permission = yield navigator.permissions.query({ name: 'microphone' });
10717
+ if (permission.state === 'denied') {
10718
+ return false;
10719
+ }
10720
+ if (permission.state === 'granted') {
10721
+ return true;
10722
+ }
10723
+ if (permission.state === 'prompt') {
10724
+ try {
10725
+ const stream = yield navigator.mediaDevices.getUserMedia({ audio: true });
10726
+ stream.getTracks().forEach(t => t.stop());
10727
+ return true;
10728
+ }
10729
+ catch (_a) {
10730
+ return false;
10731
+ }
10732
+ }
10733
+ return false;
10734
+ }
10735
+ catch (_b) {
10736
+ return false;
10737
+ }
10738
+ });
10739
+ }
10698
10740
  };
10699
10741
  SpeechRecognitionService.ctorParameters = () => [
10700
10742
  { type: LocaleService },
10701
- { type: NgZone }
10743
+ { type: NgZone },
10744
+ { type: ToastService },
10745
+ { type: TranslateService }
10702
10746
  ];
10703
- SpeechRecognitionService.ɵprov = ɵɵdefineInjectable({ factory: function SpeechRecognitionService_Factory() { return new SpeechRecognitionService(ɵɵinject(LocaleService), ɵɵinject(NgZone)); }, token: SpeechRecognitionService, providedIn: "root" });
10747
+ SpeechRecognitionService.ɵprov = ɵɵdefineInjectable({ factory: function SpeechRecognitionService_Factory() { return new SpeechRecognitionService(ɵɵinject(LocaleService), ɵɵinject(NgZone), ɵɵinject(ToastService), ɵɵinject(TranslateService)); }, token: SpeechRecognitionService, providedIn: "root" });
10704
10748
  SpeechRecognitionService = __decorate([
10705
10749
  Injectable({
10706
10750
  providedIn: 'root'
@@ -10750,14 +10794,16 @@ let TextAreaIAFieldComponent = class TextAreaIAFieldComponent {
10750
10794
  this.hideDialog();
10751
10795
  }
10752
10796
  _createDialogFields() {
10753
- var _a;
10797
+ var _a, _b;
10754
10798
  this.fields = [
10755
10799
  new FormField({
10756
10800
  name: "context",
10757
10801
  type: FieldType.Text,
10758
10802
  label: this._translateService.instant("platform.angular_components.context"),
10759
10803
  size: { sm: 12, md: 12, lg: 12, xl: 12 },
10760
- speechRecognition: (_a = this.field.speechRecognition) !== null && _a !== void 0 ? _a : false
10804
+ speechRecognition: (_a = this.field.speechRecognition) !== null && _a !== void 0 ? _a : false,
10805
+ keepContext: (_b = this.field.keepContext) !== null && _b !== void 0 ? _b : false,
10806
+ maxLength: this.field.maxLength,
10761
10807
  }),
10762
10808
  ];
10763
10809
  }
@@ -10781,7 +10827,7 @@ __decorate([
10781
10827
  ], TextAreaIAFieldComponent.prototype, "formControl", void 0);
10782
10828
  TextAreaIAFieldComponent = __decorate([
10783
10829
  Component({
10784
- template: "<s-field-label [field]=\"field\"\n *ngIf=\"textArea.renderTextArea\"\n [fieldContainerRef]=\"textArea.textAreaElement?.nativeElement\"></s-field-label>\n\n<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\">\n</s-loading-state>\n\n<p-dialog\n [(visible)]=\"isVisible\"\n [modal]=\"true\"\n [style]=\"{ width: '50vw' }\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n (onHide)=\"onHideDialog()\">\n <p-header>\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n IAssist - Content Generator\n </div>\n </p-header>\n <s-dynamic-form\n [fields]=\"fields\"\n [form]=\"formGroup\">\n </s-dynamic-form>\n <p-footer>\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (onClick)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\">\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (onClick)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\">\n </s-button>\n </div>\n </p-footer>\n</p-dialog>\n\n<div class=\"textarea-ia\">\n <s-textarea\n #textArea\n [inputId]=\"(field.id || field.name)\"\n [rows]=\"field.rows\"\n [formControl]=\"formControl\"\n [inputStyle]=\"field.style\"\n [readOnly]=\"field.readonly ? field.readonly() : false\"\n [speechRecognition]=\"field.speechRecognition\"\n [placeholder]=\"field.placeholder\"\n ></s-textarea>\n <button\n class=\"iassist-button\"\n [class.speech-recognition]=\"field.speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n (click)=\"showDialog()\"\n sTooltip=\"IAssist - Content Generator\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg style=\"width: 100%; height: 100%;\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\" fill=\"#0FA389\"/>\n <path d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\" fill=\"#0FA389\"/>\n <path d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\" fill=\"#F3F3F5\"/>\n <path d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\" fill=\"#0C847B\"/>\n <path d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\" fill=\"#0C847B\"/>\n </svg>\n</ng-template>\n",
10830
+ template: "<s-field-label [field]=\"field\"\n *ngIf=\"textArea.renderTextArea\"\n [fieldContainerRef]=\"textArea.textAreaElement?.nativeElement\"></s-field-label>\n\n<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\">\n</s-loading-state>\n\n<p-dialog\n [(visible)]=\"isVisible\"\n [modal]=\"true\"\n [style]=\"{ width: '50vw' }\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n (onHide)=\"onHideDialog()\">\n <p-header>\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n IAssist - Content Generator\n </div>\n </p-header>\n <s-dynamic-form\n [fields]=\"fields\"\n [form]=\"formGroup\">\n </s-dynamic-form>\n <p-footer>\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (onClick)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\">\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (onClick)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\">\n </s-button>\n </div>\n </p-footer>\n</p-dialog>\n\n<div class=\"textarea-ia\">\n <s-textarea\n #textArea\n [inputId]=\"(field.id || field.name)\"\n [rows]=\"field.rows\"\n [formControl]=\"formControl\"\n [inputStyle]=\"field.style\"\n [readOnly]=\"field.readonly ? field.readonly() : false\"\n [speechRecognition]=\"field.speechRecognition\"\n [placeholder]=\"field.placeholder\"\n [keepContext]=\"field.keepContext\"\n [speechRecognitionPlaceholder]=\"field.speechRecognitionPlaceholder\"\n [maxLength]=\"field.maxLength\"\n ></s-textarea>\n <button\n class=\"iassist-button\"\n [class.speech-recognition]=\"field.speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n (click)=\"showDialog()\"\n sTooltip=\"IAssist - Content Generator\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg style=\"width: 100%; height: 100%;\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\" fill=\"#0FA389\"/>\n <path d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\" fill=\"#0FA389\"/>\n <path d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\" fill=\"#F3F3F5\"/>\n <path d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\" fill=\"#0C847B\"/>\n <path d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\" fill=\"#0C847B\"/>\n </svg>\n</ng-template>\n",
10785
10831
  styles: [".footer-content{display:-ms-flexbox;display:flex;-ms-flex-positive:0;flex-grow:0}.textarea-ia{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;gap:8px}.textarea-ia s-textarea{width:100%}.iassist-button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border:none;border-radius:50%;box-shadow:none;cursor:pointer;height:32px;width:32px}.dialog-header{display:-ms-flexbox;display:flex;gap:12px}.dialog-header .iassist-icon{display:block;height:24px;width:24px}.speech-recognition{margin-bottom:12.5px}"]
10786
10832
  })
10787
10833
  ], TextAreaIAFieldComponent);
@@ -10808,7 +10854,7 @@ __decorate([
10808
10854
  ], TextAreaFieldComponent.prototype, "inputRef", void 0);
10809
10855
  TextAreaFieldComponent = __decorate([
10810
10856
  Component({
10811
- template: "<s-field-label *ngIf=\"textArea\" [field]=\"field\"\n [fieldContainerRef]=\"textArea.textAreaElement?.nativeElement\"></s-field-label>\n\n<s-textarea\n #textArea\n [inputId]=\"(field.id || field.name)\"\n [rows]=\"field.rows\"\n [formControl]=\"formControl\"\n [inputStyle]=\"field.style\"\n [readOnly]=\"field.readonly ? field.readonly() : false\"\n [keyFilter]=\"field.keyFilter\"\n [placeholder]=\"field.placeholder\"\n [speechRecognition]=\"field.speechRecognition\">\n</s-textarea>\n"
10857
+ template: "<s-field-label *ngIf=\"textArea\" [field]=\"field\"\n [fieldContainerRef]=\"textArea.textAreaElement?.nativeElement\"></s-field-label>\n\n<s-textarea\n #textArea\n [inputId]=\"(field.id || field.name)\"\n [rows]=\"field.rows\"\n [formControl]=\"formControl\"\n [inputStyle]=\"field.style\"\n [readOnly]=\"field.readonly ? field.readonly() : false\"\n [keyFilter]=\"field.keyFilter\"\n [placeholder]=\"field.placeholder\"\n [keepContext]=\"field.keepContext\"\n [speechRecognitionPlaceholder]=\"field.speechRecognitionPlaceholder\"\n [maxLength]=\"field.maxLength\"\n [speechRecognition]=\"field.speechRecognition\">\n</s-textarea>\n"
10812
10858
  })
10813
10859
  ], TextAreaFieldComponent);
10814
10860
 
@@ -12595,6 +12641,8 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent {
12595
12641
  this.inputId = `textarea-${Math.random()}`;
12596
12642
  this.rows = 5;
12597
12643
  this.speechRecognition = false;
12644
+ this.keepContext = false;
12645
+ this.speechRecognitionPlaceholder = '';
12598
12646
  this._inputStyle = {
12599
12647
  resize: 'vertical'
12600
12648
  };
@@ -12671,6 +12719,15 @@ __decorate([
12671
12719
  __decorate([
12672
12720
  Input()
12673
12721
  ], TextAreaComponent.prototype, "keyFilter", void 0);
12722
+ __decorate([
12723
+ Input()
12724
+ ], TextAreaComponent.prototype, "keepContext", void 0);
12725
+ __decorate([
12726
+ Input()
12727
+ ], TextAreaComponent.prototype, "speechRecognitionPlaceholder", void 0);
12728
+ __decorate([
12729
+ Input()
12730
+ ], TextAreaComponent.prototype, "maxLength", void 0);
12674
12731
  __decorate([
12675
12732
  Input()
12676
12733
  ], TextAreaComponent.prototype, "placeholder", null);
@@ -12683,7 +12740,7 @@ __decorate([
12683
12740
  TextAreaComponent = TextAreaComponent_1 = __decorate([
12684
12741
  Component({
12685
12742
  selector: 's-textarea',
12686
- template: "<textarea\n *ngIf=\"keyFilter\"\n #textArea\n class=\"textarea\"\n [pKeyFilter]=\"keyFilter\"\n [id]=\"inputId\"\n [rows]=\"rows\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [ngStyle]=\"inputStyle\"\n [readOnly]=\"readOnly\"\n [placeholder]=\"placeholder\"\n (ngModelChange)=\"setValue($event)\">\n</textarea>\n\n<textarea\n *ngIf=\"!keyFilter\"\n #textArea\n class=\"textarea\"\n [id]=\"inputId\"\n [rows]=\"rows\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [ngStyle]=\"inputStyle\"\n [readOnly]=\"readOnly\"\n [placeholder]=\"placeholder\"\n (ngModelChange)=\"setValue($event)\">\n</textarea>\n\n<s-speech-recognition\n *ngIf=\"speechRecognition && renderTextArea\"\n [textAreaElement]=\"textAreaElement.nativeElement\"\n (recognizedText)=\"handleRecognizedText($event)\">\n</s-speech-recognition>\n",
12743
+ template: "<textarea\n *ngIf=\"keyFilter\"\n #textArea\n class=\"textarea\"\n [pKeyFilter]=\"keyFilter\"\n [id]=\"inputId\"\n [rows]=\"rows\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [ngStyle]=\"inputStyle\"\n [readOnly]=\"readOnly\"\n [placeholder]=\"placeholder\"\n [maxlength]=\"maxLength\"\n (ngModelChange)=\"setValue($event)\">\n</textarea>\n\n<textarea\n *ngIf=\"!keyFilter\"\n #textArea\n class=\"textarea\"\n [id]=\"inputId\"\n [rows]=\"rows\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [ngStyle]=\"inputStyle\"\n [readOnly]=\"readOnly\"\n [placeholder]=\"placeholder\"\n [maxlength]=\"maxLength\"\n (ngModelChange)=\"setValue($event)\">\n</textarea>\n\n<s-speech-recognition\n *ngIf=\"speechRecognition && renderTextArea\"\n [textAreaElement]=\"textAreaElement.nativeElement\"\n [keepContext]=\"keepContext\"\n [speechRecognitionPlaceholder]=\"speechRecognitionPlaceholder\"\n (recognizedText)=\"handleRecognizedText($event)\">\n</s-speech-recognition>\n",
12687
12744
  providers: [
12688
12745
  {
12689
12746
  provide: NG_VALUE_ACCESSOR,
@@ -12691,7 +12748,7 @@ TextAreaComponent = TextAreaComponent_1 = __decorate([
12691
12748
  multi: true,
12692
12749
  },
12693
12750
  ],
12694
- styles: [".textarea{border-radius:3px;border:1px solid #c1c1cc;background:#fff;width:100%;max-width:100%;min-height:4em;min-width:10em;outline:0;padding:8px;display:block}.textarea:disabled{opacity:.5}"]
12751
+ styles: [".textarea{border-radius:3px;border:1px solid #c1c1cc;background:#fff;width:100%;max-width:100%;min-height:4em;min-width:10em;outline:0;padding:8px;display:block}.textarea:disabled{opacity:.5}:host.ng-invalid.ng-dirty .textarea{border-color:#c13018}"]
12695
12752
  })
12696
12753
  ], TextAreaComponent);
12697
12754
 
@@ -12778,6 +12835,8 @@ let SpeechRecognitionComponent = class SpeechRecognitionComponent {
12778
12835
  this.speechRecognitionService = speechRecognitionService;
12779
12836
  this.textToSpeechService = textToSpeechService;
12780
12837
  this.translateService = translateService;
12838
+ this.keepContext = false;
12839
+ this.speechRecognitionPlaceholder = '';
12781
12840
  this._recognizedText = '';
12782
12841
  this.originalTextAreaElementText = '';
12783
12842
  this.isDoneSpeaking = false;
@@ -12808,7 +12867,7 @@ let SpeechRecognitionComponent = class SpeechRecognitionComponent {
12808
12867
  if (!this.textAreaElement) {
12809
12868
  throw new Error('textAreaElement is required');
12810
12869
  }
12811
- this.textAreaElement.placeholder = this.translateService.instant("platform.angular_components.text_area_speech_recognition_placeholder");
12870
+ this.textAreaElement.placeholder = this.speechRecognitionPlaceholder ? this.speechRecognitionPlaceholder : this.translateService.instant("platform.angular_components.text_area_speech_recognition_placeholder");
12812
12871
  this.textAreaElement.addEventListener('keydown', this.keydownEventListener);
12813
12872
  }
12814
12873
  onListen() {
@@ -12818,9 +12877,7 @@ let SpeechRecognitionComponent = class SpeechRecognitionComponent {
12818
12877
  this.disabled = true;
12819
12878
  this.canRenderMicrophone = false;
12820
12879
  this.canRenderListeningText = true;
12821
- if (this.textAreaElement.value && !this.originalTextAreaElementText) {
12822
- this.originalTextAreaElementText = this.textAreaElement.value;
12823
- }
12880
+ this.originalTextAreaElementText = this.textAreaElement.value;
12824
12881
  this.textAreaElement.value = '';
12825
12882
  this.isSpeaking = true;
12826
12883
  this.speechRecognitionService.listen()
@@ -12828,17 +12885,26 @@ let SpeechRecognitionComponent = class SpeechRecognitionComponent {
12828
12885
  .subscribe(({ text, isFinal }) => {
12829
12886
  this._recognizedText = text;
12830
12887
  this.setTextAreaValue(text);
12831
- setTimeout(() => {
12832
- this.textAreaElement.scrollTop = this.textAreaElement.scrollHeight;
12833
- }, 120);
12888
+ this.scrollTextAreaBottom();
12834
12889
  if (isFinal) {
12835
12890
  this.canRenderAprove = true;
12836
12891
  this.canRenderDiscard = true;
12837
12892
  this.canRenderListeningText = false;
12838
12893
  this.isSpeaking = false;
12839
12894
  }
12895
+ }, () => {
12896
+ this.isSpeaking = false;
12897
+ this.canRenderMicrophone = true;
12898
+ this.isDisabledMicrophone = false;
12899
+ this.canRenderListeningText = false;
12900
+ this.disabled = false;
12840
12901
  });
12841
12902
  }
12903
+ scrollTextAreaBottom() {
12904
+ setTimeout(() => {
12905
+ this.textAreaElement.scrollTop = this.textAreaElement.scrollHeight;
12906
+ }, 120);
12907
+ }
12842
12908
  onOpenToolbar() {
12843
12909
  if (this.isDisabledTextToSpeech) {
12844
12910
  return;
@@ -12872,8 +12938,15 @@ let SpeechRecognitionComponent = class SpeechRecognitionComponent {
12872
12938
  this.canRenderMicrophone = true;
12873
12939
  this.canRenderTextToSpeechToolbar = false;
12874
12940
  this.canRenderTextToSpeech = true;
12875
- this.originalTextAreaElementText = this._recognizedText;
12876
- this.recognizedText.emit(this._recognizedText);
12941
+ if (this.keepContext) {
12942
+ const breakLine = this.originalTextAreaElementText.length > 0 ? '\n' : '';
12943
+ this.originalTextAreaElementText += `${breakLine}${this._recognizedText}`;
12944
+ }
12945
+ else {
12946
+ this.originalTextAreaElementText = this._recognizedText;
12947
+ }
12948
+ this.recognizedText.emit(this.keepContext ? this.originalTextAreaElementText : this._recognizedText);
12949
+ this.scrollTextAreaBottom();
12877
12950
  this._recognizedText = '';
12878
12951
  this.disabled = false;
12879
12952
  this.textToSpeechService.cancel();
@@ -12940,6 +13013,12 @@ SpeechRecognitionComponent.ctorParameters = () => [
12940
13013
  __decorate([
12941
13014
  Input()
12942
13015
  ], SpeechRecognitionComponent.prototype, "textAreaElement", void 0);
13016
+ __decorate([
13017
+ Input()
13018
+ ], SpeechRecognitionComponent.prototype, "keepContext", void 0);
13019
+ __decorate([
13020
+ Input()
13021
+ ], SpeechRecognitionComponent.prototype, "speechRecognitionPlaceholder", void 0);
12943
13022
  __decorate([
12944
13023
  Output()
12945
13024
  ], SpeechRecognitionComponent.prototype, "recognizedText", void 0);
@@ -16582,6 +16661,8 @@ let TextAreaIAComponent = TextAreaIAComponent_1 = class TextAreaIAComponent {
16582
16661
  this._translateService = _translateService;
16583
16662
  this.speechRecognitionService = speechRecognitionService;
16584
16663
  this.speechRecognition = false;
16664
+ this.keepContext = false;
16665
+ this.speechRecognitionPlaceholder = '';
16585
16666
  this.isVisible = false;
16586
16667
  this.isLoading = false;
16587
16668
  }
@@ -16684,10 +16765,16 @@ __decorate([
16684
16765
  __decorate([
16685
16766
  Input()
16686
16767
  ], TextAreaIAComponent.prototype, "speechRecognition", void 0);
16768
+ __decorate([
16769
+ Input()
16770
+ ], TextAreaIAComponent.prototype, "keepContext", void 0);
16771
+ __decorate([
16772
+ Input()
16773
+ ], TextAreaIAComponent.prototype, "speechRecognitionPlaceholder", void 0);
16687
16774
  TextAreaIAComponent = TextAreaIAComponent_1 = __decorate([
16688
16775
  Component({
16689
16776
  selector: "s-text-area-ia",
16690
- template: "<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\">\n</s-loading-state>\n\n<p-dialog\n [(visible)]=\"isVisible\"\n [modal]=\"true\"\n [style]=\"{ width: '50vw' }\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n (onHide)=\"onHideDialog()\">\n <p-header>\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n IAssist - Content Generator\n </div>\n </p-header>\n <s-dynamic-form\n [fields]=\"fields\"\n [form]=\"formGroup\">\n </s-dynamic-form>\n <p-footer>\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (onClick)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\">\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (onClick)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\">\n </s-button>\n </div>\n </p-footer>\n</p-dialog>\n\n<div class=\"textarea-ia\">\n <s-textarea\n [inputId]=\"id\"\n [rows]=\"rows\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [readOnly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [speechRecognition]=\"speechRecognition\"\n ></s-textarea>\n <button\n class=\"iassist-button\"\n [class.speech-recognition]=\"speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n (click)=\"showDialog()\"\n sTooltip=\"IAssist - Content Generator\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg style=\"width: 100%; height: 100%;\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\" fill=\"#0FA389\"/>\n <path d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\" fill=\"#0FA389\"/>\n <path d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\" fill=\"#F3F3F5\"/>\n <path d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\" fill=\"#0C847B\"/>\n <path d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\" fill=\"#0C847B\"/>\n </svg>\n</ng-template>\n",
16777
+ template: "<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\">\n</s-loading-state>\n\n<p-dialog\n [(visible)]=\"isVisible\"\n [modal]=\"true\"\n [style]=\"{ width: '50vw' }\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n (onHide)=\"onHideDialog()\">\n <p-header>\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n IAssist - Content Generator\n </div>\n </p-header>\n <s-dynamic-form\n [fields]=\"fields\"\n [form]=\"formGroup\">\n </s-dynamic-form>\n <p-footer>\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (onClick)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\">\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (onClick)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\">\n </s-button>\n </div>\n </p-footer>\n</p-dialog>\n\n<div class=\"textarea-ia\">\n <s-textarea\n [inputId]=\"id\"\n [rows]=\"rows\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [readOnly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [speechRecognition]=\"speechRecognition\"\n [keepContext]=\"keepContext\"\n [speechRecognitionPlaceholder]=\"speechRecognitionPlaceholder\"\n ></s-textarea>\n <button\n class=\"iassist-button\"\n [class.speech-recognition]=\"speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n (click)=\"showDialog()\"\n sTooltip=\"IAssist - Content Generator\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg style=\"width: 100%; height: 100%;\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\" fill=\"#0FA389\"/>\n <path d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\" fill=\"#0FA389\"/>\n <path d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\" fill=\"#F3F3F5\"/>\n <path d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\" fill=\"#0C847B\"/>\n <path d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\" fill=\"#0C847B\"/>\n </svg>\n</ng-template>\n",
16691
16778
  providers: [
16692
16779
  {
16693
16780
  provide: NG_VALUE_ACCESSOR,
@@ -21547,7 +21634,8 @@ const fallback = {
21547
21634
  "platform.angular_components.text_area_speech_recognition_placeholder": "Preencha o campo com, pelo menos, uma frase",
21548
21635
  "platform.angular_components.text_area_before_speech": "Grave ou ouça o texto clicando nos ícones",
21549
21636
  "platform.angular_components.text_area_while_speech": "Clique novamente no ícone para finalizar",
21550
- "platform.angular_components.text_area_end_speech": "Gravação finalizada"
21637
+ "platform.angular_components.text_area_end_speech": "Gravação finalizada",
21638
+ "platform.angular_components.no_microphone_permission": "O acesso ao microfone está bloqueado. Ative a permissão nas configurações do navegador para continuar usando este recurso."
21551
21639
  };
21552
21640
 
21553
21641
  /**