@webitel/ui-sdk 3.2.107 → 3.2.108

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": "@webitel/ui-sdk",
3
- "version": "3.2.107",
3
+ "version": "3.2.108",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -155,50 +155,59 @@
155
155
  </a>
156
156
  </li>
157
157
 
158
+ <li
159
+ v-if="formattedApps[WebitelApplications.CRM]"
160
+ :class="{'active': formattedApps[WebitelApplications.CRM].currentApp }"
161
+ class="wt-app-navigator__card"
162
+ >
163
+ <a
164
+ :href="formattedApps[WebitelApplications.CRM].href"
165
+ :title="$t(`webitelUI.appNavigator.${[WebitelApplications.CRM]}`)"
166
+ class="wt-app-navigator__card__link"
167
+ target="_blank"
168
+ >
169
+ <img
170
+ :alt="`${[WebitelApplications.CRM]}-pic`"
171
+ class="wt-app-navigator__card__img"
172
+ src="../../../assets/components/organisms/wt-app-header/app-navigator/app-crm.svg"
173
+ >
174
+ </a>
175
+ </li>
176
+
158
177
  </ul>
159
178
  </nav>
160
179
  </transition>
161
180
  </div>
162
181
  </template>
163
182
 
164
- <script>
183
+ <script setup>
184
+ import { computed, ref } from 'vue';
165
185
  import WebitelApplications from '../../../enums/WebitelApplications/WebitelApplications.enum';
166
186
 
167
- export default {
168
- name: 'wt-app-navigator',
169
- data: () => ({
170
- WebitelApplications,
171
- isOpened: false,
172
- }),
173
-
174
- props: {
175
- currentApp: {
176
- type: String,
177
- },
178
- apps: {
179
- type: Array,
180
- default: () => [],
181
- },
187
+ const props = defineProps({
188
+ currentApp: {
189
+ type: String,
182
190
  },
183
-
184
- computed: {
185
- formattedApps() {
186
- return this.apps.reduce((apps, app) => ({
187
- ...apps,
188
- [app.name]: {
189
- ...app,
190
- currentApp: this.currentApp === app.name,
191
- },
192
- }), {});
193
- },
191
+ apps: {
192
+ type: Array,
193
+ default: () => [],
194
194
  },
195
+ });
195
196
 
196
- methods: {
197
- close() {
198
- this.isOpened = false;
199
- },
197
+ const isOpened = ref(false);
198
+
199
+ const formattedApps = computed(() => props.apps.reduce((apps, app) => ({
200
+ ...apps,
201
+ [app.name]: {
202
+ ...app,
203
+ currentApp: props.currentApp === app.name,
200
204
  },
201
- };
205
+ }), {}));
206
+
207
+ function close() {
208
+ isOpened.value = false;
209
+ }
210
+
202
211
  </script>
203
212
 
204
213
  <style lang="scss" scoped>
Binary file