@mozaic-ds/vue 0.20.0-beta.3 → 0.20.0-beta.4
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/CHANGELOG.md +13 -0
- package/dist/mozaic-vue.adeo.css +1 -1
- package/dist/mozaic-vue.adeo.umd.js +31 -25
- package/dist/mozaic-vue.common.js +31 -25
- package/dist/mozaic-vue.common.js.map +1 -1
- package/dist/mozaic-vue.umd.js +31 -25
- package/dist/mozaic-vue.umd.js.map +1 -1
- package/dist/mozaic-vue.umd.min.js +1 -1
- package/dist/mozaic-vue.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/autocomplete/MAutocomplete.vue +60 -45
- package/src/components/listbox/MListBox.vue +0 -7
package/package.json
CHANGED
|
@@ -1,46 +1,44 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<div
|
|
3
|
+
ref="autocomplete"
|
|
4
|
+
v-click-outside="onClickOutside"
|
|
5
|
+
class="mc-autocomplete"
|
|
6
|
+
:class="{ 'mc-autocomplete--multi': multiple }"
|
|
7
|
+
:style="tagStyle"
|
|
8
|
+
>
|
|
9
|
+
<m-tag
|
|
10
|
+
v-if="multiple && tagValue.length > 1"
|
|
11
|
+
type="removable"
|
|
12
|
+
:label="tagValue.length.toString() + ' ' + tagLabel"
|
|
13
|
+
class="mc-autocomplete__tag"
|
|
14
|
+
size="s"
|
|
15
|
+
@remove-tag="clearAutocomplete()"
|
|
16
|
+
/>
|
|
17
|
+
<m-text-input
|
|
18
|
+
v-model="inputValue"
|
|
19
|
+
:placeholder="placeholder"
|
|
20
|
+
text-input-field-class="mc-autocomplete__trigger"
|
|
21
|
+
icon-position="left"
|
|
22
|
+
icon="DisplaySearch48"
|
|
23
|
+
autocomplete="off"
|
|
24
|
+
@input="filterList"
|
|
25
|
+
@click="isOpen = true"
|
|
26
|
+
/>
|
|
27
|
+
<m-list-box
|
|
28
|
+
v-model="listboxValue"
|
|
29
|
+
:open="isOpen"
|
|
30
|
+
:items="itemListForDropdown"
|
|
31
|
+
:multiple="multiple"
|
|
32
|
+
:empty-search-label="emptySearchLabel"
|
|
33
|
+
:data-key-expr="dataKeyExpr"
|
|
34
|
+
:data-text-expr="dataTextExpr"
|
|
35
|
+
:data-value-expr="dataValueExpr"
|
|
36
|
+
@change="onChange"
|
|
10
37
|
>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class="mc-autocomplete__tag"
|
|
16
|
-
size="s"
|
|
17
|
-
@remove-tag="clearAutocomplete()"
|
|
18
|
-
/>
|
|
19
|
-
<m-text-input
|
|
20
|
-
v-model="inputValue"
|
|
21
|
-
:placeholder="placeholder"
|
|
22
|
-
text-input-field-class="mc-autocomplete__trigger"
|
|
23
|
-
icon-position="left"
|
|
24
|
-
icon="DisplaySearch48"
|
|
25
|
-
autocomplete="off"
|
|
26
|
-
@input="filterList"
|
|
27
|
-
@click="isOpen = true"
|
|
28
|
-
/>
|
|
29
|
-
<m-list-box
|
|
30
|
-
v-model="listboxValue"
|
|
31
|
-
:open="isOpen"
|
|
32
|
-
:items="itemListForDropdown"
|
|
33
|
-
:multiple="multiple"
|
|
34
|
-
:empty-search-label="emptySearchLabel"
|
|
35
|
-
:data-key-expr="dataKeyExpr"
|
|
36
|
-
:data-text-expr="dataTextExpr"
|
|
37
|
-
:data-value-expr="dataValueExpr"
|
|
38
|
-
>
|
|
39
|
-
<template #item="{ item }">
|
|
40
|
-
<slot name="item" :item="item" />
|
|
41
|
-
</template>
|
|
42
|
-
</m-list-box>
|
|
43
|
-
</div>
|
|
38
|
+
<template #item="{ item }">
|
|
39
|
+
<slot name="item" :item="item" />
|
|
40
|
+
</template>
|
|
41
|
+
</m-list-box>
|
|
44
42
|
</div>
|
|
45
43
|
</template>
|
|
46
44
|
|
|
@@ -74,6 +72,10 @@ export default {
|
|
|
74
72
|
},
|
|
75
73
|
},
|
|
76
74
|
|
|
75
|
+
model: {
|
|
76
|
+
event: 'change',
|
|
77
|
+
},
|
|
78
|
+
|
|
77
79
|
props: {
|
|
78
80
|
open: {
|
|
79
81
|
type: Boolean,
|
|
@@ -116,10 +118,10 @@ export default {
|
|
|
116
118
|
type: String,
|
|
117
119
|
default: 'text',
|
|
118
120
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
value: {
|
|
122
|
+
type: Array,
|
|
123
|
+
default: () => [],
|
|
124
|
+
},
|
|
123
125
|
},
|
|
124
126
|
|
|
125
127
|
data() {
|
|
@@ -163,6 +165,13 @@ export default {
|
|
|
163
165
|
},
|
|
164
166
|
immediate: true,
|
|
165
167
|
},
|
|
168
|
+
|
|
169
|
+
value: {
|
|
170
|
+
handler: function (value) {
|
|
171
|
+
this.listboxValue = value;
|
|
172
|
+
},
|
|
173
|
+
immediate: true,
|
|
174
|
+
},
|
|
166
175
|
},
|
|
167
176
|
|
|
168
177
|
mounted() {
|
|
@@ -181,6 +190,7 @@ export default {
|
|
|
181
190
|
|
|
182
191
|
clearAutocomplete() {
|
|
183
192
|
this.listboxValue = [];
|
|
193
|
+
this.onChange();
|
|
184
194
|
this.$emit('clear');
|
|
185
195
|
},
|
|
186
196
|
|
|
@@ -200,6 +210,10 @@ export default {
|
|
|
200
210
|
onClickOutside() {
|
|
201
211
|
this.isOpen = false;
|
|
202
212
|
},
|
|
213
|
+
|
|
214
|
+
onChange() {
|
|
215
|
+
this.$emit('change', this.listboxValue);
|
|
216
|
+
},
|
|
203
217
|
},
|
|
204
218
|
};
|
|
205
219
|
|
|
@@ -210,6 +224,7 @@ export default {
|
|
|
210
224
|
|
|
211
225
|
<style lang="scss">
|
|
212
226
|
@import 'settings-tools/all-settings';
|
|
227
|
+
@import 'components/c.checkbox';
|
|
213
228
|
@import 'components/c.autocomplete';
|
|
214
229
|
|
|
215
230
|
.mc-autocomplete--multi .mc-autocomplete__trigger {
|
|
@@ -15,13 +15,6 @@
|
|
|
15
15
|
>{{ item[dataTextExpr] }}
|
|
16
16
|
</label>
|
|
17
17
|
</slot>
|
|
18
|
-
<!-- <m-checkbox
|
|
19
|
-
v-if="multiple"
|
|
20
|
-
:id="`checkbox-dropdown-${item.id}`"
|
|
21
|
-
v-model="selectableItems.find((elem) => elem.id === item.id).selected"
|
|
22
|
-
class="mc-listbox__input"
|
|
23
|
-
@change="updateList(item.id, item.text, !item.selected, $e)"
|
|
24
|
-
/> -->
|
|
25
18
|
<input
|
|
26
19
|
:id="`checkbox-dropdown-${item[dataKeyExpr]}-${uuid}`"
|
|
27
20
|
ref="input"
|