@webitel/ui-sdk 25.8.54 → 25.8.56
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/img/sprite/bread-crumbs.svg +3 -0
- package/dist/img/sprite/index.js +2 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +20043 -18531
- package/dist/ui-sdk.umd.cjs +538 -130
- package/package.json +2 -2
- package/src/assets/icons/sprite/bread-crumbs.svg +3 -0
- package/src/assets/icons/sprite/index.js +2 -0
- package/src/components/index.js +3 -3
- package/src/components/{wt-headline-nav/__tests__/wt-headline-nav.spec.js → wt-breadcrumb/__tests__/wt-breadcrumb.spec.js} +3 -3
- package/src/components/wt-breadcrumb/_variables.scss +7 -0
- package/src/components/wt-breadcrumb/wt-breadcrumb.vue +41 -0
- package/src/components/wt-divider/wt-divider.vue +13 -13
- package/src/components/wt-headline/wt-headline.vue +1 -1
- package/src/components/wt-icon-btn/wt-icon-btn.vue +1 -0
- package/src/components/wt-radio/wt-radio.vue +40 -112
- package/src/components/wt-slider/wt-slider.vue +37 -190
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +1 -1
- package/src/modules/AuditForm/components/form-questions/options/audit-form-question-options.vue +1 -1
- package/src/modules/AuditForm/components/form-questions/score/audit-form-question-score.vue +1 -1
- package/src/modules/Userinfo/v2/stores/accessStore.ts +1 -4
- package/src/plugins/primevue/primevue.plugin.js +8 -0
- package/src/plugins/primevue/primevue.scss +1 -0
- package/src/plugins/primevue/theme/components/breadcrumb/breadcrumb.js +28 -0
- package/src/plugins/primevue/theme/components/breadcrumb/breadcrumb.scss +9 -0
- package/src/plugins/primevue/theme/components/components.js +8 -0
- package/src/plugins/primevue/theme/components/divider/divider.js +8 -0
- package/src/plugins/primevue/theme/components/radio/radio.js +17 -0
- package/src/plugins/primevue/theme/components/slider/slider.js +8 -0
- package/types/components/index.d.ts +3 -3
- package/types/components/wt-breadcrumb/wt-breadcrumb.vue.d.ts +9 -0
- package/types/components/wt-divider/wt-divider.vue.d.ts +6 -12
- package/types/components/wt-radio/wt-radio.vue.d.ts +49 -60
- package/types/components/wt-slider/wt-slider.vue.d.ts +19 -66
- package/types/plugins/primevue/theme/components/breadcrumb/breadcrumb.d.ts +67 -0
- package/types/plugins/primevue/theme/components/components.d.ts +8 -0
- package/types/plugins/primevue/theme/components/divider/divider.d.ts +37 -0
- package/types/plugins/primevue/theme/components/radio/radio.d.ts +91 -0
- package/types/plugins/primevue/theme/components/slider/slider.d.ts +69 -0
- package/src/components/wt-headline-nav/_variables.scss +0 -7
- package/src/components/wt-headline-nav/wt-headline-nav.vue +0 -106
- package/types/components/wt-headline-nav/wt-headline-nav.vue.d.ts +0 -7
- /package/types/components/{wt-headline-nav/__tests__/wt-headline-nav.spec.d.ts → wt-breadcrumb/__tests__/wt-breadcrumb.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "25.8.
|
|
3
|
+
"version": "25.8.56",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@vuepic/vue-datepicker": "^4.5.1",
|
|
57
57
|
"@vueuse/components": "^13.0.0",
|
|
58
58
|
"@webitel/api-services": "^0.0.33",
|
|
59
|
-
"@webitel/styleguide": "^24.12.
|
|
59
|
+
"@webitel/styleguide": "^24.12.57",
|
|
60
60
|
"autosize": "^6.0.1",
|
|
61
61
|
"axios": "^1.8.3",
|
|
62
62
|
"clipboard-copy": "^4.0.1",
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M9.3749 6.21871C9.77922 5.89526 10.3578 5.93699 10.7128 6.29879L10.7811 6.37496L15.2802 12L10.7811 17.625C10.4361 18.0562 9.80616 18.1262 9.3749 17.7812C8.94364 17.4362 8.87364 16.8062 9.21865 16.375L12.7186 12L9.21865 7.62496L9.15908 7.54195C8.8839 7.11619 8.97053 6.54221 9.3749 6.21871Z"/>
|
|
3
|
+
</svg>
|
|
@@ -20,6 +20,7 @@ import back from './back.svg';
|
|
|
20
20
|
import bell from './bell.svg';
|
|
21
21
|
import bellBadged from './bell-badged.svg';
|
|
22
22
|
import bot from './bot.svg';
|
|
23
|
+
import breadCrumbs from './bread-crumbs.svg';
|
|
23
24
|
import bucket from './bucket.svg';
|
|
24
25
|
import calendar from './calendar.svg';
|
|
25
26
|
import call from './call.svg';
|
|
@@ -227,6 +228,7 @@ export default objCamelToKebab({
|
|
|
227
228
|
bell,
|
|
228
229
|
bellBadged,
|
|
229
230
|
bucket,
|
|
231
|
+
breadCrumbs,
|
|
230
232
|
bot,
|
|
231
233
|
calendar,
|
|
232
234
|
darkMode,
|
package/src/components/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import WtAppNavigator from './wt-app-header/wt-app-navigator.vue';
|
|
|
10
10
|
import WtHeaderActions from './wt-app-header/wt-header-actions.vue';
|
|
11
11
|
import WtAvatar from './wt-avatar/wt-avatar.vue';
|
|
12
12
|
import WtBadge from './wt-badge/wt-badge.vue';
|
|
13
|
+
import WtBreadcrumb from './wt-breadcrumb/wt-breadcrumb.vue';
|
|
13
14
|
import WtButton from './wt-button/wt-button.vue';
|
|
14
15
|
import WtButtonSelect from './wt-button-select/wt-button-select.vue';
|
|
15
16
|
import WtCheckbox from './wt-checkbox/wt-checkbox.vue';
|
|
@@ -26,7 +27,6 @@ import WtErrorPage from './wt-error-page/wt-error-page.vue';
|
|
|
26
27
|
import WtExpansionPanel from './wt-expansion-panel/wt-expansion-panel.vue';
|
|
27
28
|
import WtFiltersPanelWrapper from './wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue';
|
|
28
29
|
import WtHeadline from './wt-headline/wt-headline.vue';
|
|
29
|
-
import WtHeadlineNav from './wt-headline-nav/wt-headline-nav.vue';
|
|
30
30
|
import WtHint from './wt-hint/wt-hint.vue';
|
|
31
31
|
import WtIcon from './wt-icon/wt-icon.vue';
|
|
32
32
|
import WtIconAction from './wt-icon-action/wt-icon-action.vue';
|
|
@@ -111,7 +111,7 @@ const Components = {
|
|
|
111
111
|
WtTextarea,
|
|
112
112
|
WtAppHeader,
|
|
113
113
|
WtHeadline,
|
|
114
|
-
|
|
114
|
+
WtBreadcrumb,
|
|
115
115
|
WtNavigationBar,
|
|
116
116
|
WtAppNavigator,
|
|
117
117
|
WtFiltersPanelWrapper,
|
|
@@ -151,6 +151,7 @@ export {
|
|
|
151
151
|
WtAppNavigator,
|
|
152
152
|
WtAvatar,
|
|
153
153
|
WtBadge,
|
|
154
|
+
WtBreadcrumb,
|
|
154
155
|
WtButton,
|
|
155
156
|
WtButtonSelect,
|
|
156
157
|
WtCheckbox,
|
|
@@ -169,7 +170,6 @@ export {
|
|
|
169
170
|
WtFiltersPanelWrapper,
|
|
170
171
|
WtHeaderActions,
|
|
171
172
|
WtHeadline,
|
|
172
|
-
WtHeadlineNav,
|
|
173
173
|
WtHint,
|
|
174
174
|
WtIcon,
|
|
175
175
|
WtIconAction,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import WtBreadcrumb from '../wt-breadcrumb.vue';
|
|
4
4
|
|
|
5
|
-
describe('
|
|
5
|
+
describe('WtBreadcrumb', () => {
|
|
6
6
|
it('renders a component', () => {
|
|
7
|
-
const wrapper = shallowMount(
|
|
7
|
+
const wrapper = shallowMount(WtBreadcrumb, {
|
|
8
8
|
props: {
|
|
9
9
|
path: [],
|
|
10
10
|
},
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<p-breadcrumb
|
|
3
|
+
:model="path"
|
|
4
|
+
>
|
|
5
|
+
<template #item="{ item }">
|
|
6
|
+
<router-link
|
|
7
|
+
v-if="item?.route"
|
|
8
|
+
:to="item?.route"
|
|
9
|
+
class="wt-breadcrumb__text"
|
|
10
|
+
:class="{ 'wt-breadcrumb__text--last': item == lastItem }"
|
|
11
|
+
>
|
|
12
|
+
{{ item?.name }}
|
|
13
|
+
</router-link>
|
|
14
|
+
<span
|
|
15
|
+
v-else
|
|
16
|
+
class="wt-breadcrumb__text"
|
|
17
|
+
:class="{ 'wt-breadcrumb__text--last': item == lastItem }"
|
|
18
|
+
>
|
|
19
|
+
{{ item?.name }}
|
|
20
|
+
</span>
|
|
21
|
+
</template>
|
|
22
|
+
<template #separator>
|
|
23
|
+
<wt-icon
|
|
24
|
+
icon="bread-crumbs"
|
|
25
|
+
/>
|
|
26
|
+
</template>
|
|
27
|
+
</p-breadcrumb>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import type { BreadcrumbProps } from 'primevue';
|
|
32
|
+
import { computed } from 'vue';
|
|
33
|
+
|
|
34
|
+
interface Props extends BreadcrumbProps {
|
|
35
|
+
path?: Array<{ name: string; route?: string | object }>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const props = defineProps<Props>();
|
|
39
|
+
|
|
40
|
+
const lastItem = computed(() => props?.path?.[props.path.length - 1]);
|
|
41
|
+
</script>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
:class="`wt-divider-${variant}`"
|
|
2
|
+
<p-divider
|
|
3
|
+
:layout="variant"
|
|
5
4
|
/>
|
|
6
5
|
</template>
|
|
7
6
|
|
|
8
|
-
<script>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import type { DividerProps } from 'primevue';
|
|
9
|
+
import { defineProps, withDefaults } from 'vue';
|
|
10
|
+
|
|
11
|
+
interface Props extends DividerProps {
|
|
12
|
+
variant?: 'horizontal' | 'vertical';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
withDefaults(defineProps<Props>(), {
|
|
16
|
+
variant: 'horizontal',
|
|
17
|
+
});
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<style lang="scss">
|
|
@@ -31,7 +31,7 @@ export default {
|
|
|
31
31
|
display: flex;
|
|
32
32
|
justify-content: space-between;
|
|
33
33
|
align-items: center;
|
|
34
|
-
gap: var(--
|
|
34
|
+
gap: var(--breadcrumb-gap);
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
border-radius: var(--border-radius);
|
|
37
37
|
background: var(--wt-headline-background-color);
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="{
|
|
4
|
-
'wt-radio--active': isChecked,
|
|
5
|
-
'wt-radio--outline': outline,
|
|
6
|
-
'wt-radio--disabled': disabled,
|
|
7
|
-
}"
|
|
2
|
+
<div
|
|
8
3
|
class="wt-radio"
|
|
9
4
|
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class="wt-radio__icon"
|
|
22
|
-
/>
|
|
23
|
-
<!-- @slot Custom input label -->
|
|
5
|
+
<p-radio
|
|
6
|
+
v-model="model"
|
|
7
|
+
:input-id="radioId"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
:value="value"
|
|
10
|
+
/>
|
|
11
|
+
<wt-label
|
|
12
|
+
:for="radioId"
|
|
13
|
+
:disabled="disabled"
|
|
14
|
+
>
|
|
15
|
+
<!-- @slot Custom label markup -->
|
|
24
16
|
<slot
|
|
25
17
|
name="label"
|
|
26
18
|
v-bind="{ label, isChecked, disabled }"
|
|
@@ -36,56 +28,33 @@
|
|
|
36
28
|
</div>
|
|
37
29
|
</template>
|
|
38
30
|
|
|
39
|
-
<script>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: false,
|
|
68
|
-
},
|
|
69
|
-
outline: {
|
|
70
|
-
type: Boolean,
|
|
71
|
-
default: false,
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
emits: ['input'],
|
|
75
|
-
computed: {
|
|
76
|
-
isChecked() {
|
|
77
|
-
return this.value === this.selected;
|
|
78
|
-
},
|
|
79
|
-
radioIcon() {
|
|
80
|
-
return this.isChecked ? 'radio--checked' : 'radio';
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
methods: {
|
|
84
|
-
inputHandler() {
|
|
85
|
-
this.$emit('input', this.value);
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
};
|
|
31
|
+
<script setup lang="ts">
|
|
32
|
+
import type { RadioButtonProps } from 'primevue/radiobutton';
|
|
33
|
+
import { computed, defineModel, defineProps } from 'vue';
|
|
34
|
+
|
|
35
|
+
interface Props extends RadioButtonProps {
|
|
36
|
+
// value, set by radio
|
|
37
|
+
value: string | number | boolean | object;
|
|
38
|
+
label?: string;
|
|
39
|
+
required?: boolean;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
outline?: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
45
|
+
label: '',
|
|
46
|
+
required: false,
|
|
47
|
+
disabled: false,
|
|
48
|
+
outline: false,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const model = defineModel<string | number | boolean | object>('selected', {required: true});
|
|
52
|
+
|
|
53
|
+
const radioId = `radio-${Math.random().toString(36).slice(2, 11)}`;
|
|
54
|
+
|
|
55
|
+
const isChecked = computed(() => {
|
|
56
|
+
return props.value === model.value;
|
|
57
|
+
});
|
|
89
58
|
</script>
|
|
90
59
|
|
|
91
60
|
<style lang="scss">
|
|
@@ -93,59 +62,18 @@ export default {
|
|
|
93
62
|
</style>
|
|
94
63
|
|
|
95
64
|
<style lang="scss" scoped>
|
|
96
|
-
/* Customize the label (the container) */
|
|
97
65
|
.wt-radio {
|
|
98
66
|
box-sizing: border-box;
|
|
99
67
|
width: fit-content;
|
|
100
|
-
|
|
101
|
-
.wt-label {
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.wt-radio__wrapper {
|
|
107
68
|
display: flex;
|
|
108
69
|
position: relative;
|
|
109
70
|
align-items: center;
|
|
110
|
-
cursor: pointer;
|
|
111
71
|
user-select: none;
|
|
112
72
|
}
|
|
113
73
|
|
|
114
74
|
.wt-radio__label {
|
|
115
75
|
transition: var(--transition);
|
|
76
|
+
cursor: pointer;
|
|
116
77
|
margin-left: var(--radio-icon-margin);
|
|
117
78
|
}
|
|
118
|
-
|
|
119
|
-
/* Hide the browser's default radio button */
|
|
120
|
-
.wt-radio__input {
|
|
121
|
-
position: absolute;
|
|
122
|
-
opacity: 0;
|
|
123
|
-
width: 0;
|
|
124
|
-
height: 0;
|
|
125
|
-
pointer-events: none;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.wt-radio__icon {
|
|
129
|
-
flex: 0 0 var(--icon-md-size);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.wt-radio:hover {
|
|
133
|
-
:deep(.wt-icon) {
|
|
134
|
-
fill: var(--icon-btn-hover-color);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.wt-radio--active {
|
|
139
|
-
:deep(.wt-icon) {
|
|
140
|
-
fill: var(--icon-active-color);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.wt-radio--disabled {
|
|
145
|
-
pointer-events: none;
|
|
146
|
-
|
|
147
|
-
:deep(.wt-icon) {
|
|
148
|
-
fill: var(--icon-disabled-color);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
79
|
</style>
|
|
@@ -1,197 +1,44 @@
|
|
|
1
|
-
<!-- We were trying to draw our own slider using <div> tags, but realizing all the limitations decided to use
|
|
2
|
-
the native input of type 'range', styling it as per Webitel needs for every of the most popular web browsers.
|
|
3
|
-
|
|
4
|
-
The biggest issue to solve was the vertical input. At the moment browsers do not support vertical input range having
|
|
5
|
-
custom styling, so we are using css rotation.
|
|
6
|
-
Dealing with rotation we realized rotated element is very hard to position correctly with no fixed height of the parent element.
|
|
7
|
-
Considering the fact parent height is always relative to it's childs height, we are manipulating the child width/height on rotation.
|
|
8
|
-
To achieve correct slider height we:
|
|
9
|
-
1. Rotate slider by 90deg, so the width of slider becomes 'heigth' of the parent.
|
|
10
|
-
2. Set the new slider width (which is now positioned from bottom to top) using fixed number of pixels, received with props.
|
|
11
|
-
3. Set the container element height to 100% so it is always calculated correctly depending on it`s child dimensions.
|
|
12
|
-
|
|
13
|
-
Until there are no possibility to style input range and position it vertically, we are rotating our slider with css
|
|
14
|
-
and swapping height/width of this component in order to have the correct output.
|
|
15
|
-
-->
|
|
16
|
-
|
|
17
1
|
<template>
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<input
|
|
32
|
-
:disabled="disabled"
|
|
33
|
-
:max="max"
|
|
34
|
-
:min="min"
|
|
35
|
-
:step="step"
|
|
36
|
-
:style="{ background: progressStyle }"
|
|
37
|
-
:value="value"
|
|
38
|
-
class="wt-slider__slider"
|
|
39
|
-
type="range"
|
|
40
|
-
@input="inputHandler"
|
|
41
|
-
/>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
2
|
+
<p-slider
|
|
3
|
+
v-model="model"
|
|
4
|
+
:disabled="disabled"
|
|
5
|
+
:max="max"
|
|
6
|
+
:min="min"
|
|
7
|
+
:step="step"
|
|
8
|
+
:orientation="orientation"
|
|
9
|
+
:style="{
|
|
10
|
+
height: vertical ? `${height}px` : '',
|
|
11
|
+
width: !vertical && width ? `${width}px` : '',
|
|
12
|
+
}"
|
|
13
|
+
/>
|
|
14
|
+
|
|
44
15
|
</template>
|
|
45
16
|
|
|
46
|
-
<script>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
vertical: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: false,
|
|
61
|
-
},
|
|
62
|
-
min: {
|
|
63
|
-
type: Number,
|
|
64
|
-
default: 0,
|
|
65
|
-
},
|
|
66
|
-
max: {
|
|
67
|
-
type: Number,
|
|
68
|
-
default: 100,
|
|
69
|
-
},
|
|
70
|
-
step: {
|
|
71
|
-
type: Number,
|
|
72
|
-
default: 1,
|
|
73
|
-
},
|
|
74
|
-
// Height of vertical slider (px):
|
|
75
|
-
height: {
|
|
76
|
-
type: Number,
|
|
77
|
-
default: 100,
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
emits: ['input'],
|
|
81
|
-
computed: {
|
|
82
|
-
progressStyle() {
|
|
83
|
-
// To achieve the correct color styling:
|
|
84
|
-
const progressPercent =
|
|
85
|
-
((this.value - this.min) / (this.max - this.min)) * 100;
|
|
86
|
-
return `linear-gradient(to right, var(--wt-slider-background-completed-color) ${progressPercent}%, var(--wt-slider-background-color) 0%)`;
|
|
87
|
-
},
|
|
88
|
-
verticalHeight() {
|
|
89
|
-
// in order to have correct parent height after slider rotation
|
|
90
|
-
return this.vertical ? `${this.height}px` : '100%';
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
methods: {
|
|
94
|
-
inputHandler(event) {
|
|
95
|
-
this.$emit('input', +event.target.value);
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
</script>
|
|
100
|
-
|
|
101
|
-
<style lang="scss">
|
|
102
|
-
@use './variables.scss';
|
|
103
|
-
</style>
|
|
104
|
-
|
|
105
|
-
<style lang="scss" scoped>
|
|
106
|
-
.wt-slider__wrapper {
|
|
107
|
-
display: flex;
|
|
108
|
-
align-items: center;
|
|
109
|
-
width: var(--wt-slider-width);
|
|
110
|
-
height: var(--wt-slider-height);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.wt-slider__slider {
|
|
114
|
-
-webkit-appearance: none;
|
|
115
|
-
-moz-appearance: none;
|
|
116
|
-
cursor: pointer;
|
|
117
|
-
box-sizing: border-box;
|
|
118
|
-
margin: 0;
|
|
119
|
-
border: var(--wt-slider-border);
|
|
120
|
-
border-radius: var(--border-radius);
|
|
121
|
-
width: var(--wt-slider-width);
|
|
122
|
-
height: var(--wt-slider-input-height);
|
|
123
|
-
|
|
124
|
-
&::-webkit-slider-thumb {
|
|
125
|
-
-webkit-appearance: none;
|
|
126
|
-
transition: var(--transition);
|
|
127
|
-
border: var(--wt-slider-border);
|
|
128
|
-
border-radius: var(--wt-slider-pointer-radius);
|
|
129
|
-
background: var(--wt-slider-pointer-background-color);
|
|
130
|
-
width: var(--wt-slider-pointer-size);
|
|
131
|
-
height: var(--wt-slider-pointer-size);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&::-webkit-slider-runnable-track {
|
|
135
|
-
-webkit-appearance: none;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&::-moz-range-thumb {
|
|
139
|
-
-moz-appearance: none;
|
|
140
|
-
transition: var(--transition);
|
|
141
|
-
border: var(--wt-slider-border);
|
|
142
|
-
border-color: var(--wt-slider-pointer-border-color);
|
|
143
|
-
border-radius: var(--wt-slider-pointer-radius);
|
|
144
|
-
background: var(--wt-slider-pointer-background-color);
|
|
145
|
-
width: var(--wt-slider-pointer-size);
|
|
146
|
-
height: var(--wt-slider-pointer-size);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
&::-moz-range-track {
|
|
150
|
-
-moz-appearance: none;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
&::-ms-thumb {
|
|
154
|
-
appearance: none;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&::-ms-track {
|
|
158
|
-
appearance: none;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.wt-slider:hover {
|
|
163
|
-
.wt-slider__slider {
|
|
164
|
-
&::-webkit-slider-thumb {
|
|
165
|
-
background: var(--wt-slider-pointer-background-hover-color);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
&::-moz-range-thumb {
|
|
169
|
-
background: var(--wt-slider-pointer-background-hover-color);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import type { SliderProps } from 'primevue/slider';
|
|
19
|
+
import { computed, defineModel } from 'vue';
|
|
20
|
+
|
|
21
|
+
interface Props extends SliderProps{
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
vertical?: boolean;
|
|
24
|
+
min?: number;
|
|
25
|
+
max?: number;
|
|
26
|
+
step?: number;
|
|
27
|
+
height?: number;
|
|
28
|
+
width?: number;
|
|
172
29
|
}
|
|
173
30
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
31
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
32
|
+
disabled: false,
|
|
33
|
+
vertical: false,
|
|
34
|
+
min: 0,
|
|
35
|
+
max: 100,
|
|
36
|
+
step: 1,
|
|
37
|
+
height: 100,
|
|
38
|
+
width: undefined,
|
|
39
|
+
});
|
|
177
40
|
|
|
178
|
-
|
|
179
|
-
display: none;
|
|
180
|
-
}
|
|
41
|
+
const model = defineModel<number>();
|
|
181
42
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.wt-slider--vertical {
|
|
189
|
-
transform: var(--wt-slider-vertical-container-translation);
|
|
190
|
-
width: var(--wt-slider-height);
|
|
191
|
-
|
|
192
|
-
.wt-slider__wrapper {
|
|
193
|
-
transform: var(--wt-slider-vertical-transform);
|
|
194
|
-
transform-origin: var(--wt-slider-vertical-transform-origin);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
</style>
|
|
43
|
+
const orientation = computed(() => (props.vertical ? 'vertical' : 'horizontal'));
|
|
44
|
+
</script>
|
|
@@ -68,7 +68,7 @@ export const createUserAccessStore = ({
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
const hasApplicationVisibility = (app: WtApplication) => {
|
|
71
|
-
return
|
|
71
|
+
return appVisibilityAccess.get(app);
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
const hasSectionVisibility = (section: UiSection, object: WtObject) => {
|
|
@@ -78,9 +78,6 @@ export const createUserAccessStore = ({
|
|
|
78
78
|
return sectionVisibilityAccess.get(section);
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
-
const allowGlobalAccess = hasReadAccess();
|
|
82
|
-
if (allowGlobalAccess) return true;
|
|
83
|
-
|
|
84
81
|
const allowAppVisibility = hasApplicationVisibility(appOfSection);
|
|
85
82
|
const allowObjectAccess = hasReadAccess(objectOfSection);
|
|
86
83
|
const allowSectionVisibility = hasSectionVisibilityAccess(section);
|