@apolitical/component-library 10.1.18-oa-beta.2 → 10.1.19-beta.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.
@@ -4,7 +4,7 @@ export declare const transformSlugs: (slugs: {
4
4
  }) => {
5
5
  [key: string]: string;
6
6
  };
7
- export declare const getAuthorData: (author: IUser, isAnonymous?: boolean) => "deleted" | "anonymous" | {
7
+ export declare const getAuthorData: (author: IUser, isAnonymous?: boolean) => "anonymous" | "deleted" | {
8
8
  id: string;
9
9
  name: string;
10
10
  organization: string;
@@ -1,24 +1,24 @@
1
1
  export declare const cacheMock1: Readonly<{
2
2
  pages: {
3
3
  next: string;
4
- results: import("@apolitical/contracts").IDiscussion[];
4
+ results: import("@apolitical/contracts").IActivity[];
5
5
  }[];
6
6
  }>;
7
7
  export declare const cacheMock2: Readonly<{
8
8
  pages: {
9
9
  next: string;
10
- results: import("@apolitical/contracts").IDiscussion[];
10
+ results: import("@apolitical/contracts").IActivity[];
11
11
  }[];
12
12
  }>;
13
13
  export declare const cacheMock3: Readonly<{
14
14
  pages: {
15
15
  next: string;
16
- results: import("@apolitical/contracts").IDiscussion[];
16
+ results: import("@apolitical/contracts").IActivity[];
17
17
  }[];
18
18
  }>;
19
19
  export declare const cacheMock4: Readonly<{
20
20
  pages: {
21
21
  next: string;
22
- results: import("@apolitical/contracts").IDiscussion[];
22
+ results: import("@apolitical/contracts").IActivity[];
23
23
  }[];
24
24
  }>;
@@ -1,4 +1,4 @@
1
- export declare const cacheMock1: Readonly<import("@apolitical/contracts").IDiscussion>;
2
- export declare const cacheMock2: Readonly<import("@apolitical/contracts").IDiscussion>;
3
- export declare const cacheMock3: Readonly<import("@apolitical/contracts").IDiscussion>;
4
- export declare const cacheMock4: Readonly<import("@apolitical/contracts").IDiscussion>;
1
+ export declare const cacheMock1: Readonly<import("@apolitical/contracts").IActivity>;
2
+ export declare const cacheMock2: Readonly<import("@apolitical/contracts").IActivity>;
3
+ export declare const cacheMock3: Readonly<import("@apolitical/contracts").IActivity>;
4
+ export declare const cacheMock4: Readonly<import("@apolitical/contracts").IActivity>;
@@ -86,8 +86,8 @@ export declare function preparePollActivity({ title, options, settings, user, co
86
86
  time: string;
87
87
  verb: ActivityType;
88
88
  };
89
- export declare function enrichActivity({ activity, user, vars }: IEnrichActivityArgs): import("@apolitical/contracts").IDiscussion;
90
- export declare function enrichPollActivity({ activity, options, user }: IEnrichPollActivityArgs): import("@apolitical/contracts").IDiscussion;
89
+ export declare function enrichActivity({ activity, user, vars }: IEnrichActivityArgs): IActivity;
90
+ export declare function enrichPollActivity({ activity, options, user }: IEnrichPollActivityArgs): IActivity;
91
91
  export declare function incrementActivityLikes({ activity, reaction, }: IIncrementActivityLikesArgs): void;
92
92
  export declare function decrementActivityLikes({ activity, user }: IDecrementActivityLikesArgs): void;
93
93
  export declare function incrementActivityPins({ activity, reaction, }: IIncrementActivityLikesArgs): void;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { IField, InputTypes, InputValues } from '../../../form.types';
3
- export declare const Input: ({ className, element, id, inputRef: ref, functions, name, placeholder, type, value, autoFocus, label, styling, ...props }: IField) => React.DOMElement<{
3
+ export declare const Input: ({ className, element, id, inputRef: ref, functions, name, placeholder, type, value, autoFocus, label, styling, ...props }: IField) => React.ReactElement<{
4
4
  onChange: (e: React.FormEvent<HTMLInputElement>) => void;
5
5
  onMultiSelectSubmit?: ((arg1: import("../../../form.types").FormValues) => void) | undefined;
6
6
  onBlur?: (() => void) | undefined;
@@ -61,5 +61,5 @@ export declare const Input: ({ className, element, id, inputRef: ref, functions,
61
61
  submitOnEnter?: boolean | undefined;
62
62
  validation?: import("../../../form.types").IFieldValidation[] | undefined;
63
63
  ref: React.RefObject<HTMLInputElement | null>;
64
- }, HTMLInputElement>;
64
+ }, string | React.JSXElementConstructor<any>>;
65
65
  export default Input;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { BaseEditor } from 'slate';
3
- declare const usePositionedElement: (editor: BaseEditor, element: string, fallback: string) => import("react").RefObject<HTMLElement | null>;
3
+ declare const usePositionedElement: (editor: BaseEditor, element: string, fallback: string) => import("react").MutableRefObject<HTMLElement | null>;
4
4
  export default usePositionedElement;
@@ -16,6 +16,8 @@ interface Props {
16
16
  className?: string;
17
17
  /** The language to use */
18
18
  locale?: string;
19
+ /** Callback when search is clicked - when provided, renders as a button that triggers this callback instead of a form */
20
+ onSearchClick?: () => void;
19
21
  }
20
- declare const SearchForm: ({ id, className, handleToggle, defaultValue, gtmContext, gtmEvent, }: Props) => import("react/jsx-runtime").JSX.Element;
22
+ declare const SearchForm: ({ id, className, handleToggle, defaultValue, gtmContext, gtmEvent, onSearchClick, }: Props) => import("react/jsx-runtime").JSX.Element;
21
23
  export default SearchForm;
@@ -38,5 +38,5 @@ interface Props {
38
38
  /** The id of the tooltip */
39
39
  id?: string;
40
40
  }
41
- declare const _default: React.NamedExoticComponent<Props & React.RefAttributes<HTMLElement | null>>;
41
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement | null>>>;
42
42
  export default _default;
package/helpers/intl.d.ts CHANGED
@@ -510,7 +510,6 @@ export declare const checkIntlPathExists: (path: string, language?: {
510
510
  header_buttons_login: string;
511
511
  header_buttons_signup: string;
512
512
  header_language_unavailable_en: string;
513
- header_language_unavailable_uk: string;
514
513
  header_language_unavailable_vi: string;
515
514
  'header_language_unavailable_sr-Cyrl': string;
516
515
  header_language_unavailable_de: string;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const passPropsToChildren: (children: React.ReactNode, props: Record<string, unknown>) => (string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined>)[] | null | undefined;
2
+ declare const passPropsToChildren: (children: React.ReactNode, props: Record<string, unknown>) => (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>)[] | null | undefined;
3
3
  export default passPropsToChildren;