@abyss-project/commons-front-core 19.0.0 → 20.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 (48) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/catalog/pages/DeliveryHistory.tsx +66 -3
  3. package/catalog/pages/Toolbar.tsx +3 -0
  4. package/dist/{CookieConsentSettings-C22e74pq.js → CookieConsentSettings-iQ9XTosT.js} +1 -1
  5. package/dist/{Surface-54j_wWRk.js → Surface-DmHRzUtQ.js} +435 -167
  6. package/dist/{Tabs-D8h_6Ehv.js → Tabs-CxBeR0D-.js} +1 -1
  7. package/dist/components/business/Deliveries/ArchiveBodyNotes.d.ts +14 -0
  8. package/dist/components/business/Deliveries/ArchiveDialogs.d.ts +42 -0
  9. package/dist/components/business/Deliveries/DeliveryArchive.component.d.ts +19 -0
  10. package/dist/components/business/Deliveries/DeliveryArchive.component.spec.d.ts +1 -0
  11. package/dist/components/business/Deliveries/archive.logic.d.ts +122 -0
  12. package/dist/components/business/Deliveries/archive.logic.spec.d.ts +1 -0
  13. package/dist/components/business/Deliveries/deliveries.types.d.ts +30 -1
  14. package/dist/components/business/Deliveries/test-support/archive-actions.d.ts +3 -0
  15. package/dist/components/business/Deliveries/test-support/deliveries.fixtures.d.ts +18 -1
  16. package/dist/components/business/Deliveries/use-loaded.hook.d.ts +20 -0
  17. package/dist/components/inputs/CopyField/CopyField.d.ts +6 -1
  18. package/dist/cookie-consent.js +2 -2
  19. package/dist/{design-theme-F3TviTyp.js → design-theme--v6CDR8w.js} +1 -1
  20. package/dist/{editors-BvzrUh0u.js → editors-BmRsTu0H.js} +27 -27
  21. package/dist/editors.js +1 -1
  22. package/dist/hooks/use-rich-intl.hook.d.ts +276 -0
  23. package/dist/{index-CP9wCW4Z.js → index-BAH9H4GE.js} +3 -3
  24. package/dist/{index-CXSxZiqU.js → index-BGAmhhJZ.js} +2 -2
  25. package/dist/{index-qfXRn5GL.js → index-BTwuilx5.js} +3 -3
  26. package/dist/{index-DArDCeHJ.js → index-Buo7Iim6.js} +4 -4
  27. package/dist/{index-DlREX3RV.js → index-BwugEq4x.js} +2 -2
  28. package/dist/{index-Cxvpt5Rk.js → index-CI0SMeOa.js} +2 -2
  29. package/dist/{index-DyR6n35f.js → index-CJjWI7qL.js} +3 -3
  30. package/dist/{index-BnIrh2JM.js → index-CSl9Kc0V.js} +2 -2
  31. package/dist/{index-ChFskeZj.js → index-ChCpWPzk.js} +4 -4
  32. package/dist/{index-CeuzZh-h.js → index-ClEFydIA.js} +2 -2
  33. package/dist/{index-DkqoRb8_.js → index-CsZJyqSF.js} +2 -2
  34. package/dist/{index-Co1Gxp6L.js → index-Cv8TWKKk.js} +2 -2
  35. package/dist/{index-VOYH3T8l.js → index-DLIvsZA_.js} +2 -2
  36. package/dist/{index-BZthWcJ5.js → index-DVyE9B4I.js} +2 -2
  37. package/dist/{index-BCKWga5S.js → index-DYdLhNjl.js} +3 -3
  38. package/dist/{index-BlvA6Lxv.js → index-Dco3zEwV.js} +2 -2
  39. package/dist/{index-DhYE_E7U.js → index-DnweGlM_.js} +2 -2
  40. package/dist/{index-CzBp_cay.js → index-DsxBk5OJ.js} +1 -1
  41. package/dist/{index-BAcL0gZM.js → index-DuLb3GSj.js} +4 -4
  42. package/dist/{index-DhSyqz6f.js → index-RjzeFVe-.js} +2 -2
  43. package/dist/{index-DXzb3gco.js → index-ZL-d1iKb.js} +2 -2
  44. package/dist/index.js +10118 -9204
  45. package/dist/legacy.js +6 -6
  46. package/dist/translations/en.d.ts +134 -0
  47. package/dist/translations/fr.d.ts +134 -0
  48. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog — @abyss-project/commons-front-core
2
2
 
3
+ ## 20.1.0
4
+
5
+ Card #286 (global review, lot 2).
6
+
7
+ - `UsageMeter`: the figures wrap between the value and the ceiling instead of running past a narrow card; each number stays whole.
8
+ - `ComboboxField`: below 768 px, the right padding of the input makes room for the 44 px clear and open buttons (it kept MUI's 26 px per button), so a long value no longer runs under the clear button; from 768 px nothing changes.
9
+ - `SupportTicketList`: the admin view fits its columns in the frame of a 1440 px page, the last one is no longer cut. The category column is 176 px and its pill is bounded to the cell: a label that does not fit (« Demande de fonctionnalité ») ends in an ellipsis and carries its full label as a `title`, so the ticket title keeps at least 176 px there, about 20 characters.
10
+ - `CopyField`: new optional `wrapOnPhone`, below 768 px the shown value wraps onto as many lines as it needs instead of being cut by an ellipsis. Without it, nothing changes.
11
+ - Theme, `Button` `outlined`: a disabled one takes the same raised fill, subtle border and muted text as a disabled `contained` button, in both themes; it used to differ from an active one by its border and text color only.
12
+
13
+ ## 20.0.0
14
+
15
+ Major: `DeliveryHistory` gets required props and a new required action (card #792, P5 L2b: the archive of the delivery history). A host that mounts it must pass them; peer `@abyss-project/flow` ^1.5.0.
16
+
17
+ - `DeliveryHistory`: new required props `canManageArchive` and `canPurgeArchive`, and a new required action `archive` (list of the archived days, rehydrations, estimate, rehydrate, extend, release, purge). The toolbar opens an « Archive » section, a delivery whose body is archived says so with « Remettre en ligne », and a rehydrated row carries a chip with the end of its lease.
18
+ - `DeliveryHistory`: « Rejouer » stays visible and disabled, with its reason, on a delivery of 30 days or more, whose body is archived or comes from a rehydration. A disabled outlined `ActionButton` is drawn apart (dashed border, lowered opacity) because the theme keeps the border and the background of an enabled one.
19
+ - `DeliverySubscriptions` and `ScheduledTasks`: deleting one says its deliveries and archive are erased for good; a 502 of the deletion says part of the archive is already deleted and to repeat the deletion.
20
+ - Archive section: the archived days and their range are written in the viewer's language, read in UTC. The refusal of a purge that lost the archive midway (502) says the deletion is partial and to repeat it. Skipped days read « encore en ligne (30 derniers jours) » or « rien d'archivé ce jour-là ».
21
+
3
22
  ## 19.0.0
4
23
 
5
24
  Major: `WebhookTypeChip` and `ApplicationWebhookTypeChip` leave `./legacy` (card #792). No satellite imports them. 18.1.6 was never published.
@@ -1,10 +1,18 @@
1
1
  import { DeliveryHistory } from '../../src/components/business/Deliveries/DeliveryHistory.component';
2
- import type { DeliveryHistoryProps } from '../../src/components/business/Deliveries/deliveries.types';
2
+ import type {
3
+ DeliveryArchiveActions,
4
+ DeliveryHistoryProps,
5
+ } from '../../src/components/business/Deliveries/deliveries.types';
3
6
  import {
7
+ archivedDay,
8
+ archivedDelivery,
9
+ daysAgo,
4
10
  delivery,
5
11
  deliveryStatus,
6
12
  failedDelivery,
7
13
  page,
14
+ rehydratedDelivery,
15
+ rehydrationJob,
8
16
  subscription,
9
17
  } from '../../src/components/business/Deliveries/test-support/deliveries.fixtures';
10
18
  import { Example, LastEvent, Showcase, useEventLog } from '../frame';
@@ -26,13 +34,55 @@ const POPULATED = [
26
34
  }),
27
35
  ];
28
36
 
37
+ /** Past 30 days: one row archived, one brought back online. */
38
+ const WITH_ARCHIVE = [...POPULATED, archivedDelivery(), rehydratedDelivery()];
39
+
40
+ const ARCHIVE_JOB = rehydrationJob({
41
+ rangeStart: daysAgo(41),
42
+ rangeEnd: daysAgo(39),
43
+ effectiveExpiresAt: new Date(Date.now() + 5 * 24 * 60 * 60 * 1000),
44
+ });
45
+
29
46
  export const DeliveryHistoryPage = () => {
30
47
  const { log } = useEventLog();
48
+ const archive: DeliveryArchiveActions = {
49
+ listDays: async () => [
50
+ archivedDay({ dayValue: '2026-09-20' }),
51
+ archivedDay({ dayValue: '2026-09-21', rowCount: 42 }),
52
+ ],
53
+ listRehydrations: async () => ({ jobs: [ARCHIVE_JOB], truncated: false }),
54
+ estimate: async () => ({
55
+ admittedDays: ['2026-09-20'],
56
+ archiveBytes: 3 * 1024 * 1024,
57
+ expectedRows: 128,
58
+ skippedDays: [],
59
+ maxLeaseDays: 30,
60
+ }),
61
+ rehydrate: async (body) => {
62
+ log(`remettre en ligne ${body.rangeStart} - ${body.rangeEnd}`);
63
+ return { job: ARCHIVE_JOB, skippedDays: [] };
64
+ },
65
+ extend: async (jobId) => {
66
+ log(`prolonger ${jobId}`);
67
+ return ARCHIVE_JOB;
68
+ },
69
+ release: async (jobId) => {
70
+ log(`libérer ${jobId}`);
71
+ return ARCHIVE_JOB;
72
+ },
73
+ purge: async (body) => {
74
+ log(`supprimer de l'archive ${body.from} - ${body.to}`);
75
+ return { purgedDays: [body.from], deletedRows: 0, releasedJobs: 0 };
76
+ },
77
+ };
31
78
  const base = (list: DeliveryHistoryProps['list']): DeliveryHistoryProps => ({
32
79
  list,
33
- get: async (id) => POPULATED.find((row) => row.id === id) ?? delivery(),
80
+ get: async (id) => WITH_ARCHIVE.find((row) => row.id === id) ?? delivery(),
34
81
  replayDelivery: async (id) => log(`rejouer ${id}`),
35
82
  canReplay: true,
83
+ archive,
84
+ canManageArchive: true,
85
+ canPurgeArchive: true,
36
86
  getSubscription: async () =>
37
87
  subscription({
38
88
  url: 'https://ops.example.com/webhooks/abyss/monitor-events/production',
@@ -44,11 +94,24 @@ export const DeliveryHistoryPage = () => {
44
94
  <Showcase
45
95
  family="Métier"
46
96
  name="DeliveryHistory"
47
- description="L'historique des livraisons d'un abonnement (URL et événements sous le titre) : filtre de statut, détail en panneau (données de l'événement, en-têtes envoyés, réponse, déroulé) et rejeu d'une livraison terminée."
97
+ description="L'historique des livraisons d'un abonnement (URL et événements sous le titre) : filtre de statut, détail en panneau (données de l'événement, en-têtes envoyés, réponse, déroulé), rejeu d'une livraison terminée (refusé au-delà de 30 jours) et section Archive : jours archivés, remises en ligne, suppression."
48
98
  >
49
99
  <Example title="Peuplé" maxWidth={1100}>
50
100
  <DeliveryHistory {...base(async () => page(POPULATED))} />
51
101
  </Example>
102
+ <Example
103
+ title="Avec une livraison archivée et une remise en ligne"
104
+ maxWidth={1100}
105
+ >
106
+ <DeliveryHistory {...base(async () => page(WITH_ARCHIVE))} />
107
+ </Example>
108
+ <Example title="Archive en lecture seule" maxWidth={1100}>
109
+ <DeliveryHistory
110
+ {...base(async () => page(WITH_ARCHIVE))}
111
+ canManageArchive={false}
112
+ canPurgeArchive={false}
113
+ />
114
+ </Example>
52
115
  <Example title="Vide" maxWidth={1100}>
53
116
  <DeliveryHistory {...base(async () => page([]))} />
54
117
  </Example>
@@ -40,6 +40,9 @@ export const ToolbarPage = () => {
40
40
  >
41
41
  Exporter la sélection
42
42
  </Button>
43
+ <Button variant="outlined" startIcon={<EditOutlined />} disabled>
44
+ Renommer
45
+ </Button>
43
46
  </Toolbar>
44
47
  </Example>
45
48
  <Example title="Dense, dans l'en-tête d'une carte">
@@ -3,7 +3,7 @@ import { useState as v, useCallback as A, useEffect as T, useLayoutEffect as ie,
3
3
  import R from "@mui/material/Button";
4
4
  import X from "@mui/material/Switch";
5
5
  import { styled as g } from "@mui/material/styles";
6
- import { t as x, w as E, p as f, d as D, D as N, S as O, a as V, u as w, T as j, M as b, b as Z, h as ae, c as ce, e as le } from "./Surface-54j_wWRk.js";
6
+ import { t as x, w as E, p as f, d as D, D as N, S as O, a as V, u as w, T as j, M as b, b as Z, h as ae, c as ce, e as le } from "./Surface-DmHRzUtQ.js";
7
7
  import { useQuery as de, useMutation as ue } from "@tanstack/react-query";
8
8
  import { AbyssCore as K } from "@abyss-project/main";
9
9
  import { createPortal as fe } from "react-dom";