@club-employes/utopia 4.312.0 → 4.313.0

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.
@@ -10,5 +10,6 @@ declare const _default: DefineComponent<DownloadListProps, {}, {}, {}, {}, Compo
10
10
  icon3d: Icon3DName;
11
11
  items: DownloadListItem[];
12
12
  linkText: string;
13
+ skipWindowOpen: boolean;
13
14
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
14
15
  export default _default;
@@ -14,4 +14,9 @@ export interface DownloadListProps {
14
14
  linkText?: string;
15
15
  to?: string;
16
16
  items: DownloadListItem[];
17
+ /**
18
+ * Si true, n'appelle pas window.open après l'emit download.
19
+ * Utile quand le parent gère lui-même le téléchargement (ex. fetch authentifié).
20
+ */
21
+ skipWindowOpen?: boolean;
17
22
  }
package/dist/index.js CHANGED
@@ -45273,12 +45273,14 @@ const IB = ["id"], YB = {
45273
45273
  _: 1
45274
45274
  }),
45275
45275
  g("div", wS, [
45276
- (c(!0), f(_, null, be(e.media, (r) => (c(), T(b(je), {
45277
- key: r.label,
45276
+ (c(!0), f(_, null, be(e.media, (r, i) => (c(), T(b(je), {
45277
+ key: r.url ?? r.label ?? i,
45278
45278
  aspect: "outlined",
45279
45279
  icon: "Download",
45280
45280
  "icon-position": "right",
45281
- onClick: (i) => o("download", r)
45281
+ onClick: (A) => {
45282
+ A.stopPropagation(), o("download", r);
45283
+ }
45282
45284
  }, {
45283
45285
  default: B(() => [
45284
45286
  H(O(r.label), 1)
@@ -45296,7 +45298,7 @@ const IB = ["id"], YB = {
45296
45298
  ])
45297
45299
  ]));
45298
45300
  }
45299
- }), ZE = /* @__PURE__ */ fe(xS, [["__scopeId", "data-v-a8796732"]]), PS = { class: "utopia-download-list__header" }, MS = { class: "utopia-download-list__title-group" }, kS = { class: "utopia-download-list__text-content" }, CS = { class: "utopia-download-list__items" }, OS = { class: "utopia-download-list__item-left" }, BS = { class: "utopia-download-list__item-info" }, TS = {
45301
+ }), ZE = /* @__PURE__ */ fe(xS, [["__scopeId", "data-v-895dfb81"]]), PS = { class: "utopia-download-list__header" }, MS = { class: "utopia-download-list__title-group" }, kS = { class: "utopia-download-list__text-content" }, CS = { class: "utopia-download-list__items" }, OS = { class: "utopia-download-list__item-left" }, BS = { class: "utopia-download-list__item-info" }, TS = {
45300
45302
  key: 0,
45301
45303
  class: "utopia-download-list__item-tags"
45302
45304
  }, DS = ["onClick"], LS = /* @__PURE__ */ ie({
@@ -45308,14 +45310,15 @@ const IB = ["id"], YB = {
45308
45310
  icon3d: { default: "Doc" },
45309
45311
  linkText: { default: "Voir la liste" },
45310
45312
  to: {},
45311
- items: { default: () => [] }
45313
+ items: { default: () => [] },
45314
+ skipWindowOpen: { type: Boolean, default: !1 }
45312
45315
  },
45313
45316
  emits: ["download"],
45314
45317
  setup(e, { emit: t }) {
45315
- const n = t, o = (s) => {
45316
- s.url && (n("download", s), window.open(s.url, "_blank"));
45318
+ const n = e, o = t, s = (a) => {
45319
+ a.url && (o("download", a), n.skipWindowOpen || window.open(a.url, "_blank"));
45317
45320
  };
45318
- return (s, a) => (c(), T(b(qs), {
45321
+ return (a, l) => (c(), T(b(qs), {
45319
45322
  variant: "elevated",
45320
45323
  size: "large",
45321
45324
  class: "utopia-download-list"
@@ -45374,13 +45377,13 @@ const IB = ["id"], YB = {
45374
45377
  class: "utopia-download-list__separator"
45375
45378
  }),
45376
45379
  g("div", CS, [
45377
- (c(!0), f(_, null, be(e.items, (l) => (c(), f("div", {
45378
- key: l.id,
45380
+ (c(!0), f(_, null, be(e.items, (r) => (c(), f("div", {
45381
+ key: r.id,
45379
45382
  class: "utopia-download-list__item"
45380
45383
  }, [
45381
45384
  g("div", OS, [
45382
45385
  z(b(Q), {
45383
- name: l.icon || "File-down",
45386
+ name: r.icon || "File-down",
45384
45387
  color: "brand-primary-500",
45385
45388
  size: "large",
45386
45389
  class: "utopia-download-list__item-doc-icon"
@@ -45392,31 +45395,31 @@ const IB = ["id"], YB = {
45392
45395
  class: "utopia-download-list__item-title"
45393
45396
  }, {
45394
45397
  default: B(() => [
45395
- H(O(l.title), 1)
45398
+ H(O(r.title), 1)
45396
45399
  ]),
45397
45400
  _: 2
45398
45401
  }, 1024),
45399
- l.tags?.length ? (c(), f("div", TS, [
45400
- (c(!0), f(_, null, be(l.tags, (r) => (c(), T(b(Yt), {
45401
- key: r,
45402
+ r.tags?.length ? (c(), f("div", TS, [
45403
+ (c(!0), f(_, null, be(r.tags, (i) => (c(), T(b(Yt), {
45404
+ key: i,
45402
45405
  size: "extra-small",
45403
45406
  ghost: "",
45404
45407
  variant: "secondary",
45405
45408
  disabled: ""
45406
45409
  }, {
45407
45410
  default: B(() => [
45408
- H(O(r), 1)
45411
+ H(O(i), 1)
45409
45412
  ]),
45410
45413
  _: 2
45411
45414
  }, 1024))), 128))
45412
45415
  ])) : M("", !0)
45413
45416
  ])
45414
45417
  ]),
45415
- l.url ? (c(), f("button", {
45418
+ r.url ? (c(), f("button", {
45416
45419
  key: 0,
45417
45420
  type: "button",
45418
45421
  class: "utopia-download-list__download-button",
45419
- onClick: (r) => o(l),
45422
+ onClick: (i) => s(r),
45420
45423
  "aria-label": "Télécharger"
45421
45424
  }, [
45422
45425
  z(b(Q), {
@@ -45431,7 +45434,7 @@ const IB = ["id"], YB = {
45431
45434
  _: 1
45432
45435
  }));
45433
45436
  }
45434
- }), NE = /* @__PURE__ */ fe(LS, [["__scopeId", "data-v-2b36e96a"]]), jS = { class: "utopia-tromboitem__photo-container" }, SS = ["src", "alt"], HS = {
45437
+ }), NE = /* @__PURE__ */ fe(LS, [["__scopeId", "data-v-0670ea97"]]), jS = { class: "utopia-tromboitem__photo-container" }, SS = ["src", "alt"], HS = {
45435
45438
  key: 1,
45436
45439
  class: "utopia-tromboitem__initials"
45437
45440
  }, GS = { class: "utopia-tromboitem__content" }, ES = ["href"], FS = ["href"], IS = /* @__PURE__ */ ie({