🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

fansunited-widget-discussions

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fansunited-widget-discussions

Welcome to Fans United Discussions Management Widget. The widget allows staff members with sufficient permissions to manage posts, users and moderation in discussions. You can use this widget as it is and embed it in your platform, or you can use the Mana

latest
npmnpm
Version
2.5.0
Version published
Maintainers
1
Created
Source

Discussions Management Widget

Welcome to Fans United Discussions Management Widget. The widget allows staff members with sufficient permissions to manage posts, users and moderation in discussions. You can use this widget as it is and embed it in your platform, or you can use the Management Panel to manage Discussions. Discussions are comment sections where users can create, update, delete posts (comments), can react to posts, report them and etc. With successful installation, you can manage the posts, users and moderation in Discussions.

Installation and usage

The easiest way to use fansunited-widget-discussions-management is to install it from npm as follows:

npm  install  fansunited-widget-discussions

or:

yarn  add  fansunited-widget-discussions

Here is an example how you can integrate Fans United Discussions Management Widget:

import  'fansunited-widget-discussions/style.css';
import { DiscussionsManager } from  'fansunited-widget-discussions';

const  App = () => {
return (
<DiscussionsManager
	fansUnitedApiKey={'your-api-key'}
	fansUnitedClientId={'your-client-id'} />
);
}

Notes

  • The widget is bundled as a React component and its usage is as simple as the above example

  • Don't worry about your project's CSS. The widget's styling is done with Joy UI which is based on headless unstyle react components. This means that the widget's CSS will NOT affect yours. One important thing is that you need to import style.css file from package folder:

import 'fansunited-widget-discussions/style.css';

N.B: If you are using an entry point for importing all your stylings, you need to import fansunited-widget-discussions/style.css there as well

Props

type  DiscussionsManagerProps = {
	fansUnitedApiKey: string;
	fansUnitedClientId: string;
	fansUnitedLanguage?: string;
	fansUnitedEnvironment?: string;
	labels?: LabelsModel;
	hideSignOutButton?: boolean;
};

Fans United Discussions Management Widget depends on Fans United JS SDK and Fans United Client API. Thats why fansUnitedApiKey and fansUnitedClientId are required. They will be provided to you from Fans United team. For other optional props here is some information:

  • fansUnitedLanguage - for our sports APIs FansUnited platform supports different languages. For now they are Bulgarian (bg), English (en), Romanian (ro), Greek (el), Slovak (sk), Serbian (sr) and Hungarian (hu). If no value given it will be set to English (en).

  • fansUnitedEnvironment - You can run the widget in the following environments: staging, production, watg and yolo. If no value given it will be set to production (prod).

  • labels - you can easily translate all labels, UI messages, descriptions, placeholders and etc. with this prop. By default, Fans United Match Quiz Management Widget is available in English so if no value is given, the widget will be translated in English.

  • hideSignOutButton - By default on the top right corner of the widget will be displayed a sign out button. To hide that button set this prop to true.

Translation

You can easily translate Fans United Discussions Management Widget in your language! You just need to pass an object to labels prop with concrete keys and values and that's it! Here's an example how you can do it:

import  'fansunited-widget-discussions/style.css';
import { DiscussionsManager } from  'fansunited-widget-discussions';

const  labels = {
	userNotFound: 'User not found. Please try again',
	featureDisabled: 'Feature disabled!',
	noPermissionMessage: 'You have no permission for this feature!',
	tryAgainButton: 'Try again',
	signOut: 'Sign out',
	discussions: 'Discussions',
	posts: 'Posts',
	reportedPosts: 'Reported Posts',
	dictionary = dictionary 'Dictionary',
	search: 'Search',
	searchDiscussionTooltip: 'When searching by URL, all other filters will be disabled. This search finds exact matches only.',
	searchByIds: 'Search by IDs',
	searchByLabel: 'Search by label',
	searchByURL: 'Search by URL',
	postsCount: 'Posts count',
	fromDate: 'From date',
	toDate: 'To date',
	status: 'Status',
	filterByStatus: 'Filter by status',
	sortBy: 'Sort by',
	sortByTooltip: 'When sorting by post count, date filters will be disabled. When sorting by creation date, the post count filter will be disabled.',
	showDeletedDiscussions: 'Show deleted discussions',
	active: 'Active',
	itemsPerPage: 'Items per page',
	inactive: 'Inactive',
	sortByCreatedAtAsc: 'Sort by created at field in ascending order',
	sortByCreatedAtDesc: 'Sort by created at field in descending order',
	sortByPostsCountAsc: 'Sort by posts count value in ascending order',
	sortByPostsCountDesc: 'Sort by posts count value in descending order',
	pageNo: 'Page No',
	noDiscussionsFound: 'No discussions found',
	getDiscussionsErrorMessage: 'There was a problem while fetching discussion. Please try again',
	createDiscussion: 'Create discussion',
	url: 'URL',
	context: 'Context',
	tags: 'Tags',
	content: 'Content',
	campaign: 'Campaign',
	id: 'ID',
	type: 'Type',
	label: 'Label',
	contextEntityTag: 'Context entity tag',
	typeContextTagNamePlaceholder: 'Type context tag name...',
	getFootballEntitiesErrorMessage: 'Error occured',
	customFields: 'Custom fields',
	keyDynamicFields: 'Key',
	valueDynamicFields: 'Value',
	save: 'Save',
	add: 'Add',
	edit: 'Edit',
	delete: 'Delete',
	create: 'Create',
	close: 'Close',
	createDiscussionMessage: 'Discussion has been created',
	createDiscussionErrorMessage: 'There was a problem with creating discussion. Please try again',
	createDiscussionSameIdErrorMessage: 'Discussion with the same ID already exists. Please try again',
	deleteDiscussionTitle: 'Delete discussion',
	deleteDiscussionDescription: 'Are you sure you want to delete',
	deleteDiscussionMessage: 'Discussion has been deleted',
	deleteDiscussionErrorMessage: 'There was a problem with deleting discussion. Please try again',
	moderatePostsTitle: 'Moderate posts',
	moderatePostsDescription: 'Please provide the reason for moderation:',
	reason: 'Reason',
	moderate: 'Moderate',
	moderatePostsMessage: 'Posts has been moderated',
	moderatePostsErrorMessage: 'There was a problem with moderating posts. Please try again',
	noPostsFounds: 'No posts found',
	pinnedPosts: 'Pinned posts',
	moderateAllPosts: 'Moderate all posts',
	moderatePosts: 'Moderate selected posts',
	pinPosts: 'Pin selected posts',
	unpinPosts: 'Unpin selected posts',
	pinPostsErrorMessage: 'There was a problem with pinning posts. Please try again',
	unpinPostsErrorMessage: 'There was a problem with unpinning posts. Please try again',
	deleted: 'Deleted',
	postedOn: 'Posted on',
	pinnedPost: 'Pinned post',
	replyPost: 'This is a reply post',
	reply: 'Reply',
	replyInfo: 'This is a reply to another post with ID:',
	moderated: 'Moderated',
	showReplies: 'Show replies:',
	showOlderVersions: 'Show older versions',
	postDeleted: 'Post deleted',
	postModerationDetails: 'Post Moderation Details',
	noReason: 'No reason provided',
	staffId: 'Staff ID:',
	postsErrorMessage: 'There was a problem while fetching posts. Please try again',
	searchDiscussions: 'Search discussions',
	discussionType: 'Type',
	all: 'All',
	public: 'Public',
	private: 'Private',
	oldest: 'Oldest',
	latest: 'Latest',
	interacted: 'Interacted',
	popular: 'Popular',
	reported: 'Reported',
	searchProfiles: 'Search profiles',
	searchById: 'Search by ID',
	searchByName: 'Search by name/nickname',
	searchProfilesErrorMessage: 'There was a problem with fetching profiles',
	showModeratedPosts: 'Show moderated posts',
	showOnlyModeratedPosts: 'Show only moderated posts',
	showDeletedPosts: 'Show deleted posts',
	showOnlyDeletedPosts: 'Show only deleted posts',
	reportsCount: 'Reports count',
	profileInfoErrorMessage: 'There was a problem fetching staff member id. Please try again',
	discussionFeaturesErrorMessage: 'There was a problem fetching discussion features. Please try again',
	enableAutomaticModeration: 'Enable automatic moderation',
	moderateLinks: 'Moderate links',
	moderateLinksHelperText: `When enabled, all links will be replaced with 'https://***'`,
	allowedURLs: 'Allowed URLs',
	allowedURLsHelperText: 'Enter the URLs that you want to be excluded and will be not affected by the moderation of links. Every link should be on a new line',
	moderatorId: 'Moderator ID',
	moderatorIdHelperText: 'When not provided, the ID of the currently logged in staff member will be set',
	moderationReason: 'Moderation reason',
	forbiddenWords: 'Forbidden words',
	forbiddenWordsHelperText: 'Enter the words who are forbidden from users in discussions. Every word should be on a new line',
	discussionFeaturesUpdatedMessage: 'Discussion features has been updated',
	discussionFeaturesUpdatedErrorMessage: 'There was a problem with updating discussion features. Please try again',
	discussionId: 'Discussion ID',
	profileId: 'Profile ID',
	copiedToClipboard: '__property__ copied to clipboard',
	showAllReportedPosts: 'Show all reported posts',
	showPostsWithMoreThan: 'Show posts with more than __count__',
	showAllReportedPostsDescription: 'Showing all reported posts regardless of reports count',
	report: 'report',
	reports: 'reports',
	platformType: 'Platform Type',
	platformTypeTooltip: 'Specify your platform type to optimize content moderation for your specific industry and audience expectations',
	toleranceSettings: 'Tolerance Settings',
	toleranceSettingsTooltip: 'Configure how strictly different types of content are moderated on your platform',
	aggression: 'Aggression',
	violence: 'Violence',
	profanity: 'Profanity',
	aggressionToleranceNone: 'No aggressive language allowed',
	aggressionToleranceLow: 'Only constructive criticism',
	aggressionToleranceMedium: 'Harsh criticism about public figures accepted',
	aggressionToleranceHigh: 'Most aggressive language except direct user attacks',
	violenceToleranceNone: 'Any violence mention removed',
	violenceToleranceLow: 'Only credible threats removed',
	violenceToleranceMedium: 'Hyperbolic violence in frustration accepted',
	violenceToleranceHigh: 'Only specific, realistic threats removed',
	profanityToleranceNone: 'All profanity removed',
	profanityToleranceLow: 'Only severe profanity removed',
	profanityToleranceMedium: 'Profanity acceptable when venting, not attacking',
	profanityToleranceHigh: 'Only removed when combined with personal attacks',
	enablePostsRateLimit: 'Enable posts rate limit',
	enablePostsRateLimitHelper: 'When enabled, profiles will be limited in the number of posts they can create in a given time period',
	per10Minutes: 'Per 10 minutes',
	perDay: 'Per day',
	none: 'None',
	low: 'Low',
	medium: 'Medium',
	high: 'High',
	sports: 'Sports',
	lifestyle: 'Lifestyle',
	gaming: 'Gaming',
	betting: 'Betting',
	general: 'General',
	news: 'News',
	finance: 'Finance',
	selectAll: 'Select all',
	pinPostsInfoTooltip: 'Pinned posts will be shown at the top of the list. You can pin maximum 3 posts.'
};

const  App = () => {
return (
<DiscussionsManager
	fansUnitedApiKey={'your-api-key'}
	fansUnitedClientId={'your-client-id'}
	labels={labels}/>
);
}

Here is all information about LabelsModel:

KeyDescriptionDefault Value
userNotFoundOn login screen when client gives invalid information about email or password.User not found. Please try again
featureDisabledLabel for no permission card titleFeature disabled!
noPermissionMessageLabel for no permission card paragraphYou have no permission for this feature!
tryAgainButtonLabel for no permission card buttonTry again
signOutUsed as label on sign out button.Sign out
discussionsUsed as a tab name in the main navigationDiscussions
postsUsed as a tab name in the main navigationPosts
reportedPostsUsed as a tab name in the main navigationReported Posts
dictionaryUsed as a tab name in the main navigationDictionary
searchLabel for discussion search selector in filters sectionSearch
searchDiscussionTooltipTooltip for discussion search selector infoWhen searching by URL, all other filters will be disabled. This search finds exact matches only.
searchByIdsDiscussion search type optionSearch by IDs
searchByLabelDiscussion search type optionSearch by label
searchByURLDiscussion search type optionSearch by URL
postsCountLabel for posts count slider in filters sectionPosts count
fromDateLabel for datepicker filtersFrom date
toDateLabel for datepicker filtersTo date
statusLabel for discussion status filter selectorStatus
filterByStatusPlaceholder for status filter selectorFilter by status
sortByLabel for sort by selector in filters sectionSort by
sortByTooltipTooltip for sort by selector infoWhen sorting by post count, date filters will be disabled. When sorting by creation date, the post count filter will be disabled.
showDeletedDiscussionsLabel for deleted discussions checkboxShow deleted discussions
activeActive status selector optionActive
inactiveInactive status selector optionInactive
itemsPerPageLabel for items per page selectorItems per page
sortByCreatedAtAscOption for sort by selectorSort by created at field in ascending order
sortByCreatedAtDescOption for sort by selectorSort by created at field in descending order
sortByPostsCountAscOption for sort by selectorSort by posts count value in ascending order
sortByPostsCountDescOption for sort by selectorSort by posts count value in descending order
pageNoLabel for paginationPage No
noDiscussionsFoundWhen there are no discussions found by specified filters this messsage appears on the screenNo discussions found
getDiscussionsErrorMessageToast error message when there is an error with fetching discussionsThere was a problem while fetching discussion. Please try again
createDiscussionLabel for create discussion buttonCreate discussion
urlLabel for url input field in create discussion modalURL
contextLabel for context componentContext
tagsLabel for tags tab in context componentTags
contentLabel for content tab in context componentContent
campaignLabel for campaign tab in context componentCampaign
idLabel for ID input in context componentID
typeLabel for type input in context componentType
labelLabel for label input in context componentLabel
contextEntityTagLabel for context entity tag input in context componentContext entity tag
typeContextTagNamePlaceholderPlaceholder for context entity tag inputType context tag name...
getFootballEntitiesErrorMessageToast error message when there is an error with fetching entities by context tagError occured
customFieldsLabel for custom fields section in create discussion modalCustom fields
keyDynamicFieldsLabel for key input in custom fields sectionKey
valueDynamicFieldsLabel for value input in custom fields sectionValue
saveSave icon button titleSave
addAdd icon button tooltipAdd
editEdit icon button tooltipEdit
deleteDelete icon button tooltipDelete
createCreate button label in create discussion modalCreate
closeClose button label in create discussion modalClose
createDiscussionMessageToast success message when discussion is createdDiscussion has been created
createDiscussionErrorMessageToast error message when there is a problem with discussion creationThere was a problem with creating discussion. Please try again
createDiscussionSameIdErrorMessageToast error message when there is a discussion with the same IDDiscussion with the same ID already exists. Please try again
deleteDiscussionTitleTitle for delete discussion modalDelete discussion
deleteDiscussionDescriptionDescription text for delete discussion modalAre you sure you want to delete
deleteDiscussionMessageToast success message when discussion is deletedDiscussion has been deleted
deleteDiscussionErrorMessageToast error message hen there is a problem with discussion deletionThere was a problem with deleting discussion. Please try again
moderatePostsTitleTitle for moderate posts modalModerate posts
moderatePostsDescriptionDescription text for moderate posts modalPlease provide the reason for moderation:
reasonLabel for reason text input in moderate posts modalReason
moderateModerate button label in moderate posts modalModerate
moderatePostsMessageToast success message when posts are moderatedPosts has been moderated
moderatePostsErrorMessageToast error message when there is a problem with posts moderationThere was a problem with moderating posts. Please try again
noPostsFoundsThe message appears in the posts screen when there are no posts found by filters definedNo posts found
pinnedPostsSection title for pinned posts list in the discussion content cardPinned posts
moderateAllPostsButton label for moderating all discussion postsModerate all posts
moderatePostsDropdown menu option for moderating selected postsModerate selected posts
pinPostsDropdown menu option for pinning selected postsPin selected posts
unpinPostsDropdown menu option for unpinning selected postsUnpin selected posts
pinPostsErrorMessageToast error message when there is a problem with pinning postsThere was a problem with pinning posts. Please try again
unpinPostsErrorMessageToast error message when there is a problem with unpinning postsThere was a problem with unpinning posts. Please try again
deletedChip label for deleted discussionDeleted
postedOnLabel for post card informationPosted on
pinnedPostTooltip for an icon when post is pinnedPinned post
replyPostTooltip for an icon when post is a replyThis is a reply post
replyChip label when post is a replyReply
replyInfoText for reply info tooltipThis is a reply to another post with ID:
moderatedChip label when post is moderatedModerated
showRepliesButton title for showing post repliesShow replies:
showOlderVersionsButton title for showing post older versionsShow older versions
postDeletedTooltip for an icon when post is deletedPost deleted
postModerationDetailsText for moderation info tooltipPost Moderation Details
noReasonText when no moderation reason has been providedNo reason provided
staffIdText for staff id moderator infoStaff ID:
postsErrorMessageToast error message when there is a problem with fetching postsThere was a problem while fetching posts. Please try again
searchDiscussionsLabel for discussion search select in posts screen filters sectionSearch discussions
discussionTypeLabel for type selector in posts screen filters sectionType
allPosts type option all labelAll
publicPosts type option public labelPublic
privatePosts type option private labelPrivate
oldestPosts sort by option oldest labelOldest
latestPosts sort by option latest labelLatest
interactedPosts sort by option interacted labelInteracted
popularPosts sort by option popular labelPopular
reportedPosts sory by option reported labelReported
searchProfilesLabel for profiles search select in posts screen filters sectionSearch profiles
searchByIdLabel for profiles search type selectorSearch by ID
searchByNameLabel for profiles search type selectorSearch by name/nickname
searchProfilesErrorMessageToast error message when there is a problem with profiles searchThere was a problem with fetching profiles
showModeratedPostsLabel for show moderated posts checkbox in discussion posts filtersShow moderated posts
showOnlyModeratedPostsLabel for show moderated posts checkbox in posts filtersShow only moderated posts
showDeletedPostsLabel for show deleted posts checkbox in discussions posts filtersShow deleted posts
showOnlyDeletedPostsLabel for show deleted posts checkbox in posts filtersShow only deleted posts
reportsCountLabel for reports count number input in reported posts screen filtersReports count
profileInfoErrorMessageToast error when there is a problem with fetching staff member profileThere was a problem fetching staff member id. Please try again
discussionFeaturesErrorMessageToast error when there is a problem with fetching discussion features on dictionary screenThere was a problem fetching discussion features. Please try again
enableAutomaticModerationLabel for discussion features checkbox on dictionary screenEnable automatic moderation
moderateLinksLabel for moderate links checkbox on dictionary screenModerate links
moderateLinksHelperTextHelper text for moderate links checkboxWhen enabled, all links will be replaced with 'https://***'
allowedURLsLabel for allowed urls text area on dictionary screenAllowed URLs
allowedURLsHelperTextHelper text for allowed urls text areaEnter the URLs that you want to be excluded and will be not affected by the moderation of links. Every link should be on a new line
moderatorIdLabel for moderator id text inputModerator ID
moderatorIdHelperTextHelper text for moderator id text inputWhen not provided, the ID of the currently logged in staff member will be set
moderationReasonLabel for moderation reason inputModeration reason
forbiddenWordsLabel for forbidden words text areaForbidden words
forbiddenWordsHelperTextHelper text for forbidden words text areaEnter the words who are forbidden from users in discussions. Every word should be on a new line
discussionFeaturesUpdatedMessageToast success message when discussion features are updatedDiscussion features has been updated
discussionFeaturesUpdatedErrorMessageToast error message when there is a problem with updating discussion featuresThere was a problem with updating discussion features. Please try again
discussionIdLabel for discussion IDDiscussion ID
profileIdLabel for profile IDProfile ID
copiedToClipboardToast info message when certain property is copied to the clipboard. The placeholder property will be replaced by the name of the property that it's copiedproperty copied to clipboard
showAllReportedPostsTooltip for all button in reports count filter.Show all reported posts
showPostsWithMoreThanTooltip message for clicking on specific button for reports count. The count is dynamically set from the widget. Used with a combination with report and reports labelsShow posts with more than count
showAllReportedPostsDescriptionDescription text for showing all reported posts despite the reports countShowing all reported posts regardless of reports count
reportLabel for report. Used in a reports count description for single report countreport
reportsLabel for reports. Used in a reports count description for multiple reported posts.reports
platformTypeLabel for platform type selector in dictionary tabPlatform Type
platformTypeTooltipTooltip for platform type selectorSpecify your platform type to optimize content moderation for your specific industry and audience expectations
toleranceSettingsLabel for tolerance settings section in dictionary tabTolerance Settings
toleranceSettingsTooltipTooltip for tolerance settings sectionConfigure how strictly different types of content are moderated on your platform
aggressionLabel for aggression tolerance settingAggression
violenceLabel for violence tolerance settingViolence
profanityLabel for profanity tolerance settingProfanity
aggressionToleranceNoneOption for aggression tolerance levelNo aggressive language allowed
aggressionToleranceLowOption for aggression tolerance levelOnly constructive criticism
aggressionToleranceMediumOption for aggression tolerance levelHarsh criticism about public figures accepted
aggressionToleranceHighOption for aggression tolerance levelMost aggressive language except direct user attacks
violenceToleranceNoneOption for violence tolerance levelAny violence mention removed
violenceToleranceLowOption for violence tolerance levelOnly credible threats removed
violenceToleranceMediumOption for violence tolerance levelHyperbolic violence in frustration accepted
violenceToleranceHighOption for violence tolerance levelOnly specific, realistic threats removed
profanityToleranceNoneOption for profanity tolerance levelAll profanity removed
profanityToleranceLowOption for profanity tolerance levelOnly severe profanity removed
profanityToleranceMediumOption for profanity tolerance levelProfanity acceptable when venting, not attacking
profanityToleranceHighOption for profanity tolerance levelOnly removed when combined with personal attacks
enablePostsRateLimitLabel for posts rate limit checkboxEnable posts rate limit
enablePostsRateLimitHelperHelper text for posts rate limit checkboxWhen enabled, profiles will be limited in the number of posts they can create in a given time period
per10MinutesLabel for rate limit time periodPer 10 minutes
perDayLabel for rate limit time periodPer day
noneLabel for tolerance level optionNone
lowLabel for tolerance level optionLow
mediumLabel for tolerance level optionMedium
highLabel for tolerance level optionHigh
sportsLabel for platform type optionSports
lifestyleLabel for platform type optionLifestyle
gamingLabel for platform type optionGaming
bettingLabel for platform type optionBetting
generalLabel for platform type optionGeneral
newsLabel for platform type optionNews
financeLabel for platform type optionFinance
financeLabel for select all checkboxSelect all
financeInfo tooltip content for pin selected posts actionPinned posts will be shown at the top of the list. You can pin maximum 3 posts.

FAQs

Package last updated on 29 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts