@testgorilla/tgo-ui 2.2.3 → 2.3.2

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.
Files changed (51) hide show
  1. package/components/autocomplete/autocomplete.component.d.ts +24 -7
  2. package/components/autocomplete/autocomplete.component.module.d.ts +2 -1
  3. package/components/checkbox/checkbox.component.d.ts +27 -7
  4. package/components/checkbox/checkbox.component.module.d.ts +4 -1
  5. package/components/dropdown/dropdown.component.d.ts +12 -6
  6. package/components/dropdown/dropdown.component.module.d.ts +2 -1
  7. package/components/field/field.component.d.ts +28 -6
  8. package/components/field/field.component.module.d.ts +2 -1
  9. package/components/icon/icon.config.d.ts +2 -2
  10. package/components/password-criteria/password.component.d.ts +2 -1
  11. package/components/phone-input/join-strings.pipe.d.ts +7 -0
  12. package/components/phone-input/phone-input.component.d.ts +135 -0
  13. package/components/phone-input/phone-input.component.module.d.ts +19 -0
  14. package/components/phone-input/phone-input.model.d.ts +8 -0
  15. package/components/radio-button/radio-button.component.d.ts +8 -1
  16. package/components/validation-error/validation-error.component.d.ts +27 -0
  17. package/components/validation-error/validation-error.model.d.ts +1 -0
  18. package/components/validation-error/validation-error.module.d.ts +10 -0
  19. package/esm2022/assets/i18n/en.json +10 -1
  20. package/esm2022/components/autocomplete/autocomplete.component.mjs +56 -32
  21. package/esm2022/components/autocomplete/autocomplete.component.module.mjs +7 -3
  22. package/esm2022/components/checkbox/checkbox.component.mjs +48 -22
  23. package/esm2022/components/checkbox/checkbox.component.module.mjs +7 -4
  24. package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +3 -3
  25. package/esm2022/components/dialog/dialog.service.mjs +2 -2
  26. package/esm2022/components/dropdown/dropdown.component.mjs +34 -27
  27. package/esm2022/components/dropdown/dropdown.component.module.mjs +7 -3
  28. package/esm2022/components/field/field.component.mjs +64 -28
  29. package/esm2022/components/field/field.component.module.mjs +7 -3
  30. package/esm2022/components/icon/icon.config.mjs +6 -1
  31. package/esm2022/components/password-criteria/password.component.mjs +7 -3
  32. package/esm2022/components/phone-input/join-strings.pipe.mjs +14 -0
  33. package/esm2022/components/phone-input/phone-input.component.mjs +340 -0
  34. package/esm2022/components/phone-input/phone-input.component.module.mjs +60 -0
  35. package/esm2022/components/phone-input/phone-input.model.mjs +2 -0
  36. package/esm2022/components/radio-button/radio-button.component.mjs +12 -3
  37. package/esm2022/components/validation-error/validation-error.component.mjs +59 -0
  38. package/esm2022/components/validation-error/validation-error.model.mjs +2 -0
  39. package/esm2022/components/validation-error/validation-error.module.mjs +20 -0
  40. package/esm2022/public-api.mjs +5 -1
  41. package/fesm2022/testgorilla-tgo-ui.mjs +892 -323
  42. package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
  43. package/package.json +5 -2
  44. package/public-api.d.ts +3 -0
  45. package/src/assets/i18n/en.json +10 -1
  46. package/src/assets/icons/Google.svg +6 -0
  47. package/src/assets/icons/rebrand/Google-filled.svg +6 -0
  48. package/src/assets/icons/rebrand/Google-in-line.svg +6 -0
  49. package/src/theme/_font.scss +22 -0
  50. package/src/theme/_input.scss +37 -0
  51. package/src/theme/theme.scss +25 -0
@@ -1,13 +1,16 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
1
+ import { AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, OnChanges } from '@angular/core';
2
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import { MatAutocomplete, MatAutocompleteSelectedEvent, MatAutocompleteTrigger } from '@angular/material/autocomplete';
4
4
  import { ReplaySubject } from 'rxjs';
5
5
  import { Autocomplete, AutocompleteType, DropdownVariation } from './autocomplete.model';
6
- import { ApplicationTheme } from "../../models/application-theme.model";
6
+ import { ApplicationTheme } from '../../models/application-theme.model';
7
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
7
8
  import * as i0 from "@angular/core";
8
- export declare class AutocompleteComponent implements ControlValueAccessor, OnChanges, AfterViewInit {
9
+ export declare class AutocompleteComponent implements ControlValueAccessor, OnChanges, AfterViewInit, DoCheck {
9
10
  private readonly defaultAppTheme;
10
11
  private readonly cdr;
12
+ private readonly domSanitizer;
13
+ ngControl: NgControl;
11
14
  /**
12
15
  * @property itemsList
13
16
  * @description The list of items to display in the autocomplete.
@@ -110,11 +113,19 @@ export declare class AutocompleteComponent implements ControlValueAccessor, OnCh
110
113
  * @memberof AutocompleteComponent
111
114
  */
112
115
  applicationTheme: ApplicationTheme;
116
+ /**
117
+ * Input field errors
118
+ *
119
+ * @type {string[]}
120
+ * @memberof AutocompleteComponent
121
+ */
122
+ set errors(errors: string[]);
113
123
  selectionChange: EventEmitter<any>;
114
124
  searchTextChange: EventEmitter<string>;
115
125
  formFieldElement: ElementRef<HTMLElement>;
116
126
  tagContainer: ElementRef<HTMLElement>;
117
127
  autocomplete: MatAutocompleteTrigger;
128
+ protected safeErrors: SafeHtml[];
118
129
  protected value: any;
119
130
  protected inputValue: any;
120
131
  protected isInputFocus: boolean;
@@ -128,7 +139,12 @@ export declare class AutocompleteComponent implements ControlValueAccessor, OnCh
128
139
  protected filteredSuggestionList$: import("rxjs").Observable<any>;
129
140
  protected searchResult$: import("rxjs").Observable<boolean>;
130
141
  protected translationContext: string;
131
- constructor(defaultAppTheme: ApplicationTheme, cdr: ChangeDetectorRef);
142
+ constructor(defaultAppTheme: ApplicationTheme, cdr: ChangeDetectorRef, domSanitizer: DomSanitizer, ngControl: NgControl);
143
+ /**
144
+ * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched
145
+ * to display validation errors that might happen (e.g. required)
146
+ */
147
+ ngDoCheck(): void;
132
148
  ngOnChanges(): void;
133
149
  ngAfterViewInit(): void;
134
150
  onChange: (_: any) => void;
@@ -150,6 +166,7 @@ export declare class AutocompleteComponent implements ControlValueAccessor, OnCh
150
166
  protected get isDropdown(): boolean;
151
167
  protected onChevronClick(autocomplete: MatAutocomplete): void;
152
168
  protected get inputWidth(): number;
153
- static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, [{ optional: true; }, null]>;
154
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "ui-autocomplete", never, { "itemsList": { "alias": "itemsList"; "required": false; }; "suggestionsList": { "alias": "suggestionsList"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "allowAdd": { "alias": "allowAdd"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "label": { "alias": "label"; "required": false; }; "itemValue": { "alias": "itemValue"; "required": false; }; "type": { "alias": "type"; "required": false; }; "minCharactersSearch": { "alias": "minCharactersSearch"; "required": false; }; "variant": { "alias": "variant"; "required": true; }; "language": { "alias": "language"; "required": false; }; "showBottomContent": { "alias": "showBottomContent"; "required": false; }; "valuePrimitive": { "alias": "valuePrimitive"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; }, { "selectionChange": "selectionChange"; "searchTextChange": "searchTextChange"; }, never, never, false, never>;
169
+ protected trackByFn: (index: number, value: any) => any;
170
+ static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, [{ optional: true; }, null, null, { optional: true; self: true; }]>;
171
+ static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "ui-autocomplete", never, { "itemsList": { "alias": "itemsList"; "required": false; }; "suggestionsList": { "alias": "suggestionsList"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "allowAdd": { "alias": "allowAdd"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "label": { "alias": "label"; "required": false; }; "itemValue": { "alias": "itemValue"; "required": false; }; "type": { "alias": "type"; "required": false; }; "minCharactersSearch": { "alias": "minCharactersSearch"; "required": false; }; "variant": { "alias": "variant"; "required": true; }; "language": { "alias": "language"; "required": false; }; "showBottomContent": { "alias": "showBottomContent"; "required": false; }; "valuePrimitive": { "alias": "valuePrimitive"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; }, { "selectionChange": "selectionChange"; "searchTextChange": "searchTextChange"; }, never, never, false, never>;
155
172
  }
@@ -12,8 +12,9 @@ import * as i10 from "../tag/tag.component.module";
12
12
  import * as i11 from "@angular/material/chips";
13
13
  import * as i12 from "../icon/icon.component.module";
14
14
  import * as i13 from "../../pipes/ui-translate.pipe";
15
+ import * as i14 from "../validation-error/validation-error.module";
15
16
  export declare class AutocompleteComponentModule {
16
17
  static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponentModule, never>;
17
- static ɵmod: i0.ɵɵNgModuleDeclaration<AutocompleteComponentModule, [typeof i1.AutocompleteComponent, typeof i2.TransformItemPipe, typeof i3.IncludesPipe, typeof i4.SelectTextDirective], [typeof i5.CommonModule, typeof i6.MatFormFieldModule, typeof i7.MatAutocompleteModule, typeof i8.MatInputModule, typeof i9.FormsModule, typeof i10.TagComponentModule, typeof i11.MatChipsModule, typeof i12.IconComponentModule, typeof i13.UiTranslatePipe], [typeof i1.AutocompleteComponent]>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AutocompleteComponentModule, [typeof i1.AutocompleteComponent, typeof i2.TransformItemPipe, typeof i3.IncludesPipe, typeof i4.SelectTextDirective], [typeof i5.CommonModule, typeof i6.MatFormFieldModule, typeof i7.MatAutocompleteModule, typeof i8.MatInputModule, typeof i9.FormsModule, typeof i10.TagComponentModule, typeof i11.MatChipsModule, typeof i12.IconComponentModule, typeof i13.UiTranslatePipe, typeof i14.ValidationErrorModule], [typeof i1.AutocompleteComponent]>;
18
19
  static ɵinj: i0.ɵɵInjectorDeclaration<AutocompleteComponentModule>;
19
20
  }
@@ -1,11 +1,12 @@
1
- import { EventEmitter, OnInit, ChangeDetectorRef } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
1
+ import { ChangeDetectorRef, DoCheck, EventEmitter, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import { MatCheckboxChange } from '@angular/material/checkbox';
4
- import { ApplicationTheme } from "../../models/application-theme.model";
4
+ import { ApplicationTheme } from '../../models/application-theme.model';
5
5
  import * as i0 from "@angular/core";
6
- export declare class CheckboxComponent implements OnInit, ControlValueAccessor {
6
+ export declare class CheckboxComponent implements OnInit, ControlValueAccessor, DoCheck {
7
7
  private readonly defaultAppTheme;
8
8
  private cdr;
9
+ ngControl: NgControl;
9
10
  /**
10
11
  * Determines whether the checkbox is disabled.
11
12
  * Default: false.
@@ -83,6 +84,20 @@ export declare class CheckboxComponent implements OnInit, ControlValueAccessor {
83
84
  * @memberof CheckboxComponent
84
85
  */
85
86
  ariaRequired: boolean;
87
+ /**
88
+ * Defines if checkbox has error
89
+ *
90
+ * @type {boolean}
91
+ * @memberof CheckboxComponent
92
+ */
93
+ hasError: boolean;
94
+ /**
95
+ * The language to be used
96
+ * @property language
97
+ * @type {Language}
98
+ * @memberof DropdownComponent
99
+ */
100
+ language: import("@testgorilla/tgo-ui").Language;
86
101
  /**
87
102
  * Event emitted when the checkbox's checked value changes.
88
103
  *
@@ -99,7 +114,12 @@ export declare class CheckboxComponent implements OnInit, ControlValueAccessor {
99
114
  */
100
115
  onTouch: () => void;
101
116
  classMultiple: string;
102
- constructor(defaultAppTheme: ApplicationTheme, cdr: ChangeDetectorRef);
117
+ constructor(defaultAppTheme: ApplicationTheme, cdr: ChangeDetectorRef, ngControl: NgControl);
118
+ /**
119
+ * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched
120
+ * to display validation errors that might happen (e.g. required)
121
+ */
122
+ ngDoCheck(): void;
103
123
  emitChange(event: MatCheckboxChange): void;
104
124
  ngOnInit(): void;
105
125
  toggleChecked(event: MatCheckboxChange): void;
@@ -108,6 +128,6 @@ export declare class CheckboxComponent implements OnInit, ControlValueAccessor {
108
128
  registerOnChange(fn: any): void;
109
129
  registerOnTouched(fn: any): void;
110
130
  setDisabledState(isDisabled: boolean): void;
111
- static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent, [{ optional: true; }, null]>;
112
- static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "ui-checkbox", never, { "disabled": { "alias": "disabled"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "companyColor": { "alias": "companyColor"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; }; }, { "changed": "changed"; }, never, ["[checkbox-label]"], false, never>;
131
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent, [{ optional: true; }, null, { optional: true; self: true; }]>;
132
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "ui-checkbox", never, { "disabled": { "alias": "disabled"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "companyColor": { "alias": "companyColor"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; }; "hasError": { "alias": "hasError"; "required": false; }; "language": { "alias": "language"; "required": false; }; }, { "changed": "changed"; }, never, ["[checkbox-label]"], false, never>;
113
133
  }
@@ -4,8 +4,11 @@ import * as i2 from "@angular/common";
4
4
  import * as i3 from "@angular/material/checkbox";
5
5
  import * as i4 from "@angular/forms";
6
6
  import * as i5 from "@angular/material/input";
7
+ import * as i6 from "../icon/icon.component.module";
8
+ import * as i7 from "../../pipes/ui-translate.pipe";
9
+ import * as i8 from "../validation-error/validation-error.module";
7
10
  export declare class CheckboxComponentModule {
8
11
  static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponentModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<CheckboxComponentModule, [typeof i1.CheckboxComponent], [typeof i2.CommonModule, typeof i3.MatCheckboxModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.MatInputModule], [typeof i1.CheckboxComponent]>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CheckboxComponentModule, [typeof i1.CheckboxComponent], [typeof i2.CommonModule, typeof i3.MatCheckboxModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.MatInputModule, typeof i6.IconComponentModule, typeof i7.UiTranslatePipe, typeof i8.ValidationErrorModule], [typeof i1.CheckboxComponent]>;
10
13
  static ɵinj: i0.ɵɵInjectorDeclaration<CheckboxComponentModule>;
11
14
  }
@@ -1,12 +1,13 @@
1
- import { ChangeDetectorRef, OnInit } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
1
+ import { ChangeDetectorRef, DoCheck, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import { FloatLabelType } from '@angular/material/form-field';
4
4
  import { OptionType } from './dropdown.model';
5
- import { ApplicationTheme } from "../../models/application-theme.model";
5
+ import { ApplicationTheme } from '../../models/application-theme.model';
6
6
  import * as i0 from "@angular/core";
7
- export declare class DropdownComponent implements OnInit, ControlValueAccessor {
7
+ export declare class DropdownComponent implements OnInit, ControlValueAccessor, DoCheck {
8
8
  private readonly defaultAppTheme;
9
9
  private cdr;
10
+ ngControl: NgControl;
10
11
  class: string;
11
12
  /**
12
13
  * Text content will be applied to the input element if present.
@@ -119,11 +120,16 @@ export declare class DropdownComponent implements OnInit, ControlValueAccessor {
119
120
  * @ignore
120
121
  */
121
122
  onTouch: () => void;
122
- constructor(defaultAppTheme: ApplicationTheme, cdr: ChangeDetectorRef);
123
+ constructor(defaultAppTheme: ApplicationTheme, cdr: ChangeDetectorRef, ngControl: NgControl);
123
124
  floatLabel: FloatLabelType;
124
125
  classError: string;
125
126
  errorsLength: boolean;
126
127
  showCheck: boolean;
128
+ /**
129
+ * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched
130
+ * to display validation errors that might happen (e.g. required)
131
+ */
132
+ ngDoCheck(): void;
127
133
  ngOnInit(): void;
128
134
  clearValue(event: Event): void;
129
135
  onChangeOption(event: any): void;
@@ -132,6 +138,6 @@ export declare class DropdownComponent implements OnInit, ControlValueAccessor {
132
138
  registerOnChange(fn: any): void;
133
139
  registerOnTouched(fn: any): void;
134
140
  setDisabledState(isDisabled: boolean): void;
135
- static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, [{ optional: true; }, null]>;
141
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, [{ optional: true; }, null, { optional: true; self: true; }]>;
136
142
  static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "ui-dropdown", never, { "label": { "alias": "label"; "required": false; }; "name": { "alias": "name"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "value": { "alias": "value"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "valueList": { "alias": "valueList"; "required": false; }; "allowClear": { "alias": "allowClear"; "required": false; }; "allowMultipleSelection": { "alias": "allowMultipleSelection"; "required": false; }; "required": { "alias": "required"; "required": false; }; "language": { "alias": "language"; "required": false; }; "showBottomContent": { "alias": "showBottomContent"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; }, {}, never, never, false, never>;
137
143
  }
@@ -8,8 +8,9 @@ import * as i6 from "@angular/forms";
8
8
  import * as i7 from "../button/button.component.module";
9
9
  import * as i8 from "@angular/material/select";
10
10
  import * as i9 from "../../pipes/ui-translate.pipe";
11
+ import * as i10 from "../validation-error/validation-error.module";
11
12
  export declare class DropdownComponentModule {
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponentModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<DropdownComponentModule, [typeof i1.DropdownComponent], [typeof i2.CommonModule, typeof i3.MatFormFieldModule, typeof i4.MatInputModule, typeof i5.IconComponentModule, typeof i6.FormsModule, typeof i6.ReactiveFormsModule, typeof i7.ButtonComponentModule, typeof i8.MatSelectModule, typeof i9.UiTranslatePipe], [typeof i1.DropdownComponent]>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DropdownComponentModule, [typeof i1.DropdownComponent], [typeof i2.CommonModule, typeof i3.MatFormFieldModule, typeof i4.MatInputModule, typeof i5.IconComponentModule, typeof i6.FormsModule, typeof i6.ReactiveFormsModule, typeof i7.ButtonComponentModule, typeof i8.MatSelectModule, typeof i9.UiTranslatePipe, typeof i10.ValidationErrorModule], [typeof i1.DropdownComponent]>;
14
15
  static ɵinj: i0.ɵɵInjectorDeclaration<DropdownComponentModule>;
15
16
  }
@@ -1,16 +1,17 @@
1
- import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
1
+ import { ChangeDetectorRef, DoCheck, EventEmitter, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import { FieldType } from '../../components/field/field.model';
4
4
  import { MatIconRegistry } from '@angular/material/icon';
5
5
  import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
6
6
  import { ApplicationTheme } from '../../models/application-theme.model';
7
7
  import { IconName } from '../icon/icon.model';
8
8
  import * as i0 from "@angular/core";
9
- export declare class FieldComponent implements OnInit, ControlValueAccessor {
9
+ export declare class FieldComponent implements OnInit, ControlValueAccessor, DoCheck {
10
10
  private readonly defaultAppTheme;
11
11
  private matIconRegistry;
12
12
  private domSanitizer;
13
13
  private cdr;
14
+ ngControl: NgControl;
14
15
  class: string;
15
16
  /**
16
17
  * Form field label
@@ -154,6 +155,20 @@ export declare class FieldComponent implements OnInit, ControlValueAccessor {
154
155
  * @memberof FieldComponent
155
156
  */
156
157
  maxCharacters: number;
158
+ /**
159
+ * Trim text on blur
160
+ *
161
+ * @type {boolean}
162
+ * @memberof FieldComponent
163
+ */
164
+ trimOnBlur: boolean;
165
+ /**
166
+ * Trim text on submit
167
+ *
168
+ * @type {boolean}
169
+ * @memberof FieldComponent
170
+ */
171
+ trimOnSubmit: boolean;
157
172
  validateEvent: EventEmitter<string>;
158
173
  get getPasswordIcon(): IconName;
159
174
  isActiveField: boolean;
@@ -167,7 +182,12 @@ export declare class FieldComponent implements OnInit, ControlValueAccessor {
167
182
  * @ignore
168
183
  */
169
184
  onTouch: () => void;
170
- constructor(defaultAppTheme: ApplicationTheme, matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer, cdr: ChangeDetectorRef);
185
+ constructor(defaultAppTheme: ApplicationTheme, matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer, cdr: ChangeDetectorRef, ngControl: NgControl);
186
+ /**
187
+ * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched
188
+ * to display validation errors that might happen (e.g. required)
189
+ */
190
+ ngDoCheck(): void;
171
191
  showClose: boolean;
172
192
  showPassword: boolean;
173
193
  currentType: string;
@@ -187,7 +207,9 @@ export declare class FieldComponent implements OnInit, ControlValueAccessor {
187
207
  setDisabledState(isDisabled: boolean): void;
188
208
  onFieldClick(event: MouseEvent): void;
189
209
  onActive(state: boolean, action: string): void;
210
+ onSubmit(): void;
211
+ private clearSpace;
190
212
  trackByFn: (index: number, value: any) => any;
191
- static ɵfac: i0.ɵɵFactoryDeclaration<FieldComponent, [{ optional: true; }, null, null, null]>;
192
- static ɵcmp: i0.ɵɵComponentDeclaration<FieldComponent, "ui-field", never, { "label": { "alias": "label"; "required": false; }; "fieldName": { "alias": "fieldName"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "value": { "alias": "value"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hintMessage": { "alias": "hintMessage"; "required": false; }; "type": { "alias": "type"; "required": false; }; "updateOnBlur": { "alias": "updateOnBlur"; "required": false; }; "allowOnlyDigits": { "alias": "allowOnlyDigits"; "required": false; }; "language": { "alias": "language"; "required": false; }; "showBottomContent": { "alias": "showBottomContent"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "isValid": { "alias": "isValid"; "required": false; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; }; }, { "validateEvent": "validateEvent"; }, never, never, false, never>;
213
+ static ɵfac: i0.ɵɵFactoryDeclaration<FieldComponent, [{ optional: true; }, null, null, null, { optional: true; self: true; }]>;
214
+ static ɵcmp: i0.ɵɵComponentDeclaration<FieldComponent, "ui-field", never, { "label": { "alias": "label"; "required": false; }; "fieldName": { "alias": "fieldName"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "value": { "alias": "value"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hintMessage": { "alias": "hintMessage"; "required": false; }; "type": { "alias": "type"; "required": false; }; "updateOnBlur": { "alias": "updateOnBlur"; "required": false; }; "allowOnlyDigits": { "alias": "allowOnlyDigits"; "required": false; }; "language": { "alias": "language"; "required": false; }; "showBottomContent": { "alias": "showBottomContent"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "isValid": { "alias": "isValid"; "required": false; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; }; "trimOnBlur": { "alias": "trimOnBlur"; "required": false; }; "trimOnSubmit": { "alias": "trimOnSubmit"; "required": false; }; }, { "validateEvent": "validateEvent"; }, never, never, false, never>;
193
215
  }
@@ -9,8 +9,9 @@ import * as i7 from "@angular/forms";
9
9
  import * as i8 from "../button/button.component.module";
10
10
  import * as i9 from "@angular/material/icon";
11
11
  import * as i10 from "../../pipes/ui-translate.pipe";
12
+ import * as i11 from "../validation-error/validation-error.module";
12
13
  export declare class FieldComponentModule {
13
14
  static ɵfac: i0.ɵɵFactoryDeclaration<FieldComponentModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<FieldComponentModule, [typeof i1.FieldComponent, typeof i2.DigitsOnlyDirective], [typeof i3.CommonModule, typeof i4.MatFormFieldModule, typeof i5.MatInputModule, typeof i6.IconComponentModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.ButtonComponentModule, typeof i9.MatIconModule, typeof i10.UiTranslatePipe], [typeof i1.FieldComponent]>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FieldComponentModule, [typeof i1.FieldComponent, typeof i2.DigitsOnlyDirective], [typeof i3.CommonModule, typeof i4.MatFormFieldModule, typeof i5.MatInputModule, typeof i6.IconComponentModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.ButtonComponentModule, typeof i9.MatIconModule, typeof i10.UiTranslatePipe, typeof i11.ValidationErrorModule], [typeof i1.FieldComponent]>;
15
16
  static ɵinj: i0.ɵɵInjectorDeclaration<FieldComponentModule>;
16
17
  }
@@ -1,5 +1,5 @@
1
- export declare const tgoIcons: readonly ["Add", "Archive", "Arrow_down", "Arrow_left", "Arrow_right", "Arrow_up", "Assessment", "Attempts", "Book", "Calendar", "Candidates", "Chat-notifications", "Chat", "Check", "Clone", "Close", "Code", "Company", "Copy", "Custom-questions", "Delete", "Devices", "Document", "Download", "Edit", "Email-message", "Empty-placeholder", "Error", "Essay", "Eye-hide", "Eye-view", "Feedback-1", "Feedback-2", "Feedback-3", "Feedback-4", "Feedback-5", "File-attach", "File-upload", "Filter", "Folder", "Format-add-file", "Format-add-table", "Format-align-L", "Format-align-R", "Format-align-center", "Format-align-justify", "Format-bold", "Format-code-active", "Format-code-block", "Format-edit-table", "Format-format", "Format-function", "Format-italics", "Format-list-bulleted", "Format-list-numbered", "Format-picker", "Format-quote", "Format-subscript", "Format-superscript", "Format-text-direction-L", "Format-text-direction-R", "Format-text-size", "Format-underline", "Format-variable", "Full-screen", "Gender-female", "Gender-male", "Help-2", "Help", "Image", "Info", "Integration", "Language", "Layout", "Learn", "Level", "Light-bulb", "Link", "Loading-spinner", "Localisation", "Location", "Lock", "Log-out", "Menu-burger", "Menu-ellipsis", "Microphone", "Minus", "Mouse-cursor", "Mouse-grab-cursor", "Mouse", "Multi-choice", "Notifications", "Password", "Path", "Plan-billing", "Plus", "Premium", "Promotion", "Question-count", "Refer", "Reset", "Review", "Round-check-filled", "Round-check", "Search", "Secure-checkout", "Send", "Settings", "Social-facebook", "Social-instagram", "Social-linkedin", "Sorting-down-1", "Sorting-down", "Speedometer", "Star-filled", "Star-half", "Star-outline", "Support", "Sync", "Team", "Test", "Thunder", "Timer", "Type", "Unarchive", "Unlock", "Upgrade", "Upload", "User-access", "User-add", "User-invite", "User-profile", "User-reject", "User-switch", "Video-pause", "Video-play", "Video-record", "Video", "Volume", "Warning", "Zoom-in", "Zoom-out", "Fire", "Gift", "Grab", "Share", "Sparkles", "Video-stop", "Minimize", "Employee", "Money-bag", "Suitcase"];
2
- export declare const tgoRebrandIcons: readonly ["Archive-filled", "Archive-in-line", "Add-in-line", "Add-filled", "Arrow-chevron-down-filled", "Arrow-chevron-down-in-line", "Arrow-chevron-left-filled", "Arrow-chevron-left-in-line", "Arrow-chevron-right-filled", "Arrow-chevron-right-in-line", "Arrow-chevron-up-filled", "Arrow-chevron-up-in-line", "Arrow-down-filled", "Arrow-down-in-line", "Arrow-up-filled", "Arrow-up-in-line", "Assessment-filled", "Assessment-in-line", "Attach-filled", "Attach-in-line", "Attempts-filled", "Attempts-in-line", "Book-filled", "Book-in-line", "Calendar-filled", "Calendar-in-line", "Candidates-filled", "Candidates-in-line", "Chat-filled", "Chat-in-line", "Check-filled", "Check-in-line", "Check-round-filled", "Check-round-in-line", "Clone-filled", "Clone-in-line", "Close-filled", "Close-in-line", "Code-filled", "Code-in-line", "Company-filled", "Company-in-line", "Copy-filled", "Copy-in-line", "Delete-filled", "Delete-in-line", "Devices-filled", "Devices-in-line", "Document-filled", "Document-in-line", "Download-filled", "Download-in-line", "Edit-filled", "Edit-in-line", "Edit-text-filled", "Edit-text-in-line", "Employee-filled", "Employee-in-line", "Error-filled", "Error-in-line", "Essay-filled", "Essay-in-line", "Experience-filled", "Experience-in-line", "Facebook-filled", "Facebook-in-line", "Filter-filled", "Filter-in-line", "Fire-filled", "Fire-in-line", "Folder-filled", "Folder-in-line", "Full-screen-filled", "Full-screen-in-line", "Gender-male-filled", "Gender-male-in-line", "Gender-female-filled", "Gender-female-in-line", "Gift-filled", "Gift-in-line", "Grab-filled", "Grab-in-line", "Help-filled", "Help-in-line", "Hide-filled", "Hide-in-line", "Image-filled", "Image-in-line", "Info-filled", "Info-in-line", "Instagram-filled", "Instagram-in-line", "Integration-filled", "Integration-in-line", "Invite-filled", "Invite-in-line", "Language-filled", "Language-in-line", "Layout-filled", "Layout-in-line", "Learn-filled", "Learn-in-line", "Level-filled", "Level-in-line", "Light-bulb-filled", "Light-bulb-in-line", "Link-filled", "Link-in-line", "Linkedin-filled", "Linkedin-in-line", "Localization-filled", "Localization-in-line", "Location-filled", "Location-in-line", "Lock-filled", "Lock-in-line", "Logout-filled", "Logout-in-line", "Menu-burger-filled", "Menu-burger-in-line", "Menu-ellipsis-filled", "Menu-ellipsis-in-line", "Mic-filled", "Mic-in-line", "Minimize-filled", "Minimize-in-line", "Minus-filled", "Minus-in-line", "Mouse-filled", "Mouse-in-line", "Multi-choice-filled", "Multi-choice-in-line", "Notification-bell-filled", "Notification-bell-in-line", "Password-filled", "Password-in-line", "Path-filled", "Path-in-line", "Pause-filled", "Pause-in-line", "Plan-billing-filled", "Plan-billing-in-line", "Play-filled", "Play-in-line", "Plus-filled", "Plus-in-line", "Premium-filled", "Premium-in-line", "Premium-circle-in-line", "Question-count-filled", "Question-count-in-line", "Question-filled", "Question-in-line", "Record-filled", "Record-in-line", "Reject-filled", "Reject-in-line", "Reset-filled", "Reset-in-line", "Review-emoji-1-filled", "Review-emoji-1-in-line", "Review-emoji-2-filled", "Review-emoji-2-in-line", "Review-emoji-3-filled", "Review-emoji-3-in-line", "Review-emoji-4-filled", "Review-emoji-4-in-line", "Review-emoji-5-filled", "Review-emoji-5-in-line", "Review-filled", "Review-half-star-filled", "Review-half-star-in-line", "Review-in-line", "Review-star-filled", "Review-star-in-line", "Search-filled", "Search-in-line", "Secure-filled", "Secure-in-line", "Send-filled", "Send-in-line", "Settings-filled", "Settings-in-line", "Share-filled", "Share-in-line", "Sparkle-filled", "Sparkle-in-line", "Speedometer-filled", "Speedometer-in-line", "Stop-filled", "Stop-in-line", "Switch-filled", "Switch-in-line", "Sync-filled", "Sync-in-line", "Team-filled", "Team-in-line", "Test-filled", "Test-in-line", "Timer-filled", "Timer-in-line", "Type-filled", "Type-in-line", "Unarchive-filled", "Unarchive-in-line", "Unlock-filled", "Unlock-in-line", "Upgrade-filled", "Upgrade-in-line", "Upload-filled", "Upload-in-line", "User-access-filled", "User-access-in-line", "User-add-filled", "User-add-in-line", "User-profile-filled", "User-profile-in-line", "Video-filled", "Video-in-line", "View-filled", "View-in-line", "Volume-filled", "Volume-in-line", "Warning-filled", "Warning-in-line", "Zoom-in-filled", "Zoom-in-in-line", "Zoom-out-filled", "Zoom-out-in-line"];
1
+ export declare const tgoIcons: readonly ["Add", "Archive", "Arrow_down", "Arrow_left", "Arrow_right", "Arrow_up", "Assessment", "Attempts", "Book", "Calendar", "Candidates", "Chat-notifications", "Chat", "Check", "Clone", "Close", "Code", "Company", "Copy", "Custom-questions", "Delete", "Devices", "Document", "Download", "Edit", "Email-message", "Empty-placeholder", "Error", "Essay", "Eye-hide", "Eye-view", "Feedback-1", "Feedback-2", "Feedback-3", "Feedback-4", "Feedback-5", "File-attach", "File-upload", "Filter", "Folder", "Format-add-file", "Format-add-table", "Format-align-L", "Format-align-R", "Format-align-center", "Format-align-justify", "Format-bold", "Format-code-active", "Format-code-block", "Format-edit-table", "Format-format", "Format-function", "Format-italics", "Format-list-bulleted", "Format-list-numbered", "Format-picker", "Format-quote", "Format-subscript", "Format-superscript", "Format-text-direction-L", "Format-text-direction-R", "Format-text-size", "Format-underline", "Format-variable", "Full-screen", "Gender-female", "Gender-male", "Help-2", "Help", "Image", "Info", "Integration", "Language", "Layout", "Learn", "Level", "Light-bulb", "Link", "Loading-spinner", "Localisation", "Location", "Lock", "Log-out", "Menu-burger", "Menu-ellipsis", "Microphone", "Minus", "Mouse-cursor", "Mouse-grab-cursor", "Mouse", "Multi-choice", "Notifications", "Password", "Path", "Plan-billing", "Plus", "Premium", "Promotion", "Question-count", "Refer", "Reset", "Review", "Round-check-filled", "Round-check", "Search", "Secure-checkout", "Send", "Settings", "Social-facebook", "Social-instagram", "Social-linkedin", "Sorting-down-1", "Sorting-down", "Speedometer", "Star-filled", "Star-half", "Star-outline", "Support", "Sync", "Team", "Test", "Thunder", "Timer", "Type", "Unarchive", "Unlock", "Upgrade", "Upload", "User-access", "User-add", "User-invite", "User-profile", "User-reject", "User-switch", "Video-pause", "Video-play", "Video-record", "Video", "Volume", "Warning", "Zoom-in", "Zoom-out", "Fire", "Gift", "Grab", "Share", "Sparkles", "Video-stop", "Minimize", "Employee", "Money-bag", "Suitcase", "Google"];
2
+ export declare const tgoRebrandIcons: readonly ["Archive-filled", "Archive-in-line", "Add-in-line", "Add-filled", "Arrow-chevron-down-filled", "Arrow-chevron-down-in-line", "Arrow-chevron-left-filled", "Arrow-chevron-left-in-line", "Arrow-chevron-right-filled", "Arrow-chevron-right-in-line", "Arrow-chevron-up-filled", "Arrow-chevron-up-in-line", "Arrow-down-filled", "Arrow-down-in-line", "Arrow-up-filled", "Arrow-up-in-line", "Assessment-filled", "Assessment-in-line", "Attach-filled", "Attach-in-line", "Attempts-filled", "Attempts-in-line", "Book-filled", "Book-in-line", "Calendar-filled", "Calendar-in-line", "Candidates-filled", "Candidates-in-line", "Chat-filled", "Chat-in-line", "Check-filled", "Check-in-line", "Check-round-filled", "Check-round-in-line", "Clone-filled", "Clone-in-line", "Close-filled", "Close-in-line", "Code-filled", "Code-in-line", "Company-filled", "Company-in-line", "Copy-filled", "Copy-in-line", "Delete-filled", "Delete-in-line", "Devices-filled", "Devices-in-line", "Document-filled", "Document-in-line", "Download-filled", "Download-in-line", "Edit-filled", "Edit-in-line", "Edit-text-filled", "Edit-text-in-line", "Employee-filled", "Employee-in-line", "Error-filled", "Error-in-line", "Essay-filled", "Essay-in-line", "Experience-filled", "Experience-in-line", "Facebook-filled", "Facebook-in-line", "Filter-filled", "Filter-in-line", "Fire-filled", "Fire-in-line", "Folder-filled", "Folder-in-line", "Full-screen-filled", "Full-screen-in-line", "Gender-male-filled", "Gender-male-in-line", "Gender-female-filled", "Gender-female-in-line", "Gift-filled", "Gift-in-line", "Grab-filled", "Grab-in-line", "Help-filled", "Help-in-line", "Hide-filled", "Hide-in-line", "Image-filled", "Image-in-line", "Info-filled", "Info-in-line", "Instagram-filled", "Instagram-in-line", "Integration-filled", "Integration-in-line", "Invite-filled", "Invite-in-line", "Language-filled", "Language-in-line", "Layout-filled", "Layout-in-line", "Learn-filled", "Learn-in-line", "Level-filled", "Level-in-line", "Light-bulb-filled", "Light-bulb-in-line", "Link-filled", "Link-in-line", "Linkedin-filled", "Linkedin-in-line", "Localization-filled", "Localization-in-line", "Location-filled", "Location-in-line", "Lock-filled", "Lock-in-line", "Logout-filled", "Logout-in-line", "Menu-burger-filled", "Menu-burger-in-line", "Menu-ellipsis-filled", "Menu-ellipsis-in-line", "Mic-filled", "Mic-in-line", "Minimize-filled", "Minimize-in-line", "Minus-filled", "Minus-in-line", "Mouse-filled", "Mouse-in-line", "Multi-choice-filled", "Multi-choice-in-line", "Notification-bell-filled", "Notification-bell-in-line", "Password-filled", "Password-in-line", "Path-filled", "Path-in-line", "Pause-filled", "Pause-in-line", "Plan-billing-filled", "Plan-billing-in-line", "Play-filled", "Play-in-line", "Plus-filled", "Plus-in-line", "Premium-filled", "Premium-in-line", "Premium-circle-in-line", "Question-count-filled", "Question-count-in-line", "Question-filled", "Question-in-line", "Record-filled", "Record-in-line", "Reject-filled", "Reject-in-line", "Reset-filled", "Reset-in-line", "Review-emoji-1-filled", "Review-emoji-1-in-line", "Review-emoji-2-filled", "Review-emoji-2-in-line", "Review-emoji-3-filled", "Review-emoji-3-in-line", "Review-emoji-4-filled", "Review-emoji-4-in-line", "Review-emoji-5-filled", "Review-emoji-5-in-line", "Review-filled", "Review-half-star-filled", "Review-half-star-in-line", "Review-in-line", "Review-star-filled", "Review-star-in-line", "Search-filled", "Search-in-line", "Secure-filled", "Secure-in-line", "Send-filled", "Send-in-line", "Settings-filled", "Settings-in-line", "Share-filled", "Share-in-line", "Sparkle-filled", "Sparkle-in-line", "Speedometer-filled", "Speedometer-in-line", "Stop-filled", "Stop-in-line", "Switch-filled", "Switch-in-line", "Sync-filled", "Sync-in-line", "Team-filled", "Team-in-line", "Test-filled", "Test-in-line", "Timer-filled", "Timer-in-line", "Type-filled", "Type-in-line", "Unarchive-filled", "Unarchive-in-line", "Unlock-filled", "Unlock-in-line", "Upgrade-filled", "Upgrade-in-line", "Upload-filled", "Upload-in-line", "User-access-filled", "User-access-in-line", "User-add-filled", "User-add-in-line", "User-profile-filled", "User-profile-in-line", "Video-filled", "Video-in-line", "View-filled", "View-in-line", "Volume-filled", "Volume-in-line", "Warning-filled", "Warning-in-line", "Zoom-in-filled", "Zoom-in-in-line", "Zoom-out-filled", "Zoom-out-in-line", "Google-filled", "Google-in-line"];
3
3
  export declare const groupedIcons: {
4
4
  directional: string[];
5
5
  assessment: string[];
@@ -18,6 +18,7 @@ export declare class PasswordComponent implements ControlValueAccessor {
18
18
  */
19
19
  showCriteria: boolean;
20
20
  passwordChange: EventEmitter<string>;
21
+ allCriteriaPassed: EventEmitter<boolean>;
21
22
  protected formControl: FormControl<string | null>;
22
23
  protected criteriaPassed: {
23
24
  [key: string]: boolean;
@@ -37,5 +38,5 @@ export declare class PasswordComponent implements ControlValueAccessor {
37
38
  registerOnChange(fn: any): void;
38
39
  registerOnTouched(fn: any): void;
39
40
  static ɵfac: i0.ɵɵFactoryDeclaration<PasswordComponent, never>;
40
- static ɵcmp: i0.ɵɵComponentDeclaration<PasswordComponent, "ui-password-criteria", never, { "language": { "alias": "language"; "required": false; }; "showCriteria": { "alias": "showCriteria"; "required": false; }; }, { "passwordChange": "passwordChange"; }, never, never, false, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<PasswordComponent, "ui-password-criteria", never, { "language": { "alias": "language"; "required": false; }; "showCriteria": { "alias": "showCriteria"; "required": false; }; }, { "passwordChange": "passwordChange"; "allCriteriaPassed": "allCriteriaPassed"; }, never, never, false, never>;
41
42
  }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class JoinStringsPipe implements PipeTransform {
4
+ transform(value: string[], separator?: string): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<JoinStringsPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<JoinStringsPipe, "joinStrings", false>;
7
+ }
@@ -0,0 +1,135 @@
1
+ import { FocusMonitor } from '@angular/cdk/a11y';
2
+ import { ChangeDetectorRef, DoCheck, ElementRef, OnDestroy, OnInit } from '@angular/core';
3
+ import { ControlValueAccessor, NgControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
4
+ import { ErrorStateMatcher } from '@angular/material/core';
5
+ import { BehaviorSubject, Observable, Subject } from 'rxjs';
6
+ import { MatIconRegistry } from '@angular/material/icon';
7
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
8
+ import { ApplicationTheme } from '../../models/application-theme.model';
9
+ import { UICountry } from './phone-input.model';
10
+ import * as i0 from "@angular/core";
11
+ export declare class PhoneInputComponent implements OnInit, OnDestroy, ControlValueAccessor, DoCheck {
12
+ ngControl: NgControl;
13
+ private errorMatcher;
14
+ private fb;
15
+ private focusMonitor;
16
+ private ref;
17
+ private iconRegistry;
18
+ private sanitizer;
19
+ private readonly defaultAppTheme;
20
+ /**
21
+ * Phone number
22
+ *
23
+ * @type {string}
24
+ * @memberof PhoneInputComponent
25
+ */
26
+ set value(value: string);
27
+ /**
28
+ * Country list for select
29
+ *
30
+ * @type {UICountry[]}
31
+ * @memberof PhoneInputComponent
32
+ */
33
+ set countryList(countryList: UICountry[]);
34
+ /**
35
+ * Placeholder input
36
+ *
37
+ * @type {text}
38
+ * @memberof PhoneInputComponent
39
+ */
40
+ set placeholder(value: string);
41
+ /**
42
+ * Determines if input is disabled
43
+ *
44
+ * @type {boolean}
45
+ * @memberof PhoneInputComponent
46
+ */
47
+ disabled: boolean;
48
+ /**
49
+ * Input is required or not
50
+ *
51
+ * @type {boolean}
52
+ * @memberof PhoneInputComponent
53
+ */
54
+ required: boolean;
55
+ /**
56
+ *
57
+ * Defines the application theme
58
+ *
59
+ * @type {ApplicationTheme}
60
+ * @memberof PhoneInputComponent
61
+ */
62
+ applicationTheme: ApplicationTheme;
63
+ _errors: SafeHtml[];
64
+ /**
65
+ * Input field errors
66
+ *
67
+ * @type {string}
68
+ * @memberof PhoneInputComponent
69
+ */
70
+ set errors(errors: string[]);
71
+ /**
72
+ * The language to be used
73
+ * @property language
74
+ * @type {Language}
75
+ * @memberof PhoneInputComponent
76
+ */
77
+ language: import("@testgorilla/tgo-ui").Language;
78
+ static nextId: number;
79
+ private countries;
80
+ protected countries$: Observable<UICountry[]>;
81
+ form: UntypedFormGroup;
82
+ protected controlType: string;
83
+ protected userAriaDescribedBy?: string;
84
+ protected loadCountries$: BehaviorSubject<UICountry[]>;
85
+ protected countryCode: BehaviorSubject<string>;
86
+ protected stateChanges: Subject<void>;
87
+ protected focused: boolean;
88
+ protected selectFilterCtrl: UntypedFormControl;
89
+ protected errorsLength: boolean;
90
+ input: ElementRef<HTMLElement>;
91
+ select: ElementRef<HTMLElement>;
92
+ id: string;
93
+ get shouldLabelFloat(): boolean;
94
+ describedBy: string;
95
+ get empty(): boolean;
96
+ get errorState(): boolean;
97
+ get value(): string;
98
+ get placeholder(): string;
99
+ private initialValue;
100
+ private readonly DEFAULT_COUNTRY_CODE;
101
+ private internalPlaceholder;
102
+ protected selectedCountry: UICountry;
103
+ private unsubscribeAll$;
104
+ constructor(ngControl: NgControl, errorMatcher: ErrorStateMatcher, fb: UntypedFormBuilder, focusMonitor: FocusMonitor, ref: ChangeDetectorRef, iconRegistry: MatIconRegistry, sanitizer: DomSanitizer, defaultAppTheme: ApplicationTheme);
105
+ /**
106
+ * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched
107
+ * to display validation errors that might happen (e.g. required)
108
+ */
109
+ ngDoCheck(): void;
110
+ ngOnInit(): void;
111
+ registerCountryFlag(countryIso: string): void;
112
+ setErrorsLength(): boolean;
113
+ setDescribedByIds(ids: string[]): void;
114
+ onChange: (value: string) => void;
115
+ onTouch: () => void;
116
+ writeValue(phoneNumber: string): void;
117
+ registerOnChange(fn: (value: string) => void): void;
118
+ registerOnTouched(fn: () => void): void;
119
+ setDisabledState(isDisabled: boolean): void;
120
+ ngOnDestroy(): void;
121
+ onOptionsSelected(value: UICountry): void;
122
+ onInput(value: string): void;
123
+ filteredCountryTrackByMethod(index: number, el: UICountry): string;
124
+ private getNumberWithCountryCode;
125
+ private subscribeToFocusEvents;
126
+ private preSelectCountry;
127
+ private setCountry;
128
+ private getCountryByAlpha2Code;
129
+ private getCountryByCallingCode;
130
+ private loadCountries;
131
+ disableClick(ev: Event): void;
132
+ trackByFn: (index: number, value: any) => any;
133
+ static ɵfac: i0.ɵɵFactoryDeclaration<PhoneInputComponent, [{ optional: true; self: true; }, null, null, null, null, null, null, { optional: true; }]>;
134
+ static ɵcmp: i0.ɵɵComponentDeclaration<PhoneInputComponent, "ui-phone-input", never, { "value": { "alias": "value"; "required": false; }; "countryList": { "alias": "countryList"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "language": { "alias": "language"; "required": false; }; }, {}, never, never, false, never>;
135
+ }
@@ -0,0 +1,19 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./phone-input.component";
3
+ import * as i2 from "./join-strings.pipe";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@angular/material/progress-spinner";
6
+ import * as i5 from "@angular/forms";
7
+ import * as i6 from "@angular/material/select";
8
+ import * as i7 from "@angular/material/icon";
9
+ import * as i8 from "@angular/material/input";
10
+ import * as i9 from "ngx-mat-select-search";
11
+ import * as i10 from "../icon/icon.component.module";
12
+ import * as i11 from "../spinner/spinner.module";
13
+ import * as i12 from "../../pipes/ui-translate.pipe";
14
+ import * as i13 from "../validation-error/validation-error.module";
15
+ export declare class PhoneInputComponentModule {
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<PhoneInputComponentModule, never>;
17
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PhoneInputComponentModule, [typeof i1.PhoneInputComponent, typeof i2.JoinStringsPipe], [typeof i3.CommonModule, typeof i4.MatProgressSpinnerModule, typeof i5.ReactiveFormsModule, typeof i6.MatSelectModule, typeof i7.MatIconModule, typeof i8.MatInputModule, typeof i9.NgxMatSelectSearchModule, typeof i10.IconComponentModule, typeof i11.SpinnerComponentModule, typeof i12.UiTranslatePipe, typeof i13.ValidationErrorModule], [typeof i1.PhoneInputComponent]>;
18
+ static ɵinj: i0.ɵɵInjectorDeclaration<PhoneInputComponentModule>;
19
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Country interface ISO 3166 (minus numeric code and alpha3Code)
3
+ */
4
+ export interface UICountry {
5
+ name: string;
6
+ alpha2Code: string;
7
+ callingCode: string;
8
+ }
@@ -91,6 +91,13 @@ export declare class RadioButtonComponent implements OnInit, OnChanges {
91
91
  * @memberof RadioButtonComponent
92
92
  */
93
93
  ariaRequired: boolean;
94
+ /**
95
+ * Defines if checkbox has error
96
+ *
97
+ * @type {boolean}
98
+ * @memberof RadioButtonComponent
99
+ */
100
+ hasError: boolean;
94
101
  /**
95
102
  * Event emitted when the checked state of the radio button changes.
96
103
  *
@@ -105,5 +112,5 @@ export declare class RadioButtonComponent implements OnInit, OnChanges {
105
112
  clickRadio(element: MatRadioButton, event: MouseEvent): void;
106
113
  setClass(): string;
107
114
  static ɵfac: i0.ɵɵFactoryDeclaration<RadioButtonComponent, [{ optional: true; }]>;
108
- static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonComponent, "ui-radio-button", never, { "disabled": { "alias": "disabled"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "allowUnselect": { "alias": "allowUnselect"; "required": false; }; "companyColor": { "alias": "companyColor"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "value": { "alias": "value"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; }; }, { "changeRadio": "changeRadio"; }, never, ["[radio-label]"], false, never>;
115
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonComponent, "ui-radio-button", never, { "disabled": { "alias": "disabled"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "allowUnselect": { "alias": "allowUnselect"; "required": false; }; "companyColor": { "alias": "companyColor"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "value": { "alias": "value"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; }; "hasError": { "alias": "hasError"; "required": false; }; }, { "changeRadio": "changeRadio"; }, never, ["[radio-label]"], false, never>;
109
116
  }
@@ -0,0 +1,27 @@
1
+ import { errorType } from './validation-error.model';
2
+ import { NgControl } from '@angular/forms';
3
+ import { ApplicationTheme } from '../../models/application-theme.model';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ValidationErrorComponent {
6
+ ngControl: NgControl;
7
+ label: string | undefined;
8
+ /**
9
+ *
10
+ * Defines the application theme
11
+ *
12
+ * @type {ApplicationTheme}
13
+ * @memberof ValidationErrorComponent
14
+ */
15
+ applicationTheme: ApplicationTheme;
16
+ /**
17
+ * The language to be used
18
+ * @property language
19
+ * @type {Language}
20
+ * @memberof ValidationErrorComponent
21
+ */
22
+ language: import("@testgorilla/tgo-ui").Language;
23
+ getErrorValue(type: errorType): number;
24
+ translationContextErrors: string;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<ValidationErrorComponent, "ui-validation-error", never, { "ngControl": { "alias": "ngControl"; "required": false; }; "label": { "alias": "label"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "language": { "alias": "language"; "required": false; }; }, {}, never, never, false, never>;
27
+ }
@@ -0,0 +1 @@
1
+ export type errorType = 'maxlength' | 'minlength' | 'min' | 'max';
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./validation-error.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "../icon/icon.component.module";
5
+ import * as i4 from "../../pipes/ui-translate.pipe";
6
+ export declare class ValidationErrorModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ValidationErrorModule, [typeof i1.ValidationErrorComponent], [typeof i2.CommonModule, typeof i3.IconComponentModule, typeof i4.UiTranslatePipe], [typeof i1.ValidationErrorComponent]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<ValidationErrorModule>;
10
+ }