@webitel/ui-sdk 26.6.16 → 26.6.18
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/{contacts-B2lllNW8.js → contacts-CW3-LZxF.js} +2 -2
- package/dist/{index-s11NRWc7.js → index-CVZdV0CY.js} +1 -1
- package/dist/{install-CHotEUqR.js → install-Cr0bk3L_.js} +1847 -1849
- package/dist/{isObject-CS7kmCW-.js → isObject-CiKYzHrL.js} +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +3 -3
- package/dist/ui-sdk.umd.cjs +487 -492
- package/dist/{useVidstackSrc-C9pHfm-H.js → useVidstackSrc-eIh94IOa.js} +1 -1
- package/dist/{vidstack-Bq6c3Bam-BVGTHd7A.js → vidstack-Bq6c3Bam-C9bvNDeZ.js} +3 -3
- package/dist/{vidstack-D2pY00kU-DGst31fX.js → vidstack-D2pY00kU-32fYwL0c.js} +3 -3
- package/dist/{vidstack-DDXt6fpN-BlSena1E.js → vidstack-DDXt6fpN-Bdj16PRi.js} +2 -2
- package/dist/{vidstack-D_-9AA6_-Cb8v7Cya.js → vidstack-D_-9AA6_-DU-Z0scc.js} +2 -2
- package/dist/{vidstack-DqAw8m9J-BO5oAp8p.js → vidstack-DqAw8m9J-D4iW7Pk4.js} +1 -1
- package/dist/{vidstack-audio-8oWVnIJO.js → vidstack-audio-D57MQWMi.js} +2 -2
- package/dist/{vidstack-dash-N7mOZVqM.js → vidstack-dash-DQ3tW9tH.js} +4 -4
- package/dist/{vidstack-google-cast-C6CkiVQv.js → vidstack-google-cast-Chny36ds.js} +4 -4
- package/dist/{vidstack-hls-DuAdbxCw.js → vidstack-hls-BJVMAGc7.js} +4 -4
- package/dist/{vidstack-video-HcwqLjdV.js → vidstack-video-0rGus1eV.js} +3 -3
- package/dist/{vidstack-vimeo-Bel3OZZQ.js → vidstack-vimeo-y__Gq7-Z.js} +4 -4
- package/dist/{vidstack-youtube-BkVkF4HM.js → vidstack-youtube-DP3qUcr_.js} +3 -3
- package/dist/{wt-action-bar-BBDocZea.js → wt-action-bar-CMKn5_2O.js} +1 -1
- package/dist/{wt-button-select-B51aERDi.js → wt-button-select-Ce3BQoKR.js} +1 -1
- package/dist/{wt-call-media-action-Bs_OKZmC.js → wt-call-media-action-ZuyF3TA9.js} +1 -1
- package/dist/{wt-chat-emoji-BnIHndFW.js → wt-chat-emoji-CL-ZeHBE.js} +65 -65
- package/dist/{wt-confirm-dialog-DVVBnYkn.js → wt-confirm-dialog-msvvphR9.js} +1 -1
- package/dist/{wt-context-menu-CGbCVPZG.js → wt-context-menu-D4f_AGoC.js} +1 -1
- package/dist/{wt-copy-action-BMBUeiio.js → wt-copy-action-Cf-_NtcG.js} +1 -1
- package/dist/{wt-datepicker-C3d7r5mM.js → wt-datepicker-CGfAsCbg.js} +1 -1
- package/dist/{wt-display-chip-items-BHPsH4m_.js → wt-display-chip-items-NXvaxIwQ.js} +1 -1
- package/dist/{wt-dual-panel-DGlajhn3.js → wt-dual-panel-DTmyhNDA.js} +1 -1
- package/dist/{wt-dummy-C5bcHSS2.js → wt-dummy-DRMzAM9O.js} +1 -1
- package/dist/{wt-error-page-DiACrMLr.js → wt-error-page-bVs4FU_6.js} +1 -1
- package/dist/{wt-expansion-card-BUes0xVI.js → wt-expansion-card-C6Gor6XB.js} +1 -1
- package/dist/{wt-expansion-panel-DqRKyjbS.js → wt-expansion-panel-CuGG2_bc.js} +1 -1
- package/dist/{wt-filters-panel-wrapper-GSzbtzq2.js → wt-filters-panel-wrapper-B75QdN0o.js} +1 -1
- package/dist/{wt-galleria-_EGT8Yvv.js → wt-galleria-CaXq22nn.js} +1 -1
- package/dist/{wt-inline-add-panel-CDSWlqMZ.js → wt-inline-add-panel-BMPB9HLd.js} +1 -1
- package/dist/{wt-navigation-menu-B8kUM7Gn.js → wt-navigation-menu-Btme7T0n.js} +1 -1
- package/dist/{wt-notifications-bar-DYP8MZFO.js → wt-notifications-bar-DgC8bv6A.js} +2 -2
- package/dist/{wt-pagination-sd_YvDrh.js → wt-pagination-PBVxACl3.js} +1 -1
- package/dist/{wt-player-D2tfg_Do.js → wt-player-3OnI8Gkb.js} +2 -2
- package/dist/{wt-screen-recordings-action-DPPyeqAP.js → wt-screen-recordings-action-DwlOgzfd.js} +1 -1
- package/dist/{wt-search-bar-CdiFXBrp.js → wt-search-bar-D6qMRH-b.js} +1 -1
- package/dist/{wt-selection-popup-BT_CKcu0.js → wt-selection-popup-DwA5WMWd.js} +1 -1
- package/dist/{wt-send-message-popup-Cl1do7gu.js → wt-send-message-popup-BNHfgzV6.js} +18 -18
- package/dist/{wt-start-page-Bf3ZNYMo.js → wt-start-page-DVyRr6sN.js} +12 -12
- package/dist/{wt-status-select-Bf_A0oh6.js → wt-status-select--ogDeIvZ.js} +1 -1
- package/dist/{wt-stepper-CypigM39.js → wt-stepper-DpszO5_T.js} +1 -1
- package/dist/{wt-table-uvuiiNrA.js → wt-table--CESQOx6.js} +9 -11
- package/dist/{wt-table-actions-CopptGl3.js → wt-table-actions-FVBMiBzy.js} +1 -1
- package/dist/{wt-table-column-select-By68jbcP.js → wt-table-column-select-CDlRxNrk.js} +2 -2
- package/dist/{wt-tabs-CjnIeGn_.js → wt-tabs-C0lD3Xw6.js} +1 -1
- package/dist/{wt-timepicker-BN-MasHu.js → wt-timepicker-hOlzDr60.js} +1 -1
- package/dist/wt-tree-NhBg3C84.js +2777 -0
- package/dist/{wt-tree-table-CYys4L3a.js → wt-tree-table-CK9T8KmU.js} +22 -22
- package/dist/wt-type-extension-value-input-C3J9mXbz.js +121 -0
- package/dist/{wt-vidstack-player-oYcoV3va.js → wt-vidstack-player-CW5GMIcG.js} +10 -10
- package/package.json +1 -1
- package/src/components/_internals/composables/useSelect/useSelectUtils.ts +11 -3
- package/src/components/index.js +0 -5
- package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue +14 -11
- package/src/components/wt-table/wt-table.vue +0 -1
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +6 -6
- package/src/modules/Filters/components/filter-select.vue +15 -6
- package/src/modules/ObjectPermissions/_internals/components/permissions-role-select.vue +8 -9
- package/src/modules/ObjectPermissions/components/permissions-tab.vue +12 -12
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +29 -7
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +31 -6
- package/src/modules/UploadCsvPopup/components/wt-upload-csv-popup.vue +9 -9
- package/types/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue.d.ts +2 -3
- package/dist/index-C17RHcP2.js +0 -2508
- package/dist/wt-tags-input-CN5gFGB-.js +0 -244
- package/dist/wt-tree-JPU131xX.js +0 -275
- package/dist/wt-type-extension-value-input-mz0knlTJ.js +0 -123
- package/src/components/wt-tags-input/__tests__/WtTagsInput.spec.js +0 -89
- package/src/components/wt-tags-input/mixin/__tests__/taggableMixin.spec.js +0 -27
- package/src/components/wt-tags-input/wt-tags-input.vue +0 -275
- package/types/components/wt-tags-input/__tests__/WtTagsInput.spec.d.ts +0 -1
- package/types/components/wt-tags-input/mixin/__tests__/taggableMixin.spec.d.ts +0 -1
- package/types/components/wt-tags-input/wt-tags-input.vue.d.ts +0 -3
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { mount, shallowMount } from '@vue/test-utils';
|
|
2
|
-
|
|
3
|
-
import WtLabel from '../../wt-label/wt-label.vue';
|
|
4
|
-
import WtTagsInput from '../wt-tags-input.vue';
|
|
5
|
-
|
|
6
|
-
describe('WtTagsInput', () => {
|
|
7
|
-
it('renders a component', () => {
|
|
8
|
-
const wrapper = shallowMount(WtTagsInput);
|
|
9
|
-
expect(wrapper.classes('wt-tags-input')).toBe(true);
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('renders label text when passed', () => {
|
|
13
|
-
const label = 'Hello there';
|
|
14
|
-
const wrapper = mount(WtTagsInput, {
|
|
15
|
-
stubs: {
|
|
16
|
-
WtLabel,
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
label,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
expect(wrapper.find('.wt-label').text()).toBe(label);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it('by default emits "input" event at native "tag" event', () => {
|
|
26
|
-
const tag = '123';
|
|
27
|
-
const wrapper = mount(WtTagsInput, {
|
|
28
|
-
props: {
|
|
29
|
-
value: [],
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
wrapper
|
|
33
|
-
.findComponent({
|
|
34
|
-
name: 'vue-multiselect',
|
|
35
|
-
})
|
|
36
|
-
.vm.$emit('tag', tag);
|
|
37
|
-
expect(wrapper.emitted().input[0][0]).toEqual([
|
|
38
|
-
tag,
|
|
39
|
-
]);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it('by default when input taggable initialize options should set from value', () => {
|
|
43
|
-
const wrapper = mount(WtTagsInput, {
|
|
44
|
-
props: {
|
|
45
|
-
value: [
|
|
46
|
-
{
|
|
47
|
-
label: 'Vue.js',
|
|
48
|
-
text: 'JavaScript',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
label: 'Vue2.js',
|
|
52
|
-
text: 'JavaScript',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: 'Vue3.js',
|
|
56
|
-
text: 'JavaScript',
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
options: [
|
|
60
|
-
{
|
|
61
|
-
label: 'Vue.js',
|
|
62
|
-
text: 'JavaScript',
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
expect(
|
|
68
|
-
wrapper.findComponent({
|
|
69
|
-
name: 'vue-multiselect',
|
|
70
|
-
}).vm.$props.options.length,
|
|
71
|
-
).toEqual(3);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it('in manual mode doesnt emit "input" event at native "tag" event', () => {
|
|
75
|
-
const tag = '123';
|
|
76
|
-
const wrapper = mount(WtTagsInput, {
|
|
77
|
-
props: {
|
|
78
|
-
value: [],
|
|
79
|
-
manualTagging: true,
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
wrapper
|
|
83
|
-
.findComponent({
|
|
84
|
-
name: 'vue-multiselect',
|
|
85
|
-
})
|
|
86
|
-
.vm.$emit('tag', tag);
|
|
87
|
-
expect(wrapper.emitted().input).toBeFalsy();
|
|
88
|
-
});
|
|
89
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { mount, shallowMount } from '@vue/test-utils';
|
|
2
|
-
|
|
3
|
-
import taggableMixin from '../taggableMixin.js';
|
|
4
|
-
|
|
5
|
-
describe('taggableMixin', () => {
|
|
6
|
-
const Component = {
|
|
7
|
-
render() {},
|
|
8
|
-
mixins: [
|
|
9
|
-
taggableMixin,
|
|
10
|
-
],
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
it('renders a component', () => {
|
|
14
|
-
const wrapper = shallowMount(Component);
|
|
15
|
-
expect(wrapper.exists()).toBe(true);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('Methods are called correctly', () => {
|
|
19
|
-
const searchQuery = '123';
|
|
20
|
-
const wrapper = mount(Component);
|
|
21
|
-
|
|
22
|
-
wrapper.vm.$emit('tag', searchQuery);
|
|
23
|
-
|
|
24
|
-
expect(wrapper.emitted().tag).toBeTruthy();
|
|
25
|
-
expect(wrapper.emitted().input).toBeFalsy();
|
|
26
|
-
});
|
|
27
|
-
});
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="{
|
|
4
|
-
'wt-tags-input--disabled': disabled,
|
|
5
|
-
'wt-tags-input--invalid': invalid,
|
|
6
|
-
'wt-tags-input--loading': isLoading,
|
|
7
|
-
}"
|
|
8
|
-
class="wt-tags-input"
|
|
9
|
-
>
|
|
10
|
-
<wt-label
|
|
11
|
-
v-if="hasLabel"
|
|
12
|
-
:disabled="disabled"
|
|
13
|
-
:invalid="invalid"
|
|
14
|
-
class="wt-tags-input__label"
|
|
15
|
-
v-bind="labelProps"
|
|
16
|
-
>
|
|
17
|
-
<!-- @slot Custom input label -->
|
|
18
|
-
<slot
|
|
19
|
-
name="label"
|
|
20
|
-
v-bind="{ label }"
|
|
21
|
-
>
|
|
22
|
-
{{ requiredLabel }}
|
|
23
|
-
</slot>
|
|
24
|
-
</wt-label>
|
|
25
|
-
|
|
26
|
-
<vue-multiselect
|
|
27
|
-
ref="vue-multiselect"
|
|
28
|
-
:close-on-select="false"
|
|
29
|
-
:disabled="disabled"
|
|
30
|
-
:internal-search="!searchMethod"
|
|
31
|
-
:label="selectOptionLabel"
|
|
32
|
-
:loading="false"
|
|
33
|
-
:model-value="selectValue"
|
|
34
|
-
:multiple="multiple"
|
|
35
|
-
:options="selectOptions"
|
|
36
|
-
:placeholder="placeholder || label"
|
|
37
|
-
:taggable="taggable"
|
|
38
|
-
:track-by="trackBy"
|
|
39
|
-
class="wt-tags-input__select"
|
|
40
|
-
v-bind="$attrs"
|
|
41
|
-
v-on="listeners"
|
|
42
|
-
>
|
|
43
|
-
<!-- Slot that is used for all selected options (tags)-->
|
|
44
|
-
<template #tag="{ option, remove }">
|
|
45
|
-
<wt-chip class="multiselect__custom-tag">
|
|
46
|
-
{{ getTagOptionLabel({ option, optionLabel }) }}
|
|
47
|
-
<wt-icon-btn
|
|
48
|
-
color="on-primary"
|
|
49
|
-
icon="close--filled"
|
|
50
|
-
size="sm"
|
|
51
|
-
@click="remove(option)"
|
|
52
|
-
/>
|
|
53
|
-
</wt-chip>
|
|
54
|
-
</template>
|
|
55
|
-
|
|
56
|
-
<!-- Slot for custom option template -->
|
|
57
|
-
<template #option="{ option }">
|
|
58
|
-
<slot
|
|
59
|
-
name="option"
|
|
60
|
-
v-bind="{ option, optionLabel }"
|
|
61
|
-
>
|
|
62
|
-
{{ getTagOptionLabel({ option, optionLabel }) }}
|
|
63
|
-
</slot>
|
|
64
|
-
</template>
|
|
65
|
-
|
|
66
|
-
<!-- Element for opening and closing the dropdown -->
|
|
67
|
-
<template #caret="{ toggle }">
|
|
68
|
-
<!-- @mousedown.native.prevent.stop="toggle": https://github.com/shentao/vue-multiselect/issues/1204#issuecomment-615114727 -->
|
|
69
|
-
<wt-icon-btn
|
|
70
|
-
:disabled="disabled"
|
|
71
|
-
class="multiselect__select"
|
|
72
|
-
color="active"
|
|
73
|
-
icon="arrow-down"
|
|
74
|
-
@mousedown.prevent.stop="toggle"
|
|
75
|
-
/>
|
|
76
|
-
</template>
|
|
77
|
-
|
|
78
|
-
<template #beforeList>
|
|
79
|
-
<div
|
|
80
|
-
v-show="isLoading"
|
|
81
|
-
class="multiselect__loading-wrapper"
|
|
82
|
-
>
|
|
83
|
-
<wt-loader size="sm" />
|
|
84
|
-
</div>
|
|
85
|
-
</template>
|
|
86
|
-
|
|
87
|
-
<template
|
|
88
|
-
v-if="showIntersectionObserver"
|
|
89
|
-
#afterList
|
|
90
|
-
>
|
|
91
|
-
<div v-observe-visibility="handleAfterListIntersect" />
|
|
92
|
-
</template>
|
|
93
|
-
</vue-multiselect>
|
|
94
|
-
|
|
95
|
-
<wt-message
|
|
96
|
-
v-if="isValidation && validationText"
|
|
97
|
-
:color="validationTextColor"
|
|
98
|
-
:variant="MessageVariant.SIMPLE"
|
|
99
|
-
:size="ComponentSize.SM"
|
|
100
|
-
>
|
|
101
|
-
{{ validationText }}
|
|
102
|
-
</wt-message>
|
|
103
|
-
</div>
|
|
104
|
-
</template>
|
|
105
|
-
|
|
106
|
-
<script>
|
|
107
|
-
import deepEqual from 'deep-equal';
|
|
108
|
-
import { ComponentSize, MessageVariant } from '../../enums';
|
|
109
|
-
import validationMixin from '../../mixins/validationMixin/validationMixin';
|
|
110
|
-
import multiselectMixin from '../wt-select/mixins/multiselectMixin.js';
|
|
111
|
-
import taggableMixin from './mixin/taggableMixin.js';
|
|
112
|
-
|
|
113
|
-
export default {
|
|
114
|
-
name: 'WtTagsInput',
|
|
115
|
-
mixins: [
|
|
116
|
-
validationMixin,
|
|
117
|
-
multiselectMixin,
|
|
118
|
-
// taggableMixin is used to add custom select values, see [https://my.webitel.com/browse/WTEL-3181
|
|
119
|
-
taggableMixin,
|
|
120
|
-
],
|
|
121
|
-
/**
|
|
122
|
-
* @emits {Array} input - Fires when tags value changes. Emits value array
|
|
123
|
-
* @emits {string} tag - Fires when tag is added (if manualTagging is true). Emits vue-multiselect "tag" value
|
|
124
|
-
* @emits {string} search-change - Fires when search query changes
|
|
125
|
-
* @emits {void} closed - Fires when dropdown is closed
|
|
126
|
-
*
|
|
127
|
-
* Note: This component inherits props from multiselectMixin (options, placeholder, optionLabel, searchMethod, disabled, required, allowEmpty, useValueFromOptionsByProp)
|
|
128
|
-
* and validationMixin (v, customValidators). Also inherits label-related props from labelUsageMixin (label, labelProps).
|
|
129
|
-
*/
|
|
130
|
-
props: {
|
|
131
|
-
/**
|
|
132
|
-
* Current tags value (v-model). Default mode for tags input is array of strings, not objects (that is the difference between tags input and select).
|
|
133
|
-
* @type {Array}
|
|
134
|
-
* @model value
|
|
135
|
-
*/
|
|
136
|
-
value: {
|
|
137
|
-
type: Array,
|
|
138
|
-
},
|
|
139
|
-
/**
|
|
140
|
-
* Default mode for tags input is array of strings, not objects (that is the difference between tags input and select).
|
|
141
|
-
* @type {string}
|
|
142
|
-
* @default null
|
|
143
|
-
*/
|
|
144
|
-
trackBy: {
|
|
145
|
-
type: String,
|
|
146
|
-
default: null,
|
|
147
|
-
},
|
|
148
|
-
/**
|
|
149
|
-
* If true, user can add tags by himself
|
|
150
|
-
* @type {boolean}
|
|
151
|
-
* @default false
|
|
152
|
-
*/
|
|
153
|
-
taggable: {
|
|
154
|
-
type: Boolean,
|
|
155
|
-
default: false,
|
|
156
|
-
},
|
|
157
|
-
/**
|
|
158
|
-
* Represented property of select object. REQUIRED IN OBJECT-DATA TAG-INPUTS TO PREVENT OPTION DUPLICATION.
|
|
159
|
-
* @type {string}
|
|
160
|
-
* @default null
|
|
161
|
-
*/
|
|
162
|
-
optionLabel: {
|
|
163
|
-
type: String,
|
|
164
|
-
default: null,
|
|
165
|
-
},
|
|
166
|
-
/**
|
|
167
|
-
* False: "tag" method automatically pushes { optionLabel | "name", trackBy } object to value array and $emits "input" event.
|
|
168
|
-
* True: "tag" method only $emits "tag" event. Tag addition is responsibility of client side.
|
|
169
|
-
* @type {boolean}
|
|
170
|
-
* @default false
|
|
171
|
-
*/
|
|
172
|
-
manualTagging: {
|
|
173
|
-
type: Boolean,
|
|
174
|
-
default: false,
|
|
175
|
-
description: `
|
|
176
|
-
False: "tag" method automatically pushes { optionLabel | "name", trackBy } object to value
|
|
177
|
-
array and $emits "input" event.
|
|
178
|
-
|
|
179
|
-
True: "tag" method only $emits "tag" event. Tag addition is responsibility of client side.
|
|
180
|
-
`,
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
emits: [
|
|
184
|
-
'input',
|
|
185
|
-
'tag',
|
|
186
|
-
'search-change',
|
|
187
|
-
'closed',
|
|
188
|
-
],
|
|
189
|
-
data: () => ({
|
|
190
|
-
defaultOptionLabel: 'label',
|
|
191
|
-
|
|
192
|
-
// [https://webitel.atlassian.net/browse/WTEL-4310]
|
|
193
|
-
// Multiple value is needed in TaggableMixin mixin to correctly add custom values
|
|
194
|
-
|
|
195
|
-
multiple: true,
|
|
196
|
-
|
|
197
|
-
// Expose enums to template
|
|
198
|
-
MessageVariant,
|
|
199
|
-
ComponentSize,
|
|
200
|
-
}),
|
|
201
|
-
created() {
|
|
202
|
-
if (!this.isApiMode) {
|
|
203
|
-
this.initializeOptions();
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
methods: {
|
|
207
|
-
getTagOptionLabel({ optionLabel, option }) {
|
|
208
|
-
/*
|
|
209
|
-
Multiselect creates new tags with "label" property by default, so we need to handle
|
|
210
|
-
it as well
|
|
211
|
-
*/
|
|
212
|
-
const label = this.getOptionLabel({
|
|
213
|
-
optionLabel,
|
|
214
|
-
option,
|
|
215
|
-
});
|
|
216
|
-
return typeof label === 'object' ? option.label : label;
|
|
217
|
-
},
|
|
218
|
-
initializeOptions() {
|
|
219
|
-
if (!this.value) {
|
|
220
|
-
return [];
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
const newOptions = this.value.filter((valObj) => {
|
|
224
|
-
return !this.options.find((option) => {
|
|
225
|
-
return deepEqual(option, valObj);
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
this.options.unshift(...newOptions);
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
};
|
|
233
|
-
</script>
|
|
234
|
-
|
|
235
|
-
<style scoped>
|
|
236
|
-
@import '../wt-select/multiselect.css';
|
|
237
|
-
|
|
238
|
-
.wt-tags-input {
|
|
239
|
-
width: 100%;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.wt-tags-input--disabled .wt-tags-input__tags-input {
|
|
243
|
-
width: 100%;
|
|
244
|
-
max-width: 100%;
|
|
245
|
-
/* reset default */
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/* paddings recalc */
|
|
249
|
-
.wt-tags-input :deep(.multiselect) .multiselect__tags {
|
|
250
|
-
padding-right: calc(var(--input-padding) + var(--icon-md-size) + var(--select-caret-right-pos));
|
|
251
|
-
padding-bottom: 0;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
:deep(.multiselect__tags-wrap) {
|
|
255
|
-
display: flex;
|
|
256
|
-
flex-wrap: wrap;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.wt-tags-input :deep(.multiselect__custom-tag) {
|
|
260
|
-
display: flex;
|
|
261
|
-
flex-wrap: nowrap;
|
|
262
|
-
align-items: center;
|
|
263
|
-
gap: var(--spacing-xs);
|
|
264
|
-
margin: 0 var(--spacing-xs) calc(var(--spacing-xs) - 1px) 0;
|
|
265
|
-
/* border bottom */
|
|
266
|
-
max-width: 100%;
|
|
267
|
-
word-break: break-all;
|
|
268
|
-
white-space: normal;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
:deep(.multiselect__input) {
|
|
272
|
-
margin-bottom: calc(var(--spacing-xs) - 1px);
|
|
273
|
-
/* border */
|
|
274
|
-
}
|
|
275
|
-
</style>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|