@abyss-project/commons-front-core 1.0.144 → 1.0.147

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 (82) hide show
  1. package/dist/{CookieConsentSettings.component-DIIK_rRd.js → CookieConsentSettings.component-Dkw8Ye0E.js} +304 -162
  2. package/dist/components/Avatars/OrganizationAvatar/OrganizationAvatar.component.d.ts +3 -2
  3. package/dist/components/Avatars/ProjectAvatar/ProjectAvatar.component.d.ts +3 -2
  4. package/dist/components/Avatars/UserAvatar/UserAvatar.component.d.ts +3 -2
  5. package/dist/components/InfoBox/InfoBox.component.d.ts +1 -1
  6. package/dist/components/Inputs/AbyssNumberField/AbyssNumberField.component.d.ts +2 -1
  7. package/dist/components/Inputs/AbyssScopeSwitcher/AbyssScopeSwitcher.component.d.ts +1 -0
  8. package/dist/components/Inputs/AbyssScopeSwitcher/scope-option.spec.d.ts +1 -0
  9. package/dist/components/Inputs/ContextSelector/ContextSelector.component.d.ts +43 -0
  10. package/dist/components/Inputs/ContextSelector/index.d.ts +2 -0
  11. package/dist/components/Inputs/DatePeriodPicker/DatePeriodPicker.component.d.ts +2 -0
  12. package/dist/components/Inputs/DatePeriodPicker/date-period-picker.logic.d.ts +16 -0
  13. package/dist/components/Inputs/DatePeriodPicker/date-period-picker.logic.spec.d.ts +1 -0
  14. package/dist/components/Inputs/LanguageFlagLabel/LanguageFlagLabel.component.d.ts +9 -0
  15. package/dist/components/Inputs/LanguageFlagLabel/index.d.ts +2 -0
  16. package/dist/components/Inputs/LanguageFlagLabel/language-flags.d.ts +2 -0
  17. package/dist/components/Inputs/PasswordInput/PasswordInput.component.d.ts +3 -2
  18. package/dist/components/Inputs/index.d.ts +2 -0
  19. package/dist/components/Layouts/AbyssBillingPlan/AbyssBillingPlan.component.d.ts +1 -1
  20. package/dist/components/Layouts/AbyssFamilyBanner/AbyssFamilyBanner.component.d.ts +24 -0
  21. package/dist/components/Layouts/AbyssFamilyBanner/AbyssFamilyBanner.logic.spec.d.ts +1 -0
  22. package/dist/components/Layouts/AbyssFamilyBanner/index.d.ts +2 -0
  23. package/dist/components/Layouts/index.d.ts +1 -0
  24. package/dist/components/Modals/AbyssModal/AbyssModal.component.d.ts +1 -0
  25. package/dist/components/Modals/UserSettingsModal/UserSettings.compat.d.ts +2 -1
  26. package/dist/components/Modals/UserSettingsModal/UserSettingsModal.component.d.ts +8 -0
  27. package/dist/components/Modals/UserSettingsModal/user-settings-modal.family.spec.d.ts +1 -0
  28. package/dist/components/PdfEditor/operations/actions.d.ts +14 -0
  29. package/dist/components/PdfEditor/operations/rotate-coords.d.ts +19 -0
  30. package/dist/components/PdfEditor/operations/rotate-coords.spec.d.ts +1 -0
  31. package/dist/components/PdfEditor/signature/SignaturePicker.d.ts +3 -0
  32. package/dist/components/PdfEditor/signature/SignatureSavedList.d.ts +3 -0
  33. package/dist/components/PdfEditor/signature/resolve-asset.d.ts +3 -0
  34. package/dist/components/PdfEditor/signature/resolve-asset.spec.d.ts +1 -0
  35. package/dist/components/PdfEditor/tools/FillFieldsTool.d.ts +2 -1
  36. package/dist/components/PdfEditor/tools/SignatureTool.d.ts +3 -0
  37. package/dist/components/PdfEditor/tools/Toolbar.d.ts +6 -0
  38. package/dist/components/PdfEditor/types.d.ts +13 -5
  39. package/dist/components/PdfEditor/viewer/PageOverlay.d.ts +3 -1
  40. package/dist/components/PdfEditor/viewer/PdfCanvas.d.ts +6 -2
  41. package/dist/components/PdfEditor/viewer/ViewerControls.d.ts +15 -0
  42. package/dist/components/QuotaReached/billing-quota-error.spec.d.ts +1 -0
  43. package/dist/components/Support/types.d.ts +6 -6
  44. package/dist/components/Utils/AbyssDrawer/AbyssDrawer.component.d.ts +2 -1
  45. package/dist/components/Utils/AbyssFamilyMenuSection/AbyssFamilyMenuSection.d.ts +6 -0
  46. package/dist/components/Utils/AbyssFamilyMenuSection/AbyssFamilyMenuSection.spec.d.ts +1 -0
  47. package/dist/components/Utils/AbyssFamilyMenuSection/index.d.ts +1 -0
  48. package/dist/components/Utils/AbyssLayoutMenu/AbyssLayoutMenu.component.d.ts +7 -1
  49. package/dist/components/Utils/AbyssLayoutMenu/index.d.ts +1 -1
  50. package/dist/components/Utils/index.d.ts +1 -0
  51. package/dist/cookie-consent.js +1 -1
  52. package/dist/hooks/confirm-modal/confirm-modal.context.d.ts +3 -3
  53. package/dist/hooks/use-public-users.hook.d.ts +1 -0
  54. package/dist/hooks/use-public-users.hook.spec.d.ts +1 -0
  55. package/dist/hooks/use-rich-intl.hook.d.ts +172 -0
  56. package/dist/{index-0qb6YhgV.js → index-2CKJrPca.js} +2 -2
  57. package/dist/{index-CgrJ7FhF.js → index-B3Q0CXvH.js} +2 -2
  58. package/dist/{index-rTu81tl5.js → index-BHkn2ltL.js} +2 -2
  59. package/dist/{index-eTVkFOlH.js → index-BL7GRhPa.js} +4 -4
  60. package/dist/{index-DgtjymrE.js → index-BOsYmSCD.js} +31144 -29328
  61. package/dist/{index-DRhJX2fG.js → index-BW9Bye_5.js} +3 -3
  62. package/dist/{index-VTLXfj7y.js → index-BqukycfU.js} +3 -3
  63. package/dist/{index-CYTUtJ1a.js → index-C2KsBRfQ.js} +2 -2
  64. package/dist/{index-D7xEmIDx.js → index-CaN4t0Xc.js} +2 -2
  65. package/dist/{index-1u1el1f5.js → index-CrfvkYYN.js} +2 -2
  66. package/dist/{index-CrKObS9o.js → index-Cx0vAIWv.js} +2 -2
  67. package/dist/{index-Cbmdxst-.js → index-D8zo5pJ7.js} +3 -3
  68. package/dist/{index-HKLND03d.js → index-DBRSsvnV.js} +2 -2
  69. package/dist/{index-BpPAOM8y.js → index-DCJSXRWb.js} +1 -1
  70. package/dist/{index-ClzOO_BD.js → index-DCjRpdx3.js} +4 -4
  71. package/dist/{index-CMWMj2q-.js → index-DFfm18gp.js} +2 -2
  72. package/dist/{index-CadocGiW.js → index-DayoEcuw.js} +2 -2
  73. package/dist/{index-D5bHj5Xy.js → index-Dn-WBCKE.js} +2 -2
  74. package/dist/{index-ld9SEAyd.js → index-EZoUoL9o.js} +3 -3
  75. package/dist/{index-BlAxx0qM.js → index-GG9dANvs.js} +4 -4
  76. package/dist/{index-Dbd_xKL4.js → index-HwfQ82MI.js} +2 -2
  77. package/dist/{index-DZIEFA9C.js → index-xJbVPHgr.js} +2 -2
  78. package/dist/index.js +215 -208
  79. package/dist/translations/en.d.ts +70 -0
  80. package/dist/translations/family-i18n.spec.d.ts +1 -0
  81. package/dist/translations/fr.d.ts +70 -0
  82. package/package.json +4 -4
@@ -1,10 +1,11 @@
1
1
  import { SxProps } from '@mui/material';
2
+ import { FC, ReactNode } from 'react';
2
3
  export type OrganizationAvatarProfileInfo = {
3
4
  createdAt?: string;
4
5
  projectCount?: number;
5
6
  memberCount?: number;
6
7
  integrations?: string[];
7
- extra?: React.ReactNode;
8
+ extra?: ReactNode;
8
9
  };
9
10
  type Props = {
10
11
  orgId: string;
@@ -19,5 +20,5 @@ type Props = {
19
20
  profileInfo?: OrganizationAvatarProfileInfo;
20
21
  onClick?: () => void;
21
22
  };
22
- declare const OrganizationAvatar: React.FC<Props>;
23
+ declare const OrganizationAvatar: FC<Props>;
23
24
  export default OrganizationAvatar;
@@ -1,4 +1,5 @@
1
1
  import { SxProps } from '@mui/material';
2
+ import { FC, ReactNode } from 'react';
2
3
  export type ProjectAvatarProfileInfo = {
3
4
  description?: string;
4
5
  memberCount?: number;
@@ -8,7 +9,7 @@ export type ProjectAvatarProfileInfo = {
8
9
  createdAt?: string;
9
10
  onGoToOrg?: () => void;
10
11
  onGoToProject?: () => void;
11
- extra?: React.ReactNode;
12
+ extra?: ReactNode;
12
13
  };
13
14
  type Props = {
14
15
  projectId: string;
@@ -21,5 +22,5 @@ type Props = {
21
22
  profileInfo?: ProjectAvatarProfileInfo;
22
23
  onClick?: () => void;
23
24
  };
24
- declare const ProjectAvatar: React.FC<Props>;
25
+ declare const ProjectAvatar: FC<Props>;
25
26
  export default ProjectAvatar;
@@ -1,10 +1,11 @@
1
1
  import { SxProps } from '@mui/material';
2
+ import { FC, ReactNode } from 'react';
2
3
  export type UserAvatarProfileInfo = {
3
4
  email?: string;
4
5
  role?: string;
5
6
  status?: 'online' | 'offline' | 'away';
6
7
  joinedAt?: string;
7
- extra?: React.ReactNode;
8
+ extra?: ReactNode;
8
9
  };
9
10
  type Props = {
10
11
  userId: string;
@@ -17,5 +18,5 @@ type Props = {
17
18
  profileInfo?: UserAvatarProfileInfo;
18
19
  onClick?: () => void;
19
20
  };
20
- declare const UserAvatar: React.FC<Props>;
21
+ declare const UserAvatar: FC<Props>;
21
22
  export default UserAvatar;
@@ -1,5 +1,5 @@
1
- import { BoxProps } from '@mui/material';
2
1
  import { FC } from 'react';
2
+ import { BoxProps } from '@mui/material';
3
3
  export declare const InfoBox: FC<BoxProps>;
4
4
  export declare const ErrorInfoBox: FC<BoxProps>;
5
5
  export declare const WarnInfoBox: FC<BoxProps>;
@@ -1,4 +1,5 @@
1
1
  import { TextFieldProps } from '@mui/material';
2
+ import { FC } from 'react';
2
3
  export type AbyssNumberFieldProps = Omit<TextFieldProps, 'value' | 'onChange'> & {
3
4
  value: number | null;
4
5
  onChange: (value: number | null) => void;
@@ -12,5 +13,5 @@ export type AbyssNumberFieldProps = Omit<TextFieldProps, 'value' | 'onChange'> &
12
13
  max?: number;
13
14
  allowNegative?: boolean;
14
15
  };
15
- declare const AbyssNumberField: React.FC<AbyssNumberFieldProps>;
16
+ declare const AbyssNumberField: FC<AbyssNumberFieldProps>;
16
17
  export default AbyssNumberField;
@@ -3,6 +3,7 @@ export type ScopeOption = {
3
3
  id: string | null;
4
4
  name: string;
5
5
  logoId?: string | null;
6
+ kind?: 'standard' | 'family';
6
7
  };
7
8
  type Props = {
8
9
  organizations: ScopeOption[];
@@ -0,0 +1,43 @@
1
+ import { default as React } from 'react';
2
+ export type ContextSelectorProject = {
3
+ id: string;
4
+ name: string;
5
+ avatar?: React.ReactNode;
6
+ };
7
+ export type ContextSelectorOrganization = {
8
+ id: string;
9
+ name: string;
10
+ avatar?: React.ReactNode;
11
+ projects?: ContextSelectorProject[];
12
+ };
13
+ export type ContextSelectorPersonal = {
14
+ label?: string;
15
+ avatar?: React.ReactNode;
16
+ };
17
+ export type ContextSelectorData = {
18
+ personal: ContextSelectorPersonal;
19
+ organizations: ContextSelectorOrganization[];
20
+ };
21
+ export type ContextValue = {
22
+ kind: 'personal';
23
+ } | {
24
+ kind: 'organization';
25
+ organizationId: string;
26
+ } | {
27
+ kind: 'project';
28
+ organizationId: string;
29
+ projectId: string;
30
+ };
31
+ export type ContextSelectorVariant = 'grouped' | 'by-org';
32
+ type ContextSelectorProps = {
33
+ data: ContextSelectorData;
34
+ value: ContextValue;
35
+ onChange: (next: ContextValue) => void;
36
+ variant?: ContextSelectorVariant;
37
+ label?: string;
38
+ placeholder?: string;
39
+ disabled?: boolean;
40
+ minWidth?: number | string;
41
+ };
42
+ export declare const ContextSelector: React.FC<ContextSelectorProps>;
43
+ export default ContextSelector;
@@ -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;
@@ -1,15 +1,16 @@
1
1
  import { SxProps } from '@mui/material';
2
+ import { FC, ChangeEvent } from 'react';
2
3
  type Props = {
3
4
  name: string;
4
5
  label?: string;
5
6
  placeholder?: string;
6
7
  value: string;
7
8
  error: boolean;
8
- onChange: (e: React.ChangeEvent<any>) => void;
9
+ onChange: (e: ChangeEvent<any>) => void;
9
10
  variant?: 'filled' | 'outlined';
10
11
  size?: 'small' | 'medium';
11
12
  sx?: SxProps;
12
13
  disabled?: boolean;
13
14
  };
14
- declare const LoginForm: React.FC<Props>;
15
+ declare const LoginForm: FC<Props>;
15
16
  export default LoginForm;
@@ -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';
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { IPlanTemplate } from '@abyss-project/main';
3
3
  type Props = {
4
- planTemplate: IPlanTemplate;
4
+ planTemplate?: IPlanTemplate | null;
5
5
  label?: string;
6
6
  abyssUrl?: string;
7
7
  };
@@ -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;
@@ -1,3 +1,4 @@
1
+ import { FC } from 'react';
1
2
  import { UserSettingsUser } from './UserSettingsModal.component';
2
3
  type Props = {
3
4
  isOpen: boolean;
@@ -9,5 +10,5 @@ type Props = {
9
10
  apiKey: string;
10
11
  abyssUrl: string;
11
12
  };
12
- declare const UserSettings: React.FC<Props>;
13
+ declare const UserSettings: FC<Props>;
13
14
  export default UserSettings;
@@ -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,14 @@
1
+ import { AcroFormField, EditorAction, PdfOperation, ToolKind } from '../types';
2
+ export declare const addOperation: (operation: PdfOperation) => EditorAction;
3
+ export declare const addOperationAllPages: (operation: PdfOperation, pageIndices: number[]) => EditorAction;
4
+ export declare const updateOperation: (opId: string, operation: PdfOperation) => EditorAction;
5
+ export declare const moveOperation: (opId: string, operation: PdfOperation) => EditorAction;
6
+ export declare const deleteOperation: (opId: string) => EditorAction;
7
+ export declare const undo: () => EditorAction;
8
+ export declare const redo: () => EditorAction;
9
+ export declare const setActiveTool: (tool: ToolKind) => EditorAction;
10
+ export declare const setActivePage: (pageIndex: number) => EditorAction;
11
+ export declare const setAcroFormFields: (fields: AcroFormField[]) => EditorAction;
12
+ export declare const setPendingSignature: (dataUrl: string | null) => EditorAction;
13
+ export declare const setPendingText: (text: string | null) => EditorAction;
14
+ export declare const setPendingApplyAllPages: (enabled: boolean) => EditorAction;
@@ -0,0 +1,19 @@
1
+ export type Rotation = 0 | 90 | 180 | 270;
2
+ export declare const normalizeRotation: (deg: number) => Rotation;
3
+ export declare const viewSize: (cw: number, ch: number, rotation: Rotation) => {
4
+ w: number;
5
+ h: number;
6
+ };
7
+ export declare const contentSize: (vw: number, vh: number, rotation: Rotation) => {
8
+ w: number;
9
+ h: number;
10
+ };
11
+ export declare const contentToView: (x: number, y: number, rotation: Rotation, cw: number, ch: number) => {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ export declare const viewToContent: (x: number, y: number, rotation: Rotation, cw: number, ch: number) => {
16
+ x: number;
17
+ y: number;
18
+ };
19
+ export declare const innerLayerTransform: (rotation: Rotation, contentWidthPx: number, contentHeightPx: number) => string;
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { AssetPalette, SaveSignatureFn } from '../types';
3
+ import { ResolveAssetBytes } from './resolve-asset';
3
4
  interface SignaturePickerProps {
4
5
  open: boolean;
5
6
  onClose: () => void;
@@ -7,6 +8,8 @@ interface SignaturePickerProps {
7
8
  onCaptureText?: (text: string) => void;
8
9
  assetPalette?: AssetPalette;
9
10
  onSaveSignature?: SaveSignatureFn;
11
+ resolveAssetBytes?: ResolveAssetBytes;
12
+ onAssetError?: (message: string) => void;
10
13
  manageAssetsUrl?: string;
11
14
  }
12
15
  export declare const SignaturePicker: React.FC<SignaturePickerProps>;
@@ -1,10 +1,13 @@
1
1
  import { default as React } from 'react';
2
2
  import { AssetPalette } from '../types';
3
+ import { ResolveAssetBytes } from './resolve-asset';
3
4
  interface SignatureSavedListProps {
4
5
  palette: AssetPalette;
5
6
  onPick: (dataUrl: string) => void;
6
7
  onPickText?: (text: string) => void;
7
8
  onClose: () => void;
9
+ resolveAssetBytes?: ResolveAssetBytes;
10
+ onAssetError?: (message: string) => void;
8
11
  }
9
12
  export declare const SignatureSavedList: React.FC<SignatureSavedListProps>;
10
13
  export {};
@@ -0,0 +1,3 @@
1
+ import { AssetPaletteItem } from '../types';
2
+ export type ResolveAssetBytes = (item: AssetPaletteItem) => Promise<string>;
3
+ export declare const resolveAssetDataUrl: (item: AssetPaletteItem, resolver?: ResolveAssetBytes) => Promise<string>;
@@ -1,7 +1,8 @@
1
1
  import { default as React } from 'react';
2
- import { AcroFormField, EditorAction } from '../types';
2
+ import { AcroFormField, EditorAction, PdfOperation } from '../types';
3
3
  interface FillFieldsToolProps {
4
4
  fields: AcroFormField[];
5
+ operations: PdfOperation[];
5
6
  dispatch: React.Dispatch<EditorAction>;
6
7
  }
7
8
  export declare const FillFieldsTool: React.FC<FillFieldsToolProps>;
@@ -1,11 +1,14 @@
1
1
  import { default as React } from 'react';
2
2
  import { AssetPalette, EditorAction, SaveSignatureFn } from '../types';
3
+ import { ResolveAssetBytes } from '../signature/resolve-asset';
3
4
  interface SignatureToolProps {
4
5
  pendingSignature: string | null;
5
6
  pendingApplyAllPages: boolean;
6
7
  dispatch: React.Dispatch<EditorAction>;
7
8
  assetPalette?: AssetPalette;
8
9
  onSaveSignature?: SaveSignatureFn;
10
+ resolveAssetBytes?: ResolveAssetBytes;
11
+ onAssetError?: (message: string) => void;
9
12
  manageAssetsUrl?: string;
10
13
  }
11
14
  export declare const SignatureTool: React.FC<SignatureToolProps>;
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { AssetPalette, ToolKind, EditorAction, ExportOption } from '../types';
3
+ import { ResolveAssetBytes } from '../signature/resolve-asset';
3
4
  interface ToolbarProps {
4
5
  activeTool: ToolKind;
5
6
  canUndo: boolean;
@@ -12,7 +13,12 @@ interface ToolbarProps {
12
13
  exportOptions: ExportOption[];
13
14
  fileName?: string;
14
15
  assetPalette?: AssetPalette;
16
+ resolveAssetBytes?: ResolveAssetBytes;
17
+ onAssetError?: (message: string) => void;
15
18
  pendingApplyAllPages?: boolean;
19
+ compact?: boolean;
20
+ sidebarOpen?: boolean;
21
+ onToggleSidebar?: () => void;
16
22
  }
17
23
  export declare const Toolbar: React.FC<ToolbarProps>;
18
24
  export {};
@@ -1,7 +1,7 @@
1
+ import { ReactNode } from 'react';
1
2
  import { AssetKind } from '@abyss-project/main';
2
3
  import { ISpace, IFile } from '@abyss-project/cloud';
3
4
  import { SupportCloudImportProps } from '../Support/types';
4
- import type * as React from 'react';
5
5
  export interface PdfEditorCloudImportProps extends SupportCloudImportProps {
6
6
  downloadCloudFile: (cloud: ISpace, file: IFile) => Promise<ArrayBuffer>;
7
7
  }
@@ -126,7 +126,7 @@ export type EditorAction = {
126
126
  type: 'ADD_OPERATION_ALL_PAGES';
127
127
  payload: {
128
128
  op: PdfOperation;
129
- pageCount: number;
129
+ pageIndices: number[];
130
130
  };
131
131
  } | {
132
132
  type: 'UPDATE_OPERATION';
@@ -134,6 +134,12 @@ export type EditorAction = {
134
134
  opId: string;
135
135
  op: PdfOperation;
136
136
  };
137
+ } | {
138
+ type: 'MOVE_OPERATION';
139
+ payload: {
140
+ opId: string;
141
+ op: PdfOperation;
142
+ };
137
143
  } | {
138
144
  type: 'DELETE_OPERATION';
139
145
  payload: {
@@ -174,18 +180,18 @@ export interface AssetPaletteOrgBucket {
174
180
  id: string;
175
181
  name: string;
176
182
  items: AssetPaletteItem[];
177
- avatar?: React.ReactNode;
183
+ avatar?: ReactNode;
178
184
  }
179
185
  export interface AssetPaletteProjectBucket {
180
186
  id: string;
181
187
  name: string;
182
188
  organizationId: string;
183
189
  items: AssetPaletteItem[];
184
- avatar?: React.ReactNode;
190
+ avatar?: ReactNode;
185
191
  }
186
192
  export interface AssetPalette {
187
193
  personal: AssetPaletteItem[];
188
- personalAvatar?: React.ReactNode;
194
+ personalAvatar?: ReactNode;
189
195
  organizations?: AssetPaletteOrgBucket[];
190
196
  projects?: AssetPaletteProjectBucket[];
191
197
  }
@@ -205,6 +211,8 @@ export interface PdfEditorProps {
205
211
  initialOperations?: PdfOperation[];
206
212
  operationsAdapter?: OperationsAdapter;
207
213
  assetPalette?: AssetPalette;
214
+ resolveAssetBytes?: (item: AssetPaletteItem) => Promise<string>;
215
+ onAssetError?: (message: string) => void;
208
216
  onSaveSignature?: SaveSignatureFn;
209
217
  onExport: (request: ExportRequest) => Promise<void>;
210
218
  exportOptions: ExportOption[];
@@ -11,11 +11,13 @@ interface PageOverlayProps {
11
11
  pendingSignature: string | null;
12
12
  pendingText: string | null;
13
13
  pendingApplyAllPages: boolean;
14
- numPages: number;
14
+ pageIndices: number[];
15
15
  dispatch: React.Dispatch<EditorAction>;
16
16
  textInput?: string;
17
17
  drawColor?: string;
18
18
  drawStrokeWidth?: number;
19
+ scale?: number;
20
+ rotation?: number;
19
21
  }
20
22
  export declare const PageOverlay: React.FC<PageOverlayProps>;
21
23
  export {};
@@ -11,7 +11,11 @@ interface PdfCanvasProps {
11
11
  scale?: number;
12
12
  activePageIndex: number;
13
13
  pageOrder: number[];
14
- onPageDimensions?: (pageIndex: number, width: number, height: number) => void;
14
+ onPageDimensions?: (pageIndex: number, width: number, height: number, totalRotation: number, pointWidth: number) => void;
15
+ onVisiblePageChange?: (displayIndex: number) => void;
15
16
  children?: (virtualIndex: number, displayIndex: number) => React.ReactNode;
16
17
  }
17
- export declare const PdfCanvas: React.FC<PdfCanvasProps>;
18
+ export interface PdfCanvasHandle {
19
+ scrollToPage: (displayIndex: number) => void;
20
+ }
21
+ export declare const PdfCanvas: React.ForwardRefExoticComponent<PdfCanvasProps & React.RefAttributes<PdfCanvasHandle>>;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ interface ViewerControlsProps {
3
+ zoom: number;
4
+ onZoomIn: () => void;
5
+ onZoomOut: () => void;
6
+ onFitWidth: () => void;
7
+ onResetZoom: () => void;
8
+ canZoomIn: boolean;
9
+ canZoomOut: boolean;
10
+ currentPage: number;
11
+ totalPages: number;
12
+ onGoToPage: (index: number) => void;
13
+ }
14
+ export declare const ViewerControls: React.FC<ViewerControlsProps>;
15
+ export {};
@@ -1,6 +1,6 @@
1
+ import { ReactNode } from 'react';
1
2
  import { ISupportTicket, ISupportTicketMessage, ISupportTicketActivity, ISupportTicketAttachment, ISupportTicketTag, SupportTicketStatus, SupportTicketCategory, SupportTicketPriority, SupportTicketAction, AbyssService } from '@abyss-project/main';
2
3
  import { ISpace, IFile, IGetRepositoryCloudData } from '@abyss-project/cloud';
3
- import { default as React } from 'react';
4
4
  export interface SupportCloudImportProps {
5
5
  user?: {
6
6
  enabledService?: string[];
@@ -17,7 +17,7 @@ export interface SupportCloudImportProps {
17
17
  handleImportFromCloud?: (cloud: ISpace, files: IFile[]) => Promise<void>;
18
18
  getSpaceDisplay?: (space: ISpace) => {
19
19
  label: string;
20
- avatar?: React.ReactNode;
20
+ avatar?: ReactNode;
21
21
  subtitle?: string;
22
22
  organizationId?: string | null;
23
23
  organizationName?: string | null;
@@ -49,7 +49,7 @@ export interface SupportTicketListProps {
49
49
  onCreateClick?: () => void;
50
50
  isLoading: boolean;
51
51
  isAdmin?: boolean;
52
- renderRowActions?: (ticket: ISupportTicket) => React.ReactNode;
52
+ renderRowActions?: (ticket: ISupportTicket) => ReactNode;
53
53
  showRequester?: boolean;
54
54
  requesterUsers?: Record<string, {
55
55
  alias?: string | null;
@@ -59,7 +59,7 @@ export interface SupportTicketListProps {
59
59
  name?: string | null;
60
60
  pictureThumbnailId?: string | null;
61
61
  }>;
62
- renderExtraFilters?: () => React.ReactNode;
62
+ renderExtraFilters?: () => ReactNode;
63
63
  title?: string;
64
64
  subtitle?: string;
65
65
  hideCreateButton?: boolean;
@@ -91,8 +91,8 @@ export interface SupportTicketCreateStepperProps {
91
91
  isAdmin?: boolean;
92
92
  onCancel?: () => void;
93
93
  initialValues?: Partial<SupportTicketCreateStepperValues>;
94
- renderForWhoStep?: (userId: string | null, onUserChange: (userId: string | null) => void, orgId: string | null, onOrgChange: (orgId: string | null) => void) => React.ReactNode;
95
- renderProjectSelect?: (value: string | null, onChange: (projectId: string | null) => void) => React.ReactNode;
94
+ renderForWhoStep?: (userId: string | null, onUserChange: (userId: string | null) => void, orgId: string | null, onOrgChange: (orgId: string | null) => void) => ReactNode;
95
+ renderProjectSelect?: (value: string | null, onChange: (projectId: string | null) => void) => ReactNode;
96
96
  }
97
97
  export interface SupportCategoryGroupCardsProps {
98
98
  value: SupportTicketCategory | null;
@@ -1,4 +1,5 @@
1
1
  import { AbyssService } from '@abyss-project/main';
2
+ import { FC } from 'react';
2
3
  export declare const DRAWER_WIDTH_EXPANDED = 275;
3
4
  export declare const DRAWER_WIDTH_COLLAPSED = 72;
4
5
  export type DrawerElements = {
@@ -34,5 +35,5 @@ type Props = {
34
35
  onCollapsedChange?: (collapsed: boolean) => void;
35
36
  defaultCollapsed?: boolean;
36
37
  };
37
- declare const AbyssDrawer: React.FC<Props>;
38
+ declare const AbyssDrawer: FC<Props>;
38
39
  export default AbyssDrawer;
@@ -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';