@mapomodule/uikit 1.0.0 → 2.0.0-beta.2

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 (343) hide show
  1. package/README.md +167 -0
  2. package/dist/index.d.mts +3 -0
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.mjs +1 -0
  6. package/dist/module.d.mts +30 -0
  7. package/dist/module.d.ts +27 -0
  8. package/dist/module.d.ts.map +1 -0
  9. package/dist/module.json +9 -0
  10. package/dist/module.mjs +114 -0
  11. package/dist/runtime/assets/main.css +1 -0
  12. package/dist/runtime/components/MapoConfirmDialog.vue +33 -0
  13. package/dist/runtime/components/MapoConfirmDialog.vue.d.ts +4 -0
  14. package/dist/runtime/components/MapoConfirmDialog.vue.d.ts.map +1 -0
  15. package/dist/runtime/components/MapoDetail.vue +598 -0
  16. package/dist/runtime/components/MapoDetail.vue.d.ts +401 -0
  17. package/dist/runtime/components/MapoDetail.vue.d.ts.map +1 -0
  18. package/dist/runtime/components/MapoDetailLangSwitch.vue +126 -0
  19. package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts +23 -0
  20. package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts.map +1 -0
  21. package/dist/runtime/components/MapoList.vue +191 -0
  22. package/dist/runtime/components/MapoList.vue.d.ts +111 -0
  23. package/dist/runtime/components/MapoList.vue.d.ts.map +1 -0
  24. package/dist/runtime/components/MapoListActions.vue +112 -0
  25. package/dist/runtime/components/MapoListActions.vue.d.ts +33 -0
  26. package/dist/runtime/components/MapoListActions.vue.d.ts.map +1 -0
  27. package/dist/runtime/components/MapoListFilters.vue +244 -0
  28. package/dist/runtime/components/MapoListFilters.vue.d.ts +38 -0
  29. package/dist/runtime/components/MapoListFilters.vue.d.ts.map +1 -0
  30. package/dist/runtime/components/MapoListHead.vue +9 -0
  31. package/dist/runtime/components/MapoListHead.vue.d.ts +14 -0
  32. package/dist/runtime/components/MapoListHead.vue.d.ts.map +1 -0
  33. package/dist/runtime/components/MapoListQuickEdit.vue +119 -0
  34. package/dist/runtime/components/MapoListQuickEdit.vue.d.ts +47 -0
  35. package/dist/runtime/components/MapoListQuickEdit.vue.d.ts.map +1 -0
  36. package/dist/runtime/components/MapoListTable.vue +660 -0
  37. package/dist/runtime/components/MapoListTable.vue.d.ts +105 -0
  38. package/dist/runtime/components/MapoListTable.vue.d.ts.map +1 -0
  39. package/dist/runtime/components/MapoListTabs.vue +38 -0
  40. package/dist/runtime/components/MapoListTabs.vue.d.ts +26 -0
  41. package/dist/runtime/components/MapoListTabs.vue.d.ts.map +1 -0
  42. package/dist/runtime/components/MapoLogin.vue +193 -0
  43. package/dist/runtime/components/MapoLogin.vue.d.ts +22 -0
  44. package/dist/runtime/components/MapoLogin.vue.d.ts.map +1 -0
  45. package/dist/runtime/components/MapoLogoutButton.vue +25 -0
  46. package/dist/runtime/components/MapoLogoutButton.vue.d.ts +29 -0
  47. package/dist/runtime/components/MapoLogoutButton.vue.d.ts.map +1 -0
  48. package/dist/runtime/components/MapoRootComponents.vue +9 -0
  49. package/dist/runtime/components/MapoRootComponents.vue.d.ts +4 -0
  50. package/dist/runtime/components/MapoRootComponents.vue.d.ts.map +1 -0
  51. package/dist/runtime/components/MapoSidebar.vue +87 -0
  52. package/dist/runtime/components/MapoSidebar.vue.d.ts +22 -0
  53. package/dist/runtime/components/MapoSidebar.vue.d.ts.map +1 -0
  54. package/dist/runtime/components/MapoSidebarList.vue +27 -0
  55. package/dist/runtime/components/MapoSidebarList.vue.d.ts +8 -0
  56. package/dist/runtime/components/MapoSidebarList.vue.d.ts.map +1 -0
  57. package/dist/runtime/components/MapoSidebarListItem.vue +74 -0
  58. package/dist/runtime/components/MapoSidebarListItem.vue.d.ts +9 -0
  59. package/dist/runtime/components/MapoSidebarListItem.vue.d.ts.map +1 -0
  60. package/dist/runtime/components/MapoSidebarProfile.vue +51 -0
  61. package/dist/runtime/components/MapoSidebarProfile.vue.d.ts +10 -0
  62. package/dist/runtime/components/MapoSidebarProfile.vue.d.ts.map +1 -0
  63. package/dist/runtime/components/MapoSnackBar.vue +38 -0
  64. package/dist/runtime/components/MapoSnackBar.vue.d.ts +4 -0
  65. package/dist/runtime/components/MapoSnackBar.vue.d.ts.map +1 -0
  66. package/dist/runtime/components/MapoThemeToggle.vue +19 -0
  67. package/dist/runtime/components/MapoThemeToggle.vue.d.ts +4 -0
  68. package/dist/runtime/components/MapoThemeToggle.vue.d.ts.map +1 -0
  69. package/dist/runtime/components/MapoTopbar.vue +30 -0
  70. package/dist/runtime/components/MapoTopbar.vue.d.ts +15 -0
  71. package/dist/runtime/components/MapoTopbar.vue.d.ts.map +1 -0
  72. package/dist/runtime/layouts/default.vue +43 -0
  73. package/dist/runtime/layouts/default.vue.d.ts +20 -0
  74. package/dist/runtime/layouts/default.vue.d.ts.map +1 -0
  75. package/dist/runtime/layouts/empty.vue +9 -0
  76. package/dist/runtime/layouts/empty.vue.d.ts +14 -0
  77. package/dist/runtime/layouts/empty.vue.d.ts.map +1 -0
  78. package/dist/runtime/page-meta.nuxt.d.ts +45 -0
  79. package/dist/runtime/pages/index.vue +13 -0
  80. package/dist/runtime/pages/index.vue.d.ts +4 -0
  81. package/dist/runtime/pages/index.vue.d.ts.map +1 -0
  82. package/dist/runtime/pages/login.vue +7 -0
  83. package/dist/runtime/pages/login.vue.d.ts +4 -0
  84. package/dist/runtime/pages/login.vue.d.ts.map +1 -0
  85. package/dist/runtime/types/list.d.ts +59 -0
  86. package/dist/runtime/types/list.d.ts.map +1 -0
  87. package/dist/runtime/types/list.js +0 -0
  88. package/dist/types.d.mts +9 -0
  89. package/package.json +63 -12
  90. package/src/index.ts +10 -0
  91. package/src/module.ts +181 -0
  92. package/src/runtime/assets/main.css +59 -0
  93. package/src/runtime/components/MapoConfirmDialog.vue +34 -0
  94. package/src/runtime/components/MapoDetail.vue +861 -0
  95. package/src/runtime/components/MapoDetailLangSwitch.vue +166 -0
  96. package/src/runtime/components/MapoList.vue +339 -0
  97. package/src/runtime/components/MapoListActions.vue +152 -0
  98. package/src/runtime/components/MapoListFilters.vue +289 -0
  99. package/src/runtime/components/MapoListHead.vue +12 -0
  100. package/src/runtime/components/MapoListQuickEdit.vue +163 -0
  101. package/src/runtime/components/MapoListTable.vue +926 -0
  102. package/src/runtime/components/MapoListTabs.vue +48 -0
  103. package/src/runtime/components/MapoLogin.vue +209 -0
  104. package/src/runtime/components/MapoLogoutButton.vue +46 -0
  105. package/src/runtime/components/MapoRootComponents.vue +9 -0
  106. package/src/runtime/components/MapoSidebar.vue +112 -0
  107. package/src/runtime/components/MapoSidebarList.vue +35 -0
  108. package/src/runtime/components/MapoSidebarListItem.vue +79 -0
  109. package/src/runtime/components/MapoSidebarProfile.vue +57 -0
  110. package/src/runtime/components/MapoSnackBar.vue +42 -0
  111. package/src/runtime/components/MapoThemeToggle.vue +23 -0
  112. package/src/runtime/components/MapoTopbar.vue +36 -0
  113. package/src/runtime/layouts/default.vue +53 -0
  114. package/src/runtime/layouts/empty.vue +9 -0
  115. package/src/runtime/page-meta.nuxt.d.ts +45 -0
  116. package/src/runtime/pages/index.vue +14 -0
  117. package/src/runtime/pages/login.vue +7 -0
  118. package/src/runtime/types/list.ts +64 -0
  119. package/CHANGELOG.md +0 -1030
  120. package/assets/mixins.scss +0 -22
  121. package/assets/variables.scss +0 -18
  122. package/components/ConfirmDialog.vue +0 -173
  123. package/components/Detail/Detail.vue +0 -696
  124. package/components/Detail/DetailLangSwitch.vue +0 -79
  125. package/components/DropArea.vue +0 -257
  126. package/components/Form/Form.vue +0 -218
  127. package/components/Form/FormField.vue +0 -216
  128. package/components/Form/FormGroup.vue +0 -146
  129. package/components/Form/FormTabs.vue +0 -188
  130. package/components/Form/defaults.js +0 -98
  131. package/components/Form/fields/ColorField.vue +0 -79
  132. package/components/Form/fields/DateField.vue +0 -77
  133. package/components/Form/fields/DateTimeField.vue +0 -271
  134. package/components/Form/fields/EnhancedMediaField.vue +0 -224
  135. package/components/Form/fields/FileField.vue +0 -125
  136. package/components/Form/fields/FksField.vue +0 -115
  137. package/components/Form/fields/MediaField.vue +0 -159
  138. package/components/Form/fields/MediaM2mField.vue +0 -149
  139. package/components/Form/fields/Repeater.vue +0 -618
  140. package/components/Form/fields/SeoPreview.vue +0 -89
  141. package/components/Form/fields/TimeField.vue +0 -154
  142. package/components/Form/fields/mapField/leaflet.injector.js +0 -39
  143. package/components/Form/fields/mapField/mapField.vue +0 -350
  144. package/components/Form/fields/wygEditor/defaults.js +0 -25
  145. package/components/Form/fields/wygEditor/utils/events.js +0 -64
  146. package/components/Form/fields/wygEditor/utils/mapomedia.plugin.js +0 -32
  147. package/components/Form/fields/wygEditor/utils/tinymce.injector.js +0 -29
  148. package/components/Form/fields/wygEditor/wygEditor.vue +0 -285
  149. package/components/Form/fields/wygEditorCKE/defaults.js +0 -103
  150. package/components/Form/fields/wygEditorCKE/utils/ckeditor.injector.js +0 -29
  151. package/components/Form/fields/wygEditorCKE/wygEditorCKE.vue +0 -270
  152. package/components/LangSwitcher.vue +0 -44
  153. package/components/List/List.vue +0 -271
  154. package/components/List/ListActions.vue +0 -164
  155. package/components/List/ListFilters.vue +0 -372
  156. package/components/List/ListHead.vue +0 -67
  157. package/components/List/ListQuickEdit.vue +0 -228
  158. package/components/List/ListTable.vue +0 -484
  159. package/components/List/ListTabs.vue +0 -65
  160. package/components/Login.vue +0 -125
  161. package/components/Logo.vue +0 -79
  162. package/components/LogoutButton.vue +0 -54
  163. package/components/MediaManager/MediaBreadcrumbs.vue +0 -45
  164. package/components/MediaManager/MediaEditor.vue +0 -340
  165. package/components/MediaManager/MediaFileChanger.vue +0 -78
  166. package/components/MediaManager/MediaFolders.vue +0 -287
  167. package/components/MediaManager/MediaGallery.vue +0 -281
  168. package/components/MediaManager/MediaManager.vue +0 -159
  169. package/components/MediaManager/MediaManagerDialog.vue +0 -104
  170. package/components/MediaManager/MediaPreview.vue +0 -258
  171. package/components/MediaManager/MediaUploader.vue +0 -163
  172. package/components/MenuManager/MenuManager.vue +0 -332
  173. package/components/MenuManager/MenuNodeEditor.vue +0 -270
  174. package/components/MenuManager/MenuTreeview.vue +0 -237
  175. package/components/MenuManager/MenuTreeviewNode.vue +0 -208
  176. package/components/PagePreview.vue +0 -58
  177. package/components/RootComponents.vue +0 -25
  178. package/components/SnackBar.vue +0 -69
  179. package/components/ThemeToggle.vue +0 -13
  180. package/components/layout/Sidebar/Sidebar.vue +0 -89
  181. package/components/layout/Sidebar/SidebarList.vue +0 -49
  182. package/components/layout/Sidebar/SidebarListItem.vue +0 -185
  183. package/components/layout/Sidebar/SidebarProfile.vue +0 -42
  184. package/components/layout/Sidebar/SidebarTitle.vue +0 -45
  185. package/components/layout/Topbar/Topbar.vue +0 -29
  186. package/components/layout/routebuilder.js +0 -48
  187. package/defaults/i18n.js +0 -37
  188. package/defaults/vuetify.js +0 -34
  189. package/layouts/default.vue +0 -47
  190. package/layouts/empty.vue +0 -16
  191. package/module.js +0 -80
  192. package/pages/index.vue +0 -37
  193. package/pages/login.vue +0 -10
  194. package/static/mapo/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  195. package/static/mapo/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  196. package/static/mapo/ckeditor/plugins/image2/dev/contents.css +0 -35
  197. package/static/mapo/ckeditor/plugins/image2/dev/image2.html +0 -338
  198. package/static/mapo/ckeditor/plugins/image2/dialogs/image2.js +0 -557
  199. package/static/mapo/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  200. package/static/mapo/ckeditor/plugins/image2/icons/image.png +0 -0
  201. package/static/mapo/ckeditor/plugins/image2/lang/af.js +0 -21
  202. package/static/mapo/ckeditor/plugins/image2/lang/ar.js +0 -21
  203. package/static/mapo/ckeditor/plugins/image2/lang/az.js +0 -21
  204. package/static/mapo/ckeditor/plugins/image2/lang/bg.js +0 -21
  205. package/static/mapo/ckeditor/plugins/image2/lang/bn.js +0 -21
  206. package/static/mapo/ckeditor/plugins/image2/lang/bs.js +0 -21
  207. package/static/mapo/ckeditor/plugins/image2/lang/ca.js +0 -21
  208. package/static/mapo/ckeditor/plugins/image2/lang/cs.js +0 -21
  209. package/static/mapo/ckeditor/plugins/image2/lang/cy.js +0 -21
  210. package/static/mapo/ckeditor/plugins/image2/lang/da.js +0 -21
  211. package/static/mapo/ckeditor/plugins/image2/lang/de-ch.js +0 -21
  212. package/static/mapo/ckeditor/plugins/image2/lang/de.js +0 -21
  213. package/static/mapo/ckeditor/plugins/image2/lang/el.js +0 -21
  214. package/static/mapo/ckeditor/plugins/image2/lang/en-au.js +0 -21
  215. package/static/mapo/ckeditor/plugins/image2/lang/en-ca.js +0 -21
  216. package/static/mapo/ckeditor/plugins/image2/lang/en-gb.js +0 -21
  217. package/static/mapo/ckeditor/plugins/image2/lang/en.js +0 -21
  218. package/static/mapo/ckeditor/plugins/image2/lang/eo.js +0 -21
  219. package/static/mapo/ckeditor/plugins/image2/lang/es-mx.js +0 -21
  220. package/static/mapo/ckeditor/plugins/image2/lang/es.js +0 -21
  221. package/static/mapo/ckeditor/plugins/image2/lang/et.js +0 -21
  222. package/static/mapo/ckeditor/plugins/image2/lang/eu.js +0 -21
  223. package/static/mapo/ckeditor/plugins/image2/lang/fa.js +0 -21
  224. package/static/mapo/ckeditor/plugins/image2/lang/fi.js +0 -21
  225. package/static/mapo/ckeditor/plugins/image2/lang/fo.js +0 -21
  226. package/static/mapo/ckeditor/plugins/image2/lang/fr-ca.js +0 -21
  227. package/static/mapo/ckeditor/plugins/image2/lang/fr.js +0 -21
  228. package/static/mapo/ckeditor/plugins/image2/lang/gl.js +0 -21
  229. package/static/mapo/ckeditor/plugins/image2/lang/gu.js +0 -21
  230. package/static/mapo/ckeditor/plugins/image2/lang/he.js +0 -21
  231. package/static/mapo/ckeditor/plugins/image2/lang/hi.js +0 -21
  232. package/static/mapo/ckeditor/plugins/image2/lang/hr.js +0 -21
  233. package/static/mapo/ckeditor/plugins/image2/lang/hu.js +0 -21
  234. package/static/mapo/ckeditor/plugins/image2/lang/id.js +0 -21
  235. package/static/mapo/ckeditor/plugins/image2/lang/is.js +0 -21
  236. package/static/mapo/ckeditor/plugins/image2/lang/it.js +0 -21
  237. package/static/mapo/ckeditor/plugins/image2/lang/ja.js +0 -21
  238. package/static/mapo/ckeditor/plugins/image2/lang/ka.js +0 -21
  239. package/static/mapo/ckeditor/plugins/image2/lang/km.js +0 -21
  240. package/static/mapo/ckeditor/plugins/image2/lang/ko.js +0 -21
  241. package/static/mapo/ckeditor/plugins/image2/lang/ku.js +0 -21
  242. package/static/mapo/ckeditor/plugins/image2/lang/lt.js +0 -21
  243. package/static/mapo/ckeditor/plugins/image2/lang/lv.js +0 -21
  244. package/static/mapo/ckeditor/plugins/image2/lang/mk.js +0 -21
  245. package/static/mapo/ckeditor/plugins/image2/lang/mn.js +0 -21
  246. package/static/mapo/ckeditor/plugins/image2/lang/ms.js +0 -21
  247. package/static/mapo/ckeditor/plugins/image2/lang/nb.js +0 -21
  248. package/static/mapo/ckeditor/plugins/image2/lang/nl.js +0 -21
  249. package/static/mapo/ckeditor/plugins/image2/lang/no.js +0 -21
  250. package/static/mapo/ckeditor/plugins/image2/lang/oc.js +0 -21
  251. package/static/mapo/ckeditor/plugins/image2/lang/pl.js +0 -21
  252. package/static/mapo/ckeditor/plugins/image2/lang/pt-br.js +0 -21
  253. package/static/mapo/ckeditor/plugins/image2/lang/pt.js +0 -21
  254. package/static/mapo/ckeditor/plugins/image2/lang/ro.js +0 -21
  255. package/static/mapo/ckeditor/plugins/image2/lang/ru.js +0 -21
  256. package/static/mapo/ckeditor/plugins/image2/lang/si.js +0 -21
  257. package/static/mapo/ckeditor/plugins/image2/lang/sk.js +0 -21
  258. package/static/mapo/ckeditor/plugins/image2/lang/sl.js +0 -21
  259. package/static/mapo/ckeditor/plugins/image2/lang/sq.js +0 -21
  260. package/static/mapo/ckeditor/plugins/image2/lang/sr-latn.js +0 -21
  261. package/static/mapo/ckeditor/plugins/image2/lang/sr.js +0 -21
  262. package/static/mapo/ckeditor/plugins/image2/lang/sv.js +0 -21
  263. package/static/mapo/ckeditor/plugins/image2/lang/th.js +0 -21
  264. package/static/mapo/ckeditor/plugins/image2/lang/tr.js +0 -21
  265. package/static/mapo/ckeditor/plugins/image2/lang/tt.js +0 -21
  266. package/static/mapo/ckeditor/plugins/image2/lang/ug.js +0 -21
  267. package/static/mapo/ckeditor/plugins/image2/lang/uk.js +0 -21
  268. package/static/mapo/ckeditor/plugins/image2/lang/vi.js +0 -21
  269. package/static/mapo/ckeditor/plugins/image2/lang/zh-cn.js +0 -21
  270. package/static/mapo/ckeditor/plugins/image2/lang/zh.js +0 -21
  271. package/static/mapo/ckeditor/plugins/image2/plugin.js +0 -1798
  272. package/static/mapo/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  273. package/static/mapo/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  274. package/static/mapo/ckeditor/plugins/image2/samples/image2.html +0 -68
  275. package/static/mapo/ckeditor/skins/moono/dev/icons16.png +0 -0
  276. package/static/mapo/ckeditor/skins/moono/dev/icons16.svg +0 -2374
  277. package/static/mapo/ckeditor/skins/moono/dev/icons32.png +0 -0
  278. package/static/mapo/ckeditor/skins/moono/dev/icons32.svg +0 -2722
  279. package/static/mapo/ckeditor/skins/moono/dev/locations.json +0 -144
  280. package/static/mapo/ckeditor/skins/moono/dialog.css +0 -5
  281. package/static/mapo/ckeditor/skins/moono/dialog_ie.css +0 -5
  282. package/static/mapo/ckeditor/skins/moono/dialog_ie7.css +0 -5
  283. package/static/mapo/ckeditor/skins/moono/dialog_ie8.css +0 -5
  284. package/static/mapo/ckeditor/skins/moono/dialog_iequirks.css +0 -5
  285. package/static/mapo/ckeditor/skins/moono/editor.css +0 -5
  286. package/static/mapo/ckeditor/skins/moono/editor_gecko.css +0 -5
  287. package/static/mapo/ckeditor/skins/moono/editor_ie.css +0 -5
  288. package/static/mapo/ckeditor/skins/moono/editor_ie7.css +0 -5
  289. package/static/mapo/ckeditor/skins/moono/editor_ie8.css +0 -5
  290. package/static/mapo/ckeditor/skins/moono/editor_iequirks.css +0 -5
  291. package/static/mapo/ckeditor/skins/moono/icons.png +0 -0
  292. package/static/mapo/ckeditor/skins/moono/icons_hidpi.png +0 -0
  293. package/static/mapo/ckeditor/skins/moono/images/anchor.png +0 -0
  294. package/static/mapo/ckeditor/skins/moono/images/arrow.png +0 -0
  295. package/static/mapo/ckeditor/skins/moono/images/close.png +0 -0
  296. package/static/mapo/ckeditor/skins/moono/images/hidpi/anchor.png +0 -0
  297. package/static/mapo/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  298. package/static/mapo/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  299. package/static/mapo/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  300. package/static/mapo/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  301. package/static/mapo/ckeditor/skins/moono/images/lock-open.png +0 -0
  302. package/static/mapo/ckeditor/skins/moono/images/lock.png +0 -0
  303. package/static/mapo/ckeditor/skins/moono/images/refresh.png +0 -0
  304. package/static/mapo/ckeditor/skins/moono/images/spinner.gif +0 -0
  305. package/static/mapo/ckeditor/skins/moono/readme.md +0 -49
  306. package/static/mapo/ckeditor/skins/moono/skin.js +0 -10
  307. package/static/mapo/ckeditor/skins/moono-dark/dialog.css +0 -5
  308. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie.css +0 -5
  309. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie7.css +0 -5
  310. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie8.css +0 -5
  311. package/static/mapo/ckeditor/skins/moono-dark/dialog_iequirks.css +0 -5
  312. package/static/mapo/ckeditor/skins/moono-dark/editor.css +0 -5
  313. package/static/mapo/ckeditor/skins/moono-dark/editor_gecko.css +0 -5
  314. package/static/mapo/ckeditor/skins/moono-dark/editor_ie.css +0 -5
  315. package/static/mapo/ckeditor/skins/moono-dark/editor_ie7.css +0 -5
  316. package/static/mapo/ckeditor/skins/moono-dark/editor_ie8.css +0 -5
  317. package/static/mapo/ckeditor/skins/moono-dark/editor_iequirks.css +0 -5
  318. package/static/mapo/ckeditor/skins/moono-dark/icons.png +0 -0
  319. package/static/mapo/ckeditor/skins/moono-dark/icons_hidpi.png +0 -0
  320. package/static/mapo/ckeditor/skins/moono-dark/images/arrow.png +0 -0
  321. package/static/mapo/ckeditor/skins/moono-dark/images/close.png +0 -0
  322. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/close.png +0 -0
  323. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock-open.png +0 -0
  324. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock.png +0 -0
  325. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/refresh.png +0 -0
  326. package/static/mapo/ckeditor/skins/moono-dark/images/lock-open.png +0 -0
  327. package/static/mapo/ckeditor/skins/moono-dark/images/lock.png +0 -0
  328. package/static/mapo/ckeditor/skins/moono-dark/images/refresh.png +0 -0
  329. package/static/mapo/ckeditor/skins/moono-dark/readme.md +0 -51
  330. package/static/mapo/ckeditor/skins/moono-dark/skin.js +0 -5
  331. package/static/mapo/favicon.ico +0 -0
  332. package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +0 -7
  333. package/static/mapo/tinymce-skins/mapo-dark/content.min.css +0 -7
  334. package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +0 -7
  335. package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +0 -7
  336. package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +0 -7
  337. package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +0 -7
  338. package/static/mapo/tinymce-skins/mapo-light/content.min.css +0 -7
  339. package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +0 -7
  340. package/static/mapo/tinymce-skins/mapo-light/skin.min.css +0 -7
  341. package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +0 -7
  342. package/translations/en-US.js +0 -177
  343. package/translations/it-IT.js +0 -180
@@ -1,618 +0,0 @@
1
- <template>
2
- <div class="container pa-0">
3
- <div class="d-flex justify-space-between">
4
- <span class="repeater-label text--secondary">{{ label }}:</span>
5
- <v-btn v-if="collapsable" outlined tile text small @click="collapseAll">{{
6
- $t("mapo.collapse")
7
- }}</v-btn>
8
- </div>
9
- <draggable
10
- v-model="items"
11
- handle=".repeater-handle-sort"
12
- animation="150"
13
- @change="draggableReorder($event)"
14
- :style="maxHeightStyle"
15
- >
16
- <div
17
- class="repeater-line-wrapper"
18
- :class="{ expanded: !collapsable || isExpanded(index) }"
19
- v-for="(model, index) in items"
20
- :key="index"
21
- >
22
- <div class="d-flex">
23
- <div v-if="collapsable" class="collapsed-preview">
24
- <v-icon class="expand-icon" @click.native="toggleExpand(index)"
25
- >mdi-chevron-down</v-icon
26
- >
27
- <span
28
- class="v-label collapsed-label"
29
- @click="toggleExpand(index, true)"
30
- v-html="getCollapsedLabel(model, index)"
31
- ></span>
32
- </div>
33
- <div v-if="isExpanded(index)" class="repeater-fields">
34
- <v-container>
35
- <Form
36
- v-model="items[index]"
37
- :currentLang="translatable ? currentLang : null"
38
- :languages="langs"
39
- :fields="getFields(model)"
40
- :errors="getErrors(index)"
41
- :readonly="readonly"
42
- immediate
43
- >
44
- <template
45
- v-for="(slot, name) in templateSlots(model, $slots)"
46
- :slot="slot"
47
- >
48
- <slot :name="name"></slot>
49
- </template>
50
- <template
51
- v-for="(slot, name) in templateSlots(model, $scopedSlots)"
52
- v-slot:[slot]="props"
53
- >
54
- <slot :name="name" v-bind="props" />
55
- </template>
56
- </Form>
57
- </v-container>
58
- </div>
59
- <div class="repeater-side-bar grey lighten-2">
60
- <span
61
- class="repeater-counter grey--text text--darken-2 text-truncate"
62
- >{{ index + 1 }}</span
63
- >
64
- <v-tooltip right>
65
- <template v-slot:activator="{ on, attrs }">
66
- <v-icon
67
- v-if="!readonly && sortable"
68
- v-bind="attrs"
69
- v-on="on"
70
- color="grey darken-3"
71
- class="grey lighten-2 repeater-action repeater-add-line-index"
72
- @click="addItem(index)"
73
- >mdi-plus-circle-outline</v-icon
74
- >
75
- </template>
76
- <span>{{ $t("mapo.repeater.addHere") }}</span>
77
- </v-tooltip>
78
- <v-tooltip right>
79
- <template v-slot:activator="{ on, attrs }">
80
- <v-hover v-slot="{ hover }">
81
- <v-icon
82
- v-if="!readonly"
83
- v-bind="attrs"
84
- v-on="on"
85
- :color="hover ? 'error' : 'grey darken-3'"
86
- class="repeater-action repeater-remove-line"
87
- @click="removeItem(index)"
88
- >mdi-minus-circle-outline</v-icon
89
- >
90
- </v-hover>
91
- </template>
92
- <span>{{ $t("mapo.remove") }}</span>
93
- </v-tooltip>
94
- <v-icon
95
- v-if="!readonly && sortable"
96
- color="grey darken-3"
97
- class="repeater-action repeater-handle-sort"
98
- >mdi-drag-horizontal</v-icon
99
- >
100
- </div>
101
- </div>
102
- </div>
103
- </draggable>
104
- <v-divider />
105
- <div class="d-flex justify-end">
106
- <v-btn
107
- class="repeater-add-line"
108
- @click="addItem"
109
- :disabled="readonly"
110
- outlined
111
- tile
112
- text
113
- >
114
- <v-icon>mdi-plus</v-icon> {{ $t("mapo.add") }}</v-btn
115
- >
116
- </div>
117
- <v-dialog v-if="hasTemplates" v-model="tModalOpen" width="600" scrollable>
118
- <v-card>
119
- <v-card-title class="text-h5">{{
120
- $t("mapo.repeater.selectTemplate")
121
- }}</v-card-title>
122
- <v-card-text>
123
- <div class="row mt-4">
124
- <div
125
- v-for="(template, i) in templates"
126
- :key="i"
127
- class="col-12 col-md-6 pa-0"
128
- >
129
- <div @click="tModalCallback(template)" class="template-button">
130
- <span class="text-h5">{{ template.name }}</span
131
- ><br />
132
- <span>{{ template.description }}</span>
133
- <v-img
134
- v-if="template.preview"
135
- max-height="150"
136
- min-width="250px"
137
- :src="template.preview"
138
- />
139
- <v-skeleton-loader
140
- v-else
141
- boilerplate
142
- min-width="250px"
143
- type="list-item-avatar-three-line"
144
- />
145
- </div>
146
- </div>
147
- </div>
148
- </v-card-text>
149
- </v-card>
150
- </v-dialog>
151
- </div>
152
- </template>
153
-
154
- <style lang="scss" scoped>
155
- .repeater-action {
156
- display: none;
157
- }
158
- .repeater-fields {
159
- display: none;
160
- overflow: hidden;
161
- width: 100%;
162
- }
163
- .expand-icon {
164
- cursor: pointer;
165
- transform: rotate(0deg);
166
- transition: transform 225ms cubic-bezier(0.4, 0, 0.2, 1);
167
- }
168
- .collapsed-preview {
169
- flex-basis: 100%;
170
- display: flex;
171
- align-items: flex-start;
172
- }
173
- .collapsed-label {
174
- cursor: pointer;
175
- flex-basis: 100%;
176
- margin: 15px;
177
- text-align: center;
178
- display: -webkit-box;
179
- -webkit-line-clamp: 2;
180
- -webkit-box-orient: vertical;
181
- overflow: hidden;
182
- text-overflow: ellipsis;
183
- }
184
- .theme--light .repeater-line-wrapper {
185
- border-color: rgba(0, 0, 0, 0.12);
186
- }
187
- .repeater-line-wrapper {
188
- border: 1px solid;
189
- border-bottom: none;
190
- border-color: rgba(255, 255, 255, 0.12);
191
- &:hover {
192
- .repeater-action {
193
- display: inline-flex;
194
- }
195
- .repeater-counter {
196
- display: none;
197
- }
198
- }
199
- &.expanded {
200
- > div > div > .expand-icon {
201
- transform: rotate(180deg);
202
- }
203
- > div > div > .collapsed-label {
204
- display: none;
205
- }
206
- > div > .repeater-fields {
207
- display: flex;
208
- }
209
- > div > .collapsed-preview {
210
- flex-basis: 0;
211
- }
212
- }
213
- }
214
- .repeater-side-bar {
215
- min-width: 24px;
216
- position: relative;
217
- display: flex;
218
- flex-direction: column;
219
- align-content: center;
220
- justify-content: center;
221
- .repeater-counter {
222
- position: absolute;
223
- align-self: center;
224
- top: 10px;
225
- }
226
- .repeater-add-line-index {
227
- position: absolute;
228
- align-self: center;
229
- top: -11px;
230
- border-radius: 50%;
231
- }
232
- .repeater-handle-sort {
233
- position: absolute;
234
- align-self: center;
235
- bottom: 0px;
236
- height: 15px;
237
- overflow: hidden;
238
- cursor: grab;
239
- }
240
- }
241
- .repeater-add-line {
242
- border-top: none;
243
- }
244
- .template-button {
245
- padding: 0.5rem;
246
- margin: 3px;
247
- border: solid 1px #393939;
248
- cursor: pointer;
249
- }
250
- .theme--light .template-button {
251
- border-color: #e0e0e0;
252
- }
253
- </style>
254
-
255
- <script>
256
- import draggable from "vuedraggable";
257
- import { getPointed, deepClone } from "@mapomodule/utils/helpers/objHelpers";
258
- import { titleCase } from "@mapomodule/utils/helpers/formatters";
259
- import { nameSpacedSlots } from "@mapomodule/utils/helpers/slots";
260
-
261
- /**
262
- * This component is made to manage a list of object that can be added/removed/reordered with a simple form.
263
- */
264
- export default {
265
- name: "Repeater",
266
- components: {
267
- // For recursive dynamic components is better to resolve dependencies at runtime to avoid circular deps
268
- Form: () => import("@mapomodule/uikit/components/Form/Form.vue"),
269
- draggable,
270
- },
271
- data() {
272
- return {
273
- items: this.value ? deepClone(this.value) : [],
274
- tModalOpen: false,
275
- tModalCallback: () => {},
276
- collapsedStack: (this.value || []).map(() => !!this.collapsable),
277
- };
278
- },
279
- props: {
280
- // V-model of the array needed to edit the objects in realtime.
281
- value: {
282
- type: Array,
283
- default: () => [],
284
- },
285
- // The main configuration that determines the arrangement of the fields in each line. It can be an array or an object. More info [here](#how-to-configure-the-repeater)
286
- fields: {
287
- // [`Array<FieldConfiguration>`](/components/Detail/Detail/#fieldconfiguration)
288
- type: Array | Object,
289
- default: () => [],
290
- },
291
- // Puts the input in an error state and passes through custom error messages.
292
- errorMessages: {
293
- type: Array,
294
- default: () => [],
295
- },
296
- // Sets input label.
297
- label: String,
298
- // Makes all the repeater items readonly.
299
- readonly: Boolean,
300
- // Makes the repeater field sortable.
301
- sortable: Boolean,
302
- // Makes the repeater field collapsable.
303
- collapsable: Boolean,
304
- // Make the repeater multilanguage. This means that it's going to inherit the languages and the current language from the parent detail component, creating the translations for each line of the repeater.
305
- translatable: Boolean,
306
- // This callback is called during sort/add/remove item if the Repeater is sortable. Use this callback to change some prop of the items in the list.
307
- sortCallback: {
308
- type: Function,
309
- default: () => {},
310
- },
311
- // With this you can define the output of the collapsed label. You can enter the pointed path of a value in the row or a callback function to extract the label from the row.
312
- collapsedLabel: {
313
- type: String | Function,
314
- default: null,
315
- },
316
- // This is mainly an internal property. It is used by DetailField to pass the list of languages inherited from the Detail component.
317
- langs: {
318
- // `Array<String>`
319
- type: Array,
320
- default() {
321
- return this.$mapo.$options?.content?.languages || [];
322
- },
323
- },
324
- // This is mainly an internal property. It is used by DetailField to pass the active language inherited from the Detail component.
325
- currentLang: String,
326
- maxHeight: String | Number,
327
- },
328
- watch: {
329
- value(val) {
330
- const isEmpty = (v) => !v || Object.keys(v).length == 0;
331
- if (
332
- (isEmpty(val) && isEmpty(this.items)) ||
333
- JSON.stringify(val) === JSON.stringify(this.items)
334
- )
335
- return;
336
- this.items = (val && deepClone(val)) || [];
337
- if (val.length != this.collapsedStack.length)
338
- this.collapsedStack = (val || []).map(() => !!this.collapsable);
339
- },
340
- items: {
341
- handler(val) {
342
- this.$emit("input", deepClone(val));
343
- },
344
- deep: true,
345
- },
346
- tModalOpen(val) {
347
- !val && this.tModalCallback();
348
- },
349
- },
350
- methods: {
351
- isExpanded(index) {
352
- return !this.collapsedStack[index];
353
- },
354
- async addItem(index) {
355
- const element = {};
356
- if (this.hasTemplates) {
357
- const template = await this.chooseTemplate();
358
- if (!template) return;
359
- element[template.tCodeField] = template.tCode;
360
- }
361
- const newIndex = typeof index == "number" ? index : this.items.length;
362
- this.items.splice(newIndex, 0, element);
363
- this.collapsedStack.splice(newIndex, 0, false);
364
- this.sortable &&
365
- this.sortCallback({
366
- moved: { element, newIndex },
367
- items: this.items,
368
- eventType: "add",
369
- });
370
- },
371
- removeItem(index) {
372
- const element = this.items[index];
373
- this.items.splice(index, 1);
374
- this.collapsedStack.splice(index, 1);
375
- this.sortable &&
376
- this.sortCallback({
377
- moved: { element, oldIndex: index },
378
- items: this.items,
379
- eventType: "remove",
380
- });
381
- },
382
- async chooseTemplate() {
383
- this.tModalOpen = true;
384
- return new Promise((resolve) => {
385
- this.tModalCallback = function (template) {
386
- resolve(template);
387
- this.tModalCallback = () => {};
388
- this.tModalOpen = false;
389
- };
390
- });
391
- },
392
- getErrors(index) {
393
- return (this.errorMessages || [])[index] || {};
394
- },
395
- getFields(model) {
396
- if (this.hasTemplates) {
397
- const template = this.templates.find(
398
- (t) => model[t.tCodeField] == t.tCode
399
- );
400
- return template ? template.fields : [];
401
- }
402
- return this.fields;
403
- },
404
- templateSlots(model, slots) {
405
- if (this.hasTemplates) {
406
- const template = this.templates.find(
407
- (t) => model[t.tCodeField] == t.tCode
408
- );
409
- return nameSpacedSlots(slots, `template.${template.tCode}.`).reduce(
410
- (acc, v) => ({ [`template.${template.tCode}.${v}`]: v, ...acc }),
411
- {}
412
- );
413
- }
414
- return Object.keys(slots).reduce((acc, v) => ({ [v]: v, ...acc }), {});
415
- },
416
- getCollapsedLabel(model, index) {
417
- const fallback = this.$t("mapo.repeater.item", { numberItem: index + 1 });
418
- switch (typeof this.collapsedLabel) {
419
- case "string":
420
- return getPointed(model, this.collapsedLabel, fallback);
421
- case "function":
422
- return this.collapsedLabel(model);
423
- default:
424
- const field = this.getFields(model).find(
425
- (f) => !f.type || f.type.toLowerCase() == "text"
426
- );
427
- return getPointed(model, field.value, fallback);
428
- }
429
- },
430
- draggableReorder(event) {
431
- const { newIndex, oldIndex } = event.moved;
432
- const stackItem = this.collapsedStack[oldIndex];
433
- this.collapsedStack.splice(oldIndex, 1);
434
- this.collapsedStack.splice(newIndex, 0, stackItem);
435
- this.sortCallback({ ...event, items: this.items, eventType: "move" });
436
- },
437
- toggleExpand(index, forceValue) {
438
- this.collapsedStack[index] =
439
- forceValue == undefined ? !this.collapsedStack[index] : !forceValue;
440
- this.collapsedStack = [...this.collapsedStack];
441
- },
442
- collapseAll() {
443
- this.collapsedStack = this.collapsedStack.map(() => true);
444
- },
445
- },
446
- computed: {
447
- hasTemplates() {
448
- return typeof this.fields == "object" && !Array.isArray(this.fields);
449
- },
450
- templates() {
451
- const templates = {};
452
- if (this.hasTemplates) {
453
- Object.keys(this.fields).forEach((tKey) => {
454
- const tValue = this.fields[tKey];
455
- const { preview, description } = tValue;
456
- templates[tKey] = {
457
- fields: tValue.fields || tValue,
458
- name: tValue.name || titleCase(tKey.replace(/_/, " ")),
459
- tCode: tValue.tCode || tKey,
460
- tCodeField: tValue.tCodeField || "tCode",
461
- preview,
462
- description,
463
- };
464
- });
465
- }
466
- return Object.values(templates);
467
- },
468
- maxHeightStyle() {
469
- if (this.maxHeight !== undefined) {
470
- const maxHeight = isNaN(this.maxHeight)
471
- ? this.maxHeight
472
- : `${this.maxHeight}px`;
473
- return {
474
- maxHeight,
475
- paddingTop: "15px",
476
- overflowX: "hidden",
477
- overflowY: "auto",
478
- };
479
- }
480
- },
481
- },
482
- };
483
- </script>
484
-
485
- <docs>
486
-
487
-
488
- ## How to configure the repeater
489
-
490
- In the Repeater the most important attr is the `fields` attr.
491
- Through the `fields` attr you can configure your repeater. It accepts an array of [`FieldConfiguration`](/components/Detail/Detail/#fieldconfiguration) or an object.
492
- In the case of the [`FieldConfiguration`](/components/Detail/Detail/#fieldconfiguration) array the result will be a **Simple Repeater**: each line will have the same fields as the previous one.
493
- In case we use an object instead of the array we are configuring the Repeater to manage different templates.
494
- A **Template Repeater** is a repeater that allows the user to choose a different template for each line.
495
- Each key of the object represents a different template. Each value of these keys is an array of [`FieldConfiguration`](/components/Detail/Detail/#fieldconfiguration).
496
- In this way we can define how many templates we want and leave the user the choice on the fields to be inserted for each line.
497
- The keys of the "template" configuration can also be objects.
498
- Using objects we can better specify some additional properties of the template.
499
-
500
- #### The template configuration
501
-
502
- |Name|Description|Type|Required|Default|
503
- |---|---|---|---|---|
504
- |name|The name of the template.|`String`|`false`|The key name of the template|
505
- |description|The description of the template.|`String`|`false`|`null`|
506
- |preview|The preview image of the template. It must be an image url.|`String`|`false`|A skeleton boilerplate placeholder|
507
- |tCode|The identifier of the template.|`String`|`false`|The key name of the template|
508
- |tCodeField|The key where the repeater saves the template identifier in the row|`String`|`false`|`tCode`|
509
- |fields|The actual fields of the template.|[`Array<FieldConfiguration>`](/components/Detail/Detail/#fieldconfiguration)|`true`|-|
510
-
511
-
512
- <br><br>
513
-
514
- #### Example of a Simple Repeater configuration:
515
- This is an example of the fields attr.
516
- ```js
517
- [ // here we have only the list of fields
518
- { value: "sku", class: "col-md-6" },
519
- { value: "name", class: "col-md-6" },
520
- ]
521
- ```
522
- #### Example of a Template Repeater configuration:
523
- This is an example of the fields attr.
524
- ```js
525
- { // here we have the object that contains the templates
526
- template_1: [ // This template prvides only the list of fields. Other configurations will falback to defaults.
527
- { value: "title", class: "col-md-6" },
528
- { value: "subtitle", class: "col-md-6" },
529
- ],
530
- template_2: {
531
- name: "Custom template", // the name of the template. (by default it takes the key name `temlpate_2`)
532
- description: "custom description", // additional description.
533
- preview: "https://blog.openreplay.com/c4052718994cbc8eb6dac8c89c23ba06/img3.gif", // Custom preview image of the template.
534
- tCode: "titledatecontent", // this is the identifier of the template (by defaults it takes the key name `template_2`)
535
- tCodeField: "typology", // this is the key where the repeater saves the template type in the row. (by default `tCode`)
536
- fields: [ // the actual fields of the template.
537
- { value: "title", class: "col-md-6" },
538
- { value: "date", type: "date", class: "col-md-6" },
539
- { value: "content", type: "editor" },
540
- ],
541
- },
542
- }
543
- ```
544
-
545
- ## Live Demo
546
-
547
- <br>
548
-
549
- ::: warning LIVE DEMO 🎉🎉🎉
550
- This is an interactive example. You can play with it but remember that all http features are disabled since there is no backend server.
551
- :::
552
-
553
-
554
- ::: demo
555
- <template>
556
- <v-app>
557
- <div class="d-flex justify-end"><ThemeToggle/></div>
558
- <div>
559
- <h3>Simple Repeater:</h3>
560
- <Repeater v-model="data1" :fields="fields1" label="Contents" sortable />
561
- <h4>Contents:</h4>
562
- <pre style="background-color: unset">{{ data1 }}</pre>
563
- </div>
564
- <div>
565
- <h3>Repeater with templates:</h3>
566
- <Repeater v-model="data2" :fields="fields2" label="Contents" sortable />
567
- <h4>Contents:</h4>
568
- <pre style="background-color: unset">{{ data2 }}</pre>
569
- </div>
570
- <div>
571
- <h3>Translatable Repeater:</h3>
572
- <DetailLangSwitch class="mb-4" v-model="currentLanguage" :langs="languages"/>
573
- <Repeater v-model="data3" :fields="fields1" :langs="languages" :currentLang="currentLanguage" label="Contents" sortable translatable />
574
- <h4>Contents:</h4>
575
- <pre style="background-color: unset">{{ data3 }}</pre>
576
- </div>
577
- </v-app>
578
- </template>
579
-
580
- <script>
581
- export default {
582
- data() {
583
- return {
584
- data1: [],
585
- data2: [],
586
- data3: [],
587
- fields1: [
588
- { value: "sku", class: "col-md-6" },
589
- { value: "name", class: "col-md-6" },
590
- ],
591
- fields2: {
592
- template_1: [
593
- { value: "title", class: "col-md-6" },
594
- { value: "subtitle", class: "col-md-6" },
595
- ],
596
- template_2: {
597
- name: "Custom template",
598
- description: "custom description",
599
- preview:
600
- "https://blog.openreplay.com/c4052718994cbc8eb6dac8c89c23ba06/img3.gif",
601
- fields: [
602
- { value: "title", class: "col-md-6" },
603
- { value: "date", type: "date", class: "col-md-6" },
604
- { value: "content", type: "editor" },
605
- ],
606
- },
607
- },
608
- languages: ['it', 'en'],
609
- currentLanguage: 'it'
610
- };
611
- },
612
- };
613
- </script>
614
- :::
615
-
616
-
617
-
618
- </docs>
@@ -1,89 +0,0 @@
1
- <template>
2
- <div class="container">
3
- <div class="preview">
4
- <span class="preview__title">{{ getTitle }}</span>
5
- <br />
6
- <span class="preview__url">{{domain}}{{ getPermalink }}</span>
7
- <br />
8
- <span class="preview__desc">{{ getDescription }}</span>
9
- </div>
10
- </div>
11
- </template>
12
-
13
- <style lang="scss" scoped>
14
- .container {
15
- background: #ffffff;
16
- border-radius: 3px;
17
- }
18
- .preview {
19
- display: block;
20
- max-width: 32em;
21
- margin: 30px 8px;
22
- &__title {
23
- color: #035ac6;
24
- font-size: 1.2em;
25
- cursor: pointer;
26
- &:hover {
27
- text-decoration: underline;
28
- }
29
- }
30
- &__url {
31
- color: green;
32
- font-size: 0.92em;
33
- }
34
- &__desc {
35
- color: #9b9da1;
36
- }
37
- }
38
- </style>
39
-
40
- <script>
41
- /**
42
- * This component is used to make a preview of seo data.
43
- */
44
- export default {
45
- name: "SeoPreview",
46
- props: {
47
- // V-model for DetailField (need to be an object `{title, permalink, description}`)
48
- value:{
49
- type: Object,
50
- default: () => {}
51
- },
52
- // Seo title
53
- title: {
54
- type: String
55
- },
56
- // Seo permalink
57
- permalink: {
58
- type: String,
59
- default: "how-to-dive"
60
- },
61
- // Seo description
62
- description: {
63
- type: String
64
- },
65
- domain: {
66
- type: String,
67
- default: process.browser ? `${window.location.origin}/` : ""
68
- }
69
- },
70
- computed: {
71
- getTitle(){
72
- if (this.value && this.value.title)
73
- return this.value.title
74
- return this.title || this.$t("mapo.seoPreview.title")
75
- },
76
- getPermalink(){
77
- if (this.value && this.value.permalink)
78
- return this.value.permalink
79
- return this.permalink
80
- },
81
- getDescription(){
82
- if (this.value && this.value.description)
83
- return this.value.description
84
- return this.description || this.$t("mapo.seoPreview.description")
85
- }
86
- },
87
-
88
- };
89
- </script>