@afeefa/vue-app 0.0.87 → 0.0.89

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- 0.0.87
1
+ 0.0.89
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -77,7 +77,8 @@ export default class AAutocomplete extends Vue {
77
77
  }
78
78
 
79
79
  get validationRules () {
80
- return (this.validator && this.validator.getRules()) || []
80
+ const label = this.$attrs.label
81
+ return (this.validator && this.validator.getRules(label)) || []
81
82
  }
82
83
 
83
84
  get value () {
@@ -25,9 +25,9 @@
25
25
  <v-card-title v-if="title">
26
26
  <v-avatar
27
27
  v-if="icon"
28
- color="#F4F4F4"
28
+ color="#FFFFFF"
29
29
  size="2rem"
30
- class="mr-2"
30
+ class="ml-n1 mr-2"
31
31
  >
32
32
  <v-icon
33
33
  :color="icon.color"
@@ -5,7 +5,10 @@
5
5
  style="width: max-content;"
6
6
  @click="open"
7
7
  >
8
- <slot name="activator">
8
+ <slot
9
+ v-if="!autoOpen"
10
+ name="activator"
11
+ >
9
12
  <a-icon class="contextButton">
10
13
  $dotsHorizontalIcon
11
14
  </a-icon>
@@ -99,9 +102,10 @@ import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
99
102
  'listAction',
100
103
  'q',
101
104
  'width',
102
- 'closeOnSelect',
103
105
  'loadOnlyIfKeyword',
104
106
  {
107
+ autoOpen: false,
108
+ closeOnSelect: true,
105
109
  selectedItems: []
106
110
  }
107
111
  ],
@@ -120,6 +124,12 @@ export default class ASearchSelect extends Mixins(ComponentWidthMixin, UsesPosit
120
124
  filters = []
121
125
  count = 0
122
126
 
127
+ mounted () {
128
+ if (this.autoOpen) {
129
+ this.open()
130
+ }
131
+ }
132
+
123
133
  destroyed () {
124
134
  this.close()
125
135
  }
@@ -167,10 +177,6 @@ export default class ASearchSelect extends Mixins(ComponentWidthMixin, UsesPosit
167
177
  return this.loadOnlyIfKeyword === undefined || this.loadOnlyIfKeyword
168
178
  }
169
179
 
170
- get _closeOnSelect () {
171
- return this.closeOnSelect === undefined || this.closeOnSelect
172
- }
173
-
174
180
  positionize () {
175
181
  const position = new PositionConfig()
176
182
  .setAnchor(this, '.activator')
@@ -249,7 +255,7 @@ export default class ASearchSelect extends Mixins(ComponentWidthMixin, UsesPosit
249
255
 
250
256
  selectHandler (model) {
251
257
  return event => {
252
- if (this._closeOnSelect) {
258
+ if (this.closeOnSelect) {
253
259
  this.close()
254
260
  }
255
261
  this.$emit('select', model, {
@@ -27,7 +27,7 @@
27
27
  <slot name="after-form-fields" />
28
28
 
29
29
  <a-row
30
- class="mt-8 mb-1 pb-1 gap-2"
30
+ class="mt-8 gap-2"
31
31
  right
32
32
  >
33
33
  <v-btn
@@ -15,10 +15,9 @@
15
15
  </v-avatar>
16
16
 
17
17
  <label :class="['label', {'label--withIcon': !!_icon}]">{{ label }}</label>
18
+
18
19
  <div class="pl-2">
19
- <slot
20
- name="actionButton"
21
- />
20
+ <slot name="actionButton" />
22
21
  </div>
23
22
  </div>
24
23
 
@@ -1,6 +1,9 @@
1
1
  <template>
2
2
  <div class="listView">
3
- <div class="filters">
3
+ <div
4
+ v-if="filtersActivated"
5
+ class="filters"
6
+ >
4
7
  <slot
5
8
  name="filters"
6
9
  :filters="filters"
@@ -66,11 +69,19 @@
66
69
  </template>
67
70
  </template>
68
71
 
69
- <div v-else-if="!isLoading">
70
- Nichts gefunden. <a
71
- href=""
72
- @click.prevent="resetFilters()"
73
- >Filter zurücksetzen</a>
72
+ <div
73
+ v-else-if="!isLoading"
74
+ class="nothing-found"
75
+ >
76
+ <div v-if="filtersActivated">
77
+ Nichts gefunden. <a
78
+ href=""
79
+ @click.prevent="resetFilters()"
80
+ >Filter zurücksetzen</a>
81
+ </div>
82
+ <div v-else>
83
+ Nichts gefunden.
84
+ </div>
74
85
  </div>
75
86
  </div>
76
87
  </template>
@@ -82,7 +93,15 @@ import { ListViewMixin } from '@a-vue/components/list/ListViewMixin'
82
93
  import { LoadingEvent } from '@a-vue/events'
83
94
 
84
95
  @Component({
85
- props: ['rowAttributes', 'rowClasses', 'rowListeners']
96
+ props: {
97
+ rowAttributes: {},
98
+ rowClasses: {},
99
+ rowListeners: {},
100
+ filtersActivated: {
101
+ type: Boolean,
102
+ default: true
103
+ }
104
+ }
86
105
  })
87
106
  export default class ListView extends Mixins(ListViewMixin) {
88
107
  $hasOptions = ['icon']