blue-react 8.8.3 → 8.8.4

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.
@@ -1,110 +0,0 @@
1
- import { Component, CSSProperties } from "react";
2
- declare global {
3
- interface Window {
4
- blueLayoutRef: any;
5
- toggleSidebarEvent: any;
6
- }
7
- }
8
- export interface LayoutProps {
9
- id?: string;
10
- sidebarIn?: boolean;
11
- style?: CSSProperties;
12
- /**
13
- * Sidebar is automatically expanded on wider views.
14
- */
15
- expandSidebar?: boolean;
16
- /**
17
- * Disables sidebar.
18
- */
19
- hideSidebarMenu?: boolean;
20
- /**
21
- * Registers pages for the built-in routing system. Example: `[{name: "home", component: <HomePage />}]`
22
- */
23
- pages?: {
24
- name: string;
25
- component: JSX.Element;
26
- }[];
27
- /**
28
- * When `true`, always the "home" route will be rendered.
29
- */
30
- unrouteable?: boolean;
31
- /**
32
- * Extends `className`.
33
- */
34
- className?: string;
35
- /**
36
- * By default, the document title will automatically set. Set this prop to `true` to disable this behaviour.
37
- */
38
- disableTitleSet?: boolean;
39
- /**
40
- * If you don't use blueicon, you can define another icon element for the sidebar toggle button.
41
- */
42
- sidebarToggleIconComponent?: any;
43
- /**
44
- * Will replace status icons with custom ones. This will also overwrite the `useBlueicons` option.
45
- * This can be a SVG component or a normal element component.
46
- */
47
- statusIcons?: {
48
- danger: any;
49
- info: any;
50
- success: any;
51
- warning: any;
52
- };
53
- /**
54
- * Disables the header bars on pages.
55
- */
56
- disableHeaders?: boolean;
57
- /**
58
- * Define a function, that will be fired when switching routes. When your function returns `true`, the default route behaviour will be blocked.
59
- * You can use something like `window.blueLayoutRef.setState({ blockRouting: onHashChange })` globally to set the value from anywhere in your app.
60
- */
61
- blockRouting?: (newMatch: string[], currentMatch: string[]) => void | boolean;
62
- }
63
- export interface LayoutState {
64
- sidebarIn?: boolean;
65
- match: any;
66
- history: string[];
67
- hash: string;
68
- hashHistory: string[];
69
- blockRouting?: (newMatch: string[], currentMatch: string[]) => void | boolean;
70
- }
71
- /**
72
- * The main component. As soon this component is mounted, it is globally available under `window.blueLayoutRef`.
73
- * Also you can append your own event listeners with `blueLayoutRef.addEventListener(eventName, (prevProps, prevState) => { })`.
74
- *
75
- * Allowed event listeners:
76
- *
77
- * * **componentDidUpdate** - Component was updated.
78
- * Example: `blueLayoutRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
79
- * * **pageDidShowAgain** - Page appeared again with the same old state. In the callback function you can reinitialize things.
80
- * Example: `blueLayoutRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
81
- * * **pageDidHide** - This page disappeared and another page appears instead.
82
- * Example: `blueLayoutRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
83
- */
84
- export default class Layout extends Component<LayoutProps, LayoutState> {
85
- defaultMatch: string[];
86
- eventListeners: any[];
87
- constructor(props: LayoutProps);
88
- onHashChange(event: HashChangeEvent): void;
89
- static get defaultProps(): {
90
- expandSidebar: boolean;
91
- hideSidebarMenu: boolean;
92
- unrouteable: boolean;
93
- disableTitleSet: boolean;
94
- sidebarToggleIconComponent: JSX.Element;
95
- statusIcons: {
96
- danger: JSX.Element;
97
- info: JSX.Element;
98
- success: JSX.Element;
99
- warning: JSX.Element;
100
- };
101
- };
102
- componentDidMount(): void;
103
- componentWillUnmount(): void;
104
- componentDidUpdate(prevProps: LayoutProps, prevState: LayoutState): void;
105
- toggleSidebar(event: any): void;
106
- hideSidebar(e: any): void;
107
- initMatch(): void;
108
- addEventListener(param1: any, param2: any, param3: any): void;
109
- render(): JSX.Element;
110
- }