@cuemath/leap 3.3.35-m → 3.3.37-m
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.
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
const { publish:
|
|
5
|
-
studentClassroomId:
|
|
6
|
-
})
|
|
7
|
-
return { sendSticker:
|
|
8
|
-
(
|
|
9
|
-
const
|
|
1
|
+
import { useCallback as r } from "react";
|
|
2
|
+
import d from "../../../communication/hooks/use-inclass-message-broker/use-inclass-message-broker.js";
|
|
3
|
+
const n = (m, e) => {
|
|
4
|
+
const { publish: a } = d({
|
|
5
|
+
studentClassroomId: m
|
|
6
|
+
});
|
|
7
|
+
return { sendSticker: r(
|
|
8
|
+
(s, o) => {
|
|
9
|
+
const t = {
|
|
10
10
|
message: {
|
|
11
11
|
data: {
|
|
12
12
|
selectedSticker: {
|
|
13
|
-
id:
|
|
14
|
-
name:
|
|
13
|
+
id: s.id,
|
|
14
|
+
name: s.name
|
|
15
15
|
},
|
|
16
|
-
effectId:
|
|
16
|
+
effectId: o
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
type: "STICKERS"
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
a == null || a({
|
|
22
22
|
eventName: "STICKERS",
|
|
23
|
-
eventPayload:
|
|
24
|
-
});
|
|
23
|
+
eventPayload: t
|
|
24
|
+
}), e == null || e(t);
|
|
25
25
|
},
|
|
26
|
-
[e]
|
|
27
|
-
)
|
|
26
|
+
[e, a]
|
|
27
|
+
) };
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
n as useHandleStickerSend
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=use-handle-sticker-send.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-handle-sticker-send.js","sources":["../../../../../src/features/stickers/sticker-selector/hooks/use-handle-sticker-send.tsx"],"sourcesContent":["import type {\n IStickerData,\n TStickerAnimationEffects,\n TStickersPayload,\n} from '../../stickers-types';\n\nimport {
|
|
1
|
+
{"version":3,"file":"use-handle-sticker-send.js","sources":["../../../../../src/features/stickers/sticker-selector/hooks/use-handle-sticker-send.tsx"],"sourcesContent":["import type {\n IStickerData,\n TStickerAnimationEffects,\n TStickersPayload,\n} from '../../stickers-types';\n\nimport { useCallback } from 'react';\n\nimport useInClassMessageBroker from '../../../communication/hooks/use-inclass-message-broker/use-inclass-message-broker';\n\nexport const useHandleStickerSend = (\n studentClassroomId: string,\n onStickerSend?: (payload: TStickersPayload) => void,\n) => {\n const { publish } = useInClassMessageBroker({\n studentClassroomId,\n });\n\n const sendSticker = useCallback(\n (sticker: IStickerData, effect: TStickerAnimationEffects) => {\n const payload: TStickersPayload = {\n message: {\n data: {\n selectedSticker: {\n id: sticker.id,\n name: sticker.name,\n },\n effectId: effect,\n },\n },\n type: 'STICKERS',\n };\n\n publish?.({\n eventName: 'STICKERS',\n eventPayload: payload,\n });\n\n onStickerSend?.(payload);\n },\n [onStickerSend, publish],\n );\n\n return { sendSticker };\n};\n"],"names":["useHandleStickerSend","studentClassroomId","onStickerSend","publish","useInClassMessageBroker","useCallback","sticker","effect","payload"],"mappings":";;AAUa,MAAAA,IAAuB,CAClCC,GACAC,MACG;AACG,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAwB;AAAA,IAC1C,oBAAAH;AAAA,EAAA,CACD;AA2BD,SAAO,EAAE,aAzBWI;AAAA,IAClB,CAACC,GAAuBC,MAAqC;AAC3D,YAAMC,IAA4B;AAAA,QAChC,SAAS;AAAA,UACP,MAAM;AAAA,YACJ,iBAAiB;AAAA,cACf,IAAIF,EAAQ;AAAA,cACZ,MAAMA,EAAQ;AAAA,YAChB;AAAA,YACA,UAAUC;AAAA,UACZ;AAAA,QACF;AAAA,QACA,MAAM;AAAA,MAAA;AAGE,MAAAJ,KAAA,QAAAA,EAAA;AAAA,QACR,WAAW;AAAA,QACX,cAAcK;AAAA,MAAA,IAGhBN,KAAA,QAAAA,EAAgBM;AAAA,IAClB;AAAA,IACA,CAACN,GAAeC,CAAO;AAAA,EAAA,EAGJ;AACvB;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7090,9 +7090,8 @@ export declare const useGetTestHelpData: (initialId?: string, initialQuery?: voi
|
|
|
7090
7090
|
} & Record<string, unknown>) | undefined;
|
|
7091
7091
|
};
|
|
7092
7092
|
|
|
7093
|
-
export declare const useHandleStickerSend: (studentClassroomId: string) => {
|
|
7093
|
+
export declare const useHandleStickerSend: (studentClassroomId: string, onStickerSend?: (payload: TStickersPayload) => void) => {
|
|
7094
7094
|
sendSticker: (sticker: IStickerData, effect: TStickerAnimationEffects) => void;
|
|
7095
|
-
lastPayload: TStickersPayload | null;
|
|
7096
7095
|
};
|
|
7097
7096
|
|
|
7098
7097
|
export declare const useHomePageJourney: () => {
|