diff --git a/src/lib/components/assets/list/primary-sidebar.svelte b/src/lib/components/assets/list/primary-sidebar.svelte index 6b14537c..1d7f1919 100644 --- a/src/lib/components/assets/list/primary-sidebar.svelte +++ b/src/lib/components/assets/list/primary-sidebar.svelte @@ -10,7 +10,7 @@ selectedAssetFolder, } from '$lib/services/assets'; import { getFolderLabelByCollection } from '$lib/services/assets/view'; - import { getCollection } from '$lib/services/contents'; + import { getCollection } from '$lib/services/contents/collection'; $: folders = [ { diff --git a/src/lib/components/assets/shared/info-panel.svelte b/src/lib/components/assets/shared/info-panel.svelte index f3be0f96..f823359a 100644 --- a/src/lib/components/assets/shared/info-panel.svelte +++ b/src/lib/components/assets/shared/info-panel.svelte @@ -6,7 +6,8 @@ import AssetPreview from '$lib/components/assets/shared/asset-preview.svelte'; import { goto } from '$lib/services/app/navigation'; import { getAssetDetails, isMediaKind } from '$lib/services/assets'; - import { getCollectionsByEntry, getFilesByEntry } from '$lib/services/contents'; + import { getCollectionsByEntry } from '$lib/services/contents/collection'; + import { getFilesByEntry } from '$lib/services/contents/collection/files'; import { getEntryTitle } from '$lib/services/contents/entry'; import { dateFormatOptions, timeFormatOptions } from '$lib/services/utils/date'; import { formatSize } from '$lib/services/utils/file'; diff --git a/src/lib/components/assets/shared/select-assets-dialog.svelte b/src/lib/components/assets/shared/select-assets-dialog.svelte index 0aa01340..09b22981 100644 --- a/src/lib/components/assets/shared/select-assets-dialog.svelte +++ b/src/lib/components/assets/shared/select-assets-dialog.svelte @@ -9,7 +9,7 @@ import EmptyState from '$lib/components/common/empty-state.svelte'; import ViewSwitcher from '$lib/components/common/page-toolbar/view-switcher.svelte'; import { allAssetFolders, allAssets, getCollectionsByAsset } from '$lib/services/assets'; - import { selectedCollection } from '$lib/services/contents'; + import { selectedCollection } from '$lib/services/contents/collection'; import { selectAssetsView, showContentOverlay } from '$lib/services/contents/draft/editor'; import { allCloudStorageServices, diff --git a/src/lib/components/contents/contents-page.svelte b/src/lib/components/contents/contents-page.svelte index bf22547f..9a28cc82 100644 --- a/src/lib/components/contents/contents-page.svelte +++ b/src/lib/components/contents/contents-page.svelte @@ -12,12 +12,13 @@ import SecondarySidebar from '$lib/components/contents/list/secondary-sidebar.svelte'; import SecondaryToolbar from '$lib/components/contents/list/secondary-toolbar.svelte'; import { announcedPageStatus, parseLocation } from '$lib/services/app/navigation'; - import { getCollection, getFile, selectedCollection } from '$lib/services/contents'; - import { contentUpdatesToast } from '$lib/services/contents/data'; + import { getCollection, selectedCollection } from '$lib/services/contents/collection'; + import { contentUpdatesToast } from '$lib/services/contents/collection/data'; + import { getFile } from '$lib/services/contents/collection/files'; + import { listedEntries } from '$lib/services/contents/collection/view'; import { createDraft } from '$lib/services/contents/draft/create'; import { showContentOverlay } from '$lib/services/contents/draft/editor'; import { getEntryTitle } from '$lib/services/contents/entry'; - import { listedEntries } from '$lib/services/contents/view'; /** * Navigate to the content list or content details page given the URL hash. diff --git a/src/lib/components/contents/details/toolbar.svelte b/src/lib/components/contents/details/toolbar.svelte index ed86cafe..df0f0802 100644 --- a/src/lib/components/contents/details/toolbar.svelte +++ b/src/lib/components/contents/details/toolbar.svelte @@ -20,7 +20,7 @@ import { goBack, goto } from '$lib/services/app/navigation'; import { backendName } from '$lib/services/backends'; import { siteConfig } from '$lib/services/config'; - import { deleteEntries } from '$lib/services/contents/data'; + import { deleteEntries } from '$lib/services/contents/collection/data'; import { entryDraft } from '$lib/services/contents/draft'; import { createDraft, duplicateDraft } from '$lib/services/contents/draft/create'; import { copyFromLocaleToast, entryEditorSettings } from '$lib/services/contents/draft/editor'; diff --git a/src/lib/components/contents/details/widgets/date-time/date-time-editor.svelte b/src/lib/components/contents/details/widgets/date-time/date-time-editor.svelte index 3000be82..32e352b0 100644 --- a/src/lib/components/contents/details/widgets/date-time/date-time-editor.svelte +++ b/src/lib/components/contents/details/widgets/date-time/date-time-editor.svelte @@ -13,7 +13,7 @@ getDate, getInputValue, parseDateTimeConfig, - } from '$lib/components/contents/details/widgets/date-time/helper'; + } from '$lib/services/contents/widgets/date-time'; /** * @type {LocaleCode} diff --git a/src/lib/components/contents/details/widgets/date-time/date-time-preview.svelte b/src/lib/components/contents/details/widgets/date-time/date-time-preview.svelte index 29b824b0..77c8776b 100644 --- a/src/lib/components/contents/details/widgets/date-time/date-time-preview.svelte +++ b/src/lib/components/contents/details/widgets/date-time/date-time-preview.svelte @@ -4,11 +4,8 @@ @see https://decapcms.org/docs/widgets/#datetime --> diff --git a/src/lib/components/contents/list/primary-sidebar.svelte b/src/lib/components/contents/list/primary-sidebar.svelte index c4e7f4c1..f4691c57 100644 --- a/src/lib/components/contents/list/primary-sidebar.svelte +++ b/src/lib/components/contents/list/primary-sidebar.svelte @@ -4,7 +4,9 @@ import { _ } from 'svelte-i18n'; import { goto } from '$lib/services/app/navigation'; import { siteConfig } from '$lib/services/config'; - import { allEntries, getEntriesByCollection, selectedCollection } from '$lib/services/contents'; + import { allEntries } from '$lib/services/contents'; + import { selectedCollection } from '$lib/services/contents/collection'; + import { getEntriesByCollection } from '$lib/services/contents/collection/entries'; $: collections = $siteConfig?.collections.filter(({ hide }) => !hide) ?? []; diff --git a/src/lib/components/contents/list/primary-toolbar.svelte b/src/lib/components/contents/list/primary-toolbar.svelte index b49b2b03..4ba44346 100644 --- a/src/lib/components/contents/list/primary-toolbar.svelte +++ b/src/lib/components/contents/list/primary-toolbar.svelte @@ -3,9 +3,10 @@ import DOMPurify from 'isomorphic-dompurify'; import { marked } from 'marked'; import { _ } from 'svelte-i18n'; - import { selectedCollection, selectedEntries } from '$lib/services/contents'; - import { goto } from '$lib/services/app/navigation'; import DeleteEntriesDialog from '$lib/components/contents/shared/delete-entries-dialog.svelte'; + import { goto } from '$lib/services/app/navigation'; + import { selectedCollection } from '$lib/services/contents/collection'; + import { selectedEntries } from '$lib/services/contents/collection/entries'; let showDeleteDialog = false; diff --git a/src/lib/components/contents/list/secondary-sidebar.svelte b/src/lib/components/contents/list/secondary-sidebar.svelte index e929d6c2..edc336e7 100644 --- a/src/lib/components/contents/list/secondary-sidebar.svelte +++ b/src/lib/components/contents/list/secondary-sidebar.svelte @@ -5,8 +5,8 @@ import DropZone from '$lib/components/assets/shared/drop-zone.svelte'; import { goto } from '$lib/services/app/navigation'; import { allAssets, uploadingAssets } from '$lib/services/assets'; - import { selectedCollection } from '$lib/services/contents'; - import { currentView } from '$lib/services/contents/view'; + import { selectedCollection } from '$lib/services/contents/collection'; + import { currentView } from '$lib/services/contents/collection/view'; $: ({ internalPath, entryRelative } = $selectedCollection?._assetFolder ?? /** @type {CollectionAssetFolder} */ ({})); diff --git a/src/lib/components/contents/list/secondary-toolbar.svelte b/src/lib/components/contents/list/secondary-toolbar.svelte index b342a975..b87c0f15 100644 --- a/src/lib/components/contents/list/secondary-toolbar.svelte +++ b/src/lib/components/contents/list/secondary-toolbar.svelte @@ -6,8 +6,14 @@ import ItemSelector from '$lib/components/common/page-toolbar/item-selector.svelte'; import SortMenu from '$lib/components/common/page-toolbar/sort-menu.svelte'; import ViewSwitcher from '$lib/components/common/page-toolbar/view-switcher.svelte'; - import { selectedCollection, selectedEntries } from '$lib/services/contents'; - import { currentView, entryGroups, listedEntries, sortFields } from '$lib/services/contents/view'; + import { selectedCollection } from '$lib/services/contents/collection'; + import { selectedEntries } from '$lib/services/contents/collection/entries'; + import { + currentView, + entryGroups, + listedEntries, + sortFields, + } from '$lib/services/contents/collection/view'; $: ({ name: collectionName, _thumbnailFieldName } = $selectedCollection?._type === 'entry' diff --git a/src/lib/components/contents/shared/delete-entries-dialog.svelte b/src/lib/components/contents/shared/delete-entries-dialog.svelte index 977c1d4e..7d438aa1 100644 --- a/src/lib/components/contents/shared/delete-entries-dialog.svelte +++ b/src/lib/components/contents/shared/delete-entries-dialog.svelte @@ -1,10 +1,11 @@