Socket
Socket
Sign inDemoInstall

@limetech/lime-web-components-interfaces

Package Overview
Dependencies
0
Maintainers
4
Versions
80
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.45.0 to 4.45.1

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [4.45.1](https://github.com/Lundalogik/lime-web-components/compare/v4.45.0...v4.45.1) (2022-04-27)
### Bug Fixes
* **navigation:** supply retry function to blocker ([9f45d77](https://github.com/Lundalogik/lime-web-components/commit/9f45d77bb874707ab27febd5b0b613b775952729)), closes [Lundalogik/crm-feature#2780](https://github.com/Lundalogik/crm-feature/issues/2780)
# [4.45.0](https://github.com/Lundalogik/lime-web-components/compare/v4.44.0...v4.45.0) (2022-04-22)

@@ -8,0 +19,0 @@

48

dist/service/navigation-service.interface.d.ts

@@ -66,4 +66,4 @@ /**

*
* To later on resume navigation that was blocked, you may save away the new
* location provided to the blocker function.
* To later on resume navigation that was blocked, you can call the supplied
* {@link Transition.retry} method.
*

@@ -77,20 +77,12 @@ * @note Blockers are not guaranteed to be executed upon a navigation event.

*
* let blocked = null;
*
* function myBlocker(newLocation) {
* if (!blocked) {
* showConfirmDialog().then(retry);
* }
* blocked = newLocation;
* function myBlocker(transition) {
* showConfirmDialog().then((shouldNavigate) => {
* if (shouldNavigate) {
* navigator.removeBlocker(myBlocker);
* transition.retry()
* }
* });
* return true;
* }
*
* function retry(yes) {
* if (yes) {
* navigator.removeBlocker(myBlocker);
* navigator.navigate(blocked);
* }
* blocked = null;
* }
*
* @param {Blocker} blocker function to be called before navigation

@@ -146,8 +138,24 @@ */

/**
* Function to retry navigation
*/
export declare type Retry = () => void;
/**
* {@link Transition} describes the transition when navigating from a
* {@link Location} to another {@link Location}.
*
* @param {Location} to location to navigate to
* @param {Location} from current location before navigation
* @param {Retry} retry function to retry navigation
*/
export declare type Transition = {
to: Location;
from: Location;
retry: Retry;
};
/**
* Function to determine if navigation should be blocked or not.
*
* @param {Location} newLocation location to navigate to
* @param {Location} currentLocation current location before navigation
* @param {Transition} transition the transition to evaluate
* @returns true if navigation should be blocked
*/
export declare type Blocker = (newLocation: Location, currentLocation: Location) => boolean;
export declare type Blocker = (transition: Transition) => boolean;
{
"name": "@limetech/lime-web-components-interfaces",
"version": "4.45.0",
"version": "4.45.1",
"author": "Lime Technologies",

@@ -33,3 +33,3 @@ "homepage": "https://github.com/Lundalogik/lime-web-components",

},
"gitHead": "faf942bde965d9177209ec6b87ed45da1875f193"
"gitHead": "f9139715d91081f162fc629b16498e759ccc65e7"
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc