@afeefa/vue-app 0.0.320 → 0.0.321

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.320
1
+ 0.0.321
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.320",
3
+ "version": "0.0.321",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -99,6 +99,8 @@
99
99
  >
100
100
  Alles zurücksetzen
101
101
  </v-btn>
102
+
103
+ <slot name="append" />
102
104
  </a-row>
103
105
  </div>
104
106
  </div>
@@ -42,7 +42,7 @@ export class ComponentWidthMixin extends Vue {
42
42
  }
43
43
 
44
44
  if (maxWidth) {
45
- styles.push(`max-width: ${this.cwm_toPixel_(maxWidth)}; background: yellow`)
45
+ styles.push(`max-width: ${this.cwm_toPixel_(maxWidth)}`)
46
46
  }
47
47
 
48
48
  return styles.join(' ')
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Recursively merges source into target.
3
+ * Returns a new object without mutating target or source.
4
+ * Arrays and non-plain-objects are overwritten (not merged).
5
+ */
6
+ export function deepMerge (target, source) {
7
+ const result = { ...target }
8
+ for (const key of Object.keys(source)) {
9
+ if (
10
+ result[key] && typeof result[key] === 'object' && !Array.isArray(result[key]) &&
11
+ source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])
12
+ ) {
13
+ result[key] = deepMerge(result[key], source[key])
14
+ } else {
15
+ result[key] = source[key]
16
+ }
17
+ }
18
+ return result
19
+ }
20
+
@@ -2,9 +2,17 @@
2
2
  <div>
3
3
  <a-context-menu>
4
4
  <template #activator>
5
- <div class="contextButton">
6
- {{ selectedColumns.length }}/{{ Object.keys(columns_).length }}
7
- </div>
5
+ <v-btn
6
+ class="columnsButton"
7
+ title="Spalten wählen"
8
+ >
9
+ <v-icon color="#BBBBBB">
10
+ {{ mdiViewColumn }}
11
+ </v-icon>
12
+ <div class="ml-1">
13
+ {{ selectedColumns.length }}/{{ Object.keys(columns_).length }}
14
+ </div>
15
+ </v-btn>
8
16
  </template>
9
17
 
10
18
  <a-draggable-checkbox-group
@@ -30,11 +38,14 @@
30
38
 
31
39
  <script>
32
40
  import { Component, Vue } from '@a-vue'
41
+ import { mdiViewColumn } from '@mdi/js'
33
42
 
34
43
  @Component({
35
44
  props: ['columns', 'storageKey', {drag: false}]
36
45
  })
37
46
  export default class ListColumnSelector extends Vue {
47
+ mdiViewColumn = mdiViewColumn
48
+
38
49
  columns_ = {}
39
50
  selectedColumns = []
40
51
 
@@ -54,9 +65,10 @@ export default class ListColumnSelector extends Vue {
54
65
  }
55
66
 
56
67
  columnSelected () {
57
- for (const key in this.columns) {
58
- this.columns[key].visible = this.selectedColumns.includes(key)
68
+ for (const key in this.columns_) {
69
+ this.columns_[key].visible = this.selectedColumns.includes(key)
59
70
  }
71
+ this.$emit('update:columns', this.columns_)
60
72
  this.saveColumnConfiguration()
61
73
  }
62
74
 
@@ -126,8 +138,13 @@ export default class ListColumnSelector extends Vue {
126
138
 
127
139
 
128
140
  <style lang="scss" scoped>
129
- .contextButton {
130
- font-size: .7rem;
131
- cursor: pointer;
141
+ .columnsButton {
142
+ padding: 0 8px 0 5px !important;
143
+ height: 2.2rem !important;
144
+
145
+ div {
146
+ font-size: .8rem;
147
+ color: #666666;
148
+ }
132
149
  }
133
150
  </style>