@mozaic-ds/vue 0.19.0 → 1.0.0-rc.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/dist/mozaic-vue.adeo.css +12 -11
- package/dist/mozaic-vue.adeo.umd.js +26592 -7880
- package/dist/mozaic-vue.common.js +26592 -7880
- package/dist/mozaic-vue.common.js.map +1 -1
- package/dist/mozaic-vue.css +1 -1
- package/dist/mozaic-vue.umd.js +26592 -7880
- package/dist/mozaic-vue.umd.js.map +1 -1
- package/dist/mozaic-vue.umd.min.js +3 -1
- package/dist/mozaic-vue.umd.min.js.map +1 -1
- package/package.json +5 -5
- package/src/components/datatable/MDataTable.vue +163 -288
- package/src/components/datatable/MDataTableTop.vue +35 -0
- package/src/components/icon/MIcon.vue +1 -2
- package/src/tokens/adeo/android/colors.xml +42 -38
- package/src/tokens/adeo/css/_variables.scss +42 -38
- package/src/tokens/adeo/css/root.scss +26 -22
- package/src/tokens/adeo/ios/StyleDictionaryColor.h +4 -0
- package/src/tokens/adeo/ios/StyleDictionaryColor.m +42 -38
- package/src/tokens/adeo/ios/StyleDictionaryColor.swift +42 -38
- package/src/tokens/adeo/js/tokens.js +42 -38
- package/src/tokens/adeo/js/tokensObject.js +144 -60
- package/src/tokens/adeo/scss/_tokens.scss +50 -42
- package/dist/fonts/LeroyMerlinSans-Web-Italic.1b652c01.woff2 +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-Italic.e1daa96d.woff +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-Light.abc49f3e.woff +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-Light.fbea6009.woff2 +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-LightItalic.01eca0b6.woff +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-LightItalic.b0c55b75.woff2 +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-Regular.ad6adbe4.woff +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-Regular.fbf22a5a.woff2 +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-SemiBold.a1cbb92f.woff +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-SemiBold.a6ab3422.woff2 +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-SemiBoldItalic.6bdb2efc.woff2 +0 -0
- package/dist/fonts/LeroyMerlinSans-Web-SemiBoldItalic.93f14f9f.woff +0 -0
- package/src/components/icon/icons.js +0 -18887
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mozaic-ds/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-rc.0",
|
|
4
4
|
"description": "Vue.js implementation of Mozaic Design System",
|
|
5
5
|
"author": "Adeo - Mozaic Design System",
|
|
6
6
|
"scripts": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"postinstall.js"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@mozaic-ds/css-dev-tools": "
|
|
27
|
-
"@mozaic-ds/icons": "
|
|
28
|
-
"@mozaic-ds/styles": "
|
|
29
|
-
"@mozaic-ds/web-fonts": "
|
|
26
|
+
"@mozaic-ds/css-dev-tools": "2.0.0-rc.1",
|
|
27
|
+
"@mozaic-ds/icons": "1.34.0",
|
|
28
|
+
"@mozaic-ds/styles": "2.0.0-rc.4",
|
|
29
|
+
"@mozaic-ds/web-fonts": "1.22.0",
|
|
30
30
|
"core-js": "^3.18.3",
|
|
31
31
|
"libphonenumber-js": "1.9.50",
|
|
32
32
|
"postcss-scss": "^4.0.1",
|
|
@@ -1,111 +1,146 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="mc-
|
|
2
|
+
<div class="mc-datatable" :class="[getClasses, `mc-datatable--${size}`]">
|
|
3
|
+
<MDataTableTop v-if="$slots.edition || $slots.actions || $slots.filters">
|
|
4
|
+
<template #edition>
|
|
5
|
+
<slot name="edition" />
|
|
6
|
+
</template>
|
|
7
|
+
<template #actions>
|
|
8
|
+
<slot name="actions" />
|
|
9
|
+
</template>
|
|
10
|
+
<template #filters>
|
|
11
|
+
<slot name="filters" />
|
|
12
|
+
</template>
|
|
13
|
+
</MDataTableTop>
|
|
14
|
+
|
|
3
15
|
<slot />
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<div
|
|
16
|
+
|
|
17
|
+
<div class="mc-datatable__container">
|
|
18
|
+
<!-- MAIN -->
|
|
19
|
+
<div class="mc-datatable__main" :style="tableStyle">
|
|
20
|
+
<table class="mc-datatable__table" :class="getTableClasses">
|
|
21
|
+
<thead v-if="!hideHeader">
|
|
22
|
+
<tr>
|
|
23
|
+
<th
|
|
24
|
+
v-for="(header, index) in getHeaders"
|
|
25
|
+
:key="`header-${index}`"
|
|
26
|
+
:class="header.cssClass"
|
|
27
|
+
scope="col"
|
|
28
|
+
>
|
|
29
|
+
<button
|
|
19
30
|
v-if="sorting.mode !== 'none' && header.allowSorting"
|
|
20
|
-
|
|
31
|
+
type="button"
|
|
32
|
+
class="mc-datatable__sort mc-datatable__btn"
|
|
33
|
+
:class="header.sortOrder"
|
|
21
34
|
@click="!loading && onSortClick({ e: $event, header })"
|
|
22
35
|
>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
>
|
|
42
|
-
<
|
|
43
|
-
v-for="(
|
|
44
|
-
:key="
|
|
45
|
-
|
|
46
|
-
}`"
|
|
47
|
-
:class="header.cssClass"
|
|
48
|
-
@click="
|
|
49
|
-
allowRowClick && onRowClick({ event: $event, item: item })
|
|
50
|
-
"
|
|
36
|
+
<span class="mc-datatable__sort-label">
|
|
37
|
+
<span class="visually-hidden">Trier par</span>
|
|
38
|
+
{{ header.caption }}
|
|
39
|
+
</span>
|
|
40
|
+
|
|
41
|
+
<span class="mc-datatable__sort-arrow"></span>
|
|
42
|
+
</button>
|
|
43
|
+
|
|
44
|
+
<slot
|
|
45
|
+
v-else
|
|
46
|
+
:name="`header.${header.dataFieldExpr}`"
|
|
47
|
+
:header="header"
|
|
48
|
+
>
|
|
49
|
+
{{ header.caption }}
|
|
50
|
+
</slot>
|
|
51
|
+
</th>
|
|
52
|
+
</tr>
|
|
53
|
+
</thead>
|
|
54
|
+
<tbody>
|
|
55
|
+
<tr
|
|
56
|
+
v-for="(item, rowIndex) in getSource"
|
|
57
|
+
:key="item[dataKeyExpr]"
|
|
58
|
+
:class="rowClasses(item)"
|
|
51
59
|
>
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</m-select>
|
|
60
|
+
<td
|
|
61
|
+
v-for="(header, index) in getHeaders"
|
|
62
|
+
:key="`${index}-${getItemValue(item, dataKeyExpr)}-${
|
|
63
|
+
header.dataFieldExpr
|
|
64
|
+
}`"
|
|
65
|
+
:class="header.cssClass"
|
|
66
|
+
@click="
|
|
67
|
+
allowRowClick && onRowClick({ event: $event, item: item })
|
|
68
|
+
"
|
|
69
|
+
>
|
|
70
|
+
<slot
|
|
71
|
+
:name="`item.${header.dataFieldExpr}`"
|
|
72
|
+
:item="item"
|
|
73
|
+
:index="rowIndex"
|
|
74
|
+
>
|
|
75
|
+
{{ getItemValue(item, header.dataFieldExpr) }}
|
|
76
|
+
</slot>
|
|
77
|
+
</td>
|
|
78
|
+
</tr>
|
|
79
|
+
<!-- NO-DATA -->
|
|
80
|
+
<tr v-if="getSource.length === 0">
|
|
81
|
+
<td :colspan="getHeaders.length">
|
|
82
|
+
<slot name="no-data" />
|
|
83
|
+
</td>
|
|
84
|
+
</tr>
|
|
85
|
+
</tbody>
|
|
86
|
+
</table>
|
|
80
87
|
</div>
|
|
88
|
+
|
|
89
|
+
<!-- FOOTER -->
|
|
81
90
|
<div
|
|
82
|
-
v-if="pagingOptions.
|
|
83
|
-
class="mc-
|
|
91
|
+
v-if="pagingOptions.enabled && total != null"
|
|
92
|
+
class="mc-datatable__footer"
|
|
84
93
|
>
|
|
85
|
-
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
<!-- select -->
|
|
95
|
+
<div class="mc-datatable__select">
|
|
96
|
+
<label for="itemPerPage" class="mc-datatable__select-label">
|
|
97
|
+
Rows per page
|
|
98
|
+
</label>
|
|
99
|
+
<m-select
|
|
100
|
+
:id="'itemPerPage'"
|
|
101
|
+
size="s"
|
|
102
|
+
:disabled="loading"
|
|
103
|
+
:options="getPageSizes"
|
|
104
|
+
:value="getPageValue"
|
|
105
|
+
@change="onPageSizeChanged"
|
|
106
|
+
>
|
|
107
|
+
<template #text="{ option }">
|
|
108
|
+
<slot name="pager.text" :pager="option">
|
|
109
|
+
{{ option.text }}
|
|
110
|
+
</slot>
|
|
111
|
+
</template>
|
|
112
|
+
</m-select>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<!-- count -->
|
|
116
|
+
<div v-if="pagingOptions.displayTotal" class="mc-datatable__count">
|
|
117
|
+
<strong>{{ getTotalStringCurrentCount }}</strong> of
|
|
118
|
+
<strong>{{ total }}</strong>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<!-- pagination -->
|
|
122
|
+
<div class="mc-datatable__pagination">
|
|
123
|
+
<m-pagination
|
|
124
|
+
:disabled="loading"
|
|
125
|
+
:length="getPagingSize"
|
|
126
|
+
:page-label="pagingOptions.pageLabel"
|
|
127
|
+
:value="pagingOptions.index"
|
|
128
|
+
@on-update-page="onUpdatePage"
|
|
129
|
+
>
|
|
130
|
+
<template #text="{ option }">
|
|
131
|
+
<slot name="paging.text" :paging="option">
|
|
132
|
+
{{ option.text }}
|
|
133
|
+
</slot>
|
|
134
|
+
</template>
|
|
135
|
+
</m-pagination>
|
|
136
|
+
</div>
|
|
102
137
|
</div>
|
|
103
138
|
</div>
|
|
104
139
|
</div>
|
|
105
140
|
</template>
|
|
106
141
|
|
|
107
142
|
<script>
|
|
108
|
-
import
|
|
143
|
+
import MDataTableTop from './MDataTableTop.vue';
|
|
109
144
|
import MPagination from '../pagination/MPagination.vue';
|
|
110
145
|
import MSelect from '../select/MSelect.vue';
|
|
111
146
|
|
|
@@ -151,7 +186,7 @@ function buildOptions(
|
|
|
151
186
|
const columnSorters = sortedColmuns.reduce(
|
|
152
187
|
(acc, header) => ({
|
|
153
188
|
...acc,
|
|
154
|
-
[header.
|
|
189
|
+
[header.dataFieldExpr]: header.sortOrder,
|
|
155
190
|
}),
|
|
156
191
|
{}
|
|
157
192
|
);
|
|
@@ -202,7 +237,7 @@ const Sorting = {
|
|
|
202
237
|
export default {
|
|
203
238
|
name: 'MDataTable',
|
|
204
239
|
|
|
205
|
-
components: {
|
|
240
|
+
components: { MDataTableTop, MSelect, MPagination },
|
|
206
241
|
|
|
207
242
|
props: {
|
|
208
243
|
/** Get or set the name of identity. */
|
|
@@ -214,7 +249,7 @@ export default {
|
|
|
214
249
|
|
|
215
250
|
/**
|
|
216
251
|
* Get or set the headers informations.
|
|
217
|
-
* @
|
|
252
|
+
* @example {{ caption: string, dataFieldExpr: string, sortFieldExpr: string, allowSorting: boolean, sortOrder: 'asc' | 'desc' | null }[] }
|
|
218
253
|
*/
|
|
219
254
|
headers: {
|
|
220
255
|
type: Array,
|
|
@@ -275,7 +310,10 @@ export default {
|
|
|
275
310
|
default: () => ({}),
|
|
276
311
|
},
|
|
277
312
|
|
|
278
|
-
/**
|
|
313
|
+
/**
|
|
314
|
+
* Defines whether headers are hidden
|
|
315
|
+
* @values false, true
|
|
316
|
+
*/
|
|
279
317
|
hideHeader: {
|
|
280
318
|
type: Boolean,
|
|
281
319
|
default: false,
|
|
@@ -285,6 +323,20 @@ export default {
|
|
|
285
323
|
type: [String, Function, Object],
|
|
286
324
|
default: '',
|
|
287
325
|
},
|
|
326
|
+
|
|
327
|
+
size: {
|
|
328
|
+
type: String,
|
|
329
|
+
default: 'm',
|
|
330
|
+
validator: (value) => ['s', 'm', 'l'].includes(value),
|
|
331
|
+
},
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Defines custom styles on .mc-datatable__main element
|
|
335
|
+
*/
|
|
336
|
+
tableStyle: {
|
|
337
|
+
type: Object,
|
|
338
|
+
default: null,
|
|
339
|
+
},
|
|
288
340
|
},
|
|
289
341
|
|
|
290
342
|
data() {
|
|
@@ -316,7 +368,7 @@ export default {
|
|
|
316
368
|
|
|
317
369
|
getClasses() {
|
|
318
370
|
return {
|
|
319
|
-
'mc-
|
|
371
|
+
'mc-datatable--sticky-header': this.fixedHeader,
|
|
320
372
|
};
|
|
321
373
|
},
|
|
322
374
|
|
|
@@ -462,7 +514,7 @@ export default {
|
|
|
462
514
|
const getClasses = parseClasses(this.itemClasses, item);
|
|
463
515
|
|
|
464
516
|
return {
|
|
465
|
-
'mc-
|
|
517
|
+
'mc-datatable__row-clickable': this.allowRowClick,
|
|
466
518
|
...getClasses,
|
|
467
519
|
};
|
|
468
520
|
},
|
|
@@ -579,198 +631,21 @@ export default {
|
|
|
579
631
|
</script>
|
|
580
632
|
|
|
581
633
|
<style lang="scss">
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
.mc-data-table {
|
|
592
|
-
@include set-font-face();
|
|
593
|
-
|
|
594
|
-
position: relative;
|
|
595
|
-
background-color: $color-grey-000;
|
|
596
|
-
padding: 2px 0;
|
|
597
|
-
background-clip: padding-box;
|
|
598
|
-
display: flex;
|
|
599
|
-
flex-direction: column;
|
|
600
|
-
|
|
601
|
-
@include set-border-radius('m');
|
|
602
|
-
|
|
603
|
-
&__body {
|
|
604
|
-
overflow-x: scroll;
|
|
605
|
-
height: 100%;
|
|
606
|
-
|
|
607
|
-
& table {
|
|
608
|
-
border-collapse: collapse;
|
|
609
|
-
width: 100%;
|
|
610
|
-
|
|
611
|
-
&.no-data {
|
|
612
|
-
height: 100%;
|
|
613
|
-
& tr {
|
|
614
|
-
& td {
|
|
615
|
-
text-align: center;
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
& thead {
|
|
621
|
-
& tr {
|
|
622
|
-
& th {
|
|
623
|
-
height: 46px;
|
|
624
|
-
background-color: $color-grey-000;
|
|
625
|
-
padding: 0 1rem;
|
|
626
|
-
font-style: normal;
|
|
627
|
-
font-weight: 600;
|
|
628
|
-
font-size: 14px;
|
|
629
|
-
line-height: 18px;
|
|
630
|
-
text-align: left;
|
|
631
|
-
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
|
|
632
|
-
white-space: nowrap;
|
|
633
|
-
text-overflow: ellipsis;
|
|
634
|
-
|
|
635
|
-
& .header {
|
|
636
|
-
display: flex;
|
|
637
|
-
align-items: center;
|
|
638
|
-
|
|
639
|
-
&__sort {
|
|
640
|
-
margin-left: 5px;
|
|
641
|
-
position: relative;
|
|
642
|
-
width: 24px;
|
|
643
|
-
|
|
644
|
-
& svg {
|
|
645
|
-
margin-top: -50%;
|
|
646
|
-
opacity: 0.1;
|
|
647
|
-
position: absolute;
|
|
648
|
-
cursor: pointer;
|
|
649
|
-
|
|
650
|
-
&.active {
|
|
651
|
-
opacity: 1;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
&:last-child {
|
|
655
|
-
top: 9px;
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
& tbody {
|
|
665
|
-
& tr {
|
|
666
|
-
&:not(:last-child) {
|
|
667
|
-
border-bottom: 1px solid $color-grey-300;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
&.mc-data-table__body__row--clickable {
|
|
671
|
-
cursor: pointer;
|
|
672
|
-
|
|
673
|
-
&:hover {
|
|
674
|
-
background-color: $color-grey-100;
|
|
675
|
-
opacity: 0.8;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
&:active {
|
|
679
|
-
background-color: $color-grey-200;
|
|
680
|
-
opacity: 0.8;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
& td {
|
|
685
|
-
font-style: normal;
|
|
686
|
-
font-weight: normal;
|
|
687
|
-
font-size: 13px;
|
|
688
|
-
line-height: 18px;
|
|
689
|
-
height: 40px;
|
|
690
|
-
padding: 0 1rem;
|
|
691
|
-
white-space: nowrap;
|
|
692
|
-
text-overflow: ellipsis;
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
&__footer {
|
|
700
|
-
border-top: 1px solid $color-grey-300;
|
|
701
|
-
height: 70px;
|
|
702
|
-
display: flex;
|
|
703
|
-
align-items: center;
|
|
704
|
-
padding: 0 1rem;
|
|
705
|
-
|
|
706
|
-
@include set-border-radius('m', 'bottom');
|
|
707
|
-
|
|
708
|
-
&__item-per-page {
|
|
709
|
-
min-width: 100px;
|
|
710
|
-
|
|
711
|
-
& select {
|
|
712
|
-
width: auto;
|
|
713
|
-
font-size: 0.875rem;
|
|
714
|
-
line-height: 1.1428571;
|
|
715
|
-
padding: calc(0.5rem - 1px) 2.25rem calc(0.5rem - 1px)
|
|
716
|
-
calc(0.5rem - 1px);
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
&__display-total-item {
|
|
721
|
-
width: auto;
|
|
722
|
-
min-width: 150px;
|
|
723
|
-
padding: 0.5rem 2.25rem;
|
|
724
|
-
font-size: 0.875rem;
|
|
725
|
-
.strong {
|
|
726
|
-
font-weight: bold;
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
&__pagination {
|
|
731
|
-
text-align: right;
|
|
732
|
-
width: 100%;
|
|
733
|
-
display: flex;
|
|
734
|
-
justify-content: flex-end;
|
|
735
|
-
|
|
736
|
-
& .mc-pagination {
|
|
737
|
-
.mc-pagination__button {
|
|
738
|
-
min-width: 2rem;
|
|
739
|
-
min-height: 2rem;
|
|
740
|
-
|
|
741
|
-
.mc-pagination__button-icon {
|
|
742
|
-
height: 1rem;
|
|
743
|
-
width: 1rem;
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
.mc-select {
|
|
748
|
-
font-size: 0.875rem;
|
|
749
|
-
line-height: 1.1428571;
|
|
750
|
-
padding: calc(0.5rem - 1px) 2.25rem calc(0.5rem - 1px)
|
|
751
|
-
calc(0.5rem - 1px);
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
}
|
|
634
|
+
@import 'settings-tools/all-settings';
|
|
635
|
+
@import 'components/c.datatable';
|
|
636
|
+
@import 'components/c.datatable-tools';
|
|
637
|
+
@import 'components/c.datatable-footer';
|
|
638
|
+
// @import 'components/c.datatable-subtable';
|
|
639
|
+
|
|
640
|
+
.mc-datatable {
|
|
641
|
+
&__main {
|
|
642
|
+
overflow-y: auto;
|
|
755
643
|
}
|
|
756
644
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
overflow-y: auto;
|
|
761
|
-
|
|
762
|
-
& thead {
|
|
763
|
-
& tr {
|
|
764
|
-
& th {
|
|
765
|
-
position: sticky;
|
|
766
|
-
top: 0;
|
|
767
|
-
z-index: 1;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
}
|
|
645
|
+
&__row {
|
|
646
|
+
&-clickable {
|
|
647
|
+
cursor: pointer;
|
|
772
648
|
}
|
|
773
649
|
}
|
|
774
650
|
}
|
|
775
|
-
/* stylelint-enable */
|
|
776
651
|
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="$slots.edition || $slots.actions || $slots.filters"
|
|
4
|
+
class="mc-datatable__header"
|
|
5
|
+
>
|
|
6
|
+
<div class="mc-datatable__topbar">
|
|
7
|
+
<div v-if="$slots.edition" class="mc-datatable__topbar-edition">
|
|
8
|
+
<slot name="edition" />
|
|
9
|
+
</div>
|
|
10
|
+
<div v-if="$slots.actions" class="mc-datatable__topbar-actions">
|
|
11
|
+
<slot name="actions" />
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div v-if="$slots.filters" class="mc-datatable__filters">
|
|
15
|
+
<slot name="filters" />
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
name: 'MDataTableTop',
|
|
23
|
+
};
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<style lang="scss">
|
|
27
|
+
@import 'settings-tools/all-settings';
|
|
28
|
+
@import 'components/c.datatable-header';
|
|
29
|
+
|
|
30
|
+
.mc-datatable {
|
|
31
|
+
&__topbar-actions {
|
|
32
|
+
margin-left: auto;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
</style>
|