@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.
- package/bundles/energycap-components.umd.js +30 -10
- package/bundles/energycap-components.umd.js.map +1 -1
- package/bundles/energycap-components.umd.min.js +1 -1
- package/bundles/energycap-components.umd.min.js.map +1 -1
- package/energycap-components.metadata.json +1 -1
- package/energycap-components.min.css +1 -1
- package/esm2015/lib/controls/button/button.component.js +1 -1
- package/esm2015/lib/controls/select/select.component.js +1 -1
- package/esm2015/lib/controls/textbox/textbox.component.js +18 -5
- package/esm2015/lib/core/validation-message.service.js +4 -1
- package/esm2015/lib/display/app-bar/app-bar.component.js +5 -3
- package/esm2015/lib/display/toast/toast/toast.component.js +2 -2
- package/esm2015/lib/display/view-overlay/view-overlay.component.js +1 -1
- package/fesm2015/energycap-components.js +29 -11
- package/fesm2015/energycap-components.js.map +1 -1
- package/lib/controls/textbox/textbox.component.d.ts +12 -6
- package/lib/display/app-bar/app-bar.component.d.ts +1 -0
- package/package.json +1 -1
- package/src/assets/locales/en_US.json +2 -1
- package/src/styles/mixins/_form-control-base.scss +2 -1
- package/src/styles/mixins/_overlay-base.scss +1 -1
|
@@ -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
|
|
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
|
|
62
|
+
* minLength validator to the form control.
|
|
61
63
|
*/
|
|
62
64
|
minlength?: number;
|
|
63
65
|
/**
|
|
64
|
-
* The value of the rows
|
|
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
|
|
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
|
*/
|
package/package.json
CHANGED
|
@@ -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
|
}
|
|
@@ -24,7 +24,7 @@ $overlay-padding-y: 3rem;
|
|
|
24
24
|
position: relative;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@mixin overlay-message($color: $
|
|
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
|
}
|