@vnejs/plugins.views.scenario.interface 0.1.31 → 0.1.33
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/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "@vnejs/contracts.views.scenario.interface";
|
|
2
|
+
import "@vnejs/contracts.text.meet";
|
|
2
3
|
import { regPlugin } from "@vnejs/shared";
|
|
3
4
|
import { PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.views.scenario.interface";
|
|
4
5
|
import { InterfaceController } from "./modules/controller.js";
|
|
@@ -9,7 +9,11 @@ const mapWall = ({ uid = "", tokens = [], speaker = "", speakerInfo = {}, transi
|
|
|
9
9
|
const { color, opacity = 1, speakerColor = "white" } = speakerStyleInfo;
|
|
10
10
|
const locs = props.locs ?? {};
|
|
11
11
|
const meet = speakerInfo.meet ?? 0;
|
|
12
|
-
const
|
|
12
|
+
const defaultSpeakerName = props.PARAMS.TEXT.DEFAULT_SPEAKER_NAME;
|
|
13
|
+
const speakerName = locs[`speaker.${speaker}.${meet}`] ??
|
|
14
|
+
locs[`speaker.${speaker}`] ??
|
|
15
|
+
speakersInfo[speaker]?.displayName ??
|
|
16
|
+
(speaker !== defaultSpeakerName ? speaker : undefined);
|
|
13
17
|
return { speakerName, speakerColor, uid, color, opacity, tokens, tokensVisible: tokens.length, transition, propsByView };
|
|
14
18
|
};
|
|
15
19
|
export const InterfaceViewWall = (props) => {
|
package/dist/view/index.js
CHANGED
|
@@ -9,10 +9,14 @@ const Interface = (props) => {
|
|
|
9
9
|
const onClick = useCallback(() => emit(EVENTS.INTERFACE.INTERACT), [emit, EVENTS.INTERFACE.INTERACT]);
|
|
10
10
|
const isRealForce = useIsForceHook(isForce);
|
|
11
11
|
const meet = speakerInfo.meet ?? 0;
|
|
12
|
-
const
|
|
12
|
+
const speakersInfo = PARAMS.TEXT.SPEAKERS_INFO;
|
|
13
|
+
const defaultSpeakerName = PARAMS.TEXT.DEFAULT_SPEAKER_NAME;
|
|
14
|
+
const speakerName = useMemo(() => locs[`speaker.${speaker}.${meet}`] ??
|
|
15
|
+
locs[`speaker.${speaker}`] ??
|
|
16
|
+
speakersInfo[speaker]?.displayName ??
|
|
17
|
+
(speaker !== defaultSpeakerName ? speaker : undefined), [locs, speaker, meet, speakersInfo, defaultSpeakerName]);
|
|
13
18
|
const speakerText = speakerName ? `${`${locs[`prefix.${prefix}`] ?? ""} `}${speakerName}${` ${locs[`postfix.${postfix}`] ?? ""}`}` : ".";
|
|
14
19
|
const transition = isRealForce ? 0 : PARAMS.INTERFACE.TRANSITION;
|
|
15
|
-
const speakersInfo = PARAMS.TEXT.SPEAKERS_INFO;
|
|
16
20
|
const speakerStyleInfo = speakersInfo[speaker] ?? speakersInfo[PARAMS.TEXT.DEFAULT_SPEAKER_NAME];
|
|
17
21
|
const { color, opacity = 1, speakerColor = "white" } = speakerStyleInfo;
|
|
18
22
|
const propsCommon = useMemo(() => ({ isForce: isRealForce, transition, tokensVisible, tokens, wall, uid, locs }), [isRealForce, transition, tokensVisible, tokens, wall, uid, locs]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/plugins.views.scenario.interface",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"@vnejs/module.core": "~0.1.0",
|
|
38
38
|
"@vnejs/module.components": "~0.1.0",
|
|
39
39
|
"@vnejs/contracts.text": "~0.1.0",
|
|
40
|
+
"@vnejs/contracts.text.meet": "~0.1.0",
|
|
40
41
|
"@vnejs/contracts.text.wall": "~0.1.0",
|
|
41
42
|
"@vnejs/shared": "~0.1.0",
|
|
42
43
|
"@vnejs/uis.react": "~0.1.0",
|
package/src/index.ts
CHANGED
|
@@ -56,7 +56,12 @@ const mapWall = ({
|
|
|
56
56
|
const { color, opacity = 1, speakerColor = "white" } = speakerStyleInfo;
|
|
57
57
|
const locs = props.locs ?? {};
|
|
58
58
|
const meet = speakerInfo.meet ?? 0;
|
|
59
|
-
const
|
|
59
|
+
const defaultSpeakerName = props.PARAMS.TEXT.DEFAULT_SPEAKER_NAME;
|
|
60
|
+
const speakerName =
|
|
61
|
+
locs[`speaker.${speaker}.${meet}`] ??
|
|
62
|
+
locs[`speaker.${speaker}`] ??
|
|
63
|
+
speakersInfo[speaker]?.displayName ??
|
|
64
|
+
(speaker !== defaultSpeakerName ? speaker : undefined);
|
|
60
65
|
|
|
61
66
|
return { speakerName, speakerColor, uid, color, opacity, tokens, tokensVisible: tokens.length, transition, propsByView };
|
|
62
67
|
};
|
package/src/view/index.tsx
CHANGED
|
@@ -27,10 +27,18 @@ const Interface = (props: InterfaceComponentProps) => {
|
|
|
27
27
|
const isRealForce = useIsForceHook(isForce);
|
|
28
28
|
|
|
29
29
|
const meet = speakerInfo.meet ?? 0;
|
|
30
|
-
const
|
|
30
|
+
const speakersInfo = PARAMS.TEXT.SPEAKERS_INFO;
|
|
31
|
+
const defaultSpeakerName = PARAMS.TEXT.DEFAULT_SPEAKER_NAME;
|
|
32
|
+
const speakerName = useMemo(
|
|
33
|
+
() =>
|
|
34
|
+
locs[`speaker.${speaker}.${meet}`] ??
|
|
35
|
+
locs[`speaker.${speaker}`] ??
|
|
36
|
+
speakersInfo[speaker]?.displayName ??
|
|
37
|
+
(speaker !== defaultSpeakerName ? speaker : undefined),
|
|
38
|
+
[locs, speaker, meet, speakersInfo, defaultSpeakerName],
|
|
39
|
+
);
|
|
31
40
|
const speakerText = speakerName ? `${`${locs[`prefix.${prefix}`] ?? ""} `}${speakerName}${` ${locs[`postfix.${postfix}`] ?? ""}`}` : ".";
|
|
32
41
|
const transition = isRealForce ? 0 : PARAMS.INTERFACE.TRANSITION;
|
|
33
|
-
const speakersInfo = PARAMS.TEXT.SPEAKERS_INFO;
|
|
34
42
|
const speakerStyleInfo: TextSpeakerInfo = speakersInfo[speaker] ?? speakersInfo[PARAMS.TEXT.DEFAULT_SPEAKER_NAME];
|
|
35
43
|
|
|
36
44
|
const { color, opacity = 1, speakerColor = "white" } = speakerStyleInfo;
|