@mapomodule/uikit 1.0.0-alpha.17 → 1.0.0-alpha.18

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 CHANGED
@@ -3,6 +3,17 @@
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.18](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2022-04-04)
7
+
8
+
9
+ ### Features
10
+
11
+ * Filefield opens files in popup window ([96be24a](https://github.com/lotrekagency/mapo/commit/96be24ac032005575b01f572d0b3211d03f92229))
12
+
13
+
14
+
15
+
16
+
6
17
  # [1.0.0-alpha.17](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2022-04-03)
7
18
 
8
19
 
@@ -100,9 +100,7 @@ const initialData = () => ({
100
100
 
101
101
  export default {
102
102
  name: "MediaManager",
103
- data() {
104
- return initialData();
105
- },
103
+ data: initialData,
106
104
  props: {
107
105
  select: {
108
106
  type: String,
@@ -12,7 +12,7 @@
12
12
  v-show="message"
13
13
  class="filefield-current"
14
14
  ><b class="mr-1">Current:</b>
15
- <a :href="message" target="__blank">{{ message }}</a>
15
+ <a @click="openFile(message)">{{ message }}</a>
16
16
  <v-spacer></v-spacer>
17
17
  <v-icon @click="clear" class="mb-1" small>mdi-close</v-icon>
18
18
  </span>
@@ -100,9 +100,26 @@ export default {
100
100
  this.model = val;
101
101
  }
102
102
  },
103
+ openFile(url) {
104
+ const w = 700;
105
+ const h = 700;
106
+ const left = screen.width / 2 - w / 2;
107
+ const top = screen.height / 2 - h / 2;
108
+ window.open(
109
+ url,
110
+ url,
111
+ `width=${w},
112
+ height=${h},
113
+ top=${top},
114
+ left=${left}
115
+ `
116
+ );
117
+
118
+ return false;
119
+ },
103
120
  },
104
- created(){
121
+ created() {
105
122
  this.model = this.value;
106
- }
123
+ },
107
124
  };
108
125
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapomodule/uikit",
3
- "version": "1.0.0-alpha.17",
3
+ "version": "1.0.0-alpha.18",
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>",
@@ -14,5 +14,5 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
- "gitHead": "abd0d72a2d294acfde87af3a6f3fa3c19f100b30"
17
+ "gitHead": "1b05e625339b6ee6ed0e238739cc31fbd84f3397"
18
18
  }