@everymatrix/general-input-hsl 0.25.42 → 0.25.43

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.
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ValidationSchema, InputStateEvent, InputValueEvent } from '../../utils/types';
2
+ import { ValidationSchema, InputStateEvent, InputValueEvent, ValidationResult } from '../../utils/types';
3
3
  export declare class EmailInput {
4
4
  /**
5
5
  * Name of the input.
@@ -55,7 +55,6 @@ export declare class EmailInput {
55
55
  value: string;
56
56
  inputReference: HTMLInputElement;
57
57
  debounceTime: ReturnType<typeof setTimeout>;
58
- validationPattern: string;
59
58
  duplicateInputValue: string;
60
59
  touched: boolean;
61
60
  handleStylingChange(newValue: string, oldValue: string): void;
@@ -67,14 +66,12 @@ export declare class EmailInput {
67
66
  valueHandler(inputValueEvent: InputValueEvent): void;
68
67
  handleClickOutside(event: MouseEvent): void;
69
68
  valueChangedHandler(event: CustomEvent<InputValueEvent>): void;
70
- connectedCallback(): void;
71
69
  componentDidRender(): void;
72
70
  componentDidLoad(): void;
73
71
  handleInput: (event: Event) => void;
74
72
  handleBlur: () => void;
75
- setValidity(): boolean;
76
- setPattern(): string;
77
- setErrorMessage(): string;
73
+ private updateValidity;
74
+ validate(): ValidationResult;
78
75
  setClientStyling: () => void;
79
76
  renderTooltip(): any;
80
77
  render(): any;
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ValidationSchema, InputStateEvent, InputValueEvent } from '../../utils/types';
2
+ import { ValidationSchema, InputStateEvent, InputValueEvent, ValidationResult } from '../../utils/types';
3
3
  export declare class NumberInput {
4
4
  /**
5
5
  * Name of the input.
@@ -50,7 +50,6 @@ export declare class NumberInput {
50
50
  private tooltipIconReference;
51
51
  value: string;
52
52
  inputReference: HTMLInputElement;
53
- validationPattern: string;
54
53
  debounceTime: ReturnType<typeof setTimeout>;
55
54
  touched: boolean;
56
55
  handleStylingChange(newValue: string, oldValue: string): void;
@@ -61,14 +60,12 @@ export declare class NumberInput {
61
60
  sendInputValue: EventEmitter<InputValueEvent>;
62
61
  valueHandler(inputValueEvent: InputValueEvent): void;
63
62
  handleClickOutside(event: MouseEvent): void;
64
- connectedCallback(): void;
65
63
  componentDidRender(): void;
66
64
  componentDidLoad(): void;
67
65
  handleInput: (event: Event) => void;
68
66
  handleBlur: () => void;
69
- setValidity(): boolean;
70
- setPattern(): string;
71
- setErrorMessage(): string;
67
+ private updateValidity;
68
+ validate(): ValidationResult;
72
69
  setClientStyling: () => void;
73
70
  renderTooltip(): any;
74
71
  render(): any;
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ValidationSchema, InputStateEvent, InputValueEvent, PasswordComplexity } from '../../utils/types';
2
+ import { ValidationSchema, InputStateEvent, InputValueEvent, PasswordComplexity, ValidationResult } from '../../utils/types';
3
3
  export declare class PasswordInput {
4
4
  /**
5
5
  * Name of the input.
@@ -65,7 +65,6 @@ export declare class PasswordInput {
65
65
  private touched;
66
66
  private originalValid;
67
67
  debounceTime: ReturnType<typeof setTimeout>;
68
- validationPattern: string;
69
68
  duplicateInputValue: string;
70
69
  handleStylingChange(newValue: string, oldValue: string): void;
71
70
  validityChanged(): void;
@@ -87,9 +86,8 @@ export declare class PasswordInput {
87
86
  handleBlur: (event: Event) => void;
88
87
  handleFocus: () => void;
89
88
  calculateComplexity(password: string): void;
90
- setValidity(): boolean;
91
- setPattern(): string;
92
- setErrorMessage(): string;
89
+ validate(): ValidationResult;
90
+ private updateValidity;
93
91
  setClientStyling: () => void;
94
92
  renderTooltip(): any;
95
93
  renderComplexityPopup(): any;
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ValidationSchema, InputStateEvent, InputValueEvent, Option } from '../../utils/types';
2
+ import { ValidationSchema, InputStateEvent, InputValueEvent, Option, ValidationResult } from '../../utils/types';
3
3
  export declare class TelInput {
4
4
  /**
5
5
  * Name of the input.
@@ -61,7 +61,6 @@ export declare class TelInput {
61
61
  private tooltipReference;
62
62
  private tooltipIconReference;
63
63
  inputReference: HTMLInputElement;
64
- validationPattern: string;
65
64
  value: any;
66
65
  touched: boolean;
67
66
  prefixValue: string;
@@ -84,9 +83,8 @@ export declare class TelInput {
84
83
  handleInput: (event: Event) => void;
85
84
  handleBlur: () => void;
86
85
  handlePrefixInput(event: any): void;
87
- setValidity(): boolean;
88
- setPattern(): string;
89
- setErrorMessage(): string;
86
+ validate(): ValidationResult;
87
+ private updateValidity;
90
88
  setClientStyling: () => void;
91
89
  renderTooltip(): any;
92
90
  render(): any;
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ValidationSchema, InputStateEvent, InputValueEvent } from '../../utils/types';
2
+ import { ValidationSchema, InputStateEvent, InputValueEvent, ValidationResult } from '../../utils/types';
3
3
  export declare class TextInput {
4
4
  /**
5
5
  * Name of the input.
@@ -60,7 +60,6 @@ export declare class TextInput {
60
60
  touched: boolean;
61
61
  private stylingContainer;
62
62
  private value;
63
- private validationPattern;
64
63
  private inputReference;
65
64
  private duplicateInputValue;
66
65
  private tooltipReference;
@@ -77,14 +76,12 @@ export declare class TextInput {
77
76
  handleClickOutside(event: MouseEvent): void;
78
77
  valueChangedHandler(event: CustomEvent<InputValueEvent>): void;
79
78
  handleValidationChange(event: any): void;
80
- connectedCallback(): void;
81
79
  componentDidRender(): void;
82
80
  componentDidLoad(): void;
83
81
  handleInput: (event: Event) => void;
84
82
  handleBlur: (event: Event) => void;
85
- setValidity(): boolean;
86
- setPattern(): string[];
87
- setErrorMessage(): string;
83
+ private updateValidity;
84
+ validate(): ValidationResult;
88
85
  setClientStyling: () => void;
89
86
  renderTooltip(): any;
90
87
  render(): any;
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ValidationSchema, InputStateEvent, InputValueEvent } from '../../utils/types';
2
+ import { ValidationSchema, InputStateEvent, InputValueEvent, ValidationResult } from '../../utils/types';
3
3
  export declare class TwofaInput {
4
4
  /**
5
5
  * Name of the input.
@@ -48,7 +48,6 @@ export declare class TwofaInput {
48
48
  errorMessage: string;
49
49
  code: string[];
50
50
  resendIntervalSecondsLeft: number;
51
- private validationPattern;
52
51
  private stylingContainer;
53
52
  private tooltipReference;
54
53
  private tooltipIconReference;
@@ -75,9 +74,8 @@ export declare class TwofaInput {
75
74
  handleInput: (e: Event, idx: number) => void;
76
75
  handleKeyDown(e: KeyboardEvent, idx: number): void;
77
76
  handlePaste(e: ClipboardEvent): void;
78
- setValidity(): void;
79
- setPattern(): string;
80
- setErrorMessage(): void;
77
+ validate(): ValidationResult;
78
+ private updateValidity;
81
79
  setClientStyling: () => void;
82
80
  renderTooltip(): any;
83
81
  render(): any;
@@ -41,6 +41,10 @@ export interface CustomValidationRules {
41
41
  correlationField?: string;
42
42
  correlationValue?: string;
43
43
  }
44
+ export interface ValidationResult {
45
+ isValid: boolean;
46
+ errorMessage: string;
47
+ }
44
48
  export interface CustomRule {
45
49
  rule: string;
46
50
  errorMessage: string;
@@ -1 +1,4 @@
1
+ import { CustomValidationRules } from './types';
1
2
  export declare function format(first: string, middle: string, last: string): string;
3
+ export declare function getFailedRegexRule(value: string, custom: CustomValidationRules[] | undefined | null): CustomValidationRules | undefined;
4
+ export declare function getRuleErrorMessage(rule: CustomValidationRules, language: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-input-hsl",
3
- "version": "0.25.42",
3
+ "version": "0.25.43",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",