@nuxt-atelier/admin 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -2
  3. package/dist/module.d.mts +52 -0
  4. package/dist/module.json +12 -0
  5. package/dist/module.mjs +188 -0
  6. package/dist/runtime/admin.css +1 -0
  7. package/dist/runtime/ai-off.d.ts +1 -0
  8. package/dist/runtime/ai-off.js +1 -0
  9. package/dist/runtime/appearance.d.ts +59 -0
  10. package/dist/runtime/appearance.js +111 -0
  11. package/dist/runtime/branding.d.ts +11 -0
  12. package/dist/runtime/branding.js +14 -0
  13. package/dist/runtime/components/App.d.vue.ts +6 -0
  14. package/dist/runtime/components/App.vue +170 -0
  15. package/dist/runtime/components/App.vue.d.ts +6 -0
  16. package/dist/runtime/components/AppearanceModal.d.vue.ts +3 -0
  17. package/dist/runtime/components/AppearanceModal.vue +267 -0
  18. package/dist/runtime/components/AppearanceModal.vue.d.ts +3 -0
  19. package/dist/runtime/components/AuthFrame.d.vue.ts +15 -0
  20. package/dist/runtime/components/AuthFrame.vue +56 -0
  21. package/dist/runtime/components/AuthFrame.vue.d.ts +15 -0
  22. package/dist/runtime/components/Brand.d.vue.ts +6 -0
  23. package/dist/runtime/components/Brand.vue +22 -0
  24. package/dist/runtime/components/Brand.vue.d.ts +6 -0
  25. package/dist/runtime/components/CollectionList.d.vue.ts +6 -0
  26. package/dist/runtime/components/CollectionList.vue +312 -0
  27. package/dist/runtime/components/CollectionList.vue.d.ts +6 -0
  28. package/dist/runtime/components/CommentsPanel.d.vue.ts +9 -0
  29. package/dist/runtime/components/CommentsPanel.vue +228 -0
  30. package/dist/runtime/components/CommentsPanel.vue.d.ts +9 -0
  31. package/dist/runtime/components/EntryEdit.d.vue.ts +9 -0
  32. package/dist/runtime/components/EntryEdit.vue +451 -0
  33. package/dist/runtime/components/EntryEdit.vue.d.ts +9 -0
  34. package/dist/runtime/components/FieldInput.d.vue.ts +13 -0
  35. package/dist/runtime/components/FieldInput.vue +325 -0
  36. package/dist/runtime/components/FieldInput.vue.d.ts +13 -0
  37. package/dist/runtime/components/FormSubmissions.d.vue.ts +6 -0
  38. package/dist/runtime/components/FormSubmissions.vue +197 -0
  39. package/dist/runtime/components/FormSubmissions.vue.d.ts +6 -0
  40. package/dist/runtime/components/GlobalSearch.d.vue.ts +10 -0
  41. package/dist/runtime/components/GlobalSearch.vue +145 -0
  42. package/dist/runtime/components/GlobalSearch.vue.d.ts +10 -0
  43. package/dist/runtime/components/Home.d.vue.ts +3 -0
  44. package/dist/runtime/components/Home.vue +226 -0
  45. package/dist/runtime/components/Home.vue.d.ts +3 -0
  46. package/dist/runtime/components/Icon.d.ts +14 -0
  47. package/dist/runtime/components/Icon.js +12 -0
  48. package/dist/runtime/components/MediaDetails.d.vue.ts +11 -0
  49. package/dist/runtime/components/MediaDetails.vue +222 -0
  50. package/dist/runtime/components/MediaDetails.vue.d.ts +11 -0
  51. package/dist/runtime/components/MediaField.d.vue.ts +14 -0
  52. package/dist/runtime/components/MediaField.vue +86 -0
  53. package/dist/runtime/components/MediaField.vue.d.ts +14 -0
  54. package/dist/runtime/components/MediaGrid.d.vue.ts +13 -0
  55. package/dist/runtime/components/MediaGrid.vue +49 -0
  56. package/dist/runtime/components/MediaGrid.vue.d.ts +13 -0
  57. package/dist/runtime/components/MediaLibrary.d.vue.ts +12 -0
  58. package/dist/runtime/components/MediaLibrary.vue +151 -0
  59. package/dist/runtime/components/MediaLibrary.vue.d.ts +12 -0
  60. package/dist/runtime/components/NotFound.d.vue.ts +6 -0
  61. package/dist/runtime/components/NotFound.vue +29 -0
  62. package/dist/runtime/components/NotFound.vue.d.ts +6 -0
  63. package/dist/runtime/components/NotificationBell.d.vue.ts +3 -0
  64. package/dist/runtime/components/NotificationBell.vue +53 -0
  65. package/dist/runtime/components/NotificationBell.vue.d.ts +3 -0
  66. package/dist/runtime/components/Page.d.vue.ts +28 -0
  67. package/dist/runtime/components/Page.vue +84 -0
  68. package/dist/runtime/components/Page.vue.d.ts +28 -0
  69. package/dist/runtime/components/RelatedCreate.d.vue.ts +16 -0
  70. package/dist/runtime/components/RelatedCreate.vue +86 -0
  71. package/dist/runtime/components/RelatedCreate.vue.d.ts +16 -0
  72. package/dist/runtime/components/RevisionHistory.d.vue.ts +16 -0
  73. package/dist/runtime/components/RevisionHistory.vue +145 -0
  74. package/dist/runtime/components/RevisionHistory.vue.d.ts +16 -0
  75. package/dist/runtime/components/RichTextEditor.d.vue.ts +15 -0
  76. package/dist/runtime/components/RichTextEditor.vue +190 -0
  77. package/dist/runtime/components/RichTextEditor.vue.d.ts +15 -0
  78. package/dist/runtime/components/RobotsSettings.d.vue.ts +3 -0
  79. package/dist/runtime/components/RobotsSettings.vue +173 -0
  80. package/dist/runtime/components/RobotsSettings.vue.d.ts +3 -0
  81. package/dist/runtime/components/RoleEdit.d.vue.ts +6 -0
  82. package/dist/runtime/components/RoleEdit.vue +234 -0
  83. package/dist/runtime/components/RoleEdit.vue.d.ts +6 -0
  84. package/dist/runtime/components/Roles.d.vue.ts +3 -0
  85. package/dist/runtime/components/Roles.vue +129 -0
  86. package/dist/runtime/components/Roles.vue.d.ts +3 -0
  87. package/dist/runtime/components/ScheduleSection.d.vue.ts +12 -0
  88. package/dist/runtime/components/ScheduleSection.vue +120 -0
  89. package/dist/runtime/components/ScheduleSection.vue.d.ts +12 -0
  90. package/dist/runtime/components/SeoPanel.d.vue.ts +7 -0
  91. package/dist/runtime/components/SeoPanel.vue +81 -0
  92. package/dist/runtime/components/SeoPanel.vue.d.ts +7 -0
  93. package/dist/runtime/components/Setup.d.vue.ts +3 -0
  94. package/dist/runtime/components/Setup.vue +79 -0
  95. package/dist/runtime/components/Setup.vue.d.ts +3 -0
  96. package/dist/runtime/components/SharedBlockUsage.d.vue.ts +7 -0
  97. package/dist/runtime/components/SharedBlockUsage.vue +91 -0
  98. package/dist/runtime/components/SharedBlockUsage.vue.d.ts +7 -0
  99. package/dist/runtime/components/Shell.d.vue.ts +15 -0
  100. package/dist/runtime/components/Shell.vue +277 -0
  101. package/dist/runtime/components/Shell.vue.d.ts +15 -0
  102. package/dist/runtime/components/SignIn.d.vue.ts +3 -0
  103. package/dist/runtime/components/SignIn.vue +106 -0
  104. package/dist/runtime/components/SignIn.vue.d.ts +3 -0
  105. package/dist/runtime/components/Toaster.d.vue.ts +3 -0
  106. package/dist/runtime/components/Toaster.vue +24 -0
  107. package/dist/runtime/components/Toaster.vue.d.ts +3 -0
  108. package/dist/runtime/components/Users.d.vue.ts +3 -0
  109. package/dist/runtime/components/Users.vue +226 -0
  110. package/dist/runtime/components/Users.vue.d.ts +3 -0
  111. package/dist/runtime/composables/debounced.d.ts +3 -0
  112. package/dist/runtime/composables/debounced.js +11 -0
  113. package/dist/runtime/composables/useAtelierAdmin.d.ts +17 -0
  114. package/dist/runtime/composables/useAtelierAdmin.js +53 -0
  115. package/dist/runtime/composables/useAtelierAdminPortal.d.ts +3 -0
  116. package/dist/runtime/composables/useAtelierAdminPortal.js +5 -0
  117. package/dist/runtime/composables/useAtelierAdminSchema.d.ts +182 -0
  118. package/dist/runtime/composables/useAtelierAdminSchema.js +26 -0
  119. package/dist/runtime/composables/useAtelierCollection.d.ts +49 -0
  120. package/dist/runtime/composables/useAtelierCollection.js +77 -0
  121. package/dist/runtime/composables/useAtelierComments.d.ts +50 -0
  122. package/dist/runtime/composables/useAtelierComments.js +46 -0
  123. package/dist/runtime/composables/useAtelierDashboard.d.ts +42 -0
  124. package/dist/runtime/composables/useAtelierDashboard.js +16 -0
  125. package/dist/runtime/composables/useAtelierEntryForm.d.ts +77 -0
  126. package/dist/runtime/composables/useAtelierEntryForm.js +184 -0
  127. package/dist/runtime/composables/useAtelierGlobalSearch.d.ts +12 -0
  128. package/dist/runtime/composables/useAtelierGlobalSearch.js +17 -0
  129. package/dist/runtime/composables/useAtelierMediaLibrary.d.ts +75 -0
  130. package/dist/runtime/composables/useAtelierMediaLibrary.js +85 -0
  131. package/dist/runtime/composables/useAtelierNavigation.d.ts +20 -0
  132. package/dist/runtime/composables/useAtelierNavigation.js +37 -0
  133. package/dist/runtime/composables/useAtelierNotifications.d.ts +21 -0
  134. package/dist/runtime/composables/useAtelierNotifications.js +34 -0
  135. package/dist/runtime/composables/useAtelierPermissions.d.ts +11 -0
  136. package/dist/runtime/composables/useAtelierPermissions.js +15 -0
  137. package/dist/runtime/composables/useAtelierPresence.d.ts +32 -0
  138. package/dist/runtime/composables/useAtelierPresence.js +95 -0
  139. package/dist/runtime/composables/useAtelierRealtime.d.ts +10 -0
  140. package/dist/runtime/composables/useAtelierRealtime.js +74 -0
  141. package/dist/runtime/composables/useAtelierRoles.d.ts +13 -0
  142. package/dist/runtime/composables/useAtelierRoles.js +15 -0
  143. package/dist/runtime/composables/useAtelierSeo.d.ts +34 -0
  144. package/dist/runtime/composables/useAtelierSeo.js +57 -0
  145. package/dist/runtime/composables/useAtelierSession.d.ts +35 -0
  146. package/dist/runtime/composables/useAtelierSession.js +36 -0
  147. package/dist/runtime/composables/useAtelierSetting.d.ts +11 -0
  148. package/dist/runtime/composables/useAtelierSetting.js +16 -0
  149. package/dist/runtime/composables/useAtelierUsers.d.ts +18 -0
  150. package/dist/runtime/composables/useAtelierUsers.js +16 -0
  151. package/dist/runtime/crystal-neuo/VERSION +3 -0
  152. package/dist/runtime/crystal-neuo/components/Alert.d.vue.ts +25 -0
  153. package/dist/runtime/crystal-neuo/components/Alert.vue +25 -0
  154. package/dist/runtime/crystal-neuo/components/Alert.vue.d.ts +25 -0
  155. package/dist/runtime/crystal-neuo/components/Avatar.d.vue.ts +15 -0
  156. package/dist/runtime/crystal-neuo/components/Avatar.vue +25 -0
  157. package/dist/runtime/crystal-neuo/components/Avatar.vue.d.ts +15 -0
  158. package/dist/runtime/crystal-neuo/components/Badge.d.vue.ts +25 -0
  159. package/dist/runtime/crystal-neuo/components/Badge.vue +17 -0
  160. package/dist/runtime/crystal-neuo/components/Badge.vue.d.ts +25 -0
  161. package/dist/runtime/crystal-neuo/components/Breadcrumb.d.vue.ts +16 -0
  162. package/dist/runtime/crystal-neuo/components/Breadcrumb.vue +26 -0
  163. package/dist/runtime/crystal-neuo/components/Breadcrumb.vue.d.ts +16 -0
  164. package/dist/runtime/crystal-neuo/components/Button.d.vue.ts +35 -0
  165. package/dist/runtime/crystal-neuo/components/Button.vue +31 -0
  166. package/dist/runtime/crystal-neuo/components/Button.vue.d.ts +35 -0
  167. package/dist/runtime/crystal-neuo/components/Card.d.vue.ts +25 -0
  168. package/dist/runtime/crystal-neuo/components/Card.vue +17 -0
  169. package/dist/runtime/crystal-neuo/components/Card.vue.d.ts +25 -0
  170. package/dist/runtime/crystal-neuo/components/Checkbox.d.vue.ts +23 -0
  171. package/dist/runtime/crystal-neuo/components/Checkbox.vue +45 -0
  172. package/dist/runtime/crystal-neuo/components/Checkbox.vue.d.ts +23 -0
  173. package/dist/runtime/crystal-neuo/components/DatePicker.d.vue.ts +24 -0
  174. package/dist/runtime/crystal-neuo/components/DatePicker.vue +43 -0
  175. package/dist/runtime/crystal-neuo/components/DatePicker.vue.d.ts +24 -0
  176. package/dist/runtime/crystal-neuo/components/Dialog.d.vue.ts +41 -0
  177. package/dist/runtime/crystal-neuo/components/Dialog.vue +63 -0
  178. package/dist/runtime/crystal-neuo/components/Dialog.vue.d.ts +41 -0
  179. package/dist/runtime/crystal-neuo/components/Drawer.d.vue.ts +34 -0
  180. package/dist/runtime/crystal-neuo/components/Drawer.vue +45 -0
  181. package/dist/runtime/crystal-neuo/components/Drawer.vue.d.ts +34 -0
  182. package/dist/runtime/crystal-neuo/components/FileUpload.d.vue.ts +32 -0
  183. package/dist/runtime/crystal-neuo/components/FileUpload.vue +94 -0
  184. package/dist/runtime/crystal-neuo/components/FileUpload.vue.d.ts +32 -0
  185. package/dist/runtime/crystal-neuo/components/Input.d.vue.ts +26 -0
  186. package/dist/runtime/crystal-neuo/components/Input.vue +48 -0
  187. package/dist/runtime/crystal-neuo/components/Input.vue.d.ts +26 -0
  188. package/dist/runtime/crystal-neuo/components/List.d.vue.ts +25 -0
  189. package/dist/runtime/crystal-neuo/components/List.vue +19 -0
  190. package/dist/runtime/crystal-neuo/components/List.vue.d.ts +25 -0
  191. package/dist/runtime/crystal-neuo/components/ListItem.d.vue.ts +20 -0
  192. package/dist/runtime/crystal-neuo/components/ListItem.vue +13 -0
  193. package/dist/runtime/crystal-neuo/components/ListItem.vue.d.ts +20 -0
  194. package/dist/runtime/crystal-neuo/components/Menu.d.vue.ts +26 -0
  195. package/dist/runtime/crystal-neuo/components/Menu.vue +120 -0
  196. package/dist/runtime/crystal-neuo/components/Menu.vue.d.ts +26 -0
  197. package/dist/runtime/crystal-neuo/components/Modal.d.vue.ts +32 -0
  198. package/dist/runtime/crystal-neuo/components/Modal.vue +37 -0
  199. package/dist/runtime/crystal-neuo/components/Modal.vue.d.ts +32 -0
  200. package/dist/runtime/crystal-neuo/components/Nav.d.vue.ts +24 -0
  201. package/dist/runtime/crystal-neuo/components/Nav.vue +15 -0
  202. package/dist/runtime/crystal-neuo/components/Nav.vue.d.ts +24 -0
  203. package/dist/runtime/crystal-neuo/components/NavLink.d.vue.ts +22 -0
  204. package/dist/runtime/crystal-neuo/components/NavLink.vue +23 -0
  205. package/dist/runtime/crystal-neuo/components/NavLink.vue.d.ts +22 -0
  206. package/dist/runtime/crystal-neuo/components/Pagination.d.vue.ts +23 -0
  207. package/dist/runtime/crystal-neuo/components/Pagination.vue +58 -0
  208. package/dist/runtime/crystal-neuo/components/Pagination.vue.d.ts +23 -0
  209. package/dist/runtime/crystal-neuo/components/Progress.d.vue.ts +18 -0
  210. package/dist/runtime/crystal-neuo/components/Progress.vue +35 -0
  211. package/dist/runtime/crystal-neuo/components/Progress.vue.d.ts +18 -0
  212. package/dist/runtime/crystal-neuo/components/Radio.d.vue.ts +28 -0
  213. package/dist/runtime/crystal-neuo/components/Radio.vue +40 -0
  214. package/dist/runtime/crystal-neuo/components/Radio.vue.d.ts +28 -0
  215. package/dist/runtime/crystal-neuo/components/SegmentedControl.d.vue.ts +31 -0
  216. package/dist/runtime/crystal-neuo/components/SegmentedControl.vue +39 -0
  217. package/dist/runtime/crystal-neuo/components/SegmentedControl.vue.d.ts +31 -0
  218. package/dist/runtime/crystal-neuo/components/Select.d.vue.ts +28 -0
  219. package/dist/runtime/crystal-neuo/components/Select.vue +48 -0
  220. package/dist/runtime/crystal-neuo/components/Select.vue.d.ts +28 -0
  221. package/dist/runtime/crystal-neuo/components/Sheet.d.vue.ts +29 -0
  222. package/dist/runtime/crystal-neuo/components/Sheet.vue +37 -0
  223. package/dist/runtime/crystal-neuo/components/Sheet.vue.d.ts +29 -0
  224. package/dist/runtime/crystal-neuo/components/Skeleton.d.vue.ts +13 -0
  225. package/dist/runtime/crystal-neuo/components/Skeleton.vue +17 -0
  226. package/dist/runtime/crystal-neuo/components/Skeleton.vue.d.ts +13 -0
  227. package/dist/runtime/crystal-neuo/components/Slider.d.vue.ts +28 -0
  228. package/dist/runtime/crystal-neuo/components/Slider.vue +41 -0
  229. package/dist/runtime/crystal-neuo/components/Slider.vue.d.ts +28 -0
  230. package/dist/runtime/crystal-neuo/components/TabBar.d.vue.ts +28 -0
  231. package/dist/runtime/crystal-neuo/components/TabBar.vue +29 -0
  232. package/dist/runtime/crystal-neuo/components/TabBar.vue.d.ts +28 -0
  233. package/dist/runtime/crystal-neuo/components/Table.d.vue.ts +31 -0
  234. package/dist/runtime/crystal-neuo/components/Table.vue +36 -0
  235. package/dist/runtime/crystal-neuo/components/Table.vue.d.ts +31 -0
  236. package/dist/runtime/crystal-neuo/components/Tabs.d.vue.ts +40 -0
  237. package/dist/runtime/crystal-neuo/components/Tabs.vue +79 -0
  238. package/dist/runtime/crystal-neuo/components/Tabs.vue.d.ts +40 -0
  239. package/dist/runtime/crystal-neuo/components/Textarea.d.vue.ts +25 -0
  240. package/dist/runtime/crystal-neuo/components/Textarea.vue +48 -0
  241. package/dist/runtime/crystal-neuo/components/Textarea.vue.d.ts +25 -0
  242. package/dist/runtime/crystal-neuo/components/Toast.d.vue.ts +32 -0
  243. package/dist/runtime/crystal-neuo/components/Toast.vue +67 -0
  244. package/dist/runtime/crystal-neuo/components/Toast.vue.d.ts +32 -0
  245. package/dist/runtime/crystal-neuo/components/Toggle.d.vue.ts +21 -0
  246. package/dist/runtime/crystal-neuo/components/Toggle.vue +43 -0
  247. package/dist/runtime/crystal-neuo/components/Toggle.vue.d.ts +21 -0
  248. package/dist/runtime/crystal-neuo/components/Tooltip.d.vue.ts +23 -0
  249. package/dist/runtime/crystal-neuo/components/Tooltip.vue +38 -0
  250. package/dist/runtime/crystal-neuo/components/Tooltip.vue.d.ts +23 -0
  251. package/dist/runtime/crystal-neuo/components/cn.d.ts +1 -0
  252. package/dist/runtime/crystal-neuo/components/cn.js +3 -0
  253. package/dist/runtime/crystal-neuo/components/useControlAttrs.d.ts +15 -0
  254. package/dist/runtime/crystal-neuo/components/useControlAttrs.js +11 -0
  255. package/dist/runtime/crystal-neuo/components/useFocusTrap.d.ts +9 -0
  256. package/dist/runtime/crystal-neuo/components/useFocusTrap.js +55 -0
  257. package/dist/runtime/crystal-neuo/components/useModalDialog.d.ts +11 -0
  258. package/dist/runtime/crystal-neuo/components/useModalDialog.js +42 -0
  259. package/dist/runtime/crystal-neuo/contract/alert.contract.d.ts +3 -0
  260. package/dist/runtime/crystal-neuo/contract/alert.contract.js +18 -0
  261. package/dist/runtime/crystal-neuo/contract/avatar.contract.d.ts +3 -0
  262. package/dist/runtime/crystal-neuo/contract/avatar.contract.js +18 -0
  263. package/dist/runtime/crystal-neuo/contract/badge.contract.d.ts +3 -0
  264. package/dist/runtime/crystal-neuo/contract/badge.contract.js +18 -0
  265. package/dist/runtime/crystal-neuo/contract/breadcrumb.contract.d.ts +3 -0
  266. package/dist/runtime/crystal-neuo/contract/breadcrumb.contract.js +19 -0
  267. package/dist/runtime/crystal-neuo/contract/button.contract.d.ts +3 -0
  268. package/dist/runtime/crystal-neuo/contract/button.contract.js +22 -0
  269. package/dist/runtime/crystal-neuo/contract/card.contract.d.ts +3 -0
  270. package/dist/runtime/crystal-neuo/contract/card.contract.js +18 -0
  271. package/dist/runtime/crystal-neuo/contract/checkbox.contract.d.ts +3 -0
  272. package/dist/runtime/crystal-neuo/contract/checkbox.contract.js +19 -0
  273. package/dist/runtime/crystal-neuo/contract/date-picker.contract.d.ts +3 -0
  274. package/dist/runtime/crystal-neuo/contract/date-picker.contract.js +22 -0
  275. package/dist/runtime/crystal-neuo/contract/dialog.contract.d.ts +3 -0
  276. package/dist/runtime/crystal-neuo/contract/dialog.contract.js +23 -0
  277. package/dist/runtime/crystal-neuo/contract/drawer.contract.d.ts +3 -0
  278. package/dist/runtime/crystal-neuo/contract/drawer.contract.js +23 -0
  279. package/dist/runtime/crystal-neuo/contract/file-upload.contract.d.ts +17 -0
  280. package/dist/runtime/crystal-neuo/contract/file-upload.contract.js +36 -0
  281. package/dist/runtime/crystal-neuo/contract/index.d.ts +67 -0
  282. package/dist/runtime/crystal-neuo/contract/index.js +96 -0
  283. package/dist/runtime/crystal-neuo/contract/input.contract.d.ts +3 -0
  284. package/dist/runtime/crystal-neuo/contract/input.contract.js +19 -0
  285. package/dist/runtime/crystal-neuo/contract/list.contract.d.ts +3 -0
  286. package/dist/runtime/crystal-neuo/contract/list.contract.js +21 -0
  287. package/dist/runtime/crystal-neuo/contract/menu.contract.d.ts +21 -0
  288. package/dist/runtime/crystal-neuo/contract/menu.contract.js +51 -0
  289. package/dist/runtime/crystal-neuo/contract/modal.contract.d.ts +3 -0
  290. package/dist/runtime/crystal-neuo/contract/modal.contract.js +24 -0
  291. package/dist/runtime/crystal-neuo/contract/nav.contract.d.ts +3 -0
  292. package/dist/runtime/crystal-neuo/contract/nav.contract.js +18 -0
  293. package/dist/runtime/crystal-neuo/contract/pagination.contract.d.ts +11 -0
  294. package/dist/runtime/crystal-neuo/contract/pagination.contract.js +32 -0
  295. package/dist/runtime/crystal-neuo/contract/progress.contract.d.ts +3 -0
  296. package/dist/runtime/crystal-neuo/contract/progress.contract.js +19 -0
  297. package/dist/runtime/crystal-neuo/contract/radio.contract.d.ts +3 -0
  298. package/dist/runtime/crystal-neuo/contract/radio.contract.js +24 -0
  299. package/dist/runtime/crystal-neuo/contract/segmented-control.contract.d.ts +3 -0
  300. package/dist/runtime/crystal-neuo/contract/segmented-control.contract.js +23 -0
  301. package/dist/runtime/crystal-neuo/contract/select.contract.d.ts +3 -0
  302. package/dist/runtime/crystal-neuo/contract/select.contract.js +24 -0
  303. package/dist/runtime/crystal-neuo/contract/sheet.contract.d.ts +3 -0
  304. package/dist/runtime/crystal-neuo/contract/sheet.contract.js +23 -0
  305. package/dist/runtime/crystal-neuo/contract/skeleton.contract.d.ts +3 -0
  306. package/dist/runtime/crystal-neuo/contract/skeleton.contract.js +18 -0
  307. package/dist/runtime/crystal-neuo/contract/slider.contract.d.ts +3 -0
  308. package/dist/runtime/crystal-neuo/contract/slider.contract.js +24 -0
  309. package/dist/runtime/crystal-neuo/contract/tab-bar.contract.d.ts +3 -0
  310. package/dist/runtime/crystal-neuo/contract/tab-bar.contract.js +19 -0
  311. package/dist/runtime/crystal-neuo/contract/table.contract.d.ts +3 -0
  312. package/dist/runtime/crystal-neuo/contract/table.contract.js +18 -0
  313. package/dist/runtime/crystal-neuo/contract/tabs.contract.d.ts +3 -0
  314. package/dist/runtime/crystal-neuo/contract/tabs.contract.js +26 -0
  315. package/dist/runtime/crystal-neuo/contract/textarea.contract.d.ts +3 -0
  316. package/dist/runtime/crystal-neuo/contract/textarea.contract.js +19 -0
  317. package/dist/runtime/crystal-neuo/contract/toast.contract.d.ts +3 -0
  318. package/dist/runtime/crystal-neuo/contract/toast.contract.js +18 -0
  319. package/dist/runtime/crystal-neuo/contract/toggle.contract.d.ts +3 -0
  320. package/dist/runtime/crystal-neuo/contract/toggle.contract.js +22 -0
  321. package/dist/runtime/crystal-neuo/contract/tooltip.contract.d.ts +3 -0
  322. package/dist/runtime/crystal-neuo/contract/tooltip.contract.js +18 -0
  323. package/dist/runtime/crystal-neuo/contract/types.d.ts +76 -0
  324. package/dist/runtime/crystal-neuo/contract/types.js +12 -0
  325. package/dist/runtime/crystal-neuo/css/crystal-neuo.css +1 -0
  326. package/dist/runtime/crystal-neuo/runtime/axes.d.ts +16 -0
  327. package/dist/runtime/crystal-neuo/runtime/axes.js +9 -0
  328. package/dist/runtime/crystal-neuo/runtime/index.d.ts +62 -0
  329. package/dist/runtime/crystal-neuo/runtime/index.js +115 -0
  330. package/dist/runtime/crystal-neuo/runtime/platform.d.ts +11 -0
  331. package/dist/runtime/crystal-neuo/runtime/platform.js +18 -0
  332. package/dist/runtime/crystal-neuo/runtime/refraction.d.ts +42 -0
  333. package/dist/runtime/crystal-neuo/runtime/refraction.js +183 -0
  334. package/dist/runtime/css/shell.css +1 -0
  335. package/dist/runtime/i18n/en.d.ts +2 -0
  336. package/dist/runtime/i18n/en.js +511 -0
  337. package/dist/runtime/i18n/index.d.ts +15 -0
  338. package/dist/runtime/i18n/index.js +52 -0
  339. package/dist/runtime/overrides.d.ts +5 -0
  340. package/dist/runtime/overrides.js +6 -0
  341. package/dist/runtime/pages/AdminPage.d.vue.ts +3 -0
  342. package/dist/runtime/pages/AdminPage.vue +49 -0
  343. package/dist/runtime/pages/AdminPage.vue.d.ts +3 -0
  344. package/dist/runtime/passkeys-off.d.ts +1 -0
  345. package/dist/runtime/passkeys-off.js +3 -0
  346. package/dist/runtime/passkeys.d.ts +1 -0
  347. package/dist/runtime/passkeys.js +6 -0
  348. package/dist/runtime/toast.d.ts +15 -0
  349. package/dist/runtime/toast.js +19 -0
  350. package/dist/runtime/types.d.ts +137 -0
  351. package/dist/runtime/types.js +0 -0
  352. package/dist/types.d.mts +3 -0
  353. package/package.json +59 -4
@@ -0,0 +1,325 @@
1
+ <script setup>
2
+ import { useQuery } from "@tanstack/vue-query";
3
+ import { computed, defineAsyncComponent, inject, ref, resolveComponent } from "vue";
4
+ import { ai } from "#atelier-admin-ai";
5
+ import { applies } from "#atelier/shared/fields";
6
+ import { atelierFetch } from "../composables/useAtelierAdmin";
7
+ import { titleField } from "../composables/useAtelierCollection";
8
+ import { useAtelierAdminSchema } from "../composables/useAtelierAdminSchema";
9
+ import { humanize, singularLabel } from "../composables/useAtelierNavigation";
10
+ import CnButton from "../crystal-neuo/components/Button.vue";
11
+ import CnCheckbox from "../crystal-neuo/components/Checkbox.vue";
12
+ import CnInput from "../crystal-neuo/components/Input.vue";
13
+ import CnSelect from "../crystal-neuo/components/Select.vue";
14
+ import CnTextarea from "../crystal-neuo/components/Textarea.vue";
15
+ import CnToggle from "../crystal-neuo/components/Toggle.vue";
16
+ import { pascal, useOverrides } from "../overrides";
17
+ import Icon from "./Icon";
18
+ import MediaField from "./MediaField.vue";
19
+ import RelatedCreate from "./RelatedCreate.vue";
20
+ import { useAdminI18n } from "../i18n";
21
+ defineOptions({ name: "AtelierAdminFieldInput" });
22
+ const RichTextEditor = defineAsyncComponent(() => import("./RichTextEditor.vue"));
23
+ const props = defineProps({
24
+ form: { type: null, required: true },
25
+ name: { type: String, required: true },
26
+ field: { type: Object, required: true },
27
+ root: { type: Object, required: true },
28
+ sibling: { type: Object, required: true },
29
+ readOnly: { type: Boolean, required: false }
30
+ });
31
+ const { t } = useAdminI18n();
32
+ const entry = inject("atelier-entry", null);
33
+ const aiOn = ai ? ai.enabled() : ref(false);
34
+ const label = computed(() => (props.field.label ?? humanize(props.name.split(".").pop())) + (props.field.required ? " *" : ""));
35
+ const visible = computed(() => applies(props.field, props.sibling ?? {}, props.root ?? {}));
36
+ const options = (list) => list.map((o) => typeof o === "string" ? { value: o, label: o } : { value: o.value, label: o.label ?? o.value });
37
+ const errorOf = (field) => {
38
+ const all = [...field.state.meta.errors, field.state.meta.errorMap?.onServer].filter(Boolean);
39
+ const first = all[0];
40
+ return typeof first === "string" ? first : first?.message;
41
+ };
42
+ const toLocal = (iso) => {
43
+ if (typeof iso !== "string" || !iso)
44
+ return "";
45
+ const d = new Date(iso);
46
+ return Number.isNaN(d.getTime()) ? "" : new Date(d.getTime() - d.getTimezoneOffset() * 6e4).toISOString().slice(0, 16);
47
+ };
48
+ const fromLocal = (local) => local ? new Date(local).toISOString().replace(/\.\d{3}Z$/, "Z") : null;
49
+ const json = (value) => value === void 0 || value === null ? "" : JSON.stringify(value, null, 2);
50
+ function parseJson(text, set) {
51
+ try {
52
+ set(text.trim() ? JSON.parse(text) : null);
53
+ } catch {
54
+ }
55
+ }
56
+ const { schema } = useAtelierAdminSchema();
57
+ const target = computed(() => props.field.type === "relation" ? schema.value?.collections.find((c) => c.name === props.field.to) : void 0);
58
+ const related = useQuery({
59
+ queryKey: ["atelier", "collections", computed(() => target.value?.name ?? ""), "choices"],
60
+ queryFn: () => atelierFetch(`/collections/${encodeURIComponent(target.value.name)}`, { query: { limit: 100, draft: "true" } }),
61
+ enabled: computed(() => !!target.value)
62
+ });
63
+ const creating = ref(false);
64
+ const relatedOptions = computed(() => {
65
+ const key = titleField(target.value);
66
+ return (related.data.value?.items ?? []).map((e) => ({ value: e.id, label: String(key && e.data[key] || e.id) }));
67
+ });
68
+ const fieldOverride = useOverrides()(`Field${pascal(props.field.type === "custom" ? props.field.fieldType : props.field.type)}`);
69
+ const custom = computed(() => props.field.type === "custom" && props.field.input ? resolveComponent(props.field.input) : void 0);
70
+ const inputType = { text: "text", slug: "text", email: "email", url: "url", color: "color" };
71
+ </script>
72
+
73
+ <template>
74
+ <template v-if="visible">
75
+ <!-- an object: its own fields, in a group -->
76
+ <fieldset
77
+ v-if="field.type === 'object'"
78
+ class="app-fieldset"
79
+ >
80
+ <legend class="cn-label">
81
+ {{ label }}
82
+ </legend>
83
+ <AtelierAdminFieldInput
84
+ v-for="(sub, key) in field.fields"
85
+ :key="key"
86
+ :form="form"
87
+ :name="`${name}.${key}`"
88
+ :field="sub"
89
+ :root="root"
90
+ :sibling="sibling?.[name.split('.').pop()] ?? {}"
91
+ :read-only="readOnly"
92
+ />
93
+ </fieldset>
94
+
95
+ <!-- a repeater: a list of items with the same fields -->
96
+ <form.Field
97
+ v-else-if="field.type === 'repeater'"
98
+ :name="name"
99
+ mode="array"
100
+ >
101
+ <template #default="{ field: list }">
102
+ <fieldset class="app-fieldset">
103
+ <legend class="cn-label">
104
+ {{ label }}
105
+ </legend>
106
+ <div
107
+ v-for="(item, i) in list.state.value ?? []"
108
+ :key="i"
109
+ class="app-repeater__item app-fieldset"
110
+ >
111
+ <AtelierAdminFieldInput
112
+ v-for="(sub, key) in field.fields"
113
+ :key="key"
114
+ :form="form"
115
+ :name="`${name}[${i}].${key}`"
116
+ :field="sub"
117
+ :root="root"
118
+ :sibling="item"
119
+ :read-only="readOnly"
120
+ />
121
+ <div>
122
+ <CnButton
123
+ variant="ghost"
124
+ size="sm"
125
+ :disabled="readOnly"
126
+ @click="list.removeValue(i)"
127
+ >
128
+ <Icon name="trash-2" />
129
+ {{ t("field.remove") }}
130
+ </CnButton>
131
+ </div>
132
+ </div>
133
+ <div>
134
+ <CnButton
135
+ variant="secondary"
136
+ size="sm"
137
+ :disabled="readOnly"
138
+ @click="list.pushValue({})"
139
+ >
140
+ <Icon name="plus" />
141
+ {{ t("field.add") }}
142
+ </CnButton>
143
+ </div>
144
+ </fieldset>
145
+ </template>
146
+ </form.Field>
147
+
148
+ <form.Field
149
+ v-else
150
+ :name="name"
151
+ >
152
+ <template #default="{ field: f }">
153
+ <div class="cn-field">
154
+ <component
155
+ :is="fieldOverride"
156
+ v-if="fieldOverride"
157
+ :model-value="f.state.value"
158
+ :field="field"
159
+ :label="label"
160
+ :error="errorOf(f)"
161
+ :disabled="readOnly"
162
+ @update:model-value="f.handleChange"
163
+ />
164
+ <CnToggle
165
+ v-else-if="field.type === 'boolean'"
166
+ :checked="!!f.state.value"
167
+ :label="label"
168
+ :disabled="readOnly"
169
+ @update:checked="f.handleChange"
170
+ />
171
+
172
+ <MediaField
173
+ v-else-if="field.type === 'media'"
174
+ :model-value="f.state.value ?? null"
175
+ :label="label"
176
+ :hint="field.help"
177
+ :error="errorOf(f)"
178
+ :disabled="readOnly"
179
+ @update:model-value="f.handleChange"
180
+ />
181
+ <CnSelect
182
+ v-else-if="field.type === 'select' || field.type === 'relation' && !field.many"
183
+ :model-value="f.state.value ?? ''"
184
+ :label="label"
185
+ :options="[{ value: '', label: '\u2014' }, ...field.type === 'select' ? options(field.options) : relatedOptions]"
186
+ :error="errorOf(f)"
187
+ :disabled="readOnly"
188
+ @update:model-value="(v) => f.handleChange(v || null)"
189
+ />
190
+
191
+ <fieldset
192
+ v-else-if="field.type === 'multiSelect' || field.type === 'relation'"
193
+ class="app-fieldset"
194
+ >
195
+ <legend class="cn-label">
196
+ {{ label }}
197
+ </legend>
198
+ <CnCheckbox
199
+ v-for="o in field.type === 'multiSelect' ? options(field.options) : relatedOptions"
200
+ :key="o.value"
201
+ :label="o.label"
202
+ :checked="(f.state.value ?? []).includes(o.value)"
203
+ :disabled="readOnly"
204
+ @update:checked="(on) => f.handleChange(on ? [...f.state.value ?? [], o.value] : (f.state.value ?? []).filter((x) => x !== o.value))"
205
+ />
206
+ <span
207
+ v-if="errorOf(f)"
208
+ class="cn-field__message"
209
+ role="alert"
210
+ >{{ errorOf(f) }}</span>
211
+ </fieldset>
212
+
213
+ <CnInput
214
+ v-else-if="field.type === 'number'"
215
+ :model-value="f.state.value === null || f.state.value === void 0 ? '' : String(f.state.value)"
216
+ :label="label"
217
+ type="number"
218
+ :step="field.integer ? 1 : 'any'"
219
+ :min="field.min"
220
+ :max="field.max"
221
+ :hint="field.help"
222
+ :error="errorOf(f)"
223
+ :disabled="readOnly"
224
+ @update:model-value="(v) => f.handleChange(v === '' ? null : Number(v))"
225
+ @blur="f.handleBlur"
226
+ />
227
+
228
+ <CnInput
229
+ v-else-if="field.type === 'date'"
230
+ :model-value="field.mode === 'datetime' ? toLocal(f.state.value) : f.state.value ?? ''"
231
+ :label="label"
232
+ :type="field.mode === 'datetime' ? 'datetime-local' : field.mode === 'time' ? 'time' : 'date'"
233
+ :hint="field.help"
234
+ :error="errorOf(f)"
235
+ :disabled="readOnly"
236
+ @update:model-value="(v) => f.handleChange(field.mode === 'datetime' ? fromLocal(v) : v || null)"
237
+ />
238
+
239
+ <CnTextarea
240
+ v-else-if="field.type === 'textarea'"
241
+ :model-value="f.state.value ?? ''"
242
+ :label="label"
243
+ :rows="field.rows ?? 4"
244
+ :hint="field.help"
245
+ :error="errorOf(f)"
246
+ :disabled="readOnly"
247
+ @update:model-value="(v) => f.handleChange(v || null)"
248
+ @blur="f.handleBlur"
249
+ />
250
+
251
+ <RichTextEditor
252
+ v-else-if="field.type === 'richText'"
253
+ :model-value="f.state.value ?? null"
254
+ :label="label"
255
+ :hint="field.help"
256
+ :error="errorOf(f)"
257
+ :disabled="readOnly"
258
+ @update:model-value="f.handleChange"
259
+ />
260
+
261
+ <component
262
+ :is="custom"
263
+ v-else-if="custom"
264
+ :model-value="f.state.value"
265
+ :field="field"
266
+ :label="label"
267
+ :disabled="readOnly"
268
+ @update:model-value="f.handleChange"
269
+ />
270
+
271
+ <CnTextarea
272
+ v-else-if="field.type === 'json' || field.type === 'blocks' || field.type === 'custom'"
273
+ :model-value="json(f.state.value)"
274
+ :label="label"
275
+ :rows="6"
276
+ :hint="field.help ?? t('field.jsonHint')"
277
+ :error="errorOf(f)"
278
+ :disabled="readOnly"
279
+ @update:model-value="(v) => parseJson(v, f.handleChange)"
280
+ />
281
+
282
+ <CnInput
283
+ v-else
284
+ :model-value="f.state.value ?? ''"
285
+ :label="label"
286
+ :type="inputType[field.type] ?? 'text'"
287
+ :hint="field.help"
288
+ :error="errorOf(f)"
289
+ :disabled="readOnly"
290
+ :maxlength="'maxLength' in field ? field.maxLength : void 0"
291
+ @update:model-value="(v) => f.handleChange(v || null)"
292
+ @blur="f.handleBlur"
293
+ />
294
+ <component
295
+ :is="ai.TextActions"
296
+ v-if="ai && aiOn && entry && !readOnly && !name.includes('.') && (field.type === 'text' || field.type === 'textarea') && f.state.value"
297
+ :type="entry.type"
298
+ :field="name"
299
+ :value="String(f.state.value)"
300
+ :locale="entry.locale"
301
+ :locales="entry.locales"
302
+ @apply="(v) => f.handleChange(v)"
303
+ />
304
+ <template v-if="field.type === 'relation' && target?.can.create && !readOnly">
305
+ <div>
306
+ <CnButton
307
+ variant="ghost"
308
+ size="sm"
309
+ @click="creating = true"
310
+ >
311
+ <Icon name="plus" />
312
+ {{ t("field.newRelated", { name: singularLabel(target).toLowerCase() }) }}
313
+ </CnButton>
314
+ </div>
315
+ <RelatedCreate
316
+ v-model:open="creating"
317
+ :collection="target.name"
318
+ @created="(id) => f.handleChange(field.many ? [...f.state.value ?? [], id] : id)"
319
+ />
320
+ </template>
321
+ </div>
322
+ </template>
323
+ </form.Field>
324
+ </template>
325
+ </template>
@@ -0,0 +1,13 @@
1
+ import type { Field } from '../types.js';
2
+ type __VLS_Props = {
3
+ form: any;
4
+ name: string;
5
+ field: Field;
6
+ /** The whole entry's values and this field's siblings, for `when` conditions. */
7
+ root: Record<string, unknown>;
8
+ sibling: Record<string, unknown>;
9
+ readOnly?: boolean;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ id: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,197 @@
1
+ <script setup>
2
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/vue-query";
3
+ import { computed, ref } from "vue";
4
+ import { atelierFetch } from "../composables/useAtelierAdmin";
5
+ import { refDebounced } from "../composables/debounced";
6
+ import CnButton from "../crystal-neuo/components/Button.vue";
7
+ import CnDialog from "../crystal-neuo/components/Dialog.vue";
8
+ import CnInput from "../crystal-neuo/components/Input.vue";
9
+ import { useAdminToast } from "../toast";
10
+ import { useAdminI18n } from "../i18n";
11
+ const props = defineProps({
12
+ id: { type: String, required: true }
13
+ });
14
+ const { t } = useAdminI18n();
15
+ const toast = useAdminToast();
16
+ const client = useQueryClient();
17
+ const PAGE = 50;
18
+ const q = ref("");
19
+ const from = ref("");
20
+ const to = ref("");
21
+ const offset = ref(0);
22
+ const search = refDebounced(q, 300);
23
+ const base = computed(() => `/api/_atelier/forms/${encodeURIComponent(props.id)}/submissions`);
24
+ const filters = computed(() => ({ ...search.value ? { q: search.value } : {}, ...from.value ? { from: from.value } : {}, ...to.value ? { to: to.value } : {} }));
25
+ const queryKey = computed(() => ["atelier", "form-submissions", props.id, filters.value, offset.value]);
26
+ const page = useQuery({
27
+ queryKey,
28
+ queryFn: () => atelierFetch(`/forms/${encodeURIComponent(props.id)}/submissions`, { query: { ...filters.value, limit: PAGE, offset: offset.value } })
29
+ });
30
+ const columns = computed(() => (page.data.value?.fields ?? []).filter((f) => f.type !== "hidden").slice(0, 4));
31
+ const exportUrl = (format) => `${base.value}?${new URLSearchParams({ ...filters.value, format })}`;
32
+ const shown = (value) => value && typeof value === "object" ? value.name : value === true ? "\u2713" : value === false ? "" : String(value ?? "");
33
+ const isFile = (value) => !!value && typeof value === "object" && "name" in value;
34
+ const refresh = () => client.invalidateQueries({ queryKey: ["atelier", "form-submissions", props.id] });
35
+ const remove = useMutation({
36
+ mutationFn: (submission) => atelierFetch(`/forms/${encodeURIComponent(props.id)}/submissions/${encodeURIComponent(submission)}`, { method: "DELETE" }),
37
+ onSuccess: refresh,
38
+ onError: (e) => toast.add({ color: "error", title: e.message })
39
+ });
40
+ const erasing = ref(false);
41
+ const email = ref("");
42
+ async function erase() {
43
+ try {
44
+ const { deleted } = await atelierFetch("/forms/erase", { method: "POST", body: { email: email.value } });
45
+ toast.add({ color: "success", title: t("forms.erased", { count: deleted }) });
46
+ email.value = "";
47
+ await refresh();
48
+ } catch (e) {
49
+ toast.add({ color: "error", title: e.message });
50
+ }
51
+ }
52
+ </script>
53
+
54
+ <template>
55
+ <section
56
+ class="app-comments"
57
+ aria-labelledby="atelier-form-submissions"
58
+ data-form-submissions
59
+ >
60
+ <h2
61
+ id="atelier-form-submissions"
62
+ class="app-section__title"
63
+ >
64
+ {{ t("forms.submissions") }} <span v-if="page.data.value">({{ page.data.value.total }})</span>
65
+ </h2>
66
+ <div class="app-row">
67
+ <CnInput
68
+ v-model="q"
69
+ type="search"
70
+ :label="t('list.search')"
71
+ />
72
+ <CnInput
73
+ v-model="from"
74
+ type="date"
75
+ :label="t('forms.from')"
76
+ />
77
+ <CnInput
78
+ v-model="to"
79
+ type="date"
80
+ :label="t('forms.to')"
81
+ />
82
+ </div>
83
+ <div class="app-row">
84
+ <a
85
+ class="cn-button cn-button--secondary cn-button--size-sm"
86
+ :href="exportUrl('csv')"
87
+ download
88
+ >{{ t("forms.exportCsv") }}</a>
89
+ <a
90
+ class="cn-button cn-button--ghost cn-button--size-sm"
91
+ :href="exportUrl('json')"
92
+ download
93
+ >{{ t("forms.exportJson") }}</a>
94
+ <CnButton
95
+ variant="ghost"
96
+ size="sm"
97
+ @click="erasing = true"
98
+ >
99
+ {{ t("forms.erase") }}
100
+ </CnButton>
101
+ </div>
102
+ <p v-if="page.data.value && !page.data.value.items.length">
103
+ {{ t("forms.none") }}
104
+ </p>
105
+ <div
106
+ v-else-if="page.data.value"
107
+ class="app-table-wrap"
108
+ >
109
+ <table class="cn-table cn-table--default cn-table--size-sm">
110
+ <thead>
111
+ <tr>
112
+ <th scope="col">
113
+ {{ t("forms.submitted") }}
114
+ </th>
115
+ <th
116
+ v-for="column in columns"
117
+ :key="column.name"
118
+ scope="col"
119
+ >
120
+ {{ column.label }}
121
+ </th>
122
+ <th scope="col">
123
+ <span class="sr-only">{{ t("common.actions") }}</span>
124
+ </th>
125
+ </tr>
126
+ </thead>
127
+ <tbody>
128
+ <tr
129
+ v-for="item in page.data.value.items"
130
+ :key="item.id"
131
+ >
132
+ <td>
133
+ <time :datetime="item.createdAt">{{ new Date(item.createdAt).toLocaleString() }}</time>
134
+ </td>
135
+ <td
136
+ v-for="column in columns"
137
+ :key="column.name"
138
+ >
139
+ <a
140
+ v-if="isFile(item.data[column.name])"
141
+ :href="`${base}/${encodeURIComponent(item.id)}/files/${encodeURIComponent(column.name)}`"
142
+ download
143
+ >{{ shown(item.data[column.name]) }}</a>
144
+ <template v-else>
145
+ {{ shown(item.data[column.name]) }}
146
+ </template>
147
+ </td>
148
+ <td>
149
+ <CnButton
150
+ variant="ghost"
151
+ size="sm"
152
+ @click="remove.mutate(item.id)"
153
+ >
154
+ {{ t("common.delete") }}
155
+ </CnButton>
156
+ </td>
157
+ </tr>
158
+ </tbody>
159
+ </table>
160
+ </div>
161
+ <div
162
+ v-if="page.data.value && page.data.value.total > PAGE"
163
+ class="app-row"
164
+ >
165
+ <CnButton
166
+ variant="ghost"
167
+ size="sm"
168
+ :disabled="offset === 0"
169
+ @click="offset = Math.max(0, offset - PAGE)"
170
+ >
171
+ {{ t("forms.previous") }}
172
+ </CnButton>
173
+ <CnButton
174
+ variant="ghost"
175
+ size="sm"
176
+ :disabled="offset + PAGE >= page.data.value.total"
177
+ @click="offset += PAGE"
178
+ >
179
+ {{ t("forms.next") }}
180
+ </CnButton>
181
+ </div>
182
+ <CnDialog
183
+ v-model:open="erasing"
184
+ :title="t('forms.eraseTitle')"
185
+ :description="t('forms.eraseBody')"
186
+ :confirm-label="t('forms.erase')"
187
+ variant="destructive"
188
+ @confirm="erase"
189
+ >
190
+ <CnInput
191
+ v-model="email"
192
+ type="email"
193
+ :label="t('common.email')"
194
+ />
195
+ </CnDialog>
196
+ </section>
197
+ </template>
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ id: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,10 @@
1
+ type __VLS_ModelProps = {
2
+ 'open'?: boolean;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:open": (value: boolean) => any;
6
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
7
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;