Skip to content

Commit

Permalink
Resolves conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
walmazacn committed Oct 8, 2024
2 parents 32d1fbc + 051efa7 commit 87a0e15
Show file tree
Hide file tree
Showing 26 changed files with 9,720 additions and 33,446 deletions.

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

270 changes: 261 additions & 9 deletions 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.

6 changes: 3 additions & 3 deletions client-frameworks-support/client-support-ui5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"type": "module",
"scripts": {
"bundle": "npm run build",
"build": "rollup --config"
"build": "rollup --config --bundleConfigAsCjs"
},
"dependencies": {
"@luigi-project/client": "^2.7.3"
},
"devDependencies": {
"rollup": "^3.15.0",
"rollup-plugin-copy": "^3.4.0"
"rollup": "^4.22.5",
"rollup-plugin-copy": "^3.5.0"
},
"repository": {
"type": "git",
Expand Down
62 changes: 62 additions & 0 deletions client/luigi-client-wc-docu-mixin.ts
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: CustomEvent): void {}
Loading

0 comments on commit 87a0e15

Please sign in to comment.