adata-ui 2.1.34 → 2.1.36

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.
@@ -9,6 +9,7 @@ defineEmits(['click'])
9
9
  <template>
10
10
  <div
11
11
  class="hidden w-max cursor-pointer items-center gap-2 rounded-2xl bg-blue-700 px-4 py-[6px] font-semibold dark:bg-blue-500 lg:flex"
12
+ data-test-id="header-login-button"
12
13
  @click="$emit('click')"
13
14
  >
14
15
  <icon-logout class="text-white dark:text-gray-900 lg:h-4 lg:w-4" />
@@ -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
@@ -43,6 +44,7 @@ function onClick(loc: any) {
43
44
  >
44
45
  <nuxt-link
45
46
  v-for="loc in locales"
47
+ :data-test-id="`header-switch-${loc?.code}-language-button`"
46
48
  :class="[
47
49
  'text-sm cursor-pointer px-4 py-2.5 flex justify-between',
48
50
  {'text-primary bg-deepblue-500/5': locale === loc.code}
@@ -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: [
@@ -85,9 +85,9 @@ async function send() {
85
85
  </script>
86
86
 
87
87
  <template>
88
- <a-modal v-model="isOpen">
88
+ <a-modal v-model="isOpen" data-test-id="report-form-modal">
89
89
  <template #header>
90
- <p class="heading-02 text-center">
90
+ <p class="heading-02 text-center" data-test-id="report-form-title">
91
91
  {{ t('modals.report_bug.title') }}
92
92
  </p>
93
93
  </template>
@@ -104,12 +104,14 @@ async function send() {
104
104
  <a-input-standard
105
105
  v-model="form.name"
106
106
  required
107
+ data-test-id="report-form-name-input"
107
108
  :label="t('modals.report_bug.labels.name')"
108
109
  :error="getError('name')"
109
110
  />
110
111
  <a-input-standard
111
112
  v-model="form.email"
112
113
  required
114
+ data-test-id="report-form-email-input"
113
115
  :label="t('modals.report_bug.labels.email')"
114
116
  :error="getError('email')"
115
117
  />
@@ -119,6 +121,7 @@ async function send() {
119
121
  required
120
122
  data-maska="8 (###) ### ## ##"
121
123
  clearable
124
+ data-test-id="report-form-phone-input"
122
125
  :label="t('modals.report_bug.labels.phone')"
123
126
  :error="getError('phone_number')"
124
127
  />
@@ -126,6 +129,7 @@ async function send() {
126
129
  <a-textarea
127
130
  v-model="form.comment"
128
131
  required
132
+ data-test-id="report-form-comment-textarea"
129
133
  :label="t('modals.report_bug.labels.comment')"
130
134
  size="md"
131
135
  :error="getError('comment')"
@@ -140,12 +144,14 @@ async function send() {
140
144
  <a-button
141
145
  view="outline"
142
146
  class="w-full"
147
+ data-test-id="report-form-close-button"
143
148
  @click="emit('close')"
144
149
  >
145
150
  {{ t('actions.close') }}
146
151
  </a-button>
147
152
  <a-button
148
153
  class="w-full"
154
+ data-test-id="report-form-submit-button"
149
155
  @click="send"
150
156
  >
151
157
  {{ t('actions.send') }}
@@ -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">
@@ -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>
@@ -142,7 +142,7 @@ const closeMessage = () => {
142
142
  class="hidden min-h-10 bg-gray-50 dark:bg-gray-950 lg:block"
143
143
  >
144
144
  <div class="a-container flex justify-between py-2 items-center text-sm">
145
- <div class="flex items-center leading-[24px]">
145
+ <div class="flex items-center leading-[24px]" data-test-id="header-currency-bar">
146
146
  <div v-for="currency in currencies" :key="currency.currency" class="mr-4 flex gap-2">
147
147
  <div class="flex items-center">
148
148
  <component
@@ -165,13 +165,13 @@ const closeMessage = () => {
165
165
  <div v-if="isAuthenticated" class="flex items-center gap-5">
166
166
  <div v-if="limitRemaining != null || limitRemaining != undefined">
167
167
  <span class="mr-2 text-xs">{{ t('header.top.requestLimit') }}</span>
168
- <a-status-badge size="sm">
168
+ <a-status-badge size="sm" data-test-id="header-daily-requests-count">
169
169
  {{ limitRemaining }}
170
170
  </a-status-badge>
171
171
  </div>
172
172
  <div v-if="daysRemaining">
173
173
  <span class="mr-2 text-xs">{{ t('header.top.daysLeft') }}</span>
174
- <a-status-badge size="sm">
174
+ <a-status-badge size="sm" data-test-id="header-tariff-days-remaining-count">
175
175
  {{ daysRemaining }}
176
176
  </a-status-badge>
177
177
  </div>
@@ -17,6 +17,7 @@
17
17
  activeTab === option.key ? selectedClasses() : defaultClasses(!!option.disabled),
18
18
  sizeOptions[size]
19
19
  ]"
20
+ :data-test-id="option?.dataTestId"
20
21
  @click="onChanged(option, $event)"
21
22
  >
22
23
  <slot name="option" :option="option">
@@ -20,4 +20,5 @@ export interface Tab {
20
20
  disabled?: boolean
21
21
  prevent?:boolean
22
22
  badgeColor?: 'primary' | 'success' | 'danger' | 'gray' | 'orange' | 'warning'
23
+ dataTestId?: string
23
24
  }
@@ -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.34",
4
+ "version": "2.1.36",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",