@intra-mart/smartlime 1.1.1 → 1.1.2
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.
|
@@ -18,13 +18,13 @@ const useParamString = () => {
|
|
|
18
18
|
return useState('');
|
|
19
19
|
};
|
|
20
20
|
const useSearch = (setIsVisible, setSearchTarget, setSearchType, setParamString, lockRef) => {
|
|
21
|
-
const
|
|
21
|
+
const searchResolveRef = useRef(null);
|
|
22
22
|
const start = useCallback(({ target, type, paramString }) => {
|
|
23
23
|
return new Promise((resolve) => {
|
|
24
24
|
if (lockRef.current)
|
|
25
25
|
resolve({ type: 'locked' });
|
|
26
26
|
lockRef.current = true;
|
|
27
|
-
|
|
27
|
+
searchResolveRef.current = resolve;
|
|
28
28
|
setSearchTarget(target);
|
|
29
29
|
setSearchType(type);
|
|
30
30
|
setParamString(paramString);
|
|
@@ -32,11 +32,11 @@ const useSearch = (setIsVisible, setSearchTarget, setSearchType, setParamString,
|
|
|
32
32
|
});
|
|
33
33
|
}, [setIsVisible, setSearchTarget, setSearchType, setParamString]);
|
|
34
34
|
const complate = useCallback((result) => {
|
|
35
|
-
if (
|
|
36
|
-
|
|
35
|
+
if (searchResolveRef.current != null)
|
|
36
|
+
searchResolveRef.current(result);
|
|
37
37
|
else
|
|
38
38
|
throw new IMSearchError('not found resolve');
|
|
39
|
-
|
|
39
|
+
searchResolveRef.current = null;
|
|
40
40
|
lockRef.current = false;
|
|
41
41
|
setIsVisible(false);
|
|
42
42
|
}, [setIsVisible]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intra-mart/smartlime",
|
|
3
3
|
"description": "expoで使用できるintra mart accelplatform SDK",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intra-mart",
|
|
7
7
|
"AccelPlatform",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"type": "tsc --noEmit"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"expo": "^49.0.
|
|
45
|
+
"expo": "^49.0.6",
|
|
46
46
|
"react": "18.2.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
"eslint": "^8.44.0",
|
|
67
67
|
"eslint-config-prettier": "^8.8.0",
|
|
68
68
|
"eslint-plugin-react": "^7.32.2",
|
|
69
|
-
"expo": "^49.0.
|
|
69
|
+
"expo": "^49.0.6",
|
|
70
70
|
"jest": "^29.6.1",
|
|
71
71
|
"jest-expo": "^49.0.0",
|
|
72
72
|
"prettier": "^2.8.3",
|
|
73
73
|
"react": "18.2.0",
|
|
74
74
|
"react-dom": "18.2.0",
|
|
75
|
-
"react-native": "0.72.
|
|
75
|
+
"react-native": "0.72.3",
|
|
76
76
|
"react-test-renderer": "18.2.0",
|
|
77
77
|
"ts-jest": "^29.1.1",
|
|
78
78
|
"typescript": "^5.1.3"
|