convex-cms 0.0.3 → 0.0.5-alpha.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.
- package/README.md +107 -60
- package/admin/README.md +99 -0
- package/admin/src/components/AdminLayout.tsx +22 -0
- package/admin/src/components/BreakingChangesWarningDialog.tsx +81 -0
- package/admin/src/components/BulkActionBar.tsx +190 -0
- package/admin/src/components/BulkOperationModal.tsx +177 -0
- package/admin/src/components/ContentEntryEditor.tsx +1104 -0
- package/admin/src/components/ContentTypeFormModal.tsx +1012 -0
- package/admin/src/components/ErrorBoundary.tsx +83 -0
- package/admin/src/components/ErrorState.tsx +147 -0
- package/admin/src/components/Header.tsx +294 -0
- package/admin/src/components/RouteGuard.tsx +264 -0
- package/admin/src/components/Sidebar.tsx +90 -0
- package/admin/src/components/TaxonomyEditor.tsx +348 -0
- package/admin/src/components/TermTree.tsx +533 -0
- package/admin/src/components/UploadDropzone.tsx +383 -0
- package/admin/src/components/VersionCompare.tsx +250 -0
- package/admin/src/components/VersionHistory.tsx +279 -0
- package/admin/src/components/VersionRollbackModal.tsx +79 -0
- package/admin/src/components/cmsds/CmsButton.tsx +101 -0
- package/admin/src/components/cmsds/CmsDialog.tsx +139 -0
- package/admin/src/components/cmsds/CmsDropdown.tsx +62 -0
- package/admin/src/components/cmsds/CmsEmptyState.tsx +54 -0
- package/admin/src/components/cmsds/CmsField.tsx +47 -0
- package/admin/src/components/cmsds/CmsPageHeader.tsx +35 -0
- package/admin/src/components/cmsds/CmsStatusBadge.tsx +153 -0
- package/admin/src/components/cmsds/CmsSurface.tsx +52 -0
- package/admin/src/components/cmsds/CmsTable.tsx +164 -0
- package/admin/src/components/cmsds/CmsToolbar.tsx +58 -0
- package/admin/src/components/cmsds/index.ts +10 -0
- package/admin/src/components/fields/BooleanField.tsx +74 -0
- package/admin/src/components/fields/CategoryField.tsx +394 -0
- package/admin/src/components/fields/DateField.tsx +173 -0
- package/admin/src/components/fields/DefaultFieldRenderer.tsx +74 -0
- package/admin/src/components/fields/FieldRenderer.tsx +180 -0
- package/admin/src/components/fields/FieldWrapper.tsx +57 -0
- package/admin/src/components/fields/JsonField.tsx +172 -0
- package/admin/src/components/fields/MediaField.tsx +367 -0
- package/admin/src/components/fields/MultiSelectField.tsx +118 -0
- package/admin/src/components/fields/NumberField.tsx +77 -0
- package/admin/src/components/fields/ReferenceField.tsx +386 -0
- package/admin/src/components/fields/RichTextField.tsx +171 -0
- package/admin/src/components/fields/SelectField.tsx +62 -0
- package/admin/src/components/fields/TagField.tsx +325 -0
- package/admin/src/components/fields/TextAreaField.tsx +68 -0
- package/admin/src/components/fields/TextField.tsx +56 -0
- package/admin/src/components/fields/index.ts +54 -0
- package/admin/src/components/fields/registry.ts +64 -0
- package/admin/src/components/fields/types.ts +217 -0
- package/admin/src/components/filters/TaxonomyFilter.tsx +254 -0
- package/admin/src/components/filters/index.ts +1 -0
- package/admin/src/components/index.ts +8 -0
- package/admin/src/components/media/MediaAssetActions.tsx +115 -0
- package/admin/src/components/media/MediaAssetEditDialog.tsx +217 -0
- package/admin/src/components/media/MediaBulkActionBar.tsx +51 -0
- package/admin/src/components/media/MediaFolderActions.tsx +69 -0
- package/admin/src/components/media/MediaFolderEditDialog.tsx +126 -0
- package/admin/src/components/media/MediaMoveModal.tsx +179 -0
- package/admin/src/components/media/MediaPreviewModal.tsx +370 -0
- package/admin/src/components/media/MediaTaxonomyPicker.tsx +304 -0
- package/admin/src/components/media/MediaTrashBulkActionBar.tsx +59 -0
- package/admin/src/components/ui/accordion.tsx +64 -0
- package/admin/src/components/ui/alert-dialog.tsx +155 -0
- package/admin/src/components/ui/alert.tsx +66 -0
- package/admin/src/components/ui/avatar.tsx +53 -0
- package/admin/src/components/ui/badge.tsx +46 -0
- package/admin/src/components/ui/breadcrumb.tsx +109 -0
- package/admin/src/components/ui/button.tsx +62 -0
- package/admin/src/components/ui/calendar.tsx +220 -0
- package/admin/src/components/ui/card.tsx +92 -0
- package/admin/src/components/ui/checkbox.tsx +30 -0
- package/admin/src/components/ui/command.tsx +182 -0
- package/admin/src/components/ui/dialog.tsx +143 -0
- package/admin/src/components/ui/dropdown-menu.tsx +257 -0
- package/admin/src/components/ui/form.tsx +167 -0
- package/admin/src/components/ui/input.tsx +21 -0
- package/admin/src/components/ui/label.tsx +24 -0
- package/admin/src/components/ui/popover.tsx +46 -0
- package/admin/src/components/ui/scroll-area.tsx +56 -0
- package/admin/src/components/ui/select.tsx +190 -0
- package/admin/src/components/ui/separator.tsx +26 -0
- package/admin/src/components/ui/sheet.tsx +137 -0
- package/admin/src/components/ui/sidebar.tsx +724 -0
- package/admin/src/components/ui/skeleton.tsx +13 -0
- package/admin/src/components/ui/sonner.tsx +38 -0
- package/admin/src/components/ui/switch.tsx +31 -0
- package/admin/src/components/ui/table.tsx +114 -0
- package/admin/src/components/ui/tabs.tsx +66 -0
- package/admin/src/components/ui/textarea.tsx +18 -0
- package/admin/src/components/ui/tooltip.tsx +61 -0
- package/admin/src/contexts/AdminConfigContext.tsx +30 -0
- package/admin/src/contexts/AuthContext.tsx +330 -0
- package/admin/src/contexts/BreadcrumbContext.tsx +49 -0
- package/admin/src/contexts/SettingsConfigContext.tsx +57 -0
- package/admin/src/contexts/ThemeContext.tsx +91 -0
- package/admin/src/contexts/index.ts +20 -0
- package/admin/src/embed/components/EmbedHeader.tsx +103 -0
- package/admin/src/embed/components/EmbedLayout.tsx +29 -0
- package/admin/src/embed/components/EmbedSidebar.tsx +119 -0
- package/admin/src/embed/components/index.ts +3 -0
- package/admin/src/embed/contexts/ApiContext.tsx +32 -0
- package/admin/src/embed/index.tsx +184 -0
- package/admin/src/embed/navigation.tsx +202 -0
- package/admin/src/embed/pages/Content.tsx +19 -0
- package/admin/src/embed/pages/ContentTypes.tsx +19 -0
- package/admin/src/embed/pages/Dashboard.tsx +19 -0
- package/admin/src/embed/pages/Media.tsx +19 -0
- package/admin/src/embed/pages/Settings.tsx +22 -0
- package/admin/src/embed/pages/Taxonomies.tsx +22 -0
- package/admin/src/embed/pages/Trash.tsx +22 -0
- package/admin/src/embed/pages/index.ts +7 -0
- package/admin/src/embed/types.ts +24 -0
- package/admin/src/hooks/index.ts +2 -0
- package/admin/src/hooks/use-mobile.ts +19 -0
- package/admin/src/hooks/useBreadcrumbLabel.ts +15 -0
- package/admin/src/hooks/usePermissions.ts +211 -0
- package/admin/src/lib/admin-config.ts +111 -0
- package/admin/src/lib/cn.ts +6 -0
- package/admin/src/lib/config.server.ts +56 -0
- package/admin/src/lib/convex.ts +26 -0
- package/admin/src/lib/embed-adapter.ts +80 -0
- package/admin/src/lib/icons.tsx +96 -0
- package/admin/src/lib/loadAdminConfig.ts +92 -0
- package/admin/src/lib/motion.ts +29 -0
- package/admin/src/lib/navigation.ts +43 -0
- package/admin/src/lib/tanstack-adapter.ts +82 -0
- package/admin/src/pages/ContentPage.tsx +337 -0
- package/admin/src/pages/ContentTypesPage.tsx +457 -0
- package/admin/src/pages/DashboardPage.tsx +163 -0
- package/admin/src/pages/MediaPage.tsx +34 -0
- package/admin/src/pages/SettingsPage.tsx +486 -0
- package/admin/src/pages/TaxonomiesPage.tsx +289 -0
- package/admin/src/pages/TrashPage.tsx +421 -0
- package/admin/src/pages/index.ts +14 -0
- package/admin/src/routeTree.gen.ts +262 -0
- package/admin/src/router.tsx +22 -0
- package/admin/src/routes/__root.tsx +250 -0
- package/admin/src/routes/content-types.tsx +20 -0
- package/admin/src/routes/content.tsx +20 -0
- package/admin/src/routes/entries/$entryId.tsx +107 -0
- package/admin/src/routes/entries/new.$contentTypeId.tsx +69 -0
- package/admin/src/routes/entries/type/$contentTypeId.tsx +503 -0
- package/admin/src/routes/index.tsx +20 -0
- package/admin/src/routes/media.tsx +1095 -0
- package/admin/src/routes/settings.tsx +20 -0
- package/admin/src/routes/taxonomies.tsx +20 -0
- package/admin/src/routes/trash.tsx +20 -0
- package/admin/src/styles/globals.css +69 -0
- package/admin/src/styles/tailwind-config.css +74 -0
- package/admin/src/styles/theme.css +73 -0
- package/admin/src/types/index.ts +221 -0
- package/admin/src/utils/errorParsing.ts +163 -0
- package/admin/src/utils/index.ts +5 -0
- package/admin/src/vite-env.d.ts +14 -0
- package/admin/tailwind.preset.cjs +102 -0
- package/admin-dist/nitro.json +1 -1
- package/admin-dist/public/assets/{CmsEmptyState-CRswfTzk.js → CmsEmptyState-CkqBIab3.js} +2 -2
- package/admin-dist/public/assets/{CmsPageHeader-CirpXndm.js → CmsPageHeader-CUtl5MMG.js} +1 -1
- package/admin-dist/public/assets/{CmsStatusBadge-CbEUpQu-.js → CmsStatusBadge-CUYFgEe-.js} +1 -1
- package/admin-dist/public/assets/CmsSurface-CsJfAVa3.js +1 -0
- package/admin-dist/public/assets/{CmsToolbar-BI2nZOXp.js → CmsToolbar-CnfbcxeP.js} +1 -1
- package/admin-dist/public/assets/{ContentEntryEditor-CBeCyK_m.js → ContentEntryEditor-BU220CCy.js} +1 -1
- package/admin-dist/public/assets/TaxonomyFilter-CWCxC5HZ.js +1 -0
- package/admin-dist/public/assets/_contentTypeId-DK8cskRt.js +1 -0
- package/admin-dist/public/assets/{_entryId-CKU_glsK.js → _entryId-CuVMExbb.js} +1 -1
- package/admin-dist/public/assets/alert-CF1BSzGR.js +1 -0
- package/admin-dist/public/assets/{badge-hvUOzpVZ.js → badge-CmuOIVKp.js} +1 -1
- package/admin-dist/public/assets/{circle-check-big-CF_pR17r.js → circle-check-big-BKDVG6DU.js} +1 -1
- package/admin-dist/public/assets/{command-DU82cJlt.js → command-XJxnF2Sd.js} +1 -1
- package/admin-dist/public/assets/content-QBUxdxbS.js +1 -0
- package/admin-dist/public/assets/content-types-CrNEm8Hf.js +2 -0
- package/admin-dist/public/assets/globals-B7Wsfh_v.css +1 -0
- package/admin-dist/public/assets/index-C7xOwudI.js +1 -0
- package/admin-dist/public/assets/{label-KNtpL71g.js → label-CHCnXeBk.js} +1 -1
- package/admin-dist/public/assets/{link-2-Bw2aI4V4.js → link-2-Bb34judH.js} +1 -1
- package/admin-dist/public/assets/{list-sYepHjt_.js → list-9Pzt48ld.js} +1 -1
- package/admin-dist/public/assets/{main-CKj5yfEi.js → main-CjQ2VI9L.js} +3 -3
- package/admin-dist/public/assets/media-Dc5PWt2Q.js +1 -0
- package/admin-dist/public/assets/{new._contentTypeId-C3LstjNs.js → new._contentTypeId-C_I4YxIa.js} +1 -1
- package/admin-dist/public/assets/{plus-DUn8v_Xf.js → plus-Ceef7DHk.js} +1 -1
- package/admin-dist/public/assets/{rotate-ccw-DJEoHcRI.js → rotate-ccw-7k7-4VUq.js} +1 -1
- package/admin-dist/public/assets/scroll-area-CC6wujnp.js +1 -0
- package/admin-dist/public/assets/{search-MuAUDJKR.js → search-DwoUV2pv.js} +1 -1
- package/admin-dist/public/assets/select-hOZTp8aC.js +1 -0
- package/admin-dist/public/assets/settings-t2PbCZh4.js +1 -0
- package/admin-dist/public/assets/switch-jX2pDaNU.js +1 -0
- package/admin-dist/public/assets/tabs-q4EbZk7c.js +1 -0
- package/admin-dist/public/assets/tanstack-adapter-B-Glm4kH.js +1 -0
- package/admin-dist/public/assets/taxonomies-kyk5P4ZW.js +1 -0
- package/admin-dist/public/assets/{textarea-BTy7nwzR.js → textarea-B6SfBmr0.js} +1 -1
- package/admin-dist/public/assets/trash-BOCnIznD.js +1 -0
- package/admin-dist/public/assets/{triangle-alert-E52Vfeuh.js → triangle-alert-CXFIO_Gu.js} +1 -1
- package/admin-dist/public/assets/useBreadcrumbLabel-_6qBagc3.js +1 -0
- package/admin-dist/public/assets/{usePermissions-Basjs9BT.js → usePermissions-M1ijZ7a6.js} +1 -1
- package/admin-dist/server/_chunks/_libs/@tanstack/react-router.mjs +7 -0
- package/admin-dist/server/_ssr/{badge-6BsP37vG.mjs → CmsButton-DOiTVKQq.mjs} +33 -33
- package/admin-dist/server/_ssr/{CmsEmptyState-DU7-7-mV.mjs → CmsEmptyState-fbnGt3LD.mjs} +2 -2
- package/admin-dist/server/_ssr/{CmsPageHeader-CseW0AHm.mjs → CmsPageHeader-DHRrdOZa.mjs} +1 -1
- package/admin-dist/server/_ssr/{CmsStatusBadge-B_pi4KCp.mjs → CmsStatusBadge-s7obWbKZ.mjs} +2 -2
- package/admin-dist/server/_ssr/CmsSurface-rFoYjb62.mjs +44 -0
- package/admin-dist/server/_ssr/{CmsToolbar-X75ex6ek.mjs → CmsToolbar-zTE45z2q.mjs} +2 -2
- package/admin-dist/server/_ssr/{ContentEntryEditor-CepusRsA.mjs → ContentEntryEditor-BLoEjT_m.mjs} +12 -12
- package/admin-dist/server/_ssr/{TaxonomyFilter-Bwrq0-cz.mjs → TaxonomyFilter-XAtaJC2z.mjs} +5 -5
- package/admin-dist/server/_ssr/{_contentTypeId-BqYKEcLr.mjs → _contentTypeId-Csl4822C.mjs} +13 -13
- package/admin-dist/server/_ssr/{_entryId-CRfnqeDf.mjs → _entryId-D8alLFBx.mjs} +15 -15
- package/admin-dist/server/_ssr/_tanstack-start-manifest_v-BffZedId.mjs +4 -0
- package/admin-dist/server/_ssr/{command-fy8epIKf.mjs → command-C0Di14--.mjs} +1 -1
- package/admin-dist/server/_ssr/{content-B5RhL7uW.mjs → content-CT-FPsmV.mjs} +170 -98
- package/admin-dist/server/_ssr/{content-types-BIOqCQYN.mjs → content-types-C8cBFdzE.mjs} +260 -115
- package/admin-dist/server/_ssr/{index-DHSHDPt1.mjs → index-BJtcrEc-.mjs} +88 -17
- package/admin-dist/server/_ssr/index.mjs +2 -2
- package/admin-dist/server/_ssr/{label-C8Dko1j7.mjs → label-qn2Afwl4.mjs} +1 -1
- package/admin-dist/server/_ssr/{media-CSx3XttC.mjs → media-qv5IAsMZ.mjs} +43 -43
- package/admin-dist/server/_ssr/{new._contentTypeId-DzanEZQM.mjs → new._contentTypeId-DdGyrhqs.mjs} +13 -13
- package/admin-dist/server/_ssr/{router-DDWcF-kt.mjs → router-nSVkxb6Y.mjs} +11 -11
- package/admin-dist/server/_ssr/{scroll-area-bjPYwhXN.mjs → scroll-area-BCinP455.mjs} +1 -1
- package/admin-dist/server/_ssr/{select-BUhDDf4T.mjs → select-BKQlQScw.mjs} +1 -1
- package/admin-dist/server/_ssr/{settings-DAsxnw2q.mjs → settings-BCr2KQlk.mjs} +236 -139
- package/admin-dist/server/_ssr/{switch-BgyRtQ1Z.mjs → switch-BaOi42fE.mjs} +1 -1
- package/admin-dist/server/_ssr/{tabs-DzMdRB1A.mjs → tabs-DYXEi9kq.mjs} +5 -3
- package/admin-dist/server/_ssr/tanstack-adapter-Bsz8kha-.mjs +119 -0
- package/admin-dist/server/_ssr/{taxonomies-C8j8g5Q5.mjs → taxonomies-CueMHTbE.mjs} +184 -73
- package/admin-dist/server/_ssr/{textarea-9jNeYJSc.mjs → textarea-CI0Jqx2x.mjs} +1 -1
- package/admin-dist/server/_ssr/{trash-DYMxwhZB.mjs → trash-DE6W8GoX.mjs} +211 -88
- package/admin-dist/server/_ssr/{useBreadcrumbLabel-FNSAr2Ha.mjs → useBreadcrumbLabel-B5Yi72lM.mjs} +1 -1
- package/admin-dist/server/_ssr/{usePermissions-BJGGahrJ.mjs → usePermissions-C3nZ-Izm.mjs} +1 -1
- package/admin-dist/server/index.mjs +189 -182
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +156 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/index.js +6 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/client/admin/bulk.d.ts +79 -0
- package/dist/client/admin/bulk.d.ts.map +1 -0
- package/dist/client/admin/bulk.js +72 -0
- package/dist/client/admin/bulk.js.map +1 -0
- package/dist/client/admin/contentLock.d.ts +118 -0
- package/dist/client/admin/contentLock.d.ts.map +1 -0
- package/dist/client/admin/contentLock.js +81 -0
- package/dist/client/admin/contentLock.js.map +1 -0
- package/dist/client/admin/contentTypes.d.ts +1204 -0
- package/dist/client/admin/contentTypes.d.ts.map +1 -0
- package/dist/client/admin/contentTypes.js +122 -0
- package/dist/client/admin/contentTypes.js.map +1 -0
- package/dist/client/admin/dashboard.d.ts +16 -0
- package/dist/client/admin/dashboard.d.ts.map +1 -0
- package/dist/client/admin/dashboard.js +33 -0
- package/dist/client/admin/dashboard.js.map +1 -0
- package/dist/client/admin/entries.d.ts +358 -0
- package/dist/client/admin/entries.d.ts.map +1 -0
- package/dist/client/admin/entries.js +220 -0
- package/dist/client/admin/entries.js.map +1 -0
- package/dist/client/admin/index.d.ts +6568 -0
- package/dist/client/admin/index.d.ts.map +1 -0
- package/dist/client/admin/index.js +305 -0
- package/dist/client/admin/index.js.map +1 -0
- package/dist/client/admin/media.d.ts +1038 -0
- package/dist/client/admin/media.d.ts.map +1 -0
- package/dist/client/admin/media.js +489 -0
- package/dist/client/admin/media.js.map +1 -0
- package/dist/client/admin/taxonomies.d.ts +339 -0
- package/dist/client/admin/taxonomies.d.ts.map +1 -0
- package/dist/client/admin/taxonomies.js +364 -0
- package/dist/client/admin/taxonomies.js.map +1 -0
- package/dist/client/admin/trash.d.ts +91 -0
- package/dist/client/admin/trash.d.ts.map +1 -0
- package/dist/client/admin/trash.js +71 -0
- package/dist/client/admin/trash.js.map +1 -0
- package/dist/client/admin/types.d.ts +320 -0
- package/dist/client/admin/types.d.ts.map +1 -0
- package/dist/client/admin/types.js +7 -0
- package/dist/client/admin/types.js.map +1 -0
- package/dist/client/admin/validators.d.ts +3886 -0
- package/dist/client/admin/validators.d.ts.map +1 -0
- package/dist/client/admin/validators.js +322 -0
- package/dist/client/admin/validators.js.map +1 -0
- package/dist/client/admin/versions.d.ts +106 -0
- package/dist/client/admin/versions.d.ts.map +1 -0
- package/dist/client/admin/versions.js +57 -0
- package/dist/client/admin/versions.js.map +1 -0
- package/dist/client/adminApiTypes.d.ts +27 -0
- package/dist/client/adminApiTypes.d.ts.map +1 -0
- package/dist/client/adminApiTypes.js +12 -0
- package/dist/client/adminApiTypes.js.map +1 -0
- package/dist/client/{admin-config.d.ts → adminConfig.d.ts} +4 -4
- package/dist/client/adminConfig.d.ts.map +1 -0
- package/dist/client/{admin-config.js → adminConfig.js} +3 -3
- package/dist/client/adminConfig.js.map +1 -0
- package/dist/client/agentTools.d.ts +11 -21
- package/dist/client/agentTools.d.ts.map +1 -1
- package/dist/client/agentTools.js +4 -4
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +19 -6
- package/dist/client/index.js.map +1 -1
- package/dist/client/schema/codegen.d.ts +2 -2
- package/dist/client/schema/codegen.d.ts.map +1 -1
- package/dist/client/schema/codegen.js +3 -3
- package/dist/client/schema/codegen.js.map +1 -1
- package/dist/client/schema/defineContentType.d.ts +3 -3
- package/dist/client/schema/defineContentType.js +3 -3
- package/dist/client/schema/index.d.ts +7 -7
- package/dist/client/schema/index.d.ts.map +1 -1
- package/dist/client/schema/index.js +5 -5
- package/dist/client/schema/index.js.map +1 -1
- package/dist/client/schema/schemaDrift.d.ts +1 -1
- package/dist/client/schema/schemaDrift.js +1 -1
- package/dist/client/schema/typedClient.d.ts +2 -2
- package/dist/client/schema/typedClient.js +2 -2
- package/dist/client/schema/types.d.ts +1 -1
- package/dist/client/schema/types.js +1 -1
- package/dist/client/wrapper.d.ts +108 -65
- package/dist/client/wrapper.d.ts.map +1 -1
- package/dist/client/wrapper.js +22 -22
- package/dist/client/wrapper.js.map +1 -1
- package/dist/component/contentEntries.d.ts +4 -4
- package/dist/component/contentEntryMutations.d.ts +46 -0
- package/dist/component/contentEntryMutations.d.ts.map +1 -1
- package/dist/component/contentEntryMutations.js +1 -1
- package/dist/component/contentEntryMutations.js.map +1 -1
- package/dist/component/contentTypeMigration.d.ts +1 -1
- package/dist/component/contentTypeMutations.d.ts +22 -0
- package/dist/component/contentTypeMutations.d.ts.map +1 -1
- package/dist/component/contentTypeMutations.js +1 -1
- package/dist/component/contentTypeMutations.js.map +1 -1
- package/dist/component/convex.config.d.ts +2 -2
- package/dist/component/convex.config.js +2 -2
- package/dist/component/index.d.ts +1 -1
- package/dist/component/index.js +1 -1
- package/dist/component/lib/ragContentChunker.d.ts +1 -1
- package/dist/component/lib/ragContentChunker.js +1 -1
- package/dist/component/mediaAssetMutations.d.ts +47 -0
- package/dist/component/mediaAssetMutations.d.ts.map +1 -1
- package/dist/component/mediaAssetMutations.js +1 -1
- package/dist/component/mediaAssetMutations.js.map +1 -1
- package/dist/component/roles.d.ts +1 -1
- package/dist/component/roles.js +1 -1
- package/dist/component/schema.d.ts +9 -0
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +1 -1
- package/dist/component/schema.js.map +1 -1
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +13 -7
- package/dist/react/index.js.map +1 -1
- package/dist/test.d.ts +2 -2
- package/dist/test.js +2 -2
- package/package.json +115 -13
- package/admin-dist/public/assets/ErrorState-BIVaWmom.js +0 -1
- package/admin-dist/public/assets/TaxonomyFilter-ChaY6Y_x.js +0 -1
- package/admin-dist/public/assets/_contentTypeId-DQ8k_Rvw.js +0 -1
- package/admin-dist/public/assets/alert-BXjTqrwQ.js +0 -1
- package/admin-dist/public/assets/content-_LXl3pp7.js +0 -1
- package/admin-dist/public/assets/content-types-KjxaXGxY.js +0 -2
- package/admin-dist/public/assets/globals-CS6BZ0zp.css +0 -1
- package/admin-dist/public/assets/index-DNGIZHL-.js +0 -1
- package/admin-dist/public/assets/media-Bkrkffm7.js +0 -1
- package/admin-dist/public/assets/scroll-area-DfIlT0in.js +0 -1
- package/admin-dist/public/assets/select-BD29IXCI.js +0 -1
- package/admin-dist/public/assets/settings-DmMyn_6A.js +0 -1
- package/admin-dist/public/assets/switch-h3Rrnl5i.js +0 -1
- package/admin-dist/public/assets/tabs-imc8h-Dp.js +0 -1
- package/admin-dist/public/assets/taxonomies-dAsrT65H.js +0 -1
- package/admin-dist/public/assets/trash-SAWKZZHv.js +0 -1
- package/admin-dist/public/assets/useBreadcrumbLabel-BECBMCzM.js +0 -1
- package/admin-dist/server/_ssr/ErrorState-cI-bKLez.mjs +0 -89
- package/admin-dist/server/_ssr/_tanstack-start-manifest_v-BwDlABVk.mjs +0 -4
- package/admin-dist/server/_ssr/alert-CVt45UUP.mjs +0 -92
- package/dist/client/admin-config.d.ts.map +0 -1
- package/dist/client/admin-config.js.map +0 -1
- package/dist/client/adminApi.d.ts +0 -2273
- package/dist/client/adminApi.d.ts.map +0 -1
- package/dist/client/adminApi.js +0 -716
- package/dist/client/adminApi.js.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as api, c as cn } from "./router-
|
|
3
|
-
import { C as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { C as
|
|
7
|
-
import { C as
|
|
8
|
-
import {
|
|
1
|
+
import { j as jsxRuntimeExports, r as reactExports } from "../_chunks/_libs/react.mjs";
|
|
2
|
+
import { a as api, c as cn } from "./router-nSVkxb6Y.mjs";
|
|
3
|
+
import { C as CmsButton, B as Badge } from "./CmsButton-DOiTVKQq.mjs";
|
|
4
|
+
import { u as useTanStackNavigation, A as Alert, a as AlertDescription } from "./tanstack-adapter-Bsz8kha-.mjs";
|
|
5
|
+
import { C as CmsPageHeader } from "./CmsPageHeader-DHRrdOZa.mjs";
|
|
6
|
+
import { C as CmsToolbar } from "./CmsToolbar-zTE45z2q.mjs";
|
|
7
|
+
import { I as Input, C as CmsEmptyState, a as Checkbox, b as CmsConfirmDialog } from "./CmsEmptyState-fbnGt3LD.mjs";
|
|
8
|
+
import { C as CmsSurface } from "./CmsSurface-rFoYjb62.mjs";
|
|
9
|
+
import { S as Select, a as SelectTrigger, b as SelectValue, c as SelectContent, d as SelectItem } from "./select-BKQlQScw.mjs";
|
|
9
10
|
import { u as useQuery, d as useMutation } from "../_libs/convex.mjs";
|
|
10
11
|
import { w as Trash2, N as Search, O as TriangleAlert, X, R as RotateCcw } from "../_libs/lucide-react.mjs";
|
|
11
12
|
import "../_chunks/_libs/@tanstack/react-router.mjs";
|
|
@@ -83,7 +84,7 @@ import "../_chunks/_libs/@radix-ui/react-use-previous.mjs";
|
|
|
83
84
|
import "../_chunks/_libs/@radix-ui/react-select.mjs";
|
|
84
85
|
import "../_chunks/_libs/@radix-ui/number.mjs";
|
|
85
86
|
import "../_chunks/_libs/@radix-ui/react-visually-hidden.mjs";
|
|
86
|
-
function TrashPage() {
|
|
87
|
+
function TrashPage({ api: api2, navigation: _navigation }) {
|
|
87
88
|
const [selectedContentType, setSelectedContentType] = reactExports.useState("");
|
|
88
89
|
const [searchQuery, setSearchQuery] = reactExports.useState("");
|
|
89
90
|
const [selectedItems, setSelectedItems] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
@@ -92,20 +93,17 @@ function TrashPage() {
|
|
|
92
93
|
const [showEmptyConfirm, setShowEmptyConfirm] = reactExports.useState(false);
|
|
93
94
|
const [isEmptying, setIsEmptying] = reactExports.useState(false);
|
|
94
95
|
const [emptyError, setEmptyError] = reactExports.useState(null);
|
|
95
|
-
const trashQuery = useQuery(
|
|
96
|
+
const trashQuery = useQuery(api2.listTrash, {
|
|
96
97
|
contentTypeId: selectedContentType || void 0,
|
|
97
98
|
search: searchQuery || void 0,
|
|
98
|
-
paginationOpts: {
|
|
99
|
-
numItems: 50,
|
|
100
|
-
cursor: null
|
|
101
|
-
}
|
|
99
|
+
paginationOpts: { numItems: 50, cursor: null }
|
|
102
100
|
});
|
|
103
|
-
const configQuery = useQuery(
|
|
104
|
-
const statsQuery = useQuery(
|
|
105
|
-
const contentTypesQuery = useQuery(
|
|
101
|
+
const configQuery = useQuery(api2.getTrashConfig, {});
|
|
102
|
+
const statsQuery = useQuery(api2.getTrashStats, {});
|
|
103
|
+
const contentTypesQuery = useQuery(api2.listContentTypes, {});
|
|
106
104
|
const contentTypes = contentTypesQuery?.page ?? [];
|
|
107
|
-
const restoreMutation = useMutation(
|
|
108
|
-
const emptyMutation = useMutation(
|
|
105
|
+
const restoreMutation = useMutation(api2.bulkRestore);
|
|
106
|
+
const emptyMutation = useMutation(api2.emptyTrash);
|
|
109
107
|
const trashItems = trashQuery?.page ?? [];
|
|
110
108
|
const isLoading = trashQuery === void 0;
|
|
111
109
|
const config = configQuery;
|
|
@@ -128,25 +126,26 @@ function TrashPage() {
|
|
|
128
126
|
setSelectedItems(new Set(trashItems.map((item) => item._id)));
|
|
129
127
|
}
|
|
130
128
|
}, [selectedItems.size, trashItems]);
|
|
131
|
-
const handleRestore = reactExports.useCallback(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
ids
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
})
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
129
|
+
const handleRestore = reactExports.useCallback(
|
|
130
|
+
async (ids) => {
|
|
131
|
+
setIsRestoring(true);
|
|
132
|
+
setRestoreError(null);
|
|
133
|
+
try {
|
|
134
|
+
await restoreMutation({ ids });
|
|
135
|
+
setSelectedItems((prev) => {
|
|
136
|
+
const next = new Set(prev);
|
|
137
|
+
ids.forEach((id) => next.delete(id));
|
|
138
|
+
return next;
|
|
139
|
+
});
|
|
140
|
+
} catch (error) {
|
|
141
|
+
const message = error instanceof Error ? error.message : "Failed to restore";
|
|
142
|
+
setRestoreError(message);
|
|
143
|
+
} finally {
|
|
144
|
+
setIsRestoring(false);
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
[restoreMutation]
|
|
148
|
+
);
|
|
150
149
|
const handleEmptyTrash = reactExports.useCallback(async () => {
|
|
151
150
|
setIsEmptying(true);
|
|
152
151
|
setEmptyError(null);
|
|
@@ -173,7 +172,9 @@ function TrashPage() {
|
|
|
173
172
|
const getDaysUntilDeletion = (deletedAt) => {
|
|
174
173
|
if (!config?.retentionDays) return null;
|
|
175
174
|
const expiresAt = deletedAt + config.retentionDays * 24 * 60 * 60 * 1e3;
|
|
176
|
-
const daysLeft = Math.ceil(
|
|
175
|
+
const daysLeft = Math.ceil(
|
|
176
|
+
(expiresAt - Date.now()) / (24 * 60 * 60 * 1e3)
|
|
177
|
+
);
|
|
177
178
|
return Math.max(0, daysLeft);
|
|
178
179
|
};
|
|
179
180
|
const getItemTitle = (item) => {
|
|
@@ -187,7 +188,13 @@ function TrashPage() {
|
|
|
187
188
|
};
|
|
188
189
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
189
190
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between", children: [
|
|
190
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
191
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
192
|
+
CmsPageHeader,
|
|
193
|
+
{
|
|
194
|
+
title: "Trash",
|
|
195
|
+
description: `Deleted items are kept for ${config?.retentionDays ?? 30} days before permanent deletion`
|
|
196
|
+
}
|
|
197
|
+
),
|
|
191
198
|
trashItems.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(CmsButton, { variant: "danger", onClick: () => setShowEmptyConfirm(true), children: [
|
|
192
199
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-4" }),
|
|
193
200
|
"Empty Trash"
|
|
@@ -203,31 +210,68 @@ function TrashPage() {
|
|
|
203
210
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Expired" })
|
|
204
211
|
] })
|
|
205
212
|
] }),
|
|
206
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
214
|
+
CmsToolbar,
|
|
215
|
+
{
|
|
216
|
+
left: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
217
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
218
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Search, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
220
|
+
Input,
|
|
221
|
+
{
|
|
222
|
+
type: "text",
|
|
223
|
+
placeholder: "Search deleted items...",
|
|
224
|
+
value: searchQuery,
|
|
225
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
226
|
+
className: "w-64 pl-9"
|
|
227
|
+
}
|
|
228
|
+
)
|
|
229
|
+
] }),
|
|
230
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
231
|
+
Select,
|
|
232
|
+
{
|
|
233
|
+
value: selectedContentType || "all",
|
|
234
|
+
onValueChange: (v) => setSelectedContentType(v === "all" ? "" : v),
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "w-48", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "All Content Types" }) }),
|
|
237
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectContent, { children: [
|
|
238
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "all", children: "All Content Types" }),
|
|
239
|
+
contentTypes.map((type) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: type._id, children: type.displayName }, type._id))
|
|
240
|
+
] })
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
)
|
|
216
244
|
] })
|
|
217
|
-
|
|
218
|
-
|
|
245
|
+
}
|
|
246
|
+
),
|
|
219
247
|
restoreError && /* @__PURE__ */ jsxRuntimeExports.jsxs(Alert, { variant: "destructive", children: [
|
|
220
248
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TriangleAlert, { className: "size-4" }),
|
|
221
249
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDescription, { className: "flex items-center justify-between", children: [
|
|
222
250
|
restoreError,
|
|
223
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
251
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
252
|
+
CmsButton,
|
|
253
|
+
{
|
|
254
|
+
variant: "ghost",
|
|
255
|
+
size: "icon-sm",
|
|
256
|
+
onClick: () => setRestoreError(null),
|
|
257
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-4" })
|
|
258
|
+
}
|
|
259
|
+
)
|
|
224
260
|
] })
|
|
225
261
|
] }),
|
|
226
262
|
emptyError && /* @__PURE__ */ jsxRuntimeExports.jsxs(Alert, { variant: "destructive", children: [
|
|
227
263
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TriangleAlert, { className: "size-4" }),
|
|
228
264
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDescription, { className: "flex items-center justify-between", children: [
|
|
229
265
|
emptyError,
|
|
230
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
266
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
267
|
+
CmsButton,
|
|
268
|
+
{
|
|
269
|
+
variant: "ghost",
|
|
270
|
+
size: "icon-sm",
|
|
271
|
+
onClick: () => setEmptyError(null),
|
|
272
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-4" })
|
|
273
|
+
}
|
|
274
|
+
)
|
|
231
275
|
] })
|
|
232
276
|
] }),
|
|
233
277
|
selectedItems.size > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-primary/20 bg-primary/5 p-3", children: [
|
|
@@ -235,20 +279,51 @@ function TrashPage() {
|
|
|
235
279
|
selectedItems.size,
|
|
236
280
|
" ",
|
|
237
281
|
selectedItems.size === 1 ? "item" : "items",
|
|
238
|
-
"
|
|
239
|
-
|
|
240
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(CmsButton, { variant: "primary", size: "sm", onClick: () => handleRestore(Array.from(selectedItems)), loading: isRestoring, children: [
|
|
241
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(RotateCcw, { className: "size-4" }),
|
|
242
|
-
"Restore Selected"
|
|
282
|
+
" ",
|
|
283
|
+
"selected"
|
|
243
284
|
] }),
|
|
244
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
285
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
286
|
+
CmsButton,
|
|
287
|
+
{
|
|
288
|
+
variant: "primary",
|
|
289
|
+
size: "sm",
|
|
290
|
+
onClick: () => handleRestore(Array.from(selectedItems)),
|
|
291
|
+
loading: isRestoring,
|
|
292
|
+
children: [
|
|
293
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RotateCcw, { className: "size-4" }),
|
|
294
|
+
"Restore Selected"
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
),
|
|
298
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
299
|
+
CmsButton,
|
|
300
|
+
{
|
|
301
|
+
variant: "secondary",
|
|
302
|
+
size: "sm",
|
|
303
|
+
onClick: () => setSelectedItems(/* @__PURE__ */ new Set()),
|
|
304
|
+
children: "Clear Selection"
|
|
305
|
+
}
|
|
306
|
+
)
|
|
245
307
|
] }),
|
|
246
308
|
isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-12", children: [
|
|
247
309
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-8 animate-spin rounded-full border-2 border-muted border-t-primary" }),
|
|
248
310
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm text-muted-foreground", children: "Loading trash..." })
|
|
249
|
-
] }) : trashItems.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
311
|
+
] }) : trashItems.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
312
|
+
CmsEmptyState,
|
|
313
|
+
{
|
|
314
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-6" }),
|
|
315
|
+
title: "Trash is empty",
|
|
316
|
+
description: "Deleted items will appear here"
|
|
317
|
+
}
|
|
318
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-lg border bg-card", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { className: "w-full", children: [
|
|
250
319
|
/* @__PURE__ */ jsxRuntimeExports.jsx("thead", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "border-b", children: [
|
|
251
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "w-10 p-3 text-left", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
320
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "w-10 p-3 text-left", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
321
|
+
Checkbox,
|
|
322
|
+
{
|
|
323
|
+
checked: selectedItems.size === trashItems.length && trashItems.length > 0,
|
|
324
|
+
onCheckedChange: handleSelectAll
|
|
325
|
+
}
|
|
326
|
+
) }),
|
|
252
327
|
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "p-3 text-left text-sm font-medium text-muted-foreground", children: "Name" }),
|
|
253
328
|
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "p-3 text-left text-sm font-medium text-muted-foreground", children: "Type" }),
|
|
254
329
|
/* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "p-3 text-left text-sm font-medium text-muted-foreground", children: "Deleted" }),
|
|
@@ -257,35 +332,83 @@ function TrashPage() {
|
|
|
257
332
|
] }) }),
|
|
258
333
|
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: trashItems.map((item) => {
|
|
259
334
|
const daysLeft = getDaysUntilDeletion(item.deletedAt);
|
|
260
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
335
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
336
|
+
"tr",
|
|
337
|
+
{
|
|
338
|
+
className: cn(
|
|
339
|
+
"border-b last:border-0 transition-colors hover:bg-muted/50",
|
|
340
|
+
selectedItems.has(item._id) && "bg-primary/5"
|
|
341
|
+
),
|
|
342
|
+
children: [
|
|
343
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
344
|
+
Checkbox,
|
|
345
|
+
{
|
|
346
|
+
checked: selectedItems.has(item._id),
|
|
347
|
+
onCheckedChange: (checked) => handleSelectItem(item._id, checked)
|
|
348
|
+
}
|
|
349
|
+
) }),
|
|
350
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "p-3", children: [
|
|
351
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium text-foreground", children: getItemTitle(item) }),
|
|
352
|
+
item.slug && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "block text-xs text-muted-foreground", children: item.slug })
|
|
353
|
+
] }),
|
|
354
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-3 text-sm text-muted-foreground", children: item.contentTypeName || "Unknown" }),
|
|
355
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "p-3", children: [
|
|
356
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-muted-foreground", children: formatDate(item.deletedAt) }),
|
|
357
|
+
item.deletedBy && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "block text-xs text-muted-foreground", children: [
|
|
358
|
+
"by ",
|
|
359
|
+
item.deletedBy
|
|
360
|
+
] })
|
|
361
|
+
] }),
|
|
362
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-3", children: daysLeft !== null && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
363
|
+
Badge,
|
|
364
|
+
{
|
|
365
|
+
variant: daysLeft <= 3 ? "destructive" : "secondary",
|
|
366
|
+
className: "font-normal",
|
|
367
|
+
children: [
|
|
368
|
+
daysLeft,
|
|
369
|
+
" ",
|
|
370
|
+
daysLeft === 1 ? "day" : "days"
|
|
371
|
+
]
|
|
372
|
+
}
|
|
373
|
+
) }),
|
|
374
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "p-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
375
|
+
CmsButton,
|
|
376
|
+
{
|
|
377
|
+
variant: "outline",
|
|
378
|
+
size: "sm",
|
|
379
|
+
onClick: () => handleRestore([item._id]),
|
|
380
|
+
loading: isRestoring,
|
|
381
|
+
children: [
|
|
382
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RotateCcw, { className: "size-4" }),
|
|
383
|
+
"Restore"
|
|
384
|
+
]
|
|
385
|
+
}
|
|
386
|
+
) })
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
item._id
|
|
390
|
+
);
|
|
284
391
|
}) })
|
|
285
392
|
] }) }),
|
|
286
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
393
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
394
|
+
CmsConfirmDialog,
|
|
395
|
+
{
|
|
396
|
+
open: showEmptyConfirm,
|
|
397
|
+
onOpenChange: setShowEmptyConfirm,
|
|
398
|
+
title: "Empty Trash",
|
|
399
|
+
description: "This will permanently delete all items in the trash. This action cannot be undone.",
|
|
400
|
+
confirmLabel: isEmptying ? "Deleting..." : "Empty Trash",
|
|
401
|
+
onConfirm: handleEmptyTrash,
|
|
402
|
+
variant: "danger",
|
|
403
|
+
loading: isEmptying
|
|
404
|
+
}
|
|
405
|
+
)
|
|
287
406
|
] });
|
|
288
407
|
}
|
|
408
|
+
function TrashRoute() {
|
|
409
|
+
const navigation = useTanStackNavigation();
|
|
410
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TrashPage, { api: api.admin, navigation });
|
|
411
|
+
}
|
|
289
412
|
export {
|
|
290
|
-
|
|
413
|
+
TrashRoute as component
|
|
291
414
|
};
|
package/admin-dist/server/_ssr/{useBreadcrumbLabel-FNSAr2Ha.mjs → useBreadcrumbLabel-B5Yi72lM.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as reactExports } from "../_chunks/_libs/react.mjs";
|
|
2
|
-
import { r as useBreadcrumbContext } from "./router-
|
|
2
|
+
import { r as useBreadcrumbContext } from "./router-nSVkxb6Y.mjs";
|
|
3
3
|
function useBreadcrumbLabel(path, label) {
|
|
4
4
|
const { setOverride, clearOverride } = useBreadcrumbContext();
|
|
5
5
|
reactExports.useEffect(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as reactExports } from "../_chunks/_libs/react.mjs";
|
|
2
|
-
import { l as useAuth, m as getResourcePermissions, n as canAccessResource, o as hasPermission } from "./router-
|
|
2
|
+
import { l as useAuth, m as getResourcePermissions, n as canAccessResource, o as hasPermission } from "./router-nSVkxb6Y.mjs";
|
|
3
3
|
function usePermissions() {
|
|
4
4
|
const { role } = useAuth();
|
|
5
5
|
return reactExports.useMemo(() => {
|