hl-core 0.0.10-beta.4 → 0.0.10-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/form.ts CHANGED
@@ -6,88 +6,85 @@ export enum FieldTypes {
6
6
  PASSWORD = 'password',
7
7
  FILE = 'file',
8
8
  }
9
- export {};
10
9
 
11
- declare global {
12
- export type InputType = TextInput | NumberInput | FileInput | SwitchInput;
13
- export type FormMasks = 'numbers' | 'iin' | 'otp' | 'phone' | 'date' | 'post' | 'threeDigit' | 'iik';
14
- export type FormIcons = 'arrowRight' | 'search' | 'sms' | null;
15
- export type Suffix = 'kzt' | 'usd' | 'percent' | null;
10
+ export type InputType = TextInput | NumberInput | FileInput | SwitchInput;
11
+ export type FormMasks = 'numbers' | 'iin' | 'otp' | 'phone' | 'date' | 'post' | 'threeDigit' | 'iik';
12
+ export type FormIcons = 'arrowRight' | 'search' | 'sms' | null;
13
+ export type Suffix = 'kzt' | 'usd' | 'percent' | null;
16
14
 
17
- export type FetchFunctions =
18
- | 'getResidents'
19
- | 'getFamilyStatuses'
20
- | 'getRelationTypes'
21
- | 'getCountries'
22
- | 'getStates'
23
- | 'getLocalityTypes'
24
- | 'getRegions'
25
- | 'getCities'
26
- | 'getDocumentTypes'
27
- | 'getTaxCountries'
28
- | 'getCitizenshipCountries'
29
- | 'getSectorCodeList'
30
- | 'getInsurancePay'
31
- | 'getEconomicActivityType'
32
- | 'getBanks'
33
- | 'getDocumentIssuers'
34
- | 'getGenderList';
15
+ export type FetchFunctions =
16
+ | 'getResidents'
17
+ | 'getFamilyStatuses'
18
+ | 'getRelationTypes'
19
+ | 'getCountries'
20
+ | 'getStates'
21
+ | 'getLocalityTypes'
22
+ | 'getRegions'
23
+ | 'getCities'
24
+ | 'getDocumentTypes'
25
+ | 'getTaxCountries'
26
+ | 'getCitizenshipCountries'
27
+ | 'getSectorCodeList'
28
+ | 'getInsurancePay'
29
+ | 'getEconomicActivityType'
30
+ | 'getBanks'
31
+ | 'getDocumentIssuers'
32
+ | 'getGenderList';
35
33
 
36
- export interface DynamicForm {
37
- formRef: any;
38
- sections: SectionType[];
39
- fieldOrder?: string[];
40
- }
34
+ export interface DynamicForm {
35
+ formRef: any;
36
+ sections: SectionType[];
37
+ fieldOrder?: string[];
38
+ }
41
39
 
42
- export type InputBase = {
43
- key?: any;
44
- modelValue?: any;
45
- clearable?: boolean;
46
- label?: string;
47
- placeholder?: string;
48
- readonly?: boolean;
49
- disabled?: boolean;
50
- arrowRight?: boolean;
51
- maxLength?: number | null;
52
- rules?: ValidationRule[];
53
- iconName?: FormIcons;
54
- value?: number;
55
- suffix?: Suffix | null;
56
- hint?: string | undefined;
57
- maska?: FormMasks | null;
58
- fetchFrom?: FetchFunctions | null;
59
- };
40
+ export type InputBase = {
41
+ key?: any;
42
+ modelValue?: any;
43
+ clearable?: boolean;
44
+ label?: string;
45
+ placeholder?: string;
46
+ readonly?: boolean;
47
+ disabled?: boolean;
48
+ arrowRight?: boolean;
49
+ maxLength?: number | null;
50
+ rules?: ValidationRule[];
51
+ iconName?: FormIcons;
52
+ value?: number;
53
+ suffix?: Suffix | null;
54
+ hint?: string | undefined;
55
+ maska?: FormMasks | null;
56
+ fetchFrom?: FetchFunctions | null;
57
+ };
60
58
 
61
- export type FormControl<T extends InputType> = T & {
62
- valid: boolean;
63
- dirty: boolean;
64
- touched: boolean;
65
- };
59
+ export type FormControl<T extends InputType> = T & {
60
+ valid: boolean;
61
+ dirty: boolean;
62
+ touched: boolean;
63
+ };
66
64
 
67
- export type FileInput = InputBase & {
68
- type: FieldTypes.FILE;
69
- };
65
+ export type FileInput = InputBase & {
66
+ type: FieldTypes.FILE;
67
+ };
70
68
 
71
- export type TextInput = InputBase & {
72
- type: FieldTypes.TEXT;
73
- };
69
+ export type TextInput = InputBase & {
70
+ type: FieldTypes.TEXT;
71
+ };
74
72
 
75
- export type SwitchInput = InputBase & {
76
- type: FieldTypes.SWITCH;
77
- labeling: boolean | null;
78
- direction: 'horizontal' | 'vertical';
79
- falseValue: boolean | string | null;
80
- trueValue: boolean | string | null;
81
- };
73
+ export type SwitchInput = InputBase & {
74
+ type: FieldTypes.SWITCH;
75
+ labeling: boolean | null;
76
+ direction: 'horizontal' | 'vertical';
77
+ falseValue: boolean | string | null;
78
+ trueValue: boolean | string | null;
79
+ };
82
80
 
83
- export type NumberInput = InputBase & {
84
- type: FieldTypes.NUMBER;
85
- };
81
+ export type NumberInput = InputBase & {
82
+ type: FieldTypes.NUMBER;
83
+ };
86
84
 
87
- export type ValidationRule = (value: string) => boolean | string;
85
+ export type ValidationRule = (value: string) => boolean | string;
88
86
 
89
- export type SectionType = {
90
- title?: string;
91
- fields: InputType[];
92
- };
93
- }
87
+ export type SectionType = {
88
+ title?: string;
89
+ fields: InputType[];
90
+ };