hl-core 0.0.10-beta.3 → 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/api/base.api.ts +68 -67
- package/components/Complex/TextBlock.vue +2 -0
- package/components/Dialog/Dialog.vue +2 -0
- package/components/Dialog/FamilyDialog.vue +2 -0
- package/components/Form/DynamicForm.vue +1 -0
- package/components/Form/FormData.vue +1 -0
- package/components/Form/ManagerAttachment.vue +1 -0
- package/components/Input/DynamicInput.vue +2 -0
- package/components/Input/FormInput.vue +2 -0
- package/components/Input/PanelInput.vue +1 -0
- package/components/Input/RoundedInput.vue +2 -0
- package/components/Input/RoundedSelect.vue +2 -0
- package/components/Input/SwitchInput.vue +2 -0
- package/components/Input/TextInput.vue +2 -0
- package/components/Layout/Drawer.vue +2 -0
- package/components/Pages/Anketa.vue +1 -0
- package/components/Pages/Auth.vue +2 -0
- package/components/Pages/ContragentForm.vue +1 -0
- package/components/Pages/Documents.vue +1 -0
- package/components/Pages/MemberForm.vue +1 -0
- package/components/Pages/ProductConditions.vue +1 -0
- package/components/Panel/PanelHandler.vue +1 -0
- package/components/Transitions/Animation.vue +2 -0
- package/components/Utilities/Chip.vue +2 -0
- package/composables/classes.ts +35 -34
- package/composables/fields.ts +6 -4
- package/composables/index.ts +2 -1
- package/nuxt.config.ts +0 -1
- package/package.json +2 -1
- package/store/data.store.ts +34 -33
- package/store/member.store.ts +1 -0
- package/tsconfig.json +3 -0
- package/types/env.d.ts +2 -2
- package/types/form.ts +71 -74
- package/types/index.ts +883 -885
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
export interface DynamicForm {
|
|
35
|
+
formRef: any;
|
|
36
|
+
sections: SectionType[];
|
|
37
|
+
fieldOrder?: string[];
|
|
38
|
+
}
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
export type FormControl<T extends InputType> = T & {
|
|
60
|
+
valid: boolean;
|
|
61
|
+
dirty: boolean;
|
|
62
|
+
touched: boolean;
|
|
63
|
+
};
|
|
66
64
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
export type FileInput = InputBase & {
|
|
66
|
+
type: FieldTypes.FILE;
|
|
67
|
+
};
|
|
70
68
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
export type TextInput = InputBase & {
|
|
70
|
+
type: FieldTypes.TEXT;
|
|
71
|
+
};
|
|
74
72
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
export type NumberInput = InputBase & {
|
|
82
|
+
type: FieldTypes.NUMBER;
|
|
83
|
+
};
|
|
86
84
|
|
|
87
|
-
|
|
85
|
+
export type ValidationRule = (value: string) => boolean | string;
|
|
88
86
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
87
|
+
export type SectionType = {
|
|
88
|
+
title?: string;
|
|
89
|
+
fields: InputType[];
|
|
90
|
+
};
|