Skip to content

Commit

Permalink
Merge branch 'main' into 3880-sync-luigi-client-api-on-luigi-element-…
Browse files Browse the repository at this point in the history
…ts-declaration
  • Loading branch information
JohannesDoberer authored Dec 20, 2024
2 parents e43532d + 5358527 commit 6ce8315
Show file tree
Hide file tree
Showing 42 changed files with 18,439 additions and 4,669 deletions.
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,25 @@ The lerna-changelog tool detects changes based on PR labels and maps them to sec
-->


## [v2.18.3] (2024-12-17)

#### :bug: Fixed
* [#4071](https://github.com/SAP/luigi/pull/4071) Fixes input focus in search field ([@walmazacn](https://github.com/walmazacn))



## [v2.18.2] (2024-12-16)

#### :bug: Fixed
* [#4068](https://github.com/SAP/luigi/pull/4068) Fixes 'setAttribute' issue in Luigi Client ([@walmazacn](https://github.com/walmazacn))
* [#4065](https://github.com/SAP/luigi/pull/4065) BtpLayout: Backdrop fix ([@JohannesDoberer](https://github.com/JohannesDoberer))
* [#4058](https://github.com/SAP/luigi/pull/4058) Wrong order of productswitcher item ([@JohannesDoberer](https://github.com/JohannesDoberer))






## [v2.18.1] (2024-11-29)

#### :bug: Fixed
Expand Down Expand Up @@ -1904,4 +1923,6 @@ The lerna-changelog tool detects changes based on PR labels and maps them to sec
[v2.16.0]: https://github.com/SAP/luigi/compare/v2.15.0...v2.16.0
[v2.17.0]: https://github.com/SAP/luigi/compare/v2.16.0...v2.17.0
[v2.18.0]: https://github.com/SAP/luigi/compare/v2.17.0...v2.18.0
[v2.18.1]: https://github.com/SAP/luigi/compare/v2.18.0...v2.18.1
[v2.18.1]: https://github.com/SAP/luigi/compare/v2.18.0...v2.18.1
[v2.18.2]: https://github.com/SAP/luigi/compare/v2.18.1...v2.18.2
[v2.18.3]: https://github.com/SAP/luigi/compare/v2.18.2...v2.18.3
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.18.1"
"version": "2.18.3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"microfrontends",
"testing"
],
"version": "2.18.1",
"version": "2.18.3",
"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.18.1",
"version": "2.18.3",
"engines": {
"node": ">=18.19.1"
}
Expand Down
9 changes: 9 additions & 0 deletions client/luigi-element.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,15 @@ export declare interface LinkManager {
* @returns {boolean} indicating if there is a preserved view you can return to
*/
hasBack: () => boolean;

/**
* 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 NEXTRELEASE
* @example
* LuigiClient.linkManager().getCurrentRoute();
*/
getCurrentRoute: () => Promise<string>;
}
export declare class LuigiElement extends HTMLElement {
constructor(options?: Options);
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.18.1"
"version": "2.18.3"
}
2 changes: 1 addition & 1 deletion client/src/lifecycleManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class LifecycleManager extends LuigiClientBase {
const id = helpers.getRandomId();
this._onInitFns[id] = initFn;
if (disableTpcCheck) {
document.head.setAttribute('disable-tpc-check');
document.head.setAttribute('disable-tpc-check', '');
}
if (this.luigiInitialized && helpers.isFunction(initFn)) {
initFn(this.currentContext.context, helpers.getLuigiCoreDomain());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('create luigi-compound-container dynamically', () => {
const content = document.querySelector('.content');
const wc = document.createElement('luigi-compound-container');
wc.context = { title: 'Nested' }
wc.viewurl = 'https://luigiwebcomponents.gitlab.io/nested2.js';
wc.viewurl = 'http://localhost:8080/assets/nested2.js';
wc.compoundConfig = {
eventListeners: [
Expand All @@ -28,7 +28,7 @@ describe('create luigi-compound-container dynamically', () => {
}
],
children: [{
viewUrl: 'https://luigiwebcomponents.gitlab.io/layouts/panelHeader.js',
viewUrl: 'http://localhost:8080/assets/panelHeader.js',
context: {
title: 'My Awesome Grid',
description: 'Really awesome'
Expand All @@ -45,23 +45,23 @@ describe('create luigi-compound-container dynamically', () => {
}
}]
}, {
viewUrl: 'https://luigiwebcomponents.gitlab.io/layouts/panelFooter.js',
viewUrl: 'http://localhost:8080/assets/panelFooter.js',
context: {
footer: 'This is the end of awesomeness'
},
layoutConfig: {
slot: "footer"
}
}, {
viewUrl: 'https://luigiwebcomponents.gitlab.io/luigiwebcomponentmf/main.js',
viewUrl: 'http://localhost:8080/assets/main.js',
layoutConfig: {
slot: "content"
},
context: {
label: 'I am nested!'
}
}, {
viewUrl: 'https://luigiwebcomponents.gitlab.io/luigi-wc-mfe/main.js',
viewUrl: 'http://localhost:8080/assets/mfeMain.js',
context: {
label: 'Update Joke',
showAlert: false
Expand All @@ -80,28 +80,25 @@ describe('create luigi-compound-container dynamically', () => {
.then(($container) => {
return cy
.wrap($container)
.find(
'luigi-wc-68747470733a2f2f6c75696769776562636f6d706f6e656e74732e6769746c61622e696f2f6e6573746564322e6a73'
)
.find('luigi-wc-687474703a2f2f6c6f63616c686f73743a383038302f6173736574732f6e6573746564322e6a73')
.shadow();
})
.then(($innerContainer) => {
cy.wrap($innerContainer)
.get(
'luigi-wc-68747470733a2f2f6c75696769776562636f6d706f6e656e74732e6769746c61622e696f2f6c756967692d77632d6d66652f6d61696e2e6a73'
)
.get('luigi-wc-687474703a2f2f6c6f63616c686f73743a383038302f6173736574732f6d61696e2e6a73')
.should('exist')
.shadow()
.should('not.exist'); // ShadowRoot in 'closed' mode
});
});

it('luigi compound container invalid JSON in context property', () => {
const scriptCode = `
<script>
const content = document.querySelector('.content');
const wc = document.createElement('luigi-compound-container');
wc.context = '{"invalid": "JSON}'
wc.viewurl = 'https://luigiwebcomponents.gitlab.io/nested2.js';
wc.viewurl = 'http://localhost:8080/assets/nested2.js';
wc.compoundConfig = {
eventListeners: [
Expand All @@ -122,7 +119,7 @@ describe('create luigi-compound-container dynamically', () => {
}
],
children: [{
viewUrl: 'https://luigiwebcomponents.gitlab.io/layouts/panelHeader.js',
viewUrl: 'http://localhost:8080/assets/panelHeader.js',
context: {
title: 'My Awesome Grid',
description: 'Really awesome'
Expand All @@ -139,23 +136,23 @@ describe('create luigi-compound-container dynamically', () => {
}
}]
}, {
viewUrl: 'https://luigiwebcomponents.gitlab.io/layouts/panelFooter.js',
viewUrl: 'http://localhost:8080/assets/panelFooter.js',
context: {
footer: 'This is the end of awesomeness'
},
layoutConfig: {
slot: "footer"
}
}, {
viewUrl: 'https://luigiwebcomponents.gitlab.io/luigiwebcomponentmf/main.js',
viewUrl: 'http://localhost:8080/assets/main.js',
layoutConfig: {
slot: "content"
},
context: {
label: 'I am nested!'
}
}, {
viewUrl: 'https://luigiwebcomponents.gitlab.io/luigi-wc-mfe/main.js',
viewUrl: 'http://localhost:8080/assets/mfeMain.js',
context: {
label: 'Update Joke',
showAlert: false
Expand All @@ -172,13 +169,14 @@ describe('create luigi-compound-container dynamically', () => {

cy.get('luigi-compound-container').shadow().should('not.exist');
});

it('luigi compound container with no shadow dom', () => {
const scriptCode = `
<script>
const content = document.querySelector('.content');
const wc = document.createElement('luigi-compound-container');
wc.context = { title: 'Nested' }
wc.viewurl = 'https://luigiwebcomponents.gitlab.io/nested2.js';
wc.viewurl = 'http://localhost:8080/assets/nested2.js';
wc.noShadow = true;
wc.compoundConfig = {
eventListeners: [
Expand All @@ -199,7 +197,7 @@ describe('create luigi-compound-container dynamically', () => {
}
],
children: [{
viewUrl: 'https://luigiwebcomponents.gitlab.io/layouts/panelHeader.js',
viewUrl: 'http://localhost:8080/assets/panelHeader.js',
context: {
title: 'My Awesome Grid',
description: 'Really awesome'
Expand All @@ -216,23 +214,23 @@ describe('create luigi-compound-container dynamically', () => {
}
}]
}, {
viewUrl: 'https://luigiwebcomponents.gitlab.io/layouts/panelFooter.js',
viewUrl: 'http://localhost:8080/assets/panelFooter.js',
context: {
footer: 'This is the end of awesomeness'
},
layoutConfig: {
slot: "footer"
}
}, {
viewUrl: 'https://luigiwebcomponents.gitlab.io/luigiwebcomponentmf/main.js',
viewUrl: 'http://localhost:8080/assets/main.js',
layoutConfig: {
slot: "content"
},
context: {
label: 'I am nested!'
}
}, {
viewUrl: 'https://luigiwebcomponents.gitlab.io/luigi-wc-mfe/main.js',
viewUrl: 'http://localhost:8080/assets/mfeMain.js',
context: {
label: 'Update Joke',
showAlert: false
Expand Down
5 changes: 2 additions & 3 deletions container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"public"
],
"scripts": {
"build": "npm run sync-event-typings && npm run generate-cem && rollup -c",
"build": "npm run sync-event-typings && npm run generate-cem && rollup -c",
"test": "jest",
"lint": "eslint src/**/*.*",
"bundle": "npm run build",
"dev": "rollup -c -w",
"copyBundle": "cp public/bundle.js public/bundle.js.map test-app/ && cp public/bundle.js public/bundle.js.map examples/ || COPY public\\* test-app\\",
"copyBundle": "cp public/bundle.js public/bundle.js.map test-app/ && cp public/bundle.js public/bundle.js.map examples/ || COPY public\\* test-app\\",
"copyLuigiClient": "cp ../client/public/luigi-client.js test-app/iframe",
"copyLuigiElement": "cp ../client/src/luigi-element.js test-app/compound",
"serve": "npm run build && npm run copyLuigiClient && npm run copyLuigiElement && npm run copyBundle && sirv -D -c test-app --no-clear",
Expand All @@ -31,7 +31,6 @@
"replace-version-in-docu": "node prepareNextRelease.js",
"sync-event-typings": "cp src/constants/communication.ts typings/constants/events.d.ts",
"generate-cem": "node generateCEM.js"

},
"devDependencies": {
"@babel/node": "7.22.10",
Expand Down
6 changes: 6 additions & 0 deletions container/test-app/assets/button.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions container/test-app/assets/icon.css

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions container/test-app/assets/input.css

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

Loading

0 comments on commit 6ce8315

Please sign in to comment.