@mozaic-ds/vue 0.43.0-beta.0 → 0.43.1
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/mozaic-vue.adeo.umd.js +88 -64
- package/dist/mozaic-vue.adeo.umd.js.map +1 -1
- package/dist/mozaic-vue.common.js +88 -64
- package/dist/mozaic-vue.common.js.map +1 -1
- package/dist/mozaic-vue.umd.js +88 -64
- package/dist/mozaic-vue.umd.js.map +1 -1
- package/dist/mozaic-vue.umd.min.js +2 -2
- package/dist/mozaic-vue.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/autocomplete/MAutocomplete.vue +14 -10
- package/src/components/button/MButton.vue +1 -0
- package/src/components/checkbox/MCheckboxGroup.vue +4 -4
- package/src/components/datatable/MDataTable.vue +1 -5
- package/src/components/dropdown/MDropdown.vue +11 -9
- package/src/components/modal/MModal.vue +16 -4
- package/src/components/radio/MRadioGroup.vue +1 -1
package/package.json
CHANGED
|
@@ -33,16 +33,20 @@
|
|
|
33
33
|
@input="onInput"
|
|
34
34
|
@click="openState = true"
|
|
35
35
|
/>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
<div class="mc-autocomplete__tools">
|
|
37
|
+
<MLoader v-if="loading" class="mc-autocomplete__loader" size="s" />
|
|
38
|
+
<button
|
|
39
|
+
v-if="isClearable"
|
|
40
|
+
type="button"
|
|
41
|
+
class="mc-autocomplete__clear"
|
|
42
|
+
@click="onClear"
|
|
43
|
+
>
|
|
44
|
+
<MIcon name="ControlTagCross24" class="mc-autocomplete__clear-icon" />
|
|
45
|
+
<span class="mc-autocomplete__clear-text">{{
|
|
46
|
+
labelClearButton
|
|
47
|
+
}}</span>
|
|
48
|
+
</button>
|
|
49
|
+
</div>
|
|
46
50
|
</div>
|
|
47
51
|
<MListBox
|
|
48
52
|
v-if="!isFiltered"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
>
|
|
29
29
|
<template #label>
|
|
30
30
|
<!-- @slot Use this slot if you want to customise the label display of each MCheckbox element -->
|
|
31
|
-
<slot :name="`label${index + 1}`">
|
|
31
|
+
<slot :name="`label${index + 1}`" :option="option">
|
|
32
32
|
{{ option.label }}
|
|
33
33
|
</slot>
|
|
34
34
|
</template>
|
|
@@ -139,12 +139,12 @@ export default {
|
|
|
139
139
|
},
|
|
140
140
|
data() {
|
|
141
141
|
return {
|
|
142
|
-
|
|
142
|
+
localValue: this.value ?? [],
|
|
143
143
|
};
|
|
144
144
|
},
|
|
145
145
|
methods: {
|
|
146
146
|
onChange(isChecked, value) {
|
|
147
|
-
let values = this.
|
|
147
|
+
let values = this.localValue;
|
|
148
148
|
|
|
149
149
|
if (isChecked && !values.includes(value)) {
|
|
150
150
|
values.push(value);
|
|
@@ -156,7 +156,7 @@ export default {
|
|
|
156
156
|
* Triggered each time a checkbox is checked/unchecked. _(can be used with a v-model)_
|
|
157
157
|
*/
|
|
158
158
|
this.$emit('change', values);
|
|
159
|
-
this.
|
|
159
|
+
this.localValue = values;
|
|
160
160
|
},
|
|
161
161
|
},
|
|
162
162
|
};
|
|
@@ -539,13 +539,9 @@ export default {
|
|
|
539
539
|
},
|
|
540
540
|
},
|
|
541
541
|
paging: {
|
|
542
|
-
deep: true,
|
|
543
542
|
immediate: true,
|
|
544
543
|
async handler(newValue, oldValue) {
|
|
545
|
-
if (
|
|
546
|
-
deepEqual(newValue, oldValue) &&
|
|
547
|
-
!(this.source instanceof Function)
|
|
548
|
-
) {
|
|
544
|
+
if (deepEqual(newValue, oldValue)) {
|
|
549
545
|
return;
|
|
550
546
|
}
|
|
551
547
|
|
|
@@ -27,15 +27,17 @@
|
|
|
27
27
|
>
|
|
28
28
|
{{ getButtonLabel }}
|
|
29
29
|
</button>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
<div class="mc-dropdown__tools">
|
|
31
|
+
<button
|
|
32
|
+
v-if="isClearable"
|
|
33
|
+
class="mc-dropdown__clear"
|
|
34
|
+
type="button"
|
|
35
|
+
@click="clearListbox"
|
|
36
|
+
>
|
|
37
|
+
<MIcon name="ControlTagCross24" class="mc-dropdown__clear-icon" />
|
|
38
|
+
<span class="mc-dropdown__clear-text">{{ labelClearButton }}</span>
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
39
41
|
</div>
|
|
40
42
|
<MListBox
|
|
41
43
|
v-model="listboxValue"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<Portal :selector="appendTo">
|
|
3
3
|
<div
|
|
4
4
|
ref="modal"
|
|
5
5
|
class="mc-modal"
|
|
@@ -54,18 +54,20 @@
|
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
|
-
<
|
|
57
|
+
<KeepAlive>
|
|
58
58
|
<div
|
|
59
59
|
class="mc-modal-overlay"
|
|
60
60
|
:class="{ 'is-visible': open }"
|
|
61
61
|
tabindex="-1"
|
|
62
62
|
role="dialog"
|
|
63
63
|
/>
|
|
64
|
-
</
|
|
65
|
-
</
|
|
64
|
+
</KeepAlive>
|
|
65
|
+
</Portal>
|
|
66
66
|
</template>
|
|
67
67
|
|
|
68
68
|
<script>
|
|
69
|
+
import { Portal } from '@linusborg/vue-simple-portal';
|
|
70
|
+
|
|
69
71
|
/**
|
|
70
72
|
* > A modal is a dialog window allowing you to focus the user's attention on a specific task, a piece of information or a mandatory action. It must be used for single action only and must have a call to action button in the bottom.
|
|
71
73
|
*
|
|
@@ -74,6 +76,9 @@
|
|
|
74
76
|
*/
|
|
75
77
|
export default {
|
|
76
78
|
name: 'MModal',
|
|
79
|
+
components: {
|
|
80
|
+
Portal,
|
|
81
|
+
},
|
|
77
82
|
props: {
|
|
78
83
|
/**
|
|
79
84
|
* Allows to make the Modal visible or hide it. Can be used with `v-model`.
|
|
@@ -127,6 +132,13 @@ export default {
|
|
|
127
132
|
type: Boolean,
|
|
128
133
|
default: true,
|
|
129
134
|
},
|
|
135
|
+
/**
|
|
136
|
+
* A query selector that defines the target element to which to append the content of the Portal
|
|
137
|
+
*/
|
|
138
|
+
appendTo: {
|
|
139
|
+
type: String,
|
|
140
|
+
default: undefined,
|
|
141
|
+
},
|
|
130
142
|
},
|
|
131
143
|
watch: {
|
|
132
144
|
open: {
|