@paris-ias/list 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 (99) hide show
  1. package/example/.env.example +3 -0
  2. package/example/nuxt.config.ts +19 -0
  3. package/example/pages/index.vue +27 -0
  4. package/package.json +3 -3
  5. package/src/module.ts +119 -0
  6. package/src/runtime/components/events/Badges.vue +73 -0
  7. package/src/runtime/components/events/DateTimePlace.vue +77 -0
  8. package/src/runtime/components/events/DenseItem.vue +40 -0
  9. package/src/runtime/components/events/ExpandedItem.vue +11 -0
  10. package/src/runtime/components/events/ListContainer.vue +41 -0
  11. package/src/runtime/components/events/RegisterModal.vue +51 -0
  12. package/src/runtime/components/events/RelatedItem.vue +44 -0
  13. package/src/runtime/components/events/RowsItem.vue +114 -0
  14. package/src/runtime/components/events/View.vue +333 -0
  15. package/src/runtime/components/fellowships/Badges.vue +48 -0
  16. package/src/runtime/components/fellowships/DenseItem.vue +39 -0
  17. package/src/runtime/components/fellowships/ExpandedItem.vue +7 -0
  18. package/src/runtime/components/fellowships/RegisterModal.vue +41 -0
  19. package/src/runtime/components/fellowships/RowsItem.vue +61 -0
  20. package/src/runtime/components/fellowships/View.vue +210 -0
  21. package/src/runtime/components/list/atoms/FiltersMenu.vue +46 -0
  22. package/src/runtime/components/list/atoms/SearchInput.vue +129 -0
  23. package/src/runtime/components/list/atoms/SearchItem.vue +59 -0
  24. package/src/runtime/components/list/atoms/SearchString.vue +161 -0
  25. package/src/runtime/components/list/atoms/SortMenu.vue +97 -0
  26. package/src/runtime/components/list/atoms/ViewMenu.vue +71 -0
  27. package/src/runtime/components/list/inputs/AutoComplete.vue +22 -0
  28. package/src/runtime/components/list/inputs/BooleanSwitch.vue +18 -0
  29. package/src/runtime/components/list/inputs/Checkbox.vue +21 -0
  30. package/src/runtime/components/list/inputs/Select.vue +25 -0
  31. package/src/runtime/components/list/molecules/Filters.vue +97 -0
  32. package/src/runtime/components/list/molecules/Header.vue +47 -0
  33. package/src/runtime/components/list/molecules/Pagination.vue +243 -0
  34. package/src/runtime/components/list/organisms/List.vue +92 -0
  35. package/src/runtime/components/list/views/Dense.vue +25 -0
  36. package/src/runtime/components/list/views/Expanded.vue +10 -0
  37. package/src/runtime/components/list/views/Grid.vue +13 -0
  38. package/src/runtime/components/list/views/Rows.vue +13 -0
  39. package/src/runtime/components/list/views/Table.vue +13 -0
  40. package/src/runtime/components/misc/atoms/CountUp.vue +198 -0
  41. package/src/runtime/components/misc/atoms/DateStamp.vue +104 -0
  42. package/src/runtime/components/misc/atoms/ImageContainer.vue +105 -0
  43. package/src/runtime/components/misc/atoms/ShareMenu.vue +60 -0
  44. package/src/runtime/components/misc/atoms/Socials.vue +127 -0
  45. package/src/runtime/components/misc/molecules/ChipContainer.vue +35 -0
  46. package/src/runtime/components/misc/molecules/Related.vue +41 -0
  47. package/src/runtime/components/misc/molecules/RelatedItems.vue +29 -0
  48. package/src/runtime/components/misc/molecules/SearchItem.vue +26 -0
  49. package/src/runtime/components/news/DenseItem.vue +62 -0
  50. package/src/runtime/components/news/ExpandedItem.vue +153 -0
  51. package/src/runtime/components/news/Header.vue +9 -0
  52. package/src/runtime/components/news/RelatedItem.vue +44 -0
  53. package/src/runtime/components/news/RowsItem.vue +160 -0
  54. package/src/runtime/components/news/View.vue +190 -0
  55. package/src/runtime/components/people/DenseItem.vue +37 -0
  56. package/src/runtime/components/people/ExpandedItem.vue +16 -0
  57. package/src/runtime/components/people/GroupBadges.vue +56 -0
  58. package/src/runtime/components/people/RelatedItem.vue +41 -0
  59. package/src/runtime/components/people/RowsItem.vue +95 -0
  60. package/src/runtime/components/people/View.vue +162 -0
  61. package/src/runtime/components/projects/ExpandedItem.vue +14 -0
  62. package/src/runtime/components/projects/RelatedItem.vue +44 -0
  63. package/src/runtime/components/projects/RowsItem.vue +106 -0
  64. package/src/runtime/components/projects/View.vue +131 -0
  65. package/src/runtime/components/publications/RelatedItem.vue +44 -0
  66. package/src/runtime/components/publications/RowsItem.vue +105 -0
  67. package/src/runtime/components/publications/View.vue +139 -0
  68. package/src/runtime/composables/useFetchItem.ts +64 -0
  69. package/src/runtime/composables/useIcons.ts +30 -0
  70. package/src/runtime/composables/useUtils.ts +75 -0
  71. package/src/runtime/graphql/queries/buildFiltersValues.gql +35 -0
  72. package/src/runtime/graphql/queries/item/action.gql +0 -0
  73. package/src/runtime/graphql/queries/item/apps.gql +0 -0
  74. package/src/runtime/graphql/queries/item/events.gql +120 -0
  75. package/src/runtime/graphql/queries/item/fellowships.gql +164 -0
  76. package/src/runtime/graphql/queries/item/news.gql +129 -0
  77. package/src/runtime/graphql/queries/item/people.gql +174 -0
  78. package/src/runtime/graphql/queries/item/projects.gql +171 -0
  79. package/src/runtime/graphql/queries/item/publications.gql +169 -0
  80. package/src/runtime/graphql/queries/item/users.gql +0 -0
  81. package/src/runtime/graphql/queries/list/action.gql +0 -0
  82. package/src/runtime/graphql/queries/list/apps.gql +32 -0
  83. package/src/runtime/graphql/queries/list/events.gql +44 -0
  84. package/src/runtime/graphql/queries/list/fellowships.gql +53 -0
  85. package/src/runtime/graphql/queries/list/news.gql +39 -0
  86. package/src/runtime/graphql/queries/list/people.gql +49 -0
  87. package/src/runtime/graphql/queries/list/projects.gql +37 -0
  88. package/src/runtime/graphql/queries/list/publications.gql +37 -0
  89. package/src/runtime/graphql/queries/list/search.gql +148 -0
  90. package/src/runtime/graphql/queries/list/users.gql +32 -0
  91. package/src/runtime/graphql/queries/login.gql +0 -0
  92. package/src/runtime/plugins/pinia.ts +88 -0
  93. package/src/runtime/plugins/vuetify.js +21 -0
  94. package/src/runtime/stores/factory.ts +18 -0
  95. package/src/runtime/stores/root.ts +353 -0
  96. package/src/runtime/translations/en.json +436 -0
  97. package/src/runtime/translations/fr.json +429 -0
  98. package/src/runtime/types/imports.d.ts +13 -0
  99. package/src/runtime/types/stores.d.ts +11 -0
@@ -0,0 +1,3 @@
1
+ # GraphQL Configuration
2
+ GRAPHQL_ENDPOINT=your_graphql_endpoint_here
3
+ GRAPHQL_API_KEY=your_graphql_api_key_here
@@ -0,0 +1,19 @@
1
+ export default defineNuxtConfig({
2
+ modules: ["@paris-ias/list"],
3
+ list: {
4
+ modules: [
5
+ "events",
6
+ "news",
7
+ "people",
8
+ "projects",
9
+ "fellowships",
10
+ "publications",
11
+ ],
12
+ },
13
+ runtimeConfig: {
14
+ public: {
15
+ graphqlEndpoint: process.env.GRAPHQL_ENDPOINT,
16
+ graphqlApiKey: process.env.GRAPHQL_API_KEY,
17
+ },
18
+ },
19
+ })
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <div>
3
+ <h1>List Module Example</h1>
4
+
5
+ <h2>Events</h2>
6
+ <ListOrganismsList type="events" />
7
+
8
+ <h2>News</h2>
9
+ <ListOrganismsList type="news" />
10
+
11
+ <h2>People</h2>
12
+ <ListOrganismsList type="people" />
13
+
14
+ <h2>Publications</h2>
15
+ <ListOrganismsList type="publications" />
16
+
17
+ <h2>Fellowships</h2>
18
+ <ListOrganismsList type="fellowships" />
19
+
20
+ <h2>Projects</h2>
21
+ <ListOrganismsList type="projects" />
22
+ </div>
23
+ </template>
24
+
25
+ <script setup lang="ts">
26
+ // The components are automatically imported by the module
27
+ </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paris-ias/list",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/module.mjs",
@@ -13,8 +13,8 @@
13
13
  }
14
14
  },
15
15
  "files": [
16
- "dist",
17
- "templates"
16
+ "example",
17
+ "src"
18
18
  ],
19
19
  "scripts": {
20
20
  "dev": "nuxt dev",
package/src/module.ts ADDED
@@ -0,0 +1,119 @@
1
+ import {
2
+ defineNuxtModule,
3
+ createResolver,
4
+ addComponentsDir,
5
+ addImportsDir,
6
+ addPlugin,
7
+ } from "@nuxt/kit"
8
+ import { fileURLToPath } from "node:url"
9
+
10
+ export interface ModuleOptions {
11
+ modules: string[]
12
+ }
13
+
14
+ export default defineNuxtModule<ModuleOptions>({
15
+ meta: {
16
+ name: "@paris-ias/list",
17
+ configKey: "list",
18
+ compatibility: {
19
+ nuxt: "^3.0.0",
20
+ },
21
+ },
22
+ defaults: {
23
+ modules: [],
24
+ },
25
+ setup(options, nuxt) {
26
+ const { resolve } = createResolver(import.meta.url)
27
+ const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url))
28
+
29
+ // Add components
30
+ addComponentsDir({
31
+ path: resolve(runtimeDir, "components"),
32
+ global: true,
33
+ })
34
+ // Add store
35
+ nuxt.hook("modules:before", () => {
36
+ nuxt.options.build.transpile.push(resolve(runtimeDir, "stores"))
37
+ })
38
+ // Add composables
39
+ addImportsDir(resolve(runtimeDir, "composables"))
40
+
41
+ // Add graphQL queries
42
+ addImportsDir(resolve(runtimeDir, "graphql"))
43
+
44
+ // Add plugin
45
+ addPlugin(resolve(runtimeDir, "plugins/pinia.ts"))
46
+ addPlugin(resolve(runtimeDir, "plugins/vuetify.js"))
47
+
48
+ // Add translations
49
+
50
+ nuxt.hook("i18n:registerModule", (register) => {
51
+ register({
52
+ // langDir path needs to be resolved
53
+ langDir: resolve(runtimeDir, "translations"),
54
+ locales: [
55
+ {
56
+ code: "en",
57
+ file: "en.json",
58
+ },
59
+ {
60
+ code: "fr",
61
+ file: "fr.json",
62
+ },
63
+ ],
64
+ })
65
+ })
66
+ nuxt.options.runtimeConfig.public.list = options
67
+
68
+ // Add i18n configuration
69
+ nuxt.options.i18n = {
70
+ ...nuxt.options.i18n,
71
+ langDir: resolve(runtimeDir, "translations"),
72
+ lazy: true,
73
+ }
74
+
75
+ // Add Apollo configuration
76
+ nuxt.options.apollo = {
77
+ ...nuxt.options.apollo,
78
+ clients: {
79
+ default: {
80
+ httpEndpoint: process.env.GRAPHQL_ENDPOINT || "",
81
+ httpLinkOptions: {
82
+ headers: {
83
+ "x-api-key": process.env.GRAPHQL_API_KEY || "",
84
+ },
85
+ },
86
+ },
87
+ },
88
+ }
89
+
90
+ // Add Vuetify configuration
91
+ nuxt.options.build.transpile = [
92
+ ...(nuxt.options.build.transpile || []),
93
+ "vuetify",
94
+ ]
95
+ nuxt.options.css = [
96
+ ...(nuxt.options.css || []),
97
+ "vuetify/lib/styles/main.sass",
98
+ ]
99
+
100
+ // Add Vite configuration
101
+ nuxt.options.vite = {
102
+ ...nuxt.options.vite,
103
+ define: {
104
+ ...nuxt.options.vite?.define,
105
+ "process.env.DEBUG": false,
106
+ },
107
+ css: {
108
+ preprocessorOptions: {
109
+ scss: {
110
+ api: "modern-compiler",
111
+ },
112
+ },
113
+ },
114
+ build: {
115
+ target: "esnext",
116
+ },
117
+ }
118
+ },
119
+ })
@@ -0,0 +1,73 @@
1
+ <template>
2
+ <div>
3
+ <EventsRegisterModal v-if="item.bookingState === 'OPEN'" :item="item" />
4
+ <v-btn
5
+ v-if="item.bookingState === 'FULL'"
6
+ color="grey-lighten-3"
7
+ flat
8
+ rounded="0"
9
+ prepend-icon="mdi-circle-medium"
10
+ size="small"
11
+ class="my-2"
12
+ >
13
+ <template #prepend>
14
+ <v-icon size="large" color="danger" />
15
+ </template>
16
+ {{ $t("event-full") }}</v-btn
17
+ >
18
+
19
+ <v-divider v-if="smAndUp" vertical class="mx-3" />
20
+ <v-btn
21
+ v-if="item.stream && item.stream.length"
22
+ color="grey-lighten-3"
23
+ flat
24
+ rounded="0"
25
+ prepend-icon="mdi-television-play"
26
+ size="small"
27
+ class="my-xs-2"
28
+ :to="
29
+ localePath({
30
+ name: 'activities-events-slug',
31
+ params: { slug: item.slug[locale] },
32
+ })
33
+ "
34
+ >
35
+ {{ $t("live-stream-available") }}</v-btn
36
+ >
37
+
38
+ <v-btn
39
+ v-if="item.outside"
40
+ color="grey-lighten-3"
41
+ flat
42
+ rounded="0"
43
+ prepend-icon="mdi-location-exit"
44
+ size="small"
45
+ class="my-xs-2"
46
+ >
47
+ {{ $t("outside-event") }}</v-btn
48
+ >
49
+
50
+ <v-btn
51
+ v-if="item.type === 'HYBRID'"
52
+ color="grey-lighten-3"
53
+ flat
54
+ rounded="0"
55
+ prepend-icon="mdi-cast-education"
56
+ size="small"
57
+ class="my-xs-2"
58
+ >
59
+ {{ $t("hybrid-event") }}</v-btn
60
+ >
61
+ </div>
62
+ </template>
63
+
64
+ <script setup>
65
+ import { useDisplay } from "vuetify"
66
+ const { smAndUp } = useDisplay()
67
+ const { locale } = useI18n()
68
+ const props = defineProps({
69
+ item: { type: Object, required: true },
70
+ })
71
+ </script>
72
+
73
+ <style lang="scss" scoped></style>
@@ -0,0 +1,77 @@
1
+ <template>
2
+ <div class="text-overline font-weight-bold">
3
+ {{ $t("date-et-heure") }}
4
+ </div>
5
+ <div>
6
+ <div>{{ startDay }}</div>
7
+ <div>{{ startTime }} - {{ stopTime }}</div>
8
+ </div>
9
+
10
+ <div class="text-overline font-weight-bold mt-md-4">
11
+ {{ $t("location") }}
12
+ </div>
13
+ <div>{{ item.location }}</div>
14
+
15
+ <v-btn
16
+ variant="text"
17
+ class="ml-n4"
18
+ size="small"
19
+ :prepend-icon="
20
+ open ? 'mdi-chevron-double-down' : 'mdi-chevron-double-right'
21
+ "
22
+ @click="open = !open"
23
+ >
24
+ {{ $t("show-on-map") }}
25
+ </v-btn>
26
+ <v-expand-transition>
27
+ <v-responsive v-show="open" :aspect-ratio="1 / 1">
28
+ <iframe
29
+ title="openstreetmap"
30
+ width="100%"
31
+ height="100%"
32
+ absolute
33
+ frameborder="0"
34
+ scrolling="no"
35
+ marginheight="0"
36
+ marginwidth="0"
37
+ src="https://www.openstreetmap.org/export/embed.html?bbox=2.3413968033604786%2C48.84311283480419%2C2.3779606766514942%2C48.8594349634343&amp;layer=mapnik&amp;marker=48.851274564242196%2C2.359678740005961"
38
+ /><br /><small
39
+ ><a
40
+ href="https:/www.openstreetmap.org/?mlat=48.85127&amp;mlon=2.35968#map=16/48.85127/2.35968"
41
+ >Afficher une carte plus grande</a
42
+ ></small
43
+ >
44
+ ></v-responsive
45
+ >
46
+ </v-expand-transition>
47
+ <br />
48
+ <v-btn
49
+ variant="text"
50
+ class="ml-n4"
51
+ size="small"
52
+ prepend-icon="mdi-open-in-new"
53
+ >
54
+ {{ $t("details") }}
55
+ </v-btn>
56
+ </template>
57
+
58
+ <script setup>
59
+ import { getDetailedFormatedDate } from "../../composables/useUtils"
60
+ const { locale } = useI18n()
61
+ const props = defineProps({
62
+ item: {
63
+ type: Object,
64
+ required: true,
65
+ },
66
+ })
67
+ const open = ref(false)
68
+ const detailedStart = getDetailedFormatedDate(props.item.start, locale.value)
69
+ const startDay = ref(
70
+ `${detailedStart.day} ${detailedStart.month} ${detailedStart.year}`
71
+ )
72
+ const startTime = ref(detailedStart.hours)
73
+ const detailedStop = getDetailedFormatedDate(props.item.stop, locale.value)
74
+ const stopTime = ref(detailedStop.hours)
75
+ </script>
76
+
77
+ <style lang="scss" scoped></style>
@@ -0,0 +1,40 @@
1
+ <template>
2
+ <v-row
3
+ v-ripple
4
+ class="cursor-pointer highlight-on-hover"
5
+ @click="$router.push(localePath('/activities/events/' + item.slug[locale]))"
6
+ >
7
+ <v-col align-self="center" cols="2">
8
+ {{
9
+ new Date(item.start).toLocaleDateString(locale, {
10
+ year: "numeric",
11
+ month: "numeric",
12
+ day: "numeric",
13
+ })
14
+ }}
15
+ </v-col>
16
+ <v-col align-self="center" class="text-h6 dense">
17
+ <div class="mt-2 text-h6 text-overline font-weight-black">
18
+ {{ $t("list.filters.events.category." + item.category) }}
19
+ </div>
20
+ {{ item.name }}
21
+ </v-col>
22
+ <v-col align-self="center">
23
+ <!-- <EventsBadges :item /> -->
24
+ </v-col>
25
+ </v-row>
26
+ </template>
27
+ <script setup>
28
+ const { locale } = useI18n()
29
+ const localePath = useLocalePath()
30
+ const props = defineProps({
31
+ item: {
32
+ type: Object,
33
+ required: true,
34
+ },
35
+ index: {
36
+ type: Number,
37
+ required: true,
38
+ },
39
+ })
40
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div class="text-h4">{{ item.name }}</div>
3
+ </template>
4
+
5
+ <script lang="ts" setup>
6
+ const props = defineProps({
7
+ item: { type: Object, required: true },
8
+ })
9
+ </script>
10
+
11
+ <style></style>
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <v-sheet v-for="(event, i) in events" :key="i" flat class="ma-6">
3
+ <v-row
4
+ :value="event"
5
+ style="cursor: pointer"
6
+ @click="
7
+ $router.push(localePath('/activities/events/' + slugify(event.title)))
8
+ "
9
+ >
10
+ <v-col cols="3">
11
+ <MiscAtomsDateStamp
12
+ :loading="rootStore.events.loading"
13
+ :date="[
14
+ new Date(event.start),
15
+ ...(event.stop ? [new Date(event.stop)] : []),
16
+ ]"
17
+ />
18
+ </v-col>
19
+ <v-col cols="9">
20
+ <v-list-item-title class="text-h6 my-3">
21
+ {{ event.title }}
22
+ </v-list-item-title>
23
+ <v-list-item-subtitle v-text="event.summary" />
24
+ <v-chip v-if="event.online" class="mr-2 mt-3" color="primary">
25
+ {{ $t("online") }}
26
+ </v-chip>
27
+ </v-col>
28
+ </v-row>
29
+ </v-sheet>
30
+ </template>
31
+ <script setup>
32
+ import { useRootStore } from "../../stores/root"
33
+ const rootStore = useRootStore()
34
+ const props = defineProps({
35
+ events: {
36
+ type: Array,
37
+ required: true,
38
+ },
39
+ })
40
+ </script>
41
+ <style lang="scss"></style>
@@ -0,0 +1,51 @@
1
+ <template>
2
+ <v-dialog max-width="500">
3
+ <template #activator="{ props: activatorProps }">
4
+ <v-btn
5
+ variant="outlined"
6
+ tile
7
+ block
8
+ v-bind="activatorProps"
9
+ size="x-large"
10
+ prepend-icon="mdi-circle-medium"
11
+ >
12
+ <template #prepend>
13
+ <v-icon size="x-large" color="success" />
14
+ </template>
15
+ <div class="text-wrap register-text">
16
+ {{ $t("register") }}
17
+ </div>
18
+ </v-btn>
19
+ </template>
20
+
21
+ <template #default="{ isActive }">
22
+ <v-card :title="$t('events.register')">
23
+ <v-card-text>
24
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
25
+ eiusmod tempor incididunt ut labore et dolore magna aliqua.
26
+ </v-card-text>
27
+
28
+ <v-card-actions>
29
+ <v-spacer />
30
+
31
+ <v-btn :text="$t('cancel')" @click="isActive.value = false" />
32
+ <v-btn
33
+ :text="$t('events.register-me')"
34
+ @click="isActive.value = false"
35
+ />
36
+ </v-card-actions>
37
+ </v-card>
38
+ </template>
39
+ </v-dialog>
40
+ </template>
41
+
42
+ <script setup>
43
+ const props = defineProps({
44
+ item: { type: Object, required: true },
45
+ })
46
+ </script>
47
+ <style>
48
+ .register-text {
49
+ font-size: 0.8rem;
50
+ }
51
+ </style>
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <v-sheet
3
+ :to="
4
+ localePath({
5
+ name: 'activities-events-slug',
6
+ params: { slug: item.name },
7
+ })
8
+ "
9
+ >
10
+ <v-row>
11
+ <v-col v-if="lgAndUp" cols="3">
12
+ <MiscAtomsImageContainer
13
+ cover
14
+ :src="item.image"
15
+ :ratio="1 / 1"
16
+ :link="item.name"
17
+ :loading="rootStore.loading"
18
+ name="activities-events-slug"
19
+ />
20
+ </v-col>
21
+ <v-col cols="12" lg="9">
22
+ <v-skeleton-loader v-if="rootStore.loading" type="heading, text@3" />
23
+ <template v-else>
24
+ <div class="text-h6">
25
+ {{ item.name }}
26
+ </div>
27
+ <div class="text-body-1">
28
+ {{ item.description }}
29
+ </div>
30
+ </template>
31
+ </v-col></v-row
32
+ ></v-sheet
33
+ >
34
+ </template>
35
+
36
+ <script setup>
37
+ import { useDisplay } from "vuetify"
38
+ import { useRootStore } from "../../stores/root"
39
+ const localePath = useLocalePath()
40
+ const rootStore = useRootStore()
41
+ const { lgAndUp } = useDisplay()
42
+
43
+ const props = defineProps({ item: { type: Object, required: true } })
44
+ </script>
@@ -0,0 +1,114 @@
1
+ <template>
2
+ <v-divider v-if="index > 0" />
3
+ <v-row class="py-8 px-6 highlight-on-hover" no-gutters>
4
+ <v-col cols="12" md="1">
5
+ <MiscAtomsDateStamp
6
+ v-if="item.start"
7
+ :loading="$stores['events'].loading"
8
+ :date-start="item.start"
9
+ :date-stop="item.stop"
10
+ class="pr-6 mt-md-2"
11
+ />
12
+ </v-col>
13
+ <v-col cols="12" md="7" class="px-md-6 mt-6 mt-md-0">
14
+ <v-row no-gutters>
15
+ <v-col cols="12" class="pr-lg-6">
16
+ <v-skeleton-loader
17
+ v-if="rootStore.loading || $stores['events'].loading"
18
+ :type="
19
+ [
20
+ 'heading, subtitle, text@6,subtitle, text, ossein, button, button',
21
+ 'heading, subtitle, text@6,subtitle, text, ossein, button, button',
22
+ 'heading, subtitle, text@6, ossein, button, button',
23
+ 'heading, subtitle, text@6, ossein, button, button',
24
+ 'heading, subtitle, text@6, ossein, button, button',
25
+ 'heading, subtitle, text@6, ossein, button, button',
26
+ ][['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')]
27
+ "
28
+ />
29
+
30
+ <div v-else>
31
+ <nuxt-link
32
+ v-if="item.name"
33
+ :to="
34
+ localePath({
35
+ name: 'activities-events-slug',
36
+ params: { slug: item.slug[locale] },
37
+ })
38
+ "
39
+ class="text-h4 text-black text-wrap mt-4"
40
+ >
41
+ {{ item.name }}
42
+ </nuxt-link>
43
+ <div class="mt-2 text-h6 text-overline font-weight-black">
44
+ {{ $t("list.filters.events.category." + item.category) }}
45
+ </div>
46
+
47
+ <p
48
+ class="text-wrap clamped-text"
49
+ :style="
50
+ '-webkit-line-clamp:' +
51
+ [5, 5, 5, 10, 12, 14][
52
+ ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].indexOf(name || 'md')
53
+ ]
54
+ "
55
+ >
56
+ <MDC v-if="item.summary" :value="item.summary" />
57
+ </p>
58
+
59
+ <div v-if="lgAndUp" class="d-flex flex-row align-center flex-wrap">
60
+ <EventsBadges :item />
61
+ </div>
62
+ </div>
63
+ </v-col>
64
+ </v-row>
65
+ <v-row
66
+ v-if="mdAndDown"
67
+ class="d-flex flex-row align-center flex-wrap"
68
+ no-gutters
69
+ >
70
+ <v-col cols="12">
71
+ <v-skeleton-loader
72
+ v-if="rootStore.loading || $stores['events'].loading"
73
+ :type="
74
+ ['article, heading, text, heading, text, button, button'][
75
+ ['md'].indexOf(name || 'md')
76
+ ]
77
+ "
78
+ />
79
+
80
+ <div v-else><EventsBadges :item="item" /></div>
81
+ </v-col>
82
+ </v-row>
83
+ </v-col>
84
+ <v-col cols="12" md="4">
85
+ <MiscAtomsImageContainer
86
+ cover
87
+ :slug="item.slug[locale]"
88
+ link="activities-events-slug"
89
+ :loading="$stores['events'].loading"
90
+ :src="item.image.url ? item.image : '/default.png'"
91
+ :ratio="1 / 1"
92
+ />
93
+ </v-col>
94
+ </v-row>
95
+ </template>
96
+ <script setup>
97
+ import { useDisplay } from "vuetify"
98
+ import { useRootStore } from "../../stores/root"
99
+ const { locale } = useI18n()
100
+ const { name, mdAndDown, lgAndUp } = useDisplay()
101
+ const localePath = useLocalePath()
102
+ const rootStore = useRootStore()
103
+ const { $stores } = useNuxtApp()
104
+ const props = defineProps({
105
+ item: {
106
+ type: Object,
107
+ required: true,
108
+ },
109
+ index: {
110
+ type: Number,
111
+ required: true,
112
+ },
113
+ })
114
+ </script>