@afeefa/vue-app 0.0.338 → 0.0.340

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.
@@ -1 +1 @@
1
- 0.0.338
1
+ 0.0.340
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.338",
3
+ "version": "0.0.340",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -20,20 +20,22 @@
20
20
  <div class="drag-handle">
21
21
  <a-icon
22
22
  size="1.5rem"
23
- :icon="{icon: '$dragIcon', color: '#CCCCCC'}"
23
+ :icon="{ icon: '$dragIcon', color: '#CCCCCC' }"
24
24
  />
25
25
  </div>
26
26
 
27
- <a-checkbox
28
- :label="option.itemText"
29
- :value="isChecked(option.itemValue)"
30
- hide-details
31
- @input="checked(option.itemValue, $event)"
32
- >
33
- <template #label>
34
- <div v-html="option.itemText" />
35
- </template>
36
- </a-checkbox>
27
+ <div class="checkbox">
28
+ <a-checkbox
29
+ :label="option.itemText"
30
+ :value="isChecked(option.itemValue)"
31
+ hide-details
32
+ @input="checked(option.itemValue, $event)"
33
+ >
34
+ <template #label>
35
+ <div v-html="option.itemText" />
36
+ </template>
37
+ </a-checkbox>
38
+ </div>
37
39
  </div>
38
40
  </div>
39
41
  </draggable>
@@ -48,7 +50,6 @@
48
50
  </div>
49
51
  </template>
50
52
 
51
-
52
53
  <script>
53
54
  import { Component, Vue, Watch, Inject } from '@a-vue'
54
55
  import draggable from 'vuedraggable'
@@ -163,6 +164,10 @@ export default class ACheckboxGroup extends Vue {
163
164
  height: 20px;
164
165
  }
165
166
 
167
+ .checkbox {
168
+ flex-grow: 2;
169
+ }
170
+
166
171
  .drag-handle:active {
167
172
  cursor: grabbing;
168
173
  }
@@ -6,20 +6,19 @@
6
6
  :valueComparator="compareValues"
7
7
  :style="cwm_widthStyle"
8
8
  :multiple="multiple"
9
- v-bind="{...$attrs, dense, outlined}"
9
+ v-bind="{ ...$attrs, dense, outlined }"
10
10
  v-on="$listeners"
11
11
  @change="selectedItemTitleChanged"
12
12
  />
13
13
  </template>
14
14
 
15
-
16
15
  <script>
17
16
  import { Component, Mixins, Watch } from '@a-vue'
18
17
  import { Model } from '@afeefa/api-resources-client'
19
18
  import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
20
19
 
21
20
  @Component({
22
- props: ['validator', 'defaultValue', 'items', {dense: true, outlined: true, multiple: false}]
21
+ props: ['validator', 'defaultValue', 'items', { dense: true, outlined: true, multiple: false }]
23
22
  })
24
23
  export default class ASelect extends Mixins(ComponentWidthMixin) {
25
24
  items_ = []
@@ -51,7 +50,10 @@ export default class ASelect extends Mixins(ComponentWidthMixin) {
51
50
  @Watch('$attrs.value')
52
51
  selectedItemTitleChanged () {
53
52
  this.$nextTick(() => {
54
- const title = this.$refs.select?.selectedItems[0]?.itemTitle
53
+ const selectedItems = this.$refs.select?.selectedItems ?? []
54
+ const title = this.multiple
55
+ ? selectedItems.map(item => item.itemTitle).join(', ')
56
+ : selectedItems[0]?.itemTitle
55
57
  this.$emit('selectedItemTitleChanged', title)
56
58
  })
57
59
  }
@@ -115,7 +117,6 @@ export default class ASelect extends Mixins(ComponentWidthMixin) {
115
117
  }
116
118
  </script>
117
119
 
118
-
119
120
  <style lang="scss">
120
121
  .v-application .v-select-list .v-list-item__action {
121
122
  margin: 0;
@@ -19,12 +19,12 @@ import { FormFieldMixin } from '../FormFieldMixin'
19
19
  import { ComponentWidthMixin } from '../../mixins/ComponentWidthMixin'
20
20
 
21
21
  @Component
22
- export default class FormFieldSelect2 extends Mixins(FormFieldMixin, ComponentWidthMixin) {
22
+ export default class FormFieldAutoComplete extends Mixins(FormFieldMixin, ComponentWidthMixin) {
23
23
  asyncItems = null
24
24
 
25
25
  created () {
26
26
  if (this.fieldHasOptionsRequest()) {
27
- this.asyncItems = q => this.getSelectOptions({q})
27
+ this.asyncItems = q => this.getSelectOptions({ q })
28
28
  }
29
29
  }
30
30
 
@@ -10,7 +10,7 @@ import FormFieldRadioGroup from './form/fields/FormFieldRadioGroup'
10
10
  import FormFieldRichTextArea from './form/fields/FormFieldRichTextArea'
11
11
  import FormFieldSearchSelect from './form/fields/FormFieldSearchSelect'
12
12
  import FormFieldSelect from './form/fields/FormFieldSelect'
13
- import FormFieldSelect2 from './form/fields/FormFieldSelect2'
13
+ import FormFieldAutoComplete from './form/fields/FormFieldAutoComplete'
14
14
  import FormFieldText from './form/fields/FormFieldText'
15
15
  import FormFieldTextArea from './form/fields/FormFieldTextArea'
16
16
  import FormFieldTime from './form/fields/FormFieldTime'
@@ -37,7 +37,7 @@ Vue.component('FormFieldDate', FormFieldDate)
37
37
  Vue.component('FormFieldTime', FormFieldTime)
38
38
  Vue.component('FormFieldSearchSelect', FormFieldSearchSelect)
39
39
  Vue.component('FormFieldSelect', FormFieldSelect)
40
- Vue.component('FormFieldSelect2', FormFieldSelect2)
40
+ Vue.component('FormFieldAutoComplete', FormFieldAutoComplete)
41
41
  Vue.component('ListFilterPage', ListFilterPage)
42
42
  Vue.component('ListFilterSearch', ListFilterSearch)
43
43
  Vue.component('ListFilterSearch2', ListFilterSearch2)
@@ -63,7 +63,7 @@
63
63
  gap="6"
64
64
  class="mt-3"
65
65
  >
66
- <list-filter-page :has="{page: false}" />
66
+ <list-filter-page :has="{ page: false }" />
67
67
 
68
68
  <a-radio-group
69
69
  v-model="dragMode"
@@ -75,7 +75,7 @@
75
75
  <v-radio value="grab">
76
76
  <template #label>
77
77
  <a-icon
78
- :icon="{icon: grabIcon}"
78
+ :icon="{ icon: grabIcon }"
79
79
  class="ml-n1 mr-1"
80
80
  /> Liste verschieben
81
81
  </template>
@@ -83,7 +83,7 @@
83
83
  <v-radio value="select">
84
84
  <template #label>
85
85
  <a-icon
86
- :icon="{icon: selectIcon}"
86
+ :icon="{ icon: selectIcon }"
87
87
  class="ml-n1 mr-1"
88
88
  /> Text auswählen
89
89
  </template>
@@ -124,14 +124,13 @@
124
124
 
125
125
  <list-filter-page
126
126
  class="mt-4"
127
- :has="{page_size: false}"
127
+ :has="{ page_size: false }"
128
128
  v2
129
129
  :totalVisible="9"
130
130
  />
131
131
  </div>
132
132
  </template>
133
133
 
134
-
135
134
  <script>
136
135
  import { Component, Vue } from '@a-vue'
137
136
  import { ListFilterEvent } from '@a-vue/events'
@@ -184,7 +183,7 @@ export default class ListFilterBar extends Vue {
184
183
  return Object.values(this.filters).filter(f => !f.hasDefaultValueSet()).length - minus
185
184
  }
186
185
 
187
- listFilterChanged ({payload: {name, label, value}}) {
186
+ listFilterChanged ({ payload: { name, label, value } }) {
188
187
  this.setSelectedFilter(name, label, value)
189
188
  }
190
189
 
@@ -226,7 +225,6 @@ export default class ListFilterBar extends Vue {
226
225
  }
227
226
  </script>
228
227
 
229
-
230
228
  <style lang="scss" scoped>
231
229
  .filterToggle {
232
230
  padding: 0 0 0 5px !important;
@@ -245,6 +243,14 @@ export default class ListFilterBar extends Vue {
245
243
  gap: 4px;
246
244
  }
247
245
 
246
+ // Filter oben bündig ausrichten, damit eine höher gewachsene Zelle
247
+ // (z.B. Multi-Select mit mehreren Chips) die Nachbarn in derselben
248
+ // Grid-Zeile nicht mitstreckt (Grid-Default align-items: stretch).
249
+
250
+ ::v-deep(.a-grid) {
251
+ align-items: start;
252
+ }
253
+
248
254
  ::v-deep(.aPagination) {
249
255
  margin-top: 14px;
250
256
  }