angular-matecu 4.2.4 → 4.2.6

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.
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Input, HostBinding, Component, NgModule, EventEmitter, ViewChild, Output, Inject, signal, computed, effect, forwardRef, ChangeDetectionStrategy } from '@angular/core';
2
+ import { Injectable, signal, input, effect, HostBinding, Component, NgModule, output, ViewChild, Inject, computed, Input, forwardRef, ChangeDetectionStrategy } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import { BehaviorSubject, Subject, fromEvent, startWith, combineLatest, map as map$1, tap as tap$1, debounceTime as debounceTime$1 } from 'rxjs';
5
+ import { BehaviorSubject, Subject, fromEvent, startWith, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, filter, tap as tap$1, takeUntil as takeUntil$1 } from 'rxjs';
6
6
  import { tap, takeUntil, map, debounceTime, distinctUntilChanged } from 'rxjs/operators';
7
7
  import * as i2$1 from '@angular/material/button';
8
8
  import { MatButtonModule } from '@angular/material/button';
@@ -23,7 +23,6 @@ import * as i5 from '@angular/material/progress-spinner';
23
23
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
24
24
  import * as i1$4 from '@angular/material/form-field';
25
25
  import { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';
26
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
27
26
  import * as i1$3 from '@angular/cdk/a11y';
28
27
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
29
28
  import { ScrollingModule } from '@angular/cdk/scrolling';
@@ -85,57 +84,51 @@ class MatecuSpinnerComponent {
85
84
  cdr;
86
85
  destroy$ = new Subject();
87
86
  hiddenClass = 'matecu-spinner--hidden';
88
- activeCache = false;
87
+ activeCache = signal(false, ...(ngDevMode ? [{ debugName: "activeCache" }] : []));
89
88
  className = 'matecu-spinner';
90
- color = '#2196F3';
91
- global = false;
92
- get active() {
93
- return this.activeCache;
89
+ color = input('#2196F3', ...(ngDevMode ? [{ debugName: "color" }] : []));
90
+ global = input(false, ...(ngDevMode ? [{ debugName: "global" }] : []));
91
+ active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
92
+ size = input('70px', ...(ngDevMode ? [{ debugName: "size" }] : []));
93
+ get isActive() {
94
+ return this.activeCache();
94
95
  }
95
- set active(value) {
96
- if (this.global) {
97
- return;
98
- }
99
- this.activeCache = value;
100
- this.className = value
101
- ? this.className.replace(` ${this.hiddenClass}`, '')
102
- : (this.className += ` ${this.hiddenClass}`);
103
- }
104
- size = '70px';
105
96
  constructor(spinnerService, cdr) {
106
97
  this.spinnerService = spinnerService;
107
98
  this.cdr = cdr;
99
+ effect(() => {
100
+ if (this.global()) {
101
+ return;
102
+ }
103
+ const value = this.active();
104
+ this.activeCache.set(value);
105
+ this.className = value
106
+ ? this.className.replace(` ${this.hiddenClass}`, '')
107
+ : (this.className += ` ${this.hiddenClass}`);
108
+ });
108
109
  }
109
110
  ngOnDestroy() {
110
111
  this.destroy$.next();
111
112
  this.destroy$.complete();
112
113
  }
113
114
  ngOnInit() {
114
- if (this.global) {
115
+ if (this.global()) {
115
116
  this.spinnerService
116
117
  .watch()
117
- .pipe(tap((value) => (this.activeCache = value)), tap(() => this.cdr.detectChanges()), takeUntil(this.destroy$))
118
+ .pipe(tap((value) => this.activeCache.set(value)), tap(() => this.cdr.detectChanges()), takeUntil(this.destroy$))
118
119
  .subscribe();
119
120
  }
120
121
  }
121
122
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuSpinnerComponent, deps: [{ token: MatecuSpinnerService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
122
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuSpinnerComponent, isStandalone: true, selector: "matecu-spinner", inputs: { color: "color", global: "global", active: "active", size: "size" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "@if(active){\n\n<svg xmlns:svg=\"http://www.w3.org/2000/svg\" [attr.width]=\"size\" [attr.height]=\"size\" xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.0\" viewBox=\"0 0 128 128\" xml:space=\"preserve\">\n <rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"transparent\" />\n <g>\n <path class=\"matecu-spinner__100\" d=\"M122.5 69.25H96.47a33.1 33.1 0 0 0 0-10.5h26.05a5.25 5.25 0 0 1 0 10.5z\"\n [attr.fill]=\"color\" fill-opacity=\"1\" />\n <path class=\"matecu-spinner__30\"\n d=\"M112.04 97.83L89.47 84.8a33.1 33.1 0 0 0 5.25-9.1l22.57 13.03a5.25 5.25 0 0 1-5.28 9.1z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M88.68 117.35L75.65 94.78a33.1 33.1 0 0 0 9.1-5.25l13.02 22.57a5.25 5.25 0 1 1-9.1 5.25z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M58.7 122.57V96.5a33.1 33.1 0 0 0 10.5 0v26.07a5.25 5.25 0 0 1-10.5 0z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M30.1 112.1l13.04-22.57a33.1 33.1 0 0 0 9.1 5.25L39.2 117.35a5.25 5.25 0 1 1-9.1-5.25z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M10.6 88.74L33.16 75.7a33.1 33.1 0 0 0 5.25 9.1L15.88 97.83a5.25 5.25 0 1 1-5.25-9.1z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__40\" d=\"M5.37 58.75h26.06a33.1 33.1 0 0 0 0 10.5H5.37a5.25 5.25 0 0 1 0-10.5z\"\n [attr.fill]=\"color\" fill-opacity=\"0.4\" />\n <path class=\"matecu-spinner__50\"\n d=\"M15.85 30.17L38.4 43.2a33.1 33.1 0 0 0-5.24 9.1L10.6 39.25a5.25 5.25 0 1 1 5.25-9.1z\" [attr.fill]=\"color\"\n fill-opacity=\"0.5\" />\n <path class=\"matecu-spinner__60\"\n d=\"M39.2 10.65l13.03 22.57a33.1 33.1 0 0 0-9.1 5.25l-13-22.57a5.25 5.25 0 1 1 9.1-5.25z\" [attr.fill]=\"color\"\n fill-opacity=\"0.6\" />\n <path class=\"matecu-spinner__70\" d=\"M69.2 5.43V31.5a33.1 33.1 0 0 0-10.5 0V5.42a5.25 5.25 0 1 1 10.5 0z\"\n [attr.fill]=\"color\" fill-opacity=\"0.7\" />\n <path class=\"matecu-spinner__80\"\n d=\"M97.77 15.9L84.75 38.47a33.1 33.1 0 0 0-9.1-5.25l13.03-22.57a5.25 5.25 0 1 1 9.1 5.25z\"\n [attr.fill]=\"color\" fill-opacity=\"0.8\" />\n <path class=\"matecu-spinner__90\"\n d=\"M117.3 39.26L94.7 52.3a33.1 33.1 0 0 0-5.25-9.1l22.57-13.03a5.25 5.25 0 0 1 5.25 9.1z\"\n [attr.fill]=\"color\" fill-opacity=\"0.9\" />\n <animateTransform attributeName=\"transform\" type=\"rotate\"\n values=\"0 64 64;30 64 64;60 64 64;90 64 64;120 64 64;150 64 64;180 64 64;210 64 64;240 64 64;270 64 64;300 64 64;330 64 64\"\n calcMode=\"discrete\" dur=\"600ms\" repeatCount=\"indefinite\"></animateTransform>\n </g>\n</svg>\n}", styles: [".matecu-spinner{display:flex;align-items:center;justify-content:center}.matecu-spinner>svg{width:80px;height:80px}.matecu-spinner__hidden{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
123
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuSpinnerComponent, isStandalone: true, selector: "matecu-spinner", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, global: { classPropertyName: "global", publicName: "global", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "@if(isActive){\n\n<svg xmlns:svg=\"http://www.w3.org/2000/svg\" [attr.width]=\"size()\" [attr.height]=\"size()\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.0\" viewBox=\"0 0 128 128\"\n xml:space=\"preserve\">\n <rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"transparent\" />\n <g>\n <path class=\"matecu-spinner__100\" d=\"M122.5 69.25H96.47a33.1 33.1 0 0 0 0-10.5h26.05a5.25 5.25 0 0 1 0 10.5z\"\n [attr.fill]=\"color()\" fill-opacity=\"1\" />\n <path class=\"matecu-spinner__30\"\n d=\"M112.04 97.83L89.47 84.8a33.1 33.1 0 0 0 5.25-9.1l22.57 13.03a5.25 5.25 0 0 1-5.28 9.1z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M88.68 117.35L75.65 94.78a33.1 33.1 0 0 0 9.1-5.25l13.02 22.57a5.25 5.25 0 1 1-9.1 5.25z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M58.7 122.57V96.5a33.1 33.1 0 0 0 10.5 0v26.07a5.25 5.25 0 0 1-10.5 0z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M30.1 112.1l13.04-22.57a33.1 33.1 0 0 0 9.1 5.25L39.2 117.35a5.25 5.25 0 1 1-9.1-5.25z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M10.6 88.74L33.16 75.7a33.1 33.1 0 0 0 5.25 9.1L15.88 97.83a5.25 5.25 0 1 1-5.25-9.1z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__40\" d=\"M5.37 58.75h26.06a33.1 33.1 0 0 0 0 10.5H5.37a5.25 5.25 0 0 1 0-10.5z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.4\" />\n <path class=\"matecu-spinner__50\"\n d=\"M15.85 30.17L38.4 43.2a33.1 33.1 0 0 0-5.24 9.1L10.6 39.25a5.25 5.25 0 1 1 5.25-9.1z\" [attr.fill]=\"color()\"\n fill-opacity=\"0.5\" />\n <path class=\"matecu-spinner__60\"\n d=\"M39.2 10.65l13.03 22.57a33.1 33.1 0 0 0-9.1 5.25l-13-22.57a5.25 5.25 0 1 1 9.1-5.25z\" [attr.fill]=\"color()\"\n fill-opacity=\"0.6\" />\n <path class=\"matecu-spinner__70\" d=\"M69.2 5.43V31.5a33.1 33.1 0 0 0-10.5 0V5.42a5.25 5.25 0 1 1 10.5 0z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.7\" />\n <path class=\"matecu-spinner__80\"\n d=\"M97.77 15.9L84.75 38.47a33.1 33.1 0 0 0-9.1-5.25l13.03-22.57a5.25 5.25 0 1 1 9.1 5.25z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.8\" />\n <path class=\"matecu-spinner__90\"\n d=\"M117.3 39.26L94.7 52.3a33.1 33.1 0 0 0-5.25-9.1l22.57-13.03a5.25 5.25 0 0 1 5.25 9.1z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.9\" />\n <animateTransform attributeName=\"transform\" type=\"rotate\"\n values=\"0 64 64;30 64 64;60 64 64;90 64 64;120 64 64;150 64 64;180 64 64;210 64 64;240 64 64;270 64 64;300 64 64;330 64 64\"\n calcMode=\"discrete\" dur=\"600ms\" repeatCount=\"indefinite\"></animateTransform>\n </g>\n</svg>\n}", styles: [".matecu-spinner{display:flex;align-items:center;justify-content:center}.matecu-spinner>svg{width:80px;height:80px}.matecu-spinner__hidden{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
123
124
  }
124
125
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuSpinnerComponent, decorators: [{
125
126
  type: Component,
126
- args: [{ selector: 'matecu-spinner', standalone: true, imports: [CommonModule], template: "@if(active){\n\n<svg xmlns:svg=\"http://www.w3.org/2000/svg\" [attr.width]=\"size\" [attr.height]=\"size\" xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.0\" viewBox=\"0 0 128 128\" xml:space=\"preserve\">\n <rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"transparent\" />\n <g>\n <path class=\"matecu-spinner__100\" d=\"M122.5 69.25H96.47a33.1 33.1 0 0 0 0-10.5h26.05a5.25 5.25 0 0 1 0 10.5z\"\n [attr.fill]=\"color\" fill-opacity=\"1\" />\n <path class=\"matecu-spinner__30\"\n d=\"M112.04 97.83L89.47 84.8a33.1 33.1 0 0 0 5.25-9.1l22.57 13.03a5.25 5.25 0 0 1-5.28 9.1z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M88.68 117.35L75.65 94.78a33.1 33.1 0 0 0 9.1-5.25l13.02 22.57a5.25 5.25 0 1 1-9.1 5.25z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M58.7 122.57V96.5a33.1 33.1 0 0 0 10.5 0v26.07a5.25 5.25 0 0 1-10.5 0z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M30.1 112.1l13.04-22.57a33.1 33.1 0 0 0 9.1 5.25L39.2 117.35a5.25 5.25 0 1 1-9.1-5.25z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M10.6 88.74L33.16 75.7a33.1 33.1 0 0 0 5.25 9.1L15.88 97.83a5.25 5.25 0 1 1-5.25-9.1z\"\n [attr.fill]=\"color\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__40\" d=\"M5.37 58.75h26.06a33.1 33.1 0 0 0 0 10.5H5.37a5.25 5.25 0 0 1 0-10.5z\"\n [attr.fill]=\"color\" fill-opacity=\"0.4\" />\n <path class=\"matecu-spinner__50\"\n d=\"M15.85 30.17L38.4 43.2a33.1 33.1 0 0 0-5.24 9.1L10.6 39.25a5.25 5.25 0 1 1 5.25-9.1z\" [attr.fill]=\"color\"\n fill-opacity=\"0.5\" />\n <path class=\"matecu-spinner__60\"\n d=\"M39.2 10.65l13.03 22.57a33.1 33.1 0 0 0-9.1 5.25l-13-22.57a5.25 5.25 0 1 1 9.1-5.25z\" [attr.fill]=\"color\"\n fill-opacity=\"0.6\" />\n <path class=\"matecu-spinner__70\" d=\"M69.2 5.43V31.5a33.1 33.1 0 0 0-10.5 0V5.42a5.25 5.25 0 1 1 10.5 0z\"\n [attr.fill]=\"color\" fill-opacity=\"0.7\" />\n <path class=\"matecu-spinner__80\"\n d=\"M97.77 15.9L84.75 38.47a33.1 33.1 0 0 0-9.1-5.25l13.03-22.57a5.25 5.25 0 1 1 9.1 5.25z\"\n [attr.fill]=\"color\" fill-opacity=\"0.8\" />\n <path class=\"matecu-spinner__90\"\n d=\"M117.3 39.26L94.7 52.3a33.1 33.1 0 0 0-5.25-9.1l22.57-13.03a5.25 5.25 0 0 1 5.25 9.1z\"\n [attr.fill]=\"color\" fill-opacity=\"0.9\" />\n <animateTransform attributeName=\"transform\" type=\"rotate\"\n values=\"0 64 64;30 64 64;60 64 64;90 64 64;120 64 64;150 64 64;180 64 64;210 64 64;240 64 64;270 64 64;300 64 64;330 64 64\"\n calcMode=\"discrete\" dur=\"600ms\" repeatCount=\"indefinite\"></animateTransform>\n </g>\n</svg>\n}", styles: [".matecu-spinner{display:flex;align-items:center;justify-content:center}.matecu-spinner>svg{width:80px;height:80px}.matecu-spinner__hidden{display:none}\n"] }]
127
+ args: [{ selector: 'matecu-spinner', standalone: true, imports: [CommonModule], template: "@if(isActive){\n\n<svg xmlns:svg=\"http://www.w3.org/2000/svg\" [attr.width]=\"size()\" [attr.height]=\"size()\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.0\" viewBox=\"0 0 128 128\"\n xml:space=\"preserve\">\n <rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"transparent\" />\n <g>\n <path class=\"matecu-spinner__100\" d=\"M122.5 69.25H96.47a33.1 33.1 0 0 0 0-10.5h26.05a5.25 5.25 0 0 1 0 10.5z\"\n [attr.fill]=\"color()\" fill-opacity=\"1\" />\n <path class=\"matecu-spinner__30\"\n d=\"M112.04 97.83L89.47 84.8a33.1 33.1 0 0 0 5.25-9.1l22.57 13.03a5.25 5.25 0 0 1-5.28 9.1z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M88.68 117.35L75.65 94.78a33.1 33.1 0 0 0 9.1-5.25l13.02 22.57a5.25 5.25 0 1 1-9.1 5.25z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\" d=\"M58.7 122.57V96.5a33.1 33.1 0 0 0 10.5 0v26.07a5.25 5.25 0 0 1-10.5 0z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M30.1 112.1l13.04-22.57a33.1 33.1 0 0 0 9.1 5.25L39.2 117.35a5.25 5.25 0 1 1-9.1-5.25z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__30\"\n d=\"M10.6 88.74L33.16 75.7a33.1 33.1 0 0 0 5.25 9.1L15.88 97.83a5.25 5.25 0 1 1-5.25-9.1z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.3\" />\n <path class=\"matecu-spinner__40\" d=\"M5.37 58.75h26.06a33.1 33.1 0 0 0 0 10.5H5.37a5.25 5.25 0 0 1 0-10.5z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.4\" />\n <path class=\"matecu-spinner__50\"\n d=\"M15.85 30.17L38.4 43.2a33.1 33.1 0 0 0-5.24 9.1L10.6 39.25a5.25 5.25 0 1 1 5.25-9.1z\" [attr.fill]=\"color()\"\n fill-opacity=\"0.5\" />\n <path class=\"matecu-spinner__60\"\n d=\"M39.2 10.65l13.03 22.57a33.1 33.1 0 0 0-9.1 5.25l-13-22.57a5.25 5.25 0 1 1 9.1-5.25z\" [attr.fill]=\"color()\"\n fill-opacity=\"0.6\" />\n <path class=\"matecu-spinner__70\" d=\"M69.2 5.43V31.5a33.1 33.1 0 0 0-10.5 0V5.42a5.25 5.25 0 1 1 10.5 0z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.7\" />\n <path class=\"matecu-spinner__80\"\n d=\"M97.77 15.9L84.75 38.47a33.1 33.1 0 0 0-9.1-5.25l13.03-22.57a5.25 5.25 0 1 1 9.1 5.25z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.8\" />\n <path class=\"matecu-spinner__90\"\n d=\"M117.3 39.26L94.7 52.3a33.1 33.1 0 0 0-5.25-9.1l22.57-13.03a5.25 5.25 0 0 1 5.25 9.1z\"\n [attr.fill]=\"color()\" fill-opacity=\"0.9\" />\n <animateTransform attributeName=\"transform\" type=\"rotate\"\n values=\"0 64 64;30 64 64;60 64 64;90 64 64;120 64 64;150 64 64;180 64 64;210 64 64;240 64 64;270 64 64;300 64 64;330 64 64\"\n calcMode=\"discrete\" dur=\"600ms\" repeatCount=\"indefinite\"></animateTransform>\n </g>\n</svg>\n}", styles: [".matecu-spinner{display:flex;align-items:center;justify-content:center}.matecu-spinner>svg{width:80px;height:80px}.matecu-spinner__hidden{display:none}\n"] }]
127
128
  }], ctorParameters: () => [{ type: MatecuSpinnerService }, { type: i0.ChangeDetectorRef }], propDecorators: { className: [{
128
129
  type: HostBinding,
129
130
  args: ['class']
130
- }], color: [{
131
- type: Input
132
- }], global: [{
133
- type: Input
134
- }], active: [{
135
- type: Input
136
- }], size: [{
137
- type: Input
138
- }] } });
131
+ }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], global: [{ type: i0.Input, args: [{ isSignal: true, alias: "global", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
139
132
 
140
133
  class MatecuSpinnerModule {
141
134
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -159,39 +152,36 @@ class MatecuTopbarLayoutComponent {
159
152
  elementRef;
160
153
  changeDetector;
161
154
  zone;
162
- _scrolled = false;
163
- _prominent = false;
155
+ _scrolled = signal(false, ...(ngDevMode ? [{ debugName: "_scrolled" }] : []));
164
156
  get scrolled() {
165
- return this._scrolled;
157
+ return this._scrolled();
166
158
  }
167
159
  set scrolled(value) {
168
- this._scrolled = value;
160
+ this._scrolled.set(value);
169
161
  this.className = this.className.replace(/scrolled/g, '').trim();
170
162
  if (this.scrolled) {
171
163
  this.className = `${this.className} scrolled`;
172
164
  }
173
165
  }
174
166
  destroy$ = new Subject();
175
- mobileStyle = false;
176
- mobileStyleChange = new EventEmitter();
177
- mobileWidth = 768;
178
- whenResize = new EventEmitter();
179
- get prominent() {
180
- return this._prominent;
181
- }
182
- set prominent(value) {
183
- this._prominent = value;
184
- this.className = this.className.replace(/prominent/g, '').trim();
185
- if (this.prominent) {
186
- this.className = `${this.className} prominent`;
187
- }
188
- }
167
+ mobileStyle = input(false, ...(ngDevMode ? [{ debugName: "mobileStyle" }] : []));
168
+ mobileStyleChange = output();
169
+ mobileWidth = input(768, ...(ngDevMode ? [{ debugName: "mobileWidth" }] : []));
170
+ whenResize = output();
171
+ prominent = input(false, ...(ngDevMode ? [{ debugName: "prominent" }] : []));
189
172
  className = 'matecu-topbar-layout';
190
173
  bodyElement;
191
174
  constructor(elementRef, changeDetector, zone) {
192
175
  this.elementRef = elementRef;
193
176
  this.changeDetector = changeDetector;
194
177
  this.zone = zone;
178
+ effect(() => {
179
+ const prominentValue = this.prominent();
180
+ this.className = this.className.replace(/prominent/g, '').trim();
181
+ if (prominentValue) {
182
+ this.className = `${this.className} prominent`;
183
+ }
184
+ });
195
185
  }
196
186
  ngOnDestroy() {
197
187
  this.destroy$.next();
@@ -216,9 +206,9 @@ class MatecuTopbarLayoutComponent {
216
206
  if (!width) {
217
207
  return;
218
208
  }
219
- this.mobileStyle = width <= this.mobileWidth;
209
+ const isMobileStyle = width <= this.mobileWidth();
220
210
  this.zone.run(() => {
221
- this.mobileStyleChange.emit(this.mobileStyle);
211
+ this.mobileStyleChange.emit(isMobileStyle);
222
212
  this.whenResize.emit(width);
223
213
  });
224
214
  });
@@ -240,22 +230,12 @@ class MatecuTopbarLayoutComponent {
240
230
  });
241
231
  }
242
232
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuTopbarLayoutComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
243
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: MatecuTopbarLayoutComponent, isStandalone: true, selector: "matecu-topbar-layout", inputs: { mobileStyle: "mobileStyle", mobileWidth: "mobileWidth", prominent: "prominent" }, outputs: { mobileStyleChange: "mobileStyleChange", whenResize: "whenResize" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "bodyElement", first: true, predicate: ["mtbBody"], descendants: true }], ngImport: i0, template: "<div class=\"matecu-topbar-layout__bar\">\n <ng-content select=\"matecu-topbar-header-row[first-row]\"></ng-content>\n <ng-content select=\"matecu-topbar-header-row[second-row]\"></ng-content>\n</div>\n<div class=\"matecu-topbar-layout__body\" #mtbBody>\n <ng-content select=\"matecu-topbar-body\"></ng-content>\n</div>\n", styles: [":host,.matecu-topbar-layout{position:relative;box-sizing:border-box}:host *,.matecu-topbar-layout *{box-sizing:border-box}:host,.matecu-topbar-layout{display:grid;grid-template-rows:auto 1fr;box-sizing:border-box;border:var(--mtb-border, none);margin:var(--mtb-margin, 0px);padding:0;width:var(--mtb-width, 100%);height:var(--mtb-height, 100vh);overflow:hidden}:host__bar,.matecu-topbar-layout__bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;background-color:var(--mtb-primary-color, #3f51b5);color:var(--mtb-bar-color, #fff);width:100%;padding:0;margin:0;min-height:var(--mtb-bar-height, 64px);transition:all .3s}:host__body,.matecu-topbar-layout__body{padding:0;margin:0;overflow-y:auto}:host.prominent .matecu-topbar-layout__bar,.matecu-topbar-layout.prominent .matecu-topbar-layout__bar{min-height:var(--mtb-bar-prominent-height, 128px)}:host.scrolled .matecu-topbar-layout__bar,.matecu-topbar-layout.scrolled .matecu-topbar-layout__bar{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;min-height:var(--mtb-bar-height, 64px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatToolbarModule }] });
233
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: MatecuTopbarLayoutComponent, isStandalone: true, selector: "matecu-topbar-layout", inputs: { mobileStyle: { classPropertyName: "mobileStyle", publicName: "mobileStyle", isSignal: true, isRequired: false, transformFunction: null }, mobileWidth: { classPropertyName: "mobileWidth", publicName: "mobileWidth", isSignal: true, isRequired: false, transformFunction: null }, prominent: { classPropertyName: "prominent", publicName: "prominent", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { mobileStyleChange: "mobileStyleChange", whenResize: "whenResize" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "bodyElement", first: true, predicate: ["mtbBody"], descendants: true }], ngImport: i0, template: "<div class=\"matecu-topbar-layout__bar\">\n <ng-content select=\"matecu-topbar-header-row[first-row]\"></ng-content>\n <ng-content select=\"matecu-topbar-header-row[second-row]\"></ng-content>\n</div>\n<div class=\"matecu-topbar-layout__body\" #mtbBody>\n <ng-content select=\"matecu-topbar-body\"></ng-content>\n</div>\n", styles: [":host,.matecu-topbar-layout{position:relative;box-sizing:border-box}:host *,.matecu-topbar-layout *{box-sizing:border-box}:host,.matecu-topbar-layout{display:grid;grid-template-rows:auto 1fr;box-sizing:border-box;border:var(--mtb-border, none);margin:var(--mtb-margin, 0px);padding:0;width:var(--mtb-width, 100%);height:var(--mtb-height, 100vh);overflow:hidden}:host__bar,.matecu-topbar-layout__bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;background-color:var(--mtb-primary-color, #3f51b5);color:var(--mtb-bar-color, #fff);width:100%;padding:0;margin:0;min-height:var(--mtb-bar-height, 64px);transition:all .3s}:host__body,.matecu-topbar-layout__body{padding:0;margin:0;overflow-y:auto}:host.prominent .matecu-topbar-layout__bar,.matecu-topbar-layout.prominent .matecu-topbar-layout__bar{min-height:var(--mtb-bar-prominent-height, 128px)}:host.scrolled .matecu-topbar-layout__bar,.matecu-topbar-layout.scrolled .matecu-topbar-layout__bar{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;min-height:var(--mtb-bar-height, 64px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatToolbarModule }] });
244
234
  }
245
235
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuTopbarLayoutComponent, decorators: [{
246
236
  type: Component,
247
237
  args: [{ selector: 'matecu-topbar-layout', standalone: true, imports: [CommonModule, MatButtonModule, MatIconModule, MatToolbarModule], template: "<div class=\"matecu-topbar-layout__bar\">\n <ng-content select=\"matecu-topbar-header-row[first-row]\"></ng-content>\n <ng-content select=\"matecu-topbar-header-row[second-row]\"></ng-content>\n</div>\n<div class=\"matecu-topbar-layout__body\" #mtbBody>\n <ng-content select=\"matecu-topbar-body\"></ng-content>\n</div>\n", styles: [":host,.matecu-topbar-layout{position:relative;box-sizing:border-box}:host *,.matecu-topbar-layout *{box-sizing:border-box}:host,.matecu-topbar-layout{display:grid;grid-template-rows:auto 1fr;box-sizing:border-box;border:var(--mtb-border, none);margin:var(--mtb-margin, 0px);padding:0;width:var(--mtb-width, 100%);height:var(--mtb-height, 100vh);overflow:hidden}:host__bar,.matecu-topbar-layout__bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;background-color:var(--mtb-primary-color, #3f51b5);color:var(--mtb-bar-color, #fff);width:100%;padding:0;margin:0;min-height:var(--mtb-bar-height, 64px);transition:all .3s}:host__body,.matecu-topbar-layout__body{padding:0;margin:0;overflow-y:auto}:host.prominent .matecu-topbar-layout__bar,.matecu-topbar-layout.prominent .matecu-topbar-layout__bar{min-height:var(--mtb-bar-prominent-height, 128px)}:host.scrolled .matecu-topbar-layout__bar,.matecu-topbar-layout.scrolled .matecu-topbar-layout__bar{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;min-height:var(--mtb-bar-height, 64px)}\n"] }]
248
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { mobileStyle: [{
249
- type: Input
250
- }], mobileStyleChange: [{
251
- type: Output
252
- }], mobileWidth: [{
253
- type: Input
254
- }], whenResize: [{
255
- type: Output
256
- }], prominent: [{
257
- type: Input
258
- }], className: [{
238
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { mobileStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileStyle", required: false }] }], mobileStyleChange: [{ type: i0.Output, args: ["mobileStyleChange"] }], mobileWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileWidth", required: false }] }], whenResize: [{ type: i0.Output, args: ["whenResize"] }], prominent: [{ type: i0.Input, args: [{ isSignal: true, alias: "prominent", required: false }] }], className: [{
259
239
  type: HostBinding,
260
240
  args: ['class']
261
241
  }], bodyElement: [{
@@ -292,34 +272,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
292
272
  }] } });
293
273
 
294
274
  class MatecuTopbarFabComponent {
295
- _mobileStyle = false;
296
275
  mainClassName = 'matecu-topbar-fab';
297
- display = true;
298
- get mobileStyle() {
299
- return this._mobileStyle;
300
- }
301
- set mobileStyle(value) {
302
- this._mobileStyle = value;
303
- this.className = this.className.replace(/mobile-style/g, '').trim();
304
- if (this._mobileStyle) {
305
- this.className = `${this.className} mobile-style`;
306
- }
307
- }
276
+ display = input(true, ...(ngDevMode ? [{ debugName: "display" }] : []));
277
+ mobileStyle = input(false, ...(ngDevMode ? [{ debugName: "mobileStyle" }] : []));
308
278
  className = this.mainClassName;
279
+ constructor() {
280
+ effect(() => {
281
+ this.className = this.className.replace(/mobile-style/g, '').trim();
282
+ if (this.mobileStyle()) {
283
+ this.className = `${this.className} mobile-style`;
284
+ }
285
+ });
286
+ }
309
287
  get color() {
310
- return this.display ? 'flex' : 'none';
288
+ return this.display() ? 'flex' : 'none';
311
289
  }
312
290
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuTopbarFabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
313
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuTopbarFabComponent, isStandalone: true, selector: "matecu-topbar-fab", inputs: { display: "display", mobileStyle: "mobileStyle" }, host: { properties: { "class": "this.className", "style.display": "this.color" } }, ngImport: i0, template: "@if(display){\n<ng-content></ng-content>\n}", styles: [":host,:host *,.matecu-topbar-fab,.matecu-topbar-fab *{box-sizing:border-box;outline:none}:host,.matecu-topbar-fab{display:flex;align-self:flex-end;align-items:flex-start;transform:translateY(50%);transition:all .3s ease-in-out}:host.mobile-style,.matecu-topbar-fab.mobile-style{position:absolute;transform:translate(0);bottom:var(--mtb-fab-mobile-bottom-position, 20px);right:var(--mtb-fab-mobile-right-position, 20px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }] });
291
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuTopbarFabComponent, isStandalone: true, selector: "matecu-topbar-fab", inputs: { display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, mobileStyle: { classPropertyName: "mobileStyle", publicName: "mobileStyle", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.className", "style.display": "this.color" } }, ngImport: i0, template: "@if(display()){\n<ng-content></ng-content>\n}", styles: [":host,:host *,.matecu-topbar-fab,.matecu-topbar-fab *{box-sizing:border-box;outline:none}:host,.matecu-topbar-fab{display:flex;align-self:flex-end;align-items:flex-start;transform:translateY(50%);transition:all .3s ease-in-out}:host.mobile-style,.matecu-topbar-fab.mobile-style{position:absolute;transform:translate(0);bottom:var(--mtb-fab-mobile-bottom-position, 20px);right:var(--mtb-fab-mobile-right-position, 20px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }] });
314
292
  }
315
293
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuTopbarFabComponent, decorators: [{
316
294
  type: Component,
317
- args: [{ selector: 'matecu-topbar-fab', standalone: true, imports: [CommonModule, MatButtonModule], template: "@if(display){\n<ng-content></ng-content>\n}", styles: [":host,:host *,.matecu-topbar-fab,.matecu-topbar-fab *{box-sizing:border-box;outline:none}:host,.matecu-topbar-fab{display:flex;align-self:flex-end;align-items:flex-start;transform:translateY(50%);transition:all .3s ease-in-out}:host.mobile-style,.matecu-topbar-fab.mobile-style{position:absolute;transform:translate(0);bottom:var(--mtb-fab-mobile-bottom-position, 20px);right:var(--mtb-fab-mobile-right-position, 20px)}\n"] }]
318
- }], propDecorators: { display: [{
319
- type: Input
320
- }], mobileStyle: [{
321
- type: Input
322
- }], className: [{
295
+ args: [{ selector: 'matecu-topbar-fab', standalone: true, imports: [CommonModule, MatButtonModule], template: "@if(display()){\n<ng-content></ng-content>\n}", styles: [":host,:host *,.matecu-topbar-fab,.matecu-topbar-fab *{box-sizing:border-box;outline:none}:host,.matecu-topbar-fab{display:flex;align-self:flex-end;align-items:flex-start;transform:translateY(50%);transition:all .3s ease-in-out}:host.mobile-style,.matecu-topbar-fab.mobile-style{position:absolute;transform:translate(0);bottom:var(--mtb-fab-mobile-bottom-position, 20px);right:var(--mtb-fab-mobile-right-position, 20px)}\n"] }]
296
+ }], ctorParameters: () => [], propDecorators: { display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], mobileStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileStyle", required: false }] }], className: [{
323
297
  type: HostBinding,
324
298
  args: ['class']
325
299
  }], color: [{
@@ -331,37 +305,33 @@ class MatecuTopbarSearchComponent {
331
305
  hasValue = false;
332
306
  activeMobileSearch = false;
333
307
  inputCtrl = new FormControl('');
334
- _value = '';
335
- _mobileStyle = false;
336
308
  destroy$ = new Subject();
337
- display = true;
338
- placeholder = '';
339
- delyValueChanges = 300; // valor en milisegundos
340
- get value() {
341
- return this._value;
342
- }
343
- set value(v) {
344
- this._value = v;
345
- this.inputCtrl.setValue(v);
346
- }
347
- get mobileStyle() {
348
- return this._mobileStyle;
349
- }
350
- set mobileStyle(value) {
351
- this._mobileStyle = value;
352
- this.className = this.className.replace(/mobile-style/g, '').trim();
353
- if (this._mobileStyle) {
354
- this.className = `${this.className} mobile-style`;
355
- }
356
- }
357
- valueChange = new EventEmitter();
309
+ display = input(true, ...(ngDevMode ? [{ debugName: "display" }] : []));
310
+ placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
311
+ delyValueChanges = input(300, ...(ngDevMode ? [{ debugName: "delyValueChanges" }] : [])); // valor en milisegundos
312
+ value = input('', ...(ngDevMode ? [{ debugName: "value" }] : []));
313
+ mobileStyle = input(false, ...(ngDevMode ? [{ debugName: "mobileStyle" }] : []));
314
+ valueChange = output();
358
315
  className = 'matecu-topbar-search';
316
+ constructor() {
317
+ effect(() => {
318
+ const valueInput = this.value();
319
+ this.inputCtrl.setValue(valueInput);
320
+ });
321
+ effect(() => {
322
+ const mobileStyleValue = this.mobileStyle();
323
+ this.className = this.className.replace(/mobile-style/g, '').trim();
324
+ if (mobileStyleValue) {
325
+ this.className = `${this.className} mobile-style`;
326
+ }
327
+ });
328
+ }
359
329
  get color() {
360
- return this.display ? 'flex' : 'none';
330
+ return this.display() ? 'flex' : 'none';
361
331
  }
362
332
  ngOnInit() {
363
333
  this.inputCtrl.valueChanges
364
- .pipe(map((value) => value ?? ''), tap(this.updateHasValueFn()), debounceTime(this.delyValueChanges), distinctUntilChanged(), tap((value) => this.valueChange.emit(value)), takeUntil(this.destroy$))
334
+ .pipe(map((value) => value ?? ''), tap(this.updateHasValueFn()), debounceTime(this.delyValueChanges()), distinctUntilChanged(), tap((value) => this.valueChange.emit(value)), takeUntil(this.destroy$))
365
335
  .subscribe();
366
336
  }
367
337
  toggleActiveMobildeSearch() {
@@ -377,30 +347,12 @@ class MatecuTopbarSearchComponent {
377
347
  };
378
348
  }
379
349
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuTopbarSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
380
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuTopbarSearchComponent, isStandalone: true, selector: "matecu-topbar-search", inputs: { display: "display", placeholder: "placeholder", delyValueChanges: "delyValueChanges", value: "value", mobileStyle: "mobileStyle" }, outputs: { valueChange: "valueChange" }, host: { properties: { "className": "this.className", "style.display": "this.color" } }, ngImport: i0, template: "@if(display){\n<button class=\"matecu-topbar-search-mobile-only\" [ngClass]=\"{ 'mobile-style': mobileStyle }\"\n (click)=\"toggleActiveMobildeSearch()\">\n <mat-icon>search</mat-icon>\n</button>\n<div class=\"matecu-topbar-search\" [ngClass]=\"{\n 'mobile-style': mobileStyle,\n 'active-mobile': activeMobileSearch\n }\">\n <span class=\"matecu-topbar-search__icon matecu-topbar-search__icon--search\">\n <mat-icon>search</mat-icon>\n </span>\n @if(hasValue || mobileStyle){\n <button class=\"matecu-topbar-search__icon matecu-topbar-search__icon--clear\" (click)=\"clearSearch()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n <input type=\"text\" [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" />\n</div>\n}", styles: [".matecu-topbar-search-mobile-only{display:none;border:none;background:none;cursor:pointer;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));margin:var(--mtb-search-margin, 10px)}.matecu-topbar-search-mobile-only.mobile-style{display:block}.matecu-topbar-search,.matecu-topbar-search *{box-sizing:border-box;outline:none}.matecu-topbar-search{margin:var(--mtb-search-margin, 10px);position:relative;display:flex;align-items:center;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));max-height:var(--bar-height, 64px)}.matecu-topbar-search input{width:var(--mtb-search-width, 200px);min-width:var(--mtb-search-width, 200px);height:var(--mtb-search-height, 40px);padding:var(--mtb-search-pading, 3px 35px);border-radius:4px;border:1px solid;border:var(--mtb-search-border, none);background-color:var(--search-background-color, rgba(255, 255, 255, .3019607843));color:currentColor;transition:all .3s ease-in-out}.matecu-topbar-search input::placeholder{color:var(--mtb-search-color, var(--mtb-bar-color, #fff));opacity:1}.matecu-topbar-search input:focus{min-width:var(--mtb-search-width-large, 290px)}.matecu-topbar-search__icon{position:absolute;top:50%;transform:translateY(-50%);padding:0}.matecu-topbar-search__icon--search{left:6px}.matecu-topbar-search__icon--clear{border:0px;background:0px;cursor:pointer;color:currentColor;right:6px}.mobile-style.matecu-topbar-search{position:absolute;top:0;left:0;right:0;border-bottom:1px solid;border-bottom-color:var(--mtb-search-border-bottom-color, #ededed);z-index:3;padding:0;margin:0;height:64px;color:var(--mtb-search-mobile-color, #000);transform:translateY(-120%);transition:all .3s ease-in-out}.mobile-style.matecu-topbar-search.active-mobile{transform:translateY(0)}.mobile-style.matecu-topbar-search input{background-color:#fff;height:100%;width:100%;border-radius:0}.mobile-style.matecu-topbar-search input::placeholder{color:var(--mtb-search-mobile-color, #000)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }] });
350
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuTopbarSearchComponent, isStandalone: true, selector: "matecu-topbar-search", inputs: { display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, delyValueChanges: { classPropertyName: "delyValueChanges", publicName: "delyValueChanges", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mobileStyle: { classPropertyName: "mobileStyle", publicName: "mobileStyle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "className": "this.className", "style.display": "this.color" } }, ngImport: i0, template: "@if(display()){\n<button class=\"matecu-topbar-search-mobile-only\" [ngClass]=\"{ 'mobile-style': mobileStyle() }\"\n (click)=\"toggleActiveMobildeSearch()\">\n <mat-icon>search</mat-icon>\n</button>\n<div class=\"matecu-topbar-search\" [ngClass]=\"{\n 'mobile-style': mobileStyle(),\n 'active-mobile': activeMobileSearch\n }\">\n <span class=\"matecu-topbar-search__icon matecu-topbar-search__icon--search\">\n <mat-icon>search</mat-icon>\n </span>\n @if(hasValue || mobileStyle()){\n <button class=\"matecu-topbar-search__icon matecu-topbar-search__icon--clear\" (click)=\"clearSearch()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n <input type=\"text\" [placeholder]=\"placeholder()\" [formControl]=\"inputCtrl\" />\n</div>\n}", styles: [".matecu-topbar-search-mobile-only{display:none;border:none;background:none;cursor:pointer;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));margin:var(--mtb-search-margin, 10px)}.matecu-topbar-search-mobile-only.mobile-style{display:block}.matecu-topbar-search,.matecu-topbar-search *{box-sizing:border-box;outline:none}.matecu-topbar-search{margin:var(--mtb-search-margin, 10px);position:relative;display:flex;align-items:center;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));max-height:var(--bar-height, 64px)}.matecu-topbar-search input{width:var(--mtb-search-width, 200px);min-width:var(--mtb-search-width, 200px);height:var(--mtb-search-height, 40px);padding:var(--mtb-search-pading, 3px 35px);border-radius:4px;border:1px solid;border:var(--mtb-search-border, none);background-color:var(--search-background-color, rgba(255, 255, 255, .3019607843));color:currentColor;transition:all .3s ease-in-out}.matecu-topbar-search input::placeholder{color:var(--mtb-search-color, var(--mtb-bar-color, #fff));opacity:1}.matecu-topbar-search input:focus{min-width:var(--mtb-search-width-large, 290px)}.matecu-topbar-search__icon{position:absolute;top:50%;transform:translateY(-50%);padding:0}.matecu-topbar-search__icon--search{left:6px}.matecu-topbar-search__icon--clear{border:0px;background:0px;cursor:pointer;color:currentColor;right:6px}.mobile-style.matecu-topbar-search{position:absolute;top:0;left:0;right:0;border-bottom:1px solid;border-bottom-color:var(--mtb-search-border-bottom-color, #ededed);z-index:3;padding:0;margin:0;height:64px;color:var(--mtb-search-mobile-color, #000);transform:translateY(-120%);transition:all .3s ease-in-out}.mobile-style.matecu-topbar-search.active-mobile{transform:translateY(0)}.mobile-style.matecu-topbar-search input{background-color:#fff;height:100%;width:100%;border-radius:0}.mobile-style.matecu-topbar-search input::placeholder{color:var(--mtb-search-mobile-color, #000)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }] });
381
351
  }
382
352
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuTopbarSearchComponent, decorators: [{
383
353
  type: Component,
384
- args: [{ selector: 'matecu-topbar-search', standalone: true, imports: [
385
- CommonModule,
386
- FormsModule,
387
- ReactiveFormsModule,
388
- MatIconModule,
389
- MatButtonModule,
390
- ], template: "@if(display){\n<button class=\"matecu-topbar-search-mobile-only\" [ngClass]=\"{ 'mobile-style': mobileStyle }\"\n (click)=\"toggleActiveMobildeSearch()\">\n <mat-icon>search</mat-icon>\n</button>\n<div class=\"matecu-topbar-search\" [ngClass]=\"{\n 'mobile-style': mobileStyle,\n 'active-mobile': activeMobileSearch\n }\">\n <span class=\"matecu-topbar-search__icon matecu-topbar-search__icon--search\">\n <mat-icon>search</mat-icon>\n </span>\n @if(hasValue || mobileStyle){\n <button class=\"matecu-topbar-search__icon matecu-topbar-search__icon--clear\" (click)=\"clearSearch()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n <input type=\"text\" [placeholder]=\"placeholder\" [formControl]=\"inputCtrl\" />\n</div>\n}", styles: [".matecu-topbar-search-mobile-only{display:none;border:none;background:none;cursor:pointer;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));margin:var(--mtb-search-margin, 10px)}.matecu-topbar-search-mobile-only.mobile-style{display:block}.matecu-topbar-search,.matecu-topbar-search *{box-sizing:border-box;outline:none}.matecu-topbar-search{margin:var(--mtb-search-margin, 10px);position:relative;display:flex;align-items:center;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));max-height:var(--bar-height, 64px)}.matecu-topbar-search input{width:var(--mtb-search-width, 200px);min-width:var(--mtb-search-width, 200px);height:var(--mtb-search-height, 40px);padding:var(--mtb-search-pading, 3px 35px);border-radius:4px;border:1px solid;border:var(--mtb-search-border, none);background-color:var(--search-background-color, rgba(255, 255, 255, .3019607843));color:currentColor;transition:all .3s ease-in-out}.matecu-topbar-search input::placeholder{color:var(--mtb-search-color, var(--mtb-bar-color, #fff));opacity:1}.matecu-topbar-search input:focus{min-width:var(--mtb-search-width-large, 290px)}.matecu-topbar-search__icon{position:absolute;top:50%;transform:translateY(-50%);padding:0}.matecu-topbar-search__icon--search{left:6px}.matecu-topbar-search__icon--clear{border:0px;background:0px;cursor:pointer;color:currentColor;right:6px}.mobile-style.matecu-topbar-search{position:absolute;top:0;left:0;right:0;border-bottom:1px solid;border-bottom-color:var(--mtb-search-border-bottom-color, #ededed);z-index:3;padding:0;margin:0;height:64px;color:var(--mtb-search-mobile-color, #000);transform:translateY(-120%);transition:all .3s ease-in-out}.mobile-style.matecu-topbar-search.active-mobile{transform:translateY(0)}.mobile-style.matecu-topbar-search input{background-color:#fff;height:100%;width:100%;border-radius:0}.mobile-style.matecu-topbar-search input::placeholder{color:var(--mtb-search-mobile-color, #000)}\n"] }]
391
- }], propDecorators: { display: [{
392
- type: Input
393
- }], placeholder: [{
394
- type: Input
395
- }], delyValueChanges: [{
396
- type: Input
397
- }], value: [{
398
- type: Input
399
- }], mobileStyle: [{
400
- type: Input
401
- }], valueChange: [{
402
- type: Output
403
- }], className: [{
354
+ args: [{ selector: 'matecu-topbar-search', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule, MatIconModule, MatButtonModule], template: "@if(display()){\n<button class=\"matecu-topbar-search-mobile-only\" [ngClass]=\"{ 'mobile-style': mobileStyle() }\"\n (click)=\"toggleActiveMobildeSearch()\">\n <mat-icon>search</mat-icon>\n</button>\n<div class=\"matecu-topbar-search\" [ngClass]=\"{\n 'mobile-style': mobileStyle(),\n 'active-mobile': activeMobileSearch\n }\">\n <span class=\"matecu-topbar-search__icon matecu-topbar-search__icon--search\">\n <mat-icon>search</mat-icon>\n </span>\n @if(hasValue || mobileStyle()){\n <button class=\"matecu-topbar-search__icon matecu-topbar-search__icon--clear\" (click)=\"clearSearch()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n <input type=\"text\" [placeholder]=\"placeholder()\" [formControl]=\"inputCtrl\" />\n</div>\n}", styles: [".matecu-topbar-search-mobile-only{display:none;border:none;background:none;cursor:pointer;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));margin:var(--mtb-search-margin, 10px)}.matecu-topbar-search-mobile-only.mobile-style{display:block}.matecu-topbar-search,.matecu-topbar-search *{box-sizing:border-box;outline:none}.matecu-topbar-search{margin:var(--mtb-search-margin, 10px);position:relative;display:flex;align-items:center;color:var(--mtb-search-color, var(--mtb-bar-color, #fff));max-height:var(--bar-height, 64px)}.matecu-topbar-search input{width:var(--mtb-search-width, 200px);min-width:var(--mtb-search-width, 200px);height:var(--mtb-search-height, 40px);padding:var(--mtb-search-pading, 3px 35px);border-radius:4px;border:1px solid;border:var(--mtb-search-border, none);background-color:var(--search-background-color, rgba(255, 255, 255, .3019607843));color:currentColor;transition:all .3s ease-in-out}.matecu-topbar-search input::placeholder{color:var(--mtb-search-color, var(--mtb-bar-color, #fff));opacity:1}.matecu-topbar-search input:focus{min-width:var(--mtb-search-width-large, 290px)}.matecu-topbar-search__icon{position:absolute;top:50%;transform:translateY(-50%);padding:0}.matecu-topbar-search__icon--search{left:6px}.matecu-topbar-search__icon--clear{border:0px;background:0px;cursor:pointer;color:currentColor;right:6px}.mobile-style.matecu-topbar-search{position:absolute;top:0;left:0;right:0;border-bottom:1px solid;border-bottom-color:var(--mtb-search-border-bottom-color, #ededed);z-index:3;padding:0;margin:0;height:64px;color:var(--mtb-search-mobile-color, #000);transform:translateY(-120%);transition:all .3s ease-in-out}.mobile-style.matecu-topbar-search.active-mobile{transform:translateY(0)}.mobile-style.matecu-topbar-search input{background-color:#fff;height:100%;width:100%;border-radius:0}.mobile-style.matecu-topbar-search input::placeholder{color:var(--mtb-search-mobile-color, #000)}\n"] }]
355
+ }], ctorParameters: () => [], propDecorators: { display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], delyValueChanges: [{ type: i0.Input, args: [{ isSignal: true, alias: "delyValueChanges", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], mobileStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileStyle", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], className: [{
404
356
  type: HostBinding
405
357
  }], color: [{
406
358
  type: HostBinding,
@@ -423,20 +375,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
423
375
  }] } });
424
376
 
425
377
  class MatecuTopbarHeaderRowComponent {
426
- display = true;
378
+ display = input(true, ...(ngDevMode ? [{ debugName: "display" }] : []));
427
379
  className = 'matecu-topbar-header-row';
428
380
  get color() {
429
- return this.display ? 'flex' : 'none';
381
+ return this.display() ? 'flex' : 'none';
430
382
  }
431
383
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuTopbarHeaderRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
432
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuTopbarHeaderRowComponent, isStandalone: true, selector: "matecu-topbar-header-row", inputs: { display: "display" }, host: { properties: { "class": "this.className", "style.display": "this.color" } }, ngImport: i0, template: "@if(display){\n<div class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--left\">\n <ng-content select=\"matecu-topbar-header-column[left-column]\"></ng-content>\n</div>\n\n<div class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--right\">\n <ng-content select=\"matecu-topbar-header-column[right-column]\"></ng-content>\n</div>\n}", styles: [":host{--mtb-row-padding: 0px;--mtb-row-margin: 0;--mtb-row-max-width: 100%;--mtb-row-min-width: 320px}:host,:host *,.matecu-topbar-header-row,.matecu-topbar-header-row *{box-sizing:border-box;outline:none}:host,.matecu-topbar-header-row{padding:var(--mtb-row-padding);margin:var(--mtb-row-margin);display:flex;align-items:flex-start;justify-content:flex-start;box-sizing:border-box;width:100%;height:100%;max-width:var(--mtb-row-max-width);min-width:var(--mtb-row-min-width)}:host__column,.matecu-topbar-header-row__column{display:flex;height:100%;min-height:var(--mtb-bar-height, 64px);align-items:flex-start}:host__column--right,.matecu-topbar-header-row__column--right{margin-left:auto;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatToolbarModule }] });
384
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuTopbarHeaderRowComponent, isStandalone: true, selector: "matecu-topbar-header-row", inputs: { display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.className", "style.display": "this.color" } }, ngImport: i0, template: "@if(display()){\n<div class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--left\">\n <ng-content select=\"matecu-topbar-header-column[left-column]\"></ng-content>\n</div>\n\n<div class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--right\">\n <ng-content select=\"matecu-topbar-header-column[right-column]\"></ng-content>\n</div>\n}", styles: [":host{--mtb-row-padding: 0px;--mtb-row-margin: 0;--mtb-row-max-width: 100%;--mtb-row-min-width: 320px}:host,:host *,.matecu-topbar-header-row,.matecu-topbar-header-row *{box-sizing:border-box;outline:none}:host,.matecu-topbar-header-row{padding:var(--mtb-row-padding);margin:var(--mtb-row-margin);display:flex;align-items:flex-start;justify-content:flex-start;box-sizing:border-box;width:100%;height:100%;max-width:var(--mtb-row-max-width);min-width:var(--mtb-row-min-width)}:host__column,.matecu-topbar-header-row__column{display:flex;height:100%;min-height:var(--mtb-bar-height, 64px);align-items:flex-start}:host__column--right,.matecu-topbar-header-row__column--right{margin-left:auto;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatToolbarModule }] });
433
385
  }
434
386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuTopbarHeaderRowComponent, decorators: [{
435
387
  type: Component,
436
- args: [{ selector: 'matecu-topbar-header-row', standalone: true, imports: [CommonModule, MatToolbarModule], template: "@if(display){\n<div class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--left\">\n <ng-content select=\"matecu-topbar-header-column[left-column]\"></ng-content>\n</div>\n\n<div class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--right\">\n <ng-content select=\"matecu-topbar-header-column[right-column]\"></ng-content>\n</div>\n}", styles: [":host{--mtb-row-padding: 0px;--mtb-row-margin: 0;--mtb-row-max-width: 100%;--mtb-row-min-width: 320px}:host,:host *,.matecu-topbar-header-row,.matecu-topbar-header-row *{box-sizing:border-box;outline:none}:host,.matecu-topbar-header-row{padding:var(--mtb-row-padding);margin:var(--mtb-row-margin);display:flex;align-items:flex-start;justify-content:flex-start;box-sizing:border-box;width:100%;height:100%;max-width:var(--mtb-row-max-width);min-width:var(--mtb-row-min-width)}:host__column,.matecu-topbar-header-row__column{display:flex;height:100%;min-height:var(--mtb-bar-height, 64px);align-items:flex-start}:host__column--right,.matecu-topbar-header-row__column--right{margin-left:auto;justify-content:flex-end}\n"] }]
437
- }], propDecorators: { display: [{
438
- type: Input
439
- }], className: [{
388
+ args: [{ selector: 'matecu-topbar-header-row', standalone: true, imports: [CommonModule, MatToolbarModule], template: "@if(display()){\n<div class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--left\">\n <ng-content select=\"matecu-topbar-header-column[left-column]\"></ng-content>\n</div>\n\n<div class=\"matecu-topbar-header-row__column matecu-topbar-header-row__column--right\">\n <ng-content select=\"matecu-topbar-header-column[right-column]\"></ng-content>\n</div>\n}", styles: [":host{--mtb-row-padding: 0px;--mtb-row-margin: 0;--mtb-row-max-width: 100%;--mtb-row-min-width: 320px}:host,:host *,.matecu-topbar-header-row,.matecu-topbar-header-row *{box-sizing:border-box;outline:none}:host,.matecu-topbar-header-row{padding:var(--mtb-row-padding);margin:var(--mtb-row-margin);display:flex;align-items:flex-start;justify-content:flex-start;box-sizing:border-box;width:100%;height:100%;max-width:var(--mtb-row-max-width);min-width:var(--mtb-row-min-width)}:host__column,.matecu-topbar-header-row__column{display:flex;height:100%;min-height:var(--mtb-bar-height, 64px);align-items:flex-start}:host__column--right,.matecu-topbar-header-row__column--right{margin-left:auto;justify-content:flex-end}\n"] }]
389
+ }], propDecorators: { display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], className: [{
440
390
  type: HostBinding,
441
391
  args: ['class']
442
392
  }], color: [{
@@ -531,33 +481,25 @@ var MatecuAlertBoxType;
531
481
 
532
482
  class MatecuAlertBoxComponent {
533
483
  classNameBase = 'matecu-alert-box';
534
- alertColor;
535
484
  iconValue;
536
- alertIcon = false;
537
- get color() {
538
- return this.alertColor;
539
- }
540
- set color(value) {
541
- this.alertColor = value;
542
- if (!!value) {
543
- this.className = `${this.classNameBase} ${this.classNameBase}--${value}`;
544
- }
545
- else {
546
- this.className = this.classNameBase;
547
- }
548
- this.updateIcon();
549
- }
550
- get icon() {
551
- return this.alertIcon;
552
- }
553
- set icon(value) {
554
- this.alertIcon = value;
555
- }
485
+ color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : []));
486
+ icon = input(false, ...(ngDevMode ? [{ debugName: "icon" }] : []));
556
487
  className = this.classNameBase;
557
- constructor() { }
488
+ constructor() {
489
+ effect(() => {
490
+ const colorValue = this.color();
491
+ if (!!colorValue) {
492
+ this.className = `${this.classNameBase} ${this.classNameBase}--${colorValue}`;
493
+ }
494
+ else {
495
+ this.className = this.classNameBase;
496
+ }
497
+ this.updateIcon(colorValue);
498
+ });
499
+ }
558
500
  ngOnInit() { }
559
- updateIcon() {
560
- switch (this.color) {
501
+ updateIcon(colorValue) {
502
+ switch (colorValue) {
561
503
  case MatecuAlertBoxType.danger:
562
504
  this.iconValue = 'dangerous';
563
505
  break;
@@ -576,16 +518,12 @@ class MatecuAlertBoxComponent {
576
518
  }
577
519
  }
578
520
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuAlertBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
579
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuAlertBoxComponent, isStandalone: true, selector: "matecu-alert-box", inputs: { color: "color", icon: "icon" }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "@if (icon && iconValue) {\n<div class=\"matecu-alert-box__icon\">\n <mat-icon>{{iconValue}}</mat-icon>\n</div>\n}\n<div class=\"matecu-alert-box__content\">\n <ng-content>\n\n\n </ng-content>\n</div>", styles: [":host.matecu-alert-box{display:flex;padding:1rem;border-radius:.25rem;position:relative;border:1px solid rgb(224,224,224);box-sizing:border-box;margin:1rem 0}:host.matecu-alert-box--success{color:#0f5032;background-color:#d2e6dc;border-color:#badccd}:host.matecu-alert-box--danger{color:#821e28;background-color:#f8d7da;border-color:#f5c2c7}:host.matecu-alert-box--warning{color:#644d03;background-color:#fff3cd;border-color:#ffecb4}:host.matecu-alert-box--info{color:#055160;background-color:#cff4fc;border-color:#b6effb}:host.matecu-alert-box .matecu-alert-box__icon{display:flex;margin-right:1rem}:host.matecu-alert-box .matecu-alert-box__content{align-self:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
521
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuAlertBoxComponent, isStandalone: true, selector: "matecu-alert-box", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.className" } }, ngImport: i0, template: "@if (icon() && iconValue) {\n<div class=\"matecu-alert-box__icon\">\n <mat-icon>{{iconValue}}</mat-icon>\n</div>\n}\n<div class=\"matecu-alert-box__content\">\n <ng-content>\n\n\n </ng-content>\n</div>", styles: [":host.matecu-alert-box{display:flex;padding:1rem;border-radius:.25rem;position:relative;border:1px solid rgb(224,224,224);box-sizing:border-box;margin:1rem 0}:host.matecu-alert-box--success{color:#0f5032;background-color:#d2e6dc;border-color:#badccd}:host.matecu-alert-box--danger{color:#821e28;background-color:#f8d7da;border-color:#f5c2c7}:host.matecu-alert-box--warning{color:#644d03;background-color:#fff3cd;border-color:#ffecb4}:host.matecu-alert-box--info{color:#055160;background-color:#cff4fc;border-color:#b6effb}:host.matecu-alert-box .matecu-alert-box__icon{display:flex;margin-right:1rem}:host.matecu-alert-box .matecu-alert-box__content{align-self:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
580
522
  }
581
523
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuAlertBoxComponent, decorators: [{
582
524
  type: Component,
583
- args: [{ selector: 'matecu-alert-box', standalone: true, imports: [CommonModule, MatIconModule], template: "@if (icon && iconValue) {\n<div class=\"matecu-alert-box__icon\">\n <mat-icon>{{iconValue}}</mat-icon>\n</div>\n}\n<div class=\"matecu-alert-box__content\">\n <ng-content>\n\n\n </ng-content>\n</div>", styles: [":host.matecu-alert-box{display:flex;padding:1rem;border-radius:.25rem;position:relative;border:1px solid rgb(224,224,224);box-sizing:border-box;margin:1rem 0}:host.matecu-alert-box--success{color:#0f5032;background-color:#d2e6dc;border-color:#badccd}:host.matecu-alert-box--danger{color:#821e28;background-color:#f8d7da;border-color:#f5c2c7}:host.matecu-alert-box--warning{color:#644d03;background-color:#fff3cd;border-color:#ffecb4}:host.matecu-alert-box--info{color:#055160;background-color:#cff4fc;border-color:#b6effb}:host.matecu-alert-box .matecu-alert-box__icon{display:flex;margin-right:1rem}:host.matecu-alert-box .matecu-alert-box__content{align-self:center}\n"] }]
584
- }], ctorParameters: () => [], propDecorators: { color: [{
585
- type: Input
586
- }], icon: [{
587
- type: Input
588
- }], className: [{
525
+ args: [{ selector: 'matecu-alert-box', standalone: true, imports: [CommonModule, MatIconModule], template: "@if (icon() && iconValue) {\n<div class=\"matecu-alert-box__icon\">\n <mat-icon>{{iconValue}}</mat-icon>\n</div>\n}\n<div class=\"matecu-alert-box__content\">\n <ng-content>\n\n\n </ng-content>\n</div>", styles: [":host.matecu-alert-box{display:flex;padding:1rem;border-radius:.25rem;position:relative;border:1px solid rgb(224,224,224);box-sizing:border-box;margin:1rem 0}:host.matecu-alert-box--success{color:#0f5032;background-color:#d2e6dc;border-color:#badccd}:host.matecu-alert-box--danger{color:#821e28;background-color:#f8d7da;border-color:#f5c2c7}:host.matecu-alert-box--warning{color:#644d03;background-color:#fff3cd;border-color:#ffecb4}:host.matecu-alert-box--info{color:#055160;background-color:#cff4fc;border-color:#b6effb}:host.matecu-alert-box .matecu-alert-box__icon{display:flex;margin-right:1rem}:host.matecu-alert-box .matecu-alert-box__content{align-self:center}\n"] }]
526
+ }], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], className: [{
589
527
  type: HostBinding,
590
528
  args: ['class']
591
529
  }] } });
@@ -754,38 +692,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
754
692
  }], ctorParameters: () => [{ type: i1$2.MatSnackBar }] });
755
693
 
756
694
  class MatecuAutocomplete {
757
- options = [];
758
- allowCreate = false;
759
- loading = false;
760
- readonly = false;
761
- filterFn = this.createFilterFn();
762
- searchChangeDebounceTime = 300;
763
- // MatFormFieldControl inputs
764
- get placeholder() {
765
- return this._placeholder;
695
+ static nextId = 0;
696
+ creatingFlag = false;
697
+ options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
698
+ allowCreate = input(false, ...(ngDevMode ? [{ debugName: "allowCreate" }] : []));
699
+ loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
700
+ filterFn = input(this.createFilterFn(), ...(ngDevMode ? [{ debugName: "filterFn" }] : []));
701
+ searchChangeDebounceTime = input(300, ...(ngDevMode ? [{ debugName: "searchChangeDebounceTime" }] : []));
702
+ ngControl = null;
703
+ focused = false;
704
+ lastSearchText = null;
705
+ inputControl = new FormControl(null);
706
+ filteredOptions = computed(() => {
707
+ const fieldValue = this.inputValueSignal() ?? '';
708
+ const options = this.filter(fieldValue);
709
+ return options;
710
+ }, ...(ngDevMode ? [{ debugName: "filteredOptions" }] : []));
711
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
712
+ _required = signal(false, ...(ngDevMode ? [{ debugName: "_required" }] : []));
713
+ _readonly = signal(false, ...(ngDevMode ? [{ debugName: "_readonly" }] : []));
714
+ _placeholder = signal('', ...(ngDevMode ? [{ debugName: "_placeholder" }] : []));
715
+ stateChanges = new Subject();
716
+ id = `matecu-autocomplete-${MatecuAutocomplete.nextId++}`;
717
+ controlType = 'matecu-autocomplete';
718
+ autofilled = false;
719
+ destroy$ = new Subject();
720
+ internalValue = null;
721
+ internalValueSignal = signal(null, ...(ngDevMode ? [{ debugName: "internalValueSignal" }] : []));
722
+ inputValueSignal = signal(null, ...(ngDevMode ? [{ debugName: "inputValueSignal" }] : []));
723
+ focusMonitor;
724
+ elementRef;
725
+ injector;
726
+ optionMap = new Map();
727
+ onChange = () => { };
728
+ onTouched = () => { };
729
+ get required() {
730
+ return this._required();
766
731
  }
767
- set placeholder(value) {
768
- this._placeholder = value;
732
+ set required(value) {
733
+ this._required.set(value);
769
734
  this.stateChanges.next();
770
735
  }
771
- _placeholder = '';
772
- get required() {
773
- return this._required;
736
+ get readonly() {
737
+ return this._readonly();
774
738
  }
775
- set required(value) {
776
- this._required = coerceBooleanProperty(value);
739
+ set readonly(value) {
740
+ this._readonly.set(value);
741
+ this.stateChanges.next();
742
+ }
743
+ get placeholder() {
744
+ return this._placeholder();
745
+ }
746
+ set placeholder(value) {
747
+ this._placeholder.set(value);
777
748
  this.stateChanges.next();
778
749
  }
779
- _required = false;
780
750
  get disabled() {
781
- return this._disabled;
751
+ return this._disabled();
782
752
  }
783
753
  set disabled(value) {
784
- this._disabled = coerceBooleanProperty(value);
785
- this.setDisabledState(this._disabled);
754
+ this._disabled.set(value);
755
+ this.setDisabledState(value);
786
756
  this.stateChanges.next();
787
757
  }
788
- _disabled = false;
789
758
  get value() {
790
759
  return this.internalValue;
791
760
  }
@@ -793,27 +762,9 @@ class MatecuAutocomplete {
793
762
  this.writeValue(value);
794
763
  this.stateChanges.next();
795
764
  }
796
- searchChange = new EventEmitter();
797
- create = new EventEmitter();
798
- valueChange = new EventEmitter();
799
- // MatFormFieldControl properties
800
- static nextId = 0;
801
- stateChanges = new Subject();
802
- id = `matecu-autocomplete-${MatecuAutocomplete.nextId++}`;
803
- ngControl = null;
804
- focused = false;
805
- lastSearchText = null;
806
- controlType = 'matecu-autocomplete';
807
- autofilled = false;
808
- inputControl = new FormControl(null);
809
- filteredOptions$;
810
- internalValue = null;
811
- focusMonitor;
812
- elementRef;
813
- injector;
814
- optionMap = new Map();
815
- onChange = () => { };
816
- onTouched = () => { };
765
+ searchChange = output();
766
+ create = output();
767
+ valueChange = output();
817
768
  get empty() {
818
769
  const isEmpty = this.inputControl.value === '' || !this.inputControl.value;
819
770
  return isEmpty;
@@ -825,18 +776,34 @@ class MatecuAutocomplete {
825
776
  get errorState() {
826
777
  return !!(this.ngControl && this.ngControl.invalid && this.ngControl.touched);
827
778
  }
828
- get showCreateOption() {
829
- const value = this.inputControl.value;
830
- return (this.allowCreate &&
779
+ showCreateOption = computed(() => {
780
+ // se obtienen primero los valores de los signals porque al usarlos directamente en el return no se obtienen los valores actualizados,
781
+ // probablemente porque el effect que actualiza esos signals no se ha ejecutado aún, entonces al obtenerlos antes se asegura que se tienen los valores más recientes para la comparación
782
+ const options = this.options();
783
+ const allowCreate = this.allowCreate();
784
+ const internalValue = this.internalValueSignal();
785
+ const value = this.inputValueSignal() ?? '';
786
+ const valueTrimmed = value.trim();
787
+ const show = allowCreate &&
831
788
  typeof value === 'string' &&
832
- value.trim() !== '' &&
833
- this.internalValue !== value &&
834
- this.options.some((option) => option[1].toLowerCase() === value.toLowerCase()) === false);
835
- }
789
+ valueTrimmed !== '' &&
790
+ internalValue !== valueTrimmed &&
791
+ options.some((option) => option[1].trim().toLowerCase() === valueTrimmed.toLowerCase()) ===
792
+ false;
793
+ return show;
794
+ }, ...(ngDevMode ? [{ debugName: "showCreateOption" }] : []));
836
795
  constructor(focusMonitor, elementRef, injector) {
837
796
  this.focusMonitor = focusMonitor;
838
797
  this.elementRef = elementRef;
839
798
  this.injector = injector;
799
+ // Inicializar el signal con el valor inicial del inputControl
800
+ this.inputValueSignal.set(this.inputControl.value);
801
+ effect(() => {
802
+ this.options();
803
+ this.rebuildOptionMap();
804
+ this.updateInputLabelFromValue();
805
+ this.stateChanges.next();
806
+ });
840
807
  }
841
808
  ngOnInit() {
842
809
  // Intentar obtener NgControl de forma segura
@@ -847,20 +814,15 @@ class MatecuAutocomplete {
847
814
  // Ignorar si no se puede obtener NgControl
848
815
  this.ngControl = null;
849
816
  }
850
- const value$ = this.inputControl.valueChanges.pipe(startWith(this.inputControl.value ?? ''));
851
- this.filteredOptions$ = combineLatest([value$]).pipe(map$1(([value]) => this.filter(value ?? '')));
852
817
  this.inputControl.valueChanges
853
- .pipe(
854
- // Almacena el último valor valido para la búsqueda esto se utiliza para enviar una emición para crear un elemento
855
- tap$1((value) => (this.lastSearchText = value ?? this.lastSearchText)),
856
- // CUando se escribe algo se limpian los valores seleccionados para que el usuario pueda seleccionar una opción o crear una nueva
857
- tap$1(() => this.clearValue()), debounceTime$1(this.searchChangeDebounceTime))
858
- .subscribe((value) => {
859
- queueMicrotask(() => {
860
- this.searchChange.emit(value ?? '');
861
- });
862
- });
863
- this.focusMonitor.monitor(this.elementRef, true).subscribe((focused) => {
818
+ .pipe(startWith(this.inputControl.value ?? ''), debounceTime$1(this.searchChangeDebounceTime()), distinctUntilChanged$1(),
819
+ // InternalValueSingal se actualiza solo al seleccionar una opción, no al escribir en el input, por lo que aquí se compara con el valor del input para evitar emitir searchChange cuando se selecciona una opción
820
+ filter((value) => this.internalValueSignal() !== value), tap$1((value) => (this.lastSearchText = value ?? this.lastSearchText)), tap$1((value) => this.inputValueSignal.set(value)), tap$1((value) => this.searchChange.emit(value ?? '')), tap$1(() => this.clearValue()), takeUntil$1(this.destroy$))
821
+ .subscribe();
822
+ this.focusMonitor
823
+ .monitor(this.elementRef, true)
824
+ .pipe(takeUntil$1(this.destroy$))
825
+ .subscribe((focused) => {
864
826
  if (!!focused !== this.focused) {
865
827
  this.focused = !!focused;
866
828
  this.stateChanges.next();
@@ -869,6 +831,8 @@ class MatecuAutocomplete {
869
831
  }
870
832
  ngOnDestroy() {
871
833
  this.stateChanges.complete();
834
+ this.destroy$.next();
835
+ this.destroy$.complete();
872
836
  this.focusMonitor.stopMonitoring(this.elementRef);
873
837
  }
874
838
  ngDoCheck() {
@@ -880,17 +844,12 @@ class MatecuAutocomplete {
880
844
  }
881
845
  }
882
846
  ngOnChanges(changes) {
883
- if (changes['options']) {
884
- this.rebuildOptionMap();
885
- this.updateInputLabelFromValue();
886
- this.stateChanges.next();
887
- }
888
- if (changes['placeholder'] || changes['required'] || changes['disabled']) {
847
+ if (changes['placeholder']) {
889
848
  this.stateChanges.next();
890
849
  }
891
850
  }
892
851
  filter(search) {
893
- return this.options.filter((option) => this.filterFn(option[1], search));
852
+ return this.options().filter((option) => this.filterFn()(option[1], search));
894
853
  }
895
854
  createFilterFn() {
896
855
  return (v1, v2) => {
@@ -900,16 +859,15 @@ class MatecuAutocomplete {
900
859
  displayLabel = (value) => {
901
860
  if (value === null || value === undefined)
902
861
  return '';
903
- if (!Array.isArray(this.options)) {
904
- return '';
905
- }
906
- return this.optionMap.get(value) ?? '';
862
+ const mapValue = this.optionMap.get(value) ?? (this.creatingFlag ? value : '');
863
+ return mapValue;
907
864
  };
908
865
  onOptionSelected(value) {
909
- if (!value || this.readonly || this.disabled) {
866
+ if (!value || this.readonly) {
910
867
  return;
911
868
  }
912
869
  this.internalValue = value;
870
+ this.internalValueSignal.set(value);
913
871
  this.inputControl.setValue(value, { emitEvent: false });
914
872
  this.onChange(value);
915
873
  this.onTouched();
@@ -918,10 +876,12 @@ class MatecuAutocomplete {
918
876
  onCreateClick() {
919
877
  if (!this.lastSearchText ||
920
878
  this.lastSearchText.trim() === '' ||
921
- this.options.some((option) => option[1].toLowerCase() === this.lastSearchText.toLowerCase()) ||
922
- this.options.some((option) => option[1].toLowerCase() === this.lastSearchText.toLowerCase())) {
879
+ this.options().some((option) => option[1].toLowerCase() === this.lastSearchText.toLowerCase())) {
923
880
  return;
924
881
  }
882
+ this.inputValueSignal.set(this.lastSearchText);
883
+ this.internalValue = this.lastSearchText;
884
+ this.creatingFlag = true;
925
885
  this.create.emit(this.lastSearchText);
926
886
  }
927
887
  updateInputLabelFromValue() {
@@ -933,6 +893,7 @@ class MatecuAutocomplete {
933
893
  // ControlValueAccessor
934
894
  writeValue(value) {
935
895
  this.internalValue = value;
896
+ this.internalValueSignal.set(value);
936
897
  this.updateInputLabelFromValue();
937
898
  this.stateChanges.next();
938
899
  }
@@ -943,8 +904,8 @@ class MatecuAutocomplete {
943
904
  this.onTouched = fn;
944
905
  }
945
906
  setDisabledState(isDisabled) {
946
- this._disabled = isDisabled;
947
907
  isDisabled ? this.inputControl.disable() : this.inputControl.enable();
908
+ this._disabled.set(isDisabled);
948
909
  this.stateChanges.next();
949
910
  }
950
911
  // MatFormFieldControl methods
@@ -962,18 +923,19 @@ class MatecuAutocomplete {
962
923
  }
963
924
  rebuildOptionMap() {
964
925
  this.optionMap.clear();
965
- for (const [value, label] of this.options ?? []) {
926
+ for (const [value, label] of this.options() ?? []) {
966
927
  this.optionMap.set(value, label);
967
928
  }
968
929
  }
969
930
  clearValue() {
970
931
  this.internalValue = null;
932
+ this.internalValueSignal.set(null);
971
933
  this.onChange(null);
972
934
  this.onTouched();
973
935
  this.valueChange.emit(null);
974
936
  }
975
937
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuAutocomplete, deps: [{ token: i1$3.FocusMonitor }, { token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
976
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuAutocomplete, isStandalone: true, selector: "matecu-autocomplete", inputs: { options: "options", allowCreate: "allowCreate", loading: "loading", readonly: "readonly", filterFn: "filterFn", searchChangeDebounceTime: "searchChangeDebounceTime", placeholder: "placeholder", required: "required", disabled: "disabled", value: "value" }, outputs: { searchChange: "searchChange", create: "create", valueChange: "valueChange" }, providers: [
938
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuAutocomplete, isStandalone: true, selector: "matecu-autocomplete", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, allowCreate: { classPropertyName: "allowCreate", publicName: "allowCreate", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, filterFn: { classPropertyName: "filterFn", publicName: "filterFn", isSignal: true, isRequired: false, transformFunction: null }, searchChangeDebounceTime: { classPropertyName: "searchChangeDebounceTime", publicName: "searchChangeDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { searchChange: "searchChange", create: "create", valueChange: "valueChange" }, providers: [
977
939
  {
978
940
  provide: NG_VALUE_ACCESSOR,
979
941
  useExisting: MatecuAutocomplete,
@@ -983,7 +945,7 @@ class MatecuAutocomplete {
983
945
  provide: MatFormFieldControl,
984
946
  useExisting: MatecuAutocomplete,
985
947
  },
986
- ], usesOnChanges: true, ngImport: i0, template: "<input matInput type=\"text\" matInput [formControl]=\"inputControl\" [matAutocomplete]=\"auto\" [class.loading]=\"loading\"\n [readonly]=\"readonly\" />\n\n\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onOptionSelected($event.option.value)\"\n [displayWith]=\"displayLabel\">\n\n @for (option of filteredOptions$ | async; track $index) {\n\n <mat-option [value]=\"option[0]\">\n {{ option[1] }}\n </mat-option>\n\n }\n\n <!-- Crear nuevo -->\n @if(allowCreate){\n\n <mat-divider></mat-divider>\n\n @if(showCreateOption ){\n <mat-option (click)=\"onCreateClick()\" class=\"create-option\">\n <span>\u2795</span><span>\" {{ inputControl.value }}\"</span>\n\n </mat-option>\n }\n }\n\n</mat-autocomplete>\n\n<!-- Spinner -->\n@if(loading){\n<mat-progress-spinner class=\"loading-spinner\" diameter=\"20\" mode=\"indeterminate\"\n style=\"position:absolute; right:10px; top:50%; transform:translateY(-50%);\">\n</mat-progress-spinner>\n}", styles: ["@charset \"UTF-8\";:host{display:block;position:relative;box-sizing:border-box;width:100%}:host input{border:none;background-color:transparent;outline:none}:host .create-option{display:flex;justify-content:space-between;align-items:center}:host .create-option:first-child{margin-right:auto;color:green}.loading-spinner{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none}input.loading{padding-right:40px}.create-option{font-style:italic;opacity:.85}::ng-deep .mat-mdc-option.create-option:hover{background:#0000000a}::ng-deep .mat-mdc-autocomplete-panel mat-divider{margin:4px 0}:host(.mat-mdc-input-disabled){opacity:.6;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i3$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
948
+ ], usesOnChanges: true, ngImport: i0, template: "<input matInput type=\"text\" matInput [formControl]=\"inputControl\" [matAutocomplete]=\"auto\" [class.loading]=\"loading()\"\n [readonly]=\"readonly\" />\n\n\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onOptionSelected($event.option.value)\"\n [displayWith]=\"displayLabel\">\n\n @for (option of filteredOptions(); track $index) {\n\n <mat-option [value]=\"option[0]\">\n {{ option[1] }}\n </mat-option>\n\n }\n\n <!-- Crear nuevo -->\n @if(allowCreate()){\n\n <mat-divider></mat-divider>\n\n @if(showCreateOption() ){\n <mat-option (click)=\"onCreateClick()\" class=\"create-option\" [value]=\"inputControl.value\">\n <span>\u2795</span><span>\" {{ inputControl.value }}\"</span>\n\n </mat-option>\n }\n }\n\n</mat-autocomplete>\n\n<!-- Spinner -->\n@if(loading()){\n<mat-progress-spinner class=\"loading-spinner\" diameter=\"20\" mode=\"indeterminate\"\n style=\"position:absolute; right:10px; top:50%; transform:translateY(-50%);\">\n</mat-progress-spinner>\n}", styles: ["@charset \"UTF-8\";:host{display:block;position:relative;box-sizing:border-box;width:100%}:host input{border:none;background-color:transparent;outline:none}:host .create-option{display:flex;justify-content:space-between;align-items:center}:host .create-option:first-child{margin-right:auto;color:green}.loading-spinner{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none}input.loading{padding-right:40px}.create-option{font-style:italic;opacity:.85}::ng-deep .mat-mdc-option.create-option:hover{background:#0000000a}::ng-deep .mat-mdc-autocomplete-panel mat-divider{margin:4px 0}:host(.mat-mdc-input-disabled){opacity:.6;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i3$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
987
949
  }
988
950
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuAutocomplete, decorators: [{
989
951
  type: Component,
@@ -1004,57 +966,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
1004
966
  provide: MatFormFieldControl,
1005
967
  useExisting: MatecuAutocomplete,
1006
968
  },
1007
- ], template: "<input matInput type=\"text\" matInput [formControl]=\"inputControl\" [matAutocomplete]=\"auto\" [class.loading]=\"loading\"\n [readonly]=\"readonly\" />\n\n\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onOptionSelected($event.option.value)\"\n [displayWith]=\"displayLabel\">\n\n @for (option of filteredOptions$ | async; track $index) {\n\n <mat-option [value]=\"option[0]\">\n {{ option[1] }}\n </mat-option>\n\n }\n\n <!-- Crear nuevo -->\n @if(allowCreate){\n\n <mat-divider></mat-divider>\n\n @if(showCreateOption ){\n <mat-option (click)=\"onCreateClick()\" class=\"create-option\">\n <span>\u2795</span><span>\" {{ inputControl.value }}\"</span>\n\n </mat-option>\n }\n }\n\n</mat-autocomplete>\n\n<!-- Spinner -->\n@if(loading){\n<mat-progress-spinner class=\"loading-spinner\" diameter=\"20\" mode=\"indeterminate\"\n style=\"position:absolute; right:10px; top:50%; transform:translateY(-50%);\">\n</mat-progress-spinner>\n}", styles: ["@charset \"UTF-8\";:host{display:block;position:relative;box-sizing:border-box;width:100%}:host input{border:none;background-color:transparent;outline:none}:host .create-option{display:flex;justify-content:space-between;align-items:center}:host .create-option:first-child{margin-right:auto;color:green}.loading-spinner{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none}input.loading{padding-right:40px}.create-option{font-style:italic;opacity:.85}::ng-deep .mat-mdc-option.create-option:hover{background:#0000000a}::ng-deep .mat-mdc-autocomplete-panel mat-divider{margin:4px 0}:host(.mat-mdc-input-disabled){opacity:.6;pointer-events:none}\n"] }]
1008
- }], ctorParameters: () => [{ type: i1$3.FocusMonitor }, { type: i0.ElementRef }, { type: i0.Injector }], propDecorators: { options: [{
1009
- type: Input
1010
- }], allowCreate: [{
1011
- type: Input
1012
- }], loading: [{
969
+ ], template: "<input matInput type=\"text\" matInput [formControl]=\"inputControl\" [matAutocomplete]=\"auto\" [class.loading]=\"loading()\"\n [readonly]=\"readonly\" />\n\n\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onOptionSelected($event.option.value)\"\n [displayWith]=\"displayLabel\">\n\n @for (option of filteredOptions(); track $index) {\n\n <mat-option [value]=\"option[0]\">\n {{ option[1] }}\n </mat-option>\n\n }\n\n <!-- Crear nuevo -->\n @if(allowCreate()){\n\n <mat-divider></mat-divider>\n\n @if(showCreateOption() ){\n <mat-option (click)=\"onCreateClick()\" class=\"create-option\" [value]=\"inputControl.value\">\n <span>\u2795</span><span>\" {{ inputControl.value }}\"</span>\n\n </mat-option>\n }\n }\n\n</mat-autocomplete>\n\n<!-- Spinner -->\n@if(loading()){\n<mat-progress-spinner class=\"loading-spinner\" diameter=\"20\" mode=\"indeterminate\"\n style=\"position:absolute; right:10px; top:50%; transform:translateY(-50%);\">\n</mat-progress-spinner>\n}", styles: ["@charset \"UTF-8\";:host{display:block;position:relative;box-sizing:border-box;width:100%}:host input{border:none;background-color:transparent;outline:none}:host .create-option{display:flex;justify-content:space-between;align-items:center}:host .create-option:first-child{margin-right:auto;color:green}.loading-spinner{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none}input.loading{padding-right:40px}.create-option{font-style:italic;opacity:.85}::ng-deep .mat-mdc-option.create-option:hover{background:#0000000a}::ng-deep .mat-mdc-autocomplete-panel mat-divider{margin:4px 0}:host(.mat-mdc-input-disabled){opacity:.6;pointer-events:none}\n"] }]
970
+ }], ctorParameters: () => [{ type: i1$3.FocusMonitor }, { type: i0.ElementRef }, { type: i0.Injector }], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], allowCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCreate", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], filterFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterFn", required: false }] }], searchChangeDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchChangeDebounceTime", required: false }] }], required: [{
1013
971
  type: Input
1014
972
  }], readonly: [{
1015
973
  type: Input
1016
- }], filterFn: [{
1017
- type: Input
1018
- }], searchChangeDebounceTime: [{
1019
- type: Input
1020
974
  }], placeholder: [{
1021
975
  type: Input
1022
- }], required: [{
1023
- type: Input
1024
976
  }], disabled: [{
1025
977
  type: Input
1026
978
  }], value: [{
1027
979
  type: Input
1028
- }], searchChange: [{
1029
- type: Output
1030
- }], create: [{
1031
- type: Output
1032
- }], valueChange: [{
1033
- type: Output
1034
- }] } });
980
+ }], searchChange: [{ type: i0.Output, args: ["searchChange"] }], create: [{ type: i0.Output, args: ["create"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
1035
981
 
1036
982
  class MatecuAutocompleteMultiple {
1037
983
  static nextId = 0;
1038
984
  // ================= INPUTS =================
1039
- placeholder = '';
1040
- loading = false;
1041
- searchChangeDebounceTime = 300;
1042
- enableSelectAll = true;
1043
- readonly = false;
1044
- selectAllLabel = 'Select All';
1045
- clearAllLabel = 'Clear All';
1046
- showTooltip = true;
1047
- filterFn = this.createFilterFn();
1048
- _options = signal([], ...(ngDevMode ? [{ debugName: "_options" }] : []));
1049
- set options(value) {
1050
- this._options.set(value ?? []);
1051
- }
1052
- get options() {
1053
- return this._options();
985
+ _placeholder = input('', ...(ngDevMode ? [{ debugName: "_placeholder" }] : []));
986
+ loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
987
+ searchChangeDebounceTime = input(300, ...(ngDevMode ? [{ debugName: "searchChangeDebounceTime" }] : []));
988
+ enableSelectAll = input(true, ...(ngDevMode ? [{ debugName: "enableSelectAll" }] : []));
989
+ readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
990
+ selectAllLabel = input('Select All', ...(ngDevMode ? [{ debugName: "selectAllLabel" }] : []));
991
+ clearAllLabel = input('Clear All', ...(ngDevMode ? [{ debugName: "clearAllLabel" }] : []));
992
+ showTooltip = input(true, ...(ngDevMode ? [{ debugName: "showTooltip" }] : []));
993
+ filterFn = input(this.createFilterFn(), ...(ngDevMode ? [{ debugName: "filterFn" }] : []));
994
+ options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
995
+ // MatFormFieldControl compatibility
996
+ get placeholder() {
997
+ return this._placeholder();
1054
998
  }
1055
999
  // ================= OUTPUT =================
1056
- searchChange = new EventEmitter();
1057
- valueChange = new EventEmitter();
1000
+ searchChange = output();
1001
+ valueChange = output();
1058
1002
  // ================= INTERNAL CONTROL =================
1059
1003
  control = new FormControl([], { nonNullable: true });
1060
1004
  controlValue$ = toSignal(this.control.valueChanges);
@@ -1064,12 +1008,12 @@ class MatecuAutocompleteMultiple {
1064
1008
  searchText = signal('', ...(ngDevMode ? [{ debugName: "searchText" }] : [])); // 🔥 AHORA SÍ existe correctamente
1065
1009
  filteredOptions = computed(() => {
1066
1010
  const filter = this.searchText();
1067
- return this._options().filter((o) => this.filterFn(o[1], filter) && !this.control.value.includes(o[0]));
1011
+ return this.options().filter((o) => this.filterFn()(o[1], filter) && !this.control.value.includes(o[0]));
1068
1012
  }, ...(ngDevMode ? [{ debugName: "filteredOptions" }] : []));
1069
1013
  selectedItems = computed(() => {
1070
1014
  const values = this.controlValue$() ?? [];
1071
1015
  return values.map((v) => {
1072
- const found = this._options().find((o) => o[0] === v);
1016
+ const found = this.options().find((o) => o[0] === v);
1073
1017
  return {
1074
1018
  value: v,
1075
1019
  label: found ? found[1] : v,
@@ -1111,7 +1055,7 @@ class MatecuAutocompleteMultiple {
1111
1055
  clearTimeout(timeout);
1112
1056
  timeout = setTimeout(() => {
1113
1057
  this.searchChange.emit(value);
1114
- }, this.searchChangeDebounceTime);
1058
+ }, this.searchChangeDebounceTime());
1115
1059
  });
1116
1060
  }
1117
1061
  value = null;
@@ -1131,7 +1075,7 @@ class MatecuAutocompleteMultiple {
1131
1075
  }
1132
1076
  // ================= AUTOCOMPLETE =================
1133
1077
  selectOption(option) {
1134
- if (this.readonly || this.disabled)
1078
+ if (this.readonly() || this.disabled)
1135
1079
  return;
1136
1080
  if (!Array.isArray(option))
1137
1081
  return;
@@ -1149,21 +1093,21 @@ class MatecuAutocompleteMultiple {
1149
1093
  }
1150
1094
  // ================= CHIP ACTIONS =================
1151
1095
  remove(value) {
1152
- if (this.readonly || this.disabled)
1096
+ if (this.readonly() || this.disabled)
1153
1097
  return;
1154
1098
  this.control.setValue(this.control.value.filter((v) => v !== value));
1155
1099
  }
1156
1100
  selectAll() {
1157
- if (this.readonly || this.disabled)
1101
+ if (this.readonly() || this.disabled)
1158
1102
  return;
1159
- const allValues = this._options().map((o) => o[0]);
1103
+ const allValues = this.options().map((o) => o[0]);
1160
1104
  this.control.setValue([...new Set([...this.control.value, ...allValues])]);
1161
1105
  this.searchControl.setValue('');
1162
1106
  this.searchText.set('');
1163
1107
  this.autocompleteTrigger.closePanel();
1164
1108
  }
1165
1109
  clearAll() {
1166
- if (this.disabled || this.readonly)
1110
+ if (this.disabled || this.readonly())
1167
1111
  return;
1168
1112
  if (this.control.value.length === 0)
1169
1113
  return;
@@ -1174,7 +1118,7 @@ class MatecuAutocompleteMultiple {
1174
1118
  }
1175
1119
  // ================= DRAG & DROP =================
1176
1120
  drop(event) {
1177
- if (this.disabled || this.readonly)
1121
+ if (this.disabled || this.readonly())
1178
1122
  return;
1179
1123
  const current = [...this.control.value];
1180
1124
  moveItemInArray(current, event.previousIndex, event.currentIndex);
@@ -1182,7 +1126,7 @@ class MatecuAutocompleteMultiple {
1182
1126
  }
1183
1127
  // ================= KEYBOARD =================
1184
1128
  onKeyDown(event) {
1185
- if (this.readonly || this.disabled)
1129
+ if (this.readonly() || this.disabled)
1186
1130
  return;
1187
1131
  if (event.key === 'Backspace' && !this.searchText() && this.control.value.length > 0) {
1188
1132
  const updated = [...this.control.value];
@@ -1227,7 +1171,7 @@ class MatecuAutocompleteMultiple {
1227
1171
  };
1228
1172
  }
1229
1173
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuAutocompleteMultiple, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1230
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuAutocompleteMultiple, isStandalone: true, selector: "matecu-autocomplete-multiple", inputs: { placeholder: "placeholder", loading: "loading", searchChangeDebounceTime: "searchChangeDebounceTime", enableSelectAll: "enableSelectAll", readonly: "readonly", selectAllLabel: "selectAllLabel", clearAllLabel: "clearAllLabel", showTooltip: "showTooltip", filterFn: "filterFn", options: "options" }, outputs: { searchChange: "searchChange", valueChange: "valueChange" }, providers: [
1174
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuAutocompleteMultiple, isStandalone: true, selector: "matecu-autocomplete-multiple", inputs: { _placeholder: { classPropertyName: "_placeholder", publicName: "_placeholder", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, searchChangeDebounceTime: { classPropertyName: "searchChangeDebounceTime", publicName: "searchChangeDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, enableSelectAll: { classPropertyName: "enableSelectAll", publicName: "enableSelectAll", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, clearAllLabel: { classPropertyName: "clearAllLabel", publicName: "clearAllLabel", isSignal: true, isRequired: false, transformFunction: null }, showTooltip: { classPropertyName: "showTooltip", publicName: "showTooltip", isSignal: true, isRequired: false, transformFunction: null }, filterFn: { classPropertyName: "filterFn", publicName: "filterFn", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { searchChange: "searchChange", valueChange: "valueChange" }, providers: [
1231
1175
  {
1232
1176
  provide: NG_VALUE_ACCESSOR,
1233
1177
  useExisting: forwardRef(() => MatecuAutocompleteMultiple),
@@ -1237,7 +1181,7 @@ class MatecuAutocompleteMultiple {
1237
1181
  provide: MatFormFieldControl,
1238
1182
  useExisting: MatecuAutocompleteMultiple,
1239
1183
  },
1240
- ], viewQueries: [{ propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], ngImport: i0, template: "@if (loading) {\n\n<mat-progress-spinner matSuffix diameter=\"20\" mode=\"indeterminate\">\n</mat-progress-spinner>\n}\n<mat-chip-grid #chipGrid class=\"chip-list\">\n\n @for (item of selectedItems(); track item.value) {\n\n <mat-chip-row [removable]=\"!disabled && !readonly\" (removed)=\"remove(item.value)\"\n [matTooltip]=\"showTooltip ? item.label : ''\" matTooltipPosition=\"above\">\n\n\n\n {{ item.label }}\n @if (!disabled && !readonly) {\n\n <button matChipRemove aria-label=\"Remove {{item.label}}\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n\n </mat-chip-row>\n }\n\n <input type=\"text\" matInput [formControl]=\"searchControl\" [matAutocomplete]=\"auto\" (keydown)=\"onKeyDown($event)\"\n [placeholder]=\"placeholder\" />\n\n</mat-chip-grid>\n\n\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selectOption($event.option.value)\"\n class=\"autocomplete-large-panel\" [displayWith]=\"displayLabel\">\n\n @if (!readonly && !disabled && (enableSelectAll || control.value.length > 0)) {\n <mat-option>\n <div style=\"display: flex; gap: 10px; align-items: center; justify-content: center; \">\n\n @if (enableSelectAll) {\n <div>\n <button mat-icon-button (click)=\"selectAll()\" [matTooltip]=\"selectAllLabel\">\n <mat-icon>select_all</mat-icon>\n </button>\n </div>\n\n }\n @if (control.value.length > 0) {\n <div>\n\n <button mat-icon-button (click)=\"clearAll()\" [matTooltip]=\"clearAllLabel\">\n <mat-icon>clear_all</mat-icon>\n </button>\n </div>\n }\n </div>\n </mat-option>\n }\n\n @for (option of filteredOptions(); track $index) {\n <mat-option [value]=\"option\">\n {{ option[1] }}\n </mat-option>\n }\n</mat-autocomplete>", styles: [":host{display:inline-block;position:relative;width:100%}:host input{outline:none;border:none;background-color:transparent;width:100%}:host .clear-all-box{width:100%;display:flex;justify-content:flex-end;align-items:center}:host mat-option span{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i2$3.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i2$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i2$3.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
1184
+ ], viewQueries: [{ propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], ngImport: i0, template: "@if (loading()) {\n\n<mat-progress-spinner matSuffix diameter=\"20\" mode=\"indeterminate\">\n</mat-progress-spinner>\n}\n<mat-chip-grid #chipGrid class=\"chip-list\">\n\n @for (item of selectedItems(); track item.value) {\n\n <mat-chip-row [removable]=\"!disabled && !readonly()\" (removed)=\"remove(item.value)\"\n [matTooltip]=\"showTooltip() ? item.label : ''\" matTooltipPosition=\"above\">\n\n\n\n {{ item.label }}\n @if (!disabled && !readonly()) {\n\n <button matChipRemove aria-label=\"Remove {{item.label}}\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n\n </mat-chip-row>\n }\n\n <input type=\"text\" matInput [formControl]=\"searchControl\" [matAutocomplete]=\"auto\" (keydown)=\"onKeyDown($event)\"\n [placeholder]=\"_placeholder()\" />\n\n</mat-chip-grid>\n\n\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selectOption($event.option.value)\"\n class=\"autocomplete-large-panel\" [displayWith]=\"displayLabel\">\n\n @if (!readonly() && !disabled && (enableSelectAll() || control.value.length > 0)) {\n <mat-option>\n <div style=\"display: flex; gap: 10px; align-items: center; justify-content: center; \">\n\n @if (enableSelectAll()) {\n <div>\n <button mat-icon-button (click)=\"selectAll()\" [matTooltip]=\"selectAllLabel()\">\n <mat-icon>select_all</mat-icon>\n </button>\n </div>\n\n }\n @if (control.value.length > 0) {\n <div>\n\n <button mat-icon-button (click)=\"clearAll()\" [matTooltip]=\"clearAllLabel()\">\n <mat-icon>clear_all</mat-icon>\n </button>\n </div>\n }\n </div>\n </mat-option>\n }\n\n @for (option of filteredOptions(); track $index) {\n <mat-option [value]=\"option\">\n {{ option[1] }}\n </mat-option>\n }\n</mat-autocomplete>", styles: [":host{display:inline-block;position:relative;width:100%}:host input{outline:none;border:none;background-color:transparent;width:100%}:host .clear-all-box{width:100%;display:flex;justify-content:flex-end;align-items:center}:host mat-option span{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i2$3.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i2$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i2$3.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
1241
1185
  }
1242
1186
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuAutocompleteMultiple, decorators: [{
1243
1187
  type: Component,
@@ -1261,33 +1205,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
1261
1205
  provide: MatFormFieldControl,
1262
1206
  useExisting: MatecuAutocompleteMultiple,
1263
1207
  },
1264
- ], template: "@if (loading) {\n\n<mat-progress-spinner matSuffix diameter=\"20\" mode=\"indeterminate\">\n</mat-progress-spinner>\n}\n<mat-chip-grid #chipGrid class=\"chip-list\">\n\n @for (item of selectedItems(); track item.value) {\n\n <mat-chip-row [removable]=\"!disabled && !readonly\" (removed)=\"remove(item.value)\"\n [matTooltip]=\"showTooltip ? item.label : ''\" matTooltipPosition=\"above\">\n\n\n\n {{ item.label }}\n @if (!disabled && !readonly) {\n\n <button matChipRemove aria-label=\"Remove {{item.label}}\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n\n </mat-chip-row>\n }\n\n <input type=\"text\" matInput [formControl]=\"searchControl\" [matAutocomplete]=\"auto\" (keydown)=\"onKeyDown($event)\"\n [placeholder]=\"placeholder\" />\n\n</mat-chip-grid>\n\n\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selectOption($event.option.value)\"\n class=\"autocomplete-large-panel\" [displayWith]=\"displayLabel\">\n\n @if (!readonly && !disabled && (enableSelectAll || control.value.length > 0)) {\n <mat-option>\n <div style=\"display: flex; gap: 10px; align-items: center; justify-content: center; \">\n\n @if (enableSelectAll) {\n <div>\n <button mat-icon-button (click)=\"selectAll()\" [matTooltip]=\"selectAllLabel\">\n <mat-icon>select_all</mat-icon>\n </button>\n </div>\n\n }\n @if (control.value.length > 0) {\n <div>\n\n <button mat-icon-button (click)=\"clearAll()\" [matTooltip]=\"clearAllLabel\">\n <mat-icon>clear_all</mat-icon>\n </button>\n </div>\n }\n </div>\n </mat-option>\n }\n\n @for (option of filteredOptions(); track $index) {\n <mat-option [value]=\"option\">\n {{ option[1] }}\n </mat-option>\n }\n</mat-autocomplete>", styles: [":host{display:inline-block;position:relative;width:100%}:host input{outline:none;border:none;background-color:transparent;width:100%}:host .clear-all-box{width:100%;display:flex;justify-content:flex-end;align-items:center}:host mat-option span{display:block}\n"] }]
1265
- }], ctorParameters: () => [{ type: i0.Injector }], propDecorators: { placeholder: [{
1266
- type: Input
1267
- }], loading: [{
1268
- type: Input
1269
- }], searchChangeDebounceTime: [{
1270
- type: Input
1271
- }], enableSelectAll: [{
1272
- type: Input
1273
- }], readonly: [{
1274
- type: Input
1275
- }], selectAllLabel: [{
1276
- type: Input
1277
- }], clearAllLabel: [{
1278
- type: Input
1279
- }], showTooltip: [{
1280
- type: Input
1281
- }], filterFn: [{
1282
- type: Input
1283
- }], options: [{
1284
- type: Input,
1285
- args: [{ required: true }]
1286
- }], searchChange: [{
1287
- type: Output
1288
- }], valueChange: [{
1289
- type: Output
1290
- }], autocompleteTrigger: [{
1208
+ ], template: "@if (loading()) {\n\n<mat-progress-spinner matSuffix diameter=\"20\" mode=\"indeterminate\">\n</mat-progress-spinner>\n}\n<mat-chip-grid #chipGrid class=\"chip-list\">\n\n @for (item of selectedItems(); track item.value) {\n\n <mat-chip-row [removable]=\"!disabled && !readonly()\" (removed)=\"remove(item.value)\"\n [matTooltip]=\"showTooltip() ? item.label : ''\" matTooltipPosition=\"above\">\n\n\n\n {{ item.label }}\n @if (!disabled && !readonly()) {\n\n <button matChipRemove aria-label=\"Remove {{item.label}}\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n\n </mat-chip-row>\n }\n\n <input type=\"text\" matInput [formControl]=\"searchControl\" [matAutocomplete]=\"auto\" (keydown)=\"onKeyDown($event)\"\n [placeholder]=\"_placeholder()\" />\n\n</mat-chip-grid>\n\n\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selectOption($event.option.value)\"\n class=\"autocomplete-large-panel\" [displayWith]=\"displayLabel\">\n\n @if (!readonly() && !disabled && (enableSelectAll() || control.value.length > 0)) {\n <mat-option>\n <div style=\"display: flex; gap: 10px; align-items: center; justify-content: center; \">\n\n @if (enableSelectAll()) {\n <div>\n <button mat-icon-button (click)=\"selectAll()\" [matTooltip]=\"selectAllLabel()\">\n <mat-icon>select_all</mat-icon>\n </button>\n </div>\n\n }\n @if (control.value.length > 0) {\n <div>\n\n <button mat-icon-button (click)=\"clearAll()\" [matTooltip]=\"clearAllLabel()\">\n <mat-icon>clear_all</mat-icon>\n </button>\n </div>\n }\n </div>\n </mat-option>\n }\n\n @for (option of filteredOptions(); track $index) {\n <mat-option [value]=\"option\">\n {{ option[1] }}\n </mat-option>\n }\n</mat-autocomplete>", styles: [":host{display:inline-block;position:relative;width:100%}:host input{outline:none;border:none;background-color:transparent;width:100%}:host .clear-all-box{width:100%;display:flex;justify-content:flex-end;align-items:center}:host mat-option span{display:block}\n"] }]
1209
+ }], ctorParameters: () => [{ type: i0.Injector }], propDecorators: { _placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "_placeholder", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], searchChangeDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchChangeDebounceTime", required: false }] }], enableSelectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSelectAll", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], clearAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAllLabel", required: false }] }], showTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTooltip", required: false }] }], filterFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterFn", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], autocompleteTrigger: [{
1291
1210
  type: ViewChild,
1292
1211
  args: [MatAutocompleteTrigger]
1293
1212
  }] } });
@@ -1318,42 +1237,42 @@ class MatecuFileInput {
1318
1237
  onChange;
1319
1238
  onTouched;
1320
1239
  // Inputs - Funcionalidad básica
1321
- optimizeImage;
1322
- optimizeImageToSize;
1323
- maxFileSize; // tamaño máximo en bytes
1324
- maxFiles = 1;
1325
- multiple = false;
1326
- showFileSize = false;
1327
- fileSizeUnit = 'AUTO';
1328
- displayName;
1329
- placeholder = 'Select a file or drag here';
1330
- buttonText = 'Select file';
1331
- changeSelectedFileText = 'Change selected file(s)';
1332
- loadingText = 'Processing...';
1333
- ariaLabel;
1240
+ optimizeImage = input(undefined, ...(ngDevMode ? [{ debugName: "optimizeImage" }] : []));
1241
+ optimizeImageToSize = input(undefined, ...(ngDevMode ? [{ debugName: "optimizeImageToSize" }] : []));
1242
+ maxFileSize = input(undefined, ...(ngDevMode ? [{ debugName: "maxFileSize" }] : [])); // tamaño máximo en bytes
1243
+ maxFiles = input(1, ...(ngDevMode ? [{ debugName: "maxFiles" }] : []));
1244
+ multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
1245
+ showFileSize = input(false, ...(ngDevMode ? [{ debugName: "showFileSize" }] : []));
1246
+ fileSizeUnit = input('AUTO', ...(ngDevMode ? [{ debugName: "fileSizeUnit" }] : []));
1247
+ displayName = input(undefined, ...(ngDevMode ? [{ debugName: "displayName" }] : []));
1248
+ placeholder = input('Select a file or drag here', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
1249
+ buttonText = input('Select file', ...(ngDevMode ? [{ debugName: "buttonText" }] : []));
1250
+ changeSelectedFileText = input('Change selected file(s)', ...(ngDevMode ? [{ debugName: "changeSelectedFileText" }] : []));
1251
+ loadingText = input('Processing...', ...(ngDevMode ? [{ debugName: "loadingText" }] : []));
1252
+ ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
1334
1253
  // Inputs - Validación
1335
- acceptedMimeTypes = [];
1336
- acceptedExtensions = [];
1337
- errorMessages = {
1254
+ acceptedMimeTypes = input([], ...(ngDevMode ? [{ debugName: "acceptedMimeTypes" }] : []));
1255
+ acceptedExtensions = input([], ...(ngDevMode ? [{ debugName: "acceptedExtensions" }] : []));
1256
+ errorMessages = input({
1338
1257
  invalidSize: 'File exceeds maximum allowed size',
1339
1258
  invalidType: 'File type not allowed',
1340
1259
  tooManyFiles: 'Maximum number of files exceeded',
1341
1260
  uploadError: 'Error processing file',
1342
- };
1261
+ }, ...(ngDevMode ? [{ debugName: "errorMessages" }] : []));
1343
1262
  // Inputs - UI/UX
1344
- enableDragDrop = true;
1345
- showPreview = false;
1346
- previewMaxWidth = 200;
1347
- previewMaxHeight = 200;
1348
- showProgress = false;
1263
+ enableDragDrop = input(true, ...(ngDevMode ? [{ debugName: "enableDragDrop" }] : []));
1264
+ showPreview = input(false, ...(ngDevMode ? [{ debugName: "showPreview" }] : []));
1265
+ previewMaxWidth = input(200, ...(ngDevMode ? [{ debugName: "previewMaxWidth" }] : []));
1266
+ previewMaxHeight = input(200, ...(ngDevMode ? [{ debugName: "previewMaxHeight" }] : []));
1267
+ showProgress = input(false, ...(ngDevMode ? [{ debugName: "showProgress" }] : []));
1349
1268
  // Outputs
1350
- fileSelected = new EventEmitter();
1351
- filesSelected = new EventEmitter();
1352
- fileRemoved = new EventEmitter();
1353
- validationError = new EventEmitter();
1354
- dragEnter = new EventEmitter();
1355
- dragLeave = new EventEmitter();
1356
- stateChange = new EventEmitter();
1269
+ fileSelected = output();
1270
+ filesSelected = output();
1271
+ fileRemoved = output();
1272
+ validationError = output();
1273
+ dragEnter = output();
1274
+ dragLeave = output();
1275
+ stateChange = output();
1357
1276
  // ControlValueAccessor Methods
1358
1277
  writeValue(value) {
1359
1278
  if (value instanceof File) {
@@ -1428,7 +1347,7 @@ class MatecuFileInput {
1428
1347
  URL.revokeObjectURL(previewUrl);
1429
1348
  this.previewUrls.delete(fileKey);
1430
1349
  }
1431
- if (this.multiple) {
1350
+ if (this.multiple()) {
1432
1351
  this.files = this.files.filter((file) => file !== fileToRemove);
1433
1352
  this.notifyChange(this.files.length > 0 ? this.files : null);
1434
1353
  this.filesSelected.emit([...this.files]);
@@ -1447,8 +1366,8 @@ class MatecuFileInput {
1447
1366
  this.validationErrors = [];
1448
1367
  try {
1449
1368
  // Validar número máximo de archivos
1450
- if (selectedFiles.length > this.maxFiles) {
1451
- this.validationErrors.push(this.errorMessages.tooManyFiles);
1369
+ if (selectedFiles.length > this.maxFiles()) {
1370
+ this.validationErrors.push(this.errorMessages().tooManyFiles);
1452
1371
  this.changeState(FileInputState.ERROR);
1453
1372
  return;
1454
1373
  }
@@ -1466,7 +1385,7 @@ class MatecuFileInput {
1466
1385
  }
1467
1386
  }
1468
1387
  catch (error) {
1469
- this.validationErrors.push(this.errorMessages.uploadError);
1388
+ this.validationErrors.push(this.errorMessages().uploadError);
1470
1389
  }
1471
1390
  }
1472
1391
  if (this.validationErrors.length > 0) {
@@ -1475,7 +1394,7 @@ class MatecuFileInput {
1475
1394
  return;
1476
1395
  }
1477
1396
  if (processedFiles.length > 0) {
1478
- if (this.multiple) {
1397
+ if (this.multiple()) {
1479
1398
  this.files = processedFiles;
1480
1399
  this.filesSelected.emit([...this.files]);
1481
1400
  this.notifyChange(this.files);
@@ -1490,14 +1409,14 @@ class MatecuFileInput {
1490
1409
  }
1491
1410
  }
1492
1411
  catch (error) {
1493
- this.validationErrors.push(this.errorMessages.uploadError);
1412
+ this.validationErrors.push(this.errorMessages().uploadError);
1494
1413
  this.validationError.emit([...this.validationErrors]);
1495
1414
  this.changeState(FileInputState.ERROR);
1496
1415
  }
1497
1416
  }
1498
1417
  handleSingleFile(file) {
1499
1418
  this.file = file;
1500
- this.fileName = this.displayName || file.name;
1419
+ this.fileName = this.displayName() || file.name;
1501
1420
  this.selectedFileSize = this.calculateFileSizeInMB(file);
1502
1421
  this.generatePreview(file);
1503
1422
  }
@@ -1507,9 +1426,10 @@ class MatecuFileInput {
1507
1426
  this.fileName = files.length > 0 ? `${files.length} file(s) selected` : undefined;
1508
1427
  }
1509
1428
  async processFile(file) {
1510
- if (this.optimizeImage && file.type.includes('image') && this.optimizeImageToSize) {
1429
+ const optimizeImage = this.optimizeImage();
1430
+ if (optimizeImage && file.type.includes('image') && this.optimizeImageToSize()) {
1511
1431
  try {
1512
- return await this.optimizeImage(file);
1432
+ return await optimizeImage(file);
1513
1433
  }
1514
1434
  catch (error) {
1515
1435
  console.warn('Error optimizing image:', error);
@@ -1521,20 +1441,23 @@ class MatecuFileInput {
1521
1441
  validateFile(file) {
1522
1442
  const errors = [];
1523
1443
  // Validar tamaño
1524
- if (this.maxFileSize && file.size > this.maxFileSize) {
1525
- errors.push(this.errorMessages.invalidSize);
1444
+ const maxFileSize = this.maxFileSize();
1445
+ if (maxFileSize && file.size > maxFileSize) {
1446
+ errors.push(this.errorMessages().invalidSize);
1526
1447
  }
1527
1448
  // Validar tipo MIME
1528
- if (this.acceptedMimeTypes.length > 0) {
1529
- if (!this.acceptedMimeTypes.some((type) => file.type.includes(type))) {
1530
- errors.push(this.errorMessages.invalidType);
1449
+ const acceptedMimeTypes = this.acceptedMimeTypes();
1450
+ if (acceptedMimeTypes.length > 0) {
1451
+ if (!acceptedMimeTypes.some((type) => file.type.includes(type))) {
1452
+ errors.push(this.errorMessages().invalidType);
1531
1453
  }
1532
1454
  }
1533
1455
  // Validar extensión
1534
- if (this.acceptedExtensions.length > 0) {
1456
+ const acceptedExtensions = this.acceptedExtensions();
1457
+ if (acceptedExtensions.length > 0) {
1535
1458
  const fileExtension = '.' + file.name.split('.').pop()?.toLowerCase();
1536
- if (!this.acceptedExtensions.some((ext) => ext.toLowerCase() === fileExtension)) {
1537
- errors.push(this.errorMessages.invalidType);
1459
+ if (!acceptedExtensions.some((ext) => ext.toLowerCase() === fileExtension)) {
1460
+ errors.push(this.errorMessages().invalidType);
1538
1461
  }
1539
1462
  }
1540
1463
  return {
@@ -1544,7 +1467,7 @@ class MatecuFileInput {
1544
1467
  }
1545
1468
  generatePreview(file) {
1546
1469
  this.cleanupPreview();
1547
- if (this.showPreview && file.type.startsWith('image/')) {
1470
+ if (this.showPreview() && file.type.startsWith('image/')) {
1548
1471
  const reader = new FileReader();
1549
1472
  reader.onload = (e) => {
1550
1473
  this.previewUrl = e.target?.result;
@@ -1602,8 +1525,9 @@ class MatecuFileInput {
1602
1525
  const k = 1024;
1603
1526
  const sizes = ['bytes', 'KB', 'MB', 'GB', 'TB'];
1604
1527
  // Si se especifica una unidad específica, usarla
1605
- if (this.fileSizeUnit !== 'AUTO') {
1606
- const targetUnitIndex = sizes.indexOf(this.fileSizeUnit);
1528
+ const fileSizeUnit = this.fileSizeUnit();
1529
+ if (fileSizeUnit !== 'AUTO') {
1530
+ const targetUnitIndex = sizes.indexOf(fileSizeUnit);
1607
1531
  if (targetUnitIndex !== -1) {
1608
1532
  const size = bytes / Math.pow(k, targetUnitIndex);
1609
1533
  const formattedSize = targetUnitIndex === 0 ? size.toString() : size.toFixed(2);
@@ -1653,16 +1577,16 @@ class MatecuFileInput {
1653
1577
  return this.currentState === FileInputState.LOADING;
1654
1578
  }
1655
1579
  get hasFiles() {
1656
- return this.multiple ? this.files.length > 0 : !!this.file;
1580
+ return this.multiple() ? this.files.length > 0 : !!this.file;
1657
1581
  }
1658
1582
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuFileInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
1659
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuFileInput, isStandalone: true, selector: "matecu-file-input", inputs: { optimizeImage: "optimizeImage", optimizeImageToSize: "optimizeImageToSize", maxFileSize: "maxFileSize", maxFiles: "maxFiles", multiple: "multiple", showFileSize: "showFileSize", fileSizeUnit: "fileSizeUnit", displayName: "displayName", placeholder: "placeholder", buttonText: "buttonText", changeSelectedFileText: "changeSelectedFileText", loadingText: "loadingText", ariaLabel: "ariaLabel", acceptedMimeTypes: "acceptedMimeTypes", acceptedExtensions: "acceptedExtensions", errorMessages: "errorMessages", enableDragDrop: "enableDragDrop", showPreview: "showPreview", previewMaxWidth: "previewMaxWidth", previewMaxHeight: "previewMaxHeight", showProgress: "showProgress" }, outputs: { fileSelected: "fileSelected", filesSelected: "filesSelected", fileRemoved: "fileRemoved", validationError: "validationError", dragEnter: "dragEnter", dragLeave: "dragLeave", stateChange: "stateChange" }, providers: [
1583
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: MatecuFileInput, isStandalone: true, selector: "matecu-file-input", inputs: { optimizeImage: { classPropertyName: "optimizeImage", publicName: "optimizeImage", isSignal: true, isRequired: false, transformFunction: null }, optimizeImageToSize: { classPropertyName: "optimizeImageToSize", publicName: "optimizeImageToSize", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, showFileSize: { classPropertyName: "showFileSize", publicName: "showFileSize", isSignal: true, isRequired: false, transformFunction: null }, fileSizeUnit: { classPropertyName: "fileSizeUnit", publicName: "fileSizeUnit", isSignal: true, isRequired: false, transformFunction: null }, displayName: { classPropertyName: "displayName", publicName: "displayName", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, buttonText: { classPropertyName: "buttonText", publicName: "buttonText", isSignal: true, isRequired: false, transformFunction: null }, changeSelectedFileText: { classPropertyName: "changeSelectedFileText", publicName: "changeSelectedFileText", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, acceptedMimeTypes: { classPropertyName: "acceptedMimeTypes", publicName: "acceptedMimeTypes", isSignal: true, isRequired: false, transformFunction: null }, acceptedExtensions: { classPropertyName: "acceptedExtensions", publicName: "acceptedExtensions", isSignal: true, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: true, isRequired: false, transformFunction: null }, enableDragDrop: { classPropertyName: "enableDragDrop", publicName: "enableDragDrop", isSignal: true, isRequired: false, transformFunction: null }, showPreview: { classPropertyName: "showPreview", publicName: "showPreview", isSignal: true, isRequired: false, transformFunction: null }, previewMaxWidth: { classPropertyName: "previewMaxWidth", publicName: "previewMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, previewMaxHeight: { classPropertyName: "previewMaxHeight", publicName: "previewMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, showProgress: { classPropertyName: "showProgress", publicName: "showProgress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileSelected: "fileSelected", filesSelected: "filesSelected", fileRemoved: "fileRemoved", validationError: "validationError", dragEnter: "dragEnter", dragLeave: "dragLeave", stateChange: "stateChange" }, providers: [
1660
1584
  {
1661
1585
  provide: NG_VALUE_ACCESSOR,
1662
1586
  multi: true,
1663
1587
  useExisting: MatecuFileInput,
1664
1588
  },
1665
- ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<!-- Hidden file input -->\n<input type=\"file\" #fileInput (change)=\"onFileChange($event)\" [multiple]=\"multiple\" [disabled]=\"isDisabled\"\n [attr.aria-label]=\"ariaLabel || 'Select file'\" [attr.aria-describedby]=\"hasErrors ? 'file-input-errors' : null\"\n [accept]=\"acceptedMimeTypes.join(',')\" />\n\n<!-- Main drop zone and file display -->\n<div class=\"file-input-container\" [class.drag-over]=\"isDragOver\" [class.disabled]=\"isDisabled\"\n [class.has-files]=\"hasFiles\" [class.has-errors]=\"hasErrors\" [class.loading]=\"isLoading\"\n (dragover)=\"onDragOver($event)\" (dragleave)=\"onDragLeave($event)\" (drop)=\"onDrop($event)\"\n (click)=\"openFileDialog()\">\n <!-- Loading state -->\n @if (isLoading) {\n <div class=\"loading-container\">\n <div class=\"spinner\"></div>\n <span class=\"loading-text\">{{ loadingText }}</span>\n </div>\n }\n\n <!-- Empty state / Drop zone -->\n @if (!hasFiles && !isLoading) {\n <div class=\"drop-zone\">\n <div class=\"drop-zone-icon\">\n \uD83D\uDCC1\n </div>\n <div class=\"drop-zone-content\">\n <p class=\"drop-zone-title\">{{ placeholder }}</p>\n <button type=\"button\" class=\"select-button\" [disabled]=\"isDisabled\"\n (click)=\"openFileDialog(); $event.stopPropagation()\">\n {{ buttonText }}\n </button>\n @if (enableDragDrop && !isDisabled) {\n }\n </div>\n </div>\n }\n\n <!-- Single file display -->\n @if (!multiple && file && !isLoading) {\n <div class=\"single-file-display\">\n <div class=\"file-info\">\n <!-- File preview -->\n @if (showPreview && file.type.startsWith('image/')) {\n <div class=\"file-preview\">\n <img [src]=\"getPreviewUrl(file)\" [alt]=\"file.name\" [style.max-width.px]=\"previewMaxWidth\"\n [style.max-height.px]=\"previewMaxHeight\" />\n </div>\n } @else {\n <div class=\"file-icon\">\n {{ getFileIcon(file) }}\n </div>\n }\n\n <div class=\"file-details\">\n <h3 class=\"file-name\">{{ displayName || file.name }}</h3>\n @if (showFileSize && selectedFileSize) {\n <p class=\"file-size\">\n {{ formatFileSize(file) }}\n </p>\n }\n <p class=\"file-type\">{{ file.type || 'Unknown type' }}</p>\n </div>\n </div>\n\n <button type=\"button\" class=\"remove-file-button\" (click)=\"removeFile(file); $event.stopPropagation()\"\n [attr.aria-label]=\"'Remove ' + file.name\">\n \u2715\n </button>\n </div>\n }\n\n <!-- Multiple files display -->\n @if (multiple && files.length > 0 && !isLoading) {\n <div class=\"multiple-files-display\">\n <div class=\"files-header\">\n @if (maxFiles > 1) {\n <span class=\"files-counter\">{{ files.length }} / {{ maxFiles }}</span>\n }\n </div>\n\n <div class=\"files-list\">\n @for (file of files; track file.name + file.size; let i = $index) {\n <div class=\"file-item\">\n <!-- File preview -->\n @if (showPreview && file.type.startsWith('image/')) {\n <div class=\"file-preview-small\">\n <img [src]=\"getPreviewUrl(file)\" [alt]=\"file.name\" />\n </div>\n } @else {\n <div class=\"file-icon-small\">\n {{ getFileIcon(file) }}\n </div>\n }\n\n <div class=\"file-item-details\">\n <div class=\"file-item-name\">{{ file.name }}</div>\n @if (showFileSize) {\n <div class=\"file-item-size\">\n {{ formatFileSize(file) }}\n </div>\n }\n </div>\n\n <button type=\"button\" class=\"remove-file-button-small\"\n (click)=\"removeFile(file); $event.stopPropagation()\" [attr.aria-label]=\"'Remove ' + file.name\">\n \u2715\n </button>\n </div>\n }\n </div>\n\n <!-- Add more files button -->\n @if (files.length < maxFiles) { <button type=\"button\" class=\"add-more-button\"\n (click)=\"openFileDialog(); $event.stopPropagation()\">\n {{ changeSelectedFileText }}\n </button>\n }\n </div>\n }\n</div>\n\n<!-- Error messages -->\n@if (hasErrors) {\n<div id=\"file-input-errors\" class=\"error-messages\" role=\"alert\">\n @for (error of validationErrors; track error) {\n <div class=\"error-message\">{{ error }}</div>\n }\n</div>\n}", styles: [":host{display:block;width:100%}:host>*{box-sizing:border-box}:host{--matecu-file-input-color-primary: #4f46e5;--matecu-file-input-color-primary-hover: #4338ca;--matecu-file-input-color-success: #10b981;--matecu-file-input-color-error: #ef4444;--matecu-file-input-color-error-hover: #dc2626;--matecu-file-input-color-loading: #8b5cf6;--matecu-file-input-color-disabled: #9ca3af;--matecu-file-input-border-default: #e1e5e9;--matecu-file-input-border-hover: var(--matecu-file-input-color-primary);--matecu-file-input-border-success: var(--matecu-file-input-color-success);--matecu-file-input-border-error: var(--matecu-file-input-color-error);--matecu-file-input-border-loading: var(--matecu-file-input-color-loading);--matecu-file-input-border-separator: #e5e7eb;--matecu-file-input-bg-default: #fafbfc;--matecu-file-input-bg-hover: #f8faff;--matecu-file-input-bg-drag-over: #eef2ff;--matecu-file-input-bg-disabled: #f5f5f5;--matecu-file-input-bg-success: #f0fdf4;--matecu-file-input-bg-error: #fef2f2;--matecu-file-input-bg-loading: #faf5ff;--matecu-file-input-bg-surface: #ffffff;--matecu-file-input-bg-surface-alt: #f3f4f6;--matecu-file-input-text-primary: #111827;--matecu-file-input-text-secondary: #374151;--matecu-file-input-text-muted: #6b7280;--matecu-file-input-text-disabled: #9ca3af;--matecu-file-input-text-on-primary: #ffffff;--matecu-file-input-text-error: #dc2626;--matecu-file-input-button-primary-bg: var(--matecu-file-input-color-primary);--matecu-file-input-button-primary-bg-hover: var(--matecu-file-input-color-primary-hover);--matecu-file-input-button-primary-text: var(--matecu-file-input-text-on-primary);--matecu-file-input-button-danger-bg: var(--matecu-file-input-color-error);--matecu-file-input-button-danger-bg-hover: var(--matecu-file-input-color-error-hover);--matecu-file-input-button-danger-text: var(--matecu-file-input-text-on-primary);--matecu-file-input-button-disabled-bg: var(--matecu-file-input-color-disabled);--matecu-file-input-spinner-track: #e5e7eb;--matecu-file-input-spinner-fill: var(--matecu-file-input-color-loading);--matecu-file-input-shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);--matecu-file-input-shadow-md: 0 1px 3px rgba(0, 0, 0, .1);--matecu-file-input-border-radius-sm: 4px;--matecu-file-input-border-radius-md: 6px;--matecu-file-input-border-radius-lg: 8px;--matecu-file-input-border-radius-xl: 12px;--matecu-file-input-border-width: 2px}:host input[type=file]{display:none}.file-input-container{position:relative;border:var(--matecu-file-input-border-width) dashed var(--matecu-file-input-border-default);border-radius:var(--matecu-file-input-border-radius-lg);padding:24px;transition:all .3s ease;background-color:var(--matecu-file-input-bg-default);cursor:pointer;min-height:120px;display:flex;align-items:center;justify-content:center}.file-input-container:hover:not(.disabled){border-color:var(--matecu-file-input-border-hover);background-color:var(--matecu-file-input-bg-hover)}.file-input-container.drag-over{border-color:var(--matecu-file-input-border-hover);background-color:var(--matecu-file-input-bg-drag-over);transform:scale(1.02)}.file-input-container.disabled{opacity:.6;cursor:not-allowed;background-color:var(--matecu-file-input-bg-disabled)}.file-input-container.has-files{border-style:solid;border-color:var(--matecu-file-input-border-success);background-color:var(--matecu-file-input-bg-success)}.file-input-container.has-errors{border-color:var(--matecu-file-input-border-error);background-color:var(--matecu-file-input-bg-error)}.file-input-container.loading{border-color:var(--matecu-file-input-border-loading);background-color:var(--matecu-file-input-bg-loading)}.loading-container{display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--matecu-file-input-text-muted)}.loading-container .spinner{width:32px;height:32px;border:3px solid var(--matecu-file-input-spinner-track);border-top:3px solid var(--matecu-file-input-spinner-fill);border-radius:50%;animation:spin 1s linear infinite}.loading-container .loading-text{font-size:14px;font-weight:500}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.drop-zone{text-align:center;width:100%}.drop-zone .drop-zone-icon{font-size:48px;margin-bottom:16px}.drop-zone .drop-zone-content .drop-zone-title{font-size:16px;font-weight:600;color:var(--matecu-file-input-text-secondary);margin-bottom:12px}.drop-zone .drop-zone-content .drop-zone-subtitle{font-size:14px;color:var(--matecu-file-input-text-muted);margin-top:8px}.drop-zone .select-button{background-color:var(--matecu-file-input-button-primary-bg);color:var(--matecu-file-input-button-primary-text);border:none;padding:12px 24px;border-radius:var(--matecu-file-input-border-radius-md);font-weight:500;cursor:pointer;transition:background-color .2s ease}.drop-zone .select-button:hover:not(:disabled){background-color:var(--matecu-file-input-button-primary-bg-hover)}.drop-zone .select-button:disabled{background-color:var(--matecu-file-input-button-disabled-bg);cursor:not-allowed}.single-file-display{box-sizing:border-box;display:grid;grid-template-columns:1fr 32px;align-items:center;justify-content:space-between;width:100%;padding:16px;background-color:var(--matecu-file-input-bg-surface);border-radius:var(--matecu-file-input-border-radius-md);box-shadow:var(--matecu-file-input-shadow-md)}.single-file-display .file-info{display:flex;align-items:center;gap:16px;overflow:hidden}.single-file-display .file-info .file-preview img{border-radius:var(--matecu-file-input-border-radius-sm);object-fit:cover}.single-file-display .file-info .file-icon{width:48px;height:48px;background-color:var(--matecu-file-input-bg-surface-alt);border-radius:var(--matecu-file-input-border-radius-md);display:flex;align-items:center;justify-content:center;font-size:24px;color:var(--matecu-file-input-text-muted)}.single-file-display .file-info .file-details{max-width:calc(100% - 64px)}.single-file-display .file-info .file-details .file-name{max-width:100%;font-size:16px;font-weight:600;color:var(--matecu-file-input-text-primary);margin:0 0 4px;display:inline-block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.single-file-display .file-info .file-details .file-size{font-size:14px;color:var(--matecu-file-input-text-muted);margin:0 0 2px}.single-file-display .file-info .file-details .file-type{font-size:12px;color:var(--matecu-file-input-text-disabled);margin:0}.single-file-display .remove-file-button{background-color:var(--matecu-file-input-button-danger-bg);color:var(--matecu-file-input-button-danger-text);border:none;width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;transition:background-color .2s ease}.single-file-display .remove-file-button:hover{background-color:var(--matecu-file-input-button-danger-bg-hover)}.multiple-files-display{width:100%}.multiple-files-display .files-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;padding-bottom:8px;border-bottom:1px solid var(--matecu-file-input-border-separator)}.multiple-files-display .files-header h3{font-size:16px;font-weight:600;color:var(--matecu-file-input-text-primary);margin:0}.multiple-files-display .files-header .files-counter{font-size:14px;color:var(--matecu-file-input-text-muted);background-color:var(--matecu-file-input-bg-surface-alt);padding:4px 8px;border-radius:var(--matecu-file-input-border-radius-xl)}.multiple-files-display .files-list{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}.multiple-files-display .file-item{display:flex;align-items:center;gap:12px;padding:12px;background-color:var(--matecu-file-input-bg-surface);border-radius:var(--matecu-file-input-border-radius-md);box-shadow:var(--matecu-file-input-shadow-sm);border:1px solid var(--matecu-file-input-border-separator)}.multiple-files-display .file-item .file-preview-small,.multiple-files-display .file-item .file-icon-small{width:32px;height:32px;background-color:var(--matecu-file-input-bg-surface-alt);border-radius:var(--matecu-file-input-border-radius-sm);display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--matecu-file-input-text-muted);flex-shrink:0}.multiple-files-display .file-item .file-preview-small img,.multiple-files-display .file-item .file-icon-small img{width:100%;height:100%;object-fit:cover;border-radius:var(--matecu-file-input-border-radius-sm)}.multiple-files-display .file-item .file-item-details{flex:1;min-width:0}.multiple-files-display .file-item .file-item-details .file-item-name{font-size:14px;font-weight:500;color:var(--matecu-file-input-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.multiple-files-display .file-item .file-item-details .file-item-size{font-size:12px;color:var(--matecu-file-input-text-muted)}.multiple-files-display .file-item .remove-file-button-small{background-color:var(--matecu-file-input-button-danger-bg);color:var(--matecu-file-input-button-danger-text);border:none;width:24px;height:24px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0;transition:background-color .2s ease}.multiple-files-display .file-item .remove-file-button-small:hover{background-color:var(--matecu-file-input-button-danger-bg-hover)}.multiple-files-display .add-more-button{width:100%;background-color:var(--matecu-file-input-bg-surface-alt);color:var(--matecu-file-input-text-muted);border:var(--matecu-file-input-border-width) dashed var(--matecu-file-input-border-separator);padding:12px;border-radius:var(--matecu-file-input-border-radius-md);cursor:pointer;font-weight:500;transition:all .2s ease}.multiple-files-display .add-more-button:hover{background-color:var(--matecu-file-input-bg-hover);border-color:var(--matecu-file-input-text-disabled)}.error-messages{margin-top:12px}.error-messages .error-message{background-color:var(--matecu-file-input-bg-error);color:var(--matecu-file-input-text-error);padding:8px 12px;border-radius:var(--matecu-file-input-border-radius-sm);border-left:4px solid var(--matecu-file-input-color-error);font-size:14px;margin-bottom:4px}.error-messages .error-message:last-child{margin-bottom:0}@media(max-width:640px){.file-input-container{padding:16px;min-height:100px}.single-file-display .file-info{gap:12px}}@media screen and (max-width:640px)and (max-width:425px){.single-file-display .file-info{flex-direction:column}}@media(max-width:640px){.single-file-display .file-info .file-icon,.single-file-display .file-info .file-preview{width:40px;height:40px}}@media screen and (max-width:640px)and (max-width:425px){.single-file-display .file-info .file-icon,.single-file-display .file-info .file-preview{width:60px;height:60px}}@media(max-width:640px){.single-file-display .file-info .file-icon img,.single-file-display .file-info .file-preview img{width:100%;height:100%;object-fit:cover}.files-header{flex-direction:column;align-items:flex-start;gap:8px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
1589
+ ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<!-- Hidden file input -->\n<input type=\"file\" #fileInput (change)=\"onFileChange($event)\" [multiple]=\"multiple()\" [disabled]=\"isDisabled\"\n [attr.aria-label]=\"ariaLabel() || 'Select file'\" [attr.aria-describedby]=\"hasErrors ? 'file-input-errors' : null\"\n [accept]=\"acceptedMimeTypes().join(',')\" />\n\n<!-- Main drop zone and file display -->\n<div class=\"file-input-container\" [class.drag-over]=\"isDragOver\" [class.disabled]=\"isDisabled\"\n [class.has-files]=\"hasFiles\" [class.has-errors]=\"hasErrors\" [class.loading]=\"isLoading\"\n (dragover)=\"onDragOver($event)\" (dragleave)=\"onDragLeave($event)\" (drop)=\"onDrop($event)\"\n (click)=\"openFileDialog()\">\n <!-- Loading state -->\n @if (isLoading) {\n <div class=\"loading-container\">\n <div class=\"spinner\"></div>\n <span class=\"loading-text\">{{ loadingText() }}</span>\n </div>\n }\n\n <!-- Empty state / Drop zone -->\n @if (!hasFiles && !isLoading) {\n <div class=\"drop-zone\">\n <div class=\"drop-zone-icon\">\n \uD83D\uDCC1\n </div>\n <div class=\"drop-zone-content\">\n <p class=\"drop-zone-title\">{{ placeholder() }}</p>\n <button type=\"button\" class=\"select-button\" [disabled]=\"isDisabled\"\n (click)=\"openFileDialog(); $event.stopPropagation()\">\n {{ buttonText() }}\n </button>\n @if (enableDragDrop() && !isDisabled) {\n }\n </div>\n </div>\n }\n\n <!-- Single file display -->\n @if (!multiple() && file && !isLoading) {\n <div class=\"single-file-display\">\n <div class=\"file-info\">\n <!-- File preview -->\n @if (showPreview() && file.type.startsWith('image/')) {\n <div class=\"file-preview\">\n <img [src]=\"getPreviewUrl(file)\" [alt]=\"file.name\" [style.max-width.px]=\"previewMaxWidth()\"\n [style.max-height.px]=\"previewMaxHeight()\" />\n </div>\n } @else {\n <div class=\"file-icon\">\n {{ getFileIcon(file) }}\n </div>\n }\n\n <div class=\"file-details\">\n <h3 class=\"file-name\">{{ displayName() || file.name }}</h3>\n @if (showFileSize() && selectedFileSize) {\n <p class=\"file-size\">\n {{ formatFileSize(file) }}\n </p>\n }\n <p class=\"file-type\">{{ file.type || 'Unknown type' }}</p>\n </div>\n </div>\n\n <button type=\"button\" class=\"remove-file-button\" (click)=\"removeFile(file); $event.stopPropagation()\"\n [attr.aria-label]=\"'Remove ' + file.name\">\n \u2715\n </button>\n </div>\n }\n\n <!-- Multiple files display -->\n @if (multiple() && files.length > 0 && !isLoading) {\n <div class=\"multiple-files-display\">\n <div class=\"files-header\">\n @if (maxFiles() > 1) {\n <span class=\"files-counter\">{{ files.length }} / {{ maxFiles() }}</span>\n }\n </div>\n\n <div class=\"files-list\">\n @for (file of files; track file.name + file.size; let i = $index) {\n <div class=\"file-item\">\n <!-- File preview -->\n @if (showPreview() && file.type.startsWith('image/')) {\n <div class=\"file-preview-small\">\n <img [src]=\"getPreviewUrl(file)\" [alt]=\"file.name\" />\n </div>\n } @else {\n <div class=\"file-icon-small\">\n {{ getFileIcon(file) }}\n </div>\n }\n\n <div class=\"file-item-details\">\n <div class=\"file-item-name\">{{ file.name }}</div>\n @if (showFileSize()) {\n <div class=\"file-item-size\">\n {{ formatFileSize(file) }}\n </div>\n }\n </div>\n\n <button type=\"button\" class=\"remove-file-button-small\"\n (click)=\"removeFile(file); $event.stopPropagation()\" [attr.aria-label]=\"'Remove ' + file.name\">\n \u2715\n </button>\n </div>\n }\n </div>\n\n <!-- Add more files button -->\n @if (files.length < maxFiles()) { <button type=\"button\" class=\"add-more-button\"\n (click)=\"openFileDialog(); $event.stopPropagation()\">\n {{ changeSelectedFileText() }}\n </button>\n }\n </div>\n }\n</div>\n\n<!-- Error messages -->\n@if (hasErrors) {\n<div id=\"file-input-errors\" class=\"error-messages\" role=\"alert\">\n @for (error of validationErrors; track error) {\n <div class=\"error-message\">{{ error }}</div>\n }\n</div>\n}", styles: [":host{display:block;width:100%}:host>*{box-sizing:border-box}:host{--matecu-file-input-color-primary: #4f46e5;--matecu-file-input-color-primary-hover: #4338ca;--matecu-file-input-color-success: #10b981;--matecu-file-input-color-error: #ef4444;--matecu-file-input-color-error-hover: #dc2626;--matecu-file-input-color-loading: #8b5cf6;--matecu-file-input-color-disabled: #9ca3af;--matecu-file-input-border-default: #e1e5e9;--matecu-file-input-border-hover: var(--matecu-file-input-color-primary);--matecu-file-input-border-success: var(--matecu-file-input-color-success);--matecu-file-input-border-error: var(--matecu-file-input-color-error);--matecu-file-input-border-loading: var(--matecu-file-input-color-loading);--matecu-file-input-border-separator: #e5e7eb;--matecu-file-input-bg-default: #fafbfc;--matecu-file-input-bg-hover: #f8faff;--matecu-file-input-bg-drag-over: #eef2ff;--matecu-file-input-bg-disabled: #f5f5f5;--matecu-file-input-bg-success: #f0fdf4;--matecu-file-input-bg-error: #fef2f2;--matecu-file-input-bg-loading: #faf5ff;--matecu-file-input-bg-surface: #ffffff;--matecu-file-input-bg-surface-alt: #f3f4f6;--matecu-file-input-text-primary: #111827;--matecu-file-input-text-secondary: #374151;--matecu-file-input-text-muted: #6b7280;--matecu-file-input-text-disabled: #9ca3af;--matecu-file-input-text-on-primary: #ffffff;--matecu-file-input-text-error: #dc2626;--matecu-file-input-button-primary-bg: var(--matecu-file-input-color-primary);--matecu-file-input-button-primary-bg-hover: var(--matecu-file-input-color-primary-hover);--matecu-file-input-button-primary-text: var(--matecu-file-input-text-on-primary);--matecu-file-input-button-danger-bg: var(--matecu-file-input-color-error);--matecu-file-input-button-danger-bg-hover: var(--matecu-file-input-color-error-hover);--matecu-file-input-button-danger-text: var(--matecu-file-input-text-on-primary);--matecu-file-input-button-disabled-bg: var(--matecu-file-input-color-disabled);--matecu-file-input-spinner-track: #e5e7eb;--matecu-file-input-spinner-fill: var(--matecu-file-input-color-loading);--matecu-file-input-shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);--matecu-file-input-shadow-md: 0 1px 3px rgba(0, 0, 0, .1);--matecu-file-input-border-radius-sm: 4px;--matecu-file-input-border-radius-md: 6px;--matecu-file-input-border-radius-lg: 8px;--matecu-file-input-border-radius-xl: 12px;--matecu-file-input-border-width: 2px}:host input[type=file]{display:none}.file-input-container{position:relative;border:var(--matecu-file-input-border-width) dashed var(--matecu-file-input-border-default);border-radius:var(--matecu-file-input-border-radius-lg);padding:24px;transition:all .3s ease;background-color:var(--matecu-file-input-bg-default);cursor:pointer;min-height:120px;display:flex;align-items:center;justify-content:center}.file-input-container:hover:not(.disabled){border-color:var(--matecu-file-input-border-hover);background-color:var(--matecu-file-input-bg-hover)}.file-input-container.drag-over{border-color:var(--matecu-file-input-border-hover);background-color:var(--matecu-file-input-bg-drag-over);transform:scale(1.02)}.file-input-container.disabled{opacity:.6;cursor:not-allowed;background-color:var(--matecu-file-input-bg-disabled)}.file-input-container.has-files{border-style:solid;border-color:var(--matecu-file-input-border-success);background-color:var(--matecu-file-input-bg-success)}.file-input-container.has-errors{border-color:var(--matecu-file-input-border-error);background-color:var(--matecu-file-input-bg-error)}.file-input-container.loading{border-color:var(--matecu-file-input-border-loading);background-color:var(--matecu-file-input-bg-loading)}.loading-container{display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--matecu-file-input-text-muted)}.loading-container .spinner{width:32px;height:32px;border:3px solid var(--matecu-file-input-spinner-track);border-top:3px solid var(--matecu-file-input-spinner-fill);border-radius:50%;animation:spin 1s linear infinite}.loading-container .loading-text{font-size:14px;font-weight:500}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.drop-zone{text-align:center;width:100%}.drop-zone .drop-zone-icon{font-size:48px;margin-bottom:16px}.drop-zone .drop-zone-content .drop-zone-title{font-size:16px;font-weight:600;color:var(--matecu-file-input-text-secondary);margin-bottom:12px}.drop-zone .drop-zone-content .drop-zone-subtitle{font-size:14px;color:var(--matecu-file-input-text-muted);margin-top:8px}.drop-zone .select-button{background-color:var(--matecu-file-input-button-primary-bg);color:var(--matecu-file-input-button-primary-text);border:none;padding:12px 24px;border-radius:var(--matecu-file-input-border-radius-md);font-weight:500;cursor:pointer;transition:background-color .2s ease}.drop-zone .select-button:hover:not(:disabled){background-color:var(--matecu-file-input-button-primary-bg-hover)}.drop-zone .select-button:disabled{background-color:var(--matecu-file-input-button-disabled-bg);cursor:not-allowed}.single-file-display{box-sizing:border-box;display:grid;grid-template-columns:1fr 32px;align-items:center;justify-content:space-between;width:100%;padding:16px;background-color:var(--matecu-file-input-bg-surface);border-radius:var(--matecu-file-input-border-radius-md);box-shadow:var(--matecu-file-input-shadow-md)}.single-file-display .file-info{display:flex;align-items:center;gap:16px;overflow:hidden}.single-file-display .file-info .file-preview img{border-radius:var(--matecu-file-input-border-radius-sm);object-fit:cover}.single-file-display .file-info .file-icon{width:48px;height:48px;background-color:var(--matecu-file-input-bg-surface-alt);border-radius:var(--matecu-file-input-border-radius-md);display:flex;align-items:center;justify-content:center;font-size:24px;color:var(--matecu-file-input-text-muted)}.single-file-display .file-info .file-details{max-width:calc(100% - 64px)}.single-file-display .file-info .file-details .file-name{max-width:100%;font-size:16px;font-weight:600;color:var(--matecu-file-input-text-primary);margin:0 0 4px;display:inline-block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.single-file-display .file-info .file-details .file-size{font-size:14px;color:var(--matecu-file-input-text-muted);margin:0 0 2px}.single-file-display .file-info .file-details .file-type{font-size:12px;color:var(--matecu-file-input-text-disabled);margin:0}.single-file-display .remove-file-button{background-color:var(--matecu-file-input-button-danger-bg);color:var(--matecu-file-input-button-danger-text);border:none;width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;transition:background-color .2s ease}.single-file-display .remove-file-button:hover{background-color:var(--matecu-file-input-button-danger-bg-hover)}.multiple-files-display{width:100%}.multiple-files-display .files-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;padding-bottom:8px;border-bottom:1px solid var(--matecu-file-input-border-separator)}.multiple-files-display .files-header h3{font-size:16px;font-weight:600;color:var(--matecu-file-input-text-primary);margin:0}.multiple-files-display .files-header .files-counter{font-size:14px;color:var(--matecu-file-input-text-muted);background-color:var(--matecu-file-input-bg-surface-alt);padding:4px 8px;border-radius:var(--matecu-file-input-border-radius-xl)}.multiple-files-display .files-list{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}.multiple-files-display .file-item{display:flex;align-items:center;gap:12px;padding:12px;background-color:var(--matecu-file-input-bg-surface);border-radius:var(--matecu-file-input-border-radius-md);box-shadow:var(--matecu-file-input-shadow-sm);border:1px solid var(--matecu-file-input-border-separator)}.multiple-files-display .file-item .file-preview-small,.multiple-files-display .file-item .file-icon-small{width:32px;height:32px;background-color:var(--matecu-file-input-bg-surface-alt);border-radius:var(--matecu-file-input-border-radius-sm);display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--matecu-file-input-text-muted);flex-shrink:0}.multiple-files-display .file-item .file-preview-small img,.multiple-files-display .file-item .file-icon-small img{width:100%;height:100%;object-fit:cover;border-radius:var(--matecu-file-input-border-radius-sm)}.multiple-files-display .file-item .file-item-details{flex:1;min-width:0}.multiple-files-display .file-item .file-item-details .file-item-name{font-size:14px;font-weight:500;color:var(--matecu-file-input-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.multiple-files-display .file-item .file-item-details .file-item-size{font-size:12px;color:var(--matecu-file-input-text-muted)}.multiple-files-display .file-item .remove-file-button-small{background-color:var(--matecu-file-input-button-danger-bg);color:var(--matecu-file-input-button-danger-text);border:none;width:24px;height:24px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0;transition:background-color .2s ease}.multiple-files-display .file-item .remove-file-button-small:hover{background-color:var(--matecu-file-input-button-danger-bg-hover)}.multiple-files-display .add-more-button{width:100%;background-color:var(--matecu-file-input-bg-surface-alt);color:var(--matecu-file-input-text-muted);border:var(--matecu-file-input-border-width) dashed var(--matecu-file-input-border-separator);padding:12px;border-radius:var(--matecu-file-input-border-radius-md);cursor:pointer;font-weight:500;transition:all .2s ease}.multiple-files-display .add-more-button:hover{background-color:var(--matecu-file-input-bg-hover);border-color:var(--matecu-file-input-text-disabled)}.error-messages{margin-top:12px}.error-messages .error-message{background-color:var(--matecu-file-input-bg-error);color:var(--matecu-file-input-text-error);padding:8px 12px;border-radius:var(--matecu-file-input-border-radius-sm);border-left:4px solid var(--matecu-file-input-color-error);font-size:14px;margin-bottom:4px}.error-messages .error-message:last-child{margin-bottom:0}@media(max-width:640px){.file-input-container{padding:16px;min-height:100px}.single-file-display .file-info{gap:12px}}@media screen and (max-width:640px)and (max-width:425px){.single-file-display .file-info{flex-direction:column}}@media(max-width:640px){.single-file-display .file-info .file-icon,.single-file-display .file-info .file-preview{width:40px;height:40px}}@media screen and (max-width:640px)and (max-width:425px){.single-file-display .file-info .file-icon,.single-file-display .file-info .file-preview{width:60px;height:60px}}@media(max-width:640px){.single-file-display .file-info .file-icon img,.single-file-display .file-info .file-preview img{width:100%;height:100%;object-fit:cover}.files-header{flex-direction:column;align-items:flex-start;gap:8px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
1666
1590
  }
1667
1591
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuFileInput, decorators: [{
1668
1592
  type: Component,
@@ -1672,82 +1596,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
1672
1596
  multi: true,
1673
1597
  useExisting: MatecuFileInput,
1674
1598
  },
1675
- ], template: "<!-- Hidden file input -->\n<input type=\"file\" #fileInput (change)=\"onFileChange($event)\" [multiple]=\"multiple\" [disabled]=\"isDisabled\"\n [attr.aria-label]=\"ariaLabel || 'Select file'\" [attr.aria-describedby]=\"hasErrors ? 'file-input-errors' : null\"\n [accept]=\"acceptedMimeTypes.join(',')\" />\n\n<!-- Main drop zone and file display -->\n<div class=\"file-input-container\" [class.drag-over]=\"isDragOver\" [class.disabled]=\"isDisabled\"\n [class.has-files]=\"hasFiles\" [class.has-errors]=\"hasErrors\" [class.loading]=\"isLoading\"\n (dragover)=\"onDragOver($event)\" (dragleave)=\"onDragLeave($event)\" (drop)=\"onDrop($event)\"\n (click)=\"openFileDialog()\">\n <!-- Loading state -->\n @if (isLoading) {\n <div class=\"loading-container\">\n <div class=\"spinner\"></div>\n <span class=\"loading-text\">{{ loadingText }}</span>\n </div>\n }\n\n <!-- Empty state / Drop zone -->\n @if (!hasFiles && !isLoading) {\n <div class=\"drop-zone\">\n <div class=\"drop-zone-icon\">\n \uD83D\uDCC1\n </div>\n <div class=\"drop-zone-content\">\n <p class=\"drop-zone-title\">{{ placeholder }}</p>\n <button type=\"button\" class=\"select-button\" [disabled]=\"isDisabled\"\n (click)=\"openFileDialog(); $event.stopPropagation()\">\n {{ buttonText }}\n </button>\n @if (enableDragDrop && !isDisabled) {\n }\n </div>\n </div>\n }\n\n <!-- Single file display -->\n @if (!multiple && file && !isLoading) {\n <div class=\"single-file-display\">\n <div class=\"file-info\">\n <!-- File preview -->\n @if (showPreview && file.type.startsWith('image/')) {\n <div class=\"file-preview\">\n <img [src]=\"getPreviewUrl(file)\" [alt]=\"file.name\" [style.max-width.px]=\"previewMaxWidth\"\n [style.max-height.px]=\"previewMaxHeight\" />\n </div>\n } @else {\n <div class=\"file-icon\">\n {{ getFileIcon(file) }}\n </div>\n }\n\n <div class=\"file-details\">\n <h3 class=\"file-name\">{{ displayName || file.name }}</h3>\n @if (showFileSize && selectedFileSize) {\n <p class=\"file-size\">\n {{ formatFileSize(file) }}\n </p>\n }\n <p class=\"file-type\">{{ file.type || 'Unknown type' }}</p>\n </div>\n </div>\n\n <button type=\"button\" class=\"remove-file-button\" (click)=\"removeFile(file); $event.stopPropagation()\"\n [attr.aria-label]=\"'Remove ' + file.name\">\n \u2715\n </button>\n </div>\n }\n\n <!-- Multiple files display -->\n @if (multiple && files.length > 0 && !isLoading) {\n <div class=\"multiple-files-display\">\n <div class=\"files-header\">\n @if (maxFiles > 1) {\n <span class=\"files-counter\">{{ files.length }} / {{ maxFiles }}</span>\n }\n </div>\n\n <div class=\"files-list\">\n @for (file of files; track file.name + file.size; let i = $index) {\n <div class=\"file-item\">\n <!-- File preview -->\n @if (showPreview && file.type.startsWith('image/')) {\n <div class=\"file-preview-small\">\n <img [src]=\"getPreviewUrl(file)\" [alt]=\"file.name\" />\n </div>\n } @else {\n <div class=\"file-icon-small\">\n {{ getFileIcon(file) }}\n </div>\n }\n\n <div class=\"file-item-details\">\n <div class=\"file-item-name\">{{ file.name }}</div>\n @if (showFileSize) {\n <div class=\"file-item-size\">\n {{ formatFileSize(file) }}\n </div>\n }\n </div>\n\n <button type=\"button\" class=\"remove-file-button-small\"\n (click)=\"removeFile(file); $event.stopPropagation()\" [attr.aria-label]=\"'Remove ' + file.name\">\n \u2715\n </button>\n </div>\n }\n </div>\n\n <!-- Add more files button -->\n @if (files.length < maxFiles) { <button type=\"button\" class=\"add-more-button\"\n (click)=\"openFileDialog(); $event.stopPropagation()\">\n {{ changeSelectedFileText }}\n </button>\n }\n </div>\n }\n</div>\n\n<!-- Error messages -->\n@if (hasErrors) {\n<div id=\"file-input-errors\" class=\"error-messages\" role=\"alert\">\n @for (error of validationErrors; track error) {\n <div class=\"error-message\">{{ error }}</div>\n }\n</div>\n}", styles: [":host{display:block;width:100%}:host>*{box-sizing:border-box}:host{--matecu-file-input-color-primary: #4f46e5;--matecu-file-input-color-primary-hover: #4338ca;--matecu-file-input-color-success: #10b981;--matecu-file-input-color-error: #ef4444;--matecu-file-input-color-error-hover: #dc2626;--matecu-file-input-color-loading: #8b5cf6;--matecu-file-input-color-disabled: #9ca3af;--matecu-file-input-border-default: #e1e5e9;--matecu-file-input-border-hover: var(--matecu-file-input-color-primary);--matecu-file-input-border-success: var(--matecu-file-input-color-success);--matecu-file-input-border-error: var(--matecu-file-input-color-error);--matecu-file-input-border-loading: var(--matecu-file-input-color-loading);--matecu-file-input-border-separator: #e5e7eb;--matecu-file-input-bg-default: #fafbfc;--matecu-file-input-bg-hover: #f8faff;--matecu-file-input-bg-drag-over: #eef2ff;--matecu-file-input-bg-disabled: #f5f5f5;--matecu-file-input-bg-success: #f0fdf4;--matecu-file-input-bg-error: #fef2f2;--matecu-file-input-bg-loading: #faf5ff;--matecu-file-input-bg-surface: #ffffff;--matecu-file-input-bg-surface-alt: #f3f4f6;--matecu-file-input-text-primary: #111827;--matecu-file-input-text-secondary: #374151;--matecu-file-input-text-muted: #6b7280;--matecu-file-input-text-disabled: #9ca3af;--matecu-file-input-text-on-primary: #ffffff;--matecu-file-input-text-error: #dc2626;--matecu-file-input-button-primary-bg: var(--matecu-file-input-color-primary);--matecu-file-input-button-primary-bg-hover: var(--matecu-file-input-color-primary-hover);--matecu-file-input-button-primary-text: var(--matecu-file-input-text-on-primary);--matecu-file-input-button-danger-bg: var(--matecu-file-input-color-error);--matecu-file-input-button-danger-bg-hover: var(--matecu-file-input-color-error-hover);--matecu-file-input-button-danger-text: var(--matecu-file-input-text-on-primary);--matecu-file-input-button-disabled-bg: var(--matecu-file-input-color-disabled);--matecu-file-input-spinner-track: #e5e7eb;--matecu-file-input-spinner-fill: var(--matecu-file-input-color-loading);--matecu-file-input-shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);--matecu-file-input-shadow-md: 0 1px 3px rgba(0, 0, 0, .1);--matecu-file-input-border-radius-sm: 4px;--matecu-file-input-border-radius-md: 6px;--matecu-file-input-border-radius-lg: 8px;--matecu-file-input-border-radius-xl: 12px;--matecu-file-input-border-width: 2px}:host input[type=file]{display:none}.file-input-container{position:relative;border:var(--matecu-file-input-border-width) dashed var(--matecu-file-input-border-default);border-radius:var(--matecu-file-input-border-radius-lg);padding:24px;transition:all .3s ease;background-color:var(--matecu-file-input-bg-default);cursor:pointer;min-height:120px;display:flex;align-items:center;justify-content:center}.file-input-container:hover:not(.disabled){border-color:var(--matecu-file-input-border-hover);background-color:var(--matecu-file-input-bg-hover)}.file-input-container.drag-over{border-color:var(--matecu-file-input-border-hover);background-color:var(--matecu-file-input-bg-drag-over);transform:scale(1.02)}.file-input-container.disabled{opacity:.6;cursor:not-allowed;background-color:var(--matecu-file-input-bg-disabled)}.file-input-container.has-files{border-style:solid;border-color:var(--matecu-file-input-border-success);background-color:var(--matecu-file-input-bg-success)}.file-input-container.has-errors{border-color:var(--matecu-file-input-border-error);background-color:var(--matecu-file-input-bg-error)}.file-input-container.loading{border-color:var(--matecu-file-input-border-loading);background-color:var(--matecu-file-input-bg-loading)}.loading-container{display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--matecu-file-input-text-muted)}.loading-container .spinner{width:32px;height:32px;border:3px solid var(--matecu-file-input-spinner-track);border-top:3px solid var(--matecu-file-input-spinner-fill);border-radius:50%;animation:spin 1s linear infinite}.loading-container .loading-text{font-size:14px;font-weight:500}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.drop-zone{text-align:center;width:100%}.drop-zone .drop-zone-icon{font-size:48px;margin-bottom:16px}.drop-zone .drop-zone-content .drop-zone-title{font-size:16px;font-weight:600;color:var(--matecu-file-input-text-secondary);margin-bottom:12px}.drop-zone .drop-zone-content .drop-zone-subtitle{font-size:14px;color:var(--matecu-file-input-text-muted);margin-top:8px}.drop-zone .select-button{background-color:var(--matecu-file-input-button-primary-bg);color:var(--matecu-file-input-button-primary-text);border:none;padding:12px 24px;border-radius:var(--matecu-file-input-border-radius-md);font-weight:500;cursor:pointer;transition:background-color .2s ease}.drop-zone .select-button:hover:not(:disabled){background-color:var(--matecu-file-input-button-primary-bg-hover)}.drop-zone .select-button:disabled{background-color:var(--matecu-file-input-button-disabled-bg);cursor:not-allowed}.single-file-display{box-sizing:border-box;display:grid;grid-template-columns:1fr 32px;align-items:center;justify-content:space-between;width:100%;padding:16px;background-color:var(--matecu-file-input-bg-surface);border-radius:var(--matecu-file-input-border-radius-md);box-shadow:var(--matecu-file-input-shadow-md)}.single-file-display .file-info{display:flex;align-items:center;gap:16px;overflow:hidden}.single-file-display .file-info .file-preview img{border-radius:var(--matecu-file-input-border-radius-sm);object-fit:cover}.single-file-display .file-info .file-icon{width:48px;height:48px;background-color:var(--matecu-file-input-bg-surface-alt);border-radius:var(--matecu-file-input-border-radius-md);display:flex;align-items:center;justify-content:center;font-size:24px;color:var(--matecu-file-input-text-muted)}.single-file-display .file-info .file-details{max-width:calc(100% - 64px)}.single-file-display .file-info .file-details .file-name{max-width:100%;font-size:16px;font-weight:600;color:var(--matecu-file-input-text-primary);margin:0 0 4px;display:inline-block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.single-file-display .file-info .file-details .file-size{font-size:14px;color:var(--matecu-file-input-text-muted);margin:0 0 2px}.single-file-display .file-info .file-details .file-type{font-size:12px;color:var(--matecu-file-input-text-disabled);margin:0}.single-file-display .remove-file-button{background-color:var(--matecu-file-input-button-danger-bg);color:var(--matecu-file-input-button-danger-text);border:none;width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;transition:background-color .2s ease}.single-file-display .remove-file-button:hover{background-color:var(--matecu-file-input-button-danger-bg-hover)}.multiple-files-display{width:100%}.multiple-files-display .files-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;padding-bottom:8px;border-bottom:1px solid var(--matecu-file-input-border-separator)}.multiple-files-display .files-header h3{font-size:16px;font-weight:600;color:var(--matecu-file-input-text-primary);margin:0}.multiple-files-display .files-header .files-counter{font-size:14px;color:var(--matecu-file-input-text-muted);background-color:var(--matecu-file-input-bg-surface-alt);padding:4px 8px;border-radius:var(--matecu-file-input-border-radius-xl)}.multiple-files-display .files-list{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}.multiple-files-display .file-item{display:flex;align-items:center;gap:12px;padding:12px;background-color:var(--matecu-file-input-bg-surface);border-radius:var(--matecu-file-input-border-radius-md);box-shadow:var(--matecu-file-input-shadow-sm);border:1px solid var(--matecu-file-input-border-separator)}.multiple-files-display .file-item .file-preview-small,.multiple-files-display .file-item .file-icon-small{width:32px;height:32px;background-color:var(--matecu-file-input-bg-surface-alt);border-radius:var(--matecu-file-input-border-radius-sm);display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--matecu-file-input-text-muted);flex-shrink:0}.multiple-files-display .file-item .file-preview-small img,.multiple-files-display .file-item .file-icon-small img{width:100%;height:100%;object-fit:cover;border-radius:var(--matecu-file-input-border-radius-sm)}.multiple-files-display .file-item .file-item-details{flex:1;min-width:0}.multiple-files-display .file-item .file-item-details .file-item-name{font-size:14px;font-weight:500;color:var(--matecu-file-input-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.multiple-files-display .file-item .file-item-details .file-item-size{font-size:12px;color:var(--matecu-file-input-text-muted)}.multiple-files-display .file-item .remove-file-button-small{background-color:var(--matecu-file-input-button-danger-bg);color:var(--matecu-file-input-button-danger-text);border:none;width:24px;height:24px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0;transition:background-color .2s ease}.multiple-files-display .file-item .remove-file-button-small:hover{background-color:var(--matecu-file-input-button-danger-bg-hover)}.multiple-files-display .add-more-button{width:100%;background-color:var(--matecu-file-input-bg-surface-alt);color:var(--matecu-file-input-text-muted);border:var(--matecu-file-input-border-width) dashed var(--matecu-file-input-border-separator);padding:12px;border-radius:var(--matecu-file-input-border-radius-md);cursor:pointer;font-weight:500;transition:all .2s ease}.multiple-files-display .add-more-button:hover{background-color:var(--matecu-file-input-bg-hover);border-color:var(--matecu-file-input-text-disabled)}.error-messages{margin-top:12px}.error-messages .error-message{background-color:var(--matecu-file-input-bg-error);color:var(--matecu-file-input-text-error);padding:8px 12px;border-radius:var(--matecu-file-input-border-radius-sm);border-left:4px solid var(--matecu-file-input-color-error);font-size:14px;margin-bottom:4px}.error-messages .error-message:last-child{margin-bottom:0}@media(max-width:640px){.file-input-container{padding:16px;min-height:100px}.single-file-display .file-info{gap:12px}}@media screen and (max-width:640px)and (max-width:425px){.single-file-display .file-info{flex-direction:column}}@media(max-width:640px){.single-file-display .file-info .file-icon,.single-file-display .file-info .file-preview{width:40px;height:40px}}@media screen and (max-width:640px)and (max-width:425px){.single-file-display .file-info .file-icon,.single-file-display .file-info .file-preview{width:60px;height:60px}}@media(max-width:640px){.single-file-display .file-info .file-icon img,.single-file-display .file-info .file-preview img{width:100%;height:100%;object-fit:cover}.files-header{flex-direction:column;align-items:flex-start;gap:8px}}\n"] }]
1599
+ ], template: "<!-- Hidden file input -->\n<input type=\"file\" #fileInput (change)=\"onFileChange($event)\" [multiple]=\"multiple()\" [disabled]=\"isDisabled\"\n [attr.aria-label]=\"ariaLabel() || 'Select file'\" [attr.aria-describedby]=\"hasErrors ? 'file-input-errors' : null\"\n [accept]=\"acceptedMimeTypes().join(',')\" />\n\n<!-- Main drop zone and file display -->\n<div class=\"file-input-container\" [class.drag-over]=\"isDragOver\" [class.disabled]=\"isDisabled\"\n [class.has-files]=\"hasFiles\" [class.has-errors]=\"hasErrors\" [class.loading]=\"isLoading\"\n (dragover)=\"onDragOver($event)\" (dragleave)=\"onDragLeave($event)\" (drop)=\"onDrop($event)\"\n (click)=\"openFileDialog()\">\n <!-- Loading state -->\n @if (isLoading) {\n <div class=\"loading-container\">\n <div class=\"spinner\"></div>\n <span class=\"loading-text\">{{ loadingText() }}</span>\n </div>\n }\n\n <!-- Empty state / Drop zone -->\n @if (!hasFiles && !isLoading) {\n <div class=\"drop-zone\">\n <div class=\"drop-zone-icon\">\n \uD83D\uDCC1\n </div>\n <div class=\"drop-zone-content\">\n <p class=\"drop-zone-title\">{{ placeholder() }}</p>\n <button type=\"button\" class=\"select-button\" [disabled]=\"isDisabled\"\n (click)=\"openFileDialog(); $event.stopPropagation()\">\n {{ buttonText() }}\n </button>\n @if (enableDragDrop() && !isDisabled) {\n }\n </div>\n </div>\n }\n\n <!-- Single file display -->\n @if (!multiple() && file && !isLoading) {\n <div class=\"single-file-display\">\n <div class=\"file-info\">\n <!-- File preview -->\n @if (showPreview() && file.type.startsWith('image/')) {\n <div class=\"file-preview\">\n <img [src]=\"getPreviewUrl(file)\" [alt]=\"file.name\" [style.max-width.px]=\"previewMaxWidth()\"\n [style.max-height.px]=\"previewMaxHeight()\" />\n </div>\n } @else {\n <div class=\"file-icon\">\n {{ getFileIcon(file) }}\n </div>\n }\n\n <div class=\"file-details\">\n <h3 class=\"file-name\">{{ displayName() || file.name }}</h3>\n @if (showFileSize() && selectedFileSize) {\n <p class=\"file-size\">\n {{ formatFileSize(file) }}\n </p>\n }\n <p class=\"file-type\">{{ file.type || 'Unknown type' }}</p>\n </div>\n </div>\n\n <button type=\"button\" class=\"remove-file-button\" (click)=\"removeFile(file); $event.stopPropagation()\"\n [attr.aria-label]=\"'Remove ' + file.name\">\n \u2715\n </button>\n </div>\n }\n\n <!-- Multiple files display -->\n @if (multiple() && files.length > 0 && !isLoading) {\n <div class=\"multiple-files-display\">\n <div class=\"files-header\">\n @if (maxFiles() > 1) {\n <span class=\"files-counter\">{{ files.length }} / {{ maxFiles() }}</span>\n }\n </div>\n\n <div class=\"files-list\">\n @for (file of files; track file.name + file.size; let i = $index) {\n <div class=\"file-item\">\n <!-- File preview -->\n @if (showPreview() && file.type.startsWith('image/')) {\n <div class=\"file-preview-small\">\n <img [src]=\"getPreviewUrl(file)\" [alt]=\"file.name\" />\n </div>\n } @else {\n <div class=\"file-icon-small\">\n {{ getFileIcon(file) }}\n </div>\n }\n\n <div class=\"file-item-details\">\n <div class=\"file-item-name\">{{ file.name }}</div>\n @if (showFileSize()) {\n <div class=\"file-item-size\">\n {{ formatFileSize(file) }}\n </div>\n }\n </div>\n\n <button type=\"button\" class=\"remove-file-button-small\"\n (click)=\"removeFile(file); $event.stopPropagation()\" [attr.aria-label]=\"'Remove ' + file.name\">\n \u2715\n </button>\n </div>\n }\n </div>\n\n <!-- Add more files button -->\n @if (files.length < maxFiles()) { <button type=\"button\" class=\"add-more-button\"\n (click)=\"openFileDialog(); $event.stopPropagation()\">\n {{ changeSelectedFileText() }}\n </button>\n }\n </div>\n }\n</div>\n\n<!-- Error messages -->\n@if (hasErrors) {\n<div id=\"file-input-errors\" class=\"error-messages\" role=\"alert\">\n @for (error of validationErrors; track error) {\n <div class=\"error-message\">{{ error }}</div>\n }\n</div>\n}", styles: [":host{display:block;width:100%}:host>*{box-sizing:border-box}:host{--matecu-file-input-color-primary: #4f46e5;--matecu-file-input-color-primary-hover: #4338ca;--matecu-file-input-color-success: #10b981;--matecu-file-input-color-error: #ef4444;--matecu-file-input-color-error-hover: #dc2626;--matecu-file-input-color-loading: #8b5cf6;--matecu-file-input-color-disabled: #9ca3af;--matecu-file-input-border-default: #e1e5e9;--matecu-file-input-border-hover: var(--matecu-file-input-color-primary);--matecu-file-input-border-success: var(--matecu-file-input-color-success);--matecu-file-input-border-error: var(--matecu-file-input-color-error);--matecu-file-input-border-loading: var(--matecu-file-input-color-loading);--matecu-file-input-border-separator: #e5e7eb;--matecu-file-input-bg-default: #fafbfc;--matecu-file-input-bg-hover: #f8faff;--matecu-file-input-bg-drag-over: #eef2ff;--matecu-file-input-bg-disabled: #f5f5f5;--matecu-file-input-bg-success: #f0fdf4;--matecu-file-input-bg-error: #fef2f2;--matecu-file-input-bg-loading: #faf5ff;--matecu-file-input-bg-surface: #ffffff;--matecu-file-input-bg-surface-alt: #f3f4f6;--matecu-file-input-text-primary: #111827;--matecu-file-input-text-secondary: #374151;--matecu-file-input-text-muted: #6b7280;--matecu-file-input-text-disabled: #9ca3af;--matecu-file-input-text-on-primary: #ffffff;--matecu-file-input-text-error: #dc2626;--matecu-file-input-button-primary-bg: var(--matecu-file-input-color-primary);--matecu-file-input-button-primary-bg-hover: var(--matecu-file-input-color-primary-hover);--matecu-file-input-button-primary-text: var(--matecu-file-input-text-on-primary);--matecu-file-input-button-danger-bg: var(--matecu-file-input-color-error);--matecu-file-input-button-danger-bg-hover: var(--matecu-file-input-color-error-hover);--matecu-file-input-button-danger-text: var(--matecu-file-input-text-on-primary);--matecu-file-input-button-disabled-bg: var(--matecu-file-input-color-disabled);--matecu-file-input-spinner-track: #e5e7eb;--matecu-file-input-spinner-fill: var(--matecu-file-input-color-loading);--matecu-file-input-shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);--matecu-file-input-shadow-md: 0 1px 3px rgba(0, 0, 0, .1);--matecu-file-input-border-radius-sm: 4px;--matecu-file-input-border-radius-md: 6px;--matecu-file-input-border-radius-lg: 8px;--matecu-file-input-border-radius-xl: 12px;--matecu-file-input-border-width: 2px}:host input[type=file]{display:none}.file-input-container{position:relative;border:var(--matecu-file-input-border-width) dashed var(--matecu-file-input-border-default);border-radius:var(--matecu-file-input-border-radius-lg);padding:24px;transition:all .3s ease;background-color:var(--matecu-file-input-bg-default);cursor:pointer;min-height:120px;display:flex;align-items:center;justify-content:center}.file-input-container:hover:not(.disabled){border-color:var(--matecu-file-input-border-hover);background-color:var(--matecu-file-input-bg-hover)}.file-input-container.drag-over{border-color:var(--matecu-file-input-border-hover);background-color:var(--matecu-file-input-bg-drag-over);transform:scale(1.02)}.file-input-container.disabled{opacity:.6;cursor:not-allowed;background-color:var(--matecu-file-input-bg-disabled)}.file-input-container.has-files{border-style:solid;border-color:var(--matecu-file-input-border-success);background-color:var(--matecu-file-input-bg-success)}.file-input-container.has-errors{border-color:var(--matecu-file-input-border-error);background-color:var(--matecu-file-input-bg-error)}.file-input-container.loading{border-color:var(--matecu-file-input-border-loading);background-color:var(--matecu-file-input-bg-loading)}.loading-container{display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--matecu-file-input-text-muted)}.loading-container .spinner{width:32px;height:32px;border:3px solid var(--matecu-file-input-spinner-track);border-top:3px solid var(--matecu-file-input-spinner-fill);border-radius:50%;animation:spin 1s linear infinite}.loading-container .loading-text{font-size:14px;font-weight:500}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.drop-zone{text-align:center;width:100%}.drop-zone .drop-zone-icon{font-size:48px;margin-bottom:16px}.drop-zone .drop-zone-content .drop-zone-title{font-size:16px;font-weight:600;color:var(--matecu-file-input-text-secondary);margin-bottom:12px}.drop-zone .drop-zone-content .drop-zone-subtitle{font-size:14px;color:var(--matecu-file-input-text-muted);margin-top:8px}.drop-zone .select-button{background-color:var(--matecu-file-input-button-primary-bg);color:var(--matecu-file-input-button-primary-text);border:none;padding:12px 24px;border-radius:var(--matecu-file-input-border-radius-md);font-weight:500;cursor:pointer;transition:background-color .2s ease}.drop-zone .select-button:hover:not(:disabled){background-color:var(--matecu-file-input-button-primary-bg-hover)}.drop-zone .select-button:disabled{background-color:var(--matecu-file-input-button-disabled-bg);cursor:not-allowed}.single-file-display{box-sizing:border-box;display:grid;grid-template-columns:1fr 32px;align-items:center;justify-content:space-between;width:100%;padding:16px;background-color:var(--matecu-file-input-bg-surface);border-radius:var(--matecu-file-input-border-radius-md);box-shadow:var(--matecu-file-input-shadow-md)}.single-file-display .file-info{display:flex;align-items:center;gap:16px;overflow:hidden}.single-file-display .file-info .file-preview img{border-radius:var(--matecu-file-input-border-radius-sm);object-fit:cover}.single-file-display .file-info .file-icon{width:48px;height:48px;background-color:var(--matecu-file-input-bg-surface-alt);border-radius:var(--matecu-file-input-border-radius-md);display:flex;align-items:center;justify-content:center;font-size:24px;color:var(--matecu-file-input-text-muted)}.single-file-display .file-info .file-details{max-width:calc(100% - 64px)}.single-file-display .file-info .file-details .file-name{max-width:100%;font-size:16px;font-weight:600;color:var(--matecu-file-input-text-primary);margin:0 0 4px;display:inline-block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.single-file-display .file-info .file-details .file-size{font-size:14px;color:var(--matecu-file-input-text-muted);margin:0 0 2px}.single-file-display .file-info .file-details .file-type{font-size:12px;color:var(--matecu-file-input-text-disabled);margin:0}.single-file-display .remove-file-button{background-color:var(--matecu-file-input-button-danger-bg);color:var(--matecu-file-input-button-danger-text);border:none;width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;transition:background-color .2s ease}.single-file-display .remove-file-button:hover{background-color:var(--matecu-file-input-button-danger-bg-hover)}.multiple-files-display{width:100%}.multiple-files-display .files-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;padding-bottom:8px;border-bottom:1px solid var(--matecu-file-input-border-separator)}.multiple-files-display .files-header h3{font-size:16px;font-weight:600;color:var(--matecu-file-input-text-primary);margin:0}.multiple-files-display .files-header .files-counter{font-size:14px;color:var(--matecu-file-input-text-muted);background-color:var(--matecu-file-input-bg-surface-alt);padding:4px 8px;border-radius:var(--matecu-file-input-border-radius-xl)}.multiple-files-display .files-list{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}.multiple-files-display .file-item{display:flex;align-items:center;gap:12px;padding:12px;background-color:var(--matecu-file-input-bg-surface);border-radius:var(--matecu-file-input-border-radius-md);box-shadow:var(--matecu-file-input-shadow-sm);border:1px solid var(--matecu-file-input-border-separator)}.multiple-files-display .file-item .file-preview-small,.multiple-files-display .file-item .file-icon-small{width:32px;height:32px;background-color:var(--matecu-file-input-bg-surface-alt);border-radius:var(--matecu-file-input-border-radius-sm);display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--matecu-file-input-text-muted);flex-shrink:0}.multiple-files-display .file-item .file-preview-small img,.multiple-files-display .file-item .file-icon-small img{width:100%;height:100%;object-fit:cover;border-radius:var(--matecu-file-input-border-radius-sm)}.multiple-files-display .file-item .file-item-details{flex:1;min-width:0}.multiple-files-display .file-item .file-item-details .file-item-name{font-size:14px;font-weight:500;color:var(--matecu-file-input-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.multiple-files-display .file-item .file-item-details .file-item-size{font-size:12px;color:var(--matecu-file-input-text-muted)}.multiple-files-display .file-item .remove-file-button-small{background-color:var(--matecu-file-input-button-danger-bg);color:var(--matecu-file-input-button-danger-text);border:none;width:24px;height:24px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0;transition:background-color .2s ease}.multiple-files-display .file-item .remove-file-button-small:hover{background-color:var(--matecu-file-input-button-danger-bg-hover)}.multiple-files-display .add-more-button{width:100%;background-color:var(--matecu-file-input-bg-surface-alt);color:var(--matecu-file-input-text-muted);border:var(--matecu-file-input-border-width) dashed var(--matecu-file-input-border-separator);padding:12px;border-radius:var(--matecu-file-input-border-radius-md);cursor:pointer;font-weight:500;transition:all .2s ease}.multiple-files-display .add-more-button:hover{background-color:var(--matecu-file-input-bg-hover);border-color:var(--matecu-file-input-text-disabled)}.error-messages{margin-top:12px}.error-messages .error-message{background-color:var(--matecu-file-input-bg-error);color:var(--matecu-file-input-text-error);padding:8px 12px;border-radius:var(--matecu-file-input-border-radius-sm);border-left:4px solid var(--matecu-file-input-color-error);font-size:14px;margin-bottom:4px}.error-messages .error-message:last-child{margin-bottom:0}@media(max-width:640px){.file-input-container{padding:16px;min-height:100px}.single-file-display .file-info{gap:12px}}@media screen and (max-width:640px)and (max-width:425px){.single-file-display .file-info{flex-direction:column}}@media(max-width:640px){.single-file-display .file-info .file-icon,.single-file-display .file-info .file-preview{width:40px;height:40px}}@media screen and (max-width:640px)and (max-width:425px){.single-file-display .file-info .file-icon,.single-file-display .file-info .file-preview{width:60px;height:60px}}@media(max-width:640px){.single-file-display .file-info .file-icon img,.single-file-display .file-info .file-preview img{width:100%;height:100%;object-fit:cover}.files-header{flex-direction:column;align-items:flex-start;gap:8px}}\n"] }]
1676
1600
  }], propDecorators: { fileInput: [{
1677
1601
  type: ViewChild,
1678
1602
  args: ['fileInput']
1679
- }], optimizeImage: [{
1680
- type: Input
1681
- }], optimizeImageToSize: [{
1682
- type: Input
1683
- }], maxFileSize: [{
1684
- type: Input
1685
- }], maxFiles: [{
1686
- type: Input
1687
- }], multiple: [{
1688
- type: Input
1689
- }], showFileSize: [{
1690
- type: Input
1691
- }], fileSizeUnit: [{
1692
- type: Input
1693
- }], displayName: [{
1694
- type: Input
1695
- }], placeholder: [{
1696
- type: Input
1697
- }], buttonText: [{
1698
- type: Input
1699
- }], changeSelectedFileText: [{
1700
- type: Input
1701
- }], loadingText: [{
1702
- type: Input
1703
- }], ariaLabel: [{
1704
- type: Input
1705
- }], acceptedMimeTypes: [{
1706
- type: Input
1707
- }], acceptedExtensions: [{
1708
- type: Input
1709
- }], errorMessages: [{
1710
- type: Input
1711
- }], enableDragDrop: [{
1712
- type: Input
1713
- }], showPreview: [{
1714
- type: Input
1715
- }], previewMaxWidth: [{
1716
- type: Input
1717
- }], previewMaxHeight: [{
1718
- type: Input
1719
- }], showProgress: [{
1720
- type: Input
1721
- }], fileSelected: [{
1722
- type: Output
1723
- }], filesSelected: [{
1724
- type: Output
1725
- }], fileRemoved: [{
1726
- type: Output
1727
- }], validationError: [{
1728
- type: Output
1729
- }], dragEnter: [{
1730
- type: Output
1731
- }], dragLeave: [{
1732
- type: Output
1733
- }], stateChange: [{
1734
- type: Output
1735
- }] } });
1603
+ }], optimizeImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "optimizeImage", required: false }] }], optimizeImageToSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "optimizeImageToSize", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], maxFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFiles", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], showFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFileSize", required: false }] }], fileSizeUnit: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileSizeUnit", required: false }] }], displayName: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayName", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], buttonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonText", required: false }] }], changeSelectedFileText: [{ type: i0.Input, args: [{ isSignal: true, alias: "changeSelectedFileText", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], acceptedMimeTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptedMimeTypes", required: false }] }], acceptedExtensions: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptedExtensions", required: false }] }], errorMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessages", required: false }] }], enableDragDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableDragDrop", required: false }] }], showPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPreview", required: false }] }], previewMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewMaxWidth", required: false }] }], previewMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewMaxHeight", required: false }] }], showProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "showProgress", required: false }] }], fileSelected: [{ type: i0.Output, args: ["fileSelected"] }], filesSelected: [{ type: i0.Output, args: ["filesSelected"] }], fileRemoved: [{ type: i0.Output, args: ["fileRemoved"] }], validationError: [{ type: i0.Output, args: ["validationError"] }], dragEnter: [{ type: i0.Output, args: ["dragEnter"] }], dragLeave: [{ type: i0.Output, args: ["dragLeave"] }], stateChange: [{ type: i0.Output, args: ["stateChange"] }] } });
1736
1604
 
1737
1605
  class MatecuDatetimePicker {
1738
1606
  value = null;
1739
1607
  disabled = false;
1740
- dateLabel = 'Select date';
1741
- timeLabel = 'Select time';
1742
- apparance = 'fill';
1743
- matTimepickerMin = null;
1744
- matTimepickerMax = null;
1745
- minDate = null;
1746
- maxDate = null;
1747
- timeInterval = null;
1748
- timeOptions = null;
1749
- matDatepickerFilter = null;
1750
- valueChange = new EventEmitter();
1608
+ dateLabel = input('Select date', ...(ngDevMode ? [{ debugName: "dateLabel" }] : []));
1609
+ timeLabel = input('Select time', ...(ngDevMode ? [{ debugName: "timeLabel" }] : []));
1610
+ apparance = input('fill', ...(ngDevMode ? [{ debugName: "apparance" }] : []));
1611
+ matTimepickerMin = input(null, ...(ngDevMode ? [{ debugName: "matTimepickerMin" }] : []));
1612
+ matTimepickerMax = input(null, ...(ngDevMode ? [{ debugName: "matTimepickerMax" }] : []));
1613
+ minDate = input(null, ...(ngDevMode ? [{ debugName: "minDate" }] : []));
1614
+ maxDate = input(null, ...(ngDevMode ? [{ debugName: "maxDate" }] : []));
1615
+ timeInterval = input(null, ...(ngDevMode ? [{ debugName: "timeInterval" }] : []));
1616
+ timeOptions = input(null, ...(ngDevMode ? [{ debugName: "timeOptions" }] : []));
1617
+ matDatepickerFilter = input(null, ...(ngDevMode ? [{ debugName: "matDatepickerFilter" }] : []));
1618
+ valueChange = output();
1751
1619
  onChange = () => { };
1752
1620
  onTouched = () => { };
1753
1621
  writeValue(value) {
@@ -1778,29 +1646,34 @@ class MatecuDatetimePicker {
1778
1646
  return { invalidDate: true };
1779
1647
  }
1780
1648
  const dateValue = control.value;
1781
- if (this.minDate && dateValue < this.minDate) {
1782
- return { minDate: { min: this.minDate, actual: dateValue } };
1649
+ const minDate = this.minDate();
1650
+ if (minDate && dateValue < minDate) {
1651
+ return { minDate: { min: minDate, actual: dateValue } };
1783
1652
  }
1784
- if (this.maxDate && dateValue > this.maxDate) {
1785
- return { maxDate: { max: this.maxDate, actual: dateValue } };
1653
+ const maxDate = this.maxDate();
1654
+ if (maxDate && dateValue > maxDate) {
1655
+ return { maxDate: { max: maxDate, actual: dateValue } };
1786
1656
  }
1787
1657
  // Validar tiempo mínimo
1788
- if (this.matTimepickerMin) {
1789
- const minTimeError = this.validateMinTime(dateValue, this.matTimepickerMin);
1658
+ const matTimepickerMin = this.matTimepickerMin();
1659
+ if (matTimepickerMin) {
1660
+ const minTimeError = this.validateMinTime(dateValue, matTimepickerMin);
1790
1661
  if (minTimeError) {
1791
1662
  return minTimeError;
1792
1663
  }
1793
1664
  }
1794
1665
  // Validar tiempo máximo
1795
- if (this.matTimepickerMax) {
1796
- const maxTimeError = this.validateMaxTime(dateValue, this.matTimepickerMax);
1666
+ const matTimepickerMax = this.matTimepickerMax();
1667
+ if (matTimepickerMax) {
1668
+ const maxTimeError = this.validateMaxTime(dateValue, matTimepickerMax);
1797
1669
  if (maxTimeError) {
1798
1670
  return maxTimeError;
1799
1671
  }
1800
1672
  }
1801
1673
  // Validar contra timeOptions si están disponibles
1802
- if (this.timeOptions && this.timeOptions.length > 0) {
1803
- const timeOptionsError = this.validateTimeOptions(dateValue, this.timeOptions);
1674
+ const timeOptions = this.timeOptions();
1675
+ if (timeOptions && timeOptions.length > 0) {
1676
+ const timeOptionsError = this.validateTimeOptions(dateValue, timeOptions);
1804
1677
  if (timeOptionsError) {
1805
1678
  return timeOptionsError;
1806
1679
  }
@@ -1873,7 +1746,7 @@ class MatecuDatetimePicker {
1873
1746
  return date instanceof Date && !isNaN(date.getTime());
1874
1747
  }
1875
1748
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuDatetimePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
1876
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: MatecuDatetimePicker, isStandalone: true, selector: "matecu-datetime-picker", inputs: { dateLabel: "dateLabel", timeLabel: "timeLabel", apparance: "apparance", matTimepickerMin: "matTimepickerMin", matTimepickerMax: "matTimepickerMax", minDate: "minDate", maxDate: "maxDate", timeInterval: "timeInterval", timeOptions: "timeOptions", matDatepickerFilter: "matDatepickerFilter" }, outputs: { valueChange: "valueChange" }, providers: [
1749
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: MatecuDatetimePicker, isStandalone: true, selector: "matecu-datetime-picker", inputs: { dateLabel: { classPropertyName: "dateLabel", publicName: "dateLabel", isSignal: true, isRequired: false, transformFunction: null }, timeLabel: { classPropertyName: "timeLabel", publicName: "timeLabel", isSignal: true, isRequired: false, transformFunction: null }, apparance: { classPropertyName: "apparance", publicName: "apparance", isSignal: true, isRequired: false, transformFunction: null }, matTimepickerMin: { classPropertyName: "matTimepickerMin", publicName: "matTimepickerMin", isSignal: true, isRequired: false, transformFunction: null }, matTimepickerMax: { classPropertyName: "matTimepickerMax", publicName: "matTimepickerMax", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, timeInterval: { classPropertyName: "timeInterval", publicName: "timeInterval", isSignal: true, isRequired: false, transformFunction: null }, timeOptions: { classPropertyName: "timeOptions", publicName: "timeOptions", isSignal: true, isRequired: false, transformFunction: null }, matDatepickerFilter: { classPropertyName: "matDatepickerFilter", publicName: "matDatepickerFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [
1877
1750
  provideNativeDateAdapter(),
1878
1751
  {
1879
1752
  provide: NG_VALUE_ACCESSOR,
@@ -1885,7 +1758,7 @@ class MatecuDatetimePicker {
1885
1758
  useExisting: MatecuDatetimePicker,
1886
1759
  multi: true,
1887
1760
  },
1888
- ], ngImport: i0, template: "<div class=\"matecu-datetime-picker-content\">\n <mat-form-field [appearance]=\"apparance\">\n <mat-label>{{ dateLabel }}</mat-label>\n <input matInput [matDatepicker]=\"datepicker\" [ngModel]=\"value\" (ngModelChange)=\"onDateChange($event)\"\n [disabled]=\"disabled\" [min]=\"minDate\" [max]=\"maxDate\" [matDatepickerFilter]=\"matDatepickerFilter\"\n (blur)=\"onBlur()\" />\n <mat-datepicker #datepicker />\n <mat-datepicker-toggle [for]=\"datepicker\" matSuffix />\n\n <mat-hint> <ng-content select=\"[mat-hint-date]\"></ng-content> </mat-hint>\n <mat-error> <ng-content select=\"[mat-error-date]\"></ng-content> </mat-error>\n </mat-form-field>\n\n <mat-form-field [appearance]=\"apparance\">\n <mat-label>{{ timeLabel }}</mat-label>\n <input matInput [matTimepicker]=\"timepicker\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\"\n [ngModelOptions]=\"{ updateOn: 'blur' }\" [disabled]=\"disabled\" [matTimepickerMin]=\"matTimepickerMin\"\n [matTimepickerMax]=\"matTimepickerMax\" (blur)=\"onBlur()\" />\n <mat-timepicker #timepicker [options]=\"timeOptions\" [interval]=\"timeInterval\" />\n <mat-timepicker-toggle [for]=\"timepicker\" matSuffix />\n\n <mat-hint> <ng-content select=\"[mat-hint-time]\"></ng-content> </mat-hint>\n <mat-error> <ng-content select=\"[mat-error-time]\"></ng-content> </mat-error>\n </mat-form-field>\n</div>", styles: [":host{display:block;container-type:inline-size;--matecu-datetime-picker-mobile-bg: #f1f5f9}:host .matecu-datetime-picker-content{display:flex;gap:8px}:host .matecu-datetime-picker-content>mat-form-field:last-of-type{max-width:140px}@container (width <= 400px){:host .matecu-datetime-picker-content{flex-direction:column;background-color:var(--matecu-datetime-picker-mobile-bg);gap:25px;padding:10px 10px 15px}:host .matecu-datetime-picker-content>mat-form-field:last-of-type{max-width:unset}}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: i3$2.MatTimepicker, selector: "mat-timepicker", inputs: ["interval", "options", "disableRipple", "aria-label", "aria-labelledby", "panelClass"], outputs: ["selected", "opened", "closed"], exportAs: ["matTimepicker"] }, { kind: "directive", type: i3$2.MatTimepickerInput, selector: "input[matTimepicker]", inputs: ["value", "matTimepicker", "matTimepickerMin", "matTimepickerMax", "matTimepickerOpenOnClick", "disabled"], outputs: ["valueChange"], exportAs: ["matTimepickerInput"] }, { kind: "component", type: i3$2.MatTimepickerToggle, selector: "mat-timepicker-toggle", inputs: ["for", "aria-label", "aria-labelledby", "disabled", "tabIndex", "disableRipple"], exportAs: ["matTimepickerToggle"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1761
+ ], ngImport: i0, template: "<div class=\"matecu-datetime-picker-content\">\n <mat-form-field [appearance]=\"apparance()\">\n <mat-label>{{ dateLabel() }}</mat-label>\n <input matInput [matDatepicker]=\"datepicker\" [ngModel]=\"value\" (ngModelChange)=\"onDateChange($event)\"\n [disabled]=\"disabled\" [min]=\"minDate()\" [max]=\"maxDate()\" [matDatepickerFilter]=\"matDatepickerFilter()\"\n (blur)=\"onBlur()\" />\n <mat-datepicker #datepicker />\n <mat-datepicker-toggle [for]=\"datepicker\" matSuffix />\n\n <mat-hint> <ng-content select=\"[mat-hint-date]\"></ng-content> </mat-hint>\n <mat-error> <ng-content select=\"[mat-error-date]\"></ng-content> </mat-error>\n </mat-form-field>\n\n <mat-form-field [appearance]=\"apparance()\">\n <mat-label>{{ timeLabel() }}</mat-label>\n <input matInput [matTimepicker]=\"timepicker\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\"\n [ngModelOptions]=\"{ updateOn: 'blur' }\" [disabled]=\"disabled\" [matTimepickerMin]=\"matTimepickerMin()\"\n [matTimepickerMax]=\"matTimepickerMax()\" (blur)=\"onBlur()\" />\n <mat-timepicker #timepicker [options]=\"timeOptions()\" [interval]=\"timeInterval()\" />\n <mat-timepicker-toggle [for]=\"timepicker\" matSuffix />\n\n <mat-hint> <ng-content select=\"[mat-hint-time]\"></ng-content> </mat-hint>\n <mat-error> <ng-content select=\"[mat-error-time]\"></ng-content> </mat-error>\n </mat-form-field>\n</div>", styles: [":host{display:block;container-type:inline-size;--matecu-datetime-picker-mobile-bg: #f1f5f9}:host .matecu-datetime-picker-content{display:flex;gap:8px}:host .matecu-datetime-picker-content>mat-form-field:last-of-type{max-width:140px}@container (width <= 400px){:host .matecu-datetime-picker-content{flex-direction:column;background-color:var(--matecu-datetime-picker-mobile-bg);gap:25px;padding:10px 10px 15px}:host .matecu-datetime-picker-content>mat-form-field:last-of-type{max-width:unset}}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTimepickerModule }, { kind: "component", type: i3$2.MatTimepicker, selector: "mat-timepicker", inputs: ["interval", "options", "disableRipple", "aria-label", "aria-labelledby", "panelClass"], outputs: ["selected", "opened", "closed"], exportAs: ["matTimepicker"] }, { kind: "directive", type: i3$2.MatTimepickerInput, selector: "input[matTimepicker]", inputs: ["value", "matTimepicker", "matTimepickerMin", "matTimepickerMax", "matTimepickerOpenOnClick", "disabled"], outputs: ["valueChange"], exportAs: ["matTimepickerInput"] }, { kind: "component", type: i3$2.MatTimepickerToggle, selector: "mat-timepicker-toggle", inputs: ["for", "aria-label", "aria-labelledby", "disabled", "tabIndex", "disableRipple"], exportAs: ["matTimepickerToggle"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1889
1762
  }
1890
1763
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MatecuDatetimePicker, decorators: [{
1891
1764
  type: Component,
@@ -1907,30 +1780,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
1907
1780
  useExisting: MatecuDatetimePicker,
1908
1781
  multi: true,
1909
1782
  },
1910
- ], template: "<div class=\"matecu-datetime-picker-content\">\n <mat-form-field [appearance]=\"apparance\">\n <mat-label>{{ dateLabel }}</mat-label>\n <input matInput [matDatepicker]=\"datepicker\" [ngModel]=\"value\" (ngModelChange)=\"onDateChange($event)\"\n [disabled]=\"disabled\" [min]=\"minDate\" [max]=\"maxDate\" [matDatepickerFilter]=\"matDatepickerFilter\"\n (blur)=\"onBlur()\" />\n <mat-datepicker #datepicker />\n <mat-datepicker-toggle [for]=\"datepicker\" matSuffix />\n\n <mat-hint> <ng-content select=\"[mat-hint-date]\"></ng-content> </mat-hint>\n <mat-error> <ng-content select=\"[mat-error-date]\"></ng-content> </mat-error>\n </mat-form-field>\n\n <mat-form-field [appearance]=\"apparance\">\n <mat-label>{{ timeLabel }}</mat-label>\n <input matInput [matTimepicker]=\"timepicker\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\"\n [ngModelOptions]=\"{ updateOn: 'blur' }\" [disabled]=\"disabled\" [matTimepickerMin]=\"matTimepickerMin\"\n [matTimepickerMax]=\"matTimepickerMax\" (blur)=\"onBlur()\" />\n <mat-timepicker #timepicker [options]=\"timeOptions\" [interval]=\"timeInterval\" />\n <mat-timepicker-toggle [for]=\"timepicker\" matSuffix />\n\n <mat-hint> <ng-content select=\"[mat-hint-time]\"></ng-content> </mat-hint>\n <mat-error> <ng-content select=\"[mat-error-time]\"></ng-content> </mat-error>\n </mat-form-field>\n</div>", styles: [":host{display:block;container-type:inline-size;--matecu-datetime-picker-mobile-bg: #f1f5f9}:host .matecu-datetime-picker-content{display:flex;gap:8px}:host .matecu-datetime-picker-content>mat-form-field:last-of-type{max-width:140px}@container (width <= 400px){:host .matecu-datetime-picker-content{flex-direction:column;background-color:var(--matecu-datetime-picker-mobile-bg);gap:25px;padding:10px 10px 15px}:host .matecu-datetime-picker-content>mat-form-field:last-of-type{max-width:unset}}\n"] }]
1911
- }], propDecorators: { dateLabel: [{
1912
- type: Input
1913
- }], timeLabel: [{
1914
- type: Input
1915
- }], apparance: [{
1916
- type: Input
1917
- }], matTimepickerMin: [{
1918
- type: Input
1919
- }], matTimepickerMax: [{
1920
- type: Input
1921
- }], minDate: [{
1922
- type: Input
1923
- }], maxDate: [{
1924
- type: Input
1925
- }], timeInterval: [{
1926
- type: Input
1927
- }], timeOptions: [{
1928
- type: Input
1929
- }], matDatepickerFilter: [{
1930
- type: Input
1931
- }], valueChange: [{
1932
- type: Output
1933
- }] } });
1783
+ ], template: "<div class=\"matecu-datetime-picker-content\">\n <mat-form-field [appearance]=\"apparance()\">\n <mat-label>{{ dateLabel() }}</mat-label>\n <input matInput [matDatepicker]=\"datepicker\" [ngModel]=\"value\" (ngModelChange)=\"onDateChange($event)\"\n [disabled]=\"disabled\" [min]=\"minDate()\" [max]=\"maxDate()\" [matDatepickerFilter]=\"matDatepickerFilter()\"\n (blur)=\"onBlur()\" />\n <mat-datepicker #datepicker />\n <mat-datepicker-toggle [for]=\"datepicker\" matSuffix />\n\n <mat-hint> <ng-content select=\"[mat-hint-date]\"></ng-content> </mat-hint>\n <mat-error> <ng-content select=\"[mat-error-date]\"></ng-content> </mat-error>\n </mat-form-field>\n\n <mat-form-field [appearance]=\"apparance()\">\n <mat-label>{{ timeLabel() }}</mat-label>\n <input matInput [matTimepicker]=\"timepicker\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\"\n [ngModelOptions]=\"{ updateOn: 'blur' }\" [disabled]=\"disabled\" [matTimepickerMin]=\"matTimepickerMin()\"\n [matTimepickerMax]=\"matTimepickerMax()\" (blur)=\"onBlur()\" />\n <mat-timepicker #timepicker [options]=\"timeOptions()\" [interval]=\"timeInterval()\" />\n <mat-timepicker-toggle [for]=\"timepicker\" matSuffix />\n\n <mat-hint> <ng-content select=\"[mat-hint-time]\"></ng-content> </mat-hint>\n <mat-error> <ng-content select=\"[mat-error-time]\"></ng-content> </mat-error>\n </mat-form-field>\n</div>", styles: [":host{display:block;container-type:inline-size;--matecu-datetime-picker-mobile-bg: #f1f5f9}:host .matecu-datetime-picker-content{display:flex;gap:8px}:host .matecu-datetime-picker-content>mat-form-field:last-of-type{max-width:140px}@container (width <= 400px){:host .matecu-datetime-picker-content{flex-direction:column;background-color:var(--matecu-datetime-picker-mobile-bg);gap:25px;padding:10px 10px 15px}:host .matecu-datetime-picker-content>mat-form-field:last-of-type{max-width:unset}}\n"] }]
1784
+ }], propDecorators: { dateLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateLabel", required: false }] }], timeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeLabel", required: false }] }], apparance: [{ type: i0.Input, args: [{ isSignal: true, alias: "apparance", required: false }] }], matTimepickerMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "matTimepickerMin", required: false }] }], matTimepickerMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "matTimepickerMax", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], timeInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeInterval", required: false }] }], timeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeOptions", required: false }] }], matDatepickerFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "matDatepickerFilter", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
1934
1785
 
1935
1786
  /*
1936
1787
  * Public API Surface of angular-matecu