@datagouv/components-next 1.0.2-dev.242 → 1.0.2-dev.243

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,6 +1,6 @@
1
1
  import { n as e } from "./config-jrnuUDOH.js";
2
2
  import { o as t, t as n } from "./PreviewUnavailable-BJkpCiyL.js";
3
- import { l as r } from "./resources-DN6Ls91N.js";
3
+ import { l as r } from "./resources-CmwQ4DAB.js";
4
4
  import { computed as i, createBlock as a, createElementBlock as o, createTextVNode as s, defineComponent as c, openBlock as l, ref as u, toDisplayString as d, unref as f, withCtx as p } from "vue";
5
5
  //#region src/components/ResourceAccordion/ImagePreview.client.vue?vue&type=script&setup=true&lang.ts
6
6
  var m = { class: "text-xs" }, h = ["src"], g = /* @__PURE__ */ c({
@@ -1,5 +1,5 @@
1
1
  import { n as e } from "./config-jrnuUDOH.js";
2
- import { t } from "./PreviewWrapper-DpskvwX9.js";
2
+ import { t } from "./PreviewWrapper-DEl1D2rR.js";
3
3
  import { createBlock as n, createVNode as r, defineAsyncComponent as i, defineComponent as a, openBlock as o, unref as s, withCtx as c } from "vue";
4
4
  //#endregion
5
5
  //#region src/components/ResourceAccordion/JsonPreview.client.vue
@@ -1,6 +1,6 @@
1
1
  import { n as e } from "./config-jrnuUDOH.js";
2
2
  import { t } from "./PdfSkeleton-5HBfBlXx.js";
3
- import { t as n } from "./PreviewWrapper-DpskvwX9.js";
3
+ import { t as n } from "./PreviewWrapper-DEl1D2rR.js";
4
4
  import { Fragment as r, createBlock as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, onBeforeUnmount as u, openBlock as d, ref as f, renderList as p, unref as m, withCtx as h } from "vue";
5
5
  //#region ../node_modules/pdfjs-dist/build/pdf.mjs
6
6
  var g = {};
@@ -1,5 +1,5 @@
1
1
  import { o as e, t } from "./PreviewUnavailable-BJkpCiyL.js";
2
- import { l as n, s as r } from "./resources-DN6Ls91N.js";
2
+ import { l as n, s as r } from "./resources-CmwQ4DAB.js";
3
3
  import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, defineComponent as u, nextTick as d, normalizeClass as f, onMounted as p, openBlock as m, ref as h, renderSlot as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
4
4
  //#region src/components/ResourceAccordion/PreviewWrapper.vue?vue&type=script&setup=true&lang.ts
5
5
  var b = { class: "text-gray-medium" }, x = /* @__PURE__ */ u({
@@ -1,6 +1,6 @@
1
1
  import { o as e } from "./rolldown-runtime-CEFd7nDs.js";
2
2
  import { n as t } from "./config-jrnuUDOH.js";
3
- import { t as n } from "./PreviewWrapper-DpskvwX9.js";
3
+ import { t as n } from "./PreviewWrapper-DEl1D2rR.js";
4
4
  import { createBlock as r, createVNode as i, defineAsyncComponent as a, defineComponent as o, openBlock as s, unref as c, withCtx as l } from "vue";
5
5
  //#endregion
6
6
  //#region src/components/ResourceAccordion/XmlPreview.client.vue
@@ -2,7 +2,7 @@ import { o as e, r as t, t as n } from "./rolldown-runtime-CEFd7nDs.js";
2
2
  import { a as r, c as i, d as a, f as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./france-Ub9ufuh4.js";
3
3
  import { $ as _, A as v, B as y, C as b, Ct as x, D as S, E as C, F as w, G as T, H as ee, I as te, J as ne, K as E, L as re, M as ie, N as ae, O as oe, P as se, Q as ce, R as le, S as ue, St as de, T as fe, U as pe, V as me, W as he, X as ge, Y as _e, Z as ve, _t as ye, at as be, b as xe, bt as Se, c as Ce, ct as we, d as Te, dt as Ee, et as De, f as Oe, g as ke, gt as Ae, h as je, ht as Me, i as Ne, it as Pe, j as Fe, k as Ie, l as Le, lt as Re, m as ze, mt as Be, n as Ve, nt as He, o as Ue, ot as We, p as Ge, pt as Ke, q as qe, r as Je, rt as Ye, s as Xe, st as Ze, t as Qe, tt as $e, u as et, ut as tt, v as nt, vt as rt, w as it, x as at, xt as ot, y as st, yt as ct, z as lt } from "./config-jrnuUDOH.js";
4
4
  import { a as ut, i as dt, n as ft, o as D, r as pt, t as mt } from "./PreviewUnavailable-BJkpCiyL.js";
5
- import { _ as ht, a as gt, c as _t, d as vt, f as yt, g as bt, h as xt, i as St, l as Ct, m as wt, n as Tt, o as Et, p as Dt, r as Ot, s as kt, t as At, u as jt, v as Mt, y as Nt } from "./resources-DN6Ls91N.js";
5
+ import { _ as ht, a as gt, c as _t, d as vt, f as yt, g as bt, h as xt, i as St, l as Ct, m as wt, n as Tt, o as Et, p as Dt, r as Ot, s as kt, t as At, u as jt, v as Mt, y as Nt } from "./resources-CmwQ4DAB.js";
6
6
  import { t as Pt } from "./PdfSkeleton-5HBfBlXx.js";
7
7
  import * as Ft from "vue";
8
8
  import { Comment as It, Fragment as O, Suspense as Lt, Teleport as Rt, Transition as zt, cloneVNode as Bt, computed as k, createBlock as A, createCommentVNode as j, createElementBlock as M, createElementVNode as N, createSlots as Vt, createStaticVNode as Ht, createTextVNode as P, createVNode as F, customRef as Ut, defineAsyncComponent as Wt, defineComponent as I, getCurrentInstance as Gt, getCurrentScope as Kt, guardReactiveProps as qt, h as Jt, inject as Yt, isRef as Xt, isVNode as Zt, mergeModels as Qt, mergeProps as $t, nextTick as en, normalizeClass as L, normalizeProps as tn, normalizeStyle as nn, onBeforeUnmount as rn, onMounted as an, onScopeDispose as on, onUnmounted as sn, openBlock as R, provide as cn, reactive as ln, readonly as un, ref as z, renderList as dn, renderSlot as B, resolveComponent as fn, resolveDynamicComponent as pn, shallowReactive as mn, shallowReadonly as hn, shallowRef as gn, toDisplayString as V, toHandlers as _n, toRaw as vn, toRef as yn, toRefs as bn, toValue as xn, triggerRef as Sn, unref as H, useAttrs as Cn, useId as wn, useModel as Tn, useSlots as En, useTemplateRef as Dn, vModelDynamic as On, vModelSelect as kn, vModelText as An, vShow as jn, watch as Mn, watchEffect as Nn, withAsyncContext as Pn, withCtx as U, withDirectives as Fn, withKeys as In, withModifiers as Ln } from "vue";
@@ -41263,7 +41263,7 @@ var EJ = {
41263
41263
  "www:link-1.0-http--partners",
41264
41264
  "www:link-1.0-http--related",
41265
41265
  "www:link-1.0-http--samples"
41266
- ], n = e, r = Ve(), i = Wt(() => import("./MapContainer.client-UC7wQOBj.js")), a = Wt(() => import("./Pmtiles.client-CTXTfoSy.js")), o = Wt(() => import("./JsonPreview.client-CQmiZNR3.js")), c = Wt(() => import("./PdfPreview.client-CYLNkdDs.js")), l = Wt(() => import("./XmlPreview.client-CxoZAOzG.js")), u = Wt(() => import("./ImagePreview.client-CBWWHzl0.js")), f = Wt(() => import("./Datafair.client-DV0kxqBW.js")), { t: p } = D(), m = xM(), h = k(() => {
41266
+ ], n = e, r = Ve(), i = Wt(() => import("./MapContainer.client-UC7wQOBj.js")), a = Wt(() => import("./Pmtiles.client-CTXTfoSy.js")), o = Wt(() => import("./JsonPreview.client-DcnN7kTh.js")), c = Wt(() => import("./PdfPreview.client-D-jPm4dP.js")), l = Wt(() => import("./XmlPreview.client-WnIR6jRO.js")), u = Wt(() => import("./ImagePreview.client-0mW3sY5X.js")), f = Wt(() => import("./Datafair.client-DV0kxqBW.js")), { t: p } = D(), m = xM(), h = k(() => {
41267
41267
  let e = n.resource.format?.toLowerCase();
41268
41268
  return e === "json" || e === "pdf" || e === "xml" || ht(e);
41269
41269
  }), g = k(() => m(n.resource)), _ = k(() => n.resource.extras["analysis:parsing:pmtiles_url"] || n.resource.format === "pmtiles"), v = k(() => bt(n.resource) ? p("Vous ne pouvez pas modifier cette ressource car elle est synchronisée avec cartes.gouv.fr") : null), y = k(() => Ka(n.dataset.organization) && n.resource.extras.datafairEmbed), x = k(() => Ka(n.dataset.organization) && n.resource.extras.apidocUrl), S = k(() => jt(n.resource.format) ? n.resource.format : p("Fichier")), C = k(() => St(n.resource)), w = k(() => C.value === "wms"), T = z(n.expandedOnMount), ee = () => {
@@ -47219,7 +47219,7 @@ var T$ = { style: {
47219
47219
  }
47220
47220
  },
47221
47221
  async setup(e) {
47222
- let t, n, r = Wt(() => import("./JsonPreview.client-CQmiZNR3.js")), i = Wt(() => import("./PdfPreview.client-CYLNkdDs.js")), a = Wt(() => import("./XmlPreview.client-CxoZAOzG.js")), o = Wt(() => import("./ImagePreview.client-CBWWHzl0.js")), s = Wt(() => import("./Datafair.client-DV0kxqBW.js")), c = Wt(() => import("./MapContainer.client-UC7wQOBj.js")), u = Wt(() => import("./Pmtiles.client-CTXTfoSy.js")), d = e, { t: p } = D(), m = Ve(), h = f(), g = l(), { previewKind: _, hasTabularData: v, hasPmtiles: y, hasPmtilesError: b, pmtilesError: x, ogcWms: S, tabsOptions: C } = CM(() => d.resource, () => d.dataset);
47222
+ let t, n, r = Wt(() => import("./JsonPreview.client-DcnN7kTh.js")), i = Wt(() => import("./PdfPreview.client-D-jPm4dP.js")), a = Wt(() => import("./XmlPreview.client-WnIR6jRO.js")), o = Wt(() => import("./ImagePreview.client-0mW3sY5X.js")), s = Wt(() => import("./Datafair.client-DV0kxqBW.js")), c = Wt(() => import("./MapContainer.client-UC7wQOBj.js")), u = Wt(() => import("./Pmtiles.client-CTXTfoSy.js")), d = e, { t: p } = D(), m = Ve(), h = f(), g = l(), { previewKind: _, hasTabularData: v, hasPmtiles: y, hasPmtilesError: b, pmtilesError: x, ogcWms: S, tabsOptions: C } = CM(() => d.resource, () => d.dataset);
47223
47223
  v.value && ([t, n] = Pn(() => Jj(() => d.resource.id)), await t, n());
47224
47224
  let w = z(""), T = k(() => {
47225
47225
  let e = C.value.findIndex((e) => e.key === h.query.tab);
@@ -262,7 +262,8 @@ function H(e, t) {
262
262
  return `${e.page}${V(t) ? "/community-resources" : ""}?resource_id=${t.id}`;
263
263
  }
264
264
  function U(e) {
265
- return e.geopf?.push_status != null || typeof e.geopf?.offering_id == "string";
265
+ let t = e.geopf?.push_status;
266
+ return t === "pending" || t === "done" || typeof e.geopf?.offering_id == "string";
266
267
  }
267
268
  function W(e, t, n) {
268
269
  return n ? n(t) : H(e, t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datagouv/components-next",
3
- "version": "1.0.2-dev.242",
3
+ "version": "1.0.2-dev.243",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -180,7 +180,9 @@ export function getResourceExternalUrl(dataset: Dataset | DatasetV2 | Omit<Datas
180
180
  }
181
181
 
182
182
  export function isGeopfSynced(resource: Resource | CommunityResource): boolean {
183
- return resource.geopf?.push_status != null || typeof resource.geopf?.offering_id === 'string'
183
+ // 'error'/'timeout' produce no stored_data on cartes.gouv.fr so a failed push leaves nothing to protect.
184
+ const pushStatus = resource.geopf?.push_status
185
+ return pushStatus === 'pending' || pushStatus === 'done' || typeof resource.geopf?.offering_id === 'string'
184
186
  }
185
187
 
186
188
  export function resolveResourceExternalUrl<R extends Resource | CommunityResource>(