adata-ui 2.1.31 → 2.1.32

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.
@@ -2,6 +2,7 @@
2
2
  import { PAGES } from '#adata-ui/shared/constans/pages'
3
3
  import { usePkServicesLinks } from '#adata-ui/composables/useHeaderNavigationLinks'
4
4
  import { useUrls } from '#adata-ui/composables/useUrls'
5
+ import { NuxtLinkLocale } from '#components'
5
6
 
6
7
  const services = usePkServicesLinks()
7
8
  const route = useRoute()
@@ -9,6 +10,8 @@ const localePath = useLocalePath()
9
10
  const { landing } = useUrls()
10
11
  const { locale } = useI18n()
11
12
 
13
+ const pageUrl = useRequestURL()
14
+
12
15
  const blockStyles = [
13
16
  'first-border-gradient',
14
17
  'second-border-gradient',
@@ -31,14 +34,20 @@ const linkByIndex = [
31
34
  PAGES.pk.sanctions,
32
35
  buildLocalizedUrl(locale, landing, '/all-services'),
33
36
  ]
37
+
38
+ const normalize = (path: string) => {
39
+ const cleaned = path.replace(/\/+$/, '')
40
+ return cleaned === '' ? '/' : cleaned
41
+ }
34
42
  </script>
35
43
 
36
44
  <template>
37
45
  <div class="grid grid-cols-3">
38
- <nuxt-link-locale
46
+ <component
39
47
  v-for="(service, index) in services"
40
48
  :key="index"
41
- :to="service.to"
49
+ :is="normalize(service.short) === normalize(route.path) && pageUrl.hostname.startsWith('pk') ? 'div' : NuxtLinkLocale"
50
+ :to="normalize(service.short) === normalize(route.path) ? '' : service.to"
42
51
  :class="['flex flex-col items-center gap-2 p-2', blockStyles[index]]"
43
52
  >
44
53
  <div
@@ -56,7 +65,7 @@ const linkByIndex = [
56
65
  <p class="text-xs text-center">
57
66
  {{ service.title }}
58
67
  </p>
59
- </nuxt-link-locale>
68
+ </component>
60
69
  </div>
61
70
  </template>
62
71
 
@@ -407,47 +407,56 @@ export const usePkServicesLinks = () => {
407
407
  {
408
408
  title: t('header.products.counterparties.items.counterparty.title'),
409
409
  icon: IconSearch,
410
- to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.main)
410
+ to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.main),
411
+ short: PAGES.pk.main,
411
412
  },
412
413
  {
413
414
  title: t('header.products.counterparties.items.wholesale.title'),
414
415
  icon: AIconUsersThree,
415
- to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.employees)
416
+ to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.employees),
417
+ short: PAGES.pk.employees,
416
418
  },
417
419
  {
418
420
  title: t('header.products.counterparties.items.networks.title'),
419
421
  icon: IconLink,
420
- to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.connections)
422
+ to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.connections),
423
+ short: PAGES.pk.connections,
421
424
  },
422
425
  {
423
426
  title: t('header.products.counterparties.items.offshore.title'),
424
427
  icon: IconDollar,
425
- to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.offshore)
428
+ to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.offshore),
429
+ short: PAGES.pk.offshore,
426
430
  },
427
431
  {
428
432
  title: t('header.products.counterparties.items.foreign.title'),
429
433
  icon: IconGlobe,
430
- to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.foreign)
434
+ to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.foreign),
435
+ short: PAGES.pk.foreign,
431
436
  },
432
437
  {
433
438
  title: t('header.products.counterparties.items.unloading.title'),
434
439
  icon: AIconArrowSquareDown,
435
- to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.unload)
440
+ to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.unload),
441
+ short: PAGES.pk.unload,
436
442
  },
437
443
  {
438
444
  title: t('header.products.counterparties.items.compare.title'),
439
445
  icon: IconScales,
440
- to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.compare)
446
+ to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.compare),
447
+ short: PAGES.pk.compare,
441
448
  },
442
449
  {
443
450
  title: t('header.products.counterparties.items.sanction.title'),
444
451
  icon: IconBlock,
445
- to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.sanctions)
452
+ to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.sanctions),
453
+ short: PAGES.pk.sanctions,
446
454
  },
447
455
  {
448
456
  title: t('all_services'),
449
457
  icon: AIconExpandWindow,
450
- to: buildLocalizedUrl(locale.value, urls.landing, PAGES.allServices)
458
+ to: buildLocalizedUrl(locale.value, urls.landing, PAGES.allServices),
459
+ short: PAGES.allServices,
451
460
  },
452
461
  ]
453
462
  }
package/lang/en.ts CHANGED
@@ -261,7 +261,7 @@ const EnLocale: RuLocale = {
261
261
  st: '',
262
262
  },
263
263
  sb: {
264
- t: 'Security Service check',
264
+ t: 'Security check',
265
265
  st: '',
266
266
  },
267
267
  },
package/lang/kk.ts CHANGED
@@ -241,7 +241,7 @@ const KkLocale: RuLocale = {
241
241
  st: 'Комплаенс тәуекелдерін автоматты тексеру: бизнесіңізді нақты уақыт режимінде қорғау.',
242
242
  },
243
243
  assistant: {
244
- t: 'Жасанды интеллект көмекшісі',
244
+ t: 'AI ассистент',
245
245
  st: '',
246
246
  },
247
247
  assignments: {
@@ -249,7 +249,7 @@ const KkLocale: RuLocale = {
249
249
  st: '',
250
250
  },
251
251
  hotline: {
252
- t: 'Ыстық желі',
252
+ t: 'Жедел желі',
253
253
  st: '',
254
254
  },
255
255
  sanctions: {
@@ -257,11 +257,11 @@ const KkLocale: RuLocale = {
257
257
  st: '',
258
258
  },
259
259
  suppliers: {
260
- t: 'Құжат',
260
+ t: 'Досье',
261
261
  st: '',
262
262
  },
263
263
  sb: {
264
- t: 'Қауіпсіздік қызметін тексеру',
264
+ t: 'Қауіпсіздік қызметінің тексеруі',
265
265
  st: '',
266
266
  },
267
267
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adata-ui",
3
3
  "type": "module",
4
- "version": "2.1.31",
4
+ "version": "2.1.32",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",