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.
- package/lib/commonjs/Competition/components/CompetitionLeaderboard.js +22 -10
- package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -1
- package/lib/commonjs/Competition/components/WagerPickForm.js +2 -2
- package/lib/commonjs/Competition/components/WagerPickForm.js.map +1 -1
- package/lib/commonjs/Competition/index.js +91 -0
- package/lib/commonjs/Competition/index.js.map +1 -1
- package/lib/commonjs/CompetitionManager/api/index.js +19 -11
- package/lib/commonjs/CompetitionManager/api/index.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.js +5 -3
- package/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js +50 -4
- package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/ContestSelector.js +19 -4
- package/lib/commonjs/CompetitionManager/components/ContestSelector.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js +28 -2
- package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/MarketSelector.js +1 -3
- package/lib/commonjs/CompetitionManager/components/MarketSelector.js.map +1 -1
- package/lib/commonjs/CompetitionManager/index.js +14 -4
- package/lib/commonjs/CompetitionManager/index.js.map +1 -1
- package/lib/commonjs/CreateEngagement/index.js +1 -1
- package/lib/commonjs/CreateEngagement/index.js.map +1 -1
- package/lib/commonjs/Squares/components/BidForm.js +31 -31
- package/lib/commonjs/Squares/components/BidForm.js.map +1 -1
- package/lib/commonjs/Squares/components/OfferForm.js +53 -60
- package/lib/commonjs/Squares/components/OfferForm.js.map +1 -1
- package/lib/commonjs/Squares/components/SquareOfferCard.js +134 -121
- package/lib/commonjs/Squares/components/SquareOfferCard.js.map +1 -1
- package/lib/commonjs/Squares/components/SquareOffersCard.js +32 -6
- package/lib/commonjs/Squares/components/SquareOffersCard.js.map +1 -1
- package/lib/commonjs/Squares/components/SquaresBoard.js +16 -8
- package/lib/commonjs/Squares/components/SquaresBoard.js.map +1 -1
- package/lib/commonjs/Squares/index.js +65 -18
- package/lib/commonjs/Squares/index.js.map +1 -1
- package/lib/module/Competition/components/CompetitionLeaderboard.js +22 -10
- package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -1
- package/lib/module/Competition/components/WagerPickForm.js +2 -2
- package/lib/module/Competition/components/WagerPickForm.js.map +1 -1
- package/lib/module/Competition/index.js +91 -0
- package/lib/module/Competition/index.js.map +1 -1
- package/lib/module/CompetitionManager/api/index.js +19 -11
- package/lib/module/CompetitionManager/api/index.js.map +1 -1
- package/lib/module/CompetitionManager/components/CompetitionContestsForm.js +5 -3
- package/lib/module/CompetitionManager/components/CompetitionContestsForm.js.map +1 -1
- package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js +50 -4
- package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
- package/lib/module/CompetitionManager/components/ContestSelector.js +20 -5
- package/lib/module/CompetitionManager/components/ContestSelector.js.map +1 -1
- package/lib/module/CompetitionManager/components/ContestSettingsForm.js +28 -2
- package/lib/module/CompetitionManager/components/ContestSettingsForm.js.map +1 -1
- package/lib/module/CompetitionManager/components/MarketSelector.js +1 -3
- package/lib/module/CompetitionManager/components/MarketSelector.js.map +1 -1
- package/lib/module/CompetitionManager/index.js +14 -4
- package/lib/module/CompetitionManager/index.js.map +1 -1
- package/lib/module/CreateEngagement/index.js +1 -1
- package/lib/module/CreateEngagement/index.js.map +1 -1
- package/lib/module/Squares/components/BidForm.js +31 -31
- package/lib/module/Squares/components/BidForm.js.map +1 -1
- package/lib/module/Squares/components/OfferForm.js +54 -61
- package/lib/module/Squares/components/OfferForm.js.map +1 -1
- package/lib/module/Squares/components/SquareOfferCard.js +123 -109
- package/lib/module/Squares/components/SquareOfferCard.js.map +1 -1
- package/lib/module/Squares/components/SquareOffersCard.js +32 -6
- package/lib/module/Squares/components/SquareOffersCard.js.map +1 -1
- package/lib/module/Squares/components/SquaresBoard.js +16 -8
- package/lib/module/Squares/components/SquaresBoard.js.map +1 -1
- package/lib/module/Squares/index.js +65 -18
- package/lib/module/Squares/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/Competition/components/CompetitionLeaderboard.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Competition/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/api/index.d.ts +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/BidForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/OfferForm.d.ts +1 -2
- package/lib/typescript/lib/commonjs/Squares/components/OfferForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/SquareOfferCard.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Squares/components/SquareOfferCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/components/SquareOffersCard.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Squares/components/SquareOffersCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Squares/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/CompetitionLeaderboard.d.ts +2 -1
- package/lib/typescript/lib/module/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/api/index.d.ts +1 -1
- package/lib/typescript/lib/module/CompetitionManager/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionContestsForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/BidForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/OfferForm.d.ts +1 -2
- package/lib/typescript/lib/module/Squares/components/OfferForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/SquareOfferCard.d.ts +5 -3
- package/lib/typescript/lib/module/Squares/components/SquareOfferCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/components/SquareOffersCard.d.ts +2 -1
- package/lib/typescript/lib/module/Squares/components/SquareOffersCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Squares/index.d.ts.map +1 -1
- package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts +7 -2
- package/lib/typescript/src/Competition/components/CompetitionLeaderboard.d.ts.map +1 -1
- package/lib/typescript/src/Competition/index.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/api/index.d.ts +2 -2
- package/lib/typescript/src/CompetitionManager/api/index.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/ContestSelector.d.ts +4 -3
- package/lib/typescript/src/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/index.d.ts.map +1 -1
- package/lib/typescript/src/Squares/components/BidForm.d.ts.map +1 -1
- package/lib/typescript/src/Squares/components/OfferForm.d.ts +1 -1
- package/lib/typescript/src/Squares/components/OfferForm.d.ts.map +1 -1
- package/lib/typescript/src/Squares/components/SquareOfferCard.d.ts +3 -2
- package/lib/typescript/src/Squares/components/SquareOfferCard.d.ts.map +1 -1
- package/lib/typescript/src/Squares/components/SquareOffersCard.d.ts +3 -2
- package/lib/typescript/src/Squares/components/SquareOffersCard.d.ts.map +1 -1
- package/lib/typescript/src/Squares/components/SquaresBoard.d.ts.map +1 -1
- package/lib/typescript/src/Squares/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Competition/components/CompetitionLeaderboard.tsx +23 -7
- package/src/Competition/components/WagerPickForm.tsx +2 -2
- package/src/Competition/index.tsx +81 -2
- package/src/CompetitionManager/api/index.ts +14 -6
- package/src/CompetitionManager/components/CompetitionContestsForm.tsx +4 -4
- package/src/CompetitionManager/components/CompetitionSettingsForm.tsx +34 -1
- package/src/CompetitionManager/components/ContestSelector.tsx +25 -9
- package/src/CompetitionManager/components/ContestSettingsForm.tsx +19 -0
- package/src/CompetitionManager/components/MarketSelector.tsx +5 -7
- package/src/CompetitionManager/index.tsx +15 -7
- package/src/CreateEngagement/index.tsx +1 -1
- package/src/Squares/components/BidForm.tsx +23 -25
- package/src/Squares/components/OfferForm.tsx +40 -36
- package/src/Squares/components/SquareOfferCard.tsx +75 -45
- package/src/Squares/components/SquareOffersCard.tsx +13 -9
- package/src/Squares/components/SquaresBoard.tsx +14 -8
- 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,
|
|
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
|
-
|
|
70
|
-
|
|
71
|
-
padding:
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
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
|
-
|
|
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
|
|
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.
|
|
141
|
-
|
|
142
|
-
|
|
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
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
backgroundColor: submit_ready.is_ready ?
|
|
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
|
-
}
|
|
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
|
|
169
|
-
|
|
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:
|
|
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","
|
|
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;EAAEC,cAAc;EAAEC,mBAAmB;EAAEC,qBAAqB;EAAEC,mBAAmB;EAAEC,aAAa;EAAEC;AAA6B,CAAC,KAAK;EACzO,MAAMC,MAAM,GAAG,IAAAC,oBAAS,EAAC,CAAC;EAC1B,MAAMC,EAAE,GAAGb,WAAW,IAAI,WAAW,GAAG,GAAG,GAAG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AI;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
|
|
13
|
-
|
|
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(
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
71
|
+
float: true,
|
|
60
72
|
style: {
|
|
61
|
-
..._styles.view_styles.section,
|
|
62
73
|
minWidth: 250,
|
|
63
|
-
|
|
74
|
+
maxWidth: 275,
|
|
75
|
+
flexGrow: 1
|
|
64
76
|
}
|
|
65
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.View, {
|
|
78
|
+
type: "header",
|
|
66
79
|
style: {
|
|
67
|
-
|
|
68
|
-
|
|
80
|
+
flexDirection: 'row',
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
padding: 10,
|
|
83
|
+
borderTopRightRadius: 8,
|
|
84
|
+
borderTopLeftRadius: 8
|
|
69
85
|
}
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
71
|
-
|
|
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
|
-
|
|
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
|
-
|
|
98
|
+
height: 35,
|
|
99
|
+
width: 35,
|
|
100
|
+
borderRadius: 100
|
|
93
101
|
},
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
|
|
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
|
-
},
|
|
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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
borderBottomLeftRadius: 10
|
|
129
|
+
padding: 5,
|
|
130
|
+
borderBottomWidth: 1,
|
|
131
|
+
borderColor: Colors.borders.light
|
|
117
132
|
}
|
|
118
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
133
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Text, {
|
|
119
134
|
style: {
|
|
120
|
-
flex: 1
|
|
121
|
-
|
|
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(
|
|
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
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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(
|
|
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
|
-
|
|
147
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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:
|
|
157
|
-
borderBottomLeftRadius:
|
|
174
|
+
borderBottomRightRadius: 8,
|
|
175
|
+
borderBottomLeftRadius: 8,
|
|
176
|
+
padding: 10
|
|
158
177
|
}
|
|
159
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
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(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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(
|
|
200
|
+
}, /*#__PURE__*/_react.default.createElement(_Themed.Button, {
|
|
179
201
|
style: {
|
|
180
202
|
flex: 1,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
marginRight: 4,
|
|
184
|
-
backgroundColor: _colors.default.shades.white
|
|
203
|
+
padding: 12,
|
|
204
|
+
opacity: loading ? 0.5 : 1
|
|
185
205
|
},
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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: () =>
|
|
203
|
-
}
|
|
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
|