valtech-components 4.0.1042 → 4.0.1044

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.
@@ -70,7 +70,7 @@ import fixWebmDuration from 'fix-webm-duration';
70
70
  * Current version of valtech-components.
71
71
  * This is automatically updated during the publish process.
72
72
  */
73
- const VERSION = '4.0.1042';
73
+ const VERSION = '4.0.1044';
74
74
 
75
75
  function evaluateValtechAccess(rule, context, features = {}, visitedFeatures = new Set()) {
76
76
  if (rule == null)
@@ -23646,23 +23646,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
23646
23646
  * @input props: InputMetadata - Configuration for the select input (form control, label, options, etc.)
23647
23647
  */
23648
23648
  class SelectSearchComponent {
23649
- constructor() {
23650
- this.label = '';
23651
- this.labelProperty = 'name';
23652
- this.valueProperty = 'id';
23653
- this.multiple = false;
23654
- this.placeholder = '';
23655
- this.icon = inject(IconService);
23656
- this.changeDetector = inject(ChangeDetectorRef);
23657
- this.i18n = inject(I18nService);
23658
- this.modals = inject(ModalService);
23659
- this.searchTerm = '';
23660
- this.filteredItems = [];
23661
- this.selectedItems = [];
23662
- this.displayValue = '';
23663
- this.previousOptions = [];
23664
- this.isProcessingChanges = false;
23665
- }
23666
23649
  /**
23667
23650
  * Label visible sobre el selector (estilo val-form). Solo se muestra si viene
23668
23651
  * explícito por `props.label` o el input `label`; sin él, no se renderiza nada.
@@ -23690,6 +23673,24 @@ class SelectSearchComponent {
23690
23673
  getItemsSelectedText(count) {
23691
23674
  return `${count} ${this.i18n.t('itemsSelected')}`;
23692
23675
  }
23676
+ constructor() {
23677
+ this.label = '';
23678
+ this.labelProperty = 'name';
23679
+ this.valueProperty = 'id';
23680
+ this.multiple = false;
23681
+ this.placeholder = '';
23682
+ this.icon = inject(IconService);
23683
+ this.changeDetector = inject(ChangeDetectorRef);
23684
+ this.i18n = inject(I18nService);
23685
+ this.modals = inject(ModalService);
23686
+ this.searchTerm = '';
23687
+ this.filteredItems = [];
23688
+ this.selectedItems = [];
23689
+ this.displayValue = '';
23690
+ this.previousOptions = [];
23691
+ this.isProcessingChanges = false;
23692
+ addIcons({ chevronDownOutline });
23693
+ }
23693
23694
  ngOnInit() {
23694
23695
  this.applyDefaultValue();
23695
23696
  this.initializeItems();
@@ -23859,6 +23860,11 @@ class SelectSearchComponent {
23859
23860
  event.stopPropagation();
23860
23861
  void this.openPicker();
23861
23862
  }
23863
+ openPickerFromKeyboard(event) {
23864
+ event.preventDefault();
23865
+ event.stopPropagation();
23866
+ void this.openPicker();
23867
+ }
23862
23868
  updateDisplayValue() {
23863
23869
  if (this.props?.mode === 'legacy' && this.selectedItems.length === 0 && this.props?.control?.value) {
23864
23870
  this.displayValue = this.props.control.value.toString();
@@ -23912,33 +23918,43 @@ class SelectSearchComponent {
23912
23918
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SelectSearchComponent, isStandalone: true, selector: "val-select-search", inputs: { label: "label", labelProperty: "labelProperty", valueProperty: "valueProperty", multiple: "multiple", placeholder: "placeholder", props: "props" }, usesOnChanges: true, ngImport: i0, template: `
23913
23919
  <label *ngIf="displayLabel" class="vss-label">{{ displayLabel }}</label>
23914
23920
 
23915
- <ion-input
23916
- type="text"
23917
- [value]="displayValue"
23918
- [placeholder]="getPlaceholder()"
23919
- readonly
23921
+ <div
23922
+ class="vss-control"
23923
+ role="button"
23924
+ tabindex="0"
23925
+ [attr.aria-label]="getLabel()"
23920
23926
  (mousedown)="preventDefaultBehavior($event)"
23921
- />
23927
+ (keydown.enter)="openPickerFromKeyboard($event)"
23928
+ (keydown.space)="openPickerFromKeyboard($event)"
23929
+ >
23930
+ <ion-input type="text" [value]="displayValue" [placeholder]="getPlaceholder()" readonly />
23931
+ <ion-icon class="vss-indicator" name="chevron-down-outline" aria-hidden="true" />
23932
+ </div>
23922
23933
 
23923
23934
  <ion-input style="position: absolute;" [formControl]="props.control" type="hidden"></ion-input>
23924
- `, isInline: true, styles: [":host{display:block}.vss-label{display:block;margin-bottom:4px;font-size:.8125rem;color:var(--ion-color-dark, #43464d)}ion-header{padding:8px 8px 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: IonicModule }, { kind: "component", type: i2.IonInput, selector: "ion-input", inputs: ["autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearInputIcon", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "spellcheck", "step", "type", "value"] }, { kind: "directive", type: i2.TextValueAccessor, selector: "ion-input:not([type=number]),ion-input-otp[type=text],ion-textarea,ion-searchbar" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$8.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
23935
+ `, isInline: true, styles: [":host{display:block}.vss-label{display:block;margin-bottom:4px;font-size:.8125rem;color:var(--ion-color-dark, #43464d)}.vss-control{position:relative;display:block;cursor:pointer}.vss-control ion-input{--padding-end: 44px;cursor:pointer}.vss-control:focus-visible{outline:2px solid var(--ion-color-primary);outline-offset:3px;border-radius:999px}.vss-indicator{position:absolute;top:50%;right:16px;width:1.25rem;height:1.25rem;transform:translateY(-50%);color:var(--ion-color-medium, #92949c);pointer-events:none}ion-header{padding:8px 8px 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: IonicModule }, { kind: "component", type: i2.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2.IonInput, selector: "ion-input", inputs: ["autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearInputIcon", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "spellcheck", "step", "type", "value"] }, { kind: "directive", type: i2.TextValueAccessor, selector: "ion-input:not([type=number]),ion-input-otp[type=text],ion-textarea,ion-searchbar" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$8.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
23925
23936
  }
23926
23937
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectSearchComponent, decorators: [{
23927
23938
  type: Component,
23928
23939
  args: [{ selector: 'val-select-search', standalone: true, imports: [CommonModule, IonicModule, FormsModule, ReactiveFormsModule], template: `
23929
23940
  <label *ngIf="displayLabel" class="vss-label">{{ displayLabel }}</label>
23930
23941
 
23931
- <ion-input
23932
- type="text"
23933
- [value]="displayValue"
23934
- [placeholder]="getPlaceholder()"
23935
- readonly
23942
+ <div
23943
+ class="vss-control"
23944
+ role="button"
23945
+ tabindex="0"
23946
+ [attr.aria-label]="getLabel()"
23936
23947
  (mousedown)="preventDefaultBehavior($event)"
23937
- />
23948
+ (keydown.enter)="openPickerFromKeyboard($event)"
23949
+ (keydown.space)="openPickerFromKeyboard($event)"
23950
+ >
23951
+ <ion-input type="text" [value]="displayValue" [placeholder]="getPlaceholder()" readonly />
23952
+ <ion-icon class="vss-indicator" name="chevron-down-outline" aria-hidden="true" />
23953
+ </div>
23938
23954
 
23939
23955
  <ion-input style="position: absolute;" [formControl]="props.control" type="hidden"></ion-input>
23940
- `, styles: [":host{display:block}.vss-label{display:block;margin-bottom:4px;font-size:.8125rem;color:var(--ion-color-dark, #43464d)}ion-header{padding:8px 8px 0}\n"] }]
23941
- }], propDecorators: { label: [{
23956
+ `, styles: [":host{display:block}.vss-label{display:block;margin-bottom:4px;font-size:.8125rem;color:var(--ion-color-dark, #43464d)}.vss-control{position:relative;display:block;cursor:pointer}.vss-control ion-input{--padding-end: 44px;cursor:pointer}.vss-control:focus-visible{outline:2px solid var(--ion-color-primary);outline-offset:3px;border-radius:999px}.vss-indicator{position:absolute;top:50%;right:16px;width:1.25rem;height:1.25rem;transform:translateY(-50%);color:var(--ion-color-medium, #92949c);pointer-events:none}ion-header{padding:8px 8px 0}\n"] }]
23957
+ }], ctorParameters: () => [], propDecorators: { label: [{
23942
23958
  type: Input
23943
23959
  }], labelProperty: [{
23944
23960
  type: Input
@@ -94787,6 +94803,7 @@ class ChatWindowComponent {
94787
94803
  this.deleteMessage = output();
94788
94804
  this.replyTo = output();
94789
94805
  this.editMessage = output();
94806
+ this.copyMessage = output();
94790
94807
  this.typing = output();
94791
94808
  this.voice = output();
94792
94809
  this.msgsEl = viewChild('msgs');
@@ -94896,6 +94913,7 @@ class ChatWindowComponent {
94896
94913
  this.reactionClick.emit({ msgId: event.msgId, token: event.token ?? '👍' });
94897
94914
  break;
94898
94915
  case 'copy':
94916
+ this.copyMessage.emit(event.msgId);
94899
94917
  break;
94900
94918
  }
94901
94919
  }
@@ -94903,7 +94921,7 @@ class ChatWindowComponent {
94903
94921
  return this.i18n.t(key, 'ChatWindow');
94904
94922
  }
94905
94923
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
94906
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ChatWindowComponent, isStandalone: true, selector: "val-chat-window", inputs: { convId: { classPropertyName: "convId", publicName: "convId", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, currentUserId: { classPropertyName: "currentUserId", publicName: "currentUserId", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, typingUsers: { classPropertyName: "typingUsers", publicName: "typingUsers", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, canModerate: { classPropertyName: "canModerate", publicName: "canModerate", isSignal: true, isRequired: false, transformFunction: null }, showAttach: { classPropertyName: "showAttach", publicName: "showAttach", isSignal: true, isRequired: false, transformFunction: null }, showDictation: { classPropertyName: "showDictation", publicName: "showDictation", isSignal: true, isRequired: false, transformFunction: null }, showVoiceMessage: { classPropertyName: "showVoiceMessage", publicName: "showVoiceMessage", isSignal: true, isRequired: false, transformFunction: null }, showAvatars: { classPropertyName: "showAvatars", publicName: "showAvatars", isSignal: true, isRequired: false, transformFunction: null }, renderAiMessages: { classPropertyName: "renderAiMessages", publicName: "renderAiMessages", isSignal: true, isRequired: false, transformFunction: null }, showReactions: { classPropertyName: "showReactions", publicName: "showReactions", isSignal: true, isRequired: false, transformFunction: null }, showReplyAction: { classPropertyName: "showReplyAction", publicName: "showReplyAction", isSignal: true, isRequired: false, transformFunction: null }, showReactAction: { classPropertyName: "showReactAction", publicName: "showReactAction", isSignal: true, isRequired: false, transformFunction: null }, showEditAction: { classPropertyName: "showEditAction", publicName: "showEditAction", isSignal: true, isRequired: false, transformFunction: null }, showDeleteAction: { classPropertyName: "showDeleteAction", publicName: "showDeleteAction", isSignal: true, isRequired: false, transformFunction: null }, showCopyAction: { classPropertyName: "showCopyAction", publicName: "showCopyAction", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sendMessage: "sendMessage", loadMore: "loadMore", reactionClick: "reactionClick", deleteMessage: "deleteMessage", replyTo: "replyTo", editMessage: "editMessage", typing: "typing", voice: "voice" }, viewQueries: [{ propertyName: "msgsEl", first: true, predicate: ["msgs"], descendants: true, isSignal: true }], ngImport: i0, template: `
94924
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ChatWindowComponent, isStandalone: true, selector: "val-chat-window", inputs: { convId: { classPropertyName: "convId", publicName: "convId", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, currentUserId: { classPropertyName: "currentUserId", publicName: "currentUserId", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, typingUsers: { classPropertyName: "typingUsers", publicName: "typingUsers", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, canModerate: { classPropertyName: "canModerate", publicName: "canModerate", isSignal: true, isRequired: false, transformFunction: null }, showAttach: { classPropertyName: "showAttach", publicName: "showAttach", isSignal: true, isRequired: false, transformFunction: null }, showDictation: { classPropertyName: "showDictation", publicName: "showDictation", isSignal: true, isRequired: false, transformFunction: null }, showVoiceMessage: { classPropertyName: "showVoiceMessage", publicName: "showVoiceMessage", isSignal: true, isRequired: false, transformFunction: null }, showAvatars: { classPropertyName: "showAvatars", publicName: "showAvatars", isSignal: true, isRequired: false, transformFunction: null }, renderAiMessages: { classPropertyName: "renderAiMessages", publicName: "renderAiMessages", isSignal: true, isRequired: false, transformFunction: null }, showReactions: { classPropertyName: "showReactions", publicName: "showReactions", isSignal: true, isRequired: false, transformFunction: null }, showReplyAction: { classPropertyName: "showReplyAction", publicName: "showReplyAction", isSignal: true, isRequired: false, transformFunction: null }, showReactAction: { classPropertyName: "showReactAction", publicName: "showReactAction", isSignal: true, isRequired: false, transformFunction: null }, showEditAction: { classPropertyName: "showEditAction", publicName: "showEditAction", isSignal: true, isRequired: false, transformFunction: null }, showDeleteAction: { classPropertyName: "showDeleteAction", publicName: "showDeleteAction", isSignal: true, isRequired: false, transformFunction: null }, showCopyAction: { classPropertyName: "showCopyAction", publicName: "showCopyAction", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sendMessage: "sendMessage", loadMore: "loadMore", reactionClick: "reactionClick", deleteMessage: "deleteMessage", replyTo: "replyTo", editMessage: "editMessage", copyMessage: "copyMessage", typing: "typing", voice: "voice" }, viewQueries: [{ propertyName: "msgsEl", first: true, predicate: ["msgs"], descendants: true, isSignal: true }], ngImport: i0, template: `
94907
94925
  <div class="chat">
94908
94926
  <div #msgs class="messages" (scroll)="onScroll()">
94909
94927
  @if (isLoading()) {
@@ -95203,7 +95221,7 @@ class ThreadPanelComponent {
95203
95221
  </div>
95204
95222
  }
95205
95223
  </div>
95206
- `, isInline: true, styles: [".thread-panel{display:flex;flex-direction:column;height:100%;background:var(--ion-background-color, #f4f5f8)}.thread-header{padding:12px 16px;border-bottom:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));background:var(--ion-card-background, var(--ion-background-color, #fff))}.thread-header .thread-title{font-size:1rem;font-weight:600;color:var(--ion-text-color, #000);margin:0}.thread-loading{display:flex;align-items:center;justify-content:center;flex:1;gap:10px;color:var(--ion-color-dark, #92949c);font-size:.875rem}.thread-chat{flex:1;overflow:hidden;display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: ChatWindowComponent, selector: "val-chat-window", inputs: ["convId", "messages", "currentUserId", "isOpen", "typingUsers", "isLoading", "canModerate", "showAttach", "showDictation", "showVoiceMessage", "showAvatars", "renderAiMessages", "showReactions", "showReplyAction", "showReactAction", "showEditAction", "showDeleteAction", "showCopyAction"], outputs: ["sendMessage", "loadMore", "reactionClick", "deleteMessage", "replyTo", "editMessage", "typing", "voice"] }] }); }
95224
+ `, isInline: true, styles: [".thread-panel{display:flex;flex-direction:column;height:100%;background:var(--ion-background-color, #f4f5f8)}.thread-header{padding:12px 16px;border-bottom:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));background:var(--ion-card-background, var(--ion-background-color, #fff))}.thread-header .thread-title{font-size:1rem;font-weight:600;color:var(--ion-text-color, #000);margin:0}.thread-loading{display:flex;align-items:center;justify-content:center;flex:1;gap:10px;color:var(--ion-color-dark, #92949c);font-size:.875rem}.thread-chat{flex:1;overflow:hidden;display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: ChatWindowComponent, selector: "val-chat-window", inputs: ["convId", "messages", "currentUserId", "isOpen", "typingUsers", "isLoading", "canModerate", "showAttach", "showDictation", "showVoiceMessage", "showAvatars", "renderAiMessages", "showReactions", "showReplyAction", "showReactAction", "showEditAction", "showDeleteAction", "showCopyAction"], outputs: ["sendMessage", "loadMore", "reactionClick", "deleteMessage", "replyTo", "editMessage", "copyMessage", "typing", "voice"] }] }); }
95207
95225
  }
95208
95226
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ThreadPanelComponent, decorators: [{
95209
95227
  type: Component,