@webitel/ui-sdk 24.6.15 → 24.6.17

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,13 +1,13 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "24.6.15",
3
+ "version": "24.6.17",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vite build",
8
8
  "serve": "vite preview",
9
9
  "test:unit": "vitest",
10
- "lint:fix": "eslint --fix --ext .js,.vue src",
10
+ "lint:fix": "eslint --fix src",
11
11
  "publish-lib": "npm run test:unit && npm run build && npm publish --access public",
12
12
  "publish-lib:testless": "npm run build && npm publish --access public",
13
13
  "docs:dev": "vitepress dev docs --port 8080",
@@ -62,7 +62,7 @@
62
62
  "vue-multiselect": "^3.0.0-beta.3",
63
63
  "vue-observe-visibility": "^2.0.0-alpha.1",
64
64
  "vue-router": "^4.1.6",
65
- "webitel-sdk": "^24.2.6"
65
+ "webitel-sdk": "^24.2.16"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@vitejs/plugin-vue": "5.0.4",
@@ -70,8 +70,8 @@
70
70
  "@vue/compat": "^3.4.15",
71
71
  "@vue/compiler-sfc": "^3.4.15",
72
72
  "@vue/test-utils": "^2.4.5",
73
- "eslint": "^8.53.0",
74
- "eslint-plugin-vue": "^9.18.1",
73
+ "eslint": "^9.3.0",
74
+ "eslint-plugin-vue": "^9.26.0",
75
75
  "globby": "^14.0.0",
76
76
  "happy-dom": "^14.11.0",
77
77
  "markdown-it": "^13.0.2",
@@ -71,7 +71,7 @@ const getCalendar = async ({ itemId: id }) => {
71
71
  accepts: [],
72
72
  excepts: [],
73
73
  };
74
- // eslint-disable-next-line no-param-reassign
74
+
75
75
  copy.accepts = copy.accepts.map((accept) => ({
76
76
  day: accept.day || 0,
77
77
  disabled: accept.disabled || false,
@@ -79,7 +79,7 @@ const getCalendar = async ({ itemId: id }) => {
79
79
  end: accept.endTimeOfDay || 0,
80
80
  }));
81
81
  if (copy.excepts) {
82
- // eslint-disable-next-line no-param-reassign
82
+
83
83
  copy.excepts = copy.excepts.map((except) => ({
84
84
  name: except.name || '',
85
85
  date: except.date || 0,
@@ -84,7 +84,7 @@ const getUser = async ({ itemId: id }) => {
84
84
  const copy = deepCopy(item);
85
85
  if (copy.license) {
86
86
  copy.license.forEach((item) => {
87
- // eslint-disable-next-line no-param-reassign
87
+
88
88
  item.name = item.prod;
89
89
  });
90
90
  }
@@ -118,9 +118,9 @@ const getUser = async ({ itemId: id }) => {
118
118
  const preRequestHandler = (item) => {
119
119
  const copy = deepCopy(item);
120
120
  if (item.device && !item.device.id) delete copy.device;
121
- // eslint-disable-next-line no-param-reassign
121
+
122
122
  if (copy.roles) copy.roles.forEach((copy) => delete copy.text);
123
- // eslint-disable-next-line no-param-reassign
123
+
124
124
  if (copy.devices) copy.devices.forEach((copy) => delete copy.text);
125
125
  if (copy.license) {
126
126
  copy.license = copy.license.map((copy) => ({ id: copy.id }));
@@ -10,7 +10,7 @@
10
10
  </template>
11
11
 
12
12
  <script>
13
- /* eslint-disable no-param-reassign */
13
+
14
14
  // https://markus.oberlehner.net/blog/transition-to-height-auto-with-vue/
15
15
  export default {
16
16
  name: 'WtExpandTransition',
@@ -33,19 +33,19 @@ export default {
33
33
 
34
34
  // Force repaint to make sure the
35
35
  // animation is triggered correctly.
36
- // eslint-disable-next-line no-unused-expressions
36
+
37
37
  getComputedStyle(element).height;
38
38
 
39
- // eslint-disable-next-line no-return-assign
39
+
40
40
  requestAnimationFrame(() => element.style.height = height);
41
41
  },
42
42
  leave(element) {
43
43
  const { height } = getComputedStyle(element);
44
44
  element.style.height = height;
45
- // eslint-disable-next-line no-unused-expressions
45
+
46
46
  getComputedStyle(element).height;
47
47
 
48
- // eslint-disable-next-line no-return-assign
48
+
49
49
  requestAnimationFrame(() => element.style.height = 0);
50
50
  },
51
51
  },
@@ -5,8 +5,8 @@
5
5
  :style="{ background: `var(--${colorVariable})` }"
6
6
  >
7
7
  <img
8
- class="wt-badge__pic"
9
8
  v-if="iconBadgePic"
9
+ class="wt-badge__pic"
10
10
  :src="iconBadgePic"
11
11
  :alt="iconBadge"
12
12
  >
@@ -6,7 +6,7 @@
6
6
  @mousedown="emit('mousedown', $event)"
7
7
  @click="emit('click', $event)"
8
8
  >
9
- <!-- prevent icon-btn classes to fall to wt-icon -->
9
+ <!-- prevent icon-btn classes to fall to wt-icon -->
10
10
  <wt-icon
11
11
  v-bind="{ ...$attrs, class: '' }"
12
12
  :disabled="disabled"
@@ -1,4 +1,4 @@
1
- /* eslint-disable no-multi-spaces */
1
+
2
2
 
3
3
  const AdminSections = Object.freeze({
4
4
  // DIRECTORY
@@ -5,7 +5,7 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
- import { QueueType } from 'webitel-sdk/esm2015/enums/index';
8
+ import { QueueType } from 'webitel-sdk/esm2015/enums/index.js';
9
9
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum';
10
10
  import AuditorSections
11
11
  from '../../enums/WebitelApplications/AuditorSections.enum';
@@ -5,7 +5,7 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
- import { QueueType } from 'webitel-sdk/esm2015/enums/index';
8
+ import { QueueType } from 'webitel-sdk/esm2015/enums/index.js';
9
9
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum';
10
10
  import AuditorSections
11
11
  from '../../enums/WebitelApplications/AuditorSections.enum';
@@ -13,7 +13,7 @@ const messages = {
13
13
  kz,
14
14
  };
15
15
 
16
- // eslint-disable-next-line new-cap
16
+
17
17
  export default createI18n({
18
18
  // legacy: false,
19
19
  locale: 'en',
@@ -5,7 +5,7 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
- import { QueueType } from 'webitel-sdk/esm2015/enums/index';
8
+ import { QueueType } from 'webitel-sdk/esm2015/enums/index.js';
9
9
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum';
10
10
  import CrmSections from '../../enums/WebitelApplications/CrmSections.enum';
11
11
  import SupervisorSections
@@ -5,7 +5,7 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
- import { QueueType } from 'webitel-sdk/esm2015/enums/index';
8
+ import { QueueType } from 'webitel-sdk/esm2015/enums/index.js';
9
9
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum';
10
10
  import AuditorSections
11
11
  from '../../enums/WebitelApplications/AuditorSections.enum';
@@ -5,7 +5,7 @@ import {
5
5
  ChannelType,
6
6
  EngineRoutingSchemaType,
7
7
  } from 'webitel-sdk';
8
- import { QueueType } from 'webitel-sdk/esm2015/enums/index';
8
+ import { QueueType } from 'webitel-sdk/esm2015/enums/index.js';
9
9
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum';
10
10
  import AuditorSections
11
11
  from '../../enums/WebitelApplications/AuditorSections.enum';
@@ -40,7 +40,7 @@ export function useValidation({ v: inputV, customValidators: inputCustomValidato
40
40
  }
41
41
 
42
42
  if (customValidators && customValidators.value) {
43
- // eslint-disable-next-line no-restricted-syntax
43
+
44
44
  for (const { name, text } of customValidators.value) {
45
45
  if (v.value[name]?.$invalid) validationText = text;
46
46
  }
@@ -37,7 +37,7 @@ export default {
37
37
  else if (this.v.websocketValidator?.$invalid) validationText = `${this.$t('validation.websocketValidator')}`;
38
38
  else if (this.v.integer?.$invalid) validationText = `${this.$t('validation.integer')}`;
39
39
  }
40
- // eslint-disable-next-line no-restricted-syntax
40
+
41
41
  for (const { name, text } of this.customValidators) {
42
42
  if (this.v[name]?.$invalid) validationText = text;
43
43
  }
@@ -61,7 +61,7 @@ export default class CSVExport {
61
61
  let page = 1;
62
62
 
63
63
  do {
64
- // eslint-disable-next-line no-await-in-loop
64
+
65
65
  const { items, next } = await this.fetchMethod({
66
66
  ...params,
67
67
  page,
@@ -4,7 +4,7 @@ import JSZip from 'jszip';
4
4
  import path from 'path-browserify';
5
5
  import generateMediaURL from './scripts/generateMediaURL';
6
6
 
7
- /* eslint-disable no-await-in-loop, no-restricted-syntax */
7
+
8
8
  export default class FilesExport {
9
9
  filename = 'files';
10
10
 
@@ -19,7 +19,7 @@ const getNotificationSound = (action) => {
19
19
  case ChatActions.Close:
20
20
  return new Audio(endChatSound);
21
21
  case CallActions.Ringing:
22
- // eslint-disable-next-line no-case-declarations
22
+
23
23
  const audio = new Audio(ringingSound);
24
24
  audio.loop = true;
25
25
  return audio;
@@ -204,11 +204,11 @@ export default class ApplicationsAccess {
204
204
  static minify(access) {
205
205
  const rmEmptyKeys = (obj) => {
206
206
  Object.keys(obj).forEach((key) => {
207
- // eslint-disable-next-line no-param-reassign
207
+
208
208
  if (!obj[key] || key === '_locale') delete obj[key];
209
209
  if (typeof obj[key] === 'object') {
210
210
  rmEmptyKeys(obj[key]);
211
- // eslint-disable-next-line no-param-reassign
211
+
212
212
  if (!Object.keys(obj[key]).length) delete obj[key];
213
213
  }
214
214
  });
@@ -130,7 +130,7 @@ const install = (app) => {
130
130
 
131
131
  onResize();
132
132
 
133
- // eslint-disable-next-line no-param-reassign
133
+
134
134
  app.config.globalProperties.$breakpoint = breakpoint;
135
135
  };
136
136