@apolitical/component-library 5.0.6-jc.3 → 5.0.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.
Files changed (33) hide show
  1. package/discussion/components/likes/index.d.ts +0 -1
  2. package/discussion/components/likes/likes.d.ts +2 -11
  3. package/discussion/components/post/post.d.ts +3 -9
  4. package/discussion/components/post/post.mock.d.ts +0 -52
  5. package/discussion/discussion.helpers.d.ts +1 -1
  6. package/discussion/feeds/activities-feed/activities-feed.d.ts +0 -2
  7. package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +1 -75
  8. package/discussion/feeds/replies-feed/nested-replies-feed/nested-replies-feed.d.ts +1 -7
  9. package/discussion/feeds/replies-feed/replies-feed.d.ts +10 -14
  10. package/discussion/sections/activity-section/activity-section.d.ts +0 -2
  11. package/form/components/rich-text-editor/helpers/transform/transform.d.ts +1 -1
  12. package/general/link/link.d.ts +2 -2
  13. package/helpers/intl.d.ts +1 -1
  14. package/index.js +50 -50
  15. package/index.mjs +7784 -7946
  16. package/package.json +1 -1
  17. package/style.css +1 -1
  18. package/styles/variables/colors/theme/_general.scss +0 -1
  19. package/user/index.d.ts +0 -2
  20. package/user/member/member.helpers.d.ts +1 -1
  21. package/discussion/components/likes/likes-modal.d.ts +0 -28
  22. package/discussion/components/likes/likes.mock.d.ts +0 -2
  23. package/discussion/components/likes/mocks/likes-response.mock.d.ts +0 -52
  24. package/discussion/feeds/likes-feed/cache/cache.helper.d.ts +0 -16
  25. package/discussion/feeds/likes-feed/cache/cache.interface.d.ts +0 -13
  26. package/discussion/feeds/likes-feed/cache/hooks/feed/feed.hook.d.ts +0 -20
  27. package/discussion/feeds/likes-feed/cache/hooks/feed/index.d.ts +0 -1
  28. package/discussion/feeds/likes-feed/cache/hooks/index.d.ts +0 -2
  29. package/discussion/feeds/likes-feed/cache/hooks/list/index.d.ts +0 -1
  30. package/discussion/feeds/likes-feed/cache/hooks/list/list.hook.d.ts +0 -16
  31. package/discussion/feeds/likes-feed/cache/index.d.ts +0 -3
  32. package/discussion/feeds/likes-feed/index.d.ts +0 -2
  33. package/discussion/feeds/likes-feed/likes-feed.d.ts +0 -20
@@ -16,7 +16,6 @@ $general: (
16
16
  time-to-complete: get-map($c, 'p500'),
17
17
  tooltip: get-map($c, 'white'),
18
18
  tooltip_bg: color.adjust(get-map($c, 'n900'), $alpha: -0.1),
19
- tooltip_button: get-map($c, 'white'),
20
19
  progress_tracker_line_bg: get-map($c, 'n100'),
21
20
  progress_tracker_line_bg_active: get-map($c, 'b700'),
22
21
  progress_tracker_dot_bg: get-map($c, 'n100'),
package/user/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- export * from './badge';
2
- export * from './badges';
3
1
  export * from './contributors';
4
2
  export * from './directory';
5
3
  export * from './member';
@@ -14,7 +14,7 @@ export declare const getMember: (member: MemberProps) => {
14
14
  country: string;
15
15
  url: string;
16
16
  image: string | undefined;
17
- badges: import("..").IBadgesObject | undefined;
17
+ badges: import("../badge").IBadgesObject | undefined;
18
18
  };
19
19
  export declare const getUserDetails: ({ role, organisation, country, maximumCharacters, }: {
20
20
  role?: string | undefined;
@@ -1,28 +0,0 @@
1
- import { IBadgesOption } from '../../../user/badges';
2
- import { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
3
- export interface ILikesModalProps {
4
- /** Whether the modal is open on page load */
5
- showModal?: boolean;
6
- /** The number of likes */
7
- likes?: number;
8
- /** The ID of the activity to show likes for */
9
- activityId: string;
10
- /** The base path, used for slugs */
11
- basePath: string;
12
- /** The ID of the parent */
13
- parentId: string;
14
- /** Whether to show badges and the scope of the badge */
15
- badges?: IBadgesOption;
16
- /** Functions used inside the modal */
17
- functions: {
18
- likes: {
19
- list: ILikesFeedQueryFns['list'];
20
- };
21
- /** Function to call when the modal is closed */
22
- onClose?: () => void;
23
- };
24
- /** Additional classes */
25
- className?: string;
26
- }
27
- declare const LikesModal: ({ showModal, activityId, functions: { onClose, likes: likesFns }, badges, likes, className, basePath, parentId, }: ILikesModalProps) => import("react/jsx-runtime").JSX.Element;
28
- export default LikesModal;
@@ -1,2 +0,0 @@
1
- import { MemberProps } from '../../../user';
2
- export declare const peopleWhoLiked: MemberProps[];
@@ -1,52 +0,0 @@
1
- export declare const likesResponseMock: {
2
- results: ({
3
- created_at: string;
4
- updated_at: string;
5
- id: string;
6
- user_id: string;
7
- user: {
8
- id: string;
9
- data: {
10
- name: string;
11
- thumbnail: string;
12
- jobTitle: string;
13
- organization: string;
14
- };
15
- created_at?: undefined;
16
- updated_at?: undefined;
17
- };
18
- kind: string;
19
- activity_id: string;
20
- data: {
21
- mentioned_users: null;
22
- };
23
- parent: string;
24
- latest_children: {};
25
- children_counts: {};
26
- } | {
27
- created_at: string;
28
- updated_at: string;
29
- id: string;
30
- user_id: string;
31
- user: {
32
- created_at: string;
33
- updated_at: string;
34
- id: string;
35
- data: {
36
- jobTitle: string;
37
- name: string;
38
- organization: string;
39
- thumbnail: string;
40
- };
41
- };
42
- kind: string;
43
- activity_id: string;
44
- data: {
45
- mentioned_users: null;
46
- };
47
- parent: string;
48
- latest_children: {};
49
- children_counts: {};
50
- })[];
51
- next: string;
52
- };
@@ -1,16 +0,0 @@
1
- import type { ICache, ICacheItem, ICacheItems } from './cache.interface';
2
- interface IAdditionOptions {
3
- append?: boolean;
4
- replace?: boolean;
5
- }
6
- export declare function addItem(item: ICacheItem, cache?: ICache, opts?: IAdditionOptions): {
7
- pages: {
8
- next: string;
9
- results: import("../../../shared").IReaction[];
10
- }[];
11
- pageParams: string[];
12
- };
13
- export declare function findItem(itemId: string, cache?: ICache): import("../../../shared").IReaction | undefined;
14
- export declare function removeItem(itemId: string, cache: ICache): ICache;
15
- export declare function flattenCache(cache?: ICache): ICacheItems;
16
- export {};
@@ -1,13 +0,0 @@
1
- import { InfiniteData } from '@tanstack/query-core';
2
- import type { ReactionFilterAPIResponse } from 'getstream';
3
- import type { IReaction, IUser } from '../../../../discussion/shared';
4
- export type ICache = InfiniteData<ICachePage, string>;
5
- export type ICachePage = ExtendedReactionFilterAPIResponse;
6
- export type ICacheItems = ICacheItem[];
7
- export type ICacheItem = IReaction;
8
- export type ICacheSubitem = IReaction;
9
- export type ICacheUser = IUser;
10
- interface ExtendedReactionFilterAPIResponse extends ReactionFilterAPIResponse {
11
- results: IReaction[];
12
- }
13
- export {};
@@ -1,20 +0,0 @@
1
- import { QueryKey } from '@tanstack/react-query';
2
- import type { ICachePage } from '../..';
3
- import { UR } from 'faye';
4
- export interface IQueryFns {
5
- list: (_: UR) => Promise<ICachePage>;
6
- }
7
- interface ILikesFeedArgs {
8
- queryFns: IQueryFns;
9
- queryKey: QueryKey;
10
- }
11
- export declare function useLikesFeed({ queryFns: { list }, queryKey }: ILikesFeedArgs): {
12
- likesCount: string;
13
- error: Error | null;
14
- isLoading: boolean;
15
- hasNextPage: boolean;
16
- fetchNextPage: (options?: import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").a2 | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").aj<import("../..").ICache, Error>>;
17
- refetch: (options?: import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").Z | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").ac<import("../..").ICache, Error>>;
18
- likes: import("../..").ICacheItems;
19
- };
20
- export {};
@@ -1 +0,0 @@
1
- export * from './feed.hook';
@@ -1,2 +0,0 @@
1
- export * from './list';
2
- export * from './feed';
@@ -1 +0,0 @@
1
- export * from './list.hook';
@@ -1,16 +0,0 @@
1
- import { QueryKey } from '@tanstack/react-query';
2
- import type { ICache, ICachePage } from '../..';
3
- import { UR } from 'faye';
4
- export interface IListLikesArgs {
5
- queryFn: (_: UR) => Promise<ICachePage>;
6
- queryKey: QueryKey;
7
- }
8
- export declare function useListLikes({ queryFn, queryKey }: IListLikesArgs): {
9
- likes: import("../..").ICacheItems;
10
- likesCount: string;
11
- error: Error | null;
12
- isLoading: boolean;
13
- hasNextPage: boolean;
14
- fetchNextPage: (options?: import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").a2 | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").aj<ICache, Error>>;
15
- refetch: (options?: import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").Z | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-13f81fcb").ac<ICache, Error>>;
16
- };
@@ -1,3 +0,0 @@
1
- export * from './hooks';
2
- export * from './cache.helper';
3
- export * from './cache.interface';
@@ -1,2 +0,0 @@
1
- export type { IQueryFns as ILikesFeedQueryFns } from './cache';
2
- export { default as LikesFeed } from './likes-feed';
@@ -1,20 +0,0 @@
1
- import { IQueryFns } from '../../../discussion/feeds/likes-feed/cache';
2
- import { type IBadgesOption } from '../../../user';
3
- interface Props {
4
- /** Whether to show badges and the scope of the badge */
5
- badges?: IBadgesOption;
6
- /** The base path, used for slugs */
7
- basePath: string;
8
- /** The ID of the parent, used for slugs */
9
- parentId: string;
10
- /** The ID of the activity the replies are for */
11
- activityId: string;
12
- /** The initial number of likes */
13
- initialLikeCount: number;
14
- /** Functions for the replies query */
15
- functions: {
16
- likes: IQueryFns;
17
- };
18
- }
19
- export default function LikesFeed({ badges, basePath, parentId, activityId, initialLikeCount, functions, }: Props): import("react/jsx-runtime").JSX.Element;
20
- export {};