be-components 4.7.2 → 4.7.4

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 (55) hide show
  1. package/lib/commonjs/Bracket/components/BracketCompetitionActions.js +4 -2
  2. package/lib/commonjs/Bracket/components/BracketCompetitionActions.js.map +1 -1
  3. package/lib/commonjs/Bracket/index.js +2 -0
  4. package/lib/commonjs/Bracket/index.js.map +1 -1
  5. package/lib/commonjs/Engage/components/EngageHeader.js +11 -19
  6. package/lib/commonjs/Engage/components/EngageHeader.js.map +1 -1
  7. package/lib/commonjs/Engage/index.js +152 -27
  8. package/lib/commonjs/Engage/index.js.map +1 -1
  9. package/lib/commonjs/Poll/components/PollCard.js +1 -1
  10. package/lib/commonjs/Poll/components/PollCard.js.map +1 -1
  11. package/lib/commonjs/Poll/components/PollOptionCard.js +1 -1
  12. package/lib/commonjs/Poll/components/PollOptionCard.js.map +1 -1
  13. package/lib/module/Bracket/components/BracketCompetitionActions.js +4 -2
  14. package/lib/module/Bracket/components/BracketCompetitionActions.js.map +1 -1
  15. package/lib/module/Bracket/index.js +2 -0
  16. package/lib/module/Bracket/index.js.map +1 -1
  17. package/lib/module/Engage/components/EngageHeader.js +11 -19
  18. package/lib/module/Engage/components/EngageHeader.js.map +1 -1
  19. package/lib/module/Engage/index.js +153 -28
  20. package/lib/module/Engage/index.js.map +1 -1
  21. package/lib/module/Poll/components/PollCard.js +1 -1
  22. package/lib/module/Poll/components/PollCard.js.map +1 -1
  23. package/lib/module/Poll/components/PollOptionCard.js +1 -1
  24. package/lib/module/Poll/components/PollOptionCard.js.map +1 -1
  25. package/lib/typescript/lib/commonjs/Bracket/components/BracketCompetitionActions.d.ts +2 -1
  26. package/lib/typescript/lib/commonjs/Bracket/components/BracketCompetitionActions.d.ts.map +1 -1
  27. package/lib/typescript/lib/commonjs/Bracket/index.d.ts +2 -1
  28. package/lib/typescript/lib/commonjs/Bracket/index.d.ts.map +1 -1
  29. package/lib/typescript/lib/commonjs/Engage/components/EngageHeader.d.ts +2 -1
  30. package/lib/typescript/lib/commonjs/Engage/components/EngageHeader.d.ts.map +1 -1
  31. package/lib/typescript/lib/commonjs/Engage/index.d.ts +3 -1
  32. package/lib/typescript/lib/commonjs/Engage/index.d.ts.map +1 -1
  33. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionActions.d.ts +2 -1
  34. package/lib/typescript/lib/module/Bracket/components/BracketCompetitionActions.d.ts.map +1 -1
  35. package/lib/typescript/lib/module/Bracket/index.d.ts +2 -1
  36. package/lib/typescript/lib/module/Bracket/index.d.ts.map +1 -1
  37. package/lib/typescript/lib/module/Engage/components/EngageHeader.d.ts +2 -1
  38. package/lib/typescript/lib/module/Engage/components/EngageHeader.d.ts.map +1 -1
  39. package/lib/typescript/lib/module/Engage/index.d.ts +3 -1
  40. package/lib/typescript/lib/module/Engage/index.d.ts.map +1 -1
  41. package/lib/typescript/src/Bracket/components/BracketCompetitionActions.d.ts +2 -1
  42. package/lib/typescript/src/Bracket/components/BracketCompetitionActions.d.ts.map +1 -1
  43. package/lib/typescript/src/Bracket/index.d.ts +2 -1
  44. package/lib/typescript/src/Bracket/index.d.ts.map +1 -1
  45. package/lib/typescript/src/Engage/components/EngageHeader.d.ts +2 -1
  46. package/lib/typescript/src/Engage/components/EngageHeader.d.ts.map +1 -1
  47. package/lib/typescript/src/Engage/index.d.ts +4 -2
  48. package/lib/typescript/src/Engage/index.d.ts.map +1 -1
  49. package/package.json +1 -1
  50. package/src/Bracket/components/BracketCompetitionActions.tsx +4 -3
  51. package/src/Bracket/index.tsx +3 -1
  52. package/src/Engage/components/EngageHeader.tsx +8 -9
  53. package/src/Engage/index.tsx +101 -29
  54. package/src/Poll/components/PollCard.tsx +2 -2
  55. package/src/Poll/components/PollOptionCard.tsx +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BracketCompetitionActions.d.ts","sourceRoot":"","sources":["../../../../../module/Bracket/components/BracketCompetitionActions.js"],"names":[],"mappings":";AAUA;;;;;;;;;;;;;;;;;;;;;;kGAmjBC;kBA7jB0C,OAAO"}
1
+ {"version":3,"file":"BracketCompetitionActions.d.ts","sourceRoot":"","sources":["../../../../../module/Bracket/components/BracketCompetitionActions.js"],"names":[],"mappings":";AAUA;;;;;;;;;;;;;;;;;;;;;;;kGAqjBC;kBA/jB0C,OAAO"}
@@ -1,7 +1,8 @@
1
1
  export default BracketRoom;
2
- declare function BracketRoom({ player_id, width, view_mode, bracket_id, insets, onSelectContest, onCreateNewCompetition, onManageCompetition, bracket_competition_id, player_balance, onRequestAuthenticate, onFocusPosition, onShareCompetition }: {
2
+ declare function BracketRoom({ player_id, width, height, view_mode, bracket_id, insets, onSelectContest, onCreateNewCompetition, onManageCompetition, bracket_competition_id, player_balance, onRequestAuthenticate, onFocusPosition, onShareCompetition }: {
3
3
  player_id: any;
4
4
  width: any;
5
+ height: any;
5
6
  view_mode: any;
6
7
  bracket_id: any;
7
8
  insets: any;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Bracket/index.js"],"names":[],"mappings":";AAaA;;;;;;;;;;;;;;kGA2pBC;kBAxqB0C,OAAO"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Bracket/index.js"],"names":[],"mappings":";AAaA;;;;;;;;;;;;;;;kGA6pBC;kBA1qB0C,OAAO"}
@@ -1,7 +1,8 @@
1
1
  export default EngageHeader;
2
- declare function EngageHeader({ companies, width, onManage, onEvent, onSelectCompany }: {
2
+ declare function EngageHeader({ companies, width, view_mode, onManage, onEvent, onSelectCompany }: {
3
3
  companies: any;
4
4
  width: any;
5
+ view_mode: any;
5
6
  onManage: any;
6
7
  onEvent: any;
7
8
  onSelectCompany: any;
@@ -1 +1 @@
1
- {"version":3,"file":"EngageHeader.d.ts","sourceRoot":"","sources":["../../../../../module/Engage/components/EngageHeader.js"],"names":[],"mappings":";AAUA;;;;;;kGA0MC;kBApN0C,OAAO"}
1
+ {"version":3,"file":"EngageHeader.d.ts","sourceRoot":"","sources":["../../../../../module/Engage/components/EngageHeader.js"],"names":[],"mappings":";AAUA;;;;;;;kGAkMC;kBA5M0C,OAAO"}
@@ -1,6 +1,8 @@
1
1
  export default EngageModule;
2
- declare function EngageModule({ insets, onSelectBracketCompetition, onSelectCompetition, onSelectSquaresCompetition, onSelectCompetitionSeason, onCreateSeason, onCreateCompetition, onCreateBracketCompetition, onCreateSquares, onFocusPosition, onManage, onEvent, onSelectCompany }: {
2
+ declare function EngageModule({ view_mode, insets, onBracketRoom, onSelectBracketCompetition, onSelectCompetition, onSelectSquaresCompetition, onSelectCompetitionSeason, onCreateSeason, onCreateCompetition, onCreateBracketCompetition, onCreateSquares, onFocusPosition, onManage, onEvent, onSelectCompany }: {
3
+ view_mode: any;
3
4
  insets: any;
5
+ onBracketRoom: any;
4
6
  onSelectBracketCompetition: any;
5
7
  onSelectCompetition: any;
6
8
  onSelectSquaresCompetition: any;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Engage/index.js"],"names":[],"mappings":";AAeA;;;;;;;;;;;;;;kGAqdC;kBApe0C,OAAO"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../module/Engage/index.js"],"names":[],"mappings":";AAeA;;;;;;;;;;;;;;;;kGAklBC;kBAjmB0C,OAAO"}
@@ -4,6 +4,7 @@ type BracketCompetitionActionProps = {
4
4
  bracket_id: string;
5
5
  player?: MyPlayerProps;
6
6
  view_mode: 'mobile' | 'desktop';
7
+ height_override?: number;
7
8
  competition_id?: string;
8
9
  hide_image?: boolean;
9
10
  image_width?: number;
@@ -34,6 +35,6 @@ type BracketCompetitionActionProps = {
34
35
  onEnterCompetition: (bc: BracketCompetitionProps, cpb: CompetitionPlayerBracketProps, player_bracket?: PlayerBracketProps) => void;
35
36
  onLeaveCompetition: (bc: BracketCompetitionProps, cpb: CompetitionPlayerBracketProps) => void;
36
37
  };
37
- declare const BracketCompetitionActions: ({ competition_id, hide_image, image_height, onCreateNewCompetition, onManage, image_width, player, player_brackets, insets, onRequestAuthenticate, onSelectCompetition, onFoundCompetition, onFocusPosition, onEnterCompetition, onLeaveCompetition, competition_result_types, player_balance, view_mode, bracket_id, player_bracket, competition_player_brackets }: BracketCompetitionActionProps) => React.JSX.Element;
38
+ declare const BracketCompetitionActions: ({ competition_id, height_override, hide_image, image_height, onCreateNewCompetition, onManage, image_width, player, player_brackets, insets, onRequestAuthenticate, onSelectCompetition, onFoundCompetition, onFocusPosition, onEnterCompetition, onLeaveCompetition, competition_result_types, player_balance, view_mode, bracket_id, player_bracket, competition_player_brackets }: BracketCompetitionActionProps) => React.JSX.Element;
38
39
  export default BracketCompetitionActions;
39
40
  //# sourceMappingURL=BracketCompetitionActions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BracketCompetitionActions.d.ts","sourceRoot":"","sources":["../../../../../src/Bracket/components/BracketCompetitionActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAS5K,KAAK,6BAA6B,GAAG;IACjC,UAAU,EAAC,MAAM,CAAC;IAClB,MAAM,CAAC,EAAC,aAAa,CAAC;IACtB,SAAS,EAAC,QAAQ,GAAC,SAAS,CAAC;IAC7B,cAAc,CAAC,EAAC,MAAM,CAAC;IACvB,UAAU,CAAC,EAAC,OAAO,CAAC;IACpB,WAAW,CAAC,EAAC,MAAM,CAAC;IACpB,QAAQ,EAAC,CAAC,sBAAsB,EAAC,MAAM,KAAK,IAAI,CAAC;IACjD,sBAAsB,CAAC,EAAC,CAAC,UAAU,CAAC,EAAC,MAAM,KAAK,IAAI,CAAC;IACrD,MAAM,CAAC,EAAC;QAAE,GAAG,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,CAAA;KAAE,CAAC;IACjE,YAAY,CAAC,EAAC,MAAM,CAAC;IACrB,wBAAwB,EAAC,0BAA0B,EAAE,CAAC;IACtD,cAAc,CAAC,EAAC,kBAAkB,CAAC;IACnC,cAAc,CAAC,EAAC,kBAAkB,CAAC;IACnC,eAAe,CAAC,EAAC,CAAC,IAAI,EAAC;QAAE,CAAC,EAAC,MAAM,CAAC;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACpF,eAAe,EAAC,kBAAkB,EAAE,CAAC;IACrC,2BAA2B,EAAC,6BAA6B,EAAE,CAAC;IAC5D,QAAQ,CAAC,EAAC,MAAM,IAAI,CAAC;IACrB,qBAAqB,EAAC,MAAM,IAAI,CAAC;IACjC,mBAAmB,EAAC,CAAC,EAAE,EAAC,uBAAuB,KAAK,IAAI,CAAC;IACzD,kBAAkB,EAAC,CAAC,EAAE,EAAC,uBAAuB,KAAK,IAAI,CAAC;IACxD,kBAAkB,EAAC,CAAC,EAAE,EAAC,uBAAuB,EAAE,GAAG,EAAC,6BAA6B,EAAE,cAAc,CAAC,EAAC,kBAAkB,KAAK,IAAI,CAAC;IAC/H,kBAAkB,EAAC,CAAC,EAAE,EAAC,uBAAuB,EAAE,GAAG,EAAC,6BAA6B,KAAK,IAAI,CAAA;CAC7F,CAAA;AAGD,QAAA,MAAM,yBAAyB,wWAAwW,6BAA6B,sBA6Vna,CAAA;AAED,eAAe,yBAAyB,CAAA"}
1
+ {"version":3,"file":"BracketCompetitionActions.d.ts","sourceRoot":"","sources":["../../../../../src/Bracket/components/BracketCompetitionActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,0BAA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C,CAAC,EAAE,EAAC,uBAAuB,KAAK,IAAI,CAAC;IACxD,kBAAkB,EAAC,CAAC,EAAE,EAAC,uBAAuB,EAAE,GAAG,EAAC,6BAA6B,EAAE,cAAc,CAAC,EAAC,kBAAkB,KAAK,IAAI,CAAC;IAC/H,kBAAkB,EAAC,CAAC,EAAE,EAAC,uBAAuB,EAAE,GAAG,EAAC,6BAA6B,KAAK,IAAI,CAAA;CAC7F,CAAA;AAGD,QAAA,MAAM,yBAAyB,yXAAyX,6BAA6B,sBA6Vpb,CAAA;AAED,eAAe,yBAAyB,CAAA"}
@@ -11,6 +11,7 @@ type BracketRoomProps = {
11
11
  left: number;
12
12
  };
13
13
  width: number;
14
+ height?: number;
14
15
  player_balance?: PlayerBalanceProps;
15
16
  bracket_competition_id?: string;
16
17
  onManageCompetition: (bracket_competition_id: string) => void;
@@ -29,6 +30,6 @@ type BracketRoomProps = {
29
30
  onClose?: () => void;
30
31
  onCreateNewCompetition?: (bracket_id?: string) => void;
31
32
  };
32
- declare const BracketRoom: ({ player_id, width, view_mode, bracket_id, insets, onSelectContest, onCreateNewCompetition, onManageCompetition, bracket_competition_id, player_balance, onRequestAuthenticate, onFocusPosition, onShareCompetition }: BracketRoomProps) => React.JSX.Element;
33
+ declare const BracketRoom: ({ player_id, width, height, view_mode, bracket_id, insets, onSelectContest, onCreateNewCompetition, onManageCompetition, bracket_competition_id, player_balance, onRequestAuthenticate, onFocusPosition, onShareCompetition }: BracketRoomProps) => React.JSX.Element;
33
34
  export default BracketRoom;
34
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Bracket/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAyF,kBAAkB,EAAE,sBAAsB,EAAsB,eAAe,EAAE,MAAM,UAAU,CAAC;AAW9O,KAAK,gBAA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C,CAAC,WAAW,EAAC,eAAe,EAAE,OAAO,EAAC,YAAY,EAAE,mBAAmB,CAAC,EAAC,sBAAsB,EAAE,qBAAqB,CAAC,EAAC,sBAAsB,EAAE,qBAAqB,CAAC,EAAC,sBAAsB,KAAK,IAAI,CAAA;IACvN,OAAO,CAAC,EAAC,MAAM,IAAI,CAAC;IACpB,sBAAsB,CAAC,EAAC,CAAC,UAAU,CAAC,EAAC,MAAM,KAAK,IAAI,CAAA;CACvD,CAAA;AAID,QAAA,MAAM,WAAW,kOAAkO,gBAAgB,sBAigBlQ,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -3,10 +3,11 @@ import type { BEEventProps, CompanyProps } from '../../types';
3
3
  type EngageHeaderProps = {
4
4
  companies: CompanyProps[];
5
5
  width: number;
6
+ view_mode?: 'desktop' | 'mobile';
6
7
  onEvent?: (be_event: BEEventProps) => void;
7
8
  onSelectCompany?: (company: CompanyProps) => void;
8
9
  onManage?: () => void;
9
10
  };
10
- declare const EngageHeader: ({ companies, width, onManage, onEvent, onSelectCompany }: EngageHeaderProps) => React.JSX.Element;
11
+ declare const EngageHeader: ({ companies, width, view_mode, onManage, onEvent, onSelectCompany }: EngageHeaderProps) => React.JSX.Element;
11
12
  export default EngageHeader;
12
13
  //# sourceMappingURL=EngageHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EngageHeader.d.ts","sourceRoot":"","sources":["../../../../../src/Engage/components/EngageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAU9D,KAAK,iBAAiB,GAAG;IACrB,SAAS,EAAC,YAAY,EAAE,CAAC;IACzB,KAAK,EAAC,MAAM,CAAC;IACb,OAAO,CAAC,EAAC,CAAC,QAAQ,EAAC,YAAY,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAC,CAAC,OAAO,EAAC,YAAY,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,EAAC,MAAM,IAAI,CAAA;CACvB,CAAA;AAED,QAAA,MAAM,YAAY,6DAA6D,iBAAiB,sBAqI/F,CAAA;AAED,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"EngageHeader.d.ts","sourceRoot":"","sources":["../../../../../src/Engage/components/EngageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAU9D,KAAK,iBAAiB,GAAG;IACrB,SAAS,EAAC,YAAY,EAAE,CAAC;IACzB,KAAK,EAAC,MAAM,CAAC;IACb,SAAS,CAAC,EAAC,SAAS,GAAC,QAAQ,CAAC;IAC9B,OAAO,CAAC,EAAC,CAAC,QAAQ,EAAC,YAAY,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAC,CAAC,OAAO,EAAC,YAAY,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,EAAC,MAAM,IAAI,CAAA;CACvB,CAAA;AAED,QAAA,MAAM,YAAY,wEAAwE,iBAAiB,sBAmI1G,CAAA;AAED,eAAe,YAAY,CAAA"}
@@ -6,9 +6,11 @@ type EngageModuleProps = {
6
6
  top: number;
7
7
  bottom: number;
8
8
  };
9
+ view_mode?: 'desktop' | 'mobile';
9
10
  onEvent?: (be_event: BEEventProps) => void;
10
11
  onFocusPosition?: (pos: FocusPositionProps) => void;
11
- onManage: () => void;
12
+ onManage?: () => void;
13
+ onBracketRoom?: () => void;
12
14
  onCreateSeason?: () => void;
13
15
  onSelectCompany?: (c: CompanyProps) => void;
14
16
  onCreateCompetition?: () => void;
@@ -19,6 +21,6 @@ type EngageModuleProps = {
19
21
  onSelectSquaresCompetition: (sc: SquaresCompetitionProps) => void;
20
22
  onSelectCompetitionSeason: (cs: CompetitionSeasonProps) => void;
21
23
  };
22
- declare const EngageModule: ({ insets, onSelectBracketCompetition, onSelectCompetition, onSelectSquaresCompetition, onSelectCompetitionSeason, onCreateSeason, onCreateCompetition, onCreateBracketCompetition, onCreateSquares, onFocusPosition, onManage, onEvent, onSelectCompany }: EngageModuleProps) => React.JSX.Element;
24
+ declare const EngageModule: ({ view_mode, insets, onBracketRoom, onSelectBracketCompetition, onSelectCompetition, onSelectSquaresCompetition, onSelectCompetitionSeason, onCreateSeason, onCreateCompetition, onCreateBracketCompetition, onCreateSquares, onFocusPosition, onManage, onEvent, onSelectCompany }: EngageModuleProps) => React.JSX.Element;
23
25
  export default EngageModule;
24
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Engage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAgB,YAAY,EAA8B,gBAAgB,EAA8B,sBAAsB,EAAoC,kBAAkB,EAAkC,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAenT,KAAK,iBAAiB,GAAG;IACrB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QAAE,GAAG,EAAC,MAAM,CAAC;QAAC,MAAM,EAAC,MAAM,CAAA;KAAE,CAAC;IACvC,OAAO,CAAC,EAAC,CAAC,QAAQ,EAAC,YAAY,KAAK,IAAI,CAAC;IACzC,eAAe,CAAC,EAAC,CAAC,GAAG,EAAC,kBAAkB,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAC,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAC,MAAM,IAAI,CAAC;IAC3B,eAAe,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,KAAK,IAAI,CAAC;IAC1C,mBAAmB,CAAC,EAAC,MAAM,IAAI,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,0BAA0B,CAAC,EAAC,MAAM,IAAI,CAAC;IACvC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;IAC7B,0BAA0B,CAAC,EAAC,MAAM,IAAI,CAAC;IACvC,mBAAmB,EAAC,CAAC,CAAC,EAAC,gBAAgB,KAAK,IAAI,CAAC;IACjD,0BAA0B,EAAC,CAAC,EAAE,EAAC,uBAAuB,KAAK,IAAI,CAAC;IAChE,0BAA0B,EAAC,CAAC,EAAE,EAAC,uBAAuB,KAAK,IAAI,CAAC;IAChE,yBAAyB,EAAC,CAAC,EAAE,EAAC,sBAAsB,KAAK,IAAI,CAAA;CAChE,CAAA;AAID,QAAA,MAAM,YAAY,wRAEf,iBAAiB,sBAkcnB,CAAA;AAED,eAAe,YAAY,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-components",
3
- "version": "4.7.2",
3
+ "version": "4.7.4",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -13,6 +13,7 @@ type BracketCompetitionActionProps = {
13
13
  bracket_id:string,
14
14
  player?:MyPlayerProps,
15
15
  view_mode:'mobile'|'desktop',
16
+ height_override?:number,
16
17
  competition_id?:string,
17
18
  hide_image?:boolean,
18
19
  image_width?:number,
@@ -35,7 +36,7 @@ type BracketCompetitionActionProps = {
35
36
  }
36
37
 
37
38
  const sections = ['active_competition', 'leaderboard', 'actions', 'competitions'];
38
- const BracketCompetitionActions = ({ competition_id, hide_image, image_height, onCreateNewCompetition, onManage, image_width, player, player_brackets, insets, onRequestAuthenticate, onSelectCompetition, onFoundCompetition, onFocusPosition, onEnterCompetition, onLeaveCompetition, competition_result_types, player_balance, view_mode, bracket_id, player_bracket, competition_player_brackets }:BracketCompetitionActionProps) => {
39
+ const BracketCompetitionActions = ({ competition_id, height_override, hide_image, image_height, onCreateNewCompetition, onManage, image_width, player, player_brackets, insets, onRequestAuthenticate, onSelectCompetition, onFoundCompetition, onFocusPosition, onEnterCompetition, onLeaveCompetition, competition_result_types, player_balance, view_mode, bracket_id, player_bracket, competition_player_brackets }:BracketCompetitionActionProps) => {
39
40
  const Colors = useColors();
40
41
  const [ search_data, setSearchData ] = useState<{
41
42
  visible:boolean,
@@ -318,7 +319,7 @@ const BracketCompetitionActions = ({ competition_id, hide_image, image_height, o
318
319
  }
319
320
 
320
321
  return (
321
- <View transparent style={{ flex:1 }}>
322
+ <View transparent style={{ flexGrow:1 }}>
322
323
  <FlatList
323
324
  key={`comp_actions_list`}
324
325
  keyExtractor={(item) => item}
@@ -362,7 +363,7 @@ const BracketCompetitionActions = ({ competition_id, hide_image, image_height, o
362
363
  style={{ flex:1 }}
363
364
  >
364
365
  <View type='blur' style={view_mode == 'desktop' ? { flex:1, justifyContent:'center', alignItems:'center' } : { flex:1, justifyContent:'flex-end', padding:10, paddingBottom:(insets?.bottom ?? 0)+10 }}>
365
- <View float style={view_mode == 'desktop' ? { width:500, maxHeight: height - 40 }: { maxHeight: height - 20 - (insets?.bottom ?? 0) - (insets?.top ?? 0)}}>
366
+ <View float style={view_mode == 'desktop' ? { width:500, maxHeight: height_override ?? (height - 40) }: { flexGrow:1, maxHeight: height - 20 - (insets?.bottom ?? 0) - (insets?.top ?? 0)}}>
366
367
  {active_competition ?
367
368
  <CompetitionLeaderboard
368
369
  bracket_competition_id={active_competition.bracket_competition_id}
@@ -17,6 +17,7 @@ type BracketRoomProps = {
17
17
  bracket_id?:string,
18
18
  insets?: { top:number, bottom:number, right:number, left:number },
19
19
  width:number,
20
+ height?:number,
20
21
  player_balance?:PlayerBalanceProps,
21
22
  bracket_competition_id?:string,
22
23
  onManageCompetition:(bracket_competition_id:string) => void,
@@ -31,7 +32,7 @@ type BracketRoomProps = {
31
32
  const sections = ['header', 'home', 'bracket_selector', 'bracket']
32
33
  const MAX_WIDTH = 1200
33
34
 
34
- const BracketRoom = ({ player_id, width, view_mode, bracket_id, insets, onSelectContest, onCreateNewCompetition, onManageCompetition, bracket_competition_id, player_balance, onRequestAuthenticate, onFocusPosition, onShareCompetition }:BracketRoomProps) => {
35
+ const BracketRoom = ({ player_id, width, height, view_mode, bracket_id, insets, onSelectContest, onCreateNewCompetition, onManageCompetition, bracket_competition_id, player_balance, onRequestAuthenticate, onFocusPosition, onShareCompetition }:BracketRoomProps) => {
35
36
  const Colors = useColors();
36
37
  const [ loading, setLoading ] = useState<string|undefined>(undefined);
37
38
  const [ show_competition_actions, setShowCompetitionActions ] = useState(false);
@@ -313,6 +314,7 @@ const BracketRoom = ({ player_id, width, view_mode, bracket_id, insets, onSelect
313
314
 
314
315
  {active_bracket_id ?
315
316
  <BracketCompetitionActions
317
+ height_override={height}
316
318
  view_mode={view_mode}
317
319
  onRequestAuthenticate={() => {
318
320
  setShowCompetitionActions(false);
@@ -13,12 +13,13 @@ import { Button, Text, View } from '../../Components/Themed';
13
13
  type EngageHeaderProps = {
14
14
  companies:CompanyProps[],
15
15
  width:number,
16
+ view_mode?:'desktop'|'mobile',
16
17
  onEvent?:(be_event:BEEventProps) => void,
17
18
  onSelectCompany?:(company:CompanyProps) => void,
18
19
  onManage?:() => void
19
20
  }
20
21
 
21
- const EngageHeader = ({ companies, width, onManage, onEvent, onSelectCompany }:EngageHeaderProps) => {
22
+ const EngageHeader = ({ companies, width, view_mode, onManage, onEvent, onSelectCompany }:EngageHeaderProps) => {
22
23
  const [ active_company, setActiveComany ] = useState<number>(0);
23
24
  const [ search, setSearch ] = useState<{
24
25
  loading:boolean,
@@ -80,27 +81,25 @@ const EngageHeader = ({ companies, width, onManage, onEvent, onSelectCompany }:E
80
81
  return (
81
82
  <View type = 'header'>
82
83
  <LinearGradient colors={[Colors.views.background, Colors.views.header ]} style={{ padding:20, flexDirection:'row', alignItems:'center' }}>
83
- <View float style={{ borderRadius:100, height:75, width:75, backgroundColor:Colors.text.white, justifyContent:'center', alignItems:'center', ...view_styles.float }}>
84
+ <View float style={{ borderRadius:100, width:view_mode == 'desktop' ? 75: 50, height:view_mode == 'desktop' ? 75: 50, justifyContent:'center', alignItems:'center', ...view_styles.float }}>
84
85
  {company ?
85
86
  <Image
86
87
  source={{ uri: company.company_image?.url }}
87
- style={{ height:50, width:50 }}
88
+ style={{ height:view_mode=='desktop'?50:30, width:view_mode=='desktop'?50:30 }}
88
89
  resizeMode='cover'
89
90
  />
90
91
  :<></>}
91
92
  </View>
92
93
  <View transparent style={{ flex:1, marginLeft:20 }}>
93
- <Text size={20} weight='bold' color={Colors.text.h1}>Engage with our partners</Text>
94
- <Text style={{ marginTop:10 }} size={14} weight='regular' color={Colors.text.h1}>Competitions, squares, brackets are all brought to you without fees thanks to our amazing partners.</Text>
94
+ <Text theme='h1' color={Colors.text.h1}>Engage with our partners</Text>
95
+ <Text style={{ marginTop:5 }} size={14} theme='description'>Competitions, squares, brackets are all brought to you without fees thanks to our amazing partners.</Text>
95
96
  </View>
96
- {onManage ?
97
- <View style={{ position:'absolute', bottom:5, right:10 }}>
97
+ {onManage && view_mode == 'desktop' ?
98
98
  <Button
99
- title='MANAGE'
99
+ title='Manage'
100
100
  type='success'
101
101
  onPress={() => onManage()}
102
102
  />
103
- </View>
104
103
  :<></>}
105
104
  </LinearGradient>
106
105
  <View transparent style={{ padding:10 }}>
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { ActivityIndicator, FlatList, KeyboardAvoidingView, Modal, Platform } from 'react-native';
2
+ import { ActivityIndicator, FlatList, Image, KeyboardAvoidingView, Modal, Platform } from 'react-native';
3
3
  import type { BEEventProps, BracketCompetitionProps, BracketProps, CompanyProps, CompetitionPayoutTypeProps, CompetitionProps, CompetitionResultTypeProps, CompetitionSeasonProps, CompetitionTypeProps, EventProps, FocusPositionProps, LeagueProps, PublicPlayerProps, SquaresCompetitionProps } from '../types';
4
4
  import { EngageApi, EngageHelpers } from './api';
5
5
  import CompetitionCard from './components/CompetitionCard';
@@ -18,9 +18,11 @@ import { useColors } from '../constants/useColors';
18
18
  type EngageModuleProps = {
19
19
  player_id?:string,
20
20
  insets?: { top:number, bottom:number },
21
+ view_mode?:'desktop'|'mobile'
21
22
  onEvent?:(be_event:BEEventProps) => void,
22
23
  onFocusPosition?:(pos:FocusPositionProps) => void,
23
- onManage:() => void,
24
+ onManage?:() => void,
25
+ onBracketRoom?:() => void,
24
26
  onCreateSeason?:() => void,
25
27
  onSelectCompany?:(c:CompanyProps) => void,
26
28
  onCreateCompetition?:() => void,
@@ -34,7 +36,7 @@ type EngageModuleProps = {
34
36
 
35
37
  const engage_sections = ['header','toggle', 'private','engagements']
36
38
 
37
- const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition, onSelectSquaresCompetition, onSelectCompetitionSeason,
39
+ const EngageModule = ({ view_mode, insets, onBracketRoom, onSelectBracketCompetition, onSelectCompetition, onSelectSquaresCompetition, onSelectCompetitionSeason,
38
40
  onCreateSeason, onCreateCompetition, onCreateBracketCompetition, onCreateSquares, onFocusPosition, onManage, onEvent, onSelectCompany
39
41
  }:EngageModuleProps) => {
40
42
  const [ module_size, setModuleSize ] = useState({ width:0, height:0 });
@@ -45,7 +47,7 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
45
47
  }>({
46
48
  connected: false
47
49
  });
48
- const [ active_tab, setActiveTab ] = useState('competitions');
50
+ const [ active_tab, setActiveTab ] = useState('brackets');
49
51
  const [ module_data, setModuleData ] = useState<{
50
52
  loading:boolean,
51
53
  competitions:CompetitionProps[],
@@ -53,6 +55,7 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
53
55
  competition_types:CompetitionTypeProps[],
54
56
  competition_result_types:CompetitionResultTypeProps[],
55
57
  competition_payouts:CompetitionPayoutTypeProps[],
58
+ selected_bracket?:BracketProps,
56
59
  events:EventProps[],
57
60
  leagues:LeagueProps[],
58
61
  brackets:BracketProps[],
@@ -75,10 +78,14 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
75
78
  bracket_competitions:[],
76
79
  players:[]
77
80
  });
78
- const { loading, competitions, competition_seasons, competition_result_types, squares_competitions, brackets, leagues, bracket_competitions, events, competition_types, companies, players } = module_data;
79
-
81
+ const { loading, competitions, selected_bracket, competition_seasons, competition_result_types, squares_competitions, brackets, leagues, bracket_competitions, events, competition_types, companies, players } = module_data;
80
82
  const Colors = useColors();
81
-
83
+ const available_brackets = brackets.filter(b => bracket_competitions.map(bc => bc.bracket_id).includes(b.bracket_id))
84
+ let visible_bracket_competitions = [ ...bracket_competitions ]
85
+ if(selected_bracket){
86
+ visible_bracket_competitions = visible_bracket_competitions.filter(bc => bc.bracket_id == selected_bracket.bracket_id);
87
+ }
88
+ const engagement_width = view_mode == 'mobile' ? module_size.width - 20 : (module_size.width / 3) - 20
82
89
  useEffect(() => {
83
90
  EngageApi.setEnvironment();
84
91
  getDataFromServer()
@@ -135,7 +142,7 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
135
142
  const company = companies.find(c => c.company_id == data.item.company_id);
136
143
  const event = events.find(e => e.event_id == data.item.event_id)
137
144
  return (
138
- <View transparent style={{ margin:10 }}>
145
+ <View key={data.item.sq_comp_id.toString()} transparent style={{ margin:10, width: engagement_width }}>
139
146
  <SquaresCompetitionCard
140
147
  squares_competition={data.item}
141
148
  company={company}
@@ -156,7 +163,7 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
156
163
  const league = leagues.find(e => e.league_id == bracket?.league_id)
157
164
  if(!competition_result_type){ return <></> }
158
165
  return (
159
- <View transparent style={{ margin:10 }}>
166
+ <View key={data.item.bracket_competition_id.toString()} transparent style={{ margin:10, width: engagement_width }}>
160
167
  <BracketCompetitionCard
161
168
  bracket_competition={data.item}
162
169
  company={company}
@@ -182,6 +189,28 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
182
189
  )
183
190
  }
184
191
 
192
+ const renderBrackets = (data: { item:BracketProps, index:number }) => {
193
+ const selected = selected_bracket?.bracket_id == data.item.bracket_id ? true : false
194
+ const league = leagues.find(l => l.league_id == data.item.league_id);
195
+ return (
196
+ <Button
197
+ float
198
+ type={selected ? 'action' : 'text'}
199
+ style={{ padding:10, flexDirection:'row', alignItems:'center', margin:4, borderRadius:100 }}
200
+ onPress={() => selected ? setModuleData({ ...module_data, selected_bracket: undefined }): setModuleData({ ...module_data, selected_bracket:data.item })}
201
+ >
202
+ {league ?
203
+ <Image
204
+ source={{ uri: league.league_image }}
205
+ style={{ height:25, width:25, marginRight:10 }}
206
+ resizeMode='cover'
207
+ />
208
+ :<></>}
209
+ <Text style={{ maxWidth:150 }} textAlign='center' theme='h2' color={selected?Colors.text.white : Colors.text.h1}>{data.item.bracket_name}</Text>
210
+ </Button>
211
+ )
212
+ }
213
+
185
214
  const renderCompetitions = (data: { item:CompetitionProps, index:number }) => {
186
215
  const admin = players.find(p => p.player_id == data.item.admin_id);
187
216
  const pacer = players.find(p => p.player_id == data.item.pacer_id);
@@ -190,7 +219,7 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
190
219
  const competition_result_type = competition_result_types.find(t => t.competition_result_type_id == data.item.competition_result_type_id);
191
220
  if(!competition_type || !competition_result_type){ return <></> }
192
221
  return (
193
- <View transparent style={{ margin:10 }}>
222
+ <View key={data.item.competition_id.toString()} transparent style={{ margin:10, width:engagement_width }}>
194
223
  <CompetitionCard
195
224
  competition={data.item}
196
225
  company={company}
@@ -211,6 +240,7 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
211
240
  <EngageHeader
212
241
  companies={companies}
213
242
  width={module_size.width}
243
+ view_mode={view_mode}
214
244
  onManage={onManage}
215
245
  onEvent={onEvent}
216
246
  onSelectCompany={onSelectCompany}
@@ -218,7 +248,15 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
218
248
  )
219
249
  case 'toggle':
220
250
  return (
221
- <View float style={{ margin:10 }}>
251
+ <View transparent style={{ margin:10 }}>
252
+ {onManage && view_mode == 'mobile' ?
253
+ <Button
254
+ title='Manage competitions you have created'
255
+ style={{ paddingRight:20, alignSelf:'flex-end' }}
256
+ type='text'
257
+ onPress={() => onManage()}
258
+ />
259
+ :<></>}
222
260
  <Toggle
223
261
  background_color={Colors.views.header}
224
262
  inactive_title_color={Colors.text.h1}
@@ -290,11 +328,12 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
290
328
  :<></>}
291
329
 
292
330
  </View>
293
- <FlatList
294
- data={competitions.sort((a,b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix())}
295
- renderItem={renderCompetitions}
296
- keyExtractor={(item) => item.competition_id.toString()}
297
- />
331
+ <View style={{ flexDirection:'row', flexWrap:'wrap', justifyContent:'center' }}>
332
+ {competitions.sort((a,b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix()).map((c, i) => {
333
+ return renderCompetitions({ item: c, index: i })
334
+ })}
335
+ </View>
336
+
298
337
  </View>
299
338
  </View>
300
339
  :active_tab == 'squares' ?
@@ -314,15 +353,30 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
314
353
  :<></>}
315
354
  </View>
316
355
  </View>
317
- <FlatList
318
- data={squares_competitions.sort((a,b) => moment(a.begin_datetime).unix() - moment(b.begin_datetime).unix())}
319
- renderItem={renderSquaresCompetitions}
320
- keyExtractor={(item) => item.sq_comp_id.toString()}
321
- />
356
+ <View style={{ flexDirection:'row', flexWrap:'wrap', justifyContent:'center' }}>
357
+
358
+ {squares_competitions.sort((a,b) => moment(a.begin_datetime).unix() - moment(b.begin_datetime).unix()).map((c, i) => {
359
+ return renderSquaresCompetitions({ item: c, index: i })
360
+ })}
361
+ </View>
322
362
  </View>
323
363
  :active_tab == 'brackets' ?
324
364
  <View transparent>
325
- <View transparent style={{ marginBottom:15, marginTop:10 }}>
365
+ <View transparent>
366
+ {view_mode == 'mobile' && onBracketRoom ?
367
+ <View float style={{ flexDirection:'row', alignItems:'center', margin:4, padding:10, marginBottom:10 }}>
368
+ <View style={{ flex:1, marginRight:10 }}>
369
+ <Text theme='h1'>Bracket Home</Text>
370
+ <Text theme='description'>Go to bracket room to manage all your brackets and find new ones to complete.</Text>
371
+ </View>
372
+ <Button
373
+ type='action'
374
+ title='Bracket Room'
375
+ onPress={() => onBracketRoom()}
376
+ />
377
+ </View>
378
+
379
+ :<></>}
326
380
  <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
327
381
  <View transparent style={{ flex:1 }}>
328
382
  <Text theme='h1'>Public Bracket Competitions</Text>
@@ -335,13 +389,29 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
335
389
  onPress={() => onCreateBracketCompetition()}
336
390
  />
337
391
  :<></>}
392
+ {view_mode == 'desktop' && onBracketRoom ?
393
+ <Button
394
+ type='action'
395
+ title='Bracket Room'
396
+ onPress={() => onBracketRoom()}
397
+ />
398
+ :<></>}
399
+ </View>
400
+ </View>
401
+ <View style={{ marginTop:10 }}>
402
+ <FlatList
403
+ data={available_brackets}
404
+ key={'bracket_list'}
405
+ horizontal
406
+ renderItem={renderBrackets}
407
+ keyExtractor={(item) => item.bracket_id.toString()}
408
+ />
409
+ <View style={{ flexDirection:'row', flexWrap:'wrap', justifyContent:'center' }}>
410
+ {visible_bracket_competitions.sort((a,b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix()).map((c, i) => {
411
+ return renderBracketCompetitions({ item: c, index: i })
412
+ })}
338
413
  </View>
339
414
  </View>
340
- <FlatList
341
- data={bracket_competitions.sort((a,b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix())}
342
- renderItem={renderBracketCompetitions}
343
- keyExtractor={(item) => item.bracket_competition_id.toString()}
344
- />
345
415
  </View>
346
416
  :<></>}
347
417
  </View>
@@ -367,14 +437,15 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
367
437
  {show_code_prompt ?
368
438
  <Modal
369
439
  transparent
370
- animationType='slide'
440
+ animationType={view_mode == 'desktop' ? 'fade': 'slide'}
371
441
  style={{ flex:1 }}
372
442
  >
373
443
  <KeyboardAvoidingView
374
444
  style={{ flex:1 }}
375
445
  behavior={Platform.OS == 'ios' ? 'padding' : 'height'}
376
446
  >
377
- <View type='blur' style={{ flex:1, justifyContent:'flex-end', paddingBottom:insets?.bottom }}>
447
+ <View type='blur' style={view_mode == 'desktop'?{ flex:1, justifyContent:'center', alignItems:'center' }:{ flex:1, justifyContent:'flex-end', paddingBottom:insets?.bottom }}>
448
+ <View transparent style={view_mode=='desktop'?{ width:500 }: {}}>
378
449
  <PrivateCodePrompt
379
450
  onFocusPosition={onFocusPosition}
380
451
  onFoundBracket={(b) => {
@@ -396,6 +467,7 @@ const EngageModule = ({ insets, onSelectBracketCompetition, onSelectCompetition,
396
467
  }}
397
468
  onClose={() => setShowCodePrompt(false)}
398
469
  />
470
+ </View>
399
471
  </View>
400
472
  </KeyboardAvoidingView>
401
473
  </Modal>
@@ -247,8 +247,8 @@ const PollCard = ({ poll_id, height, width, view_mode, poll_response, action_loa
247
247
  }
248
248
 
249
249
  return (
250
- <View float nativeID='poll' style={{ borderRadius:22, maxHeight: height-20, width: view_mode == 'desktop'?500:undefined }}>
251
- <View transparent style={{ flex:1 }}>
250
+ <View float nativeID='poll' style={{ borderRadius:22, maxHeight: height-20, width: view_mode == 'desktop'?500:undefined }}>
251
+ <View transparent style={{ flexGrow:1 }}>
252
252
  {loading || !poll ?
253
253
  <ActivityIndicator style={{ padding:20, alignSelf:'center' }} color={Colors.text.h1} size='large' />
254
254
  :<></>}
@@ -44,7 +44,7 @@ const PollOptionCard = ({ draft_selected, show_result, poll_option, poll_summary
44
44
  <View>
45
45
  {poll_option.option_type == 'select' ?
46
46
  <Button
47
- style={{ flex:1, flexDirection:'row', alignItems:'center', padding:10, borderRadius:22, borderWidth:1, borderColor:show_result?getResultColor(poll_option.result_ind):Colors.borders.light, backgroundColor:draft_selected?Colors.absolutes.highlights.highlight500Faded:undefined }}
47
+ style={{ flexGrow:1, flexDirection:'row', alignItems:'center', padding:10, borderRadius:22, borderWidth:1, borderColor:show_result?getResultColor(poll_option.result_ind):Colors.borders.light, backgroundColor:draft_selected?Colors.absolutes.highlights.highlight500Faded:undefined }}
48
48
  onPress={() => onSelect(poll_option)}
49
49
  onLayout={(ev) => {
50
50
  const { width } = ev.nativeEvent.layout