@webitel/ui-sdk 23.12.20 → 23.12.22

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": "23.12.20",
3
+ "version": "23.12.22",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build --target lib --name ui-sdk ./src/install.js",
@@ -48,6 +48,7 @@
48
48
  "is-valid-domain": "^0.1.6",
49
49
  "jszip": "^3.5.0",
50
50
  "jszip-utils": "^0.1.0",
51
+ "lodash": "^4.17.21",
51
52
  "node-polyfill-webpack-plugin": "^1.1.4",
52
53
  "plyr": "3.6.2",
53
54
  "query-string": "^8.1.0",
@@ -73,6 +74,7 @@
73
74
  "@vue/eslint-config-airbnb": "^6.0.0",
74
75
  "@vue/test-utils": "^2.3.0",
75
76
  "@vue/vue3-jest": "^29.2.2",
77
+ "babel-preset-vite": "^1.1.0",
76
78
  "bamboo-jest-reporter": "^1.0.3",
77
79
  "eslint": "^8.14.0",
78
80
  "eslint-plugin-import": "^2.20.2",
@@ -3,7 +3,7 @@ import axios from 'axios';
3
3
  // 'X-Webitel-Access' ~ 'X-Access-Token'
4
4
  const generateInstance = ({ interceptors } = {}) => {
5
5
  const instance = axios.create({
6
- baseURL: process.env.VUE_APP_API_URL,
6
+ baseURL: process ? process.env.VUE_APP_API_URL : import.meta.env.VITE_API_URL,
7
7
  headers: {
8
8
  'X-Webitel-Access': localStorage.getItem('access-token') || '',
9
9
  },
@@ -2,7 +2,7 @@ import { shallowMount } from '@vue/test-utils';
2
2
  import WtPlayer from '../wt-player.vue';
3
3
 
4
4
  describe('WtPlayer', () => {
5
- xit('renders a component', () => {
5
+ it.skip('renders a component', () => {
6
6
  const wrapper = shallowMount(WtPlayer);
7
7
  expect(wrapper.classes('wt-player')).toBe(true);
8
8
  });
@@ -101,7 +101,7 @@ export default {
101
101
  methods: {
102
102
  async setupPlayer() {
103
103
  await this.$nextTick(); // test is failing to render component if element is passed to Plyr as Vue $ref
104
- const baseURL = this.$baseURL || process.env.BASE_URL;
104
+ const baseURL = this.$baseURL || process.env.BASE_URL || import.meta.env.BASE_URL;
105
105
  if (this.player) this.player.destroy();
106
106
  const controls = [
107
107
  'play-large', 'play', 'progress', 'current-time',
@@ -35,6 +35,7 @@ const AdminSections = Object.freeze({
35
35
  STORAGE: 'storage', // scope: storage_profile
36
36
  COGNITIVE_PROFILES: 'cognitive-profiles', // scope: cognitive_profile
37
37
  EMAIL_PROFILES: 'email-profiles', // scope: email_profile
38
+ SINGLE_SIGN_ON: 'single-sign-on', // scope: single-sign-on
38
39
  IMPORT_CSV: 'import-csv',
39
40
  TRIGGERS: 'triggers',
40
41
 
Binary file
@@ -223,6 +223,7 @@ export default {
223
223
  [AdminSections.STORAGE]: 'Storage',
224
224
  [AdminSections.COGNITIVE_PROFILES]: 'Cognitive profiles',
225
225
  [AdminSections.EMAIL_PROFILES]: 'Email profiles',
226
+ [AdminSections.SINGLE_SIGN_ON]: 'Single Sign-on',
226
227
  [AdminSections.IMPORT_CSV]: 'Imports of CSV from file',
227
228
  [AdminSections.TRIGGERS]: 'Triggers',
228
229
  [AdminSections.MEDIA]: 'Media files',
@@ -188,6 +188,7 @@ export default {
188
188
  [AdminSections.STORAGE]: 'Almacenamiento',
189
189
  [AdminSections.COGNITIVE_PROFILES]: 'Perfiles de voz',
190
190
  [AdminSections.EMAIL_PROFILES]: 'Perfiles de correo electrónico',
191
+ [AdminSections.SINGLE_SIGN_ON]: 'Single Sign-on',
191
192
  [AdminSections.IMPORT_CSV]: 'Importación de datos de archivos CSV',
192
193
  [AdminSections.TRIGGERS]: 'Activadores',
193
194
  [AdminSections.ROLES]: 'Funciones',
@@ -222,6 +222,7 @@ export default {
222
222
  [AdminSections.STORAGE]: 'Хранилища',
223
223
  [AdminSections.COGNITIVE_PROFILES]: 'Голосовые профили',
224
224
  [AdminSections.EMAIL_PROFILES]: 'Email профили',
225
+ [AdminSections.SINGLE_SIGN_ON]: 'Single Sign-on',
225
226
  [AdminSections.IMPORT_CSV]: 'Импорт данных из CSV файлов',
226
227
  [AdminSections.TRIGGERS]: 'Триггеры',
227
228
  [AdminSections.ROLES]: 'Роли',
@@ -222,6 +222,7 @@ export default {
222
222
  [AdminSections.STORAGE]: 'Сховища',
223
223
  [AdminSections.COGNITIVE_PROFILES]: 'Голосові профілі',
224
224
  [AdminSections.EMAIL_PROFILES]: 'Email профілі',
225
+ [AdminSections.SINGLE_SIGN_ON]: 'Single Sign-on',
225
226
  [AdminSections.IMPORT_CSV]: 'Імпорт даних з CSV файлів',
226
227
  [AdminSections.TRIGGERS]: 'Тригери',
227
228
  [AdminSections.ROLES]: 'Ролі',
@@ -1,6 +1,6 @@
1
1
  const generateMediaURL = (id) => {
2
2
  const token = localStorage.getItem('access-token');
3
- const BASE_URL = process.env.VUE_APP_API_URL;
3
+ const BASE_URL = process ? process.env.VUE_APP_API_URL : import.meta.env.VITE_API_URL;
4
4
  return `${BASE_URL}/storage/recordings/${id}/stream?access_token=${token}`;
5
5
  };
6
6
 
@@ -135,6 +135,10 @@ const applicationsAccess = (value = true) => ({
135
135
  _enabled: value,
136
136
  _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.EMAIL_PROFILES}`,
137
137
  },
138
+ [AdminSections.SINGLE_SIGN_ON]: {
139
+ _enabled: value,
140
+ _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.SINGLE_SIGN_ON}`,
141
+ },
138
142
  [AdminSections.IMPORT_CSV]: {
139
143
  _enabled: value,
140
144
  _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.IMPORT_CSV}`,
@@ -16,7 +16,7 @@
16
16
  <script>
17
17
  import AuthAPI from '../api/auth';
18
18
 
19
- const authURL = process.env.VUE_APP_AUTH_MODULE_URL;
19
+ const authURL = process ? process.env.VUE_APP_AUTH_MODULE_URL : import.meta.env.VITE_AUTH_MODE_URL;
20
20
 
21
21
  export default {
22
22
  name: 'auth',
@@ -1,4 +1,4 @@
1
- import lodashDebounce from 'lodash.debounce';
1
+ import lodashDebounce from 'lodash/debounce';
2
2
 
3
3
  const debounce = (fn, wait = 1000, options) => lodashDebounce(fn, wait, options);
4
4