adata-ui 0.1.41 → 0.1.44

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "0.1.41",
3
+ "version": "0.1.44",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -1,49 +1,10 @@
1
1
  <template>
2
- <div id="app">
3
- <!-- <text-field label="Пример" v-model="value" @input="inputHandle" @enterPressed="inputHandle" />-->
4
- <search-text-field
5
- label="Пример2"
6
- v-model="value"
7
- @input="inputHandle"
8
- @enterPressed="inputHandle"
9
- :options="options"
10
- :optionFields="['id', 'name']"
11
- v-mask="'####-##'"
12
- clearable
13
- />
14
- </div>
2
+ <div id="app"></div>
15
3
  </template>
16
4
 
17
5
  <script>
18
- import { VueMaskDirective } from "v-mask";
19
- // import TextField from "./components/TextField/TextField";
20
- import SearchTextField from "./components/SearchTextField/SearchTextField";
21
-
22
6
  export default {
23
7
  name: "App",
24
- directives: {
25
- mask: VueMaskDirective,
26
- },
27
- components: {
28
- // TextField,
29
- SearchTextField,
30
- },
31
- data() {
32
- return {
33
- value: "",
34
- options: [
35
- {
36
- id: 1,
37
- name: "reg",
38
- },
39
- ],
40
- };
41
- },
42
- methods: {
43
- inputHandle(val) {
44
- console.log(val);
45
- },
46
- },
47
8
  };
48
9
  </script>
49
10
 
Binary file
@@ -72,6 +72,7 @@ export default {
72
72
  border: none;
73
73
  border-radius: 2px;
74
74
  font-size: 14px;
75
+ font-weight: 500;
75
76
 
76
77
  @media screen and (max-width: 560px) {
77
78
  width: 100%;
@@ -183,6 +184,7 @@ export default {
183
184
  background: #0055BB;
184
185
  color: #fff;
185
186
  }
187
+
186
188
  }
187
189
 
188
190
  &_blue {
@@ -50,15 +50,15 @@
50
50
  <div v-for="(elem, index) in listDropDown" :key="index">
51
51
  <div :class="elem.link ? 'profile-menu__balance-link': 'profile-menu__links'"
52
52
  class="gray-text"
53
- v-if="elem.url"
54
- @click="handleClick(elem.url, elem.name)"
53
+ v-if="elem[mode]"
54
+ @click="handleClick(elem[mode], elem.name)"
55
55
  >
56
56
  <div>
57
57
  {{ elem.name }}
58
58
  </div>
59
59
  <span
60
60
  v-if="elem.link"
61
- @click="showModal(elem.url, elem.name)"
61
+ @click="showModal(elem[mode], elem.name)"
62
62
  class="profile-menu__balance"
63
63
  >
64
64
  {{ elem.link }}
@@ -79,8 +79,8 @@
79
79
  <div
80
80
  class="profile-menu__item__child"
81
81
  :key="idx + 'link'"
82
- v-if="child.url"
83
- @click="handleClick(child.url, child.name)"
82
+ v-if="child[mode]"
83
+ @click="handleClick(child[mode], child.name)"
84
84
  >
85
85
  <span>
86
86
  <svg width="4" height="4" viewBox="0 0 4 4" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -122,8 +122,8 @@
122
122
  <div class="profile-menu-mobile__items" v-if="listDropDown.length > 0">
123
123
  <div v-for="(elem, index) in listDropDown" :key="index" class="bb">
124
124
  <div
125
- @click="handleClick(elem.url, elem.name)"
126
- v-if="elem.url"
125
+ @click="handleClick(elem[mode], elem.name)"
126
+ v-if="elem[mode]"
127
127
  :class="elem.link ? 'profile-menu-mobile__balance-link': 'profile-menu-mobile__links'"
128
128
  >
129
129
  <div v-if="!elem.link" class="button-inner">
@@ -201,8 +201,8 @@
201
201
  <div class="profile-menu-mobile__inner">
202
202
  <div class="profile-menu-mobile__items" v-if="chosenElem.children.length > 0">
203
203
  <div v-for="(elem, index) in chosenElem.children" :key="index" class="bb">
204
- <div @click="handleClick(elem.url, elem.name)"
205
- v-if="elem.url"
204
+ <div @click="handleClick(elem[mode], elem.name)"
205
+ v-if="elem[mode]"
206
206
  :class="elem.link ? 'profile-menu-mobile__balance-link': 'profile-menu-mobile__links'">
207
207
  <div class="button-inner">
208
208
  <div>{{ elem.name }}</div>
@@ -330,8 +330,8 @@ export default {
330
330
  handleClick(url, name) {
331
331
  if (!name.includes('Текущий')) {
332
332
  window.open(url, "_self");
333
- this.active = false;
334
- if (this.chosenElem) this.chosenElem.opened = false;
333
+ // this.active = false;
334
+ // if (this.chosenElem) this.chosenElem.opened = false;
335
335
  }
336
336
  },
337
337
  rotateItem(index) {
@@ -0,0 +1,14 @@
1
+ import MailTo from "./MailTo.vue";
2
+
3
+ export default {
4
+ title: "MailTo",
5
+ component: MailTo,
6
+ template: "<mail-to></mail-to>",
7
+ };
8
+
9
+ const Template = () => ({
10
+ components: { MailTo },
11
+ template: "<mail-to></mail-to>",
12
+ });
13
+
14
+ export const AMailTo = Template.bind({});
@@ -0,0 +1,66 @@
1
+ <template>
2
+ <div class="mail">
3
+ <h2 class="mail__title">Интересует больше данных?</h2>
4
+ <p class="mail__subtitle">
5
+ Отправьте ваш запрос на
6
+ <a class="mail__link" href="mailto:info@adata.kz">info@adata.kz</a>
7
+ </p>
8
+ <div class="mail__img-wrapper">
9
+ <img
10
+ class="mail__img"
11
+ :src="require('/src/assets/images/mail.png')"
12
+ alt="mail"
13
+ />
14
+ </div>
15
+ <p class="mail__text">
16
+ Мы обязательно ответим вам <br />
17
+ в кратчайшие сроки.
18
+ </p>
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+ export default {
24
+ name: "MailTo",
25
+ };
26
+ </script>
27
+
28
+ <style lang="scss" scoped>
29
+ .mail {
30
+ padding: 25px 0px 50px;
31
+ &__title {
32
+ font-size: 20px;
33
+ line-height: 27px;
34
+ color: #2c3e50;
35
+ font-weight: 700;
36
+ text-align: center;
37
+ margin-bottom: 16px;
38
+ }
39
+ &__subtitle {
40
+ font-size: 14px;
41
+ line-height: 22px;
42
+ text-align: center;
43
+ color: #2c3e50;
44
+ }
45
+ &__link {
46
+ color: #007aff;
47
+ text-decoration: underline;
48
+ }
49
+ &__img-wrapper {
50
+ padding: 24px;
51
+ display: flex;
52
+ justify-content: center;
53
+ }
54
+ &__img {
55
+ width: 120px;
56
+ height: 120px;
57
+ object-fit: contain;
58
+ }
59
+ &__text {
60
+ font-size: 14px;
61
+ line-height: 22px;
62
+ text-align: center;
63
+ color: #2c3e50;
64
+ }
65
+ }
66
+ </style>
@@ -2,51 +2,74 @@
2
2
  <div class="adt-text-block">
3
3
  <div :class="['adt-text-block__field', { error: !!errorText }]">
4
4
  <input
5
- ref="input"
6
- v-mask="mask"
7
- :type="type"
8
- v-model="value"
9
- :placeholder="placeholder"
10
- required
11
- @keyup.enter="pressedEnter"
12
- class="adt-text-block__input"
13
- :class="{ error: !!errorText }"
14
- @input="() => {$emit('input', value)}"
5
+ ref="input"
6
+ :type="type"
7
+ :value="value"
8
+ :placeholder="placeholder"
9
+ required
10
+ @input="$emit('input', $event.target.value)"
11
+ @keyup.enter="enterPressed"
12
+ class="adt-text-block__input"
13
+ :class="{ error: !!errorText }"
15
14
  />
16
15
  <label class="adt-text-block__label">
17
16
  {{ label }}
18
17
  <span v-if="required" class="adt-text-block__required">*</span>
19
18
  </label>
20
- <div class="adt-text-block__icon desktop" v-if="clearable && value && value.length > 0"
21
- @click="$emit('input', '')">
22
- <svg width="12" height="12" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="clearIcon">
23
- <path d="M2 2l12 12m0-12L2 14" stroke="#2C3E50" stroke-linecap="round" stroke-linejoin="round"></path>
19
+ <div
20
+ class="adt-text-block__icon desktop"
21
+ v-if="clearable && value && value.length > 0"
22
+ @click="$emit('input', '')"
23
+ >
24
+ <svg
25
+ width="12"
26
+ height="12"
27
+ fill="none"
28
+ xmlns="http://www.w3.org/2000/svg"
29
+ viewBox="0 0 16 16"
30
+ id="clearIcon"
31
+ >
32
+ <path
33
+ d="M2 2l12 12m0-12L2 14"
34
+ stroke="#2C3E50"
35
+ stroke-linecap="round"
36
+ stroke-linejoin="round"
37
+ ></path>
24
38
  </svg>
25
39
  </div>
26
40
  </div>
27
41
  <div class="adt-text-block__error" v-if="!!errorText">
28
- <svg width="14" height="14" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" id="icon__attention">
29
- <path d="M8.5 4C8.5 3.72386 8.27614 3.5 8 3.5C7.72386 3.5 7.5 3.72386 7.5 4H8.5ZM7.5 9C7.5 9.27614 7.72386 9.5 8 9.5C8.27614 9.5 8.5 9.27614 8.5 9H7.5ZM7.5 4V9H8.5V4H7.5Z" fill="#FF2E43"/>
30
- <path d="M8.5 11C8.5 10.7239 8.27614 10.5 8 10.5C7.72386 10.5 7.5 10.7239 7.5 11H8.5ZM7.5 11.5C7.5 11.7761 7.72386 12 8 12C8.27614 12 8.5 11.7761 8.5 11.5H7.5ZM7.5 11V11.5H8.5V11H7.5Z" fill="#FF2E43"/>
31
- <circle cx="8" cy="8" r="7" stroke="#FF2E43"/>
42
+ <svg
43
+ width="14"
44
+ height="14"
45
+ viewBox="0 0 16 16"
46
+ fill="none"
47
+ xmlns="http://www.w3.org/2000/svg"
48
+ id="icon__attention"
49
+ >
50
+ <path
51
+ d="M8.5 4C8.5 3.72386 8.27614 3.5 8 3.5C7.72386 3.5 7.5 3.72386 7.5 4H8.5ZM7.5 9C7.5 9.27614 7.72386 9.5 8 9.5C8.27614 9.5 8.5 9.27614 8.5 9H7.5ZM7.5 4V9H8.5V4H7.5Z"
52
+ fill="#FF2E43"
53
+ />
54
+ <path
55
+ d="M8.5 11C8.5 10.7239 8.27614 10.5 8 10.5C7.72386 10.5 7.5 10.7239 7.5 11H8.5ZM7.5 11.5C7.5 11.7761 7.72386 12 8 12C8.27614 12 8.5 11.7761 8.5 11.5H7.5ZM7.5 11V11.5H8.5V11H7.5Z"
56
+ fill="#FF2E43"
57
+ />
58
+ <circle cx="8" cy="8" r="7" stroke="#FF2E43" />
32
59
  </svg>
33
60
  {{ errorText }}
34
61
  </div>
35
62
  </div>
36
63
  </template>
37
64
  <script>
38
- import '../../assets/style.scss';
39
- import { VueMaskDirective } from "v-mask";
65
+ import "../../assets/style.scss";
40
66
 
41
67
  export default {
42
68
  name: "TextField",
43
- directives: {
44
- mask: VueMaskDirective
45
- },
46
69
  props: {
47
70
  errorText: {
48
71
  type: String,
49
- default: ""
72
+ default: "",
50
73
  },
51
74
  label: {
52
75
  type: String,
@@ -56,38 +79,41 @@ export default {
56
79
  type: String,
57
80
  default: "text",
58
81
  },
59
- mask: {
82
+ value: {
60
83
  type: String,
61
- default: ""
84
+ default: "",
62
85
  },
63
86
  placeholder: {
64
87
  type: String,
65
- default: ""
88
+ default: "",
66
89
  },
67
90
  clearable: {
68
91
  type: Boolean,
69
- default: false
92
+ default: false,
70
93
  },
71
94
  required: {
72
95
  type: Boolean,
73
- default: false
74
- }
96
+ default: false,
97
+ },
75
98
  },
76
99
  data() {
77
100
  return {
78
101
  showPlaceholder: false,
79
- value: ""
80
- }
102
+ };
81
103
  },
82
104
  computed: {
83
105
  inputPlaceholder() {
84
- return this.showPlaceholder ? this.placeholder : ""
85
- }
106
+ return this.showPlaceholder ? this.placeholder : "";
107
+ },
86
108
  },
87
109
  methods: {
88
- pressedEnter() {
89
- this.$emit('enterPressed', this.value);
90
- }
91
- }
92
- }
110
+ enterPressed() {
111
+ this.$emit("enterPressed", this.showAutocomplete);
112
+ },
113
+ inputHandler(e) {
114
+ this.$emit("input", e.target.value);
115
+ this.showAutocomplete = true;
116
+ },
117
+ },
118
+ };
93
119
  </script>
@@ -1,24 +1,26 @@
1
- import Vue from 'vue'
2
- import AButton from './Button/AButton'
3
- import ATextField from './TextField/TextField'
4
- import APasswordField from './PasswordField/PasswordField'
5
- import AAlert from './Alert/Alert'
6
- import AHeader from './Header/Header'
7
- import AFooter from './Footer/Footer'
8
- import ASearchTextField from './SearchTextField/SearchTextField'
1
+ import Vue from "vue";
2
+ import AButton from "./Button/AButton";
3
+ import ATextField from "./TextField/TextField";
4
+ import APasswordField from "./PasswordField/PasswordField";
5
+ import AAlert from "./Alert/Alert";
6
+ import AHeader from "./Header/Header";
7
+ import AFooter from "./Footer/Footer";
8
+ import ASearchTextField from "./SearchTextField/SearchTextField";
9
+ import AMailTo from "./MailTo/MailTo";
9
10
 
10
11
  const Components = {
11
- AButton,
12
- ATextField,
13
- APasswordField,
14
- AAlert,
15
- AHeader,
16
- AFooter,
17
- ASearchTextField
12
+ AButton,
13
+ ATextField,
14
+ APasswordField,
15
+ AAlert,
16
+ AHeader,
17
+ AFooter,
18
+ ASearchTextField,
19
+ AMailTo,
18
20
  };
19
21
 
20
- Object.keys(Components).forEach(name => {
21
- Vue.component(name, Components[name]);
22
+ Object.keys(Components).forEach((name) => {
23
+ Vue.component(name, Components[name]);
22
24
  });
23
25
 
24
26
  export default Components;
@@ -2,21 +2,27 @@ export const profileDropDown = [
2
2
  {
3
3
  id: 1,
4
4
  name: "Общие настройки",
5
- url: "https://adata.kz/profile?tab=general",
5
+ dev: "https://adtdev.kz/profile?tab=general",
6
+ staging: "https://adada.kz/profile?tab=general",
7
+ prod: "https://adata.kz/profile?tab=general",
6
8
  disabled: false,
7
9
  withoutArray: true
8
10
  },
9
11
  {
10
12
  id: 2,
11
13
  name: "Увеличить лимит запросов",
12
- url: "https://adata.kz/profile?tab=tariffs",
14
+ dev: "https://adtdev.kz/profile?tab=tariffs",
15
+ staging: "https://adada.kz/profile?tab=tariffs",
16
+ prod: "https://adata.kz/profile?tab=tariffs",
13
17
  disabled: false,
14
18
  withoutArray: true
15
19
  },
16
20
  {
17
21
  id: 3,
18
22
  name: "Текущий баланс: 0 ₸",
19
- url: "https://adata.kz/profile?tab=tariffs",
23
+ dev: "https://adtdev.kz/profile?tab=tariffs",
24
+ staging: "https://adada.kz/profile?tab=tariffs",
25
+ prod: "https://adata.kz/profile?tab=tariffs",
20
26
  link: "Пополнить",
21
27
  disabled: true,
22
28
  withoutArray: true
@@ -24,7 +30,9 @@ export const profileDropDown = [
24
30
  {
25
31
  id: 4,
26
32
  name: "Историй платежей",
27
- url: "https://adata.kz/profile?tab=payments",
33
+ dev: "https://adtdev.kz/profile?tab=payments",
34
+ staging: "https://adada.kz/profile?tab=payments",
35
+ prod: "https://adata.kz/profile?tab=payments",
28
36
  disabled: false,
29
37
  withoutArray: true
30
38
  },
@@ -36,12 +44,16 @@ export const profileDropDown = [
36
44
  {
37
45
  id: 8,
38
46
  name: "Избранные",
39
- url: "https://pk.adata.kz/profile/favorites"
47
+ dev: "https://pk.adtdev.kz/profile/favorites",
48
+ staging: "https://pk.adada.kz/profile/favorites",
49
+ prod: "https://pk.adata.kz/profile/favorites"
40
50
  },
41
51
  {
42
52
  id: 9,
43
53
  name: "История просмотров",
44
- url: "https://pk.adata.kz/profile/browsing-history"
54
+ dev: "https://pk.adtdev.kz/profile/browsing-history",
55
+ staging: "https://pk.adada.kz/profile/browsing-history",
56
+ prod: "https://pk.adata.kz/profile/browsing-history"
45
57
  }
46
58
  ],
47
59
  disabled: false
@@ -54,7 +66,9 @@ export const profileDropDown = [
54
66
  {
55
67
  id: 10,
56
68
  name: "Профиль",
57
- url: "https://work.adata.kz/profile/account"
69
+ dev: "https://work.adtdev.kz/profile/account",
70
+ staging: "https://work.adada.kz/profile/account",
71
+ prod: "https://work.adata.kz/profile/account"
58
72
  },
59
73
  // {
60
74
  // id: 11,
@@ -64,12 +78,16 @@ export const profileDropDown = [
64
78
  {
65
79
  id: 12,
66
80
  name: "Отклики",
67
- url: "https://work.adata.kz/profile/application"
81
+ dev: "https://work.adtdev.kz/profile/application",
82
+ staging: "https://work.adada.kz/profile/application",
83
+ prod: "https://work.adata.kz/profile/application",
68
84
  },
69
85
  {
70
86
  id: 13,
71
87
  name: "Предложения",
72
- url: "https://work.adata.kz/profile/offer"
88
+ dev: "https://work.adtdev.kz/profile/offer",
89
+ staging: "https://work.adada.kz/profile/offer",
90
+ prod: "https://work.adata.kz/profile/offer"
73
91
  }
74
92
  ],
75
93
  disabled: false
@@ -82,12 +100,16 @@ export const profileDropDown = [
82
100
  {
83
101
  id: 17,
84
102
  name: "Шаблоны поиска",
85
- url: "https://tender.adata.kz/profile/search-profile"
103
+ dev: "https://tender.adtdev.kz/profile/search-profile",
104
+ staging: "https://tender.adada.kz/profile/search-profile",
105
+ prod: "https://tender.adata.kz/profile/search-profile",
86
106
  },
87
107
  {
88
108
  id: 17,
89
109
  name: "Избранные",
90
- url: "https://tender.adata.kz/profile/favourites"
110
+ dev: "https://tender.adtdev.kz/profile/favourites",
111
+ staging: "https://tender.adada.kz/profile/favourites",
112
+ prod: "https://tender.adata.kz/profile/favourites"
91
113
  }
92
114
  ],
93
115
  disabled: false