@apolitical/component-library 1.16.0 → 1.17.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.
- package/discussion/feeds/activities-feed/activities-feed.d.ts +6 -5
- package/discussion/feeds/activities-feed/cache/handlers/error.handler.d.ts +2 -2
- package/discussion/feeds/activities-feed/cache/handlers/mutate.handler.d.ts +2 -2
- package/discussion/feeds/activities-feed/cache/helpers/index.d.ts +0 -1
- package/discussion/feeds/activities-feed/cache/hooks/like/like.hook.d.ts +2 -2
- package/discussion/feeds/activities-feed/cache/hooks/list/list.hook.d.ts +10 -4
- package/discussion/feeds/activities-feed/cache/hooks/unlike/unlike.hook.d.ts +2 -2
- package/discussion/feeds/activities-feed/cache/interfaces/cache.interface.d.ts +12 -2
- package/discussion/feeds/activities-feed/cache/interfaces/index.d.ts +0 -1
- package/discussion/feeds/activities-feed/cache/interfaces/mutation.interface.d.ts +3 -3
- package/discussion/feeds/activities-feed/cache/interfaces/query.interface.d.ts +0 -4
- package/index.js +14 -14
- package/index.mjs +1094 -1060
- package/navigation/load-more/load-more.d.ts +1 -1
- package/package.json +1 -1
- package/discussion/feeds/activities-feed/cache/helpers/activity.helper.d.ts +0 -21
- package/discussion/feeds/activities-feed/cache/helpers/cache.helper.d.ts +0 -4
- package/discussion/feeds/activities-feed/cache/helpers/context.helper.d.ts +0 -2
- package/discussion/feeds/activities-feed/cache/hooks/create/create.hook.d.ts +0 -6
- package/discussion/feeds/activities-feed/cache/hooks/edit/edit.hook.d.ts +0 -7
- package/discussion/feeds/activities-feed/cache/hooks/remove/remove.hook.d.ts +0 -6
- package/discussion/feeds/activities-feed/cache/interfaces/handler.interface.d.ts +0 -4
- package/discussion/feeds/activities-feed/cache/mocks/cache.mock.d.ts +0 -4
- package/discussion/feeds/activities-feed/cache/mocks/context.mock.d.ts +0 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonIconType } from '../../general';
|
|
3
3
|
export interface PaginationType {
|
|
4
|
-
/** Whether there is another page to load */
|
|
4
|
+
/** Whether or not there is another page of content to load */
|
|
5
5
|
hasNextPage: boolean;
|
|
6
6
|
/** The function that will be invoked when the button is clicked */
|
|
7
7
|
loadNextPage: ((e: React.MouseEvent<HTMLElement>) => void);
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { IUserContext } from '../../../../../context';
|
|
2
|
-
import type { ICacheItem, ICacheSubitem } from '../interfaces';
|
|
3
|
-
interface IEnrichActivityArgs {
|
|
4
|
-
activity: ICacheItem | Partial<ICacheItem> | {
|
|
5
|
-
content: string;
|
|
6
|
-
};
|
|
7
|
-
user: IUserContext;
|
|
8
|
-
}
|
|
9
|
-
interface IIncrementLikesArgs {
|
|
10
|
-
activity: ICacheItem;
|
|
11
|
-
reaction?: ICacheSubitem;
|
|
12
|
-
user?: IUserContext;
|
|
13
|
-
}
|
|
14
|
-
interface IDecrementLikesArgs {
|
|
15
|
-
activity: ICacheItem;
|
|
16
|
-
user?: IUserContext;
|
|
17
|
-
}
|
|
18
|
-
export declare function enrichActivity({ activity, user }: IEnrichActivityArgs): ICacheItem;
|
|
19
|
-
export declare function incrementLikes({ activity, reaction }: IIncrementLikesArgs): void;
|
|
20
|
-
export declare function decrementLikes({ activity, user }: IDecrementLikesArgs): void;
|
|
21
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ICacheItem, ICacheItems } from '../interfaces';
|
|
2
|
-
export declare function addItem(item: ICacheItem, cache: ICacheItems): ICacheItem[];
|
|
3
|
-
export declare function findItem(itemId: string, cache: ICacheItems): ICacheItem | undefined;
|
|
4
|
-
export declare function removeItem(itemId: string, cache: ICacheItems): ICacheItem[];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { IMutationProps, IHandlerContext, ICacheItem } from '../../interfaces';
|
|
2
|
-
interface ICreateVars {
|
|
3
|
-
content: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function useCreateActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, queryClient, queryKey, user, }: IMutationProps): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<ICacheItem, Error, ICreateVars, IHandlerContext>;
|
|
6
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { IMutationProps, IHandlerContext, ICacheItem } from '../../interfaces';
|
|
2
|
-
interface IEditVars {
|
|
3
|
-
activityId: string;
|
|
4
|
-
body: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function useEditActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, }: IMutationProps): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<ICacheItem, Error, IEditVars, IHandlerContext>;
|
|
7
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { IMutationProps, IHandlerContext, ICacheItem } from '../../interfaces';
|
|
2
|
-
interface IRemoveVars {
|
|
3
|
-
activityId: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function useRemoveActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, }: IMutationProps): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<ICacheItem, Error, IRemoveVars, IHandlerContext>;
|
|
6
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const cacheMock1: readonly import("..").ICacheItem[];
|
|
2
|
-
export declare const cacheMock2: readonly import("..").ICacheItem[];
|
|
3
|
-
export declare const cacheMock3: readonly import("..").ICacheItem[];
|
|
4
|
-
export declare const cacheMock4: readonly import("..").ICacheItem[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const contextMock1: Readonly<{
|
|
2
|
-
data: readonly import("..").ICacheItem[];
|
|
3
|
-
}>;
|
|
4
|
-
export declare const contextMock2: Readonly<{
|
|
5
|
-
data: readonly import("..").ICacheItem[];
|
|
6
|
-
}>;
|
|
7
|
-
export declare const contextMock3: Readonly<{
|
|
8
|
-
data: readonly import("..").ICacheItem[];
|
|
9
|
-
}>;
|