@apolitical/component-library 5.2.0-jc.0 → 5.2.1-jc.1

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 (37) hide show
  1. package/discussion/discussion.helpers.d.ts +1 -1
  2. package/discussion/feeds/activities-feed/cache/cache.helper.d.ts +5 -0
  3. package/discussion/feeds/activities-feed/cache/hooks/edit/edit.hook.d.ts +1 -1
  4. package/discussion/feeds/activities-feed/cache/hooks/like/like.hook.d.ts +1 -1
  5. package/discussion/feeds/activities-feed/cache/hooks/list/list.hook.d.ts +1 -1
  6. package/discussion/feeds/activities-feed/cache/hooks/remove/remove.hook.d.ts +1 -1
  7. package/discussion/feeds/activities-feed/cache/hooks/unlike/unlike.hook.d.ts +1 -1
  8. package/discussion/feeds/activities-feed/cache/index.d.ts +1 -0
  9. package/discussion/feeds/replies-feed/cache/cache.helper.d.ts +16 -0
  10. package/discussion/feeds/replies-feed/cache/hooks/edit/edit.hook.d.ts +1 -1
  11. package/discussion/feeds/replies-feed/cache/hooks/like/like.hook.d.ts +1 -1
  12. package/discussion/feeds/replies-feed/cache/hooks/list/list.hook.d.ts +1 -1
  13. package/discussion/feeds/replies-feed/cache/hooks/remove/remove.hook.d.ts +1 -1
  14. package/discussion/feeds/replies-feed/cache/hooks/unlike/unlike.hook.d.ts +1 -1
  15. package/discussion/feeds/replies-feed/cache/index.d.ts +1 -0
  16. package/discussion/shared/helpers/index.d.ts +0 -1
  17. package/general/buttons/button/button.d.ts +1 -0
  18. package/index.js +39 -39
  19. package/index.mjs +1217 -1163
  20. package/package.json +1 -1
  21. package/sections/full-width-section/full-width-section.d.ts +2 -0
  22. package/style.css +1 -1
  23. package/styles/variables/colors/_colors.scss +2 -0
  24. package/styles/variables/colors/theme/_base.scss +1 -1
  25. package/styles/variables/colors/theme/_layout.scss +1 -1
  26. package/user/index.d.ts +0 -2
  27. package/user/member/member.helpers.d.ts +1 -1
  28. package/discussion/feeds/likes-feed/cache/cache.interface.d.ts +0 -11
  29. package/discussion/feeds/likes-feed/cache/hooks/feed/feed.hook.d.ts +0 -20
  30. package/discussion/feeds/likes-feed/cache/hooks/feed/index.d.ts +0 -1
  31. package/discussion/feeds/likes-feed/cache/hooks/index.d.ts +0 -2
  32. package/discussion/feeds/likes-feed/cache/hooks/list/index.d.ts +0 -1
  33. package/discussion/feeds/likes-feed/cache/hooks/list/list.hook.d.ts +0 -16
  34. package/discussion/feeds/likes-feed/cache/index.d.ts +0 -2
  35. package/discussion/feeds/likes-feed/index.d.ts +0 -2
  36. package/discussion/feeds/likes-feed/likes-feed.d.ts +0 -20
  37. package/discussion/shared/helpers/cache.helper.d.ts +0 -25
@@ -15,5 +15,5 @@ export declare const getAuthorData: (author: IUser) => "deleted" | {
15
15
  image: {
16
16
  thumbnail: string | undefined;
17
17
  };
18
- badges: import("..").IBadgesObject | undefined;
18
+ badges: import("../user/badge").IBadgesObject | undefined;
19
19
  };
@@ -0,0 +1,5 @@
1
+ import type { ICache, ICacheItem, ICacheItems } from './cache.interface';
2
+ export declare function addItem(item: ICacheItem, cache?: ICache, replace?: boolean): ICache;
3
+ export declare function findItem(itemId: string, cache?: ICache): import("../../../shared").IActivity | undefined;
4
+ export declare function removeItem(itemId: string, cache: ICache): ICache;
5
+ export declare function flattenCache(cache?: ICache): ICacheItems;
@@ -4,5 +4,5 @@ interface IEditVars {
4
4
  activityId: string;
5
5
  content: string;
6
6
  }
7
- export declare function useEditActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, }: IMutationContext<ICacheItem, Error, IEditVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IActivity, Error, IEditVars, ICache>;
7
+ export declare function useEditActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, }: IMutationContext<ICacheItem, Error, IEditVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IActivity, Error, IEditVars, ICache>;
8
8
  export {};
@@ -4,5 +4,5 @@ interface ILikeVars {
4
4
  activityId: string;
5
5
  reactionId?: string;
6
6
  }
7
- export declare function useLikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, queryClient, queryKey, }: IMutationContext<ICacheSubitem, Error, ILikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ILikeVars, ICache>;
7
+ export declare function useLikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, queryClient, queryKey, }: IMutationContext<ICacheSubitem, Error, ILikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ILikeVars, ICache>;
8
8
  export {};
@@ -6,7 +6,7 @@ export interface IListActivitiesArgs {
6
6
  rankingMethod?: string;
7
7
  }
8
8
  export declare function useListActivities({ queryFn, queryKey, rankingMethod, }: IListActivitiesArgs): {
9
- activities: import('../../../../../../discussion/shared').IActivity[];
9
+ activities: import("../..").ICacheItems;
10
10
  error: Error | null;
11
11
  isLoading: boolean;
12
12
  hasNextPage: boolean;
@@ -3,5 +3,5 @@ import type { ICache } from '../..';
3
3
  interface IRemoveVars {
4
4
  activityId: string;
5
5
  }
6
- export declare function useRemoveActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, }: IMutationContext<void, Error, IRemoveVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<void, Error, IRemoveVars, ICache>;
6
+ export declare function useRemoveActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, }: IMutationContext<void, Error, IRemoveVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<void, Error, IRemoveVars, ICache>;
7
7
  export {};
@@ -4,5 +4,5 @@ interface IUnlikeVars {
4
4
  activityId: string;
5
5
  reactionId?: string;
6
6
  }
7
- export declare function useUnlikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, user, }: IMutationContext<unknown, Error, IUnlikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<unknown, Error, IUnlikeVars, ICache>;
7
+ export declare function useUnlikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, user, }: IMutationContext<unknown, Error, IUnlikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<unknown, Error, IUnlikeVars, ICache>;
8
8
  export {};
@@ -1,2 +1,3 @@
1
1
  export * from './hooks';
2
+ export * from './cache.helper';
2
3
  export * from './cache.interface';
@@ -0,0 +1,16 @@
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 {};
@@ -4,5 +4,5 @@ interface IEditVars {
4
4
  replyId: string;
5
5
  content: string;
6
6
  }
7
- export declare function useEditReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, }: IMutationContext<ICacheItem, Error, IEditVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, IEditVars, ICache>;
7
+ export declare function useEditReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, }: IMutationContext<ICacheItem, Error, IEditVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, IEditVars, ICache>;
8
8
  export {};
@@ -4,5 +4,5 @@ interface ILikeVars {
4
4
  replyId: string;
5
5
  reactionId?: string;
6
6
  }
7
- export declare function useLikeReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, queryClient, queryKey, }: IMutationContext<ICacheSubitem, Error, ILikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ILikeVars, ICache>;
7
+ export declare function useLikeReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, queryClient, queryKey, }: IMutationContext<ICacheSubitem, Error, ILikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ILikeVars, ICache>;
8
8
  export {};
@@ -5,7 +5,7 @@ export interface IListRepliesArgs {
5
5
  queryKey: QueryKey;
6
6
  }
7
7
  export declare function useListReplies({ queryFn, queryKey }: IListRepliesArgs): {
8
- replies: import('../../../../../../discussion/shared').IReaction[];
8
+ replies: import("../..").ICacheItems;
9
9
  error: Error | null;
10
10
  isLoading: boolean;
11
11
  hasNextPage: boolean;
@@ -3,5 +3,5 @@ import type { ICache } from '../..';
3
3
  interface IRemoveVars {
4
4
  replyId: string;
5
5
  }
6
- export declare function useRemoveReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, }: IMutationContext<void, Error, IRemoveVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<void, Error, IRemoveVars, ICache>;
6
+ export declare function useRemoveReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, }: IMutationContext<void, Error, IRemoveVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<void, Error, IRemoveVars, ICache>;
7
7
  export {};
@@ -4,5 +4,5 @@ interface IUnlikeVars {
4
4
  replyId: string;
5
5
  reactionId?: string;
6
6
  }
7
- export declare function useUnlikeReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, user, }: IMutationContext<unknown, Error, IUnlikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<unknown, Error, IUnlikeVars, ICache>;
7
+ export declare function useUnlikeReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, user, }: IMutationContext<unknown, Error, IUnlikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<unknown, Error, IUnlikeVars, ICache>;
8
8
  export {};
@@ -1,2 +1,3 @@
1
1
  export * from './hooks';
2
+ export * from './cache.helper';
2
3
  export * from './cache.interface';
@@ -1,4 +1,3 @@
1
1
  export * from './activity.helper';
2
2
  export * from './reply.helper';
3
- export * from './cache.helper';
4
3
  export { default as triggerDiscussionPostAdded } from './trigger-discussion-post-added';
@@ -18,6 +18,7 @@ export interface ButtonPropsType {
18
18
  styling?: {
19
19
  muted?: boolean;
20
20
  fullWidth?: boolean;
21
+ new?: boolean;
21
22
  };
22
23
  /** The icon to show on the button */
23
24
  icon?: ButtonIconType;