@apolitical/component-library 5.2.1-jc.6 → 5.2.2

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 (56) hide show
  1. package/communities/members-list/index.d.ts +2 -0
  2. package/communities/members-list/members-list.constants.d.ts +1 -0
  3. package/communities/members-list/members-list.d.ts +6 -2
  4. package/discussion/components/likes/components/index.d.ts +1 -0
  5. package/discussion/components/likes/components/likes-modal/index.d.ts +1 -0
  6. package/discussion/components/likes/components/likes-modal/likes-modal.d.ts +17 -0
  7. package/discussion/components/likes/index.d.ts +1 -0
  8. package/discussion/components/likes/likes.d.ts +14 -3
  9. package/discussion/components/likes/likes.mock.d.ts +2 -0
  10. package/discussion/components/likes/mocks/index.d.ts +1 -0
  11. package/discussion/components/likes/mocks/likes-response.mock.d.ts +64 -0
  12. package/discussion/components/likes/tooltip.hook.d.ts +5 -0
  13. package/discussion/components/post/post.d.ts +9 -3
  14. package/discussion/components/post/post.mock.d.ts +64 -0
  15. package/discussion/discussion.helpers.d.ts +1 -1
  16. package/discussion/feeds/activities-feed/activities-feed.d.ts +2 -0
  17. package/discussion/feeds/activities-feed/cache/hooks/edit/edit.hook.d.ts +1 -1
  18. package/discussion/feeds/activities-feed/cache/hooks/like/like.hook.d.ts +1 -1
  19. package/discussion/feeds/activities-feed/cache/hooks/list/list.hook.d.ts +1 -1
  20. package/discussion/feeds/activities-feed/cache/hooks/remove/remove.hook.d.ts +1 -1
  21. package/discussion/feeds/activities-feed/cache/hooks/unlike/unlike.hook.d.ts +1 -1
  22. package/discussion/feeds/activities-feed/cache/index.d.ts +0 -1
  23. package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +75 -1
  24. package/discussion/feeds/index.d.ts +1 -0
  25. package/discussion/feeds/likes-feed/cache/cache.interface.d.ts +11 -0
  26. package/discussion/feeds/likes-feed/cache/hooks/feed/feed.hook.d.ts +20 -0
  27. package/discussion/feeds/likes-feed/cache/hooks/feed/index.d.ts +1 -0
  28. package/discussion/feeds/likes-feed/cache/hooks/index.d.ts +2 -0
  29. package/discussion/feeds/likes-feed/cache/hooks/list/index.d.ts +1 -0
  30. package/discussion/feeds/likes-feed/cache/hooks/list/list.hook.d.ts +16 -0
  31. package/discussion/feeds/likes-feed/cache/index.d.ts +2 -0
  32. package/discussion/feeds/likes-feed/index.d.ts +3 -0
  33. package/discussion/feeds/likes-feed/likes-feed.d.ts +16 -0
  34. package/discussion/feeds/replies-feed/cache/hooks/edit/edit.hook.d.ts +1 -1
  35. package/discussion/feeds/replies-feed/cache/hooks/like/like.hook.d.ts +1 -1
  36. package/discussion/feeds/replies-feed/cache/hooks/list/list.hook.d.ts +1 -1
  37. package/discussion/feeds/replies-feed/cache/hooks/remove/remove.hook.d.ts +1 -1
  38. package/discussion/feeds/replies-feed/cache/hooks/unlike/unlike.hook.d.ts +1 -1
  39. package/discussion/feeds/replies-feed/cache/index.d.ts +0 -1
  40. package/discussion/feeds/replies-feed/nested-replies-feed/nested-replies-feed.d.ts +7 -1
  41. package/discussion/feeds/replies-feed/replies-feed.d.ts +14 -10
  42. package/discussion/sections/activity-section/activity-section.d.ts +2 -0
  43. package/discussion/shared/helpers/cache.helper.d.ts +25 -0
  44. package/discussion/shared/helpers/index.d.ts +1 -0
  45. package/general/link/link.d.ts +2 -2
  46. package/general/responsive-image/responsive-image.helpers.d.ts +10 -1
  47. package/helpers/intl.d.ts +1 -1
  48. package/index.js +61 -61
  49. package/index.mjs +8699 -8564
  50. package/package.json +1 -1
  51. package/style.css +1 -1
  52. package/styles/variables/colors/theme/_general.scss +1 -0
  53. package/text/helper-text-box/helper-text-box.d.ts +2 -2
  54. package/text/helper-text-box/index.d.ts +1 -0
  55. package/user/index.d.ts +2 -0
  56. package/user/member/member.helpers.d.ts +1 -1
@@ -2,6 +2,19 @@
2
2
  import { type IProfileFormProps } from '../../../form';
3
3
  import type { IMentionsFns } from './../../discussion';
4
4
  import { type IQueryFns } from './cache';
5
+ import { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
6
+ interface RepliesFunctions {
7
+ /** Functions for the replies query */
8
+ reactions: IQueryFns;
9
+ /** Functions for the likes query */
10
+ likes: ILikesFeedQueryFns;
11
+ /** Query functions for the mentions */
12
+ mentions: IMentionsFns;
13
+ /** Function to join the community */
14
+ join: () => Promise<void>;
15
+ /** Function to leave the community */
16
+ leave: () => Promise<void>;
17
+ }
5
18
  interface Props {
6
19
  /** The base path, used for slugs */
7
20
  basePath: string;
@@ -14,16 +27,7 @@ interface Props {
14
27
  /** Whether the user is a member of the community */
15
28
  isMember: boolean;
16
29
  /** Functions for the replies query */
17
- functions: {
18
- /** Query functions for the replies */
19
- reactions: IQueryFns;
20
- /** Query functions for the mentions */
21
- mentions: IMentionsFns;
22
- /** Function to join the community */
23
- join: () => Promise<void>;
24
- /** Function to leave the community */
25
- leave: () => Promise<void>;
26
- };
30
+ functions: RepliesFunctions;
27
31
  /** Props to pass into the profile form */
28
32
  profile: IProfileFormProps;
29
33
  }
@@ -3,6 +3,7 @@ import { type IProfileFormProps } from '../../../form';
3
3
  import { type IRepliesFeedQueryFns } from '../../../discussion/feeds';
4
4
  import type { IMentionsFns } from './../../discussion.d';
5
5
  import { type IQueryFns } from './cache';
6
+ import type { ILikesFeedQueryFns } from '../../../discussion/feeds/likes-feed';
6
7
  interface IActivitySectionQueryFns extends IQueryFns {
7
8
  remove: () => Promise<void>;
8
9
  }
@@ -15,6 +16,7 @@ export interface IActivitySectionProps {
15
16
  functions: {
16
17
  activities: IActivitySectionQueryFns;
17
18
  reactions: IRepliesFeedQueryFns;
19
+ likes: ILikesFeedQueryFns;
18
20
  mentions: IMentionsFns;
19
21
  join: () => Promise<void>;
20
22
  leave: () => Promise<void>;
@@ -0,0 +1,25 @@
1
+ import { InfiniteData } from '@tanstack/query-core';
2
+ type ICacheItemBase = {
3
+ id: string;
4
+ };
5
+ export interface ICachePage<ICacheItem extends ICacheItemBase> {
6
+ results: ICacheItem[];
7
+ next: string;
8
+ }
9
+ export type ICache<ICacheItem extends ICacheItemBase> = InfiniteData<ICachePage<ICacheItem>, string>;
10
+ interface IAdditionOptions {
11
+ append?: boolean;
12
+ replace?: boolean;
13
+ }
14
+ export declare function buildEmptyCacheWithItem<ICacheItem>(item: ICacheItem): {
15
+ pages: {
16
+ next: string;
17
+ results: ICacheItem[];
18
+ }[];
19
+ pageParams: string[];
20
+ };
21
+ export declare function addItem<ICacheItem extends ICacheItemBase>(item: ICacheItem, cache?: ICache<ICacheItem>, opts?: IAdditionOptions): ICache<ICacheItem>;
22
+ export declare function findItem<ICacheItem extends ICacheItemBase>(itemId: string, cache?: ICache<ICacheItem>): ICacheItem | undefined;
23
+ export declare function removeItem<ICacheItem extends ICacheItemBase>(itemId: string, cache: ICache<ICacheItem>): ICache<ICacheItem>;
24
+ export declare function flattenCache<ICacheItem extends ICacheItemBase>(cache?: ICache<ICacheItem>): ICacheItem[];
25
+ export {};
@@ -1,3 +1,4 @@
1
1
  export * from './activity.helper';
2
2
  export * from './reply.helper';
3
+ export * from './cache.helper';
3
4
  export { default as triggerDiscussionPostAdded } from './trigger-discussion-post-added';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface Props {
2
+ export interface ILinkProps {
3
3
  /** URL for link */
4
4
  href?: string | undefined;
5
5
  /** Content to rendered */
@@ -33,5 +33,5 @@ interface Props {
33
33
  /** Data attributes for the link */
34
34
  'data-before'?: string;
35
35
  }
36
- declare const Link: ({ href, children, fallbackElement, className, onClick, gtmContext, gtmType, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
36
+ declare const Link: ({ href, children, fallbackElement, className, onClick, gtmContext, gtmType, ...props }: ILinkProps) => import("react/jsx-runtime").JSX.Element;
37
37
  export default Link;
@@ -33,7 +33,7 @@ export namespace IMAGE_ASPECTS {
33
33
  let sizes_3: string;
34
34
  export { sizes_3 as sizes };
35
35
  }
36
- namespace fallback {
36
+ namespace highlightSection {
37
37
  let range_4: {
38
38
  height: number;
39
39
  width: number;
@@ -51,6 +51,15 @@ export namespace IMAGE_ASPECTS {
51
51
  let sizes_5: string;
52
52
  export { sizes_5 as sizes };
53
53
  }
54
+ namespace fallback {
55
+ let range_6: {
56
+ height: number;
57
+ width: number;
58
+ }[];
59
+ export { range_6 as range };
60
+ let sizes_6: string;
61
+ export { sizes_6 as sizes };
62
+ }
54
63
  }
55
64
  export function buildSourceParameters({ aspect: customAspect, range: customRange, sizes: customSizes, }: {
56
65
  aspect: any;
package/helpers/intl.d.ts CHANGED
@@ -154,7 +154,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
154
154
  discussion_form_explainer_question: string;
155
155
  discussion_likes: string;
156
156
  discussion_likes_short: string;
157
- discussion_likes_more: string;
157
+ discussion_likes_showAll: string;
158
158
  discussion_likes_like: string;
159
159
  discussion_likes_unlike: string;
160
160
  discussion_likes_show: string;