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

admin-shell-messaging

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

admin-shell-messaging - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

6

dist/breadcrumb.d.ts

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

import { CommonParams, InsertOnBreadcrumbParams } from "./types";
import { InsertOnBreadcrumbParams } from "./types";
/**

@@ -39,3 +39,3 @@ * Function to insert a new breadcrumb level.

*/
export declare function insertNewBreadcrumbLevel({ newLevelName, previousLevelUrl, fromWithinTopmostWindow, }: InsertOnBreadcrumbParams): void;
export declare function insertNewBreadcrumbLevel({ newLevelName, previousLevelUrl, }: InsertOnBreadcrumbParams): void;
/**

@@ -71,2 +71,2 @@ * Function to remove a previously set breadcrumb extra level by

*/
export declare function clearBreadcrumbExtraLevels({ fromWithinTopmostWindow, }: CommonParams): void;
export declare function clearBreadcrumbExtraLevels(): void;

@@ -42,3 +42,3 @@ "use strict";

*/
function insertNewBreadcrumbLevel({ newLevelName, previousLevelUrl, fromWithinTopmostWindow, }) {
function insertNewBreadcrumbLevel({ newLevelName, previousLevelUrl, }) {
const params = actions_1.ACTIONS.INSERT_BREADCRUMB_EXTRA_LEVEL({

@@ -48,8 +48,3 @@ newLevelName,

});
if (fromWithinTopmostWindow) {
window.postMessage(params, "*");
}
else {
window.top.postMessage(params, "*");
}
window.top.postMessage(params, "*");
}

@@ -87,12 +82,7 @@ exports.insertNewBreadcrumbLevel = insertNewBreadcrumbLevel;

*/
function clearBreadcrumbExtraLevels({ fromWithinTopmostWindow, }) {
function clearBreadcrumbExtraLevels() {
const params = actions_1.ACTIONS.CLEAR_BREADCRUMB_EXTRA_LEVELS();
if (fromWithinTopmostWindow) {
window.postMessage(params, "*");
}
else {
window.top.postMessage(params, "*");
}
window.top.postMessage(params, "*");
}
exports.clearBreadcrumbExtraLevels = clearBreadcrumbExtraLevels;
//# sourceMappingURL=breadcrumb.js.map
export { ACTION_TYPES, ACTIONS } from "./actions";
export { insertNewBreadcrumbLevel, clearBreadcrumbExtraLevels, } from "./breadcrumb";
export { startLoading, stopLoading } from "./loadbar";
export { InsertOnBreadcrumbParams, CommonParams, Message, ReceivedMessage, } from "./types";
export { InsertOnBreadcrumbParams, Message, ReceivedMessage } from "./types";

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

import { CommonParams } from "./types";
/**

@@ -66,3 +65,3 @@ * Function to warn the admin-shell to start the global

* */
export declare function startLoading({ fromWithinTopmostWindow }: CommonParams): boolean;
export declare function startLoading(): boolean;
/**

@@ -129,2 +128,2 @@ * Function to warn the admin-shell to stop the global

* */
export declare function stopLoading({ fromWithinTopmostWindow }: CommonParams): boolean;
export declare function stopLoading(): boolean;

@@ -69,10 +69,5 @@ "use strict";

* */
function startLoading({ fromWithinTopmostWindow }) {
function startLoading() {
const params = actions_1.ACTIONS.START_LOADING();
if (fromWithinTopmostWindow) {
window.postMessage(params, "*");
}
else {
window.top.postMessage(params, "*");
}
window.top.postMessage(params, "*");
return true;

@@ -142,10 +137,5 @@ }

* */
function stopLoading({ fromWithinTopmostWindow }) {
function stopLoading() {
const params = actions_1.ACTIONS.STOP_LOADING();
if (fromWithinTopmostWindow) {
window.postMessage(params, "*");
}
else {
window.top.postMessage(params, "*");
}
window.top.postMessage(params, "*");
return true;

@@ -152,0 +142,0 @@ }

import { ACTION_TYPES } from "./actions";
export interface CommonParams {
export interface InsertOnBreadcrumbParams {
/**
* When this variable is set to true, it will not send
* a message to the topmost window in the hierarchy of
* window objects. __You should only set this to true if
* you're calling this function on the admin-shell itself__
* (which is the topmost window).
* @default false
* */
fromWithinTopmostWindow?: boolean;
}
export interface InsertOnBreadcrumbParams extends CommonParams {
/**
* Name of the new breadcrumb level that must be inserted.

@@ -16,0 +5,0 @@ * */

{
"name": "admin-shell-messaging",
"version": "0.1.7",
"version": "0.1.8",
"description": "Admin shell Iframe messaging package",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

import { ACTIONS } from "./actions";
import { CommonParams, InsertOnBreadcrumbParams } from "./types";
import { InsertOnBreadcrumbParams } from "./types";

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

previousLevelUrl,
fromWithinTopmostWindow,
}: InsertOnBreadcrumbParams) {

@@ -52,7 +51,3 @@ const params = ACTIONS.INSERT_BREADCRUMB_EXTRA_LEVEL({

if (fromWithinTopmostWindow) {
window.postMessage(params, "*");
} else {
window.top.postMessage(params, "*");
}
window.top.postMessage(params, "*");
}

@@ -90,12 +85,5 @@

*/
export function clearBreadcrumbExtraLevels({
fromWithinTopmostWindow,
}: CommonParams) {
export function clearBreadcrumbExtraLevels() {
const params = ACTIONS.CLEAR_BREADCRUMB_EXTRA_LEVELS();
if (fromWithinTopmostWindow) {
window.postMessage(params, "*");
} else {
window.top.postMessage(params, "*");
}
window.top.postMessage(params, "*");
}

@@ -7,7 +7,2 @@ export { ACTION_TYPES, ACTIONS } from "./actions";

export { startLoading, stopLoading } from "./loadbar";
export {
InsertOnBreadcrumbParams,
CommonParams,
Message,
ReceivedMessage,
} from "./types";
export { InsertOnBreadcrumbParams, Message, ReceivedMessage } from "./types";
import { ACTIONS } from "./actions";
import { CommonParams } from "./types";

@@ -68,10 +67,6 @@ /**

* */
export function startLoading({ fromWithinTopmostWindow }: CommonParams) {
export function startLoading() {
const params = ACTIONS.START_LOADING();
if (fromWithinTopmostWindow) {
window.postMessage(params, "*");
} else {
window.top.postMessage(params, "*");
}
window.top.postMessage(params, "*");

@@ -142,12 +137,8 @@ return true;

* */
export function stopLoading({ fromWithinTopmostWindow }: CommonParams) {
export function stopLoading() {
const params = ACTIONS.STOP_LOADING();
if (fromWithinTopmostWindow) {
window.postMessage(params, "*");
} else {
window.top.postMessage(params, "*");
}
window.top.postMessage(params, "*");
return true;
}
import { ACTION_TYPES } from "./actions";
export interface CommonParams {
export interface InsertOnBreadcrumbParams {
/**
* When this variable is set to true, it will not send
* a message to the topmost window in the hierarchy of
* window objects. __You should only set this to true if
* you're calling this function on the admin-shell itself__
* (which is the topmost window).
* @default false
* */
fromWithinTopmostWindow?: boolean;
}
export interface InsertOnBreadcrumbParams extends CommonParams {
/**
* Name of the new breadcrumb level that must be inserted.

@@ -18,0 +6,0 @@ * */

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