@apolitical/component-library 10.2.1 → 10.2.3

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) => "anonymous" | "deleted" | {
7
+ export declare const getAuthorData: (author: IUser, isAnonymous?: boolean) => "deleted" | "anonymous" | {
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").IActivity[];
4
+ results: import("@apolitical/contracts").IDiscussion[];
5
5
  }[];
6
6
  }>;
7
7
  export declare const cacheMock2: Readonly<{
8
8
  pages: {
9
9
  next: string;
10
- results: import("@apolitical/contracts").IActivity[];
10
+ results: import("@apolitical/contracts").IDiscussion[];
11
11
  }[];
12
12
  }>;
13
13
  export declare const cacheMock3: Readonly<{
14
14
  pages: {
15
15
  next: string;
16
- results: import("@apolitical/contracts").IActivity[];
16
+ results: import("@apolitical/contracts").IDiscussion[];
17
17
  }[];
18
18
  }>;
19
19
  export declare const cacheMock4: Readonly<{
20
20
  pages: {
21
21
  next: string;
22
- results: import("@apolitical/contracts").IActivity[];
22
+ results: import("@apolitical/contracts").IDiscussion[];
23
23
  }[];
24
24
  }>;
@@ -1,4 +1,4 @@
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>;
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>;
@@ -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): IActivity;
90
- export declare function enrichPollActivity({ activity, options, user }: IEnrichPollActivityArgs): IActivity;
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;
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.ReactElement<{
3
+ export declare const Input: ({ className, element, id, inputRef: ref, functions, name, placeholder, type, value, autoFocus, label, styling, ...props }: IField) => React.DOMElement<{
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
- }, string | React.JSXElementConstructor<any>>;
64
+ }, HTMLInputElement>;
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").MutableRefObject<HTMLElement | null>;
3
+ declare const usePositionedElement: (editor: BaseEditor, element: string, fallback: string) => import("react").RefObject<HTMLElement | null>;
4
4
  export default usePositionedElement;
@@ -38,5 +38,5 @@ interface Props {
38
38
  /** The id of the tooltip */
39
39
  id?: string;
40
40
  }
41
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement | null>>>;
41
+ declare const _default: React.NamedExoticComponent<Props & React.RefAttributes<HTMLElement | null>>;
42
42
  export default _default;
@@ -1,2 +1,5 @@
1
- declare function _default(state: any, action: any): any;
2
- export default _default;
1
+ export interface BasicAction {
2
+ type: string;
3
+ value: unknown;
4
+ }
5
+ export default function basicReducer<S>(state: S, action: BasicAction | BasicAction[]): S;
package/helpers/intl.d.ts CHANGED
@@ -512,6 +512,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
512
512
  header_buttons_login: string;
513
513
  header_buttons_signup: string;
514
514
  header_language_unavailable_en: string;
515
+ header_language_unavailable_uk: string;
515
516
  header_language_unavailable_vi: string;
516
517
  'header_language_unavailable_sr-Cyrl': string;
517
518
  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 | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>)[] | null | undefined;
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;
3
3
  export default passPropsToChildren;