@webitel/ui-sdk 23.12.39-vite-6 → 23.12.40
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/demo.html +1 -0
- package/dist/img/sprite/index.js +1 -147
- package/dist/ui-sdk.common.js +43304 -0
- package/dist/ui-sdk.common.js.map +1 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +43303 -18
- package/dist/ui-sdk.umd.js.map +1 -0
- package/dist/ui-sdk.umd.min.js +35 -0
- package/dist/ui-sdk.umd.min.js.map +1 -0
- package/package.json +38 -20
- package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +3 -3
- package/src/components/on-demand/wt-save-failed-popup/__tests__/WtPopup.spec.js +9 -0
- package/src/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue +70 -0
- package/src/components/transitions/wt-expand-transition.vue +2 -2
- package/src/components/wt-app-header/wt-app-header.vue +2 -2
- package/src/components/wt-app-header/wt-app-navigator.vue +5 -6
- package/src/components/wt-app-header/wt-header-actions.vue +14 -30
- package/src/components/wt-avatar/wt-avatar.vue +2 -2
- package/src/components/wt-badge/wt-badge.vue +3 -3
- package/src/components/wt-button/wt-button.vue +3 -5
- package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +4 -4
- package/src/components/wt-button-select/wt-button-select.vue +3 -3
- package/src/components/wt-checkbox/wt-checkbox.vue +7 -12
- package/src/components/wt-chip/wt-chip.vue +3 -6
- package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
- package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
- package/src/components/wt-datepicker/wt-datepicker.vue +12 -14
- package/src/components/wt-divider/wt-divider.vue +1 -1
- package/src/components/wt-dummy/wt-dummy.vue +2 -6
- package/src/components/wt-error-page/wt-error-page.vue +4 -10
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
- package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +4 -7
- package/src/components/wt-headline/wt-headline.vue +4 -4
- package/src/components/wt-headline-nav/wt-headline-nav.vue +4 -11
- package/src/components/wt-hint/wt-hint.vue +4 -4
- package/src/components/wt-icon/wt-icon.vue +5 -5
- package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
- package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
- package/src/components/wt-icon-btn/wt-icon-btn.vue +1 -1
- package/src/components/wt-indicator/wt-indicator.vue +3 -6
- package/src/components/wt-input/wt-input.vue +182 -193
- package/src/components/wt-input-info/wt-input-info.vue +2 -2
- package/src/components/wt-item-link/wt-item-link.vue +1 -1
- package/src/components/wt-label/wt-label.vue +2 -2
- package/src/components/wt-load-bar/wt-load-bar.vue +2 -5
- package/src/components/wt-loader/_internals/wt-loader--md.vue +2 -11
- package/src/components/wt-loader/_internals/wt-loader--sm.vue +2 -9
- package/src/components/wt-loader/wt-loader.vue +3 -10
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +8 -16
- package/src/components/wt-notification/wt-notification.vue +3 -3
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +5 -9
- package/src/components/wt-page-header/wt-page-header.vue +8 -7
- package/src/components/wt-page-wrapper/wt-page-wrapper.vue +5 -8
- package/src/components/wt-pagination/wt-pagination.vue +15 -17
- package/src/components/wt-player/wt-player.vue +16 -16
- package/src/components/wt-popup/wt-popup.vue +7 -13
- package/src/components/wt-progress-bar/wt-progress-bar.vue +7 -11
- package/src/components/wt-radio/wt-radio.vue +7 -15
- package/src/components/wt-rounded-action/wt-rounded-action.vue +2 -2
- package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
- package/src/components/wt-search-bar/wt-search-bar.vue +5 -6
- package/src/components/wt-select/_multiselect.scss +1 -0
- package/src/components/wt-select/wt-select.vue +19 -33
- package/src/components/wt-slider/wt-slider.vue +5 -5
- package/src/components/wt-status-select/wt-status-select.vue +9 -9
- package/src/components/wt-stepper/wt-stepper.vue +6 -8
- package/src/components/wt-switcher/wt-switcher.vue +7 -12
- package/src/components/wt-table/wt-table.vue +72 -110
- package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
- package/src/components/wt-table-column-select/wt-table-column-select.vue +26 -28
- package/src/components/wt-tabs/wt-tabs.vue +7 -7
- package/src/components/wt-tags-input/wt-tags-input.vue +15 -23
- package/src/components/wt-textarea/wt-textarea.vue +10 -15
- package/src/components/wt-time-input/wt-time-input.vue +4 -7
- package/src/components/wt-timepicker/wt-timepicker.vue +15 -19
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
- package/src/components/wt-tooltip/wt-tooltip.vue +4 -4
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
- package/src/css/styleguide/colors/_colors.scss +8 -9
- package/src/locale/en/en.js +5 -0
- package/src/locale/i18n.js +1 -1
- package/src/locale/kz/kz.js +5 -0
- package/src/locale/ru/ru.js +5 -0
- package/src/locale/ua/ua.js +5 -0
- package/src/mixins/validationMixin/useValidation.js +2 -2
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +9 -11
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +5 -6
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +6 -10
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
- package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
- package/src/modules/AuditForm/components/audit-form.vue +5 -6
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +4 -7
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
- package/src/modules/CSVExport/__tests__/CSVExport.spec.js +2 -2
- package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +6 -6
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +6 -13
- package/src/modules/FilesExport/__tests__/FilesExport.spec.js +3 -3
- package/src/modules/Filters/components/filter-pagination.vue +1 -1
- package/src/modules/Filters/components/filter-table-fields.vue +1 -1
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +3 -3
- package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
- package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +4 -4
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
- package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
- package/src/modules/QueryFilters/components/filter-from-to.vue +10 -12
- package/src/modules/QueryFilters/components/filter-search.vue +2 -2
- package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +4 -4
- package/src/modules/Userinfo/components/the-auth.vue +4 -7
- package/src/scripts/saveAsJSON.js +7 -0
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
- package/dist/favicon.ico +0 -0
- package/dist/plyr.svg +0 -70
- package/dist/ui-sdk.mjs +0 -22678
- package/src/components/wt-input/Readme.md +0 -96
- package/src/css/styleguide/colors/reusable/_text-field.scss +0 -20
- package/src/locale/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "23.12.
|
|
3
|
+
"version": "23.12.40",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"lint:fix": "eslint --fix --ext .js,.vue src",
|
|
6
|
+
"build": "vue-cli-service build --target lib --name ui-sdk ./src/install.js",
|
|
7
|
+
"test:unit": "vue-cli-service test:unit",
|
|
8
|
+
"lint": "vue-cli-service lint --fix",
|
|
9
|
+
"build:app": "vue-cli-service build",
|
|
11
10
|
"prepare": "husky install",
|
|
12
11
|
"publish-lib": "npm run test:unit && npm run build && npm publish --access public",
|
|
13
|
-
"publish-lib:testless": "npm run build && npm publish --access public"
|
|
12
|
+
"publish-lib:testless": "npm run build && npm publish --access public",
|
|
13
|
+
"serve-lib": "vue-cli-service serve",
|
|
14
|
+
"styleguide": "vue-cli-service styleguidist",
|
|
15
|
+
"styleguide:build": "vue-cli-service styleguidist:build"
|
|
14
16
|
},
|
|
15
|
-
"main": "./dist/@webitel/ui-sdk.
|
|
17
|
+
"main": "./dist/@webitel/ui-sdk.common.js",
|
|
16
18
|
"files": [
|
|
17
19
|
"dist/*",
|
|
18
20
|
"src/api/*",
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
"@vuepic/vue-datepicker": "^4.4.0",
|
|
39
41
|
"@vueuse/components": "^10.5.0",
|
|
40
42
|
"clipboard-copy": "^4.0.1",
|
|
43
|
+
"core-js": "^3.6.5",
|
|
41
44
|
"csv-stringify": "^5.5.3",
|
|
42
45
|
"deep-copy": "^1.4.2",
|
|
43
46
|
"deep-equal": "^2.0.3",
|
|
@@ -46,7 +49,8 @@
|
|
|
46
49
|
"jszip": "^3.5.0",
|
|
47
50
|
"jszip-utils": "^0.1.0",
|
|
48
51
|
"lodash": "^4.17.21",
|
|
49
|
-
"
|
|
52
|
+
"node-polyfill-webpack-plugin": "^1.1.4",
|
|
53
|
+
"plyr": "3.6.2",
|
|
50
54
|
"query-string": "^8.1.0",
|
|
51
55
|
"sortablejs": "^1.15.0",
|
|
52
56
|
"tiny-emitter": "^2.1.0",
|
|
@@ -58,21 +62,35 @@
|
|
|
58
62
|
"webitel-sdk": "^23.7.5"
|
|
59
63
|
},
|
|
60
64
|
"devDependencies": {
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
65
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
66
|
+
"@babel/preset-react": "^7.22.15",
|
|
67
|
+
"@testing-library/jest-dom": "^5.16.2",
|
|
68
|
+
"@vue/cli-plugin-babel": "~5.0.8",
|
|
69
|
+
"@vue/cli-plugin-eslint": "~5.0.8",
|
|
70
|
+
"@vue/cli-plugin-router": "^5.0.8",
|
|
71
|
+
"@vue/cli-plugin-unit-jest": "^5.0.8",
|
|
72
|
+
"@vue/cli-service": "~5.0.8",
|
|
63
73
|
"@vue/compiler-sfc": "^3.2.47",
|
|
74
|
+
"@vue/eslint-config-airbnb": "^6.0.0",
|
|
64
75
|
"@vue/test-utils": "^2.3.0",
|
|
76
|
+
"@vue/vue3-jest": "^29.2.2",
|
|
77
|
+
"babel-preset-vite": "^1.1.0",
|
|
65
78
|
"bamboo-jest-reporter": "^1.0.3",
|
|
66
|
-
"eslint": "^8.
|
|
67
|
-
"eslint-plugin-
|
|
68
|
-
"
|
|
69
|
-
"husky": "^
|
|
79
|
+
"eslint": "^8.14.0",
|
|
80
|
+
"eslint-plugin-import": "^2.20.2",
|
|
81
|
+
"eslint-plugin-vue": "^8.7.1",
|
|
82
|
+
"husky": "^7.0.0",
|
|
83
|
+
"jest-environment-jsdom": "^29.4.3",
|
|
70
84
|
"sass": "^1.51.0",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"vite-plugin-svg-sprite": "^0.5.0",
|
|
75
|
-
"vitest": "^0.34.6",
|
|
85
|
+
"sass-loader": "^12.6.0",
|
|
86
|
+
"svg-sprite-loader": "^6.0.11",
|
|
87
|
+
"vue-cli-plugin-styleguidist": "~4.72.4",
|
|
76
88
|
"vuex": "^4.1.0"
|
|
89
|
+
},
|
|
90
|
+
"overrides": {
|
|
91
|
+
"@vue/vue3-jest": "^29.2.2",
|
|
92
|
+
"vue": "^3.2.47",
|
|
93
|
+
"babel-jest": "^29.*",
|
|
94
|
+
"jest": "^29.*"
|
|
77
95
|
}
|
|
78
96
|
}
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
color="disabled"
|
|
5
5
|
:text="status.offline"
|
|
6
6
|
:size="size"
|
|
7
|
-
|
|
7
|
+
></wt-indicator>
|
|
8
8
|
<wt-indicator
|
|
9
9
|
color="success"
|
|
10
10
|
:text="status.online"
|
|
11
11
|
:size="size"
|
|
12
|
-
|
|
12
|
+
></wt-indicator>
|
|
13
13
|
<wt-indicator
|
|
14
14
|
color="primary"
|
|
15
15
|
:text="status.pause"
|
|
16
16
|
:size="size"
|
|
17
|
-
|
|
17
|
+
></wt-indicator>
|
|
18
18
|
</article>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtSaveFailedPopup from '../wt-save-failed-popup.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtSaveFailedPopup', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtSaveFailedPopup);
|
|
7
|
+
expect(wrapper.classes('wt-save-failed-popup')).toBe(true);
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wt-popup
|
|
3
|
+
class="wt-save-failed-popup"
|
|
4
|
+
:width="500"
|
|
5
|
+
@close="closePopup"
|
|
6
|
+
>
|
|
7
|
+
<template #title>
|
|
8
|
+
{{ $t('webitelUI.saveFailedPopup.title') }}
|
|
9
|
+
</template>
|
|
10
|
+
<template #main>
|
|
11
|
+
<div class="flow-save-filed-popup__wrapper">
|
|
12
|
+
<wt-icon
|
|
13
|
+
color="error"
|
|
14
|
+
icon="attention"
|
|
15
|
+
/>
|
|
16
|
+
<p>{{ $t('webitelUI.saveFailedPopup.label') }}</p>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
<template #actions>
|
|
20
|
+
<wt-button
|
|
21
|
+
@click="save"
|
|
22
|
+
>
|
|
23
|
+
{{ $t('reusable.retry') }}
|
|
24
|
+
</wt-button>
|
|
25
|
+
<wt-button
|
|
26
|
+
color="secondary"
|
|
27
|
+
@click="download"
|
|
28
|
+
>
|
|
29
|
+
{{ $t('webitelUI.saveFailedPopup.exportToJson') }}
|
|
30
|
+
</wt-button>
|
|
31
|
+
<wt-button
|
|
32
|
+
color="secondary"
|
|
33
|
+
@click="closePopup"
|
|
34
|
+
>
|
|
35
|
+
{{ $t('reusable.close') }}
|
|
36
|
+
</wt-button>
|
|
37
|
+
</template>
|
|
38
|
+
</wt-popup>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
export default {
|
|
43
|
+
name: 'FlowSaveFailedPopup',
|
|
44
|
+
emits: ['close-popup', 'save', 'download'],
|
|
45
|
+
methods: {
|
|
46
|
+
closePopup() {
|
|
47
|
+
this.$emit('close-popup');
|
|
48
|
+
},
|
|
49
|
+
save() {
|
|
50
|
+
this.$emit('save');
|
|
51
|
+
},
|
|
52
|
+
download() {
|
|
53
|
+
this.$emit('download');
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style lang="scss" scoped>
|
|
60
|
+
.flow-save-filed-popup__wrapper {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
text-align: center;
|
|
65
|
+
|
|
66
|
+
.wt-icon {
|
|
67
|
+
margin-bottom: var(--spacing-sm);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@enter="enter"
|
|
6
6
|
@leave="leave"
|
|
7
7
|
>
|
|
8
|
-
<slot
|
|
8
|
+
<slot></slot>
|
|
9
9
|
</transition>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
/* eslint-disable no-param-reassign */
|
|
14
14
|
// https://markus.oberlehner.net/blog/transition-to-height-auto-with-vue/
|
|
15
15
|
export default {
|
|
16
|
-
name: '
|
|
16
|
+
name: 'wt-expand-transition',
|
|
17
17
|
methods: {
|
|
18
18
|
afterEnter(element) {
|
|
19
19
|
element.style.height = 'auto';
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-clickaway="close"
|
|
4
|
-
class="wt-app-navigator"
|
|
5
|
-
>
|
|
2
|
+
<div v-clickaway="close" class="wt-app-navigator">
|
|
6
3
|
<wt-tooltip>
|
|
7
|
-
<template
|
|
4
|
+
<template v-slot:activator>
|
|
8
5
|
<wt-icon-btn
|
|
9
6
|
:class="{'active': isOpened}"
|
|
10
7
|
class="wt-app-navigator__btn"
|
|
11
8
|
icon="app-navigator"
|
|
12
9
|
@click="isOpened = !isOpened"
|
|
13
|
-
|
|
10
|
+
></wt-icon-btn>
|
|
14
11
|
</template>
|
|
15
12
|
{{ $t('webitelUI.appNavigator.title') }}
|
|
16
13
|
</wt-tooltip>
|
|
@@ -24,6 +21,7 @@
|
|
|
24
21
|
{{ $t('webitelUI.appNavigator.title') }}
|
|
25
22
|
</h3>
|
|
26
23
|
<ul class="wt-app-navigator__nav">
|
|
24
|
+
|
|
27
25
|
<li
|
|
28
26
|
v-if="formattedApps[WebitelApplications.AGENT]"
|
|
29
27
|
:class="{'active': formattedApps[WebitelApplications.AGENT].currentApp }"
|
|
@@ -175,6 +173,7 @@
|
|
|
175
173
|
>
|
|
176
174
|
</a>
|
|
177
175
|
</li>
|
|
176
|
+
|
|
178
177
|
</ul>
|
|
179
178
|
</nav>
|
|
180
179
|
</transition>
|
|
@@ -1,37 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="wt-header-actions">
|
|
3
3
|
<wt-tooltip>
|
|
4
|
-
<template
|
|
4
|
+
<template v-slot:activator>
|
|
5
5
|
<wt-icon-btn
|
|
6
6
|
v-clickaway="close"
|
|
7
7
|
:class="{'active': isOpened}"
|
|
8
8
|
class="wt-header-actions__btn"
|
|
9
9
|
icon="account"
|
|
10
10
|
@click="isOpened = !isOpened"
|
|
11
|
-
|
|
11
|
+
></wt-icon-btn>
|
|
12
12
|
</template>
|
|
13
13
|
{{ $t('webitelUI.headerActions.account') }}
|
|
14
14
|
</wt-tooltip>
|
|
15
15
|
|
|
16
16
|
<transition name="fade">
|
|
17
|
-
<section
|
|
18
|
-
v-
|
|
19
|
-
class="wt-header-actions__panel-wrapper"
|
|
20
|
-
>
|
|
21
|
-
<header
|
|
22
|
-
v-if="isHeader"
|
|
23
|
-
class="wt-header-actions__header"
|
|
24
|
-
>
|
|
17
|
+
<section v-show="isOpened" class="wt-header-actions__panel-wrapper">
|
|
18
|
+
<header v-if="isHeader" class="wt-header-actions__header">
|
|
25
19
|
<h3
|
|
26
20
|
class="wt-header-actions__name"
|
|
27
|
-
>
|
|
28
|
-
{{ userName }}
|
|
29
|
-
</h3>
|
|
21
|
+
>{{ userName }}</h3>
|
|
30
22
|
<p
|
|
31
23
|
class="wt-header-actions__account"
|
|
32
|
-
>
|
|
33
|
-
{{ userAccount }}
|
|
34
|
-
</p>
|
|
24
|
+
>{{ userAccount }}</p>
|
|
35
25
|
</header>
|
|
36
26
|
<ul class="wt-header-actions__actions-wrapper">
|
|
37
27
|
<li class="wt-header-actions__action">
|
|
@@ -41,7 +31,7 @@
|
|
|
41
31
|
target="_blank"
|
|
42
32
|
@click="close"
|
|
43
33
|
>
|
|
44
|
-
<wt-icon icon="docs"
|
|
34
|
+
<wt-icon icon="docs"></wt-icon>
|
|
45
35
|
<span>{{ $t('webitelUI.headerActions.docs') }}</span>
|
|
46
36
|
</a>
|
|
47
37
|
</li>
|
|
@@ -50,7 +40,7 @@
|
|
|
50
40
|
class="wt-header-actions__action__link"
|
|
51
41
|
@click.prevent="settings"
|
|
52
42
|
>
|
|
53
|
-
<wt-icon icon="settings"
|
|
43
|
+
<wt-icon icon="settings"></wt-icon>
|
|
54
44
|
<span>{{ $t('webitelUI.headerActions.settings') }}</span>
|
|
55
45
|
</a>
|
|
56
46
|
</li>
|
|
@@ -59,18 +49,12 @@
|
|
|
59
49
|
class="wt-header-actions__action__link"
|
|
60
50
|
@click.prevent="logout"
|
|
61
51
|
>
|
|
62
|
-
<wt-icon
|
|
63
|
-
color="error"
|
|
64
|
-
icon="logout"
|
|
65
|
-
/>
|
|
52
|
+
<wt-icon color="error" icon="logout"></wt-icon>
|
|
66
53
|
<span>{{ $t('webitelUI.headerActions.logout') }}</span>
|
|
67
54
|
</a>
|
|
68
55
|
</li>
|
|
69
56
|
</ul>
|
|
70
|
-
<footer
|
|
71
|
-
v-if="isFooter"
|
|
72
|
-
class="wt-header-actions__footer"
|
|
73
|
-
>
|
|
57
|
+
<footer v-if="isFooter" class="wt-header-actions__footer">
|
|
74
58
|
<p class="wt-header-actions__build__version">
|
|
75
59
|
{{ buildVersion }}
|
|
76
60
|
</p>
|
|
@@ -82,7 +66,10 @@
|
|
|
82
66
|
|
|
83
67
|
<script>
|
|
84
68
|
export default {
|
|
85
|
-
name: '
|
|
69
|
+
name: 'wt-header-actions',
|
|
70
|
+
data: () => ({
|
|
71
|
+
isOpened: false,
|
|
72
|
+
}),
|
|
86
73
|
props: {
|
|
87
74
|
user: {
|
|
88
75
|
type: Object,
|
|
@@ -92,9 +79,6 @@ export default {
|
|
|
92
79
|
type: Object,
|
|
93
80
|
},
|
|
94
81
|
},
|
|
95
|
-
data: () => ({
|
|
96
|
-
isOpened: false,
|
|
97
|
-
}),
|
|
98
82
|
|
|
99
83
|
computed: {
|
|
100
84
|
isHeader() {
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
v-if="badge"
|
|
8
8
|
:color-variable="badgeColorVar"
|
|
9
9
|
:icon-badge="isDnd ? 'dnd' : null"
|
|
10
|
-
|
|
10
|
+
></wt-badge>
|
|
11
11
|
<div
|
|
12
|
-
v-if="isLetterAvatar"
|
|
13
12
|
class="wt-avatar__letters"
|
|
13
|
+
v-if="isLetterAvatar"
|
|
14
14
|
:style="{ background: `var(${avatarLettersBackground})` }"
|
|
15
15
|
>
|
|
16
16
|
{{ avatarLetters }}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
<aside
|
|
3
3
|
class="wt-badge"
|
|
4
4
|
:class="{ 'wt-badge--outside': outside }"
|
|
5
|
-
:style="{ background: iconBadge ? `url(${showIconBadge})` : `var(--${colorVariable})` }"
|
|
6
|
-
|
|
5
|
+
:style="{ background: iconBadge ? `url(${this.showIconBadge})` : `var(--${colorVariable})` }"
|
|
6
|
+
></aside>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
10
|
import BadgeDnd from '../../assets/icons/badge-dnd.svg';
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
|
-
name: '
|
|
13
|
+
name: 'wt-badge',
|
|
14
14
|
props: {
|
|
15
15
|
colorVariable: {
|
|
16
16
|
type: String,
|
|
@@ -19,16 +19,14 @@
|
|
|
19
19
|
v-if="loading"
|
|
20
20
|
size="sm"
|
|
21
21
|
:color="loaderColor"
|
|
22
|
-
|
|
23
|
-
<slot v-else>
|
|
24
|
-
no content provided
|
|
25
|
-
</slot>
|
|
22
|
+
></wt-loader>
|
|
23
|
+
<slot v-else>no content provided</slot>
|
|
26
24
|
</button>
|
|
27
25
|
</template>
|
|
28
26
|
|
|
29
27
|
<script>
|
|
30
28
|
export default {
|
|
31
|
-
name: '
|
|
29
|
+
name: 'wt-button',
|
|
32
30
|
props: {
|
|
33
31
|
/**
|
|
34
32
|
* @values 'primary', 'secondary', 'success', 'error', 'transfer', 'job', 'info'
|
|
@@ -2,10 +2,10 @@ import { shallowMount, mount } from '@vue/test-utils';
|
|
|
2
2
|
import WtSelectButton from '../wt-button-select.vue';
|
|
3
3
|
|
|
4
4
|
// helps to mock @floating-ui/vue autoUpdate method
|
|
5
|
-
global.ResizeObserver =
|
|
6
|
-
observe:
|
|
7
|
-
unobserve:
|
|
8
|
-
disconnect:
|
|
5
|
+
global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
6
|
+
observe: jest.fn(),
|
|
7
|
+
unobserve: jest.fn(),
|
|
8
|
+
disconnect: jest.fn(),
|
|
9
9
|
}));
|
|
10
10
|
|
|
11
11
|
describe('WtSelectButton', () => {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
class="wt-button-select__button"
|
|
11
11
|
@click="$emit('click', $event)"
|
|
12
12
|
>
|
|
13
|
-
<slot
|
|
13
|
+
<slot></slot>
|
|
14
14
|
</wt-button>
|
|
15
15
|
|
|
16
16
|
<wt-context-menu
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
:visible="isOpened"
|
|
19
19
|
@click="selectOption"
|
|
20
20
|
>
|
|
21
|
-
<template
|
|
21
|
+
<template v-slot:activator>
|
|
22
22
|
<wt-button
|
|
23
23
|
v-bind="$attrs"
|
|
24
24
|
:color="color"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
:disabled="disabled"
|
|
34
34
|
class="wt-button-select__select-arrow"
|
|
35
35
|
icon="arrow-down"
|
|
36
|
-
|
|
36
|
+
></wt-icon>
|
|
37
37
|
</wt-button>
|
|
38
38
|
</template>
|
|
39
39
|
</wt-context-menu>
|
|
@@ -20,22 +20,17 @@
|
|
|
20
20
|
@change="inputHandler"
|
|
21
21
|
>
|
|
22
22
|
<span class="wt-checkbox__checkmark">
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
<wt-icon
|
|
24
|
+
:icon="checkboxIcon"
|
|
25
|
+
:color="iconColor"
|
|
26
|
+
></wt-icon>
|
|
27
|
+
</span>
|
|
28
28
|
<!-- @slot Custom label markup -->
|
|
29
29
|
<slot
|
|
30
30
|
v-bind="{ label, isChecked, disabled }"
|
|
31
31
|
name="label"
|
|
32
32
|
>
|
|
33
|
-
<div
|
|
34
|
-
v-if="label"
|
|
35
|
-
class="wt-checkbox__label"
|
|
36
|
-
>
|
|
37
|
-
{{ label }}
|
|
38
|
-
</div>
|
|
33
|
+
<div v-if="label" class="wt-checkbox__label">{{ label }}</div>
|
|
39
34
|
</slot>
|
|
40
35
|
</wt-label>
|
|
41
36
|
</div>
|
|
@@ -43,7 +38,7 @@
|
|
|
43
38
|
|
|
44
39
|
<script>
|
|
45
40
|
export default {
|
|
46
|
-
name: '
|
|
41
|
+
name: 'wt-checkbox',
|
|
47
42
|
model: {
|
|
48
43
|
prop: 'selected',
|
|
49
44
|
event: 'change',
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span
|
|
3
|
-
|
|
4
|
-
:class="`wt-chip--${color}-color`"
|
|
5
|
-
>
|
|
6
|
-
<slot />
|
|
2
|
+
<span class="wt-chip" :class="`wt-chip--${color}-color`">
|
|
3
|
+
<slot></slot>
|
|
7
4
|
</span>
|
|
8
5
|
</template>
|
|
9
6
|
|
|
10
7
|
<script>
|
|
11
8
|
export default {
|
|
12
|
-
name: '
|
|
9
|
+
name: 'wt-chip',
|
|
13
10
|
props: {
|
|
14
11
|
color: {
|
|
15
12
|
type: String,
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
placement="bottom-end"
|
|
7
7
|
popper-class="wt-context-menu__floating-wrapper"
|
|
8
8
|
>
|
|
9
|
-
<template
|
|
10
|
-
<slot name="activator"
|
|
9
|
+
<template v-slot:activator>
|
|
10
|
+
<slot name="activator"></slot>
|
|
11
11
|
</template>
|
|
12
|
-
<template
|
|
12
|
+
<template v-slot:default="{ hide }">
|
|
13
13
|
<ul
|
|
14
14
|
class="wt-context-menu__menu"
|
|
15
15
|
:style="`width: ${width}; min-width: ${minWidth}; max-width: ${maxWidth};`"
|
|
16
16
|
>
|
|
17
17
|
<li
|
|
18
|
+
class="wt-context-menu__option-wrapper"
|
|
18
19
|
v-for="(option, index) of options"
|
|
19
20
|
:key="index"
|
|
20
|
-
class="wt-context-menu__option-wrapper"
|
|
21
21
|
>
|
|
22
22
|
<!-- <a> click.prevent prevents redirect to # -->
|
|
23
23
|
<a
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<wt-tooltip class="wt-copy-action">
|
|
3
|
-
<template
|
|
3
|
+
<template v-slot:activator>
|
|
4
4
|
<wt-icon-btn
|
|
5
5
|
v-bind="$attrs"
|
|
6
6
|
:icon="copied ? 'done' : 'copy'"
|
|
7
7
|
class="copy-action"
|
|
8
8
|
@click="copy"
|
|
9
|
-
|
|
9
|
+
></wt-icon-btn>
|
|
10
10
|
</template>
|
|
11
11
|
{{ copied ? copiedTooltip : copyTooltip }}
|
|
12
12
|
</wt-tooltip>
|
|
@@ -18,7 +18,10 @@ import copy from 'clipboard-copy';
|
|
|
18
18
|
let copiedIdTimeout = null;
|
|
19
19
|
|
|
20
20
|
export default {
|
|
21
|
-
name: '
|
|
21
|
+
name: 'wt-copy-action',
|
|
22
|
+
data: () => ({
|
|
23
|
+
copied: false,
|
|
24
|
+
}),
|
|
22
25
|
props: {
|
|
23
26
|
value: {
|
|
24
27
|
type: String,
|
|
@@ -31,9 +34,6 @@ export default {
|
|
|
31
34
|
}),
|
|
32
35
|
},
|
|
33
36
|
},
|
|
34
|
-
data: () => ({
|
|
35
|
-
copied: false,
|
|
36
|
-
}),
|
|
37
37
|
computed: {
|
|
38
38
|
copyTooltip() {
|
|
39
39
|
return this.tooltips.copy || this.$t('webitelUI.copyAction.copy');
|
|
@@ -13,9 +13,7 @@
|
|
|
13
13
|
<slot
|
|
14
14
|
v-bind="{ label }"
|
|
15
15
|
name="label"
|
|
16
|
-
>
|
|
17
|
-
{{ label }}
|
|
18
|
-
</slot>
|
|
16
|
+
>{{ label }}</slot>
|
|
19
17
|
</wt-label>
|
|
20
18
|
<vue-datepicker
|
|
21
19
|
v-bind="{ ...$attrs, ...$props }"
|
|
@@ -31,46 +29,46 @@
|
|
|
31
29
|
@open="isOpened = true"
|
|
32
30
|
@update:model-value="emit('input', $event.getTime())"
|
|
33
31
|
>
|
|
34
|
-
<template
|
|
32
|
+
<template v-slot:input-icon>
|
|
35
33
|
<wt-icon
|
|
36
34
|
:color="disabled ? 'disabled' : 'default'"
|
|
37
35
|
icon="calendar"
|
|
38
|
-
|
|
36
|
+
></wt-icon>
|
|
39
37
|
</template>
|
|
40
|
-
<template
|
|
38
|
+
<template v-slot:clear-icon>
|
|
41
39
|
<wt-icon
|
|
42
40
|
:class="{ 'wt-datepicker__open-arrow--opened': isOpened }"
|
|
43
41
|
:color="disabled ? 'disabled' : 'default'"
|
|
44
42
|
class="wt-datepicker__open-arrow"
|
|
45
43
|
icon="arrow-down"
|
|
46
|
-
|
|
44
|
+
></wt-icon>
|
|
47
45
|
</template>
|
|
48
|
-
<template
|
|
46
|
+
<template v-slot:arrow-left>
|
|
49
47
|
<wt-icon-btn
|
|
50
48
|
icon="arrow-left"
|
|
51
|
-
|
|
49
|
+
></wt-icon-btn>
|
|
52
50
|
</template>
|
|
53
|
-
<template
|
|
51
|
+
<template v-slot:arrow-right>
|
|
54
52
|
<wt-icon-btn
|
|
55
53
|
icon="arrow-right"
|
|
56
|
-
|
|
54
|
+
></wt-icon-btn>
|
|
57
55
|
</template>
|
|
58
56
|
<template
|
|
59
57
|
v-if="isDateTime"
|
|
60
|
-
|
|
58
|
+
v-slot:time-picker="{ time, updateTime }"
|
|
61
59
|
>
|
|
62
60
|
<div class="datepicker__timepicker">
|
|
63
61
|
<wt-time-input
|
|
64
62
|
:value="time.hours"
|
|
65
63
|
max-value="23"
|
|
66
64
|
@input="updateTime"
|
|
67
|
-
|
|
65
|
+
></wt-time-input>
|
|
68
66
|
:
|
|
69
67
|
<wt-time-input
|
|
70
68
|
:value="time.minutes"
|
|
71
69
|
max-value="59"
|
|
72
70
|
@input="updateTime($event, false)"
|
|
73
|
-
|
|
71
|
+
></wt-time-input>
|
|
74
72
|
</div>
|
|
75
73
|
</template>
|
|
76
74
|
</vue-datepicker>
|