@apolitical/component-library 4.5.11-4697.1 → 4.5.11-beta.100
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.
- package/context/user/user.context.d.ts +5 -13
- package/context/user/user.provider.d.ts +1 -2
- package/form/components/form/form.types.d.ts +12 -13
- package/form/components/form/index.d.ts +1 -1
- package/form/components/profile-image-change/profile-image-change.d.ts +7 -20
- package/form/types/index.d.ts +0 -1
- package/helpers/intl.d.ts +6 -20
- package/index.js +63 -63
- package/index.mjs +9236 -9482
- package/modals/{types/discussion-form-modal → discussion-form-modal}/discussion-form-modal.d.ts +1 -1
- package/modals/index.d.ts +4 -2
- package/modals/{components/overlay → overlay}/overlay.d.ts +1 -1
- package/package.json +1 -1
- package/sections/edit-section/edit-section.d.ts +2 -4
- package/style.css +1 -1
- package/user/profile-picture/profile-picture.d.ts +1 -3
- package/form/types/profile-form/index.d.ts +0 -1
- package/form/types/profile-form/profile-form.d.ts +0 -34
- package/modals/components/index.d.ts +0 -2
- package/modals/types/index.d.ts +0 -3
- package/modals/types/profile-modal/index.d.ts +0 -1
- package/modals/types/profile-modal/profile-modal.d.ts +0 -25
- /package/modals/{types/discussion-form-modal → discussion-form-modal}/index.d.ts +0 -0
- /package/modals/{types/invite-modal → invite-modal}/index.d.ts +0 -0
- /package/modals/{types/invite-modal → invite-modal}/invite-modal.d.ts +0 -0
- /package/modals/{components/modal → modal}/index.d.ts +0 -0
- /package/modals/{components/modal → modal}/modal.d.ts +0 -0
- /package/modals/{components/overlay → overlay}/index.d.ts +0 -0
- /package/modals/{components/overlay → overlay}/overlay.helpers.d.ts +0 -0
|
@@ -11,10 +11,8 @@ interface Props {
|
|
|
11
11
|
height?: number;
|
|
12
12
|
/** Additional classes */
|
|
13
13
|
className?: string;
|
|
14
|
-
/** Whether we should show the user's initials as a fallback, instead of an image, when there's no src */
|
|
15
|
-
showInitials?: boolean;
|
|
16
14
|
/** Optional test ID */
|
|
17
15
|
'data-testid'?: string;
|
|
18
16
|
}
|
|
19
|
-
declare const ProfilePicture: ({ className, src, name, alt, width, height,
|
|
17
|
+
declare const ProfilePicture: ({ className, src, name, alt, width, height, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
20
18
|
export default ProfilePicture;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ProfileForm, type IProfileFormProps } from './profile-form';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { IFormValues, IFormMeta } from './../../components/form/form.types';
|
|
2
|
-
export interface IProfileFormProps {
|
|
3
|
-
/** The hooks used in the form */
|
|
4
|
-
hooks: {
|
|
5
|
-
/** The hook to predict the user's location */
|
|
6
|
-
useMaps: () => {
|
|
7
|
-
buildLocation: (input: string) => Promise<{
|
|
8
|
-
id: string;
|
|
9
|
-
en: string;
|
|
10
|
-
code: string;
|
|
11
|
-
}>;
|
|
12
|
-
isValidPlace: (input: string) => boolean;
|
|
13
|
-
predictPlaces: (input: string) => Promise<unknown[]>;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
/** The functions to call */
|
|
17
|
-
functions: {
|
|
18
|
-
/** The function to upload the user's profile image */
|
|
19
|
-
uploadImage: () => void;
|
|
20
|
-
/** The function to call on success */
|
|
21
|
-
onSuccess?: (data: IFormValues) => Promise<void>;
|
|
22
|
-
/** The function to call on failure */
|
|
23
|
-
onFailure?: () => void;
|
|
24
|
-
};
|
|
25
|
-
/** Meta for the form */
|
|
26
|
-
meta?: IFormMeta;
|
|
27
|
-
/** The Google Tag Manager data */
|
|
28
|
-
gtm?: {
|
|
29
|
-
context?: string;
|
|
30
|
-
event?: string;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
declare const ProfileForm: ({ hooks, functions, meta, gtm }: IProfileFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
-
export default ProfileForm;
|
package/modals/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ProfileModal } from './profile-modal';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type IProfileFormProps } from '../../../form';
|
|
2
|
-
interface Props {
|
|
3
|
-
/** Whether the modal is open on page load */
|
|
4
|
-
showModal?: boolean;
|
|
5
|
-
/** Optional content to show inside the modal, above the form */
|
|
6
|
-
content?: {
|
|
7
|
-
/** The banner title across the top of the modal, used to show a success, e.g. we might want to show 'Your post has been created' if we show the modal after the user has made a new post on communities */
|
|
8
|
-
successMessage?: string;
|
|
9
|
-
/** The title to show above the form */
|
|
10
|
-
title?: string;
|
|
11
|
-
/** The text to show above the form */
|
|
12
|
-
text?: string;
|
|
13
|
-
};
|
|
14
|
-
/** Functions used inside the modal */
|
|
15
|
-
functions: {
|
|
16
|
-
/** Function to call when the modal is closed */
|
|
17
|
-
onClose?: () => void;
|
|
18
|
-
};
|
|
19
|
-
/** Props for the ProfileForm component */
|
|
20
|
-
form: IProfileFormProps;
|
|
21
|
-
/** Additional classes */
|
|
22
|
-
className?: string;
|
|
23
|
-
}
|
|
24
|
-
declare const ProfileModal: ({ showModal, content: { successMessage, title, text }, functions: modalFunctions, form, className, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export default ProfileModal;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|