@mapomodule/uikit 1.0.0-alpha.0 → 1.0.0-alpha.12

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +228 -0
  2. package/LICENSE.md +20 -0
  3. package/components/Detail/Detail.vue +209 -120
  4. package/components/Detail/DetailField.vue +57 -30
  5. package/components/Detail/DetailLangSwitch.vue +1 -1
  6. package/components/Detail/defaults.js +32 -25
  7. package/components/DropArea.vue +3 -3
  8. package/components/List/List.vue +100 -40
  9. package/components/List/ListActions.vue +56 -17
  10. package/components/List/ListFilters.vue +127 -113
  11. package/components/List/ListHead.vue +30 -12
  12. package/components/List/ListQuickEdit.vue +198 -55
  13. package/components/List/ListTable.vue +227 -78
  14. package/components/Login.vue +14 -5
  15. package/components/MediaManager/MediaEditor.vue +253 -107
  16. package/components/MediaManager/MediaFolders.vue +125 -41
  17. package/components/MediaManager/MediaGallery.vue +56 -52
  18. package/components/MediaManager/MediaManager.vue +114 -74
  19. package/components/MediaManager/MediaManagerDialog.vue +19 -22
  20. package/components/MediaManager/MediaPreview.vue +180 -0
  21. package/components/MediaManager/MediaUploader.vue +35 -32
  22. package/components/SnackBar.vue +3 -4
  23. package/components/fields/DateField.vue +9 -3
  24. package/components/fields/FileField.vue +108 -0
  25. package/components/fields/FksField.vue +60 -0
  26. package/components/fields/MediaField.vue +24 -6
  27. package/components/fields/MediaM2mField.vue +8 -3
  28. package/components/fields/SeoPreview.vue +89 -0
  29. package/components/fields/{TinyMce → wygEditor}/defaults.js +6 -4
  30. package/components/fields/{TinyMce → wygEditor}/utils/events.js +0 -0
  31. package/components/fields/{TinyMce → wygEditor}/utils/mapomedia.plugin.js +7 -6
  32. package/components/fields/{TinyMce → wygEditor}/utils/script.injector.js +0 -0
  33. package/components/fields/{TinyMce/TinyMce.vue → wygEditor/wygEditor.vue} +43 -21
  34. package/components/layout/Sidebar/Sidebar.vue +46 -24
  35. package/components/layout/Sidebar/SidebarFooter.vue +42 -46
  36. package/components/layout/Sidebar/SidebarList.vue +13 -14
  37. package/components/layout/Sidebar/SidebarListItem.vue +81 -38
  38. package/components/layout/Topbar/Topbar.vue +3 -36
  39. package/components/layout/routebuilder.js +1 -1
  40. package/defaults.js +2 -2
  41. package/layouts/default.vue +3 -14
  42. package/package.json +3 -3
  43. package/pages/index.vue +15 -78
  44. package/components/fields/M2mField.vue +0 -95
@@ -1,104 +1,172 @@
1
1
  <template>
2
2
  <div v-if="media">
3
- <div class="d-flex align-center justify-space-between">
4
- <v-btn class="ma-2" @click="close" icon>
5
- <v-icon>mdi-arrow-left</v-icon>
6
- </v-btn>
7
- <span class="subtitle-2">{{ fileName }}</span>
8
- <div></div>
9
- </div>
10
- <v-container class="px-6">
11
- <v-img
12
- :src="media.file"
13
- :lazy-src="media.thumbnail"
14
- max-height="300"
3
+ <v-container class="px-md-6">
4
+ <div class="img_overlay">
5
+ <v-btn class="img_overlay__button img_overlay__button--back" small icon @click="close">
6
+ <v-icon>mdi-arrow-left</v-icon>
7
+ </v-btn>
8
+ <v-btn class="img_overlay__button img_overlay__button--href" small icon :href="media.file" target="_blank" >
9
+ <v-icon>mdi-open-in-new</v-icon>
10
+ </v-btn>
11
+ </div>
12
+ <MediaPreview
13
+ :media="media"
14
+ height="400"
15
15
  contain
16
- aspect-ratio="1"
17
- class="grey lighten-2 mb-4 elevation-2"
18
- >
19
- <template v-slot:placeholder>
20
- <v-row class="fill-height ma-0" align="center" justify="center">
21
- <v-progress-circular
22
- indeterminate
23
- color="grey lighten-5"
24
- ></v-progress-circular>
25
- </v-row>
26
- </template>
27
- </v-img>
28
- <v-row class="flex-md-row-reverse">
29
- <v-col md="6" cols="12" class="info-media">
30
- <table class="text-caption fill-height pb-md-10">
31
- <tr>
32
- <td class="pr-3"><b>Filename:</b></td>
33
- <td>{{ fileName }}</td>
34
- </tr>
35
- <tr>
36
- <td class="pr-3"><b>Extension:</b></td>
37
- <td>{{ extension }}</td>
38
- </tr>
39
- <tr>
40
- <td class="pr-3"><b>Created:</b></td>
41
- <td>{{ dateCreated }}</td>
42
- </tr>
43
- <tr>
44
- <td class="pr-3"><b>Size:</b></td>
45
- <td>{{ fileSize }}</td>
46
- </tr>
47
- <tr>
48
- <td class="pr-3"><b>Url:</b></td>
49
- <td>
50
- <a :href="media.file" target="_blank">{{ media.file }}</a>
51
- </td>
52
- </tr>
53
- <tr>
54
- <td class="pr-3"><b>Linked models:</b></td>
55
- <td>{{ media.liks }}</td>
56
- </tr>
57
- </table>
58
- </v-col>
59
- <v-col md="6" cols="12">
60
- <v-row>
61
- <v-col sm="6" md="12" cols="12">
62
- <v-text-field
63
- dense
64
- v-model="media.name"
65
- label="Name"
66
- ></v-text-field>
67
- </v-col>
68
- <v-col sm="6" md="12" cols="12">
69
- <v-text-field
70
- dense
71
- v-model="media.title"
72
- label="Title"
73
- ></v-text-field>
74
- </v-col>
75
- <v-col sm="6" md="12" cols="12">
76
- <v-text-field
77
- dense
78
- v-model="media.description"
79
- label="Description"
80
- ></v-text-field>
81
- </v-col>
82
- <v-col sm="6" md="12" cols="12">
83
- <v-text-field
84
- dense
85
- v-model="media.alt_text"
86
- label="Alt name"
87
- ></v-text-field>
88
- </v-col>
89
- </v-row>
90
- <div class="d-flex justify-end">
91
- <v-btn text color="primary" @click="saveMedia">
92
- <v-icon left> mdi-upload </v-icon>
16
+ filename
17
+ media-controls
18
+ class="elevation-2"
19
+ />
20
+ <v-overlay
21
+ absolute
22
+ v-model="editing"
23
+ @click="editing = false"
24
+ ></v-overlay>
25
+ <div class="dialog">
26
+ <div class="dialog__container">
27
+ <v-card flat tile class="dialog__content overflow-y-auto"
28
+ :class="{ 'py-0': !editing }"
29
+ :max-height="editing ? height : '0px'"
30
+ >
31
+ <v-card-text class="flex-grow-0">
32
+ <v-row class="flex-md-row-reverse">
33
+ <v-col md="6" cols="12" class="info-media">
34
+ <table class="text-caption fill-height pb-md-10">
35
+ <tr>
36
+ <td class="pr-3"><b>Filename:</b></td>
37
+ <td>{{ fileName }}</td>
38
+ </tr>
39
+ <tr>
40
+ <td class="pr-3"><b>Mime type:</b></td>
41
+ <td>{{ media.mime_type }}</td>
42
+ </tr>
43
+ <tr>
44
+ <td class="pr-3"><b>Created:</b></td>
45
+ <td>{{ dateCreated }}</td>
46
+ </tr>
47
+ <tr>
48
+ <td class="pr-3"><b>Size:</b></td>
49
+ <td>{{ fileSize }}</td>
50
+ </tr>
51
+ <tr>
52
+ <td class="pr-3"><b>Url:</b></td>
53
+ <td>
54
+ <a :href="media.file" target="_blank">{{ media.file }}</a>
55
+ </td>
56
+ </tr>
57
+ <tr>
58
+ <td class="pr-3"><b>Linked models:</b></td>
59
+ <td>
60
+ <ul>
61
+ <li v-for="link in media.links" :key="link.id">
62
+ <b>{{link.model}} (id:{{link.id}})</b> - {{link.name}}
63
+ </li>
64
+ </ul>
65
+ </td>
66
+ </tr>
67
+ </table>
68
+ </v-col>
69
+ <v-col md="6" cols="12">
70
+ <v-row>
71
+ <v-col sm="6" md="12" cols="12">
72
+ <v-text-field
73
+ dense
74
+ v-model="media.name"
75
+ label="Name"
76
+ ></v-text-field>
77
+ </v-col>
78
+ <v-col sm="6" md="12" cols="12">
79
+ <v-text-field
80
+ dense
81
+ v-model="media.title"
82
+ label="Title"
83
+ ></v-text-field>
84
+ </v-col>
85
+ <v-col sm="6" md="12" cols="12">
86
+ <v-text-field
87
+ dense
88
+ v-model="media.description"
89
+ label="Description"
90
+ ></v-text-field>
91
+ </v-col>
92
+ <v-col sm="6" md="12" cols="12">
93
+ <v-text-field
94
+ dense
95
+ v-model="media.alt_text"
96
+ label="Alt name"
97
+ ></v-text-field>
98
+ </v-col>
99
+ <v-col sm="6" md="12" cols="12" class="d-flex align-center">
100
+ <div class="d-flex flex-column flex-grow-1">
101
+ <v-file-input
102
+ v-model="newFile"
103
+ :accept="accept"
104
+ label="New file"
105
+ show-size
106
+ dense
107
+ prepend-icon
108
+ ></v-file-input>
109
+ <v-checkbox
110
+ v-if="newFile"
111
+ v-model="sameUrl"
112
+ label="Maintain old url"
113
+ class="ma-0"
114
+ hide-details
115
+ dense
116
+ ></v-checkbox>
117
+ </div>
118
+ <v-img
119
+ v-if="newFile && newFilePreview"
120
+ :src="newFilePreview"
121
+ aspect-ratio="1"
122
+ min-width="70px"
123
+ max-width="110px"
124
+ class="grey lighten-2 ml-3"
125
+ >
126
+ <template v-slot:placeholder>
127
+ <v-row
128
+ class="fill-height ma-0"
129
+ align="center"
130
+ justify="center"
131
+ >
132
+ <v-progress-circular
133
+ indeterminate
134
+ color="grey lighten-5"
135
+ ></v-progress-circular>
136
+ </v-row>
137
+ </template>
138
+ </v-img>
139
+ </v-col>
140
+ </v-row>
141
+ </v-col>
142
+ </v-row>
143
+ </v-card-text>
144
+ </v-card>
145
+ <v-btn
146
+ tile
147
+ depressed
148
+ width="100%"
149
+ :class="{ 'pr-0': editing }"
150
+ @click="editing = !editing"
151
+ >
152
+ <span>Edit</span>
153
+ <v-icon :style="rotate">mdi-chevron-up</v-icon>
154
+ <div class="edit_spacer" :class="{ 'flex-grow-1': editing }"></div>
155
+ <v-btn v-if="editing" text tile color="primary" @click="saveMedia">
93
156
  save
94
157
  </v-btn>
95
- <v-btn text color="error" @click="deleteMedia">
96
- <v-icon left> mdi-delete </v-icon>
158
+ <v-btn
159
+ v-if="editing"
160
+ text
161
+ tile
162
+ color="error"
163
+ @click.stop="deleteMedia"
164
+ >
97
165
  delete
98
166
  </v-btn>
99
- </div>
100
- </v-col>
101
- </v-row>
167
+ </v-btn>
168
+ </div>
169
+ </div>
102
170
  </v-container>
103
171
  </div>
104
172
  </template>
@@ -106,6 +174,41 @@
106
174
  table tr td:nth-child(2) {
107
175
  overflow-wrap: anywhere;
108
176
  }
177
+ .dialog {
178
+ position: relative;
179
+ height: 56px;
180
+ z-index: 5;
181
+ &__container {
182
+ position: absolute;
183
+ bottom: 0;
184
+ width: 100%;
185
+ }
186
+ &__content {
187
+ transition-property: max-height, padding;
188
+ transition-duration: 0.3s;
189
+ transition-timing-function: ease-out;
190
+ }
191
+ }
192
+ .edit_spacer {
193
+ flex-grow: 0;
194
+ transition: flex-grow 0.3s ease-out;
195
+ }
196
+ .img_overlay {
197
+ position: relative;
198
+ &__button {
199
+ position: absolute;
200
+ z-index: 1;
201
+ color: #333333 !important;
202
+ background: #e0e0e096;
203
+ top: 10px;
204
+ &--back {
205
+ left: 10px;
206
+ }
207
+ &--href {
208
+ right: 10px;
209
+ }
210
+ }
211
+ }
109
212
  </style>
110
213
  <script>
111
214
  import { humanFileSize } from "@mapomodule/utils/helpers/formatters";
@@ -114,14 +217,17 @@ export default {
114
217
  name: "MediaEditor",
115
218
  data() {
116
219
  return {
117
- media: null
220
+ media: null,
221
+ editing: false,
222
+ newFile: null,
223
+ sameUrl: false,
118
224
  };
119
225
  },
120
226
  props: {
121
227
  value: {
122
228
  type: Object,
123
- default: () => null
124
- }
229
+ default: () => null,
230
+ },
125
231
  },
126
232
  computed: {
127
233
  fileSize() {
@@ -130,34 +236,74 @@ export default {
130
236
  dateCreated() {
131
237
  return this.media && new Date(this.media.created).toLocaleString();
132
238
  },
133
- extension() {
134
- return this.media && this.media.file && this.media.file.split(".").pop();
135
- },
136
239
  fileName() {
137
240
  return this.media && this.media.file && this.media.file.split("/").pop();
138
- }
241
+ },
242
+ rotate() {
243
+ return {
244
+ transform: this.editing ? "rotate(180deg)" : "rotate(0deg)",
245
+ transition: "transform .3s cubic-bezier(0.25, 0.8, 0.5, 1)",
246
+ };
247
+ },
248
+ height() {
249
+ switch (this.$vuetify.breakpoint.name) {
250
+ case "xs":
251
+ return "50vh";
252
+ default:
253
+ return 425;
254
+ }
255
+ },
256
+ accept(){
257
+ switch (this.media.mime_type && this.media.mime_type.split("/")[0]) {
258
+ case "image":
259
+ return "image/*"
260
+ case "video":
261
+ return "video/*"
262
+ case "audio":
263
+ return "audio/*"
264
+ default:
265
+ return "*"
266
+ }
267
+ },
268
+ newFilePreview() {
269
+ return this.newFile.type.startsWith("image/") ? URL.createObjectURL(this.newFile) : null;
270
+ },
139
271
  },
140
272
  watch: {
141
273
  value(val) {
142
274
  this.media = val;
143
- }
275
+ this.editing = false;
276
+ this.newFile = null;
277
+ this.sameUrl = false;
278
+ },
144
279
  },
145
280
  methods: {
146
281
  saveMedia() {
147
- this.$emit("updateMedia", this.media);
282
+ const media = {
283
+ id: this.media.id,
284
+ name: this.media.name,
285
+ title: this.media.title,
286
+ description: this.media.description,
287
+ alt_text: this.media.alt_text,
288
+ file: this.newFile || undefined,
289
+ same_url: (this.newFile && this.sameUrl) || undefined,
290
+ };
291
+ this.newFile = null;
292
+ this.sameUrl = false;
293
+ this.$emit("updateMedia", media);
148
294
  },
149
295
  deleteMedia() {
150
296
  this.$mapo.$confirm
151
297
  .open({
152
298
  title: "Delete",
153
299
  question: "Are you sure you want to delete this media?",
154
- approveButton: { text: "Delete", attrs: { color: "red" } }
300
+ approveButton: { text: "Delete", attrs: { color: "red", text: true } },
155
301
  })
156
- .then(res => res && this.$emit("deleteMedia", this.media));
302
+ .then((res) => res && this.$emit("deleteMedia", this.media));
157
303
  },
158
304
  close() {
159
305
  this.$emit("input", null);
160
- }
161
- }
306
+ },
307
+ },
162
308
  };
163
309
  </script>
@@ -1,33 +1,56 @@
1
1
  <template>
2
2
  <div>
3
+ <div v-if="parentFolders && parentFolders.length">
4
+ <span class="mx-2 mt-1 d-flex flex-wrap align-center">
5
+ <span class="mb-1">
6
+ <v-icon @click="goToFolder()" small>mdi-home</v-icon></span
7
+ >
8
+ <span class="fpath__button" v-for="(f, i) in parentFolders" :key="i"
9
+ >/<a @click="i !== parentFolders.length - 1 && goToFolder(f)">{{
10
+ f.slug
11
+ }}</a>
12
+ </span>
13
+ </span>
14
+ </div>
3
15
  <v-card-actions class="flex-wrap">
16
+ <div v-if="parentFolder" class="d-none d-sm-block">
17
+ <v-btn
18
+ class="px-2"
19
+ tile
20
+ block
21
+ text
22
+ depressed
23
+ @click="goToFolder(updirFolder)"
24
+ >
25
+ <v-icon> mdi-arrow-left </v-icon>
26
+ </v-btn>
27
+ </div>
4
28
  <div
5
29
  v-for="folder in folders"
6
30
  :key="folder.id"
7
- class="d-flex child-flex mx-2"
31
+ class="d-flex child-flex"
32
+ :class="{ 'mx-2': expanded }"
8
33
  >
9
- <div>
34
+ <div class="folder_grid d-flex flex-column" :class="{ expanded }">
10
35
  <v-icon @click.stop="goToFolder(folder)" :size="expanded ? 100 : 40">
11
36
  mdi-folder
12
37
  </v-icon>
13
38
 
14
39
  <div>
15
- <div class="d-flex" :style="hideSlug">
40
+ <div class="d-flex justify-item-center" :style="hideSlug">
16
41
  <span class="folder_slug">
17
- {{ folder.slug }}
42
+ {{ folder.title }}
18
43
  </span>
19
44
  <v-icon
20
- v-if="expanded"
21
45
  size="20"
22
- class="ma-0 ml-auto"
46
+ class="folder_grid__editicon ma-0 ml-auto"
23
47
  @click.stop="createFolder(folder)"
24
48
  >mdi-pencil</v-icon
25
49
  >
26
50
  <v-icon
27
51
  size="20"
28
- class="ma-0"
52
+ class="folder_grid__editicon ma-0"
29
53
  @click.stop="deleteFolder(folder)"
30
- v-if="expanded"
31
54
  >mdi-delete</v-icon
32
55
  >
33
56
  </div>
@@ -61,6 +84,13 @@
61
84
  </v-tooltip>
62
85
  </div>
63
86
  </v-card-actions>
87
+ <v-progress-linear
88
+ :active="loading"
89
+ indeterminate
90
+ height="2"
91
+ ></v-progress-linear>
92
+
93
+ <v-divider></v-divider>
64
94
  <v-dialog v-model="dialog" max-width="300px">
65
95
  <v-card>
66
96
  <v-card-title>
@@ -75,10 +105,6 @@
75
105
  v-model="folderEdit.title"
76
106
  label="Folder name"
77
107
  ></v-text-field>
78
- <v-text-field
79
- v-model="folderEdit.slug"
80
- label="Folder slug"
81
- ></v-text-field>
82
108
  </v-col>
83
109
  </v-row>
84
110
  </v-container>
@@ -86,20 +112,50 @@
86
112
 
87
113
  <v-card-actions>
88
114
  <v-spacer></v-spacer>
89
- <v-btn color="green darken-1" text @click="closeEdit"> Cancel </v-btn>
90
- <v-btn color="green darken-1" text @click="saveFolder"> Save </v-btn>
115
+ <v-btn color="primary" text @click="closeEdit"> Cancel </v-btn>
116
+ <v-btn color="primary" text @click="saveFolder"> Save </v-btn>
91
117
  </v-card-actions>
92
118
  </v-card>
93
119
  </v-dialog>
94
120
  </div>
95
121
  </template>
96
122
  <style lang="scss" scoped>
97
- .folder_slug {
98
- width: 65px;
99
- display: inline-block;
100
- white-space: nowrap;
101
- overflow: hidden;
102
- text-overflow: ellipsis;
123
+ .folder_grid {
124
+ .folder_slug {
125
+ width: 65px;
126
+ display: inline-block;
127
+ white-space: nowrap;
128
+ overflow: hidden;
129
+ text-overflow: ellipsis;
130
+ text-align: center;
131
+ line-height: 20px;
132
+ }
133
+ &__editicon {
134
+ display: none;
135
+ }
136
+ &.expanded {
137
+ .folder_slug {
138
+ text-align: left;
139
+ padding-left: 5px;
140
+ }
141
+ .folder_grid__editicon {
142
+ display: block;
143
+ }
144
+ }
145
+ }
146
+
147
+ .fpath__button {
148
+ padding-left: 7px;
149
+ color: grey;
150
+ a {
151
+ margin-left: 7px;
152
+ }
153
+ &:last-child {
154
+ a {
155
+ color: unset;
156
+ cursor: auto;
157
+ }
158
+ }
103
159
  }
104
160
  </style>
105
161
 
@@ -119,31 +175,15 @@ export default {
119
175
  ]
120
176
  };
121
177
  },
122
- computed: {
123
- rotate() {
124
- return {
125
- transform: this.expanded ? "rotate(180deg)" : "rotate(0deg)",
126
- transition: "transform .3s cubic-bezier(0.25, 0.8, 0.5, 1)"
127
- };
128
- },
129
- hideSlug() {
130
- return {
131
- maxWidth: this.expanded ? "105px" : "50px",
132
- maxHeight: this.expanded ? "24px" : "18px",
133
- opacity: this.expanded ? 0.8 : 0.8,
134
- transform: this.expanded ? "scale(1)" : "scale(0.7)",
135
- transition: "all .3s cubic-bezier(0.25, 0.8, 0.5, 1)"
136
- };
137
- }
138
- },
139
178
  props: {
179
+ loading: Boolean,
140
180
  folders: {
141
181
  type: Array,
142
182
  default: () => []
143
183
  },
144
- parentFolder: {
145
- type: Object,
146
- default: () => ({})
184
+ parentFolders: {
185
+ type: Array,
186
+ default: () => []
147
187
  }
148
188
  },
149
189
  methods: {
@@ -162,17 +202,61 @@ export default {
162
202
  .open({
163
203
  title: "Delete",
164
204
  question: "Are you sure to delelete this folder and all its content?",
165
- approveButton: { text: "Delete", attrs: { color: "red" } }
205
+ approveButton: { text: "Delete", attrs: { color: "red", text: true } }
166
206
  })
167
207
  .then(res => res && this.$emit("deleteFolder", folder));
168
208
  },
169
209
  saveFolder() {
210
+ this.folderEdit.slug = this.slugify(this.folderEdit.title);
170
211
  this.$emit("updateFolder", this.folderEdit);
171
212
  this.closeEdit();
172
213
  },
173
214
  closeEdit() {
174
215
  this.dialog = false;
175
216
  this.folderEdit = {};
217
+ },
218
+ slugify(text) {
219
+ return text
220
+ .toString()
221
+ .toLowerCase()
222
+ .replace(/\s+/g, "-") // Replace spaces with -
223
+ .replace(/[^\w\-]+/g, "") // Remove all non-word chars
224
+ .replace(/\-\-+/g, "-") // Replace multiple - with single -
225
+ .replace(/^-+/, "") // Trim - from start of text
226
+ .replace(/-+$/, ""); // Trim - from end of text
227
+ }
228
+ },
229
+ computed: {
230
+ rotate() {
231
+ return {
232
+ transform: this.expanded ? "rotate(180deg)" : "rotate(0deg)",
233
+ transition: "transform .3s cubic-bezier(0.25, 0.8, 0.5, 1)"
234
+ };
235
+ },
236
+ hideSlug() {
237
+ return {
238
+ maxWidth: this.expanded ? "105px" : "50px",
239
+ maxHeight: this.expanded ? "24px" : "18px",
240
+ opacity: this.expanded ? 0.8 : 0.8,
241
+ transform: this.expanded ? "scale(1)" : "scale(0.7)",
242
+ transition: "all .3s cubic-bezier(0.25, 0.8, 0.5, 1)"
243
+ };
244
+ },
245
+ parentFolder() {
246
+ return (
247
+ (this.parentFolders &&
248
+ this.parentFolders.length > 0 &&
249
+ this.parentFolders[this.parentFolders.length - 1]) ||
250
+ null
251
+ );
252
+ },
253
+ updirFolder() {
254
+ return (
255
+ (this.parentFolders &&
256
+ this.parentFolders.length > 1 &&
257
+ this.parentFolders[this.parentFolders.length - 2]) ||
258
+ null
259
+ );
176
260
  }
177
261
  }
178
262
  };