adata-ui 0.1.52 → 0.1.55

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.
@@ -1,89 +1,266 @@
1
1
  <template>
2
- <header :class="{'sticky': isSticky}">
3
- <InfoHeader
4
- :requestCount="requestCount"
5
- :daysRemaining="daysRemaining"
6
- :isAuthenticated="isAuthenticated"
7
- />
8
- <div class="header" :class="{'bordered': isBordered}">
9
- <div class="container">
10
- <div class="header__left">
11
- <a class="logo" :href="main[mode]">
12
- <svg class="adata-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 166 48">
13
- <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>
14
- <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>
15
- </svg>
16
- </a>
17
- <div class="menu" v-if="subheaderItems.length > 0">
18
- <a v-for="(item, index) in subheaderItems"
2
+ <header :class="{ sticky: isSticky }">
3
+ <InfoHeader
4
+ :weather="weather"
5
+ :currencies="currencies"
6
+ :system-message="systemMessage"
7
+ :requestCount="requestCount"
8
+ :daysRemaining="daysRemaining"
9
+ :is-open-notification="isOpenNotification"
10
+ :is-authenticated="isAuthenticated"
11
+ @closeNotification="closeNotification"
12
+ />
13
+ <div class="header" :class="{ bordered: isBordered }">
14
+ <div class="container">
15
+ <div class="header__left">
16
+ <a class="logo" :href="main[mode]">
17
+ <svg
18
+ class="adata-logo"
19
+ xmlns="http://www.w3.org/2000/svg"
20
+ viewBox="0 0 166 48"
21
+ >
22
+ <path
23
+ 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"
24
+ ></path>
25
+ <path
26
+ 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"
27
+ ></path>
28
+ </svg>
29
+ </a>
30
+ <div class="menu" v-if="headerItems.length > 0">
31
+ <a
32
+ v-for="(item, index) in headerItems"
19
33
  :key="index"
20
34
  class="menu__wrapper menu__items"
21
- :class="{active: item.key === activeTabKey}"
35
+ :class="{ active: item.key === activeTabKey }"
22
36
  :href="item[mode]"
23
- >
24
- {{ item.name }}
25
- </a>
26
- </div>
27
- </div>
28
- <div class="header__right">
29
- <slot name="chooseCountry"></slot>
30
- <Profile
31
- v-bind:profileDropDown="profileDropDown"
32
- :mode="mode"
33
- :isAuthenticated="isAuthenticated"
34
- :email="email"
35
- :loginUrl="loginUrl"
36
- :activeTabKey="activeTabKey"
37
- @showBalanceModal="(val) => { $emit('showBalanceModal', val) }"
38
- @setShowModal="(val) => { $emit('setShowModal', val) }"
39
- @logout="$emit('logout')"
40
- @setIsReplenishModal="(val) => { $emit('setIsReplenishModal', val) }"
41
- />
42
- <div class="menu_mobile--switcher" @click="changeValue">
43
- <!-- icon_hamburger -->
44
- <svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
45
- <path fill-rule="evenodd" clip-rule="evenodd" d="M2 4h20v2H2V4zm0 14h20v2H2v-2zm0-7h20v2H2v-2z"
46
- fill="#2C3E50"></path>
47
- </svg>
48
- </div>
49
- </div>
50
- </div>
51
- <MobileToggle v-slot="{ animationClass }">
52
- <div
53
- class="menu_mobile"
54
- :class="animationClass"
55
- v-show="subheaderItems.length > 0 && isOpen"
56
- >
57
- <div @click.stop="changeValue" class="mobile-table-head">
58
- <!-- close_hamburger -->
59
- <svg width="18" height="18" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
60
- <path fill-rule="evenodd" clip-rule="evenodd" d="M4.414 18.142L18.556 4l1.415 1.414L5.828 19.556l-1.414-1.414z"
61
- fill="#2C3E50"></path>
62
- <path fill-rule="evenodd" clip-rule="evenodd" d="M5.414 4l14.142 14.142-1.414 1.414L4 5.414 5.414 4z"
63
- fill="#2C3E50"></path>
64
- </svg>
65
- </div>
66
- <a
67
- v-for="(item, index) in subheaderItems"
68
- :key="index"
69
- class="menu_mobile-wrapper"
70
- :class="{'active-burger-tab': item.key === activeTabKey}"
71
- :href="item[mode]"
72
- >
73
- {{ item.name }}
74
- </a>
75
- </div>
76
- </MobileToggle>
77
- </div>
78
- </header>
37
+ >
38
+ {{ item.name }}
39
+ </a>
40
+ </div>
41
+ </div>
42
+ <div class="header__right">
43
+ <slot name="chooseCountry"></slot>
44
+ <Profile
45
+ :profileDropDown="profileDropDown"
46
+ :mode="mode"
47
+ :isAuthenticated="isAuthenticated"
48
+ :email="email"
49
+ :loginUrl="loginUrl"
50
+ :activeTabKey="activeTabKey"
51
+ @showBalanceModal="
52
+ (val) => {
53
+ $emit('showBalanceModal', val);
54
+ }
55
+ "
56
+ @setShowModal="
57
+ (val) => {
58
+ $emit('setShowModal', val);
59
+ }
60
+ "
61
+ @logout="$emit('logout')"
62
+ @setIsReplenishModal="
63
+ (val) => {
64
+ $emit('setIsReplenishModal', val);
65
+ }
66
+ "
67
+ />
68
+ <div class="menu_mobile--switcher" @click="changeValue">
69
+ <!-- icon_hamburger -->
70
+ <svg
71
+ width="24"
72
+ height="24"
73
+ fill="none"
74
+ xmlns="http://www.w3.org/2000/svg"
75
+ viewBox="0 0 24 24"
76
+ >
77
+ <path
78
+ fill-rule="evenodd"
79
+ clip-rule="evenodd"
80
+ d="M2 4h20v2H2V4zm0 14h20v2H2v-2zm0-7h20v2H2v-2z"
81
+ fill="#2C3E50"
82
+ ></path>
83
+ </svg>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ <MobileToggle v-slot="{ animationClass }">
88
+ <div
89
+ class="menu_mobile"
90
+ :class="animationClass"
91
+ v-show="headerItems.length > 0 && isOpen"
92
+ >
93
+ <div class="menu-wrapper">
94
+ <div @click.stop="changeValue" class="mobile-table-head">
95
+ <!-- close_hamburger -->
96
+ <svg
97
+ width="18"
98
+ height="18"
99
+ fill="none"
100
+ xmlns="http://www.w3.org/2000/svg"
101
+ viewBox="0 0 24 24"
102
+ >
103
+ <path
104
+ fill-rule="evenodd"
105
+ clip-rule="evenodd"
106
+ d="M4.414 18.142L18.556 4l1.415 1.414L5.828 19.556l-1.414-1.414z"
107
+ fill="#2C3E50"
108
+ ></path>
109
+ <path
110
+ fill-rule="evenodd"
111
+ clip-rule="evenodd"
112
+ d="M5.414 4l14.142 14.142-1.414 1.414L4 5.414 5.414 4z"
113
+ fill="#2C3E50"
114
+ ></path>
115
+ </svg>
116
+ </div>
117
+ <div class="menu__link">
118
+ <a
119
+ v-for="(item, index) in headerItems"
120
+ :key="index"
121
+ class="menu_mobile-wrapper"
122
+ :class="{ 'active-burger-tab': item.key === activeTabKey }"
123
+ :href="item[mode]"
124
+ >
125
+ {{ item.name }}
126
+ </a>
127
+ </div>
128
+ </div>
129
+ <div class="menu-mobile__info">
130
+ <div class="menu-mobile__info-header">
131
+ <span>Валюта</span>
132
+ <span>Покупка</span>
133
+ <span>Продажа</span>
134
+ </div>
135
+ <div class="menu-mobile__info-body">
136
+ <div v-for="(currency, index) in currencies" :key="index" class="menu-mobile__info-row">
137
+ <div class="menu-mobile__info-column">
138
+ <svg v-if="currency.currency === 'USD'" width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
139
+ <g clip-path="url(#clip0_179_1917)">
140
+ <path d="M26.4 0.5H-4V16.5H26.4V0.5Z" fill="white"/>
141
+ <path d="M26.4 0.5H-4V1.732H26.4V0.5Z" fill="#B22234"/>
142
+ <path d="M26.4 2.95996H-4V4.19196H26.4V2.95996Z" fill="#B22234"/>
143
+ <path d="M26.4 5.42407H-4V6.65607H26.4V5.42407Z" fill="#B22234"/>
144
+ <path d="M26.4 7.88403H-4V9.11603H26.4V7.88403Z" fill="#B22234"/>
145
+ <path d="M26.4 10.3479H-4V11.5799H26.4V10.3479Z" fill="#B22234"/>
146
+ <path d="M26.4 12.8081H-4V14.0401H26.4V12.8081Z" fill="#B22234"/>
147
+ <path d="M26.4 15.2681H-4V16.5001H26.4V15.2681Z" fill="#B22234"/>
148
+ <path d="M8.16 0.5H-4V9.116H8.16V0.5Z" fill="#3C3B6E"/>
149
+ <path d="M0.603882 1.20011L0.891882 1.40811L0.783882 1.75211L1.07188 1.54011L1.35988 1.75211L1.25188 1.40811L1.53988 1.20011H1.18388L1.07188 0.860107L0.959882 1.20011H0.603882Z" fill="white"/>
150
+ <path d="M2.61987 1.20011L2.90787 1.40811L2.79987 1.75211L3.08787 1.54011L3.37587 1.75211L3.26787 1.40811L3.55587 1.20011H3.19987L3.08787 0.860107L2.97587 1.20011H2.61987Z" fill="white"/>
151
+ <path d="M4.63599 1.20011L4.92399 1.40811L4.81599 1.75211L5.10399 1.54011L5.39199 1.75211L5.28399 1.40811L5.57199 1.20011H5.21599L5.10399 0.860107L4.99199 1.20011H4.63599Z" fill="white"/>
152
+ <path d="M6.65198 1.20011L6.93998 1.40811L6.83198 1.75211L7.11998 1.54011L7.40798 1.75211L7.29998 1.40811L7.58798 1.20011H7.23198L7.11998 0.860107L7.00798 1.20011H6.65198Z" fill="white"/>
153
+ <path d="M-0.403931 2.06412L-0.115931 2.27212L-0.223931 2.61612L0.0640694 2.40412L0.352069 2.61612L0.244069 2.27212L0.532069 2.06412H0.176069L0.0640694 1.72412L-0.0479305 2.06412H-0.403931Z" fill="white"/>
154
+ <path d="M1.61206 2.06412L1.90006 2.27212L1.79206 2.61612L2.08006 2.40412L2.36806 2.61612L2.26006 2.27212L2.54806 2.06412H2.19206L2.08006 1.72412L1.96806 2.06412H1.61206Z" fill="white"/>
155
+ <path d="M3.62817 2.06412L3.91617 2.27212L3.80817 2.61612L4.09617 2.40412L4.38417 2.61612L4.27617 2.27212L4.56417 2.06412H4.20817L4.09617 1.72412L3.98417 2.06412H3.62817Z" fill="white"/>
156
+ <path d="M5.64417 2.06412L5.93216 2.27212L5.82416 2.61612L6.11216 2.40412L6.40016 2.61612L6.29216 2.27212L6.58016 2.06412H6.22416L6.11216 1.72412L6.00016 2.06412H5.64417Z" fill="white"/>
157
+ <path d="M0.603882 2.92789L0.891882 3.13589L0.783882 3.47989L1.07188 3.26789L1.35988 3.47989L1.25188 3.13589L1.53988 2.92789H1.18388L1.07188 2.58789L0.959882 2.92789H0.603882Z" fill="white"/>
158
+ <path d="M2.61987 2.92789L2.90787 3.13589L2.79987 3.47989L3.08787 3.26789L3.37587 3.47989L3.26787 3.13589L3.55587 2.92789H3.19987L3.08787 2.58789L2.97587 2.92789H2.61987Z" fill="white"/>
159
+ <path d="M4.63599 2.92789L4.92399 3.13589L4.81599 3.47989L5.10399 3.26789L5.39199 3.47989L5.28399 3.13589L5.57199 2.92789H5.21599L5.10399 2.58789L4.99199 2.92789H4.63599Z" fill="white"/>
160
+ <path d="M6.65198 2.92789L6.93998 3.13589L6.83198 3.47989L7.11998 3.26789L7.40798 3.47989L7.29998 3.13589L7.58798 2.92789H7.23198L7.11998 2.58789L7.00798 2.92789H6.65198Z" fill="white"/>
161
+ <path d="M-0.380127 3.7959L-0.0881271 4.0039L-0.200127 4.3439L0.0878731 4.1359L0.379873 4.3439L0.267873 4.0039L0.555873 3.7959H0.199873L0.0878731 3.4519L-0.0201271 3.7959H-0.380127Z" fill="white"/>
162
+ <path d="M1.63599 3.7959L1.92399 4.0039L1.81599 4.3439L2.10399 4.1359L2.39599 4.3439L2.28399 4.0039L2.57199 3.7959H2.21599L2.10399 3.4519L1.99599 3.7959H1.63599Z" fill="white"/>
163
+ <path d="M3.65198 3.7959L3.94398 4.0039L3.83198 4.3439L4.11998 4.1359L4.41198 4.3439L4.29998 4.0039L4.58798 3.7959H4.23198L4.11998 3.4519L4.01198 3.7959H3.65198Z" fill="white"/>
164
+ <path d="M5.66797 3.7959L5.95597 4.0039L5.84797 4.3439L6.13597 4.1359L6.42797 4.3439L6.31597 4.0039L6.60397 3.7959H6.24797L6.13597 3.4519L6.02797 3.7959H5.66797Z" fill="white"/>
165
+ <path d="M0.635986 4.65201L0.923986 4.86001L0.811986 5.20401L1.10399 4.99201L1.39199 5.20401L1.27999 4.86001L1.57199 4.65201H1.21199L1.10399 4.31201L0.991986 4.65201H0.635986Z" fill="white"/>
166
+ <path d="M2.65198 4.65201L2.93998 4.86001L2.82798 5.20401L3.11998 4.99201L3.40798 5.20401L3.29598 4.86001L3.58798 4.65201H3.22798L3.11998 4.31201L3.00798 4.65201H2.65198Z" fill="white"/>
167
+ <path d="M4.66406 4.65201L4.95606 4.86001L4.84406 5.20401L5.13606 4.99201L5.42406 5.20401L5.31206 4.86001L5.60406 4.65201H5.24406L5.13606 4.31201L5.02406 4.65201H4.66406Z" fill="white"/>
168
+ <path d="M6.40002 4.84L6.69202 5.048L6.58002 5.392L6.87202 5.18L7.16002 5.392L7.04802 5.048L7.34002 4.84H6.98002L6.87202 4.5L6.76002 4.84H6.40002Z" fill="white"/>
169
+ <path d="M0.651978 6.35196L0.943977 6.55996L0.831978 6.90396L1.11998 6.69196L1.41198 6.90396L1.29998 6.55996L1.58798 6.35196H1.23198L1.11998 6.01196L1.01198 6.35196H0.651978Z" fill="white"/>
170
+ <path d="M2.66797 6.35196L2.95997 6.55996L2.84797 6.90396L3.13597 6.69196L3.42797 6.90396L3.31597 6.55996L3.60797 6.35196H3.24797L3.13597 6.01196L3.02797 6.35196H2.66797Z" fill="white"/>
171
+ <path d="M4.68396 6.35196L4.97596 6.55996L4.86396 6.90396L5.15196 6.69196L5.44396 6.90396L5.33196 6.55996L5.61996 6.35196H5.26396L5.15196 6.01196L5.04396 6.35196H4.68396Z" fill="white"/>
172
+ <path d="M6.69995 6.35196L6.99195 6.55996L6.87995 6.90396L7.16795 6.69196L7.45995 6.90396L7.34795 6.55996L7.63595 6.35196H7.27995L7.16795 6.01196L7.05995 6.35196H6.69995Z" fill="white"/>
173
+ <path d="M0.628174 8.07193L0.916174 8.28393L0.808174 8.62393L1.09617 8.41193L1.38817 8.62393L1.27617 8.28393L1.56417 8.07193H1.20817L1.09617 7.73193L0.988174 8.07193H0.628174Z" fill="white"/>
174
+ <path d="M2.64417 8.07193L2.93616 8.28393L2.82416 8.62393L3.11216 8.41193L3.40416 8.62393L3.29216 8.28393L3.58016 8.07193H3.22416L3.11216 7.73193L3.00416 8.07193H2.64417Z" fill="white"/>
175
+ <path d="M4.66016 8.07193L4.95216 8.28393L4.84016 8.62393L5.12816 8.41193L5.42016 8.62393L5.30816 8.28393L5.59616 8.07193H5.24016L5.12816 7.73193L5.02016 8.07193H4.66016Z" fill="white"/>
176
+ <path d="M6.67615 8.07193L6.96415 8.28393L6.85615 8.62393L7.14415 8.41193L7.43615 8.62393L7.32415 8.28393L7.61215 8.07193H7.25615L7.14415 7.73193L7.03615 8.07193H6.67615Z" fill="white"/>
177
+ <path d="M-0.376221 5.4921L-0.0842209 5.7041L-0.196221 6.0441L0.095779 5.8321L0.383779 6.0441L0.275779 5.7041L0.563779 5.4921H0.203779L0.095779 5.1521L-0.0162209 5.4921H-0.376221Z" fill="white"/>
178
+ <path d="M1.64417 5.4921L1.93217 5.7041L1.82017 6.0441L2.11217 5.8321L2.40017 6.0441L2.28817 5.7041L2.58017 5.4921H2.22017L2.11217 5.1521L2.00017 5.4921H1.64417Z" fill="white"/>
179
+ <path d="M3.65588 5.4921L3.94788 5.7041L3.83588 6.0441L4.12788 5.8321L4.41588 6.0441L4.30788 5.7041L4.59588 5.4921H4.23588L4.12788 5.1521L4.01588 5.4921H3.65588Z" fill="white"/>
180
+ <path d="M5.67188 5.4921L5.96387 5.7041L5.85187 6.0441L6.14387 5.8321L6.43187 6.0441L6.31987 5.7041L6.61187 5.4921H6.25187L6.14387 5.1521L6.03187 5.4921H5.67188Z" fill="white"/>
181
+ <path d="M-0.380127 7.21207L-0.0881271 7.42007L-0.200127 7.76007L0.0878731 7.55207L0.379873 7.76007L0.267873 7.42007L0.555873 7.21207H0.199873L0.0878731 6.87207L-0.0201271 7.21207H-0.380127Z" fill="white"/>
182
+ <path d="M1.63599 7.21207L1.92399 7.42007L1.81599 7.76007L2.10399 7.55207L2.39599 7.76007L2.28399 7.42007L2.57199 7.21207H2.21599L2.10399 6.87207L1.99599 7.21207H1.63599Z" fill="white"/>
183
+ <path d="M3.65198 7.21207L3.94398 7.42007L3.83198 7.76007L4.11998 7.55207L4.41198 7.76007L4.29998 7.42007L4.58798 7.21207H4.23198L4.11998 6.87207L4.01198 7.21207H3.65198Z" fill="white"/>
184
+ <path d="M5.66797 7.21207L5.95597 7.42007L5.84797 7.76007L6.13597 7.55207L6.42797 7.76007L6.31597 7.42007L6.60397 7.21207H6.24797L6.13597 6.87207L6.02797 7.21207H5.66797Z" fill="white"/>
185
+ </g>
186
+ <defs>
187
+ <clipPath id="clip0_179_1917">
188
+ <path d="M0 2.5C0 1.39543 0.895431 0.5 2 0.5H14C15.1046 0.5 16 1.39543 16 2.5V14.5C16 15.6046 15.1046 16.5 14 16.5H2C0.895431 16.5 0 15.6046 0 14.5V2.5Z" fill="white"/>
189
+ </clipPath>
190
+ </defs>
191
+ </svg>
192
+ <svg v-if="currency.currency === 'EUR'" width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
193
+ <path d="M0 2.5C0 1.39543 0.895431 0.5 2 0.5H14C15.1046 0.5 16 1.39543 16 2.5V14.5C16 15.6046 15.1046 16.5 14 16.5H2C0.895431 16.5 0 15.6046 0 14.5V2.5Z" fill="#314199"/>
194
+ <path d="M7.99479 12.5967L8.18355 13.1573L8.75857 13.1568L8.35044 13.4667L8.46265 14.0686L7.99479 13.7271L7.52542 14.0594L7.639 13.4667L7.23511 13.1549H7.80958L7.99479 12.5967Z" fill="#F8EC26"/>
195
+ <path d="M7.99479 2.85718L8.18355 3.41796L8.75857 3.41727L8.35044 3.72735L8.46265 4.32913L7.99479 3.98765L7.52542 4.31994L7.639 3.72735L7.23511 3.41535H7.80958L7.99479 2.85718Z" fill="#F8EC26"/>
196
+ <path d="M10.333 3.48364L10.5218 4.04428L11.097 4.04373L10.6888 4.35368L10.8009 4.95546L10.333 4.61411L9.86366 4.94641L9.97739 4.35368L9.57349 4.04181H10.148L10.333 3.48364Z" fill="#F8EC26"/>
197
+ <path d="M5.54397 3.48364L5.73273 4.04428L6.3079 4.04373L5.89976 4.35368L6.01184 4.95546L5.54397 4.61411L5.0746 4.94641L5.18832 4.35368L4.78442 4.04181H5.35877L5.54397 3.48364Z" fill="#F8EC26"/>
198
+ <path d="M10.333 11.9387L10.5218 12.4995L11.097 12.4989L10.6888 12.8089L10.8009 13.4107L10.333 13.0693L9.86366 13.4016L9.97739 12.8089L9.57349 12.4969H10.148L10.333 11.9387Z" fill="#F8EC26"/>
199
+ <path d="M5.54397 11.9387L5.73273 12.4995L6.3079 12.4989L5.89976 12.8089L6.01184 13.4107L5.54397 13.0693L5.0746 13.4016L5.18832 12.8089L4.78442 12.4969H5.35877L5.54397 11.9387Z" fill="#F8EC26"/>
200
+ <path d="M3.75309 5.32153L3.94185 5.88231L4.51688 5.88162L4.10888 6.1917L4.22082 6.79349L3.75309 6.45214L3.28372 6.7843L3.39731 6.1917L2.99341 5.8797H3.56789L3.75309 5.32153Z" fill="#F8EC26"/>
201
+ <path d="M12.1823 5.32153L12.3711 5.88231L12.9462 5.88162L12.5381 6.1917L12.6502 6.79349L12.1823 6.45214L11.7129 6.7843L11.8265 6.1917L11.4226 5.8797H11.9971L12.1823 5.32153Z" fill="#F8EC26"/>
202
+ <path d="M3.75309 10.1826L3.94185 10.7434L4.51688 10.7427L4.10888 11.0528L4.22082 11.6546L3.75309 11.3131L3.28372 11.6454L3.39731 11.0528L2.99341 10.7408H3.56789L3.75309 10.1826Z" fill="#F8EC26"/>
203
+ <path d="M12.1823 10.1826L12.3711 10.7434L12.9462 10.7427L12.5381 11.0528L12.6502 11.6546L12.1823 11.3131L11.7129 11.6454L11.8265 11.0528L11.4226 10.7408H11.9971L12.1823 10.1826Z" fill="#F8EC26"/>
204
+ <path d="M3.19682 7.73389L3.38558 8.29466L3.96074 8.29398L3.55261 8.60406L3.66469 9.20584L3.19682 8.86436L2.72745 9.19665L2.84103 8.60406L2.43713 8.29206H3.01161L3.19682 7.73389Z" fill="#F8EC26"/>
205
+ <path d="M12.799 7.73389L12.9877 8.29466L13.5629 8.29398L13.1548 8.60406L13.2668 9.20584L12.799 8.86436L12.3296 9.19665L12.4433 8.60406L12.0394 8.29206H12.6138L12.799 7.73389Z" fill="#F8EC26"/>
206
+ </svg>
207
+ <svg v-if="currency.currency === 'RUB'" width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
208
+ <g clip-path="url(#clip0_179_2012)">
209
+ <path d="M0 0.5C0 -0.60457 0.895431 -1.5 2 -1.5H18C19.1046 -1.5 20 -0.604569 20 0.5V5.5H0V0.5Z" fill="#F0F0F0"/>
210
+ <rect y="5.5" width="20" height="7" fill="#0039A6"/>
211
+ <path d="M0 11.5H20V16.5C20 17.6046 19.1046 18.5 18 18.5H2C0.895431 18.5 0 17.6046 0 16.5V11.5Z" fill="#D52B1E"/>
212
+ </g>
213
+ <defs>
214
+ <clipPath id="clip0_179_2012">
215
+ <rect y="0.5" width="16" height="16" rx="2" fill="white"/>
216
+ </clipPath>
217
+ </defs>
218
+ </svg>
219
+ <span>{{ currency.currency }}</span>
220
+ </div>
221
+ <div class="menu-mobile__info-column">
222
+ <span>{{ currency.buy }}</span>
223
+ <svg v-if="currency.buy_state === 'DOWN'" width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
224
+ <path d="M8 12.5249L12.3301 4.52507H3.66987L8 12.5249Z" fill="#FF2E43"/>
225
+ </svg>
226
+ <svg v-else width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
227
+ <path d="M8 4.47461L12.3301 12.4702H3.66987L8 4.47461Z" fill="#00B92D"/>
228
+ </svg>
229
+ </div>
230
+ <div class="menu-mobile__info-column">
231
+ <span>{{ currency.sell }}</span>
232
+ <svg v-if="currency.sell_state === 'DOWN'" width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
233
+ <path d="M8 12.5249L12.3301 4.52507H3.66987L8 12.5249Z" fill="#FF2E43"/>
234
+ </svg>
235
+ <svg v-else width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
236
+ <path d="M8 4.47461L12.3301 12.4702H3.66987L8 4.47461Z" fill="#00B92D"/>
237
+ </svg>
238
+ </div>
239
+ </div>
240
+ </div>
241
+ <div class="menu-mobile__info-footer">
242
+ <div class="menu-mobile__info-footer-item">
243
+ <span class="menu-mobile__info-footer-title">Cуточный лимит запросов:</span>
244
+ <span class="menu-mobile__info-footer-circle">{{ requestCount }}</span>
245
+ </div>
246
+ <div class="menu-mobile__info-footer-item">
247
+ <span class="menu-mobile__info-footer-title">Остаток дней:</span>
248
+ <span class="menu-mobile__info-footer-circle">{{ daysRemaining }}</span>
249
+ </div>
250
+ </div>
251
+ </div>
252
+ </div>
253
+ </MobileToggle>
254
+ </div>
255
+ </header>
79
256
  </template>
80
257
 
81
258
  <script>
82
- import { profileDropDown } from "../../configs/profileDropDown"
259
+ import { profileDropDown } from "../../configs/profileDropDown";
83
260
 
84
261
  import Profile from "./Profile";
85
262
  import MobileToggle from "../transitions/VerticalMobileToggle";
86
- import InfoHeader from "@/components/Header/InfoHeader";
263
+ import InfoHeader from "./InfoHeader";
87
264
 
88
265
  export default {
89
266
  components: {
@@ -96,123 +273,196 @@ export default {
96
273
  type: String,
97
274
  required: true,
98
275
  validator: function (value) {
99
- return ['prod', 'dev', 'staging'].indexOf(value) !== -1
100
- }
276
+ return ["prod", "dev", "staging"].indexOf(value) !== -1;
277
+ },
101
278
  },
102
279
  isAuthenticated: {
103
280
  type: Boolean,
104
- default: false
281
+ default: false,
105
282
  },
106
283
  isBordered: {
107
284
  type: Boolean,
108
- default: false
285
+ default: false,
109
286
  },
110
287
  isSticky: {
111
288
  type: Boolean,
112
- default: false
289
+ default: false,
113
290
  },
114
291
  requestCount: {
115
292
  type: [String, Number],
116
- default: null
293
+ default: null,
117
294
  },
118
295
  daysRemaining: {
119
296
  type: [String, Number],
120
- default: null
297
+ default: null,
121
298
  },
122
299
  email: {
123
300
  type: String,
124
- default: ""
301
+ default: "",
125
302
  },
126
303
  loginUrl: {
127
304
  type: String,
128
305
  default: "",
129
- required: true
306
+ required: true,
130
307
  },
131
308
  activeTabKey: {
132
309
  type: String,
133
310
  default: "",
134
- required: true
311
+ required: true,
135
312
  },
136
313
  balance: {
137
314
  type: Number,
138
- default: 0
139
- }
315
+ default: 0,
316
+ },
140
317
  },
141
318
  data() {
142
319
  return {
143
320
  profileDropDown,
144
321
  main: {
145
- dev: 'https://adtdev.kz',
146
- prod: 'https://adata.kz',
147
- staging: 'https://adada.kz'
322
+ dev: "https://adtdev.kz",
323
+ prod: "https://adata.kz",
324
+ staging: "https://adada.kz",
148
325
  },
149
- subheaderItems: [
326
+ headerItems: [
150
327
  {
151
328
  id: 1,
152
329
  name: "Контрагенты",
153
- dev: 'https://pk.adtdev.kz',
154
- prod: 'https://pk.adata.kz',
155
- staging: 'https://pk.adada.kz',
156
- key: 'counterparty'
330
+ dev: "https://pk.adtdev.kz",
331
+ prod: "https://pk.adata.kz",
332
+ staging: "https://pk.adada.kz",
333
+ key: "counterparty",
157
334
  },
158
335
  {
159
336
  id: 2,
160
337
  name: "Тендеры",
161
- dev: 'https://tender.adtdev.kz',
162
- prod: 'https://tender.adata.kz',
163
- staging: 'https://tender.adada.kz',
164
- key: 'tenders'
338
+ dev: "https://tender.adtdev.kz",
339
+ prod: "https://tender.adata.kz",
340
+ staging: "https://tender.adada.kz",
341
+ key: "tenders",
165
342
  },
166
343
  {
167
344
  id: 3,
168
345
  name: "Работа",
169
- dev: 'https://work.adtdev.kz',
170
- prod: 'https://work.adata.kz',
171
- staging: 'https://work.adada.kz',
172
- key: 'work'
346
+ dev: "https://work.adtdev.kz",
347
+ prod: "https://work.adata.kz",
348
+ staging: "https://work.adada.kz",
349
+ key: "work",
173
350
  },
174
351
  {
175
352
  id: 4,
176
353
  name: "Штрафы",
177
- dev: 'https://avto.adtdev.kz',
178
- prod: 'https://avto.adata.kz',
179
- staging: 'https://avto.adada.kz',
180
- key: 'fines'
354
+ dev: "https://avto.adtdev.kz",
355
+ prod: "https://avto.adata.kz",
356
+ staging: "https://avto.adada.kz",
357
+ key: "fines",
181
358
  },
182
359
  {
183
360
  id: 5,
184
361
  name: "Маркетинг",
185
- dev: 'https://marketing.adtdev.kz',
186
- prod: 'https://marketing.adata.kz',
187
- staging: 'https://marketing.adada.kz',
188
- key: 'marketing'
189
- }
362
+ dev: "https://marketing.adtdev.kz",
363
+ prod: "https://marketing.adata.kz",
364
+ staging: "https://marketing.adada.kz",
365
+ key: "marketing",
366
+ },
190
367
  ],
191
- isOpen: false
368
+ isOpen: false,
369
+ weather: null,
370
+ currencies: null,
371
+ systemMessage: null,
372
+ timer: null,
373
+ isOpenNotification: false,
192
374
  };
193
375
  },
376
+
377
+ created() {
378
+ this.fetchCurrencies();
379
+ this.fetchWeather()
380
+ },
194
381
  mounted() {
195
382
  this.setBalance(this.balance);
383
+ this.timer = setTimeout(this.fetchNotification, 3000);
384
+ },
385
+ watch: {
386
+ balance(newBalance) {
387
+ this.setBalance(newBalance);
388
+ },
389
+ isOpenNotification() {
390
+ if(!this.isOpenNotification) {
391
+ clearTimeout(this.timer);
392
+ }
393
+ }
196
394
  },
197
395
  methods: {
396
+ async fetchNotification() {
397
+ try {
398
+ const response = await fetch('https://users.adtdev.kz/api/v1/system-messages/active-list/?module_name=counterparty');
399
+ const { data } = await response.json();
400
+
401
+ if (data.details.length) {
402
+ this.systemMessage = data.details[0].message;
403
+ this.isOpenNotification = true;
404
+ }
405
+
406
+ } catch(e) {
407
+ console.log(e.message)
408
+ }
409
+ },
410
+ async fetchCurrencies() {
411
+ try {
412
+ const response = await fetch('https://users.adata.kz/api/v1/information/currency');
413
+ const { data } = await response.json();
414
+
415
+ if(data.currencies) {
416
+ this.currencies = data.currencies;
417
+ }
418
+
419
+ } catch(e) {
420
+ console.log(e.message)
421
+ }
422
+ },
423
+ async fetchWeather() {
424
+ try {
425
+ const response = await fetch('https://users.adata.kz/api/v1/information/weather');
426
+ const { data } = await response.json();
427
+
428
+ if(data.cities) {
429
+ this.weather = data.cities;
430
+ }
431
+
432
+ } catch(e) {
433
+ console.log(e.message)
434
+ }
435
+ },
436
+ closeNotification(option) {
437
+ this.isOpenNotification = !option
438
+ },
198
439
  changeValue() {
199
- this.isOpen = !this.isOpen
200
- this.$emit('menuOpen', this.isOpen)
440
+ this.isOpen = !this.isOpen;
441
+ this.$emit("menuOpen", this.isOpen);
201
442
  },
202
443
  setBalance(balance) {
203
444
  if (balance !== 0) {
204
- this.profileDropDown[2].name = 'Текущий баланс: ' + this.thousandSeparator(balance) + ' ₸';
445
+ this.profileDropDown[2].name =
446
+ "Текущий баланс: " + this.thousandSeparator(balance) + " ₸";
205
447
  }
206
448
  },
207
449
  thousandSeparator(val) {
208
- return val ? val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " "): '';
450
+ return val ? val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ") : "";
451
+ },
452
+ defineIconState(name) {
453
+ return name === "DOWN" ? "@/assets/icons/arrow-down.svg" : "@/assets/icons/arrow-up.svg";
454
+ },
455
+ defineIconEntity(name) {
456
+ switch (name) {
457
+ case 'USD':
458
+ return "@/assets/icons/dollor.svg";
459
+ case 'EUR':
460
+ return "@/assets/icons/euro.svg";
461
+ case 'RUB':
462
+ return "@/assets/icons/ruble.svg";
463
+ }
209
464
  },
210
465
  },
211
- watch: {
212
- balance(newBalance) {
213
- this.setBalance(newBalance);
214
- }
215
- }
216
466
  };
217
467
  </script>
218
468
 
@@ -237,12 +487,12 @@ export default {
237
487
  display: flex;
238
488
  align-items: center;
239
489
  @media (max-width: 1025px) {
240
- border-bottom: 1px solid #2C3E5026;
490
+ border-bottom: 1px solid #2c3e5026;
241
491
  height: 40px;
242
492
  }
243
493
 
244
494
  &.bordered {
245
- border-bottom: 1px solid #2C3E5026;
495
+ border-bottom: 1px solid #2c3e5026;
246
496
  }
247
497
 
248
498
  & > .container {
@@ -301,7 +551,7 @@ export default {
301
551
  }
302
552
 
303
553
  &:hover {
304
- color: #9DA3AC;
554
+ color: #9da3ac;
305
555
  cursor: pointer;
306
556
  }
307
557
  }
@@ -316,7 +566,7 @@ export default {
316
566
  height: 26px;
317
567
  display: block;
318
568
  fill: #2c3e50;
319
- @media(max-width: 1025px) {
569
+ @media (max-width: 1025px) {
320
570
  width: 77px;
321
571
  height: 24px;
322
572
  }
@@ -336,7 +586,9 @@ export default {
336
586
  }
337
587
 
338
588
  @media (max-width: 1025px) {
339
- display: block;
589
+ display: flex;
590
+ flex-direction: column;
591
+ justify-content: space-between;
340
592
  .mobile-table-head {
341
593
  padding: 11px 16px;
342
594
  display: flex;
@@ -344,7 +596,7 @@ export default {
344
596
  background: #2c3e500d;
345
597
  }
346
598
  &-wrapper {
347
- border-top: 1px solid #9DA3AC4C;
599
+ border-top: 1px solid #9da3ac4c;
348
600
  padding: 14px 16px;
349
601
  font-weight: 600;
350
602
  font-size: 16px;
@@ -353,7 +605,7 @@ export default {
353
605
  display: block;
354
606
 
355
607
  &:last-child {
356
- border-bottom: 1px solid #9DA3AC4C;
608
+ border-bottom: 1px solid #9da3ac4c;
357
609
  }
358
610
 
359
611
  &.active-burger-tab {
@@ -367,6 +619,72 @@ export default {
367
619
  }
368
620
  }
369
621
  }
622
+
623
+ .menu-mobile__info {
624
+ &-header {
625
+ background: rgba(189, 199, 206, 0.2);
626
+ padding: 4px 16px;
627
+ display: flex;
628
+ justify-content: space-between;
629
+ align-items: center;
630
+ span {
631
+ font-weight: 500;
632
+ font-size: 12px;
633
+ line-height: 20px;
634
+ color: #666C72;
635
+ }
636
+ }
637
+ &-body {
638
+ padding: 8px 16px 16px;
639
+ display: flex;
640
+ flex-direction: column;
641
+ justify-content: space-between;
642
+ gap: 12px;
643
+ }
644
+ &-row {
645
+ display: flex;
646
+ justify-content: space-between;
647
+ align-items: center;
648
+ }
649
+ &-column {
650
+ display: flex;
651
+ align-items: center;
652
+ gap: 8px;
653
+ span {
654
+ font-weight: 500;
655
+ font-size: 14px;
656
+ line-height: 20px;
657
+ color: #2C3E50;
658
+ }
659
+ }
660
+ &-footer {
661
+ background: rgba(189, 199, 206, 0.2);
662
+ padding: 8px 16px;
663
+ display: flex;
664
+ flex-direction: column;
665
+ gap: 10px;
666
+ &-item {
667
+ display: flex;
668
+ justify-content: space-between;
669
+ align-items: center;
670
+ }
671
+ &-title {
672
+ font-weight: 500;
673
+ font-size: 14px;
674
+ line-height: 20px;
675
+ color: #2C3E50;
676
+ }
677
+ &-circle {
678
+ color: #ffffff;
679
+ padding: 4px 12px;
680
+ background: #007AFF;
681
+ border-radius: 100px;
682
+ font-weight: 500;
683
+ font-size: 14px;
684
+ line-height: 20px;
685
+ }
686
+ }
687
+ }
370
688
  }
371
689
 
372
690
  </style>