@entur-partner/micro-frontend 1.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 +43 -0
- package/dist/Payload.d.ts +6 -4
- package/dist/User.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
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
|
+
|
|
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)
|
|
19
|
+
|
|
20
|
+
### Reverts
|
|
21
|
+
|
|
22
|
+
- **menu:** packages was not publish to npm because of wrong npm user ([127ed33](https://bitbucket.org/enturas/entur-partner-packages/commits/127ed33e6a7e98866ec74d76ca62fa39bc5a019f))
|
|
23
|
+
|
|
24
|
+
- Merged in ETU-12948_remove_icon_from_sub_navigation_menu (pull request #29) ([6466635](https://bitbucket.org/enturas/entur-partner-packages/commits/6466635c2585ef9cffb60a0eaab74252eef19c64)), closes [#29](https://bitbucket.org/enturas/entur-partner-packages/issue/29)
|
|
25
|
+
|
|
26
|
+
### BREAKING CHANGES
|
|
27
|
+
|
|
28
|
+
- removed icon field from MenuItem
|
|
29
|
+
|
|
30
|
+
ISSUES CLOSED: ETU-12948
|
|
31
|
+
|
|
32
|
+
Approved-by: Erik Vårdal Itland
|
|
33
|
+
Approved-by: Petter Sæther Moen
|
|
34
|
+
|
|
35
|
+
# [1.1.0](https://bitbucket.org/enturas/entur-partner-packages/compare/@entur-partner/micro-frontend@1.0.1...@entur-partner/micro-frontend@1.1.0) (2020-11-26)
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
- add enturPartnerPermissions to User interface ([8197261](https://bitbucket.org/enturas/entur-partner-packages/commits/81972613c832c206c3ddfbd19ebc600750c54a1c))
|
|
40
|
+
|
|
41
|
+
## [1.0.1](https://bitbucket.org/enturas/entur-partner-packages/compare/@entur-partner/micro-frontend@1.0.0...@entur-partner/micro-frontend@1.0.1) (2020-11-23)
|
|
42
|
+
|
|
43
|
+
**Note:** Version bump only for package @entur-partner/micro-frontend
|
package/dist/Payload.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { GetTokenSilentlyOptions } from '@auth0/auth0-spa-js';
|
|
3
2
|
import { BusinessCapability } from '@entur-partner/permission-client-node';
|
|
4
3
|
import { User } from './User';
|
|
@@ -13,8 +12,6 @@ export interface MenuItem {
|
|
|
13
12
|
* is the same as the to value provided to the MenuItem
|
|
14
13
|
*/
|
|
15
14
|
navigate: (path: string) => void;
|
|
16
|
-
/** Optional icon from @entur/icons */
|
|
17
|
-
icon?: React.ElementType;
|
|
18
15
|
/** Is menu item disabled? */
|
|
19
16
|
disabled?: boolean;
|
|
20
17
|
/** Permissions required to view menu item */
|
|
@@ -23,6 +20,7 @@ export interface MenuItem {
|
|
|
23
20
|
all?: BusinessCapability[] | BusinessCapability;
|
|
24
21
|
};
|
|
25
22
|
}
|
|
23
|
+
export declare type NavigationFunction = (to: string) => void;
|
|
26
24
|
export interface MicroFrontendPayload {
|
|
27
25
|
/** Logged in auth0 user */
|
|
28
26
|
user: User;
|
|
@@ -37,5 +35,9 @@ export interface MicroFrontendPayload {
|
|
|
37
35
|
/** Log the user out */
|
|
38
36
|
logout: () => void;
|
|
39
37
|
/** Navigate to a micro frontend or an app shell location */
|
|
40
|
-
navigate:
|
|
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;
|
|
41
43
|
}
|
package/dist/User.d.ts
CHANGED
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": "1.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",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://bitbucket.org/enturas/
|
|
13
|
+
"url": "https://bitbucket.org/enturas/entur-partner-packages.git",
|
|
14
14
|
"directory": "packages/micro-frontend"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"react-dom": ">=16.8.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@auth0/auth0-spa-js": "
|
|
31
|
-
"@entur-partner/permission-client-node": "
|
|
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": "
|
|
43
|
+
"gitHead": "a762828a4ff18043452ca99795216925bf6a8936"
|
|
44
44
|
}
|