@webitel/ui-sdk 1.0.26 → 1.0.29
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/dist/ui-sdk.common.js +96 -85
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +96 -85
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +2 -2
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +6 -5
- package/src/components/atoms/wt-badge/wt-badge.vue +1 -1
- package/src/components/molecules/wt-checkbox/__tests__/WtCheckbox.spec.js +2 -2
- package/src/components/molecules/wt-radio/__tests__/WtRadio.spec.js +2 -2
- package/src/components/molecules/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -2
- package/src/components/molecules/wt-switcher/__tests__/WtSwitcher.spec.js +2 -2
- package/src/components/organisms/wt-pagination/__tests__/WtPagination.spec.js +1 -2
- package/src/components/organisms/wt-player/wt-player.vue +13 -0
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +1 -2
- package/src/scripts/__tests__/debounce.spec.js +1 -2
- package/CHANGELOG.md +0 -44
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve-lib": "vue-cli-service serve",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@johmun/vue-tags-input": "^2.1.0",
|
|
28
|
+
"@vue/vue2-jest": "^27.0.0-alpha.4",
|
|
28
29
|
"bamboo-jest-reporter": "^1.0.3",
|
|
29
30
|
"core-js": "^3.6.5",
|
|
30
31
|
"csv-stringify": "^5.5.1",
|
|
@@ -34,7 +35,6 @@
|
|
|
34
35
|
"jszip": "^3.5.0",
|
|
35
36
|
"jszip-utils": "^0.1.0",
|
|
36
37
|
"plyr": "3.6.2",
|
|
37
|
-
"sass": "^1.34.0",
|
|
38
38
|
"svg-sprite-loader": "^5.0.0",
|
|
39
39
|
"vue": "^2.6.11",
|
|
40
40
|
"vue-i18n": "^8.18.2",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@vue/cli-plugin-babel": "~4.4.0",
|
|
50
50
|
"@vue/cli-plugin-eslint": "~4.4.0",
|
|
51
51
|
"@vue/cli-plugin-router": "^4.5.4",
|
|
52
|
-
"@vue/cli-plugin-unit-jest": "
|
|
52
|
+
"@vue/cli-plugin-unit-jest": "^5.0.4",
|
|
53
53
|
"@vue/cli-service": "~4.4.0",
|
|
54
54
|
"@vue/eslint-config-airbnb": "^5.0.2",
|
|
55
55
|
"@vue/test-utils": "^1.3.0",
|
|
@@ -57,10 +57,11 @@
|
|
|
57
57
|
"eslint": "^6.7.2",
|
|
58
58
|
"eslint-plugin-import": "^2.20.2",
|
|
59
59
|
"eslint-plugin-vue": "^6.2.2",
|
|
60
|
+
"husky": "^7.0.0",
|
|
61
|
+
"sass": "^1.49.11",
|
|
60
62
|
"sass-loader": "^10.2.0",
|
|
61
63
|
"svg-url-loader": "^6.0.0",
|
|
62
64
|
"vue-template-compiler": "^2.6.11",
|
|
63
|
-
"vuex": "^3.6.2"
|
|
64
|
-
"husky": "^7.0.0"
|
|
65
|
+
"vuex": "^3.6.2"
|
|
65
66
|
}
|
|
66
67
|
}
|
|
@@ -35,7 +35,7 @@ describe('WtCheckbox', () => {
|
|
|
35
35
|
},
|
|
36
36
|
propsData: { selected },
|
|
37
37
|
});
|
|
38
|
-
wrapper.find('.wt-
|
|
39
|
-
expect(wrapper.emitted().change
|
|
38
|
+
wrapper.find('.wt-checkbox__input').trigger('change');
|
|
39
|
+
expect(wrapper.emitted().change[0]).toEqual([!selected]);
|
|
40
40
|
});
|
|
41
41
|
});
|
|
@@ -36,7 +36,7 @@ describe('WtRadio', () => {
|
|
|
36
36
|
},
|
|
37
37
|
propsData: { selected, value },
|
|
38
38
|
});
|
|
39
|
-
wrapper.find('.wt-
|
|
40
|
-
expect(wrapper.emitted().input
|
|
39
|
+
wrapper.find('.wt-radio__input').trigger('input');
|
|
40
|
+
expect(wrapper.emitted().input[0]).toEqual([value]);
|
|
41
41
|
});
|
|
42
42
|
});
|
|
@@ -12,7 +12,7 @@ describe('WtSearchBar', () => {
|
|
|
12
12
|
expect(wrapper.classes('wt-search-bar')).toBe(true);
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
it('debounces search event when debounce prop is true', async (
|
|
15
|
+
it('debounces search event when debounce prop is true', async () => {
|
|
16
16
|
const props = {
|
|
17
17
|
value: '',
|
|
18
18
|
debounce: true,
|
|
@@ -30,7 +30,6 @@ describe('WtSearchBar', () => {
|
|
|
30
30
|
expect(wrapper.emitted().search).toBeFalsy();
|
|
31
31
|
await setTimeout(() => {
|
|
32
32
|
expect(wrapper.emitted().search[0].length).toBe(1);
|
|
33
|
-
done();
|
|
34
33
|
}, 1000);
|
|
35
34
|
});
|
|
36
35
|
});
|
|
@@ -25,7 +25,7 @@ describe('WtSwitcher', () => {
|
|
|
25
25
|
stubs: { WtLabel },
|
|
26
26
|
propsData: { value },
|
|
27
27
|
});
|
|
28
|
-
wrapper.find('.wt-
|
|
29
|
-
expect(wrapper.emitted().change
|
|
28
|
+
wrapper.find('.wt-switcher__input').trigger('change');
|
|
29
|
+
expect(wrapper.emitted().change[0]).toEqual([!value]);
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -7,7 +7,7 @@ describe('WtPagination', () => {
|
|
|
7
7
|
expect(wrapper.classes('wt-pagination')).toBe(true);
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
it('debounces size change event when debounce prop is true', async (
|
|
10
|
+
it('debounces size change event when debounce prop is true', async () => {
|
|
11
11
|
const props = {
|
|
12
12
|
size: '10',
|
|
13
13
|
debounce: true,
|
|
@@ -21,7 +21,6 @@ describe('WtPagination', () => {
|
|
|
21
21
|
expect(wrapper.emitted().change).toBeFalsy();
|
|
22
22
|
await setTimeout(() => {
|
|
23
23
|
expect(wrapper.emitted().change[0].length).toBe(1);
|
|
24
|
-
done();
|
|
25
24
|
}, 1000);
|
|
26
25
|
});
|
|
27
26
|
|
|
@@ -52,6 +52,11 @@ export default {
|
|
|
52
52
|
type: Boolean,
|
|
53
53
|
default: true,
|
|
54
54
|
},
|
|
55
|
+
// plyr is caching volume settings so we should reset them at init
|
|
56
|
+
resetVolume: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
55
60
|
},
|
|
56
61
|
data: () => ({
|
|
57
62
|
player: null,
|
|
@@ -102,9 +107,17 @@ export default {
|
|
|
102
107
|
active: this.loop,
|
|
103
108
|
},
|
|
104
109
|
});
|
|
110
|
+
|
|
111
|
+
if (this.resetVolume) this.makeVolumeReset();
|
|
112
|
+
if (this.download) this.setupDownload();
|
|
113
|
+
|
|
105
114
|
this.appendCloseIcon();
|
|
106
115
|
this.$emit('initialized', this.player);
|
|
107
116
|
},
|
|
117
|
+
makeVolumeReset() {
|
|
118
|
+
this.player.volume = 1;
|
|
119
|
+
this.player.muted = false;
|
|
120
|
+
},
|
|
108
121
|
setupDownload() {
|
|
109
122
|
if (!this.download) this.setupPlayer();
|
|
110
123
|
else if (typeof this.download === 'string') {
|
|
@@ -43,7 +43,7 @@ describe('Auth', () => {
|
|
|
43
43
|
expect(wrapper.classes('auth-wrap')).toBe(true);
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
it('sets token, gets session and opens app after auth token message emit', async (
|
|
46
|
+
it('sets token, gets session and opens app after auth token message emit', async () => {
|
|
47
47
|
const accessToken = 'hello there';
|
|
48
48
|
window.postMessage({ accessToken }, '*');
|
|
49
49
|
await setTimeout(() => {
|
|
@@ -51,7 +51,6 @@ describe('Auth', () => {
|
|
|
51
51
|
expect(userinfoAPI.getSession).toHaveBeenCalled();
|
|
52
52
|
expect(userinfoAPI.getApplicationsAccess).toHaveBeenCalled();
|
|
53
53
|
expect(router.replace).toHaveBeenCalled();
|
|
54
|
-
done();
|
|
55
54
|
}, 100);
|
|
56
55
|
});
|
|
57
56
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import debounce from '../debounce';
|
|
2
2
|
|
|
3
3
|
describe('debounce', () => {
|
|
4
|
-
it('debounces call', async (
|
|
4
|
+
it('debounces call', async () => {
|
|
5
5
|
let isFnCalled = false;
|
|
6
6
|
let fn = () => { isFnCalled = true; };
|
|
7
7
|
fn = debounce(fn, 50);
|
|
@@ -9,7 +9,6 @@ describe('debounce', () => {
|
|
|
9
9
|
expect(isFnCalled).toBeFalsy();
|
|
10
10
|
await setTimeout(() => {
|
|
11
11
|
expect(isFnCalled).toBeTruthy();
|
|
12
|
-
done();
|
|
13
12
|
}, 100);
|
|
14
13
|
});
|
|
15
14
|
});
|
package/CHANGELOG.md
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Webitel UI Changelog
|
|
2
|
-
|
|
3
|
-
## [1.0.0] - 02.02.2022
|
|
4
|
-
|
|
5
|
-
### What's new
|
|
6
|
-
|
|
7
|
-
1. Border-radius pill style: `--border-radius--pill: 50px`
|
|
8
|
-
1. New typography styles (`subtitle`, `caption`, `overline`)
|
|
9
|
-
1. 10 different Elevation variables (`--elevation-1` - `--elevation-10`)
|
|
10
|
-
1. `secondary-50` icon color
|
|
11
|
-
1. added `size` prop with `sm` and `md` values (default is `md`) for:
|
|
12
|
-
- `<wt-rounded-action>`
|
|
13
|
-
- `<wt-button>`
|
|
14
|
-
- `<wt-indicator>`
|
|
15
|
-
|
|
16
|
-
### Breaking changes
|
|
17
|
-
|
|
18
|
-
1. `<wt-badge>` renamed to `<wt-chip>`
|
|
19
|
-
1. removed a dash (`-`) from spacings system (for ex. `--spacing--sm` -> `--spacing-sm`)
|
|
20
|
-
1. Removed all deprecated spacings variables. Existing components moved to newest ones.
|
|
21
|
-
1. Removed all deprecated colors variables. Existing components moved to newest ones.
|
|
22
|
-
1. Removed deprecated `--box-shadow` css variable
|
|
23
|
-
1. Removed `strong` typography classes. (`strong` typo -> `subtitle` typo)
|
|
24
|
-
1. Now font-family is used like "Montserrat" (without "Regular" or "Semi"). Boldness
|
|
25
|
-
is regulated by `font-weight` property.
|
|
26
|
-
1. Typo size suffixes update: `-sm`, `-md`, `-lg` -> `-3`, `-2`, `-1`
|
|
27
|
-
1. Removed `--label-margin` variable. Now visual offset between label and input is
|
|
28
|
-
provided by label's line-height
|
|
29
|
-
|
|
30
|
-
### Changes
|
|
31
|
-
|
|
32
|
-
1. Updated spacings: `spacing-multiplicator` value increased from `4px` to `8px`.
|
|
33
|
-
1. Updated typography:
|
|
34
|
-
- updated font files, added special font files for each `font-weight`
|
|
35
|
-
property (`100`-`900`) and style (`italic`)
|
|
36
|
-
- font-sizes of typography
|
|
37
|
-
- line-heights of typography
|
|
38
|
-
|
|
39
|
-
1. (Almost?) all component paddings, spacings, etc. moved to `spacing` variables
|
|
40
|
-
1. Refactored placeholder:
|
|
41
|
-
- removed hover
|
|
42
|
-
- removeed outline styles
|
|
43
|
-
- focus style now is more transparent than default state
|
|
44
|
-
1. Many component styles reviewed and updated
|