@energycap/components 0.26.4 → 0.26.6-ECAPID-278-Phone-Textbox-Support.20211117-1602

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.
@@ -9,12 +9,12 @@ import { ValidatorFn } from '@angular/forms';
9
9
  * textarea, email is input[type="email"], url is input[type="url"], and password
10
10
  * is an input[type="password"]
11
11
  *
12
- * If the type is url a regex pattern is automatically added to the form validators. No other pattern validators
12
+ * If the type is url or tel a regex pattern is automatically added to the form validators. No other pattern validators
13
13
  * may be used for this input, having more than one will cause issues.
14
14
  *
15
15
  * If the type is email an email validator is automatically added to the form validators.
16
16
  * */
17
- export declare type TextboxType = "text" | "multi_line" | "email" | "url" | "password";
17
+ export declare type TextboxType = "text" | "multi_line" | "email" | "url" | "password" | "tel";
18
18
  /** Type for advanced validation of textbox form controls, if in the future
19
19
  * we want more handling we will need to update this type.
20
20
  */
@@ -28,6 +28,8 @@ export declare type TextboxValidatorParameters = {
28
28
  };
29
29
  /** Advanced validation for textbox form controls */
30
30
  export declare const textboxValidation: (validatorParams: TextboxValidatorParameters) => ValidatorFn;
31
+ export declare const phoneNumberValidationPattern: string;
32
+ export declare const urlValidationPattern: string;
31
33
  export declare class TextboxComponent extends FormControlBase implements OnInit, AfterViewInit, OnChanges {
32
34
  protected validationMessageService: ValidationMessageService;
33
35
  protected formGroupHelper: FormGroupHelper;
@@ -49,7 +51,7 @@ export declare class TextboxComponent extends FormControlBase implements OnInit,
49
51
  *
50
52
  * This is for adding the attribute on the element to get the browser functionality
51
53
  * from the input. If you need the form to be validated before submission, apply the
52
- * maxLength validator to the form conrol.
54
+ * maxLength validator to the form control.
53
55
  */
54
56
  maxlength?: number;
55
57
  /**
@@ -57,11 +59,11 @@ export declare class TextboxComponent extends FormControlBase implements OnInit,
57
59
  *
58
60
  * This is for adding the attribute on the element to get the browser functionality
59
61
  * from the input. If you need the form to be validated before submission, apply the
60
- * minLength validator to the form conrol.
62
+ * minLength validator to the form control.
61
63
  */
62
64
  minlength?: number;
63
65
  /**
64
- * The value of the rows attiribute for a textarea. Only applies to multi-line type
66
+ * The value of the rows attribute for a textarea. Only applies to multi-line type
65
67
  */
66
68
  rows?: number;
67
69
  /**
@@ -73,6 +75,10 @@ export declare class TextboxComponent extends FormControlBase implements OnInit,
73
75
  * If set to true, we will upper case on focus out
74
76
  */
75
77
  upperCase: boolean;
78
+ /**
79
+ * Validation pattern for the input. This is determined on the input type specified
80
+ */
81
+ validationPattern: string;
76
82
  protected inputElement: ElementRef;
77
83
  constructor(validationMessageService: ValidationMessageService, formGroupHelper: FormGroupHelper, translate: TranslateService);
78
84
  ngOnChanges(changes: SimpleChanges): void;
@@ -85,7 +91,7 @@ export declare class TextboxComponent extends FormControlBase implements OnInit,
85
91
  */
86
92
  ngAfterViewInit(): void;
87
93
  /**
88
- * Function to set focus on an input programatically after the page
94
+ * Function to set focus on an input programmatically after the page
89
95
  * had been rendered. The highlight text flag will select the text
90
96
  * within the input if passed in and true
91
97
  */
@@ -4,6 +4,7 @@ export declare class AppBarComponent {
4
4
  user: AvatarUser;
5
5
  userMenuItems: MenuItem[];
6
6
  userMenuWidth: number;
7
+ userMenuMinWidth: number;
7
8
  userMenuTabindex: number;
8
9
  iconPath: string;
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.26.4",
3
+ "version": "0.26.6-ECAPID-278-Phone-Textbox-Support.20211117-1602",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
@@ -33,5 +33,6 @@
33
33
  "MessageTooLong_Truncated_SC": "...message truncated due to length",
34
34
  "JsonValidationMessage_SC": "is not valid JSON",
35
35
  "PleaseCorrectForm_SC": "Please correct invalid values before submitting this form.",
36
- "PageBaseUnknownSaveError_SC": "An unknown error occurred while saving your changes. Please try again later."
36
+ "PageBaseUnknownSaveError_SC": "An unknown error occurred while saving your changes. Please try again later.",
37
+ "PasswordInvalidValidationMessage_LC": "does not meet all requirements"
37
38
  }
@@ -137,7 +137,8 @@ $checkbox-indicator-size: $form-control-icon-size;
137
137
 
138
138
  &.is-pending {
139
139
  &.ng-valid,
140
- &.ng-invalid {
140
+ &.ng-invalid,
141
+ &.ng-pending {
141
142
  @include form-control-state(pending, $selector);
142
143
  }
143
144
  }
@@ -24,7 +24,7 @@ $overlay-padding-y: 3rem;
24
24
  position: relative;
25
25
  }
26
26
 
27
- @mixin overlay-message($color: $gray-3, $font-size: $ec-font-size-title) {
27
+ @mixin overlay-message($color: $ec-color-text-secondary-dark, $font-size: $ec-font-size-title) {
28
28
  color: $color;
29
29
  font-size: $font-size;
30
30
  }