be-components 6.9.1 → 6.9.3

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 (144) hide show
  1. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js +22 -10
  2. package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -1
  3. package/lib/commonjs/Competition/components/WagerPickForm.js +2 -2
  4. package/lib/commonjs/Competition/components/WagerPickForm.js.map +1 -1
  5. package/lib/commonjs/Competition/index.js +91 -0
  6. package/lib/commonjs/Competition/index.js.map +1 -1
  7. package/lib/commonjs/CompetitionManager/api/index.js +19 -11
  8. package/lib/commonjs/CompetitionManager/api/index.js.map +1 -1
  9. package/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.js +5 -3
  10. package/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.js.map +1 -1
  11. package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js +50 -4
  12. package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
  13. package/lib/commonjs/CompetitionManager/components/ContestSelector.js +19 -4
  14. package/lib/commonjs/CompetitionManager/components/ContestSelector.js.map +1 -1
  15. package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js +28 -2
  16. package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js.map +1 -1
  17. package/lib/commonjs/CompetitionManager/components/MarketSelector.js +1 -3
  18. package/lib/commonjs/CompetitionManager/components/MarketSelector.js.map +1 -1
  19. package/lib/commonjs/CompetitionManager/index.js +14 -4
  20. package/lib/commonjs/CompetitionManager/index.js.map +1 -1
  21. package/lib/commonjs/CreateEngagement/index.js +1 -1
  22. package/lib/commonjs/CreateEngagement/index.js.map +1 -1
  23. package/lib/commonjs/Squares/components/BidForm.js +31 -31
  24. package/lib/commonjs/Squares/components/BidForm.js.map +1 -1
  25. package/lib/commonjs/Squares/components/OfferForm.js +53 -60
  26. package/lib/commonjs/Squares/components/OfferForm.js.map +1 -1
  27. package/lib/commonjs/Squares/components/SquareOfferCard.js +134 -121
  28. package/lib/commonjs/Squares/components/SquareOfferCard.js.map +1 -1
  29. package/lib/commonjs/Squares/components/SquareOffersCard.js +32 -6
  30. package/lib/commonjs/Squares/components/SquareOffersCard.js.map +1 -1
  31. package/lib/commonjs/Squares/components/SquaresBoard.js +16 -8
  32. package/lib/commonjs/Squares/components/SquaresBoard.js.map +1 -1
  33. package/lib/commonjs/Squares/index.js +65 -18
  34. package/lib/commonjs/Squares/index.js.map +1 -1
  35. package/lib/module/Competition/components/CompetitionLeaderboard.js +22 -10
  36. package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -1
  37. package/lib/module/Competition/components/WagerPickForm.js +2 -2
  38. package/lib/module/Competition/components/WagerPickForm.js.map +1 -1
  39. package/lib/module/Competition/index.js +91 -0
  40. package/lib/module/Competition/index.js.map +1 -1
  41. package/lib/module/CompetitionManager/api/index.js +19 -11
  42. package/lib/module/CompetitionManager/api/index.js.map +1 -1
  43. package/lib/module/CompetitionManager/components/CompetitionContestsForm.js +5 -3
  44. package/lib/module/CompetitionManager/components/CompetitionContestsForm.js.map +1 -1
  45. package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js +50 -4
  46. package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
  47. package/lib/module/CompetitionManager/components/ContestSelector.js +20 -5
  48. package/lib/module/CompetitionManager/components/ContestSelector.js.map +1 -1
  49. package/lib/module/CompetitionManager/components/ContestSettingsForm.js +28 -2
  50. package/lib/module/CompetitionManager/components/ContestSettingsForm.js.map +1 -1
  51. package/lib/module/CompetitionManager/components/MarketSelector.js +1 -3
  52. package/lib/module/CompetitionManager/components/MarketSelector.js.map +1 -1
  53. package/lib/module/CompetitionManager/index.js +14 -4
  54. package/lib/module/CompetitionManager/index.js.map +1 -1
  55. package/lib/module/CreateEngagement/index.js +1 -1
  56. package/lib/module/CreateEngagement/index.js.map +1 -1
  57. package/lib/module/Squares/components/BidForm.js +31 -31
  58. package/lib/module/Squares/components/BidForm.js.map +1 -1
  59. package/lib/module/Squares/components/OfferForm.js +54 -61
  60. package/lib/module/Squares/components/OfferForm.js.map +1 -1
  61. package/lib/module/Squares/components/SquareOfferCard.js +123 -109
  62. package/lib/module/Squares/components/SquareOfferCard.js.map +1 -1
  63. package/lib/module/Squares/components/SquareOffersCard.js +32 -6
  64. package/lib/module/Squares/components/SquareOffersCard.js.map +1 -1
  65. package/lib/module/Squares/components/SquaresBoard.js +16 -8
  66. package/lib/module/Squares/components/SquaresBoard.js.map +1 -1
  67. package/lib/module/Squares/index.js +65 -18
  68. package/lib/module/Squares/index.js.map +1 -1
  69. package/lib/typescript/lib/commonjs/Competition/components/CompetitionLeaderboard.d.ts +2 -1
  70. package/lib/typescript/lib/commonjs/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
  71. package/lib/typescript/lib/commonjs/Competition/index.d.ts.map +1 -1
  72. package/lib/typescript/lib/commonjs/CompetitionManager/api/index.d.ts +1 -1
  73. package/lib/typescript/lib/commonjs/CompetitionManager/api/index.d.ts.map +1 -1
  74. package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.d.ts.map +1 -1
  75. package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
  76. package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
  77. package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
  78. package/lib/typescript/lib/commonjs/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
  79. package/lib/typescript/lib/commonjs/CompetitionManager/index.d.ts.map +1 -1
  80. package/lib/typescript/lib/commonjs/Squares/components/BidForm.d.ts.map +1 -1
  81. package/lib/typescript/lib/commonjs/Squares/components/OfferForm.d.ts +1 -2
  82. package/lib/typescript/lib/commonjs/Squares/components/OfferForm.d.ts.map +1 -1
  83. package/lib/typescript/lib/commonjs/Squares/components/SquareOfferCard.d.ts +2 -1
  84. package/lib/typescript/lib/commonjs/Squares/components/SquareOfferCard.d.ts.map +1 -1
  85. package/lib/typescript/lib/commonjs/Squares/components/SquareOffersCard.d.ts +2 -1
  86. package/lib/typescript/lib/commonjs/Squares/components/SquareOffersCard.d.ts.map +1 -1
  87. package/lib/typescript/lib/commonjs/Squares/index.d.ts.map +1 -1
  88. package/lib/typescript/lib/module/Competition/components/CompetitionLeaderboard.d.ts +2 -1
  89. package/lib/typescript/lib/module/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
  90. package/lib/typescript/lib/module/Competition/index.d.ts.map +1 -1
  91. package/lib/typescript/lib/module/CompetitionManager/api/index.d.ts +1 -1
  92. package/lib/typescript/lib/module/CompetitionManager/api/index.d.ts.map +1 -1
  93. package/lib/typescript/lib/module/CompetitionManager/components/CompetitionContestsForm.d.ts.map +1 -1
  94. package/lib/typescript/lib/module/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
  95. package/lib/typescript/lib/module/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
  96. package/lib/typescript/lib/module/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
  97. package/lib/typescript/lib/module/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
  98. package/lib/typescript/lib/module/CompetitionManager/index.d.ts.map +1 -1
  99. package/lib/typescript/lib/module/Squares/components/BidForm.d.ts.map +1 -1
  100. package/lib/typescript/lib/module/Squares/components/OfferForm.d.ts +1 -2
  101. package/lib/typescript/lib/module/Squares/components/OfferForm.d.ts.map +1 -1
  102. package/lib/typescript/lib/module/Squares/components/SquareOfferCard.d.ts +5 -3
  103. package/lib/typescript/lib/module/Squares/components/SquareOfferCard.d.ts.map +1 -1
  104. package/lib/typescript/lib/module/Squares/components/SquareOffersCard.d.ts +2 -1
  105. package/lib/typescript/lib/module/Squares/components/SquareOffersCard.d.ts.map +1 -1
  106. package/lib/typescript/lib/module/Squares/index.d.ts.map +1 -1
  107. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts +7 -2
  108. package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
  109. package/lib/typescript/src/Competition/index.d.ts.map +1 -1
  110. package/lib/typescript/src/CompetitionManager/api/index.d.ts +2 -2
  111. package/lib/typescript/src/CompetitionManager/api/index.d.ts.map +1 -1
  112. package/lib/typescript/src/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
  113. package/lib/typescript/src/CompetitionManager/components/ContestSelector.d.ts +4 -3
  114. package/lib/typescript/src/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
  115. package/lib/typescript/src/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
  116. package/lib/typescript/src/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
  117. package/lib/typescript/src/CompetitionManager/index.d.ts.map +1 -1
  118. package/lib/typescript/src/Squares/components/BidForm.d.ts.map +1 -1
  119. package/lib/typescript/src/Squares/components/OfferForm.d.ts +1 -1
  120. package/lib/typescript/src/Squares/components/OfferForm.d.ts.map +1 -1
  121. package/lib/typescript/src/Squares/components/SquareOfferCard.d.ts +3 -2
  122. package/lib/typescript/src/Squares/components/SquareOfferCard.d.ts.map +1 -1
  123. package/lib/typescript/src/Squares/components/SquareOffersCard.d.ts +3 -2
  124. package/lib/typescript/src/Squares/components/SquareOffersCard.d.ts.map +1 -1
  125. package/lib/typescript/src/Squares/components/SquaresBoard.d.ts.map +1 -1
  126. package/lib/typescript/src/Squares/index.d.ts.map +1 -1
  127. package/package.json +1 -1
  128. package/src/Competition/components/CompetitionLeaderboard.tsx +23 -7
  129. package/src/Competition/components/WagerPickForm.tsx +2 -2
  130. package/src/Competition/index.tsx +81 -2
  131. package/src/CompetitionManager/api/index.ts +14 -6
  132. package/src/CompetitionManager/components/CompetitionContestsForm.tsx +4 -4
  133. package/src/CompetitionManager/components/CompetitionSettingsForm.tsx +34 -1
  134. package/src/CompetitionManager/components/ContestSelector.tsx +25 -9
  135. package/src/CompetitionManager/components/ContestSettingsForm.tsx +19 -0
  136. package/src/CompetitionManager/components/MarketSelector.tsx +5 -7
  137. package/src/CompetitionManager/index.tsx +15 -7
  138. package/src/CreateEngagement/index.tsx +1 -1
  139. package/src/Squares/components/BidForm.tsx +23 -25
  140. package/src/Squares/components/OfferForm.tsx +40 -36
  141. package/src/Squares/components/SquareOfferCard.tsx +75 -45
  142. package/src/Squares/components/SquareOffersCard.tsx +13 -9
  143. package/src/Squares/components/SquaresBoard.tsx +14 -8
  144. package/src/Squares/index.tsx +77 -41
@@ -7,15 +7,13 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _BidToggle = _interopRequireDefault(require("./BidToggle"));
10
- var _styles = require("../../constants/styles");
11
- var _colors = _interopRequireDefault(require("../../constants/colors"));
12
10
  var _Themed = require("../../Components/Themed");
11
+ var _useColors = require("../../constants/useColors");
13
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
13
  const OfferForm = ({
15
14
  player_id,
16
15
  player_balance,
17
16
  market_type,
18
- width,
19
17
  squares,
20
18
  submit_ready,
21
19
  home_abbr,
@@ -27,6 +25,7 @@ const OfferForm = ({
27
25
  onClearOffers,
28
26
  onSubmitOffer
29
27
  }) => {
28
+ const Colors = (0, _useColors.useColors)();
30
29
  const cl = market_type == 'FOR_MONEY' ? '$' : 'E';
31
30
  const total_offer_amount = draft_square_offers.reduce((a, b) => a + b.amount, 0);
32
31
  let can_submit = player_balance && total_offer_amount < player_balance.balance ? true : false;
@@ -40,6 +39,7 @@ const OfferForm = ({
40
39
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
41
40
  }
42
41
  return /*#__PURE__*/_react.default.createElement(_Themed.View, {
42
+ transparent: true,
43
43
  style: {
44
44
  flex: 1,
45
45
  flexDirection: 'row',
@@ -47,6 +47,7 @@ const OfferForm = ({
47
47
  marginBottom: 8
48
48
  }
49
49
  }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
50
+ transparent: true,
50
51
  style: {
51
52
  flex: 1
52
53
  }
@@ -54,7 +55,9 @@ const OfferForm = ({
54
55
  theme: "description"
55
56
  }, "SQUARE: ", home_abbr, ": ", square.square_score_x, ", ", away_abbr, ": ", square.square_score_y), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
56
57
  theme: "description"
57
- }, "Purchased Price: ", cl, ps.purchase_price.toFixed(2))), /*#__PURE__*/_react.default.createElement(_Themed.View, null, /*#__PURE__*/_react.default.createElement(_BidToggle.default, {
58
+ }, "Purchased Price: ", cl, ps.purchase_price.toFixed(2))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
59
+ transparent: true
60
+ }, /*#__PURE__*/_react.default.createElement(_BidToggle.default, {
58
61
  sq_square_id: square.sq_square_id,
59
62
  amount: data.item.amount,
60
63
  cl: cl,
@@ -65,16 +68,18 @@ const OfferForm = ({
65
68
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
66
69
  }
67
70
  return /*#__PURE__*/_react.default.createElement(_Themed.View, {
71
+ float: true
72
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
73
+ type: "header",
68
74
  style: {
69
- ..._styles.view_styles.section,
70
- width,
71
- padding: 0,
72
- maxHeight: 550,
73
- maxWidth: 600
75
+ flexDirection: 'row',
76
+ alignItems: 'center',
77
+ padding: 10,
78
+ borderTopRightRadius: 8,
79
+ borderTopLeftRadius: 8
74
80
  }
75
81
  }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
76
- style: _styles.view_styles.section_header
77
- }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
82
+ transparent: true,
78
83
  style: {
79
84
  flex: 1
80
85
  }
@@ -91,95 +96,83 @@ const OfferForm = ({
91
96
  },
92
97
  theme: "description"
93
98
  }, "How much are you willing to sell the selected square for?")), /*#__PURE__*/_react.default.createElement(_Themed.View, {
99
+ float: true,
94
100
  style: {
95
101
  height: 24,
96
102
  width: 24,
97
103
  borderRadius: 100,
98
- backgroundColor: _colors.default.highlights.highlight200,
99
104
  justifyContent: 'center',
100
105
  alignItems: 'center',
101
106
  marginLeft: 5
102
107
  }
103
108
  }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
104
109
  size: 12,
105
- color: _colors.default.shades.white,
110
+ color: Colors.text.h1,
106
111
  textAlign: "center"
107
112
  }, draft_square_offers.length))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
113
+ transparent: true,
114
+ type: "body",
108
115
  style: {
109
- ..._styles.view_styles.section_body
116
+ padding: 10
110
117
  }
111
118
  }, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
112
119
  data: draft_square_offers.sort((a, b) => parseInt(a.sq_player_square_id) - parseInt(b.sq_player_square_id)),
113
120
  renderItem: renderDraftOffers,
114
121
  keyExtractor: item => `o-${item.sq_player_square_id}`
115
122
  }), /*#__PURE__*/_react.default.createElement(_Themed.View, {
116
- style: _styles.view_styles.body_row
123
+ transparent: true,
124
+ type: "row",
125
+ style: {
126
+ marginTop: 5
127
+ }
117
128
  }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
118
129
  style: {
119
130
  flex: 1
120
131
  },
121
- theme: "description"
122
- }, "Total"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
123
132
  theme: "h2"
124
- }, cl, total_offer_amount.toFixed(2))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
133
+ }, "Total"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
134
+ theme: "h1"
135
+ }, cl, total_offer_amount.toFixed(2)))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
136
+ type: "footer",
125
137
  style: {
126
- ..._styles.view_styles.body_row
138
+ flexDirection: 'row',
139
+ alignItems: 'center',
140
+ padding: 10,
141
+ borderBottomRightRadius: 8,
142
+ borderBottomLeftRadius: 8
127
143
  }
128
144
  }, /*#__PURE__*/_react.default.createElement(_Themed.Button, {
145
+ type: "error",
146
+ title: "CLEAR",
129
147
  style: {
130
- flex: 1 / 3,
131
- padding: 12,
132
- borderRadius: 4,
133
- borderWidth: 1,
134
- borderColor: _colors.default.brand.cobalt,
135
- justifyContent: 'center',
136
- alignItems: 'center',
137
- marginRight: 4
148
+ flex: 1
138
149
  },
139
150
  onPress: () => onClearOffers()
140
- }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
141
- size: 14,
142
- weight: "semibold",
143
- textAlign: "center",
144
- color: _colors.default.brand.cobalt
145
- }, "Clear")), player_id ? /*#__PURE__*/_react.default.createElement(_Themed.Button, {
146
- disabled: !can_submit,
151
+ }), player_id ? /*#__PURE__*/_react.default.createElement(_Themed.Button, {
152
+ disabled: !can_submit || submit_ready.is_loading,
153
+ loading: submit_ready.is_loading,
147
154
  style: {
148
- flex: 2 / 3,
149
- padding: 12,
150
- borderRadius: 4,
151
- backgroundColor: submit_ready.is_ready ? _colors.default.highlights.highlight400 : _colors.default.highlights.highlight200,
152
- justifyContent: 'center',
153
- alignItems: 'center',
154
- marginLeft: 4,
155
- opacity: submit_ready.is_loading || !can_submit ? 0.5 : 1
155
+ flex: 2,
156
+ opacity: submit_ready.is_loading || !can_submit ? 0.5 : 1,
157
+ marginLeft: 5,
158
+ backgroundColor: submit_ready.is_ready ? Colors.text.success : Colors.text.action
156
159
  },
160
+ type: "success",
161
+ title: submit_ready.is_ready ? 'SUBMIT OFFER' : 'REVIEW OFFER',
157
162
  onPress: () => onSubmitOffer()
158
- }, submit_ready.is_loading ? /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
159
- size: "small",
160
- color: _colors.default.shades.white
161
- }) : /*#__PURE__*/_react.default.createElement(_Themed.Text, {
162
- size: 14,
163
- weight: "semibold",
164
- textAlign: "center",
165
- color: _colors.default.shades.white
166
- }, submit_ready.is_ready ? 'Submit Offers' : 'Review Offers')) : /*#__PURE__*/_react.default.createElement(_Themed.Button, {
163
+ }) : /*#__PURE__*/_react.default.createElement(_Themed.Button, {
167
164
  style: {
168
- flex: 2 / 3,
169
- padding: 12,
170
- borderRadius: 4,
171
- backgroundColor: _colors.default.highlights.highlight400,
172
- justifyContent: 'center',
173
- alignItems: 'center',
174
- marginLeft: 4
165
+ flex: 2,
166
+ marginLeft: 5
175
167
  },
168
+ type: "success",
176
169
  onPress: () => onRequestAuthenticate()
177
170
  }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
178
171
  size: 14,
179
172
  weight: "semibold",
180
173
  textAlign: "center",
181
- color: _colors.default.shades.white
182
- }, "Sign Up")))));
174
+ color: Colors.text.white
175
+ }, "Sign Up"))));
183
176
  };
184
177
  var _default = exports.default = OfferForm;
185
178
  //# sourceMappingURL=OfferForm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_BidToggle","_styles","_colors","_Themed","e","__esModule","default","OfferForm","player_id","player_balance","market_type","width","squares","submit_ready","home_abbr","away_abbr","player_squares","draft_square_offers","onRequestAuthenticate","onOfferAmountChange","onClearOffers","onSubmitOffer","cl","total_offer_amount","reduce","a","b","amount","can_submit","balance","renderDraftOffers","data","ps","find","psQ","sq_player_square_id","item","createElement","Fragment","square","s","sq_square_id","View","style","flex","flexDirection","alignItems","marginBottom","Text","theme","square_score_x","square_score_y","purchase_price","toFixed","onAmountChange","dir","view_styles","section","padding","maxHeight","maxWidth","section_header","buy_sell_ind","marginTop","height","borderRadius","backgroundColor","Colors","highlights","highlight200","justifyContent","marginLeft","size","color","shades","white","textAlign","length","section_body","FlatList","sort","parseInt","renderItem","keyExtractor","body_row","Button","borderWidth","borderColor","brand","cobalt","marginRight","onPress","weight","disabled","is_ready","highlight400","opacity","is_loading","ActivityIndicator","_default","exports"],"sourceRoot":"../../../../src","sources":["Squares/components/OfferForm.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAL,sBA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eAAM,CAACO,MAAM,CAACC;EAAM,GAAC,SAAa,CAC1F,CAEN,CACJ,CACJ,CAAC;AAEf,CAAC;AAAA,IAAAwB,QAAA,GAAAC,OAAA,CAAA9F,OAAA,GAEcC,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_BidToggle","_Themed","_useColors","e","__esModule","default","OfferForm","player_id","player_balance","market_type","squares","submit_ready","home_abbr","away_abbr","player_squares","draft_square_offers","onRequestAuthenticate","onOfferAmountChange","onClearOffers","onSubmitOffer","Colors","useColors","cl","total_offer_amount","reduce","a","b","amount","can_submit","balance","renderDraftOffers","data","ps","find","psQ","sq_player_square_id","item","createElement","Fragment","square","s","sq_square_id","View","transparent","style","flex","flexDirection","alignItems","marginBottom","Text","theme","square_score_x","square_score_y","purchase_price","toFixed","onAmountChange","dir","float","type","padding","borderTopRightRadius","borderTopLeftRadius","buy_sell_ind","marginTop","height","width","borderRadius","justifyContent","marginLeft","size","color","text","h1","textAlign","length","FlatList","sort","parseInt","renderItem","keyExtractor","borderBottomRightRadius","borderBottomLeftRadius","Button","title","onPress","disabled","is_loading","loading","opacity","backgroundColor","is_ready","success","action","weight","white","_default","exports"],"sourceRoot":"../../../../src","sources":["Squares/components/OfferForm.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAAsD,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAmBtD,MAAMG,SAAS,GAAGA,CAAC;EAAEC,SAAS;EAAEC,cAAc;EAAEC,WAAW;EAAEC,OAAO;EAAEC,YAAY;EAAEC,SAAS;EAAEC,SAAS;EAAE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AE;MAAEC,IAAI,EAAC,CAAC;MAAEuB,UAAU,EAAC;IAAE,CAAE;IAChCV,IAAI,EAAC,SAAS;IACd0B,OAAO,EAAEA,CAAA,KAAMpE,qBAAqB,CAAC;EAAE,gBACvCpB,MAAA,CAAAS,OAAA,CAAAgC,aAAA,CAACpC,OAAA,CAAAgD,IAAI;IAACoB,IAAI,EAAE,EAAG;IAACwB,MAAM,EAAC,UAAU;IAACpB,SAAS,EAAC,QAAQ;IAACH,KAAK,EAAElD,MAAM,CAACmD,IAAI,CAACuB;EAAM,GAAC,SAAa,CACxF,CAEN,CACJ,CAAC;AAEf,CAAC;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAA3F,OAAA,GAEcC,SAAS","ignoreList":[]}
@@ -5,15 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _Components = require("../../Components");
10
- var _colors = _interopRequireDefault(require("../../constants/colors"));
11
8
  var _api = require("../api");
12
- var _styles = require("../../constants/styles");
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ var _Themed = require("../../Components/Themed");
10
+ var _useColors = require("../../constants/useColors");
11
+ var _ConfirmAlert = require("../../Components/ConfirmAlert");
12
+ var _reactNative = require("react-native");
14
13
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
14
  const SquareOfferCard = ({
16
15
  player_id,
16
+ offer_owner,
17
17
  square,
18
18
  player_square,
19
19
  square_offer,
@@ -21,7 +21,9 @@ const SquareOfferCard = ({
21
21
  home_abbr,
22
22
  onRequestAuthenticate
23
23
  }) => {
24
+ const Colors = (0, _useColors.useColors)();
24
25
  const [loading, setLoading] = (0, _react.useState)(false);
26
+ const [hidden, setHidden] = (0, _react.useState)(false);
25
27
  const handleResponse = async response => {
26
28
  if (loading) {
27
29
  return;
@@ -38,6 +40,9 @@ const SquareOfferCard = ({
38
40
  });
39
41
  break;
40
42
  case 'rejected':
43
+ if (square_offer.buy_sell_ind == 'sell') {
44
+ return setHidden(true);
45
+ }
41
46
  await _api.SquaresApi.offserSquare({
42
47
  ...square_offer,
43
48
  status: 'rejected'
@@ -54,158 +59,166 @@ const SquareOfferCard = ({
54
59
  }
55
60
  setLoading(false);
56
61
  };
62
+ const handleConfirmResponse = response => {
63
+ (0, _ConfirmAlert.showConfirmAlert)('Are you sure?', 'Your response is final and cannot be modified', () => handleResponse(response), () => console.log(''));
64
+ };
65
+ if (hidden) {
66
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
67
+ }
57
68
  const cl = square_offer.market_type === 'FOR_MONEY' ? '$' : 'E';
58
69
  const mine = square_offer.offerer_id == player_id ? true : false;
59
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
70
+ return /*#__PURE__*/_react.default.createElement(_Themed.View, {
71
+ float: true,
60
72
  style: {
61
- ..._styles.view_styles.section,
62
73
  minWidth: 250,
63
- flex: 1
74
+ maxWidth: 275,
75
+ flexGrow: 1
64
76
  }
65
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
77
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
78
+ type: "header",
66
79
  style: {
67
- ..._styles.view_styles.section_header,
68
- backgroundColor: square_offer.buy_sell_ind == 'buy' ? _colors.default.brand.midnight : _colors.default.brand.cyan
80
+ flexDirection: 'row',
81
+ alignItems: 'center',
82
+ padding: 10,
83
+ borderTopRightRadius: 8,
84
+ borderTopLeftRadius: 8
69
85
  }
70
- }, /*#__PURE__*/_react.default.createElement(_Components.Text, {
71
- style: {
72
- flex: 1
73
- },
74
- size: 16,
75
- weight: "bold",
76
- color: _colors.default.shades.white
77
- }, "Squares", square_offer.buy_sell_ind === 'sell' ? ' Sale' : ' Buy', " Offer")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
78
- style: _styles.view_styles.section_body
79
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
80
- style: _styles.view_styles.body_row
81
- }, /*#__PURE__*/_react.default.createElement(_Components.Text, {
86
+ }, offer_owner ? /*#__PURE__*/_react.default.createElement(_Themed.View, {
87
+ float: true,
82
88
  style: {
83
- flex: 1
89
+ padding: 2,
90
+ marginRight: 5,
91
+ borderRadius: 100
92
+ }
93
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
94
+ source: {
95
+ uri: offer_owner.profile_pic
84
96
  },
85
- theme: "body"
86
- }, "Square"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
87
- theme: "header_2"
88
- }, home_abbr ?? '', ": ", square.square_score_x, ", ", away_abbr ?? '', ": ", square.square_score_y)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
89
- style: _styles.view_styles.body_row
90
- }, /*#__PURE__*/_react.default.createElement(_Components.Text, {
91
97
  style: {
92
- flex: 1
98
+ height: 35,
99
+ width: 35,
100
+ borderRadius: 100
93
101
  },
94
- theme: "body"
95
- }, "Purchased For"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
96
- theme: "header_2"
97
- }, cl, player_square.purchase_price.toFixed(2))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
98
- style: _styles.view_styles.body_row
99
- }, /*#__PURE__*/_react.default.createElement(_Components.Text, {
102
+ resizeMode: "cover"
103
+ })) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), /*#__PURE__*/_react.default.createElement(_Themed.View, {
104
+ transparent: true,
100
105
  style: {
101
106
  flex: 1
102
- },
103
- theme: "body"
104
- }, "Offer Amount"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
105
- theme: "header_2"
106
- }, cl, square_offer.amount.toFixed(2)))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
107
- style: {
108
- ..._styles.view_styles.section_footer,
109
- backgroundColor: square_offer.buy_sell_ind == 'buy' ? _colors.default.brand.midnight : _colors.default.brand.cyan
110
107
  }
111
- }, mine ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
108
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
109
+ theme: "h1"
110
+ }, "Squares", square_offer.buy_sell_ind === 'sell' ? ' Sale' : ' Buy', " Offer"), square_offer.buy_sell_ind == 'sell' && mine ? /*#__PURE__*/_react.default.createElement(_Themed.Text, {
111
+ theme: "description"
112
+ }, "This is your sell offer. Other players can buy this square for the price noted below") : square_offer.buy_sell_ind == 'sell' && !mine ? /*#__PURE__*/_react.default.createElement(_Themed.Text, {
113
+ theme: "description"
114
+ }, "This is a sale offer from another user. You can buy their square for the stated price right now") : square_offer.buy_sell_ind == 'buy' && !mine ? /*#__PURE__*/_react.default.createElement(_Themed.Text, {
115
+ theme: "description"
116
+ }, "This is an offer from another user to purchase your square. Sell or reject the offer below") : /*#__PURE__*/_react.default.createElement(_Themed.Text, {
117
+ theme: "description"
118
+ }, "This is your buy offer. The owner can accept or reject your offer"))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
119
+ transparent: true,
120
+ type: "body",
121
+ style: {
122
+ padding: 5,
123
+ flexGrow: 1
124
+ }
125
+ }, /*#__PURE__*/_react.default.createElement(_Themed.View, {
126
+ transparent: true,
127
+ type: "row",
112
128
  style: {
113
- flexDirection: 'row',
114
- alignItems: 'center',
115
- borderBottomRightRadius: 10,
116
- borderBottomLeftRadius: 10
129
+ padding: 5,
130
+ borderBottomWidth: 1,
131
+ borderColor: Colors.borders.light
117
132
  }
118
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
133
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
119
134
  style: {
120
- flex: 1,
121
- maxWidth: 140
135
+ flex: 1
136
+ },
137
+ theme: "description"
138
+ }, "Square"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
139
+ theme: "h2"
140
+ }, home_abbr ?? '', ": ", square.square_score_x, ", ", away_abbr ?? '', ": ", square.square_score_y)), /*#__PURE__*/_react.default.createElement(_Themed.View, {
141
+ transparent: true,
142
+ type: "row",
143
+ style: {
144
+ padding: 5,
145
+ borderBottomWidth: 1,
146
+ borderColor: Colors.borders.light
122
147
  }
123
- }, /*#__PURE__*/_react.default.createElement(_Components.Text, {
124
- size: 12,
125
- color: _colors.default.shades.white,
126
- weight: "semibold"
127
- }, "WITHDRAW OFFER?"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
128
- size: 12,
129
- color: _colors.default.shades.white,
130
- weight: "regular"
131
- }, "Do you wish to withdraw this offer?")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
148
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
132
149
  style: {
133
- flexDirection: 'row',
134
- alignItems: 'center',
135
- paddingLeft: 10
150
+ flex: 1
151
+ },
152
+ theme: "description"
153
+ }, "Purchased For"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
154
+ theme: "h2"
155
+ }, cl, player_square.purchase_price.toFixed(2))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
156
+ transparent: true,
157
+ type: "row",
158
+ style: {
159
+ padding: 5
136
160
  }
137
- }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
161
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
138
162
  style: {
139
- flex: 1,
140
- borderWidth: 1,
141
- borderColor: _colors.default.shades.white,
142
- borderRadius: 60,
143
- padding: 10,
144
- marginLeft: 4
163
+ flex: 1
145
164
  },
146
- onPress: () => handleResponse('withdrawn')
147
- }, /*#__PURE__*/_react.default.createElement(_Components.Text, {
148
- size: 12,
149
- weight: "semibold",
150
- textAlign: "center",
151
- color: _colors.default.shades.white
152
- }, "Withdraw")))) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
165
+ theme: "description"
166
+ }, "Offer Amount"), /*#__PURE__*/_react.default.createElement(_Themed.Text, {
167
+ theme: "h1",
168
+ color: Colors.text.success
169
+ }, cl, square_offer.amount.toFixed(2)))), /*#__PURE__*/_react.default.createElement(_Themed.View, {
170
+ type: "footer",
153
171
  style: {
154
172
  flexDirection: 'row',
155
173
  alignItems: 'center',
156
- borderBottomRightRadius: 10,
157
- borderBottomLeftRadius: 10
174
+ borderBottomRightRadius: 8,
175
+ borderBottomLeftRadius: 8,
176
+ padding: 10
158
177
  }
159
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
178
+ }, mine ? /*#__PURE__*/_react.default.createElement(_Themed.View, {
179
+ type: "row",
180
+ transparent: true,
160
181
  style: {
161
- flex: 1,
162
- maxWidth: 140
182
+ flex: 1
163
183
  }
164
- }, /*#__PURE__*/_react.default.createElement(_Components.Text, {
165
- size: 12,
166
- color: _colors.default.shades.white,
167
- weight: "semibold"
168
- }, "ACCEPT OFFER?"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
169
- size: 12,
170
- color: _colors.default.shades.white,
171
- weight: "regular"
172
- }, "Do you wish to sell your square for this offer?")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
184
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Button, {
185
+ type: "error",
186
+ loading: loading,
187
+ title: "WITHDRAW",
173
188
  style: {
174
- flexDirection: 'row',
175
- alignItems: 'center',
176
- paddingLeft: 10
189
+ flex: 1,
190
+ padding: 12,
191
+ opacity: loading ? 0.5 : 1
192
+ },
193
+ onPress: () => handleConfirmResponse('withdrawn')
194
+ })) : /*#__PURE__*/_react.default.createElement(_Themed.View, {
195
+ type: "row",
196
+ transparent: true,
197
+ style: {
198
+ flex: 1
177
199
  }
178
- }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
200
+ }, /*#__PURE__*/_react.default.createElement(_Themed.Button, {
179
201
  style: {
180
202
  flex: 1,
181
- borderRadius: 60,
182
- padding: 10,
183
- marginRight: 4,
184
- backgroundColor: _colors.default.shades.white
203
+ padding: 12,
204
+ opacity: loading ? 0.5 : 1
185
205
  },
186
- onPress: () => handleResponse('accepted')
187
- }, /*#__PURE__*/_react.default.createElement(_Components.Text, {
188
- size: 12,
189
- weight: "semibold",
190
- textAlign: "center",
191
- color: _colors.default.brand.midnight
192
- }, "Accept")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
206
+ type: "error",
207
+ loading: loading,
208
+ title: "DECLINE",
209
+ onPress: () => handleConfirmResponse('rejected')
210
+ }), /*#__PURE__*/_react.default.createElement(_Themed.Button, {
211
+ type: "success",
212
+ loading: loading,
213
+ title: "ACCEPT",
193
214
  style: {
194
215
  flex: 1,
195
- borderWidth: 1,
196
- borderColor: _colors.default.shades.white,
197
- borderRadius: 60,
198
- padding: 10,
199
- minWidth: 75,
200
- marginLeft: 4
216
+ padding: 12,
217
+ marginLeft: 5,
218
+ opacity: loading ? 0.5 : 1
201
219
  },
202
- onPress: () => handleResponse('rejected')
203
- }, /*#__PURE__*/_react.default.createElement(_Components.Text, {
204
- size: 12,
205
- weight: "semibold",
206
- textAlign: "center",
207
- color: _colors.default.shades.white
208
- }, "Decline"))))));
220
+ onPress: () => handleConfirmResponse('accepted')
221
+ }))));
209
222
  };
210
223
  var _default = exports.default = SquareOfferCard;
211
224
  //# sourceMappingURL=SquareOfferCard.js.map