From ed8eae559b78c46d8c59c3ff8a6ccd207c2d411d Mon Sep 17 00:00:00 2001 From: Johannes Doberer Date: Mon, 28 Oct 2024 10:55:47 +0100 Subject: [PATCH] Add custom elements manifest for Luigi(Compound)Container (#3985) --- container/public/dist/custom-elements.json | 918 ++++++++++++++++++ container/public/package.json | 1 + .../src/constants/internal-communication.ts | 2 +- .../LuigiCompoundContainer.svelte.d.ts | 8 +- docs/luigi-compound-container-api.md | 8 +- 5 files changed, 928 insertions(+), 9 deletions(-) create mode 100644 container/public/dist/custom-elements.json diff --git a/container/public/dist/custom-elements.json b/container/public/dist/custom-elements.json new file mode 100644 index 0000000000..41f582f27e --- /dev/null +++ b/container/public/dist/custom-elements.json @@ -0,0 +1,918 @@ +{ + "schemaVersion": "2.1.0", + "readme": "", + "modules": [ + { + "kind": "javascript-module", + "path": "dist/bundle.js", + "declarations": [ + { + "kind": "class", + "description": "LuigiContainer", + "name": "LuigiContainer", + "tagName": "luigi-container", + "customElement": true, + "members": [ + { + "kind": "field", + "name": "activeFeatureToggleList", + "type": { + "text": "Array", + "references": [ + { + "name": "string" + } + ] + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "allowRules", + "type": { + "text": "Array", + "references": [ + { + "name": "string" + } + ] + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "anchor", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "authData", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "clientPermissions", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "context", + "type": { + "text": "any" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "deferInit", + "type": { + "text": "boolean" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "dirtyStatus", + "type": { + "text": "boolean" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "documentTitle", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "hasBack", + "type": { + "text": "boolean" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "label", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "locale", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "noShadow", + "type": { + "text": "boolean" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "nodeParams", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "pathParams", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "sandboxRules", + "type": { + "text": "Array", + "references": [ + { + "name": "string" + } + ] + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "searchParams", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "skipCookieCheck", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "skipInitCheck", + "type": { + "text": "boolean" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "theme", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "userSettings", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "viewurl", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "webcomponent", + "type": { + "text": "any" + } + }, + { + "kind": "method", + "name": "closeAlert" + }, + { + "kind": "method", + "name": "sendCustomMessage" + }, + { + "kind": "method", + "name": "updateContext" + }, + { + "kind": "method", + "name": "attributeChangedCallback" + }, + { + "kind": "method", + "name": "getNoShadow" + }, + { + "kind": "method", + "name": "init" + } + ], + "events": [ + { + "name": "custom-message", + "description": "A message emitted from the micro frontend when a custom message is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "get-context-request", + "description": "A message emitted from the micro frontend when the context data is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "navigation-request", + "description": "A message emitted from the micro frontend when a navigation request is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "show-alert-request", + "description": "A message emitted from the micro frontend when a request to show an alert is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "close-alert-request", + "description": "A message emitted from the micro frontend when a request to close an alert is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "initialized", + "description": "A message emitted from the micro frontend when it is first initialized.", + "type": { + "text": "Event" + } + }, + { + "name": "add-search-params-request", + "description": "A message emitted from the micro frontend to request adding search parameters to the URL.", + "type": { + "text": "Event" + } + }, + { + "name": "add-node-params-request", + "description": "A message emitted from the micro frontend to request adding node parameters to the URL.", + "type": { + "text": "Event" + } + }, + { + "name": "show-confirmation-modal-request", + "description": "A message emitted from the micro frontend when a request to show a confirmation modal is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "show-loading-indicator-request", + "description": "A message emitted from the micro frontend when a request to show a loading indicator is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "hide-loading-indicator-request", + "description": "A message emitted from the micro frontend when a request to hide the loading indicator is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-current-locale-request", + "description": "A message emitted from the micro frontend when a request to set the current locale is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-storage-request", + "description": "A message emitted from the micro frontend when a request to modify the local storage is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "runtime-error-handling-request", + "description": "A message emitted from the micro frontend when a request to handle an error during runtime is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-anchor-request", + "description": "A message emitted from the micro frontend when a request to set the anchor of the URL is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-third-party-cookies-request", + "description": "A message emitted from the micro frontend when a request to set third-party cookies is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "navigate-back-request", + "description": "A message emitted from the micro frontend when a request to navigate back is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "get-current-route-request", + "description": "A message emitted from the micro frontend when a request to receive the current app route is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "report-navigation-completed-request", + "description": "A message emitted from the micro frontend to report that the navigation is completed.", + "type": { + "text": "Event" + } + }, + { + "name": "update-modal-path-data-request", + "description": "A message emitted from the micro frontend when a request to update the modal path parameters is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "check-path-exists-request", + "description": "A message emitted from the micro frontend when a request to check the validity of a path is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-dirty-status-request", + "description": "A message emitted from the micro frontend when a request to set the 'dirty status' is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-viewgroup-data-request", + "description": "A message emitted from the micro frontend when a request to set the view group data is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-document-title-request", + "description": "A message emitted from the micro frontend when a request to set the document title is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "open-user-settings-request", + "description": "A message emitted from the micro frontend when a request to open user settings is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "close-user-settings-request", + "description": "A message emitted from the micro frontend when a request to close user settings is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "collapse-leftnav-request", + "description": "A message emitted from the micro frontend when a request to collapse the left side navigation is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "update-top-navigation-request", + "description": "A message emitted from the micro frontend when a request to update the top navigation is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "path-exists-request", + "description": "A message emitted from the micro frontend when a request to check if a path exists is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "go-back-request", + "description": "A message emitted from the micro frontend when a request to navigate back is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "has-back-request", + "description": "A message emitted from the micro frontend to check if there is a back navigation option.", + "type": { + "text": "Event" + } + }, + { + "name": "remove-backdrop-request", + "description": "A message emitted from the micro frontend when a request to remove the backdrop is sent.", + "type": { + "text": "Event" + } + } + ] + } + ], + "exports": [ + { + "kind": "js", + "name": "LuigiContainer", + "declaration": { + "name": "LuigiContainer", + "module": "LuigiContainer.js" + } + }, + { + "kind": "custom-element-definition", + "name": "luigi-container", + "declaration": { + "name": "LuigiContainer", + "module": "LuigiContainer.js" + } + } + ] + }, + { + "kind": "javascript-module", + "path": "dist/bundle.js", + "declarations": [ + { + "kind": "class", + "description": "LuigiCompoundContainer", + "name": "LuigiCompoundContainer", + "tagName": "luigi-compound-container", + "customElement": true, + "members": [ + { + "kind": "field", + "name": "activeFeatureToggleList", + "type": { + "text": "Array", + "references": [ + { + "name": "string" + } + ] + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "anchor", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "clientPermissions", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "compoundConfig", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "context", + "type": { + "text": "any" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "deferInit", + "type": { + "text": "boolean" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "dirtyStatus", + "type": { + "text": "boolean" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "documentTitle", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "hasBack", + "type": { + "text": "boolean" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "locale", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "noShadow", + "type": { + "text": "boolean" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "nodeParams", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "pathParams", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "searchParams", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "skipInitCheck", + "type": { + "text": "boolean" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "theme", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "userSettings", + "type": { + "text": "object" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "viewurl", + "type": { + "text": "string" + }, + "default": "undefined" + }, + { + "kind": "field", + "name": "webcomponent", + "type": { + "text": "any" + } + }, + { + "kind": "method", + "name": "updateContext" + }, + { + "kind": "method", + "name": "attributeChangedCallback" + }, + { + "kind": "method", + "name": "getNoShadow" + }, + { + "kind": "method", + "name": "init" + } + ], + "events": [ + { + "name": "custom-message", + "description": "A message emitted from the micro frontend when a custom message is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "get-context-request", + "description": "A message emitted from the micro frontend when the context data is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "navigation-request", + "description": "A message emitted from the micro frontend when a navigation request is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "show-alert-request", + "description": "A message emitted from the micro frontend when a request to show an alert is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "close-alert-request", + "description": "A message emitted from the micro frontend when a request to close an alert is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "initialized", + "description": "A message emitted from the micro frontend when it is first initialized.", + "type": { + "text": "Event" + } + }, + { + "name": "add-search-params-request", + "description": "A message emitted from the micro frontend to request adding search parameters to the URL.", + "type": { + "text": "Event" + } + }, + { + "name": "add-node-params-request", + "description": "A message emitted from the micro frontend to request adding node parameters to the URL.", + "type": { + "text": "Event" + } + }, + { + "name": "show-confirmation-modal-request", + "description": "A message emitted from the micro frontend when a request to show a confirmation modal is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "show-loading-indicator-request", + "description": "A message emitted from the micro frontend when a request to show a loading indicator is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "hide-loading-indicator-request", + "description": "A message emitted from the micro frontend when a request to hide the loading indicator is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-current-locale-request", + "description": "A message emitted from the micro frontend when a request to set the current locale is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-storage-request", + "description": "A message emitted from the micro frontend when a request to modify the local storage is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "runtime-error-handling-request", + "description": "A message emitted from the micro frontend when a request to handle an error during runtime is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-anchor-request", + "description": "A message emitted from the micro frontend when a request to set the anchor of the URL is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-third-party-cookies-request", + "description": "A message emitted from the micro frontend when a request to set third-party cookies is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "navigate-back-request", + "description": "A message emitted from the micro frontend when a request to navigate back is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "get-current-route-request", + "description": "A message emitted from the micro frontend when a request to receive the current app route is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "report-navigation-completed-request", + "description": "A message emitted from the micro frontend to report that the navigation is completed.", + "type": { + "text": "Event" + } + }, + { + "name": "update-modal-path-data-request", + "description": "A message emitted from the micro frontend when a request to update the modal path parameters is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "check-path-exists-request", + "description": "A message emitted from the micro frontend when a request to check the validity of a path is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-dirty-status-request", + "description": "A message emitted from the micro frontend when a request to set the 'dirty status' is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-viewgroup-data-request", + "description": "A message emitted from the micro frontend when a request to set the view group data is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "set-document-title-request", + "description": "A message emitted from the micro frontend when a request to set the document title is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "open-user-settings-request", + "description": "A message emitted from the micro frontend when a request to open user settings is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "close-user-settings-request", + "description": "A message emitted from the micro frontend when a request to close user settings is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "collapse-leftnav-request", + "description": "A message emitted from the micro frontend when a request to collapse the left side navigation is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "update-top-navigation-request", + "description": "A message emitted from the micro frontend when a request to update the top navigation is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "path-exists-request", + "description": "A message emitted from the micro frontend when a request to check if a path exists is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "go-back-request", + "description": "A message emitted from the micro frontend when a request to navigate back is sent.", + "type": { + "text": "Event" + } + }, + { + "name": "has-back-request", + "description": "A message emitted from the micro frontend to check if there is a back navigation option.", + "type": { + "text": "Event" + } + }, + { + "name": "remove-backdrop-request", + "description": "A message emitted from the micro frontend when a request to remove the backdrop is sent.", + "type": { + "text": "Event" + } + } + ] + } + ], + "exports": [ + { + "kind": "js", + "name": "LuigiCompoundContainer", + "declaration": { + "name": "LuigiCompoundContainer", + "module": "LuigiCompoundContainer.js" + } + }, + { + "kind": "custom-element-definition", + "name": "luigi-compound-container", + "declaration": { + "name": "LuigiCompoundContainer", + "module": "LuigiCompoundContainer.js" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/container/public/package.json b/container/public/package.json index 23efe2b4d8..2d080fb92a 100644 --- a/container/public/package.json +++ b/container/public/package.json @@ -8,6 +8,7 @@ "type": "git", "url": "ssh://github.com/SAP/luigi.git" }, + "customElements": "./dist/custom-elements.json", "publishConfig": { "tag": "luigi-container" }, diff --git a/container/src/constants/internal-communication.ts b/container/src/constants/internal-communication.ts index bddedb866e..f7c0bc16ae 100644 --- a/container/src/constants/internal-communication.ts +++ b/container/src/constants/internal-communication.ts @@ -116,5 +116,5 @@ export namespace LuigiInternalMessageID { /** * A message emmitted from the Microfrontend when a request to set the 'token auth' is sent */ - export const AUTH_SET_TOKEN = 'luigi.auth.tokenIssued'; + export const AUTH_SET_TOKEN = 'luigi.auth.tokenIssued'; } diff --git a/container/typings/LuigiCompoundContainer.svelte.d.ts b/container/typings/LuigiCompoundContainer.svelte.d.ts index 6b4d21a96c..72cbcfbd7d 100644 --- a/container/typings/LuigiCompoundContainer.svelte.d.ts +++ b/container/typings/LuigiCompoundContainer.svelte.d.ts @@ -11,7 +11,7 @@ export default class LuigiCompoundContainer extends HTMLElement { viewurl: string; /** - * The configuration for the compound microfrontend + * The configuration for the compound microfrontend. * Take a look at the [compound parameter](https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=compound) for details. * @since 1.0.0 * @@ -19,7 +19,7 @@ export default class LuigiCompoundContainer extends HTMLElement { compoundConfig: Object; /** - * If set to true defers from initializing the microfronted automatically. In that case init() can be used + * If set to true defers from initializing the microfronted automatically. In that case init() can be used. * @since 1.0.0 */ deferInit: boolean; @@ -56,7 +56,7 @@ export default class LuigiCompoundContainer extends HTMLElement { pathParams: Object; /** - * The stringified context to be passed to the compound microfrontend + * The stringified context to be passed to the compound microfrontend. * @since 1.0.0 */ context: string; @@ -68,7 +68,7 @@ export default class LuigiCompoundContainer extends HTMLElement { clientPermissions: Object; /** - * The user settings to be passed to the compound micro frontend + * The user settings to be passed to the compound micro frontend. * @since 1.0.0 */ userSettings: Object; diff --git a/docs/luigi-compound-container-api.md b/docs/luigi-compound-container-api.md index a54a8e6464..22057f0998 100644 --- a/docs/luigi-compound-container-api.md +++ b/docs/luigi-compound-container-api.md @@ -32,7 +32,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa ### compoundConfig -The configuration for the compound microfrontend +The configuration for the compound microfrontend. Take a look at the [compound parameter](https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=compound) for details. Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) @@ -43,7 +43,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa ### deferInit -If set to true defers from initializing the microfronted automatically. In that case init() can be used +If set to true defers from initializing the microfronted automatically. In that case init() can be used. Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) @@ -103,7 +103,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa ### context -The stringified context to be passed to the compound microfrontend +The stringified context to be passed to the compound microfrontend. Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) @@ -123,7 +123,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa ### userSettings -The user settings to be passed to the compound micro frontend +The user settings to be passed to the compound micro frontend. Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)