wave-ui 1.43.1 → 1.45.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/wave-ui.cjs.js +1 -1
- package/dist/wave-ui.css +1 -1
- package/dist/wave-ui.es.js +39 -10
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +7 -7
- package/src/wave-ui/components/w-app.vue +42 -2
- package/src/wave-ui/components/w-notification-manager.vue +1 -1
- package/src/wave-ui/components/w-table.vue +8 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.0",
|
|
4
4
|
"description": "An emerging UI framework for Vue.js & Vue 3 with only the bright side. :sunny:",
|
|
5
5
|
"author": "Antoni Andre <antoniandre.web@gmail.com>",
|
|
6
6
|
"main": "./dist/wave-ui.umd.js",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
],
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/core": "^7.16.0",
|
|
47
|
-
"@babel/eslint-parser": "^7.16.
|
|
47
|
+
"@babel/eslint-parser": "^7.16.3",
|
|
48
48
|
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
49
49
|
"@mdi/font": "^5.9.55",
|
|
50
|
-
"@vitejs/plugin-vue": "^1.
|
|
50
|
+
"@vitejs/plugin-vue": "^1.10.1",
|
|
51
51
|
"autoprefixer": "^10.4.0",
|
|
52
52
|
"axios": "^0.21.4",
|
|
53
|
-
"core-js": "^3.19.
|
|
53
|
+
"core-js": "^3.19.1",
|
|
54
54
|
"eslint": "^7.32.0",
|
|
55
55
|
"eslint-config-standard": "^16.0.3",
|
|
56
|
-
"eslint-plugin-import": "^2.25.
|
|
56
|
+
"eslint-plugin-import": "^2.25.3",
|
|
57
57
|
"eslint-plugin-node": "^11.1.0",
|
|
58
58
|
"eslint-plugin-promise": "^5.1.1",
|
|
59
59
|
"eslint-plugin-vue": "^7.20.0",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"ionicons": "^4.6.3",
|
|
64
64
|
"material-design-icons": "^3.0.1",
|
|
65
65
|
"rollup-plugin-delete": "^2.0.0",
|
|
66
|
-
"sass": "^1.43.
|
|
66
|
+
"sass": "^1.43.5",
|
|
67
67
|
"simple-syntax-highlighter": "^1.5.0",
|
|
68
68
|
"splitpanes": "^2.3.8",
|
|
69
|
-
"vite": "^2.6.
|
|
69
|
+
"vite": "^2.6.14",
|
|
70
70
|
"vite-plugin-pug": "^0.3.0",
|
|
71
71
|
"vite-plugin-vue2": "^1.9.0",
|
|
72
72
|
"vue": "^2.6.14",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.w-app(:class="
|
|
2
|
+
.w-app(:class="classes")
|
|
3
3
|
slot
|
|
4
4
|
notification-manager
|
|
5
5
|
</template>
|
|
@@ -16,7 +16,17 @@ export default {
|
|
|
16
16
|
name: 'w-app',
|
|
17
17
|
props: {
|
|
18
18
|
dark: { type: Boolean },
|
|
19
|
-
block: { type: Boolean }
|
|
19
|
+
block: { type: Boolean },
|
|
20
|
+
row: { type: Boolean },
|
|
21
|
+
alignCenter: { type: Boolean },
|
|
22
|
+
alignEnd: { type: Boolean },
|
|
23
|
+
justifyCenter: { type: Boolean },
|
|
24
|
+
justifyEnd: { type: Boolean },
|
|
25
|
+
justifySpaceBetween: { type: Boolean },
|
|
26
|
+
justifySpaceAround: { type: Boolean },
|
|
27
|
+
justifySpaceEvenly: { type: Boolean },
|
|
28
|
+
textCenter: { type: Boolean },
|
|
29
|
+
textRight: { type: Boolean }
|
|
20
30
|
},
|
|
21
31
|
|
|
22
32
|
components: { NotificationManager },
|
|
@@ -26,6 +36,25 @@ export default {
|
|
|
26
36
|
notifManager: null
|
|
27
37
|
}),
|
|
28
38
|
|
|
39
|
+
computed: {
|
|
40
|
+
classes () {
|
|
41
|
+
return {
|
|
42
|
+
'd-block': this.block,
|
|
43
|
+
'row': this.row,
|
|
44
|
+
'align-center': this.alignCenter,
|
|
45
|
+
'align-end': this.alignEnd,
|
|
46
|
+
'justify-center': this.justifyCenter,
|
|
47
|
+
'justify-end': this.justifyEnd,
|
|
48
|
+
'justify-space-between': this.justifySpaceBetween,
|
|
49
|
+
'justify-space-around': this.justifySpaceAround,
|
|
50
|
+
'justify-space-evenly': this.justifySpaceEvenly,
|
|
51
|
+
'text-center': this.textCenter,
|
|
52
|
+
'text-right': this.textRight,
|
|
53
|
+
'theme--dark': this.dark
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
|
|
29
58
|
methods: {
|
|
30
59
|
getBreakpoint () {
|
|
31
60
|
const width = window.innerWidth
|
|
@@ -85,6 +114,17 @@ export default {
|
|
|
85
114
|
flex-direction: column;
|
|
86
115
|
min-height: 100vh;
|
|
87
116
|
|
|
117
|
+
&.row {flex-direction: row;}
|
|
88
118
|
&.d-block {display: block;}
|
|
119
|
+
&.align-center {align-items: center;}
|
|
120
|
+
&.align-end {align-items: flex-end;}
|
|
121
|
+
&.justify-center {justify-content: center;}
|
|
122
|
+
&.justify-end {justify-content: flex-end;}
|
|
123
|
+
&.justify-space-between {justify-content: space-between;}
|
|
124
|
+
&.justify-space-around {justify-content: space-around;}
|
|
125
|
+
&.justify-space-evenly {justify-content: space-evenly;}
|
|
126
|
+
&.text-center {text-align: center;}
|
|
127
|
+
&.text-right {text-align: right;}
|
|
128
|
+
|
|
89
129
|
}
|
|
90
130
|
</style>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@mousedown="onMouseDown"
|
|
6
6
|
@mouseover="onMouseOver"
|
|
7
7
|
@mouseout="onMouseOut")
|
|
8
|
-
colgroup
|
|
8
|
+
colgroup(ref="colgroup")
|
|
9
9
|
col.w-table__col(
|
|
10
10
|
v-for="(header, i) in headers"
|
|
11
11
|
:key="i"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
.w-table__loading-text
|
|
44
44
|
slot(name="loading") Loading...
|
|
45
45
|
//- No data.
|
|
46
|
-
tr.no-data(v-if="!tableItems.length")
|
|
46
|
+
tr.no-data(v-else-if="!tableItems.length")
|
|
47
47
|
td.w-table__cell.text-center(:colspan="headers.length")
|
|
48
48
|
slot(name="no-data") No data to show.
|
|
49
49
|
|
|
@@ -174,7 +174,7 @@ export default {
|
|
|
174
174
|
resizableColumns: { type: Boolean }
|
|
175
175
|
},
|
|
176
176
|
|
|
177
|
-
emits: ['row-select', 'row-expand', 'row-click', 'update:sort', 'update:selected-rows', 'update:expanded-rows'],
|
|
177
|
+
emits: ['row-select', 'row-expand', 'row-click', 'update:sort', 'update:selected-rows', 'update:expanded-rows', 'column-resize'],
|
|
178
178
|
|
|
179
179
|
data: () => ({
|
|
180
180
|
activeSorting: [],
|
|
@@ -202,8 +202,7 @@ export default {
|
|
|
202
202
|
},
|
|
203
203
|
|
|
204
204
|
filteredItems () {
|
|
205
|
-
|
|
206
|
-
return this.tableItems
|
|
205
|
+
return typeof this.filter === 'function' ? this.tableItems.filter(this.filter) : this.tableItems
|
|
207
206
|
},
|
|
208
207
|
|
|
209
208
|
sortedItems () {
|
|
@@ -436,6 +435,10 @@ export default {
|
|
|
436
435
|
// cell after resizing.
|
|
437
436
|
// (releasing the mouse on table header triggers a click event captured by the sorting feature)
|
|
438
437
|
setTimeout(() => {
|
|
438
|
+
// On Mouse up, emit an event containing all the new widths of the columns.
|
|
439
|
+
const widths = [...this.$refs.colgroup.childNodes].map(column => column.style?.width || column.offsetWidth)
|
|
440
|
+
this.$emit('column-resize', { index: this.colResizing.columnIndex, widths })
|
|
441
|
+
|
|
439
442
|
this.colResizing.dragging = false
|
|
440
443
|
this.colResizing.columnIndex = null
|
|
441
444
|
this.colResizing.startCursorX = null
|