myrta-ui 14.0.0-beta.1 → 14.0.0-beta.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 (167) hide show
  1. package/README.md +1 -0
  2. package/esm2020/lib/components/badges/components/badge/badge.component.mjs +2 -2
  3. package/esm2020/lib/components/button/button.component.mjs +3 -3
  4. package/esm2020/lib/components/cdk-tooltip/cdk-tooltip.directive.mjs +1 -1
  5. package/esm2020/lib/components/chars-left/chars-left.component.mjs +6 -3
  6. package/esm2020/lib/components/dropdown/dropdown.component.mjs +2 -2
  7. package/esm2020/lib/components/error-message/error-message.component.mjs +7 -4
  8. package/esm2020/lib/components/form/checkbox/checkbox.component.mjs +5 -12
  9. package/esm2020/lib/components/form/checkbox/checkbox.enum.mjs +2 -5
  10. package/esm2020/lib/components/form/checkbox-group/checkbox-group.component.mjs +10 -4
  11. package/esm2020/lib/components/form/checkbox-group/components/checkbox-group-header/checkbox-group-header.component.mjs +1 -1
  12. package/esm2020/lib/components/form/checkbox-group/components/checkbox-group-item/checkbox-group-item.component.mjs +24 -15
  13. package/esm2020/lib/components/form/document-editor/document-editor.component.mjs +1 -1
  14. package/esm2020/lib/components/form/editor/config/default-inline-style.mjs +6 -0
  15. package/esm2020/lib/components/form/editor/editor.component.mjs +45 -13
  16. package/esm2020/lib/components/form/editor/editor.enum.mjs +2 -0
  17. package/esm2020/lib/components/form/input-date-time/input-date-time.component.mjs +50 -18
  18. package/esm2020/lib/components/form/input-date-time/input-date-time.enum.mjs +1 -1
  19. package/esm2020/lib/components/form/input-datepicker/input-datepicker.component.mjs +13 -8
  20. package/esm2020/lib/components/form/input-file/input-file.component.mjs +4 -3
  21. package/esm2020/lib/components/form/input-file-image/components/file-image-edit-modal/file-image-edit-modal.component.mjs +3 -3
  22. package/esm2020/lib/components/form/input-file-image/input-file-image.component.mjs +23 -12
  23. package/esm2020/lib/components/form/input-file-image/input-file-image.enum.mjs +3 -3
  24. package/esm2020/lib/components/form/input-number/input-number.component.mjs +54 -27
  25. package/esm2020/lib/components/form/input-number/input-number.enum.mjs +1 -1
  26. package/esm2020/lib/components/form/input-opt/components/input-opt/input-opt.component.mjs +2 -4
  27. package/esm2020/lib/components/form/input-password/input-password.component.mjs +37 -23
  28. package/esm2020/lib/components/form/input-password/input-password.enum.mjs +1 -1
  29. package/esm2020/lib/components/form/input-password/input-password.module.mjs +12 -4
  30. package/esm2020/lib/components/form/input-phone/input-phone.component.mjs +2 -2
  31. package/esm2020/lib/components/form/input-search/input-search.component.mjs +44 -36
  32. package/esm2020/lib/components/form/input-search/input-search.enum.mjs +1 -1
  33. package/esm2020/lib/components/form/input-search/input-search.module.mjs +7 -4
  34. package/esm2020/lib/components/form/input-select/input-select.component.mjs +10 -4
  35. package/esm2020/lib/components/form/input-tel/assets/base64.mjs +4 -0
  36. package/esm2020/lib/components/form/input-tel/data/all-countries.mjs +1323 -0
  37. package/esm2020/lib/components/form/input-tel/data/country-iso.enum.mjs +247 -0
  38. package/esm2020/lib/components/form/input-tel/data/phone-number-format.enum.mjs +6 -0
  39. package/esm2020/lib/components/form/input-tel/data/search-country-field.enum.mjs +8 -0
  40. package/esm2020/lib/components/form/input-tel/directives/input-tel.directive.mjs +62 -0
  41. package/esm2020/lib/components/form/input-tel/enums/input-phone.enum.mjs +7 -0
  42. package/esm2020/lib/components/form/input-tel/input-tel.component.mjs +389 -0
  43. package/esm2020/lib/components/form/input-tel/input-tel.module.mjs +47 -0
  44. package/esm2020/lib/components/form/input-tel/models/country.model.mjs +2 -0
  45. package/esm2020/lib/components/form/input-text/input-text.component.mjs +35 -29
  46. package/esm2020/lib/components/form/input-textarea/input-textarea.component.mjs +47 -42
  47. package/esm2020/lib/components/form/input-timepicker/input-timepicker.component.mjs +3 -3
  48. package/esm2020/lib/components/form/radio/radio.component.mjs +3 -3
  49. package/esm2020/lib/components/form/radio-group/components/radio-group-header/radio-group-header.component.mjs +49 -0
  50. package/esm2020/lib/components/form/radio-group/components/radio-group-item/radio-group-item.component.mjs +69 -0
  51. package/esm2020/lib/components/form/radio-group/helpers/filter-search-group.mjs +27 -0
  52. package/esm2020/lib/components/form/radio-group/helpers/get-item-by-id.mjs +11 -0
  53. package/esm2020/lib/components/form/radio-group/helpers/move-selected-to-first.mjs +27 -0
  54. package/esm2020/lib/components/form/radio-group/models/radio-group.model.mjs +2 -0
  55. package/esm2020/lib/components/form/radio-group/radio-group.component.mjs +185 -0
  56. package/esm2020/lib/components/form/radio-group/radio-group.module.mjs +47 -0
  57. package/esm2020/lib/components/form/rating/rating.component.mjs +4 -4
  58. package/esm2020/lib/components/form/switch/switch.component.mjs +2 -2
  59. package/esm2020/lib/components/gallery/components/gallery-confirm-modal/gallery-confirm-modal.component.mjs +3 -3
  60. package/esm2020/lib/components/gallery/components/gallery-item/gallery-item.component.mjs +4 -4
  61. package/esm2020/lib/components/hint-error-message/hint-error-message.component.mjs +6 -6
  62. package/esm2020/lib/components/label/label.component.mjs +3 -3
  63. package/esm2020/lib/components/modal/modal.component.mjs +13 -3
  64. package/esm2020/lib/components/paginator/paginator.component.mjs +16 -6
  65. package/esm2020/lib/components/paginator/paginator.module.mjs +8 -8
  66. package/esm2020/lib/components/progress/progress.component.mjs +2 -2
  67. package/esm2020/lib/components/save-state/components/save-state-editor/save-state-editor.component.mjs +2 -2
  68. package/esm2020/lib/components/save-state/save-state.component.mjs +3 -3
  69. package/esm2020/lib/components/save-state/save-state.enum.mjs +1 -1
  70. package/esm2020/lib/components/table/table.component.mjs +3 -3
  71. package/esm2020/lib/components/tabs/tabs-group/tabs-group.component.mjs +2 -2
  72. package/esm2020/lib/components/tooltip/tooltip-trigger/tooltip-trigger.component.mjs +4 -14
  73. package/esm2020/lib/components/wrappers/content-wrapper/content-wrapper.component.mjs +2 -2
  74. package/esm2020/lib/enums/typed.input.state.mjs +1 -1
  75. package/esm2020/lib/services/index.mjs +2 -1
  76. package/esm2020/lib/services/mrx-autosave/mrx-autosave.service.mjs +1 -1
  77. package/esm2020/lib/services/mrx-form-validator/constants/invalid-messages.mjs +10 -0
  78. package/esm2020/lib/services/mrx-form-validator/helpers/get-error-message.helper.mjs +10 -0
  79. package/esm2020/lib/services/mrx-form-validator/helpers/get-sorting-validations.helper.mjs +28 -0
  80. package/esm2020/lib/services/mrx-form-validator/models/index.mjs +4 -0
  81. package/esm2020/lib/services/mrx-form-validator/models/validations-options.model.mjs +2 -0
  82. package/esm2020/lib/services/mrx-form-validator/models/validations-settings.model.mjs +2 -0
  83. package/esm2020/lib/services/mrx-form-validator/models/validations-types.model.mjs +22 -0
  84. package/esm2020/lib/services/mrx-form-validator/mrx-form-validator.mjs +84 -183
  85. package/esm2020/lib/services/mrx-form-validator/validations/callback.validation.mjs +15 -0
  86. package/esm2020/lib/services/mrx-form-validator/validations/email.validation.mjs +11 -0
  87. package/esm2020/lib/services/mrx-form-validator/validations/max-length.validation.mjs +10 -0
  88. package/esm2020/lib/services/mrx-form-validator/validations/max-value.validation.mjs +10 -0
  89. package/esm2020/lib/services/mrx-form-validator/validations/min-length.validation.mjs +11 -0
  90. package/esm2020/lib/services/mrx-form-validator/validations/min-value.validation.mjs +10 -0
  91. package/esm2020/lib/services/mrx-form-validator/validations/pattern.validation.mjs +11 -0
  92. package/esm2020/lib/services/mrx-form-validator/validations/required.validation.mjs +22 -0
  93. package/esm2020/public-api.mjs +7 -1
  94. package/fesm2015/myrta-ui.mjs +4004 -1339
  95. package/fesm2015/myrta-ui.mjs.map +1 -1
  96. package/fesm2020/myrta-ui.mjs +3999 -1341
  97. package/fesm2020/myrta-ui.mjs.map +1 -1
  98. package/lib/components/chars-left/chars-left.component.d.ts +1 -0
  99. package/lib/components/error-message/error-message.component.d.ts +2 -1
  100. package/lib/components/form/checkbox/checkbox.component.d.ts +2 -4
  101. package/lib/components/form/checkbox/checkbox.enum.d.ts +0 -4
  102. package/lib/components/form/checkbox-group/checkbox-group.component.d.ts +3 -1
  103. package/lib/components/form/checkbox-group/components/checkbox-group-item/checkbox-group-item.component.d.ts +4 -1
  104. package/lib/components/form/editor/config/default-inline-style.d.ts +11 -0
  105. package/lib/components/form/editor/editor.component.d.ts +13 -4
  106. package/lib/components/form/editor/editor.enum.d.ts +5 -0
  107. package/lib/components/form/input-date-time/input-date-time.component.d.ts +6 -2
  108. package/lib/components/form/input-date-time/input-date-time.enum.d.ts +1 -1
  109. package/lib/components/form/input-datepicker/input-datepicker.component.d.ts +2 -1
  110. package/lib/components/form/input-file-image/components/file-image-edit-modal/file-image-edit-modal.component.d.ts +6 -0
  111. package/lib/components/form/input-file-image/input-file-image.component.d.ts +4 -2
  112. package/lib/components/form/input-file-image/input-file-image.enum.d.ts +2 -2
  113. package/lib/components/form/input-number/input-number.component.d.ts +11 -3
  114. package/lib/components/form/input-number/input-number.enum.d.ts +2 -2
  115. package/lib/components/form/input-opt/components/input-opt/input-opt.component.d.ts +2 -2
  116. package/lib/components/form/input-password/input-password.component.d.ts +14 -9
  117. package/lib/components/form/input-password/input-password.enum.d.ts +4 -0
  118. package/lib/components/form/input-password/input-password.module.d.ts +3 -1
  119. package/lib/components/form/input-search/input-search.component.d.ts +15 -11
  120. package/lib/components/form/input-search/input-search.enum.d.ts +5 -0
  121. package/lib/components/form/input-search/input-search.module.d.ts +2 -1
  122. package/lib/components/form/input-select/input-select.component.d.ts +3 -1
  123. package/lib/components/form/input-tel/assets/base64.d.ts +3 -0
  124. package/lib/components/form/input-tel/data/all-countries.d.ts +1 -0
  125. package/lib/components/form/input-tel/data/country-iso.enum.d.ts +245 -0
  126. package/lib/components/form/input-tel/data/phone-number-format.enum.d.ts +5 -0
  127. package/lib/components/form/input-tel/data/search-country-field.enum.d.ts +6 -0
  128. package/lib/components/form/input-tel/directives/input-tel.directive.d.ts +21 -0
  129. package/lib/components/form/input-tel/enums/input-phone.enum.d.ts +11 -0
  130. package/lib/components/form/input-tel/input-tel.component.d.ts +89 -0
  131. package/lib/components/form/input-tel/input-tel.module.d.ts +14 -0
  132. package/lib/components/form/input-tel/models/country.model.d.ts +18 -0
  133. package/lib/components/form/input-text/input-text.component.d.ts +12 -9
  134. package/lib/components/form/input-textarea/input-textarea.component.d.ts +12 -15
  135. package/lib/components/form/radio-group/components/radio-group-header/radio-group-header.component.d.ts +20 -0
  136. package/lib/components/form/radio-group/components/radio-group-item/radio-group-item.component.d.ts +28 -0
  137. package/lib/components/form/radio-group/helpers/filter-search-group.d.ts +2 -0
  138. package/lib/components/form/radio-group/helpers/get-item-by-id.d.ts +2 -0
  139. package/lib/components/form/radio-group/helpers/move-selected-to-first.d.ts +2 -0
  140. package/lib/components/form/radio-group/models/radio-group.model.d.ts +12 -0
  141. package/lib/components/form/radio-group/radio-group.component.d.ts +60 -0
  142. package/lib/components/form/radio-group/radio-group.module.d.ts +16 -0
  143. package/lib/components/modal/modal.component.d.ts +1 -0
  144. package/lib/components/paginator/paginator.component.d.ts +3 -1
  145. package/lib/components/paginator/paginator.module.d.ts +3 -3
  146. package/lib/components/save-state/save-state.enum.d.ts +1 -1
  147. package/lib/components/tooltip/tooltip-trigger/tooltip-trigger.component.d.ts +0 -1
  148. package/lib/services/index.d.ts +1 -0
  149. package/lib/services/mrx-autosave/mrx-autosave.service.d.ts +1 -1
  150. package/lib/services/mrx-form-validator/constants/invalid-messages.d.ts +9 -0
  151. package/lib/services/mrx-form-validator/helpers/get-error-message.helper.d.ts +3 -0
  152. package/lib/services/mrx-form-validator/helpers/get-sorting-validations.helper.d.ts +2 -0
  153. package/lib/services/mrx-form-validator/models/index.d.ts +3 -0
  154. package/lib/services/mrx-form-validator/models/validations-options.model.d.ts +28 -0
  155. package/lib/services/mrx-form-validator/models/validations-settings.model.d.ts +7 -0
  156. package/lib/services/mrx-form-validator/models/validations-types.model.d.ts +19 -0
  157. package/lib/services/mrx-form-validator/mrx-form-validator.d.ts +4 -32
  158. package/lib/services/mrx-form-validator/validations/callback.validation.d.ts +6 -0
  159. package/lib/services/mrx-form-validator/validations/email.validation.d.ts +6 -0
  160. package/lib/services/mrx-form-validator/validations/max-length.validation.d.ts +6 -0
  161. package/lib/services/mrx-form-validator/validations/max-value.validation.d.ts +6 -0
  162. package/lib/services/mrx-form-validator/validations/min-length.validation.d.ts +6 -0
  163. package/lib/services/mrx-form-validator/validations/min-value.validation.d.ts +6 -0
  164. package/lib/services/mrx-form-validator/validations/pattern.validation.d.ts +6 -0
  165. package/lib/services/mrx-form-validator/validations/required.validation.d.ts +6 -0
  166. package/package.json +3 -1
  167. package/public-api.d.ts +5 -0
@@ -0,0 +1,60 @@
1
+ import { InputSearchSizesTypes } from './../input-search/input-search.enum';
2
+ import { ElementRef, EventEmitter } from '@angular/core';
3
+ import { ControlValueAccessor } from '@angular/forms';
4
+ import { RadioGroupItem, RadioGroupValueWithId } from './models/radio-group.model';
5
+ import { Field } from '../../../services/mrx-autosave/mrx-autosave.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class RadioGroupComponent implements ControlValueAccessor {
8
+ private _isInit;
9
+ private _groupItemsWrapperHeight;
10
+ private _searchValue;
11
+ selectedValue: RadioGroupItem | null;
12
+ filteredList: RadioGroupItem[];
13
+ uuid: string;
14
+ fields: Field[];
15
+ searchSize: InputSearchSizesTypes;
16
+ name: string;
17
+ scrollMaxHeight: number;
18
+ searchable: boolean;
19
+ bold: boolean;
20
+ scrollable: boolean;
21
+ sortable: boolean;
22
+ disabled: boolean;
23
+ readonly: boolean;
24
+ enableMessage: string;
25
+ searchPlaceholder: string;
26
+ customClasses: string;
27
+ required: boolean;
28
+ invalid: boolean;
29
+ invalidMessage: string | string[];
30
+ checkInvalid: true | false | null;
31
+ tooltip: string;
32
+ labelText: string;
33
+ set items(value: RadioGroupItem[]);
34
+ get items(): RadioGroupItem[];
35
+ groupItemsWrapper: ElementRef;
36
+ changed: EventEmitter<RadioGroupItem | null>;
37
+ modelChange: EventEmitter<RadioGroupValueWithId>;
38
+ modelCheckedChange: EventEmitter<RadioGroupItem | null>;
39
+ modelItemChange: EventEmitter<RadioGroupItem | null>;
40
+ get isSearchValue(): string;
41
+ get displaced(): boolean;
42
+ get getClasses(): string;
43
+ get getShowScroll(): boolean;
44
+ trackByFn(index: number, item: RadioGroupItem): string | number;
45
+ private onChange;
46
+ private onTouched;
47
+ writeValue(selectedValue: RadioGroupItem): void;
48
+ registerOnChange(fn: any): void;
49
+ registerOnTouched(fn: any): void;
50
+ updateValue(list: RadioGroupItem[], targetItem: RadioGroupItem | null): void;
51
+ checkHeightGroupWrapper(): void;
52
+ updateRadioGroupSearchValue(searchValue: string): void;
53
+ radioChanged({ item }: {
54
+ item: RadioGroupItem;
55
+ }): void;
56
+ get isInvalidMessage(): boolean;
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioGroupComponent, never>;
58
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioGroupComponent, "mrx-radio-group", never, { "fields": "fields"; "searchSize": "searchSize"; "name": "name"; "scrollMaxHeight": "scrollMaxHeight"; "searchable": "searchable"; "bold": "bold"; "scrollable": "scrollable"; "sortable": "sortable"; "disabled": "disabled"; "readonly": "readonly"; "enableMessage": "enableMessage"; "searchPlaceholder": "searchPlaceholder"; "customClasses": "customClasses"; "required": "required"; "invalid": "invalid"; "invalidMessage": "invalidMessage"; "checkInvalid": "checkInvalid"; "tooltip": "tooltip"; "labelText": "labelText"; "items": "items"; }, { "changed": "changed"; "modelChange": "modelChange"; "modelCheckedChange": "modelCheckedChange"; "modelItemChange": "modelItemChange"; }, never, never, false>;
59
+ static ɵprov: i0.ɵɵInjectableDeclaration<RadioGroupComponent>;
60
+ }
@@ -0,0 +1,16 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./radio-group.component";
3
+ import * as i2 from "./components/radio-group-item/radio-group-item.component";
4
+ import * as i3 from "./components/radio-group-header/radio-group-header.component";
5
+ import * as i4 from "@angular/common";
6
+ import * as i5 from "@angular/forms";
7
+ import * as i6 from "../radio/radio.module";
8
+ import * as i7 from "../input-search/input-search.module";
9
+ import * as i8 from "../../label/label.module";
10
+ import * as i9 from "../../error-message/error-message.module";
11
+ import * as i10 from "../../save-state/save-state.module";
12
+ export declare class RadioGroupModule {
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioGroupModule, never>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RadioGroupModule, [typeof i1.RadioGroupComponent, typeof i2.RadioGroupItemComponent, typeof i3.RadioGroupHeaderComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.RadioModule, typeof i7.InputSearchModule, typeof i8.LabelModule, typeof i9.ErrorMessageModule, typeof i10.SaveStateModule], [typeof i1.RadioGroupComponent]>;
15
+ static ɵinj: i0.ɵɵInjectorDeclaration<RadioGroupModule>;
16
+ }
@@ -23,6 +23,7 @@ export declare class ModalComponent {
23
23
  ok: EventEmitter<null>;
24
24
  close: EventEmitter<null>;
25
25
  back: EventEmitter<null>;
26
+ get getTitleClass(): string;
26
27
  get getColorClass(): "" | ModalColorEnum;
27
28
  get getClasses(): string;
28
29
  get getButtonColor(): ButtonColorsTypes;
@@ -13,6 +13,8 @@ export declare class PaginatorComponent {
13
13
  isPaginatorText: boolean;
14
14
  paginatorText: string;
15
15
  set setPosition(value: PaginatorPosition | undefined);
16
+ set internalPageSize(value: string);
17
+ get internalPageSize(): string;
16
18
  set setWithPageSize(value: boolean | undefined);
17
19
  dataStateChanged: EventEmitter<PaginateOutputObject>;
18
20
  get getClasses(): string;
@@ -22,7 +24,7 @@ export declare class PaginatorComponent {
22
24
  get getFirstNumberCurrentPage(): number;
23
25
  get getLastNumberCurrentPage(): number;
24
26
  onChangeCurrentPage(value: number): void;
25
- onChangePageSize(value: number): void;
27
+ onChangePageSize(value: any): void;
26
28
  trackByFn(index: number, item: any): any;
27
29
  static ɵfac: i0.ɵɵFactoryDeclaration<PaginatorComponent, never>;
28
30
  static ɵcmp: i0.ɵɵComponentDeclaration<PaginatorComponent, "mrx-paginator", never, { "pageSizes": "pageSizes"; "currentPage": "currentPage"; "pageSize": "pageSize"; "total": "total"; "customClasses": "customClasses"; "isEmptyPaginator": "isEmptyPaginator"; "isPaginatorText": "isPaginatorText"; "paginatorText": "paginatorText"; "setPosition": "position"; "setWithPageSize": "withPageSize"; }, { "dataStateChanged": "dataStateChanged"; }, never, never, false>;
@@ -1,10 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./paginator.component";
3
3
  import * as i2 from "@angular/common";
4
- import * as i3 from "@ng-select/ng-select";
5
- import * as i4 from "@angular/forms";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "../form/input-select/input-select.module";
6
6
  export declare class PaginatorModule {
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<PaginatorModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<PaginatorModule, [typeof i1.PaginatorComponent], [typeof i2.CommonModule, typeof i3.NgSelectModule, typeof i4.FormsModule], [typeof i1.PaginatorComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PaginatorModule, [typeof i1.PaginatorComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.InputSelectModule], [typeof i1.PaginatorComponent]>;
9
9
  static ɵinj: i0.ɵɵInjectorDeclaration<PaginatorModule>;
10
10
  }
@@ -1 +1 @@
1
- export declare type SaveStateComponentType = 'input' | 'checkbox' | 'checkboxGroup' | 'switch' | 'editor';
1
+ export declare type SaveStateComponentType = 'input' | 'checkbox' | 'checkboxGroup' | 'radio' | 'radioGroup' | 'switch' | 'editor';
@@ -9,7 +9,6 @@ export declare class TooltipTriggerComponent {
9
9
  toggleTooltip: EventEmitter<void>;
10
10
  get getClasses(): string;
11
11
  get getIconClass(): string;
12
- get getTypeClass(): string;
13
12
  onToggle(): void;
14
13
  static ɵfac: i0.ɵɵFactoryDeclaration<TooltipTriggerComponent, never>;
15
14
  static ɵcmp: i0.ɵɵComponentDeclaration<TooltipTriggerComponent, "mrx-tooltip-trigger", never, { "triggerTextPosition": "triggerTextPosition"; "triggerType": "triggerType"; "customClasses": "customClasses"; "isVisibleTooltip": "isVisibleTooltip"; }, { "toggleTooltip": "toggleTooltip"; }, never, never, false>;
@@ -1,6 +1,7 @@
1
1
  export * from './mrx-autosave/mrx-autosave.service';
2
2
  export * from './file-upload/file-upload.service';
3
3
  export * from './mrx-form-validator/mrx-form-validator';
4
+ export * from './mrx-form-validator/models';
4
5
  export * from './save-store/save-store.module';
5
6
  export * from './save-store/store/selectors';
6
7
  export * from './save-store/store/actions';
@@ -7,7 +7,7 @@ export interface Field {
7
7
  }
8
8
  export declare class MrxAutosaveService {
9
9
  private _fields;
10
- stoppedTimer: any;
10
+ stoppedTimer: number;
11
11
  addId(id: string): void;
12
12
  start(): void;
13
13
  success(): void;
@@ -0,0 +1,9 @@
1
+ export declare const INVALID_MESSAGES: {
2
+ required: () => string;
3
+ maxLength: (length: number) => string;
4
+ minLength: (length: number) => string;
5
+ maxValue: (value: number) => string;
6
+ minValue: (value: number) => string;
7
+ email: () => string;
8
+ pattern: () => string;
9
+ };
@@ -0,0 +1,3 @@
1
+ import { ValidationTypesEnum } from '../models/validations-types.model';
2
+ import { IMessages } from '../models/validations-options.model';
3
+ export declare const getErrorMessageHelper: (key: ValidationTypesEnum, invalidMessages: IMessages, messages: IMessages | undefined, params?: any) => string;
@@ -0,0 +1,2 @@
1
+ import { ValidationsType } from '../models/validations-options.model';
2
+ export declare const getSortingValidationsHelper: (validation: ValidationsType) => ValidationsType;
@@ -0,0 +1,3 @@
1
+ export * from './validations-options.model';
2
+ export * from './validations-settings.model';
3
+ export * from './validations-types.model';
@@ -0,0 +1,28 @@
1
+ export interface IMessages {
2
+ [name: string]: string | ((param?: any) => string);
3
+ }
4
+ export interface IFields {
5
+ [name: string]: any;
6
+ }
7
+ export declare type ValidationsType = {
8
+ required?: boolean;
9
+ type?: 'multi' | 'single';
10
+ maxLength?: number;
11
+ minLength?: number;
12
+ maxValue?: number;
13
+ minValue?: number;
14
+ email?: boolean;
15
+ pattern?: RegExp;
16
+ messages?: IMessages;
17
+ /**
18
+ * @param value Any <br/>
19
+ * callback принимает value поля модели <br/>
20
+ * Вернув null | false - ошибка отсутствует <br/>
21
+ * Вернув true | string - ошибка появляется <br/>
22
+ * string при этом становится тектом ошибки
23
+ */
24
+ callback?: (value: any) => any;
25
+ };
26
+ export interface IValidations {
27
+ [name: string]: ValidationsType;
28
+ }
@@ -0,0 +1,7 @@
1
+ export declare type OptionMethodType = 'submit' | 'input';
2
+ export declare type OptionClearType = 'all' | 'selected';
3
+ export interface FormValidatorOptions {
4
+ method?: OptionMethodType;
5
+ clear?: OptionClearType;
6
+ messages?: any;
7
+ }
@@ -0,0 +1,19 @@
1
+ export declare enum ValidationTypesEnum {
2
+ Required = "required",
3
+ MaxLength = "maxLength",
4
+ MinLength = "minLength",
5
+ Email = "email",
6
+ Pattern = "pattern",
7
+ MaxValue = "maxValue",
8
+ MinValue = "minValue",
9
+ Callback = "callback"
10
+ }
11
+ export declare enum ValidationOptionsEnum {
12
+ Type = "type",
13
+ Messages = "messages"
14
+ }
15
+ export declare type ValidationsTypes = ValidationTypesEnum | ValidationOptionsEnum;
16
+ export declare enum ValidationMethodsEnum {
17
+ Submit = "submit",
18
+ Input = "input"
19
+ }
@@ -1,32 +1,5 @@
1
- export declare type OptionMethodType = 'submit' | 'input';
2
- export declare type OptionClearType = 'all' | 'selected';
3
- export declare type ValidationsTypes = 'required' | 'maxLength' | 'minLength' | 'email' | 'pattern' | 'messages' | 'maxValue' | 'minValue';
4
- export declare type ValidationsType = {
5
- required?: boolean;
6
- type?: 'multi' | 'single';
7
- maxLength?: number;
8
- minLength?: number;
9
- maxValue?: number;
10
- minValue?: number;
11
- email?: boolean;
12
- pattern?: RegExp;
13
- messages?: IMessages;
14
- };
15
- export interface FormValidatorOptions {
16
- method?: OptionMethodType;
17
- clear?: OptionClearType;
18
- messages?: any;
19
- }
20
- export interface IMessages {
21
- [name: string]: string;
22
- }
23
- export interface IValidations {
24
- [name: string]: ValidationsType;
25
- }
26
- export interface IFields {
27
- [name: string]: any;
28
- }
29
- export declare const emailRegExp: RegExp;
1
+ import { IFields, IValidations } from './models/validations-options.model';
2
+ import { FormValidatorOptions } from './models/validations-settings.model';
30
3
  export declare class MrxFormValidator {
31
4
  private _fields;
32
5
  private _validations;
@@ -37,15 +10,14 @@ export declare class MrxFormValidator {
37
10
  private _method;
38
11
  private _invalidMessages;
39
12
  constructor(options?: FormValidatorOptions);
40
- private sortValidators;
41
13
  get errors(): any;
42
14
  private set fields(value);
43
15
  private getNamesUpdatedProperties;
44
16
  private validateField;
45
- private hiddenValidateField;
46
17
  initFields(fields: IFields, validations: IValidations): void;
47
18
  initModelChanged(fields: IFields): void;
48
- initModelChangedFromField(field: any, fieldName: string): void;
19
+ initFieldChanged(fields: IFields, fieldName: string): void;
49
20
  isValid(): boolean;
21
+ initModelChangedFromField(field: any, fieldName: string): void;
50
22
  isHiddenValid(): boolean;
51
23
  }
@@ -0,0 +1,6 @@
1
+ import { IMessages, ValidationsType } from '../models/validations-options.model';
2
+ import { ValidationTypesEnum } from '../models/validations-types.model';
3
+ export declare const callbackValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
4
+ isValid: boolean;
5
+ message: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { IMessages, ValidationsType } from '../models/validations-options.model';
2
+ import { ValidationTypesEnum } from '../models/validations-types.model';
3
+ export declare const emailValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
4
+ isValid: boolean;
5
+ message: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { IMessages, ValidationsType } from '../models/validations-options.model';
2
+ import { ValidationTypesEnum } from '../models/validations-types.model';
3
+ export declare const maxLengthValidation: (value: string | string[], validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
4
+ isValid: boolean;
5
+ message: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { IMessages, ValidationsType } from '../models/validations-options.model';
2
+ import { ValidationTypesEnum } from '../models/validations-types.model';
3
+ export declare const maxValueValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
4
+ isValid: boolean;
5
+ message: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { IMessages, ValidationsType } from '../models/validations-options.model';
2
+ import { ValidationTypesEnum } from '../models/validations-types.model';
3
+ export declare const minLengthValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
4
+ isValid: boolean;
5
+ message: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { IMessages, ValidationsType } from '../models/validations-options.model';
2
+ import { ValidationTypesEnum } from '../models/validations-types.model';
3
+ export declare const minValueValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
4
+ isValid: boolean;
5
+ message: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { ValidationTypesEnum } from '../models/validations-types.model';
2
+ import { IMessages, ValidationsType } from '../models/validations-options.model';
3
+ export declare const patternValidation: (value: string, validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
4
+ isValid: boolean;
5
+ message: string;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { IMessages, ValidationsType } from '../models/validations-options.model';
2
+ import { ValidationTypesEnum } from '../models/validations-types.model';
3
+ export declare const requiredValidation: (value: string | string[], validations: ValidationsType, key: ValidationTypesEnum, invalidMessages: IMessages) => {
4
+ isValid: boolean;
5
+ message: string;
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myrta-ui",
3
- "version": "14.0.0-beta.1",
3
+ "version": "14.0.0-beta.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.3.0",
6
6
  "@angular/core": "^14.3.0",
@@ -16,6 +16,7 @@
16
16
  "air-datepicker": "^3.2.0",
17
17
  "libphonenumber-js": "^1.10.30",
18
18
  "google-libphonenumber": "^3.2.31",
19
+ "awesome-phonenumber": "^6.7.0",
19
20
  "lodash-es": "^4.17.21",
20
21
  "uuid": "^8.3.2",
21
22
  "@popperjs/core": "^2.11.5",
@@ -34,6 +35,7 @@
34
35
  "air-datepicker": "^3.2.0",
35
36
  "libphonenumber-js": "^1.10.30",
36
37
  "google-libphonenumber": "^3.2.31",
38
+ "awesome-phonenumber": "^6.7.0",
37
39
  "lodash-es": "^4.17.21",
38
40
  "uuid": "^8.3.2",
39
41
  "@popperjs/core": "^2.11.5",
package/public-api.d.ts CHANGED
@@ -141,6 +141,9 @@ export * from './lib/components/form/checkbox-group/models/checkbox-group.model'
141
141
  export * from './lib/components/form/radio/radio.module';
142
142
  export * from './lib/components/form/radio/radio.component';
143
143
  export * from './lib/components/form/radio/radio.enum';
144
+ export * from './lib/components/form/radio-group/radio-group.module';
145
+ export * from './lib/components/form/radio-group/radio-group.component';
146
+ export * from './lib/components/form/radio-group/models/radio-group.model';
144
147
  export * from './lib/components/form/switch/switch.module';
145
148
  export * from './lib/components/form/switch/switch.component';
146
149
  export * from './lib/components/form/switch/switch.enum';
@@ -169,3 +172,5 @@ export * from './lib/pipes/truncate/truncate.pipe';
169
172
  export * from './lib/services/index';
170
173
  export * from './lib/helpers/index';
171
174
  export * from './lib/models/index';
175
+ export * from './lib/components/form/input-tel/input-tel.module';
176
+ export * from './lib/components/form/input-tel/input-tel.component';