@opengeoweb/shared 2.0.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.
Files changed (92) hide show
  1. package/README.md +38 -0
  2. package/index.d.ts +3 -0
  3. package/lib/components/AlertBanner/AlertBanner.d.ts +10 -0
  4. package/lib/components/AlertBanner/AlertBanner.spec.d.ts +1 -0
  5. package/lib/components/AlertBanner/AlertBanner.stories.d.ts +2 -0
  6. package/lib/components/AlertBanner/index.d.ts +1 -0
  7. package/lib/components/AppHeader/AppHeader.d.ts +8 -0
  8. package/lib/components/AppHeader/AppHeader.spec.d.ts +1 -0
  9. package/lib/components/AppHeader/AppHeader.stories.d.ts +2 -0
  10. package/lib/components/AppHeader/index.d.ts +1 -0
  11. package/lib/components/AppLayout/AppLayout.d.ts +7 -0
  12. package/lib/components/AppLayout/AppLayout.spec.d.ts +1 -0
  13. package/lib/components/AppLayout/AppLayout.stories.d.ts +7 -0
  14. package/lib/components/AppLayout/index.d.ts +1 -0
  15. package/lib/components/ConfirmationDialog/ConfirmationDialog.d.ts +17 -0
  16. package/lib/components/ConfirmationDialog/ConfirmationDialog.spec.d.ts +1 -0
  17. package/lib/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +2 -0
  18. package/lib/components/ConfirmationDialog/ConfirmationService.d.ts +18 -0
  19. package/lib/components/ConfirmationDialog/ConfirmationService.spec.d.ts +1 -0
  20. package/lib/components/ConfirmationDialog/index.d.ts +2 -0
  21. package/lib/components/CustomSlider/CustomSlider.d.ts +18 -0
  22. package/lib/components/CustomSlider/CustomSlider.spec.d.ts +1 -0
  23. package/lib/components/CustomSlider/CustomSlider.stories.d.ts +2 -0
  24. package/lib/components/CustomSlider/index.d.ts +1 -0
  25. package/lib/components/DraggableResizable/Draggable.d.ts +16 -0
  26. package/lib/components/DraggableResizable/Draggable.spec.d.ts +1 -0
  27. package/lib/components/DraggableResizable/Resizable.d.ts +4 -0
  28. package/lib/components/DraggableResizable/Resizable.spec.d.ts +1 -0
  29. package/lib/components/DraggableResizable/index.d.ts +2 -0
  30. package/lib/components/DraggableResizable/types.d.ts +20 -0
  31. package/lib/components/StatusTag/StatusTag.d.ts +7 -0
  32. package/lib/components/StatusTag/StatusTag.spec.d.ts +1 -0
  33. package/lib/components/StatusTag/StatusTag.stories.d.ts +2 -0
  34. package/lib/components/StatusTag/index.d.ts +1 -0
  35. package/lib/components/ToolContainer/ToolContainer.d.ts +5 -0
  36. package/lib/components/ToolContainer/ToolContainer.spec.d.ts +1 -0
  37. package/lib/components/ToolContainer/ToolContainer.stories.d.ts +12 -0
  38. package/lib/components/ToolContainer/ToolContainerDraggable.d.ts +18 -0
  39. package/lib/components/ToolContainer/ToolContainerDraggable.spec.d.ts +1 -0
  40. package/lib/components/ToolContainer/ToolContainerDraggable.stories.d.ts +7 -0
  41. package/lib/components/ToolContainer/ToolContainerSnapShots.stories.d.ts +13 -0
  42. package/lib/components/ToolContainer/ToolFooter.d.ts +3 -0
  43. package/lib/components/ToolContainer/ToolFooter.spec.d.ts +1 -0
  44. package/lib/components/ToolContainer/ToolHeader.d.ts +4 -0
  45. package/lib/components/ToolContainer/ToolHeader.spec.d.ts +1 -0
  46. package/lib/components/ToolContainer/ToolHeader.stories.d.ts +10 -0
  47. package/lib/components/ToolContainer/index.d.ts +5 -0
  48. package/lib/components/ToolContainer/types.d.ts +16 -0
  49. package/lib/components/UserMenu/CheatSheet/CheatSheet.d.ts +3 -0
  50. package/lib/components/UserMenu/CheatSheet/CheatSheet.spec.d.ts +1 -0
  51. package/lib/components/UserMenu/CheatSheet/CheatSheet.stories.d.ts +7 -0
  52. package/lib/components/UserMenu/CheatSheet/Icons.d.ts +7 -0
  53. package/lib/components/UserMenu/CheatSheet/ShortcutList.d.ts +14 -0
  54. package/lib/components/UserMenu/CheatSheet/ShortcutList.spec.d.ts +1 -0
  55. package/lib/components/UserMenu/CheatSheet/ShortcutSegment.d.ts +7 -0
  56. package/lib/components/UserMenu/CheatSheet/ShortcutSegment.spec.d.ts +1 -0
  57. package/lib/components/UserMenu/UserMenu.d.ts +10 -0
  58. package/lib/components/UserMenu/UserMenu.spec.d.ts +1 -0
  59. package/lib/components/UserMenu/UserMenu.stories.d.ts +7 -0
  60. package/lib/components/UserMenu/UserMenuItemCheatSheet.d.ts +3 -0
  61. package/lib/components/UserMenu/UserMenuItemCheatSheet.spec.d.ts +1 -0
  62. package/lib/components/UserMenu/UserMenuItemTheme.d.ts +3 -0
  63. package/lib/components/UserMenu/UserMenuItemTheme.spec.d.ts +1 -0
  64. package/lib/components/UserMenu/index.d.ts +5 -0
  65. package/lib/components/UserMenu/useUserMenu.d.ts +7 -0
  66. package/lib/components/UserMenu/useUserMenu.spec.d.ts +1 -0
  67. package/lib/components/UserMenu/utils.d.ts +1 -0
  68. package/lib/components/components.stories.d.ts +9 -0
  69. package/lib/components/index.d.ts +9 -0
  70. package/lib/hooks/hooks.stories.d.ts +7 -0
  71. package/lib/hooks/index.d.ts +5 -0
  72. package/lib/hooks/useDraftFormHelpers/useDraftFormHelpers.d.ts +8 -0
  73. package/lib/hooks/useDraftFormHelpers/useDraftFormHelpers.spec.d.ts +1 -0
  74. package/lib/hooks/useIsMounted/useIsMounted.d.ts +4 -0
  75. package/lib/hooks/useIsMounted/useIsMounted.spec.d.ts +1 -0
  76. package/lib/hooks/usePoller/usePoller.d.ts +2 -0
  77. package/lib/hooks/usePoller/usePoller.spec.d.ts +1 -0
  78. package/lib/hooks/usePoller/usePoller.stories.d.ts +2 -0
  79. package/lib/hooks/usePreventBrowserClose/usePreventBrowserClose.d.ts +2 -0
  80. package/lib/hooks/usePreventBrowserClose/usePreventBrowserClose.spec.d.ts +1 -0
  81. package/lib/hooks/usePreventBrowserClose/usePreventBrowserClose.stories.d.ts +2 -0
  82. package/lib/hooks/usePrevious/usePrevious.d.ts +1 -0
  83. package/lib/hooks/usePrevious/usePrevious.spec.d.ts +1 -0
  84. package/lib/hooks/usePrevious/usePrevious.stories.d.ts +2 -0
  85. package/lib/storyshots/Storyshots.spec.d.ts +1 -0
  86. package/lib/utils/axiosErrorUtils/axiosErrorUtils.d.ts +3 -0
  87. package/lib/utils/axiosErrorUtils/axiosErrorUtils.spec.d.ts +1 -0
  88. package/lib/utils/axiosErrorUtils/index.d.ts +1 -0
  89. package/lib/utils/index.d.ts +1 -0
  90. package/package.json +31 -0
  91. package/shared.esm.js +2220 -0
  92. package/shared.umd.js +2232 -0
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ ![current version](https://img.shields.io/badge/dynamic/json?color=blue&label=version&query=version&url=https://gitlab.com/opengeoweb/opengeoweb/raw/master/libs/shared/package.json)
2
+ ![coverage](https://gitlab.com/opengeoweb/opengeoweb/badges/master/coverage.svg?job=test-shared)
3
+
4
+ # Shared
5
+
6
+ Library with shared components, hooks and utils for the opengeoweb project.
7
+ This library was generated with [Nx](https://nx.dev).
8
+
9
+ ## Rules for contributing
10
+
11
+ - Only add components/utils/hooks that are used in at least 2 other libraries.
12
+ - Provide a storybook demo
13
+ - Provide unit tests with 100% code coverage
14
+
15
+ ## Usage
16
+
17
+ ```
18
+ import { Example } from '@opengeoweb/shared';
19
+ ```
20
+
21
+ ## Running unit tests
22
+
23
+ Run `nx test shared` to execute the unit tests via [Jest](https://jestjs.io).
24
+
25
+ ## Image snapshot testing
26
+
27
+ The current regex filters on storyname takeSnapshot. So to add a story to the snapshot tests, simply add (takeSnapshot) to it's storyName and run the snapshot tests.
28
+
29
+ [Read more about snapshot testing](https://gitlab.com/opengeoweb/opengeoweb/#image-snapshot-testing)
30
+
31
+ ### Running snapshot tests and updating snapshots locally
32
+
33
+ 1. You need to have [docker](https://docs.docker.com/get-docker/) installed and running.
34
+ 2. Start Chromium by running: `npm run start-chromium`. (This will start a docker container with chromium, to run snapshot tests in. We need this to make sure everyone gets the same snapshot results.)
35
+ 3. Run the snapshot tests: `npm run test:image-snap-shared`. This will first create a new static storybook build and then run the tests.
36
+ 4. If a snapshot test fails, you can find and inspect the differences in `libs/shared/src/lib/storyshots/__image_snapshots__/__diff_output__/`.
37
+ 5. To update the snapshots, run `npm run test:image-snap-shared-update`. Snapshots are saved under `libs/shared/src/lib/storyshots/__image_snapshots__/`. Make sure to commit the new snapshots.
38
+ 6. Stop Chromium by running: `npm run stop-chromium`.
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './lib/components';
2
+ export * from './lib/hooks';
3
+ export * from './lib/utils';
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { Color } from '@material-ui/lab';
3
+ interface AlertBannerProps {
4
+ title: string;
5
+ severity?: Color;
6
+ info?: string | React.ReactElement;
7
+ dataTestId?: string;
8
+ }
9
+ declare const AlertBanner: React.FC<AlertBannerProps>;
10
+ export default AlertBanner;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const AlertBanners: () => React.ReactElement;
@@ -0,0 +1 @@
1
+ export { default as AlertBanner } from './AlertBanner';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface AppHeaderProps {
3
+ menu?: React.ReactNode;
4
+ userMenu?: React.ReactNode;
5
+ title?: string;
6
+ }
7
+ declare const AppHeader: React.FC<AppHeaderProps>;
8
+ export default AppHeader;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const AppHeaders: () => React.ReactElement;
@@ -0,0 +1 @@
1
+ export { default as AppHeader } from './AppHeader';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface AppLayoutProps {
3
+ header?: React.ReactNode;
4
+ children?: React.ReactNode;
5
+ }
6
+ declare const AppLayout: React.FC<AppLayoutProps>;
7
+ export default AppLayout;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const ThemeLight: () => React.ReactElement;
7
+ export declare const ThemeDark: () => React.ReactElement;
@@ -0,0 +1 @@
1
+ export { default as AppLayout } from './AppLayout';
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ export interface ConfirmationOptions {
3
+ catchOnCancel?: boolean;
4
+ title: string;
5
+ description?: string;
6
+ confirmLabel?: string;
7
+ cancelLabel?: string;
8
+ content?: React.ReactNode;
9
+ }
10
+ export declare type ConfirmationAction = 'CANCELLED' | 'CLOSED';
11
+ interface ConfirmationDialogProps extends ConfirmationOptions {
12
+ open: boolean;
13
+ onSubmit: () => void;
14
+ onClose: (reason: ConfirmationAction) => void;
15
+ }
16
+ export declare const ConfirmationDialog: React.FC<ConfirmationDialogProps>;
17
+ export default ConfirmationDialog;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const ConfirmationDialog: () => React.ReactElement;
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { ConfirmationAction, ConfirmationOptions } from './ConfirmationDialog';
3
+ declare type ConfirmationContext = (options: ConfirmationOptions) => Promise<void>;
4
+ export declare const useConfirmationDialog: () => ConfirmationContext;
5
+ export declare const useDialogActions: (awaitingPromiseRef: React.MutableRefObject<{
6
+ resolve: () => void;
7
+ reject: (reason: ConfirmationAction) => void;
8
+ }>, defaultOptions?: ConfirmationOptions) => {
9
+ openConfirmation: (options: ConfirmationOptions) => Promise<void>;
10
+ confirmationState: ConfirmationOptions;
11
+ handleSubmit: () => void;
12
+ handleClose: (reason: ConfirmationAction) => void;
13
+ };
14
+ interface ConfirmationServiceProviderProps {
15
+ children: React.ReactNode;
16
+ }
17
+ export declare const ConfirmationServiceProvider: React.FC<ConfirmationServiceProviderProps>;
18
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './ConfirmationDialog';
2
+ export * from './ConfirmationService';
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { Mark } from '@material-ui/core';
3
+ export declare const sliderStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"sliderHeader">;
4
+ interface CustomSliderProps {
5
+ value: number;
6
+ onChange: (event: any, newValue: number) => void;
7
+ onKeyDown?: (event: any) => void;
8
+ dataTestId?: string;
9
+ orientation?: 'horizontal' | 'vertical';
10
+ max?: number;
11
+ min?: number;
12
+ step?: number;
13
+ marks?: Mark[];
14
+ disabled?: boolean;
15
+ ThumbComponent?: React.ElementType<React.HTMLAttributes<HTMLSpanElement>>;
16
+ }
17
+ export declare const CustomSlider: React.FC<CustomSliderProps>;
18
+ export default CustomSlider;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const CustomSliderComponent: () => React.ReactElement;
@@ -0,0 +1 @@
1
+ export { CustomSlider, sliderStyles } from './CustomSlider';
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ declare type Position = {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ interface DraggableComponentProps {
7
+ nodeRef?: React.RefObject<HTMLElement>;
8
+ children?: React.ReactNode;
9
+ bounds?: 'parent' | string;
10
+ position?: Position;
11
+ onStop?: (event: React.MouseEvent<HTMLElement>, pos: Position) => void;
12
+ onMouseDown?: (event: MouseEvent) => void;
13
+ handle?: string;
14
+ }
15
+ declare const DraggableComponent: React.FC<DraggableComponentProps>;
16
+ export default DraggableComponent;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ResizableComponentProps } from './types';
3
+ declare const ResizeComponent: React.FC<ResizableComponentProps>;
4
+ export default ResizeComponent;
@@ -0,0 +1,2 @@
1
+ export { default as Draggable } from './Draggable';
2
+ export { default as Resizable } from './Resizable';
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { ResizableProps } from 're-resizable';
3
+ declare type Position = {
4
+ top: number;
5
+ left?: number;
6
+ right?: number;
7
+ };
8
+ export declare type Size = {
9
+ width?: number | string;
10
+ height?: number | string;
11
+ };
12
+ export interface ResizableComponentProps extends Omit<ResizableProps, 'size'> {
13
+ startPosition?: Position;
14
+ startSize?: Size;
15
+ setSize?: (size: Size) => void;
16
+ size?: Size;
17
+ children: React.ReactNode;
18
+ onResizeStart?: () => void;
19
+ }
20
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ interface StatusTagProps {
3
+ content: string;
4
+ color: string;
5
+ }
6
+ declare const StatusTag: React.FC<StatusTagProps>;
7
+ export default StatusTag;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const StatusTags: () => React.ReactElement;
@@ -0,0 +1 @@
1
+ export { default as StatusTag } from './StatusTag';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ToolContainerProps } from './types';
3
+ export declare const BASE_ELEVATION = 5;
4
+ declare const ToolContainer: React.FC<ToolContainerProps>;
5
+ export default ToolContainer;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ includeStories: string[];
5
+ };
6
+ export default _default;
7
+ interface ToolContainerDemoProps {
8
+ isSnapShot?: boolean;
9
+ }
10
+ export declare const ToolContainerDemo: React.FC<ToolContainerDemoProps>;
11
+ export declare const ThemeLight: () => React.ReactElement;
12
+ export declare const ThemeDark: () => React.ReactElement;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { ResizableComponentProps, Size } from '../DraggableResizable/types';
3
+ import { HeaderSize } from './types';
4
+ interface DraggableComponentProps extends Omit<ResizableComponentProps, 'bounds'> {
5
+ onStartResize?: () => void;
6
+ isOpen?: boolean;
7
+ onClose?: () => void;
8
+ title?: string;
9
+ headerSize?: HeaderSize;
10
+ initialMaxHeight?: string | number;
11
+ onChangeSize?: (size: Size) => void;
12
+ onMouseDown?: () => void;
13
+ bounds?: 'parent' | string;
14
+ order?: number;
15
+ source?: 'app' | 'module';
16
+ }
17
+ declare const DraggableComponent: React.FC<DraggableComponentProps>;
18
+ export default DraggableComponent;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const ThemeLight: React.FC;
7
+ export declare const ThemeDark: React.FC;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const ThemeLight: {
7
+ (): React.ReactElement;
8
+ storyName: string;
9
+ };
10
+ export declare const ThemeDark: {
11
+ (): React.ReactElement;
12
+ storyName: string;
13
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const ToolFooter: React.FC;
3
+ export default ToolFooter;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ToolHeaderProps } from './types';
3
+ declare const ToolHeader: React.FC<ToolHeaderProps>;
4
+ export default ToolHeader;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ interface DemoStoryProps {
7
+ linkToZeplinDesign?: string;
8
+ }
9
+ export declare const ThemeLight: React.FC<DemoStoryProps>;
10
+ export declare const ThemeDark: React.FC<DemoStoryProps>;
@@ -0,0 +1,5 @@
1
+ export { default as ToolContainer } from './ToolContainer';
2
+ export { default as ToolContainerDraggable } from './ToolContainerDraggable';
3
+ export { default as ToolHeader } from './ToolHeader';
4
+ export { default as ToolFooter } from './ToolFooter';
5
+ export * from './types';
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { PaperProps } from '@material-ui/core';
3
+ export declare type HeaderSize = 'xxs' | 'xs' | 'small' | 'medium' | 'large';
4
+ export interface ToolHeaderProps {
5
+ title?: string;
6
+ size?: HeaderSize;
7
+ onClose?: () => void;
8
+ className?: string;
9
+ isDraggable?: boolean;
10
+ }
11
+ export interface ToolContainerProps extends PaperProps, ToolHeaderProps {
12
+ isResizable?: boolean;
13
+ children?: React.ReactNode;
14
+ maxHeight?: string | number;
15
+ headerClassName?: string;
16
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const CheatSheet: React.FC;
3
+ export default CheatSheet;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const ThemeLight: () => React.ReactElement;
7
+ export declare const ThemeDark: () => React.ReactElement;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const OptionIcon: React.FC;
3
+ export declare const CommandIcon: React.FC;
4
+ export declare const ArrowLeftIcon: React.FC;
5
+ export declare const ArrowRightIcon: React.FC;
6
+ export declare const ArrowDownIcon: React.FC;
7
+ export declare const ArrowUpIcon: React.FC;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ declare type ShortCut = {
3
+ title: string;
4
+ description: React.ReactNode;
5
+ descriptionMac?: React.ReactNode;
6
+ };
7
+ declare type Platform = 'windows' | 'mac';
8
+ export declare const shortcuts: ShortCut[];
9
+ export declare const getShortcutList: (shortcutList: ShortCut[], platform?: Platform) => ShortCut[];
10
+ interface ShortcutListProps {
11
+ platform?: Platform;
12
+ }
13
+ declare const ShortcutList: React.FC<ShortcutListProps>;
14
+ export default ShortcutList;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface ShortCutSegmentProps {
3
+ type?: 'text' | 'icon' | 'divider' | 'connect';
4
+ children?: React.ReactNode;
5
+ }
6
+ declare const ShortCutSegment: React.FC<ShortCutSegmentProps>;
7
+ export default ShortCutSegment;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface UserMenuProps {
3
+ isOpen?: boolean;
4
+ onToggle?: () => void;
5
+ onClose?: () => void;
6
+ children?: React.ReactNode;
7
+ initials?: string;
8
+ }
9
+ declare const UserMenu: React.FC<UserMenuProps>;
10
+ export default UserMenu;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const ThemeLight: () => React.ReactElement;
7
+ export declare const ThemeDark: () => React.ReactElement;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const UserMenuItemCheatSheet: React.FC;
3
+ export default UserMenuItemCheatSheet;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const MenuItemTheme: React.FC;
3
+ export default MenuItemTheme;
@@ -0,0 +1,5 @@
1
+ export { default as UserMenu } from './UserMenu';
2
+ export { default as UserMenuItemTheme } from './UserMenuItemTheme';
3
+ export { default as UserMenuItemCheatSheet } from './UserMenuItemCheatSheet';
4
+ export { useUserMenu } from './useUserMenu';
5
+ export { getInitials } from './utils';
@@ -0,0 +1,7 @@
1
+ interface UseUserMenuProps {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ onToggle: () => void;
5
+ }
6
+ export declare const useUserMenu: (open?: boolean) => UseUserMenuProps;
7
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const getInitials: (name: string) => string;
@@ -0,0 +1,9 @@
1
+ export * from './AlertBanner/AlertBanner.stories';
2
+ export * from './StatusTag/StatusTag.stories';
3
+ export * from './AppHeader/AppHeader.stories';
4
+ export * from './ConfirmationDialog/ConfirmationDialog.stories';
5
+ export * from './CustomSlider/CustomSlider.stories';
6
+ declare const _default: {
7
+ title: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,9 @@
1
+ export * from './StatusTag';
2
+ export * from './ConfirmationDialog';
3
+ export * from './AlertBanner';
4
+ export * from './AppLayout';
5
+ export * from './AppHeader';
6
+ export * from './DraggableResizable';
7
+ export * from './UserMenu';
8
+ export * from './ToolContainer';
9
+ export * from './CustomSlider';
@@ -0,0 +1,7 @@
1
+ export * from './usePoller/usePoller.stories';
2
+ export * from './usePrevious/usePrevious.stories';
3
+ export * from './usePreventBrowserClose/usePreventBrowserClose.stories';
4
+ declare const _default: {
5
+ title: string;
6
+ };
7
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export * from './usePreventBrowserClose/usePreventBrowserClose';
2
+ export * from './usePoller/usePoller';
3
+ export * from './usePrevious/usePrevious';
4
+ export * from './useIsMounted/useIsMounted';
5
+ export * from './useDraftFormHelpers/useDraftFormHelpers';
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ export declare const HIDDEN_INPUT_HELPER_IS_DRAFT = "IS_DRAFT";
3
+ export declare const useDraftFormHelpers: () => {
4
+ isRequired: (value: string) => boolean | string;
5
+ toggleIsDraft: (isDraft: boolean) => void;
6
+ isDraft: () => boolean;
7
+ DraftFieldHelper: () => React.ReactElement;
8
+ };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export declare const useIsMounted: () => {
3
+ isMounted: React.MutableRefObject<boolean>;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const usePoller: (deps: unknown[], callback: () => void, pollingInterval?: number) => React.MutableRefObject<number>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const usePollerDemo: () => React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export declare const showPrompt: (event: Event) => void;
2
+ export declare function usePreventBrowserClose(shouldPreventClose: boolean): void;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const UsePreventBrowserReload: () => React.ReactElement;
@@ -0,0 +1 @@
1
+ export declare function usePrevious<T>(value: T): T;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const usePreviousDemo: () => React.ReactElement;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { AxiosError } from 'axios';
2
+ export declare const isAxiosError: (error: AxiosError | Error) => error is AxiosError<any>;
3
+ export declare const getAxiosErrorMessage: (error: AxiosError) => string;