spark-grid-vue3 0.0.83 → 0.0.85
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/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
2
|
+
<div class="grid-cell" data-label="Ações" :style="DataTableStyler.getActionRowColumn(grid)">
|
|
3
3
|
<template v-for="(action, i) in grid.config.actions">
|
|
4
4
|
<RuntimeRenderer v-if="isVisible(action)" :key="`${row._uuid}:_actions`" :content="action.element(row)" />
|
|
5
5
|
</template>
|
|
@@ -60,10 +60,7 @@ const styles = computed(() => {
|
|
|
60
60
|
background: '#fafafa'
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|| (responsiveMode.value === ResponsiveMode.HORIZONTAL_OVERFLOW && isMobile.value)
|
|
65
|
-
|
|
66
|
-
if (isOverflowEnabled) {
|
|
63
|
+
if (props.grid.config.overflowEnabled) {
|
|
67
64
|
const maxHeight = props.grid.config.height ?? (window.innerHeight - 100)
|
|
68
65
|
|
|
69
66
|
styles['overflow-x'] = 'auto'
|
|
@@ -73,6 +70,8 @@ const styles = computed(() => {
|
|
|
73
70
|
if (props.grid.config.stickyHeaderEnabled) {
|
|
74
71
|
styles['position'] = 'relative'
|
|
75
72
|
}
|
|
73
|
+
} else if (responsiveMode.value === ResponsiveMode.HORIZONTAL_OVERFLOW && isMobile.value) {
|
|
74
|
+
styles['overflow-x'] = 'auto'
|
|
76
75
|
}
|
|
77
76
|
|
|
78
77
|
return styles
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="grid-footer">
|
|
3
3
|
<div class="spark-grid-pages">
|
|
4
|
-
<div v-show="isRowsPerPageVisible" class="spark-
|
|
5
|
-
|
|
4
|
+
<div v-show="isRowsPerPageVisible" class="spark-grid__per-page">
|
|
5
|
+
<span class="spark-grid__page-details">Por página:</span>
|
|
6
6
|
<select :value="grid.rowsPerPage"
|
|
7
7
|
@change="(e) => rowsPerPageChanged(Number((e.target as HTMLSelectElement).value))"
|
|
8
8
|
class="spark-grid-datatable-select">
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
</select>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
|
-
<span v-show="grid.totalRows > 0">
|
|
23
|
-
Exibindo {{ beginningRows() }} a {{ endingRows() }} de {{ grid.totalRows }} registro(s)
|
|
22
|
+
<span v-show="grid.totalRows > 0" class="spark-grid__info">
|
|
23
|
+
<span class="spark-grid__info-full">Exibindo {{ beginningRows() }} a {{ endingRows() }} de {{ grid.totalRows }} registro(s)</span>
|
|
24
|
+
<span class="spark-grid__info-compact">{{ beginningRows() }}-{{ endingRows() }}/{{ grid.totalRows }}</span>
|
|
24
25
|
</span>
|
|
25
26
|
|
|
26
27
|
<span class="spark-grid-selected-rows">
|
|
@@ -110,14 +111,22 @@ const selectedRowsLength = computed(() => props.grid.getCheckedRows().length)
|
|
|
110
111
|
gap: 8px;
|
|
111
112
|
}
|
|
112
113
|
|
|
114
|
+
.spark-grid__per-page {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
gap: 6px;
|
|
118
|
+
}
|
|
119
|
+
|
|
113
120
|
.spark-grid__page-details {
|
|
114
121
|
display: inline-block;
|
|
115
122
|
}
|
|
116
123
|
|
|
124
|
+
.spark-grid__info-compact {
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
117
128
|
.spark-grid__select {
|
|
118
129
|
width: 80px;
|
|
119
|
-
margin-left: 10px;
|
|
120
|
-
margin-right: 10px;
|
|
121
130
|
display: inline-block;
|
|
122
131
|
}
|
|
123
132
|
|
|
@@ -133,27 +142,41 @@ const selectedRowsLength = computed(() => props.grid.getCheckedRows().length)
|
|
|
133
142
|
font-weight: bold;
|
|
134
143
|
}
|
|
135
144
|
|
|
136
|
-
/* Mobile/Tablet responsive */
|
|
145
|
+
/* Mobile/Tablet responsive — single line footer */
|
|
137
146
|
@media screen and (max-width: 768px) {
|
|
138
147
|
.spark-grid-pages {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
gap:
|
|
148
|
+
justify-content: center;
|
|
149
|
+
flex-wrap: nowrap;
|
|
150
|
+
gap: 6px;
|
|
142
151
|
width: 100%;
|
|
152
|
+
font-size: 11px;
|
|
143
153
|
}
|
|
144
154
|
|
|
145
155
|
.spark-grid__page-details {
|
|
146
|
-
|
|
156
|
+
display: none;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.spark-grid__info-full {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.spark-grid__info-compact {
|
|
164
|
+
display: inline;
|
|
165
|
+
white-space: nowrap;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.spark-grid__per-page {
|
|
169
|
+
gap: 0;
|
|
147
170
|
}
|
|
148
171
|
|
|
149
172
|
.spark-grid__select {
|
|
150
|
-
width:
|
|
151
|
-
|
|
173
|
+
width: auto;
|
|
174
|
+
min-width: 45px;
|
|
152
175
|
}
|
|
153
176
|
|
|
154
177
|
.spark-grid-selected-rows {
|
|
155
178
|
margin: 0;
|
|
156
|
-
|
|
179
|
+
flex: 0;
|
|
157
180
|
}
|
|
158
181
|
}
|
|
159
182
|
</style>
|