fansunited-widget-poll 1.0.1 → 1.1.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/README.md CHANGED
@@ -182,7 +182,28 @@ const labels = {
182
182
  hideFilters: 'Hide filters',
183
183
  showFilters: 'Show filters',
184
184
  dateFromTo: 'Date from/to',
185
- dateFromToPlaceholder: 'Select Date...'
185
+ dateFromToPlaceholder: 'Select Date...',
186
+ branding: 'Branding',
187
+ urls: 'URLs',
188
+ primaryUrl: 'Primary URL',
189
+ secondaryUrl: 'Secondary URL',
190
+ privacyPolicyUrl: 'Privacy Policy URL',
191
+ termsAndConditionsUrl: 'Terms and Conditions URL',
192
+ additionalUrl: 'Additional URL',
193
+ colors: 'Colors',
194
+ primaryColor: 'Primary Color',
195
+ secondaryColor: 'Secondary Color',
196
+ contentColor: 'Content Color',
197
+ backgroundColor: 'Background Color',
198
+ borderColor: 'Border Color',
199
+ additionalColor: 'Additional Color',
200
+ mainLogo: 'Main Logo',
201
+ mobileLogo: 'Mobile Logo',
202
+ backgroundImage: 'Background Image',
203
+ mobileBackgroundImage: 'Mobile Background Image',
204
+ additionalImage: 'Additional Image',
205
+ embedCode: 'Embed Code',
206
+ embedCodePlaceholder: 'Place your embed code here'
186
207
 
187
208
  };
188
209
 
@@ -288,6 +309,27 @@ Here is all information about **`LabelsModel`**:
288
309
  | `showFilters` | Label for hyperlink to show filters for image search | Show filters |
289
310
  | `dateFromTo` | Label for date from/to filter for image search | Date from/to |
290
311
  | `dateFromToPlaceholder` | Placeholder for input date from/to filter for image search | Select Date... |
312
+ | `branding` | Label for branding container | Branding |
313
+ | `urls` | Label for branding urls container | URLs |
314
+ | `primaryUrl` | Label for branding primary url input | Primary URL |
315
+ | `secondaryUrl` | Label for branding secondary url input | Secondary URL |
316
+ | `privacyPolicyUrl` | Label for branding privacy policy url input | Privacy Policy URL |
317
+ | `termsAndConditionsUrl` | Label for branding terms and conditions url input | Terms and Conditions URL |
318
+ | `additionalUrl` | Label for branding additional url input | Additional URL |
319
+ | `colors` | Label for branding colors container | Colors |
320
+ | `primaryColor` | Label for branding primary color input | Primary Color |
321
+ | `secondaryColor` | Label for branding secondary color input | Secondary Color |
322
+ | `contentColor` | Label for branding content color input | Content Color |
323
+ | `backgroundColor` | Label for branding background color input | Background Color |
324
+ | `borderColor` | Label for branding border color input | Border Color |
325
+ | `additionalColor` | Label for branding additional color input | Additional Color |
326
+ | `mainLogo` | Label for branding main logo | Main Logo |
327
+ | `mobileLogo` | Label for branding mobile logo | Mobile Logo |
328
+ | `backgroundImage` | Label for branding background image | Background Image |
329
+ | `mobileBackgroundImage` | Label for branding mobile background image | Mobile Background Image |
330
+ | `additionalImage` | Label for branding additional image | Additional Image |
331
+ | `embedCode` | Label for question embed code input | Embed Code |
332
+ | `embedCodePlaceholder` | Placeholder for question embed code input | Place your embed code here |
291
333
  | `getFootballEntitiesErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when typing the name of the entity in tags and request fails. | There was a problem with fetching football's data |
292
334
  | `createPollMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) successful message when creating poll | You have successfully created poll |
293
335
  | `createPollErrorMessage` | [react-toastify](https://www.npmjs.com/package/react-toastify) error message when creating poll | There was a problem creating poll. Please try again |
@@ -0,0 +1,8 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ import RequestBody, { IBrandingRequestById } from '../../../models/RequestBody/RequestBody';
3
+ type BrandingProps = {
4
+ defaultValue: IBrandingRequestById;
5
+ setRequestBody: Dispatch<SetStateAction<RequestBody>>;
6
+ };
7
+ declare const Branding: React.FC<BrandingProps>;
8
+ export default Branding;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { IBrandingImages } from '../../../models/RequestBody/RequestBody';
3
+ type BrandingImagesProps = {
4
+ loadedImages: IBrandingImages;
5
+ onChange: (value: string, property: string) => void;
6
+ };
7
+ declare const BrandingImages: React.FC<BrandingImagesProps>;
8
+ export default BrandingImages;
@@ -0,0 +1,7 @@
1
+ import React, { Dispatch, SetStateAction } from 'react';
2
+ type BrandingTabsProps = {
3
+ tabValue: string;
4
+ setTabValue: Dispatch<SetStateAction<string>>;
5
+ };
6
+ declare const BrandingTabs: React.FC<BrandingTabsProps>;
7
+ export default BrandingTabs;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  type FileUploaderProps = {
3
- type: 'game' | 'option';
3
+ type: 'game' | 'option' | 'branding';
4
4
  id: number;
5
5
  imageNode: string;
6
6
  onChangeImages: (value: string, imageNode: string) => void;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  type ImagesProps = {
3
3
  id: number;
4
- type: 'game' | 'option';
4
+ type: 'game' | 'option' | 'branding';
5
5
  label: string;
6
6
  imageUrl: string;
7
7
  imageNode: string;
@@ -1,11 +1,12 @@
1
1
  import PollById, { IPollOption } from '../models/PollById/PollById';
2
- import RequestBody from '../models/RequestBody/RequestBody';
2
+ import RequestBody, { IBrandingRequestById } from '../models/RequestBody/RequestBody';
3
3
  import ContextModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
4
4
  import TagsModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/TagsModel';
5
5
  export default class PollFactory {
6
6
  createNewRequestBody: (requestBody: PollById | null) => RequestBody;
7
7
  finalizeNewRequestBody: (requestBody: PollById) => PollById;
8
8
  private reconstructImages;
9
+ private reconstructBranding;
9
10
  private reconstructContext;
10
11
  createImagesModel: () => {
11
12
  main: string;
@@ -27,4 +28,5 @@ export default class PollFactory {
27
28
  mobile: string;
28
29
  };
29
30
  };
31
+ createBranding: (branding: IBrandingRequestById) => IBrandingRequestById;
30
32
  }
@@ -33,6 +33,27 @@ export default class LabelsModel {
33
33
  description: string;
34
34
  descriptionPlaceholder: string;
35
35
  images: string;
36
+ branding: string;
37
+ urls: string;
38
+ primaryUrl: string;
39
+ secondaryUrl: string;
40
+ privacyPolicyUrl: string;
41
+ termsAndConditionsUrl: string;
42
+ additionalUrl: string;
43
+ colors: string;
44
+ primaryColor: string;
45
+ secondaryColor: string;
46
+ contentColor: string;
47
+ backgroundColor: string;
48
+ borderColor: string;
49
+ additionalColor: string;
50
+ mainLogo: string;
51
+ mobileLogo: string;
52
+ backgroundImage: string;
53
+ mobileBackgroundImage: string;
54
+ additionalImage: string;
55
+ embedCode: string;
56
+ embedCodePlaceholder: string;
36
57
  rules: string;
37
58
  rulesPlaceholder: string;
38
59
  adContent: string;
@@ -1,5 +1,6 @@
1
1
  import ImagesModel from 'fansunited-sdk-esm/Core/Global/Models/Images/ImagesModel';
2
2
  import ContextModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
3
+ import { IBrandingRequestById } from '../RequestBody/RequestBody';
3
4
  export interface IPollOption {
4
5
  id?: string;
5
6
  title: string;
@@ -17,6 +18,8 @@ export default class PollById {
17
18
  ad_content: string;
18
19
  labels: Object;
19
20
  custom_fields: Object;
21
+ branding: IBrandingRequestById;
22
+ embed_code: string;
20
23
  images: ImagesModel;
21
24
  status: string;
22
25
  flags: string[];
@@ -1,6 +1,33 @@
1
1
  import ImagesModel from 'fansunited-sdk-esm/Core/Global/Models/Images/ImagesModel';
2
2
  import ContextModel from 'fansunited-sdk-esm/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel';
3
3
  import { IPollOption } from '../PollById/PollById';
4
+ export interface IBrandingRequestById {
5
+ colors: IBrandingColors;
6
+ urls: IBrandingUrls;
7
+ images: IBrandingImages;
8
+ }
9
+ export interface IBrandingColors {
10
+ primary_color: string;
11
+ secondary_color: string;
12
+ content_color: string;
13
+ background_color: string;
14
+ border_color: string;
15
+ additional_color: string;
16
+ }
17
+ export interface IBrandingUrls {
18
+ primary_url: string;
19
+ secondary_url: string;
20
+ privacy_policy_url: string;
21
+ terms_and_conditions_url: string;
22
+ additional_url: string;
23
+ }
24
+ export interface IBrandingImages {
25
+ main_logo: string;
26
+ mobile_logo: string;
27
+ background_image: string;
28
+ mobile_background_image: string;
29
+ additional_image: string;
30
+ }
4
31
  export default class RequestBody {
5
32
  title: string;
6
33
  description: string;
@@ -9,6 +36,8 @@ export default class RequestBody {
9
36
  rules: string;
10
37
  ad_content: string;
11
38
  labels: Object;
39
+ branding: IBrandingRequestById;
40
+ embed_code: string;
12
41
  custom_fields: Object;
13
42
  images: ImagesModel;
14
43
  status: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-widget-poll",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "main": "poll-manager.es.js",
5
5
  "author": "Fans United",
6
6
  "description": "",