@sedoo/unidoo 0.0.76 → 0.0.79

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sedoo/unidoo",
3
- "version": "0.0.76",
3
+ "version": "0.0.79",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build --target lib --name unidoo src/plugin.js",
@@ -1,25 +1,39 @@
1
1
  <template>
2
- <v-col style="position: relative">
3
- <div level-selector >
4
-
5
- <level-selector
6
- v-model="entries"
7
- :data="data"
8
- ></level-selector>
9
-
10
- </div>
11
-
12
- <unidoo-simple-player
13
- constrained
14
- :label="label"
15
- :entries="entries"
16
- >
17
- <template v-slot:customField>
18
- <slot name="customField"></slot>
19
- </template>
20
- </unidoo-simple-player>
21
-
22
- </v-col>
2
+ <div>
3
+ <v-col container>
4
+ <div level-selector >
5
+
6
+ <level-selector
7
+ v-model="entries"
8
+ :data="data"
9
+ ></level-selector>
10
+
11
+ </div>
12
+
13
+ <unidoo-simple-player
14
+ v-if="hasData"
15
+ class="constrained"
16
+ :label="label"
17
+ :entries="entries"
18
+ >
19
+
20
+ <template v-slot:customField>
21
+ <slot name="customField"></slot>
22
+ </template>
23
+
24
+ </unidoo-simple-player>
25
+
26
+ <div v-else-if="noVisibleData" class="constrained placeholder">
27
+ <div style="position: absolute; top: 0; left: 0;"><slot name="customField"></slot></div><b>{{ noVisibleDataMessage }}</b>
28
+ </div>
29
+
30
+ <div v-else class="constrained placeholder">
31
+ <div style="position: absolute; top: 0; left: 0;"><slot name="customField"></slot></div><b>{{ noDataMessage }}</b>
32
+ </div>
33
+
34
+ <div v-if="isLoading" mask></div>
35
+ </v-col>
36
+ </div>
23
37
  </template>
24
38
 
25
39
  <script>
@@ -32,10 +46,29 @@ export default {
32
46
  default: 'frame'
33
47
  },
34
48
 
35
-
36
49
  data:{
37
50
  type: Object,
38
51
  default: () => null
52
+ },
53
+
54
+ noVisibleData:{
55
+ type: Boolean,
56
+ default: false
57
+ },
58
+
59
+ noDataMessage:{
60
+ type: String,
61
+ default: "No available data"
62
+ },
63
+
64
+ noVisibleDataMessage:{
65
+ type: String,
66
+ default: "Existing data, no quicklook available"
67
+ },
68
+
69
+ isLoading:{
70
+ type: Boolean,
71
+ default: false
39
72
  }
40
73
  },
41
74
 
@@ -45,18 +78,40 @@ export default {
45
78
 
46
79
  computed:{
47
80
  hasData(){
48
- return (this.data && this.data.entries && this.data.entries.length);
81
+ return this.data && this.data.entries && this.data.entries.length;
49
82
  },
50
83
  }
51
84
 
52
85
  }
53
86
  </script>
54
87
  <style scoped>
55
- [constrained] {
56
- display: block;
88
+ [container]{
89
+ position: relative;
90
+ }
91
+
92
+ .constrained {
93
+ position: relative;
94
+ min-height: 15vh;
95
+ }
96
+
97
+ .placeholder{
98
+ display: flex;
99
+ justify-content: center;
100
+ align-items: center;
101
+ width: 100%;
57
102
  }
58
103
 
59
104
  [level-selector]{
60
105
  margin: 0 10px;
61
106
  }
107
+
108
+ [mask]{
109
+ position: absolute;
110
+ top: 0;
111
+ bottom: 0;
112
+ left: 0;
113
+ right: 0;
114
+ opacity: 0.5;
115
+ background: white;
116
+ }
62
117
  </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div selector>
3
- <v-col level-selector v-if="levels && data">
3
+ <v-col level-selector v-if="levels">
4
4
 
5
5
  <div style="display: flex; flex-wrap: wrap; margin: 0 -12px;" v-for="(key) in levelKeys"
6
6
  :key="key"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div root>
2
+ <div>
3
3
 
4
4
  <div player-layout elevation="0" :class="{ zoomed: isZoomed }">
5
5
 
@@ -155,8 +155,8 @@ export default {
155
155
  },
156
156
 
157
157
  subBodyStyle(){
158
- const vh = (this.isZoomed) ? '72vh' : '40vh';
159
- return { gridTemplateRows: ((this.playerBarTop) ? '10px 140px 10px ' + vh + ' 10px' : '10px ' + vh + ' 10px 140px 10px')};
158
+ const vh = (this.isZoomed) ? '75vh' : '43vh';
159
+ return { gridTemplateRows: ((this.playerBarTop) ? '10px 120px 10px ' + vh + ' 10px' : '10px ' + vh + ' 10px 120px 10px')};
160
160
  }
161
161
 
162
162
  },