@webitel/ui-sdk 3.2.113 → 3.2.115

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.113",
3
+ "version": "3.2.115",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -21,6 +21,9 @@
21
21
  >
22
22
  <!-- <a> click.prevent prevents redirect to # -->
23
23
  <a
24
+ :class="[
25
+ { 'wt-context-menu__option--disabled': option.disabled },
26
+ ]"
24
27
  class="wt-context-menu__option"
25
28
  href="#"
26
29
  @click.prevent="handleOptionClick({ option, index, hide })"
@@ -40,7 +43,7 @@ const props = defineProps({
40
43
  options: {
41
44
  type: Array,
42
45
  required: true,
43
- description: '[{ text }]',
46
+ description: '[{ text, disabled, ... anything you need }]',
44
47
  },
45
48
  visible: {
46
49
  type: Boolean,
@@ -100,16 +103,21 @@ function handleOptionClick({ option, index, hide }) {
100
103
  &:only-of-type {
101
104
  border-radius: var(--border-radius);
102
105
  }
103
-
104
- &:hover {
105
- background-color: var(--context-menu-option-color--hover);
106
- transition: var(--transition);
107
- }
108
106
  }
109
107
 
110
108
  .wt-context-menu__option {
111
109
  display: block;
112
110
  padding: var(--context-menu-option-padding);
113
111
  cursor: pointer;
112
+
113
+ &:hover {
114
+ background-color: var(--context-menu-option-color--hover);
115
+ transition: var(--transition);
116
+ }
117
+
118
+ &--disabled {
119
+ pointer-events: none;
120
+ color: var(--context-menu-option-color--disabled);
121
+ }
114
122
  }
115
123
  </style>
@@ -4,4 +4,6 @@
4
4
  --context-menu-background-color: var(--main-color);
5
5
 
6
6
  --context-menu-option-padding: var(--spacing-xs);
7
+
8
+ --context-menu-option-color--disabled: var(--text--disabled-color);
7
9
  }
@@ -1,6 +1,7 @@
1
1
  import jszipUtils from 'jszip-utils';
2
2
  import { saveAs } from 'file-saver';
3
3
  import JSZip from 'jszip';
4
+ import path from 'path';
4
5
  import generateMediaURL from './scripts/generateMediaURL';
5
6
 
6
7
  /* eslint-disable no-await-in-loop, no-restricted-syntax */
@@ -47,7 +48,9 @@ export default class FilesExport {
47
48
  } else {
48
49
  const binary = await this._fetchFileBinary(item.id);
49
50
  const ext = item.mimeType.split('/').pop();
50
- zip.file(`${item.name}.${ext}`, binary);
51
+ // itemName needed to remove extension from item.name https://stackoverflow.com/a/31615711
52
+ const itemName = path.parse(item.name).name;
53
+ zip.file(`${itemName}.${ext}`, binary);
51
54
  this.downloadProgress.count += 1;
52
55
  }
53
56
  }