@cauca-911/material 21.0.2 → 21.0.4
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,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, ChangeDetectionStrategy, Component, input, output, signal, inject, HostListener, computed, Injector, ElementRef, Directive, forwardRef, model, TemplateRef, Optional, Self, ContentChild, ViewChild, resource, effect,
|
|
2
|
+
import { Injectable, ChangeDetectionStrategy, Component, input, output, signal, inject, HostListener, computed, Injector, ElementRef, Directive, forwardRef, model, TemplateRef, Input, Optional, Self, ContentChild, ViewChild, resource, effect, NgModule, EventEmitter, Output } from '@angular/core';
|
|
3
3
|
import * as i1 from '@ngx-translate/core';
|
|
4
4
|
import { TranslateModule, TranslatePipe, TranslateService } from '@ngx-translate/core';
|
|
5
5
|
import * as i1$5 from '@angular/material/dialog';
|
|
@@ -538,6 +538,7 @@ function CaucaDateTimePickerComponent_Conditional_1_Template(rf, ctx) { if (rf &
|
|
|
538
538
|
} }
|
|
539
539
|
class CaucaDateTimePickerComponent {
|
|
540
540
|
constructor() {
|
|
541
|
+
this.value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
541
542
|
this.subscriptSizing = input('fixed', ...(ngDevMode ? [{ debugName: "subscriptSizing" }] : []));
|
|
542
543
|
this.showTime = input(true, ...(ngDevMode ? [{ debugName: "showTime" }] : []));
|
|
543
544
|
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
@@ -552,7 +553,7 @@ class CaucaDateTimePickerComponent {
|
|
|
552
553
|
this.showClearButton = input(true, ...(ngDevMode ? [{ debugName: "showClearButton" }] : []));
|
|
553
554
|
this.showButtonIcons = input(true, ...(ngDevMode ? [{ debugName: "showButtonIcons" }] : []));
|
|
554
555
|
this.selectedChange = output();
|
|
555
|
-
this.stringDate =
|
|
556
|
+
this.stringDate = computed(() => this.value() ? this.stringifyDate(this.value()) : '', ...(ngDevMode ? [{ debugName: "stringDate" }] : []));
|
|
556
557
|
this.isRequired = computed(() => Boolean(this.control?.hasValidator(Validators.required)), ...(ngDevMode ? [{ debugName: "isRequired" }] : []));
|
|
557
558
|
this.injector = inject(Injector);
|
|
558
559
|
this.elementRef = inject(ElementRef);
|
|
@@ -561,12 +562,6 @@ class CaucaDateTimePickerComponent {
|
|
|
561
562
|
this.onChange = (value) => value;
|
|
562
563
|
this.onTouched = () => { };
|
|
563
564
|
}
|
|
564
|
-
set value(value) {
|
|
565
|
-
if (value) {
|
|
566
|
-
this.stringDate.set(this.stringifyDate(value));
|
|
567
|
-
this.selectedDate = value;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
565
|
ngOnInit() {
|
|
571
566
|
const ngControl = this.injector.get(NgControl, null, { self: true, optional: true });
|
|
572
567
|
if (ngControl instanceof FormControlName) {
|
|
@@ -585,15 +580,14 @@ class CaucaDateTimePickerComponent {
|
|
|
585
580
|
});
|
|
586
581
|
dialogRef.afterClosed().subscribe((data) => {
|
|
587
582
|
if (data) {
|
|
588
|
-
this.
|
|
589
|
-
this.selectedDate = data.value;
|
|
583
|
+
this.value.set(data.value);
|
|
590
584
|
this.selectedChange.emit(data.value);
|
|
591
585
|
this.onChange(data.value);
|
|
592
586
|
}
|
|
593
587
|
});
|
|
594
588
|
}
|
|
595
589
|
writeValue(date) {
|
|
596
|
-
this.value
|
|
590
|
+
this.value.set(date);
|
|
597
591
|
}
|
|
598
592
|
registerOnChange(fn) {
|
|
599
593
|
this.onChange = fn;
|
|
@@ -603,7 +597,7 @@ class CaucaDateTimePickerComponent {
|
|
|
603
597
|
}
|
|
604
598
|
getDateTimePickerOptions() {
|
|
605
599
|
return {
|
|
606
|
-
selectedDate: this.
|
|
600
|
+
selectedDate: this.value(),
|
|
607
601
|
minimumDate: this.minimumDate(),
|
|
608
602
|
maximumDate: this.maximumDate(),
|
|
609
603
|
showSeconds: this.showSeconds(),
|
|
@@ -2781,7 +2775,7 @@ class DropdownChipAutocompleteComponent {
|
|
|
2781
2775
|
} }, hostVars: 3, hostBindings: function DropdownChipAutocompleteComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
2782
2776
|
i0.ɵɵdomProperty("id", ctx.id);
|
|
2783
2777
|
i0.ɵɵclassProp("floating", ctx.shouldLabelFloat);
|
|
2784
|
-
} }, inputs: { listAutoComplete: [1, "listAutoComplete"], keyValue: [1, "keyValue"], displayValue: [1, "displayValue"], allowRemove: [1, "allowRemove"], ariaDescribedBy: [1, "ariaDescribedBy"], canRemoveAll: [1, "canRemoveAll"], hasOptionTemplate: [1, "hasOptionTemplate"] }, outputs: { clearAll: "clearAll" }, features: [i0.ɵɵProvidersFeature([{
|
|
2778
|
+
} }, inputs: { listAutoComplete: [1, "listAutoComplete"], keyValue: [1, "keyValue"], displayValue: [1, "displayValue"], allowRemove: [1, "allowRemove"], ariaDescribedBy: [1, "ariaDescribedBy"], canRemoveAll: [1, "canRemoveAll"], hasOptionTemplate: [1, "hasOptionTemplate"], value: "value", required: "required", disabled: "disabled", placeholder: "placeholder" }, outputs: { clearAll: "clearAll" }, features: [i0.ɵɵProvidersFeature([{
|
|
2785
2779
|
provide: MatFormFieldControl,
|
|
2786
2780
|
useExisting: DropdownChipAutocompleteComponent,
|
|
2787
2781
|
}])], decls: 16, vars: 10, consts: [["chipGrid", ""], ["chipInput", ""], ["auto", "matAutocomplete"], ["role", "group", 1, "dropdown-chip-autocomplete-container"], [3, "disabled"], ["highlighted", "", "color", "primary", 3, "disabled"], [1, "input-wrapper"], [3, "ngModelChange", "ngModel", "matAutocomplete", "matChipInputFor", "matChipInputSeparatorKeyCodes"], ["matPrefix", "", 1, "clearAll"], ["matSuffix", ""], ["panelWidth", "500px", 3, "optionSelected"], [1, "full-width-option", 3, "value"], ["highlighted", "", "color", "primary", 3, "removed", "disabled"], ["matChipRemove", ""], ["matPrefix", "", 1, "clearAll", 3, "click"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function DropdownChipAutocompleteComponent_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -2861,8 +2855,16 @@ class DropdownChipAutocompleteComponent {
|
|
|
2861
2855
|
type: Optional
|
|
2862
2856
|
}], parentFormGroup: [{
|
|
2863
2857
|
type: Optional
|
|
2858
|
+
}], value: [{
|
|
2859
|
+
type: Input
|
|
2860
|
+
}], required: [{
|
|
2861
|
+
type: Input
|
|
2862
|
+
}], disabled: [{
|
|
2863
|
+
type: Input
|
|
2864
|
+
}], placeholder: [{
|
|
2865
|
+
type: Input
|
|
2864
2866
|
}] }); })();
|
|
2865
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DropdownChipAutocompleteComponent, { className: "DropdownChipAutocompleteComponent", filePath: "lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.ts", lineNumber:
|
|
2867
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DropdownChipAutocompleteComponent, { className: "DropdownChipAutocompleteComponent", filePath: "lib/components/inputs/dropdown-chip-autocomplete/dropdown-chip-autocomplete.component.ts", lineNumber: 51 }); })();
|
|
2866
2868
|
|
|
2867
2869
|
class ColorPickerComponent {
|
|
2868
2870
|
static { this.nextId = 0; }
|