@entur-partner/micro-frontend 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.1.0](https://bitbucket.org/enturas/entur-partner-packages/compare/@entur-partner/micro-frontend@2.0.0...@entur-partner/micro-frontend@2.1.0) (2022-02-07)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **deps:** pin dependencies ([840fa3d](https://bitbucket.org/enturas/entur-partner-packages/commits/840fa3d44ce62deea2a69131d30da4d979bc8fe9))
11
+ - **deps:** pin dependencies ([0a33356](https://bitbucket.org/enturas/entur-partner-packages/commits/0a333563ff91fb711c39a45352fc31a49513ebaa))
12
+ - **deps:** update all non-major dependencies ([20fc6be](https://bitbucket.org/enturas/entur-partner-packages/commits/20fc6bed3831d05bd62ace84bc60ee48877a034c))
13
+
14
+ ### Features
15
+
16
+ - **menu provider:** add functionality to register navigate function for MF ([cb9b58d](https://bitbucket.org/enturas/entur-partner-packages/commits/cb9b58d5ccafc48195dfa8ad0b4bdca840365724))
17
+
6
18
  # [2.0.0](https://bitbucket.org/enturas/entur-partner-packages/compare/@entur-partner/micro-frontend@1.1.0...@entur-partner/micro-frontend@2.0.0) (2021-11-02)
7
19
 
8
20
  ### Reverts
package/dist/Payload.d.ts CHANGED
@@ -20,6 +20,7 @@ export interface MenuItem {
20
20
  all?: BusinessCapability[] | BusinessCapability;
21
21
  };
22
22
  }
23
+ export declare type NavigationFunction = (to: string) => void;
23
24
  export interface MicroFrontendPayload {
24
25
  /** Logged in auth0 user */
25
26
  user: User;
@@ -34,5 +35,9 @@ export interface MicroFrontendPayload {
34
35
  /** Log the user out */
35
36
  logout: () => void;
36
37
  /** Navigate to a micro frontend or an app shell location */
37
- navigate: (to: string) => void;
38
+ navigate: NavigationFunction;
39
+ /** Set which method to be used for navigation to micro frontend routes. This
40
+ * method is used for links in navigation. If this function is not called we
41
+ * will try to use the navigate function from the first menu item instead. */
42
+ setMFNavigate: (navigate: NavigationFunction) => void;
38
43
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { User } from './User';
2
- export { MicroFrontendPayload, MenuItem } from './Payload';
2
+ export { MicroFrontendPayload, MenuItem, NavigationFunction } from './Payload';
3
3
  export { MountEvent, UnmountEvent, createMountEvent, createUnmountEvent, MOUNT_EVENT_TYPE, UNMOUNT_EVENT_TYPE, RouteChangeEvent, ROUTE_CHANGE_EVENT_TYPE, RouteAction, } from './events';
4
4
  export { registerMicroFrontend } from './registerMicroFrontend';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entur-partner/micro-frontend",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "license": "EUPL-1.2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/micro-frontend.esm.js",
@@ -27,8 +27,8 @@
27
27
  "react-dom": ">=16.8.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@auth0/auth0-spa-js": "^1.8.1",
31
- "@entur-partner/permission-client-node": "^1.1.3"
30
+ "@auth0/auth0-spa-js": "1.13.6",
31
+ "@entur-partner/permission-client-node": "1.1.3"
32
32
  },
33
33
  "jest": {
34
34
  "collectCoverageFrom": [
@@ -40,5 +40,5 @@
40
40
  "reportFile": "jest-sonar-report.xml",
41
41
  "indent": 4
42
42
  },
43
- "gitHead": "931f8ebef0a333ea23e801f18ffbd7620ba8eb2b"
43
+ "gitHead": "a762828a4ff18043452ca99795216925bf6a8936"
44
44
  }