@intra-mart/smartlime 2.2.0 → 2.3.0-dev.20250709
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/packages/Me/index.d.ts +3 -2
- package/lib/packages/Me/index.js +1 -1
- package/lib/packages/OAuth/index.d.ts +2 -1
- package/lib/packages/OAuth/index.js +1 -1
- package/lib/packages/Search/index.d.ts +3 -2
- package/lib/packages/Search/index.js +1 -1
- package/lib/packages/Session/index.d.ts +2 -1
- package/lib/packages/Session/index.js +1 -1
- package/lib/packages/Smartlime/index.d.ts +2 -1
- package/lib/packages/Tenant/index.d.ts +2 -1
- package/lib/packages/Tenant/index.js +4 -4
- package/lib/packages/WebView/InternalIMWebView.d.ts +1 -1
- package/lib/packages/WebView/hooks/useHackSearchUI.d.ts +1 -1
- package/package.json +26 -26
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
1
2
|
import { RenderTarget } from '../../_shared/renderTarget';
|
|
2
3
|
import { Context as DefaultContext } from './Context';
|
|
3
4
|
import { Me } from './type';
|
|
@@ -13,10 +14,10 @@ export interface ErrorResult {
|
|
|
13
14
|
couse?: unknown;
|
|
14
15
|
}
|
|
15
16
|
export declare const useRequestIMMe: (setter: ReturnType<typeof useMeStateRef>[1]) => () => Promise<SuccessResult | ErrorResult>;
|
|
16
|
-
declare const useMeStateRef: (renderTarget: RenderTarget) => readonly [import("react").
|
|
17
|
+
declare const useMeStateRef: (renderTarget: RenderTarget) => readonly [import("react").RefObject<Me | null>, (state: Me, silent?: boolean) => void, () => Me | null];
|
|
17
18
|
export interface IMMeProps {
|
|
18
19
|
children: JSX.Element;
|
|
19
20
|
meContext?: typeof DefaultContext;
|
|
20
21
|
}
|
|
21
|
-
export declare const IMMe: ({ children, meContext }: IMMeProps) =>
|
|
22
|
+
export declare const IMMe: ({ children, meContext }: IMMeProps) => JSX.Element;
|
|
22
23
|
export {};
|
package/lib/packages/Me/index.js
CHANGED
|
@@ -42,7 +42,7 @@ const useMeStateRef = (renderTarget) => {
|
|
|
42
42
|
};
|
|
43
43
|
export const IMMe = ({ children, meContext }) => {
|
|
44
44
|
const Context = meContext || DefaultContext;
|
|
45
|
-
const contextRef = useRef();
|
|
45
|
+
const contextRef = useRef(null);
|
|
46
46
|
const meStateRenderTarget = useRenderTarget();
|
|
47
47
|
const [, setMe, getMe] = useMeStateRef(meStateRenderTarget);
|
|
48
48
|
const request = useRequestIMMe(setMe);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Prompt } from 'expo-auth-session';
|
|
2
2
|
import * as SecureStore from 'expo-secure-store';
|
|
3
|
+
import { JSX } from 'react';
|
|
3
4
|
import { Context as DefaultContext } from './Context';
|
|
4
5
|
export type TokenState = {
|
|
5
6
|
baseUrl: string;
|
|
@@ -30,5 +31,5 @@ interface IMOAuthProps {
|
|
|
30
31
|
secureStore?: SecureStoreConfig;
|
|
31
32
|
oauthContext?: typeof DefaultContext;
|
|
32
33
|
}
|
|
33
|
-
export declare const IMOAuth: ({ children, requestConfig, remainingTimeToRunRefresh, secureStore, oauthContext, }: IMOAuthProps) =>
|
|
34
|
+
export declare const IMOAuth: ({ children, requestConfig, remainingTimeToRunRefresh, secureStore, oauthContext, }: IMOAuthProps) => JSX.Element;
|
|
34
35
|
export {};
|
|
@@ -304,7 +304,7 @@ const useGetTokenAsync = (tokenRef, expirationDateRef, remainingTimeToRunRefresh
|
|
|
304
304
|
};
|
|
305
305
|
export const IMOAuth = ({ children, requestConfig, remainingTimeToRunRefresh, secureStore, oauthContext, }) => {
|
|
306
306
|
const Context = oauthContext || DefaultContext;
|
|
307
|
-
const contextRef = useRef();
|
|
307
|
+
const contextRef = useRef(null);
|
|
308
308
|
const authStateRenderTarget = useRenderTarget();
|
|
309
309
|
const [, setAuthState, getAuthState] = useAuthStateRef(authStateRenderTarget);
|
|
310
310
|
const tokenRenderTarget = useRenderTarget();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
1
2
|
import { Context as DefaultContext } from './Context';
|
|
2
3
|
import { DepartmentPostSearchRecord, DepartmentSearchRecord, PostSearchRecord, PublicGroupSearchRecord, RoleSearchRecord, UserSearchRecord } from './types';
|
|
3
4
|
export type SearchTarget = 'jp.co.intra_mart.master.search.user' | 'jp.co.intra_mart.master.search.company' | 'jp.co.intra_mart.master.search.company_post' | 'jp.co.intra_mart.master.search.department' | 'jp.co.intra_mart.master.search.public_group' | 'jp.co.intra_mart.master.search.private_group' | 'jp.co.intra_mart.master.search.public_group_role' | 'jp.co.intra_mart.master.search.role' | 'jp.co.intra_mart.master.search.attached_department_post' | 'jp.co.intra_mart.master.search.attached_public_group_role' | undefined;
|
|
4
5
|
export type SearchType = 'single' | 'multiple';
|
|
5
|
-
declare const useLock: () => import("react").
|
|
6
|
+
declare const useLock: () => import("react").RefObject<boolean>;
|
|
6
7
|
declare const useVisible: () => [boolean, import("react").Dispatch<import("react").SetStateAction<boolean>>];
|
|
7
8
|
declare const useSearchTarget: () => [SearchTarget, import("react").Dispatch<import("react").SetStateAction<SearchTarget>>];
|
|
8
9
|
declare const useSearchType: () => [SearchType, import("react").Dispatch<import("react").SetStateAction<SearchType>>];
|
|
@@ -44,5 +45,5 @@ interface IMSearchProps {
|
|
|
44
45
|
searchContext?: typeof DefaultContext;
|
|
45
46
|
SearchComponent: (props: SelectSearchProps) => JSX.Element;
|
|
46
47
|
}
|
|
47
|
-
export declare const IMSearch: ({ children, searchContext, SearchComponent, }: IMSearchProps) =>
|
|
48
|
+
export declare const IMSearch: ({ children, searchContext, SearchComponent, }: IMSearchProps) => JSX.Element;
|
|
48
49
|
export {};
|
|
@@ -53,7 +53,7 @@ const useSearch = (setIsVisible, setSearchTarget, setSearchType, setParamString,
|
|
|
53
53
|
};
|
|
54
54
|
export const IMSearch = ({ children, searchContext, SearchComponent, }) => {
|
|
55
55
|
const Context = searchContext || DefaultContext;
|
|
56
|
-
const contextRef = useRef();
|
|
56
|
+
const contextRef = useRef(null);
|
|
57
57
|
const lockRef = useLock();
|
|
58
58
|
const [isVisible, setIsVisible] = useVisible();
|
|
59
59
|
const [searchTarget, setSearchTarget] = useSearchTarget();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
1
2
|
import { Context as DefaultContext } from './Context';
|
|
2
3
|
export interface SessionResponse {
|
|
3
4
|
error: boolean;
|
|
@@ -13,4 +14,4 @@ export interface IMSessionProps {
|
|
|
13
14
|
children: JSX.Element;
|
|
14
15
|
sessionContext?: typeof DefaultContext;
|
|
15
16
|
}
|
|
16
|
-
export declare const IMSession: ({ children, sessionContext }: IMSessionProps) =>
|
|
17
|
+
export declare const IMSession: ({ children, sessionContext }: IMSessionProps) => JSX.Element;
|
|
@@ -150,7 +150,7 @@ const unmountEffect = (getter, logout) => {
|
|
|
150
150
|
};
|
|
151
151
|
export const IMSession = ({ children, sessionContext }) => {
|
|
152
152
|
const Context = sessionContext || DefaultContext;
|
|
153
|
-
const contextRef = useRef();
|
|
153
|
+
const contextRef = useRef(null);
|
|
154
154
|
const sessionStateRenderTarget = useRenderTarget();
|
|
155
155
|
const [, setSession, getSession] = useSessionStateRef(sessionStateRenderTarget);
|
|
156
156
|
const logout = useLogout();
|
|
@@ -3,6 +3,7 @@ import { IMOAuth } from '../OAuth';
|
|
|
3
3
|
import { IMSession } from '../Session';
|
|
4
4
|
import { IMSearch } from '../Search';
|
|
5
5
|
import { IMTenant } from '../Tenant';
|
|
6
|
+
import { JSX } from 'react';
|
|
6
7
|
interface SmartlimeProps {
|
|
7
8
|
children: JSX.Element;
|
|
8
9
|
baseUrl: string;
|
|
@@ -16,5 +17,5 @@ interface SmartlimeProps {
|
|
|
16
17
|
imsession?: Omit<React.ComponentProps<typeof IMSession>, 'children'>;
|
|
17
18
|
imseach?: Omit<React.ComponentProps<typeof IMSearch>, 'children'>;
|
|
18
19
|
}
|
|
19
|
-
export declare const Smartlime: ({ children, baseUrl, tenantId, imtenant, imoauth, imme, imsession, imseach, }: SmartlimeProps) =>
|
|
20
|
+
export declare const Smartlime: ({ children, baseUrl, tenantId, imtenant, imoauth, imme, imsession, imseach, }: SmartlimeProps) => JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
1
2
|
import { Context as DefaultContext, IMModules } from './Context';
|
|
2
3
|
interface IMTenantProps {
|
|
3
4
|
children: JSX.Element;
|
|
@@ -8,5 +9,5 @@ interface IMTenantProps {
|
|
|
8
9
|
export interface ModuleState {
|
|
9
10
|
modules?: IMModules;
|
|
10
11
|
}
|
|
11
|
-
export declare const IMTenant: ({ children, baseUrl, tenantId, tenantContext, }: IMTenantProps) =>
|
|
12
|
+
export declare const IMTenant: ({ children, baseUrl, tenantId, tenantContext, }: IMTenantProps) => JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -13,7 +13,7 @@ const deleteModuleStorage = async (storageKey) => {
|
|
|
13
13
|
return await AsyncStorage.removeItem(storageKey);
|
|
14
14
|
};
|
|
15
15
|
const useModuleRef = (baseUrl, renderTarget) => {
|
|
16
|
-
const ref = useRef();
|
|
16
|
+
const ref = useRef(null);
|
|
17
17
|
const setter = useCallback((state, silent) => {
|
|
18
18
|
if (ref.current === state)
|
|
19
19
|
return;
|
|
@@ -21,18 +21,18 @@ const useModuleRef = (baseUrl, renderTarget) => {
|
|
|
21
21
|
if (!silent)
|
|
22
22
|
renderTarget.dispatch();
|
|
23
23
|
}, []);
|
|
24
|
-
const getter = useCallback(() => ref.current, []);
|
|
24
|
+
const getter = useCallback(() => (ref.current == null ? void 0 : ref.current), []);
|
|
25
25
|
const destroy = useCallback(async () => {
|
|
26
26
|
const storageKey = createStorageKey(baseUrl);
|
|
27
27
|
await deleteModuleStorage(storageKey);
|
|
28
|
-
ref.current =
|
|
28
|
+
ref.current = null;
|
|
29
29
|
renderTarget.dispatch();
|
|
30
30
|
}, [baseUrl]);
|
|
31
31
|
return [ref, setter, getter, destroy];
|
|
32
32
|
};
|
|
33
33
|
export const IMTenant = ({ children, baseUrl, tenantId, tenantContext, }) => {
|
|
34
34
|
const Context = tenantContext || DefaultContext;
|
|
35
|
-
const contextRef = useRef();
|
|
35
|
+
const contextRef = useRef(null);
|
|
36
36
|
const modulesStateRenderTarget = useRenderTarget();
|
|
37
37
|
const getBaseUrl = useGetBaseUrl(baseUrl);
|
|
38
38
|
const getTenantId = useGetTenantId(tenantId);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import WebView, { WebViewMessageEvent } from 'react-native-webview';
|
|
2
2
|
type ErrorCallBack = (error: unknown) => void;
|
|
3
3
|
export declare const useHackSearchUI: (errorCallBack?: ErrorCallBack) => {
|
|
4
|
-
ref: import("react").RefObject<WebView<{}
|
|
4
|
+
ref: import("react").RefObject<WebView<{}> | null>;
|
|
5
5
|
injectedJavaScriptBeforeContentLoaded: string;
|
|
6
6
|
onMessage: (event: WebViewMessageEvent) => Promise<void>;
|
|
7
7
|
};
|
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": "2.
|
|
4
|
+
"version": "2.3.0-dev.20250709",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intra-mart",
|
|
7
7
|
"AccelPlatform",
|
|
@@ -42,39 +42,39 @@
|
|
|
42
42
|
"type": "tsc --noEmit"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"expo": "^
|
|
46
|
-
"react": "
|
|
45
|
+
"expo": "^53.0.19",
|
|
46
|
+
"react": "19.0.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@react-native-async-storage/async-storage": "1.
|
|
50
|
-
"expo-auth-session": "~6.
|
|
51
|
-
"expo-crypto": "~14.
|
|
52
|
-
"expo-secure-store": "~14.
|
|
53
|
-
"react-native-webview": "13.
|
|
49
|
+
"@react-native-async-storage/async-storage": "2.1.2",
|
|
50
|
+
"expo-auth-session": "~6.2.1",
|
|
51
|
+
"expo-crypto": "~14.1.5",
|
|
52
|
+
"expo-secure-store": "~14.2.3",
|
|
53
|
+
"react-native-webview": "13.13.5",
|
|
54
54
|
"set-cookie-parser": "^2.7.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@babel/core": "^7.
|
|
58
|
-
"@babel/preset-env": "^7.
|
|
57
|
+
"@babel/core": "^7.28.0",
|
|
58
|
+
"@babel/preset-env": "^7.28.0",
|
|
59
59
|
"@types/jest": "^29.5.14",
|
|
60
|
-
"@types/react": "
|
|
61
|
-
"@types/react-test-renderer": "
|
|
60
|
+
"@types/react": "~19.0.10",
|
|
61
|
+
"@types/react-test-renderer": "19.0.0",
|
|
62
62
|
"@types/set-cookie-parser": "^2.4.10",
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
64
|
-
"@typescript-eslint/parser": "^8.
|
|
65
|
-
"eslint": "^9.
|
|
66
|
-
"eslint-config-prettier": "^
|
|
67
|
-
"eslint-plugin-react": "^7.37.
|
|
68
|
-
"expo": "
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^8.36.0",
|
|
64
|
+
"@typescript-eslint/parser": "^8.36.0",
|
|
65
|
+
"eslint": "^9.30.1",
|
|
66
|
+
"eslint-config-prettier": "^10.1.5",
|
|
67
|
+
"eslint-plugin-react": "^7.37.5",
|
|
68
|
+
"expo": "^53.0.19",
|
|
69
69
|
"jest": "^29.7.0",
|
|
70
|
-
"jest-expo": "
|
|
71
|
-
"prettier": "^3.
|
|
72
|
-
"react": "
|
|
73
|
-
"react-dom": "
|
|
74
|
-
"react-native": "0.
|
|
75
|
-
"react-test-renderer": "
|
|
76
|
-
"ts-jest": "^29.
|
|
77
|
-
"typescript": "
|
|
70
|
+
"jest-expo": "~53.0.9",
|
|
71
|
+
"prettier": "^3.6.2",
|
|
72
|
+
"react": "19.0.0",
|
|
73
|
+
"react-dom": "19.0.0",
|
|
74
|
+
"react-native": "0.79.5",
|
|
75
|
+
"react-test-renderer": "19.0.0",
|
|
76
|
+
"ts-jest": "^29.4.0",
|
|
77
|
+
"typescript": "~5.8.3"
|
|
78
78
|
},
|
|
79
79
|
"engines": {
|
|
80
80
|
"node": ">= 22.0.0"
|