Skip to content

Commit

Permalink
Merge branch 'main' into luigi-headless
Browse files Browse the repository at this point in the history
  • Loading branch information
hardl authored Oct 1, 2024
2 parents 7a25a24 + 6e6d8a5 commit bb80947
Show file tree
Hide file tree
Showing 53 changed files with 995 additions and 302 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/checkmarx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Checkmarx One Scan
on: workflow_dispatch
jobs:
trigger_scan:
runs-on: ubuntu-latest
steps:
- name: Checkmarx One CLI Action
uses: checkmarx/ast-github-action@main #Github Action version
with:
project_name: Luigi
cx_tenant: sap
base_uri: https://checkmarx.tools.sap
#base_auth_uri: https://checkmarx.tools.sap
cx_client_id: ${{ secrets.CXONE_CLIENT_ID }}
cx_client_secret: ${{ secrets.CXONE_CLIENT_SECRET }}
branch: ${{ github.ref_name }}
additional_params: "--async --scan-types sast -s https://github.com/SAP/luigi.git"

1 change: 1 addition & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
name: Backwards Compatibility Check
env:
CYPRESS_CACHE_FOLDER: ~/cypress-binary-cache
CYPRESS_DASHBOARD_RECORD_KEY: ${{ secrets.CYPRESS_DASHBOARD }}
GH_TOKEN: ${{ github.token }}

jobs:
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ The lerna-changelog tool detects changes based on PR labels and maps them to sec
-->


## [v2.16.0] (2024-09-27)

#### :rocket: Added
* [#3938](https://github.com/SAP/luigi/pull/3938) LeftNav in btpLayout: make 'expanded' the default state for nav item groups ([@amilewskaa](https://github.com/amilewskaa))
* [#3915](https://github.com/SAP/luigi/pull/3915) Adds optional renderer for navHeader ([@walmazacn](https://github.com/walmazacn))

#### :bug: Fixed
* [#3902](https://github.com/SAP/luigi/pull/3902) Fixes wrong drawer position ([@walmazacn](https://github.com/walmazacn))




## [v2.15.0] (2024-08-28)

#### :rocket: Added
Expand Down Expand Up @@ -1853,4 +1865,5 @@ The lerna-changelog tool detects changes based on PR labels and maps them to sec
[v2.14.1]: https://github.com/SAP/luigi/compare/v2.14.0...v2.14.1
[v2.14.2]: https://github.com/SAP/luigi/compare/v2.14.1...v2.14.2
[v2.14.3]: https://github.com/SAP/luigi/compare/v2.14.2...v2.14.3
[v2.15.0]: https://github.com/SAP/luigi/compare/v2.14.3...v2.15.0
[v2.15.0]: https://github.com/SAP/luigi/compare/v2.14.3...v2.15.0
[v2.16.0]: https://github.com/SAP/luigi/compare/v2.15.0...v2.16.0
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"@luigi-project/client": "^2.0.0",
"@luigi-project/testing-utilities": "^2.0.0"
},
"version": "2.15.0"
"version": "2.16.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"microfrontends",
"testing"
],
"version": "2.15.0",
"version": "2.16.0",
"engines": {
"node": ">=18.19.1"
}
Expand Down
4 changes: 2 additions & 2 deletions client-frameworks-support/testing-utilities/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client-frameworks-support/testing-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"microfrontends",
"testing"
],
"version": "2.15.0",
"version": "2.16.0",
"engines": {
"node": ">=18.19.1"
}
Expand Down
2 changes: 1 addition & 1 deletion client/public/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"micro-frontends",
"microfrontends"
],
"version": "2.15.0"
"version": "2.16.0"
}
13 changes: 3 additions & 10 deletions client/src/lifecycleManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns a list of active feature toggles
* @returns {Array} a list of feature toggle names
* @memberof Lifecycle
Expand All @@ -404,7 +403,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sets node parameters in Luigi Core. The parameters will be added to the URL.
* @param {Object} params
* @param {boolean} keepBrowserHistory
Expand All @@ -423,7 +421,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns the node parameters of the active URL.
* Node parameters are defined like URL query parameters but with a specific prefix allowing Luigi to pass them to the micro frontend view. The default prefix is **~** and you can use it in the following way: `https://my.luigi.app/home/products?~sort=asc&~page=3`.
* <!-- add-attribute:class:warning -->
Expand All @@ -442,7 +439,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns the dynamic path parameters of the active URL.
* Path parameters are defined by navigation nodes with a dynamic **pathSegment** value starting with **:**, such as **productId**.
* All path parameters in the current navigation path (as defined by the active URL) are returned.
Expand All @@ -469,7 +465,7 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* <!-- label-success: Web App API only -->
* Sends search query parameters to Luigi Core. The search parameters will be added to the URL if they are first allowed on a node level using {@link navigation-parameters-reference.md#clientpermissionsurlparameters clientPermissions.urlParameters}.
* @param {Object} searchParams
Expand All @@ -489,7 +485,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns the current client permissions as specified in the navigation node or an empty object. For details, see [Node parameters](navigation-parameters-reference.md).
* @returns {Object} client permissions as specified in the navigation node
* @memberof Lifecycle
Expand All @@ -501,6 +496,7 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* When the micro frontend is not embedded in the Luigi Core application and there is no init handshake you can set the target origin that is used in postMessage function calls by Luigi Client. Typically used only in custom micro-frontend frameworks that are compatible with LuigiClient API.
* @param {string} origin target origin
* @memberof Lifecycle
Expand All @@ -513,6 +509,7 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* Sends a custom message to the Luigi Core application.
* @param {Object} message an object containing data to be sent to the Luigi Core to process it further. This object is set as an input parameter of the custom message listener on the Luigi Core side
* @param {string} message.id a string containing the message id
Expand All @@ -529,7 +526,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns the current user settings based on the selected node.
* @returns {Object} current user settings
* @since 1.7.1
Expand All @@ -542,7 +538,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns the current anchor based on active URL.
* @memberof Lifecycle
* @since 1.21.0
Expand All @@ -555,7 +550,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sends anchor to Luigi Core. The anchor will be added to the URL.
* @param {string} anchor
* @since 1.21.0
Expand All @@ -571,7 +565,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* This function allows you to change node labels within the same {@link navigation-advanced.md#view-groups view group}, e.g. in your node config: `label: 'my Node {viewGroupData.vg1}'`.
* @since 2.2.0
* @param {Object} data a data object containing the view group name and desired label
Expand Down
25 changes: 6 additions & 19 deletions client/src/linkManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Navigates to the given path in the application hosted by Luigi. It contains either a full absolute path or a relative path without a leading slash that uses the active route as a base. This is the standard navigation.
* @memberof linkManager
* @param {string} path path to be navigated to
Expand Down Expand Up @@ -97,7 +96,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Updates path of the modalPathParam when internal navigation occurs.
* @memberof linkManager
* @param {string} path
Expand Down Expand Up @@ -125,7 +123,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Offers an alternative way of navigating with intents. This involves specifying a semanticSlug and an object containing
* parameters.
* This method internally generates a URL of the form `#?intent=<semantic object>-<action>?<param_name>=<param_value>` through the given
Expand Down Expand Up @@ -158,7 +155,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is `l`, which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions.
* @memberof linkManager
* @param {string} path navigation path
Expand Down Expand Up @@ -195,8 +191,8 @@ export class linkManager extends LuigiClientBase {
return modalPromise.promise;
}

/**
* <!-- label-success: Web Component API -->
/**
* <!-- label-success: Web App API only -->
* Updates the current title and size of a modal. If `routing.showModalPathInUrl` is set to `true`, the URL will be updated with the modal settings data.
* In addition, you can specify if a new history entry will be created with the updated URL.
* @memberof linkManager
Expand All @@ -219,7 +215,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Opens a view in a split view. You can specify the split view's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the split view is `40`, which means 40% height of the split view.
* @memberof linkManager
* @param {string} path navigation path
Expand All @@ -239,7 +234,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Opens a view in a drawer. You can specify the size of the drawer, whether the drawer has a header, and whether a backdrop is active in the background. By default, the header is shown. The backdrop is not visible and has to be activated. The size of the drawer is set to `s` by default, which means 25% of the micro frontend size. You can also use `l`(75%), `m`(50%) or `xs`(15.5%). Optionally, use it in combination with any of the navigation functions.
* @memberof linkManager
* @param {string} path navigation path
Expand All @@ -258,7 +252,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sets the current navigation context to that of a specific parent node which has the {@link navigation-configuration.md navigationContext} field declared in the navigation configuration. This navigation context is then used by the `navigate` function.
* @memberof linkManager
* @param {string} navigationContext
Expand Down Expand Up @@ -298,7 +291,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sets the current navigation base to the parent node that is defined as virtualTree. This method works only when the currently active micro frontend is inside a virtualTree.
* @memberof linkManager
* @returns {linkManager} link manager instance
Expand All @@ -314,7 +306,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Enables navigating to sibling nodes without knowing the absolute path.
* @memberof linkManager
* @returns {linkManager} link manager instance
Expand All @@ -328,7 +319,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sends node parameters to the route. The parameters are used by the `navigate` function. Use it optionally in combination with any of the navigation functions and receive it as part of the context object in Luigi Client.
* @memberof linkManager
* @param {Object} nodeParams
Expand All @@ -347,7 +337,7 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* <!-- label-success: Web App API only -->
* Sets options to customise route changing behaviour. The parameters are used by the `navigate` function. Use it optionally in combination with any of the navigation functions and receive it as part of the context object in Luigi Client.
* @memberof linkManager
* @param {Object} options navigation options
Expand Down Expand Up @@ -376,7 +366,6 @@ export class linkManager extends LuigiClientBase {

/** @lends linkManager */
/**
* <!-- label-success: Web Component API -->
* Checks if the path you can navigate to exists in the main application. For example, you can use this helper method conditionally to display a DOM element like a button.
* @memberof linkManager
* @param {string} path path which existence you want to check
Expand Down Expand Up @@ -432,7 +421,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Checks if there is one or more preserved views. You can use it to show a **back** button.
* @memberof linkManager
* @returns {boolean} indicating if there is a preserved view you can return to
Expand All @@ -442,7 +430,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Discards the active view and navigates back to the last visited view. Works with preserved views, and also acts as the substitute of the browser **back** button. **goBackContext** is only available when using preserved views.
* @memberof linkManager
* @param {any} goBackValue data that is passed in the **goBackContext** field to the last visited view when using preserved views
Expand All @@ -458,7 +445,7 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* <!-- label-success: Web App API only -->
* Disables the navigation handling for a single navigation request.
* It prevents Luigi Core from handling the URL change after `navigate()`.
* Used for auto-navigation.
Expand All @@ -473,6 +460,7 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* Enables navigating to a new tab.
* @since 1.16.0
* @example
Expand All @@ -484,7 +472,7 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* <!-- label-success: Web App API only -->
* Keeps the URL's query parameters for a navigation request.
* @param {boolean} preserve By default, it is set to `false`. If it is set to `true`, the URL's query parameters will be kept after navigation.
* @since 1.19.0
Expand All @@ -498,7 +486,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Gets the luigi route associated with the current micro frontend.
* @returns {promise} a promise which resolves to a String value specifying the current luigi route
* @since 1.23.0
Expand Down
1 change: 1 addition & 0 deletions client/src/storageManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { helpers } from './helpers';
const pendingOperation = new Map();

/**
* <!-- label-success: Web App API only -->
* StorageManager allows you to use browser local storage of key/values. Every storage operation is sent to be managed by Luigi Core.
* The idea is that different micro frontends can share or persist items using local storage, as long as they come from the same domain and follow the [same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy).
* Since all storage operations are asynchronous (sending an event to Luigi Core that will reply once operation is finished), all the methods return Promises.
Expand Down
Loading

0 comments on commit bb80947

Please sign in to comment.