@main-class/componentes 3.3.3 → 3.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/crud/index.d.ts +7 -0
- package/crud/src/abstract-consulta-paginada-component.d.ts +24 -0
- package/crud/src/abstract-edicao-component.d.ts +19 -0
- package/crud/src/abstract-edicao-modal-component.d.ts +19 -0
- package/crud/src/query/query-field/query-field.component.d.ts +37 -0
- package/crud/src/query/query-form-field/query-form-field.component.d.ts +11 -0
- package/crud/src/query/query-form.component.d.ts +24 -0
- package/crud/src/query/query-modal-form/query-modal-form.component.d.ts +13 -0
- package/fesm2022/main-class-componentes-crud.mjs +484 -0
- package/fesm2022/main-class-componentes-crud.mjs.map +1 -0
- package/fesm2022/main-class-componentes-input.mjs +41 -28
- package/fesm2022/main-class-componentes-input.mjs.map +1 -1
- package/fesm2022/main-class-componentes-pipe.mjs +27 -0
- package/fesm2022/main-class-componentes-pipe.mjs.map +1 -0
- package/input/src/abstract-mat-form-field-select-control.d.ts +1 -0
- package/input/src/input-datetime/input-datetime.component.d.ts +5 -2
- package/input/src/select-autocomplete/select-autocomplete.component.d.ts +1 -1
- package/package.json +9 -9
- package/pipe/index.d.ts +1 -0
- package/pipe/src/nome-resumido.pipe.d.ts +7 -0
|
@@ -2,7 +2,7 @@ import * as i1 from '@angular/forms';
|
|
|
2
2
|
import { NgControl, FormGroupDirective, FormControl, FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
|
3
3
|
import { Subject, BehaviorSubject, concat, of, debounceTime, Observable, combineLatest } from 'rxjs';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { inject, Input, HostBinding, ViewChild, Component, InjectionToken, QueryList, ContentChildren, EventEmitter, Output,
|
|
5
|
+
import { inject, Input, HostBinding, ViewChild, Component, InjectionToken, QueryList, ContentChildren, EventEmitter, Output, Optional, Self, Inject, Directive, Injectable } from '@angular/core';
|
|
6
6
|
import * as i1$2 from '@angular/material/core';
|
|
7
7
|
import { ErrorStateMatcher, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
|
8
8
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
@@ -12,9 +12,10 @@ import { monetarioMask } from '@main-class/componentes/misc';
|
|
|
12
12
|
import { MatFormFieldControl, MatPrefix, MatSuffix } from '@angular/material/form-field';
|
|
13
13
|
import * as i1$1 from '@mat-datetimepicker/core';
|
|
14
14
|
import { MAT_DATETIME_FORMATS, DatetimeAdapter, MatDatetimepickerModule } from '@mat-datetimepicker/core';
|
|
15
|
-
import { MatMomentDatetimeModule
|
|
15
|
+
import { MatMomentDatetimeModule } from '@mat-datetimepicker/moment';
|
|
16
16
|
import moment from 'moment';
|
|
17
|
-
import { MomentDateAdapter } from '@angular/material-moment-adapter';
|
|
17
|
+
import { provideMomentDateAdapter, MomentDateAdapter } from '@angular/material-moment-adapter';
|
|
18
|
+
import 'moment/locale/pt-br.js';
|
|
18
19
|
import { ARQUIVO_MANAGER_SERVICE, PreviewArquivoComponent, DownloadArquivoDirective } from '@main-class/componentes/arquivo';
|
|
19
20
|
import { MatChipGrid, MatChip, MatChipInput } from '@angular/material/chips';
|
|
20
21
|
import { NgClass, AsyncPipe, NgStyle } from '@angular/common';
|
|
@@ -205,6 +206,9 @@ class AbstractMatFormFieldSelectControl extends AbstractMatFormFieldControl {
|
|
|
205
206
|
}));
|
|
206
207
|
}
|
|
207
208
|
};
|
|
209
|
+
get empty() {
|
|
210
|
+
return !this.control.value;
|
|
211
|
+
}
|
|
208
212
|
get shouldFilter() {
|
|
209
213
|
return true;
|
|
210
214
|
}
|
|
@@ -249,16 +253,13 @@ class AbstractMatFormFieldSelectControl extends AbstractMatFormFieldControl {
|
|
|
249
253
|
this.stateChanges.next();
|
|
250
254
|
}
|
|
251
255
|
writeValue(value) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
this.control.setValue('');
|
|
260
|
-
}
|
|
261
|
-
}, 150);
|
|
256
|
+
super.writeValue(value);
|
|
257
|
+
if (value) {
|
|
258
|
+
this.control.setValue((this.optionProvider || this.defaultOptionProvider).label(value));
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
this.control.setValue('');
|
|
262
|
+
}
|
|
262
263
|
}
|
|
263
264
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AbstractMatFormFieldSelectControl, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
264
265
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: AbstractMatFormFieldSelectControl, isStandalone: true, selector: "ng-component", inputs: { trackBy: "trackBy", args: "args" }, queries: [{ propertyName: "options", predicate: SelectOptionComponent }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
@@ -438,6 +439,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
438
439
|
type: Input
|
|
439
440
|
}] } });
|
|
440
441
|
|
|
442
|
+
function validateDateTime(control) {
|
|
443
|
+
if (!!control.value) {
|
|
444
|
+
if (isNaN(control.value)) {
|
|
445
|
+
return { date: true };
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return null;
|
|
449
|
+
}
|
|
441
450
|
class InputDatetimeComponent extends AbstractMatFormFieldControl {
|
|
442
451
|
locale = inject(MAT_DATE_LOCALE);
|
|
443
452
|
formats = inject(MAT_DATETIME_FORMATS);
|
|
@@ -531,16 +540,18 @@ class InputDatetimeComponent extends AbstractMatFormFieldControl {
|
|
|
531
540
|
this.stateChanges.next();
|
|
532
541
|
}
|
|
533
542
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputDatetimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
534
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputDatetimeComponent, isStandalone: true, selector: "
|
|
543
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: InputDatetimeComponent, isStandalone: true, selector: "tcn-input-datetime", inputs: { type: "type", readonly: "readonly", name: "name" }, providers: [
|
|
535
544
|
{
|
|
536
|
-
provide:
|
|
537
|
-
|
|
545
|
+
provide: NG_VALIDATORS,
|
|
546
|
+
useValue: validateDateTime,
|
|
547
|
+
multi: true,
|
|
538
548
|
},
|
|
539
|
-
{ provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID },
|
|
540
549
|
{
|
|
541
|
-
provide:
|
|
542
|
-
|
|
550
|
+
provide: MatFormFieldControl,
|
|
551
|
+
useExisting: InputDatetimeComponent
|
|
543
552
|
},
|
|
553
|
+
{ provide: MAT_DATE_LOCALE, useValue: 'pt-br' },
|
|
554
|
+
provideMomentDateAdapter(),
|
|
544
555
|
{
|
|
545
556
|
provide: DateAdapter,
|
|
546
557
|
useClass: MomentDateAdapter
|
|
@@ -584,21 +595,23 @@ class InputDatetimeComponent extends AbstractMatFormFieldControl {
|
|
|
584
595
|
}
|
|
585
596
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: InputDatetimeComponent, decorators: [{
|
|
586
597
|
type: Component,
|
|
587
|
-
args: [{ selector: '
|
|
598
|
+
args: [{ selector: 'tcn-input-datetime', imports: [
|
|
588
599
|
MatDatetimepickerModule,
|
|
589
600
|
MatMomentDatetimeModule,
|
|
590
601
|
FormsModule,
|
|
591
602
|
InputMaskComponent
|
|
592
603
|
], providers: [
|
|
593
604
|
{
|
|
594
|
-
provide:
|
|
595
|
-
|
|
605
|
+
provide: NG_VALIDATORS,
|
|
606
|
+
useValue: validateDateTime,
|
|
607
|
+
multi: true,
|
|
596
608
|
},
|
|
597
|
-
{ provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID },
|
|
598
609
|
{
|
|
599
|
-
provide:
|
|
600
|
-
|
|
610
|
+
provide: MatFormFieldControl,
|
|
611
|
+
useExisting: InputDatetimeComponent
|
|
601
612
|
},
|
|
613
|
+
{ provide: MAT_DATE_LOCALE, useValue: 'pt-br' },
|
|
614
|
+
provideMomentDateAdapter(),
|
|
602
615
|
{
|
|
603
616
|
provide: DateAdapter,
|
|
604
617
|
useClass: MomentDateAdapter
|
|
@@ -1658,7 +1671,7 @@ class SelectAutocompleteComponent extends AbstractMatFormFieldSelectControl {
|
|
|
1658
1671
|
}
|
|
1659
1672
|
}
|
|
1660
1673
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1661
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SelectAutocompleteComponent, isStandalone: true, selector: "
|
|
1674
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: SelectAutocompleteComponent, isStandalone: true, selector: "tcn-select-autocomplete", inputs: { readonly: "readonly" }, outputs: { select: "select", blur: "blur" }, providers: [
|
|
1662
1675
|
{
|
|
1663
1676
|
provide: MatFormFieldControl,
|
|
1664
1677
|
useExisting: SelectAutocompleteComponent
|
|
@@ -1667,7 +1680,7 @@ class SelectAutocompleteComponent extends AbstractMatFormFieldSelectControl {
|
|
|
1667
1680
|
}
|
|
1668
1681
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SelectAutocompleteComponent, decorators: [{
|
|
1669
1682
|
type: Component,
|
|
1670
|
-
args: [{ selector: '
|
|
1683
|
+
args: [{ selector: 'tcn-select-autocomplete', imports: [
|
|
1671
1684
|
MatInput,
|
|
1672
1685
|
MatAutocompleteTrigger,
|
|
1673
1686
|
ReactiveFormsModule,
|
|
@@ -1907,5 +1920,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1907
1920
|
* Generated bundle index. Do not edit.
|
|
1908
1921
|
*/
|
|
1909
1922
|
|
|
1910
|
-
export { AbstractMatFormFieldControl, AbstractMatFormFieldSelectControl, AllOptionCheckboxComponent, DelegateOptionProviderDirective, InputCepComponent, InputCnpjComponent, InputCpfCnpjComponent, InputCpfComponent, InputCurrencyComponent, InputDatetimeComponent, InputFileUploadComponent, InputFileUploadValidatorDirective, InputMaskComponent, InputPhoneComponent, InputTelefoneInternacionalComponent, InputTelefoneInternacionalValidatorDirective, OptionCheckboxComponent, OptionCheckboxGroupComponent, SELECT_OPTION_PROVIDER, SelectAutocompleteComponent, SelectChipsComponent, SelectManyCheckboxComponent, SelectOptionComponent, SelectRadioComponent };
|
|
1923
|
+
export { AbstractMatFormFieldControl, AbstractMatFormFieldSelectControl, AllOptionCheckboxComponent, DelegateOptionProviderDirective, InputCepComponent, InputCnpjComponent, InputCpfCnpjComponent, InputCpfComponent, InputCurrencyComponent, InputDatetimeComponent, InputFileUploadComponent, InputFileUploadValidatorDirective, InputMaskComponent, InputPhoneComponent, InputTelefoneInternacionalComponent, InputTelefoneInternacionalValidatorDirective, OptionCheckboxComponent, OptionCheckboxGroupComponent, SELECT_OPTION_PROVIDER, SelectAutocompleteComponent, SelectChipsComponent, SelectManyCheckboxComponent, SelectOptionComponent, SelectRadioComponent, validateDateTime };
|
|
1911
1924
|
//# sourceMappingURL=main-class-componentes-input.mjs.map
|