adata-ui 2.1.33 → 2.1.35

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.
@@ -44,6 +44,7 @@ onMounted(() => {
44
44
  on-icon-class="w-4 h-4"
45
45
  :on-icon="Moon"
46
46
  active-container-class="dark:bg-black"
47
+ data-test-id="header-switch-theme-toggle"
47
48
  />
48
49
  </client-only>
49
50
  </template>
@@ -28,6 +28,7 @@ function onClick(loc: any) {
28
28
  <div
29
29
  ref="langSwitcher"
30
30
  class="relative"
31
+ data-test-id="header-switch-language-button"
31
32
  >
32
33
 
33
34
  <button
@@ -46,8 +46,8 @@ const normalize = (path: string) => {
46
46
  <component
47
47
  v-for="(service, index) in services"
48
48
  :key="index"
49
- :is="normalize(service.short) === normalize(route.path) && pageUrl.hostname.startsWith('pk') ? 'div' : NuxtLinkLocale"
50
- :to="normalize(service.short) === normalize(route.path) ? '' : service.to"
49
+ :is="normalize(localePath(service.short)) === normalize(route.path) && pageUrl.hostname.startsWith('pk') ? 'div' : NuxtLinkLocale"
50
+ :to="normalize(localePath(service.short)) === normalize(route.path) ? '' : service.to"
51
51
  :class="['flex flex-col items-center gap-2 p-2', blockStyles[index]]"
52
52
  >
53
53
  <div
@@ -98,7 +98,7 @@ const sideLinks = <any>{
98
98
  {
99
99
  label: 'header.products.edo.label',
100
100
  icon: AIconFiles,
101
- link: urls.edo + PAGES.edo.l
101
+ link: urls.edo_docs,
102
102
  }
103
103
  ],
104
104
  pk: [
@@ -178,10 +178,12 @@ async function submit() {
178
178
  }
179
179
 
180
180
  function authWithSocial(social: string) {
181
- const mode = (useNuxtApp().$config.public.authApiURL as string).includes('adata')
182
- ? 'adata'
183
- : 'adtdev'
184
- document.location.replace(`https://auth.${mode}.kz/api/login/social?source=${social}`)
181
+ const url = new URL(`https://auth.${mode}.kz/api/login/social`)
182
+
183
+ url.searchParams.set('source', social)
184
+ url.searchParams.set('redirect_url', window.location.origin)
185
+
186
+ document.location.replace(url.toString())
185
187
  }
186
188
 
187
189
  function onRegister() {
@@ -226,26 +228,28 @@ onBeforeUnmount(() => {
226
228
 
227
229
  <template>
228
230
  <div class="flex flex-col gap-5">
229
- <h1 class="heading-02 text-center">
231
+ <h1 class="heading-02 text-center" data-test-id="login-form-title">
230
232
  {{ t('modals.id.login.title') }}
231
233
  </h1>
232
- <p class="body-400 text-center">
234
+ <p class="body-400 text-center" data-test-id="login-form-subtitle">
233
235
  {{ t('modals.id.login.subtitle') }}
234
236
  </p>
235
237
  <div class="flex flex-col gap-4">
236
238
  <a-input-standard
237
239
  v-model="form.username"
238
240
  type="email"
241
+ data-test-id="login-form-email-input"
239
242
  :label="t('modals.id.login.labels.email')"
240
243
  :error="getError('username')"
241
244
  />
242
245
  <a-input-password
243
246
  v-model="form.password"
247
+ data-test-id="login-form-password-input"
244
248
  :label="t('modals.id.login.labels.password')"
245
249
  :error="getError('password')"
246
250
  />
247
251
  <div class="flex items-center justify-between">
248
- <div class="body-400 flex gap-2">
252
+ <div class="body-400 flex gap-2" data-test-id="login-form-remember-me-checkbox">
249
253
  <a-checkbox
250
254
  v-model="rememberMe"
251
255
  name="remember_me"
@@ -259,6 +263,7 @@ onBeforeUnmount(() => {
259
263
  </div>
260
264
  <button
261
265
  class="link-s-400"
266
+ data-test-id="login-form-forgot-password-button"
262
267
  @click="onForgotPassword"
263
268
  >
264
269
  {{ t('modals.id.login.forget_password') }}
@@ -270,18 +275,21 @@ onBeforeUnmount(() => {
270
275
  <div class="flex shrink-0 gap-4">
271
276
  <span
272
277
  class="cursor-pointer"
278
+ data-test-id="login-form-google-button"
273
279
  @click="authWithSocial('google')"
274
280
  >
275
281
  <a-icon-google />
276
282
  </span>
277
283
  <span
278
284
  class="cursor-pointer"
285
+ data-test-id="login-form-yandex-button"
279
286
  @click="authWithSocial('yandex')"
280
287
  >
281
288
  <a-icon-yandex />
282
289
  </span>
283
290
  <span
284
291
  class="cursor-pointer"
292
+ data-test-id="login-form-mailru-button"
285
293
  @click="authWithSocial('mailru')"
286
294
  >
287
295
  <a-icon-mailru />
@@ -292,6 +300,7 @@ onBeforeUnmount(() => {
292
300
  <a-button
293
301
  :loading="loading"
294
302
  type="submit"
303
+ data-test-id="login-form-login-button"
295
304
  @click="submit"
296
305
  >
297
306
  {{ t('actions.login') }}
@@ -304,6 +313,7 @@ onBeforeUnmount(() => {
304
313
  type="button"
305
314
  view="outline"
306
315
  class="w-full"
316
+ data-test-id="login-form-register-button"
307
317
  @click="onRegister"
308
318
  >
309
319
  {{ t('actions.register') }}
@@ -313,6 +323,7 @@ onBeforeUnmount(() => {
313
323
  type="button"
314
324
  view="transparent"
315
325
  class="w-full"
326
+ data-test-id="login-form-tariffs-button"
316
327
  @click="toTariffs"
317
328
  >
318
329
  {{ t('actions.toTariffs') }}
@@ -76,7 +76,7 @@ const autoLoginClose = () => {
76
76
  </script>
77
77
 
78
78
  <template>
79
- <a-modal v-model="loginModal">
79
+ <a-modal v-model="loginModal" data-test-id="login-form-modal">
80
80
  <id-login-modal v-if="loginModal" />
81
81
  </a-modal>
82
82
  <a-modal v-model="twoFactorModal">
@@ -124,6 +124,7 @@ function moveFocus(index: number, to: string) {
124
124
  :ref="el => otpRefs[index] = el"
125
125
  v-model="otp[index]"
126
126
  type="text"
127
+ inputmode="numeric"
127
128
  maxlength="1"
128
129
  class="size-10 rounded bg-deepblue-900/5 text-center text-lg caret-transparent focus:outline-none dark:bg-[#E3E5E80D]"
129
130
  :class="{
@@ -85,7 +85,7 @@ const mainLinks = computed(() => ({
85
85
  },
86
86
  {
87
87
  title: t('header.products.edo.label'),
88
- link: urls.edo + PAGES.edo.l,
88
+ link: urls.edo_docs,
89
89
  isNew: true
90
90
  },
91
91
  {
@@ -160,6 +160,7 @@ onMounted(() => {
160
160
  aria-label="Adata-logo"
161
161
  :to="buildLocalizedUrl(locale, urls.landing)"
162
162
  class="text-deepblue cursor-pointer dark:text-[#E3E5E8]"
163
+ data-test-id="header-main-adata-logo"
163
164
  @click="goToAnotherModule"
164
165
  >
165
166
  <adata-logo
@@ -187,6 +188,7 @@ onMounted(() => {
187
188
  <template #default="{ onExpand, expanded }">
188
189
  <div
189
190
  class="hidden cursor-pointer items-center gap-2 text-sm font-semibold lg:flex"
191
+ data-test-id="header-email-text"
190
192
  @click.stop="onExpand"
191
193
  >
192
194
  <span>{{ email }}</span>
@@ -14,15 +14,18 @@ const { t, locale } = useI18n()
14
14
  const navs: any = [
15
15
  {
16
16
  label: 'header.navs.products',
17
- to: landing + PAGES.totalServices
17
+ to: landing + PAGES.totalServices,
18
+ data_attribute: 'header-products-and-solutions-button',
18
19
  },
19
20
  {
20
21
  label: 'header.navs.contacts',
21
- to: landing + PAGES.contacts
22
+ to: landing + PAGES.contacts,
23
+ data_attribute: 'header-contacts-button',
22
24
  },
23
25
  {
24
26
  label: 'header.navs.tariffs',
25
- to: landing + PAGES.tariffs
27
+ to: landing + PAGES.tariffs,
28
+ data_attribute: 'header-tariffs-button',
26
29
  },
27
30
  // {
28
31
  // label: 'header.navs.api',
@@ -177,6 +180,7 @@ watch(
177
180
  v-for="(nav, index) in navs"
178
181
  :key="nav.label"
179
182
  class="group inline-block border-r border-[#2C3E501A] px-2 last-of-type:border-none dark:border-[#E3E5E81A]"
183
+ :data-test-id="nav.data_attribute"
180
184
  @click="lockMenu"
181
185
  role="listitem"
182
186
  >
@@ -54,6 +54,7 @@ function isCurrentModule(currentModule: string) {
54
54
  :to="module.to"
55
55
  :icon="module.icon"
56
56
  :badge="module.is_new"
57
+ :data-test-id="module.data_attribute"
57
58
  />
58
59
  </div>
59
60
  <div class="flex flex-col gap-5 w-[290px] pl-[10px]">
@@ -68,6 +69,7 @@ function isCurrentModule(currentModule: string) {
68
69
  :to="module.to"
69
70
  :icon="module.icon"
70
71
  :badge="module.is_new"
72
+ :data-test-id="module.data_attribute"
71
73
  />
72
74
  </div>
73
75
  <div class="flex flex-col gap-5 w-[330px] pl-[10px]">
@@ -82,6 +84,7 @@ function isCurrentModule(currentModule: string) {
82
84
  :to="module.to"
83
85
  :icon="module.icon"
84
86
  :badge="module.is_new"
87
+ :data-test-id="module.data_attribute"
85
88
  />
86
89
  </div>
87
90
  </div>
@@ -58,6 +58,7 @@ interface Props {
58
58
  isScrollable?: boolean
59
59
  width?: string | number
60
60
  heightModalClass?: string
61
+ dataTestId?: string
61
62
  }
62
63
 
63
64
  const props = withDefaults(defineProps<Props>(), {
@@ -70,6 +71,7 @@ const props = withDefaults(defineProps<Props>(), {
70
71
  name: 'modal',
71
72
  width: 424,
72
73
  heightModalClass: '',
74
+ dataTestId: undefined,
73
75
  })
74
76
  const content = ref()
75
77
 
@@ -274,6 +276,7 @@ watch(modelValue, async (newValue) => {
274
276
  ref="modal"
275
277
  :class="baseClasses"
276
278
  :style="modalStyles"
279
+ :data-test-id="dataTestId"
277
280
  >
278
281
  <div
279
282
  v-if="isMobile"
@@ -63,6 +63,7 @@ export const useHeaderNavigationLinks = () => {
63
63
  link: buildLocalizedUrl(locale, urls.pk, PAGES.pk.main),
64
64
  icon: AIconUsersThree,
65
65
  to: urls.pk,
66
+ data_attribute: 'navigation-menu-counterparty-block',
66
67
  items: [
67
68
  {
68
69
  title: t('header.products.counterparties.items.counterparty.title'),
@@ -115,6 +116,7 @@ export const useHeaderNavigationLinks = () => {
115
116
  name: t('header.products.fines.label'),
116
117
  link: buildLocalizedUrl(locale, urls.avto, PAGES.fines.main),
117
118
  icon: AIconCar,
119
+ data_attribute: 'navigation-menu-fines-block',
118
120
  items: [
119
121
  {
120
122
  title: t('header.products.fines.items.fines.title'),
@@ -141,6 +143,7 @@ export const useHeaderNavigationLinks = () => {
141
143
  name: t('header.products.jobs.label'),
142
144
  link: urls.work,
143
145
  icon: AIconWorkBag,
146
+ data_attribute: 'navigation-menu-work-block',
144
147
  items: [
145
148
  {
146
149
  title: t('header.products.jobs.items.vacancies.title'),
@@ -162,6 +165,7 @@ export const useHeaderNavigationLinks = () => {
162
165
  name: t('header.products.fea.label'),
163
166
  link: buildLocalizedUrl(locale, urls.tnved, PAGES.fea.main),
164
167
  icon: AIconGlobe,
168
+ data_attribute: 'navigation-menu-ved-block',
165
169
  items: [
166
170
  {
167
171
  title: t('header.products.fea.items.o.t'),
@@ -215,6 +219,7 @@ export const useHeaderNavigationLinks = () => {
215
219
  icon: AIconReceipt,
216
220
  is_new: true,
217
221
  to: urls.tender,
222
+ data_attribute: 'navigation-menu-zakupki-block',
218
223
  items: [
219
224
  {
220
225
  title: t('header.products.tenders.items.customers.title'),
@@ -258,14 +263,15 @@ export const useHeaderNavigationLinks = () => {
258
263
  key: 'edo',
259
264
  is_new: true,
260
265
  name: t('header.products.edo.label'),
261
- link: buildLocalizedUrl(locale, urls.edo , ''),
266
+ link: buildLocalizedUrl(locale, urls.edo_docs , ''),
262
267
  icon: AIconFiles,
268
+ data_attribute: 'navigation-menu-edo-block',
263
269
  items: [
264
270
  {
265
271
  title: t('header.products.edo.items.l.t'),
266
272
  subtitle: t('header.products.edo.items.l.t'),
267
273
  icon: AIconFiles,
268
- to: buildLocalizedUrl(locale, urls.edo , '')
274
+ to: buildLocalizedUrl(locale, urls.edo_docs , '')
269
275
  }
270
276
  ]
271
277
  },
@@ -275,6 +281,7 @@ export const useHeaderNavigationLinks = () => {
275
281
  name: t('header.products.compliance.label'),
276
282
  link: buildLocalizedUrl(locale, urls.compliance, ''),
277
283
  icon: AIconId,
284
+ data_attribute: 'navigation-menu-compliance-block',
278
285
  items: [
279
286
  {
280
287
  title: t('header.products.compliance.items.assistant.t'),
@@ -319,6 +326,7 @@ export const useHeaderNavigationLinks = () => {
319
326
  name: t('header.products.analytics.label'),
320
327
  link: buildLocalizedUrl(locale, urls.analytics, ''),
321
328
  icon: AIconArrowGraphUp,
329
+ data_attribute: 'navigation-menu-analytics-block',
322
330
  items: [
323
331
  // {
324
332
  // title: t('header.products.analytics.items.procurement.title'),
@@ -15,6 +15,7 @@ export function useUrls() {
15
15
  analyticsNew: `https://analytics.${mode}.kz`,
16
16
  tnved: `https://tnved.${mode}.kz`,
17
17
  edo: `https://edo.${mode}.kz`,
18
+ edo_docs: `https://docs.${mode}.kz`,
18
19
  compliance: `https://ac.${mode}.kz/compliance`,
19
20
  compliancemain: `https://ac.${mode}.kz/main`,
20
21
  mode,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adata-ui",
3
3
  "type": "module",
4
- "version": "2.1.33",
4
+ "version": "2.1.35",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",