be-components 1.2.9 → 1.3.1
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/api/index.js +1 -1
- package/lib/commonjs/Competition/api/index.js.map +1 -1
- package/lib/commonjs/Competition/components/CompetitionPlay.js +1 -1
- package/lib/commonjs/Competition/components/CompetitionPlay.js.map +1 -1
- package/lib/commonjs/Competition/components/MarketsCard.js.map +1 -1
- package/lib/commonjs/Competition/index.js +1 -1
- package/lib/commonjs/Competition/index.js.map +1 -1
- package/lib/commonjs/CompetitionManager/api/index.js +153 -35
- package/lib/commonjs/CompetitionManager/api/index.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/AthleteSelector.js +170 -0
- package/lib/commonjs/CompetitionManager/components/AthleteSelector.js.map +1 -0
- package/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.js +495 -423
- package/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/CompetitionHeader.js +134 -0
- package/lib/commonjs/CompetitionManager/components/CompetitionHeader.js.map +1 -0
- package/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.js +96 -73
- package/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/CompetitionMatchMarketCard.js +147 -127
- package/lib/commonjs/CompetitionManager/components/CompetitionMatchMarketCard.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js +38 -127
- package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/ContestSelector.js +388 -0
- package/lib/commonjs/CompetitionManager/components/ContestSelector.js.map +1 -0
- package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js +436 -0
- package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js.map +1 -0
- package/lib/commonjs/CompetitionManager/components/MarketSelector.js +36 -26
- package/lib/commonjs/CompetitionManager/components/MarketSelector.js.map +1 -1
- package/lib/commonjs/CompetitionManager/index.js +477 -18
- package/lib/commonjs/CompetitionManager/index.js.map +1 -1
- package/lib/commonjs/Components/SearchBox.js +82 -0
- package/lib/commonjs/Components/SearchBox.js.map +1 -0
- package/lib/commonjs/Squares/components/Countdown.js +74 -0
- package/lib/commonjs/Squares/components/Countdown.js.map +1 -0
- package/lib/commonjs/Squares/components/SquaresBoard.js +95 -2
- package/lib/commonjs/Squares/components/SquaresBoard.js.map +1 -1
- package/lib/commonjs/Squares/index.js +1 -0
- package/lib/commonjs/Squares/index.js.map +1 -1
- package/lib/module/Competition/api/index.js +1 -1
- package/lib/module/Competition/api/index.js.map +1 -1
- package/lib/module/Competition/components/CompetitionPlay.js +1 -1
- package/lib/module/Competition/components/CompetitionPlay.js.map +1 -1
- package/lib/module/Competition/components/MarketsCard.js.map +1 -1
- package/lib/module/Competition/index.js +1 -1
- package/lib/module/Competition/index.js.map +1 -1
- package/lib/module/CompetitionManager/api/index.js +153 -35
- package/lib/module/CompetitionManager/api/index.js.map +1 -1
- package/lib/module/CompetitionManager/components/AthleteSelector.js +161 -0
- package/lib/module/CompetitionManager/components/AthleteSelector.js.map +1 -0
- package/lib/module/CompetitionManager/components/CompetitionContestsForm.js +493 -425
- package/lib/module/CompetitionManager/components/CompetitionContestsForm.js.map +1 -1
- package/lib/module/CompetitionManager/components/CompetitionHeader.js +127 -0
- package/lib/module/CompetitionManager/components/CompetitionHeader.js.map +1 -0
- package/lib/module/CompetitionManager/components/CompetitionInfoForm.js +99 -76
- package/lib/module/CompetitionManager/components/CompetitionInfoForm.js.map +1 -1
- package/lib/module/CompetitionManager/components/CompetitionMatchMarketCard.js +145 -127
- package/lib/module/CompetitionManager/components/CompetitionMatchMarketCard.js.map +1 -1
- package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js +39 -131
- package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
- package/lib/module/CompetitionManager/components/ContestSelector.js +379 -0
- package/lib/module/CompetitionManager/components/ContestSelector.js.map +1 -0
- package/lib/module/CompetitionManager/components/ContestSettingsForm.js +428 -0
- package/lib/module/CompetitionManager/components/ContestSettingsForm.js.map +1 -0
- package/lib/module/CompetitionManager/components/MarketSelector.js +34 -26
- package/lib/module/CompetitionManager/components/MarketSelector.js.map +1 -1
- package/lib/module/CompetitionManager/index.js +478 -19
- package/lib/module/CompetitionManager/index.js.map +1 -1
- package/lib/module/Components/SearchBox.js +73 -0
- package/lib/module/Components/SearchBox.js.map +1 -0
- package/lib/module/Squares/components/Countdown.js +65 -0
- package/lib/module/Squares/components/Countdown.js.map +1 -0
- package/lib/module/Squares/components/SquaresBoard.js +97 -4
- package/lib/module/Squares/components/SquaresBoard.js.map +1 -1
- package/lib/module/Squares/index.js +1 -0
- package/lib/module/Squares/index.js.map +1 -1
- package/lib/typescript/src/CompetitionManager/api/index.d.ts +32 -3
- package/lib/typescript/src/CompetitionManager/api/index.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/AthleteSelector.d.ts +18 -0
- package/lib/typescript/src/CompetitionManager/components/AthleteSelector.d.ts.map +1 -0
- package/lib/typescript/src/CompetitionManager/components/CompetitionContestsForm.d.ts +13 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionContestsForm.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionHeader.d.ts +20 -0
- package/lib/typescript/src/CompetitionManager/components/CompetitionHeader.d.ts.map +1 -0
- package/lib/typescript/src/CompetitionManager/components/CompetitionInfoForm.d.ts +2 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionInfoForm.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionMatchMarketCard.d.ts +1 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionMatchMarketCard.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionSettingsForm.d.ts +3 -3
- package/lib/typescript/src/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/ContestSelector.d.ts +16 -0
- package/lib/typescript/src/CompetitionManager/components/ContestSelector.d.ts.map +1 -0
- package/lib/typescript/src/CompetitionManager/components/ContestSettingsForm.d.ts +15 -0
- package/lib/typescript/src/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -0
- package/lib/typescript/src/CompetitionManager/components/MarketSelector.d.ts +3 -2
- package/lib/typescript/src/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/index.d.ts +1 -1
- package/lib/typescript/src/CompetitionManager/index.d.ts.map +1 -1
- package/lib/typescript/src/Components/SearchBox.d.ts +10 -0
- package/lib/typescript/src/Components/SearchBox.d.ts.map +1 -0
- package/lib/typescript/src/Squares/components/Countdown.d.ts +10 -0
- package/lib/typescript/src/Squares/components/Countdown.d.ts.map +1 -0
- package/lib/typescript/src/Squares/components/SquaresBoard.d.ts +2 -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 +2 -1
- package/src/Competition/api/index.ts +3 -3
- package/src/Competition/components/CompetitionPlay.tsx +1 -1
- package/src/Competition/components/MarketsCard.tsx +2 -2
- package/src/Competition/index.tsx +1 -1
- package/src/CompetitionManager/api/index.ts +71 -13
- package/src/CompetitionManager/components/AthleteSelector.tsx +127 -0
- package/src/CompetitionManager/components/CompetitionContestsForm.tsx +156 -261
- package/src/CompetitionManager/components/CompetitionHeader.tsx +101 -0
- package/src/CompetitionManager/components/CompetitionInfoForm.tsx +57 -45
- package/src/CompetitionManager/components/CompetitionMatchMarketCard.tsx +29 -70
- package/src/CompetitionManager/components/CompetitionSettingsForm.tsx +36 -103
- package/src/CompetitionManager/components/ContestSelector.tsx +269 -0
- package/src/CompetitionManager/components/ContestSettingsForm.tsx +281 -0
- package/src/CompetitionManager/components/MarketSelector.tsx +34 -23
- package/src/CompetitionManager/index.tsx +399 -15
- package/src/Components/SearchBox.tsx +54 -0
- package/src/Squares/components/Countdown.tsx +52 -0
- package/src/Squares/components/SquaresBoard.tsx +57 -5
- package/src/Squares/index.tsx +1 -0
- package/src/types.d.ts +38 -4
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _api = require("../api");
|
|
10
|
+
var _colors = _interopRequireDefault(require("../../constants/colors"));
|
|
11
|
+
var _Components = require("../../Components");
|
|
12
|
+
var _momentMini = _interopRequireDefault(require("moment-mini"));
|
|
13
|
+
var _styles = require("../../constants/styles");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
const length_types = ['event'];
|
|
18
|
+
const ContestSettingsForm = ({
|
|
19
|
+
is_valid,
|
|
20
|
+
width,
|
|
21
|
+
competition,
|
|
22
|
+
competition_matches,
|
|
23
|
+
competition_match_markets,
|
|
24
|
+
competition_types,
|
|
25
|
+
events,
|
|
26
|
+
onCompetitionUpdate
|
|
27
|
+
}) => {
|
|
28
|
+
const [expanded, setExpanded] = (0, _react.useState)(false);
|
|
29
|
+
const [draft_competition, setDraftCompetition] = (0, _react.useState)(undefined);
|
|
30
|
+
const competition_type = competition_types.find(ct => ct.competition_type_id == competition?.competition_type_id);
|
|
31
|
+
const start_time_options = _api.ManageCompetitionHelpers.getStartTimeOptions(competition, competition_matches, competition_match_markets, events);
|
|
32
|
+
(0, _react.useEffect)(() => {
|
|
33
|
+
setDraftCompetition(competition);
|
|
34
|
+
}, [competition]);
|
|
35
|
+
const renderCompetitionTypes = data => {
|
|
36
|
+
if (!draft_competition) {
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
38
|
+
}
|
|
39
|
+
const selected = data.item.competition_type_id == competition.competition_type_id ? true : false;
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
41
|
+
style: {
|
|
42
|
+
minWidth: 75,
|
|
43
|
+
margin: 1,
|
|
44
|
+
borderRadius: 8,
|
|
45
|
+
padding: 10,
|
|
46
|
+
backgroundColor: selected ? _colors.default.brand.midnight : undefined
|
|
47
|
+
},
|
|
48
|
+
onPress: () => onCompetitionUpdate({
|
|
49
|
+
...draft_competition,
|
|
50
|
+
competition_type_id: data.item.competition_type_id
|
|
51
|
+
})
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
53
|
+
textAlign: "center",
|
|
54
|
+
color: selected ? _colors.default.shades.white : _colors.default.brand.midnight,
|
|
55
|
+
weight: selected ? 'bold' : 'regular',
|
|
56
|
+
size: 14
|
|
57
|
+
}, data.item.type_label));
|
|
58
|
+
};
|
|
59
|
+
const renderLengthTypes = data => {
|
|
60
|
+
if (!draft_competition) {
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
62
|
+
}
|
|
63
|
+
const selected = data.item == competition?.length_type ? true : false;
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
65
|
+
style: {
|
|
66
|
+
minWidth: 75,
|
|
67
|
+
margin: 1,
|
|
68
|
+
borderRadius: 8,
|
|
69
|
+
padding: 10,
|
|
70
|
+
backgroundColor: selected ? _colors.default.brand.midnight : undefined
|
|
71
|
+
},
|
|
72
|
+
onPress: () => onCompetitionUpdate({
|
|
73
|
+
...draft_competition,
|
|
74
|
+
length_type: data.item
|
|
75
|
+
})
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
77
|
+
textAlign: "center",
|
|
78
|
+
color: selected ? _colors.default.shades.white : _colors.default.brand.midnight,
|
|
79
|
+
weight: selected ? 'bold' : 'regular',
|
|
80
|
+
size: 14
|
|
81
|
+
}, data.item.toUpperCase()));
|
|
82
|
+
};
|
|
83
|
+
const renderStartTimeOptions = data => {
|
|
84
|
+
if (!draft_competition) {
|
|
85
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
86
|
+
}
|
|
87
|
+
const selected = competition?.scheduled_datetime == data.item.start_time ? true : false;
|
|
88
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
89
|
+
style: {
|
|
90
|
+
flexDirection: 'row',
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
padding: 10
|
|
93
|
+
},
|
|
94
|
+
onPress: () => onCompetitionUpdate({
|
|
95
|
+
...draft_competition,
|
|
96
|
+
scheduled_datetime: data.item.start_time
|
|
97
|
+
})
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
99
|
+
style: {
|
|
100
|
+
height: 25,
|
|
101
|
+
width: 25,
|
|
102
|
+
borderRadius: 100,
|
|
103
|
+
borderWidth: 1,
|
|
104
|
+
borderColor: _colors.default.brand.midnight,
|
|
105
|
+
justifyContent: 'center',
|
|
106
|
+
alignItems: 'center'
|
|
107
|
+
}
|
|
108
|
+
}, selected ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
109
|
+
style: {
|
|
110
|
+
height: 15,
|
|
111
|
+
width: 15,
|
|
112
|
+
borderRadius: 100,
|
|
113
|
+
backgroundColor: _colors.default.brand.midnight
|
|
114
|
+
}
|
|
115
|
+
}) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
116
|
+
style: {
|
|
117
|
+
flex: 1,
|
|
118
|
+
marginLeft: 10
|
|
119
|
+
}
|
|
120
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
121
|
+
weight: "bold",
|
|
122
|
+
size: 14,
|
|
123
|
+
color: _colors.default.brand.midnight
|
|
124
|
+
}, data.item.label), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
125
|
+
weight: "semibold",
|
|
126
|
+
style: {
|
|
127
|
+
marginTop: 4
|
|
128
|
+
},
|
|
129
|
+
size: 14,
|
|
130
|
+
color: _colors.default.brand.slate
|
|
131
|
+
}, (0, _momentMini.default)(data.item.start_time).format('MMM DD YYYY hh:mm a'))));
|
|
132
|
+
};
|
|
133
|
+
if (!competition || !draft_competition) {
|
|
134
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
135
|
+
}
|
|
136
|
+
const is_changed = JSON.stringify({
|
|
137
|
+
max_pick_count: competition.max_pick_count,
|
|
138
|
+
initial_balance: competition.initial_balance
|
|
139
|
+
}) != JSON.stringify({
|
|
140
|
+
max_pick_count: draft_competition.max_pick_count,
|
|
141
|
+
initial_balance: draft_competition.initial_balance
|
|
142
|
+
}) ? true : false;
|
|
143
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
144
|
+
style: {
|
|
145
|
+
..._styles.view_styles.section,
|
|
146
|
+
minWidth: 350,
|
|
147
|
+
maxWidth: width,
|
|
148
|
+
flexGrow: 1
|
|
149
|
+
}
|
|
150
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
151
|
+
style: {
|
|
152
|
+
..._styles.view_styles.section_header,
|
|
153
|
+
maxWidth: width
|
|
154
|
+
},
|
|
155
|
+
onPress: () => setExpanded(!expanded)
|
|
156
|
+
}, is_valid ? /*#__PURE__*/_react.default.createElement(_Components.Icons.CheckCirlceIcon, {
|
|
157
|
+
size: 16,
|
|
158
|
+
color: _colors.default.utility.success
|
|
159
|
+
}) : /*#__PURE__*/_react.default.createElement(_Components.Icons.AlertIcon, {
|
|
160
|
+
size: 16,
|
|
161
|
+
color: _colors.default.utility.warning
|
|
162
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
163
|
+
style: {
|
|
164
|
+
flex: 1,
|
|
165
|
+
marginLeft: 10,
|
|
166
|
+
marginRight: 10
|
|
167
|
+
}
|
|
168
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
169
|
+
theme: "header"
|
|
170
|
+
}, "Contest Settings"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
171
|
+
style: {
|
|
172
|
+
marginTop: 3
|
|
173
|
+
},
|
|
174
|
+
theme: "body"
|
|
175
|
+
}, "Manage the settings of how user will interact with the added contests")), is_changed ? /*#__PURE__*/_react.default.createElement(_Components.Button, {
|
|
176
|
+
title: "SAVE",
|
|
177
|
+
padding: 10,
|
|
178
|
+
title_color: _colors.default.shades.white,
|
|
179
|
+
backgroundColor: _colors.default.utility.success,
|
|
180
|
+
onPress: () => onCompetitionUpdate(draft_competition)
|
|
181
|
+
}) : /*#__PURE__*/_react.default.createElement(_Components.Icons.ChevronIcon, {
|
|
182
|
+
direction: expanded ? 'up' : 'down',
|
|
183
|
+
color: _colors.default.brand.midnight,
|
|
184
|
+
size: 8
|
|
185
|
+
})), expanded ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
186
|
+
style: {
|
|
187
|
+
..._styles.view_styles.section_body,
|
|
188
|
+
padding: 10,
|
|
189
|
+
backgroundColor: _colors.default.shades.shade100
|
|
190
|
+
}
|
|
191
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
192
|
+
nativeID: "competition_type",
|
|
193
|
+
style: {
|
|
194
|
+
..._styles.view_styles.body_row,
|
|
195
|
+
flexWrap: 'wrap',
|
|
196
|
+
maxWidth: width,
|
|
197
|
+
borderBottomWidth: 1,
|
|
198
|
+
borderColor: _colors.default.shades.shade600
|
|
199
|
+
}
|
|
200
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
201
|
+
style: {
|
|
202
|
+
flex: 1
|
|
203
|
+
}
|
|
204
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
205
|
+
theme: "header_2"
|
|
206
|
+
}, "Competition Type"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
207
|
+
style: {
|
|
208
|
+
marginTop: 3
|
|
209
|
+
},
|
|
210
|
+
theme: "body"
|
|
211
|
+
}, competition_type ? competition_type.description : 'Choose the type of competition this is.')), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
212
|
+
style: {
|
|
213
|
+
margin: 5,
|
|
214
|
+
borderRadius: 8,
|
|
215
|
+
backgroundColor: _colors.default.shades.white
|
|
216
|
+
}
|
|
217
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
218
|
+
data: competition_types,
|
|
219
|
+
renderItem: renderCompetitionTypes,
|
|
220
|
+
keyExtractor: item => item.competition_type_id.toString(),
|
|
221
|
+
horizontal: true
|
|
222
|
+
}))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
223
|
+
style: {
|
|
224
|
+
..._styles.view_styles.body_row,
|
|
225
|
+
flexWrap: 'wrap',
|
|
226
|
+
maxWidth: width,
|
|
227
|
+
marginTop: 10,
|
|
228
|
+
borderBottomWidth: 1,
|
|
229
|
+
borderColor: _colors.default.shades.shade600
|
|
230
|
+
}
|
|
231
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
232
|
+
style: {
|
|
233
|
+
flex: 1
|
|
234
|
+
}
|
|
235
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
236
|
+
theme: "header_2"
|
|
237
|
+
}, "Length Type"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
238
|
+
style: {
|
|
239
|
+
marginTop: 3
|
|
240
|
+
}
|
|
241
|
+
}, "Choose how long this competition will remain open.")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
242
|
+
style: {
|
|
243
|
+
borderRadius: 8,
|
|
244
|
+
backgroundColor: _colors.default.shades.white
|
|
245
|
+
}
|
|
246
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
247
|
+
data: length_types,
|
|
248
|
+
renderItem: renderLengthTypes,
|
|
249
|
+
keyExtractor: item => item,
|
|
250
|
+
horizontal: true
|
|
251
|
+
}))), competition_type?.type == 'pick' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
252
|
+
style: {
|
|
253
|
+
..._styles.view_styles.body_row,
|
|
254
|
+
maxWidth: width,
|
|
255
|
+
marginTop: 10,
|
|
256
|
+
borderBottomWidth: 1,
|
|
257
|
+
borderColor: _colors.default.shades.shade600
|
|
258
|
+
}
|
|
259
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
260
|
+
style: {
|
|
261
|
+
flex: 1
|
|
262
|
+
}
|
|
263
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
264
|
+
theme: "header_2"
|
|
265
|
+
}, "Max Picks"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
266
|
+
style: {
|
|
267
|
+
marginTop: 3
|
|
268
|
+
}
|
|
269
|
+
}, "The total number of picks allowed by each participant.")), /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
|
|
270
|
+
style: {
|
|
271
|
+
..._styles.view_styles.input,
|
|
272
|
+
width: 75,
|
|
273
|
+
textAlign: 'center'
|
|
274
|
+
},
|
|
275
|
+
onChangeText: text => setDraftCompetition({
|
|
276
|
+
...draft_competition,
|
|
277
|
+
max_pick_count: text
|
|
278
|
+
}),
|
|
279
|
+
placeholder: "0",
|
|
280
|
+
value: draft_competition.max_pick_count,
|
|
281
|
+
placeholderTextColor: _colors.default.brand.slate
|
|
282
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), competition_type?.type == 'wager' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
283
|
+
style: {
|
|
284
|
+
..._styles.view_styles.body_row,
|
|
285
|
+
maxWidth: width,
|
|
286
|
+
borderBottomWidth: 1,
|
|
287
|
+
marginTop: 10,
|
|
288
|
+
borderColor: _colors.default.shades.shade600
|
|
289
|
+
}
|
|
290
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
291
|
+
style: {
|
|
292
|
+
flex: 1
|
|
293
|
+
}
|
|
294
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
295
|
+
theme: "header_2"
|
|
296
|
+
}, "Initial Balance"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
297
|
+
style: {
|
|
298
|
+
marginTop: 3
|
|
299
|
+
}
|
|
300
|
+
}, "Initial balance that each player will start with at the beginning of the competition.")), /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
|
|
301
|
+
style: {
|
|
302
|
+
..._styles.view_styles.input,
|
|
303
|
+
width: 75,
|
|
304
|
+
textAlign: 'center'
|
|
305
|
+
},
|
|
306
|
+
onChangeText: text => setDraftCompetition({
|
|
307
|
+
...draft_competition,
|
|
308
|
+
initial_balance: text
|
|
309
|
+
}),
|
|
310
|
+
placeholder: "0",
|
|
311
|
+
value: draft_competition.initial_balance,
|
|
312
|
+
placeholderTextColor: _colors.default.brand.slate
|
|
313
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
314
|
+
style: {
|
|
315
|
+
..._styles.view_styles.body_row,
|
|
316
|
+
marginTop: 10
|
|
317
|
+
}
|
|
318
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
319
|
+
style: {
|
|
320
|
+
flex: 1
|
|
321
|
+
}
|
|
322
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
323
|
+
theme: "header_2"
|
|
324
|
+
}, "Start Time Options"), /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
325
|
+
style: {
|
|
326
|
+
marginTop: 3
|
|
327
|
+
}
|
|
328
|
+
}, "When should this competition stop allowing entrants."))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
329
|
+
style: {
|
|
330
|
+
padding: 10,
|
|
331
|
+
backgroundColor: _colors.default.shades.shade100,
|
|
332
|
+
borderRadius: 4
|
|
333
|
+
}
|
|
334
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
335
|
+
data: start_time_options,
|
|
336
|
+
renderItem: renderStartTimeOptions,
|
|
337
|
+
keyExtractor: item => item.start_time
|
|
338
|
+
})))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null));
|
|
339
|
+
};
|
|
340
|
+
var _default = exports.default = ContestSettingsForm;
|
|
341
|
+
/*
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
<View style={{ flexDirection:'row', flexWrap:'wrap', padding:10 }}>
|
|
345
|
+
<View nativeID="contest_settings" style={{ flex:1, minWidth:300, padding:10, borderRadius:8, margin:5, backgroundColor:Colors.shades.white }}>
|
|
346
|
+
<View nativeID="header_row" style={{ flexDirection:'row', alignItems:'center', padding:5, borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }}>
|
|
347
|
+
<Text style={{ flex:1, marginRight:10 }} size={22} color={Colors.brand.slate} weight='bold'>Competition Info</Text>
|
|
348
|
+
</View>
|
|
349
|
+
<View nativeID="competition_type" style={{ flexDirection:'row', flexWrap:'wrap', padding:10, borderBottomWidth:1, borderBottomColor:Colors.shades.white }}>
|
|
350
|
+
<View style={{ flex:1, marginRight:5 }}>
|
|
351
|
+
<Text size={16} color={Colors.brand.midnight} weight='bold'>Length Type</Text>
|
|
352
|
+
<Text size={14} color={Colors.brand.midnight} weight='regular'>Choose how long this competition will remain open.</Text>
|
|
353
|
+
</View>
|
|
354
|
+
|
|
355
|
+
</View>
|
|
356
|
+
{competition_type?.type == 'pick' ?
|
|
357
|
+
<View nativeID="max_picks" style={{ flexDirection:'row', flexWrap:'wrap', padding:10, borderBottomWidth:1, borderBottomColor:Colors.shades.white }}>
|
|
358
|
+
<View style={{ flex:1, marginRight:5 }}>
|
|
359
|
+
<Text size={16} color={Colors.brand.midnight} weight='bold'>Max Picks</Text>
|
|
360
|
+
<Text size={14} color={Colors.brand.midnight} weight='regular'>Maximum number of picks that will be allowed for each player in the competition</Text>
|
|
361
|
+
</View>
|
|
362
|
+
<TextInput
|
|
363
|
+
style={{ padding:10, borderRadius:8, backgroundColor:Colors.shades.white }}
|
|
364
|
+
onChangeText={(text) => onCompetitionUpdate({ ...competition, max_pick_count: text })}
|
|
365
|
+
placeholder="0"
|
|
366
|
+
value={competition.max_pick_count}
|
|
367
|
+
placeholderTextColor={Colors.brand.slate}
|
|
368
|
+
/>
|
|
369
|
+
</View>
|
|
370
|
+
:<></>}
|
|
371
|
+
{competition_type?.type == 'wager' ?
|
|
372
|
+
<View nativeID="wager_balance" style={{ flexDirection:'row', flexWrap:'wrap', padding:10, borderBottomWidth:1, borderBottomColor:Colors.shades.white }}>
|
|
373
|
+
<View style={{ flex:1, marginRight:5 }}>
|
|
374
|
+
<Text size={16} color={Colors.brand.midnight} weight='bold'>Initial Balance</Text>
|
|
375
|
+
<Text size={14} color={Colors.brand.midnight} weight='regular'>Initial balance that each player will start with at the beginning of the competition.</Text>
|
|
376
|
+
</View>
|
|
377
|
+
<TextInput
|
|
378
|
+
style={{ padding:10, borderRadius:8, backgroundColor:Colors.shades.white }}
|
|
379
|
+
onChangeText={(text) => onCompetitionUpdate({ ...competition, initial_balance: text })}
|
|
380
|
+
placeholder="1000"
|
|
381
|
+
value={competition.initial_balance}
|
|
382
|
+
placeholderTextColor={Colors.brand.slate}
|
|
383
|
+
/>
|
|
384
|
+
</View>
|
|
385
|
+
:<></>}
|
|
386
|
+
|
|
387
|
+
</View>
|
|
388
|
+
</View>
|
|
389
|
+
<View style={{ flexDirection:'row', flexWrap:'wrap', padding:10, paddingTop:0 }}>
|
|
390
|
+
<View nativeID="contest_settings" style={{ flex:1, minWidth:300, padding:10, borderRadius:8, margin:5, backgroundColor:Colors.shades.white }}>
|
|
391
|
+
<View nativeID="header_row" style={{ flexDirection:'row', alignItems:'center', padding:5, borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }}>
|
|
392
|
+
<Text style={{ flex:1, marginRight:10 }} size={22} color={Colors.brand.slate} weight='bold'>Competition Start</Text>
|
|
393
|
+
</View>
|
|
394
|
+
<View nativeID="max_picks" style={{ padding:10, borderBottomWidth:1, borderBottomColor:Colors.shades.white }}>
|
|
395
|
+
<View nativeID="descriptor">
|
|
396
|
+
<Text size={16} color={Colors.brand.midnight} weight='bold'>Start Time</Text>
|
|
397
|
+
<Text size={14} color={Colors.brand.midnight} weight='regular'>The time when tickets can no longer be purchased</Text>
|
|
398
|
+
</View>
|
|
399
|
+
<View style={{ padding:10 }}>
|
|
400
|
+
<FlatList
|
|
401
|
+
data={start_time_options}
|
|
402
|
+
renderItem={renderStartTimeOptions}
|
|
403
|
+
keyExtractor={(item) => item.start_time}
|
|
404
|
+
/>
|
|
405
|
+
</View>
|
|
406
|
+
</View>
|
|
407
|
+
</View>
|
|
408
|
+
</View>
|
|
409
|
+
{competition.length_type == 'time' ?
|
|
410
|
+
<View style={{ flexDirection:'row', flexWrap:'wrap', padding:10 }}>
|
|
411
|
+
<View nativeID="contest_settings" style={{ flex:1, minWidth:300, padding:10, borderRadius:4, marginRight:5, ...styles.float }}>
|
|
412
|
+
<View nativeID="header_row" style={{ flexDirection:'row', alignItems:'center', padding:5, borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }}>
|
|
413
|
+
<Text style={{ flex:1, marginRight:10 }} size={22} color={Colors.brand.slate} weight='bold'>Competition End Time</Text>
|
|
414
|
+
</View>
|
|
415
|
+
<View nativeID="max_picks" style={{ padding:10, borderBottomWidth:1, borderBottomColor:Colors.shades.white }}>
|
|
416
|
+
<View nativeID="descriptor">
|
|
417
|
+
<Text size={16} color={Colors.brand.midnight} weight='bold'>End Time</Text>
|
|
418
|
+
<Text size={14} color={Colors.brand.midnight} weight='regular'>When will this competition end?</Text>
|
|
419
|
+
</View>
|
|
420
|
+
<View style={{ padding:10 }}>
|
|
421
|
+
<DateTimePicker
|
|
422
|
+
value={competition?.end_datetime}
|
|
423
|
+
onChange={(value:any) => {
|
|
424
|
+
onCompetitionUpdate({ ...competition, end_datetime: value })
|
|
425
|
+
}}
|
|
426
|
+
|
|
427
|
+
/>
|
|
428
|
+
</View>
|
|
429
|
+
</View>
|
|
430
|
+
</View>
|
|
431
|
+
</View>
|
|
432
|
+
:<></>}
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
*/
|
|
436
|
+
//# sourceMappingURL=ContestSettingsForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_api","_colors","_interopRequireDefault","_Components","_momentMini","_styles","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","length_types","ContestSettingsForm","is_valid","width","competition","competition_matches","competition_match_markets","competition_types","events","onCompetitionUpdate","expanded","setExpanded","useState","draft_competition","setDraftCompetition","undefined","competition_type","find","ct","competition_type_id","start_time_options","ManageCompetitionHelpers","getStartTimeOptions","useEffect","renderCompetitionTypes","data","createElement","Fragment","selected","item","TouchableOpacity","style","minWidth","margin","borderRadius","padding","backgroundColor","Colors","brand","midnight","onPress","Text","textAlign","color","shades","white","weight","size","type_label","renderLengthTypes","length_type","toUpperCase","renderStartTimeOptions","scheduled_datetime","start_time","flexDirection","alignItems","View","height","borderWidth","borderColor","justifyContent","flex","marginLeft","label","marginTop","slate","moment","format","is_changed","JSON","stringify","max_pick_count","initial_balance","view_styles","section","maxWidth","flexGrow","section_header","Icons","CheckCirlceIcon","utility","success","AlertIcon","warning","marginRight","theme","Button","title","title_color","ChevronIcon","direction","section_body","shade100","nativeID","body_row","flexWrap","borderBottomWidth","shade600","description","FlatList","renderItem","keyExtractor","toString","horizontal","type","TextInput","input","onChangeText","text","placeholder","value","placeholderTextColor","_default","exports"],"sourceRoot":"../../../../src","sources":["CompetitionManager/components/ContestSettingsForm.tsx"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAGA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAqD,SAAAK,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,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AAY,EAAC;IAAE;EAAE,gBAChF/D,MAAA,CAAAU,OAAA,CAAA6C,aAAA,CAACzD,YAAA,CAAAmI,QAAQ;IACL3E,IAAI,EAAEL,kBAAmB;IACzBiF,UAAU,EAAEjD,sBAAuB;IACnCkD,YAAY,EAAGzE,IAAI,IAAKA,IAAI,CAACyB;EAAW,CAC3C,CACC,CACJ,CACJ,CAAC,gBACNnF,MAAA,CAAAU,OAAA,CAAA6C,aAAA,CAAAvD,MAAA,CAAAU,OAAA,CAAA8C,QAAA,MAAI,CACH,CAAC;AAEf,CAAC;AAAA,IAAAsF,QAAA,GAAAC,OAAA,CAAArI,OAAA,GAEcoB,mBAAmB;AAKlC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -4,26 +4,31 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _Components = require("../../Components");
|
|
10
10
|
var _colors = _interopRequireDefault(require("../../constants/colors"));
|
|
11
11
|
var _styles = require("../../constants/styles");
|
|
12
|
+
var _SearchBox = _interopRequireDefault(require("../../Components/SearchBox"));
|
|
12
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
16
|
const MarketSelector = ({
|
|
14
|
-
|
|
17
|
+
width,
|
|
18
|
+
height,
|
|
15
19
|
markets,
|
|
16
20
|
selected_markets,
|
|
17
21
|
onSelectMarket,
|
|
18
22
|
onDeselectMarket,
|
|
19
23
|
onClose
|
|
20
24
|
}) => {
|
|
25
|
+
const [search_value, setSearchValue] = (0, _react.useState)('');
|
|
26
|
+
const filtered_markets = markets.filter(m => `${m.type} ${m.description}`.toLowerCase().includes(search_value.toLowerCase()));
|
|
21
27
|
const renderMarkets = data => {
|
|
22
28
|
const selected = selected_markets.includes(data.item.market_id) ? true : false;
|
|
23
29
|
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
24
30
|
style: {
|
|
25
|
-
|
|
26
|
-
alignItems: 'center',
|
|
31
|
+
..._styles.view_styles.body_row,
|
|
27
32
|
padding: 10,
|
|
28
33
|
borderBottomWidth: 1,
|
|
29
34
|
borderColor: _colors.default.shades.shade600
|
|
@@ -56,43 +61,48 @@ const MarketSelector = ({
|
|
|
56
61
|
}
|
|
57
62
|
}));
|
|
58
63
|
};
|
|
59
|
-
if (!visible) {
|
|
60
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
61
|
-
}
|
|
62
64
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
63
65
|
style: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
backgroundColor: _colors.default.shades.white,
|
|
68
|
-
..._styles.view_styles.float
|
|
66
|
+
width,
|
|
67
|
+
height,
|
|
68
|
+
backgroundColor: _colors.default.shades.white
|
|
69
69
|
}
|
|
70
70
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
71
71
|
style: {
|
|
72
|
-
|
|
72
|
+
..._styles.view_styles.section_header
|
|
73
73
|
}
|
|
74
74
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
75
75
|
style: {
|
|
76
76
|
flex: 1
|
|
77
77
|
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
alignSelf: 'flex-end'
|
|
82
|
-
},
|
|
83
|
-
backgroundColor: _colors.default.brand.electric,
|
|
84
|
-
padding: 10,
|
|
85
|
-
title_color: _colors.default.shades.white,
|
|
86
|
-
borderRadius: 8,
|
|
87
|
-
onPress: () => onClose()
|
|
88
|
-
})), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
78
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Text, {
|
|
79
|
+
theme: "header"
|
|
80
|
+
}, "MANAGE MARKETS"))), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
89
81
|
style: {
|
|
90
82
|
flex: 1
|
|
91
83
|
}
|
|
92
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.
|
|
93
|
-
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
85
|
+
style: {
|
|
86
|
+
..._styles.view_styles.section_body
|
|
87
|
+
}
|
|
88
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
89
|
+
style: {
|
|
90
|
+
marginTop: 0
|
|
91
|
+
}
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(_SearchBox.default, {
|
|
93
|
+
onChange: text => setSearchValue(text),
|
|
94
|
+
hide_search_button: true
|
|
95
|
+
})), /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
96
|
+
data: filtered_markets,
|
|
94
97
|
renderItem: renderMarkets,
|
|
95
98
|
keyExtractor: item => item.market_id.toString()
|
|
99
|
+
}))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
100
|
+
style: {
|
|
101
|
+
..._styles.view_styles.section_footer
|
|
102
|
+
}
|
|
103
|
+
}, /*#__PURE__*/_react.default.createElement(_Components.Button, {
|
|
104
|
+
title: "CLOSE",
|
|
105
|
+
onPress: () => onClose()
|
|
96
106
|
})));
|
|
97
107
|
};
|
|
98
108
|
var _default = exports.default = MarketSelector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_Components","_colors","_interopRequireDefault","_styles","_SearchBox","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","MarketSelector","width","height","markets","selected_markets","onSelectMarket","onDeselectMarket","onClose","search_value","setSearchValue","useState","filtered_markets","filter","m","type","description","toLowerCase","includes","renderMarkets","data","selected","item","market_id","createElement","TouchableOpacity","style","view_styles","body_row","padding","borderBottomWidth","borderColor","Colors","shades","shade600","onPress","View","flex","marginRight","Text","size","color","brand","midnight","weight","stat_label","marginTop","Switch","switch_type","value","onChange","backgroundColor","white","section_header","theme","ScrollView","section_body","text","hide_search_button","FlatList","renderItem","keyExtractor","toString","section_footer","Button","title","_default","exports"],"sourceRoot":"../../../../src","sources":["CompetitionManager/components/MarketSelector.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,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