@apolitical/component-library 4.5.0-beta.4 → 4.5.0-beta.6

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.
@@ -70,6 +70,9 @@ export interface IDiscussionForm {
70
70
  submit?: string;
71
71
  };
72
72
 
73
+ /** If the form is used within a Community */
74
+ isCommunity?: boolean;
75
+
73
76
  /** Force elements on the form to show, regardless of the form state */
74
77
  forceShow?: {
75
78
  /** If the cancel button should always show */
@@ -1,6 +1,10 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
3
  url: string;
4
+ gtm?: {
5
+ context: string;
6
+ event: string;
7
+ };
4
8
  }
5
9
  declare const ShareLink: React.FC<Props>;
6
10
  export default ShareLink;
@@ -65,6 +65,8 @@ interface Props {
65
65
  };
66
66
  /** If the browser should focus on this post */
67
67
  setFocus?: boolean;
68
+ /** If the post is used within a community */
69
+ isCommunity?: boolean;
68
70
  }
69
- declare const Post: ({ element, content, userHasPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, styling: { showShareLinkButton }, setFocus, }: Props) => import("react/jsx-runtime").JSX.Element;
71
+ declare const Post: ({ element, content, userHasPermissions, isLoading, originalAuthorId, forceHide, functions, links, className, gtmContext, children, isTruncated, styling: { showShareLinkButton }, setFocus, isCommunity, }: Props) => import("react/jsx-runtime").JSX.Element;
70
72
  export default Post;
@@ -1,6 +1,7 @@
1
1
  import type { IUserContext } from '../../../context';
2
2
  import type { IActivity, IReaction } from '..';
3
3
  interface IPrepareActivityArgs {
4
+ title?: string;
4
5
  content: string;
5
6
  }
6
7
  interface IEnrichActivityArgs {
@@ -16,13 +17,14 @@ interface IDecrementActivityLikesArgs {
16
17
  activity: IActivity;
17
18
  user?: IUserContext;
18
19
  }
19
- export declare function prepareActivity({ content }: IPrepareActivityArgs): {
20
+ export declare function prepareActivity({ title, content }: IPrepareActivityArgs): {
21
+ title: string | undefined;
20
22
  content: string;
21
23
  id: string;
22
24
  time: string;
23
25
  verb: string;
24
26
  };
25
27
  export declare function enrichActivity({ activity, user }: IEnrichActivityArgs): IActivity;
26
- export declare function incrementActivityLikes({ activity, reaction }: IIncrementActivityLikesArgs): void;
28
+ export declare function incrementActivityLikes({ activity, reaction, }: IIncrementActivityLikesArgs): void;
27
29
  export declare function decrementActivityLikes({ activity, user }: IDecrementActivityLikesArgs): void;
28
30
  export {};
@@ -5,6 +5,10 @@ export interface IShouldShowProps {
5
5
  logInButton?: boolean;
6
6
  successMessage?: boolean;
7
7
  }
8
+ export interface IOnSuccessProps {
9
+ jobTitle: string;
10
+ organization: string;
11
+ }
8
12
  interface ISignupForm {
9
13
  className?: string;
10
14
  labels?: {
@@ -14,18 +18,19 @@ interface ISignupForm {
14
18
  expectation?: string;
15
19
  };
16
20
  functions: {
17
- validateEmail: () => Promise<any>;
21
+ validateEmail: (email: string) => Promise<any>;
18
22
  createAccount: (arg: any) => Promise<any>;
19
- onSuccess?: () => void;
23
+ onSuccess?: (arg?: IOnSuccessProps) => void;
24
+ onCatch?: (arg?: string) => void;
20
25
  handleError: (error: string) => void;
21
26
  /** Callback function to resend verification code (used when user already signed up but not verified) */
22
- resendVerificationCode: () => void;
27
+ resendVerificationCode: (email: string) => Promise<unknown>;
23
28
  };
24
29
  shouldShow: IShouldShowProps;
25
30
  dataToSubmit: {
26
31
  [key: string]: string;
27
32
  };
28
- submitButton: string;
33
+ submitButton?: string;
29
34
  }
30
35
  declare const SignupForm: ({ className, labels, placeholders, functions, shouldShow: shouldShowProps, submitButton, dataToSubmit, ...props }: ISignupForm) => import("react/jsx-runtime").JSX.Element;
31
36
  export default SignupForm;
package/helpers/intl.d.ts CHANGED
@@ -374,8 +374,8 @@ export declare const checkIntlPathExists: (path: string, language?: {
374
374
  loadingBlock_almostDone: string;
375
375
  loadingBlock_complete: string;
376
376
  progressBar: string;
377
- discussionPostModal_title: string;
378
- discussionPostModal_cta: string;
377
+ discussionFormModal_title: string;
378
+ discussionFormModal_cta: string;
379
379
  inviteModal_title: string;
380
380
  inviteModal_formTitle: string;
381
381
  inviteModal_formLabel: string;