matcha-components 20.207.0 → 20.208.0
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.
- package/fesm2022/matcha-components.mjs +217 -37
- package/fesm2022/matcha-components.mjs.map +1 -1
- package/index.d.ts +45 -22
- package/package.json +1 -1
|
@@ -3930,11 +3930,11 @@ class MatchaLabelComponent {
|
|
|
3930
3930
|
}
|
|
3931
3931
|
}
|
|
3932
3932
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaLabelComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3933
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaLabelComponent, isStandalone: false, selector: "matcha-label", inputs: { color: "color" }, ngImport: i0, template: "<label\n class=\"d-flex d-flex-align-center position-relative text-nowrap px-4 fs-12 lh-18 fw-700 color-{{color}}\"\n style=\"transform: translateY(-8px);\">\n <ng-content></ng-content>\n <span *ngIf=\"isRequired\"> *</span>\n <!-- <span class=\"pl-4 fs-10 fw-400 lh-16
|
|
3933
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaLabelComponent, isStandalone: false, selector: "matcha-label", inputs: { color: "color" }, ngImport: i0, template: "<label\n class=\"d-flex d-flex-align-center position-relative text-nowrap px-4 fs-12 lh-18 fw-700 color-{{color}}\"\n style=\"transform: translateY(-8px);\">\n <ng-content></ng-content>\n <span *ngIf=\"isRequired\"> *</span>\n <!-- <span class=\"pl-4 fs-10 fw-400 lh-16 color-grey\">(Opcional)</span> -->\n</label>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
3934
3934
|
}
|
|
3935
3935
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaLabelComponent, decorators: [{
|
|
3936
3936
|
type: Component,
|
|
3937
|
-
args: [{ selector: 'matcha-label', standalone: false, template: "<label\n class=\"d-flex d-flex-align-center position-relative text-nowrap px-4 fs-12 lh-18 fw-700 color-{{color}}\"\n style=\"transform: translateY(-8px);\">\n <ng-content></ng-content>\n <span *ngIf=\"isRequired\"> *</span>\n <!-- <span class=\"pl-4 fs-10 fw-400 lh-16
|
|
3937
|
+
args: [{ selector: 'matcha-label', standalone: false, template: "<label\n class=\"d-flex d-flex-align-center position-relative text-nowrap px-4 fs-12 lh-18 fw-700 color-{{color}}\"\n style=\"transform: translateY(-8px);\">\n <ng-content></ng-content>\n <span *ngIf=\"isRequired\"> *</span>\n <!-- <span class=\"pl-4 fs-10 fw-400 lh-16 color-grey\">(Opcional)</span> -->\n</label>\n" }]
|
|
3938
3938
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { color: [{
|
|
3939
3939
|
type: Input
|
|
3940
3940
|
}] } });
|
|
@@ -8891,7 +8891,202 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
8891
8891
|
|
|
8892
8892
|
class MatchaTimeComponent {
|
|
8893
8893
|
constructor() {
|
|
8894
|
-
|
|
8894
|
+
this.placeholder = '__:__';
|
|
8895
|
+
this.disabled = false;
|
|
8896
|
+
this.showNativePicker = true;
|
|
8897
|
+
this.displayValue = '';
|
|
8898
|
+
this.value = '';
|
|
8899
|
+
this.isDisabled = false;
|
|
8900
|
+
this.onChange = (_value) => { };
|
|
8901
|
+
this.onTouched = () => { };
|
|
8902
|
+
this.onValidatorChange = () => { };
|
|
8903
|
+
}
|
|
8904
|
+
// ControlValueAccessor methods
|
|
8905
|
+
writeValue(value) {
|
|
8906
|
+
if (value && typeof value === 'string' && /^\d{2}:\d{2}$/.test(value)) {
|
|
8907
|
+
this.displayValue = value;
|
|
8908
|
+
this.value = value;
|
|
8909
|
+
}
|
|
8910
|
+
else {
|
|
8911
|
+
this.displayValue = '';
|
|
8912
|
+
this.value = '';
|
|
8913
|
+
}
|
|
8914
|
+
if (this.textInput?.nativeElement) {
|
|
8915
|
+
this.textInput.nativeElement.value = this.displayValue;
|
|
8916
|
+
}
|
|
8917
|
+
if (this.nativeTimeInput?.nativeElement) {
|
|
8918
|
+
this.nativeTimeInput.nativeElement.value = this.value;
|
|
8919
|
+
}
|
|
8920
|
+
}
|
|
8921
|
+
registerOnChange(fn) {
|
|
8922
|
+
this.onChange = fn;
|
|
8923
|
+
}
|
|
8924
|
+
registerOnTouched(fn) {
|
|
8925
|
+
this.onTouched = fn;
|
|
8926
|
+
}
|
|
8927
|
+
setDisabledState(isDisabled) {
|
|
8928
|
+
this.isDisabled = isDisabled;
|
|
8929
|
+
this.disabled = isDisabled;
|
|
8930
|
+
}
|
|
8931
|
+
registerOnValidatorChange(fn) {
|
|
8932
|
+
this.onValidatorChange = fn;
|
|
8933
|
+
}
|
|
8934
|
+
// Validator
|
|
8935
|
+
validate(_control) {
|
|
8936
|
+
if (this.displayValue.length === 5 && !this.isValidTime(this.displayValue)) {
|
|
8937
|
+
return { invalidTime: true };
|
|
8938
|
+
}
|
|
8939
|
+
return null;
|
|
8940
|
+
}
|
|
8941
|
+
// Text input handlers
|
|
8942
|
+
onInputChange(event) {
|
|
8943
|
+
const input = event.target;
|
|
8944
|
+
const masked = this.applyTimeMask(input.value);
|
|
8945
|
+
if (input.value !== masked) {
|
|
8946
|
+
input.value = masked;
|
|
8947
|
+
}
|
|
8948
|
+
this.displayValue = masked;
|
|
8949
|
+
if (masked.length === 5 && this.isValidTime(masked)) {
|
|
8950
|
+
this.value = masked;
|
|
8951
|
+
this.onChange(masked);
|
|
8952
|
+
if (this.nativeTimeInput?.nativeElement) {
|
|
8953
|
+
this.nativeTimeInput.nativeElement.value = masked;
|
|
8954
|
+
}
|
|
8955
|
+
}
|
|
8956
|
+
else {
|
|
8957
|
+
this.value = '';
|
|
8958
|
+
this.onChange(null);
|
|
8959
|
+
}
|
|
8960
|
+
this.onValidatorChange();
|
|
8961
|
+
}
|
|
8962
|
+
onKeyDown(event) {
|
|
8963
|
+
const allowedKeys = ['Backspace', 'Delete', 'Tab', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'];
|
|
8964
|
+
const isCtrl = event.ctrlKey || event.metaKey;
|
|
8965
|
+
const isAllowedCtrl = isCtrl && ['a', 'c', 'v', 'x'].includes(event.key.toLowerCase());
|
|
8966
|
+
if (allowedKeys.includes(event.key) || isAllowedCtrl) {
|
|
8967
|
+
return;
|
|
8968
|
+
}
|
|
8969
|
+
if (!/[0-9:]/.test(event.key)) {
|
|
8970
|
+
event.preventDefault();
|
|
8971
|
+
}
|
|
8972
|
+
}
|
|
8973
|
+
onBlur() {
|
|
8974
|
+
this.onTouched();
|
|
8975
|
+
this.onValidatorChange();
|
|
8976
|
+
}
|
|
8977
|
+
// Native time picker handlers
|
|
8978
|
+
onNativeTimeChange(event) {
|
|
8979
|
+
const input = event.target;
|
|
8980
|
+
const value = input.value; // HH:MM from native picker
|
|
8981
|
+
if (value) {
|
|
8982
|
+
this.value = value;
|
|
8983
|
+
this.displayValue = value;
|
|
8984
|
+
if (this.textInput?.nativeElement) {
|
|
8985
|
+
this.textInput.nativeElement.value = value;
|
|
8986
|
+
}
|
|
8987
|
+
this.onChange(value);
|
|
8988
|
+
}
|
|
8989
|
+
else {
|
|
8990
|
+
this.value = '';
|
|
8991
|
+
this.displayValue = '';
|
|
8992
|
+
if (this.textInput?.nativeElement) {
|
|
8993
|
+
this.textInput.nativeElement.value = '';
|
|
8994
|
+
}
|
|
8995
|
+
this.onChange(null);
|
|
8996
|
+
}
|
|
8997
|
+
this.onValidatorChange();
|
|
8998
|
+
}
|
|
8999
|
+
openNativeTimePicker() {
|
|
9000
|
+
if (this.nativeTimeInput?.nativeElement && !this.disabled && !this.isDisabled) {
|
|
9001
|
+
if (typeof this.nativeTimeInput.nativeElement.showPicker === 'function') {
|
|
9002
|
+
this.nativeTimeInput.nativeElement.showPicker();
|
|
9003
|
+
}
|
|
9004
|
+
else {
|
|
9005
|
+
this.nativeTimeInput.nativeElement.focus();
|
|
9006
|
+
this.nativeTimeInput.nativeElement.click();
|
|
9007
|
+
}
|
|
9008
|
+
}
|
|
9009
|
+
}
|
|
9010
|
+
applyTimeMask(value) {
|
|
9011
|
+
const digits = value.replace(/\D/g, '').slice(0, 4);
|
|
9012
|
+
if (digits.length <= 2) {
|
|
9013
|
+
return digits;
|
|
9014
|
+
}
|
|
9015
|
+
return `${digits.slice(0, 2)}:${digits.slice(2)}`;
|
|
9016
|
+
}
|
|
9017
|
+
isValidTime(value) {
|
|
9018
|
+
if (!/^\d{2}:\d{2}$/.test(value)) {
|
|
9019
|
+
return false;
|
|
9020
|
+
}
|
|
9021
|
+
const [hours, minutes] = value.split(':').map(Number);
|
|
9022
|
+
return hours >= 0 && hours <= 23 && minutes >= 0 && minutes <= 59;
|
|
9023
|
+
}
|
|
9024
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9025
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaTimeComponent, isStandalone: false, selector: "matcha-time", inputs: { placeholder: "placeholder", disabled: "disabled", showNativePicker: "showNativePicker" }, providers: [
|
|
9026
|
+
{
|
|
9027
|
+
provide: NG_VALUE_ACCESSOR,
|
|
9028
|
+
useExisting: forwardRef(() => MatchaTimeComponent),
|
|
9029
|
+
multi: true
|
|
9030
|
+
},
|
|
9031
|
+
{
|
|
9032
|
+
provide: NG_VALIDATORS,
|
|
9033
|
+
useExisting: forwardRef(() => MatchaTimeComponent),
|
|
9034
|
+
multi: true
|
|
9035
|
+
}
|
|
9036
|
+
], viewQueries: [{ propertyName: "textInput", first: true, predicate: ["textInput"], descendants: true }, { propertyName: "nativeTimeInput", first: true, predicate: ["nativeTimeInput"], descendants: true }], ngImport: i0, template: "<div class=\"matcha-time-container\">\n <input\n #textInput\n type=\"text\"\n class=\"matcha-time-input\"\n [value]=\"displayValue\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled || isDisabled\"\n maxlength=\"5\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <!-- Input nativo de hora (hidden) para usar o timepicker nativo -->\n <input\n #nativeTimeInput\n type=\"time\"\n class=\"matcha-time-native-input\"\n [value]=\"value\"\n [disabled]=\"disabled || isDisabled\"\n (change)=\"onNativeTimeChange($event)\"\n tabindex=\"-1\"\n />\n\n <!-- Bot\u00E3o para abrir timepicker nativo (opcional) -->\n <button\n *ngIf=\"showNativePicker && !disabled && !isDisabled\"\n type=\"button\"\n class=\"matcha-time-picker-button mr--12\"\n (click)=\"openNativeTimePicker()\"\n [disabled]=\"disabled || isDisabled\"\n aria-label=\"Abrir seletor de hora\"\n tabindex=\"0\"\n >\n <span class=\"i-matcha-clock-out color-grey\"></span>\n </button>\n</div>\n", styles: [".matcha-time-container{position:relative;display:flex;align-items:center;width:100%}.matcha-time-input{width:100%}.matcha-time-native-input{position:absolute;opacity:0;pointer-events:none;width:0;height:0;border:none;padding:0;margin:0}.matcha-time-picker-button{position:absolute;right:8px;background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;z-index:1}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
9037
|
+
}
|
|
9038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeComponent, decorators: [{
|
|
9039
|
+
type: Component,
|
|
9040
|
+
args: [{ selector: 'matcha-time', encapsulation: ViewEncapsulation.None, standalone: false, providers: [
|
|
9041
|
+
{
|
|
9042
|
+
provide: NG_VALUE_ACCESSOR,
|
|
9043
|
+
useExisting: forwardRef(() => MatchaTimeComponent),
|
|
9044
|
+
multi: true
|
|
9045
|
+
},
|
|
9046
|
+
{
|
|
9047
|
+
provide: NG_VALIDATORS,
|
|
9048
|
+
useExisting: forwardRef(() => MatchaTimeComponent),
|
|
9049
|
+
multi: true
|
|
9050
|
+
}
|
|
9051
|
+
], template: "<div class=\"matcha-time-container\">\n <input\n #textInput\n type=\"text\"\n class=\"matcha-time-input\"\n [value]=\"displayValue\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled || isDisabled\"\n maxlength=\"5\"\n (input)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <!-- Input nativo de hora (hidden) para usar o timepicker nativo -->\n <input\n #nativeTimeInput\n type=\"time\"\n class=\"matcha-time-native-input\"\n [value]=\"value\"\n [disabled]=\"disabled || isDisabled\"\n (change)=\"onNativeTimeChange($event)\"\n tabindex=\"-1\"\n />\n\n <!-- Bot\u00E3o para abrir timepicker nativo (opcional) -->\n <button\n *ngIf=\"showNativePicker && !disabled && !isDisabled\"\n type=\"button\"\n class=\"matcha-time-picker-button mr--12\"\n (click)=\"openNativeTimePicker()\"\n [disabled]=\"disabled || isDisabled\"\n aria-label=\"Abrir seletor de hora\"\n tabindex=\"0\"\n >\n <span class=\"i-matcha-clock-out color-grey\"></span>\n </button>\n</div>\n", styles: [".matcha-time-container{position:relative;display:flex;align-items:center;width:100%}.matcha-time-input{width:100%}.matcha-time-native-input{position:absolute;opacity:0;pointer-events:none;width:0;height:0;border:none;padding:0;margin:0}.matcha-time-picker-button{position:absolute;right:8px;background:none;border:none;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;z-index:1}\n"] }]
|
|
9052
|
+
}], propDecorators: { placeholder: [{
|
|
9053
|
+
type: Input
|
|
9054
|
+
}], disabled: [{
|
|
9055
|
+
type: Input
|
|
9056
|
+
}], showNativePicker: [{
|
|
9057
|
+
type: Input
|
|
9058
|
+
}], textInput: [{
|
|
9059
|
+
type: ViewChild,
|
|
9060
|
+
args: ['textInput']
|
|
9061
|
+
}], nativeTimeInput: [{
|
|
9062
|
+
type: ViewChild,
|
|
9063
|
+
args: ['nativeTimeInput']
|
|
9064
|
+
}] } });
|
|
9065
|
+
|
|
9066
|
+
class MatchaTimeModule {
|
|
9067
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9068
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeModule, declarations: [MatchaTimeComponent], imports: [CommonModule,
|
|
9069
|
+
FormsModule,
|
|
9070
|
+
ReactiveFormsModule], exports: [MatchaTimeComponent] }); }
|
|
9071
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeModule, imports: [CommonModule,
|
|
9072
|
+
FormsModule,
|
|
9073
|
+
ReactiveFormsModule] }); }
|
|
9074
|
+
}
|
|
9075
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeModule, decorators: [{
|
|
9076
|
+
type: NgModule,
|
|
9077
|
+
args: [{
|
|
9078
|
+
declarations: [MatchaTimeComponent],
|
|
9079
|
+
imports: [
|
|
9080
|
+
CommonModule,
|
|
9081
|
+
FormsModule,
|
|
9082
|
+
ReactiveFormsModule
|
|
9083
|
+
],
|
|
9084
|
+
exports: [MatchaTimeComponent]
|
|
9085
|
+
}]
|
|
9086
|
+
}] });
|
|
9087
|
+
|
|
9088
|
+
class MatchaTimeRangeComponent {
|
|
9089
|
+
constructor() {
|
|
8895
9090
|
this.allowCrossDays = false;
|
|
8896
9091
|
this.startTimeControl = null;
|
|
8897
9092
|
this.endTimeControl = null;
|
|
@@ -8900,12 +9095,10 @@ class MatchaTimeComponent {
|
|
|
8900
9095
|
this.subscription = new Subscription();
|
|
8901
9096
|
}
|
|
8902
9097
|
ngAfterContentInit() {
|
|
8903
|
-
// Pega os controles projetados no template
|
|
8904
9098
|
const controlsArray = this.controls.toArray();
|
|
8905
9099
|
if (controlsArray.length >= 2) {
|
|
8906
9100
|
this.startTimeControl = controlsArray[0].control;
|
|
8907
9101
|
this.endTimeControl = controlsArray[1].control;
|
|
8908
|
-
// Tenta encontrar os controles de data no form parent
|
|
8909
9102
|
if (this.startTimeControl && this.endTimeControl &&
|
|
8910
9103
|
this.startDateControlName && this.endDateControlName) {
|
|
8911
9104
|
const formGroup = this.startTimeControl.parent;
|
|
@@ -8914,12 +9107,10 @@ class MatchaTimeComponent {
|
|
|
8914
9107
|
this.endDateControl = formGroup.get(this.endDateControlName);
|
|
8915
9108
|
}
|
|
8916
9109
|
}
|
|
8917
|
-
// Adiciona validação para os campos de tempo
|
|
8918
9110
|
if (this.startTimeControl && this.endTimeControl) {
|
|
8919
9111
|
this.subscription.add(this.startTimeControl.valueChanges.subscribe(() => this.validateTimeRange()));
|
|
8920
9112
|
this.subscription.add(this.endTimeControl.valueChanges.subscribe(() => this.validateTimeRange()));
|
|
8921
9113
|
}
|
|
8922
|
-
// Adiciona validação para os campos de data, se existirem
|
|
8923
9114
|
if (this.startDateControl && this.endDateControl) {
|
|
8924
9115
|
this.subscription.add(this.startDateControl.valueChanges.subscribe(() => this.validateTimeRange()));
|
|
8925
9116
|
this.subscription.add(this.endDateControl.valueChanges.subscribe(() => this.validateTimeRange()));
|
|
@@ -8929,9 +9120,6 @@ class MatchaTimeComponent {
|
|
|
8929
9120
|
ngOnDestroy() {
|
|
8930
9121
|
this.subscription.unsubscribe();
|
|
8931
9122
|
}
|
|
8932
|
-
/**
|
|
8933
|
-
* Validação de intervalo de tempo que pode cruzar dias
|
|
8934
|
-
*/
|
|
8935
9123
|
validateTimeRange() {
|
|
8936
9124
|
if (!this.startTimeControl || !this.endTimeControl)
|
|
8937
9125
|
return;
|
|
@@ -8939,13 +9127,11 @@ class MatchaTimeComponent {
|
|
|
8939
9127
|
return;
|
|
8940
9128
|
let startDateTime;
|
|
8941
9129
|
let endDateTime;
|
|
8942
|
-
// Se temos controles de data, usamos as datas fornecidas
|
|
8943
9130
|
if (this.startDateControl?.value && this.endDateControl?.value) {
|
|
8944
9131
|
const startDate = this.startDateControl.value;
|
|
8945
9132
|
const endDate = this.endDateControl.value;
|
|
8946
9133
|
startDateTime = new Date(`${startDate}T${this.startTimeControl.value}`);
|
|
8947
9134
|
endDateTime = new Date(`${endDate}T${this.endTimeControl.value}`);
|
|
8948
|
-
// Comparação de data + hora
|
|
8949
9135
|
if (startDateTime > endDateTime) {
|
|
8950
9136
|
this.setValidationErrors();
|
|
8951
9137
|
}
|
|
@@ -8953,12 +9139,9 @@ class MatchaTimeComponent {
|
|
|
8953
9139
|
this.clearValidationErrors();
|
|
8954
9140
|
}
|
|
8955
9141
|
}
|
|
8956
|
-
// Sem controles de data, ou se allowCrossDays=true, não validamos cruzamento de dias
|
|
8957
9142
|
else if (this.allowCrossDays) {
|
|
8958
|
-
// Nesse caso, assumimos que o intervalo é válido mesmo se hora final < hora inicial
|
|
8959
9143
|
this.clearValidationErrors();
|
|
8960
9144
|
}
|
|
8961
|
-
// Caso tradicional: mesmo dia, validação simples de hora
|
|
8962
9145
|
else {
|
|
8963
9146
|
const today = new Date().toISOString().split('T')[0];
|
|
8964
9147
|
startDateTime = new Date(`${today}T${this.startTimeControl.value}`);
|
|
@@ -8971,23 +9154,14 @@ class MatchaTimeComponent {
|
|
|
8971
9154
|
}
|
|
8972
9155
|
}
|
|
8973
9156
|
}
|
|
8974
|
-
/**
|
|
8975
|
-
* Define erros de validação nos controles
|
|
8976
|
-
*/
|
|
8977
9157
|
setValidationErrors() {
|
|
8978
9158
|
this.startTimeControl?.setErrors({ ['startAfterEnd']: true });
|
|
8979
9159
|
this.endTimeControl?.setErrors({ ['endBeforeStart']: true });
|
|
8980
9160
|
}
|
|
8981
|
-
/**
|
|
8982
|
-
* Remove erros específicos de validação
|
|
8983
|
-
*/
|
|
8984
9161
|
clearValidationErrors() {
|
|
8985
9162
|
this.removeSpecificError(this.startTimeControl, 'startAfterEnd');
|
|
8986
9163
|
this.removeSpecificError(this.endTimeControl, 'endBeforeStart');
|
|
8987
9164
|
}
|
|
8988
|
-
/**
|
|
8989
|
-
* Remove um erro específico sem afetar outros erros
|
|
8990
|
-
*/
|
|
8991
9165
|
removeSpecificError(control, errorName) {
|
|
8992
9166
|
if (!control)
|
|
8993
9167
|
return;
|
|
@@ -8997,12 +9171,12 @@ class MatchaTimeComponent {
|
|
|
8997
9171
|
control.setErrors(Object.keys(errors).length ? errors : null);
|
|
8998
9172
|
}
|
|
8999
9173
|
}
|
|
9000
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type:
|
|
9001
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type:
|
|
9174
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9175
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaTimeRangeComponent, isStandalone: false, selector: "matcha-time-range", inputs: { startDateControlName: "startDateControlName", endDateControlName: "endDateControlName", allowCrossDays: "allowCrossDays" }, queries: [{ propertyName: "controls", predicate: NgControl, descendants: true }], ngImport: i0, template: "<div class=\"d-flex gap-16\">\n <ng-content></ng-content>\n</div>\n", styles: [""] }); }
|
|
9002
9176
|
}
|
|
9003
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type:
|
|
9177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeRangeComponent, decorators: [{
|
|
9004
9178
|
type: Component,
|
|
9005
|
-
args: [{ selector: 'matcha-time', standalone: false, template: "<div class=\"d-flex gap-16\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
9179
|
+
args: [{ selector: 'matcha-time-range', standalone: false, template: "<div class=\"d-flex gap-16\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
9006
9180
|
}], propDecorators: { controls: [{
|
|
9007
9181
|
type: ContentChildren,
|
|
9008
9182
|
args: [NgControl, { descendants: true }]
|
|
@@ -9014,22 +9188,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
9014
9188
|
type: Input
|
|
9015
9189
|
}] } });
|
|
9016
9190
|
|
|
9017
|
-
class
|
|
9018
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type:
|
|
9019
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type:
|
|
9020
|
-
ReactiveFormsModule], exports: [
|
|
9021
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type:
|
|
9191
|
+
class MatchaTimeRangeModule {
|
|
9192
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeRangeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9193
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeRangeModule, declarations: [MatchaTimeRangeComponent], imports: [CommonModule,
|
|
9194
|
+
ReactiveFormsModule], exports: [MatchaTimeRangeComponent] }); }
|
|
9195
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeRangeModule, imports: [CommonModule,
|
|
9022
9196
|
ReactiveFormsModule] }); }
|
|
9023
9197
|
}
|
|
9024
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type:
|
|
9198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaTimeRangeModule, decorators: [{
|
|
9025
9199
|
type: NgModule,
|
|
9026
9200
|
args: [{
|
|
9027
|
-
declarations: [
|
|
9201
|
+
declarations: [MatchaTimeRangeComponent],
|
|
9028
9202
|
imports: [
|
|
9029
9203
|
CommonModule,
|
|
9030
9204
|
ReactiveFormsModule
|
|
9031
9205
|
],
|
|
9032
|
-
exports: [
|
|
9206
|
+
exports: [MatchaTimeRangeComponent]
|
|
9033
9207
|
}]
|
|
9034
9208
|
}] });
|
|
9035
9209
|
|
|
@@ -14337,6 +14511,7 @@ class MatchaComponentsModule {
|
|
|
14337
14511
|
MatchaTooltipModule,
|
|
14338
14512
|
MatchaDateRangeModule,
|
|
14339
14513
|
MatchaTimeModule,
|
|
14514
|
+
MatchaTimeRangeModule,
|
|
14340
14515
|
MatchaDropListModule,
|
|
14341
14516
|
MatchaPageLayoutModule,
|
|
14342
14517
|
MatchaDrawerModule,
|
|
@@ -14378,6 +14553,7 @@ class MatchaComponentsModule {
|
|
|
14378
14553
|
MatchaTooltipModule,
|
|
14379
14554
|
MatchaDateRangeModule,
|
|
14380
14555
|
MatchaTimeModule,
|
|
14556
|
+
MatchaTimeRangeModule,
|
|
14381
14557
|
MatchaDropListModule,
|
|
14382
14558
|
MatchaPageLayoutModule,
|
|
14383
14559
|
MatchaAvatarModule,
|
|
@@ -14424,6 +14600,7 @@ class MatchaComponentsModule {
|
|
|
14424
14600
|
MatchaTooltipModule,
|
|
14425
14601
|
MatchaDateRangeModule,
|
|
14426
14602
|
MatchaTimeModule,
|
|
14603
|
+
MatchaTimeRangeModule,
|
|
14427
14604
|
MatchaDropListModule,
|
|
14428
14605
|
MatchaPageLayoutModule,
|
|
14429
14606
|
MatchaDrawerModule,
|
|
@@ -14465,6 +14642,7 @@ class MatchaComponentsModule {
|
|
|
14465
14642
|
MatchaTooltipModule,
|
|
14466
14643
|
MatchaDateRangeModule,
|
|
14467
14644
|
MatchaTimeModule,
|
|
14645
|
+
MatchaTimeRangeModule,
|
|
14468
14646
|
MatchaDropListModule,
|
|
14469
14647
|
MatchaPageLayoutModule,
|
|
14470
14648
|
MatchaAvatarModule,
|
|
@@ -14517,6 +14695,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
14517
14695
|
MatchaTooltipModule,
|
|
14518
14696
|
MatchaDateRangeModule,
|
|
14519
14697
|
MatchaTimeModule,
|
|
14698
|
+
MatchaTimeRangeModule,
|
|
14520
14699
|
MatchaDropListModule,
|
|
14521
14700
|
MatchaPageLayoutModule,
|
|
14522
14701
|
MatchaDrawerModule,
|
|
@@ -14560,6 +14739,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
14560
14739
|
MatchaTooltipModule,
|
|
14561
14740
|
MatchaDateRangeModule,
|
|
14562
14741
|
MatchaTimeModule,
|
|
14742
|
+
MatchaTimeRangeModule,
|
|
14563
14743
|
MatchaDropListModule,
|
|
14564
14744
|
MatchaPageLayoutModule,
|
|
14565
14745
|
MatchaAvatarModule,
|
|
@@ -15183,5 +15363,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
15183
15363
|
* Generated bundle index. Do not edit.
|
|
15184
15364
|
*/
|
|
15185
15365
|
|
|
15186
|
-
export { CopyButtonComponent, INITIAL_CONFIG, MATCHA_MASK_CONFIG, MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipComponent, MatchaChipListComponent, MatchaChipModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputPhoneComponent, MatchaInputPhoneModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaListComponent, MatchaListItemComponent, MatchaListModule, MatchaMaskApplierService, MatchaMaskCompatibleDirective, MatchaMaskModule, MatchaMaskPipe, MatchaMaskService, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuItemDirective, MatchaMenuModule, MatchaMenuTriggerDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaProgressBarComponent, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioGroupComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectTriggerDirective, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSnackBarComponent, MatchaSnackBarModule, MatchaSnackBarService, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaSubmenuTriggerDirective, MatchaTabItemComponent, MatchaTableComponent, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NEW_CONFIG, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective, compatibleOptions, initialConfig, timeMasks, withoutValidation };
|
|
15366
|
+
export { CopyButtonComponent, INITIAL_CONFIG, MATCHA_MASK_CONFIG, MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipComponent, MatchaChipListComponent, MatchaChipModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputPhoneComponent, MatchaInputPhoneModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaListComponent, MatchaListItemComponent, MatchaListModule, MatchaMaskApplierService, MatchaMaskCompatibleDirective, MatchaMaskModule, MatchaMaskPipe, MatchaMaskService, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuItemDirective, MatchaMenuModule, MatchaMenuTriggerDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaProgressBarComponent, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioGroupComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectTriggerDirective, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSnackBarComponent, MatchaSnackBarModule, MatchaSnackBarService, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaSubmenuTriggerDirective, MatchaTabItemComponent, MatchaTableComponent, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTimeRangeComponent, MatchaTimeRangeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NEW_CONFIG, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective, compatibleOptions, initialConfig, timeMasks, withoutValidation };
|
|
15187
15367
|
//# sourceMappingURL=matcha-components.mjs.map
|