@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
@@ -0,0 +1,660 @@
1
+ <script setup>
2
+ import {
3
+ ref,
4
+ shallowRef,
5
+ computed,
6
+ watch,
7
+ h,
8
+ resolveComponent,
9
+ useSlots
10
+ } from "vue";
11
+ import { useSnackStore } from "@mapomodule/store/runtime/stores/snack";
12
+ import { useConfirmStore } from "@mapomodule/store/runtime/stores/confirm";
13
+ import { usePermissions } from "@mapomodule/store/runtime/composables/usePermissions";
14
+ import { useCrud } from "@mapomodule/core/runtime/api/crud";
15
+ import { debounce, splitEndpointParams } from "@mapomodule/utils";
16
+ import { useRoute, useRouter } from "vue-router";
17
+ const props = defineProps({
18
+ endpoint: { type: String, required: false, default: "" },
19
+ items: { type: Array, required: false, default: void 0 },
20
+ crudEndpoint: { type: String, required: false },
21
+ filterParams: { type: Object, required: false },
22
+ defaultPageSize: { type: Number, required: false, default: 20 },
23
+ pageSizeOptions: { type: Array, required: false, default: () => [10, 20, 50, 100] },
24
+ responseAdapter: { type: Function, required: false },
25
+ paginationParams: { type: Function, required: false },
26
+ clientSide: { type: Boolean, required: false, default: false },
27
+ columns: { type: Array, required: true },
28
+ lookup: { type: String, required: false, default: "id" },
29
+ searchable: { type: Boolean, required: false, default: true },
30
+ draggable: { type: Boolean, required: false, default: false },
31
+ positionField: { type: String, required: false, default: "position" },
32
+ editFields: { type: Array, required: false, default: () => [] },
33
+ languages: { type: Array, required: false },
34
+ registry: { type: null, required: false },
35
+ detailBase: { type: String, required: false },
36
+ permissionModel: { type: String, required: false }
37
+ });
38
+ const offlineMode = computed(() => Array.isArray(props.items));
39
+ const hybridMode = computed(() => !offlineMode.value && props.clientSide);
40
+ const emit = defineEmits(["update:selection", "update:selectionQuery", "update:items"]);
41
+ defineExpose({ refresh });
42
+ defineSlots();
43
+ const slots = useSlots();
44
+ const atKey = (item, key) => item[key];
45
+ const snack = useSnackStore();
46
+ const confirm = useConfirmStore();
47
+ const route = useRoute();
48
+ const router = useRouter();
49
+ const crudBase = props.crudEndpoint ?? (splitEndpointParams(props.endpoint).path || props.endpoint);
50
+ const crud = useCrud(crudBase);
51
+ const { canChange, canDelete: canDeletePerm } = usePermissions();
52
+ const canEditRow = computed(
53
+ () => !props.permissionModel || canChange(props.permissionModel)
54
+ );
55
+ const canDeleteRow = computed(
56
+ () => !props.permissionModel || canDeletePerm(props.permissionModel)
57
+ );
58
+ const rows = shallowRef([]);
59
+ const fullDataset = shallowRef([]);
60
+ const hybridLoaded = ref(false);
61
+ const total = ref(0);
62
+ const loading = ref(false);
63
+ function toPositiveNumber(value, fallback) {
64
+ const n = Number(value);
65
+ return Number.isFinite(n) && n > 0 ? n : fallback;
66
+ }
67
+ const pagination = ref({
68
+ pageIndex: route.query.page ? Math.max(0, toPositiveNumber(route.query.page, 1) - 1) : 0,
69
+ pageSize: route.query.page_size ? toPositiveNumber(route.query.page_size, props.defaultPageSize) : props.defaultPageSize
70
+ });
71
+ const sorting = ref(
72
+ route.query.ordering ? String(route.query.ordering).split(",").map((o) => ({
73
+ id: o.startsWith("-") ? o.slice(1) : o,
74
+ desc: o.startsWith("-")
75
+ })) : []
76
+ );
77
+ const search = ref(route.query.search ? String(route.query.search) : "");
78
+ const onSearchInput = debounce((val) => {
79
+ search.value = String(val ?? "");
80
+ pagination.value = { ...pagination.value, pageIndex: 0 };
81
+ }, 350);
82
+ const writeUrlState = debounce(() => {
83
+ const query = {
84
+ ...route.query
85
+ };
86
+ const page = pagination.value.pageIndex + 1;
87
+ if (page > 1) query.page = String(page);
88
+ else delete query.page;
89
+ if (pagination.value.pageSize !== props.defaultPageSize)
90
+ query.page_size = String(pagination.value.pageSize);
91
+ else delete query.page_size;
92
+ if (search.value) query.search = search.value;
93
+ else delete query.search;
94
+ if (sorting.value.length)
95
+ query.ordering = sorting.value.map((s) => `${s.desc ? "-" : ""}${s.id}`).join(",");
96
+ else delete query.ordering;
97
+ router.replace({ query });
98
+ }, 150);
99
+ watch([pagination, search, sorting], writeUrlState, { deep: true });
100
+ const rowSelection = ref({});
101
+ const pkOf = (row) => String(atKey(row, props.lookup));
102
+ const isAllSelected = computed(
103
+ () => rows.value.length > 0 && rows.value.every((r) => rowSelection.value[pkOf(r)])
104
+ );
105
+ const isIndeterminate = computed(() => {
106
+ const some = rows.value.some((r) => rowSelection.value[pkOf(r)]);
107
+ return some && !isAllSelected.value;
108
+ });
109
+ const selectedRows = computed(
110
+ () => rows.value.filter((r) => rowSelection.value[pkOf(r)])
111
+ );
112
+ watch(selectedRows, (rows2) => {
113
+ emit("update:selection", rows2);
114
+ emit("update:selectionQuery", buildSelectionQuery());
115
+ });
116
+ function buildSelectionQuery() {
117
+ const params = new URLSearchParams();
118
+ params.set("page_size", String(pagination.value.pageSize));
119
+ if (search.value) params.set("search", search.value);
120
+ sorting.value.forEach(
121
+ (s) => params.set("ordering", `${s.desc ? "-" : ""}${s.id}`)
122
+ );
123
+ return params;
124
+ }
125
+ function toggleAll() {
126
+ if (isAllSelected.value) {
127
+ const next = { ...rowSelection.value };
128
+ for (const r of rows.value) delete next[pkOf(r)];
129
+ rowSelection.value = next;
130
+ } else {
131
+ const next = { ...rowSelection.value };
132
+ for (const r of rows.value) next[pkOf(r)] = true;
133
+ rowSelection.value = next;
134
+ }
135
+ }
136
+ function toggleRowByKey(key) {
137
+ const next = { ...rowSelection.value };
138
+ if (next[key]) delete next[key];
139
+ else next[key] = true;
140
+ rowSelection.value = next;
141
+ }
142
+ const quickEditOpen = ref(false);
143
+ const quickEditId = ref(null);
144
+ function openQuickEdit(id) {
145
+ quickEditId.value = id;
146
+ quickEditOpen.value = true;
147
+ }
148
+ function onQuickEditSaved(updated) {
149
+ if (offlineMode.value) {
150
+ const lk = props.lookup;
151
+ const next = (props.items ?? []).map(
152
+ (r) => String(atKey(r, lk)) === String(atKey(updated, lk)) ? updated : r
153
+ );
154
+ emit("update:items", next);
155
+ return;
156
+ }
157
+ if (hybridMode.value) hybridLoaded.value = false;
158
+ refresh();
159
+ }
160
+ const quickEditLocalItem = computed(() => {
161
+ if (!offlineMode.value || quickEditId.value == null) return null;
162
+ return (props.items ?? []).find(
163
+ (r) => String(atKey(r, props.lookup)) === String(quickEditId.value)
164
+ ) ?? null;
165
+ });
166
+ async function deleteRow(item) {
167
+ const ok = await confirm.ask({
168
+ title: "Delete item",
169
+ message: "Are you sure you want to delete this item?",
170
+ confirmText: "Delete",
171
+ dangerous: true
172
+ });
173
+ if (!ok) return;
174
+ if (offlineMode.value) {
175
+ const next = (props.items ?? []).filter(
176
+ (r) => String(atKey(r, props.lookup)) !== String(atKey(item, props.lookup))
177
+ );
178
+ emit("update:items", next);
179
+ snack.show("Item deleted", "success");
180
+ return;
181
+ }
182
+ try {
183
+ await crud.delete(atKey(item, props.lookup));
184
+ snack.show("Item deleted", "success");
185
+ if (hybridMode.value) hybridLoaded.value = false;
186
+ refresh();
187
+ } catch {
188
+ snack.show("Failed to delete item", "error");
189
+ }
190
+ }
191
+ const canReorder = computed(
192
+ () => props.draggable && !search.value && sorting.value.length === 0
193
+ );
194
+ const tableWrapper = ref(null);
195
+ const dragFrom = ref(null);
196
+ const dragOverIndex = ref(null);
197
+ function rowElements() {
198
+ return tableWrapper.value ? Array.from(tableWrapper.value.querySelectorAll("tbody tr")) : [];
199
+ }
200
+ function clearRowClasses() {
201
+ for (const el of rowElements())
202
+ el.classList.remove(
203
+ "mapo-drop-before",
204
+ "mapo-drop-after",
205
+ "mapo-drag-source"
206
+ );
207
+ }
208
+ function clearDragState() {
209
+ clearRowClasses();
210
+ dragFrom.value = null;
211
+ dragOverIndex.value = null;
212
+ }
213
+ function onDragStart(idx) {
214
+ if (!canReorder.value) return;
215
+ dragFrom.value = idx;
216
+ }
217
+ function onRowDragOver(e) {
218
+ if (dragFrom.value === null) return;
219
+ e.preventDefault();
220
+ const tr = e.target?.closest(
221
+ "tbody tr"
222
+ );
223
+ if (!tr) return;
224
+ const els = rowElements();
225
+ const idx = els.indexOf(tr);
226
+ if (idx < 0) return;
227
+ const rect = tr.getBoundingClientRect();
228
+ const before = e.clientY < rect.top + rect.height / 2;
229
+ clearRowClasses();
230
+ tr.classList.add(before ? "mapo-drop-before" : "mapo-drop-after");
231
+ els[dragFrom.value]?.classList.add("mapo-drag-source");
232
+ dragOverIndex.value = idx;
233
+ }
234
+ function onRowDrop(e) {
235
+ e.preventDefault();
236
+ const from = dragFrom.value;
237
+ const to = dragOverIndex.value;
238
+ clearDragState();
239
+ if (from !== null && to !== null) void onDrop(from, to);
240
+ }
241
+ function onDragEnd() {
242
+ clearDragState();
243
+ }
244
+ async function onDrop(fromIdx, toIdx) {
245
+ if (fromIdx === toIdx) return;
246
+ const arr = [...rows.value];
247
+ const moved = arr[fromIdx];
248
+ const target = arr[toIdx];
249
+ arr.splice(fromIdx, 1);
250
+ arr.splice(toIdx, 0, moved);
251
+ rows.value = arr;
252
+ if (offlineMode.value) {
253
+ const lk = props.lookup;
254
+ const full = [...props.items ?? []];
255
+ const fIdx = full.findIndex(
256
+ (r) => String(atKey(r, lk)) === String(atKey(moved, lk))
257
+ );
258
+ const tIdx = full.findIndex(
259
+ (r) => String(atKey(r, lk)) === String(atKey(target, lk))
260
+ );
261
+ if (fIdx >= 0 && tIdx >= 0) {
262
+ const [m] = full.splice(fIdx, 1);
263
+ full.splice(tIdx, 0, m);
264
+ emit("update:items", full);
265
+ }
266
+ return;
267
+ }
268
+ try {
269
+ await crud.updateOrder(
270
+ atKey(moved, props.lookup),
271
+ atKey(target, props.lookup)
272
+ );
273
+ snack.show("Order saved", "success");
274
+ if (hybridMode.value) {
275
+ hybridLoaded.value = false;
276
+ refresh();
277
+ }
278
+ } catch {
279
+ snack.show("Failed to save order", "error");
280
+ refresh();
281
+ }
282
+ }
283
+ function applyOffline(source) {
284
+ let arr = [...source];
285
+ if (search.value) {
286
+ const q = search.value.toLowerCase();
287
+ arr = arr.filter(
288
+ (row) => props.columns.some(
289
+ (c) => String(row[c.key] ?? "").toLowerCase().includes(q)
290
+ )
291
+ );
292
+ }
293
+ for (const [key, rawVal] of Object.entries(props.filterParams ?? {})) {
294
+ if (rawVal == null || rawVal === "") continue;
295
+ const parts = String(rawVal).split(",");
296
+ const isDateRange = parts.length === 2 && parts.every((p) => !Number.isNaN(Date.parse(p)));
297
+ if (isDateRange) {
298
+ const [start2, end] = parts;
299
+ arr = arr.filter((row) => {
300
+ const v = atKey(row, key);
301
+ if (v == null) return false;
302
+ const s = String(v);
303
+ return s >= start2 && s <= end;
304
+ });
305
+ } else if (parts.length > 1) {
306
+ const set = new Set(parts);
307
+ arr = arr.filter((row) => set.has(String(atKey(row, key))));
308
+ } else {
309
+ arr = arr.filter((row) => String(atKey(row, key)) === parts[0]);
310
+ }
311
+ }
312
+ if (sorting.value.length) {
313
+ const sortDefs = sorting.value;
314
+ arr.sort((a, b) => {
315
+ for (const s of sortDefs) {
316
+ const av = atKey(a, s.id);
317
+ const bv = atKey(b, s.id);
318
+ if (av == null && bv == null) continue;
319
+ if (av == null) return 1;
320
+ if (bv == null) return -1;
321
+ if (av < bv) return s.desc ? 1 : -1;
322
+ if (av > bv) return s.desc ? -1 : 1;
323
+ }
324
+ return 0;
325
+ });
326
+ }
327
+ total.value = arr.length;
328
+ const start = pagination.value.pageIndex * pagination.value.pageSize;
329
+ if (arr.length > 0 && start >= arr.length) {
330
+ pagination.value = { ...pagination.value, pageIndex: 0 };
331
+ rows.value = arr.slice(0, pagination.value.pageSize);
332
+ return;
333
+ }
334
+ rows.value = arr.slice(start, start + pagination.value.pageSize);
335
+ }
336
+ async function fetchAll() {
337
+ loading.value = true;
338
+ try {
339
+ const endpointParams = splitEndpointParams(props.endpoint).params;
340
+ const res = await crud.list(endpointParams);
341
+ let nextItems = [];
342
+ if (props.responseAdapter) {
343
+ nextItems = props.responseAdapter(res).items;
344
+ } else if (res && typeof res === "object" && "results" in res) {
345
+ nextItems = res.results;
346
+ } else {
347
+ nextItems = res;
348
+ }
349
+ fullDataset.value = nextItems;
350
+ hybridLoaded.value = true;
351
+ } catch {
352
+ snack.show("Failed to load data", "error");
353
+ } finally {
354
+ loading.value = false;
355
+ }
356
+ }
357
+ async function refresh() {
358
+ if (offlineMode.value) {
359
+ applyOffline(props.items ?? []);
360
+ return;
361
+ }
362
+ if (hybridMode.value) {
363
+ if (!hybridLoaded.value) await fetchAll();
364
+ applyOffline(fullDataset.value);
365
+ return;
366
+ }
367
+ loading.value = true;
368
+ try {
369
+ const endpointParams = splitEndpointParams(props.endpoint).params;
370
+ const pageState = {
371
+ page: pagination.value.pageIndex + 1,
372
+ pageSize: pagination.value.pageSize
373
+ };
374
+ const paginationP = props.paginationParams ? props.paginationParams(pageState) : { page: pageState.page, page_size: pageState.pageSize };
375
+ const params = {
376
+ ...endpointParams,
377
+ ...props.filterParams ?? {},
378
+ ...paginationP
379
+ };
380
+ if (search.value) params.search = search.value;
381
+ if (sorting.value.length)
382
+ params.ordering = sorting.value.map((s) => `${s.desc ? "-" : ""}${s.id}`).join(",");
383
+ const res = await crud.list(params);
384
+ let nextItems = [];
385
+ let nextTotal = 0;
386
+ if (props.responseAdapter) {
387
+ const adapted = props.responseAdapter(res);
388
+ nextItems = adapted.items;
389
+ nextTotal = adapted.total;
390
+ } else if (res && typeof res === "object" && "results" in res) {
391
+ nextItems = res.results;
392
+ nextTotal = res.count;
393
+ } else {
394
+ nextItems = res;
395
+ nextTotal = res.length;
396
+ }
397
+ if (nextItems.length === 0 && nextTotal > 0 && pagination.value.pageIndex > 0) {
398
+ pagination.value = { ...pagination.value, pageIndex: 0 };
399
+ return;
400
+ }
401
+ rows.value = nextItems;
402
+ total.value = nextTotal;
403
+ } catch {
404
+ snack.show("Failed to load data", "error");
405
+ } finally {
406
+ loading.value = false;
407
+ }
408
+ }
409
+ watch([() => props.endpoint, () => props.clientSide], () => {
410
+ hybridLoaded.value = false;
411
+ });
412
+ const filterParamsKey = computed(
413
+ () => JSON.stringify(props.filterParams ?? {})
414
+ );
415
+ watch(
416
+ [
417
+ () => props.endpoint,
418
+ () => props.items,
419
+ filterParamsKey,
420
+ () => pagination.value.pageIndex,
421
+ () => pagination.value.pageSize,
422
+ sorting,
423
+ search
424
+ ],
425
+ ([newEndpoint, , newFilters], [oldEndpoint, , oldFilters]) => {
426
+ const contextChanged = newEndpoint !== oldEndpoint || newFilters !== oldFilters;
427
+ if (contextChanged && pagination.value.pageIndex !== 0) {
428
+ pagination.value = { ...pagination.value, pageIndex: 0 };
429
+ } else {
430
+ refresh();
431
+ }
432
+ },
433
+ { immediate: true, deep: true }
434
+ );
435
+ const UCheckbox = resolveComponent("UCheckbox");
436
+ const UButton = resolveComponent("UButton");
437
+ const UIcon = resolveComponent("UIcon");
438
+ const tableColumns = computed(() => {
439
+ const cols = [];
440
+ cols.push({
441
+ id: "__select__",
442
+ header: () => h(UCheckbox, {
443
+ modelValue: isAllSelected.value,
444
+ indeterminate: isIndeterminate.value,
445
+ "onUpdate:modelValue": toggleAll,
446
+ ariaLabel: "Select all rows"
447
+ }),
448
+ cell: ({ row }) => {
449
+ const k = pkOf(row.original);
450
+ return h(UCheckbox, {
451
+ modelValue: !!rowSelection.value[k],
452
+ "onUpdate:modelValue": () => toggleRowByKey(k),
453
+ ariaLabel: "Select row"
454
+ });
455
+ },
456
+ meta: { class: { th: "w-10", td: "w-10" } }
457
+ });
458
+ if (props.draggable) {
459
+ cols.push({
460
+ id: "__drag__",
461
+ header: "",
462
+ cell: ({ row }) => h(
463
+ "span",
464
+ {
465
+ class: canReorder.value ? "cursor-grab text-muted" : "cursor-not-allowed text-muted opacity-30",
466
+ draggable: canReorder.value,
467
+ title: canReorder.value ? "Drag to reorder" : "Clear search & sorting to reorder",
468
+ onDragstart: (e) => {
469
+ e.dataTransfer?.setData("text/plain", "");
470
+ onDragStart(row.index);
471
+ }
472
+ },
473
+ h(UIcon, { name: "i-lucide-grip-vertical", class: "h-4 w-4" })
474
+ ),
475
+ meta: { class: { th: "w-8", td: "w-8" } }
476
+ });
477
+ }
478
+ const NuxtLink = resolveComponent("NuxtLink");
479
+ for (let i = 0; i < props.columns.length; i++) {
480
+ const col = props.columns[i];
481
+ const isFirst = i === 0 && !!props.detailBase;
482
+ cols.push({
483
+ accessorKey: col.key,
484
+ header: col.label,
485
+ cell: ({ row }) => {
486
+ const cellSlot = slots[`cell.${col.key}`];
487
+ if (cellSlot)
488
+ return cellSlot({
489
+ item: row.original,
490
+ value: atKey(row.original, col.key)
491
+ });
492
+ const cellVal = atKey(row.original, col.key);
493
+ if (isFirst) {
494
+ return h(
495
+ NuxtLink,
496
+ {
497
+ to: `${props.detailBase}/${atKey(row.original, props.lookup)}`,
498
+ class: "font-medium hover:underline"
499
+ },
500
+ () => String(cellVal ?? "\u2014")
501
+ );
502
+ }
503
+ return String(cellVal ?? "\u2014");
504
+ },
505
+ meta: { class: { td: col.class ?? "" } }
506
+ });
507
+ }
508
+ cols.push({
509
+ id: "__actions__",
510
+ header: "",
511
+ cell: ({ row }) => {
512
+ const buttons = [];
513
+ if (props.editFields.length > 0 && canEditRow.value) {
514
+ buttons.push(
515
+ h(UButton, {
516
+ size: "xs",
517
+ variant: "ghost",
518
+ color: "neutral",
519
+ icon: "i-lucide-pencil",
520
+ onClick: () => openQuickEdit(
521
+ atKey(row.original, props.lookup)
522
+ )
523
+ })
524
+ );
525
+ }
526
+ if (canDeleteRow.value) {
527
+ buttons.push(
528
+ h(UButton, {
529
+ size: "xs",
530
+ variant: "ghost",
531
+ color: "error",
532
+ icon: "i-lucide-trash-2",
533
+ onClick: () => deleteRow(row.original)
534
+ })
535
+ );
536
+ }
537
+ return h(
538
+ "div",
539
+ { class: "flex items-center gap-1 justify-end" },
540
+ buttons
541
+ );
542
+ },
543
+ meta: { class: { th: "text-right", td: "text-right" } }
544
+ });
545
+ return cols;
546
+ });
547
+ const paginationOptions = computed(() => ({
548
+ manualPagination: true,
549
+ rowCount: total.value
550
+ }));
551
+ const sortingOptions = computed(() => ({
552
+ manualSorting: true
553
+ }));
554
+ </script>
555
+
556
+ <template>
557
+ <div class="mapo-list-table space-y-3">
558
+ <!-- Search -->
559
+ <div v-if="searchable" class="flex items-center gap-2">
560
+ <UInput
561
+ :model-value="search"
562
+ placeholder="Search..."
563
+ icon="i-lucide-search"
564
+ size="sm"
565
+ class="max-w-xs"
566
+ @update:model-value="onSearchInput"
567
+ />
568
+ <slot name="dtable.toolbar" />
569
+ </div>
570
+
571
+ <!-- Table — the drop area spans the whole row via delegated DnD on this wrapper. -->
572
+ <div
573
+ ref="tableWrapper"
574
+ @dragover="onRowDragOver"
575
+ @drop="onRowDrop"
576
+ @dragend="onDragEnd"
577
+ >
578
+ <UTable
579
+ :data="rows"
580
+ :columns="tableColumns"
581
+ :loading="loading"
582
+ :pagination="pagination"
583
+ :pagination-options="paginationOptions"
584
+ :sorting="sorting"
585
+ :sorting-options="sortingOptions"
586
+ empty="No items found"
587
+ @update:pagination="pagination = $event ?? pagination"
588
+ @update:sorting="sorting = $event ?? sorting"
589
+ >
590
+ <template #empty>
591
+ <slot name="dtable.empty">
592
+ <div class="flex flex-col items-center gap-2 py-8 text-muted">
593
+ <UIcon name="i-lucide-inbox" class="h-8 w-8" />
594
+ <span class="text-sm">No items found</span>
595
+ </div>
596
+ </slot>
597
+ </template>
598
+
599
+ <template #loading>
600
+ <slot name="dtable.loading">
601
+ <div class="flex justify-center py-8">
602
+ <UIcon
603
+ name="i-lucide-loader-circle"
604
+ class="h-6 w-6 animate-spin text-muted"
605
+ />
606
+ </div>
607
+ </slot>
608
+ </template>
609
+ </UTable>
610
+ </div>
611
+
612
+ <!-- Pagination controls -->
613
+ <div class="flex items-center justify-between text-sm text-muted">
614
+ <span>{{ total }} items</span>
615
+ <UPagination
616
+ :model-value="pagination.pageIndex + 1"
617
+ :total="total"
618
+ :page-size="pagination.pageSize"
619
+ size="sm"
620
+ @update:model-value="
621
+ pagination = { ...pagination, pageIndex: $event - 1 }
622
+ "
623
+ />
624
+ <USelect
625
+ :model-value="pagination.pageSize"
626
+ :items="
627
+ pageSizeOptions.map((n) => ({ label: `${n} / page`, value: n }))
628
+ "
629
+ size="xs"
630
+ class="w-28"
631
+ @update:model-value="
632
+ pagination = { pageIndex: 0, pageSize: Number($event) }
633
+ "
634
+ />
635
+ </div>
636
+
637
+ <!-- Quick edit modal -->
638
+ <MapoListQuickEdit
639
+ v-if="editFields.length > 0"
640
+ v-model:open="quickEditOpen"
641
+ :endpoint="crudBase"
642
+ :item-id="quickEditId"
643
+ :edit-fields="editFields"
644
+ :lookup="lookup"
645
+ :languages="languages"
646
+ :registry="registry"
647
+ :offline="offlineMode"
648
+ :local-item="quickEditLocalItem"
649
+ @saved="onQuickEditSaved"
650
+ >
651
+ <template v-for="(_, name) in $slots" #[name]="slotProps">
652
+ <slot :name="`qedit.${String(name)}`" v-bind="slotProps ?? {}" />
653
+ </template>
654
+ </MapoListQuickEdit>
655
+ </div>
656
+ </template>
657
+
658
+ <style scoped>
659
+ .mapo-list-table :deep(tbody tr.mapo-drag-source){opacity:.4}.mapo-list-table :deep(tbody tr.mapo-drop-before>td){box-shadow:inset 0 2px 0 0 var(--ui-primary,#3b82f6)}.mapo-list-table :deep(tbody tr.mapo-drop-after>td){box-shadow:inset 0 -2px 0 0 var(--ui-primary,#3b82f6)}
660
+ </style>