hl-core 0.0.9-beta.9 → 0.0.10-beta.10

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 (75) hide show
  1. package/api/base.api.ts +1110 -0
  2. package/api/index.ts +2 -620
  3. package/api/interceptors.ts +38 -1
  4. package/components/Button/Btn.vue +1 -6
  5. package/components/Complex/MessageBlock.vue +1 -1
  6. package/components/Complex/Page.vue +1 -1
  7. package/components/Complex/TextBlock.vue +25 -0
  8. package/components/Dialog/Dialog.vue +72 -16
  9. package/components/Dialog/FamilyDialog.vue +3 -1
  10. package/components/Form/DynamicForm.vue +101 -0
  11. package/components/Form/FormBlock.vue +12 -3
  12. package/components/Form/FormData.vue +111 -0
  13. package/components/Form/FormSection.vue +3 -3
  14. package/components/Form/FormTextSection.vue +11 -3
  15. package/components/Form/FormToggle.vue +25 -5
  16. package/components/Form/ManagerAttachment.vue +178 -89
  17. package/components/Form/ProductConditionsBlock.vue +59 -6
  18. package/components/Input/Datepicker.vue +43 -7
  19. package/components/Input/DynamicInput.vue +25 -0
  20. package/components/Input/FileInput.vue +25 -5
  21. package/components/Input/FormInput.vue +9 -4
  22. package/components/Input/Monthpicker.vue +34 -0
  23. package/components/Input/PanelInput.vue +6 -1
  24. package/components/Input/RoundedInput.vue +2 -0
  25. package/components/Input/RoundedSelect.vue +9 -2
  26. package/components/Input/SwitchInput.vue +66 -0
  27. package/components/Input/TextInput.vue +162 -0
  28. package/components/Layout/Drawer.vue +18 -4
  29. package/components/Layout/Header.vue +23 -2
  30. package/components/Layout/Loader.vue +2 -1
  31. package/components/Layout/SettingsPanel.vue +24 -11
  32. package/components/Menu/InfoMenu.vue +35 -0
  33. package/components/Menu/MenuNav.vue +25 -3
  34. package/components/Pages/Anketa.vue +255 -65
  35. package/components/Pages/Auth.vue +58 -9
  36. package/components/Pages/ContragentForm.vue +10 -9
  37. package/components/Pages/Documents.vue +267 -30
  38. package/components/Pages/InvoiceInfo.vue +1 -1
  39. package/components/Pages/MemberForm.vue +775 -102
  40. package/components/Pages/ProductAgreement.vue +1 -8
  41. package/components/Pages/ProductConditions.vue +1133 -180
  42. package/components/Panel/PanelHandler.vue +627 -49
  43. package/components/Panel/PanelSelectItem.vue +17 -2
  44. package/components/Panel/RightPanelCloser.vue +7 -0
  45. package/components/Transitions/Animation.vue +30 -0
  46. package/components/Utilities/Chip.vue +2 -0
  47. package/components/Utilities/JsonViewer.vue +2 -2
  48. package/components/Utilities/Qr.vue +44 -0
  49. package/composables/axios.ts +1 -0
  50. package/composables/classes.ts +550 -44
  51. package/composables/constants.ts +126 -6
  52. package/composables/fields.ts +330 -0
  53. package/composables/index.ts +356 -20
  54. package/composables/styles.ts +23 -6
  55. package/configs/pwa.ts +63 -0
  56. package/layouts/clear.vue +21 -0
  57. package/layouts/default.vue +62 -3
  58. package/layouts/full.vue +21 -0
  59. package/locales/ru.json +558 -16
  60. package/nuxt.config.ts +6 -15
  61. package/package.json +38 -39
  62. package/pages/Token.vue +0 -13
  63. package/plugins/head.ts +26 -0
  64. package/plugins/vuetifyPlugin.ts +1 -5
  65. package/store/data.store.ts +1647 -348
  66. package/store/extractStore.ts +17 -0
  67. package/store/form.store.ts +13 -1
  68. package/store/member.store.ts +2 -1
  69. package/store/rules.ts +97 -3
  70. package/store/toast.ts +1 -1
  71. package/tsconfig.json +3 -0
  72. package/types/enum.ts +82 -0
  73. package/types/env.d.ts +2 -0
  74. package/types/form.ts +90 -0
  75. package/types/index.ts +847 -506
@@ -0,0 +1,17 @@
1
+ import type { PiniaCustomStateProperties, StoreActions, StoreGeneric, StoreGetters, StoreState } from 'pinia';
2
+ import type { ToRefs } from 'vue';
3
+ import { isReactive, isRef, toRaw, toRef } from 'vue';
4
+ type Extracted<SS> = ToRefs<StoreState<SS> & StoreGetters<SS> & PiniaCustomStateProperties<StoreState<SS>>> & StoreActions<SS>;
5
+ export function extractStore<SS extends StoreGeneric>(store: SS): Extracted<SS> {
6
+ const rawStore = toRaw(store);
7
+ const refs: Record<string, unknown> = {};
8
+
9
+ for (const [key, value] of Object.entries(rawStore)) {
10
+ if (isRef(value) || isReactive(value)) {
11
+ refs[key] = toRef(store, key);
12
+ } else if (typeof value === 'function') {
13
+ refs[key] = value;
14
+ }
15
+ }
16
+ return refs as Extracted<SS>;
17
+ }
@@ -1,8 +1,20 @@
1
1
  import { defineStore } from 'pinia';
2
- import { FormStoreClass } from '../composables/classes';
2
+ import { BeneficialOwner, FormStoreClass, PolicyholderActivity } from '../composables/classes';
3
3
 
4
4
  export const useFormStore = defineStore('forms', {
5
5
  state: () => ({
6
6
  ...new FormStoreClass(),
7
7
  }),
8
+ actions: {
9
+ addMember(whichMember: 'policyholder' | 'beneficialOwner') {
10
+ if (whichMember === 'policyholder') {
11
+ this.lfb.policyholderActivities.push(new PolicyholderActivity());
12
+ }
13
+ if (whichMember === 'beneficialOwner') {
14
+ if (this.lfb.beneficialOwners.length !== 3) {
15
+ this.lfb.beneficialOwners.push(new BeneficialOwner());
16
+ }
17
+ }
18
+ },
19
+ },
8
20
  });
@@ -5,6 +5,7 @@ import { ErrorHandler } from '../composables';
5
5
  import { AxiosError } from 'axios';
6
6
  import { Member } from '../composables/classes';
7
7
  import { MemberAppCodes, MemberCodes, StoreMembers } from '../types/enum';
8
+ import type { MultipleMember, SendOtpResponse } from '../types';
8
9
 
9
10
  export const useMemberStore = defineStore('members', {
10
11
  state: () => ({
@@ -13,7 +14,7 @@ export const useMemberStore = defineStore('members', {
13
14
  formStore: useFormStore(),
14
15
  }),
15
16
  actions: {
16
- isStatementEditible(whichForm: keyof typeof StoreMembers | 'productConditionsForm', showToaster: boolean = false) {
17
+ isStatementEditible(whichForm: keyof typeof StoreMembers | 'productConditionsForm' | 'calculatorForm', showToaster: boolean = false) {
17
18
  if (!this.validateInitiator(false)) return false;
18
19
  if (this.formStore.isDisabled[whichForm as keyof typeof this.formStore.isDisabled] === true) {
19
20
  if (showToaster) this.dataStore.showToaster('error', this.dataStore.t('toaster.viewErrorText'), 2000);
package/store/rules.ts CHANGED
@@ -1,12 +1,16 @@
1
1
  import { i18n } from '../configs/i18n';
2
- import { formatDate } from '../composables';
2
+ import { formatDate, useMask } from '../composables';
3
3
 
4
4
  const t = i18n.t;
5
5
 
6
6
  export const rules = {
7
7
  recalculationMultiply: [(v: any) => (v !== null && v !== '' && v >= 100) || t('toaster.valueShouldBeHigher', { text: '100' })],
8
+ recalculationMultiplyBetween: [(v: any) => (v !== null && v !== '' && v >= 100 && v <= 200) || t('toaster.recalculationMultiplyBetween', { floor: '100', ceil: '200' })],
8
9
  recalculationAdditive: [(v: any) => (v !== null && v !== '' && v <= 100 && v >= 0) || t('toaster.valueShouldBeBetween', { floor: '0', ceil: '100' })],
9
10
  required: [(v: any) => !!v || t('rules.required')],
11
+ notZero: [(v: any) => Number(v) !== 0 || 'Не может быть равно нулю'],
12
+ iik: [(v: any) => v.length === 20 || t('rules.iik')],
13
+ agentCommission: [(v: any) => v <= 50 || t('rules.agentCommission')],
10
14
  objectRequired: [
11
15
  (v: any) => {
12
16
  if (!!v && 'nameRu' in v && v.nameRu != null) {
@@ -15,6 +19,7 @@ export const rules = {
15
19
  return t('rules.required');
16
20
  },
17
21
  ],
22
+ arrayRequired: [(v: any) => (v && v.length > 0) || t('rules.required')],
18
23
  agentDataRequired: [
19
24
  (v: any) => {
20
25
  if (!!v && 'fullName' in v && v.fullName != null) {
@@ -34,12 +39,25 @@ export const rules = {
34
39
  return t('rules.required');
35
40
  },
36
41
  ],
37
- cyrillic: [(v: any) => v === null || /^[\u0400-\u04FF ]+$/.test(v) || t('rules.cyrillic')],
42
+ noResidentOffline: [
43
+ (v: any) => {
44
+ if (!!v && 'nameRu' in v && v.nameRu === 'Нерезидент') {
45
+ return t('rules.noResidentOffline');
46
+ }
47
+ if (!!v && 'nameRu' in v && !!v.nameRu) {
48
+ return true;
49
+ }
50
+ return t('rules.required');
51
+ },
52
+ ],
53
+ cyrillic: [(v: any) => v === null || /^[\u0400-\u04FF -]+$/.test(v) || t('rules.cyrillic')],
54
+ latin: [(v: any) => v === null || /^[a-zA-Z]+$/.test(v) || t('rules.latin')],
55
+ latinAndNumber: [(v: any) => v === null || /^[0-9a-zA-Z]+$/.test(v) || t('rules.latinAndNumber')],
38
56
  cyrillicNonRequired: [
39
57
  (v: any) => {
40
58
  if (!v) return true;
41
59
  else {
42
- return /^[\u0400-\u04FF ]+$/.test(v) || t('rules.cyrillic');
60
+ return /^[\u0400-\u04FF -]+$/.test(v) || t('rules.cyrillic');
43
61
  }
44
62
  },
45
63
  ],
@@ -63,6 +81,8 @@ export const rules = {
63
81
  numbers: [(v: any) => /^[0-9]+$/.test(v) || t('rules.numbers')],
64
82
  numbersSymbols: [(v: any) => /^([0-9])|(\W|_)+$/.test(v) || t('rules.numbersSymbols')],
65
83
  ageExceeds: [(v: any) => v < 50 || t('rules.ageExceeds')],
84
+ ageExceeds80: [(v: any) => v <= 80 || t('rules.ageExceeds80')],
85
+ ageExceeds80ByDate: [(v: any) => Math.abs(new Date(Date.now() - new Date(formatDate(v)!).getTime()).getUTCFullYear() - 1970) <= 80 || t('rules.ageExceeds80')],
66
86
  sums: [
67
87
  (v: any) => {
68
88
  let str = v.replace(/\s/g, '');
@@ -72,6 +92,16 @@ export const rules = {
72
92
  return t('rules.sums');
73
93
  },
74
94
  ],
95
+ planDate: [
96
+ (v: any) => {
97
+ if (new Date(formatDate(v)!) < new Date(Date.now())) return t('rules.planDate');
98
+ if (/^(0[1-9]|1[0-9]|2[0-9]|3[0-1])(-|\.)(0[1-9]|1[0-2])(-|\.)(19[0-9]{2}|20[0-9][0-9])$/.test(v)) {
99
+ return true;
100
+ } else {
101
+ return t('rules.date');
102
+ }
103
+ },
104
+ ],
75
105
  iinRight: [
76
106
  (v: any) => {
77
107
  if (v.length !== useMask().iin.length) {
@@ -161,6 +191,18 @@ export const rules = {
161
191
  }
162
192
  },
163
193
  ],
194
+ coverPeriodFrom1or5to15: [
195
+ (v: any) => {
196
+ if (v !== null) {
197
+ if (v == 1 || (v >= 5 && v <= 15)) {
198
+ return true;
199
+ }
200
+ return t('productConditionsForm.coverPeriodFrom1or5to15');
201
+ } else {
202
+ return t('productConditionsForm.coverPeriodFrom1or5to15');
203
+ }
204
+ },
205
+ ],
164
206
  requestedSumInsuredMycar: [
165
207
  (v: any) => {
166
208
  if (v !== null) {
@@ -184,10 +226,62 @@ export const rules = {
184
226
  ],
185
227
  policyholderAgeLimit: [(v: any) => v >= 18 || t('rules.policyholderAgeLimit')],
186
228
  beneficiaryAgeLimit: [(v: any) => v <= 15 || t('rules.beneficiaryAgeLimit')],
229
+ dateInPast: [
230
+ (v: any) => {
231
+ const givenDate = new Date(formatDate(v)!);
232
+ const currentDate = new Date();
233
+ if (givenDate.getTime() < currentDate.getTime()) {
234
+ return t('rules.dataInPast');
235
+ } else {
236
+ return true;
237
+ }
238
+ },
239
+ ],
240
+ checkDate: [
241
+ (v: any) => {
242
+ const today = new Date();
243
+ const yourDate = new Date(formatDate(v)!);
244
+ if (yourDate.toDateString() === today.toDateString()) {
245
+ return true;
246
+ } else {
247
+ return t('rules.checkDate');
248
+ }
249
+ },
250
+ ],
251
+ twoDayBeforeTodayDate: [
252
+ (v: any) => {
253
+ const now = new Date();
254
+ const today = new Date();
255
+ const yesterday = new Date(now.setDate(now.getDate() - 1));
256
+ const beforeYesterday = new Date(now.setDate(now.getDate() - 1));
257
+ const threeDaysAgo = new Date(now.setDate(now.getDate() - 1));
258
+ const fourDaysAgo = new Date(now.setDate(now.getDate() - 1));
259
+ const yourDate = new Date(formatDate(v)!);
260
+
261
+ if (
262
+ yourDate.toDateString() === today.toDateString() ||
263
+ yourDate.toDateString() === yesterday.toDateString() ||
264
+ yourDate.toDateString() === beforeYesterday.toDateString() ||
265
+ yourDate.toDateString() === threeDaysAgo.toDateString() ||
266
+ yourDate.toDateString() === fourDaysAgo.toDateString()
267
+ ) {
268
+ return true;
269
+ } else {
270
+ return t('rules.checkDate');
271
+ }
272
+ },
273
+ ],
274
+ fileRequired: [(v: any) => !!v || t('rules.fileRequired'), (v: any) => (v && v.length > 0) || t('rules.fileRequired')],
187
275
  guaranteedPeriodLimit(v: any, termAnnuityPayments: any) {
188
276
  if (Number(v) > Number(termAnnuityPayments)) {
189
277
  return t('rules.guaranteedPeriodLimit');
190
278
  }
191
279
  return true;
192
280
  },
281
+ fixInsSumLimit(v: any, sum: any) {
282
+ if (Number(v) > Number(sum)) {
283
+ return t('rules.fixInsSumLimit', { sum }) as any;
284
+ }
285
+ return true;
286
+ },
193
287
  };
package/store/toast.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as vt from 'vue-toastification';
2
- import { PluginOptions, POSITION, TYPE } from 'vue-toastification';
2
+ import { type PluginOptions, POSITION, TYPE } from 'vue-toastification';
3
3
  import 'vue-toastification/dist/index.css';
4
4
 
5
5
  export const Types = TYPE;
package/tsconfig.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "./.nuxt/tsconfig.json"
3
+ }
package/types/enum.ts CHANGED
@@ -8,15 +8,49 @@ export enum StoreMembers {
8
8
 
9
9
  export enum Actions {
10
10
  accept = 'accept',
11
+ acceptCustom = 'acceptCustom',
12
+
11
13
  rejectclient = 'rejectclient',
14
+ rejectclientCustom = 'rejectclientCustom',
15
+
16
+ cancel = 'cancel',
17
+ cancelCustom = 'cancelCustom',
18
+
12
19
  reject = 'reject',
20
+ rejectCustom = 'rejectCustom',
21
+
13
22
  return = 'return',
23
+ returnCustom = 'returnCustom',
24
+
14
25
  claim = 'claim',
26
+ claimCustom = 'claimCustom',
27
+
15
28
  sign = 'sign',
29
+ signCustom = 'signCustom',
30
+
31
+ signed = 'signed',
32
+ signedCustom = 'signedCustom',
33
+
16
34
  pay = 'pay',
35
+ payCustom = 'payCustom',
36
+
17
37
  register = 'register',
38
+ registerCustom = 'registerCustom',
39
+
18
40
  send = 'send',
41
+ sendCustom = 'sendCustom',
42
+
19
43
  affiliate = 'affiliate',
44
+ affiliateCustom = 'affiliateCustom',
45
+
46
+ chooseSign = 'chooseSign',
47
+ chooseSignCustom = 'chooseSignCustom',
48
+
49
+ choosePay = 'choosePay',
50
+ choosePayCustom = 'choosePayCustom',
51
+
52
+ payed = 'payed',
53
+ payedCustom = 'payedCustom',
20
54
  }
21
55
 
22
56
  export enum PostActions {
@@ -32,23 +66,38 @@ export enum PostActions {
32
66
  Error401 = 'Error401',
33
67
  Error500 = 'Error500',
34
68
  iframeLoaded = 'iframeLoaded',
69
+ goToProject = 'goToProject',
35
70
  }
36
71
 
37
72
  export enum Roles {
38
73
  Manager = 'Manager',
39
74
  Admin = 'Admin',
75
+ Jurist = 'Jurist',
40
76
  Underwriter = 'Underwriter',
77
+ Actuary = 'Actuary',
41
78
  Agent = 'Agent',
42
79
  Compliance = 'Compliance',
43
80
  AgentMycar = 'AgentMycar',
44
81
  Analyst = 'Analyst',
45
82
  UPK = 'UPK',
83
+ URP = 'URP',
46
84
  FinCenter = 'FinCenter',
47
85
  Supervisor = 'Supervisor',
48
86
  Support = 'Support',
49
87
  ManagerHalykBank = 'ManagerHalykBank',
50
88
  ServiceManager = 'ServiceManager',
51
89
  DRNSJ = 'DRNSJ',
90
+ HeadManager = 'HeadManager',
91
+ AgentAuletti = 'AgentAuletti',
92
+ USNS = 'USNS',
93
+ Accountant = 'Accountant',
94
+ BranchDirector = 'BranchDirector',
95
+ USNSACCINS = 'USNSACCINS',
96
+ Dsuio = 'Dsuio',
97
+ SettlementLosses = 'SettlementLosses',
98
+ HeadSettlementLosses = 'HeadSettlementLosses',
99
+ DsoDirector = 'DsoDirector',
100
+ AccountantDirector = 'AccountantDirector',
52
101
  }
53
102
 
54
103
  export enum Statuses {
@@ -56,6 +105,7 @@ export enum Statuses {
56
105
  EditForm = 'EditForm',
57
106
  EditBeneficiaryForm = 'EditBeneficiaryForm',
58
107
  DocumentsSignedFrom = 'DocumentsSignedFrom',
108
+ PreparationDossierForm = 'PreparationDossierForm',
59
109
  UnderwriterForm = 'UnderwriterForm',
60
110
  AffilationResolutionForm = 'AffilationResolutionForm',
61
111
  Completed = 'Completed',
@@ -64,6 +114,15 @@ export enum Statuses {
64
114
  WaitingInsurancePremiumForm = 'WaitingInsurancePremiumForm',
65
115
  CheckFinCenterForm = 'CheckFinCenterForm',
66
116
  RegistryFinCenterForm = 'RegistryFinCenterForm',
117
+ DocumentsSignedClientFrom = 'DocumentsSignedClientFrom',
118
+ InputDataForm = 'InputDataForm',
119
+ ApproveForm = 'ApproveForm',
120
+ AttachAppContractForm = 'AttachAppContractForm',
121
+ ControllerDpForm = 'ControllerDpForm',
122
+ ActuaryForm = 'ActuaryForm',
123
+ DsoUsnsForm = 'DsoUsnsForm',
124
+ AccountantForm = 'AccountantForm',
125
+ HeadManagerForm = 'HeadManagerForm',
67
126
  }
68
127
 
69
128
  export enum MemberCodes {
@@ -81,3 +140,26 @@ export enum MemberAppCodes {
81
140
  beneficialOwnerApp = 'beneficialOwnerApp',
82
141
  spokesmanApp = 'spokesmanApp',
83
142
  }
143
+
144
+ export enum Methods {
145
+ GET = 'GET',
146
+ POST = 'POST',
147
+ }
148
+
149
+ export namespace Enums {
150
+ export namespace GBD {
151
+ export enum DocTypes {
152
+ 'PS' = '001',
153
+ '1UDL' = '002',
154
+ 'VNZ' = '003',
155
+ }
156
+ }
157
+ export namespace Insis {
158
+ export enum DocTypes {
159
+ 'PS' = 'PS',
160
+ '1UDL' = '1UDL',
161
+ 'VNZ' = 'VNZ',
162
+ 'SBI' = 'SBI',
163
+ }
164
+ }
165
+ }
package/types/env.d.ts CHANGED
@@ -3,6 +3,8 @@
3
3
  interface ImportMetaEnv {
4
4
  readonly VITE_MODE: EnvModes;
5
5
  readonly VITE_PRODUCT?: Projects;
6
+ readonly VITE_PARENT_PRODUCT?: 'efo' | 'auletti';
7
+ readonly VITE_COMMIT_VERSION?: string;
6
8
  }
7
9
 
8
10
  interface ImportMeta {
package/types/form.ts ADDED
@@ -0,0 +1,90 @@
1
+ export enum FieldTypes {
2
+ TEXT = 'text',
3
+ NUMBER = 'number',
4
+ SWITCH = 'switch',
5
+ EMAIL = 'email',
6
+ PASSWORD = 'password',
7
+ FILE = 'file',
8
+ }
9
+
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;
14
+
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';
33
+
34
+ export interface DynamicForm {
35
+ formRef: any;
36
+ sections: SectionType[];
37
+ fieldOrder?: string[];
38
+ }
39
+
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
+ };
58
+
59
+ export type FormControl<T extends InputType> = T & {
60
+ valid: boolean;
61
+ dirty: boolean;
62
+ touched: boolean;
63
+ };
64
+
65
+ export type FileInput = InputBase & {
66
+ type: FieldTypes.FILE;
67
+ };
68
+
69
+ export type TextInput = InputBase & {
70
+ type: FieldTypes.TEXT;
71
+ };
72
+
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
+ };
80
+
81
+ export type NumberInput = InputBase & {
82
+ type: FieldTypes.NUMBER;
83
+ };
84
+
85
+ export type ValidationRule = (value: string) => boolean | string;
86
+
87
+ export type SectionType = {
88
+ title?: string;
89
+ fields: InputType[];
90
+ };