@webitel/ui-sdk 26.6.59 → 26.6.61
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/{clients-BDtL1Ajm.js → clients-DPvJvOx5.js} +1 -1
- package/dist/{components-CK9vGYUg.js → components-GEKIa6Vp.js} +1141 -2406
- package/dist/{enums-CBWwTuq7.js → enums-BwgSueOO.js} +32 -28
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +73 -53
- package/dist/ui-sdk.umd.cjs +543 -541
- package/dist/{useValidation-B0voza7s.js → useValidation-Hdk6hzmc.js} +1 -1
- package/dist/{wt-action-bar-B17FBHD7.js → wt-action-bar-Dbt6CgEp.js} +2 -2
- package/dist/{wt-button-0kP5bPMs.js → wt-button-BDGLW4OG.js} +2 -2
- package/dist/{wt-chat-emoji-BiPhHNuw.js → wt-chat-emoji-CAn773-T.js} +4 -4
- package/dist/{wt-datepicker-baNcFWZ1.js → wt-datepicker-BjbWDS8B.js} +2 -2
- package/dist/{wt-display-chip-items-xm8cHws_.js → wt-display-chip-items-DAnyat0v.js} +1 -1
- package/dist/{wt-dual-panel-C5LZm1Tr.js → wt-dual-panel-C54Hwdwc.js} +1 -1
- package/dist/{wt-expansion-card-C2qETdn0.js → wt-expansion-card-CVPU9twV.js} +1 -1
- package/dist/{wt-expansion-panel-Dvzj9PTk.js → wt-expansion-panel-B1u06Hz8.js} +1 -1
- package/dist/{wt-icon-DIdpwmpC.js → wt-icon-Bd8GvqIt.js} +2 -1
- package/dist/{wt-icon-action-C8WN2oVD.js → wt-icon-action-mNjxBL1c.js} +1 -1
- package/dist/{wt-icon-btn-BLnhJADA.js → wt-icon-btn-BL4UZ7Fv.js} +1 -1
- package/dist/{wt-notifications-bar-Dx1YPqFu.js → wt-notifications-bar-Tg1pDfMR.js} +2 -2
- package/dist/{wt-player-CCwEyUzv.js → wt-player-B2-wweFq.js} +3 -3
- package/dist/{wt-search-bar-CiQJ9ViN.js → wt-search-bar-CPfD4657.js} +1 -1
- package/dist/{wt-send-message-popup-D07uZ7eL.js → wt-send-message-popup-Clb-abg5.js} +2 -2
- package/dist/wt-status-select-DCiMHd9K.js +77 -0
- package/dist/{wt-timepicker-DyM1OQX4.js → wt-timepicker-4bwYBaKQ.js} +2 -2
- package/dist/{wt-toast-KTAx-8zA.js → wt-toast-QzhZGeTp.js} +2 -2
- package/dist/{wt-tree-table-BlZEw4tr.js → wt-tree-table-DM_CRVQQ.js} +1 -1
- package/dist/{wt-type-extension-value-input-Tlnn-d1W.js → wt-type-extension-value-input-CP-xZ065.js} +3 -3
- package/dist/{wt-vidstack-player-Dvto6FG2.js → wt-vidstack-player-CuQ_SOHI.js} +4 -4
- package/package.json +1 -1
- package/src/api/clients/users/__tests__/users.spec.js +1 -0
- package/src/api/clients/users/users.js +26 -2
- package/src/assets/icons/sprite/index.ts +2 -0
- package/src/assets/icons/sprite/shield-check.svg +3 -0
- package/src/components/index.js +3 -3
- package/src/components/wt-card/_variables.css +4 -0
- package/src/components/wt-card/wt-card.vue +13 -0
- package/src/components/wt-indicator/_variables.css +7 -2
- package/src/components/wt-single-select/wt-single-select.vue +7 -0
- package/src/components/wt-status-select/__tests__/WtStatusSelect.spec.js +3 -3
- package/src/components/wt-status-select/_internals/StatusOptions.lookup.js +1 -1
- package/src/components/wt-status-select/wt-status-select.vue +80 -139
- package/src/css/components-variables.css +1 -1
- package/types/components/wt-card/wt-card.vue.d.ts +13 -0
- package/types/components/wt-single-select/wt-single-select.vue.d.ts +1 -0
- package/types/components/wt-status-select/wt-status-select.vue.d.ts +21 -1
- package/dist/AgentStatus.enum-C3IGHtvR.js +0 -9
- package/dist/wt-status-select-A5t6Vjm4.js +0 -101
- package/src/components/wt-select/__tests__/WtSelect.spec.js +0 -30
- package/src/components/wt-select/_variables.css +0 -12
- package/src/components/wt-select/mixins/__tests__/multiselectMixin.spec.js +0 -50
- package/src/components/wt-select/mixins/multiselectMixin.js +0 -279
- package/src/components/wt-select/multiselect.css +0 -239
- package/src/components/wt-select/wt-select.vue +0 -386
- package/src/components/wt-tags-input/mixin/taggableMixin.js +0 -43
- package/types/components/wt-select/__tests__/WtSelect.spec.d.ts +0 -1
- package/types/components/wt-select/mixins/__tests__/multiselectMixin.spec.d.ts +0 -1
- package/types/components/wt-select/mixins/multiselectMixin.d.ts +0 -129
- package/types/components/wt-select/wt-select.vue.d.ts +0 -229
- package/types/components/wt-tags-input/mixin/taggableMixin.d.ts +0 -7
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="{
|
|
4
|
-
'wt-select--disabled': disabled,
|
|
5
|
-
'wt-select--invalid': invalid,
|
|
6
|
-
'wt-select--multiple': multiple,
|
|
7
|
-
'wt-select--clearable': clearable,
|
|
8
|
-
'wt-select--loading': isLoading,
|
|
9
|
-
}" class="wt-select">
|
|
10
|
-
<wt-label v-if="hasLabel" :disabled="disabled" :invalid="invalid" class="wt-select__label" v-bind="labelProps">
|
|
11
|
-
<!-- @slot Custom input label -->
|
|
12
|
-
<slot name="label" v-bind="{ label }">
|
|
13
|
-
{{ requiredLabel }}
|
|
14
|
-
</slot>
|
|
15
|
-
</wt-label>
|
|
16
|
-
<vue-multiselect
|
|
17
|
-
ref="vue-multiselect" :allow-empty="allowEmpty" :close-on-select="$attrs.closeOnSelect ||
|
|
18
|
-
!multiple /* override default vue-multiselect value */
|
|
19
|
-
" :disabled="disabled" :internal-search="!searchMethod" :label="selectOptionLabel" :limit="1" :loading="false"
|
|
20
|
-
:model-value="selectValue" :multiple="multiple" :options="optionsWithCustomValues"
|
|
21
|
-
:placeholder="placeholder || label" :taggable="taggable" :track-by="trackBy" class="wt-select__select"
|
|
22
|
-
v-bind="$attrs" @close="isOpened = false" @open="isOpened = true" v-on="listeners">
|
|
23
|
-
<template v-if="!isOpened" #limit>
|
|
24
|
-
<wt-popover class="multiselect__limit">
|
|
25
|
-
<template #activator="{ toggle }">
|
|
26
|
-
<div @click.stop.prevent="toggle">
|
|
27
|
-
<wt-chip> +{{ value.length - 1 }}</wt-chip>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<template #default>
|
|
32
|
-
<div>
|
|
33
|
-
<p v-for="(option, idx) of value.slice(1)" :key="idx">
|
|
34
|
-
{{ getOptionLabel({ option, optionLabel }) }}
|
|
35
|
-
</p>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
</wt-popover>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<!-- Slot that is used for all selected options (tags)-->
|
|
42
|
-
<template #tag="{ option }">
|
|
43
|
-
<span class="multiselect__custom-tag">
|
|
44
|
-
{{ getOptionLabel({ option, optionLabel }) }}
|
|
45
|
-
</span>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
<!-- Slot for custom label template for single select-->
|
|
49
|
-
<template #singleLabel="{ option }">
|
|
50
|
-
<slot name="singleLabel" v-bind="{ option, optionLabel }">
|
|
51
|
-
<span class="multiselect__single-label">
|
|
52
|
-
{{ getOptionLabel({ option, optionLabel }) }}
|
|
53
|
-
</span>
|
|
54
|
-
</slot>
|
|
55
|
-
</template>
|
|
56
|
-
|
|
57
|
-
<!-- Slot for custom option template -->
|
|
58
|
-
<template #option="{ option }">
|
|
59
|
-
<slot name="option" v-bind="{ option, optionLabel }">
|
|
60
|
-
{{ getOptionLabel({ option, optionLabel }) }}
|
|
61
|
-
</slot>
|
|
62
|
-
</template>
|
|
63
|
-
|
|
64
|
-
<!-- Element for opening and closing the dropdown -->
|
|
65
|
-
<template #caret="{ toggle }">
|
|
66
|
-
<!-- In mode allowCustomValues, adding is done by clicking on this icon -->
|
|
67
|
-
<!-- [https://my.webitel.com/browse/WTEL-3181]-->
|
|
68
|
-
<wt-icon-btn
|
|
69
|
-
v-if="allowCustomValues && searchParams.search" :disabled="disabled"
|
|
70
|
-
class="multiselect__select multiselect__custom-value" icon="select-custom-value-enter"
|
|
71
|
-
@click="handleCustomValueArrowInput(toggle)" @mousedown.prevent />
|
|
72
|
-
<!-- To view a list of possible values, click on this icon -->
|
|
73
|
-
<!-- @mousedown.native.prevent.stop="toggle": https://github.com/shentao/vue-multiselect/issues/1204#issuecomment-615114727 -->
|
|
74
|
-
<wt-icon-btn
|
|
75
|
-
v-else :disabled="disabled" class="multiselect__select multiselect__arrow" icon="arrow-down"
|
|
76
|
-
@click="toggle" @mousedown.prevent />
|
|
77
|
-
</template>
|
|
78
|
-
|
|
79
|
-
<!-- Slot located before the tags -->
|
|
80
|
-
<template #clear="{ }">
|
|
81
|
-
<wt-icon-btn
|
|
82
|
-
v-if="clearable && isValue" :disabled="disabled" class="multiselect__clear"
|
|
83
|
-
icon="close" @click="clearValue" />
|
|
84
|
-
</template>
|
|
85
|
-
|
|
86
|
-
<template #beforeList>
|
|
87
|
-
<div v-show="isLoading" class="multiselect__loading-wrapper">
|
|
88
|
-
<wt-loader size="sm" />
|
|
89
|
-
</div>
|
|
90
|
-
</template>
|
|
91
|
-
|
|
92
|
-
<template v-if="showIntersectionObserver" #afterList>
|
|
93
|
-
<!-- @author @Lera24-->
|
|
94
|
-
<!-- [WTEL-6818](https://webitel.atlassian.net/browse/WTEL-6818)-->
|
|
95
|
-
<!-- When changing the page scale, vue-observe-visibility works unstable and does not see the changes. -->
|
|
96
|
-
<!-- The minimum height ensures additional data loading if the search method is used-->
|
|
97
|
-
|
|
98
|
-
<div v-observe-visibility="handleAfterListIntersect" style="height: 1px" />
|
|
99
|
-
</template>
|
|
100
|
-
</vue-multiselect>
|
|
101
|
-
<wt-message
|
|
102
|
-
v-if="isValidation && validationText"
|
|
103
|
-
:color="validationTextColor"
|
|
104
|
-
:variant="MessageVariant.SIMPLE"
|
|
105
|
-
:size="ComponentSize.SM"
|
|
106
|
-
>
|
|
107
|
-
{{ validationText }}
|
|
108
|
-
</wt-message>
|
|
109
|
-
</div>
|
|
110
|
-
</template>
|
|
111
|
-
|
|
112
|
-
<script>
|
|
113
|
-
import { toRefs } from 'vue';
|
|
114
|
-
import { ComponentSize, MessageVariant } from '../../enums';
|
|
115
|
-
import { useValidation } from '../../mixins/validationMixin/useValidation';
|
|
116
|
-
import isEmpty from '../../scripts/isEmpty.js';
|
|
117
|
-
import taggableMixin from '../wt-tags-input/mixin/taggableMixin.js';
|
|
118
|
-
import multiselectMixin from './mixins/multiselectMixin.js';
|
|
119
|
-
|
|
120
|
-
export default {
|
|
121
|
-
name: 'WtSelect',
|
|
122
|
-
mixins: [
|
|
123
|
-
multiselectMixin,
|
|
124
|
-
// taggableMixin is used to add custom select values, see [https://my.webitel.com/browse/WTEL-3181]
|
|
125
|
-
taggableMixin,
|
|
126
|
-
],
|
|
127
|
-
props: {
|
|
128
|
-
// vue 3
|
|
129
|
-
// modelValue: {},
|
|
130
|
-
|
|
131
|
-
// vue 2 fallback
|
|
132
|
-
value: {
|
|
133
|
-
// default: (props) => {
|
|
134
|
-
// return props.modelValue;
|
|
135
|
-
// },
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
multiple: {
|
|
139
|
-
type: Boolean,
|
|
140
|
-
default: false,
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
clearable: {
|
|
144
|
-
type: Boolean,
|
|
145
|
-
default: true,
|
|
146
|
-
},
|
|
147
|
-
/*
|
|
148
|
-
for taggableMixin functionality
|
|
149
|
-
for more info, see WTEL-3181
|
|
150
|
-
*/
|
|
151
|
-
allowCustomValues: {
|
|
152
|
-
type: Boolean,
|
|
153
|
-
default: false,
|
|
154
|
-
description: 'See wt-tags-input "taggable" prop.',
|
|
155
|
-
},
|
|
156
|
-
// for taggableMixin functionality
|
|
157
|
-
handleCustomValuesAdditionManually: {
|
|
158
|
-
type: Boolean,
|
|
159
|
-
default: false,
|
|
160
|
-
description: 'See wt-tags-input "manualTagging" prop.',
|
|
161
|
-
},
|
|
162
|
-
v: {
|
|
163
|
-
type: Object,
|
|
164
|
-
default: null,
|
|
165
|
-
},
|
|
166
|
-
regleValidation: {
|
|
167
|
-
type: Object,
|
|
168
|
-
default: null,
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
emits: [
|
|
172
|
-
'reset',
|
|
173
|
-
'search-change',
|
|
174
|
-
'input', // vue 2
|
|
175
|
-
'update:modelValue', // vue 3
|
|
176
|
-
'closed',
|
|
177
|
-
'custom-value', // fires when allowCustomValues and new customValue is added
|
|
178
|
-
],
|
|
179
|
-
setup: (props /*, ctx*/) => {
|
|
180
|
-
// https://stackoverflow.com/questions/72408463/use-props-in-composables-vue3
|
|
181
|
-
const { v, customValidators, regleValidation } = toRefs(props);
|
|
182
|
-
const { isValidation, invalid, validationText, validationTextColor } =
|
|
183
|
-
useValidation({
|
|
184
|
-
v,
|
|
185
|
-
customValidators,
|
|
186
|
-
regleValidation,
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
return {
|
|
190
|
-
isValidation,
|
|
191
|
-
invalid,
|
|
192
|
-
validationText,
|
|
193
|
-
validationTextColor,
|
|
194
|
-
MessageVariant,
|
|
195
|
-
ComponentSize,
|
|
196
|
-
};
|
|
197
|
-
},
|
|
198
|
-
data: () => ({
|
|
199
|
-
isOpened: false,
|
|
200
|
-
items: [],
|
|
201
|
-
}),
|
|
202
|
-
computed: {
|
|
203
|
-
// for taggableMixin
|
|
204
|
-
taggable() {
|
|
205
|
-
return this.allowCustomValues;
|
|
206
|
-
},
|
|
207
|
-
// for taggableMixin
|
|
208
|
-
manualTagging() {
|
|
209
|
-
return this.handleCustomValuesAdditionManually;
|
|
210
|
-
},
|
|
211
|
-
optionsWithCustomValues() {
|
|
212
|
-
// https://webitel.atlassian.net/browse/WTEL-3181
|
|
213
|
-
if (!this.allowCustomValues) return this.selectOptions;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
custom values could be restored after refresh, so that they could be not included in options prop,
|
|
217
|
-
so that we should add them to options manually (but filter duplicates, which are already in options)
|
|
218
|
-
|
|
219
|
-
i assume it's bad decision and it's better to include custom values to options prop,
|
|
220
|
-
but current filters logic restores value at filter component, but options value are pre-defined at store state
|
|
221
|
-
*/
|
|
222
|
-
|
|
223
|
-
const customValuesToOptions = Array.isArray(this.value)
|
|
224
|
-
? this.value
|
|
225
|
-
: isEmpty(this.value)
|
|
226
|
-
? []
|
|
227
|
-
: [
|
|
228
|
-
this.value,
|
|
229
|
-
]; //do not add empty values
|
|
230
|
-
const optionsWithoutValues = this.selectOptions.filter((opt) => {
|
|
231
|
-
const optKey = this.trackBy ? opt[this.trackBy] : opt;
|
|
232
|
-
return !customValuesToOptions.some((customValue) => {
|
|
233
|
-
const customValueKey = this.trackBy
|
|
234
|
-
? customValue[this.trackBy]
|
|
235
|
-
: customValue;
|
|
236
|
-
return customValueKey === optKey;
|
|
237
|
-
});
|
|
238
|
-
});
|
|
239
|
-
return [
|
|
240
|
-
...customValuesToOptions,
|
|
241
|
-
...optionsWithoutValues,
|
|
242
|
-
];
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
methods: {
|
|
246
|
-
// for taggableMixin functionality
|
|
247
|
-
async handleCustomValue(value) {
|
|
248
|
-
// https://webitel.atlassian.net/browse/WTEL-3181
|
|
249
|
-
this.tag(value);
|
|
250
|
-
},
|
|
251
|
-
async search(event) {
|
|
252
|
-
console.log('event.query', event.query);
|
|
253
|
-
this.items = [
|
|
254
|
-
...this.optionsWithCustomValues,
|
|
255
|
-
];
|
|
256
|
-
},
|
|
257
|
-
// for taggableMixin functionality
|
|
258
|
-
async handleCustomValueArrowInput(toggle) {
|
|
259
|
-
// https://webitel.atlassian.net/browse/WTEL-3181
|
|
260
|
-
// OLD CODE, but can be useful in future
|
|
261
|
-
/**
|
|
262
|
-
* tag emits input event, but there is a drawback
|
|
263
|
-
* there are causes, when input handler is async, but close event, emitted by toggle(),
|
|
264
|
-
* is performing some operations with input value.
|
|
265
|
-
* filter selects (abstract-enum(api)-filter.vue) for instance
|
|
266
|
-
*
|
|
267
|
-
* for now, i've tested this cause and it works well even without waiting for $nextTick()
|
|
268
|
-
* however, this is a potential problem, so, i've left this comment here
|
|
269
|
-
*/
|
|
270
|
-
this.tag(this.searchParams.search);
|
|
271
|
-
// await this.$nextTick();
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* call toggle strictly after tag() method because tag() emits input,
|
|
275
|
-
* because there could be code, which performs operation with input only after select close
|
|
276
|
-
* so that, it's crucial to emit input before close
|
|
277
|
-
*/
|
|
278
|
-
toggle();
|
|
279
|
-
},
|
|
280
|
-
// for taggableMixin functionality
|
|
281
|
-
emitTagEvent(searchQuery, id) {
|
|
282
|
-
this.$emit('custom-value', searchQuery, id);
|
|
283
|
-
},
|
|
284
|
-
clearValue() {
|
|
285
|
-
let value = '';
|
|
286
|
-
if (Array.isArray(this.value)) value = [];
|
|
287
|
-
else if (typeof this.value === 'object' && this.value !== null)
|
|
288
|
-
value = {};
|
|
289
|
-
this.input(value);
|
|
290
|
-
this.$emit('reset', value);
|
|
291
|
-
},
|
|
292
|
-
},
|
|
293
|
-
};
|
|
294
|
-
</script>
|
|
295
|
-
|
|
296
|
-
<style scoped>
|
|
297
|
-
@import './multiselect.css';
|
|
298
|
-
|
|
299
|
-
.wt-select {
|
|
300
|
-
width: 100%;
|
|
301
|
-
min-width: 0;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/*
|
|
305
|
-
* @author: Oleksandr Palonnyi
|
|
306
|
-
*
|
|
307
|
-
* [WTEL-6814](https://webitel.atlassian.net/browse/WTEL-6814)
|
|
308
|
-
*
|
|
309
|
-
* added pointer-events: auto; to have access to multiselect__limit when select is disabled.
|
|
310
|
-
*/
|
|
311
|
-
.multiselect__limit {
|
|
312
|
-
pointer-events: auto;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.wt-select :deep(.multiselect__single-label),
|
|
316
|
-
.wt-select :deep(.multiselect__custom-tag) {
|
|
317
|
-
/* text overflow 3 dots */
|
|
318
|
-
font-family: 'Montserrat', monospace;
|
|
319
|
-
font-size: 14px;
|
|
320
|
-
font-weight: 400;
|
|
321
|
-
line-height: 24px;
|
|
322
|
-
text-transform: none;
|
|
323
|
-
display: block;
|
|
324
|
-
overflow: hidden;
|
|
325
|
-
max-width: 100%;
|
|
326
|
-
white-space: nowrap;
|
|
327
|
-
text-overflow: ellipsis;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
.wt-select :deep(.multiselect__option) {
|
|
331
|
-
white-space: normal;
|
|
332
|
-
/* https://webitel.atlassian.net/browse/WTEL-7400 */
|
|
333
|
-
word-break: break-all;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.wt-select :deep(.multiselect__content) {
|
|
337
|
-
width: 100%;
|
|
338
|
-
/* https://webitel.atlassian.net/browse/WTEL-7400 */
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.wt-select :deep(.multiselect--active .multiselect__strong) {
|
|
342
|
-
display: none;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.wt-select--multiple :deep(.multiselect--active .multiselect__tags-wrap) {
|
|
346
|
-
display: none;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/* right padding setup */
|
|
350
|
-
|
|
351
|
-
/* default case */
|
|
352
|
-
.wt-select :deep(.multiselect) .multiselect__tags {
|
|
353
|
-
padding: var(--input-padding) calc(var(--input-padding) + var(--icon-md-size) + var(--select-caret-right-pos)) var(--input-padding) var(--input-padding);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/* only chip */
|
|
357
|
-
.wt-select.wt-select--multiple:not(.wt-select--clearable) :deep(.multiselect) .multiselect__tags {
|
|
358
|
-
padding-right: calc(var(--select-caret-right-pos) + var(--icon-md-size) + var(--input-padding) + 50px + var(--input-padding));
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.wt-select.wt-select--multiple:not(.wt-select--clearable) .multiselect__limit {
|
|
362
|
-
right: calc(var(--select-caret-right-pos) + var(--icon-md-size) + var(--input-padding));
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/* only clearable */
|
|
366
|
-
.wt-select.wt-select--clearable:not(.wt-select--multiple) :deep(.multiselect) .multiselect__tags {
|
|
367
|
-
padding-right: calc(var(--select-caret-right-pos) + var(--icon-md-size) + var(--input-padding) + var(--icon-md-size) + var(--input-padding));
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
.wt-select.wt-select--clearable:not(.wt-select--multiple) .multiselect__clear {
|
|
371
|
-
right: calc(var(--select-caret-right-pos) + var(--icon-md-size) + var(--input-padding));
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
/* clearable and chip */
|
|
375
|
-
.wt-select.wt-select--multiple.wt-select--clearable :deep(.multiselect) .multiselect__tags {
|
|
376
|
-
padding-right: calc(var(--select-caret-right-pos) + var(--icon-md-size) + var(--input-padding) + var(--icon-md-size) + var(--input-padding) + 50px + var(--input-padding));
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.wt-select.wt-select--multiple.wt-select--clearable .multiselect__clear {
|
|
380
|
-
right: calc(var(--select-caret-right-pos) + var(--icon-md-size) + var(--input-padding));
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.wt-select.wt-select--multiple.wt-select--clearable .multiselect__limit {
|
|
384
|
-
right: calc(var(--select-caret-right-pos) + var(--icon-md-size) + var(--input-padding) + var(--icon-md-size) + var(--input-padding));
|
|
385
|
-
}
|
|
386
|
-
</style>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
methods: {
|
|
3
|
-
// TODO: WHAT IS "ID" PARAM?!
|
|
4
|
-
// this functionality allows you to add custom values to the list of values
|
|
5
|
-
// [https://my.webitel.com/browse/WTEL-3181]
|
|
6
|
-
tag(searchQuery, id) {
|
|
7
|
-
this.emitTagEvent(searchQuery, id);
|
|
8
|
-
|
|
9
|
-
const tag = this.trackBy
|
|
10
|
-
? {
|
|
11
|
-
[this.optionLabel || 'name']: searchQuery,
|
|
12
|
-
[this.trackBy]: id || searchQuery,
|
|
13
|
-
}
|
|
14
|
-
: searchQuery;
|
|
15
|
-
|
|
16
|
-
const isTagExist = (newTag) => {
|
|
17
|
-
if (typeof newTag === 'string') {
|
|
18
|
-
return this.options.some((elem) => elem === newTag);
|
|
19
|
-
}
|
|
20
|
-
return this.options.some(
|
|
21
|
-
(elem) => elem[this.trackBy] === newTag[this.trackBy],
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
if (isTagExist(tag)) return;
|
|
26
|
-
|
|
27
|
-
this.options.unshift(tag);
|
|
28
|
-
if (!this.manualTagging) {
|
|
29
|
-
const value = this.multiple
|
|
30
|
-
? [
|
|
31
|
-
...this.value,
|
|
32
|
-
tag,
|
|
33
|
-
]
|
|
34
|
-
: tag;
|
|
35
|
-
this.input(value);
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
// method to override
|
|
39
|
-
emitTagEvent(searchQuery, id) {
|
|
40
|
-
this.$emit('tag', searchQuery, id);
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
let mixins: {
|
|
3
|
-
props: {
|
|
4
|
-
label: {
|
|
5
|
-
type: StringConstructor;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
labelProps: {
|
|
9
|
-
type: ObjectConstructor;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
computed: {
|
|
14
|
-
hasLabel(): boolean;
|
|
15
|
-
requiredLabel(): any;
|
|
16
|
-
};
|
|
17
|
-
}[];
|
|
18
|
-
namespace directives {
|
|
19
|
-
export { ObserveVisibility };
|
|
20
|
-
}
|
|
21
|
-
namespace components {
|
|
22
|
-
export { VueMultiselect };
|
|
23
|
-
}
|
|
24
|
-
namespace props {
|
|
25
|
-
namespace options {
|
|
26
|
-
export let type: ArrayConstructor;
|
|
27
|
-
function _default(): any[];
|
|
28
|
-
export { _default as default };
|
|
29
|
-
}
|
|
30
|
-
namespace placeholder {
|
|
31
|
-
let type_1: StringConstructor;
|
|
32
|
-
export { type_1 as type };
|
|
33
|
-
let _default_1: string;
|
|
34
|
-
export { _default_1 as default };
|
|
35
|
-
}
|
|
36
|
-
namespace trackBy {
|
|
37
|
-
let type_2: StringConstructor;
|
|
38
|
-
export { type_2 as type };
|
|
39
|
-
let _default_2: string;
|
|
40
|
-
export { _default_2 as default };
|
|
41
|
-
}
|
|
42
|
-
namespace optionLabel {
|
|
43
|
-
let type_3: StringConstructor;
|
|
44
|
-
export { type_3 as type };
|
|
45
|
-
}
|
|
46
|
-
namespace searchMethod {
|
|
47
|
-
let type_4: FunctionConstructor;
|
|
48
|
-
export { type_4 as type };
|
|
49
|
-
}
|
|
50
|
-
namespace disabled {
|
|
51
|
-
let type_5: BooleanConstructor;
|
|
52
|
-
export { type_5 as type };
|
|
53
|
-
let _default_3: boolean;
|
|
54
|
-
export { _default_3 as default };
|
|
55
|
-
}
|
|
56
|
-
namespace required {
|
|
57
|
-
let type_6: BooleanConstructor;
|
|
58
|
-
export { type_6 as type };
|
|
59
|
-
let _default_4: boolean;
|
|
60
|
-
export { _default_4 as default };
|
|
61
|
-
}
|
|
62
|
-
namespace allowEmpty {
|
|
63
|
-
let type_7: BooleanConstructor;
|
|
64
|
-
export { type_7 as type };
|
|
65
|
-
let _default_5: boolean;
|
|
66
|
-
export { _default_5 as default };
|
|
67
|
-
}
|
|
68
|
-
namespace useValueFromOptionsByProp {
|
|
69
|
-
let type_8: StringConstructor;
|
|
70
|
-
export { type_8 as type };
|
|
71
|
-
let _default_6: string;
|
|
72
|
-
export { _default_6 as default };
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function data(): {
|
|
76
|
-
apiOptions: any[];
|
|
77
|
-
cachedOptionsMap: {};
|
|
78
|
-
isLoading: boolean;
|
|
79
|
-
defaultOptionLabel: string;
|
|
80
|
-
searchParams: {
|
|
81
|
-
search: string;
|
|
82
|
-
page: number;
|
|
83
|
-
};
|
|
84
|
-
searchHasNext: boolean;
|
|
85
|
-
_canLoadNext: boolean;
|
|
86
|
-
};
|
|
87
|
-
namespace computed {
|
|
88
|
-
function selectOptionLabel(): any;
|
|
89
|
-
function isApiMode(): boolean;
|
|
90
|
-
function showIntersectionObserver(): any;
|
|
91
|
-
function selectValue(): any;
|
|
92
|
-
function selectOptions(): any;
|
|
93
|
-
function isValue(): boolean;
|
|
94
|
-
function listeners(): {
|
|
95
|
-
'update:model-value': any;
|
|
96
|
-
close: any;
|
|
97
|
-
tag: any;
|
|
98
|
-
'search-change': (search: any) => void;
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
namespace methods {
|
|
102
|
-
function getOptionLabel({ option, optionLabel }: {
|
|
103
|
-
option: any;
|
|
104
|
-
optionLabel: any;
|
|
105
|
-
}): any;
|
|
106
|
-
function handleSearchChange(search: any): void;
|
|
107
|
-
function handleAfterListIntersect(isVisible: any): void;
|
|
108
|
-
function fetchOptions({ search, page }?: any): Promise<void>;
|
|
109
|
-
function input(value: any): void;
|
|
110
|
-
function close(event: any): void;
|
|
111
|
-
function tag(): void;
|
|
112
|
-
}
|
|
113
|
-
namespace watch {
|
|
114
|
-
function disabled(): void;
|
|
115
|
-
namespace selectOptions {
|
|
116
|
-
function handler(): void;
|
|
117
|
-
let immediate: boolean;
|
|
118
|
-
}
|
|
119
|
-
namespace value {
|
|
120
|
-
export function handler(): Promise<void>;
|
|
121
|
-
let immediate_1: boolean;
|
|
122
|
-
export { immediate_1 as immediate };
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
function created(): void;
|
|
126
|
-
}
|
|
127
|
-
export default _default;
|
|
128
|
-
import { ObserveVisibility } from 'vue-observe-visibility';
|
|
129
|
-
import VueMultiselect from 'vue-multiselect';
|