@apolitical/component-library 1.18.5 → 1.18.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.
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
2
  export declare const ConversationContext: React.Context<{
3
- showThread: boolean;
4
3
  showForm: boolean;
5
4
  updateConversation?: React.Dispatch<React.SetStateAction<{
6
- showThread: boolean;
7
5
  showForm: boolean;
8
6
  }>> | undefined;
9
7
  }>;
@@ -17,6 +17,8 @@ export interface IDiscussionForm {
17
17
  };
18
18
  /** Whether the title should show */
19
19
  showTitle?: boolean;
20
+ /** Whether the success message should show on a successful submit */
21
+ showSuccessMessage?: boolean;
20
22
  };
21
23
  /** The `ref` for the input, if we need to have control over it in the parent */
22
24
  inputRef?: React.Ref<HTMLTextAreaElement> | undefined;
@@ -3,5 +3,5 @@ import type { ICache, ICacheItem } from '../..';
3
3
  interface ICreateVars {
4
4
  content: string;
5
5
  }
6
- export declare function useCreateActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, queryClient, queryKey, user, }: IMutationContext<ICacheItem, Error, ICreateVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IActivity, Error, ICreateVars, ICache>;
6
+ export declare function useCreateActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, queryClient, queryKey, user, }: IMutationContext<ICacheItem, Error, ICreateVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IActivity, Error, ICreateVars, ICache>;
7
7
  export {};
@@ -5,5 +5,5 @@ interface ICreateVars {
5
5
  content: string;
6
6
  replyId?: string;
7
7
  }
8
- export declare function useCreateReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError, }, queryClient, queryKey, user, }: IMutationContext<ICacheItem, Error, ICreateVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ICreateVars, ICache>;
8
+ export declare function useCreateReply({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, queryClient, queryKey, user, }: IMutationContext<ICacheItem, Error, ICreateVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ICreateVars, ICache>;
9
9
  export {};
@@ -0,0 +1,2 @@
1
+ declare const _default: (content?: string) => string;
2
+ export default _default;
@@ -1,2 +1,3 @@
1
1
  export * from './activity.helper';
2
2
  export * from './reply.helper';
3
+ export { default as idForPost } from './id-for-post';
@@ -0,0 +1 @@
1
+ export { default as useScrollToPost } from './use-scroll-to-post';
@@ -0,0 +1,2 @@
1
+ declare const _default: () => void;
2
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  export * from './constants';
2
2
  export * from './handlers';
3
3
  export * from './helpers';
4
+ export * from './hooks';
4
5
  export * from './interfaces';
5
6
  export * from './mocks';
@@ -14,6 +14,7 @@ interface IGetShortDateHowLongAgo {
14
14
  path: string;
15
15
  number?: number | undefined;
16
16
  } | '';
17
+ smallestUnit?: 'seconds' | 'minutes' | 'hours';
17
18
  }
18
19
  export declare const getMonth: (date: DateType, locale?: string) => string;
19
20
  export declare const getNumericDay: (date: DateType, locale?: string) => string;
@@ -23,4 +24,5 @@ export declare const getLongDate: (date: DateType, locale?: string) => string;
23
24
  export declare const getShortDateHowLongAgo: IGetShortDateHowLongAgo;
24
25
  export declare const getDateWithDelta: IGetDateWithDelta;
25
26
  export declare const dateToUTC: (date?: Date) => Date;
27
+ export declare const dateWithin: (dateInPast: DateType, number: number, unit: 'seconds' | 'minutes' | 'hours') => boolean;
26
28
  export {};