adata-ui 3.1.19 → 3.1.20
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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/forms/input/standard/InputStandard.vue +2 -2
- package/dist/runtime/components/forms/input/textarea/ATextarea.vue +1 -1
- package/dist/runtime/components/header/CardGallery.vue +5 -4
- package/dist/runtime/icons/map-pin-rect.vue +1 -1
- package/dist/runtime/utils/localizedNavigation.d.ts +12 -0
- package/dist/runtime/utils/localizedNavigation.js +22 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -34,7 +34,7 @@ const uiConfig = {
|
|
|
34
34
|
smEx: "h-8 pl-4 pr-10 py-1.5 sm",
|
|
35
35
|
mdEx: "h-10 pl-4 pr-10 pb-1.5 pt-[18px] md"
|
|
36
36
|
},
|
|
37
|
-
"color": "bg-deepblue-50 dark:bg-gray-200
|
|
37
|
+
"color": "bg-deepblue-50 dark:bg-gray-200/5",
|
|
38
38
|
"error": "outline outline-1 outline-red-500 focus:outline-0 focus:border-red-500 hover:border-red-500",
|
|
39
39
|
"readonly": "bg-white opacity-30",
|
|
40
40
|
"label": {
|
|
@@ -261,7 +261,7 @@ defineExpose({
|
|
|
261
261
|
/>
|
|
262
262
|
<button
|
|
263
263
|
v-if="isClearable"
|
|
264
|
-
class="pointer-events-click absolute right-4 top-1/2 translate-y-[-50%] transform rounded-full bg-deepblue-900 bg-opacity-10 p-1 text-2xl hover:opacity-80 dark:bg-gray-200
|
|
264
|
+
class="pointer-events-click absolute right-4 top-1/2 translate-y-[-50%] transform rounded-full bg-deepblue-900 bg-opacity-10 p-1 text-2xl hover:opacity-80 dark:bg-gray-200/10"
|
|
265
265
|
type="button"
|
|
266
266
|
@click="onClear"
|
|
267
267
|
>
|
|
@@ -120,7 +120,7 @@ const labelClass = computed(
|
|
|
120
120
|
/>
|
|
121
121
|
<button
|
|
122
122
|
v-if="isClearable"
|
|
123
|
-
class="pointer-events-click absolute right-4 top-5 translate-y-[-50%] transform rounded-full bg-deepblue-900 bg-opacity-10 p-1 text-2xl hover:opacity-80 dark:bg-gray-200
|
|
123
|
+
class="pointer-events-click absolute right-4 top-5 translate-y-[-50%] transform rounded-full bg-deepblue-900 bg-opacity-10 p-1 text-2xl hover:opacity-80 dark:bg-gray-200/10"
|
|
124
124
|
type="button"
|
|
125
125
|
@click="modelValue = ''"
|
|
126
126
|
>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { PAGES } from "../../shared/constants/pages";
|
|
3
|
+
import { buildLocalizedUrl } from "../../utils/localizedNavigation";
|
|
3
4
|
import { computed, onMounted, onUnmounted, ref, useAppConfig, useI18n } from "#imports";
|
|
4
5
|
import ArrowSideUp from "#icons/arrow/arrow-side-up.vue";
|
|
5
6
|
import { IArrowCircleDown, IGlobe, IId } from "#components";
|
|
6
|
-
const { t } = useI18n();
|
|
7
|
+
const { t, locale } = useI18n();
|
|
7
8
|
const appConfig = useAppConfig();
|
|
8
9
|
const mode = appConfig.adataUI.mode;
|
|
9
10
|
const items = computed(() => {
|
|
@@ -11,21 +12,21 @@ const items = computed(() => {
|
|
|
11
12
|
{
|
|
12
13
|
title: "header.products.galleryCards.unload.title",
|
|
13
14
|
subtitle: "header.products.galleryCards.unload.subtitle",
|
|
14
|
-
to: `https://pk.${mode}.kz
|
|
15
|
+
to: buildLocalizedUrl(locale, `https://pk.${mode}.kz`, PAGES.pk.unload),
|
|
15
16
|
image: "/header/unload.webp",
|
|
16
17
|
icon: IArrowCircleDown
|
|
17
18
|
},
|
|
18
19
|
{
|
|
19
20
|
title: "header.products.galleryCards.compliance.title",
|
|
20
21
|
subtitle: "header.products.galleryCards.compliance.subtitle",
|
|
21
|
-
to: `https://ac.${mode}.kz
|
|
22
|
+
to: buildLocalizedUrl(locale, `https://ac.${mode}.kz`),
|
|
22
23
|
image: "/header/compliance.webp",
|
|
23
24
|
icon: IId
|
|
24
25
|
},
|
|
25
26
|
{
|
|
26
27
|
title: "header.products.galleryCards.ved.title",
|
|
27
28
|
subtitle: "header.products.galleryCards.ved.subtitle",
|
|
28
|
-
to: `https://tnved.${mode}.kz
|
|
29
|
+
to: buildLocalizedUrl(locale, `https://tnved.${mode}.kz`),
|
|
29
30
|
image: "/header/ved.webp",
|
|
30
31
|
icon: IGlobe
|
|
31
32
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<template>
|
|
6
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="
|
|
6
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00003 2.05C5.8484 2.05 4.04233 3.85607 4.04233 6.00769C4.04233 6.62916 4.27782 7.31609 4.67533 8.02278C5.07012 8.72463 5.60363 9.4088 6.14891 10.0147C6.69267 10.6188 7.23813 11.1342 7.6484 11.4988C7.78191 11.6175 7.90072 11.7199 8.00003 11.8038C8.09933 11.7199 8.21814 11.6175 8.35166 11.4988C8.76192 11.1342 9.30739 10.6188 9.85114 10.0147C10.3964 9.4088 10.9299 8.72463 11.3247 8.02278C11.7222 7.31609 11.9577 6.62916 11.9577 6.00769C11.9577 3.85607 10.1516 2.05 8.00003 2.05ZM8.00003 12.4827C7.67771 12.8971 7.67749 12.8969 7.67749 12.8969L7.67621 12.8959L7.6731 12.8935L7.66209 12.8849C7.65267 12.8774 7.63912 12.8667 7.62172 12.8528C7.58692 12.8249 7.53668 12.7843 7.47321 12.7319C7.34632 12.6272 7.1663 12.4752 6.95081 12.2836C6.52058 11.9012 5.94537 11.3581 5.36845 10.7171C4.79306 10.0778 4.20589 9.32994 3.76018 8.53756C3.31719 7.75002 2.99233 6.88046 2.99233 6.00769C2.99233 3.27617 5.2685 1 8.00003 1C10.7315 1 13.0077 3.27617 13.0077 6.00769C13.0077 6.88046 12.6829 7.75002 12.2399 8.53756C11.7942 9.32994 11.207 10.0778 10.6316 10.7171C10.0547 11.3581 9.47947 11.9012 9.04924 12.2836C8.83375 12.4752 8.65373 12.6272 8.52684 12.7319C8.46337 12.7843 8.41314 12.8249 8.37833 12.8528C8.36093 12.8667 8.34738 12.8774 8.33796 12.8849L8.32695 12.8935L8.32384 12.8959L8.32289 12.8967C8.32289 12.8967 8.32234 12.8971 8.00003 12.4827ZM8.00003 12.4827L8.32289 12.8967C8.1333 13.0441 7.86707 13.0444 7.67749 12.8969L8.00003 12.4827Z" fill="currentColor"/>
|
|
8
8
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00004 5.03846C7.46475 5.03846 7.03081 5.4724 7.03081 6.00769C7.03081 6.54298 7.46475 6.97692 8.00004 6.97692C8.53533 6.97692 8.96927 6.54298 8.96927 6.00769C8.96927 5.4724 8.53533 5.03846 8.00004 5.03846ZM5.98081 6.00769C5.98081 4.8925 6.88485 3.98846 8.00004 3.98846C9.11523 3.98846 10.0193 4.8925 10.0193 6.00769C10.0193 7.12288 9.11523 8.02692 8.00004 8.02692C6.88485 8.02692 5.98081 7.12288 5.98081 6.00769Z" fill="currentColor"/>
|
|
9
9
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.53668 10.7817C2.61941 10.5886 2.80922 10.4635 3.01923 10.4635H3.93839C4.22834 10.4635 4.46339 10.6985 4.46339 10.9885C4.46339 11.2784 4.22834 11.5135 3.93839 11.5135H3.36541L2.32118 13.95H13.6788L12.6346 11.5135H12.0616C11.7717 11.5135 11.5366 11.2784 11.5366 10.9885C11.5366 10.6985 11.7717 10.4635 12.0616 10.4635H12.9808C13.1908 10.4635 13.3806 10.5886 13.4633 10.7817L14.9575 14.2682C15.0271 14.4304 15.0104 14.6167 14.9133 14.764C14.8161 14.9113 14.6515 15 14.475 15H1.525C1.34853 15 1.18386 14.9113 1.08671 14.764C0.989562 14.6167 0.972934 14.4304 1.04245 14.2682L2.53668 10.7817Z" fill="currentColor"/>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Ref } from '#imports';
|
|
2
|
+
type Locale = Ref<string> | string;
|
|
3
|
+
export interface LocalizedNavigationParams {
|
|
4
|
+
locale: Locale;
|
|
5
|
+
projectUrl: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
target?: '_blank' | '_self';
|
|
8
|
+
}
|
|
9
|
+
export declare function navigateToLocalizedPage({ locale, projectUrl, path, target, }: LocalizedNavigationParams): string | false | void | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric | Promise<false | void | import("vue-router").NavigationFailure>;
|
|
10
|
+
export declare function buildLocalizedUrl(locale: Locale, projectUrl: string, path?: string): string;
|
|
11
|
+
export declare function getLocalizedPath(locale: Locale): string;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { unref } from "#imports";
|
|
2
|
+
import { navigateTo } from "#app";
|
|
3
|
+
export function navigateToLocalizedPage({
|
|
4
|
+
locale,
|
|
5
|
+
projectUrl,
|
|
6
|
+
path = "",
|
|
7
|
+
target = "_blank"
|
|
8
|
+
}) {
|
|
9
|
+
const url = buildLocalizedUrl(locale, projectUrl, path);
|
|
10
|
+
return navigateTo(url, {
|
|
11
|
+
external: true,
|
|
12
|
+
open: { target }
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export function buildLocalizedUrl(locale, projectUrl, path = "") {
|
|
16
|
+
const lang = getLocalizedPath(locale);
|
|
17
|
+
return `${projectUrl}${lang}${path}`;
|
|
18
|
+
}
|
|
19
|
+
export function getLocalizedPath(locale) {
|
|
20
|
+
const lang = unref(locale);
|
|
21
|
+
return lang === "ru" ? "" : `/${lang}`;
|
|
22
|
+
}
|