@abyss-project/commons-front-core 2.0.4 → 2.0.5

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 (56) hide show
  1. package/dist/{CookieConsentSettings.component-DVCoCodG.js → CookieConsentSettings.component-Babyi3W7.js} +234 -148
  2. package/dist/assets/logo/index.d.ts +2 -0
  3. package/dist/components/CommandPalette/AbyssCommandPalette.d.ts +3 -0
  4. package/dist/components/CommandPalette/index.d.ts +3 -0
  5. package/dist/components/CommandPalette/types.d.ts +41 -0
  6. package/dist/components/CommandPalette/useCommandPaletteHotkey.d.ts +1 -0
  7. package/dist/components/Data/AbyssTable/AbyssTable.component.d.ts +5 -1
  8. package/dist/components/Data/AbyssTable/abyss-table.logic.d.ts +8 -0
  9. package/dist/components/Data/AbyssTable/abyss-table.logic.spec.d.ts +1 -0
  10. package/dist/components/Data/AbyssTable/index.d.ts +1 -1
  11. package/dist/components/Inputs/AbyssNumberField/format.d.ts +7 -0
  12. package/dist/components/Inputs/AbyssNumberField/format.spec.d.ts +1 -0
  13. package/dist/components/Support/SupportCategoryChip.component.d.ts +1 -0
  14. package/dist/components/Support/SupportStatusTimeline.component.d.ts +8 -0
  15. package/dist/components/Support/support-attachment.logic.d.ts +2 -0
  16. package/dist/components/Support/support-attachment.logic.spec.d.ts +1 -0
  17. package/dist/components/Support/support-author.logic.d.ts +4 -0
  18. package/dist/components/Support/support-author.logic.spec.d.ts +1 -0
  19. package/dist/components/Support/support-create-stepper.logic.d.ts +2 -0
  20. package/dist/components/Support/support-create-stepper.logic.spec.d.ts +1 -0
  21. package/dist/components/Support/support-message-input.logic.d.ts +7 -0
  22. package/dist/components/Support/support-message-input.logic.spec.d.ts +1 -0
  23. package/dist/components/Support/support-status-timeline.logic.d.ts +9 -0
  24. package/dist/components/Support/support-status-timeline.logic.spec.d.ts +1 -0
  25. package/dist/components/Support/types.d.ts +11 -0
  26. package/dist/components/index.d.ts +1 -0
  27. package/dist/cookie-consent.js +1 -1
  28. package/dist/hooks/use-rich-intl.hook.d.ts +1637 -8
  29. package/dist/{index-DdQmheMd.js → index-8yeiMsN2.js} +2 -2
  30. package/dist/{index-DTvT-pSd.js → index-B5_AMDvn.js} +2 -2
  31. package/dist/{index-BdPBT9wT.js → index-B6HSnKic.js} +4 -4
  32. package/dist/{index-Cb8bNozc.js → index-B899a19q.js} +2 -2
  33. package/dist/{index-B9whHwJH.js → index-BPBq7o9R.js} +2 -2
  34. package/dist/{index-5k64joRw.js → index-BZZzNup7.js} +2 -2
  35. package/dist/{index-1zDS0iEh.js → index-Bck6bTkX.js} +4 -4
  36. package/dist/{index-Do3-0Q46.js → index-BhERZKZL.js} +2 -2
  37. package/dist/{index-BEHOwNBI.js → index-BlBO8RTR.js} +2 -2
  38. package/dist/{index-CnObY2fJ.js → index-BpfMLh3g.js} +3 -3
  39. package/dist/{index-CUPsXzwL.js → index-CKKJ_tQH.js} +3 -3
  40. package/dist/{index-sizp2HZr.js → index-C_ItzEqZ.js} +2 -2
  41. package/dist/{index-C73ogXrJ.js → index-CwQu80hq.js} +46886 -45868
  42. package/dist/{index-jvUBv7pK.js → index-D3OGRmMG.js} +2 -2
  43. package/dist/{index-3YimkuCN.js → index-D4JrV75A.js} +3 -3
  44. package/dist/{index-65A77dq7.js → index-DQYsp1ra.js} +1 -1
  45. package/dist/{index-BHN85JYH.js → index-DmY-WbY8.js} +2 -2
  46. package/dist/{index-DOkPKk_l.js → index-FykPQo4w.js} +2 -2
  47. package/dist/{index-DOlx6Vms.js → index-pdKyXaVF.js} +3 -3
  48. package/dist/{index-irVSvSqH.js → index-vWfRDX8u.js} +4 -4
  49. package/dist/{index-D1Ff3bz9.js → index-y87yi7Ik.js} +2 -2
  50. package/dist/{index-mfuPigV5.js → index-yvn0gNA4.js} +2 -2
  51. package/dist/index.js +241 -237
  52. package/dist/translations/en.d.ts +48 -5
  53. package/dist/translations/fr.d.ts +48 -5
  54. package/dist/translations/quota-reached-i18n-coverage.spec.d.ts +1 -0
  55. package/dist/utils/color.utils.d.ts +1 -0
  56. package/package.json +1 -1
@@ -11,6 +11,8 @@ export { default as AbyssBoard } from './AbyssBoard.svg';
11
11
  export { default as AbyssCodex } from './AbyssCodex.svg';
12
12
  export { default as AbyssShortLinks } from './AbyssShortLinks.svg';
13
13
  export { default as AbyssRetro } from './AbyssRetro.svg';
14
+ export { default as AbyssBeam } from './AbyssBeam.svg';
15
+ export { default as AbyssExtract } from './AbyssExtract.svg';
14
16
  export { default as AbyssTrainingLogo } from './AbyssTraining.svg';
15
17
  export { default as AbyssHealthLogo } from './AbyssHealth.svg';
16
18
  export { default as AbyssConsoleLogo } from './AbyssConsole.svg';
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { AbyssCommandPaletteProps } from './types';
3
+ export declare const AbyssCommandPalette: FC<AbyssCommandPaletteProps>;
@@ -0,0 +1,3 @@
1
+ export { AbyssCommandPalette } from './AbyssCommandPalette';
2
+ export { useCommandPaletteHotkey } from './useCommandPaletteHotkey';
3
+ export type { AbyssCommandPaletteProps, AbyssCommandPaletteGroup, AbyssCommandPaletteItem, AbyssCommandPaletteSelectMeta, AbyssCommandPaletteHighlightVariant, } from './types';
@@ -0,0 +1,41 @@
1
+ import { ElementType, ReactNode } from 'react';
2
+ import { DialogProps } from '@mui/material';
3
+ import { SxProps, Theme } from '@mui/material/styles';
4
+ export interface AbyssCommandPaletteItem {
5
+ id: string;
6
+ title: string;
7
+ subtitle?: string;
8
+ icon?: ReactNode;
9
+ trailing?: ReactNode;
10
+ href?: string;
11
+ }
12
+ export interface AbyssCommandPaletteGroup {
13
+ key: string;
14
+ label: string;
15
+ items: AbyssCommandPaletteItem[];
16
+ }
17
+ export type AbyssCommandPaletteHighlightVariant = 'filled' | 'accent';
18
+ export interface AbyssCommandPaletteSelectMeta {
19
+ source: 'click' | 'keyboard';
20
+ viaAnchor: boolean;
21
+ }
22
+ export interface AbyssCommandPaletteProps {
23
+ open: boolean;
24
+ onClose: () => void;
25
+ query: string;
26
+ onQueryChange: (query: string) => void;
27
+ groups: AbyssCommandPaletteGroup[];
28
+ onSelect: (item: AbyssCommandPaletteItem, groupKey: string, meta: AbyssCommandPaletteSelectMeta) => void;
29
+ isLoading?: boolean;
30
+ placeholder: string;
31
+ emptyLabel: string;
32
+ loadingLabel?: string;
33
+ footerHints?: ReactNode;
34
+ maxHeight?: number | string;
35
+ inputTrailing?: ReactNode;
36
+ highlightVariant?: AbyssCommandPaletteHighlightVariant;
37
+ linkComponent?: ElementType;
38
+ fullScreen?: boolean;
39
+ paperSx?: SxProps<Theme>;
40
+ slotProps?: DialogProps['slotProps'];
41
+ }
@@ -0,0 +1 @@
1
+ export declare const useCommandPaletteHotkey: (onOpen: () => void, enabled?: boolean) => void;
@@ -22,6 +22,10 @@ export type AbyssTableProps<TData extends object> = {
22
22
  onPageChange?: (page: number) => void;
23
23
  onPageSizeChange?: (pageSize: number) => void;
24
24
  filters?: AbyssTableFilterDef[];
25
+ onSearchChange?: (value: string) => void;
26
+ searchValue?: string;
27
+ searchPlaceholder?: string;
28
+ searchDebounceMs?: number;
25
29
  emptyMessage?: string;
26
30
  emptyContent?: ReactNode;
27
31
  onRowClick?: (row: TData) => void;
@@ -31,5 +35,5 @@ export type AbyssTableProps<TData extends object> = {
31
35
  isLoading?: boolean;
32
36
  renderAboveTable?: ReactNode;
33
37
  };
34
- declare function AbyssTable<TData extends object>({ data, columns, enableGlobalFilter, enableColumnFilters, enableSorting, enablePagination, defaultPageSize, pageSizeOptions, manualPagination, pageCount: externalPageCount, totalItems: externalTotalItems, currentPage: externalCurrentPage, onPageChange, onPageSizeChange, filters, emptyMessage, emptyContent, onRowClick, sx, tableLabel, getRowSx, isLoading, renderAboveTable, }: AbyssTableProps<TData>): React.JSX.Element;
38
+ declare function AbyssTable<TData extends object>({ data, columns, enableGlobalFilter, enableColumnFilters, enableSorting, enablePagination, defaultPageSize, pageSizeOptions, manualPagination, pageCount: externalPageCount, totalItems: externalTotalItems, currentPage: externalCurrentPage, onPageChange, onPageSizeChange, filters, onSearchChange, searchValue, searchPlaceholder, searchDebounceMs, emptyMessage, emptyContent, onRowClick, sx, tableLabel, getRowSx, isLoading, renderAboveTable, }: AbyssTableProps<TData>): React.JSX.Element;
35
39
  export default AbyssTable;
@@ -0,0 +1,8 @@
1
+ export interface ResolvePageIndexParams {
2
+ manualPagination: boolean;
3
+ externalCurrentPage?: number;
4
+ internalPageIndex: number;
5
+ }
6
+ export declare function resolvePageIndex({ manualPagination, externalCurrentPage, internalPageIndex, }: ResolvePageIndexParams): number;
7
+ export declare function shouldUseServerSearch(onSearchChange?: (value: string) => void): boolean;
8
+ export declare function resolveSearchPlaceholder(searchPlaceholder: string | undefined, fallback: string): string;
@@ -1,2 +1,2 @@
1
1
  export { default as AbyssTable } from './AbyssTable.component';
2
- export type { AbyssTableProps, AbyssTableFilterDef } from './AbyssTable.component';
2
+ export type { AbyssTableProps, AbyssTableFilterDef, } from './AbyssTable.component';
@@ -0,0 +1,7 @@
1
+ export interface LocaleSeparators {
2
+ group: string;
3
+ decimal: string;
4
+ }
5
+ export declare function getLocaleSeparators(locale: string): LocaleSeparators;
6
+ export declare function formatNumberValue(value: number | null | undefined, decimals: number, separators: LocaleSeparators): string;
7
+ export declare function parseNumberInput(raw: string | null | undefined, separators: LocaleSeparators): number | null;
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { SupportTicketCategory, SupportTicketCategoryGroup } from '@abyss-project/main';
2
3
  import { SupportCategoryChipProps } from './types';
3
4
  export declare const getCategoryGroup: (category: SupportTicketCategory) => SupportTicketCategoryGroup;
4
5
  export declare const getCategoryConfig: (category: SupportTicketCategory) => {
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { SupportTicketStatus } from '@abyss-project/main';
3
+ interface SupportStatusTimelineProps {
4
+ status: SupportTicketStatus;
5
+ currentStatusLabel: string;
6
+ }
7
+ export declare const SupportStatusTimeline: React.FC<SupportStatusTimelineProps>;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const isImageAttachment: (mimeType: string) => boolean;
2
+ export declare const isViewableAttachment: (mimeType: string) => boolean;
@@ -0,0 +1,4 @@
1
+ export interface AuthorIdentitySource {
2
+ alias?: string | null;
3
+ }
4
+ export declare const resolveAuthorAlias: (publicUser: AuthorIdentitySource | undefined, entityAlias: string | null | undefined) => string | null;
@@ -0,0 +1,2 @@
1
+ export type SupportCreateSubmitIntent = 'submit' | 'advance';
2
+ export declare const resolveCreateSubmitIntent: (isLastStep: boolean) => SupportCreateSubmitIntent;
@@ -0,0 +1,7 @@
1
+ export interface SendOnKeyDownEvent {
2
+ key: string;
3
+ ctrlKey: boolean;
4
+ metaKey: boolean;
5
+ shiftKey?: boolean;
6
+ }
7
+ export declare const shouldSendOnKeyDown: (e: SendOnKeyDownEvent) => boolean;
@@ -0,0 +1,9 @@
1
+ import { SupportTicketStatus } from '@abyss-project/main';
2
+ export type SupportTimelinePhaseKey = 'open' | 'in-progress' | 'resolved' | 'closed';
3
+ export declare const SUPPORT_TIMELINE_STEPS: ReadonlyArray<{
4
+ key: SupportTimelinePhaseKey;
5
+ statuses: readonly SupportTicketStatus[];
6
+ }>;
7
+ export declare const supportStatusStepIndex: (status: SupportTicketStatus) => number;
8
+ export type SupportTimelineAccentKind = 'error' | 'warning' | 'muted' | 'brand';
9
+ export declare const supportStatusAccentKind: (status: SupportTicketStatus) => SupportTimelineAccentKind;
@@ -84,6 +84,7 @@ export interface SupportTicketCreateStepperValues extends SupportTicketCreateVal
84
84
  projectId?: string | null;
85
85
  userId?: string | null;
86
86
  organizationId?: string | null;
87
+ attachments?: File[];
87
88
  }
88
89
  export interface SupportTicketCreateStepperProps {
89
90
  onSubmit: (values: SupportTicketCreateStepperValues) => void | Promise<void>;
@@ -143,6 +144,8 @@ export interface SupportAttachmentsPanelProps extends SupportCloudImportProps {
143
144
  onUpload?: (file: File) => void;
144
145
  onDelete?: (attachmentId: string) => void;
145
146
  onDownload?: (attachment: ISupportTicketAttachment) => void;
147
+ onOpenAttachment?: (attachment: ISupportTicketAttachment) => void;
148
+ getAttachmentPreviewUrl?: (attachment: ISupportTicketAttachment) => Promise<string | null>;
146
149
  isUploading?: boolean;
147
150
  maxAttachments?: number;
148
151
  renderScanStatusBadge?: (attachment: ISupportTicketAttachment) => ReactNode;
@@ -175,6 +178,8 @@ export interface SupportSidebarProps extends SupportCloudImportProps {
175
178
  onUploadAttachment?: (file: File) => void;
176
179
  onDeleteAttachment?: (attachmentId: string) => void;
177
180
  onDownloadAttachment?: (attachment: ISupportTicketAttachment) => void;
181
+ onOpenAttachment?: (attachment: ISupportTicketAttachment) => void;
182
+ getAttachmentPreviewUrl?: (attachment: ISupportTicketAttachment) => Promise<string | null>;
178
183
  isUploadingAttachment?: boolean;
179
184
  publicUsers?: Record<string, {
180
185
  alias?: string | null;
@@ -195,6 +200,8 @@ export interface SupportSidebarProps extends SupportCloudImportProps {
195
200
  id: string;
196
201
  name: string;
197
202
  } | null;
203
+ onNavigateToUser?: (userId: string) => void;
204
+ onNavigateToOrganization?: (organizationId: string) => void;
198
205
  onViewContext?: (contextType: string, contextId: string) => void;
199
206
  renderScanStatusBadge?: (attachment: ISupportTicketAttachment) => ReactNode;
200
207
  }
@@ -220,6 +227,8 @@ export interface SupportTicketDetailProps extends SupportCloudImportProps {
220
227
  onUploadAttachment?: (file: File) => void;
221
228
  onDeleteAttachment?: (attachmentId: string) => void;
222
229
  onDownloadAttachment?: (attachment: ISupportTicketAttachment) => void;
230
+ onOpenAttachment?: (attachment: ISupportTicketAttachment) => void;
231
+ getAttachmentPreviewUrl?: (attachment: ISupportTicketAttachment) => Promise<string | null>;
223
232
  isUploadingAttachment?: boolean;
224
233
  publicUsers?: Record<string, {
225
234
  alias?: string | null;
@@ -241,6 +250,8 @@ export interface SupportTicketDetailProps extends SupportCloudImportProps {
241
250
  name: string;
242
251
  } | null;
243
252
  onUploadMessageAttachment?: (file: File) => void;
253
+ onNavigateToUser?: (userId: string) => void;
254
+ onNavigateToOrganization?: (organizationId: string) => void;
244
255
  onViewContext?: (contextType: string, contextId: string) => void;
245
256
  renderScanStatusBadge?: (attachment: ISupportTicketAttachment) => ReactNode;
246
257
  }
@@ -3,6 +3,7 @@ export * from './Banking';
3
3
  export * from './Cards';
4
4
  export * from './Charts';
5
5
  export * from './Chips';
6
+ export * from './CommandPalette';
6
7
  export * from './CookieConsent';
7
8
  export * from './Data';
8
9
  export * from './InfoBox';
@@ -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-DVCoCodG.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-Babyi3W7.js";
2
2
  export {
3
3
  s as AbyssCookieConsentProvider,
4
4
  a as COOKIE_NAME,