@momo-kits/auto-complete 0.0.65-beta.9 → 0.0.66-alpha.11

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 +342 -345
  2. package/package.json +15 -15
package/AutoComplete.js CHANGED
@@ -1,395 +1,392 @@
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
- };
61
- });
62
- }
63
- }
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
+ };
64
61
  });
65
- } catch (e) {
66
- console.log(`try catch :: ${e}`);
62
+ }
67
63
  }
64
+ });
65
+ } catch (e) {
66
+ console.log(`try catch :: ${e}`);
68
67
  }
68
+ }
69
69
 
70
- componentDidMount() {
71
- // setTimeout to fix async
72
- setTimeout(() => {
73
- this.measure();
74
- }, 500);
75
- }
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
86
- ? ''
87
- : !!value[item]
88
- ? ' '
89
- : '')),
90
- '',
91
- )
92
- : key === 'phone'
93
- ? NumberUtils.formatPhoneNumberVN(value[key])
94
- : value[key];
95
- };
70
+ componentDidMount() {
71
+ // setTimeout to fix async
72
+ setTimeout(() => {
73
+ this.measure();
74
+ }, 500);
75
+ }
96
76
 
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
- }
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
+ };
115
92
 
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;
152
- });
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
+ });
153
110
  }
154
111
 
155
- return components;
156
- }
157
-
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
- );
170
- }
171
-
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
- },
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),
185
128
  });
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
+ });
186
137
  }
187
- };
138
+ return child;
139
+ });
140
+ }
188
141
 
189
- changeTextHandle = (child, text, onChangeText) => {
190
- this.querySearch(child, text);
191
- if (onChangeText && typeof onChangeText === 'function') {
192
- onChangeText(text);
193
- }
194
- };
142
+ return components;
143
+ }
195
144
 
196
- focusHandle = (e, child, onFocus) => {
197
- let text = '';
198
- if (child && typeof child.getText === 'function') {
199
- text = child.getText();
200
- }
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
+ }
201
158
 
202
- this.querySearch(child, text);
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
+ });
173
+ }
174
+ };
203
175
 
204
- if (onFocus && typeof onFocus === 'function') {
205
- onFocus(e);
206
- }
207
- };
176
+ changeTextHandle = (child, text, onChangeText) => {
177
+ this.querySearch(child, text);
178
+ if (onChangeText && typeof onChangeText === 'function') {
179
+ onChangeText(text);
180
+ }
181
+ };
208
182
 
209
- endFocusHandle = (e, onEndEditing) => {
210
- if (this.isShowingSuggest()) {
211
- this.hideSuggest();
212
- }
213
- if (onEndEditing && typeof onEndEditing === 'function') {
214
- onEndEditing(e);
215
- }
216
- };
183
+ focusHandle = (e, child, onFocus) => {
184
+ let text = '';
185
+ if (child && typeof child.getText === 'function') {
186
+ text = child.getText();
187
+ }
217
188
 
218
- filter = (data, key, query) => {
219
- if (!data || !key) {
220
- return null;
221
- }
222
- if (query === '') {
223
- return data;
224
- }
189
+ this.querySearch(child, text);
225
190
 
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
- };
191
+ if (onFocus && typeof onFocus === 'function') {
192
+ onFocus(e);
193
+ }
194
+ };
239
195
 
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);
196
+ endFocusHandle = (e, onEndEditing) => {
197
+ if (this.isShowingSuggest()) {
198
+ this.hideSuggest();
199
+ }
200
+ if (onEndEditing && typeof onEndEditing === 'function') {
201
+ onEndEditing(e);
202
+ }
203
+ };
250
204
 
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;
205
+ filter = (data, key, query) => {
206
+ if (!data || !key) {
207
+ return null;
208
+ }
209
+ if (query === '') {
210
+ return data;
272
211
  }
273
212
 
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>
282
- );
283
- };
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
+ };
284
226
 
285
- renderSeparator = () => <View style={styles.separator} />;
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);
286
237
 
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>
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()}
293
255
  </View>
294
- );
295
- };
256
+ ))}
257
+ </View>
258
+ );
259
+ }
260
+ return null;
261
+ }
296
262
 
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
- });
263
+ renderItem = ({item, index}) => {
264
+ const {renderSuggestItem} = this.props;
265
+ return (
266
+ <TouchableOpacity onPress={() => this.onPressItemSuggest(item)}>
267
+ {renderSuggestItem && typeof renderSuggestItem === 'function'
268
+ ? renderSuggestItem({
269
+ item,
270
+ index,
271
+ })
272
+ : this.renderSuggestItemDefault({
273
+ item,
274
+ index,
275
+ })}
276
+ </TouchableOpacity>
277
+ );
278
+ };
316
279
 
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
- };
280
+ renderSeparator = () => <View style={styles.separator} />;
330
281
 
331
- isShowingSuggest = () => {
332
- const { suggest } = this.state;
333
- return suggest && suggest.data && suggest.data.length > 0;
334
- };
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
+ };
335
291
 
336
- hideSuggest = () => {
337
- this.setState(
338
- {
339
- suggest: {},
340
- },
341
- () => {
342
- this.selectedItem = null;
343
- },
292
+ onPressItemSuggest = item => {
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),
344
302
  );
345
- };
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),
310
+ );
311
+ }
312
+ });
313
+
314
+ const {onSelected} = this.props;
315
+ this.setState(
316
+ {
317
+ suggest: {},
318
+ },
319
+ () => {
320
+ if (onSelected && typeof onSelected === 'function') {
321
+ onSelected(item);
322
+ }
323
+ this.selectedItem = null;
324
+ },
325
+ );
326
+ };
327
+
328
+ isShowingSuggest = () => {
329
+ const {suggest} = this.state;
330
+ return suggest && suggest.data && suggest.data.length > 0;
331
+ };
332
+
333
+ hideSuggest = () => {
334
+ this.setState(
335
+ {
336
+ suggest: {},
337
+ },
338
+ () => {
339
+ this.selectedItem = null;
340
+ },
341
+ );
342
+ };
346
343
  }
347
344
 
348
345
  const styles = StyleSheet.create({
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,
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,
378
365
  },
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
+ },
379
376
  });
380
377
 
381
378
  AutoComplete.propTypes = {
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,
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,
391
388
  };
392
389
 
393
390
  AutoComplete.defaultProps = {
394
- numSuggest: 2,
391
+ numSuggest: 2,
395
392
  };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
- "name": "@momo-kits/auto-complete",
3
- "version": "0.0.65-beta.9",
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.11",
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
+ }