@progress/kendo-angular-conversational-ui 25.1.0-develop.3 → 25.1.0-develop.5

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.
@@ -3,11 +3,11 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
- import { InjectionToken, Input, ViewChild, HostBinding, Inject, Directive, Injectable, Optional, forwardRef, EventEmitter, Output, ContentChild, ContentChildren, Component, isDevMode, ElementRef, ViewChildren, HostListener, ViewContainerRef, inject, SkipSelf, signal, ChangeDetectionStrategy, computed, effect, RendererStyleFlags2, NgModule } from '@angular/core';
6
+ import { InjectionToken, signal, Input, ViewChild, HostBinding, Inject, Directive, Injectable, Optional, forwardRef, EventEmitter, effect, afterNextRender, Output, ContentChild, ContentChildren, ChangeDetectionStrategy, Component, computed, isDevMode, ElementRef, ViewChildren, HostListener, ViewContainerRef, inject, SkipSelf, RendererStyleFlags2, NgModule } from '@angular/core';
7
7
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
8
8
  import * as i1$2 from '@progress/kendo-angular-popup';
9
9
  import { PopupComponent, KENDO_POPUP, PopupService } from '@progress/kendo-angular-popup';
10
- import { isPresent, normalizeKeys, Keys, focusableSelector, KENDO_WEBMCP_HOST, provideComponentName, guid, getter, isDocumentAvailable, hasObservers, EventsOutsideAngularDirective, closest as closest$1, ResizeSensorComponent, getLicenseMessage, shouldShowValidationUI, isChanged, processCssValue, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
10
+ import { isPresent, normalizeKeys, Keys, focusableSelector, KENDO_WEBMCP_HOST, provideComponentName, guid, getter, isDocumentAvailable, hasObservers, EventsOutsideAngularDirective, closest as closest$1, ResizeSensorComponent, processCssValue, getLicenseMessage, shouldShowValidationUI, isChanged, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
11
11
  import { DialogContainerService, DialogService, WindowService, WindowContainerService } from '@progress/kendo-angular-dialog';
12
12
  import { NgTemplateOutlet, NgClass, JsonPipe } from '@angular/common';
13
13
  import { Subject, Subscription, fromEvent } from 'rxjs';
@@ -17,7 +17,6 @@ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/k
17
17
  import { validatePackage } from '@progress/kendo-licensing';
18
18
  import * as i2 from '@progress/kendo-angular-buttons';
19
19
  import { ButtonComponent, FloatingActionButtonComponent, SpeechToTextButtonComponent, DropDownButtonComponent, KENDO_BUTTONS, ButtonsModule, ChipComponent, ButtonGroupComponent } from '@progress/kendo-angular-buttons';
20
- import { take, debounceTime } from 'rxjs/operators';
21
20
  import * as i5 from '@progress/kendo-angular-layout';
22
21
  import { PanelBarComponent, KENDO_CARD, CardComponent, CardBodyComponent, CardActionsComponent } from '@progress/kendo-angular-layout';
23
22
  import * as i3 from '@progress/kendo-angular-inputs';
@@ -25,6 +24,7 @@ import { TextAreaComponent, TextAreaSuffixComponent, KENDO_TEXTAREA } from '@pro
25
24
  import * as i4 from '@progress/kendo-angular-menu';
26
25
  import { ContextMenuComponent, KENDO_CONTEXTMENU } from '@progress/kendo-angular-menu';
27
26
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
27
+ import { debounceTime } from 'rxjs/operators';
28
28
  import { FileSelectComponent, fileSVGGroupIcon, fileGroupClass, getTotalFilesSizeMessage } from '@progress/kendo-angular-upload';
29
29
  import * as i1$1 from '@progress/kendo-angular-intl';
30
30
  import { ToolBarComponent, ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
@@ -131,23 +131,15 @@ class BaseView {
131
131
  * @hidden
132
132
  */
133
133
  template;
134
- constructor(viewType, localization) {
135
- this.viewType = viewType;
136
- this.localization = localization;
137
- if (this.viewType !== 'custom') {
138
- this.icon = DEFAULT_ICONS[this.viewType];
139
- this.svgIcon = DEFAULT_SVG_ICONS[this.viewType];
140
- }
141
- }
142
134
  /**
143
135
  * Sets the text for the Toolbar button of the current view.
144
136
  */
145
137
  set buttonText(value) {
146
- this._buttonText = value;
138
+ this._buttonText.set(value);
147
139
  }
148
140
  get buttonText() {
149
- return isPresent(this._buttonText) ?
150
- this._buttonText :
141
+ return isPresent(this._buttonText()) ?
142
+ this._buttonText() :
151
143
  this.messageFor(`${this.viewType}View`);
152
144
  }
153
145
  /**
@@ -155,28 +147,39 @@ class BaseView {
155
147
  */
156
148
  set icon(value) {
157
149
  if (isPresent(value)) {
158
- this._icon = value;
150
+ this._icon.set(value);
159
151
  }
160
152
  else {
161
- this.icon = DEFAULT_ICONS[this.viewType];
153
+ this._icon.set(DEFAULT_ICONS[this.viewType]);
162
154
  }
163
155
  }
164
156
  get icon() {
165
- return this._icon;
157
+ return this._icon();
166
158
  }
167
159
  /**
168
160
  * Sets the SVG icon for the Toolbar button of the current view.
169
161
  */
170
162
  set svgIcon(value) {
171
163
  if (isPresent(value)) {
172
- this._svgIcon = value;
164
+ this._svgIcon.set(value);
173
165
  }
174
166
  else {
175
- this.svgIcon = DEFAULT_SVG_ICONS[this.viewType];
167
+ this._svgIcon.set(DEFAULT_SVG_ICONS[this.viewType]);
176
168
  }
177
169
  }
178
170
  get svgIcon() {
179
- return this._svgIcon;
171
+ return this._svgIcon();
172
+ }
173
+ _buttonText = signal(undefined, ...(ngDevMode ? [{ debugName: "_buttonText" }] : []));
174
+ _icon = signal(undefined, ...(ngDevMode ? [{ debugName: "_icon" }] : []));
175
+ _svgIcon = signal(undefined, ...(ngDevMode ? [{ debugName: "_svgIcon" }] : []));
176
+ constructor(viewType, localization) {
177
+ this.viewType = viewType;
178
+ this.localization = localization;
179
+ if (this.viewType !== 'custom') {
180
+ this.icon = DEFAULT_ICONS[this.viewType];
181
+ this.svgIcon = DEFAULT_SVG_ICONS[this.viewType];
182
+ }
180
183
  }
181
184
  /**
182
185
  * @hidden
@@ -184,9 +187,6 @@ class BaseView {
184
187
  messageFor(text) {
185
188
  return this.localization.get(text);
186
189
  }
187
- _buttonText;
188
- _icon;
189
- _svgIcon;
190
190
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: BaseView, deps: [{ token: MY_TOKEN }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
191
191
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.27", type: BaseView, isStandalone: true, inputs: { buttonText: "buttonText", icon: "icon", svgIcon: "svgIcon" }, host: { properties: { "class.k-prompt-view": "this.hostClasses" } }, viewQueries: [{ propertyName: "template", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0 });
192
192
  }
@@ -217,8 +217,8 @@ const packageMetadata = {
217
217
  productName: 'Kendo UI for Angular',
218
218
  productCode: 'KENDOUIANGULAR',
219
219
  productCodes: ['KENDOUIANGULAR'],
220
- publishDate: 1787036921,
221
- version: '25.1.0-develop.3',
220
+ publishDate: 1787151244,
221
+ version: '25.1.0-develop.5',
222
222
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
223
223
  };
224
224
 
@@ -241,33 +241,49 @@ const STB_DEFAULT_SETTINGS$2 = {
241
241
  */
242
242
  class AIPromptService {
243
243
  aiPrompt;
244
- promptValue = '';
245
- showOutputRating = false;
244
+ set promptValue(value) { this._promptValue.set(value); }
245
+ get promptValue() { return this._promptValue(); }
246
+ set showOutputRating(value) { this._showOutputRating.set(value); }
247
+ get showOutputRating() { return this._showOutputRating(); }
248
+ set promptCommands(value) { this._promptCommands.set(value); }
249
+ get promptCommands() { return this._promptCommands(); }
250
+ set promptOutputs(value) { this._promptOutputs.set(value); }
251
+ get promptOutputs() { return this._promptOutputs(); }
252
+ set promptSuggestions(value) { this._promptSuggestions.set(value); }
253
+ get promptSuggestions() { return this._promptSuggestions(); }
254
+ set textAreaSettings(value) { this._textAreaSettings.set(value); }
255
+ get textAreaSettings() { return this._textAreaSettings(); }
246
256
  requestEvent = new Subject();
247
257
  executeEvent = new Subject();
248
258
  outputCopyEvent = new Subject();
249
259
  outputRatingChangeEvent = new Subject();
250
- promptCommands;
251
- promptOutputs;
252
- promptSuggestions;
253
- textAreaSettings;
254
- outputTemplate;
255
- outputBodyTemplate;
256
- _speechToTextButton;
260
+ set outputTemplate(value) { this._outputTemplate.set(value); }
261
+ get outputTemplate() { return this._outputTemplate(); }
262
+ set outputBodyTemplate(value) { this._outputBodyTemplate.set(value); }
263
+ get outputBodyTemplate() { return this._outputBodyTemplate(); }
257
264
  get speechToTextButton() {
258
- return this._speechToTextButton;
265
+ return this._speechToTextButton();
259
266
  }
260
267
  set speechToTextButton(settings) {
261
268
  if (settings === true) {
262
- this._speechToTextButton = STB_DEFAULT_SETTINGS$2;
269
+ this._speechToTextButton.set(STB_DEFAULT_SETTINGS$2);
263
270
  }
264
271
  else if (settings === false) {
265
- this._speechToTextButton = null;
272
+ this._speechToTextButton.set(null);
266
273
  }
267
274
  else {
268
- this._speechToTextButton = { ...settings };
269
- }
270
- }
275
+ this._speechToTextButton.set({ ...settings });
276
+ }
277
+ }
278
+ _promptValue = signal('', ...(ngDevMode ? [{ debugName: "_promptValue" }] : []));
279
+ _showOutputRating = signal(false, ...(ngDevMode ? [{ debugName: "_showOutputRating" }] : []));
280
+ _promptCommands = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptCommands" }] : []));
281
+ _promptOutputs = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptOutputs" }] : []));
282
+ _promptSuggestions = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptSuggestions" }] : []));
283
+ _textAreaSettings = signal(undefined, ...(ngDevMode ? [{ debugName: "_textAreaSettings" }] : []));
284
+ _speechToTextButton = signal(null, ...(ngDevMode ? [{ debugName: "_speechToTextButton" }] : []));
285
+ _outputTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_outputTemplate" }] : []));
286
+ _outputBodyTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_outputBodyTemplate" }] : []));
271
287
  getFlattenPromptCommands(commands = this.promptCommands) {
272
288
  let newArr = [];
273
289
  commands.forEach(c => {
@@ -442,47 +458,113 @@ let Messages$3 = class Messages extends ComponentMessages {
442
458
  /**
443
459
  * Sets the Toolbar button text for the **Prompt** view.
444
460
  */
445
- promptView;
461
+ set promptView(value) {
462
+ this._promptView.set(value);
463
+ }
464
+ get promptView() {
465
+ return this._promptView();
466
+ }
446
467
  /**
447
468
  * Sets the Toolbar button text for the **Output** view.
448
469
  */
449
- outputView;
470
+ set outputView(value) {
471
+ this._outputView.set(value);
472
+ }
473
+ get outputView() {
474
+ return this._outputView();
475
+ }
450
476
  /**
451
477
  * Sets the text for the **Generate** button in the **Prompt** view.
452
478
  */
453
- generateOutput;
479
+ set generateOutput(value) {
480
+ this._generateOutput.set(value);
481
+ }
482
+ get generateOutput() {
483
+ return this._generateOutput();
484
+ }
454
485
  /**
455
486
  * Sets the placeholder text for the **Prompt** view text area.
456
487
  */
457
- promptPlaceholder;
488
+ set promptPlaceholder(value) {
489
+ this._promptPlaceholder.set(value);
490
+ }
491
+ get promptPlaceholder() {
492
+ return this._promptPlaceholder();
493
+ }
458
494
  /**
459
495
  * Sets the text for the **Copy** button text in each **Output** view card.
460
496
  */
461
- copyOutput;
497
+ set copyOutput(value) {
498
+ this._copyOutput.set(value);
499
+ }
500
+ get copyOutput() {
501
+ return this._copyOutput();
502
+ }
462
503
  /**
463
504
  * Sets the **Retry** button text in each **Output** view card.
464
505
  */
465
- retryGeneration;
506
+ set retryGeneration(value) {
507
+ this._retryGeneration.set(value);
508
+ }
509
+ get retryGeneration() {
510
+ return this._retryGeneration();
511
+ }
466
512
  /**
467
513
  * Sets the title of each card in the **Output** view.
468
514
  */
469
- outputTitle;
515
+ set outputTitle(value) {
516
+ this._outputTitle.set(value);
517
+ }
518
+ get outputTitle() {
519
+ return this._outputTitle();
520
+ }
470
521
  /**
471
522
  * Sets the title of each retry card in the **Output** view.
472
523
  */
473
- outputRetryTitle;
524
+ set outputRetryTitle(value) {
525
+ this._outputRetryTitle.set(value);
526
+ }
527
+ get outputRetryTitle() {
528
+ return this._outputRetryTitle();
529
+ }
474
530
  /**
475
531
  * Sets the title of the **Prompt suggestions** button.
476
532
  */
477
- promptSuggestions;
533
+ set promptSuggestions(value) {
534
+ this._promptSuggestions.set(value);
535
+ }
536
+ get promptSuggestions() {
537
+ return this._promptSuggestions();
538
+ }
478
539
  /**
479
540
  * Sets the aria-label for the **Speech to Text** button.
480
541
  */
481
- speechToTextButton;
542
+ set speechToTextButton(value) {
543
+ this._speechToTextButton.set(value);
544
+ }
545
+ get speechToTextButton() {
546
+ return this._speechToTextButton();
547
+ }
482
548
  /**
483
549
  * Sets the aria-label for the **Toolbar** element.
484
550
  */
485
- toolbarLabel;
551
+ set toolbarLabel(value) {
552
+ this._toolbarLabel.set(value);
553
+ }
554
+ get toolbarLabel() {
555
+ return this._toolbarLabel();
556
+ }
557
+ _promptView = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptView" }] : []));
558
+ _outputView = signal(undefined, ...(ngDevMode ? [{ debugName: "_outputView" }] : []));
559
+ _generateOutput = signal(undefined, ...(ngDevMode ? [{ debugName: "_generateOutput" }] : []));
560
+ _promptPlaceholder = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptPlaceholder" }] : []));
561
+ _copyOutput = signal(undefined, ...(ngDevMode ? [{ debugName: "_copyOutput" }] : []));
562
+ _retryGeneration = signal(undefined, ...(ngDevMode ? [{ debugName: "_retryGeneration" }] : []));
563
+ _outputTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_outputTitle" }] : []));
564
+ _outputRetryTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_outputRetryTitle" }] : []));
565
+ _promptSuggestions = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptSuggestions" }] : []));
566
+ _speechToTextButton = signal(undefined, ...(ngDevMode ? [{ debugName: "_speechToTextButton" }] : []));
567
+ _toolbarLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_toolbarLabel" }] : []));
486
568
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
487
569
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.27", type: Messages, isStandalone: true, inputs: { promptView: "promptView", outputView: "outputView", generateOutput: "generateOutput", promptPlaceholder: "promptPlaceholder", copyOutput: "copyOutput", retryGeneration: "retryGeneration", outputTitle: "outputTitle", outputRetryTitle: "outputRetryTitle", promptSuggestions: "promptSuggestions", speechToTextButton: "speechToTextButton", toolbarLabel: "toolbarLabel" }, usesInheritance: true, ngImport: i0 });
488
570
  };
@@ -621,17 +703,19 @@ class AIPromptComponent {
621
703
  service;
622
704
  navigationService;
623
705
  ngZone;
706
+ injector;
624
707
  element;
625
708
  renderer;
626
709
  hostClasses = true;
627
710
  get dirAttr() {
628
711
  return this.direction;
629
712
  }
630
- constructor(localization, service, navigationService, ngZone, element, renderer) {
713
+ constructor(localization, service, navigationService, ngZone, injector, element, renderer) {
631
714
  this.localization = localization;
632
715
  this.service = service;
633
716
  this.navigationService = navigationService;
634
717
  this.ngZone = ngZone;
718
+ this.injector = injector;
635
719
  this.element = element;
636
720
  this.renderer = renderer;
637
721
  validatePackage(packageMetadata);
@@ -664,53 +748,75 @@ class AIPromptComponent {
664
748
  * The active view index of the AIPrompt component.
665
749
  */
666
750
  set activeView(idx) {
667
- if (this._activeView !== idx) {
668
- this._activeView = idx;
751
+ if (this._activeView() !== idx) {
752
+ this._activeView.set(idx);
669
753
  if (this.service.promptValue) {
670
754
  this.service.promptValue = '';
671
755
  }
672
756
  }
673
757
  }
674
758
  get activeView() {
675
- return this._activeView;
759
+ return this._activeView();
676
760
  }
677
761
  /**
678
762
  * Sets the collection of commands to render in the Command view.
679
763
  */
680
764
  set promptCommands(value) {
765
+ this._promptCommands.set(value);
681
766
  this.service.promptCommands = value;
682
767
  }
768
+ get promptCommands() {
769
+ return this._promptCommands();
770
+ }
683
771
  /**
684
772
  * Sets the collection of suggestions to render in the Prompt view.
685
773
  */
686
774
  set promptSuggestions(value) {
775
+ this._promptSuggestions.set(value);
687
776
  this.service.promptSuggestions = value;
688
777
  }
778
+ get promptSuggestions() {
779
+ return this._promptSuggestions();
780
+ }
689
781
  /**
690
782
  * Sets the collection of generated prompt outputs to render in the Output view.
691
783
  */
692
784
  set promptOutputs(value) {
785
+ this._promptOutputs.set(value);
693
786
  this.service.promptOutputs = value;
694
787
  }
788
+ get promptOutputs() {
789
+ return this._promptOutputs();
790
+ }
695
791
  /**
696
792
  * Specifies whether the rating buttons appear in each Output view card.
697
793
  * The rating buttons do not appear by default.
698
794
  * @default false
699
795
  */
700
796
  set showOutputRating(value) {
797
+ this._showOutputRating.set(value);
701
798
  this.service.showOutputRating = value;
702
799
  }
800
+ get showOutputRating() {
801
+ return this._showOutputRating();
802
+ }
703
803
  /**
704
804
  * Specifies whether the Stop generation button appears in the Output view.
705
805
  * The Stop generation button does not appear by default.
706
806
  * @default false
707
807
  */
708
- streaming = false;
808
+ set streaming(value) {
809
+ this._streaming.set(value);
810
+ }
811
+ get streaming() {
812
+ return this._streaming();
813
+ }
709
814
  /**
710
815
  * Sets the settings for the Speech to Text button in the Prompt view
711
816
  * ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/aiprompt/configuration#enabling-speech-to-text)).
712
817
  */
713
818
  set speechToTextButton(settings) {
819
+ this._speechToTextButton.set(settings);
714
820
  if (settings) {
715
821
  this.service.speechToTextButton = settings;
716
822
  }
@@ -718,27 +824,49 @@ class AIPromptComponent {
718
824
  this.service.speechToTextButton = false;
719
825
  }
720
826
  }
827
+ get speechToTextButton() {
828
+ return this._speechToTextButton();
829
+ }
721
830
  /**
722
831
  * Sets the settings for the TextArea in the Prompt view
723
832
  * ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/aiprompt/configuration#configuring-the-prompt-text-area)).
724
833
  */
725
834
  set textAreaSettings(settings) {
835
+ this._textAreaSettings.set(settings);
726
836
  this.service.textAreaSettings = settings;
727
837
  }
838
+ get textAreaSettings() {
839
+ return this._textAreaSettings();
840
+ }
728
841
  /**
729
842
  * Sets the SVG icon for the Generate button in the Prompt view.
730
843
  */
731
- generateButtonSVGIcon = sparklesIcon;
844
+ set generateButtonSVGIcon(value) {
845
+ this._generateButtonSVGIcon.set(value);
846
+ }
847
+ get generateButtonSVGIcon() {
848
+ return this._generateButtonSVGIcon();
849
+ }
732
850
  /**
733
851
  * Sets the icon for the Generate button in the Prompt view.
734
852
  * @default 'sparkles'
735
853
  */
736
- generateButtonIcon = 'sparkles';
854
+ set generateButtonIcon(value) {
855
+ this._generateButtonIcon.set(value);
856
+ }
857
+ get generateButtonIcon() {
858
+ return this._generateButtonIcon();
859
+ }
737
860
  /**
738
861
  * Sets the disabled state for the Generate button in the Prompt view.
739
862
  * @default false
740
863
  */
741
- disabledGenerateButton = false;
864
+ set disabledGenerateButton(value) {
865
+ this._disabledGenerateButton.set(value);
866
+ }
867
+ get disabledGenerateButton() {
868
+ return this._disabledGenerateButton();
869
+ }
742
870
  /**
743
871
  * Fires when the `activeView` property is updated.
744
872
  * Use this event for two-way binding of the `activeView` property.
@@ -774,13 +902,6 @@ class AIPromptComponent {
774
902
  }
775
903
  }));
776
904
  }
777
- ngOnChanges(changes) {
778
- if (changes['streaming'] && changes['streaming'].currentValue === true) {
779
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
780
- this.fabButton?.focus();
781
- });
782
- }
783
- }
784
905
  ngAfterContentChecked() {
785
906
  if (this.outputTemplate !== this.service.outputTemplate) {
786
907
  this.service.outputTemplate = this.outputTemplate;
@@ -792,10 +913,10 @@ class AIPromptComponent {
792
913
  ngAfterViewInit() {
793
914
  this.ngZone.runOutsideAngular(() => {
794
915
  this.service.aiPrompt = this;
795
- this.subs.add(this.service.requestEvent.subscribe(ev => this.promptRequest.emit(ev)));
796
- this.subs.add(this.service.executeEvent.subscribe(ev => this.commandExecute.emit(ev)));
797
- this.subs.add(this.service.outputCopyEvent.subscribe(ev => this.outputCopy.emit(ev)));
798
- this.subs.add(this.service.outputRatingChangeEvent.subscribe(ev => this.outputRatingChange.emit(ev)));
916
+ this.subs.add(this.service.requestEvent.subscribe(ev => this.ngZone.run(() => this.promptRequest.emit(ev))));
917
+ this.subs.add(this.service.executeEvent.subscribe(ev => this.ngZone.run(() => this.commandExecute.emit(ev))));
918
+ this.subs.add(this.service.outputCopyEvent.subscribe(ev => this.ngZone.run(() => this.outputCopy.emit(ev))));
919
+ this.subs.add(this.service.outputRatingChangeEvent.subscribe(ev => this.ngZone.run(() => this.outputRatingChange.emit(ev))));
799
920
  });
800
921
  }
801
922
  ngOnDestroy() {
@@ -841,7 +962,24 @@ class AIPromptComponent {
841
962
  */
842
963
  fabAlignment = { vertical: 'bottom', horizontal: 'end' };
843
964
  direction;
844
- _activeView = 0;
965
+ _activeView = signal(0, ...(ngDevMode ? [{ debugName: "_activeView" }] : []));
966
+ _promptCommands = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptCommands" }] : []));
967
+ _promptSuggestions = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptSuggestions" }] : []));
968
+ _promptOutputs = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptOutputs" }] : []));
969
+ _showOutputRating = signal(false, ...(ngDevMode ? [{ debugName: "_showOutputRating" }] : []));
970
+ _streaming = signal(false, ...(ngDevMode ? [{ debugName: "_streaming" }] : []));
971
+ _speechToTextButton = signal(undefined, ...(ngDevMode ? [{ debugName: "_speechToTextButton" }] : []));
972
+ _textAreaSettings = signal(undefined, ...(ngDevMode ? [{ debugName: "_textAreaSettings" }] : []));
973
+ _generateButtonSVGIcon = signal(sparklesIcon, ...(ngDevMode ? [{ debugName: "_generateButtonSVGIcon" }] : []));
974
+ _generateButtonIcon = signal('sparkles', ...(ngDevMode ? [{ debugName: "_generateButtonIcon" }] : []));
975
+ _disabledGenerateButton = signal(false, ...(ngDevMode ? [{ debugName: "_disabledGenerateButton" }] : []));
976
+ streamingEffect = effect(() => {
977
+ if (this._streaming()) {
978
+ afterNextRender(() => {
979
+ this.fabButton?.focus();
980
+ }, { injector: this.injector });
981
+ }
982
+ }, ...(ngDevMode ? [{ debugName: "streamingEffect" }] : []));
845
983
  /**
846
984
  * @hidden
847
985
  */
@@ -875,7 +1013,7 @@ class AIPromptComponent {
875
1013
  };
876
1014
  this.promptRequest.emit(eventArgs);
877
1015
  }
878
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: AIPromptComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }, { token: ToolbarNavigationService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1016
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: AIPromptComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }, { token: ToolbarNavigationService }, { token: i0.NgZone }, { token: i0.Injector }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
879
1017
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: AIPromptComponent, isStandalone: true, selector: "kendo-aiprompt", inputs: { activeView: "activeView", promptCommands: "promptCommands", promptSuggestions: "promptSuggestions", promptOutputs: "promptOutputs", showOutputRating: "showOutputRating", streaming: "streaming", speechToTextButton: "speechToTextButton", textAreaSettings: "textAreaSettings", generateButtonSVGIcon: "generateButtonSVGIcon", generateButtonIcon: "generateButtonIcon", disabledGenerateButton: "disabledGenerateButton" }, outputs: { activeViewChange: "activeViewChange", promptRequest: "promptRequest", commandExecute: "commandExecute", outputCopy: "outputCopy", outputRatingChange: "outputRatingChange", promptRequestCancel: "promptRequestCancel" }, host: { properties: { "class.k-prompt": "this.hostClasses", "attr.dir": "this.dirAttr" } }, providers: [
880
1018
  LocalizationService,
881
1019
  AIPromptService,
@@ -886,7 +1024,7 @@ class AIPromptComponent {
886
1024
  },
887
1025
  { provide: KENDO_WEBMCP_HOST, useExisting: forwardRef(() => AIPromptComponent) },
888
1026
  provideComponentName('aiprompt')
889
- ], queries: [{ propertyName: "toolbarActionsTemplate", first: true, predicate: AIPromptToolbarActionsDirective, descendants: true }, { propertyName: "outputTemplate", first: true, predicate: AIPromptOutputTemplateDirective, descendants: true }, { propertyName: "outputBodyTemplate", first: true, predicate: AIPromptOutputBodyTemplateDirective, descendants: true }, { propertyName: "views", predicate: BaseView }], viewQueries: [{ propertyName: "fabButton", first: true, predicate: ["fabButton"], descendants: true }], exportAs: ["kendoAIPrompt"], usesOnChanges: true, ngImport: i0, template: `
1027
+ ], queries: [{ propertyName: "toolbarActionsTemplate", first: true, predicate: AIPromptToolbarActionsDirective, descendants: true }, { propertyName: "outputTemplate", first: true, predicate: AIPromptOutputTemplateDirective, descendants: true }, { propertyName: "outputBodyTemplate", first: true, predicate: AIPromptOutputBodyTemplateDirective, descendants: true }, { propertyName: "views", predicate: BaseView }], viewQueries: [{ propertyName: "fabButton", first: true, predicate: ["fabButton"], descendants: true }], exportAs: ["kendoAIPrompt"], ngImport: i0, template: `
890
1028
  <ng-container kendoAIPromptLocalizedMessages
891
1029
  i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
892
1030
  promptView="Ask AI"
@@ -974,7 +1112,7 @@ class AIPromptComponent {
974
1112
  </div>
975
1113
  </div>
976
1114
  }
977
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$4, selector: "[kendoAIPromptLocalizedMessages]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: AIPromptToolbarFocusableDirective, selector: "[kendoAIPromptToolbarFocusable]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: ["themeColor", "size", "rounded", "disabled", "align", "offset", "positionMode", "icon", "svgIcon", "iconClass", "buttonClass", "dialClass", "text", "dialItemAnimation", "tabIndex", "dialItems"], outputs: ["blur", "focus", "dialItemClick", "open", "close"] }] });
1115
+ `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$4, selector: "[kendoAIPromptLocalizedMessages]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: AIPromptToolbarFocusableDirective, selector: "[kendoAIPromptToolbarFocusable]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: ["themeColor", "size", "rounded", "disabled", "align", "offset", "positionMode", "icon", "svgIcon", "iconClass", "buttonClass", "dialClass", "text", "dialItemAnimation", "tabIndex", "dialItems"], outputs: ["blur", "focus", "dialItemClick", "open", "close"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
978
1116
  }
979
1117
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: AIPromptComponent, decorators: [{
980
1118
  type: Component,
@@ -1082,9 +1220,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
1082
1220
  }
1083
1221
  `,
1084
1222
  standalone: true,
1223
+ changeDetection: ChangeDetectionStrategy.OnPush,
1085
1224
  imports: [LocalizedMessagesDirective$4, ButtonComponent, AIPromptToolbarFocusableDirective, NgTemplateOutlet, FloatingActionButtonComponent]
1086
1225
  }]
1087
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }, { type: ToolbarNavigationService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { hostClasses: [{
1226
+ }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }, { type: ToolbarNavigationService }, { type: i0.NgZone }, { type: i0.Injector }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { hostClasses: [{
1088
1227
  type: HostBinding,
1089
1228
  args: ['class.k-prompt']
1090
1229
  }], dirAttr: [{
@@ -1160,11 +1299,8 @@ class CommandViewComponent extends BaseView {
1160
1299
  /**
1161
1300
  * @hidden
1162
1301
  */
1163
- panelBarItems = [];
1164
- ngOnInit() {
1165
- if (this.service.promptCommands) {
1166
- this.panelBarItems = this.getPanelBarItems(this.service.promptCommands);
1167
- }
1302
+ get items() {
1303
+ return this._items();
1168
1304
  }
1169
1305
  /**
1170
1306
  * @hidden
@@ -1183,6 +1319,10 @@ class CommandViewComponent extends BaseView {
1183
1319
  this.service.executeEvent.next(eventArgs);
1184
1320
  }
1185
1321
  }
1322
+ _items = computed(() => {
1323
+ const commands = this.service.promptCommands;
1324
+ return commands ? this.getPanelBarItems(commands) : [];
1325
+ }, ...(ngDevMode ? [{ debugName: "_items" }] : []));
1186
1326
  getPanelBarItems(commands) {
1187
1327
  return commands.map(c => ({
1188
1328
  title: c.text,
@@ -1199,13 +1339,13 @@ class CommandViewComponent extends BaseView {
1199
1339
  }], usesInheritance: true, ngImport: i0, template: `
1200
1340
  <ng-template #content>
1201
1341
  <kendo-panelbar
1202
- [items]="panelBarItems"
1342
+ [items]="items"
1203
1343
  [animate]="false"
1204
1344
  [selectable]="false"
1205
1345
  (itemClick)="itemClickHandler($event)"
1206
1346
  ></kendo-panelbar>
1207
1347
  </ng-template>
1208
- `, isInline: true, dependencies: [{ kind: "component", type: PanelBarComponent, selector: "kendo-panelbar", inputs: ["expandMode", "selectable", "animate", "height", "keepItemContent", "items"], outputs: ["stateChange", "select", "expand", "collapse", "itemClick"], exportAs: ["kendoPanelbar"] }] });
1348
+ `, isInline: true, dependencies: [{ kind: "component", type: PanelBarComponent, selector: "kendo-panelbar", inputs: ["expandMode", "selectable", "animate", "height", "keepItemContent", "items"], outputs: ["stateChange", "select", "expand", "collapse", "itemClick"], exportAs: ["kendoPanelbar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1209
1349
  }
1210
1350
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: CommandViewComponent, decorators: [{
1211
1351
  type: Component,
@@ -1218,7 +1358,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
1218
1358
  template: `
1219
1359
  <ng-template #content>
1220
1360
  <kendo-panelbar
1221
- [items]="panelBarItems"
1361
+ [items]="items"
1222
1362
  [animate]="false"
1223
1363
  [selectable]="false"
1224
1364
  (itemClick)="itemClickHandler($event)"
@@ -1226,6 +1366,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
1226
1366
  </ng-template>
1227
1367
  `,
1228
1368
  standalone: true,
1369
+ changeDetection: ChangeDetectionStrategy.OnPush,
1229
1370
  imports: [PanelBarComponent]
1230
1371
  }]
1231
1372
  }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }] });
@@ -1296,12 +1437,18 @@ class CustomViewComponent extends BaseView {
1296
1437
  /**
1297
1438
  * Sets the content of the Custom view as a template reference.
1298
1439
  */
1299
- viewTemplate;
1440
+ set viewTemplate(value) {
1441
+ this._viewTemplate.set(value);
1442
+ }
1443
+ get viewTemplate() {
1444
+ return this._viewTemplate();
1445
+ }
1446
+ _viewTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_viewTemplate" }] : []));
1300
1447
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: CustomViewComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1301
1448
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.27", type: CustomViewComponent, isStandalone: true, selector: "kendo-aiprompt-custom-view", inputs: { viewTemplate: "viewTemplate" }, providers: [{
1302
1449
  provide: BaseView,
1303
1450
  useExisting: forwardRef(() => CustomViewComponent)
1304
- }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
1451
+ }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1305
1452
  }
1306
1453
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: CustomViewComponent, decorators: [{
1307
1454
  type: Component,
@@ -1312,7 +1459,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
1312
1459
  useExisting: forwardRef(() => CustomViewComponent)
1313
1460
  }],
1314
1461
  template: ``,
1315
- standalone: true
1462
+ standalone: true,
1463
+ changeDetection: ChangeDetectionStrategy.OnPush
1316
1464
  }]
1317
1465
  }], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { viewTemplate: [{
1318
1466
  type: Input
@@ -1331,7 +1479,12 @@ class AIPromptOutputCardComponent {
1331
1479
  return this.titleId;
1332
1480
  }
1333
1481
  ariaKeyShortcuts = 'Enter';
1334
- promptOutput;
1482
+ set promptOutput(value) {
1483
+ this._promptOutput.set(value);
1484
+ }
1485
+ get promptOutput() {
1486
+ return this._promptOutput();
1487
+ }
1335
1488
  constructor(localization, service) {
1336
1489
  this.localization = localization;
1337
1490
  this.service = service;
@@ -1351,6 +1504,7 @@ class AIPromptOutputCardComponent {
1351
1504
  positiveRatingIcon = thumbUpIcon;
1352
1505
  negativeRatingIcon = thumbDownIcon;
1353
1506
  titleId = `k-output-card-${guid()}`;
1507
+ _promptOutput = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptOutput" }] : []));
1354
1508
  messageFor(text) {
1355
1509
  return this.localization.get(text);
1356
1510
  }
@@ -1456,7 +1610,7 @@ class AIPromptOutputCardComponent {
1456
1610
  </button>
1457
1611
  }
1458
1612
  </div>
1459
- `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1613
+ `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1460
1614
  }
1461
1615
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: AIPromptOutputCardComponent, decorators: [{
1462
1616
  type: Component,
@@ -1510,6 +1664,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
1510
1664
  </div>
1511
1665
  `,
1512
1666
  standalone: true,
1667
+ changeDetection: ChangeDetectionStrategy.OnPush,
1513
1668
  imports: [ButtonComponent, NgTemplateOutlet]
1514
1669
  }]
1515
1670
  }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }], propDecorators: { hostClass: [{
@@ -1578,7 +1733,7 @@ class OutputViewComponent extends BaseView {
1578
1733
  }
1579
1734
  </div>
1580
1735
  </ng-template>
1581
- `, isInline: true, dependencies: [{ kind: "component", type: AIPromptOutputCardComponent, selector: "[kendoAIPromptOutputCard]", inputs: ["promptOutput"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1736
+ `, isInline: true, dependencies: [{ kind: "component", type: AIPromptOutputCardComponent, selector: "[kendoAIPromptOutputCard]", inputs: ["promptOutput"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1582
1737
  }
1583
1738
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: OutputViewComponent, decorators: [{
1584
1739
  type: Component,
@@ -1605,6 +1760,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
1605
1760
  </ng-template>
1606
1761
  `,
1607
1762
  standalone: true,
1763
+ changeDetection: ChangeDetectionStrategy.OnPush,
1608
1764
  imports: [AIPromptOutputCardComponent, NgTemplateOutlet]
1609
1765
  }]
1610
1766
  }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }] });
@@ -1785,7 +1941,7 @@ class PromptViewComponent extends BaseView {
1785
1941
  </div>
1786
1942
  }
1787
1943
  </ng-template>
1788
- `, isInline: true, dependencies: [{ kind: "component", type: TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator", "value"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }] });
1944
+ `, isInline: true, dependencies: [{ kind: "component", type: TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator", "value"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1789
1945
  }
1790
1946
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptViewComponent, decorators: [{
1791
1947
  type: Component,
@@ -1879,6 +2035,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
1879
2035
  </ng-template>
1880
2036
  `,
1881
2037
  standalone: true,
2038
+ changeDetection: ChangeDetectionStrategy.OnPush,
1882
2039
  imports: [TextAreaComponent, ButtonComponent, TextAreaSuffixComponent, SpeechToTextButtonComponent]
1883
2040
  }]
1884
2041
  }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }] });
@@ -2607,36 +2764,56 @@ const transformActions = (actions) => {
2607
2764
  class ChatService {
2608
2765
  zone;
2609
2766
  authorId;
2610
- messageWidthMode;
2611
2767
  messageContextMenuActions = [];
2612
- calculatedContextMenuActions = [];
2613
2768
  fileActions = [];
2614
- toggleMessageState = false;
2615
2769
  layoutChangeInProgress = false;
2616
- reply;
2617
2770
  messages = [];
2618
2771
  repliedToMessages = [];
2619
2772
  chatElement;
2620
2773
  messageElementsMap = new Map();
2621
2774
  messagesContextMenu;
2622
- activeMessage;
2623
2775
  activeMessageElement;
2624
2776
  selectOnMenuClose = false;
2625
- active = false;
2626
- messageFilesLayout = 'vertical';
2627
- timestampVisibility = 'focus';
2628
- showUsername = true;
2629
- showAvatar = true;
2630
- _speechToTextButton = STB_DEFAULT_SETTINGS$1;
2631
- _fileSelectButton = FILESELECT_BUTTON_DEFAULT_SETTINGS$1;
2632
- _sendButtonSettings = SEND_BTN_DEFAULT_SETTINGS;
2633
- _messageBoxSettings = MESSAGE_BOX_SETTINGS;
2634
- _suggestionsLayout = SUGGESTIONS_LAYOUT_DEFAULT_SETTINGS;
2635
- _quickActionsLayout = SUGGESTIONS_LAYOUT_DEFAULT_SETTINGS;
2636
- _messageToolbarActions = [];
2637
- _authorMessageSettings;
2638
- _receiverMessageSettings;
2639
- _allowMessageCollapse;
2777
+ get calculatedContextMenuActions() { return this._calculatedContextMenuActions(); }
2778
+ set calculatedContextMenuActions(v) { this._calculatedContextMenuActions.set(v); }
2779
+ get reply() { return this._reply(); }
2780
+ set reply(v) { this._reply.set(v); }
2781
+ get messageWidthMode() { return this._messageWidthMode(); }
2782
+ set messageWidthMode(v) { this._messageWidthMode.set(v); }
2783
+ get toggleMessageState() { return this._toggleMessageState(); }
2784
+ set toggleMessageState(v) { this._toggleMessageState.set(v); }
2785
+ get activeMessage() { return this._activeMessage(); }
2786
+ set activeMessage(v) { this._activeMessage.set(v); }
2787
+ get active() { return this._active(); }
2788
+ set active(v) { this._active.set(v); }
2789
+ get messageFilesLayout() { return this._messageFilesLayout(); }
2790
+ set messageFilesLayout(v) { this._messageFilesLayout.set(v); }
2791
+ get timestampVisibility() { return this._timestampVisibility(); }
2792
+ set timestampVisibility(v) { this._timestampVisibility.set(v); }
2793
+ get showUsername() { return this._showUsername(); }
2794
+ set showUsername(v) { this._showUsername.set(v); }
2795
+ get showAvatar() { return this._showAvatar(); }
2796
+ set showAvatar(v) { this._showAvatar.set(v); }
2797
+ _speechToTextButton = signal(STB_DEFAULT_SETTINGS$1, ...(ngDevMode ? [{ debugName: "_speechToTextButton" }] : []));
2798
+ _fileSelectButton = signal(FILESELECT_BUTTON_DEFAULT_SETTINGS$1, ...(ngDevMode ? [{ debugName: "_fileSelectButton" }] : []));
2799
+ _sendButtonSettings = signal(SEND_BTN_DEFAULT_SETTINGS, ...(ngDevMode ? [{ debugName: "_sendButtonSettings" }] : []));
2800
+ _messageBoxSettings = signal(MESSAGE_BOX_SETTINGS, ...(ngDevMode ? [{ debugName: "_messageBoxSettings" }] : []));
2801
+ _suggestionsLayout = signal(SUGGESTIONS_LAYOUT_DEFAULT_SETTINGS, ...(ngDevMode ? [{ debugName: "_suggestionsLayout" }] : []));
2802
+ _quickActionsLayout = signal(SUGGESTIONS_LAYOUT_DEFAULT_SETTINGS, ...(ngDevMode ? [{ debugName: "_quickActionsLayout" }] : []));
2803
+ _messageToolbarActions = signal([], ...(ngDevMode ? [{ debugName: "_messageToolbarActions" }] : []));
2804
+ _authorMessageSettings = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorMessageSettings" }] : []));
2805
+ _receiverMessageSettings = signal(undefined, ...(ngDevMode ? [{ debugName: "_receiverMessageSettings" }] : []));
2806
+ _allowMessageCollapse = signal(undefined, ...(ngDevMode ? [{ debugName: "_allowMessageCollapse" }] : []));
2807
+ _messageWidthMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageWidthMode" }] : []));
2808
+ _toggleMessageState = signal(false, ...(ngDevMode ? [{ debugName: "_toggleMessageState" }] : []));
2809
+ _activeMessage = signal(undefined, ...(ngDevMode ? [{ debugName: "_activeMessage" }] : []));
2810
+ _active = signal(false, ...(ngDevMode ? [{ debugName: "_active" }] : []));
2811
+ _messageFilesLayout = signal('vertical', ...(ngDevMode ? [{ debugName: "_messageFilesLayout" }] : []));
2812
+ _timestampVisibility = signal('focus', ...(ngDevMode ? [{ debugName: "_timestampVisibility" }] : []));
2813
+ _showUsername = signal(true, ...(ngDevMode ? [{ debugName: "_showUsername" }] : []));
2814
+ _showAvatar = signal(true, ...(ngDevMode ? [{ debugName: "_showAvatar" }] : []));
2815
+ _reply = signal(undefined, ...(ngDevMode ? [{ debugName: "_reply" }] : []));
2816
+ _calculatedContextMenuActions = signal([], ...(ngDevMode ? [{ debugName: "_calculatedContextMenuActions" }] : []));
2640
2817
  subjects = {
2641
2818
  toolbarAction: new Subject(),
2642
2819
  contextMenuAction: new Subject(),
@@ -2671,79 +2848,79 @@ class ChatService {
2671
2848
  this.zone = zone;
2672
2849
  }
2673
2850
  set authorMessageSettings(settings) {
2674
- const previousSettings = this._authorMessageSettings;
2851
+ const previousSettings = this._authorMessageSettings();
2675
2852
  if (JSON.stringify(previousSettings) !== JSON.stringify(settings)) {
2676
2853
  this.updateComponentSettings('_authorMessageSettings', settings, null);
2677
- this.emit('authorMessageSettingsChange', this._authorMessageSettings);
2854
+ this.emit('authorMessageSettingsChange', this._authorMessageSettings());
2678
2855
  }
2679
2856
  }
2680
2857
  get authorMessageSettings() {
2681
- return this._authorMessageSettings;
2858
+ return this._authorMessageSettings();
2682
2859
  }
2683
2860
  set receiverMessageSettings(settings) {
2684
- const previousSettings = this._receiverMessageSettings;
2861
+ const previousSettings = this._receiverMessageSettings();
2685
2862
  if (JSON.stringify(previousSettings) !== JSON.stringify(settings)) {
2686
2863
  this.updateComponentSettings('_receiverMessageSettings', settings, null);
2687
- this.emit('receiverMessageSettingsChange', this._receiverMessageSettings);
2864
+ this.emit('receiverMessageSettingsChange', this._receiverMessageSettings());
2688
2865
  }
2689
2866
  }
2690
2867
  get receiverMessageSettings() {
2691
- return this._receiverMessageSettings;
2868
+ return this._receiverMessageSettings();
2692
2869
  }
2693
2870
  set speechToTextButton(settings) {
2694
2871
  this.updateComponentSettings('_speechToTextButton', settings, STB_DEFAULT_SETTINGS$1);
2695
2872
  }
2696
2873
  get speechToTextButton() {
2697
- return this._speechToTextButton;
2874
+ return this._speechToTextButton();
2698
2875
  }
2699
2876
  set fileSelectButton(settings) {
2700
2877
  this.updateComponentSettings('_fileSelectButton', settings, FILESELECT_BUTTON_DEFAULT_SETTINGS$1);
2701
2878
  }
2702
2879
  get fileSelectButton() {
2703
- return this._fileSelectButton;
2880
+ return this._fileSelectButton();
2704
2881
  }
2705
2882
  set sendButton(settings) {
2706
2883
  this.updateComponentSettings('_sendButtonSettings', settings, SEND_BTN_DEFAULT_SETTINGS);
2707
2884
  }
2708
2885
  get sendButton() {
2709
- return this._sendButtonSettings;
2886
+ return this._sendButtonSettings();
2710
2887
  }
2711
2888
  set messageBoxSettings(settings) {
2712
2889
  this.updateComponentSettings('_messageBoxSettings', settings, MESSAGE_BOX_SETTINGS);
2713
2890
  }
2714
2891
  get messageBoxSettings() {
2715
- return this._messageBoxSettings;
2892
+ return this._messageBoxSettings();
2716
2893
  }
2717
2894
  set suggestionsLayout(layoutMode) {
2718
- this._suggestionsLayout = layoutMode;
2719
- this.emit('suggestionsLayoutChange', this._suggestionsLayout);
2895
+ this._suggestionsLayout.set(layoutMode);
2896
+ this.emit('suggestionsLayoutChange', this._suggestionsLayout());
2720
2897
  }
2721
2898
  get suggestionsLayout() {
2722
- return this._suggestionsLayout;
2899
+ return this._suggestionsLayout();
2723
2900
  }
2724
2901
  set quickActionsLayout(layoutMode) {
2725
- this._quickActionsLayout = layoutMode;
2726
- this.emit('quickActionsLayoutChange', this._quickActionsLayout);
2902
+ this._quickActionsLayout.set(layoutMode);
2903
+ this.emit('quickActionsLayoutChange', this._quickActionsLayout());
2727
2904
  }
2728
2905
  get quickActionsLayout() {
2729
- return this._quickActionsLayout;
2906
+ return this._quickActionsLayout();
2730
2907
  }
2731
2908
  set messageToolbarActions(value) {
2732
- this._messageToolbarActions = value;
2733
- this.emit('messageToolbarActionsChange', this._messageToolbarActions);
2909
+ this._messageToolbarActions.set(value);
2910
+ this.emit('messageToolbarActionsChange', this._messageToolbarActions());
2734
2911
  }
2735
2912
  get messageToolbarActions() {
2736
- return this._messageToolbarActions;
2913
+ return this._messageToolbarActions();
2737
2914
  }
2738
2915
  set allowMessageCollapse(value) {
2739
- const previousValue = this._allowMessageCollapse;
2916
+ const previousValue = this._allowMessageCollapse();
2740
2917
  if (previousValue !== value) {
2741
- this._allowMessageCollapse = value;
2742
- this.emit('allowMessageCollapseChange', this._allowMessageCollapse);
2918
+ this._allowMessageCollapse.set(value);
2919
+ this.emit('allowMessageCollapseChange', this._allowMessageCollapse());
2743
2920
  }
2744
2921
  }
2745
2922
  get allowMessageCollapse() {
2746
- return this._allowMessageCollapse;
2923
+ return this._allowMessageCollapse();
2747
2924
  }
2748
2925
  calculateContextMenuActions(isOwn) {
2749
2926
  const settings = isOwn ? this.authorMessageSettings : this.receiverMessageSettings;
@@ -2817,15 +2994,17 @@ class ChatService {
2817
2994
  return targetRect.top - containerRect.top + scrollContainer.scrollTop - pinnedHeight;
2818
2995
  }
2819
2996
  updateComponentSettings(property, settings, defaultSettings) {
2997
+ let newValue;
2820
2998
  if (settings === true) {
2821
- this[property] = defaultSettings;
2999
+ newValue = defaultSettings;
2822
3000
  }
2823
3001
  else if (settings === false) {
2824
- this[property] = null;
3002
+ newValue = null;
2825
3003
  }
2826
3004
  else {
2827
- this[property] = { ...defaultSettings, ...settings };
3005
+ newValue = { ...defaultSettings, ...settings };
2828
3006
  }
3007
+ this[property].set(newValue);
2829
3008
  }
2830
3009
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ChatService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
2831
3010
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ChatService });
@@ -2846,8 +3025,19 @@ class ScrollAnchorDirective {
2846
3025
  zone;
2847
3026
  renderer;
2848
3027
  cdr;
2849
- autoScroll = true;
2850
- autoScrollThreshold = '20%';
3028
+ injector;
3029
+ set autoScroll(value) {
3030
+ this._autoScroll.set(value);
3031
+ }
3032
+ get autoScroll() {
3033
+ return this._autoScroll();
3034
+ }
3035
+ set autoScrollThreshold(value) {
3036
+ this._autoScrollThreshold.set(value);
3037
+ }
3038
+ get autoScrollThreshold() {
3039
+ return this._autoScrollThreshold();
3040
+ }
2851
3041
  set endlessMode(value) {
2852
3042
  const changed = this._endlessMode !== value;
2853
3043
  this._endlessMode = value;
@@ -2856,15 +3046,20 @@ class ScrollAnchorDirective {
2856
3046
  this.scrolling = false;
2857
3047
  if (changed && !value && this._initialScrollDone && isDocumentAvailable()) {
2858
3048
  this.element.nativeElement.scrollTo({ top: 0, behavior: 'auto' });
2859
- this._subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
3049
+ afterNextRender(() => {
2860
3050
  this.performScroll('smooth');
2861
- }));
3051
+ }, { injector: this.injector });
2862
3052
  }
2863
3053
  }
2864
3054
  get endlessMode() {
2865
3055
  return this._endlessMode;
2866
3056
  }
2867
- rangeIsAtEnd = true;
3057
+ set rangeIsAtEnd(value) {
3058
+ this._rangeIsAtEnd.set(value);
3059
+ }
3060
+ get rangeIsAtEnd() {
3061
+ return this._rangeIsAtEnd();
3062
+ }
2868
3063
  autoScrollChange = new EventEmitter();
2869
3064
  nearTop = new EventEmitter();
2870
3065
  nearBottom = new EventEmitter();
@@ -2886,6 +3081,9 @@ class ScrollAnchorDirective {
2886
3081
  _scrollingToMessage = false;
2887
3082
  _initialScrollDone = false;
2888
3083
  _subs = new Subscription();
3084
+ _autoScroll = signal(true, ...(ngDevMode ? [{ debugName: "_autoScroll" }] : []));
3085
+ _autoScrollThreshold = signal('20%', ...(ngDevMode ? [{ debugName: "_autoScrollThreshold" }] : []));
3086
+ _rangeIsAtEnd = signal(true, ...(ngDevMode ? [{ debugName: "_rangeIsAtEnd" }] : []));
2889
3087
  // Need to ensure that the scroll follows a new streaming message
2890
3088
  // until the scroll threshold is reached.
2891
3089
  _streamingFollow = false;
@@ -2894,11 +3092,12 @@ class ScrollAnchorDirective {
2894
3092
  _streamingPrevHeight = 0;
2895
3093
  _streamingPrevMsgCount = 0;
2896
3094
  _mutationObserver = null;
2897
- constructor(element, zone, renderer, cdr) {
3095
+ constructor(element, zone, renderer, cdr, injector) {
2898
3096
  this.element = element;
2899
3097
  this.zone = zone;
2900
3098
  this.renderer = renderer;
2901
3099
  this.cdr = cdr;
3100
+ this.injector = injector;
2902
3101
  }
2903
3102
  ngOnInit() {
2904
3103
  if (!isDocumentAvailable()) {
@@ -2937,7 +3136,7 @@ class ScrollAnchorDirective {
2937
3136
  });
2938
3137
  }
2939
3138
  ngAfterViewInit() {
2940
- this._subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
3139
+ afterNextRender(() => {
2941
3140
  if (this.autoScroll) {
2942
3141
  if (this._endlessMode) {
2943
3142
  this.scrollToBottomWithSettle();
@@ -2948,7 +3147,7 @@ class ScrollAnchorDirective {
2948
3147
  }
2949
3148
  this.calculateMessageBoxSeparator();
2950
3149
  this._initialScrollDone = true;
2951
- }));
3150
+ }, { injector: this.injector });
2952
3151
  }
2953
3152
  ngOnDestroy() {
2954
3153
  if (this.unsubscribe) {
@@ -3210,7 +3409,7 @@ class ScrollAnchorDirective {
3210
3409
  el.scrollTo({ top: target, behavior });
3211
3410
  this.scrolling = true;
3212
3411
  }
3213
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ScrollAnchorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
3412
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ScrollAnchorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
3214
3413
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.27", type: ScrollAnchorDirective, isStandalone: true, selector: "[kendoChatScrollAnchor]", inputs: { autoScroll: "autoScroll", autoScrollThreshold: "autoScrollThreshold", endlessMode: "endlessMode", rangeIsAtEnd: "rangeIsAtEnd" }, outputs: { autoScrollChange: "autoScrollChange", nearTop: "nearTop", nearBottom: "nearBottom" }, host: { properties: { "style.overflow-anchor": "this.overflowAnchor", "style.scroll-behavior": "this.scrollBehaviorStyle" } }, exportAs: ["scrollAnchor"], ngImport: i0 });
3215
3414
  }
3216
3415
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ScrollAnchorDirective, decorators: [{
@@ -3220,7 +3419,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
3220
3419
  exportAs: 'scrollAnchor',
3221
3420
  standalone: true
3222
3421
  }]
3223
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { autoScroll: [{
3422
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { autoScroll: [{
3224
3423
  type: Input
3225
3424
  }], autoScrollThreshold: [{
3226
3425
  type: Input
@@ -3437,96 +3636,234 @@ let Messages$2 = class Messages extends ComponentMessages {
3437
3636
  /**
3438
3637
  * Sets the text that displays when the sender deletes a message.
3439
3638
  */
3440
- deletedMessageSenderText;
3639
+ set deletedMessageSenderText(value) {
3640
+ this._deletedMessageSenderText.set(value);
3641
+ }
3642
+ get deletedMessageSenderText() {
3643
+ return this._deletedMessageSenderText();
3644
+ }
3441
3645
  /**
3442
3646
  * Sets the text that displays when the receiver deletes a message.
3443
3647
  */
3444
- deletedMessageReceiverText;
3648
+ set deletedMessageReceiverText(value) {
3649
+ this._deletedMessageReceiverText.set(value);
3650
+ }
3651
+ get deletedMessageReceiverText() {
3652
+ return this._deletedMessageReceiverText();
3653
+ }
3445
3654
  /**
3446
3655
  * Sets the text that displays when a message fails to send.
3447
3656
  */
3448
- messageFailedText;
3657
+ set messageFailedText(value) {
3658
+ this._messageFailedText.set(value);
3659
+ }
3660
+ get messageFailedText() {
3661
+ return this._messageFailedText();
3662
+ }
3449
3663
  /**
3450
3664
  * Sets the text that displays in the download section of the message.
3451
3665
  * This message displays below all files in the message.
3452
3666
  */
3453
- downloadAllFilesText;
3667
+ set downloadAllFilesText(value) {
3668
+ this._downloadAllFilesText.set(value);
3669
+ }
3670
+ get downloadAllFilesText() {
3671
+ return this._downloadAllFilesText();
3672
+ }
3454
3673
  /**
3455
3674
  * Sets the placeholder text for the message text input.
3456
3675
  */
3457
- messagePlaceholder;
3676
+ set messagePlaceholder(value) {
3677
+ this._messagePlaceholder.set(value);
3678
+ }
3679
+ get messagePlaceholder() {
3680
+ return this._messagePlaceholder();
3681
+ }
3458
3682
  /**
3459
3683
  * Sets the aria-label for the internal input/textarea element.
3460
3684
  */
3461
- messageBoxTitle;
3685
+ set messageBoxTitle(value) {
3686
+ this._messageBoxTitle.set(value);
3687
+ }
3688
+ get messageBoxTitle() {
3689
+ return this._messageBoxTitle();
3690
+ }
3462
3691
  /**
3463
3692
  * Sets the text for the **Action** button.
3464
3693
  */
3465
- actionButtonTitle;
3694
+ set actionButtonTitle(value) {
3695
+ this._actionButtonTitle.set(value);
3696
+ }
3697
+ get actionButtonTitle() {
3698
+ return this._actionButtonTitle();
3699
+ }
3466
3700
  /**
3467
3701
  * Sets the label for the message list.
3468
3702
  */
3469
- messageListLabel;
3703
+ set messageListLabel(value) {
3704
+ this._messageListLabel.set(value);
3705
+ }
3706
+ get messageListLabel() {
3707
+ return this._messageListLabel();
3708
+ }
3470
3709
  /**
3471
3710
  * Sets the label for the message input box.
3472
3711
  */
3473
- messageBoxInputLabel;
3712
+ set messageBoxInputLabel(value) {
3713
+ this._messageBoxInputLabel.set(value);
3714
+ }
3715
+ get messageBoxInputLabel() {
3716
+ return this._messageBoxInputLabel();
3717
+ }
3474
3718
  /**
3475
3719
  * Sets the text for the left arrow of the message attachments.
3476
3720
  */
3477
- messageAttachmentLeftArrow;
3721
+ set messageAttachmentLeftArrow(value) {
3722
+ this._messageAttachmentLeftArrow.set(value);
3723
+ }
3724
+ get messageAttachmentLeftArrow() {
3725
+ return this._messageAttachmentLeftArrow();
3726
+ }
3478
3727
  /**
3479
3728
  * Sets the text for the right arrow of the message attachments.
3480
3729
  */
3481
- messageAttachmentRightArrow;
3730
+ set messageAttachmentRightArrow(value) {
3731
+ this._messageAttachmentRightArrow.set(value);
3732
+ }
3733
+ get messageAttachmentRightArrow() {
3734
+ return this._messageAttachmentRightArrow();
3735
+ }
3482
3736
  /**
3483
3737
  * Sets the Speech to Text button title.
3484
3738
  */
3485
- speechToTextButtonTitle;
3739
+ set speechToTextButtonTitle(value) {
3740
+ this._speechToTextButtonTitle.set(value);
3741
+ }
3742
+ get speechToTextButtonTitle() {
3743
+ return this._speechToTextButtonTitle();
3744
+ }
3486
3745
  /**
3487
3746
  * Sets the File Select button title.
3488
3747
  */
3489
- fileSelectButtonTitle;
3748
+ set fileSelectButtonTitle(value) {
3749
+ this._fileSelectButtonTitle.set(value);
3750
+ }
3751
+ get fileSelectButtonTitle() {
3752
+ return this._fileSelectButtonTitle();
3753
+ }
3490
3754
  /**
3491
3755
  * Sets the title of the icon that removes the reply reference in the Message Box.
3492
3756
  */
3493
- removeReplyTitle;
3757
+ set removeReplyTitle(value) {
3758
+ this._removeReplyTitle.set(value);
3759
+ }
3760
+ get removeReplyTitle() {
3761
+ return this._removeReplyTitle();
3762
+ }
3494
3763
  /**
3495
3764
  * Sets the title of the icon that removes a selected file in the Message Box.
3496
3765
  */
3497
- removeFileTitle;
3766
+ set removeFileTitle(value) {
3767
+ this._removeFileTitle.set(value);
3768
+ }
3769
+ get removeFileTitle() {
3770
+ return this._removeFileTitle();
3771
+ }
3498
3772
  /**
3499
3773
  * Sets the title of the icon that shows the message can expand.
3500
3774
  */
3501
- expandTitle;
3775
+ set expandTitle(value) {
3776
+ this._expandTitle.set(value);
3777
+ }
3778
+ get expandTitle() {
3779
+ return this._expandTitle();
3780
+ }
3502
3781
  /**
3503
3782
  * Sets the title of the icon that shows the message can collapse.
3504
3783
  */
3505
- collapseTitle;
3784
+ set collapseTitle(value) {
3785
+ this._collapseTitle.set(value);
3786
+ }
3787
+ get collapseTitle() {
3788
+ return this._collapseTitle();
3789
+ }
3506
3790
  /**
3507
3791
  * Sets the title of the DropDownButton that opens the File actions.
3508
3792
  */
3509
- fileActionsTitle;
3793
+ set fileActionsTitle(value) {
3794
+ this._fileActionsTitle.set(value);
3795
+ }
3796
+ get fileActionsTitle() {
3797
+ return this._fileActionsTitle();
3798
+ }
3510
3799
  /**
3511
3800
  * Sets the title of the button that shows the **Scroll right** when the suggestions list is scrollable with buttons.
3512
3801
  */
3513
- nextSuggestionsButtonTitle;
3802
+ set nextSuggestionsButtonTitle(value) {
3803
+ this._nextSuggestionsButtonTitle.set(value);
3804
+ }
3805
+ get nextSuggestionsButtonTitle() {
3806
+ return this._nextSuggestionsButtonTitle();
3807
+ }
3514
3808
  /**
3515
3809
  * Sets the title of the button that shows the **Scroll left** when the suggestions list is scrollable with buttons.
3516
3810
  */
3517
- previousSuggestionsButtonTitle;
3811
+ set previousSuggestionsButtonTitle(value) {
3812
+ this._previousSuggestionsButtonTitle.set(value);
3813
+ }
3814
+ get previousSuggestionsButtonTitle() {
3815
+ return this._previousSuggestionsButtonTitle();
3816
+ }
3518
3817
  /**
3519
3818
  * Sets the title of the button that unpins a pinned message.
3520
3819
  */
3521
- unpinMessageTitle;
3820
+ set unpinMessageTitle(value) {
3821
+ this._unpinMessageTitle.set(value);
3822
+ }
3823
+ get unpinMessageTitle() {
3824
+ return this._unpinMessageTitle();
3825
+ }
3522
3826
  /**
3523
3827
  * Sets the aria-label for the button that resends a failed message.
3524
3828
  */
3525
- resendButtonTitle;
3829
+ set resendButtonTitle(value) {
3830
+ this._resendButtonTitle.set(value);
3831
+ }
3832
+ get resendButtonTitle() {
3833
+ return this._resendButtonTitle();
3834
+ }
3526
3835
  /**
3527
3836
  * Sets the aria-label for the attached files list.
3528
3837
  */
3529
- attachedFilesLabel;
3838
+ set attachedFilesLabel(value) {
3839
+ this._attachedFilesLabel.set(value);
3840
+ }
3841
+ get attachedFilesLabel() {
3842
+ return this._attachedFilesLabel();
3843
+ }
3844
+ _deletedMessageSenderText = signal(undefined, ...(ngDevMode ? [{ debugName: "_deletedMessageSenderText" }] : []));
3845
+ _deletedMessageReceiverText = signal(undefined, ...(ngDevMode ? [{ debugName: "_deletedMessageReceiverText" }] : []));
3846
+ _messageFailedText = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageFailedText" }] : []));
3847
+ _downloadAllFilesText = signal(undefined, ...(ngDevMode ? [{ debugName: "_downloadAllFilesText" }] : []));
3848
+ _messagePlaceholder = signal(undefined, ...(ngDevMode ? [{ debugName: "_messagePlaceholder" }] : []));
3849
+ _messageBoxTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxTitle" }] : []));
3850
+ _actionButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_actionButtonTitle" }] : []));
3851
+ _messageListLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageListLabel" }] : []));
3852
+ _messageBoxInputLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxInputLabel" }] : []));
3853
+ _messageAttachmentLeftArrow = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageAttachmentLeftArrow" }] : []));
3854
+ _messageAttachmentRightArrow = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageAttachmentRightArrow" }] : []));
3855
+ _speechToTextButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_speechToTextButtonTitle" }] : []));
3856
+ _fileSelectButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileSelectButtonTitle" }] : []));
3857
+ _removeReplyTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_removeReplyTitle" }] : []));
3858
+ _removeFileTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_removeFileTitle" }] : []));
3859
+ _expandTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_expandTitle" }] : []));
3860
+ _collapseTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_collapseTitle" }] : []));
3861
+ _fileActionsTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileActionsTitle" }] : []));
3862
+ _nextSuggestionsButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_nextSuggestionsButtonTitle" }] : []));
3863
+ _previousSuggestionsButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_previousSuggestionsButtonTitle" }] : []));
3864
+ _unpinMessageTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_unpinMessageTitle" }] : []));
3865
+ _resendButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_resendButtonTitle" }] : []));
3866
+ _attachedFilesLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_attachedFilesLabel" }] : []));
3530
3867
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3531
3868
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.27", type: Messages, isStandalone: true, selector: "kendoConversationalUIMessages", inputs: { deletedMessageSenderText: "deletedMessageSenderText", deletedMessageReceiverText: "deletedMessageReceiverText", messageFailedText: "messageFailedText", downloadAllFilesText: "downloadAllFilesText", messagePlaceholder: "messagePlaceholder", messageBoxTitle: "messageBoxTitle", actionButtonTitle: "actionButtonTitle", messageListLabel: "messageListLabel", messageBoxInputLabel: "messageBoxInputLabel", messageAttachmentLeftArrow: "messageAttachmentLeftArrow", messageAttachmentRightArrow: "messageAttachmentRightArrow", speechToTextButtonTitle: "speechToTextButtonTitle", fileSelectButtonTitle: "fileSelectButtonTitle", removeReplyTitle: "removeReplyTitle", removeFileTitle: "removeFileTitle", expandTitle: "expandTitle", collapseTitle: "collapseTitle", fileActionsTitle: "fileActionsTitle", nextSuggestionsButtonTitle: "nextSuggestionsButtonTitle", previousSuggestionsButtonTitle: "previousSuggestionsButtonTitle", unpinMessageTitle: "unpinMessageTitle", resendButtonTitle: "resendButtonTitle", attachedFilesLabel: "attachedFilesLabel" }, usesInheritance: true, ngImport: i0 });
3532
3869
  };
@@ -3633,7 +3970,7 @@ class PromptBoxEndAffixComponent {
3633
3970
  */
3634
3971
  templateRef;
3635
3972
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxEndAffixComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3636
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.27", type: PromptBoxEndAffixComponent, isStandalone: true, selector: "kendo-promptbox-end-affix", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["template"], descendants: true, static: true }], exportAs: ["kendoPromptBoxEndAffix"], ngImport: i0, template: `<ng-template #template><ng-content></ng-content></ng-template>`, isInline: true });
3973
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.27", type: PromptBoxEndAffixComponent, isStandalone: true, selector: "kendo-promptbox-end-affix", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["template"], descendants: true, static: true }], exportAs: ["kendoPromptBoxEndAffix"], ngImport: i0, template: `<ng-template #template><ng-content></ng-content></ng-template>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
3637
3974
  }
3638
3975
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxEndAffixComponent, decorators: [{
3639
3976
  type: Component,
@@ -3641,7 +3978,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
3641
3978
  exportAs: 'kendoPromptBoxEndAffix',
3642
3979
  selector: 'kendo-promptbox-end-affix',
3643
3980
  template: `<ng-template #template><ng-content></ng-content></ng-template>`,
3644
- standalone: true
3981
+ standalone: true,
3982
+ changeDetection: ChangeDetectionStrategy.OnPush,
3645
3983
  }]
3646
3984
  }], propDecorators: { templateRef: [{
3647
3985
  type: ViewChild,
@@ -3666,7 +4004,7 @@ class PromptBoxStartAffixComponent {
3666
4004
  */
3667
4005
  templateRef;
3668
4006
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxStartAffixComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3669
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.27", type: PromptBoxStartAffixComponent, isStandalone: true, selector: "kendo-promptbox-start-affix", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["template"], descendants: true, static: true }], exportAs: ["kendoPromptBoxStartAffix"], ngImport: i0, template: `<ng-template #template><ng-content></ng-content></ng-template>`, isInline: true });
4007
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.27", type: PromptBoxStartAffixComponent, isStandalone: true, selector: "kendo-promptbox-start-affix", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["template"], descendants: true, static: true }], exportAs: ["kendoPromptBoxStartAffix"], ngImport: i0, template: `<ng-template #template><ng-content></ng-content></ng-template>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
3670
4008
  }
3671
4009
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxStartAffixComponent, decorators: [{
3672
4010
  type: Component,
@@ -3674,7 +4012,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
3674
4012
  exportAs: 'kendoPromptBoxStartAffix',
3675
4013
  selector: 'kendo-promptbox-start-affix',
3676
4014
  template: `<ng-template #template><ng-content></ng-content></ng-template>`,
3677
- standalone: true
4015
+ standalone: true,
4016
+ changeDetection: ChangeDetectionStrategy.OnPush,
3678
4017
  }]
3679
4018
  }], propDecorators: { templateRef: [{
3680
4019
  type: ViewChild,
@@ -3699,7 +4038,7 @@ class PromptBoxTopAffixComponent {
3699
4038
  */
3700
4039
  templateRef;
3701
4040
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxTopAffixComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3702
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.27", type: PromptBoxTopAffixComponent, isStandalone: true, selector: "kendo-promptbox-top-affix", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["template"], descendants: true, static: true }], exportAs: ["kendoPromptBoxTopAffix"], ngImport: i0, template: `<ng-template #template><ng-content></ng-content></ng-template>`, isInline: true });
4041
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.27", type: PromptBoxTopAffixComponent, isStandalone: true, selector: "kendo-promptbox-top-affix", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["template"], descendants: true, static: true }], exportAs: ["kendoPromptBoxTopAffix"], ngImport: i0, template: `<ng-template #template><ng-content></ng-content></ng-template>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
3703
4042
  }
3704
4043
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxTopAffixComponent, decorators: [{
3705
4044
  type: Component,
@@ -3707,7 +4046,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
3707
4046
  exportAs: 'kendoPromptBoxTopAffix',
3708
4047
  selector: 'kendo-promptbox-top-affix',
3709
4048
  template: `<ng-template #template><ng-content></ng-content></ng-template>`,
3710
- standalone: true
4049
+ standalone: true,
4050
+ changeDetection: ChangeDetectionStrategy.OnPush,
3711
4051
  }]
3712
4052
  }], propDecorators: { templateRef: [{
3713
4053
  type: ViewChild,
@@ -3744,31 +4084,73 @@ let Messages$1 = class Messages extends ComponentMessages {
3744
4084
  /**
3745
4085
  * The title for the **File Select** button.
3746
4086
  */
3747
- fileSelectButtonTitle;
4087
+ set fileSelectButtonTitle(value) {
4088
+ this._fileSelectButtonTitle.set(value);
4089
+ }
4090
+ get fileSelectButtonTitle() {
4091
+ return this._fileSelectButtonTitle();
4092
+ }
3748
4093
  /**
3749
4094
  * The title for the **Action** button.
3750
4095
  */
3751
- actionButtonTitle;
4096
+ set actionButtonTitle(value) {
4097
+ this._actionButtonTitle.set(value);
4098
+ }
4099
+ get actionButtonTitle() {
4100
+ return this._actionButtonTitle();
4101
+ }
3752
4102
  /**
3753
4103
  * The title for the **Stop Generating** action.
3754
4104
  */
3755
- stopGeneratingTitle;
4105
+ set stopGeneratingTitle(value) {
4106
+ this._stopGeneratingTitle.set(value);
4107
+ }
4108
+ get stopGeneratingTitle() {
4109
+ return this._stopGeneratingTitle();
4110
+ }
3756
4111
  /**
3757
4112
  * The title for the **Speech to Text** button.
3758
4113
  */
3759
- speechToTextButtonTitle;
4114
+ set speechToTextButtonTitle(value) {
4115
+ this._speechToTextButtonTitle.set(value);
4116
+ }
4117
+ get speechToTextButtonTitle() {
4118
+ return this._speechToTextButtonTitle();
4119
+ }
3760
4120
  /**
3761
4121
  * The title for the **Remove File** button.
3762
4122
  */
3763
- removeFileTitle;
4123
+ set removeFileTitle(value) {
4124
+ this._removeFileTitle.set(value);
4125
+ }
4126
+ get removeFileTitle() {
4127
+ return this._removeFileTitle();
4128
+ }
3764
4129
  /**
3765
4130
  * Sets the aria-label for the internal input/textarea element.
3766
4131
  */
3767
- messageBoxTitle;
4132
+ set messageBoxTitle(value) {
4133
+ this._messageBoxTitle.set(value);
4134
+ }
4135
+ get messageBoxTitle() {
4136
+ return this._messageBoxTitle();
4137
+ }
3768
4138
  /**
3769
4139
  * Sets the aria-label for the attached files list.
3770
4140
  */
3771
- attachedFilesLabel;
4141
+ set attachedFilesLabel(value) {
4142
+ this._attachedFilesLabel.set(value);
4143
+ }
4144
+ get attachedFilesLabel() {
4145
+ return this._attachedFilesLabel();
4146
+ }
4147
+ _fileSelectButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileSelectButtonTitle" }] : []));
4148
+ _actionButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_actionButtonTitle" }] : []));
4149
+ _stopGeneratingTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_stopGeneratingTitle" }] : []));
4150
+ _speechToTextButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_speechToTextButtonTitle" }] : []));
4151
+ _removeFileTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_removeFileTitle" }] : []));
4152
+ _messageBoxTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxTitle" }] : []));
4153
+ _attachedFilesLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_attachedFilesLabel" }] : []));
3772
4154
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3773
4155
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.27", type: Messages, isStandalone: true, inputs: { fileSelectButtonTitle: "fileSelectButtonTitle", actionButtonTitle: "actionButtonTitle", stopGeneratingTitle: "stopGeneratingTitle", speechToTextButtonTitle: "speechToTextButtonTitle", removeFileTitle: "removeFileTitle", messageBoxTitle: "messageBoxTitle", attachedFilesLabel: "attachedFilesLabel" }, usesInheritance: true, ngImport: i0 });
3774
4156
  };
@@ -3817,7 +4199,7 @@ class PromptBoxCustomMessagesComponent extends Messages$1 {
3817
4199
  provide: Messages$1,
3818
4200
  useExisting: forwardRef(() => PromptBoxCustomMessagesComponent)
3819
4201
  }
3820
- ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
4202
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
3821
4203
  }
3822
4204
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxCustomMessagesComponent, decorators: [{
3823
4205
  type: Component,
@@ -3830,7 +4212,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
3830
4212
  ],
3831
4213
  selector: 'kendo-promptbox-messages',
3832
4214
  template: ``,
3833
- standalone: true
4215
+ standalone: true,
4216
+ changeDetection: ChangeDetectionStrategy.OnPush
3834
4217
  }]
3835
4218
  }], ctorParameters: () => [{ type: i1.LocalizationService }] });
3836
4219
 
@@ -3873,6 +4256,45 @@ const FILESELECT_BUTTON_DEFAULT_SETTINGS = {
3873
4256
  restrictions: null,
3874
4257
  accept: null
3875
4258
  };
4259
+ /**
4260
+ * @hidden
4261
+ */
4262
+ function normalizeButtonSettings(settings, defaults) {
4263
+ if (settings === true) {
4264
+ return defaults;
4265
+ }
4266
+ if (settings === false) {
4267
+ return null;
4268
+ }
4269
+ return { ...defaults, ...settings };
4270
+ }
4271
+ /**
4272
+ * @hidden
4273
+ */
4274
+ function areSettingsEqual(first, second) {
4275
+ if (first === second) {
4276
+ return true;
4277
+ }
4278
+ if (!first || !second) {
4279
+ return false;
4280
+ }
4281
+ if (Array.isArray(first) || Array.isArray(second)) {
4282
+ if (!Array.isArray(first) || !Array.isArray(second) || first.length !== second.length) {
4283
+ return false;
4284
+ }
4285
+ return first.every((item, index) => areSettingsEqual(item, second[index]));
4286
+ }
4287
+ if (typeof first !== 'object' || typeof second !== 'object') {
4288
+ return false;
4289
+ }
4290
+ const firstEntries = Object.entries(first);
4291
+ const secondObject = second;
4292
+ const secondKeys = Object.keys(secondObject);
4293
+ if (firstEntries.length !== secondKeys.length) {
4294
+ return false;
4295
+ }
4296
+ return firstEntries.every(([key, value]) => areSettingsEqual(value, secondObject[key]));
4297
+ }
3876
4298
 
3877
4299
  /**
3878
4300
  * @hidden
@@ -3913,59 +4335,113 @@ class PromptBoxBaseTool {
3913
4335
  /**
3914
4336
  * Sets the disabled state of the button.
3915
4337
  */
3916
- disabled;
4338
+ set disabled(value) {
4339
+ this._disabled.set(value);
4340
+ }
4341
+ get disabled() {
4342
+ return this._disabled();
4343
+ }
3917
4344
  /**
3918
4345
  * Sets the background and border styles of the button.
3919
4346
  */
3920
- fillMode;
4347
+ set fillMode(value) {
4348
+ this._fillMode.set(value);
4349
+ }
4350
+ get fillMode() {
4351
+ return this._fillMode();
4352
+ }
3921
4353
  /**
3922
4354
  * Sets the name of an existing font icon in the Kendo UI theme for the button.
3923
4355
  */
3924
- icon;
4356
+ set icon(value) {
4357
+ this._icon.set(value);
4358
+ }
4359
+ get icon() {
4360
+ return this._icon();
4361
+ }
3925
4362
  /**
3926
4363
  * Defines a CSS class, or multiple classes separated by spaces, applied to a span element inside the button.
3927
4364
  */
3928
- iconClass;
4365
+ set iconClass(value) {
4366
+ this._iconClass.set(value);
4367
+ }
4368
+ get iconClass() {
4369
+ return this._iconClass();
4370
+ }
3929
4371
  /**
3930
4372
  * Specifies a URL for an img element inside the button.
3931
4373
  */
3932
- imageUrl;
4374
+ set imageUrl(value) {
4375
+ this._imageUrl.set(value);
4376
+ }
4377
+ get imageUrl() {
4378
+ return this._imageUrl();
4379
+ }
3933
4380
  /**
3934
4381
  * Sets the SVG icon for the tool button.
3935
4382
  */
3936
- svgIcon;
4383
+ set svgIcon(value) {
4384
+ this._svgIcon.set(value);
4385
+ }
4386
+ get svgIcon() {
4387
+ return this._svgIcon();
4388
+ }
3937
4389
  /**
3938
4390
  * Sets the border radius of the button.
3939
4391
  */
3940
- rounded;
4392
+ set rounded(value) {
4393
+ this._rounded.set(value);
4394
+ }
4395
+ get rounded() {
4396
+ return this._rounded();
4397
+ }
3941
4398
  /**
3942
4399
  * Sets the padding of the button.
3943
4400
  */
3944
4401
  set size(value) {
3945
- if (this._size !== value) {
3946
- this._size = value;
4402
+ if (this._size() !== value) {
4403
+ this._size.set(value);
3947
4404
  this.sizeChange.emit(value);
3948
4405
  }
3949
4406
  }
3950
4407
  get size() {
3951
- return this._size;
4408
+ return this._size();
3952
4409
  }
3953
4410
  /**
3954
4411
  * Sets a predefined theme color for the button.
3955
4412
  */
3956
- themeColor;
4413
+ set themeColor(value) {
4414
+ this._themeColor.set(value);
4415
+ }
4416
+ get themeColor() {
4417
+ return this._themeColor();
4418
+ }
3957
4419
  /**
3958
4420
  * Sets the title attribute of the button.
3959
4421
  *
3960
4422
  * @remarks
3961
4423
  * This property is related to accessibility.
3962
4424
  */
3963
- title;
4425
+ set title(value) {
4426
+ this._title.set(value);
4427
+ }
4428
+ get title() {
4429
+ return this._title();
4430
+ }
3964
4431
  /**
3965
4432
  * @hidden
3966
4433
  */
3967
4434
  sizeChange = new EventEmitter();
3968
- _size;
4435
+ _disabled = signal(undefined, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
4436
+ _fillMode = signal(undefined, ...(ngDevMode ? [{ debugName: "_fillMode" }] : []));
4437
+ _icon = signal(undefined, ...(ngDevMode ? [{ debugName: "_icon" }] : []));
4438
+ _iconClass = signal(undefined, ...(ngDevMode ? [{ debugName: "_iconClass" }] : []));
4439
+ _imageUrl = signal(undefined, ...(ngDevMode ? [{ debugName: "_imageUrl" }] : []));
4440
+ _svgIcon = signal(undefined, ...(ngDevMode ? [{ debugName: "_svgIcon" }] : []));
4441
+ _rounded = signal(undefined, ...(ngDevMode ? [{ debugName: "_rounded" }] : []));
4442
+ _size = signal(undefined, ...(ngDevMode ? [{ debugName: "_size" }] : []));
4443
+ _themeColor = signal(undefined, ...(ngDevMode ? [{ debugName: "_themeColor" }] : []));
4444
+ _title = signal(undefined, ...(ngDevMode ? [{ debugName: "_title" }] : []));
3969
4445
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxBaseTool, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3970
4446
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.27", type: PromptBoxBaseTool, isStandalone: true, inputs: { disabled: "disabled", fillMode: "fillMode", icon: "icon", iconClass: "iconClass", imageUrl: "imageUrl", svgIcon: "svgIcon", rounded: "rounded", size: "size", themeColor: "themeColor", title: "title" }, outputs: { sizeChange: "sizeChange" }, ngImport: i0 });
3971
4447
  }
@@ -4012,30 +4488,54 @@ class PromptBoxActionButtonComponent extends PromptBoxBaseTool {
4012
4488
  /**
4013
4489
  * @hidden
4014
4490
  */
4015
- buttonClass;
4491
+ set buttonClass(value) {
4492
+ this._buttonClass.set(value);
4493
+ }
4494
+ get buttonClass() {
4495
+ return this._buttonClass();
4496
+ }
4016
4497
  /**
4017
4498
  * Sets the loading state of the **Action** button.
4018
4499
  *
4019
4500
  * @default false
4020
4501
  */
4021
- loading = false;
4502
+ set loading(value) {
4503
+ this._loading.set(value);
4504
+ }
4505
+ get loading() {
4506
+ return this._loading();
4507
+ }
4022
4508
  /**
4023
4509
  * Sets the icon to be displayed when the **Action** button is in loading state.
4024
4510
  *
4025
4511
  * @default 'stop'
4026
4512
  */
4027
- loadingIcon = 'stop';
4513
+ set loadingIcon(value) {
4514
+ this._loadingIcon.set(value);
4515
+ }
4516
+ get loadingIcon() {
4517
+ return this._loadingIcon();
4518
+ }
4028
4519
  /**
4029
4520
  * Sets the SVG icon to be displayed when the **Action** button is in loading state.
4030
4521
  *
4031
4522
  * @default stopIcon
4032
4523
  */
4033
- loadingSVGIcon = stopIcon;
4524
+ set loadingSVGIcon(value) {
4525
+ this._loadingSVGIcon.set(value);
4526
+ }
4527
+ get loadingSVGIcon() {
4528
+ return this._loadingSVGIcon();
4529
+ }
4034
4530
  /**
4035
4531
  * Fires when the user clicks the Action button.
4036
4532
  * @hidden
4037
4533
  */
4038
4534
  promptAction = new EventEmitter();
4535
+ _buttonClass = signal(undefined, ...(ngDevMode ? [{ debugName: "_buttonClass" }] : []));
4536
+ _loading = signal(false, ...(ngDevMode ? [{ debugName: "_loading" }] : []));
4537
+ _loadingIcon = signal('stop', ...(ngDevMode ? [{ debugName: "_loadingIcon" }] : []));
4538
+ _loadingSVGIcon = signal(stopIcon, ...(ngDevMode ? [{ debugName: "_loadingSVGIcon" }] : []));
4039
4539
  constructor(localization) {
4040
4540
  super();
4041
4541
  this.localization = localization;
@@ -4082,7 +4582,7 @@ class PromptBoxActionButtonComponent extends PromptBoxBaseTool {
4082
4582
  [themeColor]="themeColor"
4083
4583
  (click)="handleClick()"
4084
4584
  ></button>
4085
- `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
4585
+ `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4086
4586
  }
4087
4587
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxActionButtonComponent, decorators: [{
4088
4588
  type: Component,
@@ -4116,6 +4616,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
4116
4616
  `,
4117
4617
  standalone: true,
4118
4618
  imports: [ButtonComponent],
4619
+ changeDetection: ChangeDetectionStrategy.OnPush,
4119
4620
  }]
4120
4621
  }], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { buttonClass: [{
4121
4622
  type: Input
@@ -4150,23 +4651,41 @@ class PromptBoxFileSelectButtonComponent extends PromptBoxBaseTool {
4150
4651
  /**
4151
4652
  * Sets the restrictions for selected files.
4152
4653
  */
4153
- restrictions = null;
4654
+ set restrictions(value) {
4655
+ this._restrictions.set(value);
4656
+ }
4657
+ get restrictions() {
4658
+ return this._restrictions();
4659
+ }
4154
4660
  /**
4155
4661
  * Allows you to select multiple files.
4156
4662
  *
4157
4663
  * @default true
4158
4664
  */
4159
- multiple = true;
4665
+ set multiple(value) {
4666
+ this._multiple.set(value);
4667
+ }
4668
+ get multiple() {
4669
+ return this._multiple();
4670
+ }
4160
4671
  /**
4161
4672
  * Sets the `accept` attribute of the internal FileSelect component.
4162
4673
  * Specifies the file types that the user can select.
4163
4674
  */
4164
- accept = null;
4675
+ set accept(value) {
4676
+ this._accept.set(value);
4677
+ }
4678
+ get accept() {
4679
+ return this._accept();
4680
+ }
4165
4681
  /**
4166
4682
  * Fires when the user selects files.
4167
4683
  * @hidden
4168
4684
  */
4169
4685
  selectAttachments = new EventEmitter();
4686
+ _restrictions = signal(null, ...(ngDevMode ? [{ debugName: "_restrictions" }] : []));
4687
+ _multiple = signal(true, ...(ngDevMode ? [{ debugName: "_multiple" }] : []));
4688
+ _accept = signal(null, ...(ngDevMode ? [{ debugName: "_accept" }] : []));
4170
4689
  constructor(localization) {
4171
4690
  super();
4172
4691
  this.localization = localization;
@@ -4229,7 +4748,7 @@ class PromptBoxFileSelectButtonComponent extends PromptBoxBaseTool {
4229
4748
  [accept]="accept"
4230
4749
  (select)="handleSelect($event)"
4231
4750
  ></kendo-fileselect>
4232
- `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: FileSelectComponent, selector: "kendo-fileselect", inputs: ["name"], outputs: ["valueChange"], exportAs: ["kendoFileSelect"] }] });
4751
+ `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: FileSelectComponent, selector: "kendo-fileselect", inputs: ["name"], outputs: ["valueChange"], exportAs: ["kendoFileSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4233
4752
  }
4234
4753
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxFileSelectButtonComponent, decorators: [{
4235
4754
  type: Component,
@@ -4270,6 +4789,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
4270
4789
  `,
4271
4790
  standalone: true,
4272
4791
  imports: [ButtonComponent, FileSelectComponent],
4792
+ changeDetection: ChangeDetectionStrategy.OnPush,
4273
4793
  }]
4274
4794
  }], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { fileSelectComponent: [{
4275
4795
  type: ViewChild,
@@ -4289,15 +4809,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
4289
4809
  */
4290
4810
  class PromptBoxFileComponent {
4291
4811
  localization;
4292
- promptBoxFile;
4293
- removable = false;
4294
- fileActions;
4295
- disabled = false;
4812
+ set promptBoxFile(value) {
4813
+ this._promptBoxFile.set(value);
4814
+ }
4815
+ get promptBoxFile() {
4816
+ return this._promptBoxFile();
4817
+ }
4818
+ set removable(value) {
4819
+ this._removable.set(value);
4820
+ }
4821
+ get removable() {
4822
+ return this._removable();
4823
+ }
4824
+ set fileActions(value) {
4825
+ this._fileActions.set(value);
4826
+ }
4827
+ get fileActions() {
4828
+ return this._fileActions();
4829
+ }
4830
+ set disabled(value) {
4831
+ this._disabled.set(value);
4832
+ }
4833
+ get disabled() {
4834
+ return this._disabled();
4835
+ }
4296
4836
  role = 'listitem';
4297
4837
  get ariaLabel() {
4298
4838
  return `${this.promptBoxFile?.name || ''} ${this.getTotalFilesSizeMessage(this.promptBoxFile)}`.trim();
4299
4839
  }
4300
4840
  remove = new EventEmitter();
4841
+ _promptBoxFile = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptBoxFile" }] : []));
4842
+ _removable = signal(false, ...(ngDevMode ? [{ debugName: "_removable" }] : []));
4843
+ _fileActions = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileActions" }] : []));
4844
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
4301
4845
  deleteIcon = xCircleIcon;
4302
4846
  moreIcon = moreVerticalIcon;
4303
4847
  constructor(localization) {
@@ -4340,7 +4884,7 @@ class PromptBoxFileComponent {
4340
4884
  fillMode="flat"
4341
4885
  ></button>
4342
4886
  }
4343
- `, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
4887
+ `, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4344
4888
  }
4345
4889
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxFileComponent, decorators: [{
4346
4890
  type: Component,
@@ -4372,6 +4916,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
4372
4916
  `,
4373
4917
  standalone: true,
4374
4918
  imports: [IconWrapperComponent, ButtonComponent],
4919
+ changeDetection: ChangeDetectionStrategy.OnPush,
4375
4920
  }]
4376
4921
  }], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { promptBoxFile: [{
4377
4922
  type: Input
@@ -4410,31 +4955,61 @@ class PromptBoxSpeechToTextButtonComponent extends PromptBoxBaseTool {
4410
4955
  *
4411
4956
  * @default false
4412
4957
  */
4413
- continuous = false;
4958
+ set continuous(value) {
4959
+ this._continuous.set(value);
4960
+ }
4961
+ get continuous() {
4962
+ return this._continuous();
4963
+ }
4414
4964
  /**
4415
4965
  * Specifies which speech recognition engine or integration the component should use. Allows the component to operate in different environments or use alternative implementations.
4416
4966
  *
4417
4967
  * @default 'webSpeech'
4418
4968
  */
4419
- integrationMode = 'webSpeech';
4969
+ set integrationMode(value) {
4970
+ this._integrationMode.set(value);
4971
+ }
4972
+ get integrationMode() {
4973
+ return this._integrationMode();
4974
+ }
4420
4975
  /**
4421
4976
  * Sets whether interim results should be returned.
4422
4977
  *
4423
4978
  * @default false
4424
4979
  */
4425
- interimResults = false;
4980
+ set interimResults(value) {
4981
+ this._interimResults.set(value);
4982
+ }
4983
+ get interimResults() {
4984
+ return this._interimResults();
4985
+ }
4426
4986
  /**
4427
4987
  * Sets a `BCP 47` language for speech recognition.
4428
4988
  *
4429
4989
  * @default 'en-US'
4430
4990
  */
4431
- lang = 'en-US';
4991
+ set lang(value) {
4992
+ this._lang.set(value);
4993
+ }
4994
+ get lang() {
4995
+ return this._lang();
4996
+ }
4432
4997
  /**
4433
4998
  * Represents the maximum number of alternative transcriptions to return for each result.
4434
4999
  *
4435
5000
  * @default 1
4436
5001
  */
4437
- maxAlternatives = 1;
5002
+ set maxAlternatives(value) {
5003
+ this._maxAlternatives.set(value);
5004
+ }
5005
+ get maxAlternatives() {
5006
+ return this._maxAlternatives();
5007
+ }
5008
+ _continuous = signal(false, ...(ngDevMode ? [{ debugName: "_continuous" }] : []));
5009
+ _integrationMode = signal('webSpeech', ...(ngDevMode ? [{ debugName: "_integrationMode" }] : []));
5010
+ _interimResults = signal(false, ...(ngDevMode ? [{ debugName: "_interimResults" }] : []));
5011
+ _lang = signal('en-US', ...(ngDevMode ? [{ debugName: "_lang" }] : []));
5012
+ _maxAlternatives = signal(1, ...(ngDevMode ? [{ debugName: "_maxAlternatives" }] : []));
4438
5013
  /**
4439
5014
  * Fires when the user clicks the **Speech to Text** button.
4440
5015
  * @hidden
@@ -4500,7 +5075,7 @@ class PromptBoxSpeechToTextButtonComponent extends PromptBoxBaseTool {
4500
5075
  (error)="stbError.emit($event)"
4501
5076
  (result)="stbResult.emit($event)"
4502
5077
  ></button>
4503
- `, isInline: true, dependencies: [{ kind: "component", type: SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }] });
5078
+ `, isInline: true, dependencies: [{ kind: "component", type: SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4504
5079
  }
4505
5080
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxSpeechToTextButtonComponent, decorators: [{
4506
5081
  type: Component,
@@ -4537,6 +5112,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
4537
5112
  `,
4538
5113
  standalone: true,
4539
5114
  imports: [SpeechToTextButtonComponent],
5115
+ changeDetection: ChangeDetectionStrategy.OnPush,
4540
5116
  }]
4541
5117
  }], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { continuous: [{
4542
5118
  type: Input
@@ -4578,6 +5154,7 @@ class PromptBoxComponent {
4578
5154
  ngZone;
4579
5155
  localization;
4580
5156
  hostElement;
5157
+ injector;
4581
5158
  get hostSinglelineClass() {
4582
5159
  return this.mode === 'single';
4583
5160
  }
@@ -4592,29 +5169,54 @@ class PromptBoxComponent {
4592
5169
  *
4593
5170
  * @default false
4594
5171
  */
4595
- disabled = false;
5172
+ set disabled(value) {
5173
+ this._disabled.set(value);
5174
+ }
5175
+ get disabled() {
5176
+ return this._disabled();
5177
+ }
4596
5178
  /**
4597
5179
  * @hidden
4598
5180
  */
4599
- focusableId = `k-${guid()}`;
5181
+ set focusableId(value) {
5182
+ this._focusableId.set(value);
5183
+ }
5184
+ get focusableId() {
5185
+ return this._focusableId();
5186
+ }
4600
5187
  /**
4601
5188
  * Sets the loading state of the **Action** button.
4602
5189
  *
4603
5190
  * @default false
4604
5191
  */
4605
- loading = false;
5192
+ set loading(value) {
5193
+ this._loading.set(value);
5194
+ }
5195
+ get loading() {
5196
+ return this._loading();
5197
+ }
4606
5198
  /**
4607
5199
  * Sets the placeholder text displayed in the PromptBox when it is empty.
4608
5200
  *
4609
5201
  * @default ''
4610
5202
  */
4611
- placeholder = '';
5203
+ set placeholder(value) {
5204
+ this._placeholder.set(value);
5205
+ }
5206
+ get placeholder() {
5207
+ return this._placeholder();
5208
+ }
4612
5209
  /**
4613
5210
  * Sets the read-only state of the PromptBox. When set to `true`, the PromptBox content cannot be modified but remains accessible.
4614
5211
  *
4615
5212
  * @default false
4616
5213
  */
4617
- readonly = false;
5214
+ set readonly(value) {
5215
+ this._readonly.set(value);
5216
+ }
5217
+ get readonly() {
5218
+ return this._readonly();
5219
+ }
4618
5220
  /**
4619
5221
  * Sets the title attribute of the input or textarea element.
4620
5222
  *
@@ -4623,76 +5225,81 @@ class PromptBoxComponent {
4623
5225
  * @remarks
4624
5226
  * This property is related to accessibility.
4625
5227
  */
4626
- title = '';
5228
+ set title(value) {
5229
+ this._title.set(value);
5230
+ }
5231
+ get title() {
5232
+ return this._title();
5233
+ }
4627
5234
  /**
4628
5235
  * Sets the mode of the PromptBox. [See example](slug:modes_promptbox).
4629
5236
  * @default 'auto'
4630
5237
  */
4631
5238
  set mode(promptBoxMode) {
4632
- if (promptBoxMode && this._mode === promptBoxMode) {
5239
+ if (promptBoxMode && this._mode() === promptBoxMode) {
4633
5240
  return;
4634
5241
  }
4635
- const previousMode = this._mode;
4636
- this._mode = promptBoxMode;
4637
- if (previousMode === 'multi' && this._mode === 'auto') {
5242
+ const previousMode = this._mode();
5243
+ this._mode.set(promptBoxMode);
5244
+ if (previousMode === 'multi' && this._mode() === 'auto') {
4638
5245
  this.resetTextArea();
4639
5246
  }
4640
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
4641
- if (this._mode !== 'single' && this.textareaElement) {
5247
+ afterNextRender(() => {
5248
+ if (this._mode() !== 'single' && this.textareaElement) {
4642
5249
  if (previousMode === 'single' || !this.initialHeight) {
4643
5250
  this.captureInitialDimensions();
4644
5251
  }
4645
5252
  this.resize();
4646
5253
  }
4647
- });
5254
+ }, { injector: this.injector });
4648
5255
  }
4649
5256
  get mode() {
4650
- return this._mode;
5257
+ return this._mode();
4651
5258
  }
4652
5259
  /**
4653
5260
  * Sets the number of visible text lines in the textarea. Applies only when the `mode` is set to `multi`.
4654
5261
  */
4655
5262
  set rows(value) {
4656
- if (this._rows === value) {
5263
+ if (this._rows() === value) {
4657
5264
  return;
4658
5265
  }
4659
- this._rows = value;
5266
+ this._rows.set(value);
4660
5267
  if (this.mode === 'multi' && this.textareaElement) {
4661
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
5268
+ afterNextRender(() => {
4662
5269
  this.captureInitialDimensions();
4663
5270
  this.resize();
4664
- });
5271
+ }, { injector: this.injector });
4665
5272
  }
4666
5273
  }
4667
5274
  get rows() {
4668
- return this._rows;
5275
+ return this._rows();
4669
5276
  }
4670
5277
  /**
4671
5278
  * Sets the maximum height of the textarea in pixels.
4672
5279
  * The textarea resizes automatically until it reaches this height. When the content exceeds this height, a scrollbar appears.
4673
5280
  */
4674
5281
  set maxTextAreaHeight(value) {
4675
- this._maxTextAreaHeight = value;
4676
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
5282
+ this._maxTextAreaHeight.set(value);
5283
+ afterNextRender(() => {
4677
5284
  this.resize();
4678
- });
5285
+ }, { injector: this.injector });
4679
5286
  }
4680
5287
  get maxTextAreaHeight() {
4681
- return this._maxTextAreaHeight;
5288
+ return this._maxTextAreaHeight();
4682
5289
  }
4683
5290
  /**
4684
5291
  * Sets the value of the PromptBox.
4685
5292
  */
4686
5293
  set value(value) {
4687
- this._value = value;
4688
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
5294
+ this._value.set(value);
5295
+ afterNextRender(() => {
4689
5296
  if (this.mode !== 'single' && this.textareaElement) {
4690
5297
  this.resize();
4691
5298
  }
4692
- });
5299
+ }, { injector: this.injector });
4693
5300
  }
4694
5301
  get value() {
4695
- return this._value;
5302
+ return this._value();
4696
5303
  }
4697
5304
  /**
4698
5305
  * Controls the visibility and configuration of the **Action** button in the end affix.
@@ -4700,11 +5307,15 @@ class PromptBoxComponent {
4700
5307
  * @default true
4701
5308
  */
4702
5309
  set actionButton(settings) {
4703
- this.updateComponentSettings('_actionButtonSettings', settings, ACTION_BUTTON_DEFAULT_SETTINGS);
5310
+ const nextSettings = normalizeButtonSettings(settings, ACTION_BUTTON_DEFAULT_SETTINGS);
5311
+ if (areSettingsEqual(this._actionButtonSettings(), nextSettings)) {
5312
+ return;
5313
+ }
5314
+ this._actionButtonSettings.set(nextSettings);
4704
5315
  this.update();
4705
5316
  }
4706
5317
  get actionButton() {
4707
- return isPresent(this._actionButtonSettings);
5318
+ return isPresent(this._actionButtonSettings());
4708
5319
  }
4709
5320
  /**
4710
5321
  * Controls the visibility and configuration of the **File Select** button in the end affix.
@@ -4712,11 +5323,15 @@ class PromptBoxComponent {
4712
5323
  * @default false
4713
5324
  */
4714
5325
  set fileSelectButton(settings) {
4715
- this.updateComponentSettings('_fileSelectButtonSettings', settings, FILESELECT_BUTTON_DEFAULT_SETTINGS);
5326
+ const nextSettings = normalizeButtonSettings(settings, FILESELECT_BUTTON_DEFAULT_SETTINGS);
5327
+ if (areSettingsEqual(this._fileSelectButtonSettings(), nextSettings)) {
5328
+ return;
5329
+ }
5330
+ this._fileSelectButtonSettings.set(nextSettings);
4716
5331
  this.update();
4717
5332
  }
4718
5333
  get fileSelectButton() {
4719
- return isPresent(this._fileSelectButtonSettings);
5334
+ return isPresent(this._fileSelectButtonSettings());
4720
5335
  }
4721
5336
  /**
4722
5337
  * Controls the visibility and configuration of the **Speech to Text** button in the end affix.
@@ -4724,11 +5339,15 @@ class PromptBoxComponent {
4724
5339
  * @default true
4725
5340
  */
4726
5341
  set speechToTextButton(settings) {
4727
- this.updateComponentSettings('_speechToTextButtonSettings', settings, STB_DEFAULT_SETTINGS);
5342
+ const nextSettings = normalizeButtonSettings(settings, STB_DEFAULT_SETTINGS);
5343
+ if (areSettingsEqual(this._speechToTextButtonSettings(), nextSettings)) {
5344
+ return;
5345
+ }
5346
+ this._speechToTextButtonSettings.set(nextSettings);
4728
5347
  this.update();
4729
5348
  }
4730
5349
  get speechToTextButton() {
4731
- return isPresent(this._speechToTextButtonSettings);
5350
+ return isPresent(this._speechToTextButtonSettings());
4732
5351
  }
4733
5352
  /**
4734
5353
  * Fires each time the value of the PromptBox changes.
@@ -4827,9 +5446,9 @@ class PromptBoxComponent {
4827
5446
  */
4828
5447
  get hasEndAffixContent() {
4829
5448
  return !!(isPresent(this.endAffix) ||
4830
- isPresent(this._actionButtonSettings) ||
4831
- isPresent(this._fileSelectButtonSettings) ||
4832
- isPresent(this._speechToTextButtonSettings));
5449
+ isPresent(this._actionButtonSettings()) ||
5450
+ isPresent(this._fileSelectButtonSettings()) ||
5451
+ isPresent(this._speechToTextButtonSettings()));
4833
5452
  }
4834
5453
  /**
4835
5454
  * @hidden
@@ -4852,19 +5471,19 @@ class PromptBoxComponent {
4852
5471
  * @hidden
4853
5472
  */
4854
5473
  get actionButtonSettings() {
4855
- return this._actionButtonSettings;
5474
+ return this._actionButtonSettings();
4856
5475
  }
4857
5476
  /**
4858
5477
  * @hidden
4859
5478
  */
4860
5479
  get fileSelectButtonSettings() {
4861
- return this._fileSelectButtonSettings;
5480
+ return this._fileSelectButtonSettings();
4862
5481
  }
4863
5482
  /**
4864
5483
  * @hidden
4865
5484
  */
4866
5485
  get speechToTextButtonSettings() {
4867
- return this._speechToTextButtonSettings;
5486
+ return this._speechToTextButtonSettings();
4868
5487
  }
4869
5488
  /**
4870
5489
  * @hidden
@@ -4878,39 +5497,72 @@ class PromptBoxComponent {
4878
5497
  /**
4879
5498
  * @hidden
4880
5499
  */
4881
- hasExpanded = false;
5500
+ set hasExpanded(value) {
5501
+ this._hasExpanded.set(value);
5502
+ }
5503
+ get hasExpanded() {
5504
+ return this._hasExpanded();
5505
+ }
4882
5506
  /**
4883
5507
  * @hidden
4884
5508
  */
4885
- isListening = false;
5509
+ set isListening(value) {
5510
+ this._isListening.set(value);
5511
+ }
5512
+ get isListening() {
5513
+ return this._isListening();
5514
+ }
4886
5515
  /**
4887
5516
  * Provides the currently attached files in the PromptBox component.
4888
5517
  */
4889
- attachments = [];
5518
+ set attachments(value) {
5519
+ this._attachments.set(value);
5520
+ }
5521
+ get attachments() {
5522
+ return this._attachments();
5523
+ }
4890
5524
  /**
4891
5525
  * @hidden
4892
5526
  */
4893
- filesListScrollAtStart = false;
5527
+ get filesListScrollAtStart() {
5528
+ return this._filesListScrollAtStart();
5529
+ }
4894
5530
  /**
4895
5531
  * @hidden
4896
5532
  */
4897
- filesListScrollAtEnd = false;
5533
+ get filesListScrollAtEnd() {
5534
+ return this._filesListScrollAtEnd();
5535
+ }
4898
5536
  /**
4899
5537
  * @hidden
4900
5538
  */
4901
- hasFilesOverflow = false;
4902
- _value = '';
4903
- _mode = 'auto';
4904
- _rows = 1;
5539
+ get hasFilesOverflow() {
5540
+ return this._hasFilesOverflow();
5541
+ }
5542
+ _value = signal('', ...(ngDevMode ? [{ debugName: "_value" }] : []));
5543
+ _mode = signal('auto', ...(ngDevMode ? [{ debugName: "_mode" }] : []));
5544
+ _rows = signal(1, ...(ngDevMode ? [{ debugName: "_rows" }] : []));
4905
5545
  initialHeight = 0;
4906
5546
  singleRowHeight = 0;
4907
5547
  singleLineWidth = 0;
4908
- _maxTextAreaHeight;
4909
- _actionButtonSettings = ACTION_BUTTON_DEFAULT_SETTINGS;
4910
- _fileSelectButtonSettings = null;
4911
- _speechToTextButtonSettings = STB_DEFAULT_SETTINGS;
5548
+ _maxTextAreaHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "_maxTextAreaHeight" }] : []));
5549
+ _actionButtonSettings = signal(ACTION_BUTTON_DEFAULT_SETTINGS, ...(ngDevMode ? [{ debugName: "_actionButtonSettings" }] : []));
5550
+ _fileSelectButtonSettings = signal(null, ...(ngDevMode ? [{ debugName: "_fileSelectButtonSettings" }] : []));
5551
+ _speechToTextButtonSettings = signal(STB_DEFAULT_SETTINGS, ...(ngDevMode ? [{ debugName: "_speechToTextButtonSettings" }] : []));
4912
5552
  hostWidthAtCapture = 0;
4913
5553
  minMultiRowHeight = 0;
5554
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
5555
+ _focusableId = signal(`k-${guid()}`, ...(ngDevMode ? [{ debugName: "_focusableId" }] : []));
5556
+ _loading = signal(false, ...(ngDevMode ? [{ debugName: "_loading" }] : []));
5557
+ _placeholder = signal('', ...(ngDevMode ? [{ debugName: "_placeholder" }] : []));
5558
+ _readonly = signal(false, ...(ngDevMode ? [{ debugName: "_readonly" }] : []));
5559
+ _title = signal('', ...(ngDevMode ? [{ debugName: "_title" }] : []));
5560
+ _hasExpanded = signal(false, ...(ngDevMode ? [{ debugName: "_hasExpanded" }] : []));
5561
+ _isListening = signal(false, ...(ngDevMode ? [{ debugName: "_isListening" }] : []));
5562
+ _attachments = signal([], ...(ngDevMode ? [{ debugName: "_attachments" }] : []));
5563
+ _filesListScrollAtStart = signal(false, ...(ngDevMode ? [{ debugName: "_filesListScrollAtStart" }] : []));
5564
+ _filesListScrollAtEnd = signal(false, ...(ngDevMode ? [{ debugName: "_filesListScrollAtEnd" }] : []));
5565
+ _hasFilesOverflow = signal(false, ...(ngDevMode ? [{ debugName: "_hasFilesOverflow" }] : []));
4914
5566
  resizeSubscription;
4915
5567
  speechToTextSubscription = new Subscription();
4916
5568
  actionButtonSubscription = new Subscription();
@@ -4922,22 +5574,23 @@ class PromptBoxComponent {
4922
5574
  ngChange = () => {
4923
5575
  /* lint metadata */
4924
5576
  };
4925
- constructor(changeDetector, renderer, ngZone, localization, hostElement) {
5577
+ constructor(changeDetector, renderer, ngZone, localization, hostElement, injector) {
4926
5578
  this.changeDetector = changeDetector;
4927
5579
  this.renderer = renderer;
4928
5580
  this.ngZone = ngZone;
4929
5581
  this.localization = localization;
4930
5582
  this.hostElement = hostElement;
5583
+ this.injector = injector;
4931
5584
  validatePackage(packageMetadata);
4932
5585
  this.renderer.addClass(this.hostElement.nativeElement, 'k-prompt-box');
4933
5586
  this.renderer.addClass(this.hostElement.nativeElement, 'k-input');
4934
5587
  }
4935
5588
  ngAfterViewInit() {
4936
5589
  if (this.mode !== 'single' && this.textareaElement) {
4937
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
5590
+ afterNextRender(() => {
4938
5591
  this.captureInitialDimensions();
4939
5592
  this.attachResizeHandler();
4940
- });
5593
+ }, { injector: this.injector });
4941
5594
  }
4942
5595
  this.subscribeToSpeechToTextButton();
4943
5596
  this.subscribeToActionButton();
@@ -4987,17 +5640,16 @@ class PromptBoxComponent {
4987
5640
  * Clears all attached files from the PromptBox.
4988
5641
  */
4989
5642
  clearAttachments() {
4990
- this.attachments = [];
4991
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
5643
+ this._attachments.set([]);
5644
+ afterNextRender(() => {
4992
5645
  this.checkFilesListScroll();
4993
- });
5646
+ }, { injector: this.injector });
4994
5647
  }
4995
5648
  /**
4996
5649
  * @hidden
4997
5650
  */
4998
5651
  writeValue(value) {
4999
5652
  this.value = value || '';
5000
- this.changeDetector.markForCheck();
5001
5653
  }
5002
5654
  /**
5003
5655
  * @hidden
@@ -5018,9 +5670,12 @@ class PromptBoxComponent {
5018
5670
  const target = event.target;
5019
5671
  const newValue = target.value;
5020
5672
  this.ngZone.run(() => {
5021
- this.value = newValue;
5673
+ this._value.set(newValue);
5022
5674
  this.ngChange(this.value);
5023
5675
  this.valueChange.emit(this.value);
5676
+ if (this.mode !== 'single' && this.textareaElement) {
5677
+ this.resize();
5678
+ }
5024
5679
  });
5025
5680
  };
5026
5681
  /**
@@ -5082,23 +5737,23 @@ class PromptBoxComponent {
5082
5737
  if (hasObservers(this.selectAttachments)) {
5083
5738
  this.selectAttachments.emit(event);
5084
5739
  }
5085
- this.attachments = [...this.attachments, ...event.files];
5086
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
5740
+ this._attachments.set([...this.attachments, ...event.files]);
5741
+ afterNextRender(() => {
5087
5742
  this.checkFilesListScroll();
5088
- });
5743
+ }, { injector: this.injector });
5089
5744
  }
5090
5745
  /**
5091
5746
  * @hidden
5092
5747
  */
5093
5748
  removeFile(index) {
5094
5749
  const removedFile = this.attachments[index];
5095
- this.attachments = this.attachments.filter((_, i) => i !== index);
5750
+ this._attachments.set(this.attachments.filter((_, i) => i !== index));
5096
5751
  if (hasObservers(this.fileRemove)) {
5097
5752
  this.fileRemove.emit(removedFile);
5098
5753
  }
5099
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
5754
+ afterNextRender(() => {
5100
5755
  this.checkFilesListScroll();
5101
- });
5756
+ }, { injector: this.injector });
5102
5757
  }
5103
5758
  /**
5104
5759
  * @hidden
@@ -5121,7 +5776,7 @@ class PromptBoxComponent {
5121
5776
  if (hasObservers(this.speechToTextStart)) {
5122
5777
  this.speechToTextStart.emit(event);
5123
5778
  }
5124
- this.isListening = true;
5779
+ this._isListening.set(true);
5125
5780
  }
5126
5781
  /**
5127
5782
  * @hidden
@@ -5130,7 +5785,7 @@ class PromptBoxComponent {
5130
5785
  if (hasObservers(this.speechToTextEnd)) {
5131
5786
  this.speechToTextEnd.emit(event);
5132
5787
  }
5133
- this.isListening = false;
5788
+ this._isListening.set(false);
5134
5789
  }
5135
5790
  /**
5136
5791
  * @hidden
@@ -5198,7 +5853,6 @@ class PromptBoxComponent {
5198
5853
  const ratio = currentHostWidth / this.hostWidthAtCapture;
5199
5854
  this.singleLineWidth = Math.round(this.singleLineWidth * ratio);
5200
5855
  this.hostWidthAtCapture = currentHostWidth;
5201
- this.changeDetector.markForCheck();
5202
5856
  }
5203
5857
  }
5204
5858
  this.resize();
@@ -5245,19 +5899,17 @@ class PromptBoxComponent {
5245
5899
  if (!this.hasExpanded) {
5246
5900
  const needsExpansion = textarea.scrollWidth > textarea.clientWidth || textarea.scrollHeight > textarea.clientHeight;
5247
5901
  if (needsExpansion) {
5248
- this.hasExpanded = true;
5249
- this.changeDetector.markForCheck();
5250
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
5902
+ this._hasExpanded.set(true);
5903
+ afterNextRender(() => {
5251
5904
  this.updateHeight();
5252
- });
5905
+ }, { injector: this.injector });
5253
5906
  }
5254
5907
  }
5255
5908
  else {
5256
5909
  this.updateHeight();
5257
5910
  if (this.shouldCollapse()) {
5258
- this.hasExpanded = false;
5911
+ this._hasExpanded.set(false);
5259
5912
  this.renderer.removeStyle(textarea, 'height');
5260
- this.changeDetector.markForCheck();
5261
5913
  }
5262
5914
  }
5263
5915
  }
@@ -5272,6 +5924,11 @@ class PromptBoxComponent {
5272
5924
  const newHeight = this.maxTextAreaHeight ? Math.min(scrollHeight, this.maxTextAreaHeight) : scrollHeight;
5273
5925
  if (newHeight === this.maxTextAreaHeight) {
5274
5926
  this.renderer.removeStyle(textarea, 'overflow');
5927
+ afterNextRender(() => {
5928
+ if (this.textareaElement) {
5929
+ this.textareaElement.nativeElement.scrollTop = this.textareaElement.nativeElement.scrollHeight;
5930
+ }
5931
+ }, { injector: this.injector });
5275
5932
  }
5276
5933
  this.renderer.setStyle(textarea, 'height', `${newHeight}px`);
5277
5934
  }
@@ -5318,36 +5975,23 @@ class PromptBoxComponent {
5318
5975
  checkFilesListScroll(filesList) {
5319
5976
  const element = filesList || this.filesList?.nativeElement;
5320
5977
  if (!element) {
5321
- this.hasFilesOverflow = false;
5322
- this.filesListScrollAtStart = false;
5323
- this.filesListScrollAtEnd = false;
5324
- this.changeDetector.markForCheck();
5978
+ this._hasFilesOverflow.set(false);
5979
+ this._filesListScrollAtStart.set(false);
5980
+ this._filesListScrollAtEnd.set(false);
5325
5981
  return;
5326
5982
  }
5327
5983
  const scrollLeft = element.scrollLeft;
5328
5984
  const hasOverflow = element.scrollWidth > element.clientWidth;
5329
- this.hasFilesOverflow = hasOverflow;
5330
- this.filesListScrollAtStart = scrollLeft === 0;
5331
- this.filesListScrollAtEnd = scrollLeft + element.clientWidth >= element.scrollWidth;
5332
- this.changeDetector.markForCheck();
5985
+ this._hasFilesOverflow.set(hasOverflow);
5986
+ this._filesListScrollAtStart.set(scrollLeft === 0);
5987
+ this._filesListScrollAtEnd.set(scrollLeft + element.clientWidth >= element.scrollWidth);
5333
5988
  }
5334
5989
  update() {
5335
5990
  if (this.mode !== 'single' && this.textareaElement) {
5336
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
5991
+ afterNextRender(() => {
5337
5992
  this.captureInitialDimensions();
5338
5993
  this.resize();
5339
- });
5340
- }
5341
- }
5342
- updateComponentSettings(property, settings, defaultSettings) {
5343
- if (settings === true) {
5344
- this[property] = defaultSettings;
5345
- }
5346
- else if (settings === false) {
5347
- this[property] = null;
5348
- }
5349
- else {
5350
- this[property] = { ...defaultSettings, ...settings };
5994
+ }, { injector: this.injector });
5351
5995
  }
5352
5996
  }
5353
5997
  subscribeToSpeechToTextButton() {
@@ -5381,7 +6025,7 @@ class PromptBoxComponent {
5381
6025
  this.fileSelectSubscription.add(this.fileSelectButtonComponent.selectAttachments.subscribe((event) => this.handleFileSelectAttachments(event)));
5382
6026
  this.fileSelectSubscription.add(this.fileSelectButtonComponent.sizeChange.subscribe(() => this.update()));
5383
6027
  }
5384
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6028
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
5385
6029
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: PromptBoxComponent, isStandalone: true, selector: "kendo-promptbox", inputs: { disabled: "disabled", focusableId: "focusableId", loading: "loading", placeholder: "placeholder", readonly: "readonly", title: "title", mode: "mode", rows: "rows", maxTextAreaHeight: "maxTextAreaHeight", value: "value", actionButton: "actionButton", fileSelectButton: "fileSelectButton", speechToTextButton: "speechToTextButton" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", inputFocus: "inputFocus", inputBlur: "inputBlur", promptAction: "promptAction", selectAttachments: "selectAttachments", fileRemove: "fileRemove", speechToTextClick: "speechToTextClick", speechToTextStart: "speechToTextStart", speechToTextEnd: "speechToTextEnd", speechToTextError: "speechToTextError", speechToTextResult: "speechToTextResult" }, host: { properties: { "class.k-prompt-box-singleline": "this.hostSinglelineClass", "class.k-prompt-box-multiline": "this.hostMultilineClass", "class.k-disabled": "this.hostDisabledClass" } }, providers: [
5386
6030
  LocalizationService,
5387
6031
  {
@@ -5579,7 +6223,7 @@ class PromptBoxComponent {
5579
6223
  }
5580
6224
  </div>
5581
6225
  }
5582
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$2, selector: "[kendoPromptBoxLocalizedMessages]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: PromptBoxActionButtonComponent, selector: "kendo-promptbox-action-button", inputs: ["buttonClass", "loading", "loadingIcon", "loadingSVGIcon"], outputs: ["promptAction"], exportAs: ["kendoPromptBoxActionButton"] }, { kind: "component", type: PromptBoxFileSelectButtonComponent, selector: "kendo-promptbox-fileselect-button", inputs: ["restrictions", "multiple", "accept"], outputs: ["selectAttachments"], exportAs: ["kendoPromptBoxFileSelectButton"] }, { kind: "component", type: PromptBoxSpeechToTextButtonComponent, selector: "kendo-promptbox-speech-to-text-button", inputs: ["continuous", "integrationMode", "interimResults", "lang", "maxAlternatives"], outputs: ["stbClick", "stbStart", "stbEnd", "stbError", "stbResult"], exportAs: ["kendoPromptBoxSpeechToTextButton"] }, { kind: "component", type: PromptBoxFileComponent, selector: "li[promptBoxFile]", inputs: ["promptBoxFile", "removable", "fileActions", "disabled"], outputs: ["remove"] }] });
6226
+ `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$2, selector: "[kendoPromptBoxLocalizedMessages]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: PromptBoxActionButtonComponent, selector: "kendo-promptbox-action-button", inputs: ["buttonClass", "loading", "loadingIcon", "loadingSVGIcon"], outputs: ["promptAction"], exportAs: ["kendoPromptBoxActionButton"] }, { kind: "component", type: PromptBoxFileSelectButtonComponent, selector: "kendo-promptbox-fileselect-button", inputs: ["restrictions", "multiple", "accept"], outputs: ["selectAttachments"], exportAs: ["kendoPromptBoxFileSelectButton"] }, { kind: "component", type: PromptBoxSpeechToTextButtonComponent, selector: "kendo-promptbox-speech-to-text-button", inputs: ["continuous", "integrationMode", "interimResults", "lang", "maxAlternatives"], outputs: ["stbClick", "stbStart", "stbEnd", "stbError", "stbResult"], exportAs: ["kendoPromptBoxSpeechToTextButton"] }, { kind: "component", type: PromptBoxFileComponent, selector: "li[promptBoxFile]", inputs: ["promptBoxFile", "removable", "fileActions", "disabled"], outputs: ["remove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5583
6227
  }
5584
6228
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: PromptBoxComponent, decorators: [{
5585
6229
  type: Component,
@@ -5795,8 +6439,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
5795
6439
  PromptBoxSpeechToTextButtonComponent,
5796
6440
  PromptBoxFileComponent,
5797
6441
  ],
6442
+ changeDetection: ChangeDetectionStrategy.OnPush,
5798
6443
  }]
5799
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ElementRef }], propDecorators: { hostSinglelineClass: [{
6444
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.Injector }], propDecorators: { hostSinglelineClass: [{
5800
6445
  type: HostBinding,
5801
6446
  args: ['class.k-prompt-box-singleline']
5802
6447
  }], hostMultilineClass: [{
@@ -5895,7 +6540,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
5895
6540
  * @hidden
5896
6541
  */
5897
6542
  class ChatItem {
5898
- selected;
6543
+ _selected = signal(undefined, ...(ngDevMode ? [{ debugName: "_selected" }] : []));
6544
+ get selected() {
6545
+ return this._selected();
6546
+ }
6547
+ set selected(value) {
6548
+ this._selected.set(value);
6549
+ }
5899
6550
  }
5900
6551
 
5901
6552
  /**
@@ -5903,9 +6554,24 @@ class ChatItem {
5903
6554
  */
5904
6555
  class ChatFileComponent extends ChatItem {
5905
6556
  localization;
5906
- chatFile;
5907
- removable = false;
5908
- fileActions;
6557
+ set chatFile(value) {
6558
+ this._chatFile.set(value);
6559
+ }
6560
+ get chatFile() {
6561
+ return this._chatFile();
6562
+ }
6563
+ set removable(value) {
6564
+ this._removable.set(value);
6565
+ }
6566
+ get removable() {
6567
+ return this._removable();
6568
+ }
6569
+ set fileActions(value) {
6570
+ this._fileActions.set(value);
6571
+ }
6572
+ get fileActions() {
6573
+ return this._fileActions();
6574
+ }
5909
6575
  role = 'listitem';
5910
6576
  get ariaLabel() {
5911
6577
  return `${this.chatFile?.name || ''} ${this.getTotalFilesSizeMessage(this.chatFile)}`.trim();
@@ -5916,6 +6582,9 @@ class ChatFileComponent extends ChatItem {
5916
6582
  actionButtonClick = new EventEmitter();
5917
6583
  deleteIcon = xIcon;
5918
6584
  moreIcon = moreVerticalIcon;
6585
+ _chatFile = signal(undefined, ...(ngDevMode ? [{ debugName: "_chatFile" }] : []));
6586
+ _removable = signal(false, ...(ngDevMode ? [{ debugName: "_removable" }] : []));
6587
+ _fileActions = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileActions" }] : []));
5919
6588
  constructor(localization) {
5920
6589
  super();
5921
6590
  this.localization = localization;
@@ -5973,7 +6642,7 @@ class ChatFileComponent extends ChatItem {
5973
6642
  (close)="actionsToggle.emit(false)"
5974
6643
  ></kendo-dropdownbutton>
5975
6644
  }
5976
- `, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }] });
6645
+ `, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5977
6646
  }
5978
6647
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ChatFileComponent, decorators: [{
5979
6648
  type: Component,
@@ -6020,6 +6689,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
6020
6689
  ></kendo-dropdownbutton>
6021
6690
  }
6022
6691
  `,
6692
+ changeDetection: ChangeDetectionStrategy.OnPush,
6023
6693
  standalone: true,
6024
6694
  imports: [IconWrapperComponent, ButtonComponent, DropDownButtonComponent]
6025
6695
  }]
@@ -6128,7 +6798,13 @@ class MessageReferenceComponent extends ChatItem {
6128
6798
  localization;
6129
6799
  chatService;
6130
6800
  hostClass = true;
6131
- message;
6801
+ set message(value) {
6802
+ this._message.set(value);
6803
+ }
6804
+ get message() {
6805
+ return this._message();
6806
+ }
6807
+ _message = signal(undefined, ...(ngDevMode ? [{ debugName: "_message" }] : []));
6132
6808
  constructor(localization, chatService) {
6133
6809
  super();
6134
6810
  this.localization = localization;
@@ -6159,7 +6835,7 @@ class MessageReferenceComponent extends ChatItem {
6159
6835
  @if (message.isDeleted && !isOwnMessage(message)) {
6160
6836
  {{ textFor('deletedMessageReceiverText') }}
6161
6837
  }
6162
- `, isInline: true, dependencies: [{ kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }] });
6838
+ `, isInline: true, dependencies: [{ kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6163
6839
  }
6164
6840
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: MessageReferenceComponent, decorators: [{
6165
6841
  type: Component,
@@ -6184,6 +6860,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
6184
6860
  {{ textFor('deletedMessageReceiverText') }}
6185
6861
  }
6186
6862
  `,
6863
+ changeDetection: ChangeDetectionStrategy.OnPush,
6187
6864
  standalone: true,
6188
6865
  imports: [ChatFileComponent]
6189
6866
  }]
@@ -6304,6 +6981,7 @@ class SuggestedActionsComponent extends ChatItem {
6304
6981
  scrollService;
6305
6982
  ngZone;
6306
6983
  renderer;
6984
+ injector;
6307
6985
  get defaultClass() {
6308
6986
  if (this.type === 'suggestion') {
6309
6987
  return this.chatService.suggestionsLayout === 'wrap' || this.chatService.suggestionsLayout === 'scroll';
@@ -6335,11 +7013,36 @@ class SuggestedActionsComponent extends ChatItem {
6335
7013
  }
6336
7014
  return null;
6337
7015
  }
6338
- actions;
6339
- suggestions;
6340
- tabbable;
6341
- type;
6342
- suggestionTemplate;
7016
+ set actions(value) {
7017
+ this._actions.set(value);
7018
+ }
7019
+ get actions() {
7020
+ return this._actions();
7021
+ }
7022
+ set suggestions(value) {
7023
+ this._suggestions.set(value);
7024
+ }
7025
+ get suggestions() {
7026
+ return this._suggestions();
7027
+ }
7028
+ set tabbable(value) {
7029
+ this._tabbable.set(value);
7030
+ }
7031
+ get tabbable() {
7032
+ return this._tabbable();
7033
+ }
7034
+ set type(value) {
7035
+ this._type.set(value);
7036
+ }
7037
+ get type() {
7038
+ return this._type();
7039
+ }
7040
+ set suggestionTemplate(value) {
7041
+ this._suggestionTemplate.set(value);
7042
+ }
7043
+ get suggestionTemplate() {
7044
+ return this._suggestionTemplate();
7045
+ }
6343
7046
  dispatchAction = new EventEmitter();
6344
7047
  dispatchSuggestion = new EventEmitter();
6345
7048
  items;
@@ -6366,6 +7069,11 @@ class SuggestedActionsComponent extends ChatItem {
6366
7069
  : this.chatService.quickActionsLayout === 'scrollbuttons';
6367
7070
  }
6368
7071
  subscriptions = new Subscription();
7072
+ _actions = signal(undefined, ...(ngDevMode ? [{ debugName: "_actions" }] : []));
7073
+ _suggestions = signal(undefined, ...(ngDevMode ? [{ debugName: "_suggestions" }] : []));
7074
+ _tabbable = signal(undefined, ...(ngDevMode ? [{ debugName: "_tabbable" }] : []));
7075
+ _type = signal(undefined, ...(ngDevMode ? [{ debugName: "_type" }] : []));
7076
+ _suggestionTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_suggestionTemplate" }] : []));
6369
7077
  actionKeyHandlers = {
6370
7078
  [Keys.Tab]: (e) => this.changeSelectedIndex(e),
6371
7079
  [Keys.Enter]: (e, action) => {
@@ -6384,13 +7092,14 @@ class SuggestedActionsComponent extends ChatItem {
6384
7092
  [Keys.Enter]: (_, suggestion) => this.suggestionClick(suggestion),
6385
7093
  [Keys.Space]: (_, suggestion) => this.suggestionClick(suggestion),
6386
7094
  };
6387
- constructor(chatService, localization, scrollService, ngZone, renderer) {
7095
+ constructor(chatService, localization, scrollService, ngZone, renderer, injector) {
6388
7096
  super();
6389
7097
  this.chatService = chatService;
6390
7098
  this.localization = localization;
6391
7099
  this.scrollService = scrollService;
6392
7100
  this.ngZone = ngZone;
6393
7101
  this.renderer = renderer;
7102
+ this.injector = injector;
6394
7103
  this.scrollService.owner = this;
6395
7104
  }
6396
7105
  ngAfterViewInit() {
@@ -6399,29 +7108,29 @@ class SuggestedActionsComponent extends ChatItem {
6399
7108
  : this.chatService.quickActionsLayoutChange$;
6400
7109
  this.subscriptions.add(layoutChangeObservable.subscribe((layoutMode) => {
6401
7110
  if (layoutMode === 'scrollbuttons') {
6402
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
7111
+ afterNextRender(() => {
6403
7112
  if (this.suggestionsContainer) {
6404
7113
  this.scrollService.updateScrollPosition(this.suggestionsContainer.nativeElement);
6405
7114
  }
6406
7115
  this.scrollService.toggleScrollButtonsState();
6407
- });
7116
+ }, { injector: this.injector });
6408
7117
  }
6409
7118
  }));
6410
7119
  this.subscriptions.add(this.scrollService.scrollButtonActiveStateChange.subscribe((change) => {
6411
7120
  this.toggleScrollButtonState(change.buttonType, change.active);
6412
7121
  }));
6413
7122
  if (this.hasScrollButtons) {
6414
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
7123
+ afterNextRender(() => {
6415
7124
  this.scrollService.toggleScrollButtonsState();
6416
- });
7125
+ }, { injector: this.injector });
6417
7126
  if (this.suggestionsContainer) {
6418
7127
  this.scrollService.updateScrollPosition(this.suggestionsContainer.nativeElement);
6419
7128
  }
6420
7129
  }
6421
7130
  if (this.isScrollable && this.scrollableContainer) {
6422
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
7131
+ afterNextRender(() => {
6423
7132
  this.updateScrollableState();
6424
- });
7133
+ }, { injector: this.injector });
6425
7134
  }
6426
7135
  }
6427
7136
  ngOnDestroy() {
@@ -6514,7 +7223,7 @@ class SuggestedActionsComponent extends ChatItem {
6514
7223
  const prevIndex = this.selectedIndex;
6515
7224
  this.selectedIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
6516
7225
  }
6517
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: SuggestedActionsComponent, deps: [{ token: ChatService }, { token: i1.LocalizationService }, { token: SuggestionsScrollService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
7226
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: SuggestedActionsComponent, deps: [{ token: ChatService }, { token: i1.LocalizationService }, { token: SuggestionsScrollService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
6518
7227
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: SuggestedActionsComponent, isStandalone: true, selector: "kendo-chat-suggested-actions", inputs: { actions: "actions", suggestions: "suggestions", tabbable: "tabbable", type: "type", suggestionTemplate: "suggestionTemplate" }, outputs: { dispatchAction: "dispatchAction", dispatchSuggestion: "dispatchSuggestion" }, host: { properties: { "class.k-suggestion-group": "this.defaultClass", "class.k-suggestion-group-scrollable": "this.scrollableClass", "class.k-suggestion-scrollwrap": "this.scrollButtonsClass", "class.k-suggestion-group-scrollable-start": "this.scrollStartClass", "class.k-suggestion-group-scrollable-end": "this.scrollEndClass", "attr.role": "this.role" } }, providers: [
6519
7228
  {
6520
7229
  provide: ChatItem,
@@ -6604,11 +7313,12 @@ class SuggestedActionsComponent extends ChatItem {
6604
7313
  >
6605
7314
  </span>
6606
7315
  }
6607
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ChatScrollableButtonComponent, selector: "[kendoChatScrollableButton]", inputs: ["prev"], outputs: ["onClick"] }] });
7316
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ChatScrollableButtonComponent, selector: "[kendoChatScrollableButton]", inputs: ["prev"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6608
7317
  }
6609
7318
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: SuggestedActionsComponent, decorators: [{
6610
7319
  type: Component,
6611
7320
  args: [{
7321
+ changeDetection: ChangeDetectionStrategy.OnPush,
6612
7322
  selector: 'kendo-chat-suggested-actions',
6613
7323
  providers: [
6614
7324
  {
@@ -6704,7 +7414,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
6704
7414
  standalone: true,
6705
7415
  imports: [NgTemplateOutlet, ChatScrollableButtonComponent],
6706
7416
  }]
6707
- }], ctorParameters: () => [{ type: ChatService }, { type: i1.LocalizationService }, { type: SuggestionsScrollService }, { type: i0.NgZone }, { type: i0.Renderer2 }], propDecorators: { defaultClass: [{
7417
+ }], ctorParameters: () => [{ type: ChatService }, { type: i1.LocalizationService }, { type: SuggestionsScrollService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.Injector }], propDecorators: { defaultClass: [{
6708
7418
  type: HostBinding,
6709
7419
  args: ['class.k-suggestion-group']
6710
7420
  }], scrollableClass: [{
@@ -6855,18 +7565,78 @@ class MessageBoxComponent {
6855
7565
  messageBoxWrapperClass = true;
6856
7566
  messageBoxInput;
6857
7567
  suggestedActionsComponent;
6858
- authorId;
6859
- autoScroll;
6860
- suggestions;
6861
- placeholder;
6862
- inputValue = '';
6863
- localization;
6864
- messageBoxTemplate;
6865
- messageBoxStartAffixTemplate;
6866
- messageBoxEndAffixTemplate;
6867
- messageBoxTopAffixTemplate;
6868
- suggestionTemplate;
6869
- loading;
7568
+ set authorId(value) {
7569
+ this._authorId.set(value);
7570
+ }
7571
+ get authorId() {
7572
+ return this._authorId();
7573
+ }
7574
+ set autoScroll(value) {
7575
+ this._autoScroll.set(value);
7576
+ }
7577
+ get autoScroll() {
7578
+ return this._autoScroll();
7579
+ }
7580
+ set suggestions(value) {
7581
+ this._suggestions.set(value);
7582
+ }
7583
+ get suggestions() {
7584
+ return this._suggestions();
7585
+ }
7586
+ set placeholder(value) {
7587
+ this._placeholder.set(value);
7588
+ }
7589
+ get placeholder() {
7590
+ return this._placeholder();
7591
+ }
7592
+ set inputValue(value) {
7593
+ this._inputValue.set(value);
7594
+ }
7595
+ get inputValue() {
7596
+ return this._inputValue();
7597
+ }
7598
+ set localization(value) {
7599
+ this._localization.set(value);
7600
+ }
7601
+ get localization() {
7602
+ return this._localization();
7603
+ }
7604
+ set messageBoxTemplate(value) {
7605
+ this._messageBoxTemplate.set(value);
7606
+ }
7607
+ get messageBoxTemplate() {
7608
+ return this._messageBoxTemplate();
7609
+ }
7610
+ set messageBoxStartAffixTemplate(value) {
7611
+ this._messageBoxStartAffixTemplate.set(value);
7612
+ }
7613
+ get messageBoxStartAffixTemplate() {
7614
+ return this._messageBoxStartAffixTemplate();
7615
+ }
7616
+ set messageBoxEndAffixTemplate(value) {
7617
+ this._messageBoxEndAffixTemplate.set(value);
7618
+ }
7619
+ get messageBoxEndAffixTemplate() {
7620
+ return this._messageBoxEndAffixTemplate();
7621
+ }
7622
+ set messageBoxTopAffixTemplate(value) {
7623
+ this._messageBoxTopAffixTemplate.set(value);
7624
+ }
7625
+ get messageBoxTopAffixTemplate() {
7626
+ return this._messageBoxTopAffixTemplate();
7627
+ }
7628
+ set suggestionTemplate(value) {
7629
+ this._suggestionTemplate.set(value);
7630
+ }
7631
+ get suggestionTemplate() {
7632
+ return this._suggestionTemplate();
7633
+ }
7634
+ set loading(value) {
7635
+ this._loading.set(value);
7636
+ }
7637
+ get loading() {
7638
+ return this._loading();
7639
+ }
6870
7640
  sendMessage = new EventEmitter();
6871
7641
  executeSuggestion = new EventEmitter();
6872
7642
  fileSelect = new EventEmitter();
@@ -6878,6 +7648,18 @@ class MessageBoxComponent {
6878
7648
  }
6879
7649
  selectedItem;
6880
7650
  subs = new Subscription();
7651
+ _authorId = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorId" }] : []));
7652
+ _autoScroll = signal(undefined, ...(ngDevMode ? [{ debugName: "_autoScroll" }] : []));
7653
+ _suggestions = signal(undefined, ...(ngDevMode ? [{ debugName: "_suggestions" }] : []));
7654
+ _placeholder = signal(undefined, ...(ngDevMode ? [{ debugName: "_placeholder" }] : []));
7655
+ _inputValue = signal('', ...(ngDevMode ? [{ debugName: "_inputValue" }] : []));
7656
+ _localization = signal(undefined, ...(ngDevMode ? [{ debugName: "_localization" }] : []));
7657
+ _messageBoxTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxTemplate" }] : []));
7658
+ _messageBoxStartAffixTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxStartAffixTemplate" }] : []));
7659
+ _messageBoxEndAffixTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxEndAffixTemplate" }] : []));
7660
+ _messageBoxTopAffixTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxTopAffixTemplate" }] : []));
7661
+ _suggestionTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_suggestionTemplate" }] : []));
7662
+ _loading = signal(undefined, ...(ngDevMode ? [{ debugName: "_loading" }] : []));
6881
7663
  constructor(chatService, cdr, element, renderer) {
6882
7664
  this.chatService = chatService;
6883
7665
  this.cdr = cdr;
@@ -6924,7 +7706,7 @@ class MessageBoxComponent {
6924
7706
  this.sendMessage.emit(new SendMessageEvent(message));
6925
7707
  this.inputValue = '';
6926
7708
  if (this.messageBoxInput) {
6927
- this.messageBoxInput.attachments = [];
7709
+ this.messageBoxInput.clearAttachments();
6928
7710
  }
6929
7711
  this.chatService.reply = null;
6930
7712
  this.messageBoxInput.focus();
@@ -7037,6 +7819,8 @@ class MessageBoxComponent {
7037
7819
  item.selected = true;
7038
7820
  this.selectedItem = item;
7039
7821
  }
7822
+ // detectChanges is needed because ChatItem.selected is a plain property on external
7823
+ // objects (not signals), so we must explicitly trigger view re-evaluation with OnPush.
7040
7824
  this.cdr.detectChanges();
7041
7825
  }
7042
7826
  this.chatService.toggleMessageState = false;
@@ -7147,11 +7931,12 @@ class MessageBoxComponent {
7147
7931
  } @if (messageBoxTemplate?.templateRef) {
7148
7932
  <ng-template [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>
7149
7933
  }
7150
- `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PromptBoxComponent, selector: "kendo-promptbox", inputs: ["disabled", "focusableId", "loading", "placeholder", "readonly", "title", "mode", "rows", "maxTextAreaHeight", "value", "actionButton", "fileSelectButton", "speechToTextButton"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur", "promptAction", "selectAttachments", "fileRemove", "speechToTextClick", "speechToTextStart", "speechToTextEnd", "speechToTextError", "speechToTextResult"], exportAs: ["kendoPromptBox"] }, { kind: "component", type: PromptBoxCustomMessagesComponent, selector: "kendo-promptbox-messages" }, { kind: "directive", type: PromptBoxHeaderTemplateDirective, selector: "[kendoPromptBoxHeaderTemplate]" }, { kind: "component", type: PromptBoxStartAffixComponent, selector: "kendo-promptbox-start-affix", exportAs: ["kendoPromptBoxStartAffix"] }, { kind: "component", type: PromptBoxTopAffixComponent, selector: "kendo-promptbox-top-affix", exportAs: ["kendoPromptBoxTopAffix"] }, { kind: "component", type: PromptBoxEndAffixComponent, selector: "kendo-promptbox-end-affix", exportAs: ["kendoPromptBoxEndAffix"] }, { kind: "component", type: PromptBoxFileSelectButtonComponent, selector: "kendo-promptbox-fileselect-button", inputs: ["restrictions", "multiple", "accept"], outputs: ["selectAttachments"], exportAs: ["kendoPromptBoxFileSelectButton"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "suggestions", "tabbable", "type", "suggestionTemplate"], outputs: ["dispatchAction", "dispatchSuggestion"] }] });
7934
+ `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PromptBoxComponent, selector: "kendo-promptbox", inputs: ["disabled", "focusableId", "loading", "placeholder", "readonly", "title", "mode", "rows", "maxTextAreaHeight", "value", "actionButton", "fileSelectButton", "speechToTextButton"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur", "promptAction", "selectAttachments", "fileRemove", "speechToTextClick", "speechToTextStart", "speechToTextEnd", "speechToTextError", "speechToTextResult"], exportAs: ["kendoPromptBox"] }, { kind: "component", type: PromptBoxCustomMessagesComponent, selector: "kendo-promptbox-messages" }, { kind: "directive", type: PromptBoxHeaderTemplateDirective, selector: "[kendoPromptBoxHeaderTemplate]" }, { kind: "component", type: PromptBoxStartAffixComponent, selector: "kendo-promptbox-start-affix", exportAs: ["kendoPromptBoxStartAffix"] }, { kind: "component", type: PromptBoxTopAffixComponent, selector: "kendo-promptbox-top-affix", exportAs: ["kendoPromptBoxTopAffix"] }, { kind: "component", type: PromptBoxEndAffixComponent, selector: "kendo-promptbox-end-affix", exportAs: ["kendoPromptBoxEndAffix"] }, { kind: "component", type: PromptBoxFileSelectButtonComponent, selector: "kendo-promptbox-fileselect-button", inputs: ["restrictions", "multiple", "accept"], outputs: ["selectAttachments"], exportAs: ["kendoPromptBoxFileSelectButton"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "suggestions", "tabbable", "type", "suggestionTemplate"], outputs: ["dispatchAction", "dispatchSuggestion"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7151
7935
  }
7152
7936
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: MessageBoxComponent, decorators: [{
7153
7937
  type: Component,
7154
7938
  args: [{
7939
+ changeDetection: ChangeDetectionStrategy.OnPush,
7155
7940
  selector: 'kendo-message-box',
7156
7941
  template: `
7157
7942
  @if (suggestions?.length > 0) {
@@ -7317,9 +8102,10 @@ class MessageComponent extends ChatItem {
7317
8102
  localization;
7318
8103
  cdr;
7319
8104
  zone;
8105
+ injector;
7320
8106
  set message(value) {
7321
- const textChanged = this._message && value && this._message.text !== value.text;
7322
- this._message = value;
8107
+ const textChanged = this._message() && value && this._message().text !== value.text;
8108
+ this._message.set(value);
7323
8109
  if (textChanged) {
7324
8110
  this.parts = this.getFormattedTextParts(value.text);
7325
8111
  if (this.isMessageExpandable && !this.showExpandCollapseIcon) {
@@ -7327,19 +8113,69 @@ class MessageComponent extends ChatItem {
7327
8113
  }
7328
8114
  }
7329
8115
  }
7330
- get message() {
7331
- return this._message;
7332
- }
7333
- tabbable;
7334
- authorMessageContentTemplate;
7335
- receiverMessageContentTemplate;
7336
- messageContentTemplate;
7337
- authorMessageTemplate;
7338
- receiverMessageTemplate;
7339
- messageTemplate;
7340
- statusTemplate;
7341
- showMessageTime = true;
7342
- authorId;
8116
+ get message() {
8117
+ return this._message();
8118
+ }
8119
+ set tabbable(value) {
8120
+ this._tabbable.set(value);
8121
+ }
8122
+ get tabbable() {
8123
+ return this._tabbable();
8124
+ }
8125
+ set authorMessageContentTemplate(value) {
8126
+ this._authorMessageContentTemplate.set(value);
8127
+ }
8128
+ get authorMessageContentTemplate() {
8129
+ return this._authorMessageContentTemplate();
8130
+ }
8131
+ set receiverMessageContentTemplate(value) {
8132
+ this._receiverMessageContentTemplate.set(value);
8133
+ }
8134
+ get receiverMessageContentTemplate() {
8135
+ return this._receiverMessageContentTemplate();
8136
+ }
8137
+ set messageContentTemplate(value) {
8138
+ this._messageContentTemplate.set(value);
8139
+ }
8140
+ get messageContentTemplate() {
8141
+ return this._messageContentTemplate();
8142
+ }
8143
+ set authorMessageTemplate(value) {
8144
+ this._authorMessageTemplate.set(value);
8145
+ }
8146
+ get authorMessageTemplate() {
8147
+ return this._authorMessageTemplate();
8148
+ }
8149
+ set receiverMessageTemplate(value) {
8150
+ this._receiverMessageTemplate.set(value);
8151
+ }
8152
+ get receiverMessageTemplate() {
8153
+ return this._receiverMessageTemplate();
8154
+ }
8155
+ set messageTemplate(value) {
8156
+ this._messageTemplate.set(value);
8157
+ }
8158
+ get messageTemplate() {
8159
+ return this._messageTemplate();
8160
+ }
8161
+ set statusTemplate(value) {
8162
+ this._statusTemplate.set(value);
8163
+ }
8164
+ get statusTemplate() {
8165
+ return this._statusTemplate();
8166
+ }
8167
+ set showMessageTime(value) {
8168
+ this._showMessageTime.set(value);
8169
+ }
8170
+ get showMessageTime() {
8171
+ return this._showMessageTime();
8172
+ }
8173
+ set authorId(value) {
8174
+ this._authorId.set(value);
8175
+ }
8176
+ get authorId() {
8177
+ return this._authorId();
8178
+ }
7343
8179
  cssClass = true;
7344
8180
  get failedClass() {
7345
8181
  return this.message.failed;
@@ -7356,7 +8192,6 @@ class MessageComponent extends ChatItem {
7356
8192
  }
7357
8193
  this.onExpandableKeydown(event);
7358
8194
  }
7359
- selected;
7360
8195
  get tabIndex() {
7361
8196
  return this.tabbable ? '0' : '-1';
7362
8197
  }
@@ -7365,11 +8200,21 @@ class MessageComponent extends ChatItem {
7365
8200
  downloadIcon = downloadIcon;
7366
8201
  resendIcon = arrowRotateCwIcon;
7367
8202
  messageFailedIcon = warningTriangleIcon;
7368
- isMessageExpanded = false;
7369
- showExpandCollapseIcon = false;
7370
8203
  fileActions = [];
7371
8204
  toolbarActions = [];
7372
8205
  parts = [];
8206
+ get isMessageExpanded() {
8207
+ return this._isMessageExpanded();
8208
+ }
8209
+ set isMessageExpanded(value) {
8210
+ this._isMessageExpanded.set(value);
8211
+ }
8212
+ get showExpandCollapseIcon() {
8213
+ return this._showExpandCollapseIcon();
8214
+ }
8215
+ set showExpandCollapseIcon(value) {
8216
+ this._showExpandCollapseIcon.set(value);
8217
+ }
7373
8218
  get useCustomBubbleTemplate() {
7374
8219
  return !!this.getActiveBubbleTemplate();
7375
8220
  }
@@ -7416,8 +8261,20 @@ class MessageComponent extends ChatItem {
7416
8261
  return hasComponentActions || hasMessageActions;
7417
8262
  }
7418
8263
  subs = new Subscription();
7419
- _message;
7420
- constructor(element, intl, chatService, localization, cdr, zone) {
8264
+ _message = signal(undefined, ...(ngDevMode ? [{ debugName: "_message" }] : []));
8265
+ _tabbable = signal(undefined, ...(ngDevMode ? [{ debugName: "_tabbable" }] : []));
8266
+ _authorMessageContentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorMessageContentTemplate" }] : []));
8267
+ _receiverMessageContentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_receiverMessageContentTemplate" }] : []));
8268
+ _messageContentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageContentTemplate" }] : []));
8269
+ _authorMessageTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorMessageTemplate" }] : []));
8270
+ _receiverMessageTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_receiverMessageTemplate" }] : []));
8271
+ _messageTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageTemplate" }] : []));
8272
+ _statusTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_statusTemplate" }] : []));
8273
+ _showMessageTime = signal(true, ...(ngDevMode ? [{ debugName: "_showMessageTime" }] : []));
8274
+ _authorId = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorId" }] : []));
8275
+ _isMessageExpanded = signal(false, ...(ngDevMode ? [{ debugName: "_isMessageExpanded" }] : []));
8276
+ _showExpandCollapseIcon = signal(false, ...(ngDevMode ? [{ debugName: "_showExpandCollapseIcon" }] : []));
8277
+ constructor(element, intl, chatService, localization, cdr, zone, injector) {
7421
8278
  super();
7422
8279
  this.element = element;
7423
8280
  this.intl = intl;
@@ -7425,6 +8282,7 @@ class MessageComponent extends ChatItem {
7425
8282
  this.localization = localization;
7426
8283
  this.cdr = cdr;
7427
8284
  this.zone = zone;
8285
+ this.injector = injector;
7428
8286
  }
7429
8287
  ngOnInit() {
7430
8288
  this.fileActions = this.getFileActions();
@@ -7444,7 +8302,7 @@ class MessageComponent extends ChatItem {
7444
8302
  this.updateExpandCollapseIconAfterStable();
7445
8303
  }
7446
8304
  else {
7447
- this.showExpandCollapseIcon = false;
8305
+ this._showExpandCollapseIcon.set(false);
7448
8306
  }
7449
8307
  }));
7450
8308
  this.subs.add(this.chatService.messageToolbarActionsChange$.subscribe(() => {
@@ -7527,9 +8385,8 @@ class MessageComponent extends ChatItem {
7527
8385
  }
7528
8386
  toggleMessageState(event) {
7529
8387
  event.stopImmediatePropagation();
7530
- this.isMessageExpanded = !this.isMessageExpanded;
8388
+ this._isMessageExpanded.update(v => !v);
7531
8389
  this.chatService.toggleMessageState = false;
7532
- this.cdr.detectChanges();
7533
8390
  }
7534
8391
  onExpandableKeydown(event) {
7535
8392
  const key = normalizeKeys(event);
@@ -7645,12 +8502,11 @@ class MessageComponent extends ChatItem {
7645
8502
  return transformActions(actions);
7646
8503
  }
7647
8504
  updateExpandCollapseIconAfterStable() {
7648
- this.subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
7649
- this.showExpandCollapseIcon = this.calculateExpandCollapseIconVisibility();
7650
- this.cdr.detectChanges();
7651
- }));
8505
+ afterNextRender(() => {
8506
+ this._showExpandCollapseIcon.set(this.calculateExpandCollapseIconVisibility());
8507
+ }, { injector: this.injector });
7652
8508
  }
7653
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: MessageComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.IntlService }, { token: ChatService }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
8509
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: MessageComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.IntlService }, { token: ChatService }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
7654
8510
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: MessageComponent, isStandalone: true, selector: "kendo-chat-message", inputs: { message: "message", tabbable: "tabbable", authorMessageContentTemplate: "authorMessageContentTemplate", receiverMessageContentTemplate: "receiverMessageContentTemplate", messageContentTemplate: "messageContentTemplate", authorMessageTemplate: "authorMessageTemplate", receiverMessageTemplate: "receiverMessageTemplate", messageTemplate: "messageTemplate", statusTemplate: "statusTemplate", showMessageTime: "showMessageTime", authorId: "authorId" }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "class.k-message": "this.cssClass", "class.k-message-failed": "this.failedClass", "class.k-message-removed": "this.removedClass", "attr.tabIndex": "this.tabIndex" } }, providers: [
7655
8511
  {
7656
8512
  provide: ChatItem,
@@ -7865,11 +8721,12 @@ class MessageComponent extends ChatItem {
7865
8721
  }
7866
8722
  </kendo-toolbar>
7867
8723
  }
7868
- `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i2.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }, { kind: "component", type: ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "fillMode", "tabindex", "size", "tabIndex", "showIcon", "showText"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { kind: "component", type: ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: ["showText", "showIcon", "text", "style", "className", "title", "disabled", "toggleable", "look", "togglable", "selected", "fillMode", "rounded", "themeColor", "icon", "iconClass", "svgIcon", "imageUrl"], outputs: ["click", "pointerdown", "selectedChange"], exportAs: ["kendoToolBarButton"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }] });
8724
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i2.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }, { kind: "component", type: ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "fillMode", "tabindex", "size", "tabIndex", "showIcon", "showText"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { kind: "component", type: ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: ["showText", "showIcon", "text", "style", "className", "title", "disabled", "toggleable", "look", "togglable", "selected", "fillMode", "rounded", "themeColor", "icon", "iconClass", "svgIcon", "imageUrl"], outputs: ["click", "pointerdown", "selectedChange"], exportAs: ["kendoToolBarButton"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7869
8725
  }
7870
8726
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: MessageComponent, decorators: [{
7871
8727
  type: Component,
7872
8728
  args: [{
8729
+ changeDetection: ChangeDetectionStrategy.OnPush,
7873
8730
  selector: 'kendo-chat-message',
7874
8731
  providers: [
7875
8732
  {
@@ -8100,7 +8957,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
8100
8957
  ButtonComponent,
8101
8958
  ],
8102
8959
  }]
8103
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.IntlService }, { type: ChatService }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { message: [{
8960
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.IntlService }, { type: ChatService }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Injector }], propDecorators: { message: [{
8104
8961
  type: Input
8105
8962
  }], tabbable: [{
8106
8963
  type: Input
@@ -8144,13 +9001,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
8144
9001
  */
8145
9002
  class AttachmentComponent {
8146
9003
  set attachment(value) {
8147
- this._attachment = value;
8148
- this.context = {
8149
- $implicit: this.attachment
8150
- };
9004
+ this._attachment.set(value);
9005
+ this.context = { $implicit: value };
8151
9006
  }
8152
9007
  get attachment() {
8153
- return this._attachment;
9008
+ return this._attachment();
8154
9009
  }
8155
9010
  template;
8156
9011
  get image() {
@@ -8163,7 +9018,7 @@ class AttachmentComponent {
8163
9018
  get contentType() {
8164
9019
  return this.attachment.contentType || '';
8165
9020
  }
8166
- _attachment;
9021
+ _attachment = signal(undefined, ...(ngDevMode ? [{ debugName: "_attachment" }] : []));
8167
9022
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: AttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8168
9023
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: AttachmentComponent, isStandalone: true, selector: "kendo-chat-attachment", inputs: { attachment: "attachment", template: "template" }, ngImport: i0, template: `
8169
9024
  @if (template) {
@@ -8193,7 +9048,7 @@ class AttachmentComponent {
8193
9048
  </div>
8194
9049
  </div>
8195
9050
  }
8196
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
9051
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8197
9052
  }
8198
9053
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: AttachmentComponent, decorators: [{
8199
9054
  type: Component,
@@ -8228,6 +9083,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
8228
9083
  </div>
8229
9084
  }
8230
9085
  `,
9086
+ changeDetection: ChangeDetectionStrategy.OnPush,
8231
9087
  standalone: true,
8232
9088
  imports: [NgTemplateOutlet]
8233
9089
  }]
@@ -8252,20 +9108,52 @@ class MessageAttachmentsComponent extends ChatItem {
8252
9108
  * @hidden
8253
9109
  */
8254
9110
  chevronRightIcon = chevronRightIcon;
8255
- attachments;
8256
- layout;
8257
- tabbable;
8258
- template;
8259
- localization;
9111
+ set attachments(value) {
9112
+ this._attachments.set(value);
9113
+ }
9114
+ get attachments() {
9115
+ return this._attachments();
9116
+ }
9117
+ set layout(value) {
9118
+ this._layout.set(value);
9119
+ }
9120
+ get layout() {
9121
+ return this._layout();
9122
+ }
9123
+ set tabbable(value) {
9124
+ this._tabbable.set(value);
9125
+ }
9126
+ get tabbable() {
9127
+ return this._tabbable();
9128
+ }
9129
+ set template(value) {
9130
+ this._template.set(value);
9131
+ }
9132
+ get template() {
9133
+ return this._template();
9134
+ }
9135
+ set localization(value) {
9136
+ this._localization.set(value);
9137
+ }
9138
+ get localization() {
9139
+ return this._localization();
9140
+ }
8260
9141
  get carousel() {
8261
9142
  return this.layout !== 'list';
8262
9143
  }
8263
9144
  deck;
8264
9145
  items;
8265
- scrollPosition = 0;
9146
+ _scrollPosition = signal(0, ...(ngDevMode ? [{ debugName: "_scrollPosition" }] : []));
9147
+ get scrollPosition() { return this._scrollPosition(); }
9148
+ set scrollPosition(v) { this._scrollPosition.set(v); }
8266
9149
  selectedIndex = 0;
8267
9150
  scrollSubscription;
8268
9151
  direction;
9152
+ _attachments = signal(undefined, ...(ngDevMode ? [{ debugName: "_attachments" }] : []));
9153
+ _layout = signal(undefined, ...(ngDevMode ? [{ debugName: "_layout" }] : []));
9154
+ _tabbable = signal(undefined, ...(ngDevMode ? [{ debugName: "_tabbable" }] : []));
9155
+ _template = signal(undefined, ...(ngDevMode ? [{ debugName: "_template" }] : []));
9156
+ _localization = signal(undefined, ...(ngDevMode ? [{ debugName: "_localization" }] : []));
8269
9157
  get showLeftArrow() {
8270
9158
  return this.carousel && (this.direction === 'rtl' ? this.scrollPosition > -1 : this.scrollPosition > 0);
8271
9159
  }
@@ -8400,7 +9288,7 @@ class MessageAttachmentsComponent extends ChatItem {
8400
9288
  >
8401
9289
  </button>
8402
9290
  }
8403
- `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }] });
9291
+ `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8404
9292
  }
8405
9293
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: MessageAttachmentsComponent, decorators: [{
8406
9294
  type: Component,
@@ -8455,6 +9343,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
8455
9343
  </button>
8456
9344
  }
8457
9345
  `,
9346
+ changeDetection: ChangeDetectionStrategy.OnPush,
8458
9347
  standalone: true,
8459
9348
  imports: [ButtonComponent, AttachmentComponent]
8460
9349
  }]
@@ -8491,30 +9380,102 @@ class MessageListComponent {
8491
9380
  set messages(value) {
8492
9381
  const data = value || [];
8493
9382
  this.view = chatView(data);
8494
- this._messages = data;
9383
+ this._messages.set(data);
8495
9384
  }
8496
9385
  get messages() {
8497
- return this._messages;
8498
- }
8499
- attachmentTemplate;
8500
- authorMessageContentTemplate;
8501
- receiverMessageContentTemplate;
8502
- messageContentTemplate;
8503
- authorMessageTemplate;
8504
- receiverMessageTemplate;
8505
- messageTemplate;
8506
- timestampTemplate;
8507
- statusTemplate;
8508
- userStatusTemplate;
8509
- localization;
8510
- authorId;
9386
+ return this._messages();
9387
+ }
9388
+ set attachmentTemplate(value) {
9389
+ this._attachmentTemplate.set(value);
9390
+ }
9391
+ get attachmentTemplate() {
9392
+ return this._attachmentTemplate();
9393
+ }
9394
+ set authorMessageContentTemplate(value) {
9395
+ this._authorMessageContentTemplate.set(value);
9396
+ }
9397
+ get authorMessageContentTemplate() {
9398
+ return this._authorMessageContentTemplate();
9399
+ }
9400
+ set receiverMessageContentTemplate(value) {
9401
+ this._receiverMessageContentTemplate.set(value);
9402
+ }
9403
+ get receiverMessageContentTemplate() {
9404
+ return this._receiverMessageContentTemplate();
9405
+ }
9406
+ set messageContentTemplate(value) {
9407
+ this._messageContentTemplate.set(value);
9408
+ }
9409
+ get messageContentTemplate() {
9410
+ return this._messageContentTemplate();
9411
+ }
9412
+ set authorMessageTemplate(value) {
9413
+ this._authorMessageTemplate.set(value);
9414
+ }
9415
+ get authorMessageTemplate() {
9416
+ return this._authorMessageTemplate();
9417
+ }
9418
+ set receiverMessageTemplate(value) {
9419
+ this._receiverMessageTemplate.set(value);
9420
+ }
9421
+ get receiverMessageTemplate() {
9422
+ return this._receiverMessageTemplate();
9423
+ }
9424
+ set messageTemplate(value) {
9425
+ this._messageTemplate.set(value);
9426
+ }
9427
+ get messageTemplate() {
9428
+ return this._messageTemplate();
9429
+ }
9430
+ set timestampTemplate(value) {
9431
+ this._timestampTemplate.set(value);
9432
+ }
9433
+ get timestampTemplate() {
9434
+ return this._timestampTemplate();
9435
+ }
9436
+ set statusTemplate(value) {
9437
+ this._statusTemplate.set(value);
9438
+ }
9439
+ get statusTemplate() {
9440
+ return this._statusTemplate();
9441
+ }
9442
+ set userStatusTemplate(value) {
9443
+ this._userStatusTemplate.set(value);
9444
+ }
9445
+ get userStatusTemplate() {
9446
+ return this._userStatusTemplate();
9447
+ }
9448
+ set localization(value) {
9449
+ this._localization.set(value);
9450
+ }
9451
+ get localization() {
9452
+ return this._localization();
9453
+ }
9454
+ set authorId(value) {
9455
+ this._authorId.set(value);
9456
+ }
9457
+ get authorId() {
9458
+ return this._authorId();
9459
+ }
8511
9460
  executeAction = new EventEmitter();
8512
9461
  navigate = new EventEmitter();
8513
9462
  resize = new EventEmitter();
8514
9463
  items;
8515
9464
  cssClass = true;
8516
9465
  view = [];
8517
- _messages;
9466
+ _messages = signal([], ...(ngDevMode ? [{ debugName: "_messages" }] : []));
9467
+ _attachmentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_attachmentTemplate" }] : []));
9468
+ _authorMessageContentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorMessageContentTemplate" }] : []));
9469
+ _receiverMessageContentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_receiverMessageContentTemplate" }] : []));
9470
+ _messageContentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageContentTemplate" }] : []));
9471
+ _authorMessageTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorMessageTemplate" }] : []));
9472
+ _receiverMessageTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_receiverMessageTemplate" }] : []));
9473
+ _messageTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageTemplate" }] : []));
9474
+ _timestampTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_timestampTemplate" }] : []));
9475
+ _statusTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_statusTemplate" }] : []));
9476
+ _userStatusTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_userStatusTemplate" }] : []));
9477
+ _localization = signal(undefined, ...(ngDevMode ? [{ debugName: "_localization" }] : []));
9478
+ _authorId = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorId" }] : []));
8518
9479
  subs = new Subscription();
8519
9480
  selectedItem;
8520
9481
  keyActions = {
@@ -8876,11 +9837,12 @@ class MessageListComponent {
8876
9837
  </kendo-chat-suggested-actions>
8877
9838
  } } }
8878
9839
  <kendo-resize-sensor (resize)="onResize()"> </kendo-resize-sensor>
8879
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MessageComponent, selector: "kendo-chat-message", inputs: ["message", "tabbable", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "statusTemplate", "showMessageTime", "authorId"] }, { kind: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }, { kind: "component", type: MessageAttachmentsComponent, selector: "kendo-chat-message-attachments", inputs: ["attachments", "layout", "tabbable", "template", "localization"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "suggestions", "tabbable", "type", "suggestionTemplate"], outputs: ["dispatchAction", "dispatchSuggestion"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "ngmodule", type: ButtonsModule }] });
9840
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MessageComponent, selector: "kendo-chat-message", inputs: ["message", "tabbable", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "statusTemplate", "showMessageTime", "authorId"] }, { kind: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }, { kind: "component", type: MessageAttachmentsComponent, selector: "kendo-chat-message-attachments", inputs: ["attachments", "layout", "tabbable", "template", "localization"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "suggestions", "tabbable", "type", "suggestionTemplate"], outputs: ["dispatchAction", "dispatchSuggestion"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "ngmodule", type: ButtonsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8880
9841
  }
8881
9842
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: MessageListComponent, decorators: [{
8882
9843
  type: Component,
8883
9844
  args: [{
9845
+ changeDetection: ChangeDetectionStrategy.OnPush,
8884
9846
  selector: 'kendo-chat-message-list',
8885
9847
  template: `
8886
9848
  @for (group of view; track trackGroup($index, group); let lastGroup = $last) { @switch (group.type) { @case
@@ -9061,16 +10023,27 @@ class ChatComponent {
9061
10023
  renderer;
9062
10024
  element;
9063
10025
  chatService;
10026
+ injector;
9064
10027
  /**
9065
10028
  * Sets the Chat messages.
9066
10029
  * Accepts an array of `Message` objects, but can also accept custom data types.
9067
10030
  * For more information, check [Data Binding](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/data-binding) section in the documentation.
9068
10031
  */
9069
- messages;
10032
+ set messages(value) {
10033
+ this._messages.set(value);
10034
+ }
10035
+ get messages() {
10036
+ return this._messages();
10037
+ }
9070
10038
  /**
9071
10039
  * Sets the ID that represents the local user.
9072
10040
  */
9073
- authorId;
10041
+ set authorId(value) {
10042
+ this._authorId.set(value);
10043
+ }
10044
+ get authorId() {
10045
+ return this._authorId();
10046
+ }
9074
10047
  /**
9075
10048
  * Determines the type of input used in the message box.
9076
10049
  * ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message)).
@@ -9078,92 +10051,172 @@ class ChatComponent {
9078
10051
  *
9079
10052
  * @hidden
9080
10053
  */
9081
- messageBoxType = 'textarea';
10054
+ set messageBoxType(value) {
10055
+ this._messageBoxType.set(value);
10056
+ }
10057
+ get messageBoxType() {
10058
+ return this._messageBoxType();
10059
+ }
9082
10060
  /**
9083
10061
  * Sets the height of the Chat component.
9084
10062
  * Accepts a string with CSS units (for example, `'400px'`, `'50%'`) or a number (interpreted as pixels).
9085
10063
  * The minimum height is `600px`.
9086
10064
  */
9087
- height;
10065
+ set height(value) {
10066
+ this._height.set(value);
10067
+ }
10068
+ get height() {
10069
+ return this._height();
10070
+ }
9088
10071
  /**
9089
10072
  * Sets the width of the Chat component.
9090
10073
  * Accepts a string with CSS units (for example, `'400px'`, `'50%'`) or a number (interpreted as pixels).
9091
10074
  * The minimum width is `320px`.
9092
10075
  */
9093
- width;
10076
+ set width(value) {
10077
+ this._width.set(value);
10078
+ }
10079
+ get width() {
10080
+ return this._width();
10081
+ }
9094
10082
  /**
9095
10083
  * Sets the placeholder text for the message input box.
9096
10084
  */
9097
- placeholder;
10085
+ set placeholder(value) {
10086
+ this._placeholder.set(value);
10087
+ }
10088
+ get placeholder() {
10089
+ return this._placeholder();
10090
+ }
9098
10091
  /**
9099
10092
  * Controls the width of the message between the predefined options.
9100
10093
  *
9101
10094
  * @default 'standard'
9102
10095
  */
9103
- messageWidthMode = 'standard';
10096
+ set messageWidthMode(value) {
10097
+ this._messageWidthMode.set(value);
10098
+ }
10099
+ get messageWidthMode() {
10100
+ return this._messageWidthMode();
10101
+ }
9104
10102
  /**
9105
10103
  * Controls the visibility of timestamps in messages.
9106
10104
  *
9107
10105
  * @default 'focus'
9108
10106
  */
9109
- timestampVisibility = 'focus';
10107
+ set timestampVisibility(value) {
10108
+ this._timestampVisibility.set(value);
10109
+ }
10110
+ get timestampVisibility() {
10111
+ return this._timestampVisibility();
10112
+ }
9110
10113
  /**
9111
10114
  * Controls the visibility of usernames in messages.
9112
10115
  * When set to `true`, the username displays above each message bubble.
9113
10116
  *
9114
10117
  * @default true
9115
10118
  */
9116
- showUsername = true;
10119
+ set showUsername(value) {
10120
+ this._showUsername.set(value);
10121
+ }
10122
+ get showUsername() {
10123
+ return this._showUsername();
10124
+ }
9117
10125
  /**
9118
10126
  * Controls the avatar visibility for the messages.
9119
10127
  * When set to `true`, the user avatar displays next to each message bubble.
9120
10128
  *
9121
10129
  * @default true
9122
10130
  */
9123
- showAvatar = true;
10131
+ set showAvatar(value) {
10132
+ this._showAvatar.set(value);
10133
+ }
10134
+ get showAvatar() {
10135
+ return this._showAvatar();
10136
+ }
9124
10137
  /**
9125
10138
  * Enables the expand or collapse functionality for messages.
9126
10139
  *
9127
10140
  * @default false
9128
10141
  */
9129
- allowMessageCollapse = false;
10142
+ set allowMessageCollapse(value) {
10143
+ this._allowMessageCollapse.set(value);
10144
+ }
10145
+ get allowMessageCollapse() {
10146
+ return this._allowMessageCollapse();
10147
+ }
9130
10148
  /**
9131
10149
  * Sets the Speech to Text button settings.
9132
10150
  *
9133
10151
  * @default true
9134
10152
  */
9135
- speechToTextButton = true;
10153
+ set speechToTextButton(value) {
10154
+ this._speechToTextButton.set(value);
10155
+ }
10156
+ get speechToTextButton() {
10157
+ return this._speechToTextButton();
10158
+ }
9136
10159
  /**
9137
10160
  * Sets the File Select Button settings.
9138
10161
  *
9139
10162
  * @default true
9140
10163
  */
9141
- fileSelectButton = true;
10164
+ set fileSelectButton(value) {
10165
+ this._fileSelectButton.set(value);
10166
+ }
10167
+ get fileSelectButton() {
10168
+ return this._fileSelectButton();
10169
+ }
9142
10170
  /**
9143
10171
  * Sets the message box settings.
9144
10172
  */
9145
- messageBoxSettings = MESSAGE_BOX_SETTINGS;
10173
+ set messageBoxSettings(value) {
10174
+ this._messageBoxSettings.set(value);
10175
+ }
10176
+ get messageBoxSettings() {
10177
+ return this._messageBoxSettings();
10178
+ }
9146
10179
  /**
9147
10180
  * Sets the actions of the message toolbar.
9148
10181
  * These actions display in the message toolbar and let you perform specific operations on the message.
9149
10182
  *
9150
10183
  * @default []
9151
10184
  */
9152
- messageToolbarActions = [];
10185
+ set messageToolbarActions(value) {
10186
+ this._messageToolbarActions.set(value);
10187
+ }
10188
+ get messageToolbarActions() {
10189
+ return this._messageToolbarActions();
10190
+ }
9153
10191
  /**
9154
10192
  * Sets the value of the Message Box.
9155
10193
  *
9156
10194
  * @default ''
9157
10195
  */
9158
- inputValue = '';
10196
+ set inputValue(value) {
10197
+ this._inputValue.set(value);
10198
+ }
10199
+ get inputValue() {
10200
+ return this._inputValue();
10201
+ }
9159
10202
  /**
9160
10203
  * Sets the settings for the author's messages.
9161
10204
  */
9162
- authorMessageSettings;
10205
+ set authorMessageSettings(value) {
10206
+ this._authorMessageSettings.set(value);
10207
+ }
10208
+ get authorMessageSettings() {
10209
+ return this._authorMessageSettings();
10210
+ }
9163
10211
  /**
9164
10212
  * Sets the settings for the receivers' messages.
9165
10213
  */
9166
- receiverMessageSettings;
10214
+ set receiverMessageSettings(value) {
10215
+ this._receiverMessageSettings.set(value);
10216
+ }
10217
+ get receiverMessageSettings() {
10218
+ return this._receiverMessageSettings();
10219
+ }
9167
10220
  /**
9168
10221
  * Sets the default actions that display in the message context menu.
9169
10222
  *
@@ -9176,10 +10229,10 @@ class ChatComponent {
9176
10229
  * The default actions are `copy` and `reply` and are defined by their `id`.
9177
10230
  */
9178
10231
  set messageContextMenuActions(actions) {
9179
- this._messageContextMenuActions = this.mergeWithDefaultActions(actions, CONTEXT_MENU_ACTIONS);
10232
+ this._messageContextMenuActions.set(this.mergeWithDefaultActions(actions, CONTEXT_MENU_ACTIONS));
9180
10233
  }
9181
10234
  get messageContextMenuActions() {
9182
- return this._messageContextMenuActions;
10235
+ return this._messageContextMenuActions();
9183
10236
  }
9184
10237
  /**
9185
10238
  * Sets the default actions that display in the file actions DropDownButton.
@@ -9195,10 +10248,10 @@ class ChatComponent {
9195
10248
  * @default [{ id: 'download', label: 'Download', icon: 'download', svgIcon: downloadIcon, disabled: false }]
9196
10249
  */
9197
10250
  set fileActions(actions) {
9198
- this._fileActions = this.mergeWithDefaultActions(actions, FILE_ACTIONS);
10251
+ this._fileActions.set(this.mergeWithDefaultActions(actions, FILE_ACTIONS));
9199
10252
  }
9200
10253
  get fileActions() {
9201
- return this._fileActions;
10254
+ return this._fileActions();
9202
10255
  }
9203
10256
  /**
9204
10257
  * Sets the layout of the files in the message bubble.
@@ -9206,42 +10259,64 @@ class ChatComponent {
9206
10259
  * @default 'vertical'
9207
10260
  */
9208
10261
  set messageFilesLayout(layout) {
10262
+ this._messageFilesLayout.set(layout);
9209
10263
  this.chatService.messageFilesLayout = layout;
9210
10264
  }
10265
+ get messageFilesLayout() {
10266
+ return this._messageFilesLayout();
10267
+ }
9211
10268
  /**
9212
10269
  * Sets the layout of the suggestions above the message input box.
9213
10270
  *
9214
10271
  * @default 'scroll'
9215
10272
  */
9216
10273
  set suggestionsLayout(layoutMode) {
10274
+ this._suggestionsLayout.set(layoutMode);
9217
10275
  if (layoutMode) {
9218
10276
  this.chatService.suggestionsLayout = layoutMode;
9219
10277
  }
9220
10278
  }
10279
+ get suggestionsLayout() {
10280
+ return this._suggestionsLayout();
10281
+ }
9221
10282
  /**
9222
10283
  * Sets the layout of the quick actions suggested below the messages.
9223
10284
  *
9224
10285
  * @default 'scroll'
9225
10286
  */
9226
10287
  set quickActionsLayout(layoutMode) {
10288
+ this._quickActionsLayout.set(layoutMode);
9227
10289
  if (layoutMode) {
9228
10290
  this.chatService.quickActionsLayout = layoutMode;
9229
10291
  }
9230
10292
  }
10293
+ get quickActionsLayout() {
10294
+ return this._quickActionsLayout();
10295
+ }
9231
10296
  /**
9232
10297
  * Sets the suggestions that display in the message input box.
9233
10298
  * Suggestions display as a list of clickable items that let you quickly insert predefined text into the message input.
9234
10299
  *
9235
10300
  * @default []
9236
10301
  */
9237
- suggestions = [];
10302
+ set suggestions(value) {
10303
+ this._suggestions.set(value);
10304
+ }
10305
+ get suggestions() {
10306
+ return this._suggestions();
10307
+ }
9238
10308
  /**
9239
10309
  * Sets the send button settings for the Chat component.
9240
10310
  * Allows customization of the send button appearance, icons and disabled state.
9241
10311
  *
9242
10312
  * @default true
9243
10313
  */
9244
- sendButton = true;
10314
+ set sendButton(value) {
10315
+ this._sendButton.set(value);
10316
+ }
10317
+ get sendButton() {
10318
+ return this._sendButton();
10319
+ }
9245
10320
  /**
9246
10321
  * @hidden
9247
10322
  */
@@ -9256,14 +10331,24 @@ class ChatComponent {
9256
10331
  *
9257
10332
  * @default 'scrollable'
9258
10333
  */
9259
- scrollMode = 'scrollable';
10334
+ set scrollMode(value) {
10335
+ this._scrollMode.set(value);
10336
+ }
10337
+ get scrollMode() {
10338
+ return this._scrollMode();
10339
+ }
9260
10340
  /**
9261
10341
  * Sets the number of messages loaded per page in endless scroll mode.
9262
10342
  * Ignored in `scrollable` mode.
9263
10343
  *
9264
10344
  * @default 50
9265
10345
  */
9266
- pageSize = 50;
10346
+ set pageSize(value) {
10347
+ this._pageSize.set(value);
10348
+ }
10349
+ get pageSize() {
10350
+ return this._pageSize();
10351
+ }
9267
10352
  /**
9268
10353
  * Sets the minimum distance from the top of the visible message area that prevents auto-scrolling when a new receiver message arrives.
9269
10354
  * Accepts a percentage string (for example, `'30%'`) or a pixel value as a number. Set to `0` to always auto-scroll to new messages.
@@ -9274,23 +10359,43 @@ class ChatComponent {
9274
10359
  *
9275
10360
  * @default '20%'
9276
10361
  */
9277
- autoScrollThreshold = '20%';
10362
+ set autoScrollThreshold(value) {
10363
+ this._autoScrollThreshold.set(value);
10364
+ }
10365
+ get autoScrollThreshold() {
10366
+ return this._autoScrollThreshold();
10367
+ }
9278
10368
  /**
9279
10369
  * Sets the total number of messages in the conversation when using endless scrolling with remote data source. For more details, refer to the [Endless Scrolling with Remote Data](slug:scroll_modes_chat#remote-data) section in the documentation.
9280
10370
  */
9281
- total;
10371
+ set total(value) {
10372
+ this._total.set(value);
10373
+ }
10374
+ get total() {
10375
+ return this._total();
10376
+ }
9282
10377
  /**
9283
10378
  * Sets the index of the first message in the currently loaded batch within the full conversation.
9284
10379
  * Used with remote data sources in endless scroll mode to compute the range for the next [`loadMore`](slug:api_conversational-ui_chatcomponent#loadMore) call.
9285
10380
  * For more details, refer to the [Endless Scrolling with Remote Data](slug:scroll_modes_chat#remote-data) section in the documentation.
9286
10381
  */
9287
- startIndex;
10382
+ set startIndex(value) {
10383
+ this._startIndex.set(value);
10384
+ }
10385
+ get startIndex() {
10386
+ return this._startIndex();
10387
+ }
9288
10388
  /**
9289
10389
  * Sets the exclusive end index of the currently loaded batch within the full conversation.
9290
10390
  * Used with remote data sources in endless scroll mode to determine whether more messages exist beyond the current batch.
9291
10391
  * For more details, refer to the [Endless Scrolling with Remote Data](slug:scroll_modes_chat#remote-data) section in the documentation.
9292
10392
  */
9293
- endIndex;
10393
+ set endIndex(value) {
10394
+ this._endIndex.set(value);
10395
+ }
10396
+ get endIndex() {
10397
+ return this._endIndex();
10398
+ }
9294
10399
  /**
9295
10400
  * Sets the full set of pinned messages in the conversation.
9296
10401
  * Used with remote data sources in endless scroll mode to render the pinned message indicator when the pinned message is outside the currently loaded batch.
@@ -9298,7 +10403,12 @@ class ChatComponent {
9298
10403
  *
9299
10404
  * @default []
9300
10405
  */
9301
- pinnedMessages = [];
10406
+ set pinnedMessages(value) {
10407
+ this._pinnedMessages.set(value);
10408
+ }
10409
+ get pinnedMessages() {
10410
+ return this._pinnedMessages();
10411
+ }
9302
10412
  /**
9303
10413
  * Sets the messages that serve as reply targets for messages in the currently loaded batch but exist outside it.
9304
10414
  * Used with remote data sources in endless scroll mode to render reply previews when the replied-to message is not in the current batch.
@@ -9306,30 +10416,45 @@ class ChatComponent {
9306
10416
  *
9307
10417
  * @default []
9308
10418
  */
9309
- repliedToMessages = [];
10419
+ set repliedToMessages(value) {
10420
+ this._repliedToMessages.set(value);
10421
+ }
10422
+ get repliedToMessages() {
10423
+ return this._repliedToMessages();
10424
+ }
9310
10425
  /**
9311
10426
  * Sets the names of the model fields from which the Chat reads its data.
9312
10427
  * Lets you map custom data types to the expected `Message` format.
9313
10428
  */
9314
10429
  set modelFields(value) {
9315
- this._modelFields = { ...defaultModelFields, ...value };
10430
+ this._modelFields.set({ ...defaultModelFields, ...value });
9316
10431
  }
9317
10432
  get modelFields() {
9318
- return this._modelFields;
10433
+ return this._modelFields();
9319
10434
  }
9320
10435
  /**
9321
10436
  * Controls whether a scroll to bottom button is rendered at the bottom of the Chat. Displayed only when the user has scrolled the component upward.
9322
10437
  *
9323
10438
  * @default true
9324
10439
  */
9325
- scrollToBottomButton = true;
10440
+ set scrollToBottomButton(value) {
10441
+ this._scrollToBottomButton.set(value);
10442
+ }
10443
+ get scrollToBottomButton() {
10444
+ return this._scrollToBottomButton();
10445
+ }
9326
10446
  /**
9327
10447
  * Sets the loading state of the Chat component.
9328
10448
  * When set to `true`, a loading button is displayed instead of the send button.
9329
10449
  *
9330
10450
  * @default false
9331
10451
  */
9332
- loading = false;
10452
+ set loading(value) {
10453
+ this._loading.set(value);
10454
+ }
10455
+ get loading() {
10456
+ return this._loading();
10457
+ }
9333
10458
  /**
9334
10459
  * Fires when the user sends a message by clicking the **Send** button or pressing **Enter**.
9335
10460
  *
@@ -9401,23 +10526,40 @@ class ChatComponent {
9401
10526
  set messagesContextMenu(contextMenu) {
9402
10527
  this.chatService.messagesContextMenu = contextMenu;
9403
10528
  }
9404
- attachmentTemplate;
9405
- chatHeaderTemplate;
9406
- chatNoDataTemplate;
9407
- authorMessageContentTemplate;
9408
- receiverMessageContentTemplate;
9409
- messageContentTemplate;
9410
- authorMessageTemplate;
9411
- receiverMessageTemplate;
9412
- messageTemplate;
9413
- timestampTemplate;
9414
- suggestionTemplate;
9415
- statusTemplate;
9416
- messageBoxTemplate;
9417
- messageBoxStartAffixTemplate;
9418
- messageBoxEndAffixTemplate;
9419
- messageBoxTopAffixTemplate;
9420
- userStatusTemplate;
10529
+ set attachmentTemplate(v) { this._attachmentTemplate.set(v); }
10530
+ get attachmentTemplate() { return this._attachmentTemplate(); }
10531
+ set chatHeaderTemplate(v) { this._chatHeaderTemplate.set(v); }
10532
+ get chatHeaderTemplate() { return this._chatHeaderTemplate(); }
10533
+ set chatNoDataTemplate(v) { this._chatNoDataTemplate.set(v); }
10534
+ get chatNoDataTemplate() { return this._chatNoDataTemplate(); }
10535
+ set authorMessageContentTemplate(v) { this._authorMessageContentTemplate.set(v); }
10536
+ get authorMessageContentTemplate() { return this._authorMessageContentTemplate(); }
10537
+ set receiverMessageContentTemplate(v) { this._receiverMessageContentTemplate.set(v); }
10538
+ get receiverMessageContentTemplate() { return this._receiverMessageContentTemplate(); }
10539
+ set messageContentTemplate(v) { this._messageContentTemplate.set(v); }
10540
+ get messageContentTemplate() { return this._messageContentTemplate(); }
10541
+ set authorMessageTemplate(v) { this._authorMessageTemplate.set(v); }
10542
+ get authorMessageTemplate() { return this._authorMessageTemplate(); }
10543
+ set receiverMessageTemplate(v) { this._receiverMessageTemplate.set(v); }
10544
+ get receiverMessageTemplate() { return this._receiverMessageTemplate(); }
10545
+ set messageTemplate(v) { this._messageTemplate.set(v); }
10546
+ get messageTemplate() { return this._messageTemplate(); }
10547
+ set timestampTemplate(v) { this._timestampTemplate.set(v); }
10548
+ get timestampTemplate() { return this._timestampTemplate(); }
10549
+ set suggestionTemplate(v) { this._suggestionTemplate.set(v); }
10550
+ get suggestionTemplate() { return this._suggestionTemplate(); }
10551
+ set statusTemplate(v) { this._statusTemplate.set(v); }
10552
+ get statusTemplate() { return this._statusTemplate(); }
10553
+ set messageBoxTemplate(v) { this._messageBoxTemplate.set(v); }
10554
+ get messageBoxTemplate() { return this._messageBoxTemplate(); }
10555
+ set messageBoxStartAffixTemplate(v) { this._messageBoxStartAffixTemplate.set(v); }
10556
+ get messageBoxStartAffixTemplate() { return this._messageBoxStartAffixTemplate(); }
10557
+ set messageBoxEndAffixTemplate(v) { this._messageBoxEndAffixTemplate.set(v); }
10558
+ get messageBoxEndAffixTemplate() { return this._messageBoxEndAffixTemplate(); }
10559
+ set messageBoxTopAffixTemplate(v) { this._messageBoxTopAffixTemplate.set(v); }
10560
+ get messageBoxTopAffixTemplate() { return this._messageBoxTopAffixTemplate(); }
10561
+ set userStatusTemplate(v) { this._userStatusTemplate.set(v); }
10562
+ get userStatusTemplate() { return this._userStatusTemplate(); }
9421
10563
  messageBox;
9422
10564
  /**
9423
10565
  * @hidden
@@ -9431,12 +10573,13 @@ class ChatComponent {
9431
10573
  if (!this.messages || this.messages.length === 0) {
9432
10574
  return [];
9433
10575
  }
9434
- if (this._modelFields &&
9435
- Object.keys(this._modelFields).some((key) => this._modelFields[key] !== defaultModelFields[key])) {
9436
- if (this.messages !== this._lastMessagesReference || this._modelFields !== this._lastModelFields) {
9437
- this._cachedProcessedMessages = processMessages(this.messages, this._modelFields);
10576
+ const modelFields = this.modelFields;
10577
+ if (modelFields &&
10578
+ Object.keys(modelFields).some((key) => modelFields[key] !== defaultModelFields[key])) {
10579
+ if (this.messages !== this._lastMessagesReference || modelFields !== this._lastModelFields) {
10580
+ this._cachedProcessedMessages = processMessages(this.messages, modelFields);
9438
10581
  this._lastMessagesReference = this.messages;
9439
- this._lastModelFields = this._modelFields;
10582
+ this._lastModelFields = modelFields;
9440
10583
  }
9441
10584
  return this._cachedProcessedMessages;
9442
10585
  }
@@ -9539,9 +10682,89 @@ class ChatComponent {
9539
10682
  anchor;
9540
10683
  direction;
9541
10684
  subs = new Subscription();
9542
- _modelFields = defaultModelFields;
9543
- _messageContextMenuActions = CONTEXT_MENU_ACTIONS;
9544
- _fileActions = FILE_ACTIONS;
10685
+ syncChatServiceState = effect(() => {
10686
+ this.chatService.showAvatar = this.showAvatar;
10687
+ this.chatService.showUsername = this.showUsername;
10688
+ this.chatService.timestampVisibility = this.timestampVisibility;
10689
+ this.chatService.messageWidthMode = this.messageWidthMode;
10690
+ this.chatService.allowMessageCollapse = this.allowMessageCollapse;
10691
+ this.chatService.speechToTextButton = this.speechToTextButton;
10692
+ this.chatService.sendButton = this.sendButton;
10693
+ this.chatService.fileSelectButton = this.fileSelectButton;
10694
+ this.chatService.messageBoxSettings = this.messageBoxSettings;
10695
+ this.chatService.messageToolbarActions = this.messageToolbarActions;
10696
+ this.chatService.messageContextMenuActions = this.messageContextMenuActions;
10697
+ this.chatService.fileActions = this.fileActions;
10698
+ this.chatService.authorMessageSettings = this.authorMessageSettings;
10699
+ this.chatService.receiverMessageSettings = this.receiverMessageSettings;
10700
+ this.chatService.authorId = this.authorId;
10701
+ }, ...(ngDevMode ? [{ debugName: "syncChatServiceState" }] : []));
10702
+ syncRepliedToMessages = effect(() => {
10703
+ this.chatService.repliedToMessages = this.repliedToMessages || [];
10704
+ }, ...(ngDevMode ? [{ debugName: "syncRepliedToMessages" }] : []));
10705
+ syncHeight = effect(() => {
10706
+ if (isPresent(this.height)) {
10707
+ this.renderer.setStyle(this.element.nativeElement, 'height', `${processCssValue(this.height)}`);
10708
+ }
10709
+ }, ...(ngDevMode ? [{ debugName: "syncHeight" }] : []));
10710
+ syncWidth = effect(() => {
10711
+ if (isPresent(this.width)) {
10712
+ this.renderer.setStyle(this.element.nativeElement, 'width', `${processCssValue(this.width)}`);
10713
+ }
10714
+ }, ...(ngDevMode ? [{ debugName: "syncWidth" }] : []));
10715
+ _messages = signal(undefined, ...(ngDevMode ? [{ debugName: "_messages" }] : []));
10716
+ _authorId = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorId" }] : []));
10717
+ _messageBoxType = signal('textarea', ...(ngDevMode ? [{ debugName: "_messageBoxType" }] : []));
10718
+ _height = signal(undefined, ...(ngDevMode ? [{ debugName: "_height" }] : []));
10719
+ _width = signal(undefined, ...(ngDevMode ? [{ debugName: "_width" }] : []));
10720
+ _placeholder = signal(undefined, ...(ngDevMode ? [{ debugName: "_placeholder" }] : []));
10721
+ _messageWidthMode = signal('standard', ...(ngDevMode ? [{ debugName: "_messageWidthMode" }] : []));
10722
+ _timestampVisibility = signal('focus', ...(ngDevMode ? [{ debugName: "_timestampVisibility" }] : []));
10723
+ _showUsername = signal(true, ...(ngDevMode ? [{ debugName: "_showUsername" }] : []));
10724
+ _showAvatar = signal(true, ...(ngDevMode ? [{ debugName: "_showAvatar" }] : []));
10725
+ _allowMessageCollapse = signal(false, ...(ngDevMode ? [{ debugName: "_allowMessageCollapse" }] : []));
10726
+ _speechToTextButton = signal(true, ...(ngDevMode ? [{ debugName: "_speechToTextButton" }] : []));
10727
+ _fileSelectButton = signal(true, ...(ngDevMode ? [{ debugName: "_fileSelectButton" }] : []));
10728
+ _messageBoxSettings = signal(MESSAGE_BOX_SETTINGS, ...(ngDevMode ? [{ debugName: "_messageBoxSettings" }] : []));
10729
+ _messageToolbarActions = signal([], ...(ngDevMode ? [{ debugName: "_messageToolbarActions" }] : []));
10730
+ _inputValue = signal('', ...(ngDevMode ? [{ debugName: "_inputValue" }] : []));
10731
+ _authorMessageSettings = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorMessageSettings" }] : []));
10732
+ _receiverMessageSettings = signal(undefined, ...(ngDevMode ? [{ debugName: "_receiverMessageSettings" }] : []));
10733
+ _messageContextMenuActions = signal(CONTEXT_MENU_ACTIONS, ...(ngDevMode ? [{ debugName: "_messageContextMenuActions" }] : []));
10734
+ _fileActions = signal(FILE_ACTIONS, ...(ngDevMode ? [{ debugName: "_fileActions" }] : []));
10735
+ _messageFilesLayout = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageFilesLayout" }] : []));
10736
+ _suggestionsLayout = signal(undefined, ...(ngDevMode ? [{ debugName: "_suggestionsLayout" }] : []));
10737
+ _quickActionsLayout = signal(undefined, ...(ngDevMode ? [{ debugName: "_quickActionsLayout" }] : []));
10738
+ _suggestions = signal([], ...(ngDevMode ? [{ debugName: "_suggestions" }] : []));
10739
+ _sendButton = signal(true, ...(ngDevMode ? [{ debugName: "_sendButton" }] : []));
10740
+ _scrollMode = signal('scrollable', ...(ngDevMode ? [{ debugName: "_scrollMode" }] : []));
10741
+ _pageSize = signal(50, ...(ngDevMode ? [{ debugName: "_pageSize" }] : []));
10742
+ _autoScrollThreshold = signal('20%', ...(ngDevMode ? [{ debugName: "_autoScrollThreshold" }] : []));
10743
+ _total = signal(undefined, ...(ngDevMode ? [{ debugName: "_total" }] : []));
10744
+ _startIndex = signal(undefined, ...(ngDevMode ? [{ debugName: "_startIndex" }] : []));
10745
+ _endIndex = signal(undefined, ...(ngDevMode ? [{ debugName: "_endIndex" }] : []));
10746
+ _pinnedMessages = signal([], ...(ngDevMode ? [{ debugName: "_pinnedMessages" }] : []));
10747
+ _repliedToMessages = signal([], ...(ngDevMode ? [{ debugName: "_repliedToMessages" }] : []));
10748
+ _modelFields = signal(defaultModelFields, ...(ngDevMode ? [{ debugName: "_modelFields" }] : []));
10749
+ _scrollToBottomButton = signal(true, ...(ngDevMode ? [{ debugName: "_scrollToBottomButton" }] : []));
10750
+ _loading = signal(false, ...(ngDevMode ? [{ debugName: "_loading" }] : []));
10751
+ _attachmentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_attachmentTemplate" }] : []));
10752
+ _chatHeaderTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_chatHeaderTemplate" }] : []));
10753
+ _chatNoDataTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_chatNoDataTemplate" }] : []));
10754
+ _authorMessageContentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorMessageContentTemplate" }] : []));
10755
+ _receiverMessageContentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_receiverMessageContentTemplate" }] : []));
10756
+ _messageContentTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageContentTemplate" }] : []));
10757
+ _authorMessageTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_authorMessageTemplate" }] : []));
10758
+ _receiverMessageTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_receiverMessageTemplate" }] : []));
10759
+ _messageTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageTemplate" }] : []));
10760
+ _timestampTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_timestampTemplate" }] : []));
10761
+ _suggestionTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_suggestionTemplate" }] : []));
10762
+ _statusTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_statusTemplate" }] : []));
10763
+ _messageBoxTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxTemplate" }] : []));
10764
+ _messageBoxStartAffixTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxStartAffixTemplate" }] : []));
10765
+ _messageBoxEndAffixTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxEndAffixTemplate" }] : []));
10766
+ _messageBoxTopAffixTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_messageBoxTopAffixTemplate" }] : []));
10767
+ _userStatusTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_userStatusTemplate" }] : []));
9545
10768
  _cachedProcessedMessages = [];
9546
10769
  _lastMessagesReference = null;
9547
10770
  _lastModelFields = null;
@@ -9559,12 +10782,13 @@ class ChatComponent {
9559
10782
  _renderedMessagesEnd = -1;
9560
10783
  _pendingRemoteScrollToMessageId = null;
9561
10784
  _remoteScrollToBottom = false;
9562
- constructor(localization, zone, renderer, element, chatService) {
10785
+ constructor(localization, zone, renderer, element, chatService, injector) {
9563
10786
  this.localization = localization;
9564
10787
  this.zone = zone;
9565
10788
  this.renderer = renderer;
9566
10789
  this.element = element;
9567
10790
  this.chatService = chatService;
10791
+ this.injector = injector;
9568
10792
  const isValid = validatePackage(packageMetadata);
9569
10793
  this.licenseMessage = getLicenseMessage(packageMetadata);
9570
10794
  this.showLicenseWatermark = shouldShowValidationUI(isValid);
@@ -9646,9 +10870,6 @@ class ChatComponent {
9646
10870
  if (isChanged('pinnedMessages', changes, false)) {
9647
10871
  this.pinnedMessage = this.findLastPinnedMessage();
9648
10872
  }
9649
- if (isChanged('repliedToMessages', changes, false)) {
9650
- this.chatService.repliedToMessages = this.repliedToMessages || [];
9651
- }
9652
10873
  this.validateRemoteInputs();
9653
10874
  if (isChanged('scrollMode', changes, false)) {
9654
10875
  this.initEndlessScroll();
@@ -9661,32 +10882,6 @@ class ChatComponent {
9661
10882
  isChanged('total', changes, false))) {
9662
10883
  this.endlessState.syncFromInputs(this.startIndex, this.endIndex, this.total);
9663
10884
  }
9664
- if (isChanged('height', changes, false)) {
9665
- this.renderer.setStyle(this.element.nativeElement, 'height', `${processCssValue(this.height)}`);
9666
- }
9667
- if (isChanged('width', changes, false)) {
9668
- this.renderer.setStyle(this.element.nativeElement, 'width', `${processCssValue(this.width)}`);
9669
- }
9670
- if (isChanged('sendButtonSettings', changes, false)) {
9671
- this.chatService.sendButton = this.sendButtonSettings;
9672
- }
9673
- this.updateChatServiceProperties([
9674
- 'authorId',
9675
- 'messageWidthMode',
9676
- 'timestampVisibility',
9677
- 'showUsername',
9678
- 'showAvatar',
9679
- 'allowMessageCollapse',
9680
- 'speechToTextButton',
9681
- 'sendButton',
9682
- 'fileSelectButton',
9683
- 'messageBoxSettings',
9684
- 'messageToolbarActions',
9685
- 'messageContextMenuActions',
9686
- 'fileActions',
9687
- 'authorMessageSettings',
9688
- 'receiverMessageSettings',
9689
- ], changes);
9690
10885
  }
9691
10886
  /**
9692
10887
  * @hidden
@@ -9761,11 +10956,11 @@ class ChatComponent {
9761
10956
  this.anchor?.recordScrollHeight();
9762
10957
  this.anchor?.setAriaLive('off');
9763
10958
  this.loadMore.emit({ startIndex: range.start, endIndex: range.end });
9764
- this.subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
10959
+ afterNextRender(() => {
9765
10960
  this.anchor?.preserveScrollPosition();
9766
10961
  this.anchor?.setAriaLive('polite');
9767
10962
  this.endlessState.isLoading = false;
9768
- }));
10963
+ }, { injector: this.injector });
9769
10964
  }
9770
10965
  }
9771
10966
  /**
@@ -9789,9 +10984,9 @@ class ChatComponent {
9789
10984
  if (range) {
9790
10985
  this.endlessState.isLoading = true;
9791
10986
  this.loadMore.emit({ startIndex: range.start, endIndex: range.end });
9792
- this.subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
10987
+ afterNextRender(() => {
9793
10988
  this.endlessState.isLoading = false;
9794
- }));
10989
+ }, { injector: this.injector });
9795
10990
  }
9796
10991
  }
9797
10992
  /**
@@ -9810,11 +11005,11 @@ class ChatComponent {
9810
11005
  this.anchor?.lockForMessageScroll();
9811
11006
  const range = this.endlessState.jumpToEnd();
9812
11007
  this.loadMore.emit({ startIndex: range.start, endIndex: range.end });
9813
- this.subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
11008
+ afterNextRender(() => {
9814
11009
  this.anchor?.scrollToBottomWithSettle(() => {
9815
11010
  this.anchor?.unlockForMessageScroll();
9816
11011
  });
9817
- }));
11012
+ }, { injector: this.injector });
9818
11013
  }
9819
11014
  else {
9820
11015
  this.anchor?.scrollToBottom();
@@ -9845,10 +11040,10 @@ class ChatComponent {
9845
11040
  this.anchor?.lockForMessageScroll();
9846
11041
  const range = this.endlessState.jumpTo(targetIndex);
9847
11042
  this.loadMore.emit({ startIndex: range.start, endIndex: range.end });
9848
- this.subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
11043
+ afterNextRender(() => {
9849
11044
  this.chatService.scrollToMessage(messageId, 'auto');
9850
11045
  this.anchor?.unlockForMessageScroll();
9851
- }));
11046
+ }, { injector: this.injector });
9852
11047
  }
9853
11048
  }
9854
11049
  else {
@@ -9918,7 +11113,7 @@ class ChatComponent {
9918
11113
  if (!this._pendingScrollAction) {
9919
11114
  return;
9920
11115
  }
9921
- this.subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
11116
+ afterNextRender(() => {
9922
11117
  this.zone.run(() => {
9923
11118
  const action = this._pendingScrollAction;
9924
11119
  this._pendingScrollAction = null;
@@ -9941,7 +11136,7 @@ class ChatComponent {
9941
11136
  }
9942
11137
  }
9943
11138
  });
9944
- }));
11139
+ }, { injector: this.injector });
9945
11140
  }
9946
11141
  detectNewMessageScrollAction() {
9947
11142
  const messages = this.processedMessages;
@@ -10049,24 +11244,24 @@ class ChatComponent {
10049
11244
  if (this._remoteScrollToBottom) {
10050
11245
  this._remoteScrollToBottom = false;
10051
11246
  this._scrollHandledBeforePaint = true;
10052
- this.subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
11247
+ afterNextRender(() => {
10053
11248
  this.anchor?.scrollToBottomWithSettle();
10054
- }));
11249
+ }, { injector: this.injector });
10055
11250
  }
10056
11251
  else {
10057
11252
  this._scrollHandledBeforePaint = true;
10058
- this.subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
11253
+ afterNextRender(() => {
10059
11254
  this.anchor?.preserveScrollPosition();
10060
11255
  this.anchor?.setAriaLive('polite');
10061
- }));
11256
+ }, { injector: this.injector });
10062
11257
  }
10063
11258
  }
10064
11259
  else if (isInitialBatch && !this._pendingScrollAction) {
10065
11260
  this.autoScroll = true;
10066
- this.subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
11261
+ afterNextRender(() => {
10067
11262
  this.anchor?.scrollToBottom();
10068
11263
  this.anchor?.calculateMessageBoxSeparator();
10069
- }));
11264
+ }, { injector: this.injector });
10070
11265
  }
10071
11266
  else if (currentLength > 0 && !this._pendingScrollAction) {
10072
11267
  const lastMessage = this.processedMessages[currentLength - 1];
@@ -10100,18 +11295,11 @@ class ChatComponent {
10100
11295
  const messageId = this._pendingRemoteScrollToMessageId;
10101
11296
  this._pendingRemoteScrollToMessageId = null;
10102
11297
  this._scrollHandledBeforePaint = true;
10103
- this.subs.add(this.zone.onStable.pipe(take(1)).subscribe(() => {
11298
+ afterNextRender(() => {
10104
11299
  this.anchor?.lockForMessageScroll();
10105
11300
  this.chatService.scrollToMessage(messageId, 'auto');
10106
11301
  this.anchor?.unlockForMessageScroll();
10107
- }));
10108
- }
10109
- updateChatServiceProperties(propNames, changes) {
10110
- propNames.forEach(propName => {
10111
- if (isChanged(propName, changes, false)) {
10112
- this.chatService[propName] = this[propName];
10113
- }
10114
- });
11302
+ }, { injector: this.injector });
10115
11303
  }
10116
11304
  validateRemoteInputs() {
10117
11305
  if (!isDevMode()) {
@@ -10153,7 +11341,7 @@ class ChatComponent {
10153
11341
  return userAction;
10154
11342
  });
10155
11343
  }
10156
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ChatComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: ChatService }], target: i0.ɵɵFactoryTarget.Component });
11344
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ChatComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: ChatService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
10157
11345
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: ChatComponent, isStandalone: true, selector: "kendo-chat", inputs: { messages: "messages", authorId: "authorId", messageBoxType: "messageBoxType", height: "height", width: "width", placeholder: "placeholder", messageWidthMode: "messageWidthMode", timestampVisibility: "timestampVisibility", showUsername: "showUsername", showAvatar: "showAvatar", allowMessageCollapse: "allowMessageCollapse", speechToTextButton: "speechToTextButton", fileSelectButton: "fileSelectButton", messageBoxSettings: "messageBoxSettings", messageToolbarActions: "messageToolbarActions", inputValue: "inputValue", authorMessageSettings: "authorMessageSettings", receiverMessageSettings: "receiverMessageSettings", messageContextMenuActions: "messageContextMenuActions", fileActions: "fileActions", messageFilesLayout: "messageFilesLayout", suggestionsLayout: "suggestionsLayout", quickActionsLayout: "quickActionsLayout", suggestions: "suggestions", sendButton: "sendButton", sendButtonSettings: "sendButtonSettings", scrollMode: "scrollMode", pageSize: "pageSize", autoScrollThreshold: "autoScrollThreshold", total: "total", startIndex: "startIndex", endIndex: "endIndex", pinnedMessages: "pinnedMessages", repliedToMessages: "repliedToMessages", modelFields: "modelFields", scrollToBottomButton: "scrollToBottomButton", loading: "loading" }, outputs: { sendMessage: "sendMessage", resendMessage: "resendMessage", toolbarActionClick: "toolbarActionClick", contextMenuActionClick: "contextMenuActionClick", fileActionClick: "fileActionClick", download: "download", executeAction: "executeAction", suggestionExecute: "suggestionExecute", fileSelect: "fileSelect", fileRemove: "fileRemove", unpin: "unpin", inputValueChange: "inputValueChange", loadMore: "loadMore", referencedMessageClick: "referencedMessageClick" }, host: { properties: { "class": "this.className", "attr.dir": "this.dirAttr" } }, providers: [
10158
11346
  LocalizationService,
10159
11347
  ChatService,
@@ -10358,11 +11546,12 @@ class ChatComponent {
10358
11546
  @if (showLicenseWatermark) {
10359
11547
  <div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
10360
11548
  }
10361
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$3, selector: "[kendoChatLocalizedMessages]" }, { kind: "directive", type: ScrollAnchorDirective, selector: "[kendoChatScrollAnchor]", inputs: ["autoScroll", "autoScrollThreshold", "endlessMode", "rangeIsAtEnd"], outputs: ["autoScrollChange", "nearTop", "nearBottom"], exportAs: ["scrollAnchor"] }, { kind: "component", type: MessageListComponent, selector: "kendo-chat-message-list", inputs: ["messages", "attachmentTemplate", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "timestampTemplate", "statusTemplate", "userStatusTemplate", "localization", "authorId"], outputs: ["executeAction", "navigate", "resize"] }, { kind: "component", type: MessageBoxComponent, selector: "kendo-message-box", inputs: ["authorId", "autoScroll", "suggestions", "placeholder", "inputValue", "localization", "messageBoxTemplate", "messageBoxStartAffixTemplate", "messageBoxEndAffixTemplate", "messageBoxTopAffixTemplate", "suggestionTemplate", "loading"], outputs: ["sendMessage", "executeSuggestion", "fileSelect", "fileRemove"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { kind: "component", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: ["themeColor", "size", "rounded", "disabled", "align", "offset", "positionMode", "icon", "svgIcon", "iconClass", "buttonClass", "dialClass", "text", "dialItemAnimation", "tabIndex", "dialItems"], outputs: ["blur", "focus", "dialItemClick", "open", "close"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay], kendo-watermark-overlay", inputs: ["licenseMessage"] }] });
11549
+ `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$3, selector: "[kendoChatLocalizedMessages]" }, { kind: "directive", type: ScrollAnchorDirective, selector: "[kendoChatScrollAnchor]", inputs: ["autoScroll", "autoScrollThreshold", "endlessMode", "rangeIsAtEnd"], outputs: ["autoScrollChange", "nearTop", "nearBottom"], exportAs: ["scrollAnchor"] }, { kind: "component", type: MessageListComponent, selector: "kendo-chat-message-list", inputs: ["messages", "attachmentTemplate", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "timestampTemplate", "statusTemplate", "userStatusTemplate", "localization", "authorId"], outputs: ["executeAction", "navigate", "resize"] }, { kind: "component", type: MessageBoxComponent, selector: "kendo-message-box", inputs: ["authorId", "autoScroll", "suggestions", "placeholder", "inputValue", "localization", "messageBoxTemplate", "messageBoxStartAffixTemplate", "messageBoxEndAffixTemplate", "messageBoxTopAffixTemplate", "suggestionTemplate", "loading"], outputs: ["sendMessage", "executeSuggestion", "fileSelect", "fileRemove"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { kind: "component", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: ["themeColor", "size", "rounded", "disabled", "align", "offset", "positionMode", "icon", "svgIcon", "iconClass", "buttonClass", "dialClass", "text", "dialItemAnimation", "tabIndex", "dialItems"], outputs: ["blur", "focus", "dialItemClick", "open", "close"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay], kendo-watermark-overlay", inputs: ["licenseMessage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10362
11550
  }
10363
11551
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ChatComponent, decorators: [{
10364
11552
  type: Component,
10365
11553
  args: [{
11554
+ changeDetection: ChangeDetectionStrategy.OnPush,
10366
11555
  providers: [
10367
11556
  LocalizationService,
10368
11557
  ChatService,
@@ -10585,7 +11774,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
10585
11774
  WatermarkOverlayComponent,
10586
11775
  ],
10587
11776
  }]
10588
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: ChatService }], propDecorators: { messages: [{
11777
+ }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: ChatService }, { type: i0.Injector }], propDecorators: { messages: [{
10589
11778
  type: Input
10590
11779
  }], authorId: [{
10591
11780
  type: Input
@@ -10937,15 +12126,33 @@ class Messages extends ComponentMessages {
10937
12126
  /**
10938
12127
  * The title for the Commands button.
10939
12128
  */
10940
- commandsButtonTitle;
12129
+ set commandsButtonTitle(value) {
12130
+ this._commandsButtonTitle.set(value);
12131
+ }
12132
+ get commandsButtonTitle() {
12133
+ return this._commandsButtonTitle();
12134
+ }
10941
12135
  /**
10942
12136
  * The title for the Generate button.
10943
12137
  */
10944
- generateButtonTitle;
12138
+ set generateButtonTitle(value) {
12139
+ this._generateButtonTitle.set(value);
12140
+ }
12141
+ get generateButtonTitle() {
12142
+ return this._generateButtonTitle();
12143
+ }
10945
12144
  /**
10946
12145
  * The title for the Speech to Text button.
10947
12146
  */
10948
- speechToTextButtonTitle;
12147
+ set speechToTextButtonTitle(value) {
12148
+ this._speechToTextButtonTitle.set(value);
12149
+ }
12150
+ get speechToTextButtonTitle() {
12151
+ return this._speechToTextButtonTitle();
12152
+ }
12153
+ _commandsButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_commandsButtonTitle" }] : []));
12154
+ _generateButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_generateButtonTitle" }] : []));
12155
+ _speechToTextButtonTitle = signal(undefined, ...(ngDevMode ? [{ debugName: "_speechToTextButtonTitle" }] : []));
10949
12156
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
10950
12157
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.27", type: Messages, isStandalone: true, inputs: { commandsButtonTitle: "commandsButtonTitle", generateButtonTitle: "generateButtonTitle", speechToTextButtonTitle: "speechToTextButtonTitle" }, usesInheritance: true, ngImport: i0 });
10951
12158
  }
@@ -11051,7 +12258,7 @@ class InlineAIPromptContentComponent {
11051
12258
  localization;
11052
12259
  className = true;
11053
12260
  get dirAttr() {
11054
- return this.direction;
12261
+ return this._direction();
11055
12262
  }
11056
12263
  get maxHeightStyle() {
11057
12264
  return this.calculateMeasurement(this.maxHeight);
@@ -11059,30 +12266,80 @@ class InlineAIPromptContentComponent {
11059
12266
  get widthStyle() {
11060
12267
  return this.calculateMeasurement(this.width);
11061
12268
  }
11062
- popupElement;
11063
- promptValue = "";
11064
- placeholder;
11065
- promptOutput;
11066
- enableSpeechToText = true;
11067
- streaming = false;
11068
- width = 550;
11069
- maxHeight;
11070
- appendTo;
12269
+ set popupElement(value) {
12270
+ this._popupElement.set(value);
12271
+ }
12272
+ get popupElement() {
12273
+ return this._popupElement();
12274
+ }
12275
+ set promptValue(value) {
12276
+ this._promptValue.set(value ?? '');
12277
+ }
12278
+ get promptValue() {
12279
+ return this._promptValue();
12280
+ }
12281
+ set placeholder(value) {
12282
+ this._placeholder.set(value);
12283
+ }
12284
+ get placeholder() {
12285
+ return this._placeholder();
12286
+ }
12287
+ set promptOutput(value) {
12288
+ this._promptOutput.set(value);
12289
+ }
12290
+ get promptOutput() {
12291
+ return this._promptOutput();
12292
+ }
12293
+ set enableSpeechToText(value) {
12294
+ this._enableSpeechToText.set(value);
12295
+ }
12296
+ get enableSpeechToText() {
12297
+ return this._enableSpeechToText();
12298
+ }
12299
+ set streaming(value) {
12300
+ this._streaming.set(value);
12301
+ }
12302
+ get streaming() {
12303
+ return this._streaming();
12304
+ }
12305
+ set width(value) {
12306
+ this._width.set(value);
12307
+ }
12308
+ get width() {
12309
+ return this._width();
12310
+ }
12311
+ set maxHeight(value) {
12312
+ this._maxHeight.set(value);
12313
+ }
12314
+ get maxHeight() {
12315
+ return this._maxHeight();
12316
+ }
12317
+ set appendTo(value) {
12318
+ this._appendTo.set(value);
12319
+ }
12320
+ get appendTo() {
12321
+ return this._appendTo();
12322
+ }
11071
12323
  defaultOutputActions = defaultOutputActions;
11072
12324
  set outputActions(actions) {
11073
- this._outputActions = this.mergeWithDefaultActions(actions);
12325
+ this._outputActions.set(this.mergeWithDefaultActions(actions));
11074
12326
  }
11075
12327
  get outputActions() {
11076
- return this._outputActions;
12328
+ return this._outputActions();
11077
12329
  }
11078
12330
  set promptCommands(commands) {
11079
- this._promptCommands = commands || [];
12331
+ this._promptCommands.set(commands || []);
11080
12332
  this.commandMenuItems = this.transformCommands(commands || []);
11081
12333
  }
11082
12334
  get promptCommands() {
11083
- return this._promptCommands;
12335
+ return this._promptCommands();
12336
+ }
12337
+ set outputTemplate(value) {
12338
+ this._outputTemplate.set(value);
12339
+ }
12340
+ get outputTemplate() {
12341
+ return this._outputTemplate();
11084
12342
  }
11085
- outputTemplate;
11086
12343
  promptRequest = new EventEmitter();
11087
12344
  commandExecute = new EventEmitter();
11088
12345
  outputActionClick = new EventEmitter();
@@ -11109,14 +12366,30 @@ class InlineAIPromptContentComponent {
11109
12366
  }
11110
12367
  sendIcon = paperPlaneIcon;
11111
12368
  stopGenerationIcon = stopIcon;
11112
- isListening = false;
11113
12369
  commandMenuItems = [];
11114
12370
  messages = {};
11115
12371
  maxRows = TEXTAREA_MAX_ROWS;
11116
12372
  initialRows = TEXTAREA_INITIAL_ROWS;
11117
- _outputActions = this.defaultOutputActions;
11118
- _promptCommands = [];
11119
- direction;
12373
+ set isListening(value) {
12374
+ this._isListening.set(value);
12375
+ }
12376
+ get isListening() {
12377
+ return this._isListening();
12378
+ }
12379
+ _popupElement = signal(undefined, ...(ngDevMode ? [{ debugName: "_popupElement" }] : []));
12380
+ _promptValue = signal('', ...(ngDevMode ? [{ debugName: "_promptValue" }] : []));
12381
+ _placeholder = signal(undefined, ...(ngDevMode ? [{ debugName: "_placeholder" }] : []));
12382
+ _promptOutput = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptOutput" }] : []));
12383
+ _enableSpeechToText = signal(true, ...(ngDevMode ? [{ debugName: "_enableSpeechToText" }] : []));
12384
+ _streaming = signal(false, ...(ngDevMode ? [{ debugName: "_streaming" }] : []));
12385
+ _width = signal(550, ...(ngDevMode ? [{ debugName: "_width" }] : []));
12386
+ _maxHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "_maxHeight" }] : []));
12387
+ _appendTo = signal(undefined, ...(ngDevMode ? [{ debugName: "_appendTo" }] : []));
12388
+ _outputTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_outputTemplate" }] : []));
12389
+ _outputActions = signal(defaultOutputActions, ...(ngDevMode ? [{ debugName: "_outputActions" }] : []));
12390
+ _promptCommands = signal([], ...(ngDevMode ? [{ debugName: "_promptCommands" }] : []));
12391
+ _direction = signal('ltr', ...(ngDevMode ? [{ debugName: "_direction" }] : []));
12392
+ _isListening = signal(false, ...(ngDevMode ? [{ debugName: "_isListening" }] : []));
11120
12393
  localizationSubs = new Subscription();
11121
12394
  subs = new Subscription();
11122
12395
  constructor(ngZone, renderer, element, localization) {
@@ -11128,9 +12401,9 @@ class InlineAIPromptContentComponent {
11128
12401
  if (!this.localization) {
11129
12402
  this.localization = inject(LocalizationService);
11130
12403
  }
11131
- this.direction = this.localization?.rtl ? 'rtl' : 'ltr';
12404
+ this._direction.set(this.localization?.rtl ? 'rtl' : 'ltr');
11132
12405
  this.localizationSubs.add(this.localization.changes.subscribe(({ rtl }) => {
11133
- this.direction = rtl ? 'rtl' : 'ltr';
12406
+ this._direction.set(rtl ? 'rtl' : 'ltr');
11134
12407
  }));
11135
12408
  }
11136
12409
  ngAfterViewInit() {
@@ -11383,13 +12656,14 @@ class InlineAIPromptContentComponent {
11383
12656
  class="k-hidden"
11384
12657
  (select)="onCommandClick($event)">
11385
12658
  </kendo-contextmenu>
11386
- `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LocalizedMessagesDirective$1, selector: "[kendoInlineAIPromptLocalizedMessages]" }, { kind: "component", type: i2.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: i2.SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }, { kind: "component", type: i3.TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator", "value"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: i3.TextAreaPrefixComponent, selector: "kendo-textarea-prefix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaPrefix"] }, { kind: "component", type: i3.TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: i4.ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { kind: "component", type: i5.CardComponent, selector: "kendo-card", inputs: ["orientation", "width"] }, { kind: "component", type: i5.CardActionsComponent, selector: "kendo-card-actions", inputs: ["orientation", "layout", "actions"], outputs: ["action"] }, { kind: "component", type: i5.CardBodyComponent, selector: "kendo-card-body" }] });
12659
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LocalizedMessagesDirective$1, selector: "[kendoInlineAIPromptLocalizedMessages]" }, { kind: "component", type: i2.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: i2.SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }, { kind: "component", type: i3.TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator", "value"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: i3.TextAreaPrefixComponent, selector: "kendo-textarea-prefix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaPrefix"] }, { kind: "component", type: i3.TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: i4.ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { kind: "component", type: i5.CardComponent, selector: "kendo-card", inputs: ["orientation", "width"] }, { kind: "component", type: i5.CardActionsComponent, selector: "kendo-card-actions", inputs: ["orientation", "layout", "actions"], outputs: ["action"] }, { kind: "component", type: i5.CardBodyComponent, selector: "kendo-card-body" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11387
12660
  }
11388
12661
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: InlineAIPromptContentComponent, decorators: [{
11389
12662
  type: Component,
11390
12663
  args: [{
11391
- exportAs: 'kendoInlineAIPromptContent',
11392
12664
  selector: 'kendo-inlineaiprompt-content',
12665
+ exportAs: 'kendoInlineAIPromptContent',
12666
+ changeDetection: ChangeDetectionStrategy.OnPush,
11393
12667
  providers: [
11394
12668
  LocalizationService,
11395
12669
  {
@@ -11624,47 +12898,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
11624
12898
  * ```
11625
12899
  */
11626
12900
  class InlineAIPromptComponent {
11627
- ngZone;
12901
+ injector;
11628
12902
  element;
11629
12903
  /**
11630
12904
  * Sets the TextArea value.
11631
12905
  *
11632
12906
  * @default ""
11633
12907
  */
11634
- promptValue = "";
12908
+ set promptValue(value) {
12909
+ this._promptValue.set(value ?? '');
12910
+ }
12911
+ get promptValue() {
12912
+ return this._promptValue();
12913
+ }
11635
12914
  /**
11636
12915
  * Sets the placeholder text that appears in the text area when it is empty.
11637
12916
  */
11638
- placeholder;
12917
+ set placeholder(value) {
12918
+ this._placeholder.set(value);
12919
+ }
12920
+ get placeholder() {
12921
+ return this._placeholder();
12922
+ }
11639
12923
  /**
11640
12924
  * Sets the output data for the prompt.
11641
12925
  * The output displays as a card above the text area.
11642
12926
  */
11643
- promptOutput;
12927
+ set promptOutput(value) {
12928
+ this._promptOutput.set(value);
12929
+ }
12930
+ get promptOutput() {
12931
+ return this._promptOutput();
12932
+ }
11644
12933
  /**
11645
12934
  * Controls the visibility and settings of the Speech to Text button.
11646
12935
  *
11647
12936
  * @default true
11648
12937
  */
11649
- enableSpeechToText = true;
12938
+ set enableSpeechToText(value) {
12939
+ this._enableSpeechToText.set(value);
12940
+ }
12941
+ get enableSpeechToText() {
12942
+ return this._enableSpeechToText();
12943
+ }
11650
12944
  /**
11651
12945
  * When set to `true`, the **Send** button displays a generating state and the component emits a `promptRequestCancel` event when you click it.
11652
12946
  *
11653
12947
  * @default false
11654
12948
  */
11655
- streaming = false;
12949
+ set streaming(value) {
12950
+ this._streaming.set(value);
12951
+ }
12952
+ get streaming() {
12953
+ return this._streaming();
12954
+ }
11656
12955
  /**
11657
12956
  * Sets the width of the component.
11658
12957
  * Accepts a number for pixels or a string for other units.
11659
12958
  *
11660
12959
  * @default 550
11661
12960
  */
11662
- width = 550;
12961
+ set width(value) {
12962
+ this._width.set(value);
12963
+ }
12964
+ get width() {
12965
+ return this._width();
12966
+ }
11663
12967
  /**
11664
12968
  * Sets the maximum height of the component.
11665
12969
  * Accepts a number for pixels or a string for other units.
11666
12970
  */
11667
- maxHeight;
12971
+ set maxHeight(value) {
12972
+ this._maxHeight.set(value);
12973
+ }
12974
+ get maxHeight() {
12975
+ return this._maxHeight();
12976
+ }
11668
12977
  /**
11669
12978
  * Represents the configuration of the default output actions.
11670
12979
  * The default actions are `copy`, `retry`, and `discard`.
@@ -11677,20 +12986,30 @@ class InlineAIPromptComponent {
11677
12986
  *
11678
12987
  * @default [{ name: 'copy', type: 'button', icon: 'copy', svgIcon: copyIcon, text: 'Copy', fillMode: 'flat', themeColor: 'primary', rounded: 'medium'}, { name: 'retry', type: 'button', icon: 'arrow-rotate-cw', svgIcon: arrowRotateCwIcon, text: 'Retry', fillMode: 'flat', themeColor: 'primary', rounded: 'medium'}, { name: 'discard', type: 'button', icon: 'cancel', svgIcon: cancelIcon, text: 'Discard', fillMode: 'flat', themeColor: 'base', rounded: 'medium'}]
11679
12988
  */
11680
- outputActions = defaultOutputActions;
12989
+ set outputActions(value) {
12990
+ this._outputActions.set(value ?? defaultOutputActions);
12991
+ }
12992
+ get outputActions() {
12993
+ return this._outputActions();
12994
+ }
11681
12995
  /**
11682
12996
  * Sets the available prompt commands.
11683
12997
  */
11684
- promptCommands;
12998
+ set promptCommands(value) {
12999
+ this._promptCommands.set(value);
13000
+ }
13001
+ get promptCommands() {
13002
+ return this._promptCommands();
13003
+ }
11685
13004
  /**
11686
13005
  * Sets the Popup settings.
11687
13006
  *
11688
13007
  */
11689
13008
  set popupSettings(settings) {
11690
- this._popupSettings = { ...defaultPopupSettings, ...settings };
13009
+ this._popupSettings.set({ ...defaultPopupSettings, ...settings });
11691
13010
  }
11692
13011
  get popupSettings() {
11693
- return this._popupSettings;
13012
+ return this._popupSettings();
11694
13013
  }
11695
13014
  /**
11696
13015
  * Fires when the send button is clicked.
@@ -11724,10 +13043,19 @@ class InlineAIPromptComponent {
11724
13043
  * @hidden
11725
13044
  */
11726
13045
  calculateMeasurement = calculateMeasurement;
11727
- _popupSettings = defaultPopupSettings;
13046
+ _promptValue = signal('', ...(ngDevMode ? [{ debugName: "_promptValue" }] : []));
13047
+ _placeholder = signal(undefined, ...(ngDevMode ? [{ debugName: "_placeholder" }] : []));
13048
+ _promptOutput = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptOutput" }] : []));
13049
+ _enableSpeechToText = signal(true, ...(ngDevMode ? [{ debugName: "_enableSpeechToText" }] : []));
13050
+ _streaming = signal(false, ...(ngDevMode ? [{ debugName: "_streaming" }] : []));
13051
+ _width = signal(550, ...(ngDevMode ? [{ debugName: "_width" }] : []));
13052
+ _maxHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "_maxHeight" }] : []));
13053
+ _outputActions = signal(defaultOutputActions, ...(ngDevMode ? [{ debugName: "_outputActions" }] : []));
13054
+ _promptCommands = signal(undefined, ...(ngDevMode ? [{ debugName: "_promptCommands" }] : []));
13055
+ _popupSettings = signal(defaultPopupSettings, ...(ngDevMode ? [{ debugName: "_popupSettings" }] : []));
11728
13056
  subs = new Subscription();
11729
- constructor(ngZone, element) {
11730
- this.ngZone = ngZone;
13057
+ constructor(injector, element) {
13058
+ this.injector = injector;
11731
13059
  this.element = element;
11732
13060
  validatePackage(packageMetadata);
11733
13061
  }
@@ -11735,11 +13063,11 @@ class InlineAIPromptComponent {
11735
13063
  if (this.contentComponent && this.popupElement) {
11736
13064
  this.contentComponent.popupElement = this.popupElement;
11737
13065
  }
11738
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
13066
+ afterNextRender(() => {
11739
13067
  if (this.contentComponent && this.popupViewContainer) {
11740
13068
  this.contentComponent.appendTo = this.popupViewContainer;
11741
13069
  }
11742
- });
13070
+ }, { injector: this.injector });
11743
13071
  }
11744
13072
  ngOnDestroy() {
11745
13073
  this.subs.unsubscribe();
@@ -11788,7 +13116,7 @@ class InlineAIPromptComponent {
11788
13116
  onPromptValueChange(value) {
11789
13117
  this.promptValueChange.emit(value);
11790
13118
  }
11791
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: InlineAIPromptComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
13119
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: InlineAIPromptComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
11792
13120
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.27", type: InlineAIPromptComponent, isStandalone: true, selector: "kendo-inlineaiprompt", inputs: { promptValue: "promptValue", placeholder: "placeholder", promptOutput: "promptOutput", enableSpeechToText: "enableSpeechToText", streaming: "streaming", width: "width", maxHeight: "maxHeight", outputActions: "outputActions", promptCommands: "promptCommands", popupSettings: "popupSettings" }, outputs: { promptRequest: "promptRequest", commandExecute: "commandExecute", outputActionClick: "outputActionClick", promptRequestCancel: "promptRequestCancel", close: "close", promptValueChange: "promptValueChange" }, providers: [
11793
13121
  LocalizationService,
11794
13122
  {
@@ -11838,13 +13166,14 @@ class InlineAIPromptComponent {
11838
13166
  >
11839
13167
  </kendo-inlineaiprompt-content>
11840
13168
  </kendo-popup>
11841
- `, isInline: true, dependencies: [{ kind: "component", type: i1$2.PopupComponent, selector: "kendo-popup", inputs: ["animate", "anchor", "anchorAlign", "collision", "popupAlign", "copyAnchorStyles", "popupClass", "positionMode", "offset", "margin"], outputs: ["anchorViewportLeave", "close", "open", "positionChange"], exportAs: ["kendo-popup"] }, { kind: "component", type: InlineAIPromptContentComponent, selector: "kendo-inlineaiprompt-content", inputs: ["popupElement", "promptValue", "placeholder", "promptOutput", "enableSpeechToText", "streaming", "width", "maxHeight", "appendTo", "outputActions", "promptCommands", "outputTemplate"], outputs: ["promptRequest", "commandExecute", "outputActionClick", "promptRequestCancel", "close", "promptValueChange"], exportAs: ["kendoInlineAIPromptContent"] }, { kind: "directive", type: LocalizedMessagesDirective$1, selector: "[kendoInlineAIPromptLocalizedMessages]" }] });
13169
+ `, isInline: true, dependencies: [{ kind: "component", type: i1$2.PopupComponent, selector: "kendo-popup", inputs: ["animate", "anchor", "anchorAlign", "collision", "popupAlign", "copyAnchorStyles", "popupClass", "positionMode", "offset", "margin"], outputs: ["anchorViewportLeave", "close", "open", "positionChange"], exportAs: ["kendo-popup"] }, { kind: "component", type: InlineAIPromptContentComponent, selector: "kendo-inlineaiprompt-content", inputs: ["popupElement", "promptValue", "placeholder", "promptOutput", "enableSpeechToText", "streaming", "width", "maxHeight", "appendTo", "outputActions", "promptCommands", "outputTemplate"], outputs: ["promptRequest", "commandExecute", "outputActionClick", "promptRequestCancel", "close", "promptValueChange"], exportAs: ["kendoInlineAIPromptContent"] }, { kind: "directive", type: LocalizedMessagesDirective$1, selector: "[kendoInlineAIPromptLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11842
13170
  }
11843
13171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: InlineAIPromptComponent, decorators: [{
11844
13172
  type: Component,
11845
13173
  args: [{
11846
- exportAs: 'kendoInlineAIPrompt',
11847
13174
  selector: 'kendo-inlineaiprompt',
13175
+ exportAs: 'kendoInlineAIPrompt',
13176
+ changeDetection: ChangeDetectionStrategy.OnPush,
11848
13177
  providers: [
11849
13178
  LocalizationService,
11850
13179
  {
@@ -11899,7 +13228,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
11899
13228
  standalone: true,
11900
13229
  imports: [KENDO_POPUP, InlineAIPromptContentComponent, LocalizedMessagesDirective$1],
11901
13230
  }]
11902
- }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ElementRef }], propDecorators: { promptValue: [{
13231
+ }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ElementRef }], propDecorators: { promptValue: [{
11903
13232
  type: Input
11904
13233
  }], placeholder: [{
11905
13234
  type: Input