@bluealba/pae-ui-react-core 4.0.1-feature-add-documentation-templat-1206 → 4.0.1-feature-menu-display-order-1213
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/dist/index.cjs.js +43 -43
- package/dist/index.esm.js +869 -861
- package/dist/index.systemjs.js +44 -44
- package/dist/index.umd.js +44 -44
- package/dist/src/hooks/applications/ApplicationMenu.d.ts +2 -0
- package/dist/src/hooks/applications/sortByDisplayOrder.d.ts +10 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export type AplicationMenuSubItem = {
|
|
|
5
5
|
path?: string;
|
|
6
6
|
Icon?: React.ReactNode;
|
|
7
7
|
operations?: string[];
|
|
8
|
+
displayOrder?: number;
|
|
8
9
|
};
|
|
9
10
|
export type ApplicationMenuItem = {
|
|
10
11
|
label: string;
|
|
@@ -16,5 +17,6 @@ export type ApplicationMenuItem = {
|
|
|
16
17
|
canCollapse?: boolean;
|
|
17
18
|
externalUrl?: string;
|
|
18
19
|
target?: '_self' | '_blank';
|
|
20
|
+
displayOrder?: number;
|
|
19
21
|
};
|
|
20
22
|
export type ApplicationMenu = ApplicationMenuItem[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sorts items by displayOrder in descending order (higher numbers first).
|
|
3
|
+
* Items without displayOrder maintain their original order (stable sort).
|
|
4
|
+
*
|
|
5
|
+
* @param items - Array of items to sort
|
|
6
|
+
* @returns New sorted array
|
|
7
|
+
*/
|
|
8
|
+
export declare function sortByDisplayOrder<T extends {
|
|
9
|
+
displayOrder?: number;
|
|
10
|
+
}>(items: T[]): T[];
|
|
@@ -21,6 +21,7 @@ export { useCurrentApplication } from './applications/useCurrentApplication';
|
|
|
21
21
|
export { useCurrentJSModule } from './applications/useCurrentJSModule';
|
|
22
22
|
export { type ApplicationMenu, type ApplicationMenuItem } from './applications/ApplicationMenu';
|
|
23
23
|
export { type PlatformApplication } from './applications/PlatformApplication';
|
|
24
|
+
export { sortByDisplayOrder } from './applications/sortByDisplayOrder';
|
|
24
25
|
export { useAuth } from './useAuth';
|
|
25
26
|
export { useOperations } from './useOperations';
|
|
26
27
|
export { useServiceInvoker, type ServiceInvoker } from './useServiceInvoker';
|
package/package.json
CHANGED