@apolitical/component-library 6.5.0 → 6.6.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.
- package/discussion/components/conversation/conversation.d.ts +1 -1
- package/discussion/components/discussion-form-card/discussion-form-card.d.ts +2 -2
- package/discussion/components/form/components/guidelines/guidelines.d.ts +1 -1
- package/discussion/components/form/components/label/label.d.ts +1 -1
- package/discussion/components/form/form.type.d.ts +1 -1
- package/discussion/components/post/components/author-section/author-section.d.ts +14 -0
- package/discussion/components/post/components/author-section/index.d.ts +1 -0
- package/discussion/components/post/components/categories/categories.d.ts +5 -0
- package/discussion/components/post/components/categories/index.d.ts +1 -0
- package/discussion/components/post/components/index.d.ts +4 -0
- package/discussion/components/post/components/poll-content/index.d.ts +1 -0
- package/discussion/components/post/components/poll-content/poll-content.d.ts +10 -0
- package/discussion/components/post/components/post-content/index.d.ts +1 -0
- package/discussion/components/post/components/post-content/post-content.d.ts +15 -0
- package/discussion/components/post/post.d.ts +13 -5
- package/discussion/components/post/post.helpers.d.ts +5 -1
- package/discussion/feeds/activities-feed/activities-feed.d.ts +5 -2
- package/discussion/feeds/activities-feed/cache/hooks/create-vote/create-vote.hook.d.ts +8 -0
- package/discussion/feeds/activities-feed/cache/hooks/create-vote/index.d.ts +1 -0
- package/discussion/feeds/activities-feed/cache/hooks/index.d.ts +2 -0
- package/discussion/feeds/activities-feed/cache/hooks/remove-vote/index.d.ts +1 -0
- package/discussion/feeds/activities-feed/cache/hooks/remove-vote/remove-vote.hook.d.ts +8 -0
- package/discussion/feeds/replies-feed/components/nested-replies-feed/nested-replies-feed.d.ts +1 -1
- package/discussion/feeds/replies-feed/components/reply-item/reply-item.d.ts +1 -1
- package/discussion/feeds/replies-feed/replies-feed.d.ts +1 -1
- package/discussion/index.d.ts +1 -2
- package/discussion/sections/activity-section/activity-section.d.ts +1 -1
- package/discussion/shared/constants.d.ts +1 -0
- package/discussion/shared/helpers/index.d.ts +2 -1
- package/discussion/shared/helpers/poll.helper.d.ts +23 -0
- package/discussion/shared/interfaces/activity.interface.d.ts +16 -1
- package/discussion/shared/interfaces/discussion.interface.d.ts +14 -3
- package/discussion/shared/interfaces/reaction.interface.d.ts +1 -1
- package/form/components/rich-text-editor/components/context/context.d.ts +1 -1
- package/form/components/rich-text-editor/rich-text-editor.types.d.ts +1 -1
- package/helpers/intl.d.ts +2 -0
- package/helpers/replace-mention-data.d.ts +1 -1
- package/index.js +56 -56
- package/index.mjs +6962 -6719
- package/navigation/action-bar/action-bar.d.ts +1 -2
- package/navigation/action-bar/components/likes/likes.d.ts +1 -1
- package/package.json +1 -1
- package/polls/poll/index.d.ts +1 -1
- package/polls/poll/poll.d.ts +8 -9
- package/polls/poll/poll.mocks.d.ts +1 -0
- package/polls/poll/poll.types.d.ts +9 -0
- package/style.css +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type IMoreMenuOptions } from '../../navigation';
|
|
3
|
-
import { DiscussionListLikesFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction } from '../../discussion
|
|
4
|
-
import type { IDiscussionContentType } from '../../discussion/shared';
|
|
3
|
+
import { DiscussionListLikesFunction, DiscussionCreateLikeFunction, DiscussionDeleteLikeFunction, type IDiscussionContentType } from '../../discussion';
|
|
5
4
|
import { MemberProps } from '../../user';
|
|
6
5
|
interface Props {
|
|
7
6
|
/** Additional classes */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemberProps } from '../../../../user';
|
|
3
3
|
import { type IDiscussionContent } from '../../../../discussion/shared';
|
|
4
|
-
import { ILikesFeedQueryFns } from '../../../../discussion/feeds/likes-feed';
|
|
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
package/polls/poll/index.d.ts
CHANGED
package/polls/poll/poll.d.ts
CHANGED
|
@@ -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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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;
|
|
@@ -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
|
+
}
|