@abyss-project/commons-front-core 1.0.143 → 1.0.146

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 (57) hide show
  1. package/dist/{CookieConsentSettings.component-DIIK_rRd.js → CookieConsentSettings.component-OElkXdNK.js} +182 -100
  2. package/dist/components/Inputs/AbyssScopeSwitcher/AbyssScopeSwitcher.component.d.ts +1 -0
  3. package/dist/components/Inputs/AbyssScopeSwitcher/scope-option.spec.d.ts +1 -0
  4. package/dist/components/Inputs/ContextSelector/ContextSelector.component.d.ts +43 -0
  5. package/dist/components/Inputs/ContextSelector/index.d.ts +2 -0
  6. package/dist/components/Inputs/DatePeriodPicker/DatePeriodPicker.component.d.ts +2 -0
  7. package/dist/components/Inputs/DatePeriodPicker/date-period-picker.logic.d.ts +16 -0
  8. package/dist/components/Inputs/DatePeriodPicker/date-period-picker.logic.spec.d.ts +1 -0
  9. package/dist/components/Inputs/LanguageFlagLabel/LanguageFlagLabel.component.d.ts +9 -0
  10. package/dist/components/Inputs/LanguageFlagLabel/index.d.ts +2 -0
  11. package/dist/components/Inputs/LanguageFlagLabel/language-flags.d.ts +2 -0
  12. package/dist/components/Inputs/index.d.ts +2 -0
  13. package/dist/components/Layouts/AbyssFamilyBanner/AbyssFamilyBanner.component.d.ts +24 -0
  14. package/dist/components/Layouts/AbyssFamilyBanner/AbyssFamilyBanner.logic.spec.d.ts +1 -0
  15. package/dist/components/Layouts/AbyssFamilyBanner/index.d.ts +2 -0
  16. package/dist/components/Layouts/index.d.ts +1 -0
  17. package/dist/components/Modals/AbyssModal/AbyssModal.component.d.ts +1 -0
  18. package/dist/components/Modals/UserSettingsModal/UserSettingsModal.component.d.ts +8 -0
  19. package/dist/components/Modals/UserSettingsModal/user-settings-modal.family.spec.d.ts +1 -0
  20. package/dist/components/QuotaReached/billing-quota-error.spec.d.ts +1 -0
  21. package/dist/components/Utils/AbyssFamilyMenuSection/AbyssFamilyMenuSection.d.ts +6 -0
  22. package/dist/components/Utils/AbyssFamilyMenuSection/AbyssFamilyMenuSection.spec.d.ts +1 -0
  23. package/dist/components/Utils/AbyssFamilyMenuSection/index.d.ts +1 -0
  24. package/dist/components/Utils/AbyssLayoutMenu/AbyssLayoutMenu.component.d.ts +7 -1
  25. package/dist/components/Utils/AbyssLayoutMenu/index.d.ts +1 -1
  26. package/dist/components/Utils/index.d.ts +1 -0
  27. package/dist/cookie-consent.js +1 -1
  28. package/dist/hooks/use-public-users.hook.d.ts +1 -0
  29. package/dist/hooks/use-public-users.hook.spec.d.ts +1 -0
  30. package/dist/hooks/use-rich-intl.hook.d.ts +80 -0
  31. package/dist/{index-Dbd_xKL4.js → index-0DKoS1Ho.js} +2 -2
  32. package/dist/{index-HKLND03d.js → index-BStJ2eR5.js} +2 -2
  33. package/dist/{index-0qb6YhgV.js → index-C-0bb3BS.js} +2 -2
  34. package/dist/{index-BpPAOM8y.js → index-C4iVvX_c.js} +1 -1
  35. package/dist/{index-D5bHj5Xy.js → index-CCaYRiXR.js} +2 -2
  36. package/dist/{index-ClzOO_BD.js → index-CTzGCHT1.js} +4 -4
  37. package/dist/{index-DgtjymrE.js → index-CWQyokns.js} +26568 -25493
  38. package/dist/{index-DZIEFA9C.js → index-C_VHuOIZ.js} +2 -2
  39. package/dist/{index-CMWMj2q-.js → index-CeZ2OKqT.js} +2 -2
  40. package/dist/{index-CrKObS9o.js → index-D-Z-Yepf.js} +2 -2
  41. package/dist/{index-Cbmdxst-.js → index-D-prSy8i.js} +3 -3
  42. package/dist/{index-1u1el1f5.js → index-DAG2YmhY.js} +2 -2
  43. package/dist/{index-CadocGiW.js → index-DMJCOIN6.js} +2 -2
  44. package/dist/{index-D7xEmIDx.js → index-DP9EENt-.js} +2 -2
  45. package/dist/{index-CYTUtJ1a.js → index-DPJn-INz.js} +2 -2
  46. package/dist/{index-BlAxx0qM.js → index-DedcVRIy.js} +4 -4
  47. package/dist/{index-CgrJ7FhF.js → index-HPIAkAU-.js} +2 -2
  48. package/dist/{index-eTVkFOlH.js → index-JqXrUnnS.js} +4 -4
  49. package/dist/{index-VTLXfj7y.js → index-VzGJqZUr.js} +3 -3
  50. package/dist/{index-ld9SEAyd.js → index-aJDianQ2.js} +3 -3
  51. package/dist/{index-rTu81tl5.js → index-paxe4Y8a.js} +2 -2
  52. package/dist/{index-DRhJX2fG.js → index-pojd1-xt.js} +3 -3
  53. package/dist/index.js +215 -208
  54. package/dist/translations/en.d.ts +40 -0
  55. package/dist/translations/family-i18n.spec.d.ts +1 -0
  56. package/dist/translations/fr.d.ts +40 -0
  57. package/package.json +3 -3
@@ -0,0 +1,2 @@
1
+ export { ContextSelector } from './ContextSelector.component';
2
+ export type { ContextSelectorProject, ContextSelectorOrganization, ContextSelectorPersonal, ContextSelectorData, ContextValue, ContextSelectorVariant, } from './ContextSelector.component';
@@ -1,3 +1,4 @@
1
+ import { Locale } from 'date-fns';
1
2
  import { default as React } from 'react';
2
3
  export type DatePeriodPreset = {
3
4
  label: string;
@@ -19,6 +20,7 @@ export type DatePeriodPickerProps = {
19
20
  endLabel?: string;
20
21
  hideSummary?: boolean;
21
22
  customLabel?: string;
23
+ locale?: Locale;
22
24
  };
23
25
  declare const DatePeriodPicker: React.FC<DatePeriodPickerProps>;
24
26
  export default DatePeriodPicker;
@@ -0,0 +1,16 @@
1
+ import { Locale } from 'date-fns';
2
+ export type EditingBound = 'start' | 'end';
3
+ export type RangeUpdateInput = {
4
+ editing: EditingBound;
5
+ picked: Date;
6
+ startDate: Date | null;
7
+ endDate: Date | null;
8
+ };
9
+ export type RangeUpdateResult = {
10
+ start: Date | null;
11
+ end: Date | null;
12
+ startChanged: boolean;
13
+ endChanged: boolean;
14
+ };
15
+ export declare const computeRangeUpdate: (input: RangeUpdateInput) => RangeUpdateResult;
16
+ export declare const resolveDateFnsLocale: (language?: string | null) => Locale;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ type Props = {
3
+ code: string;
4
+ label: string;
5
+ variant?: 'body1' | 'body2' | 'caption';
6
+ gap?: number;
7
+ };
8
+ export declare const LanguageFlagLabel: React.FC<Props>;
9
+ export default LanguageFlagLabel;
@@ -0,0 +1,2 @@
1
+ export { LanguageFlagLabel } from './LanguageFlagLabel.component';
2
+ export { LANGUAGE_FLAGS, getLanguageFlag } from './language-flags';
@@ -0,0 +1,2 @@
1
+ export declare const LANGUAGE_FLAGS: Record<string, string>;
2
+ export declare const getLanguageFlag: (language: string) => string;
@@ -15,3 +15,5 @@ export * from './ProjectTagChip';
15
15
  export * from './ProjectCategoryBadge';
16
16
  export * from './ProjectLinkSelector';
17
17
  export * from './AbyssScopeSwitcher';
18
+ export * from './LanguageFlagLabel';
19
+ export * from './ContextSelector';
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ export type FamilyBannerVariant = 'footer' | 'settings';
3
+ export type FamilyBannerStatus = 'none' | 'pending' | 'active' | 'owner';
4
+ export type CurrentFamilyInfo = {
5
+ id: string;
6
+ name: string;
7
+ role: string;
8
+ status: FamilyBannerStatus;
9
+ };
10
+ type Props = {
11
+ currentFamily?: CurrentFamilyInfo | null;
12
+ abyssUrl?: string;
13
+ variant: FamilyBannerVariant;
14
+ };
15
+ export declare function resolveBannerState(currentFamily: CurrentFamilyInfo | null | undefined): FamilyBannerStatus;
16
+ export declare function resolveCTAHref(currentFamily: CurrentFamilyInfo | null | undefined, abyssUrl: string | undefined): string;
17
+ export declare function resolveVariantLayout(variant: FamilyBannerVariant): {
18
+ isCompact: boolean;
19
+ showDescription: boolean;
20
+ showCardWrapper: boolean;
21
+ ctaAs: 'button' | 'link';
22
+ };
23
+ declare const AbyssFamilyBanner: React.FC<Props>;
24
+ export default AbyssFamilyBanner;
@@ -0,0 +1,2 @@
1
+ export { default as AbyssFamilyBanner } from './AbyssFamilyBanner.component';
2
+ export type { CurrentFamilyInfo, FamilyBannerStatus, FamilyBannerVariant, } from './AbyssFamilyBanner.component';
@@ -8,4 +8,5 @@ export * from './AbyssSidebar';
8
8
  export * from './AbyssThemeToggle';
9
9
  export * from './AbyssSearchBar';
10
10
  export * from './AbyssBillingPlan';
11
+ export * from './AbyssFamilyBanner';
11
12
  export * from './AbyssLoadingScreen';
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { DialogProps, SxProps } from '@mui/material';
3
3
  type Props = {
4
+ hideCloseButton?: boolean;
4
5
  disableCloseButton?: boolean;
5
6
  sxCloseButton?: SxProps;
6
7
  onClose?: () => void;
@@ -4,6 +4,12 @@ export type UserSettingsUser = {
4
4
  phone?: string | null;
5
5
  name?: string | null;
6
6
  familyName?: string | null;
7
+ currentFamily?: {
8
+ id: string;
9
+ name: string;
10
+ role: string;
11
+ status: 'none' | 'pending' | 'active' | 'owner';
12
+ } | null;
7
13
  };
8
14
  export type UserSettingsValues = {
9
15
  alias: string;
@@ -11,6 +17,7 @@ export type UserSettingsValues = {
11
17
  name: string;
12
18
  familyName: string;
13
19
  };
20
+ export declare function shouldRenderFamilyBanner(user: UserSettingsUser, overrideFamily?: UserSettingsUser['currentFamily']): boolean;
14
21
  type Props = {
15
22
  isOpen: boolean;
16
23
  onCancel: () => Promise<void>;
@@ -22,6 +29,7 @@ type Props = {
22
29
  abyssUrl: string;
23
30
  profileSuffix?: string;
24
31
  deleteAccountSuffix?: string;
32
+ currentFamily?: UserSettingsUser['currentFamily'];
25
33
  };
26
34
  declare const UserSettingsModal: React.FC<Props>;
27
35
  export default UserSettingsModal;
@@ -0,0 +1,6 @@
1
+ import { AbyssLayoutMenuSection } from '../AbyssLayoutMenu/AbyssLayoutMenu.component';
2
+ import { CurrentFamilyInfo } from '../../Layouts/AbyssFamilyBanner/AbyssFamilyBanner.component';
3
+ export declare function buildAbyssFamilyMenuSection(currentFamily: CurrentFamilyInfo | null | undefined, abyssUrl: string | undefined, labels?: {
4
+ title?: string;
5
+ createCta?: string;
6
+ }): AbyssLayoutMenuSection;
@@ -0,0 +1 @@
1
+ export { buildAbyssFamilyMenuSection } from './AbyssFamilyMenuSection';
@@ -16,7 +16,7 @@ export type AbyssLayoutMenuSection = {
16
16
  title?: string;
17
17
  elements: AbyssLayoutMenuElement[];
18
18
  };
19
- type AbyssLayoutMenuUser = {
19
+ export type AbyssLayoutMenuUser = {
20
20
  id?: string;
21
21
  alias?: string | null;
22
22
  name?: string | null;
@@ -24,6 +24,12 @@ type AbyssLayoutMenuUser = {
24
24
  billingAccount?: {
25
25
  planTemplate?: IPlanTemplate;
26
26
  } | null;
27
+ currentFamily?: {
28
+ id: string;
29
+ name: string;
30
+ role: string;
31
+ status: 'none' | 'pending' | 'active' | 'owner';
32
+ } | null;
27
33
  };
28
34
  type Props = {
29
35
  user?: AbyssLayoutMenuUser | null;
@@ -1,3 +1,3 @@
1
1
  export { default as AbyssLayoutMenu } from './AbyssLayoutMenu.component';
2
2
  export { AbyssMenuItem } from './AbyssMenuItem.component';
3
- export type { AbyssLayoutMenuSection, AbyssLayoutMenuElement } from './AbyssLayoutMenu.component';
3
+ export type { AbyssLayoutMenuSection, AbyssLayoutMenuElement, AbyssLayoutMenuUser } from './AbyssLayoutMenu.component';
@@ -8,3 +8,4 @@ export * from './Toast';
8
8
  export * from './AbyssHeaderTitle';
9
9
  export * from './AbyssLayoutMenu';
10
10
  export * from './AbyssErrorPage';
11
+ export * from './AbyssFamilyMenuSection';
@@ -1,4 +1,4 @@
1
- import { A as s, c as a, C as n, a as i, R as C, V as t, d as r, f as k, r as c, e as A, u as l, b, w as d } from "./CookieConsentSettings.component-DIIK_rRd.js";
1
+ import { A as s, c as a, C as n, a as i, R as C, V as t, d as r, f as k, r as c, e as A, u as l, b, w as d } from "./CookieConsentSettings.component-OElkXdNK.js";
2
2
  export {
3
3
  s as AbyssCookieConsentProvider,
4
4
  a as COOKIE_NAME,
@@ -6,6 +6,7 @@ export type PublicUser = {
6
6
  emailVerifiedAt: Date | null;
7
7
  };
8
8
  export declare const publicUserQueryKey: (userId: string) => readonly ["public-user", string];
9
+ export declare const fetchPublicUserBatched: (userId: string) => Promise<PublicUser | null>;
9
10
  export declare const usePublicUser: (userId: string | null | undefined) => UseQueryResult<PublicUser | null, Error>;
10
11
  export declare const usePublicUsers: (userIds: readonly (string | null | undefined)[]) => Record<string, PublicUser>;
11
12
  export declare const primePublicUsers: (queryClient: QueryClient, users: readonly PublicUser[]) => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -460,6 +460,7 @@ export declare const translations: {
460
460
  settings: string;
461
461
  billing: string;
462
462
  logout: string;
463
+ family: string;
463
464
  };
464
465
  scope: {
465
466
  personal: string;
@@ -472,6 +473,12 @@ export declare const translations: {
472
473
  decline: string;
473
474
  };
474
475
  };
476
+ 'context-selector': {
477
+ personal: string;
478
+ organization: string;
479
+ projects: string;
480
+ 'org-entry': string;
481
+ };
475
482
  general: {
476
483
  error: string;
477
484
  retry: string;
@@ -518,6 +525,22 @@ export declare const translations: {
518
525
  'theme-light': string;
519
526
  'theme-dark': string;
520
527
  };
528
+ table: {
529
+ 'rows-per-page': string;
530
+ 'displayed-rows': string;
531
+ 'displayed-rows-empty': string;
532
+ 'rows-count': string;
533
+ 'page-of': string;
534
+ search: string;
535
+ empty: string;
536
+ 'show-filters': string;
537
+ 'hide-filters': string;
538
+ 'clear-filters': string;
539
+ 'first-page': string;
540
+ 'previous-page': string;
541
+ 'next-page': string;
542
+ 'last-page': string;
543
+ };
521
544
  'file-importation': {
522
545
  'cloud-usage-metrics': {
523
546
  title: string;
@@ -1024,6 +1047,23 @@ export declare const translations: {
1024
1047
  'open-button-tooltip': string;
1025
1048
  };
1026
1049
  };
1050
+ family: {
1051
+ banner: {
1052
+ 'no-family': string;
1053
+ 'no-family-cta': string;
1054
+ pending: string;
1055
+ active: string;
1056
+ manage: string;
1057
+ 'owner-badge': string;
1058
+ 'coming-soon': string;
1059
+ settings: {
1060
+ 'no-family-description': string;
1061
+ 'pending-description': string;
1062
+ 'active-description': string;
1063
+ 'owner-description': string;
1064
+ };
1065
+ };
1066
+ };
1027
1067
  support: {
1028
1068
  status: {
1029
1069
  OPEN: string;
@@ -1674,6 +1714,7 @@ export declare const translations: {
1674
1714
  settings: string;
1675
1715
  billing: string;
1676
1716
  logout: string;
1717
+ family: string;
1677
1718
  };
1678
1719
  scope: {
1679
1720
  personal: string;
@@ -1686,6 +1727,12 @@ export declare const translations: {
1686
1727
  decline: string;
1687
1728
  };
1688
1729
  };
1730
+ 'context-selector': {
1731
+ personal: string;
1732
+ organization: string;
1733
+ projects: string;
1734
+ 'org-entry': string;
1735
+ };
1689
1736
  general: {
1690
1737
  error: string;
1691
1738
  retry: string;
@@ -1732,6 +1779,22 @@ export declare const translations: {
1732
1779
  'theme-light': string;
1733
1780
  'theme-dark': string;
1734
1781
  };
1782
+ table: {
1783
+ 'rows-per-page': string;
1784
+ 'displayed-rows': string;
1785
+ 'displayed-rows-empty': string;
1786
+ 'rows-count': string;
1787
+ 'page-of': string;
1788
+ search: string;
1789
+ empty: string;
1790
+ 'show-filters': string;
1791
+ 'hide-filters': string;
1792
+ 'clear-filters': string;
1793
+ 'first-page': string;
1794
+ 'previous-page': string;
1795
+ 'next-page': string;
1796
+ 'last-page': string;
1797
+ };
1735
1798
  'file-importation': {
1736
1799
  'cloud-usage-metrics': {
1737
1800
  title: string;
@@ -2429,6 +2492,23 @@ export declare const translations: {
2429
2492
  ABYSS_TOOLS: string;
2430
2493
  };
2431
2494
  };
2495
+ family: {
2496
+ banner: {
2497
+ 'no-family': string;
2498
+ 'no-family-cta': string;
2499
+ pending: string;
2500
+ active: string;
2501
+ manage: string;
2502
+ 'owner-badge': string;
2503
+ 'coming-soon': string;
2504
+ settings: {
2505
+ 'no-family-description': string;
2506
+ 'pending-description': string;
2507
+ 'active-description': string;
2508
+ 'owner-description': string;
2509
+ };
2510
+ };
2511
+ };
2432
2512
  };
2433
2513
  };
2434
2514
  export declare const flattenTranslations: {
@@ -1,5 +1,5 @@
1
- import { L as o, E as a } from "./index-BpPAOM8y.js";
2
- import { s as Z, t as Q, a as _, L as q, i as l, f as w, c as r, g as V } from "./index-DgtjymrE.js";
1
+ import { L as o, E as a } from "./index-C4iVvX_c.js";
2
+ import { s as Z, t as Q, a as _, L as q, i as l, f as w, c as r, g as V } from "./index-CWQyokns.js";
3
3
  const g = 1, R = 2, b = 3, y = 4, T = 5, s = 98, c = 101, v = 102, t = 114, p = 69, X = 48, W = 46, d = 43, f = 45, Y = 35, z = 34, x = 124, U = 60, h = 62;
4
4
  function n(O) {
5
5
  return O >= 48 && O <= 57;
@@ -1,5 +1,5 @@
1
- import { L as s } from "./index-BpPAOM8y.js";
2
- import { s as n, t as r, a as o, L as P, i as Q, f as i, c as a, g as c } from "./index-DgtjymrE.js";
1
+ import { L as s } from "./index-C4iVvX_c.js";
2
+ import { s as n, t as r, a as o, L as P, i as Q, f as i, c as a, g as c } from "./index-CWQyokns.js";
3
3
  const g = n({
4
4
  String: r.string,
5
5
  Number: r.number,
@@ -1,5 +1,5 @@
1
- import { L as r } from "./index-BpPAOM8y.js";
2
- import { s as e, t as O, a as s, L as X, i as l, f as Y, c as $, j as S, m as o, g as t } from "./index-DgtjymrE.js";
1
+ import { L as r } from "./index-C4iVvX_c.js";
2
+ import { s as e, t as O, a as s, L as X, i as l, f as Y, c as $, j as S, m as o, g as t } from "./index-CWQyokns.js";
3
3
  const Z = e({
4
4
  null: O.null,
5
5
  instanceof: O.operatorKeyword,
@@ -1,4 +1,4 @@
1
- import { P as L, N as M, k as $, D as E, l as y, T as S, I as j } from "./index-DgtjymrE.js";
1
+ import { P as L, N as M, k as $, D as E, l as y, T as S, I as j } from "./index-CWQyokns.js";
2
2
  class v {
3
3
  /**
4
4
  @internal
@@ -1,5 +1,5 @@
1
- import { a as O, L as r, i as b, f as s, s as a, j as t, g as P, t as e } from "./index-DgtjymrE.js";
2
- import { L as n } from "./index-BpPAOM8y.js";
1
+ import { a as O, L as r, i as b, f as s, s as a, j as t, g as P, t as e } from "./index-CWQyokns.js";
2
+ import { L as n } from "./index-C4iVvX_c.js";
3
3
  const S = { __proto__: null, anyref: 34, dataref: 34, eqref: 34, externref: 34, i31ref: 34, funcref: 34, i8: 34, i16: 34, i32: 34, i64: 34, f32: 34, f64: 34 }, i = /* @__PURE__ */ n.deserialize({
4
4
  version: 14,
5
5
  states: "!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h",
@@ -1,7 +1,7 @@
1
- import { L as be, E as $, C as Pe } from "./index-BpPAOM8y.js";
2
- import { p as xe, s as Te, t as h, E as Ve, a as we, L as ye, e as K, h as ve, i as Xe, f as ke, H as $e } from "./index-DgtjymrE.js";
3
- import { cssLanguage as J, css as _e } from "./index-1u1el1f5.js";
4
- import { typescriptLanguage as qe, jsxLanguage as Ce, tsxLanguage as Qe, javascriptLanguage as R, javascript as Ae } from "./index-CgrJ7FhF.js";
1
+ import { L as be, E as $, C as Pe } from "./index-C4iVvX_c.js";
2
+ import { p as xe, s as Te, t as h, E as Ve, a as we, L as ye, e as K, h as ve, i as Xe, f as ke, H as $e } from "./index-CWQyokns.js";
3
+ import { cssLanguage as J, css as _e } from "./index-DAG2YmhY.js";
4
+ import { typescriptLanguage as qe, jsxLanguage as Ce, tsxLanguage as Qe, javascriptLanguage as R, javascript as Ae } from "./index-HPIAkAU-.js";
5
5
  const Ye = 54, Me = 1, Re = 55, Ee = 2, Ze = 56, Be = 3, z = 4, ze = 5, X = 6, ee = 7, te = 8, ae = 9, le = 10, We = 11, De = 12, Ne = 13, _ = 57, Ge = 14, W = 58, re = 20, Ie = 22, ne = 23, je = 24, Y = 26, se = 27, Ue = 28, Le = 31, Fe = 34, He = 36, Ke = 37, Je = 0, et = 1, tt = {
6
6
  area: !0,
7
7
  base: !0,