@momo-kits/auto-complete 0.0.66-alpha.14 → 0.0.66-alpha.16

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 (2) hide show
  1. package/AutoComplete.js +345 -342
  2. package/package.json +15 -15
package/AutoComplete.js CHANGED
@@ -1,392 +1,395 @@
1
1
  /* eslint-disable no-extra-boolean-cast */
2
2
  /* eslint-disable no-param-reassign */
3
- import React, {Component} from 'react';
3
+ import React, { Component } from 'react';
4
4
  import {
5
- findNodeHandle,
6
- StyleSheet,
7
- UIManager,
8
- View,
9
- Platform,
5
+ findNodeHandle,
6
+ StyleSheet,
7
+ UIManager,
8
+ View,
9
+ Platform,
10
10
  } from 'react-native';
11
- import {debounce, get} from 'lodash';
11
+ import { debounce, get } from 'lodash';
12
12
  import PropTypes from 'prop-types';
13
13
  import {
14
- ValueUtil,
15
- NumberUtils,
16
- Colors,
17
- Text,
18
- RNGestureHandler,
14
+ ValueUtil,
15
+ NumberUtils,
16
+ Colors,
17
+ Text,
18
+ RNGestureHandler,
19
19
  } from '@momo-kits/core';
20
20
 
21
- const {TouchableOpacity} = RNGestureHandler;
21
+ const { TouchableOpacity } = RNGestureHandler;
22
22
  export default class AutoComplete extends Component {
23
- constructor(props) {
24
- super(props);
25
- this.hashmapRefs = {};
26
- this.hashmapPosition = {};
27
- this.hashmapInputValue = {};
28
- this.selectedItem = null;
29
- this.childrenWithProps = null;
30
- }
23
+ constructor(props) {
24
+ super(props);
25
+ this.hashmapRefs = {};
26
+ this.hashmapPosition = {};
27
+ this.hashmapInputValue = {};
28
+ this.selectedItem = null;
29
+ this.childrenWithProps = null;
30
+ }
31
31
 
32
- /**
33
- * func measure all component have keyAutoComplete to get it's position
34
- */
35
- measure() {
36
- try {
37
- Object.keys(this.hashmapRefs)?.forEach(key => {
38
- const node = findNodeHandle(this.hashmapRefs[key]);
39
- if (node) {
40
- if (Platform.OS === 'android') {
41
- UIManager.measureLayoutRelativeToParent(
42
- node,
43
- e => {
44
- console.error(e);
45
- },
46
- (x, y, width, height) => {
47
- this.hashmapPosition[key] = {
48
- x,
49
- y: y + height,
50
- width,
51
- };
52
- },
53
- );
54
- } else {
55
- UIManager.measure(node, (x, y, width, height) => {
56
- this.hashmapPosition[key] = {
57
- x,
58
- y: y + height,
59
- width,
60
- };
32
+ /**
33
+ * func measure all component have keyAutoComplete to get it's position
34
+ */
35
+ measure() {
36
+ try {
37
+ Object.keys(this.hashmapRefs)?.forEach((key) => {
38
+ const node = findNodeHandle(this.hashmapRefs[key]);
39
+ if (node) {
40
+ if (Platform.OS === 'android') {
41
+ UIManager.measureLayoutRelativeToParent(
42
+ node,
43
+ (e) => {
44
+ console.error(e);
45
+ },
46
+ (x, y, width, height) => {
47
+ this.hashmapPosition[key] = {
48
+ x,
49
+ y: y + height,
50
+ width,
51
+ };
52
+ },
53
+ );
54
+ } else {
55
+ UIManager.measure(node, (x, y, width, height) => {
56
+ this.hashmapPosition[key] = {
57
+ x,
58
+ y: y + height,
59
+ width,
60
+ };
61
+ });
62
+ }
63
+ }
61
64
  });
62
- }
65
+ } catch (e) {
66
+ console.log(`try catch :: ${e}`);
63
67
  }
64
- });
65
- } catch (e) {
66
- console.log(`try catch :: ${e}`);
67
68
  }
68
- }
69
69
 
70
- componentDidMount() {
71
- // setTimeout to fix async
72
- setTimeout(() => {
73
- this.measure();
74
- }, 500);
75
- }
70
+ componentDidMount() {
71
+ // setTimeout to fix async
72
+ setTimeout(() => {
73
+ this.measure();
74
+ }, 500);
75
+ }
76
76
 
77
- getValueByKey = (key, value) => {
78
- const splitKey = key.split('-');
79
- return splitKey.length > 1
80
- ? splitKey.reduce(
81
- (result, item, index) =>
82
- (result =
83
- result +
84
- value[item] +
85
- (index === splitKey.length - 1 ? '' : !!value[item] ? ' ' : '')),
86
- '',
87
- )
88
- : key === 'phone'
89
- ? NumberUtils.formatPhoneNumberVN(value[key])
90
- : value[key];
91
- };
77
+ getValueByKey = (key, value) => {
78
+ const splitKey = key.split('-');
79
+ return splitKey.length > 1
80
+ ? splitKey.reduce(
81
+ (result, item, index) =>
82
+ (result =
83
+ result +
84
+ value[item] +
85
+ (index === splitKey.length - 1
86
+ ? ''
87
+ : !!value[item]
88
+ ? ' '
89
+ : '')),
90
+ '',
91
+ )
92
+ : key === 'phone'
93
+ ? NumberUtils.formatPhoneNumberVN(value[key])
94
+ : value[key];
95
+ };
92
96
 
93
- /**
94
- * loop all child components
95
- * @param {'Children'} components ;
96
- */
97
- cloneChildren(components) {
98
- if (components) {
99
- return React.Children.map(components, child => {
100
- if (!child?.props) return child;
101
- if (
102
- child?.props?.children &&
103
- React.Children.count(child?.props?.children) > 0 &&
104
- child.type.name !== Text
105
- ) {
106
- // component have children -> clone it and all it's children
107
- return React.cloneElement(child, {
108
- children: this.cloneChildren(child.props.children),
109
- });
110
- }
97
+ /**
98
+ * loop all child components
99
+ * @param {"Children"} components ;
100
+ */
101
+ cloneChildren(components) {
102
+ if (components) {
103
+ return React.Children.map(components, (child) => {
104
+ if (!child?.props) return child;
105
+ if (
106
+ child?.props?.children &&
107
+ React.Children.count(child?.props?.children) > 0 &&
108
+ child.type.name !== Text
109
+ ) {
110
+ // component have children -> clone it and all it's children
111
+ return React.cloneElement(child, {
112
+ children: this.cloneChildren(child.props.children),
113
+ });
114
+ }
111
115
 
112
- const {onChangeText, keyAutoComplete, onFocus, onEndEditing} =
113
- child.props;
114
- if (keyAutoComplete) {
115
- // Update props when component have keyAutoComplete
116
- if (this.selectedItem) {
117
- this.hashmapInputValue[keyAutoComplete] = this.getValueByKey(
118
- keyAutoComplete,
119
- this.selectedItem,
120
- ); // this.selectedItem[keyAutoComplete];
121
- return React.cloneElement(child, {
122
- ref: view => (this.hashmapRefs[keyAutoComplete] = view),
123
- onChangeText: text =>
124
- this.changeTextHandle(child, text, onChangeText),
125
- onFocus: e => this.focusHandle(e, child, onFocus),
126
- // value: this.getValueByKey(keyAutoComplete, this.selectedItem),
127
- onEndEditing: e => this.endFocusHandle(e, onEndEditing),
116
+ const { onChangeText, keyAutoComplete, onFocus, onEndEditing } =
117
+ child.props;
118
+ if (keyAutoComplete) {
119
+ // Update props when component have keyAutoComplete
120
+ if (this.selectedItem) {
121
+ this.hashmapInputValue[keyAutoComplete] =
122
+ this.getValueByKey(
123
+ keyAutoComplete,
124
+ this.selectedItem,
125
+ ); // this.selectedItem[keyAutoComplete];
126
+ return React.cloneElement(child, {
127
+ ref: (view) =>
128
+ (this.hashmapRefs[keyAutoComplete] = view),
129
+ onChangeText: (text) =>
130
+ this.changeTextHandle(
131
+ child,
132
+ text,
133
+ onChangeText,
134
+ ),
135
+ onFocus: (e) => this.focusHandle(e, child, onFocus),
136
+ // value: this.getValueByKey(keyAutoComplete, this.selectedItem),
137
+ onEndEditing: (e) =>
138
+ this.endFocusHandle(e, onEndEditing),
139
+ });
140
+ }
141
+ return React.cloneElement(child, {
142
+ ref: (view) =>
143
+ (this.hashmapRefs[keyAutoComplete] = view),
144
+ onChangeText: (text) =>
145
+ this.changeTextHandle(child, text, onChangeText),
146
+ onFocus: (e) => this.focusHandle(e, child, onFocus),
147
+ onEndEditing: (e) =>
148
+ this.endFocusHandle(e, onEndEditing),
149
+ });
150
+ }
151
+ return child;
128
152
  });
129
- }
130
- return React.cloneElement(child, {
131
- ref: view => (this.hashmapRefs[keyAutoComplete] = view),
132
- onChangeText: text =>
133
- this.changeTextHandle(child, text, onChangeText),
134
- onFocus: e => this.focusHandle(e, child, onFocus),
135
- onEndEditing: e => this.endFocusHandle(e, onEndEditing),
136
- });
137
153
  }
138
- return child;
139
- });
140
- }
141
154
 
142
- return components;
143
- }
144
-
145
- render() {
146
- const {style = {}} = this.props;
147
- const suggest = get(this.state, 'suggest', {});
148
- const childrenWithProps = this.cloneChildren(
149
- get(this.props, 'children', null),
150
- );
151
- return (
152
- <View style={[{zIndex: 1}, style]}>
153
- {childrenWithProps}
154
- {this.renderSuggest(suggest)}
155
- </View>
156
- );
157
- }
158
-
159
- querySearch = (child, text) => {
160
- const keyAutoComplete = get(child.props, 'keyAutoComplete', '');
161
- const isShowAutoComplete = get(child.props, 'isShowAutoComplete', true);
162
- const {data} = this.props;
163
- const dataOutput =
164
- data && data.length > 0 && this.filter(data, keyAutoComplete, text);
165
- if (this.hashmapRefs[keyAutoComplete]) {
166
- this.setState({
167
- suggest: {
168
- data: dataOutput,
169
- position: this.hashmapPosition[keyAutoComplete],
170
- isShowAutoComplete,
171
- },
172
- });
155
+ return components;
173
156
  }
174
- };
175
157
 
176
- changeTextHandle = (child, text, onChangeText) => {
177
- this.querySearch(child, text);
178
- if (onChangeText && typeof onChangeText === 'function') {
179
- onChangeText(text);
180
- }
181
- };
182
-
183
- focusHandle = (e, child, onFocus) => {
184
- let text = '';
185
- if (child && typeof child.getText === 'function') {
186
- text = child.getText();
158
+ render() {
159
+ const { style = {} } = this.props;
160
+ const suggest = get(this.state, 'suggest', {});
161
+ const childrenWithProps = this.cloneChildren(
162
+ get(this.props, 'children', null),
163
+ );
164
+ return (
165
+ <View style={[{ zIndex: 1 }, style]}>
166
+ {childrenWithProps}
167
+ {this.renderSuggest(suggest)}
168
+ </View>
169
+ );
187
170
  }
188
171
 
189
- this.querySearch(child, text);
172
+ querySearch = (child, text) => {
173
+ const keyAutoComplete = get(child.props, 'keyAutoComplete', '');
174
+ const isShowAutoComplete = get(child.props, 'isShowAutoComplete', true);
175
+ const { data } = this.props;
176
+ const dataOutput =
177
+ data && data.length > 0 && this.filter(data, keyAutoComplete, text);
178
+ if (this.hashmapRefs[keyAutoComplete]) {
179
+ this.setState({
180
+ suggest: {
181
+ data: dataOutput,
182
+ position: this.hashmapPosition[keyAutoComplete],
183
+ isShowAutoComplete,
184
+ },
185
+ });
186
+ }
187
+ };
190
188
 
191
- if (onFocus && typeof onFocus === 'function') {
192
- onFocus(e);
193
- }
194
- };
189
+ changeTextHandle = (child, text, onChangeText) => {
190
+ this.querySearch(child, text);
191
+ if (onChangeText && typeof onChangeText === 'function') {
192
+ onChangeText(text);
193
+ }
194
+ };
195
195
 
196
- endFocusHandle = (e, onEndEditing) => {
197
- if (this.isShowingSuggest()) {
198
- this.hideSuggest();
199
- }
200
- if (onEndEditing && typeof onEndEditing === 'function') {
201
- onEndEditing(e);
202
- }
203
- };
196
+ focusHandle = (e, child, onFocus) => {
197
+ let text = '';
198
+ if (child && typeof child.getText === 'function') {
199
+ text = child.getText();
200
+ }
204
201
 
205
- filter = (data, key, query) => {
206
- if (!data || !key) {
207
- return null;
208
- }
209
- if (query === '') {
210
- return data;
211
- }
202
+ this.querySearch(child, text);
212
203
 
213
- return data.filter(item => {
214
- const valueStr = item ? this.getValueByKey(key, item) : '';
215
- const valueStrFormated = ValueUtil.removeAlias(valueStr)
216
- .toLowerCase()
217
- .trim()
218
- .replace(/\s/g, '');
219
- const queryFormated = ValueUtil.removeAlias(query)
220
- .toLowerCase()
221
- .trim()
222
- .replace(/\s/g, '');
223
- return valueStrFormated.indexOf(queryFormated) !== -1;
224
- });
225
- };
204
+ if (onFocus && typeof onFocus === 'function') {
205
+ onFocus(e);
206
+ }
207
+ };
226
208
 
227
- renderSuggest(suggest) {
228
- const {numSuggest} = this.props;
229
- if (
230
- suggest &&
231
- suggest.data &&
232
- suggest.data.length > 0 &&
233
- suggest.isShowAutoComplete
234
- ) {
235
- const {x = 0, y = 0, width = 0} = suggest.position || {};
236
- const sliceData = suggest.data.slice(0, numSuggest);
209
+ endFocusHandle = (e, onEndEditing) => {
210
+ if (this.isShowingSuggest()) {
211
+ this.hideSuggest();
212
+ }
213
+ if (onEndEditing && typeof onEndEditing === 'function') {
214
+ onEndEditing(e);
215
+ }
216
+ };
237
217
 
238
- return (
239
- <View
240
- style={[
241
- styles.containerSuggest,
242
- {
243
- left: x,
244
- top: y,
245
- width,
246
- },
247
- ]}>
248
- {sliceData.map((item, index) => (
249
- <View key={index.toString()}>
250
- {this.renderItem({
251
- item,
252
- index,
253
- })}
254
- {index !== sliceData.length - 1 && this.renderSeparator()}
255
- </View>
256
- ))}
257
- </View>
258
- );
259
- }
260
- return null;
261
- }
218
+ filter = (data, key, query) => {
219
+ if (!data || !key) {
220
+ return null;
221
+ }
222
+ if (query === '') {
223
+ return data;
224
+ }
262
225
 
263
- renderItem = ({item, index}) => {
264
- const {renderSuggestItem} = this.props;
265
- return (
266
- <TouchableOpacity onPress={() => this.onPressItemSuggest(item, index)}>
267
- {renderSuggestItem && typeof renderSuggestItem === 'function'
268
- ? renderSuggestItem({
269
- item,
270
- index,
271
- })
272
- : this.renderSuggestItemDefault({
273
- item,
274
- index,
275
- })}
276
- </TouchableOpacity>
277
- );
278
- };
226
+ return data.filter((item) => {
227
+ const valueStr = item ? this.getValueByKey(key, item) : '';
228
+ const valueStrFormated = ValueUtil.removeAlias(valueStr)
229
+ .toLowerCase()
230
+ .trim()
231
+ .replace(/\s/g, '');
232
+ const queryFormated = ValueUtil.removeAlias(query)
233
+ .toLowerCase()
234
+ .trim()
235
+ .replace(/\s/g, '');
236
+ return valueStrFormated.indexOf(queryFormated) !== -1;
237
+ });
238
+ };
279
239
 
280
- renderSeparator = () => <View style={styles.separator} />;
240
+ renderSuggest(suggest) {
241
+ const { numSuggest } = this.props;
242
+ if (
243
+ suggest &&
244
+ suggest.data &&
245
+ suggest.data.length > 0 &&
246
+ suggest.isShowAutoComplete
247
+ ) {
248
+ const { x = 0, y = 0, width = 0 } = suggest.position || {};
249
+ const sliceData = suggest.data.slice(0, numSuggest);
281
250
 
282
- renderSuggestItemDefault = ({item}) => {
283
- const {title, value} = item;
284
- return (
285
- <View style={[styles.viewSuggest]}>
286
- <Text.Title>{title}</Text.Title>
287
- <Text.Title>{value}</Text.Title>
288
- </View>
289
- );
290
- };
251
+ return (
252
+ <View
253
+ style={[
254
+ styles.containerSuggest,
255
+ {
256
+ left: x,
257
+ top: y,
258
+ width,
259
+ },
260
+ ]}>
261
+ {sliceData.map((item, index) => (
262
+ <View key={index.toString()}>
263
+ {this.renderItem({ item, index })}
264
+ {index !== sliceData.length - 1 &&
265
+ this.renderSeparator()}
266
+ </View>
267
+ ))}
268
+ </View>
269
+ );
270
+ }
271
+ return null;
272
+ }
291
273
 
292
- onPressItemSuggest = (item, index) => {
293
- this.selectedItem = item;
294
- // Loop hashRef to update value of child
295
- Object.keys(this.hashmapRefs).forEach(key => {
296
- if (
297
- this.hashmapRefs[key].setText &&
298
- typeof this.hashmapRefs[key].setText === 'function'
299
- ) {
300
- this.hashmapRefs[key].setText(
301
- this.getValueByKey(key, this.selectedItem),
274
+ renderItem = ({ item, index }) => {
275
+ const { renderSuggestItem } = this.props;
276
+ return (
277
+ <TouchableOpacity onPress={() => this.onPressItemSuggest(item)}>
278
+ {renderSuggestItem && typeof renderSuggestItem === 'function'
279
+ ? renderSuggestItem({ item, index })
280
+ : this.renderSuggestItemDefault({ item, index })}
281
+ </TouchableOpacity>
302
282
  );
303
- }
304
- if (
305
- this.hashmapRefs[key].setValue &&
306
- typeof this.hashmapRefs[key].setValue === 'function'
307
- ) {
308
- this.hashmapRefs[key].setValue(
309
- this.getValueByKey(key, this.selectedItem),
283
+ };
284
+
285
+ renderSeparator = () => <View style={styles.separator} />;
286
+
287
+ renderSuggestItemDefault = ({ item }) => {
288
+ const { title, value } = item;
289
+ return (
290
+ <View style={[styles.viewSuggest]}>
291
+ <Text.Title>{title}</Text.Title>
292
+ <Text.Title>{value}</Text.Title>
293
+ </View>
310
294
  );
311
- }
312
- });
295
+ };
313
296
 
314
- const {onSelected} = this.props;
315
- this.setState(
316
- {
317
- suggest: {},
318
- },
319
- () => {
320
- if (onSelected && typeof onSelected === 'function') {
321
- onSelected(item, index);
322
- }
323
- this.selectedItem = null;
324
- },
325
- );
326
- };
297
+ onPressItemSuggest = (item) => {
298
+ this.selectedItem = item;
299
+ // Loop hashRef to update value of child
300
+ Object.keys(this.hashmapRefs).forEach((key) => {
301
+ if (
302
+ this.hashmapRefs[key].setText &&
303
+ typeof this.hashmapRefs[key].setText === 'function'
304
+ )
305
+ this.hashmapRefs[key].setText(
306
+ this.getValueByKey(key, this.selectedItem),
307
+ );
308
+ if (
309
+ this.hashmapRefs[key].setValue &&
310
+ typeof this.hashmapRefs[key].setValue === 'function'
311
+ )
312
+ this.hashmapRefs[key].setValue(
313
+ this.getValueByKey(key, this.selectedItem),
314
+ );
315
+ });
327
316
 
328
- isShowingSuggest = () => {
329
- const {suggest} = this.state;
330
- return suggest && suggest.data && suggest.data.length > 0;
331
- };
317
+ const { onSelected } = this.props;
318
+ this.setState(
319
+ {
320
+ suggest: {},
321
+ },
322
+ () => {
323
+ if (onSelected && typeof onSelected === 'function') {
324
+ onSelected(item);
325
+ }
326
+ this.selectedItem = null;
327
+ },
328
+ );
329
+ };
332
330
 
333
- hideSuggest = () => {
334
- this.setState(
335
- {
336
- suggest: {},
337
- },
338
- () => {
339
- this.selectedItem = null;
340
- },
341
- );
342
- };
331
+ isShowingSuggest = () => {
332
+ const { suggest } = this.state;
333
+ return suggest && suggest.data && suggest.data.length > 0;
334
+ };
335
+
336
+ hideSuggest = () => {
337
+ this.setState(
338
+ {
339
+ suggest: {},
340
+ },
341
+ () => {
342
+ this.selectedItem = null;
343
+ },
344
+ );
345
+ };
343
346
  }
344
347
 
345
348
  const styles = StyleSheet.create({
346
- viewSuggest: {
347
- flexDirection: 'row',
348
- justifyContent: 'space-between',
349
- alignItems: 'center',
350
- paddingVertical: 5,
351
- },
352
- containerSuggest: {
353
- backgroundColor: 'white',
354
- paddingVertical: 10,
355
- paddingHorizontal: 12,
356
- position: 'absolute',
357
- maxHeight: 240,
358
- borderColor: '#DADADA',
359
- borderRadius: 4,
360
- borderWidth: 1,
361
- shadowColor: '#000000',
362
- shadowOffset: {
363
- width: 0,
364
- height: 1,
349
+ viewSuggest: {
350
+ flexDirection: 'row',
351
+ justifyContent: 'space-between',
352
+ alignItems: 'center',
353
+ paddingVertical: 5,
354
+ },
355
+ containerSuggest: {
356
+ backgroundColor: 'white',
357
+ paddingVertical: 10,
358
+ paddingHorizontal: 12,
359
+ position: 'absolute',
360
+ maxHeight: 240,
361
+ borderColor: '#DADADA',
362
+ borderRadius: 4,
363
+ borderWidth: 1,
364
+ shadowColor: '#000000',
365
+ shadowOffset: {
366
+ width: 0,
367
+ height: 1,
368
+ },
369
+ shadowRadius: 1,
370
+ elevation: 2,
371
+ shadowOpacity: 0.5,
372
+ },
373
+ separator: {
374
+ height: 1,
375
+ width: '100%',
376
+ backgroundColor: Colors.placeholder,
377
+ marginVertical: 10,
365
378
  },
366
- shadowRadius: 1,
367
- elevation: 2,
368
- shadowOpacity: 0.5,
369
- },
370
- separator: {
371
- height: 1,
372
- width: '100%',
373
- backgroundColor: Colors.placeholder,
374
- marginVertical: 10,
375
- },
376
379
  });
377
380
 
378
381
  AutoComplete.propTypes = {
379
- style: PropTypes.oneOfType([
380
- PropTypes.array,
381
- PropTypes.object,
382
- PropTypes.number,
383
- ]),
384
- data: PropTypes.arrayOf(PropTypes.object).isRequired,
385
- renderSuggestItem: PropTypes.func,
386
- onSelected: PropTypes.func.isRequired,
387
- numSuggest: PropTypes.number,
382
+ style: PropTypes.oneOfType([
383
+ PropTypes.array,
384
+ PropTypes.object,
385
+ PropTypes.number,
386
+ ]),
387
+ data: PropTypes.arrayOf(PropTypes.object).isRequired,
388
+ renderSuggestItem: PropTypes.func,
389
+ onSelected: PropTypes.func.isRequired,
390
+ numSuggest: PropTypes.number,
388
391
  };
389
392
 
390
393
  AutoComplete.defaultProps = {
391
- numSuggest: 2,
394
+ numSuggest: 2,
392
395
  };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
- "name": "@momo-kits/auto-complete",
3
- "version": "0.0.66-alpha.14",
4
- "private": false,
5
- "main": "index.js",
6
- "dependencies": {},
7
- "peerDependencies": {
8
- "react": "16.9.0",
9
- "react-native": ">=0.55",
10
- "@momo-kits/core": ">=0.0.4-beta",
11
- "lodash": "^4.17.15",
12
- "prop-types": "^15.7.2"
13
- },
14
- "devDependencies": {},
15
- "license": "MoMo"
16
- }
2
+ "name": "@momo-kits/auto-complete",
3
+ "version": "0.0.66-alpha.16",
4
+ "private": false,
5
+ "main": "index.js",
6
+ "dependencies": {},
7
+ "peerDependencies": {
8
+ "react": "16.9.0",
9
+ "react-native": ">=0.55",
10
+ "@momo-kits/core": ">=0.0.4-beta",
11
+ "lodash": "^4.17.15",
12
+ "prop-types": "^15.7.2"
13
+ },
14
+ "devDependencies": {},
15
+ "license": "MoMo"
16
+ }