@mapomodule/uikit 1.0.0 → 2.0.0-beta.10

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 (427) hide show
  1. package/README.md +199 -0
  2. package/dist/index.d.mts +5 -0
  3. package/dist/index.d.ts +6 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.mjs +1 -0
  6. package/dist/module.d.mts +60 -0
  7. package/dist/module.d.ts +55 -0
  8. package/dist/module.d.ts.map +1 -0
  9. package/dist/module.json +9 -0
  10. package/dist/module.mjs +179 -0
  11. package/dist/runtime/adapters/defaultMediaAdapter.d.ts +14 -0
  12. package/dist/runtime/adapters/defaultMediaAdapter.d.ts.map +1 -0
  13. package/dist/runtime/adapters/defaultMediaAdapter.js +30 -0
  14. package/dist/runtime/assets/main.css +1 -0
  15. package/dist/runtime/components/MapoConfirmDialog.vue +35 -0
  16. package/dist/runtime/components/MapoConfirmDialog.vue.d.ts +4 -0
  17. package/dist/runtime/components/MapoConfirmDialog.vue.d.ts.map +1 -0
  18. package/dist/runtime/components/MapoDetail.vue +606 -0
  19. package/dist/runtime/components/MapoDetail.vue.d.ts +401 -0
  20. package/dist/runtime/components/MapoDetail.vue.d.ts.map +1 -0
  21. package/dist/runtime/components/MapoDetailLangSwitch.vue +126 -0
  22. package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts +23 -0
  23. package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts.map +1 -0
  24. package/dist/runtime/components/MapoDropArea.vue +99 -0
  25. package/dist/runtime/components/MapoDropArea.vue.d.ts +33 -0
  26. package/dist/runtime/components/MapoDropArea.vue.d.ts.map +1 -0
  27. package/dist/runtime/components/MapoLangSwitcher.vue +39 -0
  28. package/dist/runtime/components/MapoLangSwitcher.vue.d.ts +18 -0
  29. package/dist/runtime/components/MapoLangSwitcher.vue.d.ts.map +1 -0
  30. package/dist/runtime/components/MapoList.vue +191 -0
  31. package/dist/runtime/components/MapoList.vue.d.ts +111 -0
  32. package/dist/runtime/components/MapoList.vue.d.ts.map +1 -0
  33. package/dist/runtime/components/MapoListActions.vue +119 -0
  34. package/dist/runtime/components/MapoListActions.vue.d.ts +33 -0
  35. package/dist/runtime/components/MapoListActions.vue.d.ts.map +1 -0
  36. package/dist/runtime/components/MapoListFilters.vue +246 -0
  37. package/dist/runtime/components/MapoListFilters.vue.d.ts +38 -0
  38. package/dist/runtime/components/MapoListFilters.vue.d.ts.map +1 -0
  39. package/dist/runtime/components/MapoListHead.vue +9 -0
  40. package/dist/runtime/components/MapoListHead.vue.d.ts +14 -0
  41. package/dist/runtime/components/MapoListHead.vue.d.ts.map +1 -0
  42. package/dist/runtime/components/MapoListQuickEdit.vue +123 -0
  43. package/dist/runtime/components/MapoListQuickEdit.vue.d.ts +47 -0
  44. package/dist/runtime/components/MapoListQuickEdit.vue.d.ts.map +1 -0
  45. package/dist/runtime/components/MapoListTable.vue +665 -0
  46. package/dist/runtime/components/MapoListTable.vue.d.ts +105 -0
  47. package/dist/runtime/components/MapoListTable.vue.d.ts.map +1 -0
  48. package/dist/runtime/components/MapoListTabs.vue +38 -0
  49. package/dist/runtime/components/MapoListTabs.vue.d.ts +26 -0
  50. package/dist/runtime/components/MapoListTabs.vue.d.ts.map +1 -0
  51. package/dist/runtime/components/MapoLogin.vue +196 -0
  52. package/dist/runtime/components/MapoLogin.vue.d.ts +22 -0
  53. package/dist/runtime/components/MapoLogin.vue.d.ts.map +1 -0
  54. package/dist/runtime/components/MapoLogoutButton.vue +27 -0
  55. package/dist/runtime/components/MapoLogoutButton.vue.d.ts +29 -0
  56. package/dist/runtime/components/MapoLogoutButton.vue.d.ts.map +1 -0
  57. package/dist/runtime/components/MapoMediaBreadcrumbs.vue +47 -0
  58. package/dist/runtime/components/MapoMediaBreadcrumbs.vue.d.ts +4 -0
  59. package/dist/runtime/components/MapoMediaBreadcrumbs.vue.d.ts.map +1 -0
  60. package/dist/runtime/components/MapoMediaEditor.vue +320 -0
  61. package/dist/runtime/components/MapoMediaEditor.vue.d.ts +8 -0
  62. package/dist/runtime/components/MapoMediaEditor.vue.d.ts.map +1 -0
  63. package/dist/runtime/components/MapoMediaFileChanger.vue +112 -0
  64. package/dist/runtime/components/MapoMediaFileChanger.vue.d.ts +15 -0
  65. package/dist/runtime/components/MapoMediaFileChanger.vue.d.ts.map +1 -0
  66. package/dist/runtime/components/MapoMediaFolders.vue +220 -0
  67. package/dist/runtime/components/MapoMediaFolders.vue.d.ts +4 -0
  68. package/dist/runtime/components/MapoMediaFolders.vue.d.ts.map +1 -0
  69. package/dist/runtime/components/MapoMediaGallery.vue +219 -0
  70. package/dist/runtime/components/MapoMediaGallery.vue.d.ts +4 -0
  71. package/dist/runtime/components/MapoMediaGallery.vue.d.ts.map +1 -0
  72. package/dist/runtime/components/MapoMediaManager.vue +140 -0
  73. package/dist/runtime/components/MapoMediaManager.vue.d.ts +35 -0
  74. package/dist/runtime/components/MapoMediaManager.vue.d.ts.map +1 -0
  75. package/dist/runtime/components/MapoMediaManagerDialog.vue +116 -0
  76. package/dist/runtime/components/MapoMediaManagerDialog.vue.d.ts +41 -0
  77. package/dist/runtime/components/MapoMediaManagerDialog.vue.d.ts.map +1 -0
  78. package/dist/runtime/components/MapoMediaPreview.vue +92 -0
  79. package/dist/runtime/components/MapoMediaPreview.vue.d.ts +19 -0
  80. package/dist/runtime/components/MapoMediaPreview.vue.d.ts.map +1 -0
  81. package/dist/runtime/components/MapoMediaUploader.vue +290 -0
  82. package/dist/runtime/components/MapoMediaUploader.vue.d.ts +8 -0
  83. package/dist/runtime/components/MapoMediaUploader.vue.d.ts.map +1 -0
  84. package/dist/runtime/components/MapoMenuManager.vue +273 -0
  85. package/dist/runtime/components/MapoMenuManager.vue.d.ts +92 -0
  86. package/dist/runtime/components/MapoMenuManager.vue.d.ts.map +1 -0
  87. package/dist/runtime/components/MapoMenuNodeEditor.vue +201 -0
  88. package/dist/runtime/components/MapoMenuNodeEditor.vue.d.ts +61 -0
  89. package/dist/runtime/components/MapoMenuNodeEditor.vue.d.ts.map +1 -0
  90. package/dist/runtime/components/MapoMenuTreeview.vue +181 -0
  91. package/dist/runtime/components/MapoMenuTreeview.vue.d.ts +57 -0
  92. package/dist/runtime/components/MapoMenuTreeview.vue.d.ts.map +1 -0
  93. package/dist/runtime/components/MapoMenuTreeviewNode.vue +175 -0
  94. package/dist/runtime/components/MapoMenuTreeviewNode.vue.d.ts +27 -0
  95. package/dist/runtime/components/MapoMenuTreeviewNode.vue.d.ts.map +1 -0
  96. package/dist/runtime/components/MapoRootComponents.vue +9 -0
  97. package/dist/runtime/components/MapoRootComponents.vue.d.ts +4 -0
  98. package/dist/runtime/components/MapoRootComponents.vue.d.ts.map +1 -0
  99. package/dist/runtime/components/MapoSidebar.vue +89 -0
  100. package/dist/runtime/components/MapoSidebar.vue.d.ts +22 -0
  101. package/dist/runtime/components/MapoSidebar.vue.d.ts.map +1 -0
  102. package/dist/runtime/components/MapoSidebarList.vue +27 -0
  103. package/dist/runtime/components/MapoSidebarList.vue.d.ts +8 -0
  104. package/dist/runtime/components/MapoSidebarList.vue.d.ts.map +1 -0
  105. package/dist/runtime/components/MapoSidebarListItem.vue +74 -0
  106. package/dist/runtime/components/MapoSidebarListItem.vue.d.ts +9 -0
  107. package/dist/runtime/components/MapoSidebarListItem.vue.d.ts.map +1 -0
  108. package/dist/runtime/components/MapoSidebarProfile.vue +55 -0
  109. package/dist/runtime/components/MapoSidebarProfile.vue.d.ts +10 -0
  110. package/dist/runtime/components/MapoSidebarProfile.vue.d.ts.map +1 -0
  111. package/dist/runtime/components/MapoSnackBar.vue +38 -0
  112. package/dist/runtime/components/MapoSnackBar.vue.d.ts +4 -0
  113. package/dist/runtime/components/MapoSnackBar.vue.d.ts.map +1 -0
  114. package/dist/runtime/components/MapoThemeToggle.vue +23 -0
  115. package/dist/runtime/components/MapoThemeToggle.vue.d.ts +4 -0
  116. package/dist/runtime/components/MapoThemeToggle.vue.d.ts.map +1 -0
  117. package/dist/runtime/components/MapoTopbar.vue +30 -0
  118. package/dist/runtime/components/MapoTopbar.vue.d.ts +15 -0
  119. package/dist/runtime/components/MapoTopbar.vue.d.ts.map +1 -0
  120. package/dist/runtime/components/menuDndContext.d.ts +19 -0
  121. package/dist/runtime/components/menuDndContext.d.ts.map +1 -0
  122. package/dist/runtime/components/menuDndContext.js +3 -0
  123. package/dist/runtime/layouts/default.vue +43 -0
  124. package/dist/runtime/layouts/default.vue.d.ts +20 -0
  125. package/dist/runtime/layouts/default.vue.d.ts.map +1 -0
  126. package/dist/runtime/layouts/empty.vue +9 -0
  127. package/dist/runtime/layouts/empty.vue.d.ts +14 -0
  128. package/dist/runtime/layouts/empty.vue.d.ts.map +1 -0
  129. package/dist/runtime/page-meta.nuxt.d.ts +45 -0
  130. package/dist/runtime/pages/index.vue +14 -0
  131. package/dist/runtime/pages/index.vue.d.ts +4 -0
  132. package/dist/runtime/pages/index.vue.d.ts.map +1 -0
  133. package/dist/runtime/pages/login.vue +3 -0
  134. package/dist/runtime/pages/login.vue.d.ts +4 -0
  135. package/dist/runtime/pages/login.vue.d.ts.map +1 -0
  136. package/dist/runtime/plugins/media-adapter.d.ts +18 -0
  137. package/dist/runtime/plugins/media-adapter.d.ts.map +1 -0
  138. package/dist/runtime/plugins/media-adapter.js +8 -0
  139. package/dist/runtime/stores/media.d.ts +462 -0
  140. package/dist/runtime/stores/media.d.ts.map +1 -0
  141. package/dist/runtime/stores/media.js +344 -0
  142. package/dist/runtime/types/list.d.ts +59 -0
  143. package/dist/runtime/types/list.d.ts.map +1 -0
  144. package/dist/runtime/types/list.js +0 -0
  145. package/dist/runtime/types/media.d.ts +116 -0
  146. package/dist/runtime/types/media.d.ts.map +1 -0
  147. package/dist/runtime/types/media.js +0 -0
  148. package/dist/runtime/types/menu.d.ts +66 -0
  149. package/dist/runtime/types/menu.d.ts.map +1 -0
  150. package/dist/runtime/types/menu.js +30 -0
  151. package/dist/types.d.mts +9 -0
  152. package/package.json +67 -12
  153. package/src/index.ts +30 -0
  154. package/src/module.ts +311 -0
  155. package/src/runtime/adapters/defaultMediaAdapter.ts +57 -0
  156. package/src/runtime/assets/main.css +59 -0
  157. package/src/runtime/components/MapoConfirmDialog.vue +36 -0
  158. package/src/runtime/components/MapoDetail.vue +864 -0
  159. package/src/runtime/components/MapoDetailLangSwitch.vue +166 -0
  160. package/src/runtime/components/MapoDropArea.vue +127 -0
  161. package/src/runtime/components/MapoLangSwitcher.vue +74 -0
  162. package/src/runtime/components/MapoList.vue +339 -0
  163. package/src/runtime/components/MapoListActions.vue +158 -0
  164. package/src/runtime/components/MapoListFilters.vue +292 -0
  165. package/src/runtime/components/MapoListHead.vue +12 -0
  166. package/src/runtime/components/MapoListQuickEdit.vue +166 -0
  167. package/src/runtime/components/MapoListTable.vue +931 -0
  168. package/src/runtime/components/MapoListTabs.vue +48 -0
  169. package/src/runtime/components/MapoLogin.vue +212 -0
  170. package/src/runtime/components/MapoLogoutButton.vue +48 -0
  171. package/src/runtime/components/MapoMediaBreadcrumbs.vue +53 -0
  172. package/src/runtime/components/MapoMediaEditor.vue +350 -0
  173. package/src/runtime/components/MapoMediaFileChanger.vue +136 -0
  174. package/src/runtime/components/MapoMediaFolders.vue +239 -0
  175. package/src/runtime/components/MapoMediaGallery.vue +239 -0
  176. package/src/runtime/components/MapoMediaManager.vue +180 -0
  177. package/src/runtime/components/MapoMediaManagerDialog.vue +148 -0
  178. package/src/runtime/components/MapoMediaPreview.vue +111 -0
  179. package/src/runtime/components/MapoMediaUploader.vue +351 -0
  180. package/src/runtime/components/MapoMenuManager.vue +402 -0
  181. package/src/runtime/components/MapoMenuNodeEditor.vue +282 -0
  182. package/src/runtime/components/MapoMenuTreeview.vue +264 -0
  183. package/src/runtime/components/MapoMenuTreeviewNode.vue +234 -0
  184. package/src/runtime/components/MapoRootComponents.vue +9 -0
  185. package/src/runtime/components/MapoSidebar.vue +114 -0
  186. package/src/runtime/components/MapoSidebarList.vue +35 -0
  187. package/src/runtime/components/MapoSidebarListItem.vue +79 -0
  188. package/src/runtime/components/MapoSidebarProfile.vue +61 -0
  189. package/src/runtime/components/MapoSnackBar.vue +42 -0
  190. package/src/runtime/components/MapoThemeToggle.vue +27 -0
  191. package/src/runtime/components/MapoTopbar.vue +36 -0
  192. package/src/runtime/components/menuDndContext.ts +22 -0
  193. package/src/runtime/layouts/default.vue +53 -0
  194. package/src/runtime/layouts/empty.vue +9 -0
  195. package/src/runtime/page-meta.nuxt.d.ts +45 -0
  196. package/src/runtime/pages/index.vue +15 -0
  197. package/src/runtime/pages/login.vue +3 -0
  198. package/src/runtime/plugins/media-adapter.ts +33 -0
  199. package/src/runtime/stores/media.ts +474 -0
  200. package/src/runtime/types/list.ts +64 -0
  201. package/src/runtime/types/media.ts +126 -0
  202. package/src/runtime/types/menu.ts +105 -0
  203. package/CHANGELOG.md +0 -1030
  204. package/assets/mixins.scss +0 -22
  205. package/assets/variables.scss +0 -18
  206. package/components/ConfirmDialog.vue +0 -173
  207. package/components/Detail/Detail.vue +0 -696
  208. package/components/Detail/DetailLangSwitch.vue +0 -79
  209. package/components/DropArea.vue +0 -257
  210. package/components/Form/Form.vue +0 -218
  211. package/components/Form/FormField.vue +0 -216
  212. package/components/Form/FormGroup.vue +0 -146
  213. package/components/Form/FormTabs.vue +0 -188
  214. package/components/Form/defaults.js +0 -98
  215. package/components/Form/fields/ColorField.vue +0 -79
  216. package/components/Form/fields/DateField.vue +0 -77
  217. package/components/Form/fields/DateTimeField.vue +0 -271
  218. package/components/Form/fields/EnhancedMediaField.vue +0 -224
  219. package/components/Form/fields/FileField.vue +0 -125
  220. package/components/Form/fields/FksField.vue +0 -115
  221. package/components/Form/fields/MediaField.vue +0 -159
  222. package/components/Form/fields/MediaM2mField.vue +0 -149
  223. package/components/Form/fields/Repeater.vue +0 -618
  224. package/components/Form/fields/SeoPreview.vue +0 -89
  225. package/components/Form/fields/TimeField.vue +0 -154
  226. package/components/Form/fields/mapField/leaflet.injector.js +0 -39
  227. package/components/Form/fields/mapField/mapField.vue +0 -350
  228. package/components/Form/fields/wygEditor/defaults.js +0 -25
  229. package/components/Form/fields/wygEditor/utils/events.js +0 -64
  230. package/components/Form/fields/wygEditor/utils/mapomedia.plugin.js +0 -32
  231. package/components/Form/fields/wygEditor/utils/tinymce.injector.js +0 -29
  232. package/components/Form/fields/wygEditor/wygEditor.vue +0 -285
  233. package/components/Form/fields/wygEditorCKE/defaults.js +0 -103
  234. package/components/Form/fields/wygEditorCKE/utils/ckeditor.injector.js +0 -29
  235. package/components/Form/fields/wygEditorCKE/wygEditorCKE.vue +0 -270
  236. package/components/LangSwitcher.vue +0 -44
  237. package/components/List/List.vue +0 -271
  238. package/components/List/ListActions.vue +0 -164
  239. package/components/List/ListFilters.vue +0 -372
  240. package/components/List/ListHead.vue +0 -67
  241. package/components/List/ListQuickEdit.vue +0 -228
  242. package/components/List/ListTable.vue +0 -484
  243. package/components/List/ListTabs.vue +0 -65
  244. package/components/Login.vue +0 -125
  245. package/components/Logo.vue +0 -79
  246. package/components/LogoutButton.vue +0 -54
  247. package/components/MediaManager/MediaBreadcrumbs.vue +0 -45
  248. package/components/MediaManager/MediaEditor.vue +0 -340
  249. package/components/MediaManager/MediaFileChanger.vue +0 -78
  250. package/components/MediaManager/MediaFolders.vue +0 -287
  251. package/components/MediaManager/MediaGallery.vue +0 -281
  252. package/components/MediaManager/MediaManager.vue +0 -159
  253. package/components/MediaManager/MediaManagerDialog.vue +0 -104
  254. package/components/MediaManager/MediaPreview.vue +0 -258
  255. package/components/MediaManager/MediaUploader.vue +0 -163
  256. package/components/MenuManager/MenuManager.vue +0 -332
  257. package/components/MenuManager/MenuNodeEditor.vue +0 -270
  258. package/components/MenuManager/MenuTreeview.vue +0 -237
  259. package/components/MenuManager/MenuTreeviewNode.vue +0 -208
  260. package/components/PagePreview.vue +0 -58
  261. package/components/RootComponents.vue +0 -25
  262. package/components/SnackBar.vue +0 -69
  263. package/components/ThemeToggle.vue +0 -13
  264. package/components/layout/Sidebar/Sidebar.vue +0 -89
  265. package/components/layout/Sidebar/SidebarList.vue +0 -49
  266. package/components/layout/Sidebar/SidebarListItem.vue +0 -185
  267. package/components/layout/Sidebar/SidebarProfile.vue +0 -42
  268. package/components/layout/Sidebar/SidebarTitle.vue +0 -45
  269. package/components/layout/Topbar/Topbar.vue +0 -29
  270. package/components/layout/routebuilder.js +0 -48
  271. package/defaults/i18n.js +0 -37
  272. package/defaults/vuetify.js +0 -34
  273. package/layouts/default.vue +0 -47
  274. package/layouts/empty.vue +0 -16
  275. package/module.js +0 -80
  276. package/pages/index.vue +0 -37
  277. package/pages/login.vue +0 -10
  278. package/static/mapo/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  279. package/static/mapo/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  280. package/static/mapo/ckeditor/plugins/image2/dev/contents.css +0 -35
  281. package/static/mapo/ckeditor/plugins/image2/dev/image2.html +0 -338
  282. package/static/mapo/ckeditor/plugins/image2/dialogs/image2.js +0 -557
  283. package/static/mapo/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  284. package/static/mapo/ckeditor/plugins/image2/icons/image.png +0 -0
  285. package/static/mapo/ckeditor/plugins/image2/lang/af.js +0 -21
  286. package/static/mapo/ckeditor/plugins/image2/lang/ar.js +0 -21
  287. package/static/mapo/ckeditor/plugins/image2/lang/az.js +0 -21
  288. package/static/mapo/ckeditor/plugins/image2/lang/bg.js +0 -21
  289. package/static/mapo/ckeditor/plugins/image2/lang/bn.js +0 -21
  290. package/static/mapo/ckeditor/plugins/image2/lang/bs.js +0 -21
  291. package/static/mapo/ckeditor/plugins/image2/lang/ca.js +0 -21
  292. package/static/mapo/ckeditor/plugins/image2/lang/cs.js +0 -21
  293. package/static/mapo/ckeditor/plugins/image2/lang/cy.js +0 -21
  294. package/static/mapo/ckeditor/plugins/image2/lang/da.js +0 -21
  295. package/static/mapo/ckeditor/plugins/image2/lang/de-ch.js +0 -21
  296. package/static/mapo/ckeditor/plugins/image2/lang/de.js +0 -21
  297. package/static/mapo/ckeditor/plugins/image2/lang/el.js +0 -21
  298. package/static/mapo/ckeditor/plugins/image2/lang/en-au.js +0 -21
  299. package/static/mapo/ckeditor/plugins/image2/lang/en-ca.js +0 -21
  300. package/static/mapo/ckeditor/plugins/image2/lang/en-gb.js +0 -21
  301. package/static/mapo/ckeditor/plugins/image2/lang/en.js +0 -21
  302. package/static/mapo/ckeditor/plugins/image2/lang/eo.js +0 -21
  303. package/static/mapo/ckeditor/plugins/image2/lang/es-mx.js +0 -21
  304. package/static/mapo/ckeditor/plugins/image2/lang/es.js +0 -21
  305. package/static/mapo/ckeditor/plugins/image2/lang/et.js +0 -21
  306. package/static/mapo/ckeditor/plugins/image2/lang/eu.js +0 -21
  307. package/static/mapo/ckeditor/plugins/image2/lang/fa.js +0 -21
  308. package/static/mapo/ckeditor/plugins/image2/lang/fi.js +0 -21
  309. package/static/mapo/ckeditor/plugins/image2/lang/fo.js +0 -21
  310. package/static/mapo/ckeditor/plugins/image2/lang/fr-ca.js +0 -21
  311. package/static/mapo/ckeditor/plugins/image2/lang/fr.js +0 -21
  312. package/static/mapo/ckeditor/plugins/image2/lang/gl.js +0 -21
  313. package/static/mapo/ckeditor/plugins/image2/lang/gu.js +0 -21
  314. package/static/mapo/ckeditor/plugins/image2/lang/he.js +0 -21
  315. package/static/mapo/ckeditor/plugins/image2/lang/hi.js +0 -21
  316. package/static/mapo/ckeditor/plugins/image2/lang/hr.js +0 -21
  317. package/static/mapo/ckeditor/plugins/image2/lang/hu.js +0 -21
  318. package/static/mapo/ckeditor/plugins/image2/lang/id.js +0 -21
  319. package/static/mapo/ckeditor/plugins/image2/lang/is.js +0 -21
  320. package/static/mapo/ckeditor/plugins/image2/lang/it.js +0 -21
  321. package/static/mapo/ckeditor/plugins/image2/lang/ja.js +0 -21
  322. package/static/mapo/ckeditor/plugins/image2/lang/ka.js +0 -21
  323. package/static/mapo/ckeditor/plugins/image2/lang/km.js +0 -21
  324. package/static/mapo/ckeditor/plugins/image2/lang/ko.js +0 -21
  325. package/static/mapo/ckeditor/plugins/image2/lang/ku.js +0 -21
  326. package/static/mapo/ckeditor/plugins/image2/lang/lt.js +0 -21
  327. package/static/mapo/ckeditor/plugins/image2/lang/lv.js +0 -21
  328. package/static/mapo/ckeditor/plugins/image2/lang/mk.js +0 -21
  329. package/static/mapo/ckeditor/plugins/image2/lang/mn.js +0 -21
  330. package/static/mapo/ckeditor/plugins/image2/lang/ms.js +0 -21
  331. package/static/mapo/ckeditor/plugins/image2/lang/nb.js +0 -21
  332. package/static/mapo/ckeditor/plugins/image2/lang/nl.js +0 -21
  333. package/static/mapo/ckeditor/plugins/image2/lang/no.js +0 -21
  334. package/static/mapo/ckeditor/plugins/image2/lang/oc.js +0 -21
  335. package/static/mapo/ckeditor/plugins/image2/lang/pl.js +0 -21
  336. package/static/mapo/ckeditor/plugins/image2/lang/pt-br.js +0 -21
  337. package/static/mapo/ckeditor/plugins/image2/lang/pt.js +0 -21
  338. package/static/mapo/ckeditor/plugins/image2/lang/ro.js +0 -21
  339. package/static/mapo/ckeditor/plugins/image2/lang/ru.js +0 -21
  340. package/static/mapo/ckeditor/plugins/image2/lang/si.js +0 -21
  341. package/static/mapo/ckeditor/plugins/image2/lang/sk.js +0 -21
  342. package/static/mapo/ckeditor/plugins/image2/lang/sl.js +0 -21
  343. package/static/mapo/ckeditor/plugins/image2/lang/sq.js +0 -21
  344. package/static/mapo/ckeditor/plugins/image2/lang/sr-latn.js +0 -21
  345. package/static/mapo/ckeditor/plugins/image2/lang/sr.js +0 -21
  346. package/static/mapo/ckeditor/plugins/image2/lang/sv.js +0 -21
  347. package/static/mapo/ckeditor/plugins/image2/lang/th.js +0 -21
  348. package/static/mapo/ckeditor/plugins/image2/lang/tr.js +0 -21
  349. package/static/mapo/ckeditor/plugins/image2/lang/tt.js +0 -21
  350. package/static/mapo/ckeditor/plugins/image2/lang/ug.js +0 -21
  351. package/static/mapo/ckeditor/plugins/image2/lang/uk.js +0 -21
  352. package/static/mapo/ckeditor/plugins/image2/lang/vi.js +0 -21
  353. package/static/mapo/ckeditor/plugins/image2/lang/zh-cn.js +0 -21
  354. package/static/mapo/ckeditor/plugins/image2/lang/zh.js +0 -21
  355. package/static/mapo/ckeditor/plugins/image2/plugin.js +0 -1798
  356. package/static/mapo/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  357. package/static/mapo/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  358. package/static/mapo/ckeditor/plugins/image2/samples/image2.html +0 -68
  359. package/static/mapo/ckeditor/skins/moono/dev/icons16.png +0 -0
  360. package/static/mapo/ckeditor/skins/moono/dev/icons16.svg +0 -2374
  361. package/static/mapo/ckeditor/skins/moono/dev/icons32.png +0 -0
  362. package/static/mapo/ckeditor/skins/moono/dev/icons32.svg +0 -2722
  363. package/static/mapo/ckeditor/skins/moono/dev/locations.json +0 -144
  364. package/static/mapo/ckeditor/skins/moono/dialog.css +0 -5
  365. package/static/mapo/ckeditor/skins/moono/dialog_ie.css +0 -5
  366. package/static/mapo/ckeditor/skins/moono/dialog_ie7.css +0 -5
  367. package/static/mapo/ckeditor/skins/moono/dialog_ie8.css +0 -5
  368. package/static/mapo/ckeditor/skins/moono/dialog_iequirks.css +0 -5
  369. package/static/mapo/ckeditor/skins/moono/editor.css +0 -5
  370. package/static/mapo/ckeditor/skins/moono/editor_gecko.css +0 -5
  371. package/static/mapo/ckeditor/skins/moono/editor_ie.css +0 -5
  372. package/static/mapo/ckeditor/skins/moono/editor_ie7.css +0 -5
  373. package/static/mapo/ckeditor/skins/moono/editor_ie8.css +0 -5
  374. package/static/mapo/ckeditor/skins/moono/editor_iequirks.css +0 -5
  375. package/static/mapo/ckeditor/skins/moono/icons.png +0 -0
  376. package/static/mapo/ckeditor/skins/moono/icons_hidpi.png +0 -0
  377. package/static/mapo/ckeditor/skins/moono/images/anchor.png +0 -0
  378. package/static/mapo/ckeditor/skins/moono/images/arrow.png +0 -0
  379. package/static/mapo/ckeditor/skins/moono/images/close.png +0 -0
  380. package/static/mapo/ckeditor/skins/moono/images/hidpi/anchor.png +0 -0
  381. package/static/mapo/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  382. package/static/mapo/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  383. package/static/mapo/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  384. package/static/mapo/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  385. package/static/mapo/ckeditor/skins/moono/images/lock-open.png +0 -0
  386. package/static/mapo/ckeditor/skins/moono/images/lock.png +0 -0
  387. package/static/mapo/ckeditor/skins/moono/images/refresh.png +0 -0
  388. package/static/mapo/ckeditor/skins/moono/images/spinner.gif +0 -0
  389. package/static/mapo/ckeditor/skins/moono/readme.md +0 -49
  390. package/static/mapo/ckeditor/skins/moono/skin.js +0 -10
  391. package/static/mapo/ckeditor/skins/moono-dark/dialog.css +0 -5
  392. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie.css +0 -5
  393. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie7.css +0 -5
  394. package/static/mapo/ckeditor/skins/moono-dark/dialog_ie8.css +0 -5
  395. package/static/mapo/ckeditor/skins/moono-dark/dialog_iequirks.css +0 -5
  396. package/static/mapo/ckeditor/skins/moono-dark/editor.css +0 -5
  397. package/static/mapo/ckeditor/skins/moono-dark/editor_gecko.css +0 -5
  398. package/static/mapo/ckeditor/skins/moono-dark/editor_ie.css +0 -5
  399. package/static/mapo/ckeditor/skins/moono-dark/editor_ie7.css +0 -5
  400. package/static/mapo/ckeditor/skins/moono-dark/editor_ie8.css +0 -5
  401. package/static/mapo/ckeditor/skins/moono-dark/editor_iequirks.css +0 -5
  402. package/static/mapo/ckeditor/skins/moono-dark/icons.png +0 -0
  403. package/static/mapo/ckeditor/skins/moono-dark/icons_hidpi.png +0 -0
  404. package/static/mapo/ckeditor/skins/moono-dark/images/arrow.png +0 -0
  405. package/static/mapo/ckeditor/skins/moono-dark/images/close.png +0 -0
  406. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/close.png +0 -0
  407. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock-open.png +0 -0
  408. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock.png +0 -0
  409. package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/refresh.png +0 -0
  410. package/static/mapo/ckeditor/skins/moono-dark/images/lock-open.png +0 -0
  411. package/static/mapo/ckeditor/skins/moono-dark/images/lock.png +0 -0
  412. package/static/mapo/ckeditor/skins/moono-dark/images/refresh.png +0 -0
  413. package/static/mapo/ckeditor/skins/moono-dark/readme.md +0 -51
  414. package/static/mapo/ckeditor/skins/moono-dark/skin.js +0 -5
  415. package/static/mapo/favicon.ico +0 -0
  416. package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +0 -7
  417. package/static/mapo/tinymce-skins/mapo-dark/content.min.css +0 -7
  418. package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +0 -7
  419. package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +0 -7
  420. package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +0 -7
  421. package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +0 -7
  422. package/static/mapo/tinymce-skins/mapo-light/content.min.css +0 -7
  423. package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +0 -7
  424. package/static/mapo/tinymce-skins/mapo-light/skin.min.css +0 -7
  425. package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +0 -7
  426. package/translations/en-US.js +0 -177
  427. package/translations/it-IT.js +0 -180
package/package.json CHANGED
@@ -1,19 +1,74 @@
1
1
  {
2
2
  "name": "@mapomodule/uikit",
3
- "version": "1.0.0",
3
+ "version": "2.0.0-beta.10",
4
+ "description": "Mapo UI components: Sidebar, Topbar, Login, SnackBar, ConfirmDialog, List, Detail, Media",
5
+ "type": "module",
4
6
  "license": "MIT",
5
- "description": "This is part of Mapo nuxt module. Injects Mapo ui components in the nuxt component discovery system.",
6
- "author": "bnznamco <gabriele.baldi.01@gmail.com>",
7
- "repository": "https://github.com/lotrekagency/mapo",
8
- "main": "./module.js",
9
- "dependencies": {
10
- "@mapomodule/utils": "^1.0.0",
11
- "@nuxtjs/i18n": "^7.2.2",
12
- "@nuxtjs/vuetify": "^1.12.3",
13
- "vuedraggable": "^2.24.3"
7
+ "author": "Lotrek Agency (https://lotrek.it)",
8
+ "homepage": "https://lotrekagency.github.io/mapo-new/",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/lotrekagency/mapo-new.git",
12
+ "directory": "packages/@mapomodule/uikit"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/lotrekagency/mapo-new/issues"
14
16
  },
15
17
  "publishConfig": {
16
- "access": "public"
18
+ "access": "public",
19
+ "tag": "next"
20
+ },
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/module.d.mts",
24
+ "import": "./dist/module.mjs"
25
+ },
26
+ "./types": {
27
+ "types": "./dist/index.d.mts",
28
+ "import": "./dist/index.mjs"
29
+ },
30
+ "./runtime/*": {
31
+ "types": "./src/runtime/*.ts",
32
+ "import": "./dist/runtime/*.js",
33
+ "default": "./src/runtime/*"
34
+ }
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "src"
39
+ ],
40
+ "scripts": {
41
+ "build": "nuxt-module-build build && vue-tsc -p tsconfig.build-types.json && node ../../../scripts/clean-empty-vue-dts.mjs dist",
42
+ "dev": "nuxt-module-build build --stub --watch",
43
+ "dev:prepare": "nuxt-module-build build --stub",
44
+ "typecheck": "vue-tsc --noEmit",
45
+ "lint": "eslint src"
46
+ },
47
+ "dependencies": {
48
+ "@mapomodule/form": "2.0.0-beta.8",
49
+ "@mapomodule/i18n": "2.0.0-beta.2",
50
+ "@mapomodule/store": "2.0.0-beta.5",
51
+ "@mapomodule/utils": "2.0.0-beta.3",
52
+ "@mapomodule/core": "2.0.0-beta.7",
53
+ "tailwindcss": "^4.0.0",
54
+ "vue-draggable-plus": "^0.6.0",
55
+ "vue-i18n": "^11.4.0"
56
+ },
57
+ "peerDependencies": {
58
+ "@nuxt/ui": ">=4.0.0",
59
+ "nuxt": ">=4.0.0",
60
+ "pinia": ">=3.0.0"
17
61
  },
18
- "gitHead": "1e825711fb068d6195fe6dda607d1fb0e05109ec"
62
+ "devDependencies": {
63
+ "@nuxt/kit": "4.4.2",
64
+ "@nuxt/module-builder": "^1.0.2",
65
+ "@nuxt/schema": "4.4.2",
66
+ "@nuxt/ui": "^4.7.0",
67
+ "@tanstack/vue-table": "^8.21.3",
68
+ "nuxt": "^4.5.1",
69
+ "pinia": "^3.0.4",
70
+ "vue": "^3.5.40",
71
+ "vue-router": "^5.2.0",
72
+ "vue-tsc": "^3.3.4"
73
+ }
19
74
  }
package/src/index.ts ADDED
@@ -0,0 +1,30 @@
1
+ export type { MapoUikitOptions } from "./module";
2
+ export type {
3
+ ListColumn,
4
+ FilterChoice,
5
+ FilterDescriptor,
6
+ ActiveFilter,
7
+ ActionContext,
8
+ ActionDescriptor,
9
+ ListTabItem,
10
+ } from "./runtime/types/list.js";
11
+ export type {
12
+ MediaItem,
13
+ MediaFolder,
14
+ MediaApiResponse,
15
+ MediaGetRootParams,
16
+ MediaUploadPayload,
17
+ SelectMode,
18
+ } from "./runtime/types/media.js";
19
+ export type {
20
+ MapoMenu,
21
+ MenuTreeNode,
22
+ MenuNodeLink,
23
+ MenuTranslation,
24
+ } from "./runtime/types/menu.js";
25
+ export {
26
+ createMenuNode,
27
+ menuTreeDepth,
28
+ findMenuNode,
29
+ removeMenuNode,
30
+ } from "./runtime/types/menu.js";
package/src/module.ts ADDED
@@ -0,0 +1,311 @@
1
+ import { readFileSync, existsSync } from "node:fs";
2
+ import { resolve } from "node:path";
3
+ import {
4
+ defineNuxtModule,
5
+ addComponent,
6
+ addLayout,
7
+ addPlugin,
8
+ addImports,
9
+ addTypeTemplate,
10
+ createResolver,
11
+ extendPages,
12
+ hasNuxtModule,
13
+ installModule,
14
+ } from "@nuxt/kit";
15
+ import type { NuxtModule } from "@nuxt/schema";
16
+
17
+ export interface MapoUikitOptions {
18
+ /**
19
+ * Path to a CSS file that is injected after the base uikit CSS.
20
+ * Use it to override Tailwind theme tokens or add global styles.
21
+ *
22
+ * @example
23
+ * nuxt.config.ts
24
+ * mapoUikit: { css: '~/assets/css/theme.css' }
25
+ *
26
+ * assets/css/theme.css
27
+ * @import "@nuxt/ui";
28
+ * :root {
29
+ * --color-primary-500: oklch(0.7 0.2 240);
30
+ * }
31
+ */
32
+ css?: string;
33
+
34
+ /**
35
+ * Default Nuxt UI component config merged into nuxt.options.ui.
36
+ * Deep-merged so the consuming app can override individual keys.
37
+ * @see https://ui.nuxt.com/getting-started/theme
38
+ */
39
+ ui?: Record<string, unknown>;
40
+
41
+ /**
42
+ * Media Manager configuration. Endpoints and upload limits are
43
+ * forwarded to `runtimeConfig.public.mapoMedia` and read by `useMediaStore`.
44
+ */
45
+ media?: MapoMediaOptions;
46
+ }
47
+
48
+ export interface MapoMediaOptions {
49
+ /**
50
+ * REST endpoints used by the media store.
51
+ * Defaults align with the Camomilla integration path-rewrites.
52
+ */
53
+ endpoints?: {
54
+ /** Single-media CRUD (detail, update, delete, upload). Default `/api/media`. */
55
+ media?: string;
56
+ /** Folder navigation + CRUD. Default `/api/media-folders`. */
57
+ folders?: string;
58
+ };
59
+ /** Max image upload size in MB. Default 10. */
60
+ maxImageSize?: number;
61
+ /** Max video upload size in MB. Default 100. */
62
+ maxVideoSize?: number;
63
+ /** Max size for any other file type in MB. Default 10. */
64
+ maxDefaultSize?: number;
65
+ /**
66
+ * Django model used for media permission checks (`change_<model>`,
67
+ * `delete_<model>`) in the editor. Default `"media"`.
68
+ */
69
+ permissionsModel?: string;
70
+ }
71
+
72
+ const MAPO_MEDIA_DEFAULTS = {
73
+ endpoints: {
74
+ media: "/api/media",
75
+ folders: "/api/media-folders",
76
+ },
77
+ maxImageSize: 10,
78
+ maxVideoSize: 100,
79
+ maxDefaultSize: 10,
80
+ permissionsModel: "media",
81
+ } satisfies Required<MapoMediaOptions>;
82
+
83
+ export default defineNuxtModule<MapoUikitOptions>({
84
+ meta: {
85
+ name: "@mapomodule/uikit",
86
+ configKey: "mapoUikit",
87
+ },
88
+
89
+ defaults: {
90
+ ui: {},
91
+ },
92
+
93
+ // @nuxt/ui must be declared BEFORE mapomodule in the consuming app's modules[]
94
+ // so that @nuxt/icon's Icon component is available in SSR. Installing it via
95
+ // installModule() from inside another module causes an SSR Icon infinite loop.
96
+ moduleDependencies: {
97
+ "@nuxt/ui": {},
98
+ },
99
+
100
+ async setup(options, nuxt) {
101
+ const resolver = createResolver(import.meta.url);
102
+
103
+ // In consuming apps this runtime lives inside node_modules, where Nuxt
104
+ // skips auto-import injection by default (workspace apps are unaffected:
105
+ // pnpm symlinks resolve outside node_modules). Opt back in and transpile
106
+ // the runtime for the SSR build.
107
+ nuxt.options.build.transpile.push(resolver.resolve("./runtime"));
108
+ nuxt.options.imports.transform ??= {};
109
+ (nuxt.options.imports.transform.include ??= []).push(
110
+ /@mapomodule[\\/]uikit[\\/]/,
111
+ );
112
+
113
+ // UIKit components render every user-facing string through vue-i18n
114
+ // (`useI18n().t("mapo...")`). @mapomodule/i18n provides the catalogs and
115
+ // installs @nuxtjs/i18n unless the app manages it itself.
116
+ if (!hasNuxtModule("@mapomodule/i18n")) {
117
+ await installModule(await resolver.resolvePath("@mapomodule/i18n"));
118
+ }
119
+
120
+ addTypeTemplate({
121
+ filename: "types/mapo-uikit-page-meta.d.ts",
122
+ getContents: () =>
123
+ readFileSync(
124
+ resolver.resolve("./runtime/page-meta.nuxt.d.ts"),
125
+ "utf-8",
126
+ ),
127
+ });
128
+
129
+ // Base CSS: Tailwind v4 entry + Nuxt UI design tokens
130
+ nuxt.options.css.unshift(resolver.resolve("./runtime/assets/main.css"));
131
+
132
+ // Allow Vite to serve files from this package when consumed outside its workspace root
133
+ nuxt.options.vite.server ??= {};
134
+ nuxt.options.vite.server.fs ??= {};
135
+ nuxt.options.vite.server.fs.allow ??= [];
136
+ nuxt.options.vite.server.fs.allow.push(resolver.resolve("."));
137
+
138
+ // Custom theme override CSS (injected after base so it wins)
139
+ if (options.css) {
140
+ nuxt.options.css.push(options.css);
141
+ }
142
+
143
+ // Merge module-level ui config into nuxt.options so consuming apps
144
+ // can override Nuxt UI component defaults from the mapoUikit config key.
145
+ if (options.ui && Object.keys(options.ui).length) {
146
+ // @ts-expect-error — nuxt.options.ui typed by @nuxt/ui augmentation at app build time
147
+ nuxt.options.ui = { ...options.ui, ...(nuxt.options.ui ?? {}) };
148
+ }
149
+
150
+ // Media config → runtimeConfig.public.mapoMedia (read by useMediaStore + uploader).
151
+ // Only serializable values; the adapter functions go through the plugin below.
152
+ const media = options.media ?? {};
153
+ nuxt.options.runtimeConfig.public.mapoMedia = {
154
+ endpoints: {
155
+ media: media.endpoints?.media ?? MAPO_MEDIA_DEFAULTS.endpoints.media,
156
+ folders:
157
+ media.endpoints?.folders ?? MAPO_MEDIA_DEFAULTS.endpoints.folders,
158
+ },
159
+ maxImageSize: media.maxImageSize ?? MAPO_MEDIA_DEFAULTS.maxImageSize,
160
+ maxVideoSize: media.maxVideoSize ?? MAPO_MEDIA_DEFAULTS.maxVideoSize,
161
+ maxDefaultSize:
162
+ media.maxDefaultSize ?? MAPO_MEDIA_DEFAULTS.maxDefaultSize,
163
+ permissionsModel:
164
+ media.permissionsModel ?? MAPO_MEDIA_DEFAULTS.permissionsModel,
165
+ };
166
+
167
+ const components = [
168
+ // ─── Shell / Layout ───────────────────────────────────────────────────
169
+ "MapoSnackBar",
170
+ "MapoConfirmDialog",
171
+ "MapoLogin",
172
+ "MapoRootComponents",
173
+ "MapoSidebar",
174
+ "MapoSidebarList",
175
+ "MapoSidebarListItem",
176
+ "MapoLogoutButton",
177
+ "MapoSidebarProfile",
178
+ "MapoTopbar",
179
+ "MapoLangSwitcher",
180
+ "MapoThemeToggle",
181
+ // ─── CRUD / Detail / List ─────────────────────────────────────────────
182
+ "MapoDetail",
183
+ "MapoDetailLangSwitch",
184
+ "MapoList",
185
+ "MapoListHead",
186
+ "MapoListTabs",
187
+ "MapoListFilters",
188
+ "MapoListActions",
189
+ "MapoListQuickEdit",
190
+ "MapoListTable",
191
+ // ─── Media ───────────────────────────────────────────────────────────
192
+ "MapoDropArea",
193
+ "MapoMediaBreadcrumbs",
194
+ "MapoMediaFolders",
195
+ "MapoMediaGallery",
196
+ "MapoMediaFileChanger",
197
+ "MapoMediaEditor",
198
+ "MapoMediaUploader",
199
+ "MapoMediaManager",
200
+ "MapoMediaManagerDialog",
201
+ // ─── Menu Manager ─────────────────────────────────────────────────────
202
+ "MapoMenuTreeviewNode",
203
+ "MapoMenuTreeview",
204
+ "MapoMenuNodeEditor",
205
+ "MapoMenuManager",
206
+ ];
207
+
208
+ for (const name of components) {
209
+ addComponent({
210
+ name,
211
+ filePath: resolver.resolve(`./runtime/components/${name}.vue`),
212
+ });
213
+ }
214
+
215
+ // Registered as `global` so they survive runtime lookup from *another*
216
+ // package: the media fields in @mapomodule/form resolve the dialog by name
217
+ // (see useMediaManager) and render the preview in their templates. Nuxt's
218
+ // build-time auto-import only covers templates it scans, so a non-global
219
+ // registration resolves to nothing once the caller lives outside uikit.
220
+ for (const name of ["MapoMediaManagerDialog", "MapoMediaPreview"]) {
221
+ addComponent({
222
+ name,
223
+ global: true,
224
+ filePath: resolver.resolve(`./runtime/components/${name}.vue`),
225
+ });
226
+ }
227
+
228
+ addLayout(
229
+ { src: resolver.resolve("./runtime/layouts/default.vue") },
230
+ "mapo-default",
231
+ );
232
+ addLayout(
233
+ { src: resolver.resolve("./runtime/layouts/empty.vue") },
234
+ "mapo-empty",
235
+ );
236
+
237
+ // Ensure @nuxt/icon bundles lucide icons regardless of hoisting detection.
238
+ // Without this, in monorepo setups pnpm may hoist @iconify-json/lucide to the
239
+ // workspace root and @nuxt/icon fails to detect it as a local package.
240
+ nuxt.hook("modules:done", () => {
241
+ // icon options are typed by @nuxt/icon's NuxtOptions augmentation at app build time.
242
+ // Cast to any to avoid TS errors in the uikit package which doesn't depend on @nuxt/icon directly.
243
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
244
+ const iconOpts = nuxt.options as any;
245
+ iconOpts.icon ??= {};
246
+ iconOpts.icon.serverBundle ??= {};
247
+ const existing: string[] = iconOpts.icon.serverBundle.collections ?? [];
248
+ iconOpts.icon.serverBundle.collections = Array.from(
249
+ new Set([...existing, "lucide"]),
250
+ );
251
+ });
252
+
253
+ // NOTE: the `media` / `media-m2m` / `enhanced-media` field components live in
254
+ // @mapomodule/form with every other field type and are registered in its
255
+ // default registry. They resolve the picker dialog below at runtime.
256
+
257
+ // Plugin: provide the default $mapoMediaAdapter. Integrations register their
258
+ // own plugin ordered after this one to override request/response transforms.
259
+ addPlugin({
260
+ src: resolver.resolve("./runtime/plugins/media-adapter"),
261
+ order: 5,
262
+ });
263
+
264
+ // Auto-import useMediaStore so consumers can use it without explicit imports
265
+ addImports([
266
+ {
267
+ name: "useMediaStore",
268
+ from: resolver.resolve("./runtime/stores/media"),
269
+ },
270
+ ]);
271
+
272
+ // MapoOverride* system: if the consuming app has a `mapooverride/` directory
273
+ // inside its srcDir, any .vue file named like a Mapo component will replace it
274
+ // at build time. Convention: MapoTopbar.vue overrides MapoTopbar, etc.
275
+ nuxt.hook("components:extend", (components) => {
276
+ const overrideDir = resolve(nuxt.options.srcDir, "mapooverride");
277
+ if (!existsSync(overrideDir)) return;
278
+ for (const component of components) {
279
+ // Component type from @nuxt/schema doesn't expose name/filePath/shortPath directly
280
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
281
+ const c = component as any;
282
+ const overridePath = resolve(overrideDir, `${c.name}.vue`);
283
+ if (existsSync(overridePath)) {
284
+ c.filePath = overridePath;
285
+ c.shortPath = `mapooverride/${c.name}.vue`;
286
+ }
287
+ }
288
+ });
289
+
290
+ extendPages((pages) => {
291
+ // Add a catch-all route for the login page that renders the MapoLogin component.
292
+ // This allows the login page to be rendered without requiring the consuming app
293
+ // to create its own login page and route.
294
+ if (!pages.some((p) => p.path === "/login"))
295
+ pages.push({
296
+ name: "mapo-login",
297
+ path: "/login",
298
+ file: resolver.resolve("./runtime/pages/login.vue"),
299
+ meta: { layout: "mapo-empty" },
300
+ });
301
+
302
+ if (!pages.some((p) => p.path === "/"))
303
+ pages.push({
304
+ name: "mapo-index",
305
+ path: "/",
306
+ file: resolver.resolve("./runtime/pages/index.vue"),
307
+ meta: { layout: "mapo-default" },
308
+ });
309
+ });
310
+ },
311
+ }) satisfies NuxtModule<MapoUikitOptions>;
@@ -0,0 +1,57 @@
1
+ import type {
2
+ MediaAdapter,
3
+ MediaApiResponse,
4
+ MediaFolder,
5
+ MediaItem,
6
+ MediaListParamsContext,
7
+ } from "../types/media.js";
8
+
9
+ /**
10
+ * Default media adapter — plain REST semantics.
11
+ *
12
+ * - List/detail params: passes `page`, `search`, `all`, and `mime` as-is.
13
+ * - Response: assumes the backend already returns the canonical
14
+ * `{ media: { items, paginator }, folders, parent_folder }` shape.
15
+ * - Detail params: passes `language_code` when a language is active.
16
+ *
17
+ * Integrations override any subset of these via their own `$mapoMediaAdapter`
18
+ * plugin (see `@mapomodule/mapo-integrations-camomilla`).
19
+ */
20
+ export const defaultMediaAdapter: Required<MediaAdapter> = {
21
+ buildListParams(ctx: MediaListParamsContext): Record<string, unknown> {
22
+ const params: Record<string, unknown> = {};
23
+ if (ctx.page != null) params.page = ctx.page;
24
+ if (ctx.search) params.search = ctx.search;
25
+ if (ctx.all) params.all = true;
26
+ if (ctx.mime) params.mime = ctx.mime;
27
+ return params;
28
+ },
29
+
30
+ parseRootResponse(raw: unknown): MediaApiResponse {
31
+ return raw as MediaApiResponse;
32
+ },
33
+
34
+ buildDetailParams(ctx: { lang?: string }): Record<string, unknown> {
35
+ return ctx.lang ? { language_code: ctx.lang } : {};
36
+ },
37
+
38
+ buildFolderPayload(folder: Partial<MediaFolder>): Record<string, unknown> {
39
+ return { ...folder };
40
+ },
41
+
42
+ buildMediaPatchPayload(media: MediaItem): Record<string, unknown> {
43
+ return {
44
+ title: media.title,
45
+ alt_text: media.alt_text,
46
+ description: media.description,
47
+ translations: media.translations,
48
+ };
49
+ },
50
+
51
+ buildReplaceFilePayload(
52
+ file: File,
53
+ maintainUrl: boolean,
54
+ ): Record<string, unknown> {
55
+ return { file, maintain_url: maintainUrl };
56
+ },
57
+ };
@@ -0,0 +1,59 @@
1
+ @import "tailwindcss";
2
+ @import "@nuxt/ui";
3
+
4
+ /* Explicitly scan uikit Vue sources so Tailwind v4 generates their utility classes
5
+ even when the package is resolved through node_modules symlinks. */
6
+ @source "../components/**/*.vue";
7
+ @source "../layouts/**/*.vue";
8
+ @source "../pages/**/*.vue";
9
+
10
+ /* Scan form package sources (symlinked via pnpm workspace).
11
+ Path: uikit/src/runtime/assets/ → ../../../../ → @mapomodule/ → form/... */
12
+ @source "../../../../form/src/runtime/components/**/*.vue";
13
+ @source "../../../../form/src/runtime/composables/**/*.ts";
14
+
15
+ /* Safelist: grid utilities used dynamically by the form engine.
16
+ Tailwind v4 does not scan template literals — these must be explicit. */
17
+ @source inline("col-span-1 col-span-2 col-span-3 col-span-4 col-span-5 col-span-6 col-span-7 col-span-8 col-span-9 col-span-10 col-span-11 col-span-12");
18
+ @source inline("md:col-span-1 md:col-span-2 md:col-span-3 md:col-span-4 md:col-span-5 md:col-span-6 md:col-span-7 md:col-span-8 md:col-span-9 md:col-span-10 md:col-span-11 md:col-span-12");
19
+ @source inline("grid-cols-12");
20
+ @source inline("flex-1 min-h-0 h-full");
21
+
22
+ /* Expanded field panel — forces the entire chain to fill the available height */
23
+ .mapo-group-expand-body,
24
+ .mapo-group-expand-body > *,
25
+ .mapo-group-expand-body .mapo-form-field,
26
+ .mapo-group-expand-body .mapo-form-field > div {
27
+ flex: 1;
28
+ min-height: 0;
29
+ }
30
+ /* The NuxtUI root wrapper (div root of UTextarea / UInput) must stretch */
31
+ .mapo-group-expand-body textarea,
32
+ .mapo-group-expand-body [contenteditable] {
33
+ height: 100% !important;
34
+ overflow-y: auto !important;
35
+ resize: none !important;
36
+ }
37
+ /* NuxtUI root wrapper (usually .relative or [data-slot]) */
38
+ .mapo-group-expand-body .mapo-form-field > div > * {
39
+ height: 100%;
40
+ }
41
+
42
+ @layer base {
43
+ html,
44
+ body {
45
+ height: 100%;
46
+ }
47
+
48
+ :root {
49
+ /* Height of the topbar — used by MapoDetail sticky sidebar positioning.
50
+ Override in the consuming app if the topbar height differs from the default. */
51
+ --mapo-topbar-height: 56px;
52
+ }
53
+
54
+ /* Extend height chain through #__nuxt and the UApp wrapper div */
55
+ #__nuxt,
56
+ #__nuxt > * {
57
+ height: 100%;
58
+ }
59
+ }
@@ -0,0 +1,36 @@
1
+ <script setup lang="ts">
2
+ import { useI18n } from "vue-i18n";
3
+ import { useConfirmStore } from "@mapomodule/store/runtime/stores/confirm";
4
+
5
+ const { t } = useI18n();
6
+ const store = useConfirmStore();
7
+ </script>
8
+
9
+ <template>
10
+ <UModal v-model:open="store.active" :dismissible="false">
11
+ <template #content>
12
+ <div class="p-6 space-y-4">
13
+ <div class="space-y-1">
14
+ <h3 class="text-base font-semibold text-highlighted">
15
+ {{ store.options?.title ?? t("mapo.confirm") }}
16
+ </h3>
17
+ <p class="text-sm text-muted">
18
+ {{ store.options?.message }}
19
+ </p>
20
+ </div>
21
+
22
+ <div class="flex justify-end gap-3">
23
+ <UButton variant="ghost" color="neutral" @click="store.cancel()">
24
+ {{ store.options?.cancelText ?? t("mapo.cancel") }}
25
+ </UButton>
26
+ <UButton
27
+ :color="store.options?.dangerous ? 'error' : 'primary'"
28
+ @click="store.confirm()"
29
+ >
30
+ {{ store.options?.confirmText ?? t("mapo.confirm") }}
31
+ </UButton>
32
+ </div>
33
+ </div>
34
+ </template>
35
+ </UModal>
36
+ </template>