@datagouv/components-next 1.0.2-dev.194 → 1.0.2-dev.195

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,5 +1,5 @@
1
1
  import { defineComponent as u, computed as a, openBlock as t, createElementBlock as o, createElementVNode as l, createBlock as f, withCtx as p, createTextVNode as m, toDisplayString as _, unref as x } from "vue";
2
- import { a as h, d as v } from "./main-dOC1WJIR.js";
2
+ import { a as h, d as v } from "./main-B3IzELg_.js";
3
3
  const g = { class: "fr-text--xs" }, b = { key: 0 }, k = ["src"], B = /* @__PURE__ */ u({
4
4
  __name: "Datafair.client",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as _, ref as y, computed as o, openBlock as t, createElementBlock as u, createBlock as p, withCtx as f, createTextVNode as m, toDisplayString as d, unref as l } from "vue";
2
- import { a as z, u as T, b as k, d as h } from "./main-dOC1WJIR.js";
2
+ import { a as z, u as T, b as k, d as h } from "./main-B3IzELg_.js";
3
3
  const w = { class: "text-xs" }, B = ["src"], E = /* @__PURE__ */ _({
4
4
  __name: "ImagePreview.client",
5
5
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as c, defineAsyncComponent as u, openBlock as m, createBlock as p, unref as r, withCtx as f, createVNode as l } from "vue";
2
- import { u as d } from "./main-dOC1WJIR.js";
3
- import { _ as h } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-BkPS3zke.js";
2
+ import { u as d } from "./main-B3IzELg_.js";
3
+ import { _ as h } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-CNDEB-3x.js";
4
4
  const J = /* @__PURE__ */ c({
5
5
  __name: "JsonPreview.client",
6
6
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as E, useTemplateRef as G, ref as W, onMounted as z, openBlock as u, createBlock as B, withCtx as N, createTextVNode as V, toDisplayString as q, unref as A, createElementBlock as D } from "vue";
2
- import { a as F, d as O } from "./main-dOC1WJIR.js";
2
+ import { a as F, d as O } from "./main-B3IzELg_.js";
3
3
  const Z = /* @__PURE__ */ E({
4
4
  __name: "MapContainer.client",
5
5
  props: {
@@ -24,7 +24,7 @@ const Z = /* @__PURE__ */ E({
24
24
  import("./Tile-CSpn0Ca8.js").then((t) => t.d),
25
25
  import("./OSM-CcrUhItr.js"),
26
26
  // @ts-expect-error no types provided
27
- import("./index-DWuJwKzS.js")
27
+ import("./index-WRb99DNu.js")
28
28
  ]), { CRS: _, GeoportalAttribution: S, GeoportalFullScreen: g, GeoportalZoom: b, LayerImport: v, LayerSwitcher: L } = C;
29
29
  await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), await Promise.resolve({ }), _.load(), e = new s({
30
30
  target: a.value,
@@ -12,8 +12,8 @@ var bZ = (R, l, U, Z) => ({
12
12
  }
13
13
  });
14
14
  import { defineComponent as Rd, ref as Nd, onBeforeUnmount as sd, openBlock as LU, createBlock as bd, unref as nd, withCtx as nZ, createElementVNode as kU, normalizeClass as ad, createElementBlock as aZ, Fragment as hd, renderList as md, createVNode as id } from "vue";
15
- import { _ as Md } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-BkPS3zke.js";
16
- import { u as Jd, _ as Gd } from "./main-dOC1WJIR.js";
15
+ import { _ as Md } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-CNDEB-3x.js";
16
+ import { u as Jd, _ as Gd } from "./main-B3IzELg_.js";
17
17
  var ZU = {};
18
18
  ZU.d = (R, l) => {
19
19
  for (var U in l)
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as S0, ref as P0, computed as qc, useTemplateRef as I0, onMounted as E0, openBlock as vh, createElementBlock as ip, createBlock as M0, withCtx as Gm, createTextVNode as $m, toDisplayString as Wc, unref as _s, createElementVNode as Za, createVNode as A0, createCommentVNode as C0 } from "vue";
2
- import { g as D0, a as z0, e as R0, u as k0, f as L0, h as F0, d as O0, i as B0, j as N0, Q as j0, t as V0 } from "./main-dOC1WJIR.js";
2
+ import { g as D0, a as z0, e as R0, u as k0, f as L0, h as F0, d as O0, i as B0, j as N0, Q as j0, t as V0 } from "./main-B3IzELg_.js";
3
3
  var un = Uint8Array, Fl = Uint16Array, U0 = Int32Array, lg = new un([
4
4
  0,
5
5
  0,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as C, ref as v, computed as y, onMounted as S, nextTick as w, openBlock as a, createElementBlock as b, normalizeClass as B, renderSlot as x, createElementVNode as _, toDisplayString as i, unref as t, createBlock as s, withCtx as n, createTextVNode as u, createCommentVNode as E } from "vue";
2
- import { a as L, b as N, c as R, d as c } from "./main-dOC1WJIR.js";
2
+ import { a as L, b as N, c as R, d as c } from "./main-B3IzELg_.js";
3
3
  const V = { class: "text-gray-medium" }, F = /* @__PURE__ */ C({
4
4
  __name: "PreviewWrapper",
5
5
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as i, defineAsyncComponent as m, openBlock as u, createBlock as f, unref as t, withCtx as l, createVNode as p } from "vue";
2
- import { u as x } from "./main-dOC1WJIR.js";
3
- import { _ as w } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-BkPS3zke.js";
2
+ import { u as x } from "./main-B3IzELg_.js";
3
+ import { _ as w } from "./PreviewWrapper.vue_vue_type_script_setup_true_lang-CNDEB-3x.js";
4
4
  const X = /* @__PURE__ */ i({
5
5
  __name: "XmlPreview.client",
6
6
  props: {
@@ -8,7 +8,7 @@ const X = /* @__PURE__ */ i({
8
8
  },
9
9
  setup(r) {
10
10
  const o = m(
11
- () => import("./vue3-xml-viewer.common-D1KbuT3v.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
11
+ () => import("./vue3-xml-viewer.common-AEbzQxXP.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
12
12
  ), n = r, s = x(), c = async () => {
13
13
  const e = await fetch(n.resource.url);
14
14
  if (!e.ok) throw new Error(`HTTP error! status: ${e.status}`);
@@ -1,4 +1,4 @@
1
- import { A as e, l as t, m as r, n as o, o as i, p as n, q as c, r as l, j as b, C as u, s as g, v as T, D as d, w as C, x as p, y as m, z as S, B as D, E as R, F as O, G as E, H as f, I, J as y, K as h, L as A, M, N as P, O as v, P as F, R as L, S as z, T as w, U as G, V as _, W as N, X as U, Y as H, Z as k, $ as x, a0 as B, a1 as Q, a2 as V, a3 as j, a4 as W, a5 as Y, a6 as X, a7 as q, a8 as Z, a9 as J, aa as K, ab as $, ac as aa, ad as sa, ae as ea, af as ta, ag as ra, ah as oa, ai as ia, aj as na, ak as ca, al as la, am as ba, an as ua, ao as ga, ap as Ta, aq as da, ar as Ca, as as pa, at as ma, au as Sa, av as Da, aw as Ra, ax as Oa, ay as Ea, az as fa, aA as Ia, aB as ya, aC as ha, aD as Aa, aE as Ma, aF as Pa, aG as va, aH as Fa, aI as La, aJ as za, aK as wa, aL as Ga, aM as _a, aN as Na, aO as Ua, aP as Ha, aQ as ka, aR as xa, aS as Ba, aT as Qa, aU as Va, aV as ja, aW as Wa, aX as Ya, aY as Xa, aZ as qa, a_ as Za, a$ as Ja, b0 as Ka, b1 as $a, b2 as as, b3 as ss, b4 as es, b5 as ts, b6 as rs, b7 as os, b8 as is, b9 as ns, ba as cs, bb as ls, bc as bs, bd as us, be as gs, bf as Ts, bg as ds, bh as Cs, bi as ps, bj as ms, bk as Ss, bl as Ds, bm as Rs, bn as Os, bo as Es, bp as fs, bq as Is, br as ys, bs as hs, bt as As, bu as Ms, bv as Ps, bw as vs, bx as Fs, by as Ls, bz as zs, h as ws, f as Gs, bA as _s, bB as Ns, c as Us, bC as Hs, b as ks, bD as xs, bE as Bs, bF as Qs, bG as Vs, bH as js, bI as Ws, bJ as Ys, bK as Xs, bL as qs, bM as Zs, bN as Js, bO as Ks, bP as $s, bQ as ae, bR as se, bS as ee, bT as te, bU as re, bV as oe, bW as ie, bX as ne, bY as ce, bZ as le, b_ as be, b$ as ue, c0 as ge, c1 as Te, c1 as de, c2 as Ce, c3 as pe, c4 as me, c5 as Se, c6 as De, t as Re, c7 as Oe, c8 as Ee, c9 as fe, ca as Ie, cb as ye, u as he, cc as Ae, cd as Me, ce as Pe, e as ve, cf as Fe, cg as Le, ch as ze, ci as we, cj as Ge, ck as _e, cl as Ne, cm as Ue, cn as He, co as ke, cp as xe, cq as Be, a as Qe } from "./main-dOC1WJIR.js";
1
+ import { A as e, l as t, m as r, n as o, o as i, p as n, q as c, r as l, j as b, C as u, s as g, v as T, D as d, w as C, x as p, y as m, z as S, B as D, E as R, F as O, G as E, H as f, I, J as y, K as h, L as A, M, N as P, O as v, P as F, R as L, S as z, T as w, U as G, V as _, W as N, X as U, Y as H, Z as k, $ as x, a0 as B, a1 as Q, a2 as V, a3 as j, a4 as W, a5 as Y, a6 as X, a7 as q, a8 as Z, a9 as J, aa as K, ab as $, ac as aa, ad as sa, ae as ea, af as ta, ag as ra, ah as oa, ai as ia, aj as na, ak as ca, al as la, am as ba, an as ua, ao as ga, ap as Ta, aq as da, ar as Ca, as as pa, at as ma, au as Sa, av as Da, aw as Ra, ax as Oa, ay as Ea, az as fa, aA as Ia, aB as ya, aC as ha, aD as Aa, aE as Ma, aF as Pa, aG as va, aH as Fa, aI as La, aJ as za, aK as wa, aL as Ga, aM as _a, aN as Na, aO as Ua, aP as Ha, aQ as ka, aR as xa, aS as Ba, aT as Qa, aU as Va, aV as ja, aW as Wa, aX as Ya, aY as Xa, aZ as qa, a_ as Za, a$ as Ja, b0 as Ka, b1 as $a, b2 as as, b3 as ss, b4 as es, b5 as ts, b6 as rs, b7 as os, b8 as is, b9 as ns, ba as cs, bb as ls, bc as bs, bd as us, be as gs, bf as Ts, bg as ds, bh as Cs, bi as ps, bj as ms, bk as Ss, bl as Ds, bm as Rs, bn as Os, bo as Es, bp as fs, bq as Is, br as ys, bs as hs, bt as As, bu as Ms, bv as Ps, bw as vs, bx as Fs, by as Ls, bz as zs, h as ws, f as Gs, bA as _s, bB as Ns, c as Us, bC as Hs, b as ks, bD as xs, bE as Bs, bF as Qs, bG as Vs, bH as js, bI as Ws, bJ as Ys, bK as Xs, bL as qs, bM as Zs, bN as Js, bO as Ks, bP as $s, bQ as ae, bR as se, bS as ee, bT as te, bU as re, bV as oe, bW as ie, bX as ne, bY as ce, bZ as le, b_ as be, b$ as ue, c0 as ge, c1 as Te, c1 as de, c2 as Ce, c3 as pe, c4 as me, c5 as Se, c6 as De, t as Re, c7 as Oe, c8 as Ee, c9 as fe, ca as Ie, cb as ye, u as he, cc as Ae, cd as Me, ce as Pe, e as ve, cf as Fe, cg as Le, ch as ze, ci as we, cj as Ge, ck as _e, cl as Ne, cm as Ue, cn as He, co as ke, cp as xe, cq as Be, a as Qe } from "./main-B3IzELg_.js";
2
2
  export {
3
3
  e as AI_SUGGESTION_MIN_DESCRIPTION_LENGTH,
4
4
  t as ASSOCIATION,
@@ -6,7 +6,7 @@ import { a as TileGrid, U as UrlTile, e as extentFromProjection, c as createXYZ,
6
6
  import { D as DEFAULT_MAX_ZOOM, a as assert, f as forEach, i as intersectsLineString, b as intersectsLineStringArray, l as linearRingssContainsXY, c as intersectsLinearRingMultiArray, d as compose, e as create, g as apply, s as setFromArray, m as multiply, h as scale, r as reset, t as translate } from "./common-BoeTUnDZ.js";
7
7
  import { R as RBush$1, C as Collection, a as CollectionEventType, b as asColorLike, d as defaultFillStyle, c as defaultStrokeStyle, e as defaultLineCap, f as defaultLineDash, g as defaultLineDashOffset, h as defaultLineJoin, i as defaultLineWidth, j as defaultMiterLimit, k as defaultStrokeOffset, l as defaultPadding, m as defaultTextBaseline, n as defaultTextAlign, o as defaultFont, r as registerFont, p as getTextDimensions, q as drawImageOrLabel, s as measureAndCacheTextWidth, I as Icon, B as BaseVectorLayer, P as PointerInteraction, t as noModifierKeys, u as always, v as shiftKeyOnly, w as InteractionProperty, M as MapBrowserEventType, x as MapBrowserEvent, y as never, z as createEditingStyle, A as primaryAction, D as altKeyOnly, E as singleClick, F as Interaction, G as Fill, S as Stroke, T as Text, H as Style$1, J as CircleStyle, K as checkedFonts, L as Map$1, N as pointerMove, O as ImageStyle, Q as Attribution, Z as Zoom, U as MapProperty } from "./Map-BfqKMw0S.js";
8
8
  import { S as SimpleGeometry, m as maxSquaredDelta, a as assignClosestPoint, i as inflateCoordinates, d as douglasPeucker, b as deflateCoordinates, c as arrayMaxSquaredDelta, e as assignClosestArrayPoint, f as inflateCoordinatesArray, g as douglasPeuckerArray, h as deflateCoordinatesArray, P as Point$1, j as multiArrayMaxSquaredDelta, k as assignClosestMultiArrayPoint, l as linearRingss$1, o as orientLinearRingsArray, n as inflateMultiCoordinatesArray, p as getInteriorPointsOfMultiArray, q as linearRingssAreOriented, r as quantizeMultiArray, s as Polygon, t as deflateMultiCoordinatesArray, u as getInteriorPointOfArray, v as inflateEnds, w as transform2D, x as quantizeArray, y as deflateCoordinate, z as rotate, A as snap, B as transformGeom2D, V as ViewHint, G as Geometry, C as getStrideForLayout, D as linearRingsAreOriented, E as orientLinearRings, F as getLayoutForStride, H as circular, L as LinearRing, I as View, J as ViewProperty, K as fromExtent } from "./View-BYBpt-AU.js";
9
- import { k as commonjsGlobal, g as getDefaultExportFromCjs$1 } from "./main-dOC1WJIR.js";
9
+ import { k as commonjsGlobal, g as getDefaultExportFromCjs$1 } from "./main-B3IzELg_.js";
10
10
  import { R as RenderEventType, a as asArray, B as BaseLayer } from "./Event-iXDrp-fy.js";
11
11
  import { Z as ZIndexContext, C as CanvasLayerRenderer, c as canvasPool$1, T as TileLayer, a as CanvasTileLayerRenderer, b as TileProperty } from "./Tile-CSpn0Ca8.js";
12
12
  function padNumber(i, e, t) {
@@ -1,4 +1,4 @@
1
- import { g as qo } from "./main-dOC1WJIR.js";
1
+ import { g as qo } from "./main-B3IzELg_.js";
2
2
  function jo(Vt, qt) {
3
3
  for (var l = 0; l < qt.length; l++) {
4
4
  const it = qt[l];
@@ -52421,7 +52421,7 @@ const VU = { class: "space-y-1 py-6" }, SU = { class: "flex items-center space-x
52421
52421
  const t = e, i = J(null);
52422
52422
  return J1(async () => {
52423
52423
  await Promise.resolve({ });
52424
- const r = await import("./leaflet-src-DiG78UoJ.js").then((a) => a.l);
52424
+ const r = await import("./leaflet-src-DJeNmzLc.js").then((a) => a.l);
52425
52425
  if (!i.value) return;
52426
52426
  const n = r.map(i.value);
52427
52427
  r.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
@@ -59907,7 +59907,7 @@ const XK = {
59907
59907
  canEdit: { type: Boolean, default: !1 }
59908
59908
  },
59909
59909
  setup(e) {
59910
- const t = ["url", "doi", "www:link", " www:link-1.0-http--link", "www:link-1.0-http--partners", "www:link-1.0-http--related", "www:link-1.0-http--samples"], i = e, r = V2(), n = nt(() => import("./MapContainer.client-CV5ZRvvr.js")), l = nt(() => import("./Pmtiles.client-DAp930rV.js")), a = nt(() => import("./JsonPreview.client-Dqioe7mC.js")), c = nt(() => import("./PdfPreview.client-XFmjFK8r.js")), u = nt(() => import("./XmlPreview.client-zetBGS4F.js")), h = nt(() => import("./ImagePreview.client-DCzPQ-xK.js")), d = nt(() => import("./Datafair.client-Drn-ygd-.js")), { t: p } = x1(), C = xm(), g = A(() => {
59910
+ const t = ["url", "doi", "www:link", " www:link-1.0-http--link", "www:link-1.0-http--partners", "www:link-1.0-http--related", "www:link-1.0-http--samples"], i = e, r = V2(), n = nt(() => import("./MapContainer.client-D5ZOWzlJ.js")), l = nt(() => import("./Pmtiles.client-DWfTeeOk.js")), a = nt(() => import("./JsonPreview.client-BO4FYlVq.js")), c = nt(() => import("./PdfPreview.client-Cal_OaFX.js")), u = nt(() => import("./XmlPreview.client-C8GN6y1u.js")), h = nt(() => import("./ImagePreview.client-DVAf75eI.js")), d = nt(() => import("./Datafair.client-w30urimy.js")), { t: p } = x1(), C = xm(), g = A(() => {
59911
59911
  const C1 = i.resource.format?.toLowerCase();
59912
59912
  return C1 === "json" || C1 === "pdf" || C1 === "xml" || N6(C1);
59913
59913
  }), m = A(() => C(i.resource)), f = A(() => i.resource.extras["analysis:parsing:pmtiles_url"] || i.resource.format === "pmtiles"), L = A(() => ts(i.dataset.organization) && i.resource.extras.datafairEmbed), y = A(() => ts(i.dataset.organization) && i.resource.extras.apidocUrl), H = A(() => _r(i.resource.format) ? i.resource.format : p("Fichier")), V = A(() => mm(i.resource)), z = A(() => V.value === "wms"), M = J(i.expandedOnMount), b = () => {
@@ -60753,7 +60753,7 @@ function _X(e, t, i) {
60753
60753
  const m = e.value?.profile;
60754
60754
  if (!m) return "text";
60755
60755
  const f = m.columns[g];
60756
- return f ? cL(f, m.categorical?.includes(g) ?? !1) : "text";
60756
+ return f ? cL(f, m.categorical.includes(g)) : "text";
60757
60757
  }
60758
60758
  const c = A(() => {
60759
60759
  const g = {};
@@ -62520,19 +62520,19 @@ const RX = { class: "flex min-h-0 flex-1 flex-col" }, TX = { class: "text-xs bre
62520
62520
  async setup(e) {
62521
62521
  let t, i;
62522
62522
  const r = nt(
62523
- () => import("./JsonPreview.client-Dqioe7mC.js")
62523
+ () => import("./JsonPreview.client-BO4FYlVq.js")
62524
62524
  ), n = nt(
62525
- () => import("./PdfPreview.client-XFmjFK8r.js")
62525
+ () => import("./PdfPreview.client-Cal_OaFX.js")
62526
62526
  ), l = nt(
62527
- () => import("./XmlPreview.client-zetBGS4F.js")
62527
+ () => import("./XmlPreview.client-C8GN6y1u.js")
62528
62528
  ), a = nt(
62529
- () => import("./ImagePreview.client-DCzPQ-xK.js")
62529
+ () => import("./ImagePreview.client-DVAf75eI.js")
62530
62530
  ), c = nt(
62531
- () => import("./Datafair.client-Drn-ygd-.js")
62531
+ () => import("./Datafair.client-w30urimy.js")
62532
62532
  ), u = nt(
62533
- () => import("./MapContainer.client-CV5ZRvvr.js")
62533
+ () => import("./MapContainer.client-D5ZOWzlJ.js")
62534
62534
  ), h = nt(
62535
- () => import("./Pmtiles.client-DAp930rV.js")
62535
+ () => import("./Pmtiles.client-DWfTeeOk.js")
62536
62536
  ), d = e, { t: p } = x1(), C = V2(), g = ws(), m = np(), {
62537
62537
  previewKind: f,
62538
62538
  hasTabularData: L,
@@ -74773,7 +74773,7 @@ function Hs1(e) {
74773
74773
  }
74774
74774
  function Vs1(e) {
74775
74775
  return e.profile.header.map((t) => {
74776
- const i = e.profile.columns[t], r = e.profile.categorical?.includes(t) ?? !1, n = cL(i ?? { python_type: "unknown", format: void 0 }, r), l = n === "year" ? "number" : n, a = e.profile.profile?.[t];
74776
+ const i = e.profile.columns[t], r = e.profile.categorical.includes(t), n = cL(i ?? { python_type: "unknown", format: void 0 }, r), l = n === "year" ? "number" : n, a = e.profile.profile[t];
74777
74777
  return {
74778
74778
  name: t,
74779
74779
  type: l,
@@ -1,4 +1,4 @@
1
- import { g as Ke } from "./main-dOC1WJIR.js";
1
+ import { g as Ke } from "./main-B3IzELg_.js";
2
2
  import We from "vue";
3
3
  function Fe($, 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.194",
3
+ "version": "1.0.2-dev.195",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -24,28 +24,25 @@ export type TabularProfileResponse = {
24
24
  indexes: null
25
25
  }
26
26
 
27
- // Only CSV resources go through csv-detective: for the other formats the API
28
- // indexes (parquet…), the profile is reduced to the column names, their types
29
- // and the row count. Everything csv-detective produces is therefore optional.
30
27
  export type TabularProfile = {
31
28
  header: string[]
32
29
  columns: Record<string, TabularColumnInfo>
30
+ formats: Record<string, string[]>
31
+ profile: Record<string, TabularColumnProfile>
32
+ encoding: string
33
+ separator: string
34
+ categorical: string[]
33
35
  total_lines: number
34
- formats?: Record<string, string[]>
35
- profile?: Record<string, TabularColumnProfile>
36
- encoding?: string
37
- separator?: string
38
- categorical?: string[]
39
- nb_duplicates?: number
40
- columns_fields?: Record<string, TabularColumnInfo>
41
- columns_labels?: Record<string, TabularColumnInfo>
42
- header_row_idx?: number
43
- heading_columns?: number
44
- trailing_columns?: number
36
+ nb_duplicates: number
37
+ columns_fields: Record<string, TabularColumnInfo>
38
+ columns_labels: Record<string, TabularColumnInfo>
39
+ header_row_idx: number
40
+ heading_columns: number
41
+ trailing_columns: number
45
42
  }
46
43
 
47
44
  export type TabularColumnInfo = {
48
- score?: number
45
+ score: number
49
46
  format: string
50
47
  python_type: string
51
48
  }
@@ -38,7 +38,7 @@ export function useColumnMetadata(
38
38
  if (!profile) return 'text'
39
39
  const colInfo = profile.columns[col]
40
40
  if (!colInfo) return 'text'
41
- return resolveColumnType(colInfo, profile.categorical?.includes(col) ?? false)
41
+ return resolveColumnType(colInfo, profile.categorical.includes(col))
42
42
  }
43
43
 
44
44
  const columnTypesMap = computed<Record<string, ColumnType>>(() => {
@@ -72,13 +72,13 @@ export function toChartApi(chartForm: ChartForm): ChartForApi {
72
72
  export function buildColumnsFromProfile(profile: { profile: TabularProfile }): Array<ColumnDefinition> {
73
73
  return profile.profile.header.map((name) => {
74
74
  const colInfo = profile.profile.columns[name]
75
- const isCategorical = profile.profile.categorical?.includes(name) ?? false
75
+ const isCategorical = profile.profile.categorical.includes(name)
76
76
  // The chart stack only branches on 'number' and 'date' (continuous axis,
77
77
  // aggregatable series, time formatting): it has no notion of a year column,
78
78
  // and on an axis a year is a number.
79
79
  const resolvedType = resolveColumnType(colInfo ?? { python_type: 'unknown', format: undefined }, isCategorical)
80
80
  const colType = resolvedType === 'year' ? 'number' : resolvedType
81
- const colProfile = profile.profile.profile?.[name]
81
+ const colProfile = profile.profile.profile[name]
82
82
  return {
83
83
  name,
84
84
  type: colType,