hl-core 0.0.10-beta.1 → 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 (36) hide show
  1. package/api/base.api.ts +69 -68
  2. package/components/Complex/TextBlock.vue +2 -0
  3. package/components/Dialog/Dialog.vue +2 -0
  4. package/components/Dialog/FamilyDialog.vue +2 -0
  5. package/components/Form/DynamicForm.vue +1 -0
  6. package/components/Form/FormData.vue +1 -0
  7. package/components/Form/ManagerAttachment.vue +1 -0
  8. package/components/Input/DynamicInput.vue +2 -0
  9. package/components/Input/FormInput.vue +2 -0
  10. package/components/Input/PanelInput.vue +1 -0
  11. package/components/Input/RoundedInput.vue +2 -0
  12. package/components/Input/RoundedSelect.vue +2 -0
  13. package/components/Input/SwitchInput.vue +2 -0
  14. package/components/Input/TextInput.vue +2 -0
  15. package/components/Layout/Drawer.vue +2 -0
  16. package/components/Pages/Anketa.vue +1 -0
  17. package/components/Pages/Auth.vue +2 -0
  18. package/components/Pages/ContragentForm.vue +1 -0
  19. package/components/Pages/Documents.vue +1 -0
  20. package/components/Pages/MemberForm.vue +1 -0
  21. package/components/Pages/ProductConditions.vue +1 -0
  22. package/components/Panel/PanelHandler.vue +2 -1
  23. package/components/Transitions/Animation.vue +2 -0
  24. package/components/Utilities/Chip.vue +2 -0
  25. package/components/Utilities/JsonViewer.vue +1 -2
  26. package/composables/classes.ts +55 -36
  27. package/composables/fields.ts +6 -4
  28. package/composables/index.ts +2 -1
  29. package/nuxt.config.ts +2 -7
  30. package/package.json +3 -1
  31. package/store/data.store.ts +44 -34
  32. package/store/member.store.ts +1 -0
  33. package/tsconfig.json +3 -0
  34. package/types/enum.ts +2 -1
  35. package/types/form.ts +71 -75
  36. package/types/index.ts +835 -889
@@ -1,13 +1,14 @@
1
1
  import { defineStore } from 'pinia';
2
2
  import { rules } from './rules';
3
3
  import { i18n } from '../configs/i18n';
4
- import { Toast, Types, Positions, ToastOptions } from './toast';
4
+ import { Toast, Types as ToastTypes, Positions, ToastOptions } from './toast';
5
5
  import { isValidGUID, yearEnding, jwtDecode, ErrorHandler, getKeyWithPattern, getNumber, getAgeByBirthDate } from '../composables';
6
6
  import { DataStoreClass, DocumentItem, Member, Value, CountryValue, PolicyholderActivity, BeneficialOwner, PolicyholderClass } from '../composables/classes';
7
7
  import { ApiClass } from '../api';
8
8
  import { useFormStore } from './form.store';
9
9
  import { AxiosError } from 'axios';
10
10
  import { PostActions, StoreMembers, Roles, Statuses, MemberCodes, MemberAppCodes, Enums } from '../types/enum';
11
+ import type * as Types from '../types';
11
12
  //@ts-ignore
12
13
  import { NCALayerClient } from 'ncalayer-js-client';
13
14
 
@@ -17,7 +18,7 @@ export const useDataStore = defineStore('data', {
17
18
  t: i18n.t,
18
19
  rules: rules,
19
20
  toast: Toast,
20
- toastTypes: Types,
21
+ toastTypes: ToastTypes,
21
22
  toastPositions: Positions,
22
23
  isValidGUID: isValidGUID,
23
24
  router: useRouter(),
@@ -30,7 +31,7 @@ export const useDataStore = defineStore('data', {
30
31
  showToaster: (type: 'success' | 'error' | 'warning' | 'info', msg: string, timeout?: number) =>
31
32
  Toast.useToast()(msg, {
32
33
  ...ToastOptions,
33
- type: Types[type.toUpperCase() as keyof typeof Types],
34
+ type: ToastTypes[type.toUpperCase() as keyof typeof ToastTypes],
34
35
  timeout: type === 'error' ? 6000 : typeof timeout === 'number' ? timeout : ToastOptions.timeout,
35
36
  }),
36
37
  }),
@@ -268,7 +269,10 @@ export const useDataStore = defineStore('data', {
268
269
  return this.isRole(constants.roles.Dsuio);
269
270
  },
270
271
  isAdjuster() {
271
- return this.isRole(constants.roles.Adjuster);
272
+ return this.isRole(constants.roles.SettlementLosses);
273
+ },
274
+ isHeadAdjuster() {
275
+ return this.isRole(constants.roles.HeadSettlementLosses);
272
276
  },
273
277
  isDsoDirector() {
274
278
  return this.isRole(constants.roles.DsoDirector);
@@ -383,7 +387,7 @@ export const useDataStore = defineStore('data', {
383
387
  return false;
384
388
  }
385
389
  },
386
- async resetSelected(route: RouteType) {
390
+ async resetSelected(route: Types.RouteType) {
387
391
  this.settings.open = false;
388
392
  this.rightPanel.open = false;
389
393
  this.panel.open = false;
@@ -488,7 +492,7 @@ export const useDataStore = defineStore('data', {
488
492
  if (Number(id) === 0) return;
489
493
  this.isLoading = load;
490
494
  try {
491
- const member = whichIndex === null ? this.formStore[whichForm as SingleMember] : this.formStore[whichForm as MultipleMember][whichIndex];
495
+ const member = whichIndex === null ? this.formStore[whichForm as Types.SingleMember] : this.formStore[whichForm as Types.MultipleMember][whichIndex];
492
496
  const contragentResponse = await this.api.getContragentById(id);
493
497
  if (contragentResponse.totalItems > 0) {
494
498
  await this.serializeContragentData(member, contragentResponse.items[0]);
@@ -501,7 +505,7 @@ export const useDataStore = defineStore('data', {
501
505
  this.isLoading = false;
502
506
  }
503
507
  },
504
- async serializeContragentData(member: Member, contragent: ContragentType) {
508
+ async serializeContragentData(member: Member, contragent: Types.ContragentType) {
505
509
  const [questionairesResponse, contactsResponse, documentsResponse, addressResponse] = await Promise.allSettled([
506
510
  this.api.getContrAgentData(contragent.id),
507
511
  this.api.getContrAgentContacts(contragent.id),
@@ -533,7 +537,13 @@ export const useDataStore = defineStore('data', {
533
537
  },
534
538
  parseContragent(
535
539
  member: Member,
536
- user: { personalData: ContragentType; data?: ContragentQuestionaries[]; contacts?: ContragentContacts[]; documents?: ContragentDocuments[]; address?: ContragentAddress[] },
540
+ user: {
541
+ personalData: Types.ContragentType;
542
+ data?: Types.ContragentQuestionaries[];
543
+ contacts?: Types.ContragentContacts[];
544
+ documents?: Types.ContragentDocuments[];
545
+ address?: Types.ContragentAddress[];
546
+ },
537
547
  ) {
538
548
  member.verifyType = user.personalData.verifyType;
539
549
  member.verifyDate = user.personalData.verifyDate;
@@ -615,7 +625,7 @@ export const useDataStore = defineStore('data', {
615
625
  });
616
626
  }
617
627
  },
618
- searchFromList(member: Member, searchIt: ContragentQuestionaries) {
628
+ searchFromList(member: Member, searchIt: Types.ContragentQuestionaries) {
619
629
  const getQuestionariesData = () => {
620
630
  switch (searchIt.questId) {
621
631
  case '500003':
@@ -723,7 +733,7 @@ export const useDataStore = defineStore('data', {
723
733
  }
724
734
  }
725
735
  try {
726
- const contragentData: ContragentType = {
736
+ const contragentData: Types.ContragentType = {
727
737
  id: Number(user.id),
728
738
  type: Number(user.type),
729
739
  iin: user.iin!.replace(/-/g, ''),
@@ -753,7 +763,7 @@ export const useDataStore = defineStore('data', {
753
763
  countryOfTaxResidency,
754
764
  signOfResidency,
755
765
  }))(user);
756
- const questionariesData: ContragentQuestionaries[] = Object.values(userQuestionnaires).map(question => {
766
+ const questionariesData: Types.ContragentQuestionaries[] = Object.values(userQuestionnaires).map(question => {
757
767
  let questName = '';
758
768
  let questionId = parseInt(question.ids as string).toString();
759
769
  if (questionId === '500003') {
@@ -821,7 +831,7 @@ export const useDataStore = defineStore('data', {
821
831
  }
822
832
 
823
833
  const userResponseContacts = 'response' in user && user.response && 'contacts' in user.response && user.response.contacts ? user.response.contacts : null;
824
- const contactsData: ContragentContacts[] = [];
834
+ const contactsData: Types.ContragentContacts[] = [];
825
835
  if (!!user.phoneNumber) {
826
836
  contactsData.push({
827
837
  contragentId: Number(user.id),
@@ -863,7 +873,7 @@ export const useDataStore = defineStore('data', {
863
873
 
864
874
  const documentsData = user.documentsList;
865
875
  const hasAlreadyDocument = documentsData.findIndex(i => i.type === user.documentType.ids && i.number === user.documentNumber);
866
- const userDocument: ContragentDocuments = {
876
+ const userDocument: Types.ContragentDocuments = {
867
877
  contragentId: Number(user.id),
868
878
  id: hasAlreadyDocument !== -1 ? documentsData[hasAlreadyDocument].id : 0,
869
879
  description: null,
@@ -888,7 +898,7 @@ export const useDataStore = defineStore('data', {
888
898
 
889
899
  const checkForNull = (value: any) => (value ? value : '');
890
900
  const userResponseAddress = 'response' in user && user.response && 'addresses' in user.response && user.response.addresses ? user.response.addresses : null;
891
- const addressData: ContragentAddress[] = [];
901
+ const addressData: Types.ContragentAddress[] = [];
892
902
  addressData.push({
893
903
  id: userResponseAddress !== null ? userResponseAddress[0].id : 0,
894
904
  contragentId: Number(user.id),
@@ -1085,8 +1095,8 @@ export const useDataStore = defineStore('data', {
1085
1095
  },
1086
1096
  getConditionsData() {
1087
1097
  const conditionsData: {
1088
- policyAppDto: PolicyAppDto;
1089
- addCoversDto: AddCover[];
1098
+ policyAppDto: Types.PolicyAppDto;
1099
+ addCoversDto: Types.AddCover[];
1090
1100
  } = {
1091
1101
  policyAppDto: {
1092
1102
  id: this.formStore.applicationData?.policyAppDto?.id,
@@ -1214,7 +1224,7 @@ export const useDataStore = defineStore('data', {
1214
1224
  }
1215
1225
  return this.formStore.definedAnswersId[whichSurvey];
1216
1226
  },
1217
- async setSurvey(data: AnketaFirst) {
1227
+ async setSurvey(data: Types.AnketaFirst) {
1218
1228
  try {
1219
1229
  this.isLoading = true;
1220
1230
  const anketaToken = await this.api.setSurvey(data);
@@ -1228,7 +1238,7 @@ export const useDataStore = defineStore('data', {
1228
1238
  },
1229
1239
  async setINSISWorkData(loading: boolean = true) {
1230
1240
  if (!this.formStore.applicationData.insisWorkDataApp) return;
1231
- const data: InsisWorkDataApp = {
1241
+ const data: Types.InsisWorkDataApp = {
1232
1242
  id: this.formStore.applicationData.insisWorkDataApp.id,
1233
1243
  processInstanceId: String(this.formStore.applicationData.processInstanceId),
1234
1244
  agentId: Number(this.formStore.AgentData.agentId),
@@ -1872,7 +1882,7 @@ export const useDataStore = defineStore('data', {
1872
1882
  return;
1873
1883
  }
1874
1884
  const signDate = formatDate(this.formStore.productConditionsForm.signDate);
1875
- const calculationData: RecalculationDataType & PolicyAppDto = {
1885
+ const calculationData: Types.RecalculationDataType & Types.PolicyAppDto = {
1876
1886
  signDate: signDate ? signDate.toISOString() : undefined,
1877
1887
  birthDate: this.formStore.productConditionsForm.birthDate ? formatDate(this.formStore.productConditionsForm.birthDate)!.toISOString() : undefined,
1878
1888
  gender: Number(this.formStore.productConditionsForm.gender.id),
@@ -2018,7 +2028,7 @@ export const useDataStore = defineStore('data', {
2018
2028
  async calculatePrice(taskId?: string) {
2019
2029
  this.isLoading = true;
2020
2030
  try {
2021
- const priceForm: SetApplicationRequest = {};
2031
+ const priceForm: Types.SetApplicationRequest = {};
2022
2032
  priceForm.insuredAmountId = this.formStore.productConditionsForm.calculatorForm.amount.id;
2023
2033
  priceForm.age = this.formStore.productConditionsForm.calculatorForm.age;
2024
2034
  priceForm.lifeTripCountries = this.formStore.productConditionsForm.calculatorForm.countries!.map(item => item.id as string);
@@ -2065,7 +2075,7 @@ export const useDataStore = defineStore('data', {
2065
2075
  async startApplication(member: Member, processCode?: number) {
2066
2076
  if (!member.iin) return false;
2067
2077
  try {
2068
- const data: StartApplicationType = {
2078
+ const data: Types.StartApplicationType = {
2069
2079
  clientId: member.id,
2070
2080
  iin: member.iin.replace(/-/g, ''),
2071
2081
  longName: member.longName ?? '',
@@ -2356,7 +2366,7 @@ export const useDataStore = defineStore('data', {
2356
2366
  async deleteTask(taskId: string) {
2357
2367
  this.isLoading = true;
2358
2368
  try {
2359
- const data: SendTask = {
2369
+ const data: Types.SendTask = {
2360
2370
  taskId: taskId,
2361
2371
  decision: 'rejectclient',
2362
2372
  comment: 'Клиент отказался',
@@ -2480,7 +2490,7 @@ export const useDataStore = defineStore('data', {
2480
2490
  console.log(err);
2481
2491
  }
2482
2492
  },
2483
- setMembersField(whichForm: SingleMember, whichMember: keyof typeof MemberAppCodes) {
2493
+ setMembersField(whichForm: Types.SingleMember, whichMember: keyof typeof MemberAppCodes) {
2484
2494
  this.formStore[whichForm].familyStatus = this.findObject('familyStatuses', 'id', this.formStore.applicationData[whichMember].familyStatusId);
2485
2495
  this.formStore[whichForm].signOfIPDL = this.findObject(
2486
2496
  'ipdl',
@@ -2507,7 +2517,7 @@ export const useDataStore = defineStore('data', {
2507
2517
  this.formStore.applicationData.pensionApp.transferContractCompany = transferCompany ? transferCompany : new Value();
2508
2518
  }
2509
2519
  },
2510
- setMembersFieldIndex(whichForm: MultipleMember, whichMember: keyof typeof MemberAppCodes, index: number) {
2520
+ setMembersFieldIndex(whichForm: Types.MultipleMember, whichMember: keyof typeof MemberAppCodes, index: number) {
2511
2521
  if ('familyStatus' in this.formStore[whichForm][index]) {
2512
2522
  this.formStore[whichForm][index].familyStatus = this.findObject('familyStatuses', 'id', this.formStore.applicationData[whichMember][index].familyStatusId);
2513
2523
  }
@@ -2543,7 +2553,7 @@ export const useDataStore = defineStore('data', {
2543
2553
  if (this.formStore.signUrls.length) {
2544
2554
  return this.formStore.signUrls;
2545
2555
  }
2546
- const prepareSignDocuments = (): SignDataType[] => {
2556
+ const prepareSignDocuments = (): Types.SignDataType[] => {
2547
2557
  switch (this.formStore.applicationData.statusCode) {
2548
2558
  case 'ContractSignedFrom':
2549
2559
  return [
@@ -2758,7 +2768,7 @@ export const useDataStore = defineStore('data', {
2758
2768
  try {
2759
2769
  this.isButtonsLoading = true;
2760
2770
  this.formStore.needToScanSignedContract = true;
2761
- const data: SignDataType = {
2771
+ const data: Types.SignDataType = {
2762
2772
  processInstanceId: String(this.formStore.applicationData.processInstanceId),
2763
2773
  name: 'Contract',
2764
2774
  format: 'pdf',
@@ -2814,7 +2824,7 @@ export const useDataStore = defineStore('data', {
2814
2824
  const formattedData = formatDate(this.formStore.finCenterData.date);
2815
2825
  if (!formattedData) return;
2816
2826
  this.isLoading = true;
2817
- const data: RegNumberDataType = {
2827
+ const data: Types.RegNumberDataType = {
2818
2828
  processInstanceId: String(this.formStore.applicationData.processInstanceId),
2819
2829
  regNumber: String(this.formStore.finCenterData.regNumber),
2820
2830
  date: formattedData.toISOString(),
@@ -2829,7 +2839,7 @@ export const useDataStore = defineStore('data', {
2829
2839
  },
2830
2840
  async sendSMS(type: 'SignUrl' | 'PayUrl', phoneNumber: string, text: string) {
2831
2841
  if (!type || !phoneNumber || !text) return;
2832
- const smsData: SmsDataType = {
2842
+ const smsData: Types.SmsDataType = {
2833
2843
  iin: this.formStore.applicationData.clientApp.iin,
2834
2844
  phoneNumber: formatPhone(phoneNumber),
2835
2845
  processInstanceId: String(this.formStore.applicationData.processInstanceId),
@@ -2895,7 +2905,7 @@ export const useDataStore = defineStore('data', {
2895
2905
  }
2896
2906
  this.isLoading = false;
2897
2907
  },
2898
- async getValidateClientESBD(data: ESBDValidationType) {
2908
+ async getValidateClientESBD(data: Types.ESBDValidationType) {
2899
2909
  try {
2900
2910
  return await this.api.getValidateClientESBD(data);
2901
2911
  } catch (err) {
@@ -2903,7 +2913,7 @@ export const useDataStore = defineStore('data', {
2903
2913
  return ErrorHandler(err);
2904
2914
  }
2905
2915
  },
2906
- validateMultipleMembers(localKey: MultipleMember, applicationKey: keyof typeof this.formStore.applicationData, text: string) {
2916
+ validateMultipleMembers(localKey: Types.MultipleMember, applicationKey: keyof typeof this.formStore.applicationData, text: string) {
2907
2917
  if (this.formStore[localKey].length === this.formStore.applicationData[applicationKey].length) {
2908
2918
  if (this.formStore[localKey].length !== 0 && this.formStore.applicationData[applicationKey].length !== 0) {
2909
2919
  const localMembers = [...this.formStore[localKey]].sort((a, b) => Number(a.id) - Number(b.id));
@@ -3299,7 +3309,7 @@ export const useDataStore = defineStore('data', {
3299
3309
  this.isLoading = false;
3300
3310
  return false;
3301
3311
  }
3302
- const { person } = parseXML(gbdResponse.content, true, 'person') as { person: Api.GBD.Person };
3312
+ const { person } = parseXML(gbdResponse.content, true, 'person') as { person: Types.Api.GBD.Person };
3303
3313
  const { responseInfo } = parseXML(gbdResponse.content, true, 'responseInfo');
3304
3314
  if (member.gosPersonData !== null && member.gosPersonData.iin !== member.iin!.replace(/-/g, '')) {
3305
3315
  member.resetMember(false);
@@ -3316,7 +3326,7 @@ export const useDataStore = defineStore('data', {
3316
3326
  this.isLoading = false;
3317
3327
  }
3318
3328
  },
3319
- async saveInStoreUserGBDFL(person: Api.GBD.Person, member: Member) {
3329
+ async saveInStoreUserGBDFL(person: Types.Api.GBD.Person, member: Member) {
3320
3330
  member.firstName = person.name;
3321
3331
  member.lastName = person.surname;
3322
3332
  member.middleName = person.patronymic ? person.patronymic : '';
@@ -3601,7 +3611,7 @@ export const useDataStore = defineStore('data', {
3601
3611
  }
3602
3612
  this.isLoading = false;
3603
3613
  },
3604
- async saveAccidentIncidents(data: AccidentIncidents[]) {
3614
+ async saveAccidentIncidents(data: Types.AccidentIncidents[]) {
3605
3615
  try {
3606
3616
  const dataCopy = JSON.parse(JSON.stringify(data));
3607
3617
  for (const incident of dataCopy) {
@@ -3832,7 +3842,7 @@ export const useDataStore = defineStore('data', {
3832
3842
  return ErrorHandler(err);
3833
3843
  }
3834
3844
  },
3835
- async generateShortLink(url: string, template?: Api.GenerateShortLink.Templates) {
3845
+ async generateShortLink(url: string, template?: Types.Api.GenerateShortLink.Templates) {
3836
3846
  try {
3837
3847
  const response = await this.api.generateShortLink({
3838
3848
  link: url,
@@ -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: () => ({
package/tsconfig.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "./.nuxt/tsconfig.json"
3
+ }
package/types/enum.ts CHANGED
@@ -94,7 +94,8 @@ export enum Roles {
94
94
  BranchDirector = 'BranchDirector',
95
95
  USNSACCINS = 'USNSACCINS',
96
96
  Dsuio = 'Dsuio',
97
- Adjuster = 'Adjuster',
97
+ SettlementLosses = 'SettlementLosses',
98
+ HeadSettlementLosses = 'HeadSettlementLosses',
98
99
  DsoDirector = 'DsoDirector',
99
100
  AccountantDirector = 'AccountantDirector',
100
101
  }
package/types/form.ts CHANGED
@@ -1,5 +1,3 @@
1
- export {};
2
-
3
1
  export enum FieldTypes {
4
2
  TEXT = 'text',
5
3
  NUMBER = 'number',
@@ -9,86 +7,84 @@ export enum FieldTypes {
9
7
  FILE = 'file',
10
8
  }
11
9
 
12
- declare global {
13
- type InputType = TextInput | NumberInput | FileInput | SwitchInput;
14
- type FormMasks = 'numbers' | 'iin' | 'otp' | 'phone' | 'date' | 'post' | 'threeDigit' | 'iik';
15
- type FormIcons = 'arrowRight' | 'search' | 'sms' | null;
16
- 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;
17
14
 
18
- type FetchFunctions =
19
- | 'getResidents'
20
- | 'getFamilyStatuses'
21
- | 'getRelationTypes'
22
- | 'getCountries'
23
- | 'getStates'
24
- | 'getLocalityTypes'
25
- | 'getRegions'
26
- | 'getCities'
27
- | 'getDocumentTypes'
28
- | 'getTaxCountries'
29
- | 'getCitizenshipCountries'
30
- | 'getSectorCodeList'
31
- | 'getInsurancePay'
32
- | 'getEconomicActivityType'
33
- | 'getBanks'
34
- | 'getDocumentIssuers'
35
- | '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';
36
33
 
37
- export interface DynamicForm {
38
- formRef: any;
39
- sections: SectionType[];
40
- fieldOrder?: string[];
41
- }
34
+ export interface DynamicForm {
35
+ formRef: any;
36
+ sections: SectionType[];
37
+ fieldOrder?: string[];
38
+ }
42
39
 
43
- type InputBase = {
44
- key?: any;
45
- modelValue?: any;
46
- clearable?: boolean;
47
- label?: string;
48
- placeholder?: string;
49
- readonly?: boolean;
50
- disabled?: boolean;
51
- arrowRight?: boolean;
52
- maxLength?: number | null;
53
- rules?: ValidationRule[];
54
- iconName?: FormIcons;
55
- value?: number;
56
- suffix?: Suffix | null;
57
- hint?: string | undefined;
58
- maska?: FormMasks | null;
59
- fetchFrom?: FetchFunctions | null;
60
- };
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
+ };
61
58
 
62
- type FormControl<T extends InputType> = T & {
63
- valid: boolean;
64
- dirty: boolean;
65
- touched: boolean;
66
- };
59
+ export type FormControl<T extends InputType> = T & {
60
+ valid: boolean;
61
+ dirty: boolean;
62
+ touched: boolean;
63
+ };
67
64
 
68
- type FileInput = InputBase & {
69
- type: FieldTypes.FILE;
70
- };
65
+ export type FileInput = InputBase & {
66
+ type: FieldTypes.FILE;
67
+ };
71
68
 
72
- type TextInput = InputBase & {
73
- type: FieldTypes.TEXT;
74
- };
69
+ export type TextInput = InputBase & {
70
+ type: FieldTypes.TEXT;
71
+ };
75
72
 
76
- type SwitchInput = InputBase & {
77
- type: FieldTypes.SWITCH;
78
- labeling: boolean | null;
79
- direction: 'horizontal' | 'vertical';
80
- falseValue: boolean | string | null;
81
- trueValue: boolean | string | null;
82
- };
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
+ };
83
80
 
84
- type NumberInput = InputBase & {
85
- type: FieldTypes.NUMBER;
86
- };
81
+ export type NumberInput = InputBase & {
82
+ type: FieldTypes.NUMBER;
83
+ };
87
84
 
88
- type ValidationRule = (value: string) => boolean | string;
85
+ export type ValidationRule = (value: string) => boolean | string;
89
86
 
90
- type SectionType = {
91
- title?: string;
92
- fields: InputType[];
93
- };
94
- }
87
+ export type SectionType = {
88
+ title?: string;
89
+ fields: InputType[];
90
+ };