Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wazo/euc-plugins-sdk

Package Overview
Dependencies
Maintainers
5
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wazo/euc-plugins-sdk - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

10

lib/cjs/app.js

@@ -55,2 +55,3 @@ "use strict";

const EVENT_ON_NEW_SESSION = 'wazo/EVENT_ON_NEW_SESSION';
const EVENT_UPDATE_BADGE = 'wazo/EVENT_UPDATE_BADGE';
// Portal

@@ -143,2 +144,3 @@ const EVENT_ON_CONNECTED_TO_STACK = 'wazo/EVENT_ON_CONNECTED_TO_STACK';

this.getRemoteVideoStream = (call) => Wazo.Phone.phone.getRemoteVideoStream(call);
this.updateBadge = (args) => this._sendMessage(EVENT_UPDATE_BADGE, Object.assign(Object.assign({}, args), { entityId: args.entityId || this._entityId || 'update-badge-null-entity-id' }));
// Portal

@@ -229,5 +231,5 @@ this.changeToolbarDisplay = (display) => this._sendMessage(EVENT_CHANGE_TOOLBAR_DISPLAY, { display });

// @ts-ignore (Mobile)
return window.ReactNativeWebView.postMessage(JSON.stringify(Object.assign({ type, _pluginId: this._pluginId }, payload)));
return window.ReactNativeWebView.postMessage(JSON.stringify(Object.assign({ type, _pluginId: this._pluginId, _entityId: this._entityId }, payload)));
}
window.parent.postMessage(Object.assign({ type, _pluginId: this._pluginId }, payload), '*');
window.parent.postMessage(Object.assign({ type, _pluginId: this._pluginId, _entityId: this._entityId }, payload), '*');
};

@@ -270,2 +272,5 @@ this._sendQueuedMessages = () => {

}
if (configuration.entityId) {
this._entityId = configuration.entityId;
}
};

@@ -298,2 +303,3 @@ this._resetEvents = () => {

this._baseUrl = null;
this._entityId = null;
this._isBackground = !window.name;

@@ -300,0 +306,0 @@ this._queuedMessages = [];

21

lib/cjs/softphone.js

@@ -228,16 +228,19 @@ "use strict";

configureServer(server) {
this._sendMessage(BRIDGE_CONFIG_RETRIEVED, { server });
this._sendMessage(BRIDGE_CONFIG_RETRIEVED, { config: { server } });
}
updateCss(iframeCss = null) {
if (iframeCss) {
if (this.wrapper) {
Object.keys(iframeCss).forEach(key => {
// @ts-ignore: fix CSS key here
this.wrapper.style[key] = iframeCss[key];
});
}
this.iframeCss = iframeCss;
if (!iframeCss) {
return;
}
if (this.wrapper) {
Object.keys(iframeCss).forEach(key => {
// @ts-ignore: fix CSS key here
this.wrapper.style[key] = iframeCss[key];
});
}
this.iframeCss = iframeCss;
}
_createIframe(cb) {
// Remove iframe before creating it.
this.remove();
this.wrapper = document.createElement('div');

@@ -244,0 +247,0 @@ this.wrapper.id = 'iframe-wrapper';

@@ -1,2 +0,2 @@

import { Call, Room, Contact, Context, Meeting, UserInfo, Extra, ModalParameter, Sounds, PluginConfiguration, WDASession, PortalSession } from './types';
import { Call, Room, Contact, Context, Meeting, UserInfo, Extra, ModalParameter, Sounds, PluginConfiguration, WDASession, PortalSession, UpdateBadgeArgs } from './types';
declare global {

@@ -18,2 +18,3 @@ var _setPluginId: Function;

_baseUrl: string | null;
_entityId: string | null;
_queuedMessages: DelayedMessage[];

@@ -75,2 +76,3 @@ _isBackground: boolean;

getRemoteVideoStream: (call: Call) => any;
updateBadge: (args: UpdateBadgeArgs) => any;
changeToolbarDisplay: (display: boolean) => any;

@@ -77,0 +79,0 @@ _onMessage: (event: MessageEvent) => void;

@@ -189,2 +189,3 @@ export declare enum HostClientType {

pluginId?: string;
entityId?: string;
}

@@ -243,2 +244,17 @@ export interface ModalParameter {

}
type MuiColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
export type UpdateBadgeArgs = {
entityId?: string;
badgeContent: string | number;
color?: MuiColor;
variant?: 'dot' | 'standard';
max?: number;
overlap?: 'circular' | 'rectangular';
showZero?: boolean;
anchorOrigin?: {
horizontal: 'left' | 'right';
vertical: 'top' | 'bottom';
};
};
export {};
//# sourceMappingURL=types.d.ts.map

@@ -44,2 +44,3 @@ // Global

const EVENT_ON_NEW_SESSION = 'wazo/EVENT_ON_NEW_SESSION';
const EVENT_UPDATE_BADGE = 'wazo/EVENT_UPDATE_BADGE';
// Portal

@@ -132,2 +133,3 @@ const EVENT_ON_CONNECTED_TO_STACK = 'wazo/EVENT_ON_CONNECTED_TO_STACK';

this.getRemoteVideoStream = (call) => Wazo.Phone.phone.getRemoteVideoStream(call);
this.updateBadge = (args) => this._sendMessage(EVENT_UPDATE_BADGE, { ...args, entityId: args.entityId || this._entityId || 'update-badge-null-entity-id' });
// Portal

@@ -218,5 +220,5 @@ this.changeToolbarDisplay = (display) => this._sendMessage(EVENT_CHANGE_TOOLBAR_DISPLAY, { display });

// @ts-ignore (Mobile)
return window.ReactNativeWebView.postMessage(JSON.stringify({ type, _pluginId: this._pluginId, ...payload }));
return window.ReactNativeWebView.postMessage(JSON.stringify({ type, _pluginId: this._pluginId, _entityId: this._entityId, ...payload }));
}
window.parent.postMessage({ type, _pluginId: this._pluginId, ...payload }, '*');
window.parent.postMessage({ type, _pluginId: this._pluginId, _entityId: this._entityId, ...payload }, '*');
};

@@ -263,2 +265,5 @@ this._sendQueuedMessages = () => {

}
if (configuration.entityId) {
this._entityId = configuration.entityId;
}
};

@@ -291,2 +296,3 @@ this._resetEvents = () => {

this._baseUrl = null;
this._entityId = null;
this._isBackground = !window.name;

@@ -293,0 +299,0 @@ this._queuedMessages = [];

@@ -222,16 +222,19 @@ /* eslint-disable no-unused-vars */

configureServer(server) {
this._sendMessage(BRIDGE_CONFIG_RETRIEVED, { server });
this._sendMessage(BRIDGE_CONFIG_RETRIEVED, { config: { server } });
}
updateCss(iframeCss = null) {
if (iframeCss) {
if (this.wrapper) {
Object.keys(iframeCss).forEach(key => {
// @ts-ignore: fix CSS key here
this.wrapper.style[key] = iframeCss[key];
});
}
this.iframeCss = iframeCss;
if (!iframeCss) {
return;
}
if (this.wrapper) {
Object.keys(iframeCss).forEach(key => {
// @ts-ignore: fix CSS key here
this.wrapper.style[key] = iframeCss[key];
});
}
this.iframeCss = iframeCss;
}
_createIframe(cb) {
// Remove iframe before creating it.
this.remove();
this.wrapper = document.createElement('div');

@@ -238,0 +241,0 @@ this.wrapper.id = 'iframe-wrapper';

@@ -1,2 +0,2 @@

import { Call, Room, Contact, Context, Meeting, UserInfo, Extra, ModalParameter, Sounds, PluginConfiguration, WDASession, PortalSession } from './types';
import { Call, Room, Contact, Context, Meeting, UserInfo, Extra, ModalParameter, Sounds, PluginConfiguration, WDASession, PortalSession, UpdateBadgeArgs } from './types';
declare global {

@@ -18,2 +18,3 @@ var _setPluginId: Function;

_baseUrl: string | null;
_entityId: string | null;
_queuedMessages: DelayedMessage[];

@@ -75,2 +76,3 @@ _isBackground: boolean;

getRemoteVideoStream: (call: Call) => any;
updateBadge: (args: UpdateBadgeArgs) => any;
changeToolbarDisplay: (display: boolean) => any;

@@ -77,0 +79,0 @@ _onMessage: (event: MessageEvent) => void;

@@ -189,2 +189,3 @@ export declare enum HostClientType {

pluginId?: string;
entityId?: string;
}

@@ -243,2 +244,17 @@ export interface ModalParameter {

}
type MuiColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
export type UpdateBadgeArgs = {
entityId?: string;
badgeContent: string | number;
color?: MuiColor;
variant?: 'dot' | 'standard';
max?: number;
overlap?: 'circular' | 'rectangular';
showZero?: boolean;
anchorOrigin?: {
horizontal: 'left' | 'right';
vertical: 'top' | 'bottom';
};
};
export {};
//# sourceMappingURL=types.d.ts.map
{
"name": "@wazo/euc-plugins-sdk",
"version": "0.0.14",
"version": "0.0.15",
"description": "Wazo's Unified Enterprise Communication JavaScript Software Development Kit.",

@@ -5,0 +5,0 @@ "author": "Wazo (http://wazo.io)",

@@ -13,3 +13,5 @@ /* global Wazo */

PluginConfiguration,
WDASession, PortalSession
WDASession,
PortalSession,
UpdateBadgeArgs,
} from './types';

@@ -68,2 +70,3 @@

const EVENT_ON_NEW_SESSION = 'wazo/EVENT_ON_NEW_SESSION';
const EVENT_UPDATE_BADGE = 'wazo/EVENT_UPDATE_BADGE';

@@ -89,2 +92,3 @@ // Portal

_baseUrl: string | null;
_entityId: string | null;
_queuedMessages: DelayedMessage[];

@@ -126,2 +130,3 @@ _isBackground: boolean;

this._baseUrl = null;
this._entityId = null;
this._isBackground = !window.name;

@@ -258,2 +263,4 @@ this._queuedMessages = [];

updateBadge = (args: UpdateBadgeArgs) => this._sendMessage(EVENT_UPDATE_BADGE, { ...args, entityId: args.entityId || this._entityId || 'update-badge-null-entity-id' });
// Portal

@@ -352,6 +359,6 @@ changeToolbarDisplay = (display: boolean) => this._sendMessage(EVENT_CHANGE_TOOLBAR_DISPLAY, { display });

// @ts-ignore (Mobile)
return window.ReactNativeWebView.postMessage(JSON.stringify({ type, _pluginId: this._pluginId, ...payload }));
return window.ReactNativeWebView.postMessage(JSON.stringify({ type, _pluginId: this._pluginId, _entityId: this._entityId, ...payload }));
}
window.parent.postMessage({ type, _pluginId: this._pluginId, ...payload }, '*');
window.parent.postMessage({ type, _pluginId: this._pluginId, _entityId: this._entityId, ...payload }, '*');
}

@@ -408,2 +415,5 @@

}
if (configuration.entityId) {
this._entityId = configuration.entityId;
}
}

@@ -410,0 +420,0 @@

@@ -286,20 +286,24 @@ /* eslint-disable no-unused-vars */

configureServer(server: string) {
this._sendMessage(BRIDGE_CONFIG_RETRIEVED, { server });
this._sendMessage(BRIDGE_CONFIG_RETRIEVED, { config: { server } });
}
updateCss(iframeCss: IframeCss | null = null) {
if (iframeCss) {
if (!iframeCss) {
return
}
if (this.wrapper) {
Object.keys(iframeCss).forEach(key => {
// @ts-ignore: fix CSS key here
this.wrapper.style[key] = iframeCss[key];
});
}
if (this.wrapper) {
Object.keys(iframeCss).forEach(key => {
// @ts-ignore: fix CSS key here
this.wrapper.style[key] = iframeCss[key];
});
}
this.iframeCss = iframeCss;
}
this.iframeCss = iframeCss;
}
_createIframe(cb?: ((this: GlobalEventHandlers, ev: Event) => any) | null) {
// Remove iframe before creating it.
this.remove();
this.wrapper = document.createElement('div');

@@ -306,0 +310,0 @@ this.wrapper.id = 'iframe-wrapper';

@@ -191,2 +191,3 @@ export enum HostClientType {

pluginId?: string,
entityId?: string,
}

@@ -241,1 +242,15 @@

}
type MuiColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
export type UpdateBadgeArgs = {
entityId?: string,
badgeContent: string | number,
color?: MuiColor,
variant?: 'dot' | 'standard',
max?: number,
overlap?: 'circular' | 'rectangular',
showZero?: boolean,
anchorOrigin?: { horizontal: 'left' | 'right', vertical: 'top' | 'bottom' }
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc