@afeefa/vue-app 0.0.90 → 0.0.92

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.90
1
+ 0.0.92
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.90",
3
+ "version": "0.0.92",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -1,23 +1,18 @@
1
1
  <template>
2
- <div :class="['a-grid', widthClass, colsClass, gapClass, evenClass, breakMobileClass]">
2
+ <div :class="['a-grid', colsClass, gapClass, evenClass, breakMobileClass]">
3
3
  <slot />
4
4
  </div>
5
5
  </template>
6
6
 
7
7
 
8
8
  <script>
9
- import { Component, Vue } from '@a-vue'
9
+ import { Component, Mixins } from '@a-vue'
10
+ import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
10
11
 
11
12
  @Component({
12
- props: ['fullWidth', 'gap', 'hGap', 'vGap', 'cols', 'even', 'breakMobile']
13
+ props: ['gap', 'hGap', 'vGap', 'cols', {even: false}, 'breakMobile']
13
14
  })
14
- export default class AGrid extends Vue {
15
- get widthClass () {
16
- if (this.fullWidth !== undefined) {
17
- return 'full'
18
- }
19
- }
20
-
15
+ export default class AGrid extends Mixins(ComponentWidthMixin) {
21
16
  get breakMobileClass () {
22
17
  if (this.breakMobile !== undefined) {
23
18
  return 'breakMobile'
@@ -30,7 +25,7 @@ export default class AGrid extends Vue {
30
25
  }
31
26
 
32
27
  get evenClass () {
33
- if (this.even !== undefined) {
28
+ if (this.even) {
34
29
  return 'even'
35
30
  }
36
31
  }
@@ -60,35 +55,12 @@ export default class AGrid extends Vue {
60
55
  .a-grid {
61
56
  display: grid;
62
57
 
63
- &.full {
64
- width: 100%;
65
- }
66
-
67
- &.cols-2 {
68
- grid-template-columns: auto auto;
69
- &.even {
70
- grid-template-columns: 1fr 1fr;
71
- }
72
- }
73
-
74
- &.cols-3 {
75
- grid-template-columns: auto auto auto;
76
- &.even {
77
- grid-template-columns: 1fr 1fr 1fr;
78
- }
79
- }
80
-
81
- &.cols-4 {
82
- grid-template-columns: repeat(4, auto);
83
- &.even {
84
- grid-template-columns: repeat(4, 1fr);
85
- }
86
- }
87
-
88
- &.cols-5 {
89
- grid-template-columns: repeat(5, auto);
90
- &.even {
91
- grid-template-columns: repeat(5, 1fr);
58
+ @for $i from 1 through 8 {
59
+ &.cols-#{$i} {
60
+ grid-template-columns: repeat(#{$i}, auto);
61
+ &.even {
62
+ grid-template-columns: repeat(#{$i}, 1fr);
63
+ }
92
64
  }
93
65
  }
94
66
 
@@ -100,6 +72,5 @@ export default class AGrid extends Vue {
100
72
  }
101
73
  }
102
74
  }
103
-
104
75
  }
105
76
  </style>
@@ -8,6 +8,7 @@
8
8
  <v-btn
9
9
  small
10
10
  :class="['menu-button', {'is-active': focus && editor.isActive('bold')}]"
11
+ title="fett"
11
12
  @click="editor.chain().focus().toggleBold().run()"
12
13
  >
13
14
  <v-icon>{{ boldIcon }}</v-icon>
@@ -16,6 +17,7 @@
16
17
  <v-btn
17
18
  small
18
19
  :class="['menu-button', {'is-active': focus && editor.isActive('italic')}]"
20
+ title="kursiv"
19
21
  @click="editor.chain().focus().toggleItalic().run()"
20
22
  >
21
23
  <v-icon>{{ italicIcon }}</v-icon>
@@ -24,6 +26,7 @@
24
26
  <v-btn
25
27
  small
26
28
  :class="['menu-button', 'strike', {'is-active': focus && editor.isActive('strike')}]"
29
+ title="durchgestrichen"
27
30
  @click="editor.chain().focus().toggleStrike().run()"
28
31
  >
29
32
  <v-icon>{{ strikeIcon }}</v-icon>
@@ -32,6 +35,7 @@
32
35
  <v-btn
33
36
  small
34
37
  :class="['menu-button', {'is-active': focus && editor.isActive('heading', {level: 1})}]"
38
+ title="überschrift 1"
35
39
  @click="editor.chain().focus().toggleHeading({level: 1}).run()"
36
40
  >
37
41
  <v-icon>{{ h1Icon }}</v-icon>
@@ -40,6 +44,7 @@
40
44
  <v-btn
41
45
  small
42
46
  :class="['menu-button', {'is-active': focus && editor.isActive('heading', {level: 2})}]"
47
+ title="pberschrift 2"
43
48
  @click="editor.chain().focus().toggleHeading({level: 2}).run()"
44
49
  >
45
50
  <v-icon>{{ h2Icon }}</v-icon>
@@ -48,6 +53,7 @@
48
53
  <v-btn
49
54
  small
50
55
  :class="['menu-button', {'is-active': focus && editor.isActive('bulletList')}]"
56
+ title="punkt-liste"
51
57
  @click="editor.chain().focus().toggleBulletList().run()"
52
58
  >
53
59
  <v-icon>{{ ulIcon }}</v-icon>
@@ -56,6 +62,7 @@
56
62
  <v-btn
57
63
  small
58
64
  :class="['menu-button', {'is-active': focus && editor.isActive('orderedList')}]"
65
+ title="nummerierte liste"
59
66
  @click="editor.chain().focus().toggleOrderedList().run()"
60
67
  >
61
68
  <v-icon>{{ olIcon }}</v-icon>
@@ -64,6 +71,7 @@
64
71
  <v-btn
65
72
  small
66
73
  :class="['menu-button', {'is-active': focus && editor.isActive('blockquote')}]"
74
+ title="zitat"
67
75
  @click="editor.chain().focus().toggleBlockquote().run()"
68
76
  >
69
77
  <v-icon>{{ commentIcon }}</v-icon>
@@ -72,13 +80,37 @@
72
80
  <v-btn
73
81
  small
74
82
  class="menu-button"
83
+ :class="{ 'is-active': editor.isActive('textStyle', { color: '#0000FF' })}"
84
+ title="rot"
85
+ color="red--text"
86
+ @click="editor.chain().focus().setColor('#0000FF').run()"
87
+ >
88
+ <v-icon>$paletteIcon</v-icon>
89
+ </v-btn>
90
+
91
+ <v-btn
92
+ small
93
+ class="menu-button"
94
+ :class="{ 'is-active': editor.isActive('textStyle', { color: '#FF0000' })}"
95
+ title="blau"
96
+ color="blue--text"
97
+ @click="editor.chain().focus().setColor('#FF0000').run()"
98
+ >
99
+ <v-icon>$paletteIcon</v-icon>
100
+ </v-btn>
101
+
102
+ <v-btn
103
+ small
104
+ class="menu-button undo-button"
75
105
  :disabled="initialValue === editor.getHTML()"
106
+ title="rückgängig"
76
107
  @click="editor.chain().focus().undo().run()"
77
108
  >
78
109
  <v-icon>{{ undoIcon }}</v-icon>
79
110
  </v-btn>
80
111
  </div>
81
112
 
113
+
82
114
  <div>
83
115
  <slot name="buttons" />
84
116
  </div>
@@ -108,6 +140,8 @@ import {
108
140
  mdiRotateLeft,
109
141
  mdiRotateRight
110
142
  } from '@mdi/js'
143
+ import { Color } from '@tiptap/extension-color'
144
+ import TextStyle from '@tiptap/extension-text-style'
111
145
 
112
146
  @Component({
113
147
  props: ['value', 'validator'],
@@ -145,7 +179,9 @@ export default class ARichTextArea extends Vue {
145
179
  this.editor = new Editor({
146
180
  content: this.internalValue,
147
181
  extensions: [
148
- StarterKit
182
+ StarterKit,
183
+ TextStyle,
184
+ Color
149
185
  ],
150
186
  onUpdate: () => {
151
187
  this.$emit('input', this.editor.getHTML())
@@ -240,11 +276,18 @@ export default class ARichTextArea extends Vue {
240
276
  width: unset;
241
277
  }
242
278
 
279
+ &:disabled {
280
+ background: none !important;
281
+ :deep(*) {
282
+ color: #CCCCCC !important;
283
+ }
284
+ }
285
+
243
286
  &.is-active {
244
287
  background: #ECECEC !important;
245
288
  }
246
289
 
247
- &[disabled] {
290
+ &.menu-button:disabled {
248
291
  background: none !important;
249
292
  }
250
293
  }
@@ -1,21 +1,30 @@
1
1
  <template>
2
- <div :class="['a-row', widthClass, alignClass, gapClass, directionClass, justifyClass]">
2
+ <div
3
+ :class="['a-row', directionClass, gapClass, classes]"
4
+ :style="cwm_widthStyle"
5
+ >
3
6
  <slot />
4
7
  </div>
5
8
  </template>
6
9
 
7
10
 
8
11
  <script>
9
- import { Component, Vue } from '@a-vue'
12
+ import { Component, Mixins } from '@a-vue'
13
+ import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
10
14
 
11
15
  @Component({
12
- props: ['fullWidth', 'gap', 'start', 'stretch', 'center', 'vertical', 'right']
16
+ props: [
17
+ { vertical: false },
18
+ 'gap'
19
+ ]
13
20
  })
14
- export default class ARow extends Vue {
15
- get widthClass () {
16
- if (this.fullWidth !== undefined) {
17
- return 'full'
18
- }
21
+ export default class ARow extends Mixins(ComponentWidthMixin) {
22
+ get classes () {
23
+ const classes = {}
24
+ Object.keys(this.$attrs).forEach(cssClass => {
25
+ classes[cssClass] = true
26
+ })
27
+ return classes
19
28
  }
20
29
 
21
30
  get gapClass () {
@@ -24,33 +33,11 @@ export default class ARow extends Vue {
24
33
  }
25
34
  }
26
35
 
27
- get alignClass () {
28
- if (this.start !== undefined) {
29
- return 'start'
30
- }
31
-
32
- if (this.stretch !== undefined) {
33
- return 'stretch'
34
- }
35
-
36
- if (this.vertical !== undefined) {
37
- return this.center !== undefined ? 'center' : 'start'
38
- }
39
-
40
- return 'center'
41
- }
42
-
43
36
  get directionClass () {
44
- if (this.vertical !== undefined) {
37
+ if (this.vertical) {
45
38
  return 'vertical'
46
39
  }
47
40
  }
48
-
49
- get justifyClass () {
50
- if (this.right !== undefined) {
51
- return 'right'
52
- }
53
- }
54
41
  }
55
42
  </script>
56
43
 
@@ -58,29 +45,11 @@ export default class ARow extends Vue {
58
45
  <style scoped lang="scss">
59
46
  .a-row {
60
47
  display: flex;
61
-
62
- &.full {
63
- width: 100%;
64
- }
48
+ align-items: center;
65
49
 
66
50
  &.vertical {
67
51
  flex-direction: column;
68
- }
69
-
70
- &.center {
71
- align-items: center;
72
- }
73
-
74
- &.start {
75
- align-items: flex-start;
76
- }
77
-
78
- &.stretch {
79
- align-items: stretch;
80
- }
81
-
82
- &.right {
83
- justify-content: flex-end;
52
+ align-items: start;
84
53
  }
85
54
  }
86
55
  </style>
@@ -27,8 +27,9 @@
27
27
  <slot name="after-form-fields" />
28
28
 
29
29
  <a-row
30
- class="mt-8 gap-2"
31
- right
30
+ mt-8
31
+ gap-2
32
+ justify-end
32
33
  >
33
34
  <v-btn
34
35
  small
@@ -10,6 +10,10 @@ class CascadingWindowEventDispatcher {
10
10
  addEventListener (event, listener) {
11
11
  if (!this.listeners[event]) {
12
12
  this.listeners[event] = []
13
+ }
14
+
15
+ if (!this.listeners[event].length) {
16
+ this.listeners[event] = []
13
17
 
14
18
  window.addEventListener(event, e => {
15
19
  for (const listener of this.listeners[event]) {
@@ -84,8 +84,8 @@
84
84
 
85
85
  <v-main id="v-main">
86
86
  <a-row
87
- start
88
87
  class="topbar"
88
+ align-start
89
89
  >
90
90
  <v-app-bar-nav-icon
91
91
  class="sidebarToggleButton mr-2 ml-3"
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <div class="notFound">
3
3
  <a-row
4
- vertical
5
- center
6
4
  class="content"
5
+ vertical
6
+ align-center
7
7
  >
8
8
  <div class="logo">
9
9
  <slot />
@@ -11,7 +11,7 @@
11
11
 
12
12
  <a-row
13
13
  vertical
14
- center
14
+ align-center
15
15
  >
16
16
  <div class="mt-0">
17
17
  {{ title || '404 - Not Found' }}
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <v-app class="splash">
3
3
  <a-row
4
- vertical
5
- center
6
4
  class="content"
5
+ vertical
6
+ align-center
7
7
  >
8
8
  <div class="logo">
9
9
  <slot />
@@ -11,8 +11,8 @@
11
11
 
12
12
  <a-row
13
13
  vertical
14
- center
15
- fullWidth
14
+ align-center
15
+ width="100%"
16
16
  >
17
17
  <v-progress-linear
18
18
  :size="45"
@@ -1,8 +1,6 @@
1
1
  <template>
2
2
  <a-row
3
- fullWidth
4
3
  vertical
5
- start
6
4
  gap="10"
7
5
  >
8
6
  <slot />
@@ -27,6 +27,7 @@
27
27
  </v-btn>
28
28
  </div>
29
29
  </template>
30
+
30
31
  <span v-if="disabled">
31
32
  <template v-if="!valid">
32
33
  Daten berichtigen,<br>um zu speichern
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  mdiAlarmLightOutline,
3
- mdiArrowLeft,
4
3
  mdiAlert,
4
+ mdiArrowLeft,
5
5
  mdiCalendar,
6
6
  mdiCheck,
7
7
  mdiCheckBold,
8
8
  mdiChevronRight,
9
9
  mdiClose,
10
10
  mdiCloseThick,
11
+ mdiCurrencyEur,
11
12
  mdiDelete,
12
13
  mdiDotsHorizontal,
13
14
  mdiDotsVertical,
@@ -16,11 +17,11 @@ import {
16
17
  mdiMagnify,
17
18
  mdiMenuDown,
18
19
  mdiMenuUp,
20
+ mdiPalette,
19
21
  mdiPencil,
20
22
  mdiPlus,
21
23
  mdiPrinter,
22
- mdiThumbUpOutline,
23
- mdiCurrencyEur
24
+ mdiThumbUpOutline
24
25
  } from '@mdi/js'
25
26
  import Vue from 'vue'
26
27
  import Vuetify from 'vuetify/lib'
@@ -52,7 +53,8 @@ export default new Vuetify({
52
53
  caretDownIcon: mdiMenuDown,
53
54
  caretUpIcon: mdiMenuUp,
54
55
  printerIcon: mdiPrinter,
55
- euroSymbol: mdiCurrencyEur
56
+ euroSymbol: mdiCurrencyEur,
57
+ paletteIcon: mdiPalette
56
58
  }
57
59
  },
58
60
  breakpoint: {
@@ -74,140 +74,16 @@
74
74
  box-shadow: none !important;
75
75
  }
76
76
 
77
- // @for $i from 1 through 10 {
78
- // .gap-{$i} {
79
- // gap: 0.25rem * $i;
80
- // }
81
- // }
82
-
83
- .gap-0 {
84
- gap: 0;
85
- }
86
-
87
- .gap-1 {
88
- gap: 4px;
89
- }
90
-
91
- .gap-2 {
92
- gap: 8px;
93
- }
94
-
95
- .gap-3 {
96
- gap: 12px;
97
- }
98
-
99
- .gap-4 {
100
- gap: 16px;
101
- }
102
-
103
- .gap-5 {
104
- gap: 20px;
105
- }
106
-
107
- .gap-6 {
108
- gap: 24px;
109
- }
110
-
111
- .gap-7 {
112
- gap: 28px;
113
- }
114
-
115
- .gap-8 {
116
- gap: 32px;
117
- }
118
-
119
- .gap-9 {
120
- gap: 36px;
121
- }
122
-
123
- .gap-10 {
124
- gap: 40px;
125
- }
126
-
127
- .h-gap-0 {
128
- column-gap: 0;
129
- }
130
-
131
- .h-gap-1 {
132
- column-gap: 4px;
133
- }
134
-
135
- .h-gap-2 {
136
- column-gap: 8px;
137
- }
138
-
139
- .h-gap-3 {
140
- column-gap: 12px;
141
- }
142
-
143
- .h-gap-4 {
144
- column-gap: 16px;
145
- }
146
-
147
- .h-gap-5 {
148
- column-gap: 20px;
149
- }
150
-
151
- .h-gap-6 {
152
- column-gap: 24px;
153
- }
154
-
155
- .h-gap-7 {
156
- column-gap: 28px;
157
- }
158
-
159
- .h-gap-8 {
160
- column-gap: 32px;
161
- }
162
-
163
- .h-gap-9 {
164
- column-gap: 36px;
165
- }
166
-
167
- .h-gap-10 {
168
- column-gap: 40px;
169
- }
170
-
171
- .v-gap-0 {
172
- row-gap: 0;
173
- }
174
-
175
- .v-gap-1 {
176
- row-gap: 4px;
177
- }
178
-
179
- .v-gap-2 {
180
- row-gap: 8px;
181
- }
182
-
183
- .v-gap-3 {
184
- row-gap: 12px;
185
- }
186
-
187
- .v-gap-4 {
188
- row-gap: 16px;
189
- }
190
-
191
- .v-gap-5 {
192
- row-gap: 20px;
193
- }
194
-
195
- .v-gap-6 {
196
- row-gap: 24px;
197
- }
198
-
199
- .v-gap-7 {
200
- row-gap: 28px;
201
- }
202
-
203
- .v-gap-8 {
204
- row-gap: 32px;
205
- }
77
+ @for $i from 1 through 16 {
78
+ .gap-#{$i} {
79
+ gap: 4px * $i;
80
+ }
206
81
 
207
- .v-gap-9 {
208
- row-gap: 36px;
209
- }
82
+ .h-gap-#{$i} {
83
+ column-gap: 4px * $i;
84
+ }
210
85
 
211
- .v-gap-10 {
212
- row-gap: 40px;
86
+ .v-gap-#{$i} {
87
+ row-gap: 4px * $i;
88
+ }
213
89
  }