fansunited-management-components 1.2.1 → 1.4.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/index.es.js +22372 -21309
- package/index.umd.js +219 -211
- package/package.json +1 -1
- package/src/components/Context/EntityContext.d.ts +10 -0
- package/src/components/Context/Tags.d.ts +11 -0
- package/src/components/Images/MiniGamesImages.d.ts +10 -0
- package/src/components/{InformationInput → Inputs/InformationInput}/InformationInput.d.ts +1 -0
- package/src/components/Inputs/NumberInput/NumberInput.d.ts +9 -0
- package/src/components/RichText/RichText.d.ts +3 -1
- package/src/components/Select/SearchSelect/ContextSelectFilter.d.ts +13 -0
- package/src/components/Select/SearchSelect/Option.d.ts +7 -0
- package/src/components/Switch/BooleanSwitch.d.ts +2 -0
- package/src/functions/helpers.d.ts +4 -0
- package/src/models/context/CampaignModel.d.ts +5 -0
- package/src/models/context/ContentModel.d.ts +6 -0
- package/src/models/images/Images.d.ts +3 -4
- package/src/models/images/MiniGamesImages.d.ts +5 -0
- package/src/models/minigames/classicquizzes/ClassicQuizRequestBody.d.ts +59 -0
- package/src/models/select/GroupSelectOption.d.ts +6 -0
- package/src/services/https/Https.d.ts +1 -1
- package/src/services/https/HttpsService.d.ts +9 -0
- /package/src/components/{BasicSelect → Select/BasicSelect}/BasicSelect.d.ts +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as ContextModel } from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
type EntityContextProps = {
|
|
5
|
+
labels: any;
|
|
6
|
+
context: ContextModel;
|
|
7
|
+
onChange: (context: ContextModel) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const EntityContext: React.FC<EntityContextProps>;
|
|
10
|
+
export default EntityContext;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as TagsModel } from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/TagsModel';
|
|
3
|
+
import { default as EntitySelectOption } from '../../models/select/EntitySelectOption';
|
|
4
|
+
|
|
5
|
+
type TagsProps = {
|
|
6
|
+
labels: any;
|
|
7
|
+
tags: TagsModel[];
|
|
8
|
+
onChangeTags: (entities: EntitySelectOption[]) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const Tags: React.FC<TagsProps>;
|
|
11
|
+
export default Tags;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as ImagesModel } from '../../models/images/Images';
|
|
3
|
+
|
|
4
|
+
type MiniGamesImagesProps = {
|
|
5
|
+
labels: any;
|
|
6
|
+
defaultValue: ImagesModel | null;
|
|
7
|
+
onChange: (value: any) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const MiniGamesImages: React.FC<MiniGamesImagesProps>;
|
|
10
|
+
export default MiniGamesImages;
|
|
@@ -4,8 +4,10 @@ type RichTextProps = {
|
|
|
4
4
|
label: string;
|
|
5
5
|
placeholder: string;
|
|
6
6
|
defaultValue: string;
|
|
7
|
-
property: 'description' | 'rules' | 'ad_content';
|
|
7
|
+
property: 'description' | 'rules' | 'ad_content' | 'mini_games_explanation';
|
|
8
|
+
description?: string;
|
|
8
9
|
setValue: Dispatch<SetStateAction<string>>;
|
|
10
|
+
onChange: (value: string) => void;
|
|
9
11
|
};
|
|
10
12
|
declare const RichText: React.FC<RichTextProps>;
|
|
11
13
|
export default RichText;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { default as EntitySelectOption } from '../../../models/select/EntitySelectOption';
|
|
3
|
+
import { MultiValue } from 'react-select';
|
|
4
|
+
|
|
5
|
+
type ContextSelectFilterProps = {
|
|
6
|
+
labels: any;
|
|
7
|
+
options: EntitySelectOption[];
|
|
8
|
+
setOptions: Dispatch<SetStateAction<MultiValue<EntitySelectOption>>>;
|
|
9
|
+
setFilters: Dispatch<SetStateAction<any>>;
|
|
10
|
+
handleResetData: () => void;
|
|
11
|
+
};
|
|
12
|
+
declare const ContextSelectFilter: React.FC<ContextSelectFilterProps>;
|
|
13
|
+
export default ContextSelectFilter;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { ColorPaletteProp } from '@mui/joy';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
|
|
3
4
|
type BooleanSwitchProps = {
|
|
4
5
|
label: string;
|
|
5
6
|
defaultValue: boolean;
|
|
6
7
|
description: string;
|
|
8
|
+
descriptionColor: ColorPaletteProp;
|
|
7
9
|
disabled: boolean;
|
|
8
10
|
onChange: (checked: boolean) => void;
|
|
9
11
|
};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
import { default as SearchModel } from 'fansunited-sdk-esm/Core/Namespaces/Football/Models/Search/SearchModel';
|
|
2
|
+
import { default as GroupSelectOption } from '../models/select/GroupSelectOption';
|
|
3
|
+
|
|
1
4
|
export declare const displayName: (name: string | undefined, nickname: string | undefined) => string;
|
|
2
5
|
export declare const remapKeysToSpecificCase: (obj: any, type: "camel" | "snake") => any;
|
|
6
|
+
export declare const formatGroupOptions: (result: SearchModel) => GroupSelectOption[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { default as ImagesModel } from 'fansunited-sdk-esm/Core/Global/Models/Images/ImagesModel';
|
|
2
|
+
import { default as ContextModel } from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
|
|
3
|
+
import { default as MiniGameImages } from 'fansunited-sdk-esm/Core/Namespaces/MiniGames/Models/MiniGameImages';
|
|
4
|
+
|
|
5
|
+
interface IBranding {
|
|
6
|
+
colors: IBrandingColors;
|
|
7
|
+
urls: IBrandingUrls;
|
|
8
|
+
images: IBrandingImages;
|
|
9
|
+
}
|
|
10
|
+
interface IBrandingColors {
|
|
11
|
+
primary_color: string;
|
|
12
|
+
secondary_color: string;
|
|
13
|
+
content_color: string;
|
|
14
|
+
background_color: string;
|
|
15
|
+
border_color: string;
|
|
16
|
+
additional_color: string;
|
|
17
|
+
}
|
|
18
|
+
interface IBrandingUrls {
|
|
19
|
+
primary_url: string;
|
|
20
|
+
secondary_url: string;
|
|
21
|
+
privacy_policy_url: string;
|
|
22
|
+
terms_and_conditions_url: string;
|
|
23
|
+
additional_url: string;
|
|
24
|
+
}
|
|
25
|
+
interface IBrandingImages {
|
|
26
|
+
main_logo: string;
|
|
27
|
+
mobile_logo: string;
|
|
28
|
+
background_image: string;
|
|
29
|
+
mobile_background_image: string;
|
|
30
|
+
additional_image: string;
|
|
31
|
+
}
|
|
32
|
+
interface IQuestionsRequest {
|
|
33
|
+
question: string;
|
|
34
|
+
images: MiniGameImages;
|
|
35
|
+
options: IOptionsRequest[];
|
|
36
|
+
embed_code: string;
|
|
37
|
+
}
|
|
38
|
+
interface IOptionsRequest {
|
|
39
|
+
option: string;
|
|
40
|
+
correct: boolean;
|
|
41
|
+
images: MiniGameImages;
|
|
42
|
+
}
|
|
43
|
+
export default class ClassicQuizRequestBody {
|
|
44
|
+
title: string;
|
|
45
|
+
description: string;
|
|
46
|
+
type: string;
|
|
47
|
+
time: number;
|
|
48
|
+
rules: string;
|
|
49
|
+
ad_content: string;
|
|
50
|
+
labels: Object;
|
|
51
|
+
custom_fields: Object;
|
|
52
|
+
branding: IBranding | null;
|
|
53
|
+
images: ImagesModel | null;
|
|
54
|
+
status: string;
|
|
55
|
+
flags: string[];
|
|
56
|
+
questions: IQuestionsRequest[];
|
|
57
|
+
context: ContextModel | null;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -10,7 +10,7 @@ export default class Https {
|
|
|
10
10
|
private environment;
|
|
11
11
|
protected mainQueryParams: Record<string, string>;
|
|
12
12
|
protected headers: Record<string, string>;
|
|
13
|
-
|
|
13
|
+
protected clientApiBaseUrl: string;
|
|
14
14
|
private readonly sportal365ImagesSearchURL;
|
|
15
15
|
sportal365Config: Sportal365Config | null;
|
|
16
16
|
constructor(config: SDKConfigurationModel, sportal365Config: Sportal365Config | null);
|
|
@@ -3,10 +3,12 @@ import { default as TemplateRequestBody } from '../../models/templates/TemplateR
|
|
|
3
3
|
import { default as Https } from './Https';
|
|
4
4
|
import { default as Sportal365Config } from '../../models/sportal365/Sportal365Config';
|
|
5
5
|
import { default as GameRequestBody } from '../../models/games/GameRequestBody';
|
|
6
|
+
import { default as ClassicQuizRequestBody } from '../../models/minigames/classicquizzes/ClassicQuizRequestBody';
|
|
6
7
|
|
|
7
8
|
export default class HttpsService extends Https {
|
|
8
9
|
private loyaltyBaseUrl;
|
|
9
10
|
private predictionBaseUrl;
|
|
11
|
+
private miniGamesApiBaseUrl;
|
|
10
12
|
constructor(config: SDKConfigurationModel, sportal365Config: Sportal365Config | null);
|
|
11
13
|
createTemplate: (requestBody: TemplateRequestBody) => Promise<Response>;
|
|
12
14
|
editTemplate: (templateId: string, requestBody: TemplateRequestBody) => Promise<Response>;
|
|
@@ -16,4 +18,11 @@ export default class HttpsService extends Https {
|
|
|
16
18
|
exportDetailedGameLeaderboard: (gameId: string, limit: number) => Promise<Response>;
|
|
17
19
|
createGame: (requestBody: GameRequestBody) => Promise<Response>;
|
|
18
20
|
editGame: (gameId: string, requestBody: GameRequestBody) => Promise<Response>;
|
|
21
|
+
getClassicQuizFeature: () => Promise<Response>;
|
|
22
|
+
getEitherOrFeature: () => Promise<Response>;
|
|
23
|
+
createClassicQuiz: (requestBody: ClassicQuizRequestBody) => Promise<Response>;
|
|
24
|
+
updateClassicQuiz: (id: string, requestBody: ClassicQuizRequestBody) => Promise<Response>;
|
|
25
|
+
getClassicQuizById: (classicQuizId: string) => Promise<Response>;
|
|
26
|
+
deleteClassicQuiz: (classicQuizId: string) => Promise<Response>;
|
|
27
|
+
calculateQuestionsReport: (classicQuizId: string) => Promise<Response>;
|
|
19
28
|
}
|
|
File without changes
|