@cauca-911/material 20.0.7 → 20.0.9

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.
@@ -26,16 +26,14 @@ import * as i1$5 from '@angular/cdk/clipboard';
26
26
  import { MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
27
27
  import { firstValueFrom, of, tap, mergeMap, catchError, finalize, throwError, filter, Subject, startWith, map } from 'rxjs';
28
28
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
29
- import { IconButtonComponent as IconButtonComponent$1, RaisedButtonComponent as RaisedButtonComponent$1, StrokedButtonComponent as StrokedButtonComponent$1 } from 'projects/cauca-material/src/public-api';
30
29
  import * as i2$2 from '@angular/cdk/layout';
30
+ import { RaisedButtonComponent as RaisedButtonComponent$1, StrokedButtonComponent as StrokedButtonComponent$1, IconButtonComponent as IconButtonComponent$1 } from 'projects/cauca-material/src/public-api';
31
31
  import * as i5 from '@angular/cdk/text-field';
32
32
  import { MatProgressSpinner } from '@angular/material/progress-spinner';
33
33
  import * as i1$8 from '@angular/material/chips';
34
34
  import { MatChipsModule, MatChipGrid, MatChip, MatChipRemove, MatChipInput } from '@angular/material/chips';
35
35
  import * as i1$9 from '@fortawesome/angular-fontawesome';
36
36
  import { FontAwesomeModule, FaIconComponent } from '@fortawesome/angular-fontawesome';
37
- import { PasswordValidation } from 'projects/cauca-material/src/lib/core/models/password-validation';
38
- import { PasswordValidator } from 'projects/cauca-material/src/lib/core/validators/password/password-validator';
39
37
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
40
38
  import * as i2$3 from '@angular/material/autocomplete';
41
39
  import { MatAutocompleteModule, MatAutocompleteTrigger } from '@angular/material/autocomplete';
@@ -1450,16 +1448,16 @@ class AlertDialogComponent {
1450
1448
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, ctx.title));
1451
1449
  i0.ɵɵadvance(5);
1452
1450
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(8, 4, ctx.message));
1453
- } }, dependencies: [TranslateModule, RaisedButtonComponent, IconButtonComponent$1, MatDialogModule, i1$6.MatDialogTitle, i1$6.MatDialogActions, i1$6.MatDialogContent, i1.TranslatePipe], styles: ["@media (max-width: 500px){ .dialog-global-style{max-width:100vw!important}} .dialog-global-style{margin:auto!important}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:first-child{display:flex;align-items:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:first-child div[_ngcontent-%COMP%]:first-child{flex:1}.alert-dialog-content[_ngcontent-%COMP%]{white-space:pre-wrap}"] }); }
1451
+ } }, dependencies: [TranslateModule, RaisedButtonComponent, IconButtonComponent, MatDialogModule, i1$6.MatDialogTitle, i1$6.MatDialogActions, i1$6.MatDialogContent, i1.TranslatePipe], styles: ["@media (max-width: 500px){ .dialog-global-style{max-width:100vw!important}} .dialog-global-style{margin:auto!important}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:first-child{display:flex;align-items:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:first-child div[_ngcontent-%COMP%]:first-child{flex:1}.alert-dialog-content[_ngcontent-%COMP%]{white-space:pre-wrap}"] }); }
1454
1452
  }
1455
1453
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AlertDialogComponent, [{
1456
1454
  type: Component,
1457
- args: [{ selector: 'cauca-alert-dialog', standalone: true, imports: [TranslateModule, RaisedButtonComponent, IconButtonComponent$1, MatDialogModule], template: "<div mat-dialog-title>\n <div class=\"h6\">{{ title | translate }}</div>\n <cauca-icon-button id=\"closeButton\" (buttonClick)=\"closeClick()\" icon=\"close\" />\n</div>\n<div class=\"alert-dialog-content\" mat-dialog-content>\n <p>{{ message | translate }}</p>\n</div>\n<mat-dialog-actions align=\"end\">\n <cauca-raised-button id=\"okButton\" label=\"ok\" color=\"primary\" (buttonClick)=\"closeClick()\" />\n</mat-dialog-actions>", styles: ["@media (max-width: 500px){::ng-deep .dialog-global-style{max-width:100vw!important}}::ng-deep .dialog-global-style{margin:auto!important}:host>div:first-child{display:flex;align-items:center}:host>div:first-child div:first-child{flex:1}.alert-dialog-content{white-space:pre-wrap}\n"] }]
1455
+ args: [{ selector: 'cauca-alert-dialog', standalone: true, imports: [TranslateModule, RaisedButtonComponent, IconButtonComponent, MatDialogModule], template: "<div mat-dialog-title>\n <div class=\"h6\">{{ title | translate }}</div>\n <cauca-icon-button id=\"closeButton\" (buttonClick)=\"closeClick()\" icon=\"close\" />\n</div>\n<div class=\"alert-dialog-content\" mat-dialog-content>\n <p>{{ message | translate }}</p>\n</div>\n<mat-dialog-actions align=\"end\">\n <cauca-raised-button id=\"okButton\" label=\"ok\" color=\"primary\" (buttonClick)=\"closeClick()\" />\n</mat-dialog-actions>", styles: ["@media (max-width: 500px){::ng-deep .dialog-global-style{max-width:100vw!important}}::ng-deep .dialog-global-style{margin:auto!important}:host>div:first-child{display:flex;align-items:center}:host>div:first-child div:first-child{flex:1}.alert-dialog-content{white-space:pre-wrap}\n"] }]
1458
1456
  }], () => [{ type: i1$6.MatDialogRef }, { type: undefined, decorators: [{
1459
1457
  type: Inject,
1460
1458
  args: [MAT_DIALOG_DATA]
1461
1459
  }] }, { type: i2$2.BreakpointObserver }], null); })();
1462
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AlertDialogComponent, { className: "AlertDialogComponent", filePath: "lib/dialogs/alert-dialog/alert-dialog.component.ts", lineNumber: 18 }); })();
1460
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AlertDialogComponent, { className: "AlertDialogComponent", filePath: "lib/dialogs/alert-dialog/alert-dialog.component.ts", lineNumber: 17 }); })();
1463
1461
 
1464
1462
  class ConfirmDialogComponent {
1465
1463
  constructor(dialogRef, data, breakdownObserver) {
@@ -1510,16 +1508,16 @@ class ConfirmDialogComponent {
1510
1508
  i0.ɵɵproperty("label", ctx.options.noText)("color", ctx.options.noColor);
1511
1509
  i0.ɵɵadvance();
1512
1510
  i0.ɵɵproperty("label", ctx.options.yesText)("color", ctx.options.yesColor);
1513
- } }, dependencies: [TranslateModule, MatDialogModule, i1$6.MatDialogTitle, i1$6.MatDialogActions, i1$6.MatDialogContent, RaisedButtonComponent$1, StrokedButtonComponent$1, IconButtonComponent$1, i1.TranslatePipe], styles: ["@media (max-width: 500px){ .dialog-global-style{max-width:100vw!important}} .dialog-global-style{margin:auto!important}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:first-child{display:flex;align-items:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:first-child div[_ngcontent-%COMP%]:first-child{flex:1}.yes-button[_ngcontent-%COMP%]{padding-left:8px}.message[_ngcontent-%COMP%]{white-space:pre-wrap}.title[_ngcontent-%COMP%]{padding-top:8px}.action-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:row;gap:8px}"] }); }
1511
+ } }, dependencies: [TranslateModule, MatDialogModule, i1$6.MatDialogTitle, i1$6.MatDialogActions, i1$6.MatDialogContent, RaisedButtonComponent, StrokedButtonComponent, IconButtonComponent, i1.TranslatePipe], styles: ["@media (max-width: 500px){ .dialog-global-style{max-width:100vw!important}} .dialog-global-style{margin:auto!important}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:first-child{display:flex;align-items:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]:first-child div[_ngcontent-%COMP%]:first-child{flex:1}.yes-button[_ngcontent-%COMP%]{padding-left:8px}.message[_ngcontent-%COMP%]{white-space:pre-wrap}.title[_ngcontent-%COMP%]{padding-top:8px}.action-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:row;gap:8px}"] }); }
1514
1512
  }
1515
1513
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConfirmDialogComponent, [{
1516
1514
  type: Component,
1517
- args: [{ selector: 'cauca-confirm-dialog', standalone: true, imports: [TranslateModule, MatDialogModule, RaisedButtonComponent$1, StrokedButtonComponent$1, IconButtonComponent$1], template: "<div mat-dialog-title>\n <div class=\"h6 title\">{{ title | translate: options.titleArgs }}</div>\n <cauca-icon-button id=\"close-button\" (buttonClick)=\"cancelClick()\" icon=\"close\" />\n </div>\n <div mat-dialog-content>\n <p class=\"message\">{{ message | translate: options.messageArgs }}</p>\n </div>\n <mat-dialog-actions align=\"end\" class=\"action-buttons\">\n <cauca-stroked-button class=\"no-button\" [label]=\"options.noText\" [color]=\"options.noColor\" (buttonClick)=\"noClick()\" />\n <cauca-raised-button class=\"yes-button\" [label]=\"options.yesText\" [color]=\"options.yesColor\" (buttonClick)=\"yesClick()\" />\n </mat-dialog-actions>", styles: ["@media (max-width: 500px){::ng-deep .dialog-global-style{max-width:100vw!important}}::ng-deep .dialog-global-style{margin:auto!important}:host>div:first-child{display:flex;align-items:center}:host>div:first-child div:first-child{flex:1}.yes-button{padding-left:8px}.message{white-space:pre-wrap}.title{padding-top:8px}.action-buttons{display:flex;align-items:center;flex-direction:row;gap:8px}\n"] }]
1515
+ args: [{ selector: 'cauca-confirm-dialog', standalone: true, imports: [TranslateModule, MatDialogModule, RaisedButtonComponent, StrokedButtonComponent, IconButtonComponent], template: "<div mat-dialog-title>\n <div class=\"h6 title\">{{ title | translate: options.titleArgs }}</div>\n <cauca-icon-button id=\"close-button\" (buttonClick)=\"cancelClick()\" icon=\"close\" />\n </div>\n <div mat-dialog-content>\n <p class=\"message\">{{ message | translate: options.messageArgs }}</p>\n </div>\n <mat-dialog-actions align=\"end\" class=\"action-buttons\">\n <cauca-stroked-button class=\"no-button\" [label]=\"options.noText\" [color]=\"options.noColor\" (buttonClick)=\"noClick()\" />\n <cauca-raised-button class=\"yes-button\" [label]=\"options.yesText\" [color]=\"options.yesColor\" (buttonClick)=\"yesClick()\" />\n </mat-dialog-actions>", styles: ["@media (max-width: 500px){::ng-deep .dialog-global-style{max-width:100vw!important}}::ng-deep .dialog-global-style{margin:auto!important}:host>div:first-child{display:flex;align-items:center}:host>div:first-child div:first-child{flex:1}.yes-button{padding-left:8px}.message{white-space:pre-wrap}.title{padding-top:8px}.action-buttons{display:flex;align-items:center;flex-direction:row;gap:8px}\n"] }]
1518
1516
  }], () => [{ type: i1$6.MatDialogRef }, { type: undefined, decorators: [{
1519
1517
  type: Inject,
1520
1518
  args: [MAT_DIALOG_DATA]
1521
1519
  }] }, { type: i2$2.BreakpointObserver }], null); })();
1522
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConfirmDialogComponent, { className: "ConfirmDialogComponent", filePath: "lib/dialogs/confirm-dialog/confirm-dialog.component.ts", lineNumber: 17 }); })();
1520
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConfirmDialogComponent, { className: "ConfirmDialogComponent", filePath: "lib/dialogs/confirm-dialog/confirm-dialog.component.ts", lineNumber: 19 }); })();
1523
1521
 
1524
1522
  function TextInputDialogComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
1525
1523
  i0.ɵɵelement(0, "textarea", 5);
@@ -2398,6 +2396,37 @@ class PasswordInputComponent {
2398
2396
  }], () => [], null); })();
2399
2397
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PasswordInputComponent, { className: "PasswordInputComponent", filePath: "lib/inputs/password/password-input/password-input.component.ts", lineNumber: 23 }); })();
2400
2398
 
2399
+ class PasswordValidation {
2400
+ constructor(hasMinimumCharacters = false, hasMinimumNumeric = false, hasLowerAndUppercase = false, hasSpecialCharacter = false, hasIdenticalPassword = false) {
2401
+ this.hasMinimumCharacters = hasMinimumCharacters;
2402
+ this.hasMinimumNumeric = hasMinimumNumeric;
2403
+ this.hasLowerAndUppercase = hasLowerAndUppercase;
2404
+ this.hasSpecialCharacter = hasSpecialCharacter;
2405
+ this.hasIdenticalPassword = hasIdenticalPassword;
2406
+ }
2407
+ isValid() {
2408
+ return this.hasMinimumCharacters && this.hasMinimumNumeric && this.hasLowerAndUppercase && this.hasSpecialCharacter && this.hasIdenticalPassword;
2409
+ }
2410
+ }
2411
+
2412
+ class PasswordValidator {
2413
+ static { this.passwordMinLength = 13; }
2414
+ static validate(formGroup) {
2415
+ const password = formGroup.controls['password'].value;
2416
+ const confirmedPassword = formGroup.controls['confirmation'].value;
2417
+ return new PasswordValidation(password.length >= this.passwordMinLength, this.hasNumeric(password), this.hasLowerCaseAndUpperCase(password), this.hasSpecialCharacter(password), password && password === confirmedPassword);
2418
+ }
2419
+ static hasLowerCaseAndUpperCase(password) {
2420
+ return /^(?=.*[a-z])(?=.*[A-Z])/.test(password);
2421
+ }
2422
+ static hasNumeric(password) {
2423
+ return /(?=.*\d)/.test(password);
2424
+ }
2425
+ static hasSpecialCharacter(password) {
2426
+ return new RegExp(/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/).test(password);
2427
+ }
2428
+ }
2429
+
2401
2430
  const _c0$7 = ["*"];
2402
2431
  function PasswordSelectionComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
2403
2432
  i0.ɵɵelement(0, "cauca-password-criteria-viewer", 5);
@@ -3241,7 +3270,7 @@ class SavingConfirmedBoxComponent {
3241
3270
  this.show = model(false, ...(ngDevMode ? [{ debugName: "show" }] : []));
3242
3271
  }
3243
3272
  static { this.ɵfac = function SavingConfirmedBoxComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SavingConfirmedBoxComponent)(); }; }
3244
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SavingConfirmedBoxComponent, selectors: [["app-saving-confirmed-box"]], inputs: { show: [1, "show"] }, outputs: { show: "showChange" }, decls: 1, vars: 1, consts: [["caption", "savingSuccessNotification.title", "type", "success", "variant", "standard", 3, "showButton", "showCloseButton"], ["caption", "savingSuccessNotification.title", "type", "success", "variant", "standard", 3, "closeClick", "showButton", "showCloseButton"]], template: function SavingConfirmedBoxComponent_Template(rf, ctx) { if (rf & 1) {
3273
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SavingConfirmedBoxComponent, selectors: [["cauca-saving-confirmed-box"]], inputs: { show: [1, "show"] }, outputs: { show: "showChange" }, decls: 1, vars: 1, consts: [["caption", "savingSuccessNotification.title", "type", "success", "variant", "standard", 3, "showButton", "showCloseButton"], ["caption", "savingSuccessNotification.title", "type", "success", "variant", "standard", 3, "closeClick", "showButton", "showCloseButton"]], template: function SavingConfirmedBoxComponent_Template(rf, ctx) { if (rf & 1) {
3245
3274
  i0.ɵɵconditionalCreate(0, SavingConfirmedBoxComponent_Conditional_0_Template, 3, 5, "cauca-snackbar", 0);
3246
3275
  } if (rf & 2) {
3247
3276
  i0.ɵɵconditional(ctx.show() ? 0 : -1);
@@ -3249,7 +3278,7 @@ class SavingConfirmedBoxComponent {
3249
3278
  }
3250
3279
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SavingConfirmedBoxComponent, [{
3251
3280
  type: Component,
3252
- args: [{ selector: 'app-saving-confirmed-box', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [SnackBarComponent, TranslateModule], template: "@if (show()) {\r\n <cauca-snackbar\r\n caption=\"savingSuccessNotification.title\"\r\n type=\"success\"\r\n variant=\"standard\"\r\n [showButton]=\"false\"\r\n [showCloseButton]=\"true\"\r\n (closeClick)=\"show.set(false)\">\r\n {{'savingSuccessNotification.message' | translate}}\r\n </cauca-snackbar>\r\n}" }]
3281
+ args: [{ selector: 'cauca-saving-confirmed-box', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [SnackBarComponent, TranslateModule], template: "@if (show()) {\r\n <cauca-snackbar\r\n caption=\"savingSuccessNotification.title\"\r\n type=\"success\"\r\n variant=\"standard\"\r\n [showButton]=\"false\"\r\n [showCloseButton]=\"true\"\r\n (closeClick)=\"show.set(false)\">\r\n {{'savingSuccessNotification.message' | translate}}\r\n </cauca-snackbar>\r\n}" }]
3253
3282
  }], null, null); })();
3254
3283
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SavingConfirmedBoxComponent, { className: "SavingConfirmedBoxComponent", filePath: "lib/notifications/saving-confirmed-box/saving-confirmed-box.component.ts", lineNumber: 13 }); })();
3255
3284
 
@@ -3273,7 +3302,7 @@ class SavingErrorBoxComponent {
3273
3302
  this.error = computed(() => this.specificError() ? this.specificError() : 'generalError.savingErrorAlertMessage', ...(ngDevMode ? [{ debugName: "error" }] : []));
3274
3303
  }
3275
3304
  static { this.ɵfac = function SavingErrorBoxComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SavingErrorBoxComponent)(); }; }
3276
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SavingErrorBoxComponent, selectors: [["app-saving-error-box"]], inputs: { show: [1, "show"], specificError: [1, "specificError"] }, outputs: { show: "showChange" }, decls: 1, vars: 1, consts: [["caption", "generalError.savingErrorAlertTitle", "type", "error", "variant", "standard", 3, "showButton", "showCloseButton"], ["caption", "generalError.savingErrorAlertTitle", "type", "error", "variant", "standard", 3, "closeClick", "showButton", "showCloseButton"]], template: function SavingErrorBoxComponent_Template(rf, ctx) { if (rf & 1) {
3305
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SavingErrorBoxComponent, selectors: [["cauca-saving-error-box"]], inputs: { show: [1, "show"], specificError: [1, "specificError"] }, outputs: { show: "showChange" }, decls: 1, vars: 1, consts: [["caption", "generalError.savingErrorAlertTitle", "type", "error", "variant", "standard", 3, "showButton", "showCloseButton"], ["caption", "generalError.savingErrorAlertTitle", "type", "error", "variant", "standard", 3, "closeClick", "showButton", "showCloseButton"]], template: function SavingErrorBoxComponent_Template(rf, ctx) { if (rf & 1) {
3277
3306
  i0.ɵɵconditionalCreate(0, SavingErrorBoxComponent_Conditional_0_Template, 3, 5, "cauca-snackbar", 0);
3278
3307
  } if (rf & 2) {
3279
3308
  i0.ɵɵconditional(ctx.show() ? 0 : -1);
@@ -3281,7 +3310,7 @@ class SavingErrorBoxComponent {
3281
3310
  }
3282
3311
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SavingErrorBoxComponent, [{
3283
3312
  type: Component,
3284
- args: [{ selector: 'app-saving-error-box', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [SnackBarComponent, TranslateModule], template: "@if (show()) {\r\n <cauca-snackbar\r\n caption=\"generalError.savingErrorAlertTitle\"\r\n type=\"error\"\r\n variant=\"standard\"\r\n [showButton]=\"false\"\r\n [showCloseButton]=\"true\"\r\n (closeClick)=\"show.set(false)\">\r\n {{error() | translate}}\r\n </cauca-snackbar>\r\n}" }]
3313
+ args: [{ selector: 'cauca-saving-error-box', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [SnackBarComponent, TranslateModule], template: "@if (show()) {\r\n <cauca-snackbar\r\n caption=\"generalError.savingErrorAlertTitle\"\r\n type=\"error\"\r\n variant=\"standard\"\r\n [showButton]=\"false\"\r\n [showCloseButton]=\"true\"\r\n (closeClick)=\"show.set(false)\">\r\n {{error() | translate}}\r\n </cauca-snackbar>\r\n}" }]
3285
3314
  }], null, null); })();
3286
3315
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SavingErrorBoxComponent, { className: "SavingErrorBoxComponent", filePath: "lib/notifications/saving-error-box/saving-error-box.component.ts", lineNumber: 13 }); })();
3287
3316