@mapomodule/uikit 1.0.0-alpha.36 → 1.0.0-alpha.37
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 +20 -0
- package/components/Form/fields/DateField.vue +2 -5
- package/components/Form/fields/FksField.vue +1 -1
- package/components/Form/fields/MediaM2mField.vue +8 -3
- package/components/Form/fields/wygEditor/wygEditor.vue +1 -1
- package/components/MediaManager/MediaGallery.vue +12 -13
- package/components/MediaManager/MediaManager.vue +2 -1
- package/components/MediaManager/MediaPreview.vue +11 -0
- package/package.json +2 -2
- package/pages/index.vue +19 -17
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
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.37](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.36...v1.0.0-alpha.37) (2022-11-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* better icon sizing for media m2m ([2c241f8](https://github.com/lotrekagency/mapo/commit/2c241f85ab5c0ccee772dd28beb4d917fbed9c97))
|
|
12
|
+
* fix gallery ui interface ([6570535](https://github.com/lotrekagency/mapo/commit/6570535dcd8a515c798eff5026ec781c52e06b7a))
|
|
13
|
+
* fix index layout ([7b15fcc](https://github.com/lotrekagency/mapo/commit/7b15fcc846b829555d7a0aa7b1f309f57107fd66))
|
|
14
|
+
* fixed fields init values ([23f1658](https://github.com/lotrekagency/mapo/commit/23f1658928dd5742125b01e997af6444d713144d))
|
|
15
|
+
* fixed media m2m readonly ([5fa3f80](https://github.com/lotrekagency/mapo/commit/5fa3f805a99f6b77910b35b46c688ff3b1292545))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* better handle videow preview in mobile mode ([e3120f3](https://github.com/lotrekagency/mapo/commit/e3120f3652e5a53adf6b6b99059ce828fb8f9f03))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# [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
27
|
|
|
8
28
|
|
|
@@ -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) {
|
|
@@ -10,18 +10,7 @@
|
|
|
10
10
|
class="elevation-4 media-gallery--selection-item"
|
|
11
11
|
/>
|
|
12
12
|
</div>
|
|
13
|
-
<div class="media-gallery--
|
|
14
|
-
<v-progress-circular
|
|
15
|
-
size="60"
|
|
16
|
-
color="primary"
|
|
17
|
-
indeterminate
|
|
18
|
-
></v-progress-circular>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="media-gallery--empty" v-else-if="!medias.length">
|
|
21
|
-
<v-icon size="60"> mdi-image-off-outline </v-icon>
|
|
22
|
-
<p>{{ $t("mapo.mediaGallery.noMediaFound") }}</p>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="media-gallery--masonry" v-else>
|
|
13
|
+
<div ref="masonry" class="media-gallery--masonry" v-if="medias.length">
|
|
25
14
|
<div
|
|
26
15
|
v-for="media in medias"
|
|
27
16
|
:key="media.file"
|
|
@@ -48,6 +37,14 @@
|
|
|
48
37
|
/>
|
|
49
38
|
</div>
|
|
50
39
|
</div>
|
|
40
|
+
<div class="media-gallery--loading" v-else-if="loading">
|
|
41
|
+
<v-icon size="30">mdi-timer-sand</v-icon>
|
|
42
|
+
{{ $t('mapo.fetchingData') }}
|
|
43
|
+
</div>
|
|
44
|
+
<div class="media-gallery--empty" v-else>
|
|
45
|
+
<v-icon size="60"> mdi-image-off-outline </v-icon>
|
|
46
|
+
<p>{{ $t("mapo.mediaGallery.noMediaFound") }}</p>
|
|
47
|
+
</div>
|
|
51
48
|
<v-pagination
|
|
52
49
|
class="mt-2"
|
|
53
50
|
v-if="pages > 1"
|
|
@@ -178,7 +175,9 @@ export default {
|
|
|
178
175
|
return this.page;
|
|
179
176
|
},
|
|
180
177
|
set(val) {
|
|
181
|
-
this.getRoot({ page: val })
|
|
178
|
+
this.getRoot({ page: val }).then(() => {
|
|
179
|
+
this.$refs.masonry?.scrollTo({ top: 0, behavior: "smooth" })
|
|
180
|
+
})
|
|
182
181
|
},
|
|
183
182
|
},
|
|
184
183
|
},
|
|
@@ -29,13 +29,14 @@
|
|
|
29
29
|
dense
|
|
30
30
|
clearable
|
|
31
31
|
:loading="loadingSearch"
|
|
32
|
-
class="mx-2 mt-2"
|
|
32
|
+
class="mx-2 mt-2 rounded-0"
|
|
33
33
|
></v-text-field>
|
|
34
34
|
<v-btn v-show="!$vuetify.breakpoint.xs" class="ma-2 ml-0" @click="getRoot" icon>
|
|
35
35
|
<v-icon>mdi-update</v-icon>
|
|
36
36
|
</v-btn>
|
|
37
37
|
</div>
|
|
38
38
|
</v-card-title>
|
|
39
|
+
<v-progress-linear v-if="loading" indeterminate></v-progress-linear>
|
|
39
40
|
<MediaBreadcrumbs/>
|
|
40
41
|
<v-card-text class="media-manager--card-text pa-0">
|
|
41
42
|
<v-tabs-items touchless v-model="tab" class="transparent fill-height">
|
|
@@ -162,11 +162,22 @@ export default {
|
|
|
162
162
|
return {
|
|
163
163
|
mouseenter: this.startVideoPreview,
|
|
164
164
|
mouseleave: this.stopVideoPreview,
|
|
165
|
+
touchstart: this.handleTouch
|
|
165
166
|
};
|
|
166
167
|
}
|
|
167
168
|
},
|
|
168
169
|
},
|
|
169
170
|
methods: {
|
|
171
|
+
handleTouch(event){
|
|
172
|
+
const video = this.$refs.video;
|
|
173
|
+
if (video && !this.playing) {
|
|
174
|
+
this.startVideoPreview()
|
|
175
|
+
event.preventDefault()
|
|
176
|
+
event.stopPropagation()
|
|
177
|
+
} else {
|
|
178
|
+
this.stopVideoPreview()
|
|
179
|
+
}
|
|
180
|
+
},
|
|
170
181
|
startVideoPreview() {
|
|
171
182
|
const video = this.$refs.video;
|
|
172
183
|
if (video && !this.playing) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapomodule/uikit",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.37",
|
|
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>",
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "0b662c6cdd42bc868259cd2b37f208d5fc72e239"
|
|
19
19
|
}
|
package/pages/index.vue
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-
|
|
3
|
-
<v-
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
<v-container>
|
|
3
|
+
<v-row justify="center" align="center">
|
|
4
|
+
<v-col cols="12" sm="8" md="12">
|
|
5
|
+
<div class="mapo-info">
|
|
6
|
+
<h1 id="mapo">
|
|
7
|
+
<code>mapomodule {{ version }}</code>
|
|
8
|
+
</h1>
|
|
9
|
+
<br>
|
|
10
|
+
<br>
|
|
11
|
+
<code>{{ $t('mapo.index.welcomeMessage') }}</code>
|
|
12
|
+
<br>
|
|
13
|
+
<br>
|
|
14
|
+
<code>
|
|
15
|
+
## TODO INSERT HERE A LITTLE TUTORIAL.
|
|
16
|
+
</code>
|
|
17
|
+
</div>
|
|
18
|
+
</v-col>
|
|
19
|
+
</v-row>
|
|
20
|
+
</v-container>
|
|
19
21
|
</template>
|
|
20
22
|
|
|
21
23
|
<style scoped>
|