@mapomodule/uikit 1.0.0-alpha.36 → 1.0.0-alpha.38
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 +53 -0
- package/components/Detail/Detail.vue +1 -1
- package/components/Detail/DetailLangSwitch.vue +5 -0
- package/components/Form/Form.vue +2 -2
- package/components/Form/FormField.vue +67 -51
- package/components/Form/FormGroup.vue +32 -2
- package/components/Form/FormTabs.vue +32 -1
- package/components/Form/fields/ColorField.vue +1 -1
- package/components/Form/fields/DateField.vue +2 -5
- package/components/Form/fields/FksField.vue +1 -1
- package/components/Form/fields/MediaField.vue +1 -1
- package/components/Form/fields/MediaM2mField.vue +8 -3
- package/components/Form/fields/wygEditor/defaults.js +20 -52
- package/components/Form/fields/wygEditor/wygEditor.vue +49 -20
- package/components/MediaManager/MediaBreadcrumbs.vue +3 -2
- package/components/MediaManager/MediaFolders.vue +2 -41
- package/components/MediaManager/MediaGallery.vue +12 -13
- package/components/MediaManager/MediaManager.vue +2 -1
- package/components/MediaManager/MediaPreview.vue +11 -0
- package/components/layout/Sidebar/Sidebar.vue +38 -10
- package/components/layout/Sidebar/SidebarList.vue +4 -6
- package/components/layout/Sidebar/SidebarListItem.vue +11 -0
- package/components/layout/Sidebar/SidebarTitle.vue +42 -0
- package/components/layout/Topbar/Topbar.vue +11 -10
- package/defaults/vuetify.js +7 -6
- package/package.json +2 -2
- package/pages/index.vue +19 -17
- package/static/{favicon.ico → mapo/favicon.ico} +0 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/content.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/skin.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +7 -0
- package/components/layout/Sidebar/SidebarFooter.vue +0 -52
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,59 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.38](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.37...v1.0.0-alpha.38) (2022-11-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* append color icon in color field ([7d17806](https://github.com/lotrekagency/mapo/commit/7d178067ccea0304df744c53f0b6142a54667f51))
|
|
12
|
+
* clear tinymce content on startup ([e8e3599](https://github.com/lotrekagency/mapo/commit/e8e35998fd56cb832493a7a2d54c941e8ecc2fe2))
|
|
13
|
+
* fix layout shift of media field after media selection ([b59e0f2](https://github.com/lotrekagency/mapo/commit/b59e0f26fee3b0b670d787dcb0b423690d389885))
|
|
14
|
+
* fix static resources base path ([ed8351d](https://github.com/lotrekagency/mapo/commit/ed8351d55f3c1cfee435faec4ebc684bb92a1e78))
|
|
15
|
+
* fix tinymce skin mapo-light menu hover color ([c176df8](https://github.com/lotrekagency/mapo/commit/c176df88616a8554231cd8f660d63a064595be3e))
|
|
16
|
+
* remove settings link ([d4be262](https://github.com/lotrekagency/mapo/commit/d4be262deb0c55fccda8de60adb7111a6136beed))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* added error state for wyg editor based on mapo field error state ([c1f2dbd](https://github.com/lotrekagency/mapo/commit/c1f2dbd2e2ed7308396a3497cfbe44cd072d6ee4))
|
|
22
|
+
* added error state to mapofield and reduced div nesting ([751ffeb](https://github.com/lotrekagency/mapo/commit/751ffeb40572d4755a467cacbbd9731d761651b7))
|
|
23
|
+
* added slots for sidebar and topbar ([7ac86e7](https://github.com/lotrekagency/mapo/commit/7ac86e7d71347bb0b57b7a175a887afa4c0030d7))
|
|
24
|
+
* auto hideDetails on fields without error messages ([7654bf3](https://github.com/lotrekagency/mapo/commit/7654bf3854224596587bdeb461c3dd1d11a6e1a3))
|
|
25
|
+
* tinymce better theming ([c1c5c88](https://github.com/lotrekagency/mapo/commit/c1c5c88d9e1b46dcc008491d55bb52ee4e7296e4))
|
|
26
|
+
* tinymce enhancements and theming ([5bb1168](https://github.com/lotrekagency/mapo/commit/5bb1168bcad8dcfc735a0ccf10f891a827520391))
|
|
27
|
+
* update style of form groups ([a4d9238](https://github.com/lotrekagency/mapo/commit/a4d9238625a19ba16ecf692069515c986ffcf615))
|
|
28
|
+
* update vuetify color scheme ([18aff8d](https://github.com/lotrekagency/mapo/commit/18aff8dc0de8c868e62f26df048a12dd97ef2f2b))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Performance Improvements
|
|
32
|
+
|
|
33
|
+
* decrease div nesting in forms ([537a59c](https://github.com/lotrekagency/mapo/commit/537a59c884dce7ae4d959724349956246c1fd680))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# [1.0.0-alpha.37](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.36...v1.0.0-alpha.37) (2022-11-14)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* better icon sizing for media m2m ([2c241f8](https://github.com/lotrekagency/mapo/commit/2c241f85ab5c0ccee772dd28beb4d917fbed9c97))
|
|
45
|
+
* fix gallery ui interface ([6570535](https://github.com/lotrekagency/mapo/commit/6570535dcd8a515c798eff5026ec781c52e06b7a))
|
|
46
|
+
* fix index layout ([7b15fcc](https://github.com/lotrekagency/mapo/commit/7b15fcc846b829555d7a0aa7b1f309f57107fd66))
|
|
47
|
+
* fixed fields init values ([23f1658](https://github.com/lotrekagency/mapo/commit/23f1658928dd5742125b01e997af6444d713144d))
|
|
48
|
+
* fixed media m2m readonly ([5fa3f80](https://github.com/lotrekagency/mapo/commit/5fa3f805a99f6b77910b35b46c688ff3b1292545))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
|
|
53
|
+
* better handle videow preview in mobile mode ([e3120f3](https://github.com/lotrekagency/mapo/commit/e3120f3652e5a53adf6b6b99059ce828fb8f9f03))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
6
59
|
# [1.0.0-alpha.36](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.35...v1.0.0-alpha.36) (2022-11-12)
|
|
7
60
|
|
|
8
61
|
|
package/components/Form/Form.vue
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</template>
|
|
50
50
|
</FormGroup>
|
|
51
51
|
|
|
52
|
-
<
|
|
52
|
+
<template v-else>
|
|
53
53
|
<slot :name="field.slotName + '.before'" v-bind="{ conf: field, ...slotBindings, }" />
|
|
54
54
|
<slot
|
|
55
55
|
:name="field.slotName"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
</FormField>
|
|
77
77
|
</slot>
|
|
78
78
|
<slot :name="field.slotName + '.after'" v-bind="{ conf: field, ...slotBindings, }" />
|
|
79
|
-
</
|
|
79
|
+
</template>
|
|
80
80
|
</div>
|
|
81
81
|
</div>
|
|
82
82
|
</template>
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
<component
|
|
3
|
+
class="mapo-field"
|
|
4
|
+
:class="classes"
|
|
5
|
+
:is="is"
|
|
6
|
+
v-model="model"
|
|
7
|
+
v-bind="fieldAttrs"
|
|
8
|
+
>
|
|
9
|
+
<template v-for="(_, slot) in $slots" :slot="slot">
|
|
10
|
+
<!-- @vuese-ignore -->
|
|
11
|
+
<slot :name="slot"></slot>
|
|
12
|
+
</template>
|
|
13
|
+
<template v-for="(_, slot) in $scopedSlots" v-slot:[slot]="props">
|
|
14
|
+
<!-- @vuese-ignore -->
|
|
15
|
+
<slot :name="slot" v-bind="props" />
|
|
16
|
+
</template>
|
|
17
|
+
</component>
|
|
15
18
|
</template>
|
|
16
19
|
|
|
17
|
-
<style>
|
|
18
|
-
.mapo-label {
|
|
19
|
-
display: none;
|
|
20
|
-
}
|
|
21
|
-
</style>
|
|
22
|
-
|
|
23
20
|
<script>
|
|
24
21
|
import wygEditor from "@mapomodule/uikit/components/Form/fields/wygEditor/wygEditor.vue";
|
|
25
22
|
import DateField from "@mapomodule/uikit/components/Form/fields/DateField.vue";
|
|
@@ -30,7 +27,7 @@ import EnhancedMediaField from "@mapomodule/uikit/components/Form/fields/Enhance
|
|
|
30
27
|
|
|
31
28
|
import SeoPreview from "@mapomodule/uikit/components/Form/fields/SeoPreview.vue";
|
|
32
29
|
import FileField from "@mapomodule/uikit/components/Form/fields/FileField.vue";
|
|
33
|
-
import Repeater from "@mapomodule/uikit/components/Form/fields/Repeater.vue"
|
|
30
|
+
import Repeater from "@mapomodule/uikit/components/Form/fields/Repeater.vue";
|
|
34
31
|
|
|
35
32
|
import { getPointed, setPointed } from "@mapomodule/utils/helpers/objHelpers";
|
|
36
33
|
import { titleCase } from "@mapomodule/utils/helpers/formatters";
|
|
@@ -81,9 +78,9 @@ export default {
|
|
|
81
78
|
},
|
|
82
79
|
langs: {
|
|
83
80
|
type: Array,
|
|
84
|
-
default: () => []
|
|
81
|
+
default: () => [],
|
|
85
82
|
},
|
|
86
|
-
currentLang: String
|
|
83
|
+
currentLang: String,
|
|
87
84
|
},
|
|
88
85
|
watch: {
|
|
89
86
|
value: {
|
|
@@ -107,42 +104,54 @@ export default {
|
|
|
107
104
|
debouncedSetValue: debounce(function (...args) {
|
|
108
105
|
this.setValue(...args);
|
|
109
106
|
}, 300),
|
|
110
|
-
setValue(val){
|
|
107
|
+
setValue(val) {
|
|
111
108
|
const dump = { ...this.value }; // since we cannot directly edit a prop
|
|
112
|
-
setPointed(
|
|
113
|
-
|
|
114
|
-
this.kpointed,
|
|
115
|
-
this.accessor.set({ model: dump, val })
|
|
116
|
-
);
|
|
117
|
-
if (typeof this.conf.onChange == "function")
|
|
109
|
+
setPointed(dump, this.kpointed, this.accessor.set({ model: dump, val }));
|
|
110
|
+
if (typeof this.conf.onChange == "function")
|
|
118
111
|
this.conf.onChange({
|
|
119
112
|
val,
|
|
120
113
|
model: dump,
|
|
121
114
|
currentLang: this.currentLang,
|
|
122
115
|
languages: this.langs,
|
|
123
116
|
conf: this.conf,
|
|
124
|
-
kpointed: this.kpointed
|
|
125
|
-
})
|
|
117
|
+
kpointed: this.kpointed,
|
|
118
|
+
});
|
|
126
119
|
|
|
127
120
|
// Fired when the v-model changes.
|
|
128
121
|
// @arg Emits the entire payload modified.
|
|
129
122
|
this.$emit("input", dump);
|
|
130
123
|
},
|
|
131
|
-
extractValue(val = this.value){
|
|
124
|
+
extractValue(val = this.value) {
|
|
132
125
|
return this.accessor.get({
|
|
133
126
|
model: { ...val },
|
|
134
127
|
val: getPointed({ ...val }, this.kpointed),
|
|
135
128
|
});
|
|
136
129
|
},
|
|
137
130
|
setModel(val = this.value) {
|
|
138
|
-
var model = this.extractValue(val)
|
|
131
|
+
var model = this.extractValue(val);
|
|
139
132
|
if (val && JSON.stringify(this.model) !== JSON.stringify(model))
|
|
140
133
|
this.model = model;
|
|
141
134
|
},
|
|
142
135
|
},
|
|
143
136
|
computed: {
|
|
144
|
-
|
|
145
|
-
|
|
137
|
+
classes() {
|
|
138
|
+
var upperClasses = this.fieldAttrs.class;
|
|
139
|
+
if (typeof upperClasses == "string") {
|
|
140
|
+
upperClasses = { [upperClasses]: true };
|
|
141
|
+
} else if (Array.isArray(upperClasses)) {
|
|
142
|
+
upperClasses = upperClasses.reduce(
|
|
143
|
+
(acc, next) => ({ ...acc, [next]: true }),
|
|
144
|
+
{}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
...upperClasses,
|
|
149
|
+
[`mapo-field-${this.conf.value}`]: true,
|
|
150
|
+
"mapo-field--has-errors": this.hasErrors,
|
|
151
|
+
};
|
|
152
|
+
},
|
|
153
|
+
kpointed() {
|
|
154
|
+
let kpointed = this.conf.value;
|
|
146
155
|
if (this.currentLang && !this.conf.synci18n) {
|
|
147
156
|
const base = `translations.${this.currentLang}`;
|
|
148
157
|
kpointed = kpointed ? `${base}.${kpointed}` : base;
|
|
@@ -160,21 +169,28 @@ export default {
|
|
|
160
169
|
...this.conf.accessor,
|
|
161
170
|
};
|
|
162
171
|
},
|
|
172
|
+
errorMessages() {
|
|
173
|
+
return this.kpointed
|
|
174
|
+
.split(".")
|
|
175
|
+
.map((_, i, a) => a.slice(0, i + 1).join("."))
|
|
176
|
+
.reduce((acc, next) => {
|
|
177
|
+
const error = getPointed(this.errors || {}, next, []);
|
|
178
|
+
if (Array.isArray(error)) {
|
|
179
|
+
acc = [...acc, ...error];
|
|
180
|
+
} else if (typeof error == "string") {
|
|
181
|
+
acc = [...acc, error];
|
|
182
|
+
}
|
|
183
|
+
return acc;
|
|
184
|
+
}, []);
|
|
185
|
+
},
|
|
186
|
+
hasErrors() {
|
|
187
|
+
return !!this.errorMessages.length;
|
|
188
|
+
},
|
|
163
189
|
fieldAttrs() {
|
|
164
190
|
return {
|
|
165
191
|
label: this.label,
|
|
166
|
-
errorMessages: this.
|
|
167
|
-
|
|
168
|
-
.map((_, i, a) => a.slice(0, i + 1).join("."))
|
|
169
|
-
.reduce((acc, next) => {
|
|
170
|
-
const error = getPointed(this.errors || {}, next, []);
|
|
171
|
-
if (Array.isArray(error)) {
|
|
172
|
-
acc = [...acc, ...error];
|
|
173
|
-
} else if (typeof error == "string") {
|
|
174
|
-
acc = [...acc, error];
|
|
175
|
-
}
|
|
176
|
-
return acc;
|
|
177
|
-
}, []),
|
|
192
|
+
errorMessages: this.errorMessages,
|
|
193
|
+
hideDetails: this.hasErrors,
|
|
178
194
|
...this.defaultAttrs.All,
|
|
179
195
|
...(this.defaultAttrs[
|
|
180
196
|
this.is.replace(/-./g, (x) => x[1].toUpperCase())
|
|
@@ -205,8 +221,8 @@ export default {
|
|
|
205
221
|
);
|
|
206
222
|
},
|
|
207
223
|
},
|
|
208
|
-
mounted(){
|
|
209
|
-
this.setModel()
|
|
210
|
-
}
|
|
224
|
+
mounted() {
|
|
225
|
+
this.setModel();
|
|
226
|
+
},
|
|
211
227
|
};
|
|
212
|
-
</script>
|
|
228
|
+
</script>
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-card v-if="conf" v-show="show(conf.group)" class="my-2 rounded-0 elevation-0 group-card">
|
|
3
|
-
<v-card-title :class="conf.group.titleClass">
|
|
3
|
+
<v-card-title class="text--secondary" :class="conf.group.titleClass">
|
|
4
4
|
<slot name="title.before" v-bind="slotBindings" />
|
|
5
5
|
<slot name="title" v-bind="slotBindings">
|
|
6
6
|
<v-icon left> {{ conf.group.icon }} </v-icon>
|
|
7
7
|
<span>{{ conf.group.name }}</span>
|
|
8
8
|
</slot>
|
|
9
9
|
<slot name="title.after" v-bind="slotBindings" />
|
|
10
|
+
<slot name="expandIcon" v-bind="slotBindings">
|
|
11
|
+
<v-icon class="expand-icon" :style="rotate" @click="expanded = !expanded"> mdi-chevron-up </v-icon>
|
|
12
|
+
</slot>
|
|
10
13
|
</v-card-title>
|
|
11
|
-
<div class="container">
|
|
14
|
+
<div v-if="expanded" class="container">
|
|
12
15
|
<Form
|
|
13
16
|
v-model="model"
|
|
14
17
|
v-bind="{ currentLang, errors, languages, readonly }"
|
|
@@ -29,9 +32,29 @@
|
|
|
29
32
|
</v-card>
|
|
30
33
|
</template>
|
|
31
34
|
<style lang="scss" scoped>
|
|
35
|
+
.expand-icon{
|
|
36
|
+
margin: 0 0 0 auto;
|
|
37
|
+
}
|
|
32
38
|
.theme--light .group-card {
|
|
33
39
|
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
34
40
|
}
|
|
41
|
+
.group-card .v-card__title{
|
|
42
|
+
padding: 6px 16px;
|
|
43
|
+
background: #0000002b;
|
|
44
|
+
position: relative;
|
|
45
|
+
&::after{
|
|
46
|
+
content: '';
|
|
47
|
+
position: absolute;
|
|
48
|
+
background: var(--v-primary-base);
|
|
49
|
+
height: 100%;
|
|
50
|
+
width: 4px;
|
|
51
|
+
left: 0;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
.theme--light .v-card__title{
|
|
55
|
+
background: #ffffff;
|
|
56
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
|
|
57
|
+
}
|
|
35
58
|
</style>
|
|
36
59
|
<script>
|
|
37
60
|
export default {
|
|
@@ -39,6 +62,7 @@ export default {
|
|
|
39
62
|
data() {
|
|
40
63
|
return {
|
|
41
64
|
model: {},
|
|
65
|
+
expanded: true
|
|
42
66
|
};
|
|
43
67
|
},
|
|
44
68
|
props: {
|
|
@@ -88,6 +112,12 @@ export default {
|
|
|
88
112
|
...this.moreSlotBindings,
|
|
89
113
|
};
|
|
90
114
|
},
|
|
115
|
+
rotate() {
|
|
116
|
+
return {
|
|
117
|
+
transform: this.expanded ? "rotate(180deg)" : "rotate(0deg)",
|
|
118
|
+
transition: "transform 225ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
119
|
+
};
|
|
120
|
+
},
|
|
91
121
|
},
|
|
92
122
|
methods: {
|
|
93
123
|
show(conf, type = "display"){
|
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
<span>{{ conf.group.name }}</span>
|
|
8
8
|
</slot>
|
|
9
9
|
<slot name="title.after" v-bind="slotBindings" />
|
|
10
|
+
<slot name="expandIcon" v-bind="slotBindings">
|
|
11
|
+
<v-icon class="expand-icon" :style="rotate" @click="expanded = !expanded"> mdi-chevron-up </v-icon>
|
|
12
|
+
</slot>
|
|
10
13
|
</v-card-title>
|
|
11
|
-
<div class="container">
|
|
14
|
+
<div v-if="expanded" class="container">
|
|
12
15
|
<v-tabs v-model="tabIndex" class="tab-wrapper">
|
|
13
16
|
<v-tab v-for="(tab, index) in conf.tabs" :key="index" v-show="show(tab)">
|
|
14
17
|
<v-badge :value="hasErrors(tab)" color="error" dot>
|
|
@@ -50,12 +53,33 @@
|
|
|
50
53
|
</template>
|
|
51
54
|
|
|
52
55
|
<style lang="scss" scoped>
|
|
56
|
+
.expand-icon{
|
|
57
|
+
margin: 0 0 0 auto;
|
|
58
|
+
}
|
|
53
59
|
.tab-wrapper {
|
|
54
60
|
margin: -12px 0 0 -12px;
|
|
55
61
|
}
|
|
56
62
|
.theme--light .tabs-card {
|
|
57
63
|
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
58
64
|
}
|
|
65
|
+
.tabs-card .v-card__title{
|
|
66
|
+
padding: 6px 16px;
|
|
67
|
+
background: #0000002b;
|
|
68
|
+
position: relative;
|
|
69
|
+
&::after{
|
|
70
|
+
content: '';
|
|
71
|
+
position: absolute;
|
|
72
|
+
background: var(--v-primary-base);
|
|
73
|
+
height: 100%;
|
|
74
|
+
width: 4px;
|
|
75
|
+
left: 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.theme--light .v-card__title{
|
|
79
|
+
background: #ffffff;
|
|
80
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
|
|
81
|
+
}
|
|
82
|
+
|
|
59
83
|
</style>
|
|
60
84
|
<script>
|
|
61
85
|
import { findPropPaths } from "@mapomodule/utils/helpers/objHelpers";
|
|
@@ -67,6 +91,7 @@ export default {
|
|
|
67
91
|
return {
|
|
68
92
|
model: {},
|
|
69
93
|
tabIndex: 0,
|
|
94
|
+
expanded: true,
|
|
70
95
|
};
|
|
71
96
|
},
|
|
72
97
|
props: {
|
|
@@ -125,6 +150,12 @@ export default {
|
|
|
125
150
|
this.conf.group.icon
|
|
126
151
|
);
|
|
127
152
|
},
|
|
153
|
+
rotate() {
|
|
154
|
+
return {
|
|
155
|
+
transform: this.expanded ? "rotate(180deg)" : "rotate(0deg)",
|
|
156
|
+
transition: "transform 225ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
157
|
+
};
|
|
158
|
+
},
|
|
128
159
|
},
|
|
129
160
|
methods: {
|
|
130
161
|
nameSpacedSlots,
|
|
@@ -36,7 +36,7 @@ export default {
|
|
|
36
36
|
name: "DateField",
|
|
37
37
|
data() {
|
|
38
38
|
return {
|
|
39
|
-
model:
|
|
39
|
+
model: this.value,
|
|
40
40
|
menu: null,
|
|
41
41
|
};
|
|
42
42
|
},
|
|
@@ -66,9 +66,6 @@ export default {
|
|
|
66
66
|
//@arg Emits the date or the date range edited.
|
|
67
67
|
this.$emit("input", val);
|
|
68
68
|
},
|
|
69
|
-
}
|
|
70
|
-
mounted() {
|
|
71
|
-
this.model = this.value;
|
|
72
|
-
},
|
|
69
|
+
}
|
|
73
70
|
};
|
|
74
71
|
</script>
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<v-text-field
|
|
4
4
|
readonly
|
|
5
5
|
v-bind="$attrs"
|
|
6
|
-
@click="
|
|
6
|
+
@click="hasSelection || editSelection()"
|
|
7
7
|
class="media-m2m--card rounded-0"
|
|
8
8
|
:class="{ 'media-m2m--selected': !!hasSelection }"
|
|
9
9
|
:value="hasSelection ? ' ' : ''"
|
|
10
10
|
>
|
|
11
11
|
<template v-slot:append>
|
|
12
|
-
<v-btn v-if="hasSelection" @click="
|
|
12
|
+
<v-btn v-if="hasSelection" @click="editSelection" tile small>{{
|
|
13
13
|
$t("mapo.mediaM2MField.editSelection")
|
|
14
14
|
}}</v-btn>
|
|
15
15
|
<v-virtual-scroll
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
:media="item"
|
|
27
27
|
:video-preview="!item.is_image"
|
|
28
28
|
class="media-m2m--preview"
|
|
29
|
+
icon-size="30"
|
|
29
30
|
/>
|
|
30
31
|
</v-list-item-avatar>
|
|
31
32
|
|
|
@@ -95,7 +96,7 @@
|
|
|
95
96
|
import { humanFileSize } from "@mapomodule/utils/helpers/formatters";
|
|
96
97
|
|
|
97
98
|
/**
|
|
98
|
-
* This component is made to
|
|
99
|
+
* This component is made to manage media fields for multiple selection.
|
|
99
100
|
*/
|
|
100
101
|
|
|
101
102
|
export default {
|
|
@@ -126,6 +127,10 @@ export default {
|
|
|
126
127
|
removeItem(media) {
|
|
127
128
|
this.model = this.model.filter(({ id }) => id != media.id);
|
|
128
129
|
},
|
|
130
|
+
editSelection(){
|
|
131
|
+
if (!this.readonly)
|
|
132
|
+
this.dialog = true;
|
|
133
|
+
}
|
|
129
134
|
},
|
|
130
135
|
watch: {
|
|
131
136
|
value(val) {
|
|
@@ -1,57 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export default ({ isDark, base }) => ({
|
|
2
|
+
plugins: "mapomedia preview paste importcss searchreplace autolink directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount textpattern noneditable help charmap quickbars emoticons",
|
|
3
|
+
menubar: "file edit view insert format tools table help",
|
|
4
|
+
menu: {
|
|
5
|
+
insert: {
|
|
6
|
+
title: "Insert",
|
|
7
|
+
items: "link mapomedia media template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor | insertdatetime",
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
toolbar: "undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview | mapomedia media template link anchor codesample | ltr rtl",
|
|
9
11
|
toolbar_sticky: true,
|
|
10
12
|
image_advtab: true,
|
|
11
|
-
// link_list: [
|
|
12
|
-
// { title: 'My page 1', value: 'https://www.tiny.cloud' },
|
|
13
|
-
// { title: 'My page 2', value: 'http://www.moxiecode.com' }
|
|
14
|
-
// ],
|
|
15
|
-
// image_list: [
|
|
16
|
-
// { title: 'My page 1', value: 'https://www.tiny.cloud' },
|
|
17
|
-
// { title: 'My page 2', value: 'http://www.moxiecode.com' }
|
|
18
|
-
// ],
|
|
19
|
-
// image_class_list: [
|
|
20
|
-
// { title: 'None', value: '' },
|
|
21
|
-
// { title: 'Some class', value: 'class-name' }
|
|
22
|
-
// ],
|
|
23
13
|
importcss_append: true,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// if (meta.filetype === 'file') {
|
|
27
|
-
// callback('https://www.google.com/logos/google.jpg', { text: 'My text' });
|
|
28
|
-
// }
|
|
29
|
-
|
|
30
|
-
// /* Provide image and alt text for the image dialog */
|
|
31
|
-
// if (meta.filetype === 'image') {
|
|
32
|
-
// callback('https://www.google.com/logos/google.jpg', { alt: 'My alt text' });
|
|
33
|
-
// }
|
|
34
|
-
|
|
35
|
-
// /* Provide alternative source and posted for the media dialog */
|
|
36
|
-
// if (meta.filetype === 'media') {
|
|
37
|
-
// callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.google.com/logos/google.jpg' });
|
|
38
|
-
// }
|
|
39
|
-
// },
|
|
40
|
-
// templates: [
|
|
41
|
-
// { title: 'New Table', description: 'creates a new table', content: '<div class="mceTmpl"><table width="98%%" border="0" cellspacing="0" cellpadding="0"><tr><th scope="col"> </th><th scope="col"> </th></tr><tr><td> </td><td> </td></tr></table></div>' },
|
|
42
|
-
// { title: 'Starting my story', description: 'A cure for writers block', content: 'Once upon a time...' },
|
|
43
|
-
// { title: 'New list with dates', description: 'New List with dates', content: '<div class="mceTmpl"><span class="cdate">cdate</span><br /><span class="mdate">mdate</span><h2>My List</h2><ul><li></li><li></li></ul></div>' }
|
|
44
|
-
// ],
|
|
45
|
-
template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]',
|
|
46
|
-
template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]',
|
|
14
|
+
template_cdate_format: "[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]",
|
|
15
|
+
template_mdate_format: "[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]",
|
|
47
16
|
height: 400,
|
|
48
17
|
image_caption: true,
|
|
49
|
-
quickbars_insert_toolbar:
|
|
50
|
-
quickbars_selection_toolbar:
|
|
51
|
-
noneditable_noneditable_class:
|
|
52
|
-
toolbar_mode:
|
|
53
|
-
contextmenu:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
18
|
+
quickbars_insert_toolbar: "mapomedia quicktable",
|
|
19
|
+
quickbars_selection_toolbar: "bold italic | quicklink h2 h3 blockquote mapomedia quicktable",
|
|
20
|
+
noneditable_noneditable_class: "mceNonEditable",
|
|
21
|
+
toolbar_mode: "sliding",
|
|
22
|
+
contextmenu: "link mapomedia table",
|
|
23
|
+
skin_url: isDark ? `${base}mapo/tinymce-skins/mapo-dark` : `${base}mapo/tinymce-skins/mapo-light`,
|
|
24
|
+
content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }",
|
|
25
|
+
});
|