@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
@@ -7231,14 +7231,20 @@
7231
7231
  var TextAreaField = /** @class */ (function (_super) {
7232
7232
  __extends(TextAreaField, _super);
7233
7233
  function TextAreaField(config) {
7234
- var _a;
7234
+ var _a, _b, _c;
7235
7235
  var _this = _super.call(this, config) || this;
7236
+ _this.style = {
7237
+ resize: 'vertical'
7238
+ };
7236
7239
  _this.cols = config.cols;
7237
7240
  _this.rows = config.rows;
7238
7241
  _this.keyFilter = config.keyFilter;
7239
- _this.style = config.style;
7242
+ _this.style = __assign(__assign({}, config.style), _this.style);
7240
7243
  _this.readonly = config.readonly;
7241
7244
  _this.speechRecognition = (_a = config.speechRecognition) !== null && _a !== void 0 ? _a : false;
7245
+ _this.keepContext = (_b = config.keepContext) !== null && _b !== void 0 ? _b : false;
7246
+ _this.speechRecognitionPlaceholder = (_c = config.speechRecognitionPlaceholder) !== null && _c !== void 0 ? _c : '';
7247
+ _this.maxLength = config.maxLength;
7242
7248
  return _this;
7243
7249
  }
7244
7250
  return TextAreaField;
@@ -7247,7 +7253,7 @@
7247
7253
  var TextAreaIAField = /** @class */ (function (_super) {
7248
7254
  __extends(TextAreaIAField, _super);
7249
7255
  function TextAreaIAField(config) {
7250
- var _a;
7256
+ var _a, _b, _c;
7251
7257
  var _this = _super.call(this, config) || this;
7252
7258
  _this.style = {
7253
7259
  resize: 'vertical'
@@ -7259,6 +7265,9 @@
7259
7265
  _this.prompt = config.prompt;
7260
7266
  _this.readonly = config.readonly;
7261
7267
  _this.speechRecognition = (_a = config.speechRecognition) !== null && _a !== void 0 ? _a : false;
7268
+ _this.keepContext = (_b = config.keepContext) !== null && _b !== void 0 ? _b : false;
7269
+ _this.speechRecognitionPlaceholder = (_c = config.speechRecognitionPlaceholder) !== null && _c !== void 0 ? _c : '';
7270
+ _this.maxLength = config.maxLength;
7262
7271
  return _this;
7263
7272
  }
7264
7273
  return TextAreaIAField;
@@ -11488,9 +11497,11 @@
11488
11497
  }(BaseFieldComponent));
11489
11498
 
11490
11499
  var SpeechRecognitionService = /** @class */ (function () {
11491
- function SpeechRecognitionService(localeService, ngZone) {
11500
+ function SpeechRecognitionService(localeService, ngZone, toastService, translateService) {
11492
11501
  this.localeService = localeService;
11493
11502
  this.ngZone = ngZone;
11503
+ this.toastService = toastService;
11504
+ this.translateService = translateService;
11494
11505
  this.hasSupportSpeechRecognition = false;
11495
11506
  this.isListening = false;
11496
11507
  this.TIMEOUT_NO_MESSAGE = 3000;
@@ -11498,65 +11509,69 @@
11498
11509
  }
11499
11510
  SpeechRecognitionService.prototype.listen = function () {
11500
11511
  var _this = this;
11512
+ var speechSubject = new rxjs.Subject();
11501
11513
  if (this.isListening) {
11502
- return;
11514
+ speechSubject.error('Already listening');
11503
11515
  }
11504
- var speechSubject = new rxjs.Subject();
11505
- this.isListening = true;
11506
- this.recognition.continuous = true;
11507
- this.recognition.interimResults = true;
11508
- this.recognition.maxAlternatives = 1;
11509
- var silenceTimer;
11510
- var restartSilenceTimer = function () {
11511
- if (silenceTimer !== undefined) {
11512
- clearTimeout(silenceTimer);
11516
+ this.hasMicrophoneAccess().then(function (hasAccess) {
11517
+ if (!hasAccess) {
11518
+ _this.toastService.show({ severity: 'error', text: _this.translateService.instant('platform.angular_components.no_microphone_permission') });
11519
+ speechSubject.error('Microphone access is disabled');
11520
+ return;
11513
11521
  }
11514
- silenceTimer = setTimeout(function () {
11515
- _this.recognition.stop();
11516
- }, _this.TIMEOUT_NO_MESSAGE);
11517
- };
11518
- var fullTranscript = '';
11519
- var interimTranscript = '';
11520
- this.recognition.onresult = function (event) {
11521
- _this.ngZone.run(function () {
11522
- restartSilenceTimer();
11523
- var interimTranscript = '';
11524
- for (var i = event.resultIndex; i < event.results.length; ++i) {
11525
- var transcript = event.results[i][0].transcript;
11526
- if (event.results[i].isFinal) {
11527
- fullTranscript += transcript + '\n';
11528
- }
11529
- else {
11530
- interimTranscript += transcript;
11531
- }
11532
- }
11533
- interimTranscript = interimTranscript;
11534
- speechSubject.next({ text: fullTranscript + interimTranscript, isFinal: false });
11535
- });
11536
- };
11537
- this.recognition.onerror = function () {
11538
- _this.ngZone.run(function () {
11522
+ _this.isListening = true;
11523
+ _this.recognition.continuous = true;
11524
+ _this.recognition.interimResults = true;
11525
+ _this.recognition.maxAlternatives = 1;
11526
+ var silenceTimer;
11527
+ var restartSilenceTimer = function () {
11539
11528
  if (silenceTimer !== undefined) {
11540
11529
  clearTimeout(silenceTimer);
11541
11530
  }
11542
- _this.isListening = false;
11543
- speechSubject.next({
11544
- isFinal: true,
11545
- text: ''
11531
+ silenceTimer = setTimeout(function () {
11532
+ _this.recognition.stop();
11533
+ }, _this.TIMEOUT_NO_MESSAGE);
11534
+ };
11535
+ var fullTranscript = '';
11536
+ var interimTranscript = '';
11537
+ _this.recognition.onresult = function (event) {
11538
+ _this.ngZone.run(function () {
11539
+ restartSilenceTimer();
11540
+ var interimTranscript = '';
11541
+ for (var i = event.resultIndex; i < event.results.length; ++i) {
11542
+ var transcript = event.results[i][0].transcript;
11543
+ if (event.results[i].isFinal) {
11544
+ fullTranscript += transcript + '\n';
11545
+ }
11546
+ else {
11547
+ interimTranscript += transcript;
11548
+ }
11549
+ }
11550
+ interimTranscript = interimTranscript;
11551
+ speechSubject.next({ text: fullTranscript + interimTranscript, isFinal: false });
11546
11552
  });
11547
- });
11548
- };
11549
- this.recognition.onend = function () {
11550
- _this.ngZone.run(function () {
11551
- if (silenceTimer !== undefined) {
11552
- clearTimeout(silenceTimer);
11553
- }
11554
- speechSubject.next({ text: fullTranscript + interimTranscript, isFinal: true });
11555
- _this.isListening = false;
11556
- speechSubject.complete();
11557
- });
11558
- };
11559
- this.recognition.start();
11553
+ };
11554
+ _this.recognition.onerror = function () {
11555
+ _this.ngZone.run(function () {
11556
+ if (silenceTimer !== undefined) {
11557
+ clearTimeout(silenceTimer);
11558
+ }
11559
+ _this.isListening = false;
11560
+ speechSubject.error('Speech recognition error');
11561
+ });
11562
+ };
11563
+ _this.recognition.onend = function () {
11564
+ _this.ngZone.run(function () {
11565
+ if (silenceTimer !== undefined) {
11566
+ clearTimeout(silenceTimer);
11567
+ }
11568
+ speechSubject.next({ text: fullTranscript + interimTranscript, isFinal: true });
11569
+ _this.isListening = false;
11570
+ speechSubject.complete();
11571
+ });
11572
+ };
11573
+ _this.recognition.start();
11574
+ });
11560
11575
  return speechSubject;
11561
11576
  };
11562
11577
  SpeechRecognitionService.prototype.stop = function () {
@@ -11577,11 +11592,50 @@
11577
11592
  this.recognition.maxAlternatives = 1;
11578
11593
  this.localeService.getLocale().subscribe(function (locale) { return _this.recognition.lang = locale; });
11579
11594
  };
11595
+ SpeechRecognitionService.prototype.hasMicrophoneAccess = function () {
11596
+ return __awaiter(this, void 0, void 0, function () {
11597
+ var permission, stream, _a, _b;
11598
+ return __generator(this, function (_c) {
11599
+ switch (_c.label) {
11600
+ case 0:
11601
+ _c.trys.push([0, 6, , 7]);
11602
+ return [4 /*yield*/, navigator.permissions.query({ name: 'microphone' })];
11603
+ case 1:
11604
+ permission = _c.sent();
11605
+ if (permission.state === 'denied') {
11606
+ return [2 /*return*/, false];
11607
+ }
11608
+ if (permission.state === 'granted') {
11609
+ return [2 /*return*/, true];
11610
+ }
11611
+ if (!(permission.state === 'prompt')) return [3 /*break*/, 5];
11612
+ _c.label = 2;
11613
+ case 2:
11614
+ _c.trys.push([2, 4, , 5]);
11615
+ return [4 /*yield*/, navigator.mediaDevices.getUserMedia({ audio: true })];
11616
+ case 3:
11617
+ stream = _c.sent();
11618
+ stream.getTracks().forEach(function (t) { return t.stop(); });
11619
+ return [2 /*return*/, true];
11620
+ case 4:
11621
+ _a = _c.sent();
11622
+ return [2 /*return*/, false];
11623
+ case 5: return [2 /*return*/, false];
11624
+ case 6:
11625
+ _b = _c.sent();
11626
+ return [2 /*return*/, false];
11627
+ case 7: return [2 /*return*/];
11628
+ }
11629
+ });
11630
+ });
11631
+ };
11580
11632
  SpeechRecognitionService.ctorParameters = function () { return [
11581
11633
  { type: LocaleService },
11582
- { type: core.NgZone }
11634
+ { type: core.NgZone },
11635
+ { type: ToastService },
11636
+ { type: core$1.TranslateService }
11583
11637
  ]; };
11584
- SpeechRecognitionService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function SpeechRecognitionService_Factory() { return new SpeechRecognitionService(core["ɵɵinject"](LocaleService), core["ɵɵinject"](core.NgZone)); }, token: SpeechRecognitionService, providedIn: "root" });
11638
+ SpeechRecognitionService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function SpeechRecognitionService_Factory() { return new SpeechRecognitionService(core["ɵɵinject"](LocaleService), core["ɵɵinject"](core.NgZone), core["ɵɵinject"](ToastService), core["ɵɵinject"](core$1.TranslateService)); }, token: SpeechRecognitionService, providedIn: "root" });
11585
11639
  SpeechRecognitionService = __decorate([
11586
11640
  core.Injectable({
11587
11641
  providedIn: 'root'
@@ -11634,14 +11688,16 @@
11634
11688
  this.hideDialog();
11635
11689
  };
11636
11690
  TextAreaIAFieldComponent.prototype._createDialogFields = function () {
11637
- var _a;
11691
+ var _a, _b;
11638
11692
  this.fields = [
11639
11693
  new FormField({
11640
11694
  name: "context",
11641
11695
  type: exports.FieldType.Text,
11642
11696
  label: this._translateService.instant("platform.angular_components.context"),
11643
11697
  size: { sm: 12, md: 12, lg: 12, xl: 12 },
11644
- speechRecognition: (_a = this.field.speechRecognition) !== null && _a !== void 0 ? _a : false
11698
+ speechRecognition: (_a = this.field.speechRecognition) !== null && _a !== void 0 ? _a : false,
11699
+ keepContext: (_b = this.field.keepContext) !== null && _b !== void 0 ? _b : false,
11700
+ maxLength: this.field.maxLength,
11645
11701
  }),
11646
11702
  ];
11647
11703
  };
@@ -11664,7 +11720,7 @@
11664
11720
  ], TextAreaIAFieldComponent.prototype, "formControl", void 0);
11665
11721
  TextAreaIAFieldComponent = __decorate([
11666
11722
  core.Component({
11667
- 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",
11723
+ 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",
11668
11724
  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}"]
11669
11725
  })
11670
11726
  ], TextAreaIAFieldComponent);
@@ -11692,7 +11748,7 @@
11692
11748
  ], TextAreaFieldComponent.prototype, "inputRef", void 0);
11693
11749
  TextAreaFieldComponent = __decorate([
11694
11750
  core.Component({
11695
- 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"
11751
+ 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"
11696
11752
  })
11697
11753
  ], TextAreaFieldComponent);
11698
11754
  return TextAreaFieldComponent;
@@ -13566,6 +13622,8 @@
13566
13622
  this.inputId = "textarea-" + Math.random();
13567
13623
  this.rows = 5;
13568
13624
  this.speechRecognition = false;
13625
+ this.keepContext = false;
13626
+ this.speechRecognitionPlaceholder = '';
13569
13627
  this._inputStyle = {
13570
13628
  resize: 'vertical'
13571
13629
  };
@@ -13656,6 +13714,15 @@
13656
13714
  __decorate([
13657
13715
  core.Input()
13658
13716
  ], TextAreaComponent.prototype, "keyFilter", void 0);
13717
+ __decorate([
13718
+ core.Input()
13719
+ ], TextAreaComponent.prototype, "keepContext", void 0);
13720
+ __decorate([
13721
+ core.Input()
13722
+ ], TextAreaComponent.prototype, "speechRecognitionPlaceholder", void 0);
13723
+ __decorate([
13724
+ core.Input()
13725
+ ], TextAreaComponent.prototype, "maxLength", void 0);
13659
13726
  __decorate([
13660
13727
  core.Input()
13661
13728
  ], TextAreaComponent.prototype, "placeholder", null);
@@ -13668,7 +13735,7 @@
13668
13735
  TextAreaComponent = TextAreaComponent_1 = __decorate([
13669
13736
  core.Component({
13670
13737
  selector: 's-textarea',
13671
- 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",
13738
+ 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",
13672
13739
  providers: [
13673
13740
  {
13674
13741
  provide: forms.NG_VALUE_ACCESSOR,
@@ -13676,7 +13743,7 @@
13676
13743
  multi: true,
13677
13744
  },
13678
13745
  ],
13679
- 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}"]
13746
+ 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}"]
13680
13747
  })
13681
13748
  ], TextAreaComponent);
13682
13749
  return TextAreaComponent;
@@ -13774,6 +13841,8 @@
13774
13841
  this.speechRecognitionService = speechRecognitionService;
13775
13842
  this.textToSpeechService = textToSpeechService;
13776
13843
  this.translateService = translateService;
13844
+ this.keepContext = false;
13845
+ this.speechRecognitionPlaceholder = '';
13777
13846
  this._recognizedText = '';
13778
13847
  this.originalTextAreaElementText = '';
13779
13848
  this.isDoneSpeaking = false;
@@ -13804,7 +13873,7 @@
13804
13873
  if (!this.textAreaElement) {
13805
13874
  throw new Error('textAreaElement is required');
13806
13875
  }
13807
- this.textAreaElement.placeholder = this.translateService.instant("platform.angular_components.text_area_speech_recognition_placeholder");
13876
+ this.textAreaElement.placeholder = this.speechRecognitionPlaceholder ? this.speechRecognitionPlaceholder : this.translateService.instant("platform.angular_components.text_area_speech_recognition_placeholder");
13808
13877
  this.textAreaElement.addEventListener('keydown', this.keydownEventListener);
13809
13878
  };
13810
13879
  SpeechRecognitionComponent.prototype.onListen = function () {
@@ -13815,9 +13884,7 @@
13815
13884
  this.disabled = true;
13816
13885
  this.canRenderMicrophone = false;
13817
13886
  this.canRenderListeningText = true;
13818
- if (this.textAreaElement.value && !this.originalTextAreaElementText) {
13819
- this.originalTextAreaElementText = this.textAreaElement.value;
13820
- }
13887
+ this.originalTextAreaElementText = this.textAreaElement.value;
13821
13888
  this.textAreaElement.value = '';
13822
13889
  this.isSpeaking = true;
13823
13890
  this.speechRecognitionService.listen()
@@ -13826,17 +13893,27 @@
13826
13893
  var text = _a.text, isFinal = _a.isFinal;
13827
13894
  _this._recognizedText = text;
13828
13895
  _this.setTextAreaValue(text);
13829
- setTimeout(function () {
13830
- _this.textAreaElement.scrollTop = _this.textAreaElement.scrollHeight;
13831
- }, 120);
13896
+ _this.scrollTextAreaBottom();
13832
13897
  if (isFinal) {
13833
13898
  _this.canRenderAprove = true;
13834
13899
  _this.canRenderDiscard = true;
13835
13900
  _this.canRenderListeningText = false;
13836
13901
  _this.isSpeaking = false;
13837
13902
  }
13903
+ }, function () {
13904
+ _this.isSpeaking = false;
13905
+ _this.canRenderMicrophone = true;
13906
+ _this.isDisabledMicrophone = false;
13907
+ _this.canRenderListeningText = false;
13908
+ _this.disabled = false;
13838
13909
  });
13839
13910
  };
13911
+ SpeechRecognitionComponent.prototype.scrollTextAreaBottom = function () {
13912
+ var _this = this;
13913
+ setTimeout(function () {
13914
+ _this.textAreaElement.scrollTop = _this.textAreaElement.scrollHeight;
13915
+ }, 120);
13916
+ };
13840
13917
  SpeechRecognitionComponent.prototype.onOpenToolbar = function () {
13841
13918
  if (this.isDisabledTextToSpeech) {
13842
13919
  return;
@@ -13870,8 +13947,15 @@
13870
13947
  this.canRenderMicrophone = true;
13871
13948
  this.canRenderTextToSpeechToolbar = false;
13872
13949
  this.canRenderTextToSpeech = true;
13873
- this.originalTextAreaElementText = this._recognizedText;
13874
- this.recognizedText.emit(this._recognizedText);
13950
+ if (this.keepContext) {
13951
+ var breakLine = this.originalTextAreaElementText.length > 0 ? '\n' : '';
13952
+ this.originalTextAreaElementText += "" + breakLine + this._recognizedText;
13953
+ }
13954
+ else {
13955
+ this.originalTextAreaElementText = this._recognizedText;
13956
+ }
13957
+ this.recognizedText.emit(this.keepContext ? this.originalTextAreaElementText : this._recognizedText);
13958
+ this.scrollTextAreaBottom();
13875
13959
  this._recognizedText = '';
13876
13960
  this.disabled = false;
13877
13961
  this.textToSpeechService.cancel();
@@ -13950,6 +14034,12 @@
13950
14034
  __decorate([
13951
14035
  core.Input()
13952
14036
  ], SpeechRecognitionComponent.prototype, "textAreaElement", void 0);
14037
+ __decorate([
14038
+ core.Input()
14039
+ ], SpeechRecognitionComponent.prototype, "keepContext", void 0);
14040
+ __decorate([
14041
+ core.Input()
14042
+ ], SpeechRecognitionComponent.prototype, "speechRecognitionPlaceholder", void 0);
13953
14043
  __decorate([
13954
14044
  core.Output()
13955
14045
  ], SpeechRecognitionComponent.prototype, "recognizedText", void 0);
@@ -17931,6 +18021,8 @@
17931
18021
  this._translateService = _translateService;
17932
18022
  this.speechRecognitionService = speechRecognitionService;
17933
18023
  this.speechRecognition = false;
18024
+ this.keepContext = false;
18025
+ this.speechRecognitionPlaceholder = '';
17934
18026
  this.isVisible = false;
17935
18027
  this.isLoading = false;
17936
18028
  }
@@ -18035,10 +18127,16 @@
18035
18127
  __decorate([
18036
18128
  core.Input()
18037
18129
  ], TextAreaIAComponent.prototype, "speechRecognition", void 0);
18130
+ __decorate([
18131
+ core.Input()
18132
+ ], TextAreaIAComponent.prototype, "keepContext", void 0);
18133
+ __decorate([
18134
+ core.Input()
18135
+ ], TextAreaIAComponent.prototype, "speechRecognitionPlaceholder", void 0);
18038
18136
  TextAreaIAComponent = TextAreaIAComponent_1 = __decorate([
18039
18137
  core.Component({
18040
18138
  selector: "s-text-area-ia",
18041
- 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",
18139
+ 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",
18042
18140
  providers: [
18043
18141
  {
18044
18142
  provide: forms.NG_VALUE_ACCESSOR,
@@ -23263,7 +23361,8 @@
23263
23361
  "platform.angular_components.text_area_speech_recognition_placeholder": "Preencha o campo com, pelo menos, uma frase",
23264
23362
  "platform.angular_components.text_area_before_speech": "Grave ou ouça o texto clicando nos ícones",
23265
23363
  "platform.angular_components.text_area_while_speech": "Clique novamente no ícone para finalizar",
23266
- "platform.angular_components.text_area_end_speech": "Gravação finalizada"
23364
+ "platform.angular_components.text_area_end_speech": "Gravação finalizada",
23365
+ "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."
23267
23366
  };
23268
23367
 
23269
23368
  exports.AccordionComponent = AccordionComponent;