@splunk/react-page 8.0.0 → 8.2.0-beta.1

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/Loading.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ export default Loading;
2
+ declare function Loading({ AppBarFallback, hideAppBar, hideChrome, hideSplunkBar, SplunkBarFallback, }: {
3
+ AppBarFallback?: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ hideAppBar: any;
5
+ hideChrome: any;
6
+ hideSplunkBar: any;
7
+ SplunkBarFallback?: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare namespace Loading {
10
+ export { propTypes };
11
+ }
12
+ declare namespace propTypes {
13
+ let hideAppBar: PropTypes.Requireable<boolean>;
14
+ let hideChrome: PropTypes.Requireable<boolean>;
15
+ let hideSplunkBar: PropTypes.Requireable<boolean>;
16
+ let AppBarFallback: PropTypes.Requireable<PropTypes.ReactComponentLike>;
17
+ let SplunkBarFallback: PropTypes.Requireable<PropTypes.ReactComponentLike>;
18
+ }
19
+ import PropTypes from 'prop-types';
@@ -0,0 +1,7 @@
1
+ export const Main: import("styled-components").StyledComponent<"div", any, import("@splunk/themes").OptionalThemedProps<import("@splunk/themes").AnyTheme>, never>;
2
+ export const SplunkBar: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export const AppBar: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export const AppBody: import("styled-components").StyledComponent<"div", any, import("@splunk/themes").OptionalThemedProps<import("@splunk/themes").AnyTheme>, never>;
5
+ export const Dot: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export const APPBAR_HEIGHT: 45;
7
+ export const SPLUNKBAR_HEIGHT: 34;
@@ -0,0 +1,39 @@
1
+ export default layout;
2
+ /**
3
+ * Renders a React element into the Layout API.
4
+ * @public
5
+ * @param {element} element - A React element.
6
+ * @param {element} render - A render function that returns an unmount() function.
7
+ * @param {object} [options]
8
+ * @param {string} [options.pageTitle] - Changes the page title.
9
+ * @param {Boolean} [options.hideAppBar = false] - Hides the app bar.
10
+ * @param {Boolean} [options.hideAppsList = false] - Hides the app list in
11
+ * the Splunk bar.
12
+ * @param {Boolean} [options.hideChrome = false] - Renders only the main content, hiding
13
+ * the Splunk bar, app bar, and footer.
14
+ * @param {Boolean} [options.hideFooter = false] - Hides the footer.
15
+ * @param {Boolean} [options.hideSplunkBar = false] - Hides the Splunk bar.
16
+ * @param {string} [options.layout = 'scrolling'] - Set to `fixed` to fix all navigation bars
17
+ * to the edge of the page.
18
+ * @param {Boolean} [options.useGlobalLayerStack = true] - Wraps elements in @splunk/react-ui's LayerStackGlobalProvider.
19
+ * @private {Boolean} [options.navLayout = 'classic'] - Used to determine layout asset to load. Ex. "classic" or "auto".
20
+ * @param {String} [options.theme = 'light'] - Used to theme UI elements. Ex. "light" or "dark".
21
+ * @param {String} [options.themeFamily = 'enterprise'] - Ex. Theme family to use for UI elements. Ex. "enterprise" or "prisma".
22
+ * @param {String} [options.themeDensity] - Ex. Theme density to use for UI elements. Ex. "compact" or "comfortable".
23
+ * @param {String} [options.loader = 'scriptjs'] - Configures the loader used for the loading the layout - available loaders are "scriptjs" and "requirejs".
24
+ * Change this only if the default loader does not work for your application.
25
+ * @param {Boolean} [options.lazyLoadLayout = false] - Prioritizes loading the React element and lazily fetches and compiles the layout API (navigation bar).
26
+ * @param {element} [options.SplunkBarFallback = SplunkBar] - A React element used as a placeholder for the splunk bar while the navigation bar is loading.
27
+ * @param {element} [options.AppBarFallback = AppBar] - A React element used as a placeholder for the app bar while the navigation bar is loading.
28
+ * @param {function} [options.onLayoutComplete] - A callback function which executes after layout API is fetched and compiled.
29
+ */
30
+ declare function layout(element: any, render: any, { useGlobalLayerStack, pageTitle, theme, themeDensity, loader, ...layoutAPIOptions }?: {
31
+ pageTitle?: string;
32
+ hideAppBar?: boolean;
33
+ hideAppsList?: boolean;
34
+ hideChrome?: boolean;
35
+ hideFooter?: boolean;
36
+ hideSplunkBar?: boolean;
37
+ layout?: string;
38
+ useGlobalLayerStack?: boolean;
39
+ }): void;
package/index.d.ts ADDED
@@ -0,0 +1,50 @@
1
+ export default layout;
2
+ /**
3
+ * Renders a React element into the Layout API.
4
+ * @public
5
+ * @param {element} element - A React element.
6
+ * @param {object} [options]
7
+ * @param {string} [options.pageTitle] - Changes the page title.
8
+ * @param {Boolean} [options.hideAppBar = false] - Hides the app bar.
9
+ * @param {Boolean} [options.hideAppsList = false] - Hides the app list in
10
+ * the Splunk bar.
11
+ * @param {Boolean} [options.hideChrome = false] - Renders only the main content, hiding
12
+ * the Splunk bar, app bar, and footer.
13
+ * @param {Boolean} [options.hideFooter = false] - Hides the footer.
14
+ * @param {Boolean} [options.hideSplunkBar = false] - Hides the Splunk bar.
15
+ * @param {string} [options.layout = 'scrolling'] - Set to `fixed` to fix all navigation bars
16
+ * to the edge of the page.
17
+ * @param {Boolean} [options.useGlobalLayerStack = true] - Wraps elements in `@splunk/react-ui`'s LayerStackGlobalProvider.
18
+ * @param {String} [options.theme = 'light'] - Used to theme UI elements. Ex. "light" or "dark".
19
+ * @param {String} [options.themeFamily = 'enterprise'] - Ex. Theme family to use for UI elements. Ex. "enterprise" or "prisma".
20
+ * @param {String} [options.themeDensity] - Ex. Theme density to use for UI elements. Ex. "compact" or "comfortable".
21
+ * @param {String} [options.loader = 'scriptjs'] - Configures the loader used for the loading the layout - available loaders are "scriptjs" and "requirejs".
22
+ * Change this only if the default loader does not work for your application.
23
+ * @param {Boolean} [options.lazyLoadLayout = false] - Prioritizes loading the React element and lazily fetches and compiles the layout API (navigation bar).
24
+ * @param {element} [options.SplunkBarFallback = SplunkBar] - A React element used as a placeholder for the splunk bar while the navigation bar is loading.
25
+ * @param {element} [options.AppBarFallback = AppBar] - A React element used as a placeholder for the app bar while the navigation bar is loading.
26
+ * @param {function} [options.onLayoutComplete] - A callback function which executes after layout API is fetched and compiled.
27
+ * @param {function} [options.onLayoutStart] - A callback function which executes once the layout starts to render
28
+ */
29
+ declare function layout(element: any, options?: {
30
+ pageTitle?: string;
31
+ hideAppBar?: boolean;
32
+ hideAppsList?: boolean;
33
+ hideChrome?: boolean;
34
+ hideFooter?: boolean;
35
+ hideSplunkBar?: boolean;
36
+ layout?: string;
37
+ useGlobalLayerStack?: boolean;
38
+ theme?: string;
39
+ themeFamily?: string;
40
+ themeDensity?: string;
41
+ loader?: string;
42
+ lazyLoadLayout?: boolean;
43
+ SplunkBarFallback?: any;
44
+ AppBarFallback?: any;
45
+ onLayoutComplete?: Function;
46
+ onLayoutStart?: Function;
47
+ }): void;
48
+ import { AppBar } from './LoadingStyles';
49
+ import { SplunkBar } from './LoadingStyles';
50
+ export { AppBar, SplunkBar };