fixed wrong import
This commit is contained in:
parent
ba1bcf226a
commit
64a00481f0
@ -1,5 +1,4 @@
|
||||
import * as tg from "generic-type-guard";
|
||||
import { iframeListener } from '../../IframeListener';
|
||||
|
||||
export const isMenuItemClickedEvent =
|
||||
new tg.IsInterface().withProperties({
|
||||
@ -11,11 +10,3 @@ export const isMenuItemClickedEvent =
|
||||
export type MenuItemClickedEvent = tg.GuardedType<typeof isMenuItemClickedEvent>;
|
||||
|
||||
|
||||
export function sendMenuClickedEvent(menuItem: string) {
|
||||
iframeListener.postMessage({
|
||||
'type': 'menuItemClicked',
|
||||
'data': {
|
||||
menuItem: menuItem,
|
||||
} as MenuItemClickedEvent
|
||||
});
|
||||
}
|
11
front/src/Api/iframe/Ui/MenuItem.ts
Normal file
11
front/src/Api/iframe/Ui/MenuItem.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import type { MenuItemClickedEvent } from '../../Events/ui/MenuItemClickedEvent';
|
||||
import { iframeListener } from '../../IframeListener';
|
||||
|
||||
export function sendMenuClickedEvent(menuItem: string) {
|
||||
iframeListener.postMessage({
|
||||
'type': 'menuItemClicked',
|
||||
'data': {
|
||||
menuItem: menuItem,
|
||||
} as MenuItemClickedEvent
|
||||
});
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { Subscription } from 'rxjs';
|
||||
import { sendMenuClickedEvent } from '../../Api/Events/ui/MenuItemClickedEvent';
|
||||
import { registerMenuCommandStream } from '../../Api/Events/ui/MenuItemRegisterEvent';
|
||||
import { sendMenuClickedEvent } from '../../Api/iframe/Ui/MenuItem';
|
||||
import { connectionManager } from "../../Connexion/ConnectionManager";
|
||||
import { localUserStore } from "../../Connexion/LocalUserStore";
|
||||
import { worldFullWarningStream } from "../../Connexion/WorldFullWarningStream";
|
||||
|
@ -1,4 +1,3 @@
|
||||
import {registeredCallbacks} from "./Api/iframe/registeredCallbacks";
|
||||
import {
|
||||
IframeResponseEvent,
|
||||
IframeResponseEventMap,
|
||||
@ -6,15 +5,17 @@ import {
|
||||
TypedMessageEvent
|
||||
} from "./Api/Events/IframeEvent";
|
||||
import chat from "./Api/iframe/chat";
|
||||
import type {IframeCallback} from './Api/iframe/IframeApiContribution';
|
||||
import nav from "./Api/iframe/nav";
|
||||
import controls from "./Api/iframe/controls";
|
||||
import ui from "./Api/iframe/ui";
|
||||
import sound from "./Api/iframe/sound";
|
||||
import type { IframeCallback } from './Api/iframe/IframeApiContribution';
|
||||
import nav from "./Api/iframe/nav";
|
||||
import { registeredCallbacks } from "./Api/iframe/registeredCallbacks";
|
||||
import room from "./Api/iframe/room";
|
||||
import type {ButtonDescriptor} from "./Api/iframe/Ui/ButtonDescriptor";
|
||||
import type {Popup} from "./Api/iframe/Ui/Popup";
|
||||
import type {Sound} from "./Api/iframe/Sound/Sound";
|
||||
import sound from "./Api/iframe/sound";
|
||||
import type { Sound } from "./Api/iframe/Sound/Sound";
|
||||
import ui from "./Api/iframe/ui";
|
||||
import type { ButtonDescriptor } from "./Api/iframe/Ui/ButtonDescriptor";
|
||||
import type { Popup } from "./Api/iframe/Ui/Popup";
|
||||
|
||||
|
||||
const wa = {
|
||||
ui,
|
||||
@ -77,7 +78,7 @@ const wa = {
|
||||
/**
|
||||
* @deprecated Use WA.sound.loadSound instead
|
||||
*/
|
||||
loadSound(url: string) : Sound {
|
||||
loadSound(url: string): Sound {
|
||||
console.warn('Method WA.loadSound is deprecated. Please use WA.sound.loadSound instead');
|
||||
return sound.loadSound(url);
|
||||
},
|
||||
@ -85,7 +86,7 @@ const wa = {
|
||||
/**
|
||||
* @deprecated Use WA.nav.goToPage instead
|
||||
*/
|
||||
goToPage(url : string) : void {
|
||||
goToPage(url: string): void {
|
||||
console.warn('Method WA.goToPage is deprecated. Please use WA.nav.goToPage instead');
|
||||
nav.goToPage(url);
|
||||
},
|
||||
@ -101,7 +102,7 @@ const wa = {
|
||||
/**
|
||||
* @deprecated Use WA.nav.openCoWebSite instead
|
||||
*/
|
||||
openCoWebSite(url : string) : void{
|
||||
openCoWebSite(url: string): void {
|
||||
console.warn('Method WA.openCoWebSite is deprecated. Please use WA.nav.openCoWebSite instead');
|
||||
nav.openCoWebSite(url);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user