@datagouv/components-next 1.0.2-dev.216 → 1.0.2-dev.218

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.
@@ -1,4 +1,4 @@
1
- import { g as Ke } from "./main-CWNJSmLw.js";
1
+ import { g as Ke } from "./main-hDFmYneb.js";
2
2
  import We from "vue";
3
3
  function Fe(I, K) {
4
4
  for (var V = 0; V < K.length; V++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datagouv/components-next",
3
- "version": "1.0.2-dev.216",
3
+ "version": "1.0.2-dev.218",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -147,7 +147,8 @@ import TranslationT from './TranslationT.vue'
147
147
  type Props = {
148
148
  dataservice: Dataservice
149
149
  dataserviceUrl?: RouteLocationRaw
150
- organizationUrl?: RouteLocationRaw
150
+ // undefined falls back to the organization's data.gouv.fr page; pass null to render plain, non-linked text
151
+ organizationUrl?: RouteLocationRaw | null
151
152
  showDescription?: boolean
152
153
  titleTag?: TitleTag
153
154
  }
@@ -150,7 +150,8 @@ type Props = {
150
150
  dataset: Dataset | DatasetV2
151
151
  datasetUrl?: RouteLocationRaw
152
152
  datasetUrlInNewTab?: boolean
153
- organizationUrl?: RouteLocationRaw
153
+ // undefined falls back to the organization's data.gouv.fr page; pass null to render plain, non-linked text
154
+ organizationUrl?: RouteLocationRaw | null
154
155
  showDescriptionShort?: boolean
155
156
  titleTag?: TitleTag
156
157
  }
@@ -4,6 +4,7 @@
4
4
  class="-mr-0.5 flex-initial truncate"
5
5
  >
6
6
  <AppLink
7
+ v-if="organizationUrl !== null"
7
8
  class="link text-sm overflow-hidden flex items-center relative z-[2] truncate"
8
9
  :to="organizationUrl || organization.page"
9
10
  >
@@ -12,6 +13,16 @@
12
13
  size="sm"
13
14
  />
14
15
  </AppLink>
16
+ <span
17
+ v-else
18
+ class="text-sm overflow-hidden flex items-center truncate"
19
+ >
20
+ <OrganizationNameWithCertificate
21
+ :organization
22
+ size="sm"
23
+ color-class="text-gray-title"
24
+ />
25
+ </span>
15
26
  </div>
16
27
  <div
17
28
  v-else-if="ownerName"
@@ -33,7 +44,8 @@ import OrganizationNameWithCertificate from './OrganizationNameWithCertificate.v
33
44
  const props = defineProps<{
34
45
  organization?: OrganizationReference | null
35
46
  owner?: UserReference | null
36
- organizationUrl?: RouteLocationRaw
47
+ // undefined falls back to organization.page; pass null to render plain, non-linked text
48
+ organizationUrl?: RouteLocationRaw | null
37
49
  }>()
38
50
 
39
51
  const ownerName = computed(() => {
@@ -100,8 +100,9 @@ const props = withDefaults(defineProps<{
100
100
  /**
101
101
  * The organizationUrl is an optional route location object to allow Vue Router to navigate to the details of the organization linked to tha reuse.
102
102
  * It is used as a separate prop to allow other sites using the package to define their own organization pages.
103
+ * Pass null instead of a route to render the organization name as plain, non-linked text.
103
104
  */
104
- organizationUrl?: RouteLocationRaw
105
+ organizationUrl?: RouteLocationRaw | null
105
106
 
106
107
  titleTag?: TitleTag
107
108
  }>(), {
@@ -73,7 +73,8 @@ import ObjectCardBadge from './ObjectCardBadge.vue'
73
73
  defineProps<{
74
74
  reuse: Reuse | ReuseV2
75
75
  reuseUrl?: RouteLocationRaw
76
- organizationUrl?: RouteLocationRaw
76
+ // undefined falls back to the organization's data.gouv.fr page; pass null to render plain, non-linked text
77
+ organizationUrl?: RouteLocationRaw | null
77
78
  }>()
78
79
 
79
80
  const { t } = useTranslation()
@@ -35,6 +35,7 @@
35
35
  <ObjectCardOwner
36
36
  :organization="topic.organization"
37
37
  :owner="topic.owner"
38
+ :organization-url="organizationUrl"
38
39
  />
39
40
  <RiSubtractLine
40
41
  v-if="(topic.organization || topic.owner) && topic.last_modified"
@@ -124,6 +125,7 @@ type TopicWithStats = TopicV2 & {
124
125
  withDefaults(defineProps<{
125
126
  topic: TopicWithStats
126
127
  topicUrl?: RouteLocationRaw
128
+ organizationUrl?: RouteLocationRaw | null
127
129
  showLogo?: boolean
128
130
  showStats?: boolean
129
131
  }>(), {