@luigi-project/client 2.31.1-dev.20261010103 → 2.31.1-dev.20261020053
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/luigi-client.d.mts +23 -0
- package/esm/luigi-client.mjs +34 -0
- package/esm/luigi-client.mjs.map +1 -1
- package/luigi-client.d.ts +23 -0
- package/luigi-client.js +1 -1
- package/luigi-client.js.map +1 -1
- package/package.json +1 -1
package/esm/luigi-client.d.mts
CHANGED
|
@@ -214,6 +214,29 @@ export declare interface UxManager {
|
|
|
214
214
|
*/
|
|
215
215
|
getCurrentTheme: () => any;
|
|
216
216
|
|
|
217
|
+
/**
|
|
218
|
+
* Returns whether F6 fast navigation is enabled in the Luigi Core configuration (`settings.F6Navigation`).
|
|
219
|
+
* When `true`, a micro frontend should forward its F6 / Shift+F6 keydown events to Luigi Core so that focus can move out of the iframe to the next / previous page group.
|
|
220
|
+
* @returns {boolean} whether F6 fast navigation is enabled
|
|
221
|
+
* @memberof uxManager
|
|
222
|
+
* @since NEXTRELEASE
|
|
223
|
+
* @example LuigiClient.uxManager().isF6NavigationEnabled();
|
|
224
|
+
*/
|
|
225
|
+
isF6NavigationEnabled: () => boolean;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Starts forwarding F6 / Shift+F6 keydown events from this micro frontend to Luigi Core, so that keyboard fast navigation can move focus out of the iframe to the next / previous page group.
|
|
229
|
+
* While focus is inside the iframe, the F6 keydown fires in the micro frontend's own document and never reaches Luigi Core; calling this method bridges those events. Forwarding only takes effect while core has fast navigation enabled (see {@link #isF6NavigationEnabled isF6NavigationEnabled()}), so it is safe to call unconditionally.
|
|
230
|
+
* @returns {function} a cleanup function that stops forwarding when called, e.g. on micro frontend teardown
|
|
231
|
+
* @memberof uxManager
|
|
232
|
+
* @since NEXTRELEASE
|
|
233
|
+
* @example
|
|
234
|
+
* const stopF6Forwarding = LuigiClient.uxManager().enableF6NavigationForwarding();
|
|
235
|
+
* // later, e.g. on teardown:
|
|
236
|
+
* stopF6Forwarding();
|
|
237
|
+
*/
|
|
238
|
+
enableF6NavigationForwarding: () => () => void;
|
|
239
|
+
|
|
217
240
|
/**
|
|
218
241
|
* Sets current locale to the specified one.
|
|
219
242
|
*
|
package/esm/luigi-client.mjs
CHANGED
|
@@ -1785,6 +1785,40 @@ class UxManager extends LuigiClientBase {
|
|
|
1785
1785
|
return lifecycleManager$1.currentContext?.internal?.currentTheme;
|
|
1786
1786
|
}
|
|
1787
1787
|
|
|
1788
|
+
/**
|
|
1789
|
+
* Returns whether F6 fast navigation is enabled in the Luigi Core configuration (`settings.F6Navigation`).
|
|
1790
|
+
* When `true`, a micro frontend should forward its F6 / Shift+F6 keydown events to Luigi Core so that focus can move out of the iframe to the next / previous page group.
|
|
1791
|
+
* @returns {boolean} whether F6 fast navigation is enabled
|
|
1792
|
+
* @memberof uxManager
|
|
1793
|
+
* @since NEXTRELEASE
|
|
1794
|
+
* @example LuigiClient.uxManager().isF6NavigationEnabled();
|
|
1795
|
+
*/
|
|
1796
|
+
isF6NavigationEnabled() {
|
|
1797
|
+
return !!lifecycleManager$1.currentContext?.internal?.fastNavigation;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
/**
|
|
1801
|
+
* Starts forwarding F6 / Shift+F6 keydown events from this micro frontend to Luigi Core, so that keyboard fast navigation can move focus out of the iframe to the next / previous page group.
|
|
1802
|
+
* While focus is inside the iframe, the F6 keydown fires in the micro frontend's own document and never reaches Luigi Core; calling this method bridges those events. Forwarding only takes effect while core has fast navigation enabled (see {@link #isF6NavigationEnabled isF6NavigationEnabled()}), so it is safe to call unconditionally.
|
|
1803
|
+
* @returns {function} a cleanup function that stops forwarding when called, e.g. on micro frontend teardown
|
|
1804
|
+
* @memberof uxManager
|
|
1805
|
+
* @since NEXTRELEASE
|
|
1806
|
+
* @example
|
|
1807
|
+
* const stopF6Forwarding = LuigiClient.uxManager().enableF6NavigationForwarding();
|
|
1808
|
+
* // later, e.g. on teardown:
|
|
1809
|
+
* stopF6Forwarding();
|
|
1810
|
+
*/
|
|
1811
|
+
enableF6NavigationForwarding() {
|
|
1812
|
+
const handler = (e) => {
|
|
1813
|
+
if (e.key === 'F6' && this.isF6NavigationEnabled()) {
|
|
1814
|
+
e.preventDefault();
|
|
1815
|
+
helpers.sendPostMessageToLuigiCore({ msg: 'luigi.fast-nav', shiftKey: e.shiftKey });
|
|
1816
|
+
}
|
|
1817
|
+
};
|
|
1818
|
+
window.addEventListener('keydown', handler);
|
|
1819
|
+
return () => window.removeEventListener('keydown', handler);
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1788
1822
|
/**
|
|
1789
1823
|
* <!-- label-success: Web App API only -->
|
|
1790
1824
|
* Gets the CSS variables from Luigi Core with their key and value.
|