@sendbird/uikit-utils 2.4.0 → 2.4.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.
- package/README.md +1 -1
- package/lib/commonjs/hooks/index.js +3 -30
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/react-native.js +2 -11
- package/lib/commonjs/hooks/react-native.js.map +1 -1
- package/lib/commonjs/index.js +36 -155
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/sendbird/attrs.js +8 -11
- package/lib/commonjs/sendbird/attrs.js.map +1 -1
- package/lib/commonjs/sendbird/channel.js +0 -16
- package/lib/commonjs/sendbird/channel.js.map +1 -1
- package/lib/commonjs/sendbird/message.js +5 -36
- package/lib/commonjs/sendbird/message.js.map +1 -1
- package/lib/commonjs/sendbird/user.js +0 -2
- package/lib/commonjs/sendbird/user.js.map +1 -1
- package/lib/commonjs/shared/arrayToMap.js +0 -6
- package/lib/commonjs/shared/arrayToMap.js.map +1 -1
- package/lib/commonjs/shared/bufferedRequest.js +5 -26
- package/lib/commonjs/shared/bufferedRequest.js.map +1 -1
- package/lib/commonjs/shared/file.js +208 -0
- package/lib/commonjs/shared/file.js.map +1 -0
- package/lib/commonjs/shared/index.js +12 -49
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/logger.js +3 -22
- package/lib/commonjs/shared/logger.js.map +1 -1
- package/lib/commonjs/shared/regex.js +3 -55
- package/lib/commonjs/shared/regex.js.map +1 -1
- package/lib/commonjs/ui-format/common.js +6 -18
- package/lib/commonjs/ui-format/common.js.map +1 -1
- package/lib/commonjs/ui-format/groupChannel.js +0 -15
- package/lib/commonjs/ui-format/groupChannel.js.map +1 -1
- package/lib/commonjs/ui-format/openChannel.js +0 -4
- package/lib/commonjs/ui-format/openChannel.js.map +1 -1
- package/lib/module/hooks/index.js +3 -7
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/react-native.js +2 -2
- package/lib/module/hooks/react-native.js.map +1 -1
- package/lib/module/index.js +3 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/sendbird/attrs.js +6 -9
- package/lib/module/sendbird/attrs.js.map +1 -1
- package/lib/module/sendbird/channel.js +0 -1
- package/lib/module/sendbird/channel.js.map +1 -1
- package/lib/module/sendbird/message.js +4 -18
- package/lib/module/sendbird/message.js.map +1 -1
- package/lib/module/sendbird/user.js.map +1 -1
- package/lib/module/shared/arrayToMap.js +0 -4
- package/lib/module/shared/arrayToMap.js.map +1 -1
- package/lib/module/shared/bufferedRequest.js +5 -24
- package/lib/module/shared/bufferedRequest.js.map +1 -1
- package/lib/module/shared/file.js +187 -0
- package/lib/module/shared/file.js.map +1 -0
- package/lib/module/shared/index.js +12 -39
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/logger.js +3 -21
- package/lib/module/shared/logger.js.map +1 -1
- package/lib/module/shared/regex.js +3 -35
- package/lib/module/shared/regex.js.map +1 -1
- package/lib/module/ui-format/common.js +6 -9
- package/lib/module/ui-format/common.js.map +1 -1
- package/lib/module/ui-format/groupChannel.js +0 -7
- package/lib/module/ui-format/groupChannel.js.map +1 -1
- package/lib/module/ui-format/openChannel.js.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -3
- package/lib/typescript/src/shared/file.d.ts +68 -0
- package/lib/typescript/src/shared/index.d.ts +10 -16
- package/lib/typescript/src/shared/regex.d.ts +0 -6
- package/package.json +11 -7
- package/src/index.ts +3 -19
- package/src/sendbird/message.ts +1 -1
- package/src/shared/file.ts +193 -0
- package/src/shared/index.ts +10 -37
- package/src/shared/regex.ts +0 -34
- package/lib/commonjs/shared/pubsub.js +0 -54
- package/lib/commonjs/shared/pubsub.js.map +0 -1
- package/lib/module/shared/pubsub.js +0 -45
- package/lib/module/shared/pubsub.js.map +0 -1
- package/lib/typescript/src/shared/pubsub.d.ts +0 -8
- package/src/shared/pubsub.ts +0 -42
package/README.md
CHANGED
|
@@ -4,60 +4,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useUniqId = exports.useUniqHandlerId = exports.usePartialState = exports.useIsMountedRef = exports.useIsFirstMount = exports.useIIFE = exports.useFreshCallback = exports.useForceUpdate = exports.useDebounceEffect = exports.useAsyncLayoutEffect = exports.useAsyncEffect = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
11
|
-
const idPool = {};
|
|
12
9
|
|
|
10
|
+
const idPool = {};
|
|
13
11
|
const useUniqId = key => {
|
|
14
12
|
return (0, _react.useState)(() => {
|
|
15
13
|
if (!idPool[key]) idPool[key] = 1;
|
|
16
14
|
return idPool[key]++;
|
|
17
15
|
})[0];
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
exports.useUniqId = useUniqId;
|
|
21
|
-
|
|
22
18
|
const useUniqHandlerId = name => {
|
|
23
19
|
const id = useUniqId(name);
|
|
24
20
|
return `${name}_${id}`;
|
|
25
21
|
};
|
|
26
|
-
|
|
27
22
|
exports.useUniqHandlerId = useUniqHandlerId;
|
|
28
|
-
|
|
29
23
|
const useForceUpdate = () => {
|
|
30
24
|
const [, updater] = (0, _react.useState)(0);
|
|
31
25
|
return (0, _react.useCallback)(() => updater(prev => prev + 1), []);
|
|
32
26
|
};
|
|
33
|
-
|
|
34
27
|
exports.useForceUpdate = useForceUpdate;
|
|
35
|
-
|
|
36
28
|
const useAsyncEffect = (asyncEffect, deps) => {
|
|
37
29
|
(0, _react.useEffect)(createAsyncEffectCallback(asyncEffect), deps);
|
|
38
30
|
};
|
|
39
|
-
|
|
40
31
|
exports.useAsyncEffect = useAsyncEffect;
|
|
41
|
-
|
|
42
32
|
const useAsyncLayoutEffect = (asyncEffect, deps) => {
|
|
43
33
|
(0, _react.useLayoutEffect)(createAsyncEffectCallback(asyncEffect), deps);
|
|
44
34
|
};
|
|
45
|
-
|
|
46
35
|
exports.useAsyncLayoutEffect = useAsyncLayoutEffect;
|
|
47
|
-
|
|
48
36
|
const useIIFE = callback => {
|
|
49
37
|
return iife(callback);
|
|
50
38
|
};
|
|
51
|
-
|
|
52
39
|
exports.useIIFE = useIIFE;
|
|
53
|
-
|
|
54
40
|
const iife = callback => callback();
|
|
55
|
-
|
|
56
41
|
const createAsyncEffectCallback = asyncEffect => () => {
|
|
57
42
|
const destructor = iife(asyncEffect);
|
|
58
43
|
return () => {
|
|
59
44
|
if (!destructor) return;
|
|
60
|
-
|
|
61
45
|
if (destructor instanceof Promise) {
|
|
62
46
|
iife(async () => {
|
|
63
47
|
const awaitedDestructor = await destructor;
|
|
@@ -68,7 +52,6 @@ const createAsyncEffectCallback = asyncEffect => () => {
|
|
|
68
52
|
}
|
|
69
53
|
};
|
|
70
54
|
};
|
|
71
|
-
|
|
72
55
|
const useIsMountedRef = () => {
|
|
73
56
|
const isMounted = (0, _react.useRef)(true);
|
|
74
57
|
(0, _react.useEffect)(() => {
|
|
@@ -78,22 +61,16 @@ const useIsMountedRef = () => {
|
|
|
78
61
|
}, []);
|
|
79
62
|
return isMounted;
|
|
80
63
|
};
|
|
81
|
-
|
|
82
64
|
exports.useIsMountedRef = useIsMountedRef;
|
|
83
|
-
|
|
84
65
|
const useIsFirstMount = () => {
|
|
85
66
|
const isFirstMount = (0, _react.useRef)(true);
|
|
86
|
-
|
|
87
67
|
if (isFirstMount.current) {
|
|
88
68
|
isFirstMount.current = false;
|
|
89
69
|
return true;
|
|
90
70
|
}
|
|
91
|
-
|
|
92
71
|
return isFirstMount.current;
|
|
93
72
|
};
|
|
94
|
-
|
|
95
73
|
exports.useIsFirstMount = useIsFirstMount;
|
|
96
|
-
|
|
97
74
|
const useFreshCallback = callback => {
|
|
98
75
|
const ref = (0, _react.useRef)(callback);
|
|
99
76
|
ref.current = callback;
|
|
@@ -101,9 +78,7 @@ const useFreshCallback = callback => {
|
|
|
101
78
|
return ref.current(...arguments);
|
|
102
79
|
}, []);
|
|
103
80
|
};
|
|
104
|
-
|
|
105
81
|
exports.useFreshCallback = useFreshCallback;
|
|
106
|
-
|
|
107
82
|
const useDebounceEffect = function (action, delay) {
|
|
108
83
|
let deps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
109
84
|
const timeoutRef = (0, _react.useRef)();
|
|
@@ -123,14 +98,12 @@ const useDebounceEffect = function (action, delay) {
|
|
|
123
98
|
};
|
|
124
99
|
}, [delay, ...deps]);
|
|
125
100
|
};
|
|
126
|
-
|
|
127
101
|
exports.useDebounceEffect = useDebounceEffect;
|
|
128
|
-
|
|
129
102
|
const usePartialState = initialState => {
|
|
130
|
-
return (0, _react.useReducer)((prev, state) => ({
|
|
103
|
+
return (0, _react.useReducer)((prev, state) => ({
|
|
104
|
+
...prev,
|
|
131
105
|
...state
|
|
132
106
|
}), initialState);
|
|
133
107
|
};
|
|
134
|
-
|
|
135
108
|
exports.usePartialState = usePartialState;
|
|
136
109
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["idPool","useUniqId","key","useState","useUniqHandlerId","name","id","useForceUpdate","updater","useCallback","prev","useAsyncEffect","asyncEffect","deps","useEffect","createAsyncEffectCallback","useAsyncLayoutEffect","useLayoutEffect","useIIFE","callback","iife","destructor","Promise","awaitedDestructor","useIsMountedRef","isMounted","useRef","current","useIsFirstMount","isFirstMount","useFreshCallback","ref","useDebounceEffect","action","delay","
|
|
1
|
+
{"version":3,"names":["_react","require","idPool","useUniqId","key","useState","exports","useUniqHandlerId","name","id","useForceUpdate","updater","useCallback","prev","useAsyncEffect","asyncEffect","deps","useEffect","createAsyncEffectCallback","useAsyncLayoutEffect","useLayoutEffect","useIIFE","callback","iife","destructor","Promise","awaitedDestructor","useIsMountedRef","isMounted","useRef","current","useIsFirstMount","isFirstMount","useFreshCallback","ref","arguments","useDebounceEffect","action","delay","length","undefined","timeoutRef","setTimeout","clearTimeout","usePartialState","initialState","useReducer","state"],"sources":["index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { DependencyList } from 'react';\nimport { useCallback, useEffect, useLayoutEffect, useReducer, useRef, useState } from 'react';\n\ntype Destructor = () => void;\ntype AsyncEffectCallback = () => void | Destructor | Promise<void> | Promise<Destructor>;\n\nconst idPool: { [key: string]: number } = {};\nexport const useUniqId = (key: string) => {\n return useState(() => {\n if (!idPool[key]) idPool[key] = 1;\n return idPool[key]++;\n })[0];\n};\n\nexport const useUniqHandlerId = (name: string) => {\n const id = useUniqId(name);\n return `${name}_${id}`;\n};\n\nexport const useForceUpdate = () => {\n const [, updater] = useState(0);\n return useCallback(() => updater((prev) => prev + 1), []);\n};\n\nexport const useAsyncEffect = (asyncEffect: AsyncEffectCallback, deps?: DependencyList) => {\n useEffect(createAsyncEffectCallback(asyncEffect), deps);\n};\nexport const useAsyncLayoutEffect = (asyncEffect: AsyncEffectCallback, deps?: DependencyList) => {\n useLayoutEffect(createAsyncEffectCallback(asyncEffect), deps);\n};\nexport const useIIFE = <T>(callback: () => T) => {\n return iife(callback);\n};\nconst iife = <T extends (...args: any[]) => any>(callback: T): ReturnType<T> => callback();\nconst createAsyncEffectCallback = (asyncEffect: AsyncEffectCallback) => () => {\n const destructor = iife(asyncEffect);\n return () => {\n if (!destructor) return;\n\n if (destructor instanceof Promise) {\n iife(async () => {\n const awaitedDestructor = await destructor;\n if (awaitedDestructor) awaitedDestructor();\n });\n } else {\n iife(destructor);\n }\n };\n};\n\nexport const useIsMountedRef = () => {\n const isMounted = useRef(true);\n\n useEffect(() => {\n return () => {\n isMounted.current = false;\n };\n }, []);\n\n return isMounted;\n};\n\nexport const useIsFirstMount = () => {\n const isFirstMount = useRef(true);\n\n if (isFirstMount.current) {\n isFirstMount.current = false;\n return true;\n }\n\n return isFirstMount.current;\n};\n\nexport const useFreshCallback = <T extends (...args: any[]) => any>(callback: T): T => {\n const ref = useRef<T>(callback);\n ref.current = callback;\n return useCallback(((...args) => ref.current(...args)) as T, []);\n};\n\nexport const useDebounceEffect = (action: () => void, delay: number, deps: DependencyList = []) => {\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n useEffect(() => {\n timeoutRef.current = setTimeout(async () => {\n try {\n await action();\n } finally {\n timeoutRef.current = undefined;\n }\n }, delay);\n\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = undefined;\n }\n };\n }, [delay, ...deps]);\n};\n\nexport const usePartialState = <S>(initialState: S) => {\n return useReducer((prev: S, state: Partial<S>) => ({ ...prev, ...state }), initialState);\n};\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAFA;;AAOA,MAAMC,MAAiC,GAAG,CAAC,CAAC;AACrC,MAAMC,SAAS,GAAIC,GAAW,IAAK;EACxC,OAAO,IAAAC,eAAQ,EAAC,MAAM;IACpB,IAAI,CAACH,MAAM,CAACE,GAAG,CAAC,EAAEF,MAAM,CAACE,GAAG,CAAC,GAAG,CAAC;IACjC,OAAOF,MAAM,CAACE,GAAG,CAAC,EAAE;EACtB,CAAC,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAACE,OAAA,CAAAH,SAAA,GAAAA,SAAA;AAEK,MAAMI,gBAAgB,GAAIC,IAAY,IAAK;EAChD,MAAMC,EAAE,GAAGN,SAAS,CAACK,IAAI,CAAC;EAC1B,OAAQ,GAAEA,IAAK,IAAGC,EAAG,EAAC;AACxB,CAAC;AAACH,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAEK,MAAMG,cAAc,GAAGA,CAAA,KAAM;EAClC,MAAM,GAAGC,OAAO,CAAC,GAAG,IAAAN,eAAQ,EAAC,CAAC,CAAC;EAC/B,OAAO,IAAAO,kBAAW,EAAC,MAAMD,OAAO,CAAEE,IAAI,IAAKA,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;AAC3D,CAAC;AAACP,OAAA,CAAAI,cAAA,GAAAA,cAAA;AAEK,MAAMI,cAAc,GAA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;AACtB,CAAC;AAACV,OAAA,CAAA8B,iBAAA,GAAAA,iBAAA;AAEK,MAAMQ,eAAe,GAAOC,YAAe,IAAK;EACrD,OAAO,IAAAC,iBAAU,EAAC,CAACjC,IAAO,EAAEkC,KAAiB,MAAM;IAAE,GAAGlC,IAAI;IAAE,GAAGkC;EAAM,CAAC,CAAC,EAAEF,YAAY,CAAC;AAC1F,CAAC;AAACvC,OAAA,CAAAsC,eAAA,GAAAA,eAAA"}
|
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useSafeAreaPadding = exports.useAppState = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
9
|
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
13
|
-
|
|
14
10
|
const edgePaddingMap = {
|
|
15
11
|
left: 'paddingLeft',
|
|
16
12
|
right: 'paddingRight',
|
|
17
13
|
top: 'paddingTop',
|
|
18
14
|
bottom: 'paddingBottom'
|
|
19
15
|
};
|
|
20
|
-
|
|
21
16
|
const useSafeAreaPadding = edges => {
|
|
22
17
|
const safeAreaInsets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
23
18
|
return edges.reduce((map, edge) => {
|
|
@@ -26,22 +21,19 @@ const useSafeAreaPadding = edges => {
|
|
|
26
21
|
return map;
|
|
27
22
|
}, {});
|
|
28
23
|
};
|
|
29
|
-
|
|
30
24
|
exports.useSafeAreaPadding = useSafeAreaPadding;
|
|
31
|
-
|
|
32
25
|
const useAppState = (type, listener) => {
|
|
33
26
|
const callbackRef = (0, _react.useRef)(listener);
|
|
34
27
|
callbackRef.current = listener;
|
|
35
28
|
(0, _react.useEffect)(() => {
|
|
36
29
|
const eventListener = state => callbackRef.current(state);
|
|
37
|
-
|
|
38
30
|
const subscriber = _reactNative.AppState.addEventListener(type, eventListener);
|
|
39
|
-
|
|
40
31
|
return () => {
|
|
41
32
|
// @ts-ignore
|
|
42
33
|
if (subscriber !== null && subscriber !== void 0 && subscriber.remove) {
|
|
43
34
|
subscriber.remove();
|
|
44
|
-
}
|
|
35
|
+
}
|
|
36
|
+
// @ts-ignore
|
|
45
37
|
else if (_reactNative.AppState.removeEventListener) {
|
|
46
38
|
// @ts-ignore
|
|
47
39
|
_reactNative.AppState.removeEventListener(type, eventListener);
|
|
@@ -49,6 +41,5 @@ const useAppState = (type, listener) => {
|
|
|
49
41
|
};
|
|
50
42
|
}, []);
|
|
51
43
|
};
|
|
52
|
-
|
|
53
44
|
exports.useAppState = useAppState;
|
|
54
45
|
//# sourceMappingURL=react-native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["edgePaddingMap","left","right","top","bottom","useSafeAreaPadding","edges","safeAreaInsets","useSafeAreaInsets","reduce","map","edge","paddingKey","useAppState","type","listener","callbackRef","useRef","current","useEffect","eventListener","state","subscriber","AppState","addEventListener","remove","removeEventListener"],"sources":["react-native.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport { AppState, AppStateEvent, AppStateStatus } from 'react-native';\nimport { EdgeInsets, useSafeAreaInsets } from 'react-native-safe-area-context';\n\ntype EdgePaddingMap = {\n left: 'paddingLeft';\n right: 'paddingRight';\n top: 'paddingTop';\n bottom: 'paddingBottom';\n};\nconst edgePaddingMap: EdgePaddingMap = {\n left: 'paddingLeft',\n right: 'paddingRight',\n top: 'paddingTop',\n bottom: 'paddingBottom',\n};\n\nexport const useSafeAreaPadding = <\n T extends keyof EdgeInsets,\n Result extends { [key in EdgePaddingMap[T]]: EdgeInsets[T] },\n>(\n edges: T[],\n): Result => {\n const safeAreaInsets = useSafeAreaInsets();\n return edges.reduce((map, edge) => {\n const paddingKey = edgePaddingMap[edge];\n map[paddingKey] = safeAreaInsets[edge];\n return map;\n }, {} as { [key in EdgePaddingMap[T]]: EdgeInsets[T] }) as Result;\n};\n\ntype AppStateListener = (status: AppStateStatus) => void;\n\nexport const useAppState = (type: AppStateEvent, listener: AppStateListener) => {\n const callbackRef = useRef<AppStateListener>(listener);\n callbackRef.current = listener;\n\n useEffect(() => {\n const eventListener = (state: AppStateStatus) => callbackRef.current(state);\n const subscriber = AppState.addEventListener(type, eventListener);\n\n return () => {\n // @ts-ignore\n if (subscriber?.remove) {\n subscriber.remove();\n }\n // @ts-ignore\n else if (AppState.removeEventListener) {\n // @ts-ignore\n AppState.removeEventListener(type, eventListener);\n }\n };\n }, []);\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeSafeAreaContext","edgePaddingMap","left","right","top","bottom","useSafeAreaPadding","edges","safeAreaInsets","useSafeAreaInsets","reduce","map","edge","paddingKey","exports","useAppState","type","listener","callbackRef","useRef","current","useEffect","eventListener","state","subscriber","AppState","addEventListener","remove","removeEventListener"],"sources":["react-native.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport { AppState, AppStateEvent, AppStateStatus } from 'react-native';\nimport { EdgeInsets, useSafeAreaInsets } from 'react-native-safe-area-context';\n\ntype EdgePaddingMap = {\n left: 'paddingLeft';\n right: 'paddingRight';\n top: 'paddingTop';\n bottom: 'paddingBottom';\n};\nconst edgePaddingMap: EdgePaddingMap = {\n left: 'paddingLeft',\n right: 'paddingRight',\n top: 'paddingTop',\n bottom: 'paddingBottom',\n};\n\nexport const useSafeAreaPadding = <\n T extends keyof EdgeInsets,\n Result extends { [key in EdgePaddingMap[T]]: EdgeInsets[T] },\n>(\n edges: T[],\n): Result => {\n const safeAreaInsets = useSafeAreaInsets();\n return edges.reduce((map, edge) => {\n const paddingKey = edgePaddingMap[edge];\n map[paddingKey] = safeAreaInsets[edge];\n return map;\n }, {} as { [key in EdgePaddingMap[T]]: EdgeInsets[T] }) as Result;\n};\n\ntype AppStateListener = (status: AppStateStatus) => void;\n\nexport const useAppState = (type: AppStateEvent, listener: AppStateListener) => {\n const callbackRef = useRef<AppStateListener>(listener);\n callbackRef.current = listener;\n\n useEffect(() => {\n const eventListener = (state: AppStateStatus) => callbackRef.current(state);\n const subscriber = AppState.addEventListener(type, eventListener);\n\n return () => {\n // @ts-ignore\n if (subscriber?.remove) {\n subscriber.remove();\n }\n // @ts-ignore\n else if (AppState.removeEventListener) {\n // @ts-ignore\n AppState.removeEventListener(type, eventListener);\n }\n };\n }, []);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAQA,MAAMG,cAA8B,GAAG;EACrCC,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAE,cAAc;EACrBC,GAAG,EAAE,YAAY;EACjBC,MAAM,EAAE;AACV,CAAC;AAEM,MAAMC,kBAAkB,GAI7BC,KAAU,IACC;EACX,MAAMC,cAAc,GAAG,IAAAC,6CAAiB,GAAE;EAC1C,OAAOF,KAAK,CAACG,MAAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAK;IACjC,MAAMC,UAAU,GAAGZ,cAAc,CAACW,IAAI,CAAC;IACvCD,GAAG,CAACE,UAAU,CAAC,GAAGL,cAAc,CAACI,IAAI,CAAC;IACtC,OAAOD,GAAG;EACZ,CAAC,EAAE,CAAC,CAAC,CAAkD;AACzD,CAAC;AAACG,OAAA,CAAAR,kBAAA,GAAAA,kBAAA;AAIK,MAAMS,WAAW,GAAGA,CAACC,IAAmB,EAAEC,QAA0B,KAAK;EAC9E,MAAMC,WAAW,GAAG,IAAAC,aAAM,EAAmBF,QAAQ,CAAC;EACtDC,WAAW,CAACE,OAAO,GAAGH,QAAQ;EAE9B,IAAAI,gBAAS,EAAC,MAAM;IACd,MAAMC,aAAa,GAAIC,KAAqB,IAAKL,WAAW,CAACE,OAAO,CAACG,KAAK,CAAC;IAC3E,MAAMC,UAAU,GAAGC,qBAAQ,CAACC,gBAAgB,CAACV,IAAI,EAAEM,aAAa,CAAC;IAEjE,OAAO,MAAM;MACX;MACA,IAAIE,UAAU,aAAVA,UAAU,eAAVA,UAAU,CAAEG,MAAM,EAAE;QACtBH,UAAU,CAACG,MAAM,EAAE;MACrB;MACA;MAAA,KACK,IAAIF,qBAAQ,CAACG,mBAAmB,EAAE;QACrC;QACAH,qBAAQ,CAACG,mBAAmB,CAACZ,IAAI,EAAEM,aAAa,CAAC;MACnD;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAACR,OAAA,CAAAC,WAAA,GAAAA,WAAA"}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -14,31 +14,9 @@ var _exportNames = {
|
|
|
14
14
|
SBErrorMessage: true,
|
|
15
15
|
Logger: true,
|
|
16
16
|
arrayToMap: true,
|
|
17
|
-
arrayToMapWithGetter: true
|
|
18
|
-
createPubSub: true,
|
|
19
|
-
urlRegexStrict: true,
|
|
20
|
-
urlRegexRough: true,
|
|
21
|
-
newLineRegex: true,
|
|
22
|
-
audioExtRegex: true,
|
|
23
|
-
videoExtRegex: true,
|
|
24
|
-
imageExtRegex: true,
|
|
25
|
-
getFileType: true,
|
|
26
|
-
getFileExtension: true,
|
|
27
|
-
replaceUrlAsComponents: true,
|
|
28
|
-
normalizeFileName: true,
|
|
29
|
-
emailRegex: true,
|
|
30
|
-
phoneRegex: true,
|
|
31
|
-
replaceWithRegex: true,
|
|
32
|
-
createMentionTemplateRegex: true,
|
|
33
|
-
BufferedRequest: true
|
|
17
|
+
arrayToMapWithGetter: true
|
|
34
18
|
};
|
|
35
19
|
exports.ASYNC_NOOP = void 0;
|
|
36
|
-
Object.defineProperty(exports, "BufferedRequest", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _bufferedRequest.BufferedRequest;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
20
|
Object.defineProperty(exports, "Logger", {
|
|
43
21
|
enumerable: true,
|
|
44
22
|
get: function () {
|
|
@@ -58,112 +36,47 @@ Object.defineProperty(exports, "arrayToMapWithGetter", {
|
|
|
58
36
|
return _arrayToMap.arrayToMapWithGetter;
|
|
59
37
|
}
|
|
60
38
|
});
|
|
61
|
-
Object.defineProperty(exports, "audioExtRegex", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function () {
|
|
64
|
-
return _regex.audioExtRegex;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(exports, "createMentionTemplateRegex", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
get: function () {
|
|
70
|
-
return _regex.createMentionTemplateRegex;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
Object.defineProperty(exports, "createPubSub", {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
get: function () {
|
|
76
|
-
return _pubsub.createPubSub;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
Object.defineProperty(exports, "emailRegex", {
|
|
80
|
-
enumerable: true,
|
|
81
|
-
get: function () {
|
|
82
|
-
return _regex.emailRegex;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
Object.defineProperty(exports, "getFileExtension", {
|
|
86
|
-
enumerable: true,
|
|
87
|
-
get: function () {
|
|
88
|
-
return _regex.getFileExtension;
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
Object.defineProperty(exports, "getFileType", {
|
|
92
|
-
enumerable: true,
|
|
93
|
-
get: function () {
|
|
94
|
-
return _regex.getFileType;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
39
|
exports.ifThenOr = ifThenOr;
|
|
98
|
-
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () {
|
|
101
|
-
return _regex.imageExtRegex;
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
exports.isFunction = void 0;
|
|
105
|
-
Object.defineProperty(exports, "newLineRegex", {
|
|
106
|
-
enumerable: true,
|
|
107
|
-
get: function () {
|
|
108
|
-
return _regex.newLineRegex;
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
Object.defineProperty(exports, "normalizeFileName", {
|
|
112
|
-
enumerable: true,
|
|
113
|
-
get: function () {
|
|
114
|
-
return _regex.normalizeFileName;
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
Object.defineProperty(exports, "phoneRegex", {
|
|
118
|
-
enumerable: true,
|
|
119
|
-
get: function () {
|
|
120
|
-
return _regex.phoneRegex;
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
Object.defineProperty(exports, "replaceUrlAsComponents", {
|
|
124
|
-
enumerable: true,
|
|
125
|
-
get: function () {
|
|
126
|
-
return _regex.replaceUrlAsComponents;
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
Object.defineProperty(exports, "replaceWithRegex", {
|
|
130
|
-
enumerable: true,
|
|
131
|
-
get: function () {
|
|
132
|
-
return _regex.replaceWithRegex;
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
exports.toMegabyte = void 0;
|
|
136
|
-
Object.defineProperty(exports, "urlRegexRough", {
|
|
137
|
-
enumerable: true,
|
|
138
|
-
get: function () {
|
|
139
|
-
return _regex.urlRegexRough;
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
Object.defineProperty(exports, "urlRegexStrict", {
|
|
143
|
-
enumerable: true,
|
|
144
|
-
get: function () {
|
|
145
|
-
return _regex.urlRegexStrict;
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
Object.defineProperty(exports, "videoExtRegex", {
|
|
149
|
-
enumerable: true,
|
|
150
|
-
get: function () {
|
|
151
|
-
return _regex.videoExtRegex;
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
|
|
40
|
+
exports.toMegabyte = exports.isFunction = void 0;
|
|
155
41
|
var _logger = require("./shared/logger");
|
|
156
|
-
|
|
157
42
|
var _arrayToMap = _interopRequireWildcard(require("./shared/arrayToMap"));
|
|
158
|
-
|
|
159
|
-
var _pubsub = require("./shared/pubsub");
|
|
160
|
-
|
|
161
43
|
var _regex = require("./shared/regex");
|
|
162
|
-
|
|
44
|
+
Object.keys(_regex).forEach(function (key) {
|
|
45
|
+
if (key === "default" || key === "__esModule") return;
|
|
46
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
47
|
+
if (key in exports && exports[key] === _regex[key]) return;
|
|
48
|
+
Object.defineProperty(exports, key, {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _regex[key];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
163
55
|
var _bufferedRequest = require("./shared/bufferedRequest");
|
|
164
|
-
|
|
56
|
+
Object.keys(_bufferedRequest).forEach(function (key) {
|
|
57
|
+
if (key === "default" || key === "__esModule") return;
|
|
58
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
59
|
+
if (key in exports && exports[key] === _bufferedRequest[key]) return;
|
|
60
|
+
Object.defineProperty(exports, key, {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _bufferedRequest[key];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
var _file = require("./shared/file");
|
|
68
|
+
Object.keys(_file).forEach(function (key) {
|
|
69
|
+
if (key === "default" || key === "__esModule") return;
|
|
70
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
71
|
+
if (key in exports && exports[key] === _file[key]) return;
|
|
72
|
+
Object.defineProperty(exports, key, {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _file[key];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
});
|
|
165
79
|
var _shared = require("./shared");
|
|
166
|
-
|
|
167
80
|
Object.keys(_shared).forEach(function (key) {
|
|
168
81
|
if (key === "default" || key === "__esModule") return;
|
|
169
82
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -175,9 +88,7 @@ Object.keys(_shared).forEach(function (key) {
|
|
|
175
88
|
}
|
|
176
89
|
});
|
|
177
90
|
});
|
|
178
|
-
|
|
179
91
|
var _hooks = require("./hooks");
|
|
180
|
-
|
|
181
92
|
Object.keys(_hooks).forEach(function (key) {
|
|
182
93
|
if (key === "default" || key === "__esModule") return;
|
|
183
94
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -189,9 +100,7 @@ Object.keys(_hooks).forEach(function (key) {
|
|
|
189
100
|
}
|
|
190
101
|
});
|
|
191
102
|
});
|
|
192
|
-
|
|
193
103
|
var _reactNative = require("./hooks/react-native");
|
|
194
|
-
|
|
195
104
|
Object.keys(_reactNative).forEach(function (key) {
|
|
196
105
|
if (key === "default" || key === "__esModule") return;
|
|
197
106
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -203,9 +112,7 @@ Object.keys(_reactNative).forEach(function (key) {
|
|
|
203
112
|
}
|
|
204
113
|
});
|
|
205
114
|
});
|
|
206
|
-
|
|
207
115
|
var _groupChannel = require("./ui-format/groupChannel");
|
|
208
|
-
|
|
209
116
|
Object.keys(_groupChannel).forEach(function (key) {
|
|
210
117
|
if (key === "default" || key === "__esModule") return;
|
|
211
118
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -217,9 +124,7 @@ Object.keys(_groupChannel).forEach(function (key) {
|
|
|
217
124
|
}
|
|
218
125
|
});
|
|
219
126
|
});
|
|
220
|
-
|
|
221
127
|
var _openChannel = require("./ui-format/openChannel");
|
|
222
|
-
|
|
223
128
|
Object.keys(_openChannel).forEach(function (key) {
|
|
224
129
|
if (key === "default" || key === "__esModule") return;
|
|
225
130
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -231,9 +136,7 @@ Object.keys(_openChannel).forEach(function (key) {
|
|
|
231
136
|
}
|
|
232
137
|
});
|
|
233
138
|
});
|
|
234
|
-
|
|
235
139
|
var _common = require("./ui-format/common");
|
|
236
|
-
|
|
237
140
|
Object.keys(_common).forEach(function (key) {
|
|
238
141
|
if (key === "default" || key === "__esModule") return;
|
|
239
142
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -245,9 +148,7 @@ Object.keys(_common).forEach(function (key) {
|
|
|
245
148
|
}
|
|
246
149
|
});
|
|
247
150
|
});
|
|
248
|
-
|
|
249
151
|
var _channel = require("./sendbird/channel");
|
|
250
|
-
|
|
251
152
|
Object.keys(_channel).forEach(function (key) {
|
|
252
153
|
if (key === "default" || key === "__esModule") return;
|
|
253
154
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -259,9 +160,7 @@ Object.keys(_channel).forEach(function (key) {
|
|
|
259
160
|
}
|
|
260
161
|
});
|
|
261
162
|
});
|
|
262
|
-
|
|
263
163
|
var _message = require("./sendbird/message");
|
|
264
|
-
|
|
265
164
|
Object.keys(_message).forEach(function (key) {
|
|
266
165
|
if (key === "default" || key === "__esModule") return;
|
|
267
166
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -273,9 +172,7 @@ Object.keys(_message).forEach(function (key) {
|
|
|
273
172
|
}
|
|
274
173
|
});
|
|
275
174
|
});
|
|
276
|
-
|
|
277
175
|
var _attrs = require("./sendbird/attrs");
|
|
278
|
-
|
|
279
176
|
Object.keys(_attrs).forEach(function (key) {
|
|
280
177
|
if (key === "default" || key === "__esModule") return;
|
|
281
178
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -287,9 +184,7 @@ Object.keys(_attrs).forEach(function (key) {
|
|
|
287
184
|
}
|
|
288
185
|
});
|
|
289
186
|
});
|
|
290
|
-
|
|
291
187
|
var _user = require("./sendbird/user");
|
|
292
|
-
|
|
293
188
|
Object.keys(_user).forEach(function (key) {
|
|
294
189
|
if (key === "default" || key === "__esModule") return;
|
|
295
190
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -301,36 +196,22 @@ Object.keys(_user).forEach(function (key) {
|
|
|
301
196
|
}
|
|
302
197
|
});
|
|
303
198
|
});
|
|
304
|
-
|
|
305
199
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
306
|
-
|
|
307
200
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
308
|
-
|
|
309
201
|
const NOOP = () => void 0;
|
|
310
|
-
|
|
311
202
|
exports.NOOP = NOOP;
|
|
312
|
-
|
|
313
203
|
const ASYNC_NOOP = async () => void 0;
|
|
314
|
-
|
|
315
204
|
exports.ASYNC_NOOP = ASYNC_NOOP;
|
|
316
|
-
|
|
317
205
|
const PASS = val => val;
|
|
318
|
-
|
|
319
206
|
exports.PASS = PASS;
|
|
320
|
-
|
|
321
207
|
const toMegabyte = byte => byte / 1024 / 1024;
|
|
322
|
-
|
|
323
208
|
exports.toMegabyte = toMegabyte;
|
|
324
|
-
|
|
325
209
|
const isFunction = param => typeof param === 'function';
|
|
326
|
-
|
|
327
210
|
exports.isFunction = isFunction;
|
|
328
|
-
|
|
329
211
|
function ifThenOr(cond, then, or) {
|
|
330
212
|
if (cond) return then;
|
|
331
213
|
return or;
|
|
332
214
|
}
|
|
333
|
-
|
|
334
215
|
const SBErrorCode = {
|
|
335
216
|
NON_AUTHORIZED: 400108,
|
|
336
217
|
CHANNEL_NOT_FOUND_SERVER: 400201,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NOOP","ASYNC_NOOP","PASS","val","toMegabyte","byte","isFunction","param","ifThenOr","cond","then","or","SBErrorCode","NON_AUTHORIZED","CHANNEL_NOT_FOUND_SERVER","CHANNEL_NOT_FOUND_SDK","SBErrorMessage","ACL"],"sources":["index.ts"],"sourcesContent":["export { Logger } from './shared/logger';\nexport { default as arrayToMap, arrayToMapWithGetter } from './shared/arrayToMap';\nexport { createPubSub } from './shared/pubsub';\nexport {\n urlRegexStrict,\n urlRegexRough,\n newLineRegex,\n audioExtRegex,\n videoExtRegex,\n imageExtRegex,\n getFileType,\n getFileExtension,\n replaceUrlAsComponents,\n normalizeFileName,\n emailRegex,\n phoneRegex,\n replaceWithRegex,\n createMentionTemplateRegex,\n} from './shared/regex';\nexport { BufferedRequest } from './shared/bufferedRequest';\n\nexport * from './shared';\n\nexport * from './hooks';\nexport * from './hooks/react-native';\nexport * from './ui-format/groupChannel';\nexport * from './ui-format/openChannel';\nexport * from './ui-format/common';\nexport * from './sendbird/channel';\nexport * from './sendbird/message';\nexport * from './sendbird/attrs';\nexport * from './sendbird/user';\n\nexport const NOOP: () => void = () => void 0;\nexport const ASYNC_NOOP = async () => void 0;\nexport const PASS = <T>(val: T) => val;\nexport const toMegabyte = (byte: number) => byte / 1024 / 1024;\nexport const isFunction = (param?: unknown): param is Function => typeof param === 'function';\n\nexport function ifThenOr<T>(cond: boolean, then: T): T | undefined;\nexport function ifThenOr<T, V>(cond: boolean, then: T, or: V): T | V;\nexport function ifThenOr(cond: boolean, then: unknown, or?: unknown) {\n if (cond) return then;\n return or;\n}\n\nexport const SBErrorCode = {\n NON_AUTHORIZED: 400108,\n CHANNEL_NOT_FOUND_SERVER: 400201,\n CHANNEL_NOT_FOUND_SDK: 900500,\n};\nexport const SBErrorMessage = {\n ACL:\n 'Sendbird provides various access control options when using the Chat SDK.\\n' +\n 'By default, the Allow retrieving user list attribute is turned on to facilitate creating sample apps.\\n' +\n 'However, this may grant access to unwanted data or operations, leading to potential security concerns.\\n' +\n 'To manage your access control settings, you can turn on or off each setting on Sendbird Dashboard.',\n};\n\nexport type {\n UserStruct,\n FilterByValueType,\n UnionToIntersection,\n OmittedValues,\n PartialDeep,\n Optional,\n ContextValue,\n OnBeforeHandler,\n SendbirdMessage,\n SendbirdChatSDK,\n SendbirdChannel,\n SendbirdBaseChannel,\n SendbirdGroupChannel,\n SendbirdOpenChannel,\n SendbirdUser,\n SendbirdMember,\n SendbirdBaseMessage,\n SendbirdUserMessage,\n SendbirdFileMessage,\n SendbirdAdminMessage,\n SendbirdGroupChannelCreateParams,\n SendbirdFileMessageCreateParams,\n SendbirdUserMessageCreateParams,\n SendbirdError,\n SendbirdMessageCollection,\n SendbirdGroupChannelCollection,\n NotificationFiles,\n NotificationMentionedUsers,\n NotificationTranslations,\n PartialNullable,\n SendbirdDataPayload,\n SendbirdPreviousMessageListQuery,\n SendbirdSendableMessage,\n SendbirdOpenChannelListQuery,\n SendbirdGroupChannelListQuery,\n SendbirdGroupChannelUpdateParams,\n SendbirdUserMessageUpdateParams,\n SendbirdFileMessageUpdateParams,\n SendbirdUserUpdateParams,\n SendbirdRestrictedUser,\n SendbirdReaction,\n SendbirdEmojiContainer,\n SendbirdEmoji,\n SendbirdEmojiCategory,\n SendbirdOpenChannelUpdateParams,\n SendbirdOpenChannelCreateParams,\n SendbirdParticipant,\n} from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAgBA;;AAEA;;AAAA;EAA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BC,qBAAqB,EAAE;AAHE,CAApB;;AAKA,MAAMC,cAAc,GAAG;EAC5BC,GAAG,EACD,gFACA,yGADA,GAEA,0GAFA,GAGA;AAL0B,CAAvB"}
|
|
1
|
+
{"version":3,"names":["_logger","require","_arrayToMap","_interopRequireWildcard","_regex","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_bufferedRequest","_file","_shared","_hooks","_reactNative","_groupChannel","_openChannel","_common","_channel","_message","_attrs","_user","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","NOOP","ASYNC_NOOP","PASS","val","toMegabyte","byte","isFunction","param","ifThenOr","cond","then","or","SBErrorCode","NON_AUTHORIZED","CHANNEL_NOT_FOUND_SERVER","CHANNEL_NOT_FOUND_SDK","SBErrorMessage","ACL"],"sources":["index.ts"],"sourcesContent":["export { Logger } from './shared/logger';\nexport { default as arrayToMap, arrayToMapWithGetter } from './shared/arrayToMap';\nexport * from './shared/regex';\nexport * from './shared/bufferedRequest';\nexport * from './shared/file';\nexport * from './shared';\n\nexport * from './hooks';\nexport * from './hooks/react-native';\nexport * from './ui-format/groupChannel';\nexport * from './ui-format/openChannel';\nexport * from './ui-format/common';\nexport * from './sendbird/channel';\nexport * from './sendbird/message';\nexport * from './sendbird/attrs';\nexport * from './sendbird/user';\n\nexport const NOOP: () => void = () => void 0;\nexport const ASYNC_NOOP = async () => void 0;\nexport const PASS = <T>(val: T) => val;\nexport const toMegabyte = (byte: number) => byte / 1024 / 1024;\nexport const isFunction = (param?: unknown): param is Function => typeof param === 'function';\n\nexport function ifThenOr<T>(cond: boolean, then: T): T | undefined;\nexport function ifThenOr<T, V>(cond: boolean, then: T, or: V): T | V;\nexport function ifThenOr(cond: boolean, then: unknown, or?: unknown) {\n if (cond) return then;\n return or;\n}\n\nexport const SBErrorCode = {\n NON_AUTHORIZED: 400108,\n CHANNEL_NOT_FOUND_SERVER: 400201,\n CHANNEL_NOT_FOUND_SDK: 900500,\n};\nexport const SBErrorMessage = {\n ACL:\n 'Sendbird provides various access control options when using the Chat SDK.\\n' +\n 'By default, the Allow retrieving user list attribute is turned on to facilitate creating sample apps.\\n' +\n 'However, this may grant access to unwanted data or operations, leading to potential security concerns.\\n' +\n 'To manage your access control settings, you can turn on or off each setting on Sendbird Dashboard.',\n};\n\nexport type {\n UserStruct,\n FilterByValueType,\n UnionToIntersection,\n OmittedValues,\n PartialDeep,\n Optional,\n ContextValue,\n OnBeforeHandler,\n SendbirdMessage,\n SendbirdChatSDK,\n SendbirdChannel,\n SendbirdBaseChannel,\n SendbirdGroupChannel,\n SendbirdOpenChannel,\n SendbirdUser,\n SendbirdMember,\n SendbirdBaseMessage,\n SendbirdUserMessage,\n SendbirdFileMessage,\n SendbirdAdminMessage,\n SendbirdGroupChannelCreateParams,\n SendbirdFileMessageCreateParams,\n SendbirdUserMessageCreateParams,\n SendbirdError,\n SendbirdMessageCollection,\n SendbirdGroupChannelCollection,\n NotificationFiles,\n NotificationMentionedUsers,\n NotificationTranslations,\n PartialNullable,\n SendbirdDataPayload,\n SendbirdPreviousMessageListQuery,\n SendbirdSendableMessage,\n SendbirdOpenChannelListQuery,\n SendbirdGroupChannelListQuery,\n SendbirdGroupChannelUpdateParams,\n SendbirdUserMessageUpdateParams,\n SendbirdFileMessageUpdateParams,\n SendbirdUserUpdateParams,\n SendbirdRestrictedUser,\n SendbirdReaction,\n SendbirdEmojiContainer,\n SendbirdEmoji,\n SendbirdEmojiCategory,\n SendbirdOpenChannelUpdateParams,\n SendbirdOpenChannelCreateParams,\n SendbirdParticipant,\n} from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAAI,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UAAU;AAACtC,OAAA,CAAAqC,UAAA,GAAAA,UAAA;AAIvF,SAASE,QAAQA,CAACC,IAAa,EAAEC,IAAa,EAAEC,EAAY,EAAE;EACnE,IAAIF,IAAI,EAAE,OAAOC,IAAI;EACrB,OAAOC,EAAE;AACX;AAEO,MAAMC,WAAW,GAAG;EACzBC,cAAc,EAAE,MAAM;EACtBC,wBAAwB,EAAE,MAAM;EAChCC,qBAAqB,EAAE;AACzB,CAAC;AAAC9C,OAAA,CAAA2C,WAAA,GAAAA,WAAA;AACK,MAAMI,cAAc,GAAG;EAC5BC,GAAG,EACD,6EAA6E,GAC7E,yGAAyG,GACzG,0GAA0G,GAC1G;AACJ,CAAC;AAAChD,OAAA,CAAA+C,cAAA,GAAAA,cAAA"}
|
|
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PremiumFeatures = exports.ApplicationAttributes = void 0;
|
|
7
|
-
let ApplicationAttributes
|
|
8
|
-
exports.ApplicationAttributes = ApplicationAttributes;
|
|
9
|
-
|
|
10
|
-
(function (ApplicationAttributes) {
|
|
7
|
+
let ApplicationAttributes = /*#__PURE__*/function (ApplicationAttributes) {
|
|
11
8
|
ApplicationAttributes["reactions"] = "reactions";
|
|
12
9
|
ApplicationAttributes["message_search_v3"] = "message_search_v3";
|
|
13
10
|
ApplicationAttributes["enable_og_tag"] = "enable_og_tag";
|
|
@@ -33,12 +30,10 @@ exports.ApplicationAttributes = ApplicationAttributes;
|
|
|
33
30
|
ApplicationAttributes["allow_group_channel_delete_from_sdk"] = "allow_group_channel_delete_from_sdk";
|
|
34
31
|
ApplicationAttributes["allow_operators_to_ban_operators"] = "allow_operators_to_ban_operators";
|
|
35
32
|
ApplicationAttributes["allow_operators_to_edit_operators"] = "allow_operators_to_edit_operators";
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(function (PremiumFeatures) {
|
|
33
|
+
return ApplicationAttributes;
|
|
34
|
+
}({});
|
|
35
|
+
exports.ApplicationAttributes = ApplicationAttributes;
|
|
36
|
+
let PremiumFeatures = /*#__PURE__*/function (PremiumFeatures) {
|
|
42
37
|
PremiumFeatures["reactions"] = "reactions";
|
|
43
38
|
PremiumFeatures["moderation_group"] = "moderation_group";
|
|
44
39
|
PremiumFeatures["message_search_v3"] = "message_search_v3";
|
|
@@ -53,5 +48,7 @@ exports.PremiumFeatures = PremiumFeatures;
|
|
|
53
48
|
PremiumFeatures["desk"] = "desk";
|
|
54
49
|
PremiumFeatures["bot_interface"] = "bot_interface";
|
|
55
50
|
PremiumFeatures["auto_trans"] = "auto_trans";
|
|
56
|
-
|
|
51
|
+
return PremiumFeatures;
|
|
52
|
+
}({});
|
|
53
|
+
exports.PremiumFeatures = PremiumFeatures;
|
|
57
54
|
//# sourceMappingURL=attrs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ApplicationAttributes","PremiumFeatures"],"sources":["attrs.ts"],"sourcesContent":["export enum ApplicationAttributes {\n reactions = 'reactions',\n message_search_v3 = 'message_search_v3',\n enable_og_tag = 'enable_og_tag',\n use_last_seen_at = 'use_last_seen_at',\n enable_message_threading = 'enable_message_threading',\n allow_message_update_from_sdk = 'allow_message_update_from_sdk',\n allow_group_channel_create_from_sdk = 'allow_group_channel_create_from_sdk',\n allow_migration_api = 'allow_migration_api',\n allow_only_operator_sdk_to_update_group_channel_image = 'allow_only_operator_sdk_to_update_group_channel_image',\n allow_user_update_from_sdk = 'allow_user_update_from_sdk',\n allow_broadcast_channel = 'allow_broadcast_channel',\n allow_sdk_file_message_urls = 'allow_sdk_file_message_urls',\n allow_group_channel_leave_from_sdk = 'allow_group_channel_leave_from_sdk',\n allow_user_list_from_sdk = 'allow_user_list_from_sdk',\n allow_group_channel_invite_from_sdk = 'allow_group_channel_invite_from_sdk',\n allow_only_operator_sdk_to_update_group_channel_name = 'allow_only_operator_sdk_to_update_group_channel_name',\n allow_group_channel_update_from_sdk = 'allow_group_channel_update_from_sdk',\n allow_super_group_channel = 'allow_super_group_channel',\n allow_non_operators_to_mention_channel = 'allow_non_operators_to_mention_channel',\n allow_file_messages_from_sdk = 'allow_file_messages_from_sdk',\n allow_open_channel_create_from_sdk = 'allow_open_channel_create_from_sdk',\n allow_anonymous_message_update = 'allow_anonymous_message_update',\n allow_group_channel_delete_from_sdk = 'allow_group_channel_delete_from_sdk',\n allow_operators_to_ban_operators = 'allow_operators_to_ban_operators',\n allow_operators_to_edit_operators = 'allow_operators_to_edit_operators',\n}\n\nexport enum PremiumFeatures {\n reactions = 'reactions',\n moderation_group = 'moderation_group',\n message_search_v3 = 'message_search_v3',\n data_export = 'data_export',\n migration = 'migration',\n delivery_receipt = 'delivery_receipt',\n auto_thumbnail = 'auto_thumbnail',\n image_moderation = 'image_moderation',\n super_group_channel = 'super_group_channel',\n announcement = 'announcement',\n moderation_open = 'moderation_open',\n desk = 'desk',\n bot_interface = 'bot_interface',\n auto_trans = 'auto_trans',\n}\n"],"mappings":";;;;;;IAAYA,
|
|
1
|
+
{"version":3,"names":["ApplicationAttributes","exports","PremiumFeatures"],"sources":["attrs.ts"],"sourcesContent":["export enum ApplicationAttributes {\n reactions = 'reactions',\n message_search_v3 = 'message_search_v3',\n enable_og_tag = 'enable_og_tag',\n use_last_seen_at = 'use_last_seen_at',\n enable_message_threading = 'enable_message_threading',\n allow_message_update_from_sdk = 'allow_message_update_from_sdk',\n allow_group_channel_create_from_sdk = 'allow_group_channel_create_from_sdk',\n allow_migration_api = 'allow_migration_api',\n allow_only_operator_sdk_to_update_group_channel_image = 'allow_only_operator_sdk_to_update_group_channel_image',\n allow_user_update_from_sdk = 'allow_user_update_from_sdk',\n allow_broadcast_channel = 'allow_broadcast_channel',\n allow_sdk_file_message_urls = 'allow_sdk_file_message_urls',\n allow_group_channel_leave_from_sdk = 'allow_group_channel_leave_from_sdk',\n allow_user_list_from_sdk = 'allow_user_list_from_sdk',\n allow_group_channel_invite_from_sdk = 'allow_group_channel_invite_from_sdk',\n allow_only_operator_sdk_to_update_group_channel_name = 'allow_only_operator_sdk_to_update_group_channel_name',\n allow_group_channel_update_from_sdk = 'allow_group_channel_update_from_sdk',\n allow_super_group_channel = 'allow_super_group_channel',\n allow_non_operators_to_mention_channel = 'allow_non_operators_to_mention_channel',\n allow_file_messages_from_sdk = 'allow_file_messages_from_sdk',\n allow_open_channel_create_from_sdk = 'allow_open_channel_create_from_sdk',\n allow_anonymous_message_update = 'allow_anonymous_message_update',\n allow_group_channel_delete_from_sdk = 'allow_group_channel_delete_from_sdk',\n allow_operators_to_ban_operators = 'allow_operators_to_ban_operators',\n allow_operators_to_edit_operators = 'allow_operators_to_edit_operators',\n}\n\nexport enum PremiumFeatures {\n reactions = 'reactions',\n moderation_group = 'moderation_group',\n message_search_v3 = 'message_search_v3',\n data_export = 'data_export',\n migration = 'migration',\n delivery_receipt = 'delivery_receipt',\n auto_thumbnail = 'auto_thumbnail',\n image_moderation = 'image_moderation',\n super_group_channel = 'super_group_channel',\n announcement = 'announcement',\n moderation_open = 'moderation_open',\n desk = 'desk',\n bot_interface = 'bot_interface',\n auto_trans = 'auto_trans',\n}\n"],"mappings":";;;;;;IAAYA,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAAAC,OAAA,CAAAD,qBAAA,GAAAA,qBAAA;AAAA,IA4BrBE,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAAAD,OAAA,CAAAC,eAAA,GAAAA,eAAA"}
|