@abyss-project/commons-front-core 19.0.0 → 20.0.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 (51) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/catalog/pages/DeliveryHistory.tsx +142 -79
  3. package/catalog/pages/DeliverySubscriptions.tsx +127 -127
  4. package/catalog/pages/ScheduledTasks.tsx +117 -117
  5. package/catalog/specs/captures.spec.ts +145 -145
  6. package/catalog/specs/write-capture-index.ts +81 -81
  7. package/dist/{CookieConsentSettings-C22e74pq.js → CookieConsentSettings-iQ9XTosT.js} +1 -1
  8. package/dist/{Surface-54j_wWRk.js → Surface-DmHRzUtQ.js} +435 -167
  9. package/dist/{Tabs-D8h_6Ehv.js → Tabs-CxBeR0D-.js} +1 -1
  10. package/dist/components/business/Deliveries/ArchiveBodyNotes.d.ts +14 -0
  11. package/dist/components/business/Deliveries/ArchiveDialogs.d.ts +42 -0
  12. package/dist/components/business/Deliveries/DeliveryArchive.component.d.ts +19 -0
  13. package/dist/components/business/Deliveries/DeliveryArchive.component.spec.d.ts +1 -0
  14. package/dist/components/business/Deliveries/archive.logic.d.ts +122 -0
  15. package/dist/components/business/Deliveries/archive.logic.spec.d.ts +1 -0
  16. package/dist/components/business/Deliveries/deliveries.types.d.ts +30 -1
  17. package/dist/components/business/Deliveries/test-support/archive-actions.d.ts +3 -0
  18. package/dist/components/business/Deliveries/test-support/deliveries.fixtures.d.ts +18 -1
  19. package/dist/components/business/Deliveries/use-loaded.hook.d.ts +20 -0
  20. package/dist/cookie-consent.js +2 -2
  21. package/dist/{design-theme-F3TviTyp.js → design-theme--v6CDR8w.js} +1 -1
  22. package/dist/{editors-BvzrUh0u.js → editors-BmRsTu0H.js} +27 -27
  23. package/dist/editors.js +1 -1
  24. package/dist/hooks/use-rich-intl.hook.d.ts +276 -0
  25. package/dist/{index-CP9wCW4Z.js → index-BAH9H4GE.js} +3 -3
  26. package/dist/{index-CXSxZiqU.js → index-BGAmhhJZ.js} +2 -2
  27. package/dist/{index-qfXRn5GL.js → index-BTwuilx5.js} +3 -3
  28. package/dist/{index-DArDCeHJ.js → index-Buo7Iim6.js} +4 -4
  29. package/dist/{index-DlREX3RV.js → index-BwugEq4x.js} +2 -2
  30. package/dist/{index-Cxvpt5Rk.js → index-CI0SMeOa.js} +2 -2
  31. package/dist/{index-DyR6n35f.js → index-CJjWI7qL.js} +3 -3
  32. package/dist/{index-BnIrh2JM.js → index-CSl9Kc0V.js} +2 -2
  33. package/dist/{index-ChFskeZj.js → index-ChCpWPzk.js} +4 -4
  34. package/dist/{index-CeuzZh-h.js → index-ClEFydIA.js} +2 -2
  35. package/dist/{index-DkqoRb8_.js → index-CsZJyqSF.js} +2 -2
  36. package/dist/{index-Co1Gxp6L.js → index-Cv8TWKKk.js} +2 -2
  37. package/dist/{index-VOYH3T8l.js → index-DLIvsZA_.js} +2 -2
  38. package/dist/{index-BZthWcJ5.js → index-DVyE9B4I.js} +2 -2
  39. package/dist/{index-BCKWga5S.js → index-DYdLhNjl.js} +3 -3
  40. package/dist/{index-BlvA6Lxv.js → index-Dco3zEwV.js} +2 -2
  41. package/dist/{index-DhYE_E7U.js → index-DnweGlM_.js} +2 -2
  42. package/dist/{index-CzBp_cay.js → index-DsxBk5OJ.js} +1 -1
  43. package/dist/{index-BAcL0gZM.js → index-DuLb3GSj.js} +4 -4
  44. package/dist/{index-DhSyqz6f.js → index-RjzeFVe-.js} +2 -2
  45. package/dist/{index-DXzb3gco.js → index-ZL-d1iKb.js} +2 -2
  46. package/dist/index.js +10029 -9166
  47. package/dist/legacy.js +6 -6
  48. package/dist/translations/en.d.ts +134 -0
  49. package/dist/translations/fr.d.ts +134 -0
  50. package/package.json +5 -5
  51. package/test-results/catalog/.last-run.json +4 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog — @abyss-project/commons-front-core
2
2
 
3
+ ## 20.0.0
4
+
5
+ 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.
6
+
7
+ - `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.
8
+ - `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.
9
+ - `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.
10
+ - 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à ».
11
+
3
12
  ## 19.0.0
4
13
 
5
14
  Major: `WebhookTypeChip` and `ApplicationWebhookTypeChip` leave `./legacy` (card #792). No satellite imports them. 18.1.6 was never published.
@@ -1,79 +1,142 @@
1
- import { DeliveryHistory } from '../../src/components/business/Deliveries/DeliveryHistory.component';
2
- import type { DeliveryHistoryProps } from '../../src/components/business/Deliveries/deliveries.types';
3
- import {
4
- delivery,
5
- deliveryStatus,
6
- failedDelivery,
7
- page,
8
- subscription,
9
- } from '../../src/components/business/Deliveries/test-support/deliveries.fixtures';
10
- import { Example, LastEvent, Showcase, useEventLog } from '../frame';
11
-
12
- const POPULATED = [
13
- delivery(),
14
- failedDelivery(),
15
- delivery({
16
- id: 'delivery-3',
17
- eventKey: 'event-3',
18
- deliveryId: 'sub-1:event-3',
19
- status: deliveryStatus('RETRYING'),
20
- attemptCount: 2,
21
- lastResponseCode: 502,
22
- lastResponseBody: null,
23
- lastError: 'HTTP 502',
24
- deliveredAt: null,
25
- nextAttemptAt: new Date('2026-11-03T10:15:00Z'),
26
- }),
27
- ];
28
-
29
- export const DeliveryHistoryPage = () => {
30
- const { log } = useEventLog();
31
- const base = (list: DeliveryHistoryProps['list']): DeliveryHistoryProps => ({
32
- list,
33
- get: async (id) => POPULATED.find((row) => row.id === id) ?? delivery(),
34
- replayDelivery: async (id) => log(`rejouer ${id}`),
35
- canReplay: true,
36
- getSubscription: async () =>
37
- subscription({
38
- url: 'https://ops.example.com/webhooks/abyss/monitor-events/production',
39
- eventTypes: ['MONITOR_EVENT', 'MONITOR_SENTINEL'],
40
- }),
41
- flowUrl: 'https://flow.abyss.example/deliveries',
42
- });
43
- return (
44
- <Showcase
45
- family="Métier"
46
- 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."
48
- >
49
- <Example title="Peuplé" maxWidth={1100}>
50
- <DeliveryHistory {...base(async () => page(POPULATED))} />
51
- </Example>
52
- <Example title="Vide" maxWidth={1100}>
53
- <DeliveryHistory {...base(async () => page([]))} />
54
- </Example>
55
- <Example title="En cours de chargement" maxWidth={1100}>
56
- <DeliveryHistory {...base(() => new Promise(() => undefined))} />
57
- </Example>
58
- <Example title="Le chargement a échoué" maxWidth={1100}>
59
- <DeliveryHistory
60
- {...base(() => Promise.reject(new Error('Flow indisponible')))}
61
- />
62
- </Example>
63
- <Example title="Sans abonnement ni lien vers Flow" maxWidth={1100}>
64
- <DeliveryHistory
65
- {...base(async () => page(POPULATED))}
66
- getSubscription={undefined}
67
- flowUrl={undefined}
68
- />
69
- </Example>
70
- <Example title="Sans droit de rejeu" maxWidth={1100}>
71
- <DeliveryHistory
72
- {...base(async () => page(POPULATED))}
73
- canReplay={false}
74
- />
75
- </Example>
76
- <LastEvent />
77
- </Showcase>
78
- );
79
- };
1
+ import { DeliveryHistory } from '../../src/components/business/Deliveries/DeliveryHistory.component';
2
+ import type {
3
+ DeliveryArchiveActions,
4
+ DeliveryHistoryProps,
5
+ } from '../../src/components/business/Deliveries/deliveries.types';
6
+ import {
7
+ archivedDay,
8
+ archivedDelivery,
9
+ daysAgo,
10
+ delivery,
11
+ deliveryStatus,
12
+ failedDelivery,
13
+ page,
14
+ rehydratedDelivery,
15
+ rehydrationJob,
16
+ subscription,
17
+ } from '../../src/components/business/Deliveries/test-support/deliveries.fixtures';
18
+ import { Example, LastEvent, Showcase, useEventLog } from '../frame';
19
+
20
+ const POPULATED = [
21
+ delivery(),
22
+ failedDelivery(),
23
+ delivery({
24
+ id: 'delivery-3',
25
+ eventKey: 'event-3',
26
+ deliveryId: 'sub-1:event-3',
27
+ status: deliveryStatus('RETRYING'),
28
+ attemptCount: 2,
29
+ lastResponseCode: 502,
30
+ lastResponseBody: null,
31
+ lastError: 'HTTP 502',
32
+ deliveredAt: null,
33
+ nextAttemptAt: new Date('2026-11-03T10:15:00Z'),
34
+ }),
35
+ ];
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
+
46
+ export const DeliveryHistoryPage = () => {
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
+ };
78
+ const base = (list: DeliveryHistoryProps['list']): DeliveryHistoryProps => ({
79
+ list,
80
+ get: async (id) => WITH_ARCHIVE.find((row) => row.id === id) ?? delivery(),
81
+ replayDelivery: async (id) => log(`rejouer ${id}`),
82
+ canReplay: true,
83
+ archive,
84
+ canManageArchive: true,
85
+ canPurgeArchive: true,
86
+ getSubscription: async () =>
87
+ subscription({
88
+ url: 'https://ops.example.com/webhooks/abyss/monitor-events/production',
89
+ eventTypes: ['MONITOR_EVENT', 'MONITOR_SENTINEL'],
90
+ }),
91
+ flowUrl: 'https://flow.abyss.example/deliveries',
92
+ });
93
+ return (
94
+ <Showcase
95
+ family="Métier"
96
+ name="DeliveryHistory"
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."
98
+ >
99
+ <Example title="Peuplé" maxWidth={1100}>
100
+ <DeliveryHistory {...base(async () => page(POPULATED))} />
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>
115
+ <Example title="Vide" maxWidth={1100}>
116
+ <DeliveryHistory {...base(async () => page([]))} />
117
+ </Example>
118
+ <Example title="En cours de chargement" maxWidth={1100}>
119
+ <DeliveryHistory {...base(() => new Promise(() => undefined))} />
120
+ </Example>
121
+ <Example title="Le chargement a échoué" maxWidth={1100}>
122
+ <DeliveryHistory
123
+ {...base(() => Promise.reject(new Error('Flow indisponible')))}
124
+ />
125
+ </Example>
126
+ <Example title="Sans abonnement ni lien vers Flow" maxWidth={1100}>
127
+ <DeliveryHistory
128
+ {...base(async () => page(POPULATED))}
129
+ getSubscription={undefined}
130
+ flowUrl={undefined}
131
+ />
132
+ </Example>
133
+ <Example title="Sans droit de rejeu" maxWidth={1100}>
134
+ <DeliveryHistory
135
+ {...base(async () => page(POPULATED))}
136
+ canReplay={false}
137
+ />
138
+ </Example>
139
+ <LastEvent />
140
+ </Showcase>
141
+ );
142
+ };
@@ -1,127 +1,127 @@
1
- import { DeliverySubscriptions } from '../../src/components/business/Deliveries/DeliverySubscriptions.component';
2
- import type { DeliverySubscriptionsProps } from '../../src/components/business/Deliveries/deliveries.types';
3
- import {
4
- EVENT_TYPES_BY_SOURCE,
5
- SOURCES,
6
- deliveryFormat,
7
- page,
8
- source,
9
- subscription,
10
- } from '../../src/components/business/Deliveries/test-support/deliveries.fixtures';
11
- import { Example, LastEvent, Showcase, useEventLog } from '../frame';
12
-
13
- const PERMISSIONS = {
14
- canCreate: true,
15
- canUpdate: true,
16
- canDelete: true,
17
- canResetSecret: true,
18
- canReadHistory: true,
19
- };
20
-
21
- const POPULATED = [
22
- subscription(),
23
- subscription({
24
- id: 'sub-2',
25
- source: source('FORM'),
26
- eventTypes: ['FORM_SUBMISSION'],
27
- url: 'https://discord.com/api/webhooks/1234/abcd',
28
- format: deliveryFormat('DISCORD'),
29
- consecutiveFailures: 3,
30
- }),
31
- subscription({
32
- id: 'sub-3',
33
- source: source('STORAGE'),
34
- eventTypes: ['STORAGE_UPLOAD', 'STORAGE_DELETE'],
35
- url: 'https://files.example.com/hooks/storage',
36
- isEnabled: false,
37
- disabledAt: new Date('2026-11-02T08:00:00Z'),
38
- consecutiveFailures: 10,
39
- }),
40
- ];
41
-
42
- const secretFor = (id: string) => `whsec_catalog_${id}_do-not-use`;
43
-
44
- export const DeliverySubscriptionsPage = () => {
45
- const { log } = useEventLog();
46
- const base = (
47
- list: DeliverySubscriptionsProps['list'],
48
- ): DeliverySubscriptionsProps => ({
49
- sources: SOURCES,
50
- eventTypesBySource: EVENT_TYPES_BY_SOURCE,
51
- list,
52
- create: async (body) => {
53
- log(`créer ${body.url}`);
54
- return {
55
- deliverySubscription: subscription({ id: 'sub-new', url: body.url }),
56
- secret: secretFor('new'),
57
- };
58
- },
59
- update: async (id, body) => {
60
- log(`modifier ${id}`);
61
- return subscription({ id, ...body });
62
- },
63
- remove: async (id) => log(`supprimer ${id}`),
64
- resetSecret: async (id) => {
65
- log(`secret ${id}`);
66
- return {
67
- deliverySubscription: subscription({ id }),
68
- secret: secretFor(id),
69
- };
70
- },
71
- onOpenHistory: (row) => log(`historique ${row.id}`),
72
- flowUrl: 'https://flow.abyss.example/deliveries',
73
- permissions: PERMISSIONS,
74
- });
75
- return (
76
- <Showcase
77
- family="Métier"
78
- name="DeliverySubscriptions"
79
- description="Les abonnements de livraison d'un périmètre : liste, création et édition en panneau, secret affiché une seule fois, activation, suppression confirmée. Les données et les actions passent par des props."
80
- >
81
- <Example title="Peuplé" maxWidth={1100}>
82
- <DeliverySubscriptions {...base(async () => page(POPULATED))} />
83
- </Example>
84
- <Example title="Une seule source, sans lien vers Flow" maxWidth={1100}>
85
- <DeliverySubscriptions
86
- {...base(async () =>
87
- page([
88
- subscription({
89
- url: 'https://ops.example.com/webhooks/abyss/monitor-events/production',
90
- }),
91
- subscription({
92
- id: 'sub-4',
93
- url: 'https://ops.example.com/webhooks/abyss/monitor-events/staging',
94
- }),
95
- ]),
96
- )}
97
- sources={[source('MONITOR')]}
98
- flowUrl={undefined}
99
- />
100
- </Example>
101
- <Example title="Vide" maxWidth={1100}>
102
- <DeliverySubscriptions {...base(async () => page([]))} />
103
- </Example>
104
- <Example title="En cours de chargement" maxWidth={1100}>
105
- <DeliverySubscriptions {...base(() => new Promise(() => undefined))} />
106
- </Example>
107
- <Example title="Le chargement a échoué" maxWidth={1100}>
108
- <DeliverySubscriptions
109
- {...base(() => Promise.reject(new Error('Flow indisponible')))}
110
- />
111
- </Example>
112
- <Example title="Lecture seule" maxWidth={1100}>
113
- <DeliverySubscriptions
114
- {...base(async () => page(POPULATED))}
115
- permissions={{
116
- canCreate: false,
117
- canUpdate: false,
118
- canDelete: false,
119
- canResetSecret: false,
120
- canReadHistory: true,
121
- }}
122
- />
123
- </Example>
124
- <LastEvent />
125
- </Showcase>
126
- );
127
- };
1
+ import { DeliverySubscriptions } from '../../src/components/business/Deliveries/DeliverySubscriptions.component';
2
+ import type { DeliverySubscriptionsProps } from '../../src/components/business/Deliveries/deliveries.types';
3
+ import {
4
+ EVENT_TYPES_BY_SOURCE,
5
+ SOURCES,
6
+ deliveryFormat,
7
+ page,
8
+ source,
9
+ subscription,
10
+ } from '../../src/components/business/Deliveries/test-support/deliveries.fixtures';
11
+ import { Example, LastEvent, Showcase, useEventLog } from '../frame';
12
+
13
+ const PERMISSIONS = {
14
+ canCreate: true,
15
+ canUpdate: true,
16
+ canDelete: true,
17
+ canResetSecret: true,
18
+ canReadHistory: true,
19
+ };
20
+
21
+ const POPULATED = [
22
+ subscription(),
23
+ subscription({
24
+ id: 'sub-2',
25
+ source: source('FORM'),
26
+ eventTypes: ['FORM_SUBMISSION'],
27
+ url: 'https://discord.com/api/webhooks/1234/abcd',
28
+ format: deliveryFormat('DISCORD'),
29
+ consecutiveFailures: 3,
30
+ }),
31
+ subscription({
32
+ id: 'sub-3',
33
+ source: source('STORAGE'),
34
+ eventTypes: ['STORAGE_UPLOAD', 'STORAGE_DELETE'],
35
+ url: 'https://files.example.com/hooks/storage',
36
+ isEnabled: false,
37
+ disabledAt: new Date('2026-11-02T08:00:00Z'),
38
+ consecutiveFailures: 10,
39
+ }),
40
+ ];
41
+
42
+ const secretFor = (id: string) => `whsec_catalog_${id}_do-not-use`;
43
+
44
+ export const DeliverySubscriptionsPage = () => {
45
+ const { log } = useEventLog();
46
+ const base = (
47
+ list: DeliverySubscriptionsProps['list'],
48
+ ): DeliverySubscriptionsProps => ({
49
+ sources: SOURCES,
50
+ eventTypesBySource: EVENT_TYPES_BY_SOURCE,
51
+ list,
52
+ create: async (body) => {
53
+ log(`créer ${body.url}`);
54
+ return {
55
+ deliverySubscription: subscription({ id: 'sub-new', url: body.url }),
56
+ secret: secretFor('new'),
57
+ };
58
+ },
59
+ update: async (id, body) => {
60
+ log(`modifier ${id}`);
61
+ return subscription({ id, ...body });
62
+ },
63
+ remove: async (id) => log(`supprimer ${id}`),
64
+ resetSecret: async (id) => {
65
+ log(`secret ${id}`);
66
+ return {
67
+ deliverySubscription: subscription({ id }),
68
+ secret: secretFor(id),
69
+ };
70
+ },
71
+ onOpenHistory: (row) => log(`historique ${row.id}`),
72
+ flowUrl: 'https://flow.abyss.example/deliveries',
73
+ permissions: PERMISSIONS,
74
+ });
75
+ return (
76
+ <Showcase
77
+ family="Métier"
78
+ name="DeliverySubscriptions"
79
+ description="Les abonnements de livraison d'un périmètre : liste, création et édition en panneau, secret affiché une seule fois, activation, suppression confirmée. Les données et les actions passent par des props."
80
+ >
81
+ <Example title="Peuplé" maxWidth={1100}>
82
+ <DeliverySubscriptions {...base(async () => page(POPULATED))} />
83
+ </Example>
84
+ <Example title="Une seule source, sans lien vers Flow" maxWidth={1100}>
85
+ <DeliverySubscriptions
86
+ {...base(async () =>
87
+ page([
88
+ subscription({
89
+ url: 'https://ops.example.com/webhooks/abyss/monitor-events/production',
90
+ }),
91
+ subscription({
92
+ id: 'sub-4',
93
+ url: 'https://ops.example.com/webhooks/abyss/monitor-events/staging',
94
+ }),
95
+ ]),
96
+ )}
97
+ sources={[source('MONITOR')]}
98
+ flowUrl={undefined}
99
+ />
100
+ </Example>
101
+ <Example title="Vide" maxWidth={1100}>
102
+ <DeliverySubscriptions {...base(async () => page([]))} />
103
+ </Example>
104
+ <Example title="En cours de chargement" maxWidth={1100}>
105
+ <DeliverySubscriptions {...base(() => new Promise(() => undefined))} />
106
+ </Example>
107
+ <Example title="Le chargement a échoué" maxWidth={1100}>
108
+ <DeliverySubscriptions
109
+ {...base(() => Promise.reject(new Error('Flow indisponible')))}
110
+ />
111
+ </Example>
112
+ <Example title="Lecture seule" maxWidth={1100}>
113
+ <DeliverySubscriptions
114
+ {...base(async () => page(POPULATED))}
115
+ permissions={{
116
+ canCreate: false,
117
+ canUpdate: false,
118
+ canDelete: false,
119
+ canResetSecret: false,
120
+ canReadHistory: true,
121
+ }}
122
+ />
123
+ </Example>
124
+ <LastEvent />
125
+ </Showcase>
126
+ );
127
+ };