admin-shell-messaging
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -39,3 +39,3 @@ import { CommonParams, InsertOnBreadcrumbParams } from "./types"; | ||
*/ | ||
export declare function insertNewBreadcrumbLevel({ newLevelName, previousLevelUrl, executeOnShell, }: InsertOnBreadcrumbParams): void; | ||
export declare function insertNewBreadcrumbLevel({ newLevelName, previousLevelUrl, fromWithinTopmostWindow, }: InsertOnBreadcrumbParams): void; | ||
/** | ||
@@ -71,2 +71,2 @@ * Function to remove a previously set breadcrumb extra level by | ||
*/ | ||
export declare function clearBreadcrumbExtraLevels({ executeOnShell }: CommonParams): void; | ||
export declare function clearBreadcrumbExtraLevels({ fromWithinTopmostWindow, }: CommonParams): void; |
@@ -42,3 +42,3 @@ "use strict"; | ||
*/ | ||
function insertNewBreadcrumbLevel({ newLevelName, previousLevelUrl, executeOnShell, }) { | ||
function insertNewBreadcrumbLevel({ newLevelName, previousLevelUrl, fromWithinTopmostWindow, }) { | ||
const params = actions_1.ACTIONS.INSERT_BREADCRUMB_EXTRA_LEVEL({ | ||
@@ -48,3 +48,3 @@ newLevelName, | ||
}); | ||
if (executeOnShell) { | ||
if (fromWithinTopmostWindow) { | ||
window.postMessage(params, "*"); | ||
@@ -87,5 +87,5 @@ } | ||
*/ | ||
function clearBreadcrumbExtraLevels({ executeOnShell }) { | ||
function clearBreadcrumbExtraLevels({ fromWithinTopmostWindow, }) { | ||
const params = actions_1.ACTIONS.CLEAR_BREADCRUMB_EXTRA_LEVELS(); | ||
if (executeOnShell) { | ||
if (fromWithinTopmostWindow) { | ||
window.postMessage(params, "*"); | ||
@@ -92,0 +92,0 @@ } |
@@ -66,3 +66,3 @@ import { CommonParams } from "./types"; | ||
* */ | ||
export declare function startLoading({ executeOnShell }: CommonParams): boolean; | ||
export declare function startLoading({ fromWithinTopmostWindow }: CommonParams): boolean; | ||
/** | ||
@@ -129,2 +129,2 @@ * Function to warn the admin-shell to stop the global | ||
* */ | ||
export declare function stopLoading({ executeOnShell }: CommonParams): boolean; | ||
export declare function stopLoading({ fromWithinTopmostWindow }: CommonParams): boolean; |
@@ -69,5 +69,5 @@ "use strict"; | ||
* */ | ||
function startLoading({ executeOnShell }) { | ||
function startLoading({ fromWithinTopmostWindow }) { | ||
const params = actions_1.ACTIONS.START_LOADING(); | ||
if (executeOnShell) { | ||
if (fromWithinTopmostWindow) { | ||
window.postMessage(params, "*"); | ||
@@ -142,5 +142,5 @@ } | ||
* */ | ||
function stopLoading({ executeOnShell }) { | ||
function stopLoading({ fromWithinTopmostWindow }) { | ||
const params = actions_1.ACTIONS.STOP_LOADING(); | ||
if (executeOnShell) { | ||
if (fromWithinTopmostWindow) { | ||
window.postMessage(params, "*"); | ||
@@ -147,0 +147,0 @@ } |
@@ -7,6 +7,7 @@ import { ACTION_TYPES } from "./actions"; | ||
* window objects. __You should only set this to true if | ||
* you're calling this function on the admin-shell itself__. | ||
* you're calling this function on the admin-shell itself__ | ||
* (which is the topmost window). | ||
* @default false | ||
* */ | ||
executeOnShell?: boolean; | ||
fromWithinTopmostWindow?: boolean; | ||
} | ||
@@ -13,0 +14,0 @@ export interface InsertOnBreadcrumbParams extends CommonParams { |
{ | ||
"name": "admin-shell-messaging", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Admin shell Iframe messaging package", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -44,3 +44,3 @@ import { ACTIONS } from "./actions"; | ||
previousLevelUrl, | ||
executeOnShell, | ||
fromWithinTopmostWindow, | ||
}: InsertOnBreadcrumbParams) { | ||
@@ -52,3 +52,3 @@ const params = ACTIONS.INSERT_BREADCRUMB_EXTRA_LEVEL({ | ||
if (executeOnShell) { | ||
if (fromWithinTopmostWindow) { | ||
window.postMessage(params, "*"); | ||
@@ -90,6 +90,8 @@ } else { | ||
*/ | ||
export function clearBreadcrumbExtraLevels({ executeOnShell }: CommonParams) { | ||
export function clearBreadcrumbExtraLevels({ | ||
fromWithinTopmostWindow, | ||
}: CommonParams) { | ||
const params = ACTIONS.CLEAR_BREADCRUMB_EXTRA_LEVELS(); | ||
if (executeOnShell) { | ||
if (fromWithinTopmostWindow) { | ||
window.postMessage(params, "*"); | ||
@@ -96,0 +98,0 @@ } else { |
@@ -68,6 +68,6 @@ import { ACTIONS } from "./actions"; | ||
* */ | ||
export function startLoading({ executeOnShell }: CommonParams) { | ||
export function startLoading({ fromWithinTopmostWindow }: CommonParams) { | ||
const params = ACTIONS.START_LOADING(); | ||
if (executeOnShell) { | ||
if (fromWithinTopmostWindow) { | ||
window.postMessage(params, "*"); | ||
@@ -142,6 +142,6 @@ } else { | ||
* */ | ||
export function stopLoading({ executeOnShell }: CommonParams) { | ||
export function stopLoading({ fromWithinTopmostWindow }: CommonParams) { | ||
const params = ACTIONS.STOP_LOADING(); | ||
if (executeOnShell) { | ||
if (fromWithinTopmostWindow) { | ||
window.postMessage(params, "*"); | ||
@@ -148,0 +148,0 @@ } else { |
@@ -8,6 +8,7 @@ import { ACTION_TYPES } from "./actions"; | ||
* window objects. __You should only set this to true if | ||
* you're calling this function on the admin-shell itself__. | ||
* you're calling this function on the admin-shell itself__ | ||
* (which is the topmost window). | ||
* @default false | ||
* */ | ||
executeOnShell?: boolean; | ||
fromWithinTopmostWindow?: boolean; | ||
} | ||
@@ -14,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28843
855