@meeovi/layer-lists 1.0.3 → 1.0.5

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 (173) hide show
  1. package/package.json +10 -3
  2. package/app/components/features/archived.vue +0 -64
  3. package/app/components/features/bookmarks.vue +0 -64
  4. package/app/components/features/lists.vue +0 -61
  5. package/app/components/features/starred.vue +0 -64
  6. package/app/components/lists/ListItemCard.vue +0 -190
  7. package/app/components/lists/add-bookmark.vue +0 -52
  8. package/app/components/lists/add-list-item.vue +0 -88
  9. package/app/components/lists/add-list.vue +0 -57
  10. package/app/components/lists/lists.vue +0 -6
  11. package/app/components/lists/listsettings.vue +0 -145
  12. package/app/components/lists/update-bookmark.vue +0 -267
  13. package/app/components/lists/update-list.vue +0 -192
  14. package/app/components/media/MediaPlayer.vue +0 -302
  15. package/app/components/partials/addtolist.vue +0 -233
  16. package/app/components/partials/createListBtn.vue +0 -95
  17. package/app/components/partials/listBtn.vue +0 -35
  18. package/app/components/related/list.vue +0 -33
  19. package/app/components/related/relatedlists.vue +0 -43
  20. package/app/components/tasks/TaskItem.vue +0 -204
  21. package/app/composables/bookmarks/createBookmark.js +0 -30
  22. package/app/composables/bookmarks/deleteBookmark.js +0 -15
  23. package/app/composables/bookmarks/updateBookmark.js +0 -15
  24. package/app/composables/config.ts +0 -17
  25. package/app/composables/content/uploadFiles.js +0 -41
  26. package/app/composables/globals/useDirectusForm.ts +0 -1
  27. package/app/composables/lists/createList.js +0 -25
  28. package/app/composables/lists/deleteList.js +0 -14
  29. package/app/composables/lists/updateList.js +0 -20
  30. package/app/composables/lists/useBookmarks.js +0 -69
  31. package/app/composables/lists/useLists.js +0 -120
  32. package/app/composables/lists/usePlaylist.js +0 -64
  33. package/app/composables/lists/useSaved.js +0 -29
  34. package/app/composables/lists/useTasks.js +0 -86
  35. package/app/composables/lists/useWishlist.js +0 -51
  36. package/app/composables/module.ts +0 -75
  37. package/app/composables/providers/atproto.ts +0 -156
  38. package/app/composables/providers/directus.ts +0 -145
  39. package/app/composables/providers/memory.ts +0 -127
  40. package/app/composables/registry.ts +0 -18
  41. package/app/composables/types.ts +0 -44
  42. package/app/composables/useLists.ts +0 -20
  43. package/app/composables/utils/health.ts +0 -16
  44. package/app/composables/utils/transforms.ts +0 -42
  45. package/app/composables/utils/validation.ts +0 -21
  46. package/app/pages/lists/bookmark/[id].vue +0 -76
  47. package/app/pages/lists/index.vue +0 -152
  48. package/app/pages/lists/list/[...slug].vue +0 -233
  49. package/dist/app/composables/config.d.ts +0 -7
  50. package/dist/app/composables/config.js +0 -9
  51. package/dist/app/composables/globals/useDirectusForm.d.ts +0 -4
  52. package/dist/app/composables/globals/useDirectusForm.js +0 -10
  53. package/dist/app/composables/module.d.ts +0 -7
  54. package/dist/app/composables/module.js +0 -60
  55. package/dist/app/composables/providers/atproto.d.ts +0 -1
  56. package/dist/app/composables/providers/atproto.js +0 -133
  57. package/dist/app/composables/providers/directus.d.ts +0 -1
  58. package/dist/app/composables/providers/directus.js +0 -130
  59. package/dist/app/composables/providers/memory.d.ts +0 -1
  60. package/dist/app/composables/providers/memory.js +0 -110
  61. package/dist/app/composables/registry.d.ts +0 -4
  62. package/dist/app/composables/registry.js +0 -14
  63. package/dist/app/composables/types.d.ts +0 -38
  64. package/dist/app/composables/types.js +0 -1
  65. package/dist/app/composables/useLists.d.ts +0 -11
  66. package/dist/app/composables/useLists.js +0 -17
  67. package/dist/app/composables/utils/health.d.ts +0 -10
  68. package/dist/app/composables/utils/health.js +0 -15
  69. package/dist/app/composables/utils/transforms.d.ts +0 -13
  70. package/dist/app/composables/utils/transforms.js +0 -38
  71. package/dist/app/composables/utils/validation.d.ts +0 -3
  72. package/dist/app/composables/utils/validation.js +0 -16
  73. package/dist/layers/lists/app/composables/config.d.ts +0 -7
  74. package/dist/layers/lists/app/composables/config.js +0 -9
  75. package/dist/layers/lists/app/composables/globals/useDirectusForm.d.ts +0 -1
  76. package/dist/layers/lists/app/composables/globals/useDirectusForm.js +0 -1
  77. package/dist/layers/lists/app/composables/module.d.ts +0 -7
  78. package/dist/layers/lists/app/composables/module.js +0 -60
  79. package/dist/layers/lists/app/composables/providers/atproto.d.ts +0 -1
  80. package/dist/layers/lists/app/composables/providers/atproto.js +0 -133
  81. package/dist/layers/lists/app/composables/providers/directus.d.ts +0 -1
  82. package/dist/layers/lists/app/composables/providers/directus.js +0 -130
  83. package/dist/layers/lists/app/composables/providers/memory.d.ts +0 -1
  84. package/dist/layers/lists/app/composables/providers/memory.js +0 -110
  85. package/dist/layers/lists/app/composables/registry.d.ts +0 -4
  86. package/dist/layers/lists/app/composables/registry.js +0 -14
  87. package/dist/layers/lists/app/composables/types.d.ts +0 -38
  88. package/dist/layers/lists/app/composables/types.js +0 -1
  89. package/dist/layers/lists/app/composables/useLists.d.ts +0 -11
  90. package/dist/layers/lists/app/composables/useLists.js +0 -17
  91. package/dist/layers/lists/app/composables/utils/health.d.ts +0 -10
  92. package/dist/layers/lists/app/composables/utils/health.js +0 -15
  93. package/dist/layers/lists/app/composables/utils/transforms.d.ts +0 -13
  94. package/dist/layers/lists/app/composables/utils/transforms.js +0 -38
  95. package/dist/layers/lists/app/composables/utils/validation.d.ts +0 -3
  96. package/dist/layers/lists/app/composables/utils/validation.js +0 -16
  97. package/dist/layers/lists/nuxt.config.d.ts +0 -2
  98. package/dist/layers/lists/nuxt.config.js +0 -7
  99. package/dist/layers/shared/app/composables/globals/useDirectusForm.d.ts +0 -10
  100. package/dist/layers/shared/app/composables/globals/useDirectusForm.js +0 -66
  101. package/dist/lists/app/composables/config.d.ts +0 -7
  102. package/dist/lists/app/composables/config.js +0 -9
  103. package/dist/lists/app/composables/globals/useDirectusForm.d.ts +0 -1
  104. package/dist/lists/app/composables/globals/useDirectusForm.js +0 -1
  105. package/dist/lists/app/composables/module.d.ts +0 -7
  106. package/dist/lists/app/composables/module.js +0 -60
  107. package/dist/lists/app/composables/providers/atproto.d.ts +0 -1
  108. package/dist/lists/app/composables/providers/atproto.js +0 -133
  109. package/dist/lists/app/composables/providers/directus.d.ts +0 -1
  110. package/dist/lists/app/composables/providers/directus.js +0 -130
  111. package/dist/lists/app/composables/providers/memory.d.ts +0 -1
  112. package/dist/lists/app/composables/providers/memory.js +0 -110
  113. package/dist/lists/app/composables/registry.d.ts +0 -4
  114. package/dist/lists/app/composables/registry.js +0 -14
  115. package/dist/lists/app/composables/types.d.ts +0 -38
  116. package/dist/lists/app/composables/types.js +0 -1
  117. package/dist/lists/app/composables/useLists.d.ts +0 -11
  118. package/dist/lists/app/composables/useLists.js +0 -17
  119. package/dist/lists/app/composables/utils/health.d.ts +0 -10
  120. package/dist/lists/app/composables/utils/health.js +0 -15
  121. package/dist/lists/app/composables/utils/transforms.d.ts +0 -13
  122. package/dist/lists/app/composables/utils/transforms.js +0 -38
  123. package/dist/lists/app/composables/utils/validation.d.ts +0 -3
  124. package/dist/lists/app/composables/utils/validation.js +0 -16
  125. package/dist/lists/nuxt.config.d.ts +0 -2
  126. package/dist/lists/nuxt.config.js +0 -7
  127. package/dist/nuxt.config.d.ts +0 -2
  128. package/dist/nuxt.config.js +0 -7
  129. package/dist/packages/core/index.d.ts +0 -17
  130. package/dist/packages/core/index.js +0 -18
  131. package/dist/packages/core/src/adapters/auth.d.ts +0 -9
  132. package/dist/packages/core/src/adapters/auth.js +0 -1
  133. package/dist/packages/core/src/adapters/cart.d.ts +0 -22
  134. package/dist/packages/core/src/adapters/cart.js +0 -1
  135. package/dist/packages/core/src/adapters/catalog.d.ts +0 -17
  136. package/dist/packages/core/src/adapters/catalog.js +0 -1
  137. package/dist/packages/core/src/adapters/common.d.ts +0 -9
  138. package/dist/packages/core/src/adapters/common.js +0 -1
  139. package/dist/packages/core/src/adapters/lists.d.ts +0 -17
  140. package/dist/packages/core/src/adapters/lists.js +0 -1
  141. package/dist/packages/core/src/adapters/search.d.ts +0 -21
  142. package/dist/packages/core/src/adapters/search.js +0 -1
  143. package/dist/packages/core/src/plugins/defineAdapter.d.ts +0 -2
  144. package/dist/packages/core/src/plugins/defineAdapter.js +0 -3
  145. package/dist/packages/core/src/plugins/defineModule.d.ts +0 -2
  146. package/dist/packages/core/src/plugins/defineModule.js +0 -3
  147. package/dist/packages/core/src/plugins/registry.d.ts +0 -14
  148. package/dist/packages/core/src/plugins/registry.js +0 -46
  149. package/dist/packages/core/src/runtime/app.d.ts +0 -2
  150. package/dist/packages/core/src/runtime/app.js +0 -20
  151. package/dist/packages/core/src/runtime/config.d.ts +0 -7
  152. package/dist/packages/core/src/runtime/config.js +0 -9
  153. package/dist/packages/core/src/runtime/context.d.ts +0 -9
  154. package/dist/packages/core/src/runtime/context.js +0 -11
  155. package/dist/packages/core/src/runtime/hooks.d.ts +0 -5
  156. package/dist/packages/core/src/runtime/hooks.js +0 -18
  157. package/dist/packages/core/src/runtime/lifecycle.d.ts +0 -4
  158. package/dist/packages/core/src/runtime/lifecycle.js +0 -5
  159. package/dist/packages/core/src/types/adapters.d.ts +0 -14
  160. package/dist/packages/core/src/types/adapters.js +0 -1
  161. package/dist/packages/core/src/types/app.d.ts +0 -13
  162. package/dist/packages/core/src/types/app.js +0 -1
  163. package/dist/packages/core/src/types/config.d.ts +0 -8
  164. package/dist/packages/core/src/types/config.js +0 -1
  165. package/dist/packages/core/src/types/events.d.ts +0 -20
  166. package/dist/packages/core/src/types/events.js +0 -22
  167. package/dist/packages/core/src/types/module.d.ts +0 -15
  168. package/dist/packages/core/src/types/module.js +0 -1
  169. package/dist/shared/app/composables/globals/useDirectusForm.d.ts +0 -10
  170. package/dist/shared/app/composables/globals/useDirectusForm.js +0 -66
  171. package/global.d.ts +0 -1
  172. package/shims.d.ts +0 -7
  173. package/tsconfig.json +0 -21
@@ -1,44 +0,0 @@
1
- export interface ListItem {
2
- id: string
3
- title: string
4
- description?: string
5
- completed?: boolean
6
- position?: number
7
- parentId?: string
8
- metadata?: Record<string, any>
9
- createdAt?: string
10
- updatedAt?: string
11
- }
12
-
13
- export interface List {
14
- id: string
15
- title: string
16
- type: 'checklist' | 'kanban' | 'list' | string
17
- items: ListItem[]
18
- metadata?: Record<string, any>
19
- createdAt?: string
20
- updatedAt?: string
21
- }
22
-
23
- export interface ListsProvider {
24
- getList(id: string): Promise<List>
25
- listLists(params?: Record<string, any>): Promise<List[]>
26
- createList(data: Partial<List>): Promise<List>
27
- updateList(id: string, data: Partial<List>): Promise<List>
28
- deleteList(id: string): Promise<void>
29
-
30
- addItem(listId: string, item: Partial<ListItem>): Promise<ListItem>
31
- updateItem(listId: string, itemId: string, data: Partial<ListItem>): Promise<ListItem>
32
- deleteItem(listId: string, itemId: string): Promise<void>
33
-
34
- reorderItems?(listId: string, itemIds: string[]): Promise<void>
35
-
36
- // Optional advanced features commonly found in task apps
37
- toggleComplete?(listId: string, itemId: string, completed: boolean): Promise<ListItem>
38
- setDueDate?(listId: string, itemId: string, dueDate: string | null): Promise<ListItem>
39
- setReminder?(listId: string, itemId: string, reminder: string | null): Promise<ListItem>
40
- setPriority?(listId: string, itemId: string, priority: number | null): Promise<ListItem>
41
- shareList?(listId: string, userId: string, role?: string): Promise<void>
42
- searchItems?(listId: string, query: string): Promise<ListItem[]>
43
- archiveList?(listId: string): Promise<void>
44
- }
@@ -1,20 +0,0 @@
1
- import { getListsConfig } from './config'
2
- import { getListsProvider } from './registry'
3
-
4
- export function useLists() {
5
- const { provider } = getListsConfig()
6
- const lists = getListsProvider(provider)
7
-
8
- return {
9
- getList: lists.getList,
10
- listLists: lists.listLists,
11
- createList: lists.createList,
12
- updateList: lists.updateList,
13
- deleteList: lists.deleteList,
14
-
15
- addItem: lists.addItem,
16
- updateItem: lists.updateItem,
17
- deleteItem: lists.deleteItem,
18
- reorderItems: lists.reorderItems
19
- }
20
- }
@@ -1,16 +0,0 @@
1
- import { getListsProvider } from '../registry'
2
- import { getListsConfig } from '../config'
3
-
4
- export async function checkListsProviderHealth(providerName?: string) {
5
- try {
6
- const cfg = getListsConfig()
7
- const name = providerName || cfg.provider || 'directus'
8
- const provider = getListsProvider(name)
9
- const lists = await provider.listLists()
10
- return { ok: true, count: Array.isArray(lists) ? lists.length : null }
11
- } catch (e: any) {
12
- return { ok: false, error: e?.message || String(e) }
13
- }
14
- }
15
-
16
- export default checkListsProviderHealth
@@ -1,42 +0,0 @@
1
- import type { List, ListItem } from '../types'
2
-
3
- /**
4
- * Normalize a raw provider list into Meeovi's List shape.
5
- */
6
- export function transformList(raw: any): List {
7
- return {
8
- id: raw.id,
9
- title: raw.title ?? raw.name ?? 'Untitled',
10
- type: raw.type ?? 'list',
11
- items: Array.isArray(raw.items)
12
- ? raw.items.map(transformItem)
13
- : [],
14
- metadata: raw.metadata ?? {},
15
- createdAt: raw.createdAt ?? raw.created_at ?? null,
16
- updatedAt: raw.updatedAt ?? raw.updated_at ?? null
17
- }
18
- }
19
-
20
- /**
21
- * Normalize a raw provider item into Meeovi's ListItem shape.
22
- */
23
- export function transformItem(raw: any): ListItem {
24
- return {
25
- id: raw.id,
26
- title: raw.title ?? raw.name ?? '',
27
- description: raw.description ?? raw.body ?? '',
28
- completed: raw.completed ?? raw.done ?? false,
29
- position: raw.position ?? raw.order ?? 0,
30
- parentId: raw.parentId ?? raw.parent_id ?? null,
31
- metadata: raw.metadata ?? {},
32
- createdAt: raw.createdAt ?? raw.created_at ?? null,
33
- updatedAt: raw.updatedAt ?? raw.updated_at ?? null
34
- }
35
- }
36
-
37
- /**
38
- * Normalize arrays safely.
39
- */
40
- export function transformListArray(raw: any[]): List[] {
41
- return raw.map(transformList)
42
- }
@@ -1,21 +0,0 @@
1
- import type { List, ListItem } from '../types'
2
-
3
- export function validateListInput(data: Partial<List>) {
4
- if (!data.title || typeof data.title !== 'string') {
5
- throw new Error('List title is required and must be a string')
6
- }
7
-
8
- if (data.type && typeof data.type !== 'string') {
9
- throw new Error('List type must be a string')
10
- }
11
- }
12
-
13
- export function validateItemInput(data: Partial<ListItem>) {
14
- if (!data.title || typeof data.title !== 'string') {
15
- throw new Error('Item title is required and must be a string')
16
- }
17
-
18
- if (data.completed !== undefined && typeof data.completed !== 'boolean') {
19
- throw new Error('Item completed must be a boolean')
20
- }
21
- }
@@ -1,76 +0,0 @@
1
- <template>
2
- <v-row class="contentPage">
3
- <v-col cols="12">
4
- <v-card class="mx-auto" max-width="800px" elevation="0">
5
- <NuxtImg loading="lazy" class="align-end text-white" height="200" :src="`${$directus.url}/assets/${website?.image?.filename_disk}`" :alt="website?.name" cover />
6
- <v-card-title>{{ website?.name }}</v-card-title>
7
-
8
- <v-card-subtitle class="pt-4">
9
- Created: {{ new Date(website?.created_at).toLocaleDateString() }}
10
- </v-card-subtitle>
11
-
12
- <v-card-text>
13
- <div>Type: {{ website?.type }}</div>
14
-
15
- <div>{{ website?.note }}</div>
16
- </v-card-text>
17
-
18
- <v-card-actions>
19
- <updatebookmark />
20
-
21
- <v-spacer></v-spacer>
22
- <v-btn color="orange" text="Visit" :href="website?.url"></v-btn>
23
- </v-card-actions>
24
- </v-card>
25
- </v-col>
26
-
27
- <v-divider></v-divider>
28
- <v-col cols="12">
29
- <comments />
30
- </v-col>
31
- </v-row>
32
- </template>
33
-
34
- <script setup>
35
- import {
36
- ref,
37
- computed
38
- } from 'vue'
39
- import updatebookmark from '#lists/app/components/lists/update-bookmark.vue'
40
- import createListBtn from '#lists/app/components/partials/createListBtn.vue'
41
- import comments from '#social/app/components/comments.vue'
42
-
43
- const route = useRoute();
44
-
45
- const {
46
- $directus,
47
- $readItem
48
- } = useNuxtApp()
49
-
50
- const {
51
- data: website
52
- } = await useAsyncData('website', () => {
53
- return $directus.request($readItem('websites', route.params.id, {
54
- fields: ['*', {
55
- '*': ['*']
56
- }]
57
- }))
58
- })
59
-
60
-
61
- // Add this debug log
62
- watchEffect(() => {
63
- if (website.value) {
64
- console.log('Fetched website data:', website.value)
65
- }
66
- })
67
-
68
-
69
- useHead({
70
- title: computed(() => website?.value?.name || 'Bookmark Page')
71
- })
72
-
73
- definePageMeta({
74
- middleware: ['authenticated'],
75
- })
76
- </script>
@@ -1,152 +0,0 @@
1
- <template>
2
- <div>
3
- <section data-bs-version="5.1" class="header1 cid-v0HengyO4j" id="header01-0">
4
- <div class="container-fluid">
5
- <div class="row justify-content-left auto-text">
6
- <div v-if="page?.image?.filename_disk" class="col-12 col-md-12 col-lg-8 image-wrapper">
7
- <img class="w-100" :src="`${$directus.url}assets/${page?.image?.filename_disk}`"
8
- :alt="page?.name">
9
- </div>
10
- <div v-else class="col-12 col-md-12 col-lg-8 image-wrapper">
11
- <img class="w-100" src="../../assets/images/background1.jpg" :alt="page?.name">
12
- </div>
13
- <div class="col-12 col-lg col-md-12">
14
- <div class="text-wrapper align-left rightTextColumn">
15
- <h1
16
- class="mbr-section-title text-black align-center mbr-fonts-style mb-4 display-2 auto-text">
17
- <strong>{{ page?.name }}</strong>
18
- </h1>
19
- <p class="mbr-text mbr-fonts-style mb-4 display-7 text-black align-center auto-text"
20
- v-dompurify-html="page?.content"></p>
21
- <createList
22
- class="mbr-section-btn mt-3 mobi-mbri mobi-mbri-plus mbr-iconfont mbr-iconfont-btn" />
23
- </div>
24
- </div>
25
- </div>
26
- </div>
27
- </section>
28
-
29
- <v-sheet class="mx-auto sliderLists row align-items-stretch items-row justify-content-center">
30
- <v-toolbar color="transparent">
31
- <v-toolbar-title>{{ page?.repeaterTextBox?.[0]?.name }}</v-toolbar-title>
32
- </v-toolbar>
33
- <v-slide-group v-model="model" class="pa-4" selected-class="bg-success" show-arrows>
34
- <v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }" v-for="(list, index) in myLists"
35
- :key="index">
36
- <listCard :class="['ma-4', selectedClass]" :list="list" v-if="isSelected" @click="toggle" />
37
- </v-slide-group-item>
38
- </v-slide-group>
39
- </v-sheet>
40
-
41
- <RelatedLists />
42
-
43
- <v-sheet class="mx-auto sliderLists row align-items-stretch items-row justify-content-center">
44
- <v-toolbar color="transparent">
45
- <v-toolbar-title>{{ page?.repeaterTextBox?.[2]?.name }}</v-toolbar-title>
46
- </v-toolbar>
47
- <v-slide-group v-model="model" class="pa-4" selected-class="bg-success" show-arrows>
48
- <v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }"
49
- v-for="(bookmarks, index) in myBookmarks" :key="index">
50
- <listCard :class="['ma-4', selectedClass]" :list="bookmarks" v-if="isSelected" @click="toggle" />
51
- </v-slide-group-item>
52
- </v-slide-group>
53
- </v-sheet>
54
- </div>
55
- </template>
56
-
57
- <script setup>
58
- import {
59
- ref
60
- } from 'vue'
61
- import listCard from '~/components/related/list.vue'
62
- import RelatedLists from '~/components/related/relatedlists.vue'
63
- import createList from '~/components/lists/add-list.vue'
64
- import {
65
- useUserStore
66
- } from '../../../../auth/app/stores/user'
67
-
68
- const userStore = useUserStore()
69
- const userDisplayName = computed(() => {
70
- return userStore.user?.name || userStore.user?.username || 'User'
71
- })
72
-
73
- const model = ref(null)
74
-
75
- const {
76
- $directus,
77
- $readItems
78
- } = useNuxtApp()
79
-
80
- const {
81
- data: lists
82
- } = await useAsyncData('lists', () => {
83
- return $directus.request($readItems('lists', {
84
- filter: {
85
- status: {
86
- _eq: 'Public'
87
- }
88
- },
89
- }))
90
- })
91
-
92
- const {
93
- data: myLists
94
- } = await useAsyncData('myLists', () => {
95
- return $directus.request($readItems('lists', {
96
- filter: {
97
- user: {
98
- user_id: {
99
- first_name: {
100
- _eq: `${userDisplayName.firstName.value}`
101
- },
102
- last_name: {
103
- _eq: `${userDisplayName.lastName.value}`
104
- }
105
- },
106
- },
107
- },
108
- }))
109
- })
110
-
111
- const {
112
- data: myBookmarks
113
- } = await useAsyncData('myBookmarks', () => {
114
- return $directus.request($readItems('lists', {
115
- filter: {
116
- user: {
117
- user_id: {
118
- first_name: {
119
- _eq: `${userDisplayName.firstName.value}`
120
- },
121
- last_name: {
122
- _eq: `${userDisplayName.lastName.value}`
123
- }
124
- },
125
- lists_type: {
126
- lists_type_id: {
127
- _eq: 'Bookmarks'
128
- }
129
- }
130
- },
131
- },
132
- }))
133
- })
134
-
135
- const {
136
- data: page
137
- } = await useAsyncData('page', () => {
138
- return $directus.request($readItems('pages', {
139
- filter: {
140
- id: {
141
- _eq: 40
142
- }
143
- },
144
- fields: ['*'],
145
- limit: 1
146
- })).then(response => response?.[0]) // Get first item from response
147
- })
148
-
149
- useHead({
150
- title: 'Meeovi Tasks'
151
- })
152
- </script>
@@ -1,233 +0,0 @@
1
- <template>
2
- <v-container fluid>
3
- <div v-if="pending" class="text-center py-8">
4
- <v-progress-circular indeterminate color="primary" />
5
- </div>
6
-
7
- <div v-else-if="error" class="text-center py-8">
8
- <v-alert type="error">Failed to load list</v-alert>
9
- </div>
10
-
11
- <div v-else-if="list">
12
- <!-- List Header -->
13
- <v-toolbar :color="getListColor(list.type)" extended>
14
- <v-toolbar-title>{{ list.name }}</v-toolbar-title>
15
-
16
- <template v-slot:extension>
17
- <p v-dompurify-html="list?.description"></p>
18
- </template>
19
-
20
- <v-chip>{{ list?.type }}</v-chip>
21
- <v-chip :color="list?.status === 'public' ? 'success' : 'default'" class="ml-3" variant="outlined">
22
- {{ list?.status }}
23
- </v-chip>
24
-
25
- <v-btn color="primary" prepend-icon="fas fa-plus" @click="showAddDialog = true">
26
- Add Item
27
- </v-btn>
28
-
29
- <!-- List Items -->
30
- <addList />
31
- </v-toolbar>
32
- </div>
33
-
34
- <!-- Add Item Dialog -->
35
- <listItem v-model="showAddDialog" :list-type="list?.type" :list-id="list?.id" @added="refreshList" />
36
-
37
- <section data-bs-version="5.1" class="mbr-section features20 cid-txNnCwzel4" id="features20-4t"
38
- data-sortbtn="btn-primary">
39
- <div class="container-fluid">
40
- <h2 class="mbr-section-title text-center mbr-fonts-style display-5 auto-text">
41
- Items in this {{ list?.type }}</h2>
42
- <div class="underline align-center pb-3">
43
- <div class="line"></div>
44
- </div>
45
-
46
- <v-sheet class="mx-auto">
47
- <v-slide-group v-model="model" class="pa-4" show-arrows v-if="list?.products?.length">
48
- <v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }"
49
- v-for="(products, index) in list?.products" :key="index">
50
- <productCard :product="products?.products_id" :class="['ma-4', selectedClass]" @click="toggle" />
51
-
52
- <div class="d-flex fill-height align-center justify-center">
53
- <v-scale-transition>
54
- <v-icon v-if="isSelected" color="white" icon="mdi-close-circle-outline" size="48"></v-icon>
55
- </v-scale-transition>
56
- </div>
57
- </v-slide-group-item>
58
- </v-slide-group>
59
-
60
- <v-slide-group v-model="model" class="pa-4" show-arrows v-else-if="list?.spaces?.length">
61
- <v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }" v-for="(spaces, index) in list?.spaces"
62
- :key="index">
63
- <spaceCard :space="spaces" :class="['ma-4', selectedClass]" @click="toggle" />
64
-
65
- <div class="d-flex fill-height align-center justify-center">
66
- <v-scale-transition>
67
- <v-icon v-if="isSelected" color="white" icon="mdi-close-circle-outline" size="48"></v-icon>
68
- </v-scale-transition>
69
- </div>
70
- </v-slide-group-item>
71
- </v-slide-group>
72
-
73
- <v-slide-group v-model="model" class="pa-4" show-arrows v-else-if="list?.shorts?.length">
74
- <v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }" v-for="(shorts, index) in list?.shorts"
75
- :key="index">
76
- <shortCard :short="shorts?.shorts_id" :class="['ma-4', selectedClass]" @click="toggle" />
77
-
78
- <div class="d-flex fill-height align-center justify-center">
79
- <v-scale-transition>
80
- <v-icon v-if="isSelected" color="white" icon="mdi-close-circle-outline" size="48"></v-icon>
81
- </v-scale-transition>
82
- </div>
83
- </v-slide-group-item>
84
- </v-slide-group>
85
-
86
- <div v-else class="text-center py-8">
87
- <p>No items in this {{ list?.type }}</p>
88
- </div>
89
- </v-sheet>
90
- </div>
91
- </section>
92
-
93
-
94
- </v-container>
95
- </template>
96
-
97
- <script setup>
98
- import {
99
- ref,
100
- computed
101
- } from 'vue'
102
- import {
103
- useRoute
104
- } from 'vue-router'
105
- import {
106
- useLists
107
- } from '@/composables/lists/useLists'
108
- import listItem from '@/components/lists/add-list-item.vue'
109
- import addList from '@/components/lists/add-list.vue'
110
- import productCard from '#commerce/app/components/catalog/product/productCard.vue'
111
- import spaceCard from '#social/app/components/related/space.vue'
112
- import shortCard from '#social/app/components/related/short.vue'
113
-
114
- const route = useRoute()
115
- const {
116
- updateListItem,
117
- removeFromList
118
- } = useLists()
119
-
120
- const showAddDialog = ref(false)
121
-
122
- const {
123
- $directus,
124
- $readItems
125
- } = useNuxtApp()
126
-
127
- const slug = computed(() => {
128
- const s = route.params.slug
129
- return Array.isArray(s) ? s[0] : s
130
- })
131
-
132
- const {
133
- data: listRaw,
134
- pending,
135
- error,
136
- refresh: refreshList
137
- } = await useAsyncData('list', () => {
138
- return $directus.request(
139
- $readItems('lists', {
140
- fields: [
141
- '*',
142
- 'category.categories_id.*',
143
- 'department.departments_id',
144
- 'spaces.spaces_id.*',
145
- 'products.products_id.*',
146
- 'products.products_id.image.*',
147
- 'vibez.shorts_id.*',
148
- 'list_template.templates.*',
149
- 'image.*',
150
- 'media.*',
151
- 'list_items.list_items_id.*',
152
- 'list_products.list_products_id.*',
153
- 'user.directus_users.*'
154
- ],
155
- filter: {
156
- slug: {
157
- _eq: slug.value
158
- }
159
- },
160
- limit: 1
161
- })
162
- )
163
- })
164
-
165
- const list = computed(() => listRaw.value?.[0] || null)
166
-
167
- const mediaItems = computed(() => {
168
- if (list.value?.type !== 'playlist') return []
169
- return list.value.items?.filter(item =>
170
- item.content.type === 'media' && ['audio', 'video'].includes(item.content.media_type)
171
- ).map(item => item.content) || []
172
- })
173
-
174
- const getListIcon = (type) => {
175
- const icons = {
176
- default: 'mdi-format-list-bulleted',
177
- playlist: 'mdi-playlist-music',
178
- wishlist: 'mdi-heart',
179
- bookmarks: 'mdi-bookmark',
180
- tasks: 'mdi-check-circle'
181
- }
182
- return icons[type] || icons.default
183
- }
184
-
185
- const getListColor = (type) => {
186
- const colors = {
187
- default: 'primary',
188
- playlist: 'purple',
189
- wishlist: 'pink',
190
- bookmarks: 'orange',
191
- tasks: 'green'
192
- }
193
- return colors[type] || colors.default
194
- }
195
-
196
- const updateTask = async (itemId, taskData) => {
197
- try {
198
- await updateListItem(itemId, {
199
- content: taskData
200
- })
201
- await refreshList()
202
- } catch (error) {
203
- console.error('Failed to update task:', error)
204
- }
205
- }
206
-
207
- const editItem = (item) => {
208
- // Handle edit functionality
209
- console.log('Edit item:', item)
210
- }
211
-
212
- const duplicateItem = (item) => {
213
- // Handle duplicate functionality
214
- console.log('Duplicate item:', item)
215
- }
216
-
217
- const deleteItem = async (itemId) => {
218
- try {
219
- await removeFromList(itemId)
220
- await refreshList()
221
- } catch (error) {
222
- console.error('Failed to delete item:', error)
223
- }
224
- }
225
-
226
- useHead({
227
- title: computed(() => list.value?.name || 'List')
228
- })
229
-
230
- definePageMeta({
231
- //middleware: ['authenticated']
232
- })
233
- </script>
@@ -1,7 +0,0 @@
1
- export interface ListsConfig {
2
- provider: string;
3
- baseUrl?: string;
4
- apiKey?: string;
5
- }
6
- export declare function setListsConfig(newConfig: Partial<ListsConfig>): void;
7
- export declare function getListsConfig(): ListsConfig;
@@ -1,9 +0,0 @@
1
- let config = {
2
- provider: 'directus'
3
- };
4
- export function setListsConfig(newConfig) {
5
- config = { ...config, ...newConfig };
6
- }
7
- export function getListsConfig() {
8
- return config;
9
- }
@@ -1,4 +0,0 @@
1
- export declare function useDirectusForm(..._args: any[]): {
2
- data: any;
3
- save: () => Promise<never>;
4
- };
@@ -1,10 +0,0 @@
1
- // Light stub for isolated typechecks and builds.
2
- // In the real app this re-exports from the shared layer.
3
- export function useDirectusForm(..._args) {
4
- return {
5
- data: null,
6
- save: async () => {
7
- throw new Error('useDirectusForm stub - not available in isolated build');
8
- }
9
- };
10
- }
@@ -1,7 +0,0 @@
1
- import { type AlternateContext } from '@meeovi/core';
2
- declare const _default: {
3
- id: string;
4
- adapters: {};
5
- setup(ctx: AlternateContext): Promise<void>;
6
- };
7
- export default _default;