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

@frui.ts/screens

Package Overview
Dependencies
Maintainers
5
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frui.ts/screens - npm Package Compare versions

Comparing version 0.16.3 to 0.16.4

6

dist/navigation/types.d.ts

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

import { IScreen } from "../structure/types";
import { NavigationPath } from "./navigationPath";

@@ -6,2 +7,7 @@ export interface ICanNavigate {

}
export interface INavigatedEvent {
screenName: string;
screen: IScreen;
url: string;
}
export interface INavigationParent<TChild> {

@@ -8,0 +14,0 @@ getChildNavigationPath(child: TChild | string | number, childParams?: any): NavigationPath;

4

dist/navigation/urlNavigationAdapter.js

@@ -95,2 +95,6 @@ "use strict";

}
var navigateEvent = new CustomEvent("fruitsNavigated", {
detail: { screenName: screen.name, screen: screen, url: window.location.toString() },
});
window.dispatchEvent(navigateEvent);
this.lastActiveScreen = screen;

@@ -97,0 +101,0 @@ };

6

package.json

@@ -6,3 +6,3 @@ {

},
"version": "0.16.3",
"version": "0.16.4",
"description": "Frui.ts core classes for application structure and navigation",

@@ -38,3 +38,3 @@ "keywords": [

"dependencies": {
"@frui.ts/helpers": "^0.16.3",
"@frui.ts/helpers": "^0.16.4",
"query-string": "^6.9.0",

@@ -49,3 +49,3 @@ "route-parser": "^0.0.5"

},
"gitHead": "fc58a17e18bea299f6aeb6f1090569443eccaafc"
"gitHead": "ed46bca2ee935924ebac2428711a42c7ef566552"
}

@@ -252,1 +252,19 @@ # `@frui.ts/screens`

Implement `ICanNavigate` if you want to control the navigation path for children and react to changes in the navigation path. Note that the conductors described above already implement `ICanNavigate`.
### Navigated event
`UrlNavigationAdapter` triggers the `fruitsNavigated` event.
You can listen for this event in your application, for example to report `pageView` to Google Analytics.
```typescript
interface INavigatedEvent {
screenName: string;
screen: IScreen;
url: string;
}
window.addEventListener("fruitsNavigated", this.onNavigated);
onNavigated(e: CustomEventInit<INavigatedEvent>) {
console.log(e.detail?.url);
}
```

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