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
@@ -195,7 +195,7 @@
195
195
  <base-btn :loading="loading" :text="$dataStore.t('payment.copyUrl')" @click="$dataStore.copyToClipboard(formStore.epayLink)" />
196
196
  <base-btn :loading="loading" :text="$dataStore.t('payment.recipientNumber')" @click="openEpayPanel" />
197
197
  <base-btn :loading="loading" :text="$dataStore.t('sign.convertQr')" @click="convertQr(formStore.epayLink)" />
198
- <base-btn :loading="loading" :btn="$styles.greenBtn" :text="$dataStore.t('payment.halykLink')" @click="convertQr(formStore.epayLink, 'halyk_pay_link_template')" />
198
+ <base-btn v-if="!useEnv().isProduction" :loading="loading" :btn="$styles.greenBtn" :text="$dataStore.t('payment.halykLink')" @click="convertQr(formStore.epayLink, 'halyk_pay_link_template')" />
199
199
  </div>
200
200
  </base-form-section>
201
201
  <div v-if="isSendNumberOpen" :class="[$styles.flexColNav]">
@@ -254,6 +254,7 @@
254
254
  import { DocumentItem, Value } from '../../composables/classes';
255
255
  import { HubConnectionBuilder } from '@microsoft/signalr';
256
256
  import { uuid } from 'vue-uuid';
257
+ import type { Api, SignUrlType } from '../../types';
257
258
 
258
259
  export default defineComponent({
259
260
  emits: ['task'],
@@ -6,6 +6,8 @@
6
6
  </template>
7
7
 
8
8
  <script setup lang="ts">
9
+ import type { Utils } from '../../types';
10
+
9
11
  defineProps({
10
12
  type: {
11
13
  type: String as PropType<Utils.VuetifyAnimations>,
@@ -5,6 +5,8 @@
5
5
  </template>
6
6
 
7
7
  <script lang="ts">
8
+ import type { ChipComponent } from '../../types';
9
+
8
10
  export default defineComponent({
9
11
  props: {
10
12
  chip: {
@@ -14,13 +14,12 @@
14
14
  <script lang="ts">
15
15
  import VueJsonPretty from 'vue-json-pretty';
16
16
  import 'vue-json-pretty/lib/styles.css';
17
- import { type JSONDataType } from 'vue-json-pretty/types/utils';
18
17
 
19
18
  export default defineComponent({
20
19
  components: { VueJsonPretty },
21
20
  props: {
22
21
  data: {
23
- type: Object as PropType<JSONDataType>,
22
+ type: Object as PropType<any>,
24
23
  required: false,
25
24
  },
26
25
  },
@@ -1,6 +1,7 @@
1
1
  import { Statuses, StoreMembers, MemberAppCodes } from '../types/enum';
2
2
  import { formatDate } from '.';
3
3
  import type { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-router';
4
+ import type * as Types from '../types';
4
5
 
5
6
  type LinkType = Partial<RouteLocationNormalized> | Partial<RouteLocationNormalizedLoaded> | string | null | boolean;
6
7
 
@@ -17,7 +18,7 @@ class MenuItemConfig {
17
18
  disabled?: ComputedRef;
18
19
  color?: string;
19
20
  show?: ComputedRef;
20
- chip?: ChipComponent;
21
+ chip?: Types.ChipComponent;
21
22
 
22
23
  constructor(
23
24
  id: any = null,
@@ -32,7 +33,7 @@ class MenuItemConfig {
32
33
  disabled?: ComputedRef,
33
34
  color?: string,
34
35
  show?: ComputedRef,
35
- chip?: ChipComponent,
36
+ chip?: Types.ChipComponent,
36
37
  ) {
37
38
  this.id = id;
38
39
  this.title = title;
@@ -87,6 +88,7 @@ export class IDocument {
87
88
  iin?: string;
88
89
  fileTypeId?: string;
89
90
  fileTypeName?: string;
91
+ fileTypeNameRu?: string;
90
92
  fileId?: string;
91
93
  page?: number;
92
94
  fileName?: string;
@@ -102,6 +104,7 @@ export class IDocument {
102
104
  iin?: string,
103
105
  fileTypeId?: string,
104
106
  fileTypeName?: string,
107
+ fileTypeNameRu?: string,
105
108
  fileId?: string,
106
109
  page?: number,
107
110
  fileName?: string,
@@ -116,6 +119,7 @@ export class IDocument {
116
119
  this.iin = iin;
117
120
  this.fileTypeId = fileTypeId;
118
121
  this.fileTypeName = fileTypeName;
122
+ this.fileTypeNameRu = fileTypeNameRu;
119
123
  this.fileId = fileId;
120
124
  this.page = page;
121
125
  this.fileName = fileName;
@@ -129,9 +133,24 @@ export class IDocument {
129
133
 
130
134
  export class DocumentItem extends IDocument {
131
135
  constructor(
132
- { id, processInstanceId, iin, fileTypeId, fileTypeName, fileId, page, fileName, fileTypeCode, sharedId, signed, signId, certificateDate }: IDocument = new IDocument(),
136
+ {
137
+ id,
138
+ processInstanceId,
139
+ iin,
140
+ fileTypeId,
141
+ fileTypeName,
142
+ fileTypeNameRu,
143
+ fileId,
144
+ page,
145
+ fileName,
146
+ fileTypeCode,
147
+ sharedId,
148
+ signed,
149
+ signId,
150
+ certificateDate,
151
+ }: IDocument = new IDocument(),
133
152
  ) {
134
- super(id, processInstanceId, iin, fileTypeId, fileTypeName, fileId, page, fileName, fileTypeCode, sharedId, signed, signId, certificateDate);
153
+ super(id, processInstanceId, iin, fileTypeId, fileTypeName, fileTypeNameRu, fileId, page, fileName, fileTypeCode, sharedId, signed, signId, certificateDate);
135
154
  }
136
155
  }
137
156
 
@@ -383,11 +402,11 @@ export class Contragent extends Person {
383
402
 
384
403
  export class Member extends Person {
385
404
  response?: {
386
- contragent?: ContragentType;
387
- questionnaires?: ContragentQuestionaries[];
388
- contacts?: ContragentContacts[];
389
- documents?: ContragentDocuments[];
390
- addresses?: ContragentAddress[];
405
+ contragent?: Types.ContragentType;
406
+ questionnaires?: Types.ContragentQuestionaries[];
407
+ contacts?: Types.ContragentContacts[];
408
+ documents?: Types.ContragentDocuments[];
409
+ addresses?: Types.ContragentAddress[];
391
410
  };
392
411
  verifyType: any;
393
412
  verifyDate: any;
@@ -451,12 +470,12 @@ export class Member extends Person {
451
470
  _phonePattern: RegExp;
452
471
  _emailPattern: RegExp;
453
472
  gotFromInsis: boolean | null;
454
- gosPersonData: Api.GBD.Person | null;
473
+ gosPersonData: Types.Api.GBD.Person | null;
455
474
  parsedDocument: any;
456
475
  hasAgreement: boolean | null;
457
476
  otpTokenId: string | null;
458
477
  otpCode: string | null;
459
- documentsList: ContragentDocuments[];
478
+ documentsList: Types.ContragentDocuments[];
460
479
  isInsuredUnderage?: boolean = false;
461
480
  bankInfo: BankInfoClass;
462
481
  transferContractCompany: Value;
@@ -928,7 +947,7 @@ export class MemberSettings {
928
947
  }
929
948
 
930
949
  export class DataStoreClass {
931
- projectConfig: Utils.ProjectConfig | null;
950
+ projectConfig: Types.Utils.ProjectConfig | null;
932
951
  // IMP Контроллер фич
933
952
  controls: {
934
953
  // Cтавит значения по дефолту полям
@@ -973,7 +992,7 @@ export class DataStoreClass {
973
992
  };
974
993
  iframeLoading: boolean;
975
994
  hasLayoutMargins: boolean;
976
- readonly product: Projects | null;
995
+ readonly product: Types.Projects | null;
977
996
  readonly parentProduct: 'efo' | 'auletti';
978
997
  showNav: boolean;
979
998
  showDisabledMessage: boolean;
@@ -1016,7 +1035,7 @@ export class DataStoreClass {
1016
1035
  historyTotalItems: number;
1017
1036
  isColumnAsc = { ...InitialColumns() };
1018
1037
  idleKey: number;
1019
- processList: Item[] | null;
1038
+ processList: Types.Item[] | null;
1020
1039
  countries: Value[];
1021
1040
  citizenshipCountries: Value[];
1022
1041
  taxCountries: Value[];
@@ -1053,18 +1072,18 @@ export class DataStoreClass {
1053
1072
  processPaymentPeriod: Value[];
1054
1073
  dicAnnuityTypeList: Value[];
1055
1074
  processAnnuityPaymentPeriod: Value[];
1056
- taskList: TaskListItem[];
1057
- processHistory: TaskHistory[];
1058
- contragentList: ContragentType[];
1075
+ taskList: Types.TaskListItem[];
1076
+ processHistory: Types.TaskHistory[];
1077
+ contragentList: Types.ContragentType[];
1059
1078
  contragentFormKey: string;
1060
1079
  processCode: number | null;
1061
1080
  groupCode: string;
1062
- userGroups: Item[];
1081
+ userGroups: Types.Item[];
1063
1082
  onMainPage: boolean;
1064
1083
  SaleChanellPolicy: Value[];
1065
1084
  RegionPolicy: Value[];
1066
1085
  ManagerPolicy: Value[];
1067
- AgentData: AgentData[];
1086
+ AgentData: Types.AgentData[];
1068
1087
  riskGroup: Value[];
1069
1088
  DicCoverTypePeriod: Value[];
1070
1089
  currencies: {
@@ -1148,7 +1167,7 @@ export class DataStoreClass {
1148
1167
  this.ManagerPolicy = [];
1149
1168
  this.AgentData = [];
1150
1169
  this.DicCoverTypePeriod = [];
1151
- this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as Projects) : null;
1170
+ this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as Types.Projects) : null;
1152
1171
  this.parentProduct = import.meta.env.VITE_PARENT_PRODUCT ? import.meta.env.VITE_PARENT_PRODUCT : 'efo';
1153
1172
  this.showNav = true;
1154
1173
  this.showDisabledMessage = false;
@@ -1300,10 +1319,10 @@ export class FormStoreClass {
1300
1319
  isUploadedSignedContract: boolean;
1301
1320
  signedContractFormData: any;
1302
1321
  lfb: {
1303
- clients: ClientV2[];
1322
+ clients: Types.ClientV2[];
1304
1323
  policyholder: PolicyholderClass;
1305
1324
  hasAccidentIncidents: boolean;
1306
- accidentIncidents: AccidentIncidents[];
1325
+ accidentIncidents: Types.AccidentIncidents[];
1307
1326
  policyholderActivities: PolicyholderActivity[];
1308
1327
  beneficialOwners: BeneficialOwner[];
1309
1328
  beneficialOwnersIndex: number;
@@ -1312,11 +1331,11 @@ export class FormStoreClass {
1312
1331
  insuredFile: any;
1313
1332
  isPanelInside: boolean;
1314
1333
  };
1315
- additionalInsuranceTerms: AddCover[];
1316
- additionalInsuranceTermsWithout: AddCover[];
1317
- signUrls: SignUrlType[];
1334
+ additionalInsuranceTerms: Types.AddCover[];
1335
+ additionalInsuranceTermsWithout: Types.AddCover[];
1336
+ signUrls: Types.SignUrlType[];
1318
1337
  epayLink: string | null;
1319
- invoiceData: EpayResponse | null;
1338
+ invoiceData: Types.EpayResponse | null;
1320
1339
  affilationResolution: {
1321
1340
  id: string | number | null;
1322
1341
  processInstanceId: string | number | null;
@@ -1329,19 +1348,19 @@ export class FormStoreClass {
1329
1348
  date: string | null;
1330
1349
  };
1331
1350
  signedDocumentList: IDocument[];
1332
- surveyByHealthBase: AnketaFirst | null;
1333
- surveyByHealthBasePolicyholder: AnketaFirst | null;
1334
- surveyByCriticalBase: AnketaFirst | null;
1335
- surveyByCriticalBasePolicyholder: AnketaFirst | null;
1351
+ surveyByHealthBase: Types.AnketaFirst | null;
1352
+ surveyByHealthBasePolicyholder: Types.AnketaFirst | null;
1353
+ surveyByCriticalBase: Types.AnketaFirst | null;
1354
+ surveyByCriticalBasePolicyholder: Types.AnketaFirst | null;
1336
1355
  definedAnswersId: {
1337
1356
  surveyByHealthBase: any;
1338
1357
  surveyByCriticalBase: any;
1339
1358
  surveyByHealthBasePolicyholder: any;
1340
1359
  surveyByCriticalBasePolicyholder: any;
1341
1360
  };
1342
- birthInfos: Api.GKB.BirthInfo[];
1361
+ birthInfos: Types.Api.GKB.BirthInfo[];
1343
1362
  SaleChanellPolicy: Value;
1344
- AgentData: AgentData;
1363
+ AgentData: Types.AgentData;
1345
1364
  RegionPolicy: Value;
1346
1365
  ManagerPolicy: Value;
1347
1366
  isDisabled: {
@@ -1380,9 +1399,9 @@ export class FormStoreClass {
1380
1399
  spokesmanApp?: any;
1381
1400
  isTask?: boolean | null;
1382
1401
  createDate?: string | null;
1383
- policyAppDto?: PolicyAppDto;
1384
- insisWorkDataApp?: InsisWorkDataApp;
1385
- addCoverDto?: AddCover[];
1402
+ policyAppDto?: Types.PolicyAppDto;
1403
+ insisWorkDataApp?: Types.InsisWorkDataApp;
1404
+ addCoverDto?: Types.AddCover[];
1386
1405
  };
1387
1406
  policyholderForm: Member;
1388
1407
  policyholderFormKey: StoreMembers.policyholderForm;
@@ -1649,7 +1668,7 @@ export class GroupMember extends PhysGroupClass {
1649
1668
  activityTypes: { activityTypeName: string; empoloyeeCount: number }[];
1650
1669
  beneficalOwnerQuest: { order: number; text: string; answer: boolean | null }[];
1651
1670
  authoritedPerson: PhysGroupClass;
1652
- insuredPolicyData: InsuredPolicyType;
1671
+ insuredPolicyData: Types.InsuredPolicyType;
1653
1672
 
1654
1673
  constructor() {
1655
1674
  super();
@@ -1,6 +1,8 @@
1
1
  import { i18n } from '../configs/i18n';
2
- import { FieldTypes } from '../types/form';
2
+ import { FieldTypes, type InputBase, type InputType } from '../types/form';
3
3
  import { type ComputedRefWithControl } from '@vueuse/core';
4
+ import type { Utils } from '../types';
5
+ import type * as Types from '../types/form';
4
6
 
5
7
  const t = i18n.t;
6
8
 
@@ -37,14 +39,14 @@ export const FieldBase = ({
37
39
  fetchFrom,
38
40
  }) as InputBase;
39
41
 
40
- export const TextInput = ({ ...rest }: Partial<TextInput>): TextInput => {
42
+ export const TextInput = ({ ...rest }: Partial<Types.TextInput>): Types.TextInput => {
41
43
  return {
42
44
  ...FieldBase(rest),
43
45
  type: FieldTypes.TEXT,
44
46
  };
45
47
  };
46
48
 
47
- export const SwitchInput = ({ ...rest }: Partial<SwitchInput>): SwitchInput => {
49
+ export const SwitchInput = ({ ...rest }: Partial<Types.SwitchInput>): Types.SwitchInput => {
48
50
  return {
49
51
  ...FieldBase(rest),
50
52
  type: FieldTypes.SWITCH,
@@ -55,7 +57,7 @@ export const SwitchInput = ({ ...rest }: Partial<SwitchInput>): SwitchInput => {
55
57
  };
56
58
  };
57
59
 
58
- export const NumberInput = ({ ...rest }: Partial<NumberInput>): NumberInput => {
60
+ export const NumberInput = ({ ...rest }: Partial<Types.NumberInput>): Types.NumberInput => {
59
61
  return {
60
62
  ...FieldBase(rest),
61
63
  type: FieldTypes.NUMBER,
@@ -4,6 +4,7 @@ import { XMLParser } from 'fast-xml-parser';
4
4
  import { AxiosError } from 'axios';
5
5
  import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
6
6
  import { PolicyholderClass } from '../composables/classes';
7
+ import type { EnvModes, NestedKeyOf, ResponseStructure } from '../types';
7
8
 
8
9
  export const useEnv = () => {
9
10
  return {
@@ -473,7 +474,7 @@ export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
473
474
  test: 'http://aml-dev.halyklife.nb/api',
474
475
  },
475
476
  };
476
- return valuesPerEnv[which][import.meta.env.VITE_MODE];
477
+ return valuesPerEnv[which][import.meta.env.VITE_MODE as EnvModes];
477
478
  };
478
479
 
479
480
  export const getMainPageRoute = () => {
package/nuxt.config.ts CHANGED
@@ -32,13 +32,8 @@ export default defineNuxtConfig({
32
32
  ],
33
33
  },
34
34
 
35
- future: {
36
- typescriptBundlerResolution: false,
37
- },
38
-
39
- vue: {
40
- propsDestructure: true,
41
- },
35
+ vue: { propsDestructure: true },
36
+ future: { typescriptBundlerResolution: false },
42
37
 
43
38
  components: [{ path: './components', prefix: 'Base', pathPrefix: false }],
44
39
  });
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.1",
3
+ "version": "0.0.10-beta.10",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
7
+ "types": "./types/index.ts",
7
8
  "files": [
8
9
  "api/",
9
10
  "store/",
@@ -17,6 +18,7 @@
17
18
  "types/",
18
19
  "nuxt.config.ts",
19
20
  "tailwind.config.js",
21
+ "tsconfig.json",
20
22
  ".prettierrc"
21
23
  ],
22
24
  "scripts": {