@mapomodule/uikit 1.0.0-alpha.5 → 1.0.0-alpha.9
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.
- package/CHANGELOG.md +148 -0
- package/components/Detail/Detail.vue +182 -105
- package/components/Detail/DetailField.vue +42 -29
- package/components/Detail/DetailLangSwitch.vue +1 -1
- package/components/Detail/defaults.js +32 -25
- package/components/DropArea.vue +3 -3
- package/components/List/List.vue +77 -42
- package/components/List/ListActions.vue +19 -1
- package/components/List/ListFilters.vue +127 -113
- package/components/List/ListHead.vue +30 -12
- package/components/List/ListQuickEdit.vue +198 -55
- package/components/List/ListTable.vue +138 -58
- package/components/Login.vue +14 -5
- package/components/MediaManager/MediaEditor.vue +253 -107
- package/components/MediaManager/MediaFolders.vue +125 -41
- package/components/MediaManager/MediaGallery.vue +56 -52
- package/components/MediaManager/MediaManager.vue +114 -74
- package/components/MediaManager/MediaManagerDialog.vue +19 -22
- package/components/MediaManager/MediaPreview.vue +180 -0
- package/components/MediaManager/MediaUploader.vue +35 -32
- package/components/SnackBar.vue +3 -4
- package/components/fields/DateField.vue +9 -3
- package/components/fields/FksField.vue +60 -0
- package/components/fields/MediaField.vue +24 -6
- package/components/fields/MediaM2mField.vue +8 -3
- package/components/fields/SeoPreview.vue +89 -0
- package/components/fields/{TinyMce → wygEditor}/defaults.js +1 -1
- package/components/fields/{TinyMce → wygEditor}/utils/events.js +0 -0
- package/components/fields/{TinyMce → wygEditor}/utils/mapomedia.plugin.js +0 -0
- package/components/fields/{TinyMce → wygEditor}/utils/script.injector.js +0 -0
- package/components/fields/{TinyMce/TinyMce.vue → wygEditor/wygEditor.vue} +40 -21
- package/components/layout/Sidebar/Sidebar.vue +46 -24
- package/components/layout/Sidebar/SidebarFooter.vue +42 -46
- package/components/layout/Sidebar/SidebarList.vue +13 -14
- package/components/layout/Sidebar/SidebarListItem.vue +81 -38
- package/components/layout/Topbar/Topbar.vue +3 -36
- package/components/layout/routebuilder.js +1 -1
- package/layouts/default.vue +3 -14
- package/package.json +3 -3
- package/pages/index.vue +0 -1
- package/components/fields/M2mField.vue +0 -95
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapomodule/uikit",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "This is part of Mapo nuxt module. Injects Mapo ui components in the nuxt component discovery system.",
|
|
6
6
|
"author": "bnznamco <gabriele.baldi.01@gmail.com>",
|
|
7
7
|
"repository": "https://github.com/lotrekagency/mapo",
|
|
8
8
|
"main": "./module.js",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@mapomodule/utils": "^1.0.0-alpha.
|
|
10
|
+
"@mapomodule/utils": "^1.0.0-alpha.9",
|
|
11
11
|
"@nuxtjs/vuetify": "^1.12.1"
|
|
12
12
|
},
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "a75142247a9371981aea57b76828bd354b375aea"
|
|
17
17
|
}
|
package/pages/index.vue
CHANGED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<v-checkbox
|
|
4
|
-
v-for="(option, index) in options"
|
|
5
|
-
:key="index"
|
|
6
|
-
:label="option[itemText]"
|
|
7
|
-
:input-value="isSelected(option)"
|
|
8
|
-
@change="changed($event, option)"
|
|
9
|
-
>
|
|
10
|
-
</v-checkbox>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
/**
|
|
16
|
-
* This component is made to simplify Many To Many associations. With this component you can modify an array selecting items from a list of checkboxes.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
name: "M2mField",
|
|
21
|
-
data() {
|
|
22
|
-
return {
|
|
23
|
-
proxyItems: []
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
props: {
|
|
27
|
-
// V-model property. It is the array to be modified.
|
|
28
|
-
value: {
|
|
29
|
-
type: Array,
|
|
30
|
-
required: true
|
|
31
|
-
},
|
|
32
|
-
// This is the array of options from which you can choose.
|
|
33
|
-
items: {
|
|
34
|
-
type: Array,
|
|
35
|
-
default: () => []
|
|
36
|
-
},
|
|
37
|
-
itemText: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: "text"
|
|
40
|
-
},
|
|
41
|
-
itemValue: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: "*"
|
|
44
|
-
},
|
|
45
|
-
lookup: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: "id"
|
|
48
|
-
},
|
|
49
|
-
endPoint: String,
|
|
50
|
-
mapping: {
|
|
51
|
-
type: Function,
|
|
52
|
-
default: items => items
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
computed: {
|
|
56
|
-
hasKey() {
|
|
57
|
-
return this.itemValue !== "*";
|
|
58
|
-
},
|
|
59
|
-
options() {
|
|
60
|
-
return this.mapping(this.proxyItems);
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
methods: {
|
|
64
|
-
isSelected(option) {
|
|
65
|
-
return !!(this.value || []).find(
|
|
66
|
-
e => e[this.lookup] == option[this.lookup]
|
|
67
|
-
);
|
|
68
|
-
},
|
|
69
|
-
changed(value, option) {
|
|
70
|
-
let val = this.hasKey ? option[this.itemValue] : option;
|
|
71
|
-
let newArr = [...(this.value || [])];
|
|
72
|
-
if (value) {
|
|
73
|
-
newArr.push(val);
|
|
74
|
-
} else {
|
|
75
|
-
let i = newArr.findIndex(e => e[this.lookup] == option[this.lookup]);
|
|
76
|
-
i !== -1 && newArr.splice(i, 1);
|
|
77
|
-
}
|
|
78
|
-
this.$emit("input", newArr);
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
watch: {
|
|
82
|
-
items(val) {
|
|
83
|
-
this.proxyItems = val;
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
mounted() {
|
|
87
|
-
if (this.endPoint && (!this.items || !this.items.length)) {
|
|
88
|
-
this.$mapo.$api
|
|
89
|
-
.crud(this.endPoint)
|
|
90
|
-
.list()
|
|
91
|
-
.then(res => (this.proxyItems = res));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
</script>
|