@mapomodule/uikit 1.0.0-alpha.8 → 1.0.0

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 (230) hide show
  1. package/CHANGELOG.md +871 -0
  2. package/components/ConfirmDialog.vue +58 -37
  3. package/components/Detail/Detail.vue +415 -285
  4. package/components/Detail/DetailLangSwitch.vue +8 -1
  5. package/components/DropArea.vue +62 -55
  6. package/components/Form/Form.vue +218 -0
  7. package/components/Form/FormField.vue +216 -0
  8. package/components/Form/FormGroup.vue +146 -0
  9. package/components/Form/FormTabs.vue +188 -0
  10. package/components/Form/defaults.js +98 -0
  11. package/components/Form/fields/ColorField.vue +79 -0
  12. package/components/{fields → Form/fields}/DateField.vue +12 -8
  13. package/components/Form/fields/DateTimeField.vue +271 -0
  14. package/components/Form/fields/EnhancedMediaField.vue +224 -0
  15. package/components/Form/fields/FileField.vue +125 -0
  16. package/components/Form/fields/FksField.vue +115 -0
  17. package/components/Form/fields/MediaField.vue +159 -0
  18. package/components/Form/fields/MediaM2mField.vue +149 -0
  19. package/components/Form/fields/Repeater.vue +618 -0
  20. package/components/{fields → Form/fields}/SeoPreview.vue +10 -10
  21. package/components/Form/fields/TimeField.vue +154 -0
  22. package/components/Form/fields/mapField/leaflet.injector.js +39 -0
  23. package/components/Form/fields/mapField/mapField.vue +350 -0
  24. package/components/Form/fields/wygEditor/defaults.js +25 -0
  25. package/components/{fields → Form/fields}/wygEditor/utils/mapomedia.plugin.js +7 -6
  26. package/components/{fields → Form/fields}/wygEditor/wygEditor.vue +114 -25
  27. package/components/Form/fields/wygEditorCKE/defaults.js +103 -0
  28. package/components/Form/fields/wygEditorCKE/utils/ckeditor.injector.js +29 -0
  29. package/components/Form/fields/wygEditorCKE/wygEditorCKE.vue +270 -0
  30. package/components/LangSwitcher.vue +44 -0
  31. package/components/List/List.vue +34 -17
  32. package/components/List/ListActions.vue +5 -5
  33. package/components/List/ListFilters.vue +48 -10
  34. package/components/List/ListHead.vue +1 -1
  35. package/components/List/ListQuickEdit.vue +28 -102
  36. package/components/List/ListTable.vue +89 -11
  37. package/components/Login.vue +5 -4
  38. package/components/LogoutButton.vue +43 -28
  39. package/components/MediaManager/MediaBreadcrumbs.vue +45 -0
  40. package/components/MediaManager/MediaEditor.vue +226 -195
  41. package/components/MediaManager/MediaFileChanger.vue +78 -0
  42. package/components/MediaManager/MediaFolders.vue +207 -183
  43. package/components/MediaManager/MediaGallery.vue +212 -137
  44. package/components/MediaManager/MediaManager.vue +97 -171
  45. package/components/MediaManager/MediaManagerDialog.vue +28 -20
  46. package/components/MediaManager/MediaPreview.vue +89 -11
  47. package/components/MediaManager/MediaUploader.vue +75 -77
  48. package/components/MenuManager/MenuManager.vue +332 -0
  49. package/components/MenuManager/MenuNodeEditor.vue +270 -0
  50. package/components/MenuManager/MenuTreeview.vue +237 -0
  51. package/components/MenuManager/MenuTreeviewNode.vue +208 -0
  52. package/components/PagePreview.vue +58 -0
  53. package/components/SnackBar.vue +2 -3
  54. package/components/ThemeToggle.vue +13 -0
  55. package/components/layout/Sidebar/Sidebar.vue +48 -39
  56. package/components/layout/Sidebar/SidebarList.vue +10 -5
  57. package/components/layout/Sidebar/SidebarListItem.vue +56 -15
  58. package/components/layout/Sidebar/SidebarProfile.vue +42 -0
  59. package/components/layout/Sidebar/SidebarTitle.vue +45 -0
  60. package/components/layout/Topbar/Topbar.vue +11 -9
  61. package/components/layout/routebuilder.js +2 -2
  62. package/defaults/i18n.js +37 -0
  63. package/defaults/vuetify.js +34 -0
  64. package/layouts/default.vue +33 -7
  65. package/layouts/empty.vue +10 -0
  66. package/module.js +7 -5
  67. package/package.json +6 -4
  68. package/pages/index.vue +19 -17
  69. package/static/mapo/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  70. package/static/mapo/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  71. package/static/mapo/ckeditor/plugins/image2/dev/contents.css +35 -0
  72. package/static/mapo/ckeditor/plugins/image2/dev/image2.html +338 -0
  73. package/static/mapo/ckeditor/plugins/image2/dialogs/image2.js +557 -0
  74. package/static/mapo/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  75. package/static/mapo/ckeditor/plugins/image2/icons/image.png +0 -0
  76. package/static/mapo/ckeditor/plugins/image2/lang/af.js +21 -0
  77. package/static/mapo/ckeditor/plugins/image2/lang/ar.js +21 -0
  78. package/static/mapo/ckeditor/plugins/image2/lang/az.js +21 -0
  79. package/static/mapo/ckeditor/plugins/image2/lang/bg.js +21 -0
  80. package/static/mapo/ckeditor/plugins/image2/lang/bn.js +21 -0
  81. package/static/mapo/ckeditor/plugins/image2/lang/bs.js +21 -0
  82. package/static/mapo/ckeditor/plugins/image2/lang/ca.js +21 -0
  83. package/static/mapo/ckeditor/plugins/image2/lang/cs.js +21 -0
  84. package/static/mapo/ckeditor/plugins/image2/lang/cy.js +21 -0
  85. package/static/mapo/ckeditor/plugins/image2/lang/da.js +21 -0
  86. package/static/mapo/ckeditor/plugins/image2/lang/de-ch.js +21 -0
  87. package/static/mapo/ckeditor/plugins/image2/lang/de.js +21 -0
  88. package/static/mapo/ckeditor/plugins/image2/lang/el.js +21 -0
  89. package/static/mapo/ckeditor/plugins/image2/lang/en-au.js +21 -0
  90. package/static/mapo/ckeditor/plugins/image2/lang/en-ca.js +21 -0
  91. package/static/mapo/ckeditor/plugins/image2/lang/en-gb.js +21 -0
  92. package/static/mapo/ckeditor/plugins/image2/lang/en.js +21 -0
  93. package/static/mapo/ckeditor/plugins/image2/lang/eo.js +21 -0
  94. package/static/mapo/ckeditor/plugins/image2/lang/es-mx.js +21 -0
  95. package/static/mapo/ckeditor/plugins/image2/lang/es.js +21 -0
  96. package/static/mapo/ckeditor/plugins/image2/lang/et.js +21 -0
  97. package/static/mapo/ckeditor/plugins/image2/lang/eu.js +21 -0
  98. package/static/mapo/ckeditor/plugins/image2/lang/fa.js +21 -0
  99. package/static/mapo/ckeditor/plugins/image2/lang/fi.js +21 -0
  100. package/static/mapo/ckeditor/plugins/image2/lang/fo.js +21 -0
  101. package/static/mapo/ckeditor/plugins/image2/lang/fr-ca.js +21 -0
  102. package/static/mapo/ckeditor/plugins/image2/lang/fr.js +21 -0
  103. package/static/mapo/ckeditor/plugins/image2/lang/gl.js +21 -0
  104. package/static/mapo/ckeditor/plugins/image2/lang/gu.js +21 -0
  105. package/static/mapo/ckeditor/plugins/image2/lang/he.js +21 -0
  106. package/static/mapo/ckeditor/plugins/image2/lang/hi.js +21 -0
  107. package/static/mapo/ckeditor/plugins/image2/lang/hr.js +21 -0
  108. package/static/mapo/ckeditor/plugins/image2/lang/hu.js +21 -0
  109. package/static/mapo/ckeditor/plugins/image2/lang/id.js +21 -0
  110. package/static/mapo/ckeditor/plugins/image2/lang/is.js +21 -0
  111. package/static/mapo/ckeditor/plugins/image2/lang/it.js +21 -0
  112. package/static/mapo/ckeditor/plugins/image2/lang/ja.js +21 -0
  113. package/static/mapo/ckeditor/plugins/image2/lang/ka.js +21 -0
  114. package/static/mapo/ckeditor/plugins/image2/lang/km.js +21 -0
  115. package/static/mapo/ckeditor/plugins/image2/lang/ko.js +21 -0
  116. package/static/mapo/ckeditor/plugins/image2/lang/ku.js +21 -0
  117. package/static/mapo/ckeditor/plugins/image2/lang/lt.js +21 -0
  118. package/static/mapo/ckeditor/plugins/image2/lang/lv.js +21 -0
  119. package/static/mapo/ckeditor/plugins/image2/lang/mk.js +21 -0
  120. package/static/mapo/ckeditor/plugins/image2/lang/mn.js +21 -0
  121. package/static/mapo/ckeditor/plugins/image2/lang/ms.js +21 -0
  122. package/static/mapo/ckeditor/plugins/image2/lang/nb.js +21 -0
  123. package/static/mapo/ckeditor/plugins/image2/lang/nl.js +21 -0
  124. package/static/mapo/ckeditor/plugins/image2/lang/no.js +21 -0
  125. package/static/mapo/ckeditor/plugins/image2/lang/oc.js +21 -0
  126. package/static/mapo/ckeditor/plugins/image2/lang/pl.js +21 -0
  127. package/static/mapo/ckeditor/plugins/image2/lang/pt-br.js +21 -0
  128. package/static/mapo/ckeditor/plugins/image2/lang/pt.js +21 -0
  129. package/static/mapo/ckeditor/plugins/image2/lang/ro.js +21 -0
  130. package/static/mapo/ckeditor/plugins/image2/lang/ru.js +21 -0
  131. package/static/mapo/ckeditor/plugins/image2/lang/si.js +21 -0
  132. package/static/mapo/ckeditor/plugins/image2/lang/sk.js +21 -0
  133. package/static/mapo/ckeditor/plugins/image2/lang/sl.js +21 -0
  134. package/static/mapo/ckeditor/plugins/image2/lang/sq.js +21 -0
  135. package/static/mapo/ckeditor/plugins/image2/lang/sr-latn.js +21 -0
  136. package/static/mapo/ckeditor/plugins/image2/lang/sr.js +21 -0
  137. package/static/mapo/ckeditor/plugins/image2/lang/sv.js +21 -0
  138. package/static/mapo/ckeditor/plugins/image2/lang/th.js +21 -0
  139. package/static/mapo/ckeditor/plugins/image2/lang/tr.js +21 -0
  140. package/static/mapo/ckeditor/plugins/image2/lang/tt.js +21 -0
  141. package/static/mapo/ckeditor/plugins/image2/lang/ug.js +21 -0
  142. package/static/mapo/ckeditor/plugins/image2/lang/uk.js +21 -0
  143. package/static/mapo/ckeditor/plugins/image2/lang/vi.js +21 -0
  144. package/static/mapo/ckeditor/plugins/image2/lang/zh-cn.js +21 -0
  145. package/static/mapo/ckeditor/plugins/image2/lang/zh.js +21 -0
  146. package/static/mapo/ckeditor/plugins/image2/plugin.js +1798 -0
  147. package/static/mapo/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  148. package/static/mapo/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  149. package/static/mapo/ckeditor/plugins/image2/samples/image2.html +68 -0
  150. package/static/mapo/ckeditor/skins/moono/dev/icons16.png +0 -0
  151. package/static/mapo/ckeditor/skins/moono/dev/icons16.svg +2374 -0
  152. package/static/mapo/ckeditor/skins/moono/dev/icons32.png +0 -0
  153. package/static/mapo/ckeditor/skins/moono/dev/icons32.svg +2722 -0
  154. package/static/mapo/ckeditor/skins/moono/dev/locations.json +144 -0
  155. package/static/mapo/ckeditor/skins/moono/dialog.css +5 -0
  156. package/static/mapo/ckeditor/skins/moono/dialog_ie.css +5 -0
  157. package/static/mapo/ckeditor/skins/moono/dialog_ie7.css +5 -0
  158. package/static/mapo/ckeditor/skins/moono/dialog_ie8.css +5 -0
  159. package/static/mapo/ckeditor/skins/moono/dialog_iequirks.css +5 -0
  160. package/static/mapo/ckeditor/skins/moono/editor.css +5 -0
  161. package/static/mapo/ckeditor/skins/moono/editor_gecko.css +5 -0
  162. package/static/mapo/ckeditor/skins/moono/editor_ie.css +5 -0
  163. package/static/mapo/ckeditor/skins/moono/editor_ie7.css +5 -0
  164. package/static/mapo/ckeditor/skins/moono/editor_ie8.css +5 -0
  165. package/static/mapo/ckeditor/skins/moono/editor_iequirks.css +5 -0
  166. package/static/mapo/ckeditor/skins/moono/icons.png +0 -0
  167. package/static/mapo/ckeditor/skins/moono/icons_hidpi.png +0 -0
  168. package/static/mapo/ckeditor/skins/moono/images/anchor.png +0 -0
  169. package/static/mapo/ckeditor/skins/moono/images/arrow.png +0 -0
  170. package/static/mapo/ckeditor/skins/moono/images/close.png +0 -0
  171. package/static/mapo/ckeditor/skins/moono/images/hidpi/anchor.png +0 -0
  172. package/static/mapo/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  173. package/static/mapo/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  174. package/static/mapo/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  175. package/static/mapo/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  176. package/static/mapo/ckeditor/skins/moono/images/lock-open.png +0 -0
  177. package/static/mapo/ckeditor/skins/moono/images/lock.png +0 -0
  178. package/static/mapo/ckeditor/skins/moono/images/refresh.png +0 -0
  179. package/static/mapo/ckeditor/skins/moono/images/spinner.gif +0 -0
  180. package/static/mapo/ckeditor/skins/moono/readme.md +49 -0
  181. package/static/mapo/ckeditor/skins/moono/skin.js +10 -0
  182. package/static/mapo/ckeditor/skins/moono-dark/dialog.css +5 -0
  183. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie.css +5 -0
  184. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie7.css +5 -0
  185. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie8.css +5 -0
  186. package/static/mapo/ckeditor/skins/moono-dark/dialog_iequirks.css +5 -0
  187. package/static/mapo/ckeditor/skins/moono-dark/editor.css +5 -0
  188. package/static/mapo/ckeditor/skins/moono-dark/editor_gecko.css +5 -0
  189. package/static/mapo/ckeditor/skins/moono-dark/editor_ie.css +5 -0
  190. package/static/mapo/ckeditor/skins/moono-dark/editor_ie7.css +5 -0
  191. package/static/mapo/ckeditor/skins/moono-dark/editor_ie8.css +5 -0
  192. package/static/mapo/ckeditor/skins/moono-dark/editor_iequirks.css +5 -0
  193. package/static/mapo/ckeditor/skins/moono-dark/icons.png +0 -0
  194. package/static/mapo/ckeditor/skins/moono-dark/icons_hidpi.png +0 -0
  195. package/static/mapo/ckeditor/skins/moono-dark/images/arrow.png +0 -0
  196. package/static/mapo/ckeditor/skins/moono-dark/images/close.png +0 -0
  197. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/close.png +0 -0
  198. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock-open.png +0 -0
  199. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock.png +0 -0
  200. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/refresh.png +0 -0
  201. package/static/mapo/ckeditor/skins/moono-dark/images/lock-open.png +0 -0
  202. package/static/mapo/ckeditor/skins/moono-dark/images/lock.png +0 -0
  203. package/static/mapo/ckeditor/skins/moono-dark/images/refresh.png +0 -0
  204. package/static/mapo/ckeditor/skins/moono-dark/readme.md +51 -0
  205. package/static/mapo/ckeditor/skins/moono-dark/skin.js +5 -0
  206. package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +7 -0
  207. package/static/mapo/tinymce-skins/mapo-dark/content.min.css +7 -0
  208. package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +7 -0
  209. package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +7 -0
  210. package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +7 -0
  211. package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +7 -0
  212. package/static/mapo/tinymce-skins/mapo-light/content.min.css +7 -0
  213. package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +7 -0
  214. package/static/mapo/tinymce-skins/mapo-light/skin.min.css +7 -0
  215. package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +7 -0
  216. package/translations/en-US.js +177 -0
  217. package/translations/it-IT.js +180 -0
  218. package/LICENSE.md +0 -20
  219. package/components/Detail/DetailField.vue +0 -133
  220. package/components/Detail/defaults.js +0 -56
  221. package/components/fields/FksField.vue +0 -60
  222. package/components/fields/MediaField.vue +0 -213
  223. package/components/fields/MediaM2mField.vue +0 -243
  224. package/components/fields/wygEditor/defaults.js +0 -55
  225. package/components/layout/Sidebar/SidebarFooter.vue +0 -71
  226. package/defaults.js +0 -29
  227. package/layouts/error.vue +0 -45
  228. /package/components/{fields → Form/fields}/wygEditor/utils/events.js +0 -0
  229. /package/components/{fields/wygEditor/utils/script.injector.js → Form/fields/wygEditor/utils/tinymce.injector.js} +0 -0
  230. /package/static/{favicon.ico → mapo/favicon.ico} +0 -0
@@ -1,213 +0,0 @@
1
- <template>
2
- <div>
3
- <v-text-field
4
- v-if="title"
5
- v-model="title"
6
- class="mb-n8 pb-0"
7
- solo
8
- readonly
9
- v-bind="$attrs"
10
- ></v-text-field>
11
- <v-hover v-model="isHovered">
12
- <div style="position: relative">
13
- <v-img
14
- v-if="mediaExists"
15
- :src="internalValue.is_image && internalValue.file || null"
16
- :lazy-src="internalValue.is_image && internalValue.thumbnail || null"
17
-
18
- :class="{'grey lighten-2': !internalValue.is_image}"
19
- v-bind="{
20
- aspectRatio,
21
- contain,
22
- height,
23
- width,
24
- maxWidth,
25
- maxHeight,
26
- minWidth,
27
- minHeight,
28
- }"
29
- >
30
- <template v-slot:placeholder>
31
- <v-row
32
- v-if="internalValue"
33
- class="fill-height ma-0"
34
- align="center"
35
- justify="center"
36
- >
37
- <v-progress-circular
38
- v-if="internalValue.is_image"
39
- indeterminate
40
- color="grey"
41
- ></v-progress-circular>
42
- <div class="d-flex flex-column align-center justify-space-between fill-height" style="width: 100%" v-else>
43
- <div></div>
44
- <v-icon size="70px" color="grey">mdi-file</v-icon>
45
- <span class="grey--text text--darken-3 text-truncate pl-1 pr-8" style="width: 100%">{{fileName}}</span>
46
- </div>
47
- </v-row>
48
- </template>
49
- </v-img>
50
-
51
- <!-- If the media is not avaible, it shows a btn to add new media -->
52
- <v-card
53
- v-else-if="!rmAddBtn"
54
- class="rounded-0"
55
- v-bind="{
56
- height,
57
- width,
58
- maxWidth,
59
- maxHeight,
60
- minWidth,
61
- minHeight,
62
- ...$attrs,
63
- }"
64
- >
65
- <v-card-title>{{ label }}</v-card-title>
66
-
67
- <v-card-actions>
68
- <v-btn tile :disabled="readonly" @click="editing = true" block :min-height="minHeight">
69
- <v-icon size="80"> mdi-plus-circle-outline </v-icon>
70
- </v-btn>
71
- </v-card-actions>
72
- </v-card>
73
-
74
- <!-- Shows darkening overlay on image with buttons on top while hovered -->
75
- <v-overlay opacity="0.3" absolute :value="overlay">
76
- <v-row>
77
- <v-col cols="12">
78
- <h3>{{ label }}</h3>
79
- </v-col>
80
- </v-row>
81
- <v-row>
82
- <v-col cols="6">
83
- <v-btn :disabled="readonly" @click="editing = true" fab v-bind="$attrs">
84
- <v-icon>mdi-pencil</v-icon>
85
- </v-btn>
86
- </v-col>
87
-
88
- <v-col cols="6">
89
- <v-btn :disabled="readonly" @click="confirmDelete" fab v-bind="$attrs">
90
- <v-icon>mdi-delete</v-icon>
91
- </v-btn>
92
- </v-col>
93
- </v-row>
94
- </v-overlay>
95
-
96
- <!-- Select media dialog -->
97
- <media-manager-dialog
98
- v-model="editing"
99
- select="single"
100
- v-on:selectionChange="update"
101
- v-bind="$attrs"
102
- >
103
- </media-manager-dialog>
104
-
105
- </div>
106
- </v-hover>
107
- </div>
108
- </template>
109
-
110
- <style scoped>
111
- </style>
112
-
113
- <script>
114
- export default {
115
- name: "MediaField",
116
- data() {
117
- return {
118
- internalValue: null,
119
- editing: false,
120
- isHovered: false,
121
- };
122
- },
123
-
124
- props: {
125
- value: Object,
126
- label: String,
127
- title: {
128
- type: String,
129
- default: () => "",
130
- },
131
- rmAddBtn: {
132
- type: Boolean,
133
- default: false,
134
- },
135
- //image reflections
136
- aspectRatio: {
137
- type: String | Number,
138
- default: undefined,
139
- },
140
- contain: {
141
- type: Boolean,
142
- default: false,
143
- },
144
- height: {
145
- type: String | Number,
146
- default: "100%",
147
- },
148
- width: {
149
- type: String | Number,
150
- default: "100%",
151
- },
152
- maxWidth: {
153
- type: String | Number,
154
- default: undefined,
155
- },
156
- maxHeight: {
157
- type: String | Number,
158
- default: undefined,
159
- },
160
- minWidth: {
161
- type: String | Number,
162
- default: undefined,
163
- },
164
- minHeight: {
165
- type: String | Number,
166
- default: 300,
167
- },
168
- // This set the component status to readonly, stopping the user interaction.
169
- readonly: {
170
- type: Boolean,
171
- default: false,
172
- },
173
- },
174
-
175
- computed: {
176
- mediaExists() {
177
- return !!this.internalValue?.file;
178
- },
179
- overlay() {
180
- return this.isHovered && this.mediaExists;
181
- },
182
- fileName() {
183
- return this.internalValue && this.internalValue.file && this.internalValue.file.split("/").pop();
184
- },
185
- },
186
-
187
- methods: {
188
- update(val) {
189
- this.internalValue = val;
190
- },
191
- confirmDelete() {
192
- this.$mapo.$confirm
193
- .open({
194
- title: "Remove",
195
- question: "Are you sure to want to remove this media?",
196
- approveButton: { text: "Remove", attrs: { color: "red", text: true } }
197
- })
198
- .then((res) => (res ? (this.internalValue = null) : null));
199
- },
200
- },
201
-
202
- watch: {
203
- value(val) {
204
- if (val !== this.internalValue) {
205
- this.internalValue = val;
206
- }
207
- },
208
- internalValue(val) {
209
- this.$emit("input", val);
210
- },
211
- },
212
- };
213
- </script>
@@ -1,243 +0,0 @@
1
- <template>
2
- <div>
3
- <v-card
4
- v-bind="{
5
- minWidth,
6
- minHeight,
7
- height,
8
- width,
9
- maxHeight,
10
- maxWidth,
11
- elevation,
12
- dark,
13
- light: !dark,
14
- }"
15
- >
16
- <v-card-title v-if="!pages">Media Carousel</v-card-title>
17
- <v-card-actions>
18
- <v-row justify="center" class="ma-1" no-gutters>
19
- <v-col>
20
- <v-btn
21
- @click="mmdialog = true"
22
- block
23
- outlined
24
- :min-height="pages ? undefined : minHeight"
25
- >
26
- <div v-if="pages">New Selection</div>
27
- <v-icon v-else size="80"> mdi-plus-circle-outline </v-icon>
28
- </v-btn>
29
- </v-col>
30
- </v-row>
31
- </v-card-actions>
32
-
33
- <v-window v-model="page">
34
- <v-window-item
35
- class="page"
36
- v-for="(pageMedias, i) in paginatedMedias"
37
- :key="i"
38
- >
39
- <v-container class="pa-0">
40
- <v-row
41
- v-for="row in rows"
42
- :key="row"
43
- align="center"
44
- align-content="center"
45
- justify="center"
46
- >
47
- <v-col v-for="col in cols" :key="col">
48
- <MediaElement
49
- v-if="pageMedias[getIndexFromGrid(row, col)]"
50
- v-model="pageMedias[getIndexFromGrid(row, col)]"
51
- :aspect-ratio="1"
52
- :dark="dark"
53
- rm-add-btn
54
- @changed-media="checkMediaEdit($event, i, row, col)"
55
- />
56
- <div v-else class="placeholder"></div>
57
- </v-col>
58
- </v-row>
59
- </v-container>
60
- </v-window-item>
61
- </v-window>
62
-
63
- <v-card-actions class="paginator mt-auto" v-if="pages">
64
- <v-row justify="center" class="py-2">
65
- <v-btn :disabled="readonly" text @click="prev">
66
- <v-icon>mdi-chevron-left</v-icon>
67
- </v-btn>
68
- <v-item-group v-model="page" class="text-center mx-1" mandatory>
69
- <v-item
70
- v-for="n in pages"
71
- :key="`btn-${n}`"
72
- v-slot="{ active, toggle }"
73
- >
74
- <v-btn :disabled="readonly" :input-value="active" icon @click="toggle">
75
- <v-icon>mdi-record</v-icon>
76
- </v-btn>
77
- </v-item>
78
- </v-item-group>
79
- <v-btn :disabled="readonly" text @click="next">
80
- <v-icon>mdi-chevron-right</v-icon>
81
- </v-btn>
82
- </v-row>
83
- </v-card-actions>
84
- </v-card>
85
-
86
- <media-manager-dialog
87
- v-model="mmdialog"
88
- select="multi"
89
- v-on:selectionChange="update"
90
- :light="!dark"
91
- :dark="dark"
92
- >
93
- </media-manager-dialog>
94
- </div>
95
- </template>
96
-
97
- <style scoped>
98
- .v-card {
99
- display: flex;
100
- flex-direction: column;
101
- }
102
-
103
- .v-window {
104
- overflow: hidden;
105
- position: relative;
106
- width: 100%;
107
- }
108
-
109
- .placeholder {
110
- padding-bottom: 100%;
111
- }
112
- </style>
113
-
114
- <script>
115
- export default {
116
- name: "MediaM2mField",
117
- transition: "tasks-transition",
118
- data() {
119
- return {
120
- child_medias: [],
121
-
122
- page: 0,
123
- mmdialog: false,
124
- };
125
- },
126
-
127
- props: {
128
- medias: {
129
- type: Array,
130
- default: () => [],
131
- },
132
- cols: {
133
- type: Number,
134
- default: 2,
135
- },
136
- rows: {
137
- type: Number,
138
- default: 2,
139
- },
140
-
141
- //reflections
142
- minWidth: {
143
- type: Number | String,
144
- default: 300,
145
- },
146
- minHeight: {
147
- type: Number | String,
148
- default: 300,
149
- },
150
- height: {
151
- type: Number | String,
152
- },
153
- width: {
154
- type: Number | String,
155
- },
156
- maxHeight: {
157
- type: Number | String,
158
- },
159
- maxWidth: {
160
- type: Number | String,
161
- },
162
-
163
- elevation: {
164
- type: Number | String,
165
- default: undefined,
166
- },
167
- flat: {
168
- type: Boolean,
169
- default: false,
170
- },
171
-
172
- dark: {
173
- type: Boolean,
174
- default: false,
175
- },
176
- // This set the component status to readonly, stopping the user interaction.
177
- readonly: {
178
- type: Boolean,
179
- default: false,
180
- },
181
- },
182
-
183
- model: {
184
- prop: "medias",
185
- event: "changed-selection",
186
- },
187
-
188
- mounted() {
189
- if (this.medias) this.child_medias = this.medias;
190
- },
191
-
192
- computed: {
193
- mediasPerPage() {
194
- return this.cols * this.rows;
195
- },
196
- pages() {
197
- return Math.ceil(this.child_medias.length / this.mediasPerPage);
198
- },
199
- paginatedMedias() {
200
- var array = new Array(this.pages);
201
- for (let i = 0; i < array.length; i++) {
202
- array[i] = this.child_medias.slice(
203
- i * this.mediasPerPage,
204
- (i + 1) * this.mediasPerPage
205
- );
206
- }
207
- return array;
208
- },
209
- },
210
-
211
- methods: {
212
- getIndexFromGrid(row, col) {
213
- return (row - 1) * this.cols + col - 1;
214
- },
215
- update(selection) {
216
- this.child_medias = [...selection];
217
- this.$emit("changed-selection", [...selection]);
218
- },
219
- checkMediaEdit(event, page, row, col) {
220
- //if event is not empty, then exit
221
- let index = this.mediasPerPage * page + this.getIndexFromGrid(row, col);
222
- if (event) {
223
- this.child_medias[index] = event;
224
- } else {
225
- this.child_medias.splice(index, 1);
226
- }
227
- this.update(this.child_medias);
228
- },
229
- next() {
230
- this.page = this.page + 1 === this.length ? 0 : this.page + 1;
231
- },
232
- prev() {
233
- this.page = this.page - 1 < 0 ? this.length - 1 : this.page - 1;
234
- },
235
- },
236
-
237
- watch: {
238
- medias(val) {
239
- this.child_medias = val;
240
- },
241
- },
242
- };
243
- </script>
@@ -1,55 +0,0 @@
1
- var useDarkMode = false;
2
-
3
- export default {
4
- plugins: 'mapomedia preview paste importcss searchreplace autolink directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons',
5
- // imagetools_cors_hosts: ['picsum.photos'],
6
- menubar: 'file edit view insert format tools table help',
7
- toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview | insertfile image mapomedia media template link anchor codesample | ltr rtl',
8
- toolbar_sticky: true,
9
- image_advtab: true,
10
- // link_list: [
11
- // { title: 'My page 1', value: 'https://www.tiny.cloud' },
12
- // { title: 'My page 2', value: 'http://www.moxiecode.com' }
13
- // ],
14
- // image_list: [
15
- // { title: 'My page 1', value: 'https://www.tiny.cloud' },
16
- // { title: 'My page 2', value: 'http://www.moxiecode.com' }
17
- // ],
18
- // image_class_list: [
19
- // { title: 'None', value: '' },
20
- // { title: 'Some class', value: 'class-name' }
21
- // ],
22
- importcss_append: true,
23
- // file_picker_callback: function (callback, value, meta) {
24
- // /* Provide file and text for the link dialog */
25
- // if (meta.filetype === 'file') {
26
- // callback('https://www.google.com/logos/google.jpg', { text: 'My text' });
27
- // }
28
-
29
- // /* Provide image and alt text for the image dialog */
30
- // if (meta.filetype === 'image') {
31
- // callback('https://www.google.com/logos/google.jpg', { alt: 'My alt text' });
32
- // }
33
-
34
- // /* Provide alternative source and posted for the media dialog */
35
- // if (meta.filetype === 'media') {
36
- // callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.google.com/logos/google.jpg' });
37
- // }
38
- // },
39
- // templates: [
40
- // { title: 'New Table', description: 'creates a new table', content: '<div class="mceTmpl"><table width="98%%" border="0" cellspacing="0" cellpadding="0"><tr><th scope="col"> </th><th scope="col"> </th></tr><tr><td> </td><td> </td></tr></table></div>' },
41
- // { title: 'Starting my story', description: 'A cure for writers block', content: 'Once upon a time...' },
42
- // { title: 'New list with dates', description: 'New List with dates', content: '<div class="mceTmpl"><span class="cdate">cdate</span><br /><span class="mdate">mdate</span><h2>My List</h2><ul><li></li><li></li></ul></div>' }
43
- // ],
44
- template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]',
45
- template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]',
46
- height: 400,
47
- image_caption: true,
48
- quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
49
- noneditable_noneditable_class: 'mceNonEditable',
50
- toolbar_mode: 'sliding',
51
- contextmenu: 'link image imagetools table',
52
- skin: useDarkMode ? 'oxide-dark' : 'oxide',
53
- content_css: useDarkMode ? 'dark' : 'default',
54
- content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
55
- }
@@ -1,71 +0,0 @@
1
- <template>
2
- <div>
3
- <v-divider></v-divider>
4
- <v-list dense class="py-0">
5
- <SidebarListItem
6
- v-for="(item, i) in routes"
7
- :key="i"
8
- :link="item.link"
9
- :label="item.label"
10
- :meta="item.meta"
11
- :childrens="item.childrens"
12
- :icon="item.icon"
13
- :force-collapse="forceCollapse"
14
- />
15
- </v-list>
16
- <v-divider></v-divider>
17
- <v-list-item dense class="logout__button" link @click.native="logout">
18
- <v-list-item-icon>
19
- <v-icon>mdi-logout</v-icon>
20
- </v-list-item-icon>
21
- <v-list-item-title> Logout </v-list-item-title>
22
- </v-list-item>
23
- </div>
24
- </template>
25
-
26
- <style lang="scss" scoped>
27
- .logout__button{
28
- &.theme--light{
29
- background: #ffffffd6;
30
- filter: invert(1);
31
- }
32
- &.theme--dark{
33
- background: #121212;
34
- }
35
- }
36
- </style>
37
- <script>
38
- import { buildRoutes } from "../routebuilder";
39
-
40
- // @vuese
41
- export default {
42
- name: "SidebarFooter",
43
- props: {
44
- forceCollapse: {
45
- type: Boolean,
46
- default: false
47
- }
48
- },
49
- data() {
50
- return {
51
- defaultIcon: ({ label }) => `mdi-alpha-${label[0]}-box`.toLowerCase(),
52
- routes: this.routes
53
- };
54
- },
55
- mounted() {
56
- this.routes = this.buildRoutes(
57
- this.$router.options.routes.filter(
58
- route => route.meta && route.meta.sidebarFooter === true
59
- )
60
- );
61
- },
62
- methods: {
63
- buildRoutes(routes) {
64
- return buildRoutes(routes, this.defaultIcon);
65
- },
66
- logout() {
67
- this.$store.dispatch("mapo/user/logout");
68
- }
69
- }
70
- };
71
- </script>
package/defaults.js DELETED
@@ -1,29 +0,0 @@
1
- import colors from 'vuetify/es5/util/colors'
2
-
3
- export default {
4
- customVariables: ['@mapomodule/uikit/assets/variables.scss'],
5
- theme: {
6
- dark: true,
7
- themes: {
8
- dark: {
9
- primary: '#309A00',
10
- accent: colors.grey.darken3,
11
- secondary: colors.amber.darken3,
12
- info: colors.teal.lighten1,
13
- warning: colors.amber.base,
14
- error: '#FF5252',
15
- success: colors.green.accent3
16
- },
17
- light: {
18
- primary: '#309A00',
19
- accent: colors.indigo.accent1,
20
- secondary: colors.amber.accent2,
21
- info: colors.teal.lighten1,
22
- warning: colors.amber.base,
23
- error: '#FF5252',
24
- success: colors.green.accent3
25
- }
26
- }
27
- },
28
- treeShake: false
29
- }
package/layouts/error.vue DELETED
@@ -1,45 +0,0 @@
1
- <template>
2
- <v-app>
3
- <h1 v-if="error.statusCode === 404">
4
- {{ pageNotFound }}
5
- </h1>
6
- <h1 v-else>
7
- {{ otherError }}
8
- </h1>
9
- <NuxtLink to="/">
10
- Home page
11
- </NuxtLink>
12
- <root-components />
13
- </v-app>
14
- </template>
15
-
16
- <script>
17
- export default {
18
- layout: 'empty',
19
- props: {
20
- error: {
21
- type: Object,
22
- default: null
23
- }
24
- },
25
- data () {
26
- return {
27
- pageNotFound: '404 Not Found',
28
- otherError: 'An error occurred'
29
- }
30
- },
31
- head () {
32
- const title =
33
- this.error.statusCode === 404 ? this.pageNotFound : this.otherError
34
- return {
35
- title
36
- }
37
- }
38
- }
39
- </script>
40
-
41
- <style scoped>
42
- h1 {
43
- font-size: 20px;
44
- }
45
- </style>
File without changes