@sedoo/unidoo 0.0.76 → 0.0.77

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