@luigi-project/core-modular 0.0.18 → 0.0.19-dev.202610140046
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/luigi.js +54 -79
- package/luigi.js.map +1 -1
- package/package.json +1 -1
- package/services/navigation.service.d.ts +1 -2
- package/types/connector.d.ts +8 -0
- package/types/navigation.d.ts +0 -3
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Luigi } from '../core-api/luigi';
|
|
2
|
-
import { AppSwitcher,
|
|
2
|
+
import { AppSwitcher, BreadcrumbData, LeftNavData, NavigationOptions, NavigationRequestParams, NavItem, Node, PathData, TabNavData, TopNavData } from '../types/navigation';
|
|
3
3
|
import { ModalService } from './modal.service';
|
|
4
4
|
import { NodeDataManagementService } from './node-data-management.service';
|
|
5
5
|
export declare class NavigationService {
|
|
@@ -14,7 +14,6 @@ export declare class NavigationService {
|
|
|
14
14
|
findMatchingNode(urlPathElement: string, nodes: Node[]): Node | undefined;
|
|
15
15
|
buildNavItems(nodes: Node[], selectedNode: Node | undefined, pathData: PathData): Promise<{
|
|
16
16
|
items: NavItem[];
|
|
17
|
-
totalBadgeNode: BadgeCounter | undefined;
|
|
18
17
|
}>;
|
|
19
18
|
getCurrentNode(path: string): Promise<Node | undefined>;
|
|
20
19
|
getPathParams(path: string): Promise<Record<string, any>>;
|
package/types/connector.d.ts
CHANGED
|
@@ -39,6 +39,14 @@ export interface LuigiConnector {
|
|
|
39
39
|
* nodes, profile, context/app/product switchers, optional global-search
|
|
40
40
|
* config. Any region present should be (re)rendered; absent fields mean
|
|
41
41
|
* "hide / remove that region".
|
|
42
|
+
*
|
|
43
|
+
* Badge counters are deferred and never aggregated by core: core does not
|
|
44
|
+
* invoke a node's `badgeCounter.count()` itself — the head must call it and
|
|
45
|
+
* render the result when the returned `Promise<number>` settles (do not
|
|
46
|
+
* `await` it on the render path). Core also performs no summation; a
|
|
47
|
+
* **category** NavItem carries no aggregate counter, so a head that wants a
|
|
48
|
+
* category or overflow badge sums the counters of the items it groups
|
|
49
|
+
* (`category.nodes`, or the top-level nodes) itself.
|
|
42
50
|
*/
|
|
43
51
|
renderTopNav(data: TopNavData): void;
|
|
44
52
|
/**
|
package/types/navigation.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export interface TopNavData {
|
|
|
13
13
|
productSwitcher?: ProductSwitcher;
|
|
14
14
|
profile?: ProfileSettings;
|
|
15
15
|
topNodes: NavItem[];
|
|
16
|
-
totalBadgeNode?: BadgeCounter;
|
|
17
16
|
}
|
|
18
17
|
export interface AppSwitcher {
|
|
19
18
|
showMainAppEntry?: boolean;
|
|
@@ -104,7 +103,6 @@ export interface LeftNavData {
|
|
|
104
103
|
items: NavItem[];
|
|
105
104
|
basePath: string;
|
|
106
105
|
sideNavFooterText?: string;
|
|
107
|
-
totalBadgeNode?: BadgeCounter;
|
|
108
106
|
navClick?: (item: NavItem) => Promise<void>;
|
|
109
107
|
}
|
|
110
108
|
export interface PathData {
|
|
@@ -241,7 +239,6 @@ export interface TabNavData {
|
|
|
241
239
|
navClick?: (item: NavItem) => Promise<void>;
|
|
242
240
|
overflowLabel?: string;
|
|
243
241
|
selectedNode?: any;
|
|
244
|
-
totalBadgeNode?: BadgeCounter;
|
|
245
242
|
}
|
|
246
243
|
export interface BreadcrumbData {
|
|
247
244
|
basePath?: string;
|