@abyss-project/commons-front-core 17.2.1 → 18.1.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +2 -1
  3. package/catalog/captures-plan.ts +120 -116
  4. package/catalog/catalog-entries.ts +149 -148
  5. package/catalog/pages/AppShell.tsx +18 -9
  6. package/catalog/pages/CookieConsent.tsx +54 -31
  7. package/catalog/pages/DeliveryHistory.tsx +14 -1
  8. package/catalog/pages/DeliverySubscriptions.tsx +17 -0
  9. package/catalog/pages/index.ts +166 -165
  10. package/catalog/playwright.ci.config.ts +4 -3
  11. package/catalog/specs/cookie-consent-modal.spec.ts +187 -0
  12. package/dist/CookieConsentSettings-DUoKKRMZ.js +595 -0
  13. package/dist/{Surface-BDfRxVLj.js → Surface-z5TuQzlh.js} +38 -23
  14. package/dist/{Tabs-DEY2HEqj.js → Tabs-C4K0mLME.js} +613 -591
  15. package/dist/components/business/CookieConsent/AbyssCookieConsentProvider.d.ts +11 -3
  16. package/dist/components/business/CookieConsent/CookieConsentBanner.d.ts +4 -3
  17. package/dist/components/business/CookieConsent/CookieConsentPreferences.d.ts +12 -0
  18. package/dist/components/business/CookieConsent/index.d.ts +2 -0
  19. package/dist/components/business/CookieConsent/use-banner-portal.d.ts +36 -0
  20. package/dist/components/business/Deliveries/DeliveryHistory.component.d.ts +4 -3
  21. package/dist/components/business/Deliveries/DeliverySubscriptionForm.d.ts +3 -2
  22. package/dist/components/business/Deliveries/deliveries.logic.d.ts +11 -0
  23. package/dist/components/business/Deliveries/deliveries.types.d.ts +12 -4
  24. package/dist/components/inputs/NumberField/NumberField.d.ts +18 -2
  25. package/dist/components/layers/Toast/toast-clearance.d.ts +5 -0
  26. package/dist/components/structure/AccountMenu/AccountMenu.d.ts +2 -1
  27. package/dist/components/structure/AppShell/SpaceSwitcher.d.ts +4 -2
  28. package/dist/components/structure/AppShell/app-shell.types.d.ts +5 -1
  29. package/dist/components/structure/FilterBar/FilterBar.d.ts +7 -2
  30. package/dist/cookie-consent.js +26 -17
  31. package/dist/{design-theme-Bd0pEPei.js → design-theme-BFkCN7Nz.js} +1 -1
  32. package/dist/{editors-CtkDomwX.js → editors-Eb3PHnxn.js} +27 -27
  33. package/dist/editors.js +1 -1
  34. package/dist/hooks/use-cookie-consent.hook.spec.d.ts +1 -0
  35. package/dist/hooks/use-rich-intl.hook.d.ts +14 -2
  36. package/dist/{index-DtncSsmw.js → index-2lNOK7eK.js} +2 -2
  37. package/dist/{index-CqgMX8kF.js → index-B76nCWpd.js} +2 -2
  38. package/dist/{index-Cl3hwdsZ.js → index-BKRudpMw.js} +2 -2
  39. package/dist/{index-DtpGwH5a.js → index-BaL2x2GW.js} +3 -3
  40. package/dist/{index-CSdO6zlX.js → index-BcO-JFrs.js} +2 -2
  41. package/dist/{index-CEjiERmo.js → index-BlOP01yA.js} +2 -2
  42. package/dist/{index-IVjoNq-p.js → index-Bw4XnSa0.js} +2 -2
  43. package/dist/{index-DnQguWf1.js → index-CFDEfvCD.js} +1 -1
  44. package/dist/{index-FUuoLSZ0.js → index-CQ7z2zKY.js} +4 -4
  45. package/dist/{index-DcV2fWbx.js → index-CRFGogWn.js} +2 -2
  46. package/dist/{index-B9avfa3r.js → index-CUhMNEUo.js} +3 -3
  47. package/dist/{index-psJ1Q-lU.js → index-CWD0waD8.js} +2 -2
  48. package/dist/{index-DKsvuaEj.js → index-CYBvIQsH.js} +3 -3
  49. package/dist/{index-DFZlN4E3.js → index-Ckzcg8qD.js} +4 -4
  50. package/dist/{index-mUtvzoSi.js → index-Ckzmgx9X.js} +3 -3
  51. package/dist/{index-D0EF36wh.js → index-CrZZo4r1.js} +2 -2
  52. package/dist/{index-DZbCUZUp.js → index-CtVoDSIn.js} +2 -2
  53. package/dist/{index-SN7FZBya.js → index-CtkfWhK1.js} +2 -2
  54. package/dist/{index-DVBqUPxf.js → index-DRtBc440.js} +2 -2
  55. package/dist/{index-Ch8JqU5w.js → index-Dqm1dC1j.js} +2 -2
  56. package/dist/{index-BcXqvMY8.js → index-z5ZOXlY8.js} +4 -4
  57. package/dist/index.js +6073 -5920
  58. package/dist/legacy.js +1728 -1707
  59. package/dist/translations/en.d.ts +7 -1
  60. package/dist/translations/fr.d.ts +7 -1
  61. package/dist/utils/cookie-consent-contract.d.ts +55 -0
  62. package/dist/utils/cookie-consent-contract.spec.d.ts +1 -0
  63. package/dist/utils/cookie-storage.utils.d.ts +1 -8
  64. package/dist/utils/index.d.ts +1 -0
  65. package/package.json +5 -5
  66. package/dist/CookieConsentSettings-CtLrSfve.js +0 -505
@@ -1,11 +1,11 @@
1
1
  import { jsx as d, jsxs as C } from "react/jsx-runtime";
2
- import { useId as x, useRef as Y, useState as H, useCallback as X, useMemo as re, forwardRef as ae } from "react";
2
+ import { useId as x, useRef as Y, useState as V, useCallback as X, useMemo as re, forwardRef as ae } from "react";
3
3
  import { useIntl as G } from "react-intl";
4
4
  import ne from "@mui/material/Dialog";
5
5
  import J from "@mui/material/IconButton";
6
6
  import { alpha as se, styled as g, useTheme as le } from "@mui/material/styles";
7
7
  import $ from "@mui/icons-material/Close";
8
- import V from "@mui/material/useMediaQuery";
8
+ import H from "@mui/material/useMediaQuery";
9
9
  import ce from "@mui/material/Modal";
10
10
  import de from "@mui/material/Slide";
11
11
  import { enTranslation as ue, frTranslation as pe } from "@abyss-project/main";
@@ -127,9 +127,9 @@ const ee = {
127
127
  }), ye = (e, t, o = "fast") => t.map(
128
128
  (i) => `${i} ${e.design.durations[o]}ms ${e.design.easings.standard}`
129
129
  ).join(", "), Ee = () => {
130
- const e = V(w.up(R.Desktop), {
130
+ const e = H(w.up(R.Desktop), {
131
131
  noSsr: !0
132
- }), t = V(w.down(R.Tablet), {
132
+ }), t = H(w.down(R.Tablet), {
133
133
  noSsr: !0
134
134
  });
135
135
  return e ? R.Desktop : t ? R.Mobile : R.Tablet;
@@ -222,7 +222,7 @@ function De({
222
222
  closeLabel: r,
223
223
  children: n
224
224
  }) {
225
- const h = le(), v = G(), y = x(), f = Y(null), A = Y(null), [E, N] = H(0), [u, l] = H(!1), s = (T) => {
225
+ const h = le(), v = G(), y = x(), f = Y(null), A = Y(null), [E, N] = V(0), [u, l] = V(!1), s = (T) => {
226
226
  T.currentTarget.setPointerCapture(T.pointerId), A.current = T.clientY, l(!0);
227
227
  }, p = (T) => {
228
228
  A.current !== null && N(Math.max(0, T.clientY - A.current));
@@ -252,7 +252,10 @@ function De({
252
252
  "aria-label": o ? void 0 : v.formatMessage({ id: "ds.mobile.bottom-sheet.label" }),
253
253
  tabIndex: -1,
254
254
  style: {
255
- transform: `translateY(${a(E)})`,
255
+ // No transform at rest: a transformed panel is the containing block of whatever is
256
+ // `position: fixed` inside it (the cookie banner hosted by the sheet), and would anchor it to
257
+ // the panel instead of the viewport.
258
+ transform: E === 0 && !u ? "none" : `translateY(${a(E)})`,
256
259
  transition: u ? "none" : `transform ${h.design.durations.base}ms ${h.design.easings.sheet}`
257
260
  },
258
261
  children: [
@@ -540,12 +543,12 @@ const q = (e) => e, te = {
540
543
  })
541
544
  };
542
545
  var D = /* @__PURE__ */ ((e) => (e.FREEMIUM = "FREEMIUM", e.DEFAULT = "DEFAULT", e.CUSTOM = "CUSTOM", e.SYSTEM = "SYSTEM", e))(D || {}), O = /* @__PURE__ */ ((e) => (e.FREEMIUM = "freemium", e.STARTER = "starter", e.PRO = "pro", e.ENTERPRISE = "enterprise", e.CUSTOM = "custom", e.INTERNAL = "internal", e.FAMILY_FREE = "family-free", e.FAMILY_PAID = "family-paid", e.DEMO = "demo", e))(O || {});
543
- const He = {
546
+ const Ve = {
544
547
  [D.FREEMIUM]: O.FREEMIUM,
545
548
  [D.DEFAULT]: "paid",
546
549
  [D.SYSTEM]: O.INTERNAL,
547
550
  [D.CUSTOM]: O.CUSTOM
548
- }, Ve = new Set(Object.values(O)), U = (e) => e ? e.tier === D.CUSTOM ? O.CUSTOM : e.catalogKey && Ve.has(e.catalogKey) ? e.catalogKey : He[e.tier] ?? "paid" : O.FREEMIUM, Ct = (e, t) => {
551
+ }, He = new Set(Object.values(O)), U = (e) => e ? e.tier === D.CUSTOM ? O.CUSTOM : e.catalogKey && He.has(e.catalogKey) ? e.catalogKey : Ve[e.tier] ?? "paid" : O.FREEMIUM, Ct = (e, t) => {
549
552
  const o = (v) => {
550
553
  const y = e[`${v}Tier`];
551
554
  if (typeof y != "string")
@@ -722,13 +725,14 @@ const He = {
722
725
  cookies: {
723
726
  banner: {
724
727
  title: "Vos préférences de cookies",
725
- description: "Nous utilisons des cookies pour faire fonctionner notre service, mesurer son audience et améliorer votre expérience. Vous pouvez accepter, refuser ou personnaliser à tout moment.",
728
+ description: "Nous utilisons des cookies pour faire fonctionner notre service et, avec votre accord, mesurer son audience avec le suivi d'usage d'Abyss. Votre choix est conservé six mois et vous pouvez le modifier à tout moment.",
726
729
  "privacy-link": "En savoir plus"
727
730
  },
728
731
  action: {
729
732
  "accept-all": "Tout accepter",
730
733
  "reject-all": "Tout refuser",
731
734
  configure: "Personnaliser",
735
+ manage: "Gérer les cookies",
732
736
  cancel: "Annuler",
733
737
  save: "Enregistrer mes choix"
734
738
  },
@@ -743,7 +747,7 @@ const He = {
743
747
  },
744
748
  analytics: {
745
749
  title: "Mesure d'audience",
746
- description: "Nous aident à comprendre l'usage de l'application pour l'améliorer."
750
+ description: "Le suivi d'usage d'Abyss (parcours, performances, erreurs, relecture de session) nous aide à améliorer l'application."
747
751
  },
748
752
  marketing: {
749
753
  title: "Marketing",
@@ -1483,7 +1487,7 @@ const He = {
1483
1487
  events: "Événements",
1484
1488
  format: "Format",
1485
1489
  enabled: "État",
1486
- failures: "Échecs consécutifs",
1490
+ failures: "Échecs",
1487
1491
  actions: "Actions"
1488
1492
  },
1489
1493
  action: {
@@ -1523,6 +1527,11 @@ const He = {
1523
1527
  "empty-desc": "Les livraisons apparaissent ici dès qu’un événement est envoyé.",
1524
1528
  "status-filter": "Statut",
1525
1529
  "all-statuses": "Tous les statuts",
1530
+ subscription: {
1531
+ url: "URL",
1532
+ events: "Événements",
1533
+ "load-failed": "L’abonnement n’a pas pu être chargé."
1534
+ },
1526
1535
  column: {
1527
1536
  status: "Statut",
1528
1537
  event: "Événement",
@@ -1536,7 +1545,7 @@ const He = {
1536
1545
  title: "Détail de la livraison",
1537
1546
  "load-failed": "Le détail n’a pas pu être chargé.",
1538
1547
  "delivery-id": "Identifiant de livraison",
1539
- "request-body": "Corps de la requête",
1548
+ "event-data": "Données de l’événement",
1540
1549
  headers: "En-têtes envoyés",
1541
1550
  response: "Réponse",
1542
1551
  "response-code": "Code de réponse",
@@ -3135,13 +3144,14 @@ const He = {
3135
3144
  cookies: {
3136
3145
  banner: {
3137
3146
  title: "Your cookie preferences",
3138
- description: "We use cookies to run our service, measure audience, and improve your experience. You can accept, reject, or customise at any time.",
3147
+ description: "We use cookies to run our service and, with your agreement, to measure its audience with Abyss usage tracking. Your choice is kept for six months and you can change it at any time.",
3139
3148
  "privacy-link": "Learn more"
3140
3149
  },
3141
3150
  action: {
3142
3151
  "accept-all": "Accept all",
3143
3152
  "reject-all": "Reject all",
3144
3153
  configure: "Customise",
3154
+ manage: "Manage cookies",
3145
3155
  cancel: "Cancel",
3146
3156
  save: "Save my choices"
3147
3157
  },
@@ -3156,7 +3166,7 @@ const He = {
3156
3166
  },
3157
3167
  analytics: {
3158
3168
  title: "Analytics",
3159
- description: "Help us understand how the app is used so we can improve it."
3169
+ description: "Abyss usage tracking (journeys, performance, errors, session replay) helps us improve the app."
3160
3170
  },
3161
3171
  marketing: {
3162
3172
  title: "Marketing",
@@ -3877,7 +3887,7 @@ const He = {
3877
3887
  events: "Events",
3878
3888
  format: "Format",
3879
3889
  enabled: "State",
3880
- failures: "Consecutive failures",
3890
+ failures: "Failures",
3881
3891
  actions: "Actions"
3882
3892
  },
3883
3893
  action: {
@@ -3917,6 +3927,11 @@ const He = {
3917
3927
  "empty-desc": "Deliveries show up here as soon as an event is sent.",
3918
3928
  "status-filter": "Status",
3919
3929
  "all-statuses": "All statuses",
3930
+ subscription: {
3931
+ url: "URL",
3932
+ events: "Events",
3933
+ "load-failed": "The subscription could not be loaded."
3934
+ },
3920
3935
  column: {
3921
3936
  status: "Status",
3922
3937
  event: "Event",
@@ -3930,7 +3945,7 @@ const He = {
3930
3945
  title: "Delivery detail",
3931
3946
  "load-failed": "The detail could not be loaded.",
3932
3947
  "delivery-id": "Delivery id",
3933
- "request-body": "Request body",
3948
+ "event-data": "Event data",
3934
3949
  headers: "Headers sent",
3935
3950
  response: "Response",
3936
3951
  "response-code": "Response code",
@@ -5581,18 +5596,18 @@ export {
5581
5596
  Ct as K,
5582
5597
  Rt as M,
5583
5598
  Qe as R,
5584
- _t as S,
5599
+ _ as S,
5585
5600
  me as T,
5586
5601
  Z as a,
5587
- Pe as b,
5588
- ve as c,
5602
+ _t as b,
5603
+ Pe as c,
5589
5604
  w as d,
5590
- ye as e,
5605
+ ve as e,
5591
5606
  It as f,
5592
- Ae as g,
5607
+ ye as g,
5593
5608
  L as h,
5594
- Ee as i,
5595
- _ as j,
5609
+ Ae as i,
5610
+ Ee as j,
5596
5611
  be as k,
5597
5612
  ft as l,
5598
5613
  St as m,