adata-ui 0.1.37 → 0.1.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "0.1.37",
3
+ "version": "0.1.40",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -64,7 +64,7 @@
64
64
 
65
65
  &__input {
66
66
  background: #ffffff;
67
- border: 1px solid #c4c4c4;
67
+ border: 0.5px solid #c4c4c4;
68
68
  box-sizing: border-box;
69
69
  border-radius: 2px;
70
70
  width: 100%;
@@ -90,19 +90,12 @@
90
90
  font-size: 8px;
91
91
  }
92
92
  }
93
-
94
- &:focus ~ #{$self}__label-red,
95
- &:not(:focus):valid ~ #{$self}__label-red {
96
- top: 12px;
97
- font-size: 10px;
98
- color: #ff2e43;
99
- @media(max-width: 1025px) {
100
- font-size: 8px;
101
- }
93
+ &:hover {
94
+ border: 0.5px solid #2C3E50;
102
95
  }
103
96
 
104
97
  &:focus {
105
- border: 1px solid #2c3e50;
98
+ border: 0.5px solid #2C3E50;
106
99
  }
107
100
 
108
101
  &::placeholder {
@@ -135,28 +128,6 @@
135
128
  }
136
129
  }
137
130
 
138
- &__label-red {
139
- position: absolute;
140
- pointer-events: none;
141
- left: 16px;
142
- top: 50%;
143
- transform: translateY(-50%);
144
- white-space: nowrap;
145
- overflow: hidden;
146
- line-height: 40px;
147
- transition: 0.3s;
148
- color: #ff2e43;
149
- font-size: 12px;
150
-
151
- @media(max-width: 1025px) {
152
- left: 12px;
153
- font-size: 10px;
154
- line-height: 16px;
155
- color: #ff2e43;
156
- }
157
- }
158
-
159
-
160
131
  &__icon {
161
132
  position: absolute;
162
133
  right: 16px;
@@ -209,85 +180,4 @@
209
180
  }
210
181
  }
211
182
  }
212
-
213
- .mobile-magnifier {
214
- display: flex;
215
- justify-content: center;
216
- align-items: center;
217
- height: 40px;
218
- width: 40px;
219
- min-width: 40px;
220
- border-radius: 0 2px 2px 0;
221
- border-left: none;
222
- background: #FFCD33;
223
- }
224
-
225
- &__input-mob-filter {
226
- background: #ffffff;
227
- border-bottom: none;
228
- box-sizing: border-box;
229
- border-radius: 2px;
230
- width: 100%;
231
- height: 48px;
232
- font-size: 16px;
233
- line-height: 19px;
234
- display: flex;
235
- align-items: center;
236
- color: #1A2030;
237
- padding: 19px 40px 5px 16px;
238
- transition: 0.3s all;
239
- -webkit-appearance: none;
240
- -moz-appearance: none;
241
- appearance: none;
242
-
243
- &:focus ~ #{$self}__label-mob-filter,
244
- &:not(:focus):valid ~ #{$self}__label-mob-filter {
245
- top: 11px;
246
- font-size: 10px;
247
- color: #71757A;
248
- @media(max-width: 1025px) {
249
- font-size: 7px;
250
- }
251
- }
252
-
253
- &:focus {
254
- border: 1px solid #2c3e50;
255
- }
256
-
257
- &::placeholder {
258
- font-size: 12px;
259
- }
260
-
261
- &.error {
262
- border: 1px solid #FF2E43;
263
- background: #ff2e431f;
264
- }
265
- }
266
-
267
- &__label-mob-filter {
268
- position: absolute;
269
- pointer-events: none;
270
- left: 16px;
271
- top: 50%;
272
- transform: translateY(-50%);
273
- white-space: nowrap;
274
- overflow: hidden;
275
- line-height: 40px;
276
- transition: 0.3s;
277
- color: #71757A;
278
- @media(max-width: 1025px) {
279
- left: 16px;
280
- font-size: 14px;
281
- line-height: 16px;
282
- color: #71757A;
283
- }
284
-
285
- &__red {
286
- color: rgba(255, 0, 0, 0.53);
287
- }
288
- }
289
- &__magnifier {
290
- left: 8px;
291
- width: fit-content;
292
- }
293
183
  }
@@ -2,7 +2,7 @@
2
2
  <header class="a-header" :class="[{'bordered': isBordered}, {'fixed': isFixed}]">
3
3
  <div class="container">
4
4
  <div class="a-header__left">
5
- <a class="logo" :href="toAdtdev('https://adata.kz')">
5
+ <a class="logo" :href="main[mode]">
6
6
  <svg class="adata-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 48">
7
7
  <path d="M62.926 38.22v-28h10.316c10.342 0 15.511 4.55 15.508 13.652 0 4.36-1.41 7.843-4.232 10.448-2.822 2.605-6.58 3.907-11.276 3.904l-10.316-.004zm6.56-22.868v17.752h3.248c2.839 0 5.069-.82 6.69-2.46 1.622-1.64 2.43-3.873 2.424-6.7 0-2.667-.8-4.767-2.403-6.3-1.602-1.533-3.853-2.297-6.752-2.292h-3.206zM118.5 38.22h-7.131l-2.079-6.228H98.958l-2.079 6.228h-7.093l10.598-28h7.775l10.341 28zm-10.723-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.162c-.07.83-.24 1.649-.508 2.44l-3.168 9.492h7.451zm31.833-11.796h-8.316V38.22h-6.557V15.352h-8.274v-5.136h23.147v5.136zM166 38.22h-7.143l-2.079-6.228h-10.349l-2.05 6.228h-7.106l10.598-28h7.776l10.353 28zm-10.719-11.072l-3.127-9.416a11.94 11.94 0 01-.486-2.516h-.163c-.069.83-.239 1.649-.507 2.44l-3.168 9.492h7.451zM24.553 15.252h-.163c-.069.83-.24 1.649-.507 2.44L20.715 27.2h7.45l-3.126-9.412a12.02 12.02 0 01-.486-2.536z"></path>
8
8
  <path d="M44.905 0H4.99a5.091 5.091 0 00-3.528 1.406A4.71 4.71 0 000 4.8v38.4a4.71 4.71 0 001.461 3.394A5.091 5.091 0 004.99 48h39.916a5.091 5.091 0 003.528-1.406 4.71 4.71 0 001.462-3.394V4.8a4.71 4.71 0 00-1.462-3.394A5.091 5.091 0 0044.905 0zM31.737 38.26l-2.079-6.232H19.305l-2.05 6.232h-7.097l10.598-28h7.776l10.353 28h-7.148z"></path>
@@ -13,7 +13,7 @@
13
13
  :key="index"
14
14
  class="menu__wrapper menu__items"
15
15
  :class="{active: item.key === activeTabKey}"
16
- :href="toAdtdev(item.url)"
16
+ :href="item[mode]"
17
17
  >
18
18
  {{ item.name }}
19
19
  </a>
@@ -23,7 +23,7 @@
23
23
  <slot name="chooseCountry"></slot>
24
24
  <Profile
25
25
  v-bind:profileDropDown="profileDropDown"
26
- :isDev="isDev"
26
+ :mode="mode"
27
27
  :isAuthenticated="isAuthenticated"
28
28
  :requestCount="requestCount"
29
29
  :daysRemaining="daysRemaining"
@@ -64,7 +64,7 @@
64
64
  :key="index"
65
65
  class="menu_mobile-wrapper"
66
66
  :class="{'active-burger-tab': item.key === activeTabKey}"
67
- :href="toAdtdev(item.url)"
67
+ :href="item[mode]"
68
68
  >
69
69
  {{ item.name }}
70
70
  </a>
@@ -75,7 +75,7 @@
75
75
 
76
76
  <script>
77
77
  import Profile from "./Profile";
78
- import { profileDropDown } from "../../configs/profileDropDown"
78
+ import { profileDropDown } from "@/configs/profileDropDown"
79
79
  import MobileToggle from "../transitions/VerticalMobileToggle";
80
80
 
81
81
  export default {
@@ -84,9 +84,12 @@ export default {
84
84
  MobileToggle,
85
85
  },
86
86
  props: {
87
- isDev: {
88
- type: Boolean,
89
- default: false
87
+ mode: {
88
+ type: String,
89
+ required: true,
90
+ validator: function (value) {
91
+ return ['prod', 'dev', 'staging'].indexOf(value) !== -1
92
+ }
90
93
  },
91
94
  isAuthenticated: {
92
95
  type: Boolean,
@@ -130,35 +133,50 @@ export default {
130
133
  data() {
131
134
  return {
132
135
  profileDropDown,
136
+ main: {
137
+ dev: 'https://adtdev.kz',
138
+ prod: 'https://adata.kz',
139
+ staging: 'https://adada.kz'
140
+ },
133
141
  subheaderItems: [
134
142
  {
135
143
  id: 1,
136
144
  name: "Контрагенты",
137
- url: 'https://pk.adata.kz',
145
+ dev: 'https://pk.adtdev.kz',
146
+ prod: 'https://pk.adata.kz',
147
+ staging: 'https://pk.adada.kz',
138
148
  key: 'counterparty'
139
149
  },
140
150
  {
141
151
  id: 2,
142
152
  name: "Тендеры",
143
- url: 'https://tender.adata.kz',
153
+ dev: 'https://tender.adtdev.kz',
154
+ prod: 'https://tender.adata.kz',
155
+ staging: 'https://tender.adada.kz',
144
156
  key: 'tenders'
145
157
  },
146
158
  {
147
159
  id: 3,
148
160
  name: "Работа",
149
- url: 'https://work.adata.kz',
161
+ dev: 'https://work.adtdev.kz',
162
+ prod: 'https://work.adata.kz',
163
+ staging: 'https://work.adada.kz',
150
164
  key: 'work'
151
165
  },
152
166
  {
153
167
  id: 4,
154
168
  name: "Штрафы",
155
- url: 'https://avto.adata.kz',
169
+ dev: 'https://avto.adtdev.kz',
170
+ prod: 'https://avto.adata.kz',
171
+ staging: 'https://avto.adada.kz',
156
172
  key: 'fines'
157
173
  },
158
174
  {
159
175
  id: 5,
160
176
  name: "Маркетинг",
161
- url: 'https://marketing.adata.kz',
177
+ dev: 'https://marketing.adtdev.kz',
178
+ prod: 'https://marketing.adata.kz',
179
+ staging: 'https://marketing.adada.kz',
162
180
  key: 'marketing'
163
181
  }
164
182
  ],
@@ -173,9 +191,6 @@ export default {
173
191
  this.isOpen = !this.isOpen
174
192
  this.$emit('menuOpen', this.isOpen)
175
193
  },
176
- toAdtdev(url) {
177
- return this.isDev ? url.replace("adata", "adtdev") : url;
178
- },
179
194
  setBalance(balance) {
180
195
  if (balance !== 0) {
181
196
  this.profileDropDown[2].name = 'Текущий баланс: ' + this.thousandSeparator(balance) + ' ₸';
@@ -241,9 +241,12 @@ export default {
241
241
  clickOutside: vClickOutside.directive,
242
242
  },
243
243
  props: {
244
- isDev: {
245
- type: Boolean,
246
- default: false
244
+ mode: {
245
+ type: String,
246
+ required: true,
247
+ validator: function (value) {
248
+ return ['prod', 'dev', 'staging'].indexOf(value) !== -1
249
+ }
247
250
  },
248
251
  profileDropDown: {
249
252
  type: Array,
@@ -316,17 +319,17 @@ export default {
316
319
  },
317
320
  async showModal(url, name) {
318
321
  if (name.includes('Текущий')) {
319
- if(window.location.href.includes(this.toAdtdev(url))) {
322
+ if(window.location.href.includes(url)) {
320
323
  this.$emit("setIsReplenishModal", true);
321
324
  this.setShowModal(true);
322
325
  } else {
323
- await window.open(this.toAdtdev(url) + "&modal=show", "_self")
326
+ await window.open(url + "&modal=show", "_self")
324
327
  }
325
328
  }
326
329
  },
327
330
  handleClick(url, name) {
328
331
  if (!name.includes('Текущий')) {
329
- window.open(this.toAdtdev(url), "_self");
332
+ window.open(url, "_self");
330
333
  this.active = false;
331
334
  if (this.chosenElem) this.chosenElem.opened = false;
332
335
  }
@@ -335,9 +338,6 @@ export default {
335
338
  this.chosenElem = this.listDropDown[index];
336
339
  this.$set(this.listDropDown[index], 'opened', !this.listDropDown[index].opened)
337
340
  },
338
- toAdtdev(url) {
339
- return this.isDev ? url.replace("adata", "adtdev") : url;
340
- }
341
341
  }
342
342
  };
343
343
  </script>