@apolitical/component-library 6.5.0-SW.0 → 6.5.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.
Files changed (52) hide show
  1. package/discussion/components/conversation/conversation.d.ts +1 -1
  2. package/discussion/components/discussion-form-card/discussion-form-card.d.ts +2 -2
  3. package/discussion/components/form/components/guidelines/guidelines.d.ts +1 -1
  4. package/discussion/components/form/components/label/label.d.ts +1 -1
  5. package/discussion/components/form/form.constants.d.ts +2 -0
  6. package/discussion/components/form/form.d.ts +1 -1
  7. package/discussion/components/form/form.helpers.d.ts +4 -0
  8. package/discussion/components/form/form.type.d.ts +17 -8
  9. package/discussion/components/post/components/index.d.ts +0 -4
  10. package/discussion/components/post/post.d.ts +5 -13
  11. package/discussion/components/post/post.helpers.d.ts +1 -5
  12. package/discussion/discussion.mock.d.ts +4 -0
  13. package/discussion/feeds/activities-feed/activities-feed.d.ts +2 -6
  14. package/discussion/feeds/activities-feed/cache/hooks/index.d.ts +0 -2
  15. package/discussion/feeds/replies-feed/components/nested-replies-feed/nested-replies-feed.d.ts +1 -1
  16. package/discussion/feeds/replies-feed/components/reply-item/reply-item.d.ts +1 -1
  17. package/discussion/feeds/replies-feed/replies-feed.d.ts +1 -1
  18. package/discussion/index.d.ts +2 -1
  19. package/discussion/sections/activity-section/activity-section.d.ts +2 -2
  20. package/discussion/shared/constants.d.ts +0 -1
  21. package/discussion/shared/helpers/index.d.ts +1 -2
  22. package/discussion/shared/interfaces/activity.interface.d.ts +1 -16
  23. package/discussion/shared/interfaces/discussion.interface.d.ts +24 -21
  24. package/discussion/shared/interfaces/reaction.interface.d.ts +1 -1
  25. package/form/components/form/form.types.d.ts +2 -0
  26. package/form/components/rich-text-editor/components/context/context.d.ts +1 -1
  27. package/form/components/rich-text-editor/rich-text-editor.types.d.ts +1 -1
  28. package/helpers/intl.d.ts +7 -3
  29. package/helpers/replace-mention-data.d.ts +1 -1
  30. package/index.js +63 -63
  31. package/index.mjs +8322 -8438
  32. package/navigation/action-bar/action-bar.d.ts +2 -1
  33. package/navigation/action-bar/components/likes/likes.d.ts +2 -2
  34. package/package.json +1 -1
  35. package/polls/poll/index.d.ts +1 -1
  36. package/polls/poll/poll.d.ts +9 -8
  37. package/polls/poll/poll.mocks.d.ts +0 -1
  38. package/polls/poll/poll.types.d.ts +0 -9
  39. package/style.css +1 -1
  40. package/discussion/components/post/components/author-section/author-section.d.ts +0 -14
  41. package/discussion/components/post/components/author-section/index.d.ts +0 -1
  42. package/discussion/components/post/components/categories/categories.d.ts +0 -5
  43. package/discussion/components/post/components/categories/index.d.ts +0 -1
  44. package/discussion/components/post/components/poll-content/index.d.ts +0 -1
  45. package/discussion/components/post/components/poll-content/poll-content.d.ts +0 -11
  46. package/discussion/components/post/components/post-content/index.d.ts +0 -1
  47. package/discussion/components/post/components/post-content/post-content.d.ts +0 -15
  48. package/discussion/feeds/activities-feed/cache/hooks/create-vote/create-vote.hook.d.ts +0 -8
  49. package/discussion/feeds/activities-feed/cache/hooks/create-vote/index.d.ts +0 -1
  50. package/discussion/feeds/activities-feed/cache/hooks/remove-vote/index.d.ts +0 -1
  51. package/discussion/feeds/activities-feed/cache/hooks/remove-vote/remove-vote.hook.d.ts +0 -8
  52. package/discussion/shared/helpers/poll.helper.d.ts +0 -23
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type IMoreMenuOptions } from '../../navigation';
3
- import { DiscussionListLikesFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, type IDiscussionContentType } from '../../discussion';
3
+ import { DiscussionListLikesFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction } from '../../discussion/discussion';
4
+ import type { IDiscussionContentType } from '../../discussion/shared';
4
5
  import { MemberProps } from '../../user';
5
6
  interface Props {
6
7
  /** Additional classes */
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { MemberProps } from '../../../../user';
3
- import type { IDiscussionContent } from '../../../../discussion/shared';
4
- import type { ILikesFeedQueryFns } from '../../../../discussion/feeds/likes-feed';
3
+ import { type IDiscussionContent } from '../../../../discussion/shared';
4
+ import { ILikesFeedQueryFns } from '../../../../discussion/feeds/likes-feed';
5
5
  interface Props {
6
6
  /** The element to render around the content */
7
7
  element?: 'li' | 'div';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "6.5.0-SW.0",
3
+ "version": "6.5.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -1,3 +1,3 @@
1
- export type * from './poll.types';
1
+ export type { IPollOption, IPollUserVote } from './poll.types';
2
2
  export { ResultsVisibility } from './poll.enums';
3
3
  export { default as Poll, type IPollProps } from './poll';
@@ -1,17 +1,18 @@
1
- import type { IPollFns, IPollOption } from './poll.types';
1
+ import type { IPollOption } from './poll.types';
2
2
  import { ResultsVisibility } from './poll.enums';
3
3
  export interface IPollProps {
4
4
  title: string;
5
5
  options: IPollOption[];
6
6
  settings?: {
7
- show_remove_vote?: boolean;
8
- allow_multiple_votes?: boolean;
9
- deadline_at?: string;
10
- hide_participants?: boolean;
11
- number_of_winners?: number;
12
- results_visibility?: ResultsVisibility;
7
+ showRemoveVote?: boolean;
8
+ allowMultipleVotes?: boolean;
9
+ hideParticipants?: boolean;
10
+ resultsVisibility?: ResultsVisibility;
11
+ };
12
+ functions: {
13
+ createVote: (optionId: string) => void;
14
+ removeVote: (voteId: string) => void;
13
15
  };
14
- functions: IPollFns;
15
16
  }
16
17
  declare const Poll: ({ title, options, settings, functions }: IPollProps) => import("react/jsx-runtime").JSX.Element;
17
18
  export default Poll;
@@ -52,7 +52,6 @@ export declare const optionsMock: {
52
52
  label: string;
53
53
  numVotes: number;
54
54
  hasUserVoted: boolean;
55
- position: number;
56
55
  }[];
57
56
  export declare const voteMock: {
58
57
  id: string;
@@ -4,16 +4,7 @@ export interface IPollOption {
4
4
  numVotes: number;
5
5
  hasUserVoted: boolean;
6
6
  userVote?: IPollUserVote;
7
- position: number;
8
7
  }
9
8
  export interface IPollUserVote {
10
9
  id: string;
11
10
  }
12
- export interface IPollFns {
13
- createVote: ({ reactionId }: {
14
- reactionId: string;
15
- }) => void;
16
- removeVote: ({ reactionId }: {
17
- reactionId: string;
18
- }) => void;
19
- }