@abyss-project/commons-front-core 21.0.1 → 21.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 (33) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/{CookieConsentSettings-BzeQZ5tD.js → CookieConsentSettings-Dkt9AlIo.js} +1 -1
  3. package/dist/{Surface-t4XKtudZ.js → Surface-RMXEkoG9.js} +4 -4
  4. package/dist/{Tabs-DXgqVX6V.js → Tabs-BDmdsz6U.js} +1 -1
  5. package/dist/components/editors/MarkdownEditor/MarkdownEditor.d.ts +24 -2
  6. package/dist/cookie-consent.js +2 -2
  7. package/dist/{editors-Dt29L0Ux.js → editors-CDoVPogw.js} +2033 -2012
  8. package/dist/editors.js +1 -1
  9. package/dist/hooks/use-rich-intl.hook.d.ts +16 -0
  10. package/dist/{index-vX7Ua1iM.js → index-33nntF4D.js} +2 -2
  11. package/dist/{index-Bh0e5MGQ.js → index-A8WdE-CW.js} +2 -2
  12. package/dist/{index-BaS25rA-.js → index-B9Z0bSvA.js} +2 -2
  13. package/dist/{index-DvcQvaXv.js → index-BEy4km1e.js} +2 -2
  14. package/dist/{index-C3iToWR_.js → index-BNKceRfZ.js} +4 -4
  15. package/dist/{index-DbBqHu3d.js → index-BORJONs4.js} +2 -2
  16. package/dist/{index-ETHoxvZf.js → index-BwrIyGwM.js} +2 -2
  17. package/dist/{index-D0E9e2bc.js → index-Cc2cfUhJ.js} +2 -2
  18. package/dist/{index-Cs5brR68.js → index-CmHpIzys.js} +3 -3
  19. package/dist/{index-BHKOZzg1.js → index-CokB0Q8E.js} +1 -1
  20. package/dist/{index-BYWcX6y7.js → index-CozR0zAS.js} +2 -2
  21. package/dist/{index-BYWSBoej.js → index-DAfA2a8B.js} +3 -3
  22. package/dist/{index-Deq0UIQ5.js → index-DBU5kkLv.js} +2 -2
  23. package/dist/{index-Dg0a5ekJ.js → index-DHmlkr_S.js} +2 -2
  24. package/dist/{index-CNem7pV2.js → index-DJFGrDGA.js} +2 -2
  25. package/dist/{index-DGizXlGr.js → index-DLdX6r1L.js} +3 -3
  26. package/dist/{index-na4ea52T.js → index-DyR6JnHp.js} +2 -2
  27. package/dist/{index-D2yo-g20.js → index-Kjq2z0S-.js} +4 -4
  28. package/dist/{index-3hRPEDk5.js → index-XFUwb6Wi.js} +4 -4
  29. package/dist/{index-BczDLUpv.js → index-eL5jg8kL.js} +2 -2
  30. package/dist/{index-DLZ2_Fhk.js → index-zBACb5Is.js} +3 -3
  31. package/dist/index.js +6 -6
  32. package/package.json +4 -4
  33. package/test-results/catalog/.last-run.json +0 -4
package/CHANGELOG.md CHANGED
@@ -20,7 +20,7 @@ Breaking:
20
20
  Added:
21
21
 
22
22
  - `AVATAR_SMALL_SIZE` (`meaning/Avatar`, 24 px), next to `AVATAR_DEFAULT_SIZE`: the side of an avatar inside a field row or a list option. `AbyssProjectLinkField` takes it instead of a spacing step.
23
- - `MobileShellActionBar({ actions })`: the action bar of a page of a `MobileShell`. Inside the shell it is portalled into a slot of the page frame, sticky against the tab bar even on a short page, full width, without a second bottom inset; outside a shell it renders an `ActionBar` in place. `MobileShell` now wraps its `children` in that frame (a flex column whose page grows to the height of the content area), with or without a bar. A page of the shell is therefore a flex item of a column that only has a minimum height: a `height: 100%` set by the page no longer resolves, take `flex: 1` (or `minHeight: 100%`).
23
+ - `MobileShellActionBar({ actions })`: the action bar of a page of a `MobileShell`. Inside the shell it is portalled into a slot of the page frame, sticky against the tab bar even on a short page, full width, without a second bottom inset; outside a shell it renders an `ActionBar` in place. `MobileShell` now wraps its `children` in that frame (a flex column whose page grows to the height of the content area), with or without a bar. The page's content sits in a block that grows to the bottom of the content area but has no definite height: a `height: 100%` or `minHeight: 100%` set by the page does not resolve (it did not under the shell's block `main` either).
24
24
  - `PendingInvitations` (`components/business`): the invitations of a user to a content of a service, accept and decline per invitation (busy per row, a failure handed back to the host). Each invitation carries its `serviceName`. New keys `pending-invitations.*` (FR and EN); exported types `PendingInvitation`, `PendingInvitationsProps`.
25
25
  - `AbyssProjectLinkField` (`components/business`): the organization and project picker that links a content to a project (own projects and shared ones). New keys `project-link-field.*` (FR and EN); exported types `AbyssProjectLinkFieldProps`, `AbyssProjectLinkOrganization`, `AbyssProjectLinkProject`, `AbyssProjectLinkProjects`.
26
26
  - `utils/notification-target.utils`: `notificationTargetOf(notification, { invitationsPath, serviceTarget? })` (a shared content leads to its `contentUrl`, an invitation to `invitationsPath`, anything else to the host's `serviceTarget`), `isInvitationNotificationContentType(contentType)`, `notificationLinkOf(link)`, `fillsEveryMessageArgument(message, values)`, `messageArgumentNames(message)`. Against the copies they replace in the applications:
@@ -3,7 +3,7 @@ import { useState as v, useCallback as b, useEffect as T, useLayoutEffect as ie,
3
3
  import w from "@mui/material/Button";
4
4
  import Q from "@mui/material/Switch";
5
5
  import { styled as y } from "@mui/material/styles";
6
- import { T as K, w as O, p as f, d as D, D as N, S as R, a as V, u as M, M as C, b as X, h as ae, c as ce, e as le } from "./Surface-t4XKtudZ.js";
6
+ import { T as K, w as O, p as f, d as D, D as N, S as R, a as V, u as M, M as C, b as X, h as ae, c as ce, e as le } from "./Surface-RMXEkoG9.js";
7
7
  import { useQuery as de, useMutation as ue } from "@tanstack/react-query";
8
8
  import { AbyssCore as j } from "@abyss-project/main";
9
9
  import { createPortal as fe } from "react-dom";
@@ -1125,7 +1125,7 @@ const Xe = {
1125
1125
  MEMBERS_COUNT: "Membres",
1126
1126
  TEAM_COUNT: "Équipes",
1127
1127
  API_KEYS_COUNT: "Clés API",
1128
- LOG_EVENTS: "Événements logs / jour",
1128
+ LOG_EVENTS: "Événements logs / mois",
1129
1129
  APPLICATIONS: "Applications",
1130
1130
  RETENTION_DAYS: "Rétention (jours)",
1131
1131
  FILES_COUNT: "Fichiers",
@@ -1204,7 +1204,7 @@ const Xe = {
1204
1204
  "plan-feature": {
1205
1205
  PROJECTS_COUNT: "{unlimited, select, true {Projets illimités} other {{limit} projets}}",
1206
1206
  MEMBERS_COUNT: "{unlimited, select, true {Membres illimités} other {{limit} membres}}",
1207
- LOG_EVENTS: "{unlimited, select, true {Événements illimités} other {{limit, number} événements/jour}}",
1207
+ LOG_EVENTS: "{unlimited, select, true {Événements illimités} other {{limit, number} événements/mois}}",
1208
1208
  APPLICATIONS: "{unlimited, select, true {Applications illimitées} other {{limit} applications}}",
1209
1209
  RETENTION_DAYS: "{unlimited, select, true {Rétention illimitée} other {{limit} jours de rétention}}"
1210
1210
  }
@@ -3545,7 +3545,7 @@ const Xe = {
3545
3545
  MEMBERS_COUNT: "Members",
3546
3546
  TEAM_COUNT: "Teams",
3547
3547
  API_KEYS_COUNT: "API Keys",
3548
- LOG_EVENTS: "Log events / day",
3548
+ LOG_EVENTS: "Log events / month",
3549
3549
  APPLICATIONS: "Applications",
3550
3550
  RETENTION_DAYS: "Retention (days)",
3551
3551
  FILES_COUNT: "Files",
@@ -3624,7 +3624,7 @@ const Xe = {
3624
3624
  "plan-feature": {
3625
3625
  PROJECTS_COUNT: "{unlimited, select, true {Unlimited projects} other {{limit} projects}}",
3626
3626
  MEMBERS_COUNT: "{unlimited, select, true {Unlimited members} other {{limit} members}}",
3627
- LOG_EVENTS: "{unlimited, select, true {Unlimited events} other {{limit, number} events/day}}",
3627
+ LOG_EVENTS: "{unlimited, select, true {Unlimited events} other {{limit, number} events/month}}",
3628
3628
  APPLICATIONS: "{unlimited, select, true {Unlimited applications} other {{limit} applications}}",
3629
3629
  RETENTION_DAYS: "{unlimited, select, true {Unlimited retention} other {{limit} days retention}}"
3630
3630
  }
@@ -8,7 +8,7 @@ import Ja from "@mui/material/Select";
8
8
  import { styled as w, useTheme as Qa, getContrastRatio as Nt } from "@mui/material/styles";
9
9
  import { visuallyHidden as $t } from "@mui/utils";
10
10
  import { useIntl as ge } from "react-intl";
11
- import { p as c, h as me, d as Ce, D as Te, a as ve, t as Wn, s as ct, g as Ne, i as qe, c as qn, e as Hn, j as ei, B as ti } from "./Surface-t4XKtudZ.js";
11
+ import { p as c, h as me, d as Ce, D as Te, a as ve, t as Wn, s as ct, g as Ne, i as qe, c as qn, e as Hn, j as ei, B as ti } from "./Surface-RMXEkoG9.js";
12
12
  import Oe from "@mui/material/Button";
13
13
  import { byteSizeIEC as ni } from "@abyss-project/main";
14
14
  import ai from "@mui/icons-material/FileUploadOutlined";
@@ -7,8 +7,19 @@ export type MarkdownEditorProps = {
7
7
  externalValue?: string;
8
8
  onChange?: (md: string) => void;
9
9
  readOnly?: boolean;
10
- /** Uploads a file and returns its URL. */
10
+ /**
11
+ * Uploads a file and returns the value to store in the document for it: the file reference
12
+ * (`abyss-file:public-access/<id>`), never a URL on a host. Written as is in `![name](value)`
13
+ * or `[name](value)`.
14
+ */
11
15
  onUploadFile?: (file: File) => Promise<string>;
16
+ /**
17
+ * Turns a stored file value (a reference) into the URL the browser reads: an image is drawn
18
+ * from it and a click on a link to the file opens it, in editing and in reading. The document
19
+ * keeps the stored value; only what is shown is resolved. Absent: images and links are shown
20
+ * as stored.
21
+ */
22
+ resolveFileUrl?: (value: string) => string;
12
23
  enableImageUpload?: boolean;
13
24
  enableFileUpload?: boolean;
14
25
  } & CrepeConfig;
@@ -39,8 +50,19 @@ export declare const MarkdownEditor: React.ForwardRefExoticComponent<{
39
50
  externalValue?: string;
40
51
  onChange?: (md: string) => void;
41
52
  readOnly?: boolean;
42
- /** Uploads a file and returns its URL. */
53
+ /**
54
+ * Uploads a file and returns the value to store in the document for it: the file reference
55
+ * (`abyss-file:public-access/<id>`), never a URL on a host. Written as is in `![name](value)`
56
+ * or `[name](value)`.
57
+ */
43
58
  onUploadFile?: (file: File) => Promise<string>;
59
+ /**
60
+ * Turns a stored file value (a reference) into the URL the browser reads: an image is drawn
61
+ * from it and a click on a link to the file opens it, in editing and in reading. The document
62
+ * keeps the stored value; only what is shown is resolved. Absent: images and links are shown
63
+ * as stored.
64
+ */
65
+ resolveFileUrl?: (value: string) => string;
44
66
  enableImageUpload?: boolean;
45
67
  enableFileUpload?: boolean;
46
68
  } & CrepeConfig & React.RefAttributes<MarkdownEditorHandle>>;
@@ -1,5 +1,5 @@
1
- import { A as o, g as a, h as n, e as C, i as t, f as i, j as r, k as A, C as E, b as O, c as S, D as _, R as k, o as I, m as c, l as d, n as N, r as T, p as l, u as f, d as D, a as R, w as V } from "./CookieConsentSettings-BzeQZ5tD.js";
2
- import { f as p } from "./Surface-t4XKtudZ.js";
1
+ import { A as o, g as a, h as n, e as C, i as t, f as i, j as r, k as A, C as E, b as O, c as S, D as _, R as k, o as I, m as c, l as d, n as N, r as T, p as l, u as f, d as D, a as R, w as V } from "./CookieConsentSettings-Dkt9AlIo.js";
2
+ import { f as p } from "./Surface-RMXEkoG9.js";
3
3
  export {
4
4
  o as AbyssCookieConsentProvider,
5
5
  a as CONSENT_VALIDITY_DAYS,