@afeefa/vue-app 0.0.53 → 0.0.54
Sign up to get free protection for your applications and to get access to all the features.
- package/.afeefa/package/release/version.txt +1 -1
- package/package.json +3 -10
- package/src/api-resources/ApiActions.js +31 -0
- package/src/components/AAlert.vue +1 -1
- package/src/components/AAutocomplete.vue +1 -1
- package/src/components/ABadge.vue +1 -1
- package/src/components/ABreadcrumbs.vue +1 -1
- package/src/components/ACheckbox.vue +35 -0
- package/src/components/AContextMenu.vue +1 -1
- package/src/components/AContextMenuItem.vue +1 -1
- package/src/components/ADatePicker.vue +1 -1
- package/src/components/ADialog.vue +1 -1
- package/src/components/AGrid.vue +2 -1
- package/src/components/AIcon.vue +1 -1
- package/src/components/AIconButton.vue +1 -1
- package/src/components/ALoadingIndicator.vue +1 -1
- package/src/components/AModal.vue +1 -1
- package/src/components/APagination.vue +1 -1
- package/src/components/ARadioGroup.vue +1 -1
- package/src/components/ARow.vue +1 -1
- package/src/components/ASaveIndicator.vue +1 -1
- package/src/components/ASearchSelect.vue +22 -6
- package/src/components/ASelect.vue +1 -1
- package/src/components/ATable.vue +1 -1
- package/src/components/ATableHeader.vue +1 -1
- package/src/components/ATableRow.vue +1 -1
- package/src/components/ATextArea.vue +1 -1
- package/src/components/ATextField.vue +1 -1
- package/src/components/form/EditForm.vue +1 -1
- package/src/components/form/EditModal.vue +1 -1
- package/src/components/form/FormFieldMixin.js +1 -1
- package/src/components/form/fields/FormFieldCheckbox.vue +18 -0
- package/src/components/form/fields/FormFieldDate.vue +1 -1
- package/src/components/form/fields/FormFieldRadioGroup.vue +1 -1
- package/src/components/form/fields/FormFieldSearchSelect.vue +1 -1
- package/src/components/form/fields/FormFieldSelect.vue +1 -1
- package/src/components/form/fields/FormFieldSelect2.vue +1 -1
- package/src/components/form/fields/FormFieldText.vue +1 -1
- package/src/components/form/fields/FormFieldTextArea.vue +1 -1
- package/src/components/index.js +2 -0
- package/src/components/list/ListFilterMixin.js +1 -1
- package/src/components/list/ListFilterRow.vue +1 -1
- package/src/components/list/ListViewMixin.js +3 -4
- package/src/components/list/filters/ListFilterPage.vue +1 -1
- package/src/components/list/filters/ListFilterSearch.vue +1 -1
- package/src/components/list/filters/ListFilterSelect.vue +1 -1
- package/src/components/mixins/ClickOutsideMixin.js +1 -1
- package/src/components/mixins/ComponentWidthMixin.js +1 -1
- package/src/components/search-select/SearchSelectFilters.vue +1 -1
- package/src/components/search-select/SearchSelectList.vue +8 -2
- package/src/components/vue/Component.js +46 -0
- package/src/index.js +2 -0
- package/src/plugins/route-config/RouteConfigPlugin.js +25 -1
- package/src/services/escape/CancelOnEscMixin.js +1 -1
- package/src/services/position/UsesPositionServiceMixin.js +1 -1
- package/src-admin/components/App.vue +1 -1
- package/src-admin/components/NotFound.vue +65 -0
- package/src-admin/components/SidebarMenu.vue +1 -1
- package/src-admin/components/Splash.vue +34 -34
- package/src-admin/components/Start.vue +2 -2
- package/src-admin/components/app/AppBarButton.vue +1 -1
- package/src-admin/components/app/AppBarButtons.vue +1 -1
- package/src-admin/components/app/AppBarTitle.vue +1 -1
- package/src-admin/components/app/AppBarTitleContainer.vue +1 -1
- package/src-admin/components/detail/DetailProperty.vue +1 -1
- package/src-admin/components/list/ListColumnHeader.vue +1 -1
- package/src-admin/components/list/ListTitle.vue +1 -1
- package/src-admin/components/list/ListView.vue +1 -1
- package/src-admin/components/menu/SidebarMenuItem.vue +1 -1
- package/src-admin/components/model/ModelCount.vue +1 -1
- package/src-admin/components/model/ModelIcon.vue +1 -1
- package/src-admin/components/pages/CreatePage.vue +1 -1
- package/src-admin/components/pages/DetailPage.vue +1 -1
- package/src-admin/components/pages/EditPage.vue +1 -1
- package/src-admin/components/pages/EditPageMixin.js +1 -1
- package/src-admin/components/pages/ListPage.vue +1 -1
- package/src-admin/components/routes/CreateRoute.vue +1 -1
- package/src-admin/components/routes/DetailRoute.vue +1 -1
- package/src-admin/components/routes/EditRoute.vue +1 -1
- package/src-admin/components/routes/ListRoute.vue +1 -1
- package/src/utils/props-helper.js +0 -21
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.54
|
package/package.json
CHANGED
@@ -1,20 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "@afeefa/vue-app",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.54",
|
4
4
|
"description": "",
|
5
5
|
"author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
|
6
6
|
"license": "MIT",
|
7
|
-
"scripts": {
|
8
|
-
"typings": "tsc"
|
9
|
-
},
|
10
7
|
"devDependencies": {
|
11
|
-
"core-js": "^3.
|
12
|
-
"
|
13
|
-
"vue": "^2.6.12",
|
8
|
+
"core-js": "^3.21.1",
|
9
|
+
"vue": "^2.6.14",
|
14
10
|
"vue-class-component": "^7.2.6",
|
15
11
|
"vue-property-decorator": "^9.1.2"
|
16
|
-
},
|
17
|
-
"dependencies": {
|
18
|
-
"moment": "^2.29.1"
|
19
12
|
}
|
20
13
|
}
|
@@ -228,14 +228,38 @@ export class RemoveAction {
|
|
228
228
|
}
|
229
229
|
|
230
230
|
export class ListAction {
|
231
|
+
action = null
|
231
232
|
request = null
|
233
|
+
params = {}
|
234
|
+
fields = {}
|
235
|
+
filters = {}
|
232
236
|
events = true
|
233
237
|
|
238
|
+
setAction (action) {
|
239
|
+
this.action = action
|
240
|
+
return this
|
241
|
+
}
|
242
|
+
|
234
243
|
setRequest (request) {
|
235
244
|
this.request = request
|
236
245
|
return this
|
237
246
|
}
|
238
247
|
|
248
|
+
setParams (params) {
|
249
|
+
this.params = params
|
250
|
+
return this
|
251
|
+
}
|
252
|
+
|
253
|
+
setFields (fields) {
|
254
|
+
this.fields = fields
|
255
|
+
return this
|
256
|
+
}
|
257
|
+
|
258
|
+
setFilters (filters) {
|
259
|
+
this.filters = filters
|
260
|
+
return this
|
261
|
+
}
|
262
|
+
|
239
263
|
noEvents (noEvents) {
|
240
264
|
this.events = noEvents === undefined ? false : !noEvents
|
241
265
|
return this
|
@@ -246,6 +270,13 @@ export class ListAction {
|
|
246
270
|
eventBus.dispatch(new LoadingEvent(LoadingEvent.START_LOADING))
|
247
271
|
}
|
248
272
|
|
273
|
+
if (!this.request) {
|
274
|
+
this.request = this.action.createRequest()
|
275
|
+
.params(this.params)
|
276
|
+
.fields(this.fields)
|
277
|
+
.filters(this.filters)
|
278
|
+
}
|
279
|
+
|
249
280
|
const result = await this.request.send()
|
250
281
|
|
251
282
|
if (result.error) {
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
|
21
21
|
<script>
|
22
|
-
import { Component, Vue, Watch } from 'vue
|
22
|
+
import { Component, Vue, Watch } from '@a-vue'
|
23
23
|
import { SaveEvent } from './save-indicator/SaveEvent'
|
24
24
|
import { routeConfigPlugin } from '@a-vue/plugins/route-config/RouteConfigPlugin'
|
25
25
|
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<template>
|
2
|
+
<v-checkbox
|
3
|
+
ref="checkbox"
|
4
|
+
v-bind="$attrs"
|
5
|
+
:inputValue="$attrs.value"
|
6
|
+
@change="$emit('input', $event || false)"
|
7
|
+
/>
|
8
|
+
</template>
|
9
|
+
|
10
|
+
|
11
|
+
<script>
|
12
|
+
import { Component, Vue } from '@a-vue'
|
13
|
+
|
14
|
+
@Component({
|
15
|
+
props: ['validator']
|
16
|
+
})
|
17
|
+
export default class ACheckbox extends Vue {
|
18
|
+
created () {
|
19
|
+
this.init()
|
20
|
+
}
|
21
|
+
|
22
|
+
async init () {
|
23
|
+
if (this.validator) {
|
24
|
+
this.$nextTick(() => {
|
25
|
+
this.$refs.checkbox.validate(true)
|
26
|
+
})
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
get validationRules () {
|
31
|
+
const label = this.$attrs.label
|
32
|
+
return (this.validator && this.validator.getRules(label)) || []
|
33
|
+
}
|
34
|
+
}
|
35
|
+
</script>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
</template>
|
26
26
|
|
27
27
|
<script>
|
28
|
-
import { Component, Mixins, Watch } from 'vue
|
28
|
+
import { Component, Mixins, Watch } from '@a-vue'
|
29
29
|
import { UsesPositionServiceMixin } from '../services/position/UsesPositionServiceMixin'
|
30
30
|
import { Positions, PositionConfig } from '../services/PositionService'
|
31
31
|
import { randomCssClass } from '../utils/random'
|
@@ -29,7 +29,7 @@
|
|
29
29
|
|
30
30
|
|
31
31
|
<script>
|
32
|
-
import { Component, Mixins, Watch } from 'vue
|
32
|
+
import { Component, Mixins, Watch } from '@a-vue'
|
33
33
|
import { formatDate } from '@a-vue/utils/format-date'
|
34
34
|
import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
|
35
35
|
|
@@ -54,7 +54,7 @@
|
|
54
54
|
</template>
|
55
55
|
|
56
56
|
<script>
|
57
|
-
import { Component, Mixins, Watch } from 'vue
|
57
|
+
import { Component, Mixins, Watch } from '@a-vue'
|
58
58
|
import { DialogEvent } from './dialog/DialogEvent'
|
59
59
|
import { PositionConfig } from '../services/PositionService'
|
60
60
|
import { UsesPositionServiceMixin } from '../services/position/UsesPositionServiceMixin'
|
package/src/components/AGrid.vue
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
<script>
|
9
|
-
import { Component, Vue } from 'vue
|
9
|
+
import { Component, Vue } from '@a-vue'
|
10
10
|
|
11
11
|
@Component({
|
12
12
|
props: ['fullWidth', 'gap', 'hGap', 'vGap', 'cols', 'even', 'breakMobile']
|
@@ -91,6 +91,7 @@ export default class AGrid extends Vue {
|
|
91
91
|
grid-template-columns: repeat(5, 1fr);
|
92
92
|
}
|
93
93
|
}
|
94
|
+
|
94
95
|
&.breakMobile {
|
95
96
|
@media (max-width: 900px), (orientation : portrait) {
|
96
97
|
grid-template-columns: 1fr;
|
package/src/components/AIcon.vue
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
</template>
|
34
34
|
|
35
35
|
<script>
|
36
|
-
import { Component, Mixins, Watch } from 'vue
|
36
|
+
import { Component, Mixins, Watch } from '@a-vue'
|
37
37
|
import { PositionConfig } from '../services/PositionService'
|
38
38
|
import { UsesPositionServiceMixin } from '@a-vue/services/position/UsesPositionServiceMixin'
|
39
39
|
import { randomCssClass } from '../utils/random'
|
package/src/components/ARow.vue
CHANGED
@@ -44,12 +44,14 @@
|
|
44
44
|
<div :class="listCssClass">
|
45
45
|
<search-select-list
|
46
46
|
v-if="isOpen"
|
47
|
-
|
47
|
+
:listViewConfig="listViewConfig"
|
48
48
|
:q="q"
|
49
|
+
:selectedItems="selectedItems"
|
49
50
|
:events="false"
|
50
51
|
:history="false"
|
51
52
|
:filterSource="filterSource"
|
52
53
|
:loadOnlyIfKeyword="_loadOnlyIfKeyword"
|
54
|
+
:filters.sync="filters"
|
53
55
|
:count.sync="count"
|
54
56
|
:isLoading.sync="isLoading"
|
55
57
|
>
|
@@ -88,7 +90,7 @@
|
|
88
90
|
|
89
91
|
|
90
92
|
<script>
|
91
|
-
import { Component, Watch, Mixins } from 'vue
|
93
|
+
import { Component, Watch, Mixins } from '@a-vue'
|
92
94
|
import { UsesPositionServiceMixin } from '../services/position/UsesPositionServiceMixin'
|
93
95
|
import { PositionConfig } from '../services/PositionService'
|
94
96
|
import { randomCssClass } from '../utils/random'
|
@@ -98,7 +100,16 @@ import SearchSelectList from './search-select/SearchSelectList'
|
|
98
100
|
import { CancelOnEscMixin } from '@a-vue/services/escape/CancelOnEscMixin'
|
99
101
|
|
100
102
|
@Component({
|
101
|
-
props: [
|
103
|
+
props: [
|
104
|
+
'listViewConfig',
|
105
|
+
'q',
|
106
|
+
'width',
|
107
|
+
'closeOnSelect',
|
108
|
+
'loadOnlyIfKeyword',
|
109
|
+
{
|
110
|
+
selectedItems: []
|
111
|
+
}
|
112
|
+
],
|
102
113
|
components: {
|
103
114
|
SearchSelectFilters,
|
104
115
|
SearchSelectList
|
@@ -196,7 +207,7 @@ export default class ASearchSelect extends Mixins(UsesPositionServiceMixin, Canc
|
|
196
207
|
p
|
197
208
|
.anchorTop()
|
198
209
|
.targetBottom()
|
199
|
-
.diffY('
|
210
|
+
.diffY('-.5rem')
|
200
211
|
})
|
201
212
|
.onPosition(this.onListPositionChanged)
|
202
213
|
|
@@ -323,8 +334,13 @@ export default class ASearchSelect extends Mixins(UsesPositionServiceMixin, Canc
|
|
323
334
|
overflow-y: auto;
|
324
335
|
overscroll-behavior: contain;
|
325
336
|
|
326
|
-
::v-deep .a-table-row
|
327
|
-
|
337
|
+
::v-deep .a-table-row {
|
338
|
+
&:not(.selected) {
|
339
|
+
cursor: pointer;
|
340
|
+
}
|
341
|
+
&.selected {
|
342
|
+
pointer-events: none;
|
343
|
+
}
|
328
344
|
}
|
329
345
|
}
|
330
346
|
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
<script>
|
15
|
-
import { Component, Mixins, Watch } from 'vue
|
15
|
+
import { Component, Mixins, Watch } from '@a-vue'
|
16
16
|
import { Model } from '@afeefa/api-resources-client'
|
17
17
|
import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
|
18
18
|
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
|
17
17
|
<script>
|
18
|
-
import { Component, Watch, Mixins } from 'vue
|
18
|
+
import { Component, Watch, Mixins } from '@a-vue'
|
19
19
|
import { debounce } from '@a-vue/utils/debounce'
|
20
20
|
import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
|
21
21
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<template>
|
2
|
+
<a-checkbox
|
3
|
+
v-model="model[name]"
|
4
|
+
:label="label || name"
|
5
|
+
:validator="validator"
|
6
|
+
v-bind="$attrs"
|
7
|
+
v-on="$listeners"
|
8
|
+
/>
|
9
|
+
</template>
|
10
|
+
|
11
|
+
<script>
|
12
|
+
import { Component, Mixins } from '@a-vue'
|
13
|
+
import { FormFieldMixin } from '../FormFieldMixin'
|
14
|
+
|
15
|
+
@Component
|
16
|
+
export default class FormFieldCheckbox extends Mixins(FormFieldMixin) {
|
17
|
+
}
|
18
|
+
</script>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
</template>
|
15
15
|
|
16
16
|
<script>
|
17
|
-
import { Component, Mixins } from 'vue
|
17
|
+
import { Component, Mixins } from '@a-vue'
|
18
18
|
import { FormFieldMixin } from '../FormFieldMixin'
|
19
19
|
import { ComponentWidthMixin } from '../../mixins/ComponentWidthMixin'
|
20
20
|
|
package/src/components/index.js
CHANGED
@@ -2,6 +2,7 @@ import Vue from 'vue'
|
|
2
2
|
|
3
3
|
import EditForm from './form/EditForm'
|
4
4
|
import EditModal from './form/EditModal'
|
5
|
+
import FormFieldCheckbox from './form/fields/FormFieldCheckbox'
|
5
6
|
import FormFieldDate from './form/fields/FormFieldDate'
|
6
7
|
import FormFieldRadioGroup from './form/fields/FormFieldRadioGroup'
|
7
8
|
import FormFieldSearchSelect from './form/fields/FormFieldSearchSelect'
|
@@ -19,6 +20,7 @@ Vue.component('EditModal', EditModal)
|
|
19
20
|
Vue.component('FormFieldText', FormFieldText)
|
20
21
|
Vue.component('FormFieldTextArea', FormFieldTextArea)
|
21
22
|
Vue.component('FormFieldRadioGroup', FormFieldRadioGroup)
|
23
|
+
Vue.component('FormFieldCheckbox', FormFieldCheckbox)
|
22
24
|
Vue.component('FormFieldDate', FormFieldDate)
|
23
25
|
Vue.component('FormFieldSearchSelect', FormFieldSearchSelect)
|
24
26
|
Vue.component('FormFieldSelect', FormFieldSelect)
|
@@ -1,13 +1,12 @@
|
|
1
|
+
import { Component, Vue, Watch } from '@a-vue'
|
1
2
|
import { ListAction } from '@a-vue/api-resources/ApiActions'
|
2
|
-
import { propsWithDefaults } from '@a-vue/utils/props-helper'
|
3
3
|
import { ListViewModel } from '@afeefa/api-resources-client'
|
4
|
-
import { Component, Vue, Watch } from 'vue-property-decorator'
|
5
4
|
|
6
5
|
import { CurrentRouteFilterSource } from './CurrentRouteFilterSource'
|
7
6
|
import { FilterSourceType } from './FilterSourceType'
|
8
7
|
|
9
8
|
@Component({
|
10
|
-
|
9
|
+
props: [
|
11
10
|
'models', 'meta', // given, if already loaded
|
12
11
|
'listViewConfig',
|
13
12
|
'filterHistoryKey',
|
@@ -17,7 +16,7 @@ import { FilterSourceType } from './FilterSourceType'
|
|
17
16
|
events: true,
|
18
17
|
history: true
|
19
18
|
}
|
20
|
-
]
|
19
|
+
]
|
21
20
|
})
|
22
21
|
export class ListViewMixin extends Vue {
|
23
22
|
LIST_VIEW = true
|