@mozaic-ds/vue 0.9.0 → 0.10.0
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 +429 -0
- package/README.md +2 -3
- package/dist/mozaic-vue.adeo.css +1 -1
- package/dist/mozaic-vue.adeo.umd.js +1415 -562
- package/dist/mozaic-vue.common.js +1415 -562
- package/dist/mozaic-vue.common.js.map +1 -1
- package/dist/mozaic-vue.css +1 -1
- package/dist/mozaic-vue.umd.js +1415 -562
- 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/datatable/MDataTable.vue +34 -10
- package/src/components/pagination/MPagination.vue +8 -1
- package/src/components/radio/MRadio.vue +5 -1
- package/src/components/radio/MRadioGroup.vue +1 -1
- package/src/components/select/MSelect.vue +3 -1
- package/src/components/textinput/MTextInput.vue +2 -10
- package/dist/img/flags.1147a273.png +0 -0
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
</thead>
|
|
36
36
|
<tbody>
|
|
37
37
|
<tr
|
|
38
|
-
v-for="item in getSource"
|
|
38
|
+
v-for="(item, rowIndex) in getSource"
|
|
39
39
|
:key="item[dataKeyExpr]"
|
|
40
40
|
:class="rowClasses(item)"
|
|
41
41
|
>
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
allowRowClick && onRowClick({ event: $event, item: item })
|
|
50
50
|
"
|
|
51
51
|
>
|
|
52
|
-
<slot :name="`item.${header.dataFieldExpr}`" :item="item">
|
|
52
|
+
<slot :name="`item.${header.dataFieldExpr}`" :item="item" :index="rowIndex">
|
|
53
53
|
{{ getItemValue(item, header.dataFieldExpr) }}
|
|
54
54
|
</slot>
|
|
55
55
|
</td>
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
</tbody>
|
|
63
63
|
</table>
|
|
64
64
|
</div>
|
|
65
|
-
<div v-if="pagingOptions.enabled" class="mc-data-table__footer">
|
|
65
|
+
<div v-if="pagingOptions.enabled && total != null" class="mc-data-table__footer">
|
|
66
66
|
<div class="mc-data-table__footer__item-per-page">
|
|
67
67
|
<m-select
|
|
68
68
|
:id="'itemPerPage'"
|
|
@@ -70,7 +70,13 @@
|
|
|
70
70
|
:options="getPageSizes"
|
|
71
71
|
:value="getPageValue"
|
|
72
72
|
@change="onPageSizeChanged"
|
|
73
|
-
|
|
73
|
+
>
|
|
74
|
+
<template #text="{ option }">
|
|
75
|
+
<slot name="pager.text" :pager="option">
|
|
76
|
+
{{ option.text }}
|
|
77
|
+
</slot>
|
|
78
|
+
</template>
|
|
79
|
+
</m-select>
|
|
74
80
|
</div>
|
|
75
81
|
<div
|
|
76
82
|
v-if="pagingOptions.displayTotal"
|
|
@@ -86,7 +92,13 @@
|
|
|
86
92
|
:page-label="pagingOptions.pageLabel"
|
|
87
93
|
:value="pagingOptions.index"
|
|
88
94
|
@on-update-page="onUpdatePage"
|
|
89
|
-
|
|
95
|
+
>
|
|
96
|
+
<template #text="{ option }">
|
|
97
|
+
<slot name="paging.text" :paging="option">
|
|
98
|
+
{{ option.text }}
|
|
99
|
+
</slot>
|
|
100
|
+
</template>
|
|
101
|
+
</m-pagination>
|
|
90
102
|
</div>
|
|
91
103
|
</div>
|
|
92
104
|
</div>
|
|
@@ -165,7 +177,7 @@ const Pager = {
|
|
|
165
177
|
const Paging = {
|
|
166
178
|
defaultOptions: {
|
|
167
179
|
enabled: false,
|
|
168
|
-
|
|
180
|
+
text: 'sur',
|
|
169
181
|
index: 1,
|
|
170
182
|
},
|
|
171
183
|
};
|
|
@@ -200,7 +212,10 @@ export default {
|
|
|
200
212
|
default: 'id',
|
|
201
213
|
},
|
|
202
214
|
|
|
203
|
-
/**
|
|
215
|
+
/**
|
|
216
|
+
* Get or set the headers informations.
|
|
217
|
+
* @type {{ caption: string, dataFieldExpr: string, sortFieldExpr: string, allowSorting: boolean, sortOrder: 'asc' | 'desc' | null }[] }
|
|
218
|
+
*/
|
|
204
219
|
headers: {
|
|
205
220
|
type: Array,
|
|
206
221
|
default: () => [],
|
|
@@ -221,13 +236,19 @@ export default {
|
|
|
221
236
|
default: () => [],
|
|
222
237
|
},
|
|
223
238
|
|
|
224
|
-
/**
|
|
239
|
+
/**
|
|
240
|
+
* Get or set pager informations.
|
|
241
|
+
* @type {{ sizes: number[], text: string, value: number }}
|
|
242
|
+
*/
|
|
225
243
|
pager: {
|
|
226
244
|
type: Object,
|
|
227
245
|
default: () => ({}),
|
|
228
246
|
},
|
|
229
247
|
|
|
230
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* Get or set paging informations.
|
|
250
|
+
* @type {{ enabled: boolean, text: string, index: number }}
|
|
251
|
+
*/
|
|
231
252
|
paging: {
|
|
232
253
|
type: Object,
|
|
233
254
|
default: () => ({}),
|
|
@@ -245,7 +266,10 @@ export default {
|
|
|
245
266
|
default: false,
|
|
246
267
|
},
|
|
247
268
|
|
|
248
|
-
/**
|
|
269
|
+
/**
|
|
270
|
+
* Get or set the sorting informations.
|
|
271
|
+
* @type {{ mode:'none' | 'single' | 'multiple'}}
|
|
272
|
+
*/
|
|
249
273
|
sorting: {
|
|
250
274
|
type: Object,
|
|
251
275
|
default: () => ({}),
|
|
@@ -21,7 +21,13 @@
|
|
|
21
21
|
:disabled="disabled"
|
|
22
22
|
class="mc-pagination__select"
|
|
23
23
|
@change="changePage(Number($event))"
|
|
24
|
-
|
|
24
|
+
>
|
|
25
|
+
<template #text="{ option }">
|
|
26
|
+
<slot name="text" :option="{ ...option, length }">
|
|
27
|
+
{{ option.text }}
|
|
28
|
+
</slot>
|
|
29
|
+
</template>
|
|
30
|
+
</m-select>
|
|
25
31
|
</div>
|
|
26
32
|
|
|
27
33
|
<component
|
|
@@ -130,6 +136,7 @@ export default {
|
|
|
130
136
|
},
|
|
131
137
|
changePage(newPage) {
|
|
132
138
|
this.$emit('on-update-page', newPage);
|
|
139
|
+
this.$emit('update:value',newPage);
|
|
133
140
|
},
|
|
134
141
|
previousPage(newPage) {
|
|
135
142
|
if (this.hasPreviousPageListener()) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="mc-radio">
|
|
2
|
+
<div class="mc-radio" :class="rootClass">
|
|
3
3
|
<input
|
|
4
4
|
:id="id"
|
|
5
5
|
type="radio"
|
|
@@ -41,6 +41,10 @@ export default {
|
|
|
41
41
|
type: Boolean,
|
|
42
42
|
default: false,
|
|
43
43
|
},
|
|
44
|
+
rootClass: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: '',
|
|
47
|
+
},
|
|
44
48
|
},
|
|
45
49
|
};
|
|
46
50
|
</script>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
:key="option.id ? option.id : option.value"
|
|
24
24
|
:is-invalid="isInvalid"
|
|
25
25
|
:label="option.label"
|
|
26
|
-
class="mc-field__item"
|
|
26
|
+
root-class="mc-field__item"
|
|
27
27
|
:checked="value === option.value"
|
|
28
28
|
@change="(v) => (v ? $emit('input', option.value) : null)"
|
|
29
29
|
/>
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<m-text-input-icon :icon="icon" />
|
|
2
|
+
<div key="icon-input" :class="{ 'mc-left-icon-input': icon }">
|
|
3
|
+
<m-text-input-icon v-if="icon" :icon="icon" />
|
|
4
4
|
<m-text-input-field
|
|
5
5
|
ref="mField"
|
|
6
6
|
v-bind="[$attrs, $props]"
|
|
7
7
|
v-on="$listeners"
|
|
8
8
|
/>
|
|
9
9
|
</div>
|
|
10
|
-
|
|
11
|
-
<m-text-input-field
|
|
12
|
-
v-else
|
|
13
|
-
key="input-only"
|
|
14
|
-
ref="mField"
|
|
15
|
-
v-bind="[$attrs, $props]"
|
|
16
|
-
v-on="$listeners"
|
|
17
|
-
/>
|
|
18
10
|
</template>
|
|
19
11
|
|
|
20
12
|
<script>
|
|
Binary file
|