-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 3981-checkmarx-one-cookie-poisoning
- Loading branch information
Showing
26 changed files
with
9,735 additions
and
33,458 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
client-frameworks-support/client-support-angular/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
270 changes: 261 additions & 9 deletions
270
client-frameworks-support/client-support-ui5/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** | ||
* <!-- label-success: Web Component API only--> | ||
* Publish an event that can be listened to from the container host. | ||
* | ||
* Similar to {@link luigi-client-api.md#sendCustomMessage sendCustomMessage} but for WebComponent based microfrontends only. | ||
* | ||
* @param {CustomEvent} event Custom event to be published | ||
* @memberof Lifecycle | ||
* | ||
* @example | ||
* // case 1: publish an event from a WC based microfrontend | ||
* | ||
* // wcComponent.js | ||
* // sending a message to parent host | ||
* this.LuigiClient.publishEvent(new CustomEvent('sendSomeMsg', { detail: 'My own message' })); | ||
* | ||
* // host.html | ||
* myContainer.addEventListener('custom-message', event => { | ||
* console.log('My custom message from the microfrontend', event.detail.data); | ||
* } | ||
* | ||
* // case 2: publish an event from a compound microfrontend | ||
* | ||
* // secondChild.js | ||
* // Set the custom event name = 'sendInput' and | ||
* // send a message to its parent (main.html) and sibling (firstChild.js) | ||
* this.LuigiClient.publishEvent(new CustomEvent('sendInput', { detail: 'My own message' })); | ||
* | ||
* // main.html | ||
* myContainer.addEventListener('custom-message', event => { | ||
* console.log('My custom message from microfrontend', event.detail.data); | ||
* } | ||
* | ||
* // Note: eventListeners.name must match CustomEvent name above | ||
* // eventListeners.source = input1 = id of secondChild.js, which is where the message being sent from | ||
* compoundConfig = { | ||
* ... | ||
* children: [ | ||
* { | ||
* viewUrl: 'firstChild.js' | ||
* ... | ||
* eventListeners: [ | ||
* { | ||
* source: 'input1', | ||
* name: 'sendInput', | ||
* action: 'update', | ||
* dataConverter: data => { | ||
* console.log( | ||
* 'dataConverter(): Received Custom Message from "input1" MF ' + data | ||
* ); | ||
* return 'new text: ' + data; | ||
* } | ||
* } | ||
* ] | ||
* }, | ||
* { | ||
* viewUrl: 'secondChild.js', | ||
* id: 'input1', | ||
* } | ||
* | ||
*/ | ||
export function publishEvent(event) {} |
Oops, something went wrong.