hl-core 0.0.7-beta.15 → 0.0.7-beta.16

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.
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="h-[60px] bg-white rounded border-b-[1px] border-b-[#f3f6fc] flex items-center pl-4" :class="[$libStyles.textTitle]">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <v-file-input
3
+ class="file-input"
4
+ :disabled="disabled"
5
+ prepend-icon=""
6
+ append-inner-icon="mdi mdi-file-document"
7
+ @click:append-inner="$emit('input', $event)"
8
+ @input="$emit('input', $event)"
9
+ variant="solo"
10
+ show-size
11
+ multiple
12
+ accept=".pdf,.doc,.jpeg,.jpg,.jpg"
13
+ truncate-length="15"
14
+ clear-icon="mdi mdi-close"
15
+ :label="$t('labels.chooseDoc')"
16
+ ></v-file-input>
17
+ </template>
18
+
19
+ <script lang="ts">
20
+ export default defineComponent({
21
+ props: {
22
+ disabled: {
23
+ type: Boolean,
24
+ default: false,
25
+ },
26
+ },
27
+ });
28
+ </script>
29
+
30
+ <style>
31
+ .file-input input:focus {
32
+ border: none !important;
33
+ outline: none !important;
34
+ }
35
+ .file-input input {
36
+ padding-top: 30px;
37
+ }
38
+ .file-input .v-field {
39
+ box-shadow: none;
40
+ font-size: 14px;
41
+ }
42
+ .file-input .v-label.v-field-label {
43
+ top: 20px;
44
+ }
45
+ .file-input .v-field__append-inner {
46
+ padding-top: 18px;
47
+ padding-right: 6px;
48
+ }
49
+ .file-input .v-field__append-inner i {
50
+ color: #a0b3d8 !important;
51
+ margin-left: 10px;
52
+ margin-right: 4px;
53
+ }
54
+ .file-input {
55
+ border-bottom: 1px solid #f3f6fc;
56
+ }
57
+ .file-input.v-input--error {
58
+ border-color: #ff5449;
59
+ }
60
+ .file-input.v-input--error .v-input__details {
61
+ display: block;
62
+ }
63
+ .file-input .v-input__details {
64
+ display: none;
65
+ background-color: white;
66
+ padding-top: 0 !important;
67
+ }
68
+ .file-input .v-field--error {
69
+ border-color: #ff5449;
70
+ }
71
+ </style>
@@ -22,6 +22,7 @@
22
22
  :append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
23
23
  :bg-color="bgColor ? bgColor : ''"
24
24
  @keyup.enter.prevent="submitted"
25
+ @click:control="!readonly && $emit('append')"
25
26
  @click:clear="(readonly ? false : clearable) && $emit('update:modelValue', new Value())"
26
27
  @click:append="!readonly && $emit('append-out')"
27
28
  @click:prepend="!readonly && $emit('prepend-out')"
@@ -130,9 +130,6 @@ export default defineComponent({
130
130
  border: none !important;
131
131
  outline: none !important;
132
132
  }
133
- .rounded-input input {
134
- padding-top: 30px;
135
- }
136
133
  .rounded-input .v-label.v-field-label {
137
134
  top: 20px;
138
135
  }
@@ -7,7 +7,7 @@
7
7
  :class="[$dataStore[whichPanel].overlay ? 'lg:!hidden' : '', $dataStore[whichPanel].open ? '!w-full lg:!w-[420px]' : 'lg:!w-[0px]']"
8
8
  >
9
9
  <base-header :title="panelTitle" :has-back="true" back-icon="mdi-close" class="justify-center" @onBack="closePanel"></base-header>
10
- <div class="flex flex-col" id="panel-actions">
10
+ <div class="flex flex-col" :id="$dataStore.panelAction === null ? 'panel-actions' : ''">
11
11
  <slot></slot>
12
12
  </div>
13
13
  </v-navigation-drawer>
@@ -9,7 +9,12 @@
9
9
  <v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')"></v-text-field>
10
10
  <i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
11
11
  ></base-panel-item>
12
- <base-panel-item v-for="panelItem of dataStore.settings.items" :key="panelItem.title!" class="cursor-pointer" @click="panelItem.action ? panelItem.action() : null">
12
+ <base-panel-item
13
+ v-for="panelItem of dataStore.settings.items.filter(i => ('show' in i ? i.show : true))"
14
+ :key="panelItem.title!"
15
+ class="cursor-pointer"
16
+ @click="panelItem.action ? panelItem.action() : null"
17
+ >
13
18
  {{ panelItem.title }}
14
19
  <i v-if="panelItem.icon" class="mdi text-xl text-[#A0B3D8]" :class="[panelItem.icon]"></i>
15
20
  </base-panel-item>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <div class="border-[1px] rounded-lg h-[80px] mx-[10px] mt-[14px] flex place-content-center" :class="[$libStyles.blueBgLight, $libStyles.textTitle]">
3
+ <div class="flex justify-center items-center font-medium gap-2 opacity-40">
4
+ {{ text }}
5
+ <i class="text-2xl mdi" :class="[icon ? icon : 'mdi-database-off-outline']"></i>
6
+ </div>
7
+ </div>
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ export default defineComponent({
12
+ props: {
13
+ text: {
14
+ type: String,
15
+ default: 'Отсутствуют данные',
16
+ },
17
+ icon: {
18
+ type: String,
19
+ },
20
+ },
21
+ });
22
+ </script>
@@ -12,7 +12,7 @@
12
12
  @onMore="$emit('onMore')"
13
13
  ></base-header>
14
14
  <slot key="slot-content" name="content"></slot>
15
- <section key="main" class="px-2 pt-[14px] flex flex-col gap-[10px]">
15
+ <section key="main" :class="[$libStyles.flexColNav]">
16
16
  <slot name="start"></slot>
17
17
  <base-fade-transition>
18
18
  <div v-if="$dataStore.menuItems && $dataStore.menuItems.length" class="flex flex-col gap-[10px]">
@@ -31,27 +31,10 @@
31
31
  <slot name="end"></slot>
32
32
  <slot name="actions"></slot>
33
33
  <base-fade-transition>
34
- <div
35
- v-if="$dataStore.buttons && $dataStore.buttons.length"
36
- class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[30%] w-full pr-4"
37
- >
34
+ <div v-if="$dataStore.buttons && $dataStore.buttons.length" class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[30%] w-full pr-4">
38
35
  <div v-for="(item, index) of $dataStore.buttons" :key="index">
39
- <transition
40
- enter-active-class="animate__animated animate__fadeIn animate__faster"
41
- leave-active-class="animate__animated animate__fadeOut animate__faster"
42
- >
43
- <base-btn
44
- v-if="
45
- 'show' in item && typeof item.show === 'boolean'
46
- ? item.show
47
- : true
48
- "
49
- :text="item.title!"
50
- :btn="item.color"
51
- :disabled="!!item.disabled"
52
- @click="item.action"
53
- >
54
- </base-btn>
36
+ <transition enter-active-class="animate__animated animate__fadeIn animate__faster" leave-active-class="animate__animated animate__fadeOut animate__faster">
37
+ <base-btn v-if="'show' in item ? item.show : true" :text="item.title!" :btn="item.color" :disabled="item.disabled" @click="item.action"> </base-btn>
55
38
  </transition>
56
39
  </div></div
57
40
  ></base-fade-transition>
@@ -94,22 +77,21 @@ export default defineComponent({
94
77
  default: 'mdi-cog-outline',
95
78
  },
96
79
  },
97
- emits: ['update:modelValue', 'onLink', 'onBack', 'onMore', 'clicked'],
80
+ emits: ['onLink', 'onBack', 'onMore', 'clicked'],
98
81
  setup(props, { emit }) {
99
82
  const dataStore = useDataStore();
100
83
  const router = useRouter();
101
84
 
102
- const pickItem = (item: MenuItem) => {
85
+ const pickItem = async (item: MenuItem) => {
103
86
  if (item.title !== dataStore.menu.selectedItem.title) {
104
- emit('update:modelValue', item);
105
87
  if (typeof item.link === 'object') {
106
88
  if (item.link && 'name' in item.link) {
107
- router.push(item.link as RouteLocationNormalized);
89
+ await router.push(item.link as RouteLocationNormalized);
108
90
  } else {
109
91
  dataStore.showToaster('warning', 'Отсутствует ссылка для перехода');
110
92
  }
111
93
  } else {
112
- item.link ? emit('onLink', item) : emit('clicked', item);
94
+ emit('onLink', item);
113
95
  }
114
96
  }
115
97
  };
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <div class="flex justify-between px-4 items-center cursor-pointer h-[60px]" :class="[$libStyles.rounded, $libStyles.blueBgLight, $libStyles.blueBgLightHover]">
3
+ <span :class="[$libStyles.textSimple]">{{ text }}</span>
4
+ <i class="mdi text-xl" :class="[selected ? `mdi-radiobox-marked ${$libStyles.greenText}` : 'mdi-radiobox-blank text-[#636363]']"></i>
5
+ </div>
6
+ </template>
7
+
8
+ <script lang="ts">
9
+ export default defineComponent({
10
+ props: {
11
+ text: {
12
+ type: [String, Number],
13
+ },
14
+ selected: {
15
+ type: Boolean,
16
+ default: false,
17
+ },
18
+ },
19
+ });
20
+ </script>
@@ -13,9 +13,9 @@ class MenuItemConfig {
13
13
  initial?: any | null;
14
14
  icon?: string | null;
15
15
  action?: Function | void;
16
- disabled?: typeof computed;
16
+ disabled?: ComputedRef;
17
17
  color?: string;
18
- show?: typeof computed;
18
+ show?: ComputedRef;
19
19
 
20
20
  constructor(
21
21
  id: any = null,
@@ -27,9 +27,9 @@ class MenuItemConfig {
27
27
  initial?: any | null,
28
28
  icon?: string | null,
29
29
  action?: Function | void,
30
- disabled?: typeof computed,
30
+ disabled?: ComputedRef,
31
31
  color?: string,
32
- show?: typeof computed,
32
+ show?: ComputedRef,
33
33
  ) {
34
34
  this.id = id;
35
35
  this.title = title;
@@ -267,10 +267,10 @@ class Person {
267
267
  if (date) {
268
268
  const age = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
269
269
  if (new Date(date) < new Date(Date.now()) && age > 0) {
270
- return age;
270
+ return age.toString();
271
271
  }
272
272
  } else {
273
- return '';
273
+ return null;
274
274
  }
275
275
  }
276
276
  }
@@ -355,7 +355,28 @@ export class Contragent extends Person {
355
355
  }
356
356
  }
357
357
 
358
- class Form extends Person {
358
+ export class Member extends Person {
359
+ verifyType: any;
360
+ verifyDate: any;
361
+ postIndex: string | null;
362
+ isPdl: boolean;
363
+ migrationCard: string | null;
364
+ migrationCardIssueDate: string | null;
365
+ migrationCardExpireDate: string | null;
366
+ confirmDocType: string | null;
367
+ confirmDocNumber: string | null;
368
+ confirmDocIssueDate: string | null;
369
+ confirmDocExpireDate: string | null;
370
+ notaryLongName: string | null;
371
+ notaryLicenseNumber: string | null;
372
+ notaryLicenseDate: string | null;
373
+ notaryLicenseIssuer: string | null;
374
+ jurLongName: string | null;
375
+ fullNameRod: string | null;
376
+ confirmDocTypeKz: string | null;
377
+ confirmDocTypeRod: string | null;
378
+ isNotary: boolean;
379
+ insurancePay: Value;
359
380
  job: string | null;
360
381
  jobPosition: string | null;
361
382
  jobPlace: string | null;
@@ -398,6 +419,8 @@ class Form extends Person {
398
419
  gotFromInsis: boolean | null;
399
420
  gosPersonData: any;
400
421
  hasAgreement: boolean | null;
422
+ otpTokenId: string | null;
423
+ otpCode: string | null;
401
424
  constructor(
402
425
  id = 0,
403
426
  type = 1,
@@ -447,8 +470,43 @@ class Form extends Person {
447
470
  isDisability = new Value(),
448
471
  disabilityGroupId = new Value(),
449
472
  percentageOfPayoutAmount = null,
473
+ migrationCard = null,
474
+ migrationCardIssueDate = null,
475
+ migrationCardExpireDate = null,
476
+ confirmDocType = null,
477
+ confirmDocNumber = null,
478
+ confirmDocIssueDate = null,
479
+ confirmDocExpireDate = null,
480
+ notaryLongName = null,
481
+ notaryLicenseNumber = null,
482
+ notaryLicenseDate = null,
483
+ notaryLicenseIssuer = null,
484
+ jurLongName = null,
485
+ fullNameRod = null,
486
+ confirmDocTypeKz = null,
487
+ confirmDocTypeRod = null,
488
+ isNotary = false,
450
489
  ) {
451
490
  super(id, type, iin, longName, lastName, firstName, middleName, birthDate, gender, genderName, birthPlace, age);
491
+ this.postIndex = null;
492
+ this.isPdl = false;
493
+ this.migrationCard = migrationCard;
494
+ this.migrationCardIssueDate = migrationCardIssueDate;
495
+ this.migrationCardExpireDate = migrationCardExpireDate;
496
+ this.confirmDocType = confirmDocType;
497
+ this.confirmDocNumber = confirmDocNumber;
498
+ this.confirmDocIssueDate = confirmDocIssueDate;
499
+ this.confirmDocExpireDate = confirmDocExpireDate;
500
+ this.notaryLongName = notaryLongName;
501
+ this.notaryLicenseNumber = notaryLicenseNumber;
502
+ this.notaryLicenseDate = notaryLicenseDate;
503
+ this.notaryLicenseIssuer = notaryLicenseIssuer;
504
+ this.jurLongName = jurLongName;
505
+ this.fullNameRod = fullNameRod;
506
+ this.confirmDocTypeKz = confirmDocTypeKz;
507
+ this.confirmDocTypeRod = confirmDocTypeRod;
508
+ this.isNotary = isNotary;
509
+ this.insurancePay = new Value();
452
510
  this.job = job;
453
511
  this.jobPosition = jobPosition;
454
512
  this.jobPlace = jobPlace;
@@ -477,6 +535,8 @@ class Form extends Person {
477
535
  this.phoneNumber = phoneNumber;
478
536
  this.homePhone = homePhone;
479
537
  this.email = email;
538
+ this.otpTokenId = null;
539
+ this.otpCode = null;
480
540
  this.address = address;
481
541
  this.familyStatus = familyStatus;
482
542
  this.isTerror = isTerror;
@@ -534,6 +594,23 @@ class Form extends Person {
534
594
  this.gotFromInsis = true;
535
595
  this.gosPersonData = null;
536
596
  this.hasAgreement = null;
597
+ this.insurancePay = new Value();
598
+ this.migrationCard = null;
599
+ this.migrationCardIssueDate = null;
600
+ this.migrationCardExpireDate = null;
601
+ this.confirmDocType = null;
602
+ this.confirmDocNumber = null;
603
+ this.confirmDocIssueDate = null;
604
+ this.confirmDocExpireDate = null;
605
+ this.notaryLongName = null;
606
+ this.notaryLicenseNumber = null;
607
+ this.notaryLicenseDate = null;
608
+ this.notaryLicenseIssuer = null;
609
+ this.jurLongName = null;
610
+ this.fullNameRod = null;
611
+ this.confirmDocTypeKz = null;
612
+ this.confirmDocTypeRod = null;
613
+ this.isNotary = false;
537
614
  }
538
615
 
539
616
  getPattern(pattern: string) {
@@ -561,105 +638,33 @@ class Form extends Person {
561
638
  }
562
639
  }
563
640
 
564
- export class PolicyholderForm extends Form {
641
+ export class PolicyholderForm extends Member {
565
642
  constructor(...args: any) {
566
643
  super(...args);
567
644
  }
568
645
  }
569
646
 
570
- export class InsuredForm extends Form {
647
+ export class InsuredForm extends Member {
571
648
  constructor(...args: any) {
572
649
  super(...args);
573
650
  }
574
651
  }
575
652
 
576
- export class BeneficiaryForm extends Form {
577
- insurancePay: Value;
653
+ export class BeneficiaryForm extends Member {
578
654
  constructor(...args: any) {
579
655
  super(...args);
580
- this.insurancePay = new Value();
581
656
  }
582
657
  }
583
658
 
584
- export class BeneficialOwnerForm extends Form {
659
+ export class BeneficialOwnerForm extends Member {
585
660
  constructor(...args: any) {
586
661
  super(...args);
587
662
  }
588
663
  }
589
664
 
590
- export class PolicyholdersRepresentativeForm extends Form {
591
- migrationCard: string | null;
592
- migrationCardIssueDate: string | null;
593
- migrationCardExpireDate: string | null;
594
- confirmDocType: string | null;
595
- confirmDocNumber: string | null;
596
- confirmDocIssueDate: string | null;
597
- confirmDocExpireDate: string | null;
598
- notaryLongName: string | null;
599
- notaryLicenseNumber: string | null;
600
- notaryLicenseDate: string | null;
601
- notaryLicenseIssuer: string | null;
602
- jurLongName: string | null;
603
- fullNameRod: string | null;
604
- confirmDocTypeKz: string | null;
605
- confirmDocTypeRod: string | null;
606
- isNotary: boolean | null;
607
- constructor(
608
- migrationCard = null,
609
- migrationCardIssueDate = null,
610
- migrationCardExpireDate = null,
611
- confirmDocType = null,
612
- confirmDocNumber = null,
613
- confirmDocIssueDate = null,
614
- confirmDocExpireDate = null,
615
- notaryLongName = null,
616
- notaryLicenseNumber = null,
617
- notaryLicenseDate = null,
618
- notaryLicenseIssuer = null,
619
- jurLongName = null,
620
- fullNameRod = null,
621
- confirmDocTypeKz = null,
622
- confirmDocTypeRod = null,
623
- isNotary = false,
624
- ...args: any
625
- ) {
665
+ export class PolicyholdersRepresentativeForm extends Member {
666
+ constructor(...args: any) {
626
667
  super(...args);
627
- this.migrationCard = migrationCard;
628
- this.migrationCardIssueDate = migrationCardIssueDate;
629
- this.migrationCardExpireDate = migrationCardExpireDate;
630
- this.confirmDocType = confirmDocType;
631
- this.confirmDocNumber = confirmDocNumber;
632
- this.confirmDocIssueDate = confirmDocIssueDate;
633
- this.confirmDocExpireDate = confirmDocExpireDate;
634
- this.notaryLongName = notaryLongName;
635
- this.notaryLicenseNumber = notaryLicenseNumber;
636
- this.notaryLicenseDate = notaryLicenseDate;
637
- this.notaryLicenseIssuer = notaryLicenseIssuer;
638
- this.jurLongName = jurLongName;
639
- this.fullNameRod = fullNameRod;
640
- this.confirmDocTypeKz = confirmDocTypeKz;
641
- this.confirmDocTypeRod = confirmDocTypeRod;
642
- this.isNotary = isNotary;
643
- }
644
-
645
- resetMember(clearIinAndPhone = true) {
646
- super.resetForm(clearIinAndPhone);
647
- this.migrationCard = null;
648
- this.migrationCardIssueDate = null;
649
- this.migrationCardExpireDate = null;
650
- this.confirmDocType = null;
651
- this.confirmDocNumber = null;
652
- this.confirmDocIssueDate = null;
653
- this.confirmDocExpireDate = null;
654
- this.notaryLongName = null;
655
- this.notaryLicenseNumber = null;
656
- this.notaryLicenseDate = null;
657
- this.notaryLicenseIssuer = null;
658
- this.jurLongName = null;
659
- this.fullNameRod = null;
660
- this.confirmDocTypeKz = null;
661
- this.confirmDocTypeRod = null;
662
- this.isNotary = false;
663
668
  }
664
669
  }
665
670
 
@@ -754,8 +759,16 @@ export class ProductConditions {
754
759
  }
755
760
 
756
761
  export class DataStoreClass {
762
+ // IMP Контроллер фич
757
763
  controls: {
764
+ // Проверка на роль при авторизации
758
765
  onAuth: boolean;
766
+ // Подтягивание с ГБДФЛ
767
+ hasGBDFL: boolean;
768
+ // Подтягивание с ИНСИС
769
+ hasInsis: boolean;
770
+ // Калькулятор без ввода данных
771
+ hasCalculator: boolean;
759
772
  };
760
773
  hasLayoutMargins: boolean;
761
774
  readonly product: string | null;
@@ -819,6 +832,7 @@ export class DataStoreClass {
819
832
  processIndexRate: any[];
820
833
  processPaymentPeriod: any[];
821
834
  additionalInsuranceTerms: any[];
835
+ additionalInsuranceTermsWithout: any[];
822
836
  taskList: any[];
823
837
  processHistory: any[];
824
838
  contragentList: any[];
@@ -851,11 +865,15 @@ export class DataStoreClass {
851
865
  constructor() {
852
866
  this.controls = {
853
867
  onAuth: false,
868
+ hasGBDFL: true,
869
+ hasInsis: true,
870
+ hasCalculator: false,
854
871
  };
855
872
  this.hasLayoutMargins = true;
856
873
  this.processIndexRate = [];
857
874
  this.processPaymentPeriod = [];
858
875
  this.additionalInsuranceTerms = [];
876
+ this.additionalInsuranceTermsWithout = [];
859
877
  this.definedAnswersId = {
860
878
  surveyByHealthBase: {},
861
879
  surveyByCriticalBase: {},
@@ -1040,7 +1058,6 @@ export class FormStoreClass {
1040
1058
  questionnaireByCritical: any[];
1041
1059
  canBeClaimed: boolean | null;
1042
1060
  applicationTaskId: string | null;
1043
- otpTokenId: string | null;
1044
1061
  constructor(procuctConditionsTitle?: string) {
1045
1062
  this.birthInfos = [];
1046
1063
  this.SaleChanellPolicy = new Value();
@@ -1093,6 +1110,5 @@ export class FormStoreClass {
1093
1110
  this.questionnaireByCritical = [];
1094
1111
  this.canBeClaimed = null;
1095
1112
  this.applicationTaskId = null;
1096
- this.otpTokenId = null;
1097
1113
  }
1098
1114
  }
@@ -8,10 +8,11 @@ export const useDisplayInfo = useDisplay;
8
8
  export const capitalize = (word: string): string => (word ? word.charAt(0).toUpperCase() + word.slice(1).toLowerCase() : word);
9
9
 
10
10
  const xmlParser = new XMLParser({
11
- // numberParseOptions: {
12
- // leadingZeros: true,
13
- // skipLike: /[0-9]+/,
14
- // },
11
+ numberParseOptions: {
12
+ hex: false,
13
+ leadingZeros: true,
14
+ skipLike: /[0-9]+/,
15
+ },
15
16
  });
16
17
 
17
18
  export const formatDate = (date: string) => {
@@ -137,11 +138,11 @@ export const ESBDMessage = (ESBDObject: any, initialPoint: any) => {
137
138
  return result;
138
139
  };
139
140
 
140
- export const ErrorHandler = (err: unknown) => {
141
+ export const ErrorHandler = (err: unknown, errorText?: string) => {
141
142
  console.log(err);
142
143
  if (err instanceof AxiosError) {
143
144
  if ('response' in err && err.response && err.response.data) {
144
- useDataStore().showToaster('error', err.response.data);
145
+ useDataStore().showToaster('error', errorText ? errorText : err.response.data, 10000);
145
146
  }
146
147
  }
147
148
  return false;
@@ -4,7 +4,6 @@
4
4
  <section class="flex h-full" :class="$libStyles.blueBgLight">
5
5
  <base-menu-nav
6
6
  v-if="$dataStore.showNav"
7
- v-model="$dataStore.menu.selectedItem"
8
7
  :selected="$dataStore.menu.selectedItem"
9
8
  :title="$dataStore.menu.title ?? 'Страховые продукты'"
10
9
  :has-back="$dataStore.menu.hasBack ?? false"
@@ -12,11 +11,12 @@
12
11
  :has-more="'hasMore' in $route.meta && $route.meta.hasMore ? !!$route.meta.hasMore : false"
13
12
  :hide-more-on-lg="true"
14
13
  :class="{
14
+ // @ts-ignore
15
15
  '!hidden': !$display().lgAndUp.value && !!$dataStore.menu.selectedItem.title,
16
16
  }"
17
- @onBack="$dataStore.menu.onBack"
17
+ @onBack="onBack"
18
18
  @onMore="openSettings"
19
- @onLink="$dataStore.menu.onLink"
19
+ @onLink="onLink"
20
20
  >
21
21
  <template #end>
22
22
  <base-loader v-if="$dataStore.menu.loading" class="self-center m-5 opacity-70"></base-loader>
@@ -29,11 +29,21 @@
29
29
  </template>
30
30
 
31
31
  <script setup lang="ts">
32
+ import { MenuItem } from '@/composables/classes';
32
33
  const dataStore = useDataStore();
33
34
 
34
35
  const openSettings = async () => {
35
36
  dataStore.settings.open = true;
36
37
  };
38
+
39
+ const onLink = async (item: MenuItem) => {
40
+ if (dataStore.menu.onLink) await dataStore.menu.onLink(item);
41
+ dataStore.menu.selectedItem = item;
42
+ };
43
+
44
+ const onBack = async (item: MenuItem) => {
45
+ if (dataStore.menu.onBack) await dataStore.menu.onBack(item);
46
+ };
37
47
  </script>
38
48
  <style>
39
49
  .mainpage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.7-beta.15",
3
+ "version": "0.0.7-beta.16",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -23,14 +23,15 @@
23
23
  "preview": "nuxt preview"
24
24
  },
25
25
  "devDependencies": {
26
- "@nuxt/devtools": "^0.3.2",
27
- "nuxt": "^3.3.3",
26
+ "@nuxt/devtools": "^0.4.1",
27
+ "@nuxt/types": "^2.16.3",
28
+ "nuxt": "3.4.1",
28
29
  "prettier": "^2.8.4",
29
30
  "typescript": "^4.9.5"
30
31
  },
31
32
  "dependencies": {
32
- "@mdi/font": "^7.1.96",
33
- "@nuxtjs/tailwindcss": "^6.6.5",
33
+ "@mdi/font": "^7.2.96",
34
+ "@nuxtjs/tailwindcss": "^6.6.6",
34
35
  "@pinia/nuxt": "^0.4.8",
35
36
  "animate.css": "^4.1.1",
36
37
  "axios": "^1.3.5",
@@ -40,6 +41,7 @@
40
41
  "pinia": "^2.0.34",
41
42
  "v-idle-3": "^0.3.14",
42
43
  "vue-toastification": "^2.0.0-rc.5",
43
- "vuetify": "^3.1.13"
44
+ "vue-uuid": "^3.0.0",
45
+ "vuetify": "^3.1.15"
44
46
  }
45
47
  }