@apolitical/component-library 6.3.4 → 6.4.0-SW.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 (59) 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.type.d.ts +1 -2
  6. package/discussion/components/post/components/author-section/author-section.d.ts +14 -0
  7. package/discussion/components/post/components/author-section/index.d.ts +1 -0
  8. package/discussion/components/post/components/categories/categories.d.ts +5 -0
  9. package/discussion/components/post/components/categories/index.d.ts +1 -0
  10. package/discussion/components/post/components/index.d.ts +4 -0
  11. package/discussion/components/post/components/poll-content/index.d.ts +1 -0
  12. package/discussion/components/post/components/poll-content/poll-content.d.ts +11 -0
  13. package/discussion/components/post/components/post-content/index.d.ts +1 -0
  14. package/discussion/components/post/components/post-content/post-content.d.ts +15 -0
  15. package/discussion/components/post/post.d.ts +13 -5
  16. package/discussion/components/post/post.helpers.d.ts +5 -1
  17. package/discussion/feeds/activities-feed/activities-feed.d.ts +6 -2
  18. package/discussion/feeds/activities-feed/cache/hooks/create-vote/create-vote.hook.d.ts +8 -0
  19. package/discussion/feeds/activities-feed/cache/hooks/create-vote/index.d.ts +1 -0
  20. package/discussion/feeds/activities-feed/cache/hooks/index.d.ts +2 -0
  21. package/discussion/feeds/activities-feed/cache/hooks/remove-vote/index.d.ts +1 -0
  22. package/discussion/feeds/activities-feed/cache/hooks/remove-vote/remove-vote.hook.d.ts +8 -0
  23. package/discussion/feeds/replies-feed/components/nested-replies-feed/nested-replies-feed.d.ts +1 -1
  24. package/discussion/feeds/replies-feed/components/reply-item/reply-item.d.ts +1 -1
  25. package/discussion/feeds/replies-feed/replies-feed.d.ts +1 -1
  26. package/discussion/index.d.ts +1 -2
  27. package/discussion/sections/activity-section/activity-section.d.ts +1 -1
  28. package/discussion/shared/constants.d.ts +1 -0
  29. package/discussion/shared/helpers/index.d.ts +2 -1
  30. package/discussion/shared/helpers/poll.helper.d.ts +23 -0
  31. package/discussion/shared/interfaces/activity.interface.d.ts +16 -1
  32. package/discussion/shared/interfaces/discussion.interface.d.ts +15 -4
  33. package/discussion/shared/interfaces/reaction.interface.d.ts +1 -1
  34. package/form/components/character-limit/character-limit.helpers.d.ts +2 -2
  35. package/form/components/form/components/field-wrapper/field-wrapper.d.ts +1 -1
  36. package/form/components/form/components/fields/checkbox/checkbox.d.ts +9 -0
  37. package/form/components/form/components/fields/index.d.ts +1 -0
  38. package/form/components/form/components/fields/input/input.d.ts +10 -2
  39. package/form/components/form/components/fields/multiple-inputs/index.d.ts +1 -0
  40. package/form/components/form/components/fields/multiple-inputs/multiple-inputs.d.ts +3 -0
  41. package/form/components/form/components/fields/multiple-options/multiple-options.d.ts +1 -1
  42. package/form/components/form/form.helpers.d.ts +2 -0
  43. package/form/components/form/form.types.d.ts +32 -7
  44. package/form/components/rich-text-editor/components/context/context.d.ts +1 -1
  45. package/form/components/rich-text-editor/rich-text-editor.types.d.ts +1 -1
  46. package/helpers/intl.d.ts +5 -0
  47. package/helpers/replace-mention-data.d.ts +1 -1
  48. package/index.js +44 -44
  49. package/index.mjs +7605 -7169
  50. package/navigation/action-bar/action-bar.d.ts +1 -1
  51. package/navigation/action-bar/components/likes/likes.d.ts +2 -2
  52. package/package.json +1 -1
  53. package/polls/poll/index.d.ts +1 -1
  54. package/polls/poll/poll.d.ts +8 -9
  55. package/polls/poll/poll.mocks.d.ts +1 -0
  56. package/polls/poll/poll.types.d.ts +9 -0
  57. package/style.css +1 -1
  58. package/styles/base/form/_labels.scss +2 -1
  59. package/styles/variables/colors/theme/_form.scss +1 -0
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type IMoreMenuOptions } from '../../navigation';
3
- import { DiscussionListLikesFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, type IDiscussionContentType } from '../../discussion/discussion';
3
+ import { DiscussionListLikesFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, type IDiscussionContentType } from '../../discussion';
4
4
  import { MemberProps } from '../../user';
5
5
  interface Props {
6
6
  /** Additional classes */
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { MemberProps } from '../../../../user';
3
- import { IDiscussionContent } from '../../../../discussion/discussion';
4
- import { ILikesFeedQueryFns } from '../../../../discussion/feeds/likes-feed';
3
+ import type { IDiscussionContent } from '../../../../discussion/shared';
4
+ import type { 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.3.4",
3
+ "version": "6.4.0-SW.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -1,3 +1,3 @@
1
- export type { IPollOption, IPollUserVote } from './poll.types';
1
+ export type * from './poll.types';
2
2
  export { ResultsVisibility } from './poll.enums';
3
3
  export { default as Poll, type IPollProps } from './poll';
@@ -1,18 +1,17 @@
1
- import type { IPollOption } from './poll.types';
1
+ import type { IPollFns, 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
- showRemoveVote?: boolean;
8
- allowMultipleVotes?: boolean;
9
- hideParticipants?: boolean;
10
- resultsVisibility?: ResultsVisibility;
11
- };
12
- functions: {
13
- createVote: (optionId: string) => void;
14
- removeVote: (voteId: string) => void;
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;
15
13
  };
14
+ functions: IPollFns;
16
15
  }
17
16
  declare const Poll: ({ title, options, settings, functions }: IPollProps) => import("react/jsx-runtime").JSX.Element;
18
17
  export default Poll;
@@ -52,6 +52,7 @@ export declare const optionsMock: {
52
52
  label: string;
53
53
  numVotes: number;
54
54
  hasUserVoted: boolean;
55
+ position: number;
55
56
  }[];
56
57
  export declare const voteMock: {
57
58
  id: string;
@@ -4,7 +4,16 @@ export interface IPollOption {
4
4
  numVotes: number;
5
5
  hasUserVoted: boolean;
6
6
  userVote?: IPollUserVote;
7
+ position: number;
7
8
  }
8
9
  export interface IPollUserVote {
9
10
  id: string;
10
11
  }
12
+ export interface IPollFns {
13
+ createVote: ({ reactionId }: {
14
+ reactionId: string;
15
+ }) => void;
16
+ removeVote: ({ reactionId }: {
17
+ reactionId: string;
18
+ }) => void;
19
+ }