@apolitical/component-library 4.6.0-4652.8 → 4.6.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.
- package/cards/card/card.d.ts +2 -2
- package/cards/card/card.data.d.ts +0 -6
- package/cards/card/components/index.d.ts +0 -1
- package/cards/cards.types.d.ts +0 -3
- package/form/types/profile-form/profile-form.d.ts +14 -5
- package/index.js +35 -35
- package/index.mjs +1792 -1801
- package/package.json +1 -1
- package/style.css +1 -1
- package/testing/index.d.ts +0 -1
- package/cards/card/components/members/index.d.ts +0 -1
- package/cards/card/components/members/members.d.ts +0 -3
- package/cards/card/components/members/members.interface.d.ts +0 -14
package/cards/card/card.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const Card: ({ id,
|
|
1
|
+
import { CardProps } from './../cards.types';
|
|
2
|
+
declare const Card: ({ id, card, buildCardData, cta, gtmContext, className, handleCardClick, setFocus, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Card;
|
package/cards/cards.types.d.ts
CHANGED
|
@@ -75,7 +75,6 @@ export interface MockCardType extends CardType {
|
|
|
75
75
|
cardType?: string;
|
|
76
76
|
}
|
|
77
77
|
export type BuildCardDataType = (card: CardType | MockCardType, isLoggedIn?: boolean) => Promise<any>;
|
|
78
|
-
export type BuildMemberDataType = (communitySlug: string, userId?: string) => Promise<unknown>;
|
|
79
78
|
export interface CardProps {
|
|
80
79
|
/** A unique key for the card, used as a dependency in `useEffect` */
|
|
81
80
|
id?: string;
|
|
@@ -83,8 +82,6 @@ export interface CardProps {
|
|
|
83
82
|
card: CardType;
|
|
84
83
|
/** A function to parse and build the card data - this is especially needed in carousels to hydrate the cards */
|
|
85
84
|
buildCardData: BuildCardDataType;
|
|
86
|
-
/** A function to parse and build the member data */
|
|
87
|
-
buildMemberData?: BuildMemberDataType;
|
|
88
85
|
/** An optional call to action to show on the card - this can behave differently to clicking elsewhere on the card */
|
|
89
86
|
cta?: CardCTAType;
|
|
90
87
|
/** Context for the Google Tag Manager event */
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import type { IFormValues, IFormMeta } from './../../components/form/form.types';
|
|
2
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
|
+
};
|
|
3
16
|
/** The functions to call */
|
|
4
17
|
functions: {
|
|
5
18
|
/** The function to upload the user's profile image */
|
|
6
19
|
uploadImage: () => void;
|
|
7
|
-
/** The function to handle getting the location predictions */
|
|
8
|
-
predictPlace: (arg: object) => {
|
|
9
|
-
city: Promise<any[]>;
|
|
10
|
-
};
|
|
11
20
|
/** The function to call on success */
|
|
12
21
|
onSuccess?: (data: IFormValues) => Promise<void>;
|
|
13
22
|
/** The function to call on failure */
|
|
@@ -21,5 +30,5 @@ export interface IProfileFormProps {
|
|
|
21
30
|
event?: string;
|
|
22
31
|
};
|
|
23
32
|
}
|
|
24
|
-
declare const ProfileForm: ({ functions, meta, gtm }: IProfileFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
declare const ProfileForm: ({ hooks, functions, meta, gtm }: IProfileFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
34
|
export default ProfileForm;
|