@afeefa/vue-app 0.0.74 → 0.0.75
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/.afeefa/package/release/version.txt +1 -1
- package/package.json +1 -1
- package/src/components/ATextField.vue +0 -1
- package/src-admin/components/FlyingContextContainer.vue +7 -0
- package/src-admin/components/detail/DetailMeta.vue +1 -0
- package/src-admin/components/list/ListView.vue +34 -4
- package/src-admin/config/vuetify.js +4 -2
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.75
|
package/package.json
CHANGED
@@ -27,6 +27,7 @@
|
|
27
27
|
<script>
|
28
28
|
import { Component, Vue } from '@a-vue'
|
29
29
|
import { FlyingContextEvent } from '@a-vue/events'
|
30
|
+
import { getZIndex } from 'vuetify/lib/util/helpers'
|
30
31
|
|
31
32
|
@Component({
|
32
33
|
props: []
|
@@ -66,6 +67,12 @@ export default class FlyingContextContainer extends Vue {
|
|
66
67
|
parent = parent.parentElement
|
67
68
|
}
|
68
69
|
|
70
|
+
// popup clicked
|
71
|
+
const targetIndex = getZIndex(e.target)
|
72
|
+
if (targetIndex > 200) {
|
73
|
+
return
|
74
|
+
}
|
75
|
+
|
69
76
|
// check if flying context ist clicked
|
70
77
|
if (!this.$el.contains(e.target)) {
|
71
78
|
this.hide()
|
@@ -33,7 +33,7 @@
|
|
33
33
|
v-for="model in models_"
|
34
34
|
:key="model.id"
|
35
35
|
v-flying-context-trigger="hasFlyingContext"
|
36
|
-
:class="
|
36
|
+
:class="getRowClasses(model)"
|
37
37
|
v-bind="getRowAttributes(model)"
|
38
38
|
v-on="getRowListeners(model)"
|
39
39
|
@click="emitFlyingContext(model)"
|
@@ -82,7 +82,7 @@ import { ListViewMixin } from '@a-vue/components/list/ListViewMixin'
|
|
82
82
|
import { LoadingEvent } from '@a-vue/events'
|
83
83
|
|
84
84
|
@Component({
|
85
|
-
props: ['rowAttributes', 'rowListeners']
|
85
|
+
props: ['rowAttributes', 'rowClasses', 'rowListeners']
|
86
86
|
})
|
87
87
|
export default class ListView extends Mixins(ListViewMixin) {
|
88
88
|
$hasOptions = ['icon']
|
@@ -103,7 +103,37 @@ export default class ListView extends Mixins(ListViewMixin) {
|
|
103
103
|
if (typeof this.rowAttributes === 'function') {
|
104
104
|
return this.rowAttributes(model)
|
105
105
|
}
|
106
|
-
return this.rowAttributes
|
106
|
+
return this.rowAttributes || {}
|
107
|
+
}
|
108
|
+
|
109
|
+
getRowClasses (model) {
|
110
|
+
let classes
|
111
|
+
|
112
|
+
if (typeof this.rowClasses === 'function') {
|
113
|
+
classes = this.rowClasses(model)
|
114
|
+
} else {
|
115
|
+
classes = this.rowClasses || {}
|
116
|
+
}
|
117
|
+
|
118
|
+
if (Array.isArray(classes)) { // ['a', {b: true/false}, 'c']
|
119
|
+
classes = classes.reduce((ac, a) => {
|
120
|
+
if (typeof a === 'object') { // {className: true/false}
|
121
|
+
return {...ac, ...a}
|
122
|
+
}
|
123
|
+
return {...ac, [a]: true} // 'className'
|
124
|
+
}, {})
|
125
|
+
} else if (typeof classes === 'string') { // 'a b c'
|
126
|
+
classes = {
|
127
|
+
[classes]: true
|
128
|
+
}
|
129
|
+
} // else { a: true, b: true, c: true }
|
130
|
+
|
131
|
+
classes = {
|
132
|
+
selectable: this.hasFlyingContext,
|
133
|
+
...classes
|
134
|
+
}
|
135
|
+
|
136
|
+
return classes
|
107
137
|
}
|
108
138
|
|
109
139
|
getRowListeners (model) {
|
@@ -116,7 +146,7 @@ export default class ListView extends Mixins(ListViewMixin) {
|
|
116
146
|
|
117
147
|
emitFlyingContext (model) {
|
118
148
|
if (window.getSelection().toString()) { // do not open if text selected
|
119
|
-
console.log(window.getSelection().toString())
|
149
|
+
// console.log(window.getSelection().toString())
|
120
150
|
return
|
121
151
|
}
|
122
152
|
this.$emit('flyingContext', model)
|
@@ -18,7 +18,8 @@ import {
|
|
18
18
|
mdiPencil,
|
19
19
|
mdiPlus,
|
20
20
|
mdiPrinter,
|
21
|
-
mdiThumbUpOutline
|
21
|
+
mdiThumbUpOutline,
|
22
|
+
mdiCurrencyEur
|
22
23
|
} from '@mdi/js'
|
23
24
|
import Vue from 'vue'
|
24
25
|
import Vuetify from 'vuetify/lib'
|
@@ -48,7 +49,8 @@ export default new Vuetify({
|
|
48
49
|
arrowLeftIcon: mdiArrowLeft,
|
49
50
|
caretDownIcon: mdiMenuDown,
|
50
51
|
caretUpIcon: mdiMenuUp,
|
51
|
-
printerIcon: mdiPrinter
|
52
|
+
printerIcon: mdiPrinter,
|
53
|
+
euroSymbol: mdiCurrencyEur
|
52
54
|
}
|
53
55
|
},
|
54
56
|
breakpoint: {
|