mui-toolpad-extended-tuni 3.0.2 → 3.1.0
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 +289 -118
- package/dist/index.es.js +42420 -33860
- package/dist/src/LMSToolpad/components/Microservices/MicroserviceNavigationBuilder.d.ts +1 -1
- package/dist/src/LMSToolpad/components/Microservices/MicroserviceSubsections.d.ts +1 -1
- package/dist/src/LMSToolpad/components/tools/addActions.d.ts +1 -1
- package/dist/src/LMSToolpad/components/tools/addIcons.d.ts +1 -1
- package/dist/src/LMSToolpad/store/useThemeStore.d.ts +1 -1
- package/dist/src/index.d.ts +12 -35
- package/package.json +2 -9
- package/dist/mui-toolpad-extended-tuni.css +0 -1
- package/dist/src/LMSToolpad/components/Dialogs/DialogOpener.d.ts +0 -9
- package/dist/src/LMSToolpad/components/Dialogs/Dialogs.d.ts +0 -3
- package/dist/src/LMSToolpad/components/Dialogs/ExtendedDialog.d.ts +0 -8
- package/dist/src/LMSToolpad/components/Dialogs/FormDialog.d.ts +0 -14
- package/dist/src/LMSToolpad/components/Dialogs/dialogRegistry.d.ts +0 -3
- package/dist/src/LMSToolpad/components/Events/EventBus.d.ts +0 -34
- package/dist/src/LMSToolpad/components/Events/UserBus.d.ts +0 -111
- package/dist/src/LMSToolpad/components/Events/hooks/useCurrentUser.d.ts +0 -11
- package/dist/src/LMSToolpad/components/Events/hooks/useUserActions.d.ts +0 -15
- package/dist/src/LMSToolpad/components/Events/hooks/useUserPreferences.d.ts +0 -22
- package/dist/src/LMSToolpad/components/Events/index.d.ts +0 -10
- package/dist/src/LMSToolpad/components/Events/types.d.ts +0 -16
- package/dist/src/LMSToolpad/components/Events/userTypes.d.ts +0 -78
- package/dist/src/LMSToolpad/components/Navigation/NavigationBuilder.d.ts +0 -6
- package/dist/src/LMSToolpad/components/Navigation/NavigationFilter.d.ts +0 -1
- package/dist/src/LMSToolpad/components/Navigation/NavigationRegistry.d.ts +0 -116
- package/dist/src/LMSToolpad/components/Navigation/hooks/useMicroserviceNavigation.d.ts +0 -4
- package/dist/src/LMSToolpad/components/Navigation/hooks/useMicroserviceRoutes.d.ts +0 -6
- package/dist/src/LMSToolpad/components/Navigation/hooks/useNavigationSectionManager.d.ts +0 -23
- package/dist/src/LMSToolpad/components/Navigation/hooks/useSyncNavigationFilters.d.ts +0 -1
- package/dist/src/LMSToolpad/components/Navigation/store/microserviceUtils.d.ts +0 -9
- package/dist/src/LMSToolpad/components/Navigation/store/navigationCalculator.d.ts +0 -11
- package/dist/src/LMSToolpad/components/Navigation/store/sectionManager.d.ts +0 -9
- package/dist/src/LMSToolpad/components/Navigation/store/types.d.ts +0 -90
- package/dist/src/LMSToolpad/components/Navigation/store/useNavigationFilterStore.d.ts +0 -6
- package/dist/src/LMSToolpad/components/Navigation/store/useNavigationStore.d.ts +0 -50
- package/dist/src/LMSToolpad/components/Notifications/Notifications.d.ts +0 -3
- package/dist/src/LMSToolpad/components/Notifications/store/useNotificationsStore.d.ts +0 -22
- package/dist/src/LMSToolpad/utils/apiPrefix.d.ts +0 -2
- package/dist/src/LMSToolpad/utils/caseConverter.d.ts +0 -17
- package/dist/src/LMSToolpad/utils/cookieUtils.d.ts +0 -27
- package/dist/src/LMSToolpad/utils/parseDate.d.ts +0 -2
- package/dist/src/LMSToolpad/utils/slugify.d.ts +0 -1
- package/dist/src/common/components/index.d.ts +0 -2
- package/dist/src/common/components/layout/GridLayout/GridItem.d.ts +0 -17
- package/dist/src/common/components/layout/GridLayout/GridItemContext.d.ts +0 -26
- package/dist/src/common/components/layout/GridLayout/ResponsiveGridLayout.d.ts +0 -16
- package/dist/src/common/components/layout/GridLayout/Tools/BreakpointIndicator.d.ts +0 -8
- package/dist/src/common/components/layout/GridLayout/Tools/EditModeToggler.d.ts +0 -7
- package/dist/src/common/components/layout/GridLayout/hooks/useGridLayoutManagement.d.ts +0 -27
- package/dist/src/common/components/layout/GridLayout/index.d.ts +0 -12
- package/dist/src/common/components/layout/GridLayout/layoutStorageUtils.d.ts +0 -52
- package/dist/src/common/components/layout/GridLayout/layoutUtils.d.ts +0 -78
- package/dist/src/common/components/layout/GridLayout/store/usePanelStore.d.ts +0 -27
- package/dist/src/common/components/layout/GridLayout/useGridLayout.d.ts +0 -11
- package/dist/src/common/components/layout/index.d.ts +0 -1
- package/dist/src/common/components/ui/CenteredHeading/CenteredHeading.d.ts +0 -7
- package/dist/src/common/components/ui/CollapsingButtons/CollapsingButtons.d.ts +0 -11
- package/dist/src/common/components/ui/CompoundPanel/CompoundPanel.d.ts +0 -86
- package/dist/src/common/components/ui/LoadingScreen/LoadingScreen.d.ts +0 -2
- package/dist/src/common/components/ui/Panel/Expandable/Expandable.d.ts +0 -4
- package/dist/src/common/components/ui/Panel/Expandable/context/ExpandableContextProvider.d.ts +0 -10
- package/dist/src/common/components/ui/Panel/Expandable/hooks/useCollapseHandler.d.ts +0 -2
- package/dist/src/common/components/ui/Panel/Expandable/hooks/useExpandable.d.ts +0 -17
- package/dist/src/common/components/ui/Panel/Expandable/hooks/useExpansionAnimation.d.ts +0 -5
- package/dist/src/common/components/ui/Panel/Expandable/hooks/useInitialSetup.d.ts +0 -6
- package/dist/src/common/components/ui/Panel/Expandable/hooks/useResizeHandler.d.ts +0 -1
- package/dist/src/common/components/ui/Panel/Expandable/store/useExpandablePanelStore.d.ts +0 -7
- package/dist/src/common/components/ui/Panel/Main/Context/PanelContextProvider.d.ts +0 -50
- package/dist/src/common/components/ui/Panel/Main/Panel.d.ts +0 -3
- package/dist/src/common/components/ui/Panel/Main/hooks/useDimensionManagement.d.ts +0 -13
- package/dist/src/common/components/ui/Panel/Main/hooks/usePersistentDimensions.d.ts +0 -19
- package/dist/src/common/components/ui/Panel/Main/tools/BlurOverlay.d.ts +0 -6
- package/dist/src/common/components/ui/Panel/Main/tools/ToolsContainer.d.ts +0 -11
- package/dist/src/common/components/ui/Panel/Movable/DraggableItem.d.ts +0 -6
- package/dist/src/common/components/ui/Panel/Movable/MovablePanel.d.ts +0 -9
- package/dist/src/common/components/ui/Panel/Movable/MoveToggler.d.ts +0 -3
- package/dist/src/common/components/ui/Panel/Movable/context/MovableContextProvider.d.ts +0 -10
- package/dist/src/common/components/ui/Panel/Movable/hooks/usePersistentOrder.d.ts +0 -3
- package/dist/src/common/components/ui/Panel/Resizable/Context/ResizableContextProvider.d.ts +0 -27
- package/dist/src/common/components/ui/Panel/Resizable/Hooks/useResizeHandlers.d.ts +0 -26
- package/dist/src/common/components/ui/Panel/Resizable/Hooks/useResponsiveResize.d.ts +0 -14
- package/dist/src/common/components/ui/Panel/Resizable/Resizable.d.ts +0 -3
- package/dist/src/common/components/ui/Panel/Resizable/ResizeHandlers.d.ts +0 -7
- package/dist/src/common/components/ui/Panel/Resizable/ResizeIndicator.d.ts +0 -9
- package/dist/src/common/components/ui/Panel/Scrollable/InternalScrolling.d.ts +0 -11
- package/dist/src/common/components/ui/Panel/Scrollable/PaginationDots.d.ts +0 -13
- package/dist/src/common/components/ui/Panel/Scrollable/Scrollable.d.ts +0 -5
- package/dist/src/common/components/ui/Panel/Scrollable/context/ScrollerContextProvider.d.ts +0 -15
- package/dist/src/common/components/ui/Panel/Scrollable/hooks/useScrollControls.d.ts +0 -28
- package/dist/src/common/components/ui/Panel/TBR/PanelContent.d.ts +0 -24
- package/dist/src/common/components/ui/Panel/TBR/ResizablePanel.d.ts +0 -3
- package/dist/src/common/components/ui/Panel/TBR/ResizeHandlers.d.ts +0 -10
- package/dist/src/common/components/ui/Panel/TBR/ResizeIndicator.d.ts +0 -10
- package/dist/src/common/components/ui/Panel/TBR/useResizablePanel.d.ts +0 -32
- package/dist/src/common/components/ui/Panel/types.d.ts +0 -9
- package/dist/src/common/components/ui/Scroller/PaginationDots.d.ts +0 -13
- package/dist/src/common/components/ui/Scroller/Scroller.d.ts +0 -14
- package/dist/src/common/components/ui/Scroller/context/ScrollerContextProvider.d.ts +0 -15
- package/dist/src/common/components/ui/Scroller/hooks/useScrollControls.d.ts +0 -28
- package/dist/src/common/components/ui/Scroller/types.d.ts +0 -1
- package/dist/src/common/components/ui/SpeedDialButton/SpeedDialButton.d.ts +0 -20
- package/dist/src/common/components/ui/index.d.ts +0 -15
- package/dist/src/common/hooks/index.d.ts +0 -1
- package/dist/src/common/hooks/useRetry.d.ts +0 -12
- package/dist/src/common/index.d.ts +0 -2
- /package/dist/src/{common/components/ui → LMSToolpad/components}/ThemeToggle/ThemeToggle.d.ts +0 -0
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook that provides a simplified interface for managing navigation sections.
|
|
3
|
-
* Abstracts away the complexity of the navigation store and filter store interaction.
|
|
4
|
-
*
|
|
5
|
-
* @returns {Object} Section management functions
|
|
6
|
-
* @property {Function} addDynamicSection - Adds or updates a section in navigation
|
|
7
|
-
*/
|
|
8
|
-
interface DynamicSection {
|
|
9
|
-
header: string;
|
|
10
|
-
keepVisible?: boolean;
|
|
11
|
-
pages?: Array<{
|
|
12
|
-
segment: string;
|
|
13
|
-
title: string;
|
|
14
|
-
Icon?: any;
|
|
15
|
-
description?: string;
|
|
16
|
-
instances?: string[];
|
|
17
|
-
microservices?: string[];
|
|
18
|
-
}>;
|
|
19
|
-
}
|
|
20
|
-
export declare const useNavigationSectionManager: () => {
|
|
21
|
-
addDynamicSection: (section: DynamicSection) => void;
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useSyncNavigationFilters: () => void;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { NavigationPageStoreItem, ViewStore } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Aggregates microservices from all available sources (app-level + external).
|
|
4
|
-
* This is microservice-agnostic - it doesn't hard-code specific store types.
|
|
5
|
-
*
|
|
6
|
-
* @param state - The navigation store state
|
|
7
|
-
* @returns Array of all available microservice navigation items
|
|
8
|
-
*/
|
|
9
|
-
export declare const getAllMicroservices: (state: ViewStore) => NavigationPageStoreItem[];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { NavigationStoreItem, NavigationSection } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Calculates the navigation structure from sections.
|
|
4
|
-
* Pure function that takes sections, order, and visibility and returns a flat navigation array.
|
|
5
|
-
*
|
|
6
|
-
* @param sections - Record of navigation sections keyed by section key
|
|
7
|
-
* @param sectionOrder - Array of section keys in display order
|
|
8
|
-
* @param visibleSections - Record of section visibility flags
|
|
9
|
-
* @returns Flat array of navigation items for rendering
|
|
10
|
-
*/
|
|
11
|
-
export declare const calculateNavigationFromSections: (sections: Record<string, NavigationSection>, sectionOrder: string[], visibleSections: Record<string, boolean>) => NavigationStoreItem[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ViewStore } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Updates microservice navigation for all sections.
|
|
4
|
-
* Orchestrates the update process across all sections and recalculates navigation.
|
|
5
|
-
*
|
|
6
|
-
* @param state - The current navigation store state
|
|
7
|
-
* @returns Updated state with sections and navigation, or null if no changes
|
|
8
|
-
*/
|
|
9
|
-
export declare const updateMicroserviceNavigationForSections: (state: ViewStore) => Partial<ViewStore> | null;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { SvgIconComponent } from '@mui/icons-material';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
|
-
export interface NavigationItemBase {
|
|
4
|
-
kind: "header" | "page" | "divider";
|
|
5
|
-
title?: string;
|
|
6
|
-
actionFC?: React.FC;
|
|
7
|
-
}
|
|
8
|
-
export interface ToolMetadata {
|
|
9
|
-
description?: string;
|
|
10
|
-
forRoles?: string[];
|
|
11
|
-
isRootTool?: boolean;
|
|
12
|
-
underHeader?: string;
|
|
13
|
-
microservices?: string[];
|
|
14
|
-
}
|
|
15
|
-
export interface NavigationHeaderItem extends NavigationItemBase {
|
|
16
|
-
kind: "header";
|
|
17
|
-
title: string;
|
|
18
|
-
}
|
|
19
|
-
export interface NavigationDividerItem extends NavigationItemBase {
|
|
20
|
-
kind: "divider";
|
|
21
|
-
}
|
|
22
|
-
export interface NavigationPageStoreItem extends NavigationItemBase {
|
|
23
|
-
kind: "page";
|
|
24
|
-
segment: string;
|
|
25
|
-
iconFC?: SvgIconComponent;
|
|
26
|
-
icon?: React.ReactElement;
|
|
27
|
-
children?: NavigationPageStoreItem[];
|
|
28
|
-
view?: React.ComponentType;
|
|
29
|
-
action?: React.ReactElement;
|
|
30
|
-
showTitle?: boolean;
|
|
31
|
-
metadata?: ToolMetadata;
|
|
32
|
-
}
|
|
33
|
-
export type NavigationStoreItem = NavigationHeaderItem | NavigationPageStoreItem | NavigationDividerItem;
|
|
34
|
-
/**
|
|
35
|
-
* Updated addSectionProps type.
|
|
36
|
-
* Now you provide a header (underHeader) and an array of page configs.
|
|
37
|
-
*/
|
|
38
|
-
export type addSectionProps = {
|
|
39
|
-
underHeader: string;
|
|
40
|
-
keepVisible?: boolean;
|
|
41
|
-
pages: Array<{
|
|
42
|
-
segment: string;
|
|
43
|
-
title: string;
|
|
44
|
-
Icon?: SvgIconComponent;
|
|
45
|
-
description?: string;
|
|
46
|
-
instances?: string[];
|
|
47
|
-
microservices?: string[];
|
|
48
|
-
actionFC?: React.FC;
|
|
49
|
-
}>;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* New interface for a navigation section.
|
|
53
|
-
* Each section is keyed by its header (or unique id) and contains:
|
|
54
|
-
* - header: the header item (NavigationHeaderItem)
|
|
55
|
-
* - pages: a dictionary of pages keyed by their segment
|
|
56
|
-
* - pageOrder: an array of page keys (segments) to preserve ordering
|
|
57
|
-
*/
|
|
58
|
-
export interface NavigationSection {
|
|
59
|
-
header: NavigationHeaderItem;
|
|
60
|
-
pages: Record<string, NavigationPageStoreItem>;
|
|
61
|
-
pageOrder: string[];
|
|
62
|
-
}
|
|
63
|
-
export type ViewStore = {
|
|
64
|
-
navigation: NavigationStoreItem[];
|
|
65
|
-
sections: Record<string, NavigationSection>;
|
|
66
|
-
sectionOrder: string[];
|
|
67
|
-
/**
|
|
68
|
-
* App-level microservice navigation items only.
|
|
69
|
-
* These are typically registered via NavigationRegistry for app-level routes.
|
|
70
|
-
*/
|
|
71
|
-
allMicroserviceNavigation: NavigationPageStoreItem[];
|
|
72
|
-
addSection: (props: addSectionProps) => void;
|
|
73
|
-
removeHeader: (header: string) => void;
|
|
74
|
-
addMicroserviceNavigation: (microserviceNavigation: NavigationPageStoreItem) => void;
|
|
75
|
-
addStandaloneNavigation: (navigation: NavigationPageStoreItem) => void;
|
|
76
|
-
updateMicroserviceNavigationForSections: () => void;
|
|
77
|
-
recalculateNavigation: () => void;
|
|
78
|
-
visibleSections: Record<string, boolean>;
|
|
79
|
-
setVisibleSections: (options: Record<string, boolean>) => void;
|
|
80
|
-
collapsedSections: Record<string, boolean>;
|
|
81
|
-
setCollapsedSections: (options: Record<string, boolean>) => void;
|
|
82
|
-
toggleSectionCollapse: (sectionKey: string) => void;
|
|
83
|
-
/**
|
|
84
|
-
* Externally registered microservice navigation items.
|
|
85
|
-
* These are provided by external components (like CourseMicroservice) via setExternalMicroservices.
|
|
86
|
-
* The store is microservice-agnostic - it doesn't know or care about specific microservice types.
|
|
87
|
-
*/
|
|
88
|
-
externalMicroservices: NavigationPageStoreItem[];
|
|
89
|
-
setExternalMicroservices: (microservices: NavigationPageStoreItem[]) => void;
|
|
90
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export interface NavigationFilterState {
|
|
2
|
-
filterOptions: Record<string, boolean>;
|
|
3
|
-
setFilterOptions: (optionsOrUpdater: Record<string, boolean> | ((prev: Record<string, boolean>) => Record<string, boolean>)) => void;
|
|
4
|
-
initializeFilters: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const useNavigationFilterStore: import('zustand/traditional').UseBoundStoreWithEqualityFn<import('zustand').StoreApi<NavigationFilterState>>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { NavigationStoreItem, ViewStore } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Navigation management store with enhanced section management and filtering capabilities.
|
|
4
|
-
*
|
|
5
|
-
* @version 3.1.0
|
|
6
|
-
* @updates
|
|
7
|
-
* - Complete rewrite of navigation structure using sections
|
|
8
|
-
* - Added section-based visibility filtering
|
|
9
|
-
* - Enhanced microservice integration with automatic updates
|
|
10
|
-
* - Added support for dividers in navigation
|
|
11
|
-
* - Introduced flexible section management with ordered headers
|
|
12
|
-
* - Added action components support in navigation items
|
|
13
|
-
* - Clear separation: app-level navigation only (course microservices handled separately)
|
|
14
|
-
* - Refactored: Extracted types, utilities, and complex logic into separate modules
|
|
15
|
-
*
|
|
16
|
-
* @breaking-changes
|
|
17
|
-
* - Removed updateSection and updateCourseInstanceSection methods
|
|
18
|
-
* - Changed addSection API to use header-based organization
|
|
19
|
-
* - Sections are now managed through a structured record instead of flat array
|
|
20
|
-
* - Navigation items require explicit header assignment
|
|
21
|
-
* - Changed microservice update mechanism to be section-aware
|
|
22
|
-
*
|
|
23
|
-
* @scope
|
|
24
|
-
* This store handles navigation for the application:
|
|
25
|
-
* - Global sections (Help, Contact, etc.)
|
|
26
|
-
* - App-level microservices registered via NavigationRegistry
|
|
27
|
-
* - External microservices provided via setExternalMicroservices (e.g., from CourseMicroservice)
|
|
28
|
-
*
|
|
29
|
-
* @structure
|
|
30
|
-
* Navigation is now organized into sections:
|
|
31
|
-
* - Each section has a header, pages, and maintained order
|
|
32
|
-
* - Pages can have nested children (for instances or microservices)
|
|
33
|
-
* - Sections can be individually shown/hidden through visibleSections
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```typescript
|
|
37
|
-
* useNavigationStore.getState().addSection({
|
|
38
|
-
* underHeader: "Courses",
|
|
39
|
-
* pages: [{
|
|
40
|
-
* segment: "course-1",
|
|
41
|
-
* title: "Course 1",
|
|
42
|
-
* description: "Example course",
|
|
43
|
-
* microservices: ["attendance", "grades"]
|
|
44
|
-
* }]
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
export declare const useNavigationStore: import('zustand/traditional').UseBoundStoreWithEqualityFn<import('zustand').StoreApi<ViewStore>>;
|
|
49
|
-
export declare const filterNavigationByRole: (role: string) => NavigationStoreItem[];
|
|
50
|
-
export type { NavigationItemBase, ToolMetadata, NavigationHeaderItem, NavigationDividerItem, NavigationPageStoreItem, NavigationStoreItem, addSectionProps, NavigationSection, } from './types';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
export type NotificationRaw = {
|
|
3
|
-
type: string;
|
|
4
|
-
message: string;
|
|
5
|
-
singular?: boolean;
|
|
6
|
-
singularId?: string;
|
|
7
|
-
};
|
|
8
|
-
export type Notification = {
|
|
9
|
-
type: string;
|
|
10
|
-
message: string;
|
|
11
|
-
id: string;
|
|
12
|
-
singular?: boolean;
|
|
13
|
-
singularId?: string;
|
|
14
|
-
};
|
|
15
|
-
type NotificationStore = {
|
|
16
|
-
notifications: Notification[] | [];
|
|
17
|
-
addNotificationData: (notificationData: NotificationRaw) => void;
|
|
18
|
-
removeNotificationData: (notificationId: number) => void;
|
|
19
|
-
clearNotificationsByType: (type: string) => void;
|
|
20
|
-
};
|
|
21
|
-
export declare const useNotificationStore: import('zustand/traditional').UseBoundStoreWithEqualityFn<import('zustand').StoreApi<NotificationStore>>;
|
|
22
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
/**
|
|
3
|
-
* Converts a camelCase string to underscore_case
|
|
4
|
-
*/
|
|
5
|
-
export declare const camelCaseToUnderscore: (str: string) => string;
|
|
6
|
-
/**
|
|
7
|
-
* Converts an underscore_case string to camelCase
|
|
8
|
-
*/
|
|
9
|
-
export declare const underscoreToCamelCase: (str: string) => string;
|
|
10
|
-
/**
|
|
11
|
-
* Deep converts object keys from camelCase to underscore_case
|
|
12
|
-
*/
|
|
13
|
-
export declare const convertObjectKeysToCamelCase: <T>(obj: T) => T;
|
|
14
|
-
/**
|
|
15
|
-
* Deep converts object keys from underscore_case to camelCase
|
|
16
|
-
*/
|
|
17
|
-
export declare const convertObjectKeysToUnderscore: <T>(obj: T) => T;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
export type ColorSchemePreference = 'light' | 'dark' | 'system';
|
|
3
|
-
/**
|
|
4
|
-
* Get a cookie value by name
|
|
5
|
-
*/
|
|
6
|
-
export declare function getCookie(name: string): string | null;
|
|
7
|
-
/**
|
|
8
|
-
* Set a cookie value
|
|
9
|
-
*/
|
|
10
|
-
export declare function setCookie(name: string, value: string, days?: number): void;
|
|
11
|
-
/**
|
|
12
|
-
* Delete a cookie by name
|
|
13
|
-
*/
|
|
14
|
-
export declare function deleteCookie(name: string): void;
|
|
15
|
-
/**
|
|
16
|
-
* Get the color scheme preference from cookie
|
|
17
|
-
* Returns 'system' as default if not set
|
|
18
|
-
*/
|
|
19
|
-
export declare function getColorSchemePreference(): ColorSchemePreference;
|
|
20
|
-
/**
|
|
21
|
-
* Set the color scheme preference in cookie
|
|
22
|
-
*/
|
|
23
|
-
export declare function setColorSchemePreference(preference: ColorSchemePreference): void;
|
|
24
|
-
/**
|
|
25
|
-
* Get the effective color scheme (resolves 'system' to actual light/dark based on system preference)
|
|
26
|
-
*/
|
|
27
|
-
export declare function getEffectiveColorScheme(preference: ColorSchemePreference): 'light' | 'dark';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const slugify: (text: string) => string;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactNode } from 'react';
|
|
2
|
-
export interface GridItemProps {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
id: string;
|
|
5
|
-
isFlexContainer?: boolean;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Grid item component that applies consistent styling and resize visual feedback.
|
|
9
|
-
*
|
|
10
|
-
* Features:
|
|
11
|
-
* - Visual indication when in resize or move mode
|
|
12
|
-
* - Consistent styling for all grid items
|
|
13
|
-
* - Optional flex container for content that needs to fill the space
|
|
14
|
-
* - Content is non-interactable when in edit mode (using BlurOverlay)
|
|
15
|
-
*/
|
|
16
|
-
declare const GridItem: React.FC<GridItemProps>;
|
|
17
|
-
export default GridItem;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { Layout } from 'react-grid-layout';
|
|
3
|
-
export interface GridItem {
|
|
4
|
-
id: string;
|
|
5
|
-
content: ReactNode;
|
|
6
|
-
layout?: Layout;
|
|
7
|
-
}
|
|
8
|
-
export interface GridItemEntry {
|
|
9
|
-
id: string;
|
|
10
|
-
content: ReactNode;
|
|
11
|
-
layout?: Layout;
|
|
12
|
-
}
|
|
13
|
-
interface GridItemContextType {
|
|
14
|
-
gridItems: GridItemEntry[];
|
|
15
|
-
registerGridItem: (id: string, content: ReactNode, layout?: Layout) => void;
|
|
16
|
-
unregisterGridItem: (id: string) => void;
|
|
17
|
-
getGridItem: (id: string) => GridItemEntry | undefined;
|
|
18
|
-
getAllGridItems: () => GridItemEntry[];
|
|
19
|
-
}
|
|
20
|
-
declare const GridItemContext: React.Context<GridItemContextType | undefined>;
|
|
21
|
-
export declare const useGridItemContext: () => GridItemContextType;
|
|
22
|
-
interface GridItemProviderProps {
|
|
23
|
-
children: ReactNode;
|
|
24
|
-
}
|
|
25
|
-
export declare const GridItemProvider: React.FC<GridItemProviderProps>;
|
|
26
|
-
export default GridItemContext;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { Layout } from 'react-grid-layout';
|
|
3
|
-
export interface GridItem {
|
|
4
|
-
id: string;
|
|
5
|
-
content: ReactNode;
|
|
6
|
-
layout?: Layout;
|
|
7
|
-
}
|
|
8
|
-
export interface GridLayoutProps {
|
|
9
|
-
items: GridItem[];
|
|
10
|
-
storageKey: string;
|
|
11
|
-
defaultLayouts: {
|
|
12
|
-
[key: string]: Layout[];
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
declare const ResponsiveGridLayout: React.FC<GridLayoutProps>;
|
|
16
|
-
export default ResponsiveGridLayout;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Layout, Layouts } from 'react-grid-layout';
|
|
2
|
-
/**
|
|
3
|
-
* Options for the useGridLayoutManagement hook
|
|
4
|
-
*/
|
|
5
|
-
interface UseGridLayoutManagementOptions {
|
|
6
|
-
/** Storage key for persisting layouts */
|
|
7
|
-
storageKey: string;
|
|
8
|
-
/** Default layouts to use if none found in storage */
|
|
9
|
-
defaultLayouts: Layouts;
|
|
10
|
-
/** Function to run when layout changes */
|
|
11
|
-
onLayoutChangeCallback?: (layouts: Layouts) => void;
|
|
12
|
-
/** Debounce time for saving to localStorage (ms) */
|
|
13
|
-
debounceTime?: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Hook for managing grid layouts, including persistence, updates, and preset handling
|
|
17
|
-
*
|
|
18
|
-
* @param options Configuration options
|
|
19
|
-
* @returns Layout management utilities
|
|
20
|
-
*/
|
|
21
|
-
export declare function useGridLayoutManagement({ storageKey, defaultLayouts, onLayoutChangeCallback, debounceTime, }: UseGridLayoutManagementOptions): {
|
|
22
|
-
layouts: Layouts;
|
|
23
|
-
onLayoutChange: (_: Layout[], allLayouts: Layouts) => void;
|
|
24
|
-
applyLayout: (newLayouts: Layouts) => void;
|
|
25
|
-
resetToDefault: () => void;
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
export * from './GridItemContext';
|
|
3
|
-
export * from './layoutUtils';
|
|
4
|
-
export { default as GridItem } from './GridItem';
|
|
5
|
-
export { default as ResponsiveGridLayout } from './ResponsiveGridLayout';
|
|
6
|
-
export type { GridItem as GridItemType, GridLayoutProps } from './ResponsiveGridLayout';
|
|
7
|
-
export { default as useGridLayout } from './useGridLayout';
|
|
8
|
-
export * from './layoutStorageUtils';
|
|
9
|
-
export * from './hooks/useGridLayoutManagement';
|
|
10
|
-
export { default as EditModeToggler } from './Tools/EditModeToggler';
|
|
11
|
-
export { default as BreakpointIndicator } from './Tools/BreakpointIndicator';
|
|
12
|
-
export * from './store/usePanelStore';
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Layouts } from 'react-grid-layout';
|
|
2
|
-
/**
|
|
3
|
-
* Helper function to get layout from localStorage
|
|
4
|
-
* @param key Storage key for the layout
|
|
5
|
-
* @returns The stored layout or null if not found
|
|
6
|
-
*/
|
|
7
|
-
export declare function getFromLS(key: string): Layouts | null;
|
|
8
|
-
/**
|
|
9
|
-
* Helper function to save layout to localStorage
|
|
10
|
-
* @param key Storage key for the layout
|
|
11
|
-
* @param value The layout to store
|
|
12
|
-
*/
|
|
13
|
-
export declare function saveToLS(key: string, value: Layouts): void;
|
|
14
|
-
export declare const USER_PRESETS_KEY = "user-layout-presets";
|
|
15
|
-
/**
|
|
16
|
-
* Layout preset interface
|
|
17
|
-
*/
|
|
18
|
-
export interface LayoutPreset {
|
|
19
|
-
id: string;
|
|
20
|
-
name: string;
|
|
21
|
-
layouts: Layouts;
|
|
22
|
-
createdAt?: number;
|
|
23
|
-
updatedAt?: number;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Helper function to get user presets from localStorage
|
|
27
|
-
* @returns Array of user-defined layout presets
|
|
28
|
-
*/
|
|
29
|
-
export declare function getUserPresets(): LayoutPreset[];
|
|
30
|
-
/**
|
|
31
|
-
* Helper function to save a user preset to localStorage
|
|
32
|
-
* @param name Name of the preset
|
|
33
|
-
* @param layouts Layout configuration to save
|
|
34
|
-
* @returns ID of the newly created preset
|
|
35
|
-
*/
|
|
36
|
-
export declare function saveUserPreset(name: string, layouts: Layouts): string;
|
|
37
|
-
/**
|
|
38
|
-
* Helper function to delete a user preset from localStorage
|
|
39
|
-
* @param presetId ID of the preset to delete
|
|
40
|
-
* @returns true if deletion was successful, false otherwise
|
|
41
|
-
*/
|
|
42
|
-
export declare function deleteUserPreset(presetId: string): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Helper function to update a user preset in localStorage
|
|
45
|
-
* @param presetId ID of the preset to update
|
|
46
|
-
* @param updates Object with properties to update
|
|
47
|
-
* @returns true if update was successful, false otherwise
|
|
48
|
-
*/
|
|
49
|
-
export declare function updateUserPreset(presetId: string, updates: Partial<{
|
|
50
|
-
name: string;
|
|
51
|
-
layouts: Layouts;
|
|
52
|
-
}>): boolean;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { Layout } from 'react-grid-layout';
|
|
2
|
-
/**
|
|
3
|
-
* Options for creating a grid item layout.
|
|
4
|
-
* All properties are optional, allowing for flexible grid item creation.
|
|
5
|
-
*/
|
|
6
|
-
export interface CreateGridItemOptions {
|
|
7
|
-
/**
|
|
8
|
-
* Unique identifier for the grid item.
|
|
9
|
-
* If not provided, a unique ID will be generated.
|
|
10
|
-
*/
|
|
11
|
-
id?: string;
|
|
12
|
-
/**
|
|
13
|
-
* X position in the grid (column index).
|
|
14
|
-
* Defaults to 0 if not specified.
|
|
15
|
-
*/
|
|
16
|
-
x?: number;
|
|
17
|
-
/**
|
|
18
|
-
* Y position in the grid (row index).
|
|
19
|
-
* Defaults to 0 if not specified.
|
|
20
|
-
*/
|
|
21
|
-
y?: number;
|
|
22
|
-
/**
|
|
23
|
-
* Width of the grid item in grid units.
|
|
24
|
-
* If null, the item will span the full width of the grid.
|
|
25
|
-
* Defaults to 1 if not specified.
|
|
26
|
-
*/
|
|
27
|
-
w?: number | null;
|
|
28
|
-
/**
|
|
29
|
-
* Height of the grid item in grid units.
|
|
30
|
-
* Defaults to 1 if not specified.
|
|
31
|
-
*/
|
|
32
|
-
h?: number | null;
|
|
33
|
-
/**
|
|
34
|
-
* Minimum width constraint.
|
|
35
|
-
* Defaults to 1 if not specified.
|
|
36
|
-
*/
|
|
37
|
-
minW?: number;
|
|
38
|
-
/**
|
|
39
|
-
* Maximum width constraint.
|
|
40
|
-
* If null, no maximum width constraint.
|
|
41
|
-
*/
|
|
42
|
-
maxW?: number | null;
|
|
43
|
-
/**
|
|
44
|
-
* Minimum height constraint.
|
|
45
|
-
* Defaults to 1 if not specified.
|
|
46
|
-
*/
|
|
47
|
-
minH?: number;
|
|
48
|
-
/**
|
|
49
|
-
* Maximum height constraint.
|
|
50
|
-
* If null, no maximum height constraint.
|
|
51
|
-
*/
|
|
52
|
-
maxH?: number | null;
|
|
53
|
-
/**
|
|
54
|
-
* Whether the item is static (cannot be moved or resized).
|
|
55
|
-
* Defaults to false.
|
|
56
|
-
*/
|
|
57
|
-
static?: boolean;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Creates a grid item layout configuration.
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* // Create a grid item with default settings
|
|
64
|
-
* createGridItem({ id: "my-item" });
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* // Create a grid item with specific dimensions
|
|
68
|
-
* createGridItem({ id: "my-item", x: 0, y: 0, w: 7, h: 5 });
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* // Create a full-width grid item
|
|
72
|
-
* createGridItem({
|
|
73
|
-
* id: "my-item",
|
|
74
|
-
* w: null, // null means full width
|
|
75
|
-
* h: 5
|
|
76
|
-
* });
|
|
77
|
-
*/
|
|
78
|
-
export declare function createGridItem(options: CreateGridItemOptions): Layout;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/** @format */
|
|
2
|
-
interface PanelState {
|
|
3
|
-
editMode: boolean;
|
|
4
|
-
toggleEditMode: () => void;
|
|
5
|
-
resizeMode: boolean;
|
|
6
|
-
toggleResizeMode: () => void;
|
|
7
|
-
moveMode: boolean;
|
|
8
|
-
toggleMoveMode: () => void;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Store for managing panel state related to grid layouts.
|
|
12
|
-
*
|
|
13
|
-
* This uses a single editMode that enables both dragging and resizing.
|
|
14
|
-
* It also manages saved layout presets.
|
|
15
|
-
*/
|
|
16
|
-
export declare const usePanelStore: import('zustand/traditional').UseBoundStoreWithEqualityFn<Omit<import('zustand').StoreApi<PanelState>, "persist"> & {
|
|
17
|
-
persist: {
|
|
18
|
-
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<PanelState, PanelState>>) => void;
|
|
19
|
-
clearStorage: () => void;
|
|
20
|
-
rehydrate: () => Promise<void> | void;
|
|
21
|
-
hasHydrated: () => boolean;
|
|
22
|
-
onHydrate: (fn: (state: PanelState) => void) => () => void;
|
|
23
|
-
onFinishHydration: (fn: (state: PanelState) => void) => () => void;
|
|
24
|
-
getOptions: () => Partial<import('zustand/middleware').PersistOptions<PanelState, PanelState>>;
|
|
25
|
-
};
|
|
26
|
-
}>;
|
|
27
|
-
export default usePanelStore;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GridLayout';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
interface CollapsingButtonsProps {
|
|
3
|
-
collapseIcon: React.ReactNode;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
collapseWidth: number;
|
|
6
|
-
delay?: number;
|
|
7
|
-
tooltipTitle?: string;
|
|
8
|
-
fullWidth?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const CollapsingButtons: ({ collapseIcon, children, collapseWidth, delay, tooltipTitle, fullWidth, }: CollapsingButtonsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|