@cauca-911/material 20.0.15 → 20.0.16
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/cauca-911-material.mjs +157 -4
- package/fesm2022/cauca-911-material.mjs.map +1 -1
- package/index.d.ts +53 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, EventEmitter, Output, Input, signal, inject, HostListener, Injector, ElementRef, forwardRef, input, computed, output, Directive, ChangeDetectionStrategy, Inject, HostBinding, model, TemplateRef, Optional, Self, ContentChild, ViewChild } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, EventEmitter, Output, Input, signal, inject, HostListener, Injector, ElementRef, forwardRef, input, computed, output, Directive, ChangeDetectionStrategy, Inject, HostBinding, model, TemplateRef, Optional, Self, ContentChild, ViewChild, NgModule } 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$6 from '@angular/material/dialog';
|
|
@@ -21,10 +21,10 @@ import { CommonModule, DatePipe, NgClass } from '@angular/common';
|
|
|
21
21
|
import * as i1$4 from '@angular/material/form-field';
|
|
22
22
|
import { MatFormFieldModule, MatFormFieldControl } from '@angular/material/form-field';
|
|
23
23
|
import * as i1$7 from '@angular/forms';
|
|
24
|
-
import { Validators, NgControl, FormControlName, ControlContainer, FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule, FormGroup, UntypedFormControl } from '@angular/forms';
|
|
24
|
+
import { Validators, NgControl, FormControlName, ControlContainer, FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule, FormGroup, FormControlDirective, UntypedFormControl } from '@angular/forms';
|
|
25
25
|
import * as i1$5 from '@angular/cdk/clipboard';
|
|
26
26
|
import { MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
|
|
27
|
-
import { firstValueFrom, of, tap, mergeMap, catchError, finalize, throwError, filter, Subject, startWith, map } from 'rxjs';
|
|
27
|
+
import { firstValueFrom, of, tap, mergeMap, catchError, finalize, throwError, filter, Subject, startWith, map, ReplaySubject, switchMap, EMPTY, combineLatest, distinctUntilChanged } from 'rxjs';
|
|
28
28
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
29
29
|
import * as i2$2 from '@angular/cdk/layout';
|
|
30
30
|
import * as i5 from '@angular/cdk/text-field';
|
|
@@ -3310,6 +3310,159 @@ class SavingErrorBoxComponent {
|
|
|
3310
3310
|
}], null, null); })();
|
|
3311
3311
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SavingErrorBoxComponent, { className: "SavingErrorBoxComponent", filePath: "lib/components/notifications/saving-error-box/saving-error-box.component.ts", lineNumber: 13 }); })();
|
|
3312
3312
|
|
|
3313
|
+
class AutoTrimAndLowerDirective {
|
|
3314
|
+
constructor(el) {
|
|
3315
|
+
this.el = el;
|
|
3316
|
+
}
|
|
3317
|
+
onBlur(_) {
|
|
3318
|
+
this.trimText();
|
|
3319
|
+
}
|
|
3320
|
+
trimText() {
|
|
3321
|
+
this.el.nativeElement.value = this.el.nativeElement.value?.trim().toLowerCase();
|
|
3322
|
+
}
|
|
3323
|
+
static { this.ɵfac = function AutoTrimAndLowerDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AutoTrimAndLowerDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); }; }
|
|
3324
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: AutoTrimAndLowerDirective, selectors: [["", "appAutoTrimAndLower", ""]], hostBindings: function AutoTrimAndLowerDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
3325
|
+
i0.ɵɵlistener("blur", function AutoTrimAndLowerDirective_blur_HostBindingHandler($event) { return ctx.onBlur($event); });
|
|
3326
|
+
} } }); }
|
|
3327
|
+
}
|
|
3328
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AutoTrimAndLowerDirective, [{
|
|
3329
|
+
type: Directive,
|
|
3330
|
+
args: [{
|
|
3331
|
+
selector: '[appAutoTrimAndLower]',
|
|
3332
|
+
standalone: true
|
|
3333
|
+
}]
|
|
3334
|
+
}], () => [{ type: i0.ElementRef }], { onBlur: [{
|
|
3335
|
+
type: HostListener,
|
|
3336
|
+
args: ['blur', ['$event']]
|
|
3337
|
+
}] }); })();
|
|
3338
|
+
|
|
3339
|
+
class HasErrorRootDirective {
|
|
3340
|
+
constructor() {
|
|
3341
|
+
this._formControl$ = new ReplaySubject(1);
|
|
3342
|
+
}
|
|
3343
|
+
set formControl(formControlDirective) {
|
|
3344
|
+
if (formControlDirective) {
|
|
3345
|
+
this._formControl$.next(formControlDirective.control);
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3348
|
+
set formControlName(formControlName) {
|
|
3349
|
+
if (formControlName) {
|
|
3350
|
+
this._formControl$.next(formControlName.control);
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3353
|
+
get formControl$() {
|
|
3354
|
+
return this._formControl$.asObservable();
|
|
3355
|
+
}
|
|
3356
|
+
static { this.ɵfac = function HasErrorRootDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || HasErrorRootDirective)(); }; }
|
|
3357
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: HasErrorRootDirective, selectors: [["mat-form-field"]], contentQueries: function HasErrorRootDirective_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
3358
|
+
i0.ɵɵcontentQuery(dirIndex, FormControlDirective, 5);
|
|
3359
|
+
i0.ɵɵcontentQuery(dirIndex, FormControlName, 5);
|
|
3360
|
+
} if (rf & 2) {
|
|
3361
|
+
let _t;
|
|
3362
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.formControl = _t.first);
|
|
3363
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.formControlName = _t.first);
|
|
3364
|
+
} }, standalone: false }); }
|
|
3365
|
+
}
|
|
3366
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HasErrorRootDirective, [{
|
|
3367
|
+
type: Directive,
|
|
3368
|
+
args: [{
|
|
3369
|
+
selector: 'mat-form-field',
|
|
3370
|
+
standalone: false,
|
|
3371
|
+
}]
|
|
3372
|
+
}], null, { formControl: [{
|
|
3373
|
+
type: ContentChild,
|
|
3374
|
+
args: [FormControlDirective]
|
|
3375
|
+
}], formControlName: [{
|
|
3376
|
+
type: ContentChild,
|
|
3377
|
+
args: [FormControlName]
|
|
3378
|
+
}] }); })();
|
|
3379
|
+
|
|
3380
|
+
class HasErrorDirective {
|
|
3381
|
+
set hasError(errorName) {
|
|
3382
|
+
this.errorName$.next(errorName);
|
|
3383
|
+
}
|
|
3384
|
+
constructor(hasErrorRoot, templateRef, vcr) {
|
|
3385
|
+
this.hasErrorRoot = hasErrorRoot;
|
|
3386
|
+
this.templateRef = templateRef;
|
|
3387
|
+
this.vcr = vcr;
|
|
3388
|
+
this.errorName$ = new ReplaySubject(1);
|
|
3389
|
+
this.ctrl$ = this.hasErrorRoot.formControl$;
|
|
3390
|
+
this.status$ = this.ctrl$.pipe(switchMap((ctrl) => (ctrl.statusChanges || EMPTY).pipe(startWith(null))));
|
|
3391
|
+
this.error$ = combineLatest([
|
|
3392
|
+
this.ctrl$,
|
|
3393
|
+
this.errorName$,
|
|
3394
|
+
this.status$,
|
|
3395
|
+
]).pipe(map(([ctrl, errorName]) => ({
|
|
3396
|
+
hasError: ctrl.hasError(errorName),
|
|
3397
|
+
value: ctrl.getError(errorName),
|
|
3398
|
+
})), distinctUntilChanged((x, y) => x.hasError === y.hasError && x.value === y.value));
|
|
3399
|
+
}
|
|
3400
|
+
static ngTemplateContextGuard(_dir, ctx) {
|
|
3401
|
+
return true;
|
|
3402
|
+
}
|
|
3403
|
+
ngAfterContentInit() {
|
|
3404
|
+
setTimeout(() => {
|
|
3405
|
+
this.subscription = this.error$.subscribe((error) => {
|
|
3406
|
+
if (!error.hasError) {
|
|
3407
|
+
this.view?.destroy();
|
|
3408
|
+
this.view = undefined;
|
|
3409
|
+
return;
|
|
3410
|
+
}
|
|
3411
|
+
if (this.view) {
|
|
3412
|
+
this.view.context.$implicit = error.value;
|
|
3413
|
+
this.view.markForCheck();
|
|
3414
|
+
return;
|
|
3415
|
+
}
|
|
3416
|
+
this.view = this.vcr.createEmbeddedView(this.templateRef, {
|
|
3417
|
+
$implicit: error.value,
|
|
3418
|
+
});
|
|
3419
|
+
});
|
|
3420
|
+
}, 100);
|
|
3421
|
+
}
|
|
3422
|
+
ngOnDestroy() {
|
|
3423
|
+
this.subscription?.unsubscribe();
|
|
3424
|
+
}
|
|
3425
|
+
static { this.ɵfac = function HasErrorDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || HasErrorDirective)(i0.ɵɵdirectiveInject(HasErrorRootDirective), i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); }; }
|
|
3426
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: HasErrorDirective, selectors: [["", "hasError", ""]], inputs: { hasError: "hasError" }, standalone: false }); }
|
|
3427
|
+
}
|
|
3428
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HasErrorDirective, [{
|
|
3429
|
+
type: Directive,
|
|
3430
|
+
args: [{
|
|
3431
|
+
selector: '[hasError]',
|
|
3432
|
+
standalone: false,
|
|
3433
|
+
}]
|
|
3434
|
+
}], () => [{ type: HasErrorRootDirective }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }], { hasError: [{
|
|
3435
|
+
type: Input
|
|
3436
|
+
}] }); })();
|
|
3437
|
+
|
|
3438
|
+
class FormErrorModule {
|
|
3439
|
+
static { this.ɵfac = function FormErrorModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FormErrorModule)(); }; }
|
|
3440
|
+
static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: FormErrorModule }); }
|
|
3441
|
+
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
3442
|
+
ReactiveFormsModule] }); }
|
|
3443
|
+
}
|
|
3444
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormErrorModule, [{
|
|
3445
|
+
type: NgModule,
|
|
3446
|
+
args: [{
|
|
3447
|
+
declarations: [
|
|
3448
|
+
HasErrorDirective,
|
|
3449
|
+
HasErrorRootDirective
|
|
3450
|
+
],
|
|
3451
|
+
imports: [
|
|
3452
|
+
CommonModule,
|
|
3453
|
+
ReactiveFormsModule
|
|
3454
|
+
],
|
|
3455
|
+
exports: [
|
|
3456
|
+
HasErrorDirective,
|
|
3457
|
+
HasErrorRootDirective
|
|
3458
|
+
],
|
|
3459
|
+
}]
|
|
3460
|
+
}], null, null); })();
|
|
3461
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(FormErrorModule, { declarations: [HasErrorDirective,
|
|
3462
|
+
HasErrorRootDirective], imports: [CommonModule,
|
|
3463
|
+
ReactiveFormsModule], exports: [HasErrorDirective,
|
|
3464
|
+
HasErrorRootDirective] }); })();
|
|
3465
|
+
|
|
3313
3466
|
function CaucaSimpleDialogComponent_div_4_button_1_Template(rf, ctx) { if (rf & 1) {
|
|
3314
3467
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
3315
3468
|
i0.ɵɵelementStart(0, "button", 6);
|
|
@@ -4039,5 +4192,5 @@ class MenuItem {
|
|
|
4039
4192
|
* Generated bundle index. Do not edit.
|
|
4040
4193
|
*/
|
|
4041
4194
|
|
|
4042
|
-
export { BadgeComponent, BasicButtonComponent, ButtonComponent, CaucaDateTimePickerComponent, CaucaInputFileComponent, CaucaInputMultipleLangueComponent, CaucaMaterialComponent, CaucaMaterialService, CaucaMenuSidebarComponent, CaucaMenuVerticalComponent, CaucaSimpleDialogComponent, CaucaSlideshowComponent, ConfirmationResult, DateRangePickerComponent, DialogService, DropdownChipAutocompleteComponent, FabButtonComponent, FlatButtonComponent, GroupContainerComponent, IconButtonComponent, IconComponent, LinkButtonComponent, ListPaginatorComponent, LoadingErrorComponent, LoadingSpinnerIndicatorComponent, LoadingStateService, MainSectionComponent, MenuItem, MenuItemComponent, PageTitleComponent, PasswordCriteriaViewerComponent, PasswordInputComponent, PasswordSelectionComponent, RaisedButtonComponent, RefreshButtonComponent, RoundButtonComponent, SavingConfirmedBoxComponent, SavingErrorBoxComponent, SectionColumnComponent, SectionFieldComponent, SnackBarComponent, StrokedButtonComponent };
|
|
4195
|
+
export { AutoTrimAndLowerDirective, BadgeComponent, BasicButtonComponent, ButtonComponent, CaucaDateTimePickerComponent, CaucaInputFileComponent, CaucaInputMultipleLangueComponent, CaucaMaterialComponent, CaucaMaterialService, CaucaMenuSidebarComponent, CaucaMenuVerticalComponent, CaucaSimpleDialogComponent, CaucaSlideshowComponent, ConfirmationResult, DateRangePickerComponent, DialogService, DropdownChipAutocompleteComponent, FabButtonComponent, FlatButtonComponent, FormErrorModule, GroupContainerComponent, HasErrorDirective, HasErrorRootDirective, IconButtonComponent, IconComponent, LinkButtonComponent, ListPaginatorComponent, LoadingErrorComponent, LoadingSpinnerIndicatorComponent, LoadingStateService, MainSectionComponent, MenuItem, MenuItemComponent, PageTitleComponent, PasswordCriteriaViewerComponent, PasswordInputComponent, PasswordSelectionComponent, RaisedButtonComponent, RefreshButtonComponent, RoundButtonComponent, SavingConfirmedBoxComponent, SavingErrorBoxComponent, SectionColumnComponent, SectionFieldComponent, SnackBarComponent, StrokedButtonComponent };
|
|
4043
4196
|
//# sourceMappingURL=cauca-911-material.mjs.map
|